diff --git a/build/active-filters-frontend.asset.php b/build/active-filters-frontend.asset.php new file mode 100644 index 00000000000..75be0e0104f --- /dev/null +++ b/build/active-filters-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '280f01e65a9f96e0aec29487c9a1252b'); \ No newline at end of file diff --git a/build/active-filters-frontend.js b/build/active-filters-frontend.js new file mode 100644 index 00000000000..8aad65af6a8 --- /dev/null +++ b/build/active-filters-frontend.js @@ -0,0 +1,13 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=220)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},108:function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{srcElement:t,size:r=24,...c}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:r,height:r,...c}):null}},124:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a}));var n=r(2);const c=Object(n.getSetting)("attributes",[]).reduce((e,t)=>{const r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;var n;return r.id&&e.push(r),e},[]),o=e=>{if(e)return c.find(t=>t.id===e)},a=e=>{if(e)return c.find(t=>t.taxonomy===e)}},125:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return o}));var n=r(4);const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const o=e.filter(e=>e.attribute===r.taxonomy),a=o.length?o[0]:null;if(!(a&&a.slug&&Array.isArray(a.slug)&&a.slug.includes(c)))return;const s=a.slug.filter(e=>e!==c),l=e.filter(e=>e.attribute!==r.taxonomy);s.length>0&&(a.slug=s.sort(),l.push(a)),t(Object(n.sortBy)(l,"attribute"))},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";const a=e.filter(e=>e.attribute!==r.taxonomy);0===c.length?t(a):(a.push({attribute:r.taxonomy,operator:o,slug:c.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(n.sortBy)(a,"attribute")))}},138:function(e,t){},17:function(e,t){e.exports=window.wp.isShallowEqual},18:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t{let{className:t,size:r,...n}=e;return Object(o.createElement)(a.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),Object(o.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=s},2:function(e,t){e.exports=window.wc.wcSettings},203:function(e,t,r){"use strict";var n=r(18),c=r.n(n),o=r(0),a=r(5),s=r.n(a),l=r(1),i=r(108),u=r(198);r(138);var b=e=>{let{text:t,screenReaderText:r="",element:n="li",className:a="",radius:l="small",children:i=null,...u}=e;const b=n,p=s()(a,"wc-block-components-chip","wc-block-components-chip--radius-"+l),d=Boolean(r&&r!==t);return Object(o.createElement)(b,c()({className:p},u),Object(o.createElement)("span",{"aria-hidden":d,className:"wc-block-components-chip__text"},t),d&&Object(o.createElement)("span",{className:"screen-reader-text"},r),i)};t.a=e=>{let{ariaLabel:t="",className:r="",disabled:n=!1,onRemove:a=(()=>{}),removeOnAnyClick:p=!1,text:d,screenReaderText:m="",...f}=e;const g=p?"span":"button";if(!t){const e=m&&"string"==typeof m?m:d;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:n,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},j=p?O:{},_=p?{"aria-hidden":!0}:O;return Object(o.createElement)(b,c()({},f,j,{className:s()(r,"is-removable"),element:p?"button":f.element,screenReaderText:m,text:d}),Object(o.createElement)(g,c()({className:"wc-block-components-chip__remove"},_),Object(o.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},220:function(e,t,r){e.exports=r(240)},221:function(e,t){},240:function(e,t,r){"use strict";r.r(t);var n=r(74),c=r(0),o=r(1),a=r(59),s=r(2),l=r(5),i=r.n(l),u=(r(8),r(37)),b=(r(221),r(124)),p=r(48),d=r(203);const m=(e,t)=>Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(p.formatPrice)(e),Object(p.formatPrice)(t)):Number.isFinite(e)?Object(o.sprintf)( +/* translators: %s min price */ +Object(o.__)("From %s","woo-gutenberg-products-block"),Object(p.formatPrice)(e)):Object(o.sprintf)( +/* translators: %s max price */ +Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(p.formatPrice)(t)),f=e=>{let{type:t,name:r,prefix:n,removeCallback:a=(()=>{}),showLabel:s=!0,displayStyle:l}=e;const i=n?Object(c.createElement)(c.Fragment,null,n," ",r):r,b=Object(o.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),r);return Object(c.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},s&&Object(c.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===l?Object(c.createElement)(d.a,{element:"span",text:i,onRemove:a,radius:"large",ariaLabel:b}):Object(c.createElement)("span",{className:"wc-block-active-filters__list-item-name"},i,Object(c.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:a},Object(c.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("ellipse",{cx:"8",cy:"8",rx:"8",ry:"8",transform:"rotate(-180 8 8)",fill:"currentColor",fillOpacity:"0.7"}),Object(c.createElement)("rect",{x:"10.636",y:"3.94983",width:"2",height:"9.9466",transform:"rotate(45 10.636 3.94983)",fill:"white"}),Object(c.createElement)("rect",{x:"12.0503",y:"11.0209",width:"2",height:"9.9466",transform:"rotate(135 12.0503 11.0209)",fill:"white"})),Object(c.createElement)(u.a,{screenReaderLabel:b}))))};var g=r(82),O=r(25),j=r(125),_=e=>{let{attributeObject:t={},slugs:r=[],operator:n="in",displayStyle:s}=e;const{results:l,isLoading:i}=Object(g.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[t.id]}),[u,b]=Object(a.b)("attributes",[]);if(i)return null;const p=t.label;return Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-active-filters__list-item-type"},p,":"),Object(c.createElement)("ul",null,r.map((e,r)=>{const a=l.find(t=>t.slug===e);if(!a)return null;let i="";return r>0&&"and"===n&&(i=Object(c.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),f({type:p,name:Object(O.decodeEntities)(a.name||e),prefix:i,removeCallback:()=>{Object(j.a)(u,b,t,e)},showLabel:!1,displayStyle:s})})))};Object(n.b)({selector:".wp-block-woocommerce-active-filters",Block:e=>{let{attributes:t,isEditor:r=!1}=e;const[n,l]=Object(a.b)("attributes",[]),[p,d]=Object(a.b)("stock_status",[]),[g,O]=Object(a.b)("min_price"),[j,y]=Object(a.b)("max_price"),w=Object(s.getSetting)("stockStatusOptions",[]),E=Object(c.useMemo)(()=>{if(p.length>0)return p.map(e=>f({type:Object(o.__)("Stock Status","woo-gutenberg-products-block"),name:w[e],removeCallback:()=>{const t=p.filter(t=>t!==e);d(t)},displayStyle:t.displayStyle}))},[w,p,d,t.displayStyle]),h=Object(c.useMemo)(()=>Number.isFinite(g)||Number.isFinite(j)?f({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:m(g,j),removeCallback:()=>{O(void 0),y(void 0)},displayStyle:t.displayStyle}):null,[g,j,t.displayStyle,O,y]),v=Object(c.useMemo)(()=>n.map(e=>{const r=Object(b.b)(e.attribute);return Object(c.createElement)(_,{attributeObject:r,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}),[n,t.displayStyle]);if(!(n.length>0||p.length>0||Number.isFinite(g)||Number.isFinite(j)||r))return null;const k="h"+t.headingLevel,S=i()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(c.createElement)(c.Fragment,null,!r&&t.heading&&Object(c.createElement)(k,{className:"wc-block-active-filters__title"},t.heading),Object(c.createElement)("div",{className:"wc-block-active-filters"},Object(c.createElement)("ul",{className:S},r?Object(c.createElement)(c.Fragment,null,f({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),f({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(c.createElement)(c.Fragment,null,h,E,v)),Object(c.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:()=>{O(void 0),y(void 0),l([]),d([])}},Object(c.createElement)(u.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},getProps:e=>({attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}})})},25:function(e,t){e.exports=window.wp.htmlEntities},29:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},3:function(e,t){e.exports=window.React},32:function(e,t){e.exports=window.wp.primitives},33:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(17),o=r.n(c);function a(e){const t=Object(n.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},34:function(e,t,r){"use strict";var n=r(29),c=r.n(n),o=r(0),a=r(3),s=r(1),l=r(84),i=e=>{let{imageUrl:t=l.l+"/block-error.svg",header:r=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:c,errorMessagePrefix:a=Object(s.__)("Error:","woo-gutenberg-products-block"),button:i}=e;return Object(o.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(o.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(o.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(o.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(o.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),c&&Object(o.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",c),i&&Object(o.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},i)))};r(55);class u extends a.Component{constructor(){super(...arguments),c()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:c,renderError:a,button:s}=this.props,{errorMessage:l,hasError:u}=this.state;return u?"function"==typeof a?a({errorMessage:l}):Object(o.createElement)(i,{errorMessage:r?l:null,header:e,imageUrl:t,text:n,errorMessagePrefix:c,button:s}):this.props.children}}t.a=u},37:function(e,t,r){"use strict";var n=r(0),c=r(5),o=r.n(c);t.a=e=>{let t,{label:r,screenReaderLabel:c,wrapperElement:a,wrapperProps:s={}}=e;const l=null!=r,i=null!=c;return!l&&i?(t=a||"span",s={...s,className:o()(s.className,"screen-reader-text")},Object(n.createElement)(t,s,c)):(t=a||n.Fragment,l&&i&&r!==c?Object(n.createElement)(t,s,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},c)):Object(n.createElement)(t,s,r))}},4:function(e,t){e.exports=window.lodash},43:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const c=Object(n.createContext)("page"),o=()=>Object(n.useContext)(c);c.Provider},48:function(e,t){e.exports=window.wc.priceFormat},5:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t{const t=Object(u.a)();e=e||t;const r=Object(c.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:a}=Object(c.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(o.useCallback)(t=>{a(e,t)},[e,a])]},p=(e,t,r)=>{const a=Object(u.a)();r=r||a;const s=Object(c.useSelect)(c=>c(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t),[r,e]),{setQueryValue:l}=Object(c.useDispatch)(n.QUERY_STATE_STORE_KEY);return[s,Object(o.useCallback)(t=>{l(r,e,t)},[r,e,l])]},d=(e,t)=>{const r=Object(u.a)();t=t||r;const[n,c]=b(t),a=Object(l.a)(n),p=Object(l.a)(e),d=Object(i.a)(p),m=Object(o.useRef)(!1);return Object(o.useEffect)(()=>{s()(d,p)||(c(Object.assign({},a,p)),m.current=!0)},[a,p,d,c]),m.current?[n,c]:[e,c]}},6:function(e,t){e.exports=window.wc.wcBlocksData},64:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0);const c=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},74:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return u}));var n=r(18),c=r.n(n),o=r(0),a=r(34);const s=[".wp-block-woocommerce-cart"],l=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:c=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const o=n(e,r),a=c(e,r),s={...e.dataset,...o.attributes||{}};e.classList.remove("is-loading"),i({Block:t,container:e,props:o,attributes:s,errorBoundaryProps:a})})},i=e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:l={}}=e;Object(o.render)(Object(o.createElement)(a.a,l,Object(o.createElement)(o.Suspense,{fallback:Object(o.createElement)("div",{className:"wc-block-placeholder"})},Object(o.createElement)(t,c()({},s,{attributes:n})))),r)},u=e=>{const t=document.body.querySelectorAll(s.join(","));(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:c,wrappers:o}=e;const a=document.body.querySelectorAll(c);o.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,o)),l({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:c,wrapper:o}=e;const a=o.querySelectorAll(c);l({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},75:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(3);function c(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},8:function(e,t,r){e.exports=r(56)()},82:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(6),c=r(9),o=r(0),a=r(33),s=r(64);const l=e=>{const{namespace:t,resourceName:r,resourceValues:l=[],query:i={},shouldSelect:u=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(o.useRef)({results:[],isLoading:!0}),p=Object(a.a)(i),d=Object(a.a)(l),m=Object(s.a)(),f=Object(c.useSelect)(e=>{if(!u)return null;const c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,p,d],a=c.getCollectionError(...o);return a&&m(a),{results:c.getCollection(...o),isLoading:!c.hasFinishedResolution("getCollection",o)}},[t,r,d,p,u]);return null!==f&&(b.current=f),b.current}},84:function(e,t,r){"use strict";r.d(t,"n",(function(){return o})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return s})),r.d(t,"m",(function(){return l})),r.d(t,"i",(function(){return i})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return b})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return d})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return f})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return O})),r.d(t,"b",(function(){return j}));var n,c=r(2);const o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=o.pluginUrl+"images/",s=o.pluginUrl+"build/",l=o.buildPhase,i=null===(n=c.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(c.STORE_PAGES.checkout.id,c.STORE_PAGES.checkout.permalink),b=c.STORE_PAGES.privacy.permalink,p=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),d=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id,c.STORE_PAGES.cart.permalink),m=c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),f=Object(c.getSetting)("shippingCountries",{}),g=Object(c.getSetting)("allowedCountries",{}),O=Object(c.getSetting)("shippingStates",{}),j=Object(c.getSetting)("allowedStates",{})},9:function(e,t){e.exports=window.wp.data}}); \ No newline at end of file diff --git a/build/active-filters.asset.php b/build/active-filters.asset.php new file mode 100644 index 00000000000..de134b3a90d --- /dev/null +++ b/build/active-filters.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '4f82af4035935f8a21a7af47510429da'); \ No newline at end of file diff --git a/build/active-filters.js b/build/active-filters.js new file mode 100644 index 00000000000..0c3a6b3d01f --- /dev/null +++ b/build/active-filters.js @@ -0,0 +1,17 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["active-filters"]=function(e){function t(t){for(var n,o,a=t[0],s=t[1],i=t[2],b=0,p=[];b{const t=Object(u.a)();e=e||t;const c=Object(r.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:o}=Object(r.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(l.useCallback)(t=>{o(e,t)},[e,o])]},p=(e,t,c)=>{const o=Object(u.a)();c=c||o;const a=Object(r.useSelect)(r=>r(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:s}=Object(r.useDispatch)(n.QUERY_STATE_STORE_KEY);return[a,Object(l.useCallback)(t=>{s(c,e,t)},[c,e,s])]},m=(e,t)=>{const c=Object(u.a)();t=t||c;const[n,r]=b(t),o=Object(s.a)(n),p=Object(s.a)(e),m=Object(i.a)(p),d=Object(l.useRef)(!1);return Object(l.useEffect)(()=>{a()(m,p)||(r(Object.assign({},o,p)),d.current=!0)},[o,p,m,r]),d.current?[n,r]:[e,r]}},117:function(e,t){},12:function(e,t){e.exports=window.wp.compose},121:function(e,t,c){"use strict";var n=c(0),r=c(6),l=c(1),o=c(4);function a(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(n.createElement)(o.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:c[t]})):null}class s extends n.Component{createLevelControl(e,t,c){const r=e===t;return{icon:Object(n.createElement)(a,{level:e}),title:Object(l.sprintf)( +/* translators: %s: heading level e.g: "2", "3", "4" */ +Object(l.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:r,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:l,onChange:s}=this.props;return Object(n.createElement)(o.ToolbarGroup,{isCollapsed:e,icon:Object(n.createElement)(a,{level:l}),controls:Object(r.range)(t,c).map(e=>this.createLevelControl(e,l,s))})}}t.a=s},126:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0);const r=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},14:function(e,t){e.exports=window.wp.blocks},140:function(e,t,c){"use strict";var n=c(0),r=(c(2),c(9)),l=c(12),o=c(1);c(194),t.a=Object(l.withInstanceId)(e=>{let{className:t,headingLevel:c,onChange:l,heading:a,instanceId:s}=e;const i="h"+c;return Object(n.createElement)(i,{className:t},Object(n.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+s},Object(o.__)("Block title","woo-gutenberg-products-block")),Object(n.createElement)(r.PlainText,{id:"block-title-"+s,className:"wc-block-editor-components-title",value:a,onChange:l}))})},142:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(8);function r(e,t){const c=Object(n.useRef)();return Object(n.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},149:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(19),r=c(10),l=c(0),o=c(52),a=c(126);const s=e=>{const{namespace:t,resourceName:c,resourceValues:s=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(l.useRef)({results:[],isLoading:!0}),p=Object(o.a)(i),m=Object(o.a)(s),d=Object(a.a)(),h=Object(r.useSelect)(e=>{if(!u)return null;const r=e(n.COLLECTIONS_STORE_KEY),l=[t,c,p,m],o=r.getCollectionError(...l);return o&&d(o),{results:r.getCollection(...l),isLoading:!r.hasFinishedResolution("getCollection",l)}},[t,c,m,p,u]);return null!==h&&(b.current=h),b.current}},18:function(e,t){e.exports=window.wp.primitives},19:function(e,t){e.exports=window.wc.wcBlocksData},194:function(e,t){},195:function(e,t){},20:function(e,t){e.exports=window.wp.htmlEntities},246:function(e,t,c){"use strict";c.d(t,"a",(function(){return l})),c.d(t,"b",(function(){return o}));var n=c(3);const r=Object(n.getSetting)("attributes",[]).reduce((e,t)=>{const c=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;var n;return c.id&&e.push(c),e},[]),l=e=>{if(e)return r.find(t=>t.id===e)},o=e=>{if(e)return r.find(t=>t.taxonomy===e)}},247:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return l}));var n=c(6);const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},c=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const l=e.filter(e=>e.attribute===c.taxonomy),o=l.length?l[0]:null;if(!(o&&o.slug&&Array.isArray(o.slug)&&o.slug.includes(r)))return;const a=o.slug.filter(e=>e!==r),s=e.filter(e=>e.attribute!==c.taxonomy);a.length>0&&(o.slug=a.sort(),s.push(o)),t(Object(n.sortBy)(s,"attribute"))},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},c=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";const o=e.filter(e=>e.attribute!==c.taxonomy);0===r.length?t(o):(o.push({attribute:c.taxonomy,operator:l,slug:r.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(n.sortBy)(o,"attribute")))}},256:function(e,t,c){"use strict";var n=c(7),r=c.n(n),l=c(0),o=c(5),a=c.n(o),s=c(1),i=c(55),u=c(331);c(195);var b=e=>{let{text:t,screenReaderText:c="",element:n="li",className:o="",radius:s="small",children:i=null,...u}=e;const b=n,p=a()(o,"wc-block-components-chip","wc-block-components-chip--radius-"+s),m=Boolean(c&&c!==t);return Object(l.createElement)(b,r()({className:p},u),Object(l.createElement)("span",{"aria-hidden":m,className:"wc-block-components-chip__text"},t),m&&Object(l.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:n=!1,onRemove:o=(()=>{}),removeOnAnyClick:p=!1,text:m,screenReaderText:d="",...h}=e;const O=p?"span":"button";if(!t){const e=d&&"string"==typeof d?d:m;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const g={"aria-label":t,disabled:n,onClick:o,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||o()}},j=p?g:{},v=p?{"aria-hidden":!0}:g;return Object(l.createElement)(b,r()({},h,j,{className:a()(c,"is-removable"),element:p?"button":h.element,screenReaderText:d,text:m}),Object(l.createElement)(O,r()({className:"wc-block-components-chip__remove"},v),Object(l.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},3:function(e,t){e.exports=window.wc.wcSettings},31:function(e,t){e.exports=window.wp.isShallowEqual},331:function(e,t,c){"use strict";var n=c(7),r=c.n(n),l=c(0),o=c(18);const a=Object(l.createElement)(e=>{let{className:t,size:c,...n}=e;return Object(l.createElement)(o.SVG,r()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},n),Object(l.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=a},37:function(e,t,c){"use strict";var n=c(0),r=c(5),l=c.n(r);t.a=e=>{let t,{label:c,screenReaderLabel:r,wrapperElement:o,wrapperProps:a={}}=e;const s=null!=c,i=null!=r;return!s&&i?(t=o||"span",a={...a,className:l()(a.className,"screen-reader-text")},Object(n.createElement)(t,a,r)):(t=o||n.Fragment,s&&i&&c!==r?Object(n.createElement)(t,a,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},r)):Object(n.createElement)(t,a,c))}},4:function(e,t){e.exports=window.wp.components},44:function(e,t){e.exports=window.wc.priceFormat},52:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(0),r=c(31),l=c.n(r);function o(e){const t=Object(n.useRef)(e);return l()(e,t.current)||(t.current=e),t.current}},55:function(e,t,c){"use strict";var n=c(0);t.a=function(e){let{srcElement:t,size:c=24,...r}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:c,height:c,...r}):null}},6:function(e,t){e.exports=window.lodash},68:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var n=c(0);const r=Object(n.createContext)("page"),l=()=>Object(n.useContext)(r);r.Provider},796:function(e,t,c){e.exports=c(855)},797:function(e,t){},8:function(e,t){e.exports=window.React},80:function(e,t,c){"use strict";var n=c(7),r=c.n(n),l=c(0),o=c(6),a=c(5),s=c.n(a),i=c(4),u=c(12);c(117);class b extends l.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:c,className:n,help:a,options:u,value:b}=this.props,p="inspector-toggle-button-control-"+c;let m;return a&&(m=Object(o.isFunction)(a)?a(t):a),Object(l.createElement)(i.BaseControl,{id:p,help:m,className:s()("components-toggle-button-control",n)},Object(l.createElement)("label",{id:p+"__label",htmlFor:p,className:"components-toggle-button-control__label"},e),Object(l.createElement)(i.ButtonGroup,{"aria-labelledby":p+"__label"},u.map((t,c)=>{const n={};return b===t.value?(n.isPrimary=!0,n["aria-pressed"]=!0):(n.isSecondary=!0,n["aria-pressed"]=!1),Object(l.createElement)(i.Button,r()({key:`${t.label}-${t.value}-${c}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},n),t.label)})))}}t.a=Object(u.withInstanceId)(b)},855:function(e,t,c){"use strict";c.r(t);var n=c(7),r=c.n(n),l=c(0),o=c(1),a=c(14),s=c(55),i=c(18),u=Object(l.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(l.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(l.createElement)("path",{d:"M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zm0-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})),b=c(5),p=c.n(b),m=c(9),d=c(4),h=c(121),O=c(140),g=c(80),j=c(102),v=c(3),f=(c(2),c(37)),w=(c(797),c(246)),_=c(44),y=c(256);const E=(e,t)=>Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(_.formatPrice)(e),Object(_.formatPrice)(t)):Number.isFinite(e)?Object(o.sprintf)( +/* translators: %s min price */ +Object(o.__)("From %s","woo-gutenberg-products-block"),Object(_.formatPrice)(e)):Object(o.sprintf)( +/* translators: %s max price */ +Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(_.formatPrice)(t)),k=e=>{let{type:t,name:c,prefix:n,removeCallback:r=(()=>{}),showLabel:a=!0,displayStyle:s}=e;const i=n?Object(l.createElement)(l.Fragment,null,n," ",c):c,u=Object(o.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),c);return Object(l.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+c},a&&Object(l.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?Object(l.createElement)(y.a,{element:"span",text:i,onRemove:r,radius:"large",ariaLabel:u}):Object(l.createElement)("span",{className:"wc-block-active-filters__list-item-name"},i,Object(l.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:r},Object(l.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)("ellipse",{cx:"8",cy:"8",rx:"8",ry:"8",transform:"rotate(-180 8 8)",fill:"currentColor",fillOpacity:"0.7"}),Object(l.createElement)("rect",{x:"10.636",y:"3.94983",width:"2",height:"9.9466",transform:"rotate(45 10.636 3.94983)",fill:"white"}),Object(l.createElement)("rect",{x:"12.0503",y:"11.0209",width:"2",height:"9.9466",transform:"rotate(135 12.0503 11.0209)",fill:"white"})),Object(l.createElement)(f.a,{screenReaderLabel:u}))))};var x=c(149),S=c(20),C=c(247),N=e=>{let{attributeObject:t={},slugs:c=[],operator:n="in",displayStyle:r}=e;const{results:a,isLoading:s}=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[t.id]}),[i,u]=Object(j.b)("attributes",[]);if(s)return null;const b=t.label;return Object(l.createElement)("li",null,Object(l.createElement)("span",{className:"wc-block-active-filters__list-item-type"},b,":"),Object(l.createElement)("ul",null,c.map((e,c)=>{const s=a.find(t=>t.slug===e);if(!s)return null;let p="";return c>0&&"and"===n&&(p=Object(l.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),k({type:b,name:Object(S.decodeEntities)(s.name||e),prefix:p,removeCallback:()=>{Object(C.a)(i,u,t,e)},showLabel:!1,displayStyle:r})})))},L=e=>{let{attributes:t,isEditor:c=!1}=e;const[n,r]=Object(j.b)("attributes",[]),[a,s]=Object(j.b)("stock_status",[]),[i,u]=Object(j.b)("min_price"),[b,m]=Object(j.b)("max_price"),d=Object(v.getSetting)("stockStatusOptions",[]),h=Object(l.useMemo)(()=>{if(a.length>0)return a.map(e=>k({type:Object(o.__)("Stock Status","woo-gutenberg-products-block"),name:d[e],removeCallback:()=>{const t=a.filter(t=>t!==e);s(t)},displayStyle:t.displayStyle}))},[d,a,s,t.displayStyle]),O=Object(l.useMemo)(()=>Number.isFinite(i)||Number.isFinite(b)?k({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:E(i,b),removeCallback:()=>{u(void 0),m(void 0)},displayStyle:t.displayStyle}):null,[i,b,t.displayStyle,u,m]),g=Object(l.useMemo)(()=>n.map(e=>{const c=Object(w.b)(e.attribute);return Object(l.createElement)(N,{attributeObject:c,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}),[n,t.displayStyle]);if(!(n.length>0||a.length>0||Number.isFinite(i)||Number.isFinite(b)||c))return null;const _="h"+t.headingLevel,y=p()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(l.createElement)(l.Fragment,null,!c&&t.heading&&Object(l.createElement)(_,{className:"wc-block-active-filters__title"},t.heading),Object(l.createElement)("div",{className:"wc-block-active-filters"},Object(l.createElement)("ul",{className:y},c?Object(l.createElement)(l.Fragment,null,k({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),k({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(l.createElement)(l.Fragment,null,O,h,g)),Object(l.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:()=>{u(void 0),m(void 0),r([]),s([])}},Object(l.createElement)(f.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},V=Object(d.withSpokenMessages)(e=>{let{attributes:t,setAttributes:c}=e;const{className:n,displayStyle:r,heading:a,headingLevel:s}=t;return Object(l.createElement)("div",{className:n},Object(l.createElement)(m.InspectorControls,{key:"inspector"},Object(l.createElement)(d.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(l.createElement)(g.a,{label:Object(o.__)("Display Style","woo-gutenberg-products-block"),value:r,options:[{label:Object(o.__)("List","woo-gutenberg-products-block"),value:"list"},{ +/* translators: "Chips" is a tag-like display style for chosen attributes. */ +label:Object(o.__)("Chips","woo-gutenberg-products-block"),value:"chips"}],onChange:e=>c({displayStyle:e})}),Object(l.createElement)("p",null,Object(o.__)("Heading Level","woo-gutenberg-products-block")),Object(l.createElement)(h.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:s,onChange:e=>c({headingLevel:e})}))),Object(l.createElement)(O.a,{className:"wc-block-active-filters__title",headingLevel:s,heading:a,onChange:e=>c({heading:e})}),Object(l.createElement)(d.Disabled,null,Object(l.createElement)(L,{attributes:t,isEditor:!0})))});Object(a.registerBlockType)("woocommerce/active-filters",{title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(l.createElement)(s.a,{srcElement:u}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Show the currently active product filters. Works in combination with the All Products and filters blocks.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{attributes:{}},attributes:{displayStyle:{type:"string",default:"list"},heading:{type:"string",default:Object(o.__)("Active filters","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:V,save(e){let{attributes:t}=e;const{className:c,displayStyle:n,heading:o,headingLevel:a}=t,s={"data-display-style":n,"data-heading":o,"data-heading-level":a};return Object(l.createElement)("div",r()({className:p()("is-loading",c)},s),Object(l.createElement)("span",{"aria-hidden":!0,className:"wc-block-active-product-filters__placeholder"}))}})},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/all-products-frontend.asset.php b/build/all-products-frontend.asset.php new file mode 100644 index 00000000000..e1c4dd6dce2 --- /dev/null +++ b/build/all-products-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '85e9c1a23c8990b2923b1eab59f6215c'); \ No newline at end of file diff --git a/build/all-products-frontend.js b/build/all-products-frontend.js new file mode 100644 index 00000000000..8f26077e06f --- /dev/null +++ b/build/all-products-frontend.js @@ -0,0 +1,11 @@ +!function(e){function t(t){for(var n,o,c=t[0],i=t[1],a=0,l=[];a=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t{const t=e.detail;t&&t.preserveCartData||Object(i.dispatch)(c.CART_STORE_KEY).invalidateResolutionForStore()},b=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},f=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),b),[])},m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...m,email:""},O={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},g=e=>Object(s.a)(Object.entries(e).map(e=>{let[t,n]=e;return[t,Object(a.decodeEntities)(n)]})),j={cartCoupons:c.EMPTY_CART_COUPONS,cartItems:c.EMPTY_CART_ITEMS,cartFees:c.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:O,cartIsLoading:!0,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:m,shippingRates:c.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:c.EMPTY_EXTENSIONS},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:n}=Object(u.a)(),a=null==n?void 0:n.previewCart,{shouldSelect:s}=e,d=Object(o.useRef)();f();const p=Object(i.useSelect)((e,n)=>{let{dispatch:r}=n;if(!s)return j;if(t)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:a.totals,cartIsLoading:!1,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:m,extensions:c.EMPTY_EXTENSIONS,shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:()=>{}};const o=e(c.CART_STORE_KEY),i=o.getCartData(),u=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),b=o.isCustomerDataUpdating(),{receiveCart:f}=r(c.CART_STORE_KEY),O=g(i.billingAddress),v=i.needsShipping?g(i.shippingAddress):O,y=i.fees.length>0?i.fees.map(e=>g(e)):c.EMPTY_CART_FEES;return{cartCoupons:i.coupons.length>0?i.coupons.map(e=>({...e,label:e.code})):c.EMPTY_CART_COUPONS,cartItems:i.items,cartFees:y,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:Object(l.a)(O),shippingAddress:Object(l.a)(v),extensions:i.extensions,shippingRates:i.shippingRates,shippingRatesLoading:b,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:f}},[s]);return d.current&&Object(r.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){e.exports=window.wp.a11y},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0);n(9);const o=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),c=()=>Object(r.useContext)(o)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.dom},,function(e,t){e.exports=window.wp.primitives},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(17),c=n.n(o);function i(e){const t=Object(r.useRef)(e);return c()(e,t.current)||(t.current=e),t.current}},function(e,t,n){"use strict";var r=n(29),o=n.n(r),c=n(0),i=n(3),a=n(1),s=n(84),l=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:n=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:i=Object(a.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(c.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(c.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(c.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},n&&Object(c.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},n),r&&Object(c.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(c.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},i?i+" ":"",o),l&&Object(c.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};n(55);class u extends i.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:n=!0,text:r,errorMessagePrefix:o,renderError:i,button:a}=this.props,{errorMessage:s,hasError:u}=this.state;return u?"function"==typeof i?i({errorMessage:s}):Object(c.createElement)(l,{errorMessage:n?s:null,header:e,imageUrl:t,text:r,errorMessagePrefix:o,button:a}):this.props.children}}t.a=u},,function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(60),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(77))},function(e,t,n){"use strict";var r=n(0),o=n(5),c=n.n(o);t.a=e=>{let t,{label:n,screenReaderLabel:o,wrapperElement:i,wrapperProps:a={}}=e;const s=null!=n,l=null!=o;return!s&&l?(t=i||"span",a={...a,className:c()(a.className,"screen-reader-text")},Object(r.createElement)(t,a,o)):(t=i||r.Fragment,s&&l&&n!==o?Object(r.createElement)(t,a,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,a,n))}},,,function(e,t){e.exports=window.wp.deprecated},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(58),o=n(0),c=n(26);const i=()=>{const e=Object(c.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...n,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0);const o=Object(r.createContext)("page"),c=()=>Object(r.useContext)(o);o.Provider},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"number"==typeof e,o=e=>"string"==typeof e,c=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function i(e,t){return c(e)&&t in e}const a=e=>"boolean"==typeof e},function(e,t){e.exports=window.wp.url},,function(e,t){},function(e,t,n){"use strict";var r=n(57);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=window.wp.hooks},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return b}));var r=n(6),o=n(9),c=n(0),i=n(17),a=n.n(i),s=n(33),l=n(75),u=n(43);const d=e=>{const t=Object(u.a)();e=e||t;const n=Object(o.useSelect)(t=>t(r.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:i}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[n,Object(c.useCallback)(t=>{i(e,t)},[e,i])]},p=(e,t,n)=>{const i=Object(u.a)();n=n||i;const a=Object(o.useSelect)(o=>o(r.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t),[n,e]),{setQueryValue:s}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[a,Object(c.useCallback)(t=>{s(n,e,t)},[n,e,s])]},b=(e,t)=>{const n=Object(u.a)();t=t||n;const[r,o]=d(t),i=Object(s.a)(r),p=Object(s.a)(e),b=Object(l.a)(p),f=Object(c.useRef)(!1);return Object(c.useEffect)(()=>{a()(b,p)||(o(Object.assign({},i,p)),f.current=!0)},[i,p,b,o]),f.current?[r,o]:[e,o]}},function(e,t){e.exports=window.wp.warning},,function(e,t,n){"use strict";var r=n(11),o=n(16),c=n(0),i=n(5),a=n.n(i),s=n(4),l=n(40),u=n.n(l),d=n(12),p=n(13),b=n(14),f=n(15),m=n(7),h=n(20),O=n(30),g=n(46),j=n(21),v=n(88),y=n(19);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t0?a/2:l)+(l+a/2>window.innerWidth?window.innerWidth-l:a/2)},d=e.left;"right"===r?d=e.right:"middle"!==c&&(d=l);var p=e.right;"left"===r?p=e.left:"middle"!==c&&(p=l);var b,f={popoverLeft:d,contentWidth:d-a>0?a:d},m={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},h=n,O=null;if(!o)if("center"===n&&u.contentWidth===a)h="center";else if("left"===n&&f.contentWidth===a)h="left";else if("right"===n&&m.contentWidth===a)h="right";else{var g="left"==(h=f.contentWidth>m.contentWidth?"left":"right")?f.contentWidth:m.contentWidth;O=g!==a?g:null}if(b="center"===h?u.popoverLeft:"left"===h?f.popoverLeft:m.popoverLeft,i){var j=i.getBoundingClientRect();b=Math.min(b,j.right-a)}return{xAxis:h,popoverLeft:b,contentWidth:O}}function k(e,t,n,r,o,c,i){var a=t.height;if(o){var s=(Object(O.getScrollContainer)(c)||document.body).getBoundingClientRect().top+a-i;if(e.top<=s)return{yAxis:n,popoverTop:Math.min(e.bottom,s)}}var l=e.top+e.height/2;"bottom"===r?l=e.bottom:"top"===r&&(l=e.top);var u={popoverTop:l,contentHeight:(l-a/2>0?a/2:l)+(l+a/2>window.innerHeight?window.innerHeight-l:a/2)},d={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},b=n,f=null;if(!o)if("middle"===n&&u.contentHeight===a)b="middle";else if("top"===n&&d.contentHeight===a)b="top";else if("bottom"===n&&p.contentHeight===a)b="bottom";else{var m="top"==(b=d.contentHeight>p.contentHeight?"top":"bottom")?d.contentHeight:p.contentHeight;f=m!==a?m:null}return{yAxis:b,popoverTop:"middle"===b?u.popoverTop:"top"===b?d.popoverTop:p.popoverTop,contentHeight:f}}var x=n(23),S=n(10);var C=Object(c.createContext)({focusHistory:[]}),P=C.Provider,R=C.Consumer;P.displayName="FocusReturnProvider",R.displayName="FocusReturnConsumer",c.Component;var T=Object(j.createHigherOrderComponent)((function e(t){if((r=t)instanceof c.Component||"function"==typeof r){var n=t;return e({})(n)}var r,o=t.onFocusReturn,i=void 0===o?s.stubTrue:o;return function(e){var t=function(t){Object(b.a)(a,t);var n,r,o=(n=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(m.a)(n);if(r){var o=Object(m.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(f.a)(this,e)});function a(){var e;return Object(d.a)(this,a),(e=o.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return Object(p.a)(a,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==i())for(var r,o=[].concat(Object(x.a)(s.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(x.a)(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(c.createElement)(e,this.props.childProps))}}]),a}(c.Component);return function(e){return Object(c.createElement)(R,null,(function(n){return Object(c.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");var N=Object(j.createHigherOrderComponent)((function(e){return function(t){Object(b.a)(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(m.a)(n);if(r){var o=Object(m.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(f.a)(this,e)});function i(){var e;return Object(d.a)(this,i),(e=o.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(S.a)(e)),e}return Object(p.a)(i,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===g.TAB){var t=O.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return Object(c.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(c.createElement)(e,this.props))}}]),i}(c.Component)}),"withConstrainedTabbing"),A=n(70);var B=function(e){Object(b.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(m.a)(t);if(n){var o=Object(m.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(f.a)(this,e)});function o(){return Object(d.a)(this,o),r.apply(this,arguments)}return Object(p.a)(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(c.Component),L=Object(A.a)(B);function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(m.a)(e);if(t){var o=Object(m.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(f.a)(this,n)}}var I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,r=e.className,o=void 0===r?"lockscroll":r,i=0,a=0;function s(e){var t=n.scrollingElement||n.body;e&&(a=t.scrollTop);var r=e?"add":"remove";t.classList[r](o),n.documentElement.classList[r](o),e||(t.scrollTop=a)}function l(){0===i&&s(!0),++i}function u(){1===i&&s(!1),--i}return function(e){Object(b.a)(n,e);var t=F(n);function n(){return Object(d.a)(this,n),t.apply(this,arguments)}return Object(p.a)(n,[{key:"componentDidMount",value:function(){l()}},{key:"componentWillUnmount",value:function(){u()}},{key:"render",value:function(){return null}}]),n}(c.Component)}();function M(e){e.stopPropagation()}var D=Object(c.forwardRef)((function(e,t){var n=e.children,i=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({},i,{ref:t,onMouseDown:M}),n)})),z=n(36);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function ue(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var de=function(e){var t=e.headerTitle,n=e.onClose,i=e.onKeyDown,s=e.children,l=e.className,d=e.noArrow,p=void 0===d||d,b=e.isAlternate,f=e.position,m=void 0===f?"bottom right":f,y=(e.range,e.focusOnMount),w=void 0===y?"firstElement":y,x=e.anchorRef,S=e.shouldAnchorIncludePadding,C=e.anchorRect,P=e.getAnchorRect,R=e.expandOnMobile,T=e.animate,N=void 0===T||T,A=e.onClickOutside,B=e.onFocusOutside,F=e.__unstableSticky,M=e.__unstableSlotName,z=void 0===M?"Popover":M,H=e.__unstableObserveElement,U=e.__unstableBoundaryParent,q=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),V=Object(c.useRef)(null),Y=Object(c.useRef)(null),G=Object(c.useRef)(),Q=Object(j.useViewportMatch)("medium","<"),K=Object(c.useState)(),J=Object(h.a)(K,2),X=J[0],$=J[1],Z=W(z),ee=R&&Q,ne=Object(j.useResizeObserver)(),re=Object(h.a)(ne,2),oe=re[0],de=re[1];p=ee||p,Object(c.useLayoutEffect)((function(){if(ee)return ue(G.current,"is-without-arrow",p),ue(G.current,"is-alternate",b),se(G.current,"data-x-axis"),se(G.current,"data-y-axis"),le(G.current,"top"),le(G.current,"left"),le(Y.current,"maxHeight"),void le(Y.current,"maxWidth");var e=function(){if(G.current&&Y.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(O.getRectangleFromRange)(r);if(r instanceof window.Element){var c=r.getBoundingClientRect();return o?c:ae(c,r)}var i=r.top,a=r.bottom,s=i.getBoundingClientRect(),l=a.getBoundingClientRect(),u=new window.DOMRect(s.left,s.top,s.width,l.bottom-s.top);return o?u:ae(u,r)}if(e.current){var d=e.current.parentNode,p=d.getBoundingClientRect();return o?p:ae(p,d)}}(V,C,P,x,S);if(e){var t,n,r=G.current,o=r.offsetParent,c=r.ownerDocument,i=0;if(o&&o!==c.body){var a=o.getBoundingClientRect();i=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}U&&(t=null===(n=G.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode);var s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=n.split(" "),s=Object(h.a)(a,3),l=s[0],u=s[1],d=void 0===u?"center":u,p=s[2],b=k(e,t,l,p,r,o,c),f=_(e,t,d,p,r,b.yAxis,i);return E(E({},f),b)}(e,de.height?de:Y.current.getBoundingClientRect(),m,F,G.current,i,t),l=s.popoverTop,u=s.popoverLeft,d=s.xAxis,f=s.yAxis,g=s.contentHeight,j=s.contentWidth;"number"==typeof l&&"number"==typeof u&&(le(G.current,"top",l+"px"),le(G.current,"left",u+"px")),ue(G.current,"is-without-arrow",p||"center"===d&&"middle"===f),ue(G.current,"is-alternate",b),se(G.current,"data-x-axis",d),se(G.current,"data-y-axis",f),le(Y.current,"maxHeight","number"==typeof g?g+"px":""),le(Y.current,"maxWidth","number"==typeof j?j+"px":""),$(({left:"right",right:"left"}[d]||"center")+" "+({top:"bottom",bottom:"top"}[f]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),H&&(n=new window.MutationObserver(e)).observe(H,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[ee,C,P,x,S,m,de,F,H,U]),function(e,t){Object(c.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=O.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(w,Y);var pe=function(e){e.keyCode===g.ESCAPE&&n&&(e.stopPropagation(),n()),i&&i(e)},be=Object(c.createElement)(L,{onFocusOutside:function(e){if(B)B(e);else if(A){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),u()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),A(t)}else n&&n()}},Object(c.createElement)(ce,{type:N&&X?"appear":null,options:{origin:X}},(function(e){var o=e.className;return Object(c.createElement)(D,Object(r.a)({className:a()("components-popover",l,o,{"is-expanded":ee,"is-without-arrow":p,"is-alternate":b})},q,{onKeyDown:pe,ref:G}),ee&&Object(c.createElement)(I,null),ee&&Object(c.createElement)("div",{className:"components-popover__header"},Object(c.createElement)("span",{className:"components-popover__header-title"},t),Object(c.createElement)(ge,{className:"components-popover__close",icon:v.a,onClick:n})),Object(c.createElement)("div",{ref:Y,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},oe,s)))})));return w&&(be=Object(c.createElement)(ie,null,be)),Z.ref&&(be=Object(c.createElement)(te,{name:z},be)),x||C?be:Object(c.createElement)("span",{ref:V},be)};de.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(c.createElement)(ee,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var pe=de,be=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(s.isString)(r)&&(t=r),Object(s.isObject)(r)&&(t=r.display,n=r.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":n},t)):null};var fe=function(e){Object(b.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(m.a)(t);if(n){var o=Object(m.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(f.a)(this,e)});function o(){var e;return Object(d.a)(this,o),(e=r.apply(this,arguments)).delayedSetIsOver=Object(s.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return Object(p.a)(o,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===c.Children.count(n)){var r=c.Children.only(n);"function"==typeof r.props[e]&&r.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(s.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,r=e.text,o=e.shortcut;if(1!==c.Children.count(t))return t;var i=c.Children.only(t),a=this.state.isOver;return Object(c.cloneElement)(i,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(c.concatChildren)(i.props.children,a&&Object(c.createElement)(pe,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(c.createElement)(be,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(c.Component),me=n(68);function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(Oe);try{for(L.s();!(B=L.n()).done;)P[B.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){L.e(e)}finally{L.f()}}var F=!T&&(E&&x||k||!!x&&(!S||Object(s.isArray)(S)&&!S.length)&&!1!==E),I=Object(c.createElement)(N,Object(r.a)({},A,P,{className:R,"aria-label":P["aria-label"]||x,ref:t}),y&&Object(c.createElement)(me.a,{icon:y,size:w}),S);return F?Object(c.createElement)(fe,{text:x,shortcut:k,position:_},I):I}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t){e.exports=window.wc.wcBlocksSharedContext},,function(e,t,n){"use strict";var r=n(2),o=n(1),c=n(52);const i=Object(r.getSetting)("countryLocale",{}),a=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(c.b)(e.priority)&&(t.index=e.priority),Object(c.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},s=Object.entries(i).map(e=>{let[t,n]=e;return[t,Object.entries(n).map(e=>{let[t,n]=e;return[t,a(n)]}).reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{})]}).reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{});t.a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=n&&void 0!==s[n]?s[n]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,n){"use strict";var r=n(19),o=n(11),c=n(16),i=n(0),a=n(32),s=function(e){var t=e.icon,n=e.className,r=Object(c.a)(e,["icon","className"]),a=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" ");return Object(i.createElement)("span",Object(o.a)({className:a},r))};function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t{let{Block:t,containers:n,getProps:r=(()=>({})),getErrorBoundaryProps:o=(()=>({}))}=e;0!==n.length&&Array.prototype.forEach.call(n,(e,n)=>{const c=r(e,n),i=o(e,n),a={...e.dataset,...c.attributes||{}};e.classList.remove("is-loading"),l({Block:t,container:e,props:c,attributes:a,errorBoundaryProps:i})})},l=e=>{let{Block:t,container:n,attributes:r={},props:a={},errorBoundaryProps:s={}}=e;Object(c.render)(Object(c.createElement)(i.a,s,Object(c.createElement)(c.Suspense,{fallback:Object(c.createElement)("div",{className:"wc-block-placeholder"})},Object(c.createElement)(t,o()({},a,{attributes:r})))),n)},u=e=>{const t=document.body.querySelectorAll(a.join(","));(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrappers:c}=e;const i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,c)),s({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})})({...e,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrapper:c}=e;const i=c.querySelectorAll(o);s({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})})({...e,wrapper:t})})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t){const n=Object(r.useRef)();return Object(r.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},,function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],u=!1,d=-1;function p(){u&&s&&(u=!1,s.length?l=s.concat(l):d=-1,l.length&&b())}function b(){if(!u){var e=a(p);u=!0;for(var t=l.length;t;){for(s=l,l=[];++d1)for(var n=1;n{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var b=e=>{let{className:t,notices:n,removeNotice:o}=e;const c=n.filter(e=>"snackbar"!==e.type);if(!c.length)return null;const i=u()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:i},c.map(e=>Object(r.createElement)(d.a,s()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const f=Object(r.createContext)({notices:[],createNotice:(e,t,n)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),m=()=>Object(r.useContext)(f),h=e=>{let{children:t,className:n="",createNoticeContainer:a=!0,context:s="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,p]=Object(r.useState)(!1),{dispatchStoreEvent:m}=Object(c.a)(),{isEditor:h}=Object(i.a)(),O=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...n,context:n.context||s}),m("store-notice-create",{status:e,content:t,options:n})}),[l,m,s]),g=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;u(e,t)}),[u,s]),{notices:j}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(s)}),[s]),v={notices:j,createNotice:O,removeNotice:g,context:s,setIsSuppressed:p},y=d?null:Object(r.createElement)(b,{className:n,notices:v.notices,removeNotice:v.removeNotice,isEditor:h});return Object(r.createElement)(f.Provider,{value:v},a&&y,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),o=n(9),c=n(0),i=n(33),a=n(64);const s=e=>{const{namespace:t,resourceName:n,resourceValues:s=[],query:l={},shouldSelect:u=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(c.useRef)({results:[],isLoading:!0}),p=Object(i.a)(l),b=Object(i.a)(s),f=Object(a.a)(),m=Object(o.useSelect)(e=>{if(!u)return null;const o=e(r.COLLECTIONS_STORE_KEY),c=[t,n,p,b],i=o.getCollectionError(...c);return i&&f(i),{results:o.getCollection(...c),isLoading:!o.hasFinishedResolution("getCollection",c)}},[t,n,b,p,u]);return null!==m&&(d.current=m),d.current}},,function(e,t,n){"use strict";n.d(t,"n",(function(){return c})),n.d(t,"l",(function(){return i})),n.d(t,"k",(function(){return a})),n.d(t,"m",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"j",(function(){return p})),n.d(t,"c",(function(){return b})),n.d(t,"e",(function(){return f})),n.d(t,"g",(function(){return m})),n.d(t,"a",(function(){return h})),n.d(t,"h",(function(){return O})),n.d(t,"b",(function(){return g}));var r,o=n(2);const c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=c.pluginUrl+"images/",a=c.pluginUrl+"build/",s=c.buildPhase,l=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),b=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),f=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),m=Object(o.getSetting)("shippingCountries",{}),h=Object(o.getSetting)("allowedCountries",{}),O=Object(o.getSetting)("shippingStates",{}),g=Object(o.getSetting)("allowedStates",{})},function(e,t){},function(e,t){e.exports=window.wp.autop},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:n=!1,cancelable:o=!1,element:c,detail:i={}}=t;if(!r)return;c||(c=document.body);const a=new r(e,{bubbles:n,cancelable:o,detail:i});c.dispatchEvent(a)};let c;const i=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{o(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}},function(e,t,n){"use strict";var r=n(0),o=n(32),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},,,,,,,,,function(e,t,n){"use strict";var r=n(18),o=n.n(r),c=n(0);n(109);const i=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const n=Object(c.useRef)(null);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:n,"aria-hidden":!0}),Object(c.createElement)(e,o()({},t,{scrollToTop:e=>{null!==n.current&&((e,t)=>{const{focusableSelector:n}=t||{};window&&Number.isFinite(window.innerHeight)&&(n?((e,t)=>{var n;const r=(null===(n=e.parentElement)||void 0===n?void 0:n.querySelectorAll(t))||[];if(r.length){const e=r[0];i(e),null==e||e.focus()}else i(e)})(e,n):i(e))})(n.current,e)}})))}},,,,,function(e,t){e.exports=window.wp.wordcount},,,,,,function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{srcElement:t,size:n=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:n,height:n,...o}):null}},function(e,t){},,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=(n(8),n(5)),c=n.n(o),i=n(37),a=n(21);n(142),t.a=Object(a.withInstanceId)(e=>{let{className:t,instanceId:n,label:o,onChange:a,options:s,screenReaderLabel:l,readOnly:u,value:d}=e;const p="wc-block-components-sort-select__select-"+n;return Object(r.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(r.createElement)(i.a,{label:o,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),Object(r.createElement)("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:a,readOnly:u,value:d},s.map(e=>Object(r.createElement)("option",{key:e.key,value:e.key},e.label))))})},,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(2),o=n(67),c=n(53);const i=e=>{let{country:t="",state:n="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:n.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},a=e=>{let{email:t=""}=e;return Object(c.isEmail)(t)?t.trim():""},s=e=>{const t=Object.keys(r.defaultAddressFields),n=Object(o.a)(t,{},e.country),c=Object.assign({},e);return n.forEach(t=>{let{key:n="",hidden:r=!1}=t;r&&((e,t)=>e in t)(n,e)&&(c[n]="")}),c}},function(e,t,n){"use strict";var r=n(0),o=n(4),c=n(5),i=n.n(c),a=n(1),s=n(27),l=n(88),u=n(62);t.a=function(e){var t=e.className,n=e.status,c=void 0===n?"info":n,d=e.children,p=e.spokenMessage,b=void 0===p?d:p,f=e.onRemove,m=void 0===f?o.noop:f,h=e.isDismissible,O=void 0===h||h,g=e.actions,j=void 0===g?[]:g,v=e.politeness,y=void 0===v?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(c):v,w=e.__unstableHTML;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(s.speak)(n,t)}),[n,t])}(b,y);var E=i()(t,"components-notice","is-"+c,{"is-dismissible":O});return w&&(d=Object(r.createElement)(r.RawHTML,null,d)),Object(r.createElement)("div",{className:E},Object(r.createElement)("div",{className:"components-notice__content"},d,j.map((function(e,t){var n=e.className,o=e.label,c=e.isPrimary,a=e.noDefaultClasses,s=void 0!==a&&a,l=e.onClick,d=e.url;return Object(r.createElement)(u.a,{key:t,href:d,isPrimary:c,isSecondary:!s&&!d,isLink:!s&&!!d,onClick:d?void 0:l,className:i()("components-notice__action",n)},o)}))),O&&Object(r.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(a.__)("Dismiss this notice"),onClick:m,showTooltip:!1}))}},,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,,,,,,function(e,t){},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(24),o=n(0),c=n(84);n.p=c.k,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)(()=>Promise.all([n.e(1),n.e(11)]).then(n.bind(null,358)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)(()=>n.e(10).then(n.bind(null,386)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)(()=>n.e(18).then(n.bind(null,387)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)(()=>n.e(12).then(n.bind(null,359)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)(()=>n.e(8).then(n.bind(null,360)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)(()=>n.e(16).then(n.bind(null,361)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)(()=>n.e(13).then(n.bind(null,297)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)(()=>n.e(14).then(n.bind(null,362)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)(()=>n.e(9).then(n.bind(null,363)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)(()=>n.e(17).then(n.bind(null,364)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)(()=>n.e(15).then(n.bind(null,365)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)(()=>Promise.all([n.e(0),n.e(49),n.e(7)]).then(n.bind(null,374)))});const i=e=>Object(r.getRegisteredBlockComponents)(e)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.blocks},,,,,,function(e,t,n){e.exports=n(233)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(80),c=n(74),i=n(3),a=(n(8),n(1)),s=n(4),l=n(5),u=n.n(l),d=n(37);n(211);const p=e=>{let{currentPage:t,displayFirstAndLastPages:n,displayNextAndPreviousArrows:o,pagesToDisplay:c,onPageChange:i,totalPages:s}=e,{minIndex:l,maxIndex:p}=((e,t,n)=>{if(n<=2)return{minIndex:null,maxIndex:null};const r=e-1,o=Math.max(Math.floor(t-r/2),2),c=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(c-t))),2),maxIndex:c}})(c,t,s);const b=n&&Boolean(1!==l),f=n&&Boolean(p!==s),m=n&&Boolean(l>3),h=n&&Boolean(pi(t-1),title:Object(a.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(r.createElement)(d.a,{label:"←",screenReaderLabel:Object(a.__)("Previous page","woo-gutenberg-products-block")})),b&&Object(r.createElement)("button",{className:u()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:()=>i(1),disabled:1===t},Object(r.createElement)(d.a,{label:1,screenReaderLabel:Object(a.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(a.__)("Page %d","woo-gutenberg-products-block"),1)})),m&&Object(r.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(a.__)("…","woo-gutenberg-products-block")),O.map(e=>Object(r.createElement)("button",{key:e,className:u()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:()=>i(e),disabled:t===e},Object(r.createElement)(d.a,{label:e,screenReaderLabel:Object(a.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(a.__)("Page %d","woo-gutenberg-products-block"),e)}))),h&&Object(r.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(a.__)("…","woo-gutenberg-products-block")),f&&Object(r.createElement)("button",{className:u()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===s,"wc-block-components-pagination__page--active":t===s}),onClick:()=>i(s),disabled:t===s},Object(r.createElement)(d.a,{label:s,screenReaderLabel:Object(a.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(a.__)("Page %d","woo-gutenberg-products-block"),s)})),o&&Object(r.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>i(t+1),title:Object(a.__)("Next page","woo-gutenberg-products-block"),disabled:t>=s},Object(r.createElement)(d.a,{label:"→",screenReaderLabel:Object(a.__)("Next page","woo-gutenberg-products-block")})))};p.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var b=p,f=n(75),m=n(59),h=n(82),O=n(6),g=n(9),j=n(33);var v=n(42),y=n(97),w=n(65),E=n(27),_=n(108),k=n(32),x=Object(r.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})),S=()=>{const{parentClassName:e}=Object(w.useInnerBlockLayoutContext)();return Object(r.createElement)("div",{className:e+"__no-products"},Object(r.createElement)(_.a,{className:e+"__no-products-image",alt:"",srcElement:x,size:100}),Object(r.createElement)("strong",{className:e+"__no-products-title"},Object(a.__)("No products","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:e+"__no-products-description"},Object(a.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},C=Object(r.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})),P=e=>{let{resetCallback:t=(()=>{})}=e;const{parentClassName:n}=Object(w.useInnerBlockLayoutContext)();return Object(r.createElement)("div",{className:n+"__no-products"},Object(r.createElement)(_.a,{className:n+"__no-products-image",alt:"",srcElement:C,size:100}),Object(r.createElement)("strong",{className:n+"__no-products-title"},Object(a.__)("No products found","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:n+"__no-products-description"},Object(a.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(r.createElement)("button",{onClick:t},Object(a.__)("Reset Search","woo-gutenberg-products-block")))},R=n(123);n(210);var T=e=>{let{onChange:t,readOnly:n,value:o}=e;return Object(r.createElement)(R.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",name:"orderby",onChange:t,options:[{key:"menu_order",label:Object(a.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(a.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(a.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(a.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(a.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(a.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(a.__)("Order products by","woo-gutenberg-products-block"),value:o})},N=n(21),A=n(18),B=n.n(A),L=n(149);const F=(e,t,n,o)=>{if(!n)return;const c=Object(L.a)(e);return n.map((n,i)=>{let[a,s={}]=n,l=[];s.children&&s.children.length>0&&(l=F(e,t,s.children,o));const u=c[a];if(!u)return null;const d=t.id||0,p=["layout",a,i,o,d];return Object(r.createElement)(r.Suspense,{key:p.join("_"),fallback:Object(r.createElement)("div",{className:"wc-block-placeholder"})},Object(r.createElement)(u,B()({},s,{children:l,product:t})))})};var I=Object(N.withInstanceId)(e=>{let{product:t,attributes:n,instanceId:o}=e;const{layoutConfig:c}=n,{parentClassName:i,parentName:a}=Object(w.useInnerBlockLayoutContext)(),s=0===Object.keys(t).length,l=u()(i+"__product","wc-block-layout",{"is-loading":s});return Object(r.createElement)("li",{className:l,"aria-hidden":s},F(a,t,c,o))});n(209);const M=function(e){let{totalQuery:t,totalProducts:n}=e,{totalQuery:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!Object(s.isEqual)(t,r)&&Number.isFinite(n)};var D=Object(y.a)(e=>{let{attributes:t,currentPage:n,onPageChange:o,onSortChange:c,sortValue:i,scrollToTop:l}=e;const[d,p]=Object(m.b)("attributes",[]),[y,_]=Object(m.b)("stock_status",[]),[k,x]=Object(m.b)("min_price"),[C,R]=Object(m.b)("max_price"),[N]=Object(m.c)((e=>{let{sortValue:t,currentPage:n,attributes:r}=e;const{columns:o,rows:c}=r;return{...(e=>{switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}})(t),catalog_visibility:"catalog",per_page:o*c,page:n}})({attributes:t,sortValue:i,currentPage:n})),{products:A,totalProducts:B,productsLoading:L}=(e=>{const t={namespace:"/wc/store",resourceName:"products"},{results:n,isLoading:r}=Object(h.a)({...t,query:e}),{value:o}=((e,t)=>{const{namespace:n,resourceName:r,resourceValues:o=[],query:c={}}=t;if(!n||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");const i=Object(j.a)(c),a=Object(j.a)(o),{value:s,isLoading:l=!0}=Object(g.useSelect)(e=>{const t=e(O.COLLECTIONS_STORE_KEY),o=["x-wp-total",n,r,i,a];return{value:t.getCollectionHeader(...o),isLoading:t.hasFinishedResolution("getCollectionHeader",o)}},["x-wp-total",n,r,a,i]);return{value:s,isLoading:l}})(0,{...t,query:e});return{products:n,totalProducts:parseInt(o,10),productsLoading:r}})(N),{parentClassName:F,parentName:D}=Object(w.useInnerBlockLayoutContext)(),z=(e=>{const{order:t,orderby:n,page:r,per_page:o,...c}=e;return c||{}})(N),{dispatchStoreEvent:H}=Object(v.a)(),U=Object(f.a)({totalQuery:z,totalProducts:B},M);Object(r.useEffect)(()=>{H("product-list-render",{products:A,listName:D})},[A,D,H]),Object(r.useEffect)(()=>{Object(s.isEqual)(z,null==U?void 0:U.totalQuery)||(o(1),null!=U&&U.totalQuery&&(e=>{Number.isFinite(e)&&(0===e?Object(E.speak)(Object(a.__)("No products found","woo-gutenberg-products-block")):Object(E.speak)(Object(a.sprintf)( +/* translators: %s is an integer higher than 0 (1, 2, 3...) */ +Object(a._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))})(B))},[null==U?void 0:U.totalQuery,B,o,z]);const{contentVisibility:W}=t,q=t.columns*t.rows,V=!Number.isFinite(B)&&Number.isFinite(null==U?void 0:U.totalProducts)&&Object(s.isEqual)(z,null==U?void 0:U.totalQuery)?Math.ceil(U.totalProducts/q):Math.ceil(B/q),Y=A.length?A:Array.from({length:q}),G=0!==A.length||L,Q=d.length>0||y.length>0||Number.isFinite(k)||Number.isFinite(C);return Object(r.createElement)("div",{className:(()=>{const{columns:e,rows:n,alignButtons:r,align:o}=t,c=void 0!==o?"align"+o:"";return u()(F,c,"has-"+e+"-columns",{"has-multiple-rows":n>1,"has-aligned-buttons":r})})()},W.orderBy&&G&&Object(r.createElement)(T,{onChange:c,value:i}),!G&&Q&&Object(r.createElement)(P,{resetCallback:()=>{p([]),_([]),x(null),R(null)}}),!G&&!Q&&Object(r.createElement)(S,null),G&&Object(r.createElement)("ul",{className:F+"__products"},Y.map((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return Object(r.createElement)(I,{key:e.id||n,attributes:t,product:e})}))),V>1&&Object(r.createElement)(b,{currentPage:n,onPageChange:e=>{l({focusableSelector:"a, button"}),o(e)},totalPages:V}))}),z=e=>{let{attributes:t}=e;const[n,o]=Object(r.useState)(1),[c,i]=Object(r.useState)(t.orderby);return Object(r.useEffect)(()=>{i(t.orderby)},[t.orderby]),Object(r.createElement)(D,{attributes:t,currentPage:n,onPageChange:e=>{o(e)},onSortChange:e=>{const t=e.target.value;i(t),o(1)},sortValue:c})};const H=Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(r.createElement)("title",null,"Grid Block Preview"),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}));class U extends i.Component{render(){const{attributes:e,urlParameterSuffix:t}=this.props;return e.isPreview?H:Object(r.createElement)(w.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(r.createElement)(z,{attributes:e,urlParameterSuffix:t}))}}var W=U;Object(c.b)({selector:".wp-block-woocommerce-all-products",Block:e=>Object(r.createElement)(o.a,{context:"wc/all-products"},Object(r.createElement)(W,e)),getProps:e=>({attributes:JSON.parse(e.dataset.attributes)})})}]); \ No newline at end of file diff --git a/build/all-products.asset.php b/build/all-products.asset.php new file mode 100644 index 00000000000..4d77800f8b5 --- /dev/null +++ b/build/all-products.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '755b3406b68acdb0c94dbab01d5ecf20'); \ No newline at end of file diff --git a/build/all-products.js b/build/all-products.js new file mode 100644 index 00000000000..e315a33c1f0 --- /dev/null +++ b/build/all-products.js @@ -0,0 +1,29 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-products"]=function(e){function t(t){for(var r,a,s=t[0],l=t[1],i=t[2],d=0,b=[];d{const t=Object(u.a)();e=e||t;const c=Object(o.useSelect)(t=>t(r.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:a}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[c,Object(n.useCallback)(t=>{a(e,t)},[e,a])]},b=(e,t,c)=>{const a=Object(u.a)();c=c||a;const s=Object(o.useSelect)(o=>o(r.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:l}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[s,Object(n.useCallback)(t=>{l(c,e,t)},[c,e,l])]},p=(e,t)=>{const c=Object(u.a)();t=t||c;const[r,o]=d(t),a=Object(l.a)(r),b=Object(l.a)(e),p=Object(i.a)(b),m=Object(n.useRef)(!1);return Object(n.useEffect)(()=>{s()(p,b)||(o(Object.assign({},a,b)),m.current=!0)},[a,b,p,o]),m.current?[r,o]:[e,o]}},103:function(e,t){e.exports=window.wp.autop},108:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(185),s=c(5),l=c.n(s),i=c(133);c(222),t.a=e=>{let{className:t,showSpinner:c=!1,children:r,...s}=e;const u=l()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(n.createElement)(a.a,o()({className:u},s),c&&Object(n.createElement)(i.a,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},r))}},11:function(e,t){e.exports=window.wp.apiFetch},110:function(e,t,c){"use strict";c.d(t,"c",(function(){return n})),c.d(t,"d",(function(){return a})),c.d(t,"a",(function(){return s})),c.d(t,"b",(function(){return l}));var r=c(14),o=c(32);const n=(e,t)=>{if(o.n>2)return Object(r.registerBlockType)(e,t)},a=(e,t)=>{if(o.n>1)return Object(r.registerBlockType)(e,t)},s=()=>o.n>2,l=()=>o.n>1},113:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"c",(function(){return o})),c.d(t,"b",(function(){return n})),c.d(t,"d",(function(){return a}));const r=e=>"number"==typeof e,o=e=>"string"==typeof e,n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function a(e,t){return n(e)&&t in e}},115:function(e,t){},116:function(e,t){e.exports=window.wp.coreData},117:function(e,t){},12:function(e,t){e.exports=window.wp.compose},120:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(40),s=c(4),l=c(5),i=c.n(l);t.a=e=>{let{className:t,item:c,isSelected:r,isLoading:l,onSelect:u,disabled:d,...b}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.c,o()({},b,{key:c.id,className:t,isSelected:r,item:c,onSelect:u,isSingle:!0,disabled:d})),r&&l&&Object(n.createElement)("div",{key:"loading",className:i()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(n.createElement)(s.Spinner,null)))}},121:function(e,t,c){"use strict";var r=c(0),o=c(6),n=c(1),a=c(4);function s(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(r.createElement)(a.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(a.Path,{d:c[t]})):null}class l extends r.Component{createLevelControl(e,t,c){const o=e===t;return{icon:Object(r.createElement)(s,{level:e}),title:Object(n.sprintf)( +/* translators: %s: heading level e.g: "2", "3", "4" */ +Object(n.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:o,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:n,onChange:l}=this.props;return Object(r.createElement)(a.ToolbarGroup,{isCollapsed:e,icon:Object(r.createElement)(s,{level:n}),controls:Object(o.range)(t,c).map(e=>this.createLevelControl(e,n,l))})}}t.a=l},125:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(55),a=c(161),s=c(3),l=c(9),i=c(36);t.a=e=>{const t=(Object(i.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(r.createElement)(l.InspectorControls,null,Object(r.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(r.createElement)("a",{href:`${s.ADMIN_URL}post.php?post=${t}&action=edit`,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Edit this product's details","woo-gutenberg-products-block"),Object(r.createElement)(n.a,{srcElement:a.a,size:16}))),Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(o.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}},126:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},13:function(e,t){e.exports=window.wp.url},132:function(e,t,c){"use strict";var r=c(3),o=c(1),n=c(113);const a=Object(r.getSetting)("countryLocale",{}),s=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(n.a)(e.priority)&&(t.index=e.priority),Object(n.c)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(a).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,s(c)]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=c&&void 0!==l[c]?l[c]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},133:function(e,t,c){"use strict";var r=c(0);c(223),t.a=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},134:function(e,t){e.exports=window.wp.wordcount},135:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(1),s=c(6),l=(c(2),c(40)),i=c(12),u=Object(i.createHigherOrderComponent)(e=>{class t extends n.Component{render(){const{selected:t}=this.props,c=null==t;return Object(n.createElement)(e,o()({},this.props,{selected:c?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),d=c(273),b=c(16),p=c.n(b),m=c(31),g=c.n(m),O=c(34),h=c(35),j=Object(i.createHigherOrderComponent)(e=>{class t extends n.Component{constructor(){super(...arguments),p()(this,"state",{error:null,loading:!1,variations:{}}),p()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:c}=this.state;if(t)return;const r=this.getExpandedProduct();if(!r||c[r])return;const o=e.find(e=>e.id===r);o.variations&&0!==o.variations.length?(this.setState({loading:!0}),Object(O.g)(r).then(e=>{const t=e.map(e=>({...e,parent:r}));this.setState({variations:{...this.state.variations,[r]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(h.a)(e);this.setState({variations:{...this.state.variations,[r]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[r]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:c,showVariations:r}=this.props;r&&(!g()(e.selected,c)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props;return t.filter(t=>t.variations&&t.variations.find(t=>{let{id:c}=t;return c===e}))[0].id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:c}=this.props;if(!c)return null;let r=t&&t.length?t[0]:null;return r?this.prevSelectedItem=r:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(r=this.prevSelectedItem)),!e&&r?this.isProductId(r)?r:this.findParentProduct(r):null}render(){const{error:t,isLoading:c}=this.props,{error:r,loading:a,variations:s}=this.state;return Object(n.createElement)(e,o()({},this.props,{error:r||t,expandedProduct:this.getExpandedProduct(),isLoading:c,variations:s,variationsLoading:a}))}}return p()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),E=c(41),w=c(5),_=c.n(w),f=c(120);c(191);const v={list:Object(a.__)("Products","woo-gutenberg-products-block"),noItems:Object(a.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(a.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(a.__)("Product search results updated.","woo-gutenberg-products-block")},k=e=>{let{expandedProduct:t,error:c,instanceId:r,isCompact:i,isLoading:u,onChange:d,onSearch:b,products:p,renderItem:m,selected:g,showVariations:O,variations:h,variationsLoading:j}=e;if(c)return Object(n.createElement)(E.a,{error:c});const w=[...p,...h&&h[t]?h[t]:[]];return Object(n.createElement)(l.b,{className:"woocommerce-products",list:w,isCompact:i,isLoading:u,isSingle:!0,selected:w.filter(e=>{let{id:t}=e;return g.includes(t)}),onChange:d,renderItem:m||(O?e=>{const{item:t,search:c,depth:i=0,isSelected:d,onSelect:b}=e,p=t.variations&&Array.isArray(t.variations)?t.variations.length:0,m=_()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+i,"has-count",{"is-searching":c.length>0,"is-skip-level":0===i&&0!==t.parent,"is-variable":p>0});if(!t.breadcrumbs.length)return Object(n.createElement)(f.a,o()({},e,{className:_()(m,{"is-selected":d}),isSelected:d,item:t,onSelect:()=>()=>{b(t)()},isLoading:u||j,countLabel:t.variations.length>0?Object(a.sprintf)( +/* translators: %1$d is the number of variations of a product product. */ +Object(a.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-"+r,"aria-label":Object(a.sprintf)( +/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ +Object(a._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const g=Object(s.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(n.createElement)(l.c,o()({},g,{className:m,name:"variations-"+r}))}:null),onSearch:b,messages:v,isHierarchical:!0})};k.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=u(Object(d.a)(j(Object(i.withInstanceId)(k))))},136:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=n},138:function(e,t,c){"use strict";var r=c(0),o=(c(2),c(5)),n=c.n(o),a=c(37),s=c(12);c(193),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:c,label:o,onChange:s,options:l,screenReaderLabel:i,readOnly:u,value:d}=e;const b="wc-block-components-sort-select__select-"+c;return Object(r.createElement)("div",{className:n()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(r.createElement)(a.a,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(r.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,readOnly:u,value:d},l.map(e=>Object(r.createElement)("option",{key:e.key,value:e.key},e.label))))})},139:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(53),a=c(5),s=c.n(a),l=c(44);c(220);const i=e=>{let{currency:t,maxPrice:c,minPrice:a,priceClassName:i,priceStyle:u}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(o.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(l.formatPrice)(a),Object(l.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(n.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:a,style:u})," — ",Object(r.createElement)(n.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:a,regularPrice:l,priceClassName:i,priceStyle:u,price:d}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:a},e),value:l}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",i),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:o,format:a="",maxPrice:l,minPrice:d,price:b,priceClassName:p,priceStyle:m,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}=e;const j=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});a.includes("")||(a="",console.error("Price formats need to include the `` tag."));const E=g&&b!==g;let w=Object(r.createElement)("span",{className:s()("wc-block-components-product-price__value",p)});return E?w=Object(r.createElement)(u,{currency:o,price:b,priceClassName:p,priceStyle:m,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}):void 0!==d&&void 0!==l?w=Object(r.createElement)(i,{currency:o,maxPrice:l,minPrice:d,priceClassName:p,priceStyle:m}):b&&(w=Object(r.createElement)(n.a,{className:s()("wc-block-components-product-price__value",p),currency:o,value:b,style:m})),Object(r.createElement)("span",{className:j},Object(r.createInterpolateElement)(a,{price:w}))}},14:function(e,t){e.exports=window.wp.blocks},141:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));var r=c(6);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const n={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:c,id:r,callback:n,priority:s}=arguments.length>1?arguments[1]:void 0;const l=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return l.set(r,{priority:s,callback:n}),{...e,[c]:l};case o.REMOVE_EVENT_CALLBACK:return l.delete(r),{...e,[c]:l}}}},142:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(8);function o(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},148:function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=c(6),n=c(31),a=c.n(n);const s=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(r.useContext)(s),i=e=>{let{children:t}=e;const[c,n]=Object(r.useState)({}),l=Object(r.useCallback)(e=>c[e],[c]),i=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{n({})},[]),b=Object(r.useCallback)(e=>{e&&n(t=>(e=Object(o.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),p=Object(r.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return a()(c[e],r)?c:{...c,[e]:r}})},[]),m={getValidationError:l,setValidationErrors:b,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{p(e,{hidden:!0})},[p]),showValidationError:Object(r.useCallback)(e=>{p(e,{hidden:!1})},[p]),showAllValidationErrors:Object(r.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(r.createElement)(s.Provider,{value:m},t)}},149:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(19),o=c(10),n=c(0),a=c(52),s=c(126);const l=e=>{const{namespace:t,resourceName:c,resourceValues:l=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(n.useRef)({results:[],isLoading:!0}),b=Object(a.a)(i),p=Object(a.a)(l),m=Object(s.a)(),g=Object(o.useSelect)(e=>{if(!u)return null;const o=e(r.COLLECTIONS_STORE_KEY),n=[t,c,b,p],a=o.getCollectionError(...n);return a&&m(a),{results:o.getCollection(...n),isLoading:!o.hasFinishedResolution("getCollection",n)}},[t,c,p,b,u]);return null!==g&&(d.current=g),d.current}},161:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=n},172:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(r.createElement)("title",null,"Grid Block Preview"),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},173:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(20),s=c(5),l=c.n(s);c(219),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:s="",rel:i,style:u,onClick:d,...b}=e;const p=l()("wc-block-components-product-name",t);if(c){const e=b;return Object(n.createElement)("span",o()({className:p},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)}}))}return Object(n.createElement)("a",o()({className:p,href:s,rel:i},b,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)},style:u}))}},174:function(e,t,c){"use strict";c.d(t,"b",(function(){return g})),c.d(t,"a",(function(){return O}));var r=c(0),o=(c(2),c(10)),n=c(75),a=c(73),s=c(7),l=c.n(s),i=c(5),u=c.n(i),d=c(888);c(221);const b=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var p=e=>{let{className:t,notices:c,removeNotice:o}=e;const n=c.filter(e=>"snackbar"!==e.type);if(!n.length)return null;const a=u()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:a},n.map(e=>Object(r.createElement)(d.a,l()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",b(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(r.createContext)({notices:[],createNotice:(e,t,c)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),g=()=>Object(r.useContext)(m),O=e=>{let{children:t,className:c="",createNoticeContainer:s=!0,context:l="wc/core"}=e;const{createNotice:i,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,b]=Object(r.useState)(!1),{dispatchStoreEvent:g}=Object(n.a)(),{isEditor:O}=Object(a.b)(),h=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i(e,t,{...c,context:c.context||l}),g("store-notice-create",{status:e,content:t,options:c})}),[i,g,l]),j=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;u(e,t)}),[u,l]),{notices:E}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(l)}),[l]),w={notices:E,createNotice:h,removeNotice:j,context:l,setIsSuppressed:b},_=d?null:Object(r.createElement)(p,{className:c,notices:w.notices,removeNotice:w.removeNotice,isEditor:O});return Object(r.createElement)(m.Provider,{value:w},s&&_,t)}},175:function(e,t,c){"use strict";var r=c(0),o=c(134),n=c(103);const a=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=s(e),o=r.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(o,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const o=s(e),a=o.slice(0,t);if(c)return Object(n.autop)(l(a,r));const i=a.match(/([\s]+)/g),u=i?i.length:0,d=o.slice(0,t+u);return Object(n.autop)(l(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:l=""}=e;const d=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(n.autop)(e),s=Object(o.count)(r,c);if(s<=t)return r;const l=a(r),d=Object(o.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{className:l},d)}},18:function(e,t){e.exports=window.wp.primitives},186:function(e,t){},19:function(e,t){e.exports=window.wc.wcBlocksData},191:function(e,t){},193:function(e,t){},197:function(e,t){e.exports=window.wp.warning},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},211:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})},219:function(e,t){},220:function(e,t){},221:function(e,t){},222:function(e,t){},223:function(e,t){},224:function(e,t){},273:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(32),s=c(34),l=c(165),i=c(35);t.a=e=>t=>{let{selected:c,...r}=t;const[u,d]=Object(n.useState)(!0),[b,p]=Object(n.useState)(null),[m,g]=Object(n.useState)([]),O=a.o.productCount>100,h=async e=>{const t=await Object(i.a)(e);p(t),d(!1)},j=Object(n.useRef)(c);Object(n.useEffect)(()=>{Object(s.h)({selected:j.current}).then(e=>{g(e),d(!1)}).catch(h)},[j]);const E=Object(l.a)(e=>{Object(s.h)({selected:c,search:e}).then(e=>{g(e),d(!1)}).catch(h)},400),w=Object(n.useCallback)(e=>{d(!0),E(e)},[d,E]);return Object(n.createElement)(e,o()({},r,{selected:c,error:b,products:m,isLoading:u,onSearch:O?w:null}))}},274:function(e,t,c){"use strict";c.r(t);var r=c(0),o=(c(2),c(1)),n=c(5),a=c.n(n),s=c(37),l=c(36),i=c(78);c(541),t.default=Object(i.withProductDataContext)(e=>{let{className:t,align:c}=e;const{parentClassName:n}=Object(l.useInnerBlockLayoutContext)(),{product:i}=Object(l.useProductDataContext)();if(!i.id||!i.on_sale)return null;const u="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(r.createElement)("div",{className:a()("wc-block-components-product-sale-badge",t,u,{[n+"__product-onsale"]:n})},Object(r.createElement)(s.a,{label:Object(o.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Product on sale","woo-gutenberg-products-block")}))})},276:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=(c(2),c(148));c(224);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(o.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:s(n)},t))}},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},31:function(e,t){e.exports=window.wp.isShallowEqual},32:function(e,t,c){"use strict";c.d(t,"o",(function(){return n})),c.d(t,"m",(function(){return a})),c.d(t,"l",(function(){return s})),c.d(t,"n",(function(){return l})),c.d(t,"j",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return b})),c.d(t,"k",(function(){return p})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return g})),c.d(t,"h",(function(){return O})),c.d(t,"a",(function(){return h})),c.d(t,"i",(function(){return j})),c.d(t,"b",(function(){return E}));var r,o=c(3);const n=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=n.pluginUrl+"images/",s=n.pluginUrl+"build/",l=n.buildPhase,i=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=o.STORE_PAGES.checkout.id,d=o.STORE_PAGES.checkout.permalink,b=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),g=o.STORE_PAGES.cart.permalink,O=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),h=Object(o.getSetting)("allowedCountries",{}),j=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},328:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=n},329:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=n},34:function(e,t,c){"use strict";c.d(t,"h",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return b})),c.d(t,"f",(function(){return p})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return g})),c.d(t,"g",(function(){return O})),c.d(t,"a",(function(){return h}));var r=c(13),o=c(11),n=c.n(o),a=c(6),s=c(3),l=c(32);const i=e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const s=(e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const n=l.o.productCount>100,a={per_page:n?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},s=[Object(r.addQueryArgs)("/wc/store/products",{...a,...o})];return n&&t.length&&s.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:c,queryArgs:o});return Promise.all(s.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),b=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),p=e=>{let{selected:t=[],search:c}=e;const o=(e=>{let{selected:t=[],search:c}=e;const o=Object(s.getSetting)("limitTags",!1),n=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:c})];return o&&t.length&&n.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:c});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},m=e=>n()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>n()({path:"wc/store/products/categories/"+e}),O=e=>n()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},35:function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return n}));var r=c(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},36:function(e,t){e.exports=window.wc.wcBlocksSharedContext},366:function(e,t){},367:function(e,t,c){"use strict";var r=c(110);let o={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(r.b)()&&(o={...o,align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}),t.a=o},368:function(e,t,c){"use strict";var r=c(0),o=c(5),n=c.n(o),a=c(36),s=c(9),l=c(110),i=c(78),u=c(173),d=c(75);c(540);const b=e=>{let{children:t,headingLevel:c,elementType:o="h"+c,...n}=e;return Object(r.createElement)(o,n,t)};t.a=Object(i.withProductDataContext)(e=>{var t,c,o,i;let{className:p,headingLevel:m=2,showProductLink:g=!0,align:O,textColor:h,fontSize:j,style:E}=e;const{parentClassName:w}=Object(a.useInnerBlockLayoutContext)(),{product:_}=Object(a.useProductDataContext)(),{dispatchStoreEvent:f}=Object(d.a)(),v=Object(s.getColorClassName)("color",h),k=Object(s.getFontSizeClass)(j),y=n()("wp-block-woocommerce-product-title",{"has-text-color":h||(null==E||null===(t=E.color)||void 0===t?void 0:t.text)||(null==E?void 0:E.color),"has-font-size":j||(null==E||null===(c=E.typography)||void 0===c?void 0:c.fontSize)||(null==E?void 0:E.fontSize),[v]:v,[k]:k}),C={fontSize:(null==E?void 0:E.fontSize)||(null==E||null===(o=E.typography)||void 0===o?void 0:o.fontSize),color:(null==E||null===(i=E.color)||void 0===i?void 0:i.text)||(null==E?void 0:E.color)};return _.id?Object(r.createElement)(b,{headingLevel:m,className:n()(p,"wc-block-components-product-title",{[w+"__product-title"]:w,["wc-block-components-product-title--align-"+O]:O&&Object(l.b)()})},Object(r.createElement)(u.a,{className:n()({[y]:Object(l.b)()}),disabled:!g,name:_.name,permalink:_.permalink,rel:g?"nofollow":"",onClick:()=>{f("product-view-link",{product:_})},style:Object(l.b)()?C:{}})):Object(r.createElement)(b,{headingLevel:m,className:n()(p,"wc-block-components-product-title",{[w+"__product-title"]:w,["wc-block-components-product-title--align-"+O]:O&&Object(l.b)(),[y]:Object(l.b)()})})})},369:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:c=!1,cancelable:o=!1,element:n,detail:a={}}=t;if(!r)return;n||(n=document.body);const s=new r(e,{bubbles:c,cancelable:o,detail:a});n.dispatchEvent(s)};let n;const a=()=>{n&&clearTimeout(n),n=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{o(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},37:function(e,t,c){"use strict";var r=c(0),o=c(5),n=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:a,wrapperProps:s={}}=e;const l=null!=c,i=null!=o;return!l&&i?(t=a||"span",s={...s,className:n()(s.className,"screen-reader-text")},Object(r.createElement)(t,s,o)):(t=a||r.Fragment,l&&i&&c!==o?Object(r.createElement)(t,s,Object(r.createElement)("span",{"aria-hidden":"true"},c),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,s,c))}},370:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"c",(function(){return s})),c.d(t,"a",(function(){return l}));var r=c(3),o=c(132),n=c(13);const a=e=>{let{country:t="",state:c="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:c.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(n.isEmail)(t)?t.trim():""},l=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(o.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},371:function(e,t,c){"use strict";t.a={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},372:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=(c(2),c(1)),s=c(5),l=c.n(s),i=c(3),u=c(36),d=c(78),b=c(75),p=c(274);c(542);const m=()=>Object(n.createElement)("img",{src:i.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),g=e=>{let{image:t,onLoad:c,loaded:r,showFullSize:a,fallbackAlt:s}=e;const{thumbnail:l,src:i,srcset:u,sizes:d,alt:b}=t||{},p={alt:b||s,onLoad:c,hidden:!r,src:l,...a&&{src:i,srcSet:u,sizes:d}};return Object(n.createElement)(n.Fragment,null,p.src&&Object(n.createElement)("img",o()({"data-testid":"product-image"},p)),!r&&Object(n.createElement)(m,null))};t.a=Object(d.withProductDataContext)(e=>{let{className:t,imageSizing:c="full-size",showProductLink:r=!0,showSaleBadge:o,saleBadgeAlign:s="right"}=e;const{parentClassName:i}=Object(u.useInnerBlockLayoutContext)(),{product:d}=Object(u.useProductDataContext)(),[O,h]=Object(n.useState)(!1),{dispatchStoreEvent:j}=Object(b.a)();if(!d.id)return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",{[i+"__product-image"]:i})},Object(n.createElement)(m,null));const E=!!d.images.length,w=E?d.images[0]:null,_=r?"a":n.Fragment,f=Object(a.sprintf)( +/* translators: %s is referring to the product name */ +Object(a.__)("Link to %s","woo-gutenberg-products-block"),d.name),v={href:d.permalink,rel:"nofollow",...!E&&{"aria-label":f},onClick:()=>{j("product-view-link",{product:d})}};return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[i+"__product-image"]:i})},Object(n.createElement)(_,r&&v,!!o&&Object(n.createElement)(p.default,{align:s,product:d}),Object(n.createElement)(g,{fallbackAlt:d.name,image:w,onLoad:()=>h(!0),loaded:O,showFullSize:"cropped"!==c})))})},373:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(141);const o=(e,t)=>function(c){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=r.a.addEventCallback(e,c,o);return t(n),()=>{t(r.a.removeEventCallback(e,n.id))}}},374:function(e,t,c){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},375:function(e,t,c){"use strict";var r=c(0),o=(c(2),c(5)),n=c.n(o),a=c(1),s=c(52),l=c(879);const i={PRISTINE:"pristine",IDLE:"idle",DISABLED:"disabled",PROCESSING:"processing",BEFORE_PROCESSING:"before_processing",AFTER_PROCESSING:"after_processing"},u={status:i.PRISTINE,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},d={SET_PRISTINE:"set_pristine",SET_IDLE:"set_idle",SET_DISABLED:"set_disabled",SET_PROCESSING:"set_processing",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_HAS_ERROR:"set_has_error",SET_NO_ERROR:"set_no_error",SET_QUANTITY:"set_quantity",SET_REQUEST_PARAMS:"set_request_params"},{SET_PRISTINE:b,SET_IDLE:p,SET_DISABLED:m,SET_PROCESSING:g,SET_BEFORE_PROCESSING:O,SET_AFTER_PROCESSING:h,SET_PROCESSING_RESPONSE:j,SET_HAS_ERROR:E,SET_NO_ERROR:w,SET_QUANTITY:_,SET_REQUEST_PARAMS:f}=d,v=()=>({type:p}),k=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e?E:w;return{type:t}},{SET_PRISTINE:y,SET_IDLE:C,SET_DISABLED:S,SET_PROCESSING:x,SET_BEFORE_PROCESSING:P,SET_AFTER_PROCESSING:N,SET_PROCESSING_RESPONSE:T,SET_HAS_ERROR:R,SET_NO_ERROR:I,SET_QUANTITY:A,SET_REQUEST_PARAMS:B}=d,{PRISTINE:L,IDLE:V,DISABLED:z,PROCESSING:D,BEFORE_PROCESSING:F,AFTER_PROCESSING:M}=i,H=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,{quantity:c,type:r,data:o}=arguments.length>1?arguments[1]:void 0;switch(r){case y:e=u;break;case C:e=t.status!==V?{...t,status:V}:t;break;case S:e=t.status!==z?{...t,status:z}:t;break;case A:e=c!==t.quantity?{...t,quantity:c}:t;break;case B:e={...t,requestParams:{...t.requestParams,...o}};break;case T:e={...t,processingResponse:o};break;case x:e=t.status!==D?{...t,status:D,hasError:!1}:t,e=!1===e.hasError?e:{...e,hasError:!1};break;case P:e=t.status!==F?{...t,status:F,hasError:!1}:t;break;case N:e=t.status!==M?{...t,status:M}:t;break;case R:e=t.hasError?t:{...t,hasError:!0},e=t.status===D||t.status===F?{...e,status:V}:e;break;case I:e=t.hasError?{...t,hasError:!1}:t}return e!==t&&r!==y&&e.status===L&&(e.status=V),e};var G=c(141),q=c(373);const Q=e=>({onAddToCartAfterProcessingWithSuccess:Object(q.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(q.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(q.a)("add_to_cart_before_processing",e)});var Y=c(376),U=c(148),W=c(63),K=c(59);const $=Object(r.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:e=>{},onAddToCartAfterProcessingWithError:e=>{},onAddToCartBeforeProcessing:e=>{}},dispatchActions:{resetForm:()=>{},submitForm:()=>{},setQuantity:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},setRequestParams:e=>{}}}),J=()=>Object(r.useContext)($),X=e=>{let{children:t,product:c,showFormElements:o}=e;const[n,d]=Object(r.useReducer)(H,u),[p,E]=Object(r.useReducer)(G.b,{}),w=Object(s.a)(p),{addErrorNotice:y,removeNotices:C}=Object(W.a)(),{setValidationErrors:S}=Object(U.b)(),{isSuccessResponse:x,isErrorResponse:P,isFailResponse:N}=Object(K.c)(),T=Object(r.useMemo)(()=>({onAddToCartAfterProcessingWithSuccess:Q(E).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Q(E).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Q(E).onAddToCartBeforeProcessing}),[E]),R=Object(r.useMemo)(()=>({resetForm:()=>{d({type:b})},submitForm:()=>{d({type:O})},setQuantity:e=>{d((e=>({type:_,quantity:e}))(e))},setHasError:e=>{d(k(e))},setRequestParams:e=>{d((e=>({type:f,data:e}))(e))},setAfterProcessing:e=>{d({type:j,data:e}),d({type:h})}}),[]);Object(r.useEffect)(()=>{const e=n.status,t=!c.id||!Object(l.a)(c);e!==i.DISABLED||t?e!==i.DISABLED&&t&&d({type:m}):d(v())},[n.status,c,d]),Object(r.useEffect)(()=>{n.status===i.BEFORE_PROCESSING&&(C("error"),Object(Y.a)(w,"add_to_cart_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;t&&y(t),c&&S(c)}),d(v())):d({type:g})}))},[n.status,S,y,C,d,w]),Object(r.useEffect)(()=>{if(n.status===i.AFTER_PROCESSING){const e={processingResponse:n.processingResponse},t=e=>{let t=!1;return e.forEach(e=>{const{message:c,messageContext:r}=e;(P(e)||N(e))&&c&&(t=!0,y(c,r?{context:r}:void 0))}),t};if(n.hasError)return void Object(Y.b)(w,"add_to_cart_after_processing_with_error",e).then(c=>{if(!t(c)){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");y(t,{id:"add-to-cart"})}d(v())});Object(Y.b)(w,"add_to_cart_after_processing_with_success",e).then(e=>{t(e)?d(k(!0)):d(v())})}},[n.status,n.hasError,n.processingResponse,R,y,P,N,x,w]);const I=Object(l.b)(c),A={product:c,productType:c.type||"simple",productIsPurchasable:Object(l.a)(c),productHasOptions:c.has_options||!1,supportsFormElements:I,showFormElements:o&&I,quantity:n.quantity,minQuantity:1,maxQuantity:c.quantity_limit||99,requestParams:n.requestParams,isIdle:n.status===i.IDLE,isDisabled:n.status===i.DISABLED,isProcessing:n.status===i.PROCESSING,isBeforeProcessing:n.status===i.BEFORE_PROCESSING,isAfterProcessing:n.status===i.AFTER_PROCESSING,hasError:n.hasError,eventRegistration:T,dispatchActions:R};return Object(r.createElement)($.Provider,{value:A},t)};var Z=c(11),ee=c.n(Z),te=c(20),ce=c(46),re=()=>{const{dispatchActions:e,product:t,quantity:c,eventRegistration:o,hasError:n,isProcessing:s,requestParams:l}=J(),{hasValidationErrors:i,showAllValidationErrors:u}=Object(U.b)(),{addErrorNotice:d,removeNotice:b}=Object(W.a)(),{receiveCart:p}=Object(ce.a)(),[m,g]=Object(r.useState)(!1),O=!n&&s,h=Object(r.useCallback)(()=>!i||(u(),{type:"error"}),[i,u]);Object(r.useEffect)(()=>{const e=o.onAddToCartBeforeProcessing(h,0);return()=>{e()}},[o,h]);const j=Object(r.useCallback)(()=>{g(!0),b("add-to-cart");const r={id:t.id||0,quantity:c,...l};ee()({path:"/wc/store/cart/add-item",method:"POST",data:r,cache:"no-store",parse:!1}).then(t=>{ee.a.setNonce(t.headers),t.json().then((function(c){t.ok?p(c):(c.body&&c.body.message?d(Object(te.decodeEntities)(c.body.message),{id:"add-to-cart"}):d(Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),e.setHasError()),e.setAfterProcessing(c),g(!1)}))}).catch(t=>{t.json().then((function(t){var c;null!==(c=t.data)&&void 0!==c&&c.cart&&p(t.data.cart),e.setHasError(),e.setAfterProcessing(t),g(!1)}))})},[t,d,b,p,e,c,l]);return Object(r.useEffect)(()=>{O&&!m&&j()},[O,j,m]),null};const oe=e=>{let{children:t,product:c,showFormElements:o}=e;return Object(r.createElement)(U.a,null,Object(r.createElement)(X,{product:c,showFormElements:o},t,Object(r.createElement)(re,null)))};var ne=c(36),ae=c(6),se=c(78),le=(c(366),c(108)),ie=c(55),ue=c(551),de=c(75),be=c(777);const pe=e=>{let{className:t,href:c,text:o,onClick:n}=e;return Object(r.createElement)(le.a,{className:t,href:c,onClick:n,rel:"nofollow"},o)},me=e=>{let{className:t,quantityInCart:c,isProcessing:o,isDisabled:n,isDone:s,onClick:l}=e;return Object(r.createElement)(le.a,{className:t,disabled:n,showSpinner:o,onClick:l},s&&c>0?Object(a.sprintf)( +/* translators: %s number of products in cart. */ +Object(a._n)("%d in cart","%d in cart",c,"woo-gutenberg-products-block"),c):Object(a.__)("Add to cart","woo-gutenberg-products-block"),!!s&&Object(r.createElement)(ie.a,{srcElement:ue.a,alt:Object(a.__)("Done","woo-gutenberg-products-block")}))};var ge=()=>{const{showFormElements:e,productIsPurchasable:t,productHasOptions:c,product:o,productType:n,isDisabled:s,isProcessing:l,eventRegistration:i,hasError:u,dispatchActions:d}=J(),{parentName:b}=Object(ne.useInnerBlockLayoutContext)(),{dispatchStoreEvent:p}=Object(de.a)(),{cartQuantity:m}=Object(be.a)(o.id||0),[g,O]=Object(r.useState)(!1),h=o.add_to_cart||{url:"",text:""};return Object(r.useEffect)(()=>{const e=i.onAddToCartAfterProcessingWithSuccess(()=>(u||O(!0),!0),0);return()=>{e()}},[i,u]),(e||!c&&"simple"===n)&&t?Object(r.createElement)(me,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:m,isDisabled:s,isProcessing:l,isDone:g,onClick:()=>{d.submitForm(),p("cart-add-item",{product:o,listName:b})}}):Object(r.createElement)(pe,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(a.__)("View Product","woo-gutenberg-products-block"),onClick:()=>{p("product-view-link",{product:o,listName:b})}})},Oe=e=>{let{disabled:t,min:c,max:o,value:n,onChange:a}=e;return Object(r.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:n,min:c,max:o,hidden:1===o,disabled:t,onChange:e=>{a(e.target.value)}})},he=e=>{let{reason:t=Object(a.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block")}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},t)},je=()=>{const{product:e,quantity:t,minQuantity:c,maxQuantity:o,dispatchActions:n,isDisabled:s}=J();return e.id&&!e.is_purchasable?Object(r.createElement)(he,null):e.id&&!e.is_in_stock?Object(r.createElement)(he,{reason:Object(a.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Oe,{value:t,min:c,max:o,disabled:s,onChange:n.setQuantity}),Object(r.createElement)(ge,null))},Ee=(c(550),c(898)),we=c(8),_e=c(276);const fe={value:"",label:Object(a.__)("Select an option","woo-gutenberg-products-block")};var ve=e=>{let{attributeName:t,options:c=[],value:o="",onChange:s=(()=>{}),errorMessage:l=Object(a.__)("Please select a value.","woo-gutenberg-products-block")}=e;const{getValidationError:i,setValidationErrors:u,clearValidationError:d}=Object(U.b)(),b=t,p=i(b)||{};return Object(we.useEffect)(()=>{o?d(b):u({[b]:{message:l,hidden:!0}})},[o,b,l,d,u]),Object(we.useEffect)(()=>()=>{d(b)},[b,d]),Object(r.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(r.createElement)(Ee.a,{label:Object(te.decodeEntities)(t),value:o||"",options:[fe,...c],onChange:s,required:!0,className:n()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":p.message&&!p.hidden})}),Object(r.createElement)(_e.a,{propertyName:b,elementId:b}))},ke=c(113);const ye=(e,t,c)=>{const r=Object.values(t).map(e=>{let{id:t}=e;return t});if(Object.values(c).every(e=>""===e))return r;const o=Object.keys(e);return r.filter(e=>o.every(r=>{const o=c[r]||"",n=t["id:"+e].attributes[r];return""===o||null===n||n===o}))};var Ce=e=>{let{attributes:t,variationAttributes:c,setRequestParams:o}=e;const n=Object(s.a)(t),a=Object(s.a)(c),[l,i]=Object(r.useState)(0),[u,d]=Object(r.useState)({}),[b,p]=Object(r.useState)(!1),m=Object(r.useMemo)(()=>((e,t,c)=>{const r={},o=Object.keys(e),n=Object.values(c).filter(Boolean).length>0;return o.forEach(o=>{const a=e[o],s={...c,[o]:null},l=n?ye(e,t,s):null,i=null!==l?l.map(e=>t["id:"+e].attributes[o]):null;r[o]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map(e=>{let{name:c,slug:r}=e;return null===t||t.includes(null)||t.includes(r)?{value:r,label:Object(te.decodeEntities)(c)}:null}).filter(Boolean)}(a.terms,i)}),r})(n,a,u),[u,n,a]);return Object(r.useEffect)(()=>{if(!b){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(ke.b)(e))return{};const t=Object.keys(e),c={};return 0===t.length||t.forEach(t=>{const r=e[t],o=r.terms.filter(e=>e.default);var n;o.length>0&&(c[r.name]=null===(n=o[0])||void 0===n?void 0:n.slug)}),c}(t);e&&d({...e}),p(!0)}},[u,t,b]),Object(r.useEffect)(()=>{Object.values(u).filter(e=>""!==e).length===Object.keys(n).length?i(((e,t,c)=>ye(e,t,c)[0]||0)(n,a,u)):l>0&&i(0)},[u,l,n,a]),Object(r.useEffect)(()=>{o({id:l,variation:Object.keys(u).map(e=>({attribute:e,value:u[e]}))})},[o,l,u]),Object(r.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(n).map(e=>Object(r.createElement)(ve,{key:e,attributeName:e,options:m[e],value:u[e],onChange:t=>{d({...u,[e]:t})}})))},Se=e=>{let{product:t,dispatchers:c}=e;const o=(e=>e?Object(ae.keyBy)(Object.values(e).filter(e=>{let{has_variations:t}=e;return t}),"name"):{})(t.attributes),n=(e=>{if(!e)return{};const t={};return e.forEach(e=>{let{id:c,attributes:r}=e;t["id:"+c]={id:c,attributes:r.reduce((e,t)=>{let{name:c,value:r}=t;return e[c]=r,e},{})}}),t})(t.variations);return 0===Object.keys(o).length||0===n.length?null:Object(r.createElement)(Ce,{attributes:o,variationAttributes:n,setRequestParams:c.setRequestParams})},xe=()=>{const{product:e,quantity:t,minQuantity:c,maxQuantity:o,dispatchActions:n,isDisabled:s}=J();return e.id&&!e.is_purchasable?Object(r.createElement)(he,null):e.id&&!e.is_in_stock?Object(r.createElement)(he,{reason:Object(a.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Se,{product:e,dispatchers:n}),Object(r.createElement)(Oe,{value:t,min:c,max:o,disabled:s,onChange:n.setQuantity}),Object(r.createElement)(ge,null))},Pe=()=>Object(r.createElement)(ge,null),Ne=c(889),Te=()=>Object(r.createElement)(Ne.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element."),Re=()=>Object(r.createElement)(Te,null);const Ie=()=>{const{showFormElements:e,productType:t}=J();return e?"variable"===t?Object(r.createElement)(xe,null):"grouped"===t?Object(r.createElement)(Re,null):"external"===t?Object(r.createElement)(Pe,null):"simple"===t||"variation"===t?Object(r.createElement)(je,null):null:Object(r.createElement)(ge,null)};t.a=Object(se.withProductDataContext)(e=>{let{className:t,showFormElements:c}=e;const{product:o}=Object(ne.useProductDataContext)(),a=n()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(ae.isEmpty)(o)});return Object(r.createElement)(oe,{product:o,showFormElements:c},Object(r.createElement)("div",{className:a},Object(r.createElement)(Ie,null)))})},376:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=c(59);const n=async(e,t,c)=>{const o=r(e,t),n=[];for(const e of o)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},a=async(e,t,c)=>{const n=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(39);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(r.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===c?Object(r.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},44:function(e,t){e.exports=window.wc.priceFormat},45:function(e,t){e.exports=window.wp.hooks},46:function(e,t,c){"use strict";c.d(t,"a",(function(){return w}));var r=c(6),o=c(0),n=c(19),a=c(10),s=c(20),l=c(211),i=c(370),u=c(73),d=c(369);const b=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(n.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",b),document.body.addEventListener("wc-blocks_removed_from_cart",b),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",b),document.body.removeEventListener("wc-blocks_removed_from_cart",b)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},g={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},O={...g,email:""},h={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:n.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},j=e=>Object(l.a)(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(s.decodeEntities)(c)]})),E={cartCoupons:n.EMPTY_CART_COUPONS,cartItems:n.EMPTY_CART_ITEMS,cartFees:n.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:h,cartIsLoading:!0,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:O,shippingAddress:g,shippingRates:n.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:n.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:n.EMPTY_EXTENSIONS},w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(u.b)(),s=null==c?void 0:c.previewCart,{shouldSelect:l}=e,d=Object(o.useRef)();m();const b=Object(a.useSelect)((e,c)=>{let{dispatch:r}=c;if(!l)return E;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:O,shippingAddress:g,extensions:n.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const o=e(n.CART_STORE_KEY),a=o.getCartData(),u=o.getCartErrors(),d=o.getCartTotals(),b=!o.hasFinishedResolution("getCartData"),p=o.isCustomerDataUpdating(),{receiveCart:m}=r(n.CART_STORE_KEY),h=j(a.billingAddress),w=a.needsShipping?j(a.shippingAddress):h,_=a.fees.length>0?a.fees.map(e=>j(e)):n.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):n.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:_,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:b,cartErrors:u,billingAddress:Object(i.a)(h),shippingAddress:Object(i.a)(w),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}},[l]);return d.current&&Object(r.isEqual)(d.current,b)||(d.current=b),d.current}},47:function(e,t){e.exports=window.wc.wcBlocksRegistry},477:function(e,t,c){"use strict";c.r(t);var r=c(0),o=(c(2),c(5)),n=c.n(o),a=c(139),s=c(44),l=c(36),i=c(9),u=c(110),d=c(78);t.default=Object(d.withProductDataContext)(e=>{var t,c;let{className:o,align:d,fontSize:b,customFontSize:p,saleFontSize:m,customSaleFontSize:g,color:O,customColor:h,saleColor:j,customSaleColor:E}=e;const{parentClassName:w}=Object(l.useInnerBlockLayoutContext)(),{product:_}=Object(l.useProductDataContext)(),f=n()(o,{[w+"__product-price"]:w});if(!_.id)return Object(r.createElement)(a.a,{align:d,className:f});const v=Object(i.getColorClassName)("color",O),k=Object(i.getFontSizeClass)(b),y=Object(i.getColorClassName)("color",j),C=Object(i.getFontSizeClass)(m),S=n()({"has-text-color":O||h,"has-font-size":b||p,[v]:v,[k]:k}),x=n()({"has-text-color":j||E,"has-font-size":m||g,[y]:y,[C]:C}),P={color:h,fontSize:p},N={color:E,fontSize:g},T=_.prices,R=Object(s.getCurrencyFromPriceResponse)(T),I=T.price!==T.regular_price,A=I?n()({[w+"__product-price__value"]:w,[x]:Object(u.b)()}):n()({[w+"__product-price__value"]:w,[S]:Object(u.b)()}),B=I?N:P;return Object(r.createElement)(a.a,{align:d,className:f,currency:R,price:T.price,priceClassName:A,priceStyle:Object(u.b)()?B:{},minPrice:null==T||null===(t=T.price_range)||void 0===t?void 0:t.min_amount,maxPrice:null==T||null===(c=T.price_range)||void 0===c?void 0:c.max_amount,regularPrice:T.regular_price,regularPriceClassName:n()({[w+"__product-price__regular"]:w,[S]:Object(u.b)()}),regularPriceStyle:Object(u.b)()?P:{}})})},478:function(e,t,c){"use strict";c.r(t);var r=c(0),o=(c(2),c(1)),n=c(5),a=c.n(n),s=c(36),l=c(78);c(543);t.default=Object(l.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)(),l=(e=>{const t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0})(n);if(!l)return null;const i={width:l/5*100+"%"},u=Object(o.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(o.__)("Rated %f out of 5","woo-gutenberg-products-block"),l);return Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-rating",{[c+"__product-rating"]:c})},Object(r.createElement)("div",{className:a()("wc-block-components-product-rating__stars",c+"__product-rating__stars"),role:"img","aria-label":u},Object(r.createElement)("span",{style:i},u)))})},479:function(e,t,c){"use strict";c.r(t);var r=c(7),o=c.n(r),n=c(0),a=(c(2),c(5)),s=c.n(a),l=c(1),i=c(75),u=c(777),d=c(20),b=c(36),p=c(78);c(544);const m=e=>{let{product:t}=e;const{id:c,permalink:r,add_to_cart:a,has_options:b,is_purchasable:p,is_in_stock:m}=t,{dispatchStoreEvent:g}=Object(i.a)(),{cartQuantity:O,addingToCart:h,addToCart:j}=Object(u.a)(c),E=Number.isFinite(O)&&O>0,w=!b&&p&&m,_=Object(d.decodeEntities)((null==a?void 0:a.description)||""),f=E?Object(l.sprintf)( +/* translators: %s number of products in cart. */ +Object(l._n)("%d in cart","%d in cart",O,"woo-gutenberg-products-block"),O):Object(d.decodeEntities)((null==a?void 0:a.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),v=w?"button":"a",k={};return w?k.onClick=()=>{j(),g("cart-add-item",{product:t})}:(k.href=r,k.rel="nofollow",k.onClick=()=>{g("product-view-link",{product:t})}),Object(n.createElement)(v,o()({"aria-label":_,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:h,added:E}),disabled:h},k),f)},g=()=>Object(n.createElement)("button",{className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0});t.default=Object(p.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(b.useInnerBlockLayoutContext)(),{product:r}=Object(b.useProductDataContext)();return Object(n.createElement)("div",{className:s()(t,"wp-block-button","wc-block-components-product-button",{[c+"__product-add-to-cart"]:c})},r.id?Object(n.createElement)(m,{product:r}):Object(n.createElement)(g,null))})},481:function(e,t,c){"use strict";c.r(t);var r=c(0),o=(c(2),c(5)),n=c.n(o),a=c(175),s=c(32),l=c(36),i=c(78);c(545),t.default=Object(i.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(l.useInnerBlockLayoutContext)(),{product:o}=Object(l.useProductDataContext)();if(!o)return Object(r.createElement)("div",{className:n()(t,"wc-block-components-product-summary",{[c+"__product-summary"]:c})});const i=o.short_description?o.short_description:o.description;return i?Object(r.createElement)(a.a,{className:n()(t,"wc-block-components-product-summary",{[c+"__product-summary"]:c}),source:i,maxLength:150,countType:s.o.wordCountType||"words"}):null})},482:function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=(c(2),c(5)),a=c.n(n),s=c(36),l=c(78);c(546),t.default=Object(l.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)(),l=n.sku;return l?Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-sku",{[c+"__product-sku"]:c})},Object(o.__)("SKU:","woo-gutenberg-products-block")," ",Object(r.createElement)("strong",null,l)):null})},483:function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(5),a=c.n(n),s=c(36),l=c(6),i=c(78);c(547),t.default=Object(i.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)();return Object(l.isEmpty)(n.categories)?null:Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-category-list",{[c+"__product-category-list"]:c})},Object(o.__)("Categories:","woo-gutenberg-products-block")," ",Object(r.createElement)("ul",null,Object.values(n.categories).map(e=>{let{name:t,link:c,slug:o}=e;return Object(r.createElement)("li",{key:"category-list-item-"+o},Object(r.createElement)("a",{href:c},t))})))})},484:function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=(c(2),c(5)),a=c.n(n),s=c(36),l=c(6),i=c(78);c(548),t.default=Object(i.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)();return Object(l.isEmpty)(n.tags)?null:Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-tag-list",{[c+"__product-tag-list"]:c})},Object(o.__)("Tags:","woo-gutenberg-products-block")," ",Object(r.createElement)("ul",null,Object.values(n.tags).map(e=>{let{name:t,link:c,slug:o}=e;return Object(r.createElement)("li",{key:"tag-list-item-"+o},Object(r.createElement)("a",{href:c},t))})))})},485:function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=(c(2),c(5)),a=c.n(n),s=c(36),l=c(78);c(549);t.default=Object(l.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)();if(!n.id||!n.is_purchasable)return null;const l=!!n.is_in_stock,i=n.low_stock_remaining,u=n.is_on_backorder;return Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-stock-indicator",{[c+"__stock-indicator"]:c,"wc-block-components-product-stock-indicator--in-stock":l,"wc-block-components-product-stock-indicator--out-of-stock":!l,"wc-block-components-product-stock-indicator--low-stock":!!i,"wc-block-components-product-stock-indicator--available-on-backorder":!!u})},i?(e=>Object(o.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(o.__)("%d left in stock","woo-gutenberg-products-block"),e))(i):((e,t)=>t?Object(o.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(o.__)("In Stock","woo-gutenberg-products-block"):Object(o.__)("Out of Stock","woo-gutenberg-products-block"))(l,u))})},51:function(e,t){e.exports=window.wp.deprecated},52:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),o=c(31),n=c.n(o);function a(e){const t=Object(r.useRef)(e);return n()(e,t.current)||(t.current=e),t.current}},53:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(178),s=c(5),l=c.n(s);c(186);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:r,onValueChange:s,displayType:u="text",...d}=e;const b="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(b))return null;const p=b/10**r.minorUnit;if(!Number.isFinite(p))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...i(r),value:void 0,currency:void 0,onValueChange:void 0},O=s?e=>{const t=e.value*10**r.minorUnit;s(t)}:()=>{};return Object(n.createElement)(a.a,o()({className:m,displayType:u},g,{value:p,onValueChange:O}))}},540:function(e,t){},541:function(e,t){},542:function(e,t){},543:function(e,t){},544:function(e,t){},545:function(e,t){},546:function(e,t){},547:function(e,t){},548:function(e,t){},549:function(e,t){},55:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...o}):null}},550:function(e,t){},551:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=n},59:function(e,t,c){"use strict";c.d(t,"a",(function(){return l})),c.d(t,"b",(function(){return i})),c.d(t,"c",(function(){return d}));var r=c(113);let o,n;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(n||(n={}));const a=(e,t)=>Object(r.b)(e)&&"type"in e&&e.type===t,s=e=>a(e,o.SUCCESS),l=e=>a(e,o.ERROR),i=e=>a(e,o.FAIL),u=e=>!Object(r.b)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:n,shouldRetry:u,isSuccessResponse:s,isErrorResponse:l,isFailResponse:i})},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},62:function(e,t){e.exports=window.wp.a11y},63:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=c(174);const n=()=>{const{notices:e,createNotice:t,removeNotice:c,setIsSuppressed:n}=Object(o.b)(),a=Object(r.useRef)(e);Object(r.useEffect)(()=>{a.current=e},[e]);const s=Object(r.useMemo)(()=>({hasNoticesOfType:e=>a.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeNotice:c}),[c]),l=Object(r.useMemo)(()=>({addDefaultNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...c})},addErrorNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...c})},addWarningNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...c})},addInfoNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...c})},addSuccessNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...c})}}),[t]);return{notices:e,...s,...l,setIsSuppressed:n}}},64:function(e,t){e.exports=window.regeneratorRuntime},68:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0);const o=Object(r.createContext)("page"),n=()=>Object(r.useContext)(o);o.Provider},73:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(0),o=c(10);const n=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),a=()=>Object(r.useContext)(n),s=e=>{let{children:t,currentPostId:c=0,currentView:a="",previewData:s={}}=e;const l=Object(o.useSelect)(e=>c||e("core/editor").getCurrentPostId(),[c]),i=Object(r.useCallback)(e=>e in s?s[e]:{},[s]),u={isEditor:!0,currentPostId:l,currentView:a,previewData:s,getPreviewData:i};return Object(r.createElement)(n.Provider,{value:u},t)}},746:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"}));t.a=n},75:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(45),o=c(0),n=c(46);const a=()=>{const e=Object(n.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...c,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},753:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}),Object(r.createElement)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),Object(r.createElement)("path",{d:"M8.9 12.55c0 .57.23 1.07.6 1.45l3.5 3.5 3.5-3.5c.37-.37.6-.89.6-1.45 0-1.13-.92-2.05-2.05-2.05-.57 0-1.08.23-1.45.6l-.6.6-.6-.59c-.37-.38-.89-.61-1.45-.61-1.13 0-2.05.92-2.05 2.05z"}));t.a=n},761:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}));t.a=n},762:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(1),o=c(32);const n=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:Object(r.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'$7.99',images:[{id:1,src:o.m+"previews/pennant.jpg",thumbnail:o.m+"previews/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:Object(r.__)("Add to cart","woo-gutenberg-products-block"),description:Object(r.__)("Add to cart","woo-gutenberg-products-block")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},767:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));t.a=n},774:function(e,t,c){e.exports=c(847)},775:function(e,t){},776:function(e,t){},777:function(e,t,c){"use strict";c.d(t,"a",(function(){return u}));var r=c(0),o=c(10),n=c(19),a=c(20),s=c(46),l=c(63);const i=(e,t)=>{const c=e.find(e=>{let{id:c}=e;return c===t});return c?c.quantity:0},u=e=>{const{addItemToCart:t}=Object(o.useDispatch)(n.CART_STORE_KEY),{cartItems:c,cartIsLoading:u}=Object(s.a)(),{addErrorNotice:d,removeNotice:b}=Object(l.a)(),[p,m]=Object(r.useState)(!1),g=Object(r.useRef)(i(c,e));return Object(r.useEffect)(()=>{const t=i(c,e);t!==g.current&&(g.current=t)},[c,e]),{cartQuantity:Number.isFinite(g.current)?g.current:0,addingToCart:p,cartIsLoading:u,addToCart:function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return m(!0),t(e,c).then(()=>{b("add-to-cart")}).catch(e=>{d(Object(a.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})}).finally(()=>{m(!1)})}}}},778:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M2 .75h12c.69 0 1.25.56 1.25 1.25v12c0 .69-.56 1.25-1.25 1.25H2c-.69 0-1.25-.56-1.25-1.25V2C.75 1.31 1.31.75 2 .75z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M12 6H4V4.75h8zM12 9H4V7.75h8zM10 12H4v-1.25h6z"})));t.a=n},779:function(e,t){},78:function(e,t){e.exports=window.wc.wcBlocksSharedHocs},780:function(e,t){},781:function(e,t){},782:function(e,t){},783:function(e,t){},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},80:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),a=c(6),s=c(5),l=c.n(s),i=c(4),u=c(12);c(117);class d extends n.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:c,className:r,help:s,options:u,value:d}=this.props,b="inspector-toggle-button-control-"+c;let p;return s&&(p=Object(a.isFunction)(s)?s(t):s),Object(n.createElement)(i.BaseControl,{id:b,help:p,className:l()("components-toggle-button-control",r)},Object(n.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},e),Object(n.createElement)(i.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((t,c)=>{const r={};return d===t.value?(r.isPrimary=!0,r["aria-pressed"]=!0):(r.isSecondary=!0,r["aria-pressed"]=!1),Object(n.createElement)(i.Button,o()({key:`${t.label}-${t.value}-${c}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},r),t.label)})))}}t.a=Object(u.withInstanceId)(d)},82:function(e,t){e.exports=window.wp.viewport},847:function(e,t,c){"use strict";c.r(t),c.d(t,"blockSettings",(function(){return It}));var r=c(7),o=c.n(r),n=c(0),a=c(1),s=c(9),l=c(14),i=c(55),u=c(18),d=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"})),b=c(110),p=c(5),m=c.n(p),g={category:"woocommerce-product-elements",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(n.createElement)(i.a,{srcElement:d}),foreground:"#7f54b3"},supports:{html:!1},parent:Object(b.a)()?void 0:["@woocommerce/all-products","@woocommerce/single-product"],save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",{className:m()("is-loading",t.className)})},deprecated:[{attributes:{},save:()=>null}]},O=c(367),h=c(4),j=c(12),E=c(121),w=c(368),_=c(135);c(776);var f=function(e){let{className:t="",...c}=e;const r=m()("wc-block-text-toolbar-button",t);return Object(n.createElement)(h.Button,o()({className:r},c))},v=c(36);c(775);var k=e=>t=>c=>{const r=Object(v.useProductDataContext)(),{attributes:o,setAttributes:l}=c,{productId:i}=o,[u,d]=Object(n.useState)(!i);return r.hasContext?Object(n.createElement)(t,c):Object(n.createElement)(n.Fragment,null,u?Object(n.createElement)(h.Placeholder,{icon:e.icon||"",label:e.label||"",className:"wc-atomic-blocks-product"},!!e.description&&Object(n.createElement)("div",null,e.description),Object(n.createElement)("div",{className:"wc-atomic-blocks-product__selection"},Object(n.createElement)(_.a,{selected:i||0,showVariations:!0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];l({productId:e[0]?e[0].id:0})}}),Object(n.createElement)(h.Button,{isSecondary:!0,disabled:!i,onClick:()=>{d(!1)}},Object(a.__)("Done","woo-gutenberg-products-block")))):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(h.ToolbarGroup,null,Object(n.createElement)(f,{onClick:()=>d(!0)},Object(a.__)("Switch product…","woo-gutenberg-products-block")))),Object(n.createElement)(t,c)))},y=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M17 3H7a2 2 0 00-2 2v16l7-3 7 3V5a2 2 0 00-2-2z"}));const C=Object(a.__)("Product Title","woo-gutenberg-products-block"),S=Object(n.createElement)(i.a,{srcElement:y}),x=Object(a.__)("Display the title of a product.","woo-gutenberg-products-block"),P=e=>{let{attributes:t,setAttributes:c}=e;const r=Object(s.useBlockProps)(),{headingLevel:o,showProductLink:l,align:i}=t;return Object(n.createElement)("div",r,Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(E.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:o,onChange:e=>c({headingLevel:e})}),Object(b.b)()&&Object(n.createElement)(s.AlignmentToolbar,{value:i,onChange:e=>{c({align:e})}})),Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(a.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:l,onChange:()=>c({showProductLink:!l})}))),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(w.a,t)))};var N=Object(b.b)()?Object(j.compose)([k({icon:S,label:C,description:Object(a.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(P):P;const T={...g,apiVersion:2,title:C,description:x,icon:{src:S,foreground:"#7f54b3"},attributes:O.a,edit:N,supports:Object(b.b)()?{html:!1,color:{background:!1},typography:{fontSize:!0}}:g.supports};Object(l.registerBlockType)("woocommerce/product-title",T);var R=c(477),I=c(328);const A=Object(a.__)("Product Price","woo-gutenberg-products-block"),B=Object(n.createElement)(i.a,{srcElement:I.a}),L=Object(a.__)("Display the price of a product.","woo-gutenberg-products-block"),V=e=>{let{fontSize:t,setFontSize:c,color:r,setColor:o,colorLabel:l}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.FontSizePicker,{value:t.size,onChange:c}),Object(n.createElement)(h.BaseControl,{label:l},Object(n.createElement)(s.ColorPalette,{value:r.color,onChange:o,label:Object(a.__)("Color","woo-gutenberg-products-block")})))},z=e=>{let{fontSize:t,saleFontSize:c,setFontSize:r,setSaleFontSize:o,color:l,saleColor:i,setColor:u,setSaleColor:d,attributes:p,setAttributes:m}=e;const{align:g}=p;return Object(n.createElement)(n.Fragment,null,Object(b.b)()&&Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(s.AlignmentToolbar,{value:g,onChange:e=>{m({align:e})}})),Object(n.createElement)(s.InspectorControls,null,Object(b.b)()&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Price","woo-gutenberg-products-block")},Object(n.createElement)(V,{color:l,setColor:u,fontSize:t,setFontSize:r,colorLabel:Object(a.__)("Color","woo-gutenberg-products-block")})),Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Sale price","woo-gutenberg-products-block")},Object(n.createElement)(V,{color:i,setColor:d,fontSize:c,setFontSize:o,colorLabel:Object(a.__)("Color","woo-gutenberg-products-block")})))),Object(n.createElement)(R.default,p))};var D=Object(b.b)()?Object(j.compose)([Object(s.withFontSizes)("fontSize"),Object(s.withFontSizes)("saleFontSize"),Object(s.withFontSizes)("originalFontSize"),Object(s.withColors)("color",{textColor:"color"}),Object(s.withColors)("saleColor",{textColor:"saleColor"}),Object(s.withColors)("originalColor",{textColor:"originalColor"}),k({icon:B,label:A,description:Object(a.__)("Choose a product to display its price.","woo-gutenberg-products-block")})])(z):z;let F={productId:{type:"number",default:0}};Object(b.b)()&&(F={...F,align:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},saleFontSize:{type:"string"},customSaleFontSize:{type:"number"},color:{type:"string"},saleColor:{type:"string"},customColor:{type:"string"},customSaleColor:{type:"string"}});const M={title:A,description:L,icon:{src:B,foreground:"#7f54b3"},attributes:F,edit:D};Object(l.registerBlockType)("woocommerce/product-price",{...g,...M});var H=c(371),G=c(80),q=c(3),Q=c(372),Y=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}));const U=Object(a.__)("Product Image","woo-gutenberg-products-block"),W=Object(n.createElement)(i.a,{srcElement:Y}),K=Object(a.__)("Display the main product image","woo-gutenberg-products-block");var $=k({icon:W,label:U,description:Object(a.__)("Choose a product to display its image.","woo-gutenberg-products-block")})(e=>{let{attributes:t,setAttributes:c}=e;const{showProductLink:r,imageSizing:o,showSaleBadge:l,saleBadgeAlign:i}=t;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(a.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:r,onChange:()=>c({showProductLink:!r})}),Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(a.__)('Overlay a "sale" badge if the product is on-sale.',"woo-gutenberg-products-block"),checked:l,onChange:()=>c({showSaleBadge:!l})}),l&&Object(n.createElement)(G.a,{label:Object(a.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:i,options:[{label:Object(a.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(a.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(a.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:e=>c({saleBadgeAlign:e})}),Object(n.createElement)(G.a,{label:Object(a.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(n.createInterpolateElement)(Object(a.__)("Product image cropping can be modified in the Customizer.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(q.getAdminLink)("customize.php")+"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images",target:"_blank",rel:"noopener noreferrer"})}),value:o,options:[{label:Object(a.__)("Full Size","woo-gutenberg-products-block"),value:"full-size"},{label:Object(a.__)("Cropped","woo-gutenberg-products-block"),value:"cropped"}],onChange:e=>c({imageSizing:e})}))),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Q.a,t)))});const J={title:U,description:K,icon:{src:W,foreground:"#7f54b3"},attributes:H.a,edit:$};Object(l.registerBlockType)("woocommerce/product-image",{...g,...J});var X=c(478),Z=c(761);const ee=Object(a.__)("Product Rating","woo-gutenberg-products-block"),te=Object(n.createElement)(i.a,{srcElement:Z.a}),ce={title:ee,description:Object(a.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:te,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:te,label:ee,description:Object(a.__)("Choose a product to display its rating.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(X.default,t)})};Object(l.registerBlockType)("woocommerce/product-rating",{...g,...ce});var re=c(479),oe=c(329);const ne=Object(a.__)("Add to Cart Button","woo-gutenberg-products-block"),ae=Object(n.createElement)(i.a,{srcElement:oe.a}),se={title:ne,description:Object(a.__)("Display a call to action button which either adds the product to the cart, or links to the product page.","woo-gutenberg-products-block"),icon:{src:ae,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:ae,label:ne,description:Object(a.__)("Choose a product to display its add to cart button.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(h.Disabled,null,Object(n.createElement)(re.default,t))})};Object(l.registerBlockType)("woocommerce/product-button",{...g,...se});var le=c(481),ie=c(778);const ue=Object(a.__)("Product Summary","woo-gutenberg-products-block"),de=Object(n.createElement)(i.a,{srcElement:ie.a}),be={title:ue,description:Object(a.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:de,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:de,label:ue,description:Object(a.__)("Choose a product to display its short description.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(le.default,t)})};Object(l.registerBlockType)("woocommerce/product-summary",{...g,...be});var pe=c(274),me=c(753);const ge=Object(a.__)("On-Sale Badge","woo-gutenberg-products-block"),Oe=Object(n.createElement)(i.a,{srcElement:me.a}),he={title:ge,description:Object(a.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:Oe,foreground:"#7f54b3"},supports:{html:!1},attributes:{productId:{type:"number",default:0}},edit:k({icon:Oe,label:ge,description:Object(a.__)("Choose a product to display its sale-badge.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(pe.default,t)})};Object(l.registerBlockType)("woocommerce/product-sale-badge",{...g,...he});var je=c(125),Ee=c(482),we=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M2 6h2v12H2V6m3 0h1v12H5V6m2 0h3v12H7V6m4 0h1v12h-1V6m3 0h2v12h-2V6m3 0h3v12h-3V6m4 0h1v12h-1V6z"}));const _e=Object(a.__)("Product SKU","woo-gutenberg-products-block"),fe=Object(n.createElement)(i.a,{srcElement:we}),ve={title:_e,description:Object(a.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:fe,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:fe,label:_e,description:Object(a.__)("Choose a product to display its SKU.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(Ee.default,t))})};Object(b.c)("woocommerce/product-sku",{...g,...ve});var ke=c(483),ye=c(746);const Ce=Object(a.__)("Product Category List","woo-gutenberg-products-block"),Se=Object(n.createElement)(i.a,{srcElement:ye.a}),xe=Object(a.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block");var Pe=k({icon:Se,label:Ce,description:Object(a.__)("Choose a product to display its categories.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(ke.default,t)))});const Ne={...g,title:Ce,description:xe,icon:{src:Se,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:Pe};Object(b.c)("woocommerce/product-category-list",Ne);var Te=c(484);const Re=Object(a.__)("Product Tag List","woo-gutenberg-products-block"),Ie=Object(n.createElement)(i.a,{srcElement:me.a}),Ae={title:Re,description:Object(a.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:Ie,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:Ie,label:Re,description:Object(a.__)("Choose a product to display its tags.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Te.default,t)))})};Object(b.c)("woocommerce/product-tag-list",{...g,...Ae});var Be=c(485),Le=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("g",{fillRule:"evenodd"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{fillRule:"nonzero",d:"M20.5 5.2l-1.4-1.7C19 3.3 18.5 3 18 3H6c-.5 0-.9.2-1.2.5L3.5 5.3A2 2 0 003 6.5V19c0 1.1.9 2 2 2h14a2 2 0 002-2V6.5c0-.5-.2-1-.5-1.3zM6.2 5h11.6l.8 1H5.4l.8-1zM5 19V8h14v11H5z"})));const Ve=Object(a.__)("Product Stock Indicator","woo-gutenberg-products-block"),ze=Object(n.createElement)(i.a,{srcElement:Le}),De={title:Ve,description:Object(a.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:ze,foreground:"#7f54b3"},attributes:{productId:{type:"number",default:0}},edit:k({icon:ze,label:Ve,description:Object(a.__)("Choose a product to display its stock.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(Be.default,t))})};Object(b.c)("woocommerce/product-stock-indicator",{...g,...De});var Fe=c(879),Me=(c(366),c(375));const He=Object(a.__)("Add to Cart","woo-gutenberg-products-block"),Ge=Object(n.createElement)(i.a,{srcElement:oe.a}),qe={title:He,description:Object(a.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:Ge,foreground:"#7f54b3"},edit:k({icon:Ge,label:He,description:Object(a.__)("Choose a product to display its add to cart form.","woo-gutenberg-products-block")})(e=>{let{attributes:t,setAttributes:c}=e;const{product:r}=Object(v.useProductDataContext)(),{className:o,showFormElements:l}=t;return Object(n.createElement)("div",{className:m()(o,"wc-block-components-product-add-to-cart")},Object(n.createElement)(je.a,{productId:r.id}),Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block")},Object(Fe.b)(r)?Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Display form elements","woo-gutenberg-products-block"),help:Object(a.__)("Depending on product type, allow customers to select a quantity, variations etc.","woo-gutenberg-products-block"),checked:l,onChange:()=>c({showFormElements:!l})}):Object(n.createElement)(h.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(a.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.","woo-gutenberg-products-block")))),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Me.a,t)))}),attributes:c(374).a};Object(b.c)("woocommerce/product-add-to-cart",{...g,...qe});var Qe=c(16),Ye=c.n(Qe),Ue=c(10),We=(c(2),c(85)),Ke=c(875),$e=c(762),Je=c(32);const Xe=(e,t)=>{const{className:c,contentVisibility:r}=t;return m()(e,c,{"has-image":r&&r.image,"has-title":r&&r.title,"has-rating":r&&r.rating,"has-price":r&&r.price,"has-button":r&&r.button})};var Ze=c(161);const et=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],tt=e=>e&&0!==e.length?e.map(e=>[e.name,{...e.attributes,product:void 0,children:e.innerBlocks.length>0?tt(e.innerBlocks):[]}]):[];var ct=c(8),rt=c(6),ot=c(37);c(782);const nt=e=>{let{currentPage:t,displayFirstAndLastPages:c,displayNextAndPreviousArrows:r,pagesToDisplay:o,onPageChange:s,totalPages:l}=e,{minIndex:i,maxIndex:u}=((e,t,c)=>{if(c<=2)return{minIndex:null,maxIndex:null};const r=e-1,o=Math.max(Math.floor(t-r/2),2),n=Math.min(Math.ceil(t+(r-(t-o))),c-1);return{minIndex:Math.max(Math.floor(t-(r-(n-t))),2),maxIndex:n}})(o,t,l);const d=c&&Boolean(1!==i),b=c&&Boolean(u!==l),p=c&&Boolean(i>3),g=c&&Boolean(us(t-1),title:Object(a.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(n.createElement)(ot.a,{label:"←",screenReaderLabel:Object(a.__)("Previous page","woo-gutenberg-products-block")})),d&&Object(n.createElement)("button",{className:m()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:()=>s(1),disabled:1===t},Object(n.createElement)(ot.a,{label:1,screenReaderLabel:Object(a.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(a.__)("Page %d","woo-gutenberg-products-block"),1)})),p&&Object(n.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(a.__)("…","woo-gutenberg-products-block")),O.map(e=>Object(n.createElement)("button",{key:e,className:m()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:()=>s(e),disabled:t===e},Object(n.createElement)(ot.a,{label:e,screenReaderLabel:Object(a.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(a.__)("Page %d","woo-gutenberg-products-block"),e)}))),g&&Object(n.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(a.__)("…","woo-gutenberg-products-block")),b&&Object(n.createElement)("button",{className:m()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===l,"wc-block-components-pagination__page--active":t===l}),onClick:()=>s(l),disabled:t===l},Object(n.createElement)(ot.a,{label:l,screenReaderLabel:Object(a.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(a.__)("Page %d","woo-gutenberg-products-block"),l)})),r&&Object(n.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>s(t+1),title:Object(a.__)("Next page","woo-gutenberg-products-block"),disabled:t>=l},Object(n.createElement)(ot.a,{label:"→",screenReaderLabel:Object(a.__)("Next page","woo-gutenberg-products-block")})))};nt.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var at=nt,st=c(142),lt=c(102),it=c(149),ut=c(19),dt=c(52);var bt=c(75);c(783);const pt=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};var mt=c(62),gt=c(136),Ot=()=>{const{parentClassName:e}=Object(v.useInnerBlockLayoutContext)();return Object(n.createElement)("div",{className:e+"__no-products"},Object(n.createElement)(i.a,{className:e+"__no-products-image",alt:"",srcElement:gt.a,size:100}),Object(n.createElement)("strong",{className:e+"__no-products-title"},Object(a.__)("No products","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:e+"__no-products-description"},Object(a.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},ht=c(767),jt=e=>{let{resetCallback:t=(()=>{})}=e;const{parentClassName:c}=Object(v.useInnerBlockLayoutContext)();return Object(n.createElement)("div",{className:c+"__no-products"},Object(n.createElement)(i.a,{className:c+"__no-products-image",alt:"",srcElement:ht.a,size:100}),Object(n.createElement)("strong",{className:c+"__no-products-title"},Object(a.__)("No products found","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:c+"__no-products-description"},Object(a.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(n.createElement)("button",{onClick:t},Object(a.__)("Reset Search","woo-gutenberg-products-block")))},Et=c(138);c(781);var wt=e=>{let{onChange:t,readOnly:c,value:r}=e;return Object(n.createElement)(Et.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",name:"orderby",onChange:t,options:[{key:"menu_order",label:Object(a.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(a.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(a.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(a.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(a.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(a.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:c,screenReaderLabel:Object(a.__)("Order products by","woo-gutenberg-products-block"),value:r})};const _t=(e,t,c,r)=>{if(!c)return;const a=Object(Ke.a)(e);return c.map((c,s)=>{let[l,i={}]=c,u=[];i.children&&i.children.length>0&&(u=_t(e,t,i.children,r));const d=a[l];if(!d)return null;const b=t.id||0,p=["layout",l,s,r,b];return Object(n.createElement)(n.Suspense,{key:p.join("_"),fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(d,o()({},i,{children:u,product:t})))})};var ft=Object(j.withInstanceId)(e=>{let{product:t,attributes:c,instanceId:r}=e;const{layoutConfig:o}=c,{parentClassName:a,parentName:s}=Object(v.useInnerBlockLayoutContext)(),l=0===Object.keys(t).length,i=m()(a+"__product","wc-block-layout",{"is-loading":l});return Object(n.createElement)("li",{className:i,"aria-hidden":l},_t(s,t,o,r))});c(780);const vt=function(e){let{totalQuery:t,totalProducts:c}=e,{totalQuery:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!Object(rt.isEqual)(t,r)&&Number.isFinite(c)};var kt,yt=(kt=e=>{let{attributes:t,currentPage:c,onPageChange:r,onSortChange:o,sortValue:s,scrollToTop:l}=e;const[i,u]=Object(lt.b)("attributes",[]),[d,b]=Object(lt.b)("stock_status",[]),[p,g]=Object(lt.b)("min_price"),[O,h]=Object(lt.b)("max_price"),[j]=Object(lt.c)((e=>{let{sortValue:t,currentPage:c,attributes:r}=e;const{columns:o,rows:n}=r;return{...(e=>{switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}})(t),catalog_visibility:"catalog",per_page:o*n,page:c}})({attributes:t,sortValue:s,currentPage:c})),{products:E,totalProducts:w,productsLoading:_}=(e=>{const t={namespace:"/wc/store",resourceName:"products"},{results:c,isLoading:r}=Object(it.a)({...t,query:e}),{value:o}=((e,t)=>{const{namespace:c,resourceName:r,resourceValues:o=[],query:n={}}=t;if(!c||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");const a=Object(dt.a)(n),s=Object(dt.a)(o),{value:l,isLoading:i=!0}=Object(Ue.useSelect)(e=>{const t=e(ut.COLLECTIONS_STORE_KEY),o=["x-wp-total",c,r,a,s];return{value:t.getCollectionHeader(...o),isLoading:t.hasFinishedResolution("getCollectionHeader",o)}},["x-wp-total",c,r,s,a]);return{value:l,isLoading:i}})(0,{...t,query:e});return{products:c,totalProducts:parseInt(o,10),productsLoading:r}})(j),{parentClassName:f,parentName:k}=Object(v.useInnerBlockLayoutContext)(),y=(e=>{const{order:t,orderby:c,page:r,per_page:o,...n}=e;return n||{}})(j),{dispatchStoreEvent:C}=Object(bt.a)(),S=Object(st.a)({totalQuery:y,totalProducts:w},vt);Object(n.useEffect)(()=>{C("product-list-render",{products:E,listName:k})},[E,k,C]),Object(n.useEffect)(()=>{Object(rt.isEqual)(y,null==S?void 0:S.totalQuery)||(r(1),null!=S&&S.totalQuery&&(e=>{Number.isFinite(e)&&(0===e?Object(mt.speak)(Object(a.__)("No products found","woo-gutenberg-products-block")):Object(mt.speak)(Object(a.sprintf)( +/* translators: %s is an integer higher than 0 (1, 2, 3...) */ +Object(a._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))})(w))},[null==S?void 0:S.totalQuery,w,r,y]);const{contentVisibility:x}=t,P=t.columns*t.rows,N=!Number.isFinite(w)&&Number.isFinite(null==S?void 0:S.totalProducts)&&Object(rt.isEqual)(y,null==S?void 0:S.totalQuery)?Math.ceil(S.totalProducts/P):Math.ceil(w/P),T=E.length?E:Array.from({length:P}),R=0!==E.length||_,I=i.length>0||d.length>0||Number.isFinite(p)||Number.isFinite(O);return Object(n.createElement)("div",{className:(()=>{const{columns:e,rows:c,alignButtons:r,align:o}=t,n=void 0!==o?"align"+o:"";return m()(f,n,"has-"+e+"-columns",{"has-multiple-rows":c>1,"has-aligned-buttons":r})})()},x.orderBy&&R&&Object(n.createElement)(wt,{onChange:o,value:s}),!R&&I&&Object(n.createElement)(jt,{resetCallback:()=>{u([]),b([]),g(null),h(null)}}),!R&&!I&&Object(n.createElement)(Ot,null),R&&Object(n.createElement)("ul",{className:f+"__products"},T.map((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;return Object(n.createElement)(ft,{key:e.id||c,attributes:t,product:e})}))),N>1&&Object(n.createElement)(at,{currentPage:c,onPageChange:e=>{l({focusableSelector:"a, button"}),r(e)},totalPages:N}))},e=>{const t=Object(n.useRef)(null);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:t,"aria-hidden":!0}),Object(n.createElement)(kt,o()({},e,{scrollToTop:e=>{null!==t.current&&((e,t)=>{const{focusableSelector:c}=t||{};window&&Number.isFinite(window.innerHeight)&&(c?((e,t)=>{var c;const r=(null===(c=e.parentElement)||void 0===c?void 0:c.querySelectorAll(t))||[];if(r.length){const e=r[0];pt(e),null==e||e.focus()}else pt(e)})(e,c):pt(e))})(t.current,e)}})))}),Ct=e=>{let{attributes:t}=e;const[c,r]=Object(n.useState)(1),[o,a]=Object(n.useState)(t.orderby);return Object(n.useEffect)(()=>{a(t.orderby)},[t.orderby]),Object(n.createElement)(yt,{attributes:t,currentPage:c,onPageChange:e=>{r(e)},onSortChange:e=>{const t=e.target.value;a(t),r(1)},sortValue:o})},St=c(172);class xt extends ct.Component{render(){const{attributes:e,urlParameterSuffix:t}=this.props;return e.isPreview?St.a:Object(n.createElement)(v.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(n.createElement)(Ct,{attributes:e,urlParameterSuffix:t}))}}var Pt=xt;c(779);class Nt extends n.Component{constructor(){super(...arguments),Ye()(this,"state",{isEditing:!1,innerBlocks:[]}),Ye()(this,"blockMap",Object(Ke.a)("woocommerce/all-products")),Ye()(this,"componentDidMount",()=>{const{block:e}=this.props;this.setState({innerBlocks:e.innerBlocks})}),Ye()(this,"getTitle",()=>Object(a.__)("All Products","woo-gutenberg-products-block")),Ye()(this,"getIcon",()=>Object(n.createElement)(i.a,{srcElement:d})),Ye()(this,"togglePreview",()=>{const{debouncedSpeak:e}=this.props;this.setState({isEditing:!this.state.isEditing}),this.state.isEditing||e(Object(a.__)("Showing All Products block preview.","woo-gutenberg-products-block"))}),Ye()(this,"getInspectorControls",()=>{const{attributes:e,setAttributes:t}=this.props,{columns:c,rows:r,alignButtons:o}=e;return Object(n.createElement)(s.InspectorControls,{key:"inspector"},Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(We.a,{columns:c,rows:r,alignButtons:o,setAttributes:t,minColumns:Object(q.getSetting)("min_columns",1),maxColumns:Object(q.getSetting)("max_columns",6),minRows:Object(q.getSetting)("min_rows",1),maxRows:Object(q.getSetting)("max_rows",6)})),Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Content Settings","woo-gutenberg-products-block")},((e,t)=>{const{contentVisibility:c}=e;return Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:c.orderBy,onChange:()=>t({contentVisibility:{...c,orderBy:!c.orderBy}})})})(e,t),((e,t)=>Object(n.createElement)(h.SelectControl,{label:Object(a.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(a.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(a.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(a.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(a.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(a.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(a.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:e=>t({orderby:e})}))(e,t)))}),Ye()(this,"getBlockControls",()=>{const{isEditing:e}=this.state;return Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(h.ToolbarGroup,{controls:[{icon:"edit",title:Object(a.__)("Edit inner product layout","woo-gutenberg-products-block"),onClick:()=>this.togglePreview(),isActive:e}]}))}),Ye()(this,"renderEditMode",()=>{const e={template:this.props.attributes.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(this.blockMap)};return 0!==this.props.attributes.layoutConfig.length&&(e.renderAppender=!1),Object(n.createElement)(h.Placeholder,{icon:this.getIcon(),label:this.getTitle()},Object(a.__)("Display all products from your store as a grid.","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(n.createElement)(h.Tip,null,Object(a.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.","woo-gutenberg-products-block")),Object(n.createElement)(v.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(n.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(n.createElement)("ul",{className:"wc-block-grid__products"},Object(n.createElement)("li",{className:"wc-block-grid__product"},Object(n.createElement)(v.ProductDataContextProvider,{product:$e.a[0]},Object(n.createElement)(s.InnerBlocks,e)))))),Object(n.createElement)("div",{className:"wc-block-all-products__actions"},Object(n.createElement)(h.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,onClick:()=>{const{block:e,setAttributes:t}=this.props;t({layoutConfig:tt(e.innerBlocks)}),this.setState({innerBlocks:e.innerBlocks}),this.togglePreview()}},Object(a.__)("Done","woo-gutenberg-products-block")),Object(n.createElement)(h.Button,{className:"wc-block-all-products__cancel-button",isTertiary:!0,onClick:()=>{const{block:e,replaceInnerBlocks:t}=this.props,{innerBlocks:c}=this.state;t(e.clientId,c,!1),this.togglePreview()}},Object(a.__)("Cancel","woo-gutenberg-products-block")),Object(n.createElement)(h.Button,{className:"wc-block-all-products__reset-button",icon:Object(n.createElement)(i.a,{srcElement:d}),label:Object(a.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:()=>{const{block:e,replaceInnerBlocks:t}=this.props,c=[];et.map(e=>{let[t,r]=e;return c.push(Object(l.createBlock)(t,r)),!0}),t(e.clientId,c,!1),this.setState({innerBlocks:e.innerBlocks})}},Object(a.__)("Reset Layout","woo-gutenberg-products-block")))))}),Ye()(this,"renderViewMode",()=>{const{attributes:e}=this.props,{layoutConfig:t}=e,c=t&&0!==t.length,r=this.getTitle(),o=this.getIcon();return c?Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Pt,{attributes:e})):((e,t)=>Object(n.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(a.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")))(r,o)}),Ye()(this,"render",()=>{const{attributes:e}=this.props,{isEditing:t}=this.state,c=this.getTitle(),r=this.getIcon();return 0===Je.o.productCount?((e,t)=>Object(n.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(n.createElement)("p",null,Object(a.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(n.createElement)(h.Button,{className:"wc-block-products__add-product-button",isSecondary:!0,href:q.ADMIN_URL+"post-new.php?post_type=product"},Object(a.__)("Add new product","woo-gutenberg-products-block")+" ",Object(n.createElement)(i.a,{srcElement:Ze.a})),Object(n.createElement)(h.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(a.__)("Learn more","woo-gutenberg-products-block"))))(c,r):Object(n.createElement)("div",{className:Xe("wc-block-all-products",e)},this.getBlockControls(),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode())})}}var Tt=Object(j.compose)(h.withSpokenMessages,Object(Ue.withSelect)((e,t)=>{let{clientId:c}=t;const{getBlock:r}=e("core/block-editor");return{block:r(c)}}),Object(Ue.withDispatch)(e=>{const{replaceInnerBlocks:t}=e("core/block-editor");return{replaceInnerBlocks:t}}))(Nt);const Rt={columns:Object(q.getSetting)("default_columns",3),rows:Object(q.getSetting)("default_rows",3),alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:et,isPreview:!1},It={title:Object(a.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(i.a,{srcElement:d}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display products from your store in a grid layout.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:Rt,edit:e=>Object(n.createElement)(Tt,e),save(e){let{attributes:t}=e;const c={};Object.keys(t).sort().forEach(e=>{c[e]=t[e]});const r={"data-attributes":JSON.stringify(c)};return Object(n.createElement)("div",o()({className:Xe("wc-block-all-products",t)},r),Object(n.createElement)(s.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",{...It,deprecated:[{attributes:Object.assign({},It.attributes,{rows:{type:"number",default:1}}),save(e){let{attributes:t}=e;const c={"data-attributes":JSON.stringify(t)};return Object(n.createElement)("div",o()({className:Xe("wc-block-all-products",t)},c),Object(n.createElement)(s.InnerBlocks.Content,null))}}]})},85:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(6),a=(c(2),c(4));t.a=e=>{let{columns:t,rows:c,setAttributes:s,alignButtons:l,minColumns:i=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(n.clamp)(e,i,u);s({columns:Number.isNaN(t)?"":t})},min:i,max:u}),Object(r.createElement)(a.RangeControl,{label:Object(o.__)("Rows","woo-gutenberg-products-block"),value:c,onChange:e=>{const t=Object(n.clamp)(e,d,b);s({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(r.createElement)(a.ToggleControl,{label:Object(o.__)("Align Last Block","woo-gutenberg-products-block"),help:l?Object(o.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:l,onChange:()=>s({alignButtons:!l})}))}},875:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(47),o=c(0),n=c(32);c.p=n.l,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(11)]).then(c.bind(null,477)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(3),c.e(10)]).then(c.bind(null,901)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(17)]).then(c.bind(null,902)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)(()=>c.e(12).then(c.bind(null,478)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(1),c.e(2),c.e(8)]).then(c.bind(null,479)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)(()=>c.e(15).then(c.bind(null,481)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)(()=>c.e(3).then(c.bind(null,274)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)(()=>c.e(13).then(c.bind(null,482)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)(()=>c.e(9).then(c.bind(null,483)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)(()=>c.e(16).then(c.bind(null,484)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)(()=>c.e(14).then(c.bind(null,485)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(1),c.e(2),c.e(7)]).then(c.bind(null,903)))});const a=e=>Object(r.getRegisteredBlockComponents)(e)},879:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return o}));const r=e=>e.is_purchasable||!1,o=e=>["simple","variable"].includes(e.type||"simple")},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/all-reviews.asset.php b/build/all-reviews.asset.php new file mode 100644 index 00000000000..c5fb84ad04d --- /dev/null +++ b/build/all-reviews.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '53a1785ee6fc21635e7023c34fbd116c'); \ No newline at end of file diff --git a/build/all-reviews.js b/build/all-reviews.js new file mode 100644 index 00000000000..adbd07b15b6 --- /dev/null +++ b/build/all-reviews.js @@ -0,0 +1,7 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var o,a,s=t[0],i=t[1],l=t[2],u=0,b=[];u{let{className:t,error:r,isLoading:s=!1,onRetry:u}=e;return Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(c.a,{srcElement:a.a}),label:Object(n.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",t)},Object(o.createElement)(d.a,{error:r}),u&&Object(o.createElement)(o.Fragment,null,s?Object(o.createElement)(l.Spinner,null):Object(o.createElement)(l.Button,{isSecondary:!0,onClick:u},Object(n.__)("Retry","woo-gutenberg-products-block"))))}},11:function(e,t){e.exports=window.wp.apiFetch},117:function(e,t){},12:function(e,t){e.exports=window.wp.compose},127:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return u}));var o=r(0),n=r(1),c=r(4),a=r(9),s=r(3),i=r(80);const l=(e,t,r)=>Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),d=(e,t)=>{const r=Object(s.getSetting)("showAvatars",!0),a=Object(s.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!a&&Object(o.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Product rating is disabled in your store settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.a,{label:Object(n.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(n.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(n.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:e=>t({imageType:e})}),"reviewer"===e.imageType&&!r&&Object(o.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},u=(e,t)=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(o.createElement)(c.SelectControl,{label:Object(n.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:e=>t({orderby:e})}),Object(o.createElement)(c.RangeControl,{label:Object(n.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(o.createElement)(c.RangeControl,{label:Object(n.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))},136:function(e,t,r){"use strict";var o=r(0),n=r(18);const c=Object(o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},137:function(e,t){},138:function(e,t,r){"use strict";var o=r(0),n=(r(2),r(5)),c=r.n(n),a=r(37),s=r(12);r(193),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:r,label:n,onChange:s,options:i,screenReaderLabel:l,readOnly:d,value:u}=e;const b="wc-block-components-sort-select__select-"+r;return Object(o.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(a.a,{label:n,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(o.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,readOnly:d,value:u},i.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},14:function(e,t){e.exports=window.wp.blocks},145:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(1),n=r(32);const c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(o.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Alice","woo-gutenberg-products-block"),review:`

${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Bob","woo-gutenberg-products-block"),review:`

${Object(o.__)("This product is awesome, I love it!","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:null,verified:!1}]}}},176:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},177:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),a=r(9),s=(r(192),r(77));t.a=e=>{let{attributes:t}=e;return Object(c.createElement)("div",n()({},a.useBlockProps.save({className:Object(s.a)(t)}),Object(s.b)(t)))}},18:function(e,t){e.exports=window.wp.primitives},180:function(e,t,r){"use strict";var o=r(0),n=r(1),c=(r(2),r(6)),a=r(4),s=r(9),i=r(8),l=r(3),d=r(100),u=r(37);r(240);const b=e=>{let{onClick:t,label:r,screenReaderLabel:n}=e;return Object(o.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(o.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(o.createElement)(u.a,{label:r,screenReaderLabel:n})))};b.defaultProps={label:Object(n.__)("Load more","woo-gutenberg-products-block")};var w=b,p=r(138);r(237);var m=e=>{let{onChange:t,readOnly:r,value:c}=e;return Object(o.createElement)(p.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(n.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(n.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(n.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(n.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(n.__)("Order reviews by","woo-gutenberg-products-block"),value:c})},g=r(5),h=r.n(g),v=r(212),O=r.n(v);const _=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const o=O()(e,{suffix:r,limit:t});return o.html},j=(e,t,r,o)=>{const n=f(e,t,r);return _(e,n-o.length,o)},f=(e,t,r)=>{let o={start:0,middle:0,end:e.length};for(;o.start<=o.end;)o.middle=Math.floor((o.start+o.end)/2),t.innerHTML=_(e,o.middle),o=k(o,t.clientHeight,r);return o.middle},k=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e);class y extends i.Component{constructor(e){super(...arguments),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewSummary=Object(i.createRef)(),this.reviewContent=Object(i.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props,r=(this.reviewSummary.current.clientHeight+1)*e+1,o=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:o}),o&&this.setState({summary:j(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:n}=this.props,c=e?r:n;if(c)return Object(o.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:n,isExpanded:c}=this.state;return t?!1===n?Object(o.createElement)("div",{className:e},Object(o.createElement)("div",{ref:this.reviewContent},t)):Object(o.createElement)("div",{className:e},(!c||null===n)&&Object(o.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:r}}),(c||null===n)&&Object(o.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},t),this.getButton()):null}}y.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(n.__)("Read more","woo-gutenberg-products-block"),lessText:Object(n.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var E=y;r(239);var R=e=>{let{attributes:t,review:r={}}=e;const{imageType:c,showReviewDate:a,showReviewerName:s,showReviewImage:i,showReviewRating:l,showReviewContent:d,showProductName:u}=t,{rating:b}=r,w=!Object.keys(r).length>0,p=Number.isFinite(b)&&l;return Object(o.createElement)("li",{className:h()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":w,"wc-block-components-review-list-item__item--has-image":i}),"aria-hidden":w},(u||a||s||i||p)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},i&&function(e,t,r){var c,a;return r||!e?Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(o.createElement)("img",{"aria-hidden":"true",alt:(null===(c=e.product_image)||void 0===c?void 0:c.alt)||"",src:(null===(a=e.product_image)||void 0===a?void 0:a.thumbnail)||""}):Object(o.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(o.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(n.__)("Verified buyer","woo-gutenberg-products-block")},Object(n.__)("Verified buyer","woo-gutenberg-products-block")))}(r,c,w),(u||s||p||a)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},p&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},c=Object(n.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(n.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(o.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(o.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":c},Object(o.createElement)("span",{style:r},c)))}(r),u&&function(e){return Object(o.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(o.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),s&&function(e){const{reviewer:t=""}=e;return Object(o.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),a&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(o.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),d&&function(e){return Object(o.createElement)(E,{maxLines:10,moreText:Object(n.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(n.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(o.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(238);var C=e=>{let{attributes:t,reviews:r}=e;const n=Object(l.getSetting)("showAvatars",!0),c=Object(l.getSetting)("reviewRatingsEnabled",!0),a=(n||"product"===t.imageType)&&t.showReviewImage,s=c&&t.showReviewRating,i={...t,showReviewImage:a,showReviewRating:s};return Object(o.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(o.createElement)(R,{attributes:i}):r.map((e,t)=>Object(o.createElement)(R,{key:e.id||t,attributes:i,review:e})))},S=r(7),P=r.n(S),N=r(16),T=r.n(N),L=r(31),x=r.n(L),A=r(77),M=r(35);class I extends i.Component{render(){const{attributes:e,error:t,isLoading:r,noReviewsPlaceholder:c,reviews:s,totalReviews:i}=this.props;if(t)return Object(o.createElement)(d.a,{className:"wc-block-featured-product-error",error:t,isLoading:r});if(0===s.length&&!r)return Object(o.createElement)(c,{attributes:e});const u=Object(l.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(a.Disabled,null,e.showOrderby&&u&&Object(o.createElement)(m,{readOnly:!0,value:e.orderby}),Object(o.createElement)(C,{attributes:e,reviews:s}),e.showLoadMore&&i>s.length&&Object(o.createElement)(w,{screenReaderLabel:Object(n.__)("Load more reviews","woo-gutenberg-products-block")}))}}var D=(e=>{class t extends i.Component{constructor(){super(...arguments),T()(this,"isPreview",!!this.props.attributes.previewReviews),T()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),T()(this,"isMounted",!1),T()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),T()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(M.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,o=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(o).fill({}))}),Object(A.c)(this.getArgs(e.length)).then(t=>{let{reviews:r,totalReviews:o}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:o,loading:!1,error:null}),{newReviews:r}}).catch(this.setError)}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:n,reviews:c,totalReviews:a}=this.state;return Object(o.createElement)(e,P()({},this.props,{error:r,isLoading:n,reviews:c.slice(0,t),totalReviews:a}))}}T()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(I);t.a=e=>{let{attributes:t,icon:r,name:i,noReviewsPlaceholder:l}=e;const{categoryIds:d,productId:u,reviewsOnPageLoad:b,showProductName:w,showReviewDate:p,showReviewerName:m,showReviewContent:g,showReviewImage:h,showReviewRating:v}=t,{order:O,orderby:_}=Object(A.d)(t.orderby),j=!(g||v||p||m||h||w),f=Object(s.useBlockProps)({className:Object(A.a)(t)});return j?Object(o.createElement)(a.Placeholder,{icon:r,label:i},Object(n.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(o.createElement)("div",f,Object(o.createElement)(D,{attributes:t,categoryIds:d,delayFunction:e=>Object(c.debounce)(e,400),noReviewsPlaceholder:l,orderby:_,order:O,productId:u,reviewsToDisplay:b}))}},192:function(e,t){},193:function(e,t){},237:function(e,t){},238:function(e,t){},239:function(e,t){},240:function(e,t){},3:function(e,t){e.exports=window.wc.wcSettings},31:function(e,t){e.exports=window.wp.isShallowEqual},32:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return s})),r.d(t,"n",(function(){return i})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return w})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return m})),r.d(t,"h",(function(){return g})),r.d(t,"a",(function(){return h})),r.d(t,"i",(function(){return v})),r.d(t,"b",(function(){return O}));var o,n=r(3);const c=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",s=c.pluginUrl+"build/",i=c.buildPhase,l=null===(o=n.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,d=n.STORE_PAGES.checkout.id,u=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,w=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),p=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),m=n.STORE_PAGES.cart.permalink,g=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),h=Object(n.getSetting)("allowedCountries",{}),v=Object(n.getSetting)("shippingStates",{}),O=Object(n.getSetting)("allowedStates",{})},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var o=r(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},37:function(e,t,r){"use strict";var o=r(0),n=r(5),c=r.n(n);t.a=e=>{let t,{label:r,screenReaderLabel:n,wrapperElement:a,wrapperProps:s={}}=e;const i=null!=r,l=null!=n;return!i&&l?(t=a||"span",s={...s,className:c()(s.className,"screen-reader-text")},Object(o.createElement)(t,s,n)):(t=a||o.Fragment,i&&l&&r!==n?Object(o.createElement)(t,s,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,s,r))}},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(39);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):"api"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},55:function(e,t,r){"use strict";var o=r(0);t.a=function(e){let{srcElement:t,size:r=24,...n}=e;return Object(o.isValidElement)(t)?Object(o.cloneElement)(t,{width:r,height:r,...n}):null}},6:function(e,t){e.exports=window.lodash},763:function(e,t,r){e.exports=r(860)},77:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return u}));var o=r(11),n=r.n(o),c=r(5),a=r.n(c),s=r(3);const i=e=>{if(Object(s.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=e=>n()({path:"/wc/store/products/reviews?"+Object.entries(e).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}))),d=e=>{const{className:t,categoryIds:r,productId:o,showReviewDate:n,showReviewerName:c,showReviewContent:s,showProductName:i,showReviewImage:l,showReviewRating:d}=e;let u="wc-block-all-reviews";return o&&(u="wc-block-reviews-by-product"),Array.isArray(r)&&(u="wc-block-reviews-by-category"),a()(u,t,{"has-image":l,"has-name":c,"has-date":n,"has-rating":d,"has-content":s,"has-product-name":i})},u=e=>{const{categoryIds:t,imageType:r,orderby:o,productId:n,reviewsOnPageLoad:c,reviewsOnLoadMore:a,showLoadMore:s,showOrderby:i}=e,l={"data-image-type":r,"data-orderby":o,"data-reviews-on-page-load":c,"data-reviews-on-load-more":a,"data-show-load-more":s,"data-show-orderby":i};return n&&(l["data-product-id"]=n),Array.isArray(t)&&(l["data-category-ids"]=t.join(",")),l}},8:function(e,t){e.exports=window.React},80:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),a=r(6),s=r(5),i=r.n(s),l=r(4),d=r(12);r(117);class u extends c.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:r,className:o,help:s,options:d,value:u}=this.props,b="inspector-toggle-button-control-"+r;let w;return s&&(w=Object(a.isFunction)(s)?s(t):s),Object(c.createElement)(l.BaseControl,{id:b,help:w,className:i()("components-toggle-button-control",o)},Object(c.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},e),Object(c.createElement)(l.ButtonGroup,{"aria-labelledby":b+"__label"},d.map((t,r)=>{const o={};return u===t.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(c.createElement)(l.Button,n()({key:`${t.label}-${t.value}-${r}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},o),t.label)})))}}t.a=Object(d.withInstanceId)(u)},860:function(e,t,r){"use strict";r.r(t);var o=r(0),n=r(1),c=r(14),a=r(55),s=r(18),i=Object(o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M15 4v7H5.17l-.59.59-.58.58V4h11m1-2H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm5 4h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1z"})),l=(r(192),r(9)),d=r(4),u=(r(2),r(180)),b=()=>Object(o.createElement)(d.Placeholder,{className:"wc-block-all-reviews",icon:Object(o.createElement)(a.a,{srcElement:i,className:"block-editor-block-icon"}),label:Object(n.__)("All Reviews","woo-gutenberg-products-block")},Object(n.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block")),w=r(127),p=r(176),m=r(177),g=r(145);Object(c.registerBlockType)("woocommerce/all-reviews",{apiVersion:2,title:Object(n.__)("All Reviews","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(a.a,{srcElement:i}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Show a list of all product reviews.","woo-gutenberg-products-block"),supports:{html:!1,color:{background:!1},typography:{fontSize:!0}},example:{...g.a,attributes:{...g.a.attributes,showProductName:!0}},attributes:{...p.a,showProductName:{type:"boolean",default:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:r}=e;return"woocommerce_recent_reviews"===t&&!(null==r||!r.raw)},transform:e=>{let{instance:t}=e;return Object(c.createBlock)("woocommerce/all-reviews",{reviewsOnPageLoad:t.raw.number,imageType:"product",showLoadMore:!1,showOrderby:!1,showReviewDate:!1,showReviewContent:!1})}}]},edit:e=>{let{attributes:t,setAttributes:r}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(l.InspectorControls,{key:"inspector"},Object(o.createElement)(d.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(d.ToggleControl,{label:Object(n.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:()=>r({showProductName:!t.showProductName})}),Object(w.b)(t,r)),Object(o.createElement)(d.PanelBody,{title:Object(n.__)("List Settings","woo-gutenberg-products-block")},Object(w.c)(t,r))),Object(o.createElement)(u.a,{attributes:t,icon:Object(o.createElement)(a.a,{icon:i,className:"block-editor-block-icon"}),name:Object(n.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:b}))},save:m.a})},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b.js b/build/atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b.js new file mode 100644 index 00000000000..f42e5f055a5 --- /dev/null +++ b/build/atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[1],{113:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return o})),r.d(t,"d",(function(){return s}));const n=e=>"number"==typeof e,c=e=>"string"==typeof e,o=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function s(e,t){return o(e)&&t in e}},132:function(e,t,r){"use strict";var n=r(3),c=r(1),o=r(113);const s=Object(n.getSetting)("countryLocale",{}),i=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(c.sprintf)( +/* translators: %s Field label. */ +Object(c.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(o.a)(e.priority)&&(t.index=e.priority),Object(o.c)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},a=Object.entries(s).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,i(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const c=r&&void 0!==a[r]?a[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...c[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},211:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},369:function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return i}));const n=window.CustomEvent||null,c=(e,t)=>{let{bubbles:r=!1,cancelable:c=!1,element:o,detail:s={}}=t;if(!n)return;o||(o=document.body);const i=new n(e,{bubbles:r,cancelable:c,detail:s});o.dispatchEvent(i)};let o;const s=()=>{o&&clearTimeout(o),o=setTimeout(()=>{c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const o=()=>{c(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),()=>jQuery(document).off(e,o)}},370:function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return a}));var n=r(3),c=r(132),o=r(13);const s=e=>{let{country:t="",state:r="",city:n="",postcode:c=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:c?c.replace(" ","").toUpperCase():""}},i=e=>{let{email:t=""}=e;return Object(o.isEmail)(t)?t.trim():""},a=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(c.a)(t,{},e.country),o=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(o[r]="")}),o}},46:function(e,t,r){"use strict";r.d(t,"a",(function(){return w}));var n=r(6),c=r(0),o=r(19),s=r(10),i=r(20),a=r(211),u=r(370),d=r(73),l=r(369);const p=e=>{const t=e.detail;t&&t.preserveCartData||Object(s.dispatch)(o.CART_STORE_KEY).invalidateResolutionForStore()},_=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},b=()=>{Object(c.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(l.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(l.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),_),[])},m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},f={...m,email:""},E={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:o.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},h=e=>Object(a.a)(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(i.decodeEntities)(r)]})),g={cartCoupons:o.EMPTY_CART_COUPONS,cartItems:o.EMPTY_CART_ITEMS,cartFees:o.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:E,cartIsLoading:!0,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:f,shippingAddress:m,shippingRates:o.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:o.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:o.EMPTY_EXTENSIONS},w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(d.b)(),i=null==r?void 0:r.previewCart,{shouldSelect:a}=e,l=Object(c.useRef)();b();const p=Object(s.useSelect)((e,r)=>{let{dispatch:n}=r;if(!a)return g;if(t)return{cartCoupons:i.coupons,cartItems:i.items,cartFees:i.fees,cartItemsCount:i.items_count,cartItemsWeight:i.items_weight,cartNeedsPayment:i.needs_payment,cartNeedsShipping:i.needs_shipping,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:i.totals,cartIsLoading:!1,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:f,shippingAddress:m,extensions:o.EMPTY_EXTENSIONS,shippingRates:i.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:i.has_calculated_shipping,paymentRequirements:i.paymentRequirements,receiveCart:"function"==typeof(null==i?void 0:i.receiveCart)?i.receiveCart:()=>{}};const c=e(o.CART_STORE_KEY),s=c.getCartData(),d=c.getCartErrors(),l=c.getCartTotals(),p=!c.hasFinishedResolution("getCartData"),_=c.isCustomerDataUpdating(),{receiveCart:b}=n(o.CART_STORE_KEY),E=h(s.billingAddress),w=s.needsShipping?h(s.shippingAddress):E,C=s.fees.length>0?s.fees.map(e=>h(e)):o.EMPTY_CART_FEES;return{cartCoupons:s.coupons.length>0?s.coupons.map(e=>({...e,label:e.code})):o.EMPTY_CART_COUPONS,cartItems:s.items,cartFees:C,cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors,cartTotals:l,cartIsLoading:p,cartErrors:d,billingAddress:Object(u.a)(E),shippingAddress:Object(u.a)(w),extensions:s.extensions,shippingRates:s.shippingRates,shippingRatesLoading:_,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements,receiveCart:b}},[a]);return l.current&&Object(n.isEqual)(l.current,p)||(l.current=p),l.current}},73:function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return i}));var n=r(0),c=r(10);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),s=()=>Object(n.useContext)(o),i=e=>{let{children:t,currentPostId:r=0,currentView:s="",previewData:i={}}=e;const a=Object(c.useSelect)(e=>r||e("core/editor").getCurrentPostId(),[r]),u=Object(n.useCallback)(e=>e in i?i[e]:{},[i]),d={isEditor:!0,currentPostId:a,currentView:s,previewData:i,getPreviewData:u};return Object(n.createElement)(o.Provider,{value:d},t)}},75:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(45),c=r(0),o=r(46);const s=()=>{const e=Object(o.a)(),t=Object(c.useRef)(e);return Object(c.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(c.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(c.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/add-to-cart--atomic-block-components/button.js b/build/atomic-block-components/add-to-cart--atomic-block-components/button.js new file mode 100644 index 00000000000..9a96b85f346 --- /dev/null +++ b/build/atomic-block-components/add-to-cart--atomic-block-components/button.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{174:function(e,t,c){"use strict";c.d(t,"b",(function(){return v})),c.d(t,"a",(function(){return N}));var o=c(0),n=(c(2),c(10)),s=c(75),r=c(73),i=c(7),a=c.n(i),u=c(5),l=c.n(u),d=c(888);c(221);const m=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var b=e=>{let{className:t,notices:c,removeNotice:n}=e;const s=c.filter(e=>"snackbar"!==e.type);if(!s.length)return null;const r=l()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:r},s.map(e=>Object(o.createElement)(d.a,a()({key:"store-notice-"+e.id},e,{className:l()("wc-block-components-notices__notice",m(e)),onRemove:()=>{e.isDismissible&&n(e.id)}}),e.content)))};const f=Object(o.createContext)({notices:[],createNotice:(e,t,c)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),v=()=>Object(o.useContext)(f),N=e=>{let{children:t,className:c="",createNoticeContainer:i=!0,context:a="wc/core"}=e;const{createNotice:u,removeNotice:l}=Object(n.useDispatch)("core/notices"),[d,m]=Object(o.useState)(!1),{dispatchStoreEvent:v}=Object(s.a)(),{isEditor:N}=Object(r.b)(),O=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u(e,t,{...c,context:c.context||a}),v("store-notice-create",{status:e,content:t,options:c})}),[u,v,a]),j=Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;l(e,t)}),[l,a]),{notices:p}=Object(n.useSelect)(e=>({notices:e("core/notices").getNotices(a)}),[a]),h={notices:p,createNotice:O,removeNotice:j,context:a,setIsSuppressed:m},g=d?null:Object(o.createElement)(b,{className:c,notices:h.notices,removeNotice:h.removeNotice,isEditor:N});return Object(o.createElement)(f.Provider,{value:h},i&&g,t)}},221:function(e,t){},63:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var o=c(0),n=c(174);const s=()=>{const{notices:e,createNotice:t,removeNotice:c,setIsSuppressed:s}=Object(n.b)(),r=Object(o.useRef)(e);Object(o.useEffect)(()=>{r.current=e},[e]);const i=Object(o.useMemo)(()=>({hasNoticesOfType:e=>r.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;r.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeNotice:c}),[c]),a=Object(o.useMemo)(()=>({addDefaultNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...c})},addErrorNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...c})},addWarningNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...c})},addInfoNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...c})},addSuccessNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...c})}}),[t]);return{notices:e,...i,...a,setIsSuppressed:s}}},777:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var o=c(0),n=c(10),s=c(19),r=c(20),i=c(46),a=c(63);const u=(e,t)=>{const c=e.find(e=>{let{id:c}=e;return c===t});return c?c.quantity:0},l=e=>{const{addItemToCart:t}=Object(n.useDispatch)(s.CART_STORE_KEY),{cartItems:c,cartIsLoading:l}=Object(i.a)(),{addErrorNotice:d,removeNotice:m}=Object(a.a)(),[b,f]=Object(o.useState)(!1),v=Object(o.useRef)(u(c,e));return Object(o.useEffect)(()=>{const t=u(c,e);t!==v.current&&(v.current=t)},[c,e]),{cartQuantity:Number.isFinite(v.current)?v.current:0,addingToCart:b,cartIsLoading:l,addToCart:function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return f(!0),t(e,c).then(()=>{m("add-to-cart")}).catch(e=>{d(Object(r.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})}).finally(()=>{f(!1)})}}}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/add-to-cart-frontend.js b/build/atomic-block-components/add-to-cart-frontend.js new file mode 100644 index 00000000000..3d5e9c0cfb3 --- /dev/null +++ b/build/atomic-block-components/add-to-cart-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{106:function(e,t,r){"use strict";var s=r(0);r(135),t.a=()=>Object(s.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},135:function(e,t){},137:function(e,t,r){"use strict";var s=r(18),c=r.n(s),n=r(0),a=r(62),o=r(5),i=r.n(o),u=r(106);r(188),t.a=e=>{let{className:t,showSpinner:r=!1,children:s,...o}=e;const l=i()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return Object(n.createElement)(a.a,c()({className:l},o),r&&Object(n.createElement)(u.a,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},s))}},154:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return u}));var s=r(0),c=r(4),n=r(17),a=r.n(n);const o=Object(s.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(s.useContext)(o),u=e=>{let{children:t}=e;const[r,n]=Object(s.useState)({}),i=Object(s.useCallback)(e=>r[e],[r]),u=Object(s.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),l=Object(s.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:r,...s}=t;return s})},[]),d=Object(s.useCallback)(()=>{n({})},[]),b=Object(s.useCallback)(e=>{e&&n(t=>(e=Object(c.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&a()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),E=Object(s.useCallback)((e,t)=>{n(r=>{if(!r.hasOwnProperty(e))return r;const s={...r[e],...t};return a()(r[e],s)?r:{...r,[e]:s}})},[]),p={getValidationError:i,setValidationErrors:b,clearValidationError:l,clearAllValidationErrors:d,hideValidationError:Object(s.useCallback)(e=>{E(e,{hidden:!0})},[E]),showValidationError:Object(s.useCallback)(e=>{E(e,{hidden:!1})},[E]),showAllValidationErrors:Object(s.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:u};return Object(s.createElement)(o.Provider,{value:p},t)}},159:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var s=r(78);const c=(e,t)=>function(r){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=s.a.addEventCallback(e,r,c);return t(n),()=>{t(s.a.removeEventCallback(e,n.id))}}},161:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}));const s=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var c=r(31);const n=async(e,t,r)=>{const c=s(e,t),n=[];for(const e of c)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},a=async(e,t,r)=>{const n=[],a=s(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(c.a)(t)||Object(c.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},188:function(e,t){},259:function(e,t){},268:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var s=r(0),c=(r(8),r(154));r(259);const n=e=>{let{errorMessage:t="",propertyName:r="",elementId:n=""}=e;const{getValidationError:a,getValidationErrorId:o}=Object(c.b)();if(!t||"string"!=typeof t){const e=a(r)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(s.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(s.createElement)("p",{id:o(n)},t))}},31:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return d}));var s=r(52);let c,n;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(c||(c={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(n||(n={}));const a=(e,t)=>Object(s.c)(e)&&"type"in e&&e.type===t,o=e=>a(e,c.SUCCESS),i=e=>a(e,c.ERROR),u=e=>a(e,c.FAIL),l=e=>!Object(s.c)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:c,noticeContexts:n,shouldRetry:l,isSuccessResponse:o,isErrorResponse:i,isFailResponse:u})},320:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var s=r(0),c=r(9),n=r(6),a=r(25),o=r(26),i=r(39);const u=(e,t)=>{const r=e.find(e=>{let{id:r}=e;return r===t});return r?r.quantity:0},l=e=>{const{addItemToCart:t}=Object(c.useDispatch)(n.CART_STORE_KEY),{cartItems:r,cartIsLoading:l}=Object(o.a)(),{addErrorNotice:d,removeNotice:b}=Object(i.a)(),[E,p]=Object(s.useState)(!1),m=Object(s.useRef)(u(r,e));return Object(s.useEffect)(()=>{const t=u(r,e);t!==m.current&&(m.current=t)},[r,e]),{cartQuantity:Number.isFinite(m.current)?m.current:0,addingToCart:E,cartIsLoading:l,addToCart:function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return p(!0),t(e,r).then(()=>{b("add-to-cart")}).catch(e=>{d(Object(a.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})}).finally(()=>{p(!1)})}}}},326:function(e,t){},327:function(e,t,r){"use strict";var s=r(0),c=r(32);const n=Object(s.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(s.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(s.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=n},328:function(e,t){},33:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var s=r(0),c=r(17),n=r.n(c);function a(e){const t=Object(s.useRef)(e);return n()(e,t.current)||(t.current=e),t.current}},374:function(e,t,r){"use strict";r.r(t);var s=r(134),c=r(0),n=(r(8),r(5)),a=r.n(n),o=r(1),i=r(33);const u=e=>e.is_purchasable||!1,l={PRISTINE:"pristine",IDLE:"idle",DISABLED:"disabled",PROCESSING:"processing",BEFORE_PROCESSING:"before_processing",AFTER_PROCESSING:"after_processing"},d={status:l.PRISTINE,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},b={SET_PRISTINE:"set_pristine",SET_IDLE:"set_idle",SET_DISABLED:"set_disabled",SET_PROCESSING:"set_processing",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_HAS_ERROR:"set_has_error",SET_NO_ERROR:"set_no_error",SET_QUANTITY:"set_quantity",SET_REQUEST_PARAMS:"set_request_params"},{SET_PRISTINE:E,SET_IDLE:p,SET_DISABLED:m,SET_PROCESSING:O,SET_BEFORE_PROCESSING:h,SET_AFTER_PROCESSING:f,SET_PROCESSING_RESPONSE:j,SET_HAS_ERROR:_,SET_NO_ERROR:g,SET_QUANTITY:S,SET_REQUEST_PARAMS:v}=b,y=()=>({type:p}),R=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e?_:g;return{type:t}},{SET_PRISTINE:C,SET_IDLE:P,SET_DISABLED:T,SET_PROCESSING:A,SET_BEFORE_PROCESSING:k,SET_AFTER_PROCESSING:N,SET_PROCESSING_RESPONSE:w,SET_HAS_ERROR:I,SET_NO_ERROR:D,SET_QUANTITY:F,SET_REQUEST_PARAMS:V}=b,{PRISTINE:B,IDLE:L,DISABLED:q,PROCESSING:x,BEFORE_PROCESSING:G,AFTER_PROCESSING:M}=l,Q=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,{quantity:r,type:s,data:c}=arguments.length>1?arguments[1]:void 0;switch(s){case C:e=d;break;case P:e=t.status!==L?{...t,status:L}:t;break;case T:e=t.status!==q?{...t,status:q}:t;break;case F:e=r!==t.quantity?{...t,quantity:r}:t;break;case V:e={...t,requestParams:{...t.requestParams,...c}};break;case w:e={...t,processingResponse:c};break;case A:e=t.status!==x?{...t,status:x,hasError:!1}:t,e=!1===e.hasError?e:{...e,hasError:!1};break;case k:e=t.status!==G?{...t,status:G,hasError:!1}:t;break;case N:e=t.status!==M?{...t,status:M}:t;break;case I:e=t.hasError?t:{...t,hasError:!0},e=t.status===x||t.status===G?{...e,status:L}:e;break;case D:e=t.hasError?{...t,hasError:!1}:t}return e!==t&&s!==C&&e.status===B&&(e.status=L),e};var W=r(78),H=r(159);const U=e=>({onAddToCartAfterProcessingWithSuccess:Object(H.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(H.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(H.a)("add_to_cart_before_processing",e)});var K=r(161),Y=r(154),z=r(39),J=r(31);const X=Object(c.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:e=>{},onAddToCartAfterProcessingWithError:e=>{},onAddToCartBeforeProcessing:e=>{}},dispatchActions:{resetForm:()=>{},submitForm:()=>{},setQuantity:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},setRequestParams:e=>{}}}),Z=()=>Object(c.useContext)(X),$=e=>{let{children:t,product:r,showFormElements:s}=e;const[n,a]=Object(c.useReducer)(Q,d),[b,p]=Object(c.useReducer)(W.b,{}),_=Object(i.a)(b),{addErrorNotice:g,removeNotices:C}=Object(z.a)(),{setValidationErrors:P}=Object(Y.b)(),{isSuccessResponse:T,isErrorResponse:A,isFailResponse:k}=Object(J.c)(),N=Object(c.useMemo)(()=>({onAddToCartAfterProcessingWithSuccess:U(p).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:U(p).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:U(p).onAddToCartBeforeProcessing}),[p]),w=Object(c.useMemo)(()=>({resetForm:()=>{a({type:E})},submitForm:()=>{a({type:h})},setQuantity:e=>{a((e=>({type:S,quantity:e}))(e))},setHasError:e=>{a(R(e))},setRequestParams:e=>{a((e=>({type:v,data:e}))(e))},setAfterProcessing:e=>{a({type:j,data:e}),a({type:f})}}),[]);Object(c.useEffect)(()=>{const e=n.status,t=!r.id||!u(r);e!==l.DISABLED||t?e!==l.DISABLED&&t&&a({type:m}):a(y())},[n.status,r,a]),Object(c.useEffect)(()=>{n.status===l.BEFORE_PROCESSING&&(C("error"),Object(K.a)(_,"add_to_cart_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;t&&g(t),r&&P(r)}),a(y())):a({type:O})}))},[n.status,P,g,C,a,_]),Object(c.useEffect)(()=>{if(n.status===l.AFTER_PROCESSING){const e={processingResponse:n.processingResponse},t=e=>{let t=!1;return e.forEach(e=>{const{message:r,messageContext:s}=e;(A(e)||k(e))&&r&&(t=!0,g(r,s?{context:s}:void 0))}),t};if(n.hasError)return void Object(K.b)(_,"add_to_cart_after_processing_with_error",e).then(r=>{if(!t(r)){var s;const t=(null===(s=e.processingResponse)||void 0===s?void 0:s.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");g(t,{id:"add-to-cart"})}a(y())});Object(K.b)(_,"add_to_cart_after_processing_with_success",e).then(e=>{t(e)?a(R(!0)):a(y())})}},[n.status,n.hasError,n.processingResponse,w,g,A,k,T,_]);const I=(e=>["simple","variable"].includes(e.type||"simple"))(r),D={product:r,productType:r.type||"simple",productIsPurchasable:u(r),productHasOptions:r.has_options||!1,supportsFormElements:I,showFormElements:s&&I,quantity:n.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:n.requestParams,isIdle:n.status===l.IDLE,isDisabled:n.status===l.DISABLED,isProcessing:n.status===l.PROCESSING,isBeforeProcessing:n.status===l.BEFORE_PROCESSING,isAfterProcessing:n.status===l.AFTER_PROCESSING,hasError:n.hasError,eventRegistration:N,dispatchActions:w};return Object(c.createElement)(X.Provider,{value:D},t)};var ee=r(47),te=r.n(ee),re=r(25),se=r(26),ce=()=>{const{dispatchActions:e,product:t,quantity:r,eventRegistration:s,hasError:n,isProcessing:a,requestParams:i}=Z(),{hasValidationErrors:u,showAllValidationErrors:l}=Object(Y.b)(),{addErrorNotice:d,removeNotice:b}=Object(z.a)(),{receiveCart:E}=Object(se.a)(),[p,m]=Object(c.useState)(!1),O=!n&&a,h=Object(c.useCallback)(()=>!u||(l(),{type:"error"}),[u,l]);Object(c.useEffect)(()=>{const e=s.onAddToCartBeforeProcessing(h,0);return()=>{e()}},[s,h]);const f=Object(c.useCallback)(()=>{m(!0),b("add-to-cart");const s={id:t.id||0,quantity:r,...i};te()({path:"/wc/store/cart/add-item",method:"POST",data:s,cache:"no-store",parse:!1}).then(t=>{te.a.setNonce(t.headers),t.json().then((function(r){t.ok?E(r):(r.body&&r.body.message?d(Object(re.decodeEntities)(r.body.message),{id:"add-to-cart"}):d(Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),e.setHasError()),e.setAfterProcessing(r),m(!1)}))}).catch(t=>{t.json().then((function(t){var r;null!==(r=t.data)&&void 0!==r&&r.cart&&E(t.data.cart),e.setHasError(),e.setAfterProcessing(t),m(!1)}))})},[t,d,b,E,e,r,i]);return Object(c.useEffect)(()=>{O&&!p&&f()},[O,f,p]),null};const ne=e=>{let{children:t,product:r,showFormElements:s}=e;return Object(c.createElement)(Y.a,null,Object(c.createElement)($,{product:r,showFormElements:s},t,Object(c.createElement)(ce,null)))};var ae=r(65),oe=r(4),ie=(r(326),r(137)),ue=r(108),le=r(327),de=r(42),be=r(320);const Ee=e=>{let{className:t,href:r,text:s,onClick:n}=e;return Object(c.createElement)(ie.a,{className:t,href:r,onClick:n,rel:"nofollow"},s)},pe=e=>{let{className:t,quantityInCart:r,isProcessing:s,isDisabled:n,isDone:a,onClick:i}=e;return Object(c.createElement)(ie.a,{className:t,disabled:n,showSpinner:s,onClick:i},a&&r>0?Object(o.sprintf)( +/* translators: %s number of products in cart. */ +Object(o._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(o.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(c.createElement)(ue.a,{srcElement:le.a,alt:Object(o.__)("Done","woo-gutenberg-products-block")}))};var me=()=>{const{showFormElements:e,productIsPurchasable:t,productHasOptions:r,product:s,productType:n,isDisabled:a,isProcessing:i,eventRegistration:u,hasError:l,dispatchActions:d}=Z(),{parentName:b}=Object(ae.useInnerBlockLayoutContext)(),{dispatchStoreEvent:E}=Object(de.a)(),{cartQuantity:p}=Object(be.a)(s.id||0),[m,O]=Object(c.useState)(!1),h=s.add_to_cart||{url:"",text:""};return Object(c.useEffect)(()=>{const e=u.onAddToCartAfterProcessingWithSuccess(()=>(l||O(!0),!0),0);return()=>{e()}},[u,l]),(e||!r&&"simple"===n)&&t?Object(c.createElement)(pe,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:a,isProcessing:i,isDone:m,onClick:()=>{d.submitForm(),E("cart-add-item",{product:s,listName:b})}}):Object(c.createElement)(Ee,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(o.__)("View Product","woo-gutenberg-products-block"),onClick:()=>{E("product-view-link",{product:s,listName:b})}})},Oe=e=>{let{disabled:t,min:r,max:s,value:n,onChange:a}=e;return Object(c.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:n,min:r,max:s,hidden:1===s,disabled:t,onChange:e=>{a(e.target.value)}})},he=e=>{let{reason:t=Object(o.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block")}=e;return Object(c.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},t)},fe=()=>{const{product:e,quantity:t,minQuantity:r,maxQuantity:s,dispatchActions:n,isDisabled:a}=Z();return e.id&&!e.is_purchasable?Object(c.createElement)(he,null):e.id&&!e.is_in_stock?Object(c.createElement)(he,{reason:Object(o.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Oe,{value:t,min:r,max:s,disabled:a,onChange:n.setQuantity}),Object(c.createElement)(me,null))},je=(r(328),r(375)),_e=r(3),ge=r(268);const Se={value:"",label:Object(o.__)("Select an option","woo-gutenberg-products-block")};var ve=e=>{let{attributeName:t,options:r=[],value:s="",onChange:n=(()=>{}),errorMessage:i=Object(o.__)("Please select a value.","woo-gutenberg-products-block")}=e;const{getValidationError:u,setValidationErrors:l,clearValidationError:d}=Object(Y.b)(),b=t,E=u(b)||{};return Object(_e.useEffect)(()=>{s?d(b):l({[b]:{message:i,hidden:!0}})},[s,b,i,d,l]),Object(_e.useEffect)(()=>()=>{d(b)},[b,d]),Object(c.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(c.createElement)(je.a,{label:Object(re.decodeEntities)(t),value:s||"",options:[Se,...r],onChange:n,required:!0,className:a()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":E.message&&!E.hidden})}),Object(c.createElement)(ge.a,{propertyName:b,elementId:b}))},ye=r(52);const Re=(e,t,r)=>{const s=Object.values(t).map(e=>{let{id:t}=e;return t});if(Object.values(r).every(e=>""===e))return s;const c=Object.keys(e);return s.filter(e=>c.every(s=>{const c=r[s]||"",n=t["id:"+e].attributes[s];return""===c||null===n||n===c}))};var Ce=e=>{let{attributes:t,variationAttributes:r,setRequestParams:s}=e;const n=Object(i.a)(t),a=Object(i.a)(r),[o,u]=Object(c.useState)(0),[l,d]=Object(c.useState)({}),[b,E]=Object(c.useState)(!1),p=Object(c.useMemo)(()=>((e,t,r)=>{const s={},c=Object.keys(e),n=Object.values(r).filter(Boolean).length>0;return c.forEach(c=>{const a=e[c],o={...r,[c]:null},i=n?Re(e,t,o):null,u=null!==i?i.map(e=>t["id:"+e].attributes[c]):null;s[c]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map(e=>{let{name:r,slug:s}=e;return null===t||t.includes(null)||t.includes(s)?{value:s,label:Object(re.decodeEntities)(r)}:null}).filter(Boolean)}(a.terms,u)}),s})(n,a,l),[l,n,a]);return Object(c.useEffect)(()=>{if(!b){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(ye.c)(e))return{};const t=Object.keys(e),r={};return 0===t.length||t.forEach(t=>{const s=e[t],c=s.terms.filter(e=>e.default);var n;c.length>0&&(r[s.name]=null===(n=c[0])||void 0===n?void 0:n.slug)}),r}(t);e&&d({...e}),E(!0)}},[l,t,b]),Object(c.useEffect)(()=>{Object.values(l).filter(e=>""!==e).length===Object.keys(n).length?u(((e,t,r)=>Re(e,t,r)[0]||0)(n,a,l)):o>0&&u(0)},[l,o,n,a]),Object(c.useEffect)(()=>{s({id:o,variation:Object.keys(l).map(e=>({attribute:e,value:l[e]}))})},[s,o,l]),Object(c.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(n).map(e=>Object(c.createElement)(ve,{key:e,attributeName:e,options:p[e],value:l[e],onChange:t=>{d({...l,[e]:t})}})))},Pe=e=>{let{product:t,dispatchers:r}=e;const s=(e=>e?Object(oe.keyBy)(Object.values(e).filter(e=>{let{has_variations:t}=e;return t}),"name"):{})(t.attributes),n=(e=>{if(!e)return{};const t={};return e.forEach(e=>{let{id:r,attributes:s}=e;t["id:"+r]={id:r,attributes:s.reduce((e,t)=>{let{name:r,value:s}=t;return e[r]=s,e},{})}}),t})(t.variations);return 0===Object.keys(s).length||0===n.length?null:Object(c.createElement)(Ce,{attributes:s,variationAttributes:n,setRequestParams:r.setRequestParams})},Te=()=>{const{product:e,quantity:t,minQuantity:r,maxQuantity:s,dispatchActions:n,isDisabled:a}=Z();return e.id&&!e.is_purchasable?Object(c.createElement)(he,null):e.id&&!e.is_in_stock?Object(c.createElement)(he,{reason:Object(o.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Pe,{product:e,dispatchers:n}),Object(c.createElement)(Oe,{value:t,min:r,max:s,disabled:a,onChange:n.setQuantity}),Object(c.createElement)(me,null))},Ae=()=>Object(c.createElement)(me,null),ke=r(302),Ne=()=>Object(c.createElement)(ke.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element."),we=()=>Object(c.createElement)(Ne,null);const Ie=()=>{const{showFormElements:e,productType:t}=Z();return e?"variable"===t?Object(c.createElement)(Te,null):"grouped"===t?Object(c.createElement)(we,null):"external"===t?Object(c.createElement)(Ae,null):"simple"===t||"variation"===t?Object(c.createElement)(fe,null):null:Object(c.createElement)(me,null)};var De=Object(s.withProductDataContext)(e=>{let{className:t,showFormElements:r}=e;const{product:s}=Object(ae.useProductDataContext)(),n=a()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(oe.isEmpty)(s)});return Object(c.createElement)(ne,{product:s,showFormElements:r},Object(c.createElement)("div",{className:n},Object(c.createElement)(Ie,null)))});t.default=Object(s.withFilteredAttributes)({showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}})(De)},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var s=r(0),c=r(80);const n=()=>{const{notices:e,createNotice:t,removeNotice:r,setIsSuppressed:n}=Object(c.b)(),a=Object(s.useRef)(e);Object(s.useEffect)(()=>{a.current=e},[e]);const o=Object(s.useMemo)(()=>({hasNoticesOfType:e=>a.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||r(t.id)})},removeNotice:r}),[r]),i=Object(s.useMemo)(()=>({addDefaultNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...r})},addErrorNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...r})},addWarningNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...r})},addInfoNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...r})},addSuccessNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...r})}}),[t]);return{notices:e,...o,...i,setIsSuppressed:n}}},78:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));var s=r(4);let c;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(c||(c={}));const n={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(s.uniqueId)(),type:c.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:c.REMOVE_EVENT_CALLBACK,eventType:e})},a={},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:r,id:s,callback:n,priority:o}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case c.ADD_EVENT_CALLBACK:return i.set(s,{priority:o,callback:n}),{...e,[r]:i};case c.REMOVE_EVENT_CALLBACK:return i.delete(s),{...e,[r]:i}}}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/add-to-cart.js b/build/atomic-block-components/add-to-cart.js new file mode 100644 index 00000000000..91421889476 --- /dev/null +++ b/build/atomic-block-components/add-to-cart.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{108:function(e,t,r){"use strict";var s=r(7),n=r.n(s),a=r(0),c=r(185),o=r(5),i=r.n(o),l=r(133);r(222),t.a=e=>{let{className:t,showSpinner:r=!1,children:s,...o}=e;const u=i()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return Object(a.createElement)(c.a,n()({className:u},o),r&&Object(a.createElement)(l.a,null),Object(a.createElement)("span",{className:"wc-block-components-button__text"},s))}},133:function(e,t,r){"use strict";var s=r(0);r(223),t.a=()=>Object(s.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},141:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o}));var s=r(6);let n;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(n||(n={}));const a={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(s.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e})},c={},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,eventType:r,id:s,callback:a,priority:o}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case n.ADD_EVENT_CALLBACK:return i.set(s,{priority:o,callback:a}),{...e,[r]:i};case n.REMOVE_EVENT_CALLBACK:return i.delete(s),{...e,[r]:i}}}},148:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return l}));var s=r(0),n=r(6),a=r(31),c=r.n(a);const o=Object(s.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(s.useContext)(o),l=e=>{let{children:t}=e;const[r,a]=Object(s.useState)({}),i=Object(s.useCallback)(e=>r[e],[r]),l=Object(s.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(s.useCallback)(e=>{a(t=>{if(!t[e])return t;const{[e]:r,...s}=t;return s})},[]),d=Object(s.useCallback)(()=>{a({})},[]),b=Object(s.useCallback)(e=>{e&&a(t=>(e=Object(n.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&c()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),E=Object(s.useCallback)((e,t)=>{a(r=>{if(!r.hasOwnProperty(e))return r;const s={...r[e],...t};return c()(r[e],s)?r:{...r,[e]:s}})},[]),p={getValidationError:i,setValidationErrors:b,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(s.useCallback)(e=>{E(e,{hidden:!0})},[E]),showValidationError:Object(s.useCallback)(e=>{E(e,{hidden:!1})},[E]),showAllValidationErrors:Object(s.useCallback)(()=>{a(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(s.createElement)(o.Provider,{value:p},t)}},222:function(e,t){},223:function(e,t){},224:function(e,t){},276:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var s=r(0),n=(r(2),r(148));r(224);const a=e=>{let{errorMessage:t="",propertyName:r="",elementId:a=""}=e;const{getValidationError:c,getValidationErrorId:o}=Object(n.b)();if(!t||"string"!=typeof t){const e=c(r)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(s.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(s.createElement)("p",{id:o(a)},t))}},366:function(e,t){},373:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var s=r(141);const n=(e,t)=>function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const a=s.a.addEventCallback(e,r,n);return t(a),()=>{t(s.a.removeEventCallback(e,a.id))}}},374:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},375:function(e,t,r){"use strict";var s=r(0),n=(r(2),r(5)),a=r.n(n),c=r(1),o=r(52),i=r(879);const l={PRISTINE:"pristine",IDLE:"idle",DISABLED:"disabled",PROCESSING:"processing",BEFORE_PROCESSING:"before_processing",AFTER_PROCESSING:"after_processing"},u={status:l.PRISTINE,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},d={SET_PRISTINE:"set_pristine",SET_IDLE:"set_idle",SET_DISABLED:"set_disabled",SET_PROCESSING:"set_processing",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_HAS_ERROR:"set_has_error",SET_NO_ERROR:"set_no_error",SET_QUANTITY:"set_quantity",SET_REQUEST_PARAMS:"set_request_params"},{SET_PRISTINE:b,SET_IDLE:E,SET_DISABLED:p,SET_PROCESSING:m,SET_BEFORE_PROCESSING:O,SET_AFTER_PROCESSING:_,SET_PROCESSING_RESPONSE:h,SET_HAS_ERROR:j,SET_NO_ERROR:f,SET_QUANTITY:S,SET_REQUEST_PARAMS:g}=d,y=()=>({type:E}),v=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e?j:f;return{type:t}},{SET_PRISTINE:R,SET_IDLE:P,SET_DISABLED:C,SET_PROCESSING:A,SET_BEFORE_PROCESSING:k,SET_AFTER_PROCESSING:T,SET_PROCESSING_RESPONSE:w,SET_HAS_ERROR:N,SET_NO_ERROR:I,SET_QUANTITY:D,SET_REQUEST_PARAMS:F}=d,{PRISTINE:V,IDLE:B,DISABLED:q,PROCESSING:L,BEFORE_PROCESSING:x,AFTER_PROCESSING:G}=l,Q=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,{quantity:r,type:s,data:n}=arguments.length>1?arguments[1]:void 0;switch(s){case R:e=u;break;case P:e=t.status!==B?{...t,status:B}:t;break;case C:e=t.status!==q?{...t,status:q}:t;break;case D:e=r!==t.quantity?{...t,quantity:r}:t;break;case F:e={...t,requestParams:{...t.requestParams,...n}};break;case w:e={...t,processingResponse:n};break;case A:e=t.status!==L?{...t,status:L,hasError:!1}:t,e=!1===e.hasError?e:{...e,hasError:!1};break;case k:e=t.status!==x?{...t,status:x,hasError:!1}:t;break;case T:e=t.status!==G?{...t,status:G}:t;break;case N:e=t.hasError?t:{...t,hasError:!0},e=t.status===L||t.status===x?{...e,status:B}:e;break;case I:e=t.hasError?{...t,hasError:!1}:t}return e!==t&&s!==R&&e.status===V&&(e.status=B),e};var M=r(141),H=r(373);const W=e=>({onAddToCartAfterProcessingWithSuccess:Object(H.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(H.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(H.a)("add_to_cart_before_processing",e)});var U=r(376),K=r(148),Y=r(63),z=r(59);const J=Object(s.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:e=>{},onAddToCartAfterProcessingWithError:e=>{},onAddToCartBeforeProcessing:e=>{}},dispatchActions:{resetForm:()=>{},submitForm:()=>{},setQuantity:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},setRequestParams:e=>{}}}),X=()=>Object(s.useContext)(J),Z=e=>{let{children:t,product:r,showFormElements:n}=e;const[a,d]=Object(s.useReducer)(Q,u),[E,j]=Object(s.useReducer)(M.b,{}),f=Object(o.a)(E),{addErrorNotice:R,removeNotices:P}=Object(Y.a)(),{setValidationErrors:C}=Object(K.b)(),{isSuccessResponse:A,isErrorResponse:k,isFailResponse:T}=Object(z.c)(),w=Object(s.useMemo)(()=>({onAddToCartAfterProcessingWithSuccess:W(j).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:W(j).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:W(j).onAddToCartBeforeProcessing}),[j]),N=Object(s.useMemo)(()=>({resetForm:()=>{d({type:b})},submitForm:()=>{d({type:O})},setQuantity:e=>{d((e=>({type:S,quantity:e}))(e))},setHasError:e=>{d(v(e))},setRequestParams:e=>{d((e=>({type:g,data:e}))(e))},setAfterProcessing:e=>{d({type:h,data:e}),d({type:_})}}),[]);Object(s.useEffect)(()=>{const e=a.status,t=!r.id||!Object(i.a)(r);e!==l.DISABLED||t?e!==l.DISABLED&&t&&d({type:p}):d(y())},[a.status,r,d]),Object(s.useEffect)(()=>{a.status===l.BEFORE_PROCESSING&&(P("error"),Object(U.a)(f,"add_to_cart_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;t&&R(t),r&&C(r)}),d(y())):d({type:m})}))},[a.status,C,R,P,d,f]),Object(s.useEffect)(()=>{if(a.status===l.AFTER_PROCESSING){const e={processingResponse:a.processingResponse},t=e=>{let t=!1;return e.forEach(e=>{const{message:r,messageContext:s}=e;(k(e)||T(e))&&r&&(t=!0,R(r,s?{context:s}:void 0))}),t};if(a.hasError)return void Object(U.b)(f,"add_to_cart_after_processing_with_error",e).then(r=>{if(!t(r)){var s;const t=(null===(s=e.processingResponse)||void 0===s?void 0:s.message)||Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");R(t,{id:"add-to-cart"})}d(y())});Object(U.b)(f,"add_to_cart_after_processing_with_success",e).then(e=>{t(e)?d(v(!0)):d(y())})}},[a.status,a.hasError,a.processingResponse,N,R,k,T,A,f]);const I=Object(i.b)(r),D={product:r,productType:r.type||"simple",productIsPurchasable:Object(i.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:I,showFormElements:n&&I,quantity:a.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:a.requestParams,isIdle:a.status===l.IDLE,isDisabled:a.status===l.DISABLED,isProcessing:a.status===l.PROCESSING,isBeforeProcessing:a.status===l.BEFORE_PROCESSING,isAfterProcessing:a.status===l.AFTER_PROCESSING,hasError:a.hasError,eventRegistration:w,dispatchActions:N};return Object(s.createElement)(J.Provider,{value:D},t)};var $=r(11),ee=r.n($),te=r(20),re=r(46),se=()=>{const{dispatchActions:e,product:t,quantity:r,eventRegistration:n,hasError:a,isProcessing:o,requestParams:i}=X(),{hasValidationErrors:l,showAllValidationErrors:u}=Object(K.b)(),{addErrorNotice:d,removeNotice:b}=Object(Y.a)(),{receiveCart:E}=Object(re.a)(),[p,m]=Object(s.useState)(!1),O=!a&&o,_=Object(s.useCallback)(()=>!l||(u(),{type:"error"}),[l,u]);Object(s.useEffect)(()=>{const e=n.onAddToCartBeforeProcessing(_,0);return()=>{e()}},[n,_]);const h=Object(s.useCallback)(()=>{m(!0),b("add-to-cart");const s={id:t.id||0,quantity:r,...i};ee()({path:"/wc/store/cart/add-item",method:"POST",data:s,cache:"no-store",parse:!1}).then(t=>{ee.a.setNonce(t.headers),t.json().then((function(r){t.ok?E(r):(r.body&&r.body.message?d(Object(te.decodeEntities)(r.body.message),{id:"add-to-cart"}):d(Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),e.setHasError()),e.setAfterProcessing(r),m(!1)}))}).catch(t=>{t.json().then((function(t){var r;null!==(r=t.data)&&void 0!==r&&r.cart&&E(t.data.cart),e.setHasError(),e.setAfterProcessing(t),m(!1)}))})},[t,d,b,E,e,r,i]);return Object(s.useEffect)(()=>{O&&!p&&h()},[O,h,p]),null};const ne=e=>{let{children:t,product:r,showFormElements:n}=e;return Object(s.createElement)(K.a,null,Object(s.createElement)(Z,{product:r,showFormElements:n},t,Object(s.createElement)(se,null)))};var ae=r(36),ce=r(6),oe=r(78),ie=(r(366),r(108)),le=r(55),ue=r(551),de=r(75),be=r(777);const Ee=e=>{let{className:t,href:r,text:n,onClick:a}=e;return Object(s.createElement)(ie.a,{className:t,href:r,onClick:a,rel:"nofollow"},n)},pe=e=>{let{className:t,quantityInCart:r,isProcessing:n,isDisabled:a,isDone:o,onClick:i}=e;return Object(s.createElement)(ie.a,{className:t,disabled:a,showSpinner:n,onClick:i},o&&r>0?Object(c.sprintf)( +/* translators: %s number of products in cart. */ +Object(c._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(c.__)("Add to cart","woo-gutenberg-products-block"),!!o&&Object(s.createElement)(le.a,{srcElement:ue.a,alt:Object(c.__)("Done","woo-gutenberg-products-block")}))};var me=()=>{const{showFormElements:e,productIsPurchasable:t,productHasOptions:r,product:n,productType:a,isDisabled:o,isProcessing:i,eventRegistration:l,hasError:u,dispatchActions:d}=X(),{parentName:b}=Object(ae.useInnerBlockLayoutContext)(),{dispatchStoreEvent:E}=Object(de.a)(),{cartQuantity:p}=Object(be.a)(n.id||0),[m,O]=Object(s.useState)(!1),_=n.add_to_cart||{url:"",text:""};return Object(s.useEffect)(()=>{const e=l.onAddToCartAfterProcessingWithSuccess(()=>(u||O(!0),!0),0);return()=>{e()}},[l,u]),(e||!r&&"simple"===a)&&t?Object(s.createElement)(pe,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:o,isProcessing:i,isDone:m,onClick:()=>{d.submitForm(),E("cart-add-item",{product:n,listName:b})}}):Object(s.createElement)(Ee,{className:"wc-block-components-product-add-to-cart-button",href:_.url,text:_.text||Object(c.__)("View Product","woo-gutenberg-products-block"),onClick:()=>{E("product-view-link",{product:n,listName:b})}})},Oe=e=>{let{disabled:t,min:r,max:n,value:a,onChange:c}=e;return Object(s.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:a,min:r,max:n,hidden:1===n,disabled:t,onChange:e=>{c(e.target.value)}})},_e=e=>{let{reason:t=Object(c.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block")}=e;return Object(s.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},t)},he=()=>{const{product:e,quantity:t,minQuantity:r,maxQuantity:n,dispatchActions:a,isDisabled:o}=X();return e.id&&!e.is_purchasable?Object(s.createElement)(_e,null):e.id&&!e.is_in_stock?Object(s.createElement)(_e,{reason:Object(c.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(s.createElement)(s.Fragment,null,Object(s.createElement)(Oe,{value:t,min:r,max:n,disabled:o,onChange:a.setQuantity}),Object(s.createElement)(me,null))},je=(r(550),r(898)),fe=r(8),Se=r(276);const ge={value:"",label:Object(c.__)("Select an option","woo-gutenberg-products-block")};var ye=e=>{let{attributeName:t,options:r=[],value:n="",onChange:o=(()=>{}),errorMessage:i=Object(c.__)("Please select a value.","woo-gutenberg-products-block")}=e;const{getValidationError:l,setValidationErrors:u,clearValidationError:d}=Object(K.b)(),b=t,E=l(b)||{};return Object(fe.useEffect)(()=>{n?d(b):u({[b]:{message:i,hidden:!0}})},[n,b,i,d,u]),Object(fe.useEffect)(()=>()=>{d(b)},[b,d]),Object(s.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(s.createElement)(je.a,{label:Object(te.decodeEntities)(t),value:n||"",options:[ge,...r],onChange:o,required:!0,className:a()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":E.message&&!E.hidden})}),Object(s.createElement)(Se.a,{propertyName:b,elementId:b}))},ve=r(113);const Re=(e,t,r)=>{const s=Object.values(t).map(e=>{let{id:t}=e;return t});if(Object.values(r).every(e=>""===e))return s;const n=Object.keys(e);return s.filter(e=>n.every(s=>{const n=r[s]||"",a=t["id:"+e].attributes[s];return""===n||null===a||a===n}))};var Pe=e=>{let{attributes:t,variationAttributes:r,setRequestParams:n}=e;const a=Object(o.a)(t),c=Object(o.a)(r),[i,l]=Object(s.useState)(0),[u,d]=Object(s.useState)({}),[b,E]=Object(s.useState)(!1),p=Object(s.useMemo)(()=>((e,t,r)=>{const s={},n=Object.keys(e),a=Object.values(r).filter(Boolean).length>0;return n.forEach(n=>{const c=e[n],o={...r,[n]:null},i=a?Re(e,t,o):null,l=null!==i?i.map(e=>t["id:"+e].attributes[n]):null;s[n]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map(e=>{let{name:r,slug:s}=e;return null===t||t.includes(null)||t.includes(s)?{value:s,label:Object(te.decodeEntities)(r)}:null}).filter(Boolean)}(c.terms,l)}),s})(a,c,u),[u,a,c]);return Object(s.useEffect)(()=>{if(!b){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(ve.b)(e))return{};const t=Object.keys(e),r={};return 0===t.length||t.forEach(t=>{const s=e[t],n=s.terms.filter(e=>e.default);var a;n.length>0&&(r[s.name]=null===(a=n[0])||void 0===a?void 0:a.slug)}),r}(t);e&&d({...e}),E(!0)}},[u,t,b]),Object(s.useEffect)(()=>{Object.values(u).filter(e=>""!==e).length===Object.keys(a).length?l(((e,t,r)=>Re(e,t,r)[0]||0)(a,c,u)):i>0&&l(0)},[u,i,a,c]),Object(s.useEffect)(()=>{n({id:i,variation:Object.keys(u).map(e=>({attribute:e,value:u[e]}))})},[n,i,u]),Object(s.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(a).map(e=>Object(s.createElement)(ye,{key:e,attributeName:e,options:p[e],value:u[e],onChange:t=>{d({...u,[e]:t})}})))},Ce=e=>{let{product:t,dispatchers:r}=e;const n=(e=>e?Object(ce.keyBy)(Object.values(e).filter(e=>{let{has_variations:t}=e;return t}),"name"):{})(t.attributes),a=(e=>{if(!e)return{};const t={};return e.forEach(e=>{let{id:r,attributes:s}=e;t["id:"+r]={id:r,attributes:s.reduce((e,t)=>{let{name:r,value:s}=t;return e[r]=s,e},{})}}),t})(t.variations);return 0===Object.keys(n).length||0===a.length?null:Object(s.createElement)(Pe,{attributes:n,variationAttributes:a,setRequestParams:r.setRequestParams})},Ae=()=>{const{product:e,quantity:t,minQuantity:r,maxQuantity:n,dispatchActions:a,isDisabled:o}=X();return e.id&&!e.is_purchasable?Object(s.createElement)(_e,null):e.id&&!e.is_in_stock?Object(s.createElement)(_e,{reason:Object(c.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(s.createElement)(s.Fragment,null,Object(s.createElement)(Ce,{product:e,dispatchers:a}),Object(s.createElement)(Oe,{value:t,min:r,max:n,disabled:o,onChange:a.setQuantity}),Object(s.createElement)(me,null))},ke=()=>Object(s.createElement)(me,null),Te=r(889),we=()=>Object(s.createElement)(Te.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element."),Ne=()=>Object(s.createElement)(we,null);const Ie=()=>{const{showFormElements:e,productType:t}=X();return e?"variable"===t?Object(s.createElement)(Ae,null):"grouped"===t?Object(s.createElement)(Ne,null):"external"===t?Object(s.createElement)(ke,null):"simple"===t||"variation"===t?Object(s.createElement)(he,null):null:Object(s.createElement)(me,null)};t.a=Object(oe.withProductDataContext)(e=>{let{className:t,showFormElements:r}=e;const{product:n}=Object(ae.useProductDataContext)(),c=a()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(ce.isEmpty)(n)});return Object(s.createElement)(ne,{product:n,showFormElements:r},Object(s.createElement)("div",{className:c},Object(s.createElement)(Ie,null)))})},376:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return c}));const s=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var n=r(59);const a=async(e,t,r)=>{const n=s(e,t),a=[];for(const e of n)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&a.push(t)}catch(e){console.error(e)}return!a.length||a},c=async(e,t,r)=>{const a=[],c=s(e,t);for(const e of c)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(n.a)(t)||Object(n.b)(t))return a.push(t),a;a.push(t)}catch(e){return console.error(e),a.push({type:"error"}),a}return a}},52:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var s=r(0),n=r(31),a=r.n(n);function c(e){const t=Object(s.useRef)(e);return a()(e,t.current)||(t.current=e),t.current}},550:function(e,t){},551:function(e,t,r){"use strict";var s=r(0),n=r(18);const a=Object(s.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(s.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(s.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=a},59:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d}));var s=r(113);let n,a;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(n||(n={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(a||(a={}));const c=(e,t)=>Object(s.b)(e)&&"type"in e&&e.type===t,o=e=>c(e,n.SUCCESS),i=e=>c(e,n.ERROR),l=e=>c(e,n.FAIL),u=e=>!Object(s.b)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:n,noticeContexts:a,shouldRetry:u,isSuccessResponse:o,isErrorResponse:i,isFailResponse:l})},879:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return n}));const s=e=>e.is_purchasable||!1,n=e=>["simple","variable"].includes(e.type||"simple")},903:function(e,t,r){"use strict";r.r(t);var s=r(78),n=r(375),a=r(374);t.default=Object(s.withFilteredAttributes)(a.a)(n.a)}}]); \ No newline at end of file diff --git a/build/atomic-block-components/button-frontend.js b/build/atomic-block-components/button-frontend.js new file mode 100644 index 00000000000..fb47a3f6ca3 --- /dev/null +++ b/build/atomic-block-components/button-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{319:function(t,e){},320:function(t,e,c){"use strict";c.d(e,"a",(function(){return u}));var o=c(0),n=c(9),r=c(6),a=c(25),d=c(26),i=c(39);const s=(t,e)=>{const c=t.find(t=>{let{id:c}=t;return c===e});return c?c.quantity:0},u=t=>{const{addItemToCart:e}=Object(n.useDispatch)(r.CART_STORE_KEY),{cartItems:c,cartIsLoading:u}=Object(d.a)(),{addErrorNotice:l,removeNotice:b}=Object(i.a)(),[p,f]=Object(o.useState)(!1),m=Object(o.useRef)(s(c,t));return Object(o.useEffect)(()=>{const e=s(c,t);e!==m.current&&(m.current=e)},[c,t]),{cartQuantity:Number.isFinite(m.current)?m.current:0,addingToCart:p,cartIsLoading:u,addToCart:function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return f(!0),e(t,c).then(()=>{b("add-to-cart")}).catch(t=>{l(Object(a.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})}).finally(()=>{f(!1)})}}}},360:function(t,e,c){"use strict";c.r(e);var o=c(18),n=c.n(o),r=c(0),a=(c(8),c(5)),d=c.n(a),i=c(1),s=c(42),u=c(320),l=c(25),b=c(65),p=c(134);c(319);const f=t=>{let{product:e}=t;const{id:c,permalink:o,add_to_cart:a,has_options:b,is_purchasable:p,is_in_stock:f}=e,{dispatchStoreEvent:m}=Object(s.a)(),{cartQuantity:O,addingToCart:_,addToCart:j}=Object(u.a)(c),k=Number.isFinite(O)&&O>0,w=!b&&p&&f,g=Object(l.decodeEntities)((null==a?void 0:a.description)||""),h=k?Object(i.sprintf)( +/* translators: %s number of products in cart. */ +Object(i._n)("%d in cart","%d in cart",O,"woo-gutenberg-products-block"),O):Object(l.decodeEntities)((null==a?void 0:a.text)||Object(i.__)("Add to cart","woo-gutenberg-products-block")),v=w?"button":"a",N={};return w?N.onClick=()=>{j(),m("cart-add-item",{product:e})}:(N.href=o,N.rel="nofollow",N.onClick=()=>{m("product-view-link",{product:e})}),Object(r.createElement)(v,n()({"aria-label":g,className:d()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:_,added:k}),disabled:_},N),h)},m=()=>Object(r.createElement)("button",{className:d()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0});e.default=Object(p.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(b.useInnerBlockLayoutContext)(),{product:o}=Object(b.useProductDataContext)();return Object(r.createElement)("div",{className:d()(e,"wp-block-button","wc-block-components-product-button",{[c+"__product-add-to-cart"]:c})},o.id?Object(r.createElement)(f,{product:o}):Object(r.createElement)(m,null))})},39:function(t,e,c){"use strict";c.d(e,"a",(function(){return r}));var o=c(0),n=c(80);const r=()=>{const{notices:t,createNotice:e,removeNotice:c,setIsSuppressed:r}=Object(n.b)(),a=Object(o.useRef)(t);Object(o.useEffect)(()=>{a.current=t},[t]);const d=Object(o.useMemo)(()=>({hasNoticesOfType:t=>a.current.some(e=>e.type===t),removeNotices:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(e=>{null!==t&&e.status!==t||c(e.id)})},removeNotice:c}),[c]),i=Object(o.useMemo)(()=>({addDefaultNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("default",t,{...c})},addErrorNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("error",t,{...c})},addWarningNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("warning",t,{...c})},addInfoNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("info",t,{...c})},addSuccessNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("success",t,{...c})}}),[e]);return{notices:t,...d,...i,setIsSuppressed:r}}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/button.js b/build/atomic-block-components/button.js new file mode 100644 index 00000000000..6192d1dcbbc --- /dev/null +++ b/build/atomic-block-components/button.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{479:function(t,o,c){"use strict";c.r(o);var e=c(7),n=c.n(e),a=c(0),d=(c(2),c(5)),r=c.n(d),l=c(1),b=c(75),u=c(777),i=c(20),s=c(36),p=c(78);c(544);const _=t=>{let{product:o}=t;const{id:c,permalink:e,add_to_cart:d,has_options:s,is_purchasable:p,is_in_stock:_}=o,{dispatchStoreEvent:k}=Object(b.a)(),{cartQuantity:w,addingToCart:m,addToCart:j}=Object(u.a)(c),O=Number.isFinite(w)&&w>0,C=!s&&p&&_,E=Object(i.decodeEntities)((null==d?void 0:d.description)||""),h=O?Object(l.sprintf)( +/* translators: %s number of products in cart. */ +Object(l._n)("%d in cart","%d in cart",w,"woo-gutenberg-products-block"),w):Object(i.decodeEntities)((null==d?void 0:d.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),f=C?"button":"a",g={};return C?g.onClick=()=>{j(),k("cart-add-item",{product:o})}:(g.href=e,g.rel="nofollow",g.onClick=()=>{k("product-view-link",{product:o})}),Object(a.createElement)(f,n()({"aria-label":E,className:r()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:m,added:O}),disabled:m},g),h)},k=()=>Object(a.createElement)("button",{className:r()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0});o.default=Object(p.withProductDataContext)(t=>{let{className:o}=t;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:e}=Object(s.useProductDataContext)();return Object(a.createElement)("div",{className:r()(o,"wp-block-button","wc-block-components-product-button",{[c+"__product-add-to-cart"]:c})},e.id?Object(a.createElement)(_,{product:e}):Object(a.createElement)(k,null))})},544:function(t,o){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/category-list-frontend.js b/build/atomic-block-components/category-list-frontend.js new file mode 100644 index 00000000000..90938216abf --- /dev/null +++ b/build/atomic-block-components/category-list-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{323:function(e,t){},363:function(e,t,c){"use strict";c.r(t);var o=c(0),a=c(1),n=c(5),l=c.n(n),r=c(65),s=c(4),u=c(134);c(323),t.default=Object(u.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(r.useInnerBlockLayoutContext)(),{product:n}=Object(r.useProductDataContext)();return Object(s.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:l()(t,"wc-block-components-product-category-list",{[c+"__product-category-list"]:c})},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map(e=>{let{name:t,link:c,slug:a}=e;return Object(o.createElement)("li",{key:"category-list-item-"+a},Object(o.createElement)("a",{href:c},t))})))})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/category-list.js b/build/atomic-block-components/category-list.js new file mode 100644 index 00000000000..d963880a501 --- /dev/null +++ b/build/atomic-block-components/category-list.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{483:function(e,t,c){"use strict";c.r(t);var o=c(0),a=c(1),n=c(5),l=c.n(n),r=c(36),s=c(6),u=c(78);c(547),t.default=Object(u.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(r.useInnerBlockLayoutContext)(),{product:n}=Object(r.useProductDataContext)();return Object(s.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:l()(t,"wc-block-components-product-category-list",{[c+"__product-category-list"]:c})},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map(e=>{let{name:t,link:c,slug:a}=e;return Object(o.createElement)("li",{key:"category-list-item-"+a},Object(o.createElement)("a",{href:c},t))})))})},547:function(e,t){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/image-frontend.js b/build/atomic-block-components/image-frontend.js new file mode 100644 index 00000000000..4190777fd44 --- /dev/null +++ b/build/atomic-block-components/image-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10,13],{284:function(e,t){},297:function(e,t,a){"use strict";a.r(t);var c=a(0),n=(a(8),a(1)),l=a(5),r=a.n(l),o=a(37),s=a(65),i=a(134);a(284),t.default=Object(i.withProductDataContext)(e=>{let{className:t,align:a}=e;const{parentClassName:l}=Object(s.useInnerBlockLayoutContext)(),{product:i}=Object(s.useProductDataContext)();if(!i.id||!i.on_sale)return null;const u="string"==typeof a?"wc-block-components-product-sale-badge--align-"+a:"";return Object(c.createElement)("div",{className:r()("wc-block-components-product-sale-badge",t,u,{[l+"__product-onsale"]:l})},Object(c.createElement)(o.a,{label:Object(n.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(n.__)("Product on sale","woo-gutenberg-products-block")}))})},316:function(e,t){},37:function(e,t,a){"use strict";var c=a(0),n=a(5),l=a.n(n);t.a=e=>{let t,{label:a,screenReaderLabel:n,wrapperElement:r,wrapperProps:o={}}=e;const s=null!=a,i=null!=n;return!s&&i?(t=r||"span",o={...o,className:l()(o.className,"screen-reader-text")},Object(c.createElement)(t,o,n)):(t=r||c.Fragment,s&&i&&a!==n?Object(c.createElement)(t,o,Object(c.createElement)("span",{"aria-hidden":"true"},a),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,o,a))}},386:function(e,t,a){"use strict";a.r(t);var c=a(134),n=a(18),l=a.n(n),r=a(0),o=(a(8),a(1)),s=a(5),i=a.n(s),u=a(2),d=a(65),b=a(42),m=a(297);a(316);const p=()=>Object(r.createElement)("img",{src:u.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),g=e=>{let{image:t,onLoad:a,loaded:c,showFullSize:n,fallbackAlt:o}=e;const{thumbnail:s,src:i,srcset:u,sizes:d,alt:b}=t||{},m={alt:b||o,onLoad:a,hidden:!c,src:s,...n&&{src:i,srcSet:u,sizes:d}};return Object(r.createElement)(r.Fragment,null,m.src&&Object(r.createElement)("img",l()({"data-testid":"product-image"},m)),!c&&Object(r.createElement)(p,null))};var O=Object(c.withProductDataContext)(e=>{let{className:t,imageSizing:a="full-size",showProductLink:c=!0,showSaleBadge:n,saleBadgeAlign:l="right"}=e;const{parentClassName:s}=Object(d.useInnerBlockLayoutContext)(),{product:u}=Object(d.useProductDataContext)(),[O,j]=Object(r.useState)(!1),{dispatchStoreEvent:w}=Object(b.a)();if(!u.id)return Object(r.createElement)("div",{className:i()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",{[s+"__product-image"]:s})},Object(r.createElement)(p,null));const f=!!u.images.length,h=f?u.images[0]:null,k=c?"a":r.Fragment,E=Object(o.sprintf)( +/* translators: %s is referring to the product name */ +Object(o.__)("Link to %s","woo-gutenberg-products-block"),u.name),_={href:u.permalink,rel:"nofollow",...!f&&{"aria-label":E},onClick:()=>{w("product-view-link",{product:u})}};return Object(r.createElement)("div",{className:i()(t,"wc-block-components-product-image",{[s+"__product-image"]:s})},Object(r.createElement)(k,c&&_,!!n&&Object(r.createElement)(m.default,{align:l,product:u}),Object(r.createElement)(g,{fallbackAlt:u.name,image:h,onLoad:()=>j(!0),loaded:O,showFullSize:"cropped"!==a})))});t.default=Object(c.withFilteredAttributes)({showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}})(O)}}]); \ No newline at end of file diff --git a/build/atomic-block-components/image.js b/build/atomic-block-components/image.js new file mode 100644 index 00000000000..43450497b5c --- /dev/null +++ b/build/atomic-block-components/image.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{371:function(e,t,a){"use strict";t.a={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},372:function(e,t,a){"use strict";var c=a(7),l=a.n(c),n=a(0),o=(a(2),a(1)),r=a(5),i=a.n(r),s=a(3),u=a(36),d=a(78),m=a(75),b=a(274);a(542);const g=()=>Object(n.createElement)("img",{src:s.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),p=e=>{let{image:t,onLoad:a,loaded:c,showFullSize:o,fallbackAlt:r}=e;const{thumbnail:i,src:s,srcset:u,sizes:d,alt:m}=t||{},b={alt:m||r,onLoad:a,hidden:!c,src:i,...o&&{src:s,srcSet:u,sizes:d}};return Object(n.createElement)(n.Fragment,null,b.src&&Object(n.createElement)("img",l()({"data-testid":"product-image"},b)),!c&&Object(n.createElement)(g,null))};t.a=Object(d.withProductDataContext)(e=>{let{className:t,imageSizing:a="full-size",showProductLink:c=!0,showSaleBadge:l,saleBadgeAlign:r="right"}=e;const{parentClassName:s}=Object(u.useInnerBlockLayoutContext)(),{product:d}=Object(u.useProductDataContext)(),[w,h]=Object(n.useState)(!1),{dispatchStoreEvent:f}=Object(m.a)();if(!d.id)return Object(n.createElement)("div",{className:i()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",{[s+"__product-image"]:s})},Object(n.createElement)(g,null));const O=!!d.images.length,j=O?d.images[0]:null,k=c?"a":n.Fragment,E=Object(o.sprintf)( +/* translators: %s is referring to the product name */ +Object(o.__)("Link to %s","woo-gutenberg-products-block"),d.name),S={href:d.permalink,rel:"nofollow",...!O&&{"aria-label":E},onClick:()=>{f("product-view-link",{product:d})}};return Object(n.createElement)("div",{className:i()(t,"wc-block-components-product-image",{[s+"__product-image"]:s})},Object(n.createElement)(k,c&&S,!!l&&Object(n.createElement)(b.default,{align:r,product:d}),Object(n.createElement)(p,{fallbackAlt:d.name,image:j,onLoad:()=>h(!0),loaded:w,showFullSize:"cropped"!==a})))})},542:function(e,t){},901:function(e,t,a){"use strict";a.r(t);var c=a(78),l=a(372),n=a(371);t.default=Object(c.withFilteredAttributes)(n.a)(l.a)}}]); \ No newline at end of file diff --git a/build/atomic-block-components/price-frontend.js b/build/atomic-block-components/price-frontend.js new file mode 100644 index 00000000000..8d7fd916583 --- /dev/null +++ b/build/atomic-block-components/price-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{136:function(e,c){},139:function(e,c,r){"use strict";var t=r(0),a=r(1),n=r(66),l=r(5),o=r.n(l),i=r(48);r(192);const s=e=>{let{currency:c,maxPrice:r,minPrice:l,priceClassName:s,priceStyle:u}=e;return Object(t.createElement)(t.Fragment,null,Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(a.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(i.formatPrice)(l),Object(i.formatPrice)(r))),Object(t.createElement)("span",{"aria-hidden":!0},Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:c,value:l,style:u})," — ",Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:c,value:r,style:u})))},u=e=>{let{currency:c,regularPriceClassName:r,regularPriceStyle:l,regularPrice:i,priceClassName:s,priceStyle:u,price:m}=e;return Object(t.createElement)(t.Fragment,null,Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(t.createElement)(n.a,{currency:c,renderText:e=>Object(t.createElement)("del",{className:o()("wc-block-components-product-price__regular",r),style:l},e),value:i}),Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(t.createElement)(n.a,{currency:c,renderText:e=>Object(t.createElement)("ins",{className:o()("wc-block-components-product-price__value","is-discounted",s),style:u},e),value:m}))};c.a=e=>{let{align:c,className:r,currency:a,format:l="",maxPrice:i,minPrice:m,price:p,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:j,regularPriceStyle:O}=e;const _=o()(r,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+c]:c});l.includes("")||(l="",console.error("Price formats need to include the `` tag."));const y=g&&p!==g;let N=Object(t.createElement)("span",{className:o()("wc-block-components-product-price__value",b)});return y?N=Object(t.createElement)(u,{currency:a,price:p,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:j,regularPriceStyle:O}):void 0!==m&&void 0!==i?N=Object(t.createElement)(s,{currency:a,maxPrice:i,minPrice:m,priceClassName:b,priceStyle:d}):p&&(N=Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",b),currency:a,value:p,style:d})),Object(t.createElement)("span",{className:_},Object(t.createInterpolateElement)(l,{price:N}))}},192:function(e,c){},315:function(e,c,r){"use strict";r.d(c,"a",(function(){return a})),r(202);var t=r(84);const a=()=>t.m>1},358:function(e,c,r){"use strict";r.r(c);var t=r(0),a=(r(8),r(5)),n=r.n(a),l=r(139),o=r(48),i=r(65),s=r(201),u=r(315),m=r(134);c.default=Object(m.withProductDataContext)(e=>{var c,r;let{className:a,align:m,fontSize:p,customFontSize:b,saleFontSize:d,customSaleFontSize:g,color:j,customColor:O,saleColor:_,customSaleColor:y}=e;const{parentClassName:N}=Object(i.useInnerBlockLayoutContext)(),{product:f}=Object(i.useProductDataContext)(),v=n()(a,{[N+"__product-price"]:N});if(!f.id)return Object(t.createElement)(l.a,{align:m,className:v});const P=Object(s.getColorClassName)("color",j),C=Object(s.getFontSizeClass)(p),S=Object(s.getColorClassName)("color",_),w=Object(s.getFontSizeClass)(d),x=n()({"has-text-color":j||O,"has-font-size":p||b,[P]:P,[C]:C}),E=n()({"has-text-color":_||y,"has-font-size":d||g,[S]:S,[w]:w}),k={color:O,fontSize:b},h={color:y,fontSize:g},z=f.prices,F=Object(o.getCurrencyFromPriceResponse)(z),D=z.price!==z.regular_price,T=D?n()({[N+"__product-price__value"]:N,[E]:Object(u.a)()}):n()({[N+"__product-price__value"]:N,[x]:Object(u.a)()}),B=D?h:k;return Object(t.createElement)(l.a,{align:m,className:v,currency:F,price:z.price,priceClassName:T,priceStyle:Object(u.a)()?B:{},minPrice:null==z||null===(c=z.price_range)||void 0===c?void 0:c.min_amount,maxPrice:null==z||null===(r=z.price_range)||void 0===r?void 0:r.max_amount,regularPrice:z.regular_price,regularPriceClassName:n()({[N+"__product-price__regular"]:N,[x]:Object(u.a)()}),regularPriceStyle:Object(u.a)()?k:{}})})},66:function(e,c,r){"use strict";var t=r(18),a=r.n(t),n=r(0),l=r(107),o=r(5),i=r.n(o);r(136);const s=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});c.a=e=>{let{className:c,value:r,currency:t,onValueChange:o,displayType:u="text",...m}=e;const p="string"==typeof r?parseInt(r,10):r;if(!Number.isFinite(p))return null;const b=p/10**t.minorUnit;if(!Number.isFinite(b))return null;const d=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",c),g={...m,...s(t),value:void 0,currency:void 0,onValueChange:void 0},j=o?e=>{const c=e.value*10**t.minorUnit;o(c)}:()=>{};return Object(n.createElement)(l.a,a()({className:d,displayType:u},g,{value:b,onValueChange:j}))}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/price.js b/build/atomic-block-components/price.js new file mode 100644 index 00000000000..204bee02ec2 --- /dev/null +++ b/build/atomic-block-components/price.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{139:function(e,c,r){"use strict";var t=r(0),a=r(1),n=r(53),l=r(5),o=r.n(l),i=r(44);r(220);const s=e=>{let{currency:c,maxPrice:r,minPrice:l,priceClassName:s,priceStyle:u}=e;return Object(t.createElement)(t.Fragment,null,Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(a.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(i.formatPrice)(l),Object(i.formatPrice)(r))),Object(t.createElement)("span",{"aria-hidden":!0},Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:c,value:l,style:u})," — ",Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:c,value:r,style:u})))},u=e=>{let{currency:c,regularPriceClassName:r,regularPriceStyle:l,regularPrice:i,priceClassName:s,priceStyle:u,price:m}=e;return Object(t.createElement)(t.Fragment,null,Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(t.createElement)(n.a,{currency:c,renderText:e=>Object(t.createElement)("del",{className:o()("wc-block-components-product-price__regular",r),style:l},e),value:i}),Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(t.createElement)(n.a,{currency:c,renderText:e=>Object(t.createElement)("ins",{className:o()("wc-block-components-product-price__value","is-discounted",s),style:u},e),value:m}))};c.a=e=>{let{align:c,className:r,currency:a,format:l="",maxPrice:i,minPrice:m,price:p,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:j,regularPriceStyle:O}=e;const _=o()(r,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+c]:c});l.includes("")||(l="",console.error("Price formats need to include the `` tag."));const y=g&&p!==g;let N=Object(t.createElement)("span",{className:o()("wc-block-components-product-price__value",b)});return y?N=Object(t.createElement)(u,{currency:a,price:p,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:j,regularPriceStyle:O}):void 0!==m&&void 0!==i?N=Object(t.createElement)(s,{currency:a,maxPrice:i,minPrice:m,priceClassName:b,priceStyle:d}):p&&(N=Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",b),currency:a,value:p,style:d})),Object(t.createElement)("span",{className:_},Object(t.createInterpolateElement)(l,{price:N}))}},186:function(e,c){},220:function(e,c){},477:function(e,c,r){"use strict";r.r(c);var t=r(0),a=(r(2),r(5)),n=r.n(a),l=r(139),o=r(44),i=r(36),s=r(9),u=r(110),m=r(78);c.default=Object(m.withProductDataContext)(e=>{var c,r;let{className:a,align:m,fontSize:p,customFontSize:b,saleFontSize:d,customSaleFontSize:g,color:j,customColor:O,saleColor:_,customSaleColor:y}=e;const{parentClassName:N}=Object(i.useInnerBlockLayoutContext)(),{product:v}=Object(i.useProductDataContext)(),f=n()(a,{[N+"__product-price"]:N});if(!v.id)return Object(t.createElement)(l.a,{align:m,className:f});const P=Object(s.getColorClassName)("color",j),C=Object(s.getFontSizeClass)(p),S=Object(s.getColorClassName)("color",_),w=Object(s.getFontSizeClass)(d),x=n()({"has-text-color":j||O,"has-font-size":p||b,[P]:P,[C]:C}),E=n()({"has-text-color":_||y,"has-font-size":d||g,[S]:S,[w]:w}),k={color:O,fontSize:b},h={color:y,fontSize:g},z=v.prices,F=Object(o.getCurrencyFromPriceResponse)(z),D=z.price!==z.regular_price,T=D?n()({[N+"__product-price__value"]:N,[E]:Object(u.b)()}):n()({[N+"__product-price__value"]:N,[x]:Object(u.b)()}),B=D?h:k;return Object(t.createElement)(l.a,{align:m,className:f,currency:F,price:z.price,priceClassName:T,priceStyle:Object(u.b)()?B:{},minPrice:null==z||null===(c=z.price_range)||void 0===c?void 0:c.min_amount,maxPrice:null==z||null===(r=z.price_range)||void 0===r?void 0:r.max_amount,regularPrice:z.regular_price,regularPriceClassName:n()({[N+"__product-price__regular"]:N,[x]:Object(u.b)()}),regularPriceStyle:Object(u.b)()?k:{}})})},53:function(e,c,r){"use strict";var t=r(7),a=r.n(t),n=r(0),l=r(178),o=r(5),i=r.n(o);r(186);const s=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});c.a=e=>{let{className:c,value:r,currency:t,onValueChange:o,displayType:u="text",...m}=e;const p="string"==typeof r?parseInt(r,10):r;if(!Number.isFinite(p))return null;const b=p/10**t.minorUnit;if(!Number.isFinite(b))return null;const d=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",c),g={...m,...s(t),value:void 0,currency:void 0,onValueChange:void 0},j=o?e=>{const c=e.value*10**t.minorUnit;o(c)}:()=>{};return Object(n.createElement)(l.a,a()({className:d,displayType:u},g,{value:b,onValueChange:j}))}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/rating-frontend.js b/build/atomic-block-components/rating-frontend.js new file mode 100644 index 00000000000..416828b030b --- /dev/null +++ b/build/atomic-block-components/rating-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{318:function(t,e){},359:function(t,e,c){"use strict";c.r(e);var n=c(0),a=(c(8),c(1)),o=c(5),r=c.n(o),s=c(65),u=c(134);c(318);e.default=Object(u.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:o}=Object(s.useProductDataContext)(),u=(t=>{const e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0})(o);if(!u)return null;const l={width:u/5*100+"%"},i=Object(a.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),u);return Object(n.createElement)("div",{className:r()(e,"wc-block-components-product-rating",{[c+"__product-rating"]:c})},Object(n.createElement)("div",{className:r()("wc-block-components-product-rating__stars",c+"__product-rating__stars"),role:"img","aria-label":i},Object(n.createElement)("span",{style:l},i)))})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/rating.js b/build/atomic-block-components/rating.js new file mode 100644 index 00000000000..fd07f358c75 --- /dev/null +++ b/build/atomic-block-components/rating.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{478:function(t,e,c){"use strict";c.r(e);var n=c(0),a=(c(2),c(1)),o=c(5),r=c.n(o),s=c(36),u=c(78);c(543);e.default=Object(u.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:o}=Object(s.useProductDataContext)(),u=(t=>{const e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0})(o);if(!u)return null;const l={width:u/5*100+"%"},i=Object(a.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),u);return Object(n.createElement)("div",{className:r()(e,"wc-block-components-product-rating",{[c+"__product-rating"]:c})},Object(n.createElement)("div",{className:r()("wc-block-components-product-rating__stars",c+"__product-rating__stars"),role:"img","aria-label":i},Object(n.createElement)("span",{style:l},i)))})},543:function(t,e){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/sale-badge-frontend.js b/build/atomic-block-components/sale-badge-frontend.js new file mode 100644 index 00000000000..423c62aa149 --- /dev/null +++ b/build/atomic-block-components/sale-badge-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{284:function(e,t){},297:function(e,t,c){"use strict";c.r(t);var a=c(0),n=(c(8),c(1)),r=c(5),l=c.n(r),s=c(37),o=c(65),u=c(134);c(284),t.default=Object(u.withProductDataContext)(e=>{let{className:t,align:c}=e;const{parentClassName:r}=Object(o.useInnerBlockLayoutContext)(),{product:u}=Object(o.useProductDataContext)();if(!u.id||!u.on_sale)return null;const b="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(a.createElement)("div",{className:l()("wc-block-components-product-sale-badge",t,b,{[r+"__product-onsale"]:r})},Object(a.createElement)(s.a,{label:Object(n.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(n.__)("Product on sale","woo-gutenberg-products-block")}))})},37:function(e,t,c){"use strict";var a=c(0),n=c(5),r=c.n(n);t.a=e=>{let t,{label:c,screenReaderLabel:n,wrapperElement:l,wrapperProps:s={}}=e;const o=null!=c,u=null!=n;return!o&&u?(t=l||"span",s={...s,className:r()(s.className,"screen-reader-text")},Object(a.createElement)(t,s,n)):(t=l||a.Fragment,o&&u&&c!==n?Object(a.createElement)(t,s,Object(a.createElement)("span",{"aria-hidden":"true"},c),Object(a.createElement)("span",{className:"screen-reader-text"},n)):Object(a.createElement)(t,s,c))}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/sale-badge.js b/build/atomic-block-components/sale-badge.js new file mode 100644 index 00000000000..88371cbb471 --- /dev/null +++ b/build/atomic-block-components/sale-badge.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{274:function(e,t,c){"use strict";c.r(t);var a=c(0),n=(c(2),c(1)),r=c(5),l=c.n(r),s=c(37),o=c(36),u=c(78);c(541),t.default=Object(u.withProductDataContext)(e=>{let{className:t,align:c}=e;const{parentClassName:r}=Object(o.useInnerBlockLayoutContext)(),{product:u}=Object(o.useProductDataContext)();if(!u.id||!u.on_sale)return null;const b="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(a.createElement)("div",{className:l()("wc-block-components-product-sale-badge",t,b,{[r+"__product-onsale"]:r})},Object(a.createElement)(s.a,{label:Object(n.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(n.__)("Product on sale","woo-gutenberg-products-block")}))})},37:function(e,t,c){"use strict";var a=c(0),n=c(5),r=c.n(n);t.a=e=>{let t,{label:c,screenReaderLabel:n,wrapperElement:l,wrapperProps:s={}}=e;const o=null!=c,u=null!=n;return!o&&u?(t=l||"span",s={...s,className:r()(s.className,"screen-reader-text")},Object(a.createElement)(t,s,n)):(t=l||a.Fragment,o&&u&&c!==n?Object(a.createElement)(t,s,Object(a.createElement)("span",{"aria-hidden":"true"},c),Object(a.createElement)("span",{className:"screen-reader-text"},n)):Object(a.createElement)(t,s,c))}},541:function(e,t){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/sku-frontend.js b/build/atomic-block-components/sku-frontend.js new file mode 100644 index 00000000000..1f8690a60e6 --- /dev/null +++ b/build/atomic-block-components/sku-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{322:function(t,e){},362:function(t,e,c){"use strict";c.r(e);var o=c(0),n=c(1),s=(c(8),c(5)),u=c.n(s),a=c(65),r=c(134);c(322),e.default=Object(r.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(a.useInnerBlockLayoutContext)(),{product:s}=Object(a.useProductDataContext)(),r=s.sku;return r?Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-sku",{[c+"__product-sku"]:c})},Object(n.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,r)):null})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/sku.js b/build/atomic-block-components/sku.js new file mode 100644 index 00000000000..933c926f35e --- /dev/null +++ b/build/atomic-block-components/sku.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{482:function(t,e,c){"use strict";c.r(e);var o=c(0),n=c(1),s=(c(2),c(5)),u=c.n(s),a=c(36),r=c(78);c(546),e.default=Object(r.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(a.useInnerBlockLayoutContext)(),{product:s}=Object(a.useProductDataContext)(),r=s.sku;return r?Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-sku",{[c+"__product-sku"]:c})},Object(n.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,r)):null})},546:function(t,e){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/stock-indicator-frontend.js b/build/atomic-block-components/stock-indicator-frontend.js new file mode 100644 index 00000000000..727c2ccb827 --- /dev/null +++ b/build/atomic-block-components/stock-indicator-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{325:function(o,c){},365:function(o,c,t){"use strict";t.r(c);var e=t(0),n=t(1),s=(t(8),t(5)),r=t.n(s),a=t(65),i=t(134);t(325);c.default=Object(i.withProductDataContext)(o=>{let{className:c}=o;const{parentClassName:t}=Object(a.useInnerBlockLayoutContext)(),{product:s}=Object(a.useProductDataContext)();if(!s.id||!s.is_purchasable)return null;const i=!!s.is_in_stock,k=s.low_stock_remaining,b=s.is_on_backorder;return Object(e.createElement)("div",{className:r()(c,"wc-block-components-product-stock-indicator",{[t+"__stock-indicator"]:t,"wc-block-components-product-stock-indicator--in-stock":i,"wc-block-components-product-stock-indicator--out-of-stock":!i,"wc-block-components-product-stock-indicator--low-stock":!!k,"wc-block-components-product-stock-indicator--available-on-backorder":!!b})},k?(o=>Object(n.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(n.__)("%d left in stock","woo-gutenberg-products-block"),o))(k):((o,c)=>c?Object(n.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(n.__)("In Stock","woo-gutenberg-products-block"):Object(n.__)("Out of Stock","woo-gutenberg-products-block"))(i,b))})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/stock-indicator.js b/build/atomic-block-components/stock-indicator.js new file mode 100644 index 00000000000..ea3437f4e21 --- /dev/null +++ b/build/atomic-block-components/stock-indicator.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{485:function(o,c,t){"use strict";t.r(c);var e=t(0),n=t(1),s=(t(2),t(5)),r=t.n(s),a=t(36),i=t(78);t(549);c.default=Object(i.withProductDataContext)(o=>{let{className:c}=o;const{parentClassName:t}=Object(a.useInnerBlockLayoutContext)(),{product:s}=Object(a.useProductDataContext)();if(!s.id||!s.is_purchasable)return null;const i=!!s.is_in_stock,k=s.low_stock_remaining,b=s.is_on_backorder;return Object(e.createElement)("div",{className:r()(c,"wc-block-components-product-stock-indicator",{[t+"__stock-indicator"]:t,"wc-block-components-product-stock-indicator--in-stock":i,"wc-block-components-product-stock-indicator--out-of-stock":!i,"wc-block-components-product-stock-indicator--low-stock":!!k,"wc-block-components-product-stock-indicator--available-on-backorder":!!b})},k?(o=>Object(n.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(n.__)("%d left in stock","woo-gutenberg-products-block"),o))(k):((o,c)=>c?Object(n.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(n.__)("In Stock","woo-gutenberg-products-block"):Object(n.__)("Out of Stock","woo-gutenberg-products-block"))(i,b))})},549:function(o,c){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/summary-frontend.js b/build/atomic-block-components/summary-frontend.js new file mode 100644 index 00000000000..30c64d93286 --- /dev/null +++ b/build/atomic-block-components/summary-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{157:function(t,e,c){"use strict";var n=c(0),o=c(102),s=c(86);const r=t=>{const e=t.indexOf("

");return-1===e?t:t.substr(0,e+4)},u=t=>t.replace(/<\/?[a-z][^>]*?>/gi,""),a=(t,e)=>t.replace(/[\s|\.\,]+$/i,"")+e,l=function(t,e){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const n=u(t),o=n.split(" ").splice(0,e).join(" ");return Object(s.autop)(a(o,c))},i=function(t,e){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const o=u(t),r=o.slice(0,e);if(c)return Object(s.autop)(a(r,n));const l=r.match(/([\s]+)/g),i=l?l.length:0,p=o.slice(0,e+i);return Object(s.autop)(a(p,n))};e.a=t=>{let{source:e,maxLength:c=15,countType:u="words",className:a=""}=t;const p=Object(n.useMemo)(()=>function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const n=Object(s.autop)(t),u=Object(o.count)(n,c);if(u<=e)return n;const a=r(n),p=Object(o.count)(a,c);return p<=e?a:"words"===c?l(a,e):i(a,e,"characters_including_spaces"===c)}(e,c,u),[e,c,u]);return Object(n.createElement)(n.RawHTML,{className:a},p)}},321:function(t,e){},361:function(t,e,c){"use strict";c.r(e);var n=c(0),o=(c(8),c(5)),s=c.n(o),r=c(157),u=c(84),a=c(65),l=c(134);c(321),e.default=Object(l.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(a.useInnerBlockLayoutContext)(),{product:o}=Object(a.useProductDataContext)();if(!o)return Object(n.createElement)("div",{className:s()(e,"wc-block-components-product-summary",{[c+"__product-summary"]:c})});const l=o.short_description?o.short_description:o.description;return l?Object(n.createElement)(r.a,{className:s()(e,"wc-block-components-product-summary",{[c+"__product-summary"]:c}),source:l,maxLength:150,countType:u.n.wordCountType||"words"}):null})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/summary.js b/build/atomic-block-components/summary.js new file mode 100644 index 00000000000..75088dfdc90 --- /dev/null +++ b/build/atomic-block-components/summary.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{175:function(t,e,c){"use strict";var n=c(0),o=c(134),s=c(103);const r=t=>{const e=t.indexOf("

");return-1===e?t:t.substr(0,e+4)},u=t=>t.replace(/<\/?[a-z][^>]*?>/gi,""),a=(t,e)=>t.replace(/[\s|\.\,]+$/i,"")+e,l=function(t,e){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const n=u(t),o=n.split(" ").splice(0,e).join(" ");return Object(s.autop)(a(o,c))},i=function(t,e){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const o=u(t),r=o.slice(0,e);if(c)return Object(s.autop)(a(r,n));const l=r.match(/([\s]+)/g),i=l?l.length:0,p=o.slice(0,e+i);return Object(s.autop)(a(p,n))};e.a=t=>{let{source:e,maxLength:c=15,countType:u="words",className:a=""}=t;const p=Object(n.useMemo)(()=>function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const n=Object(s.autop)(t),u=Object(o.count)(n,c);if(u<=e)return n;const a=r(n),p=Object(o.count)(a,c);return p<=e?a:"words"===c?l(a,e):i(a,e,"characters_including_spaces"===c)}(e,c,u),[e,c,u]);return Object(n.createElement)(n.RawHTML,{className:a},p)}},481:function(t,e,c){"use strict";c.r(e);var n=c(0),o=(c(2),c(5)),s=c.n(o),r=c(175),u=c(32),a=c(36),l=c(78);c(545),e.default=Object(l.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(a.useInnerBlockLayoutContext)(),{product:o}=Object(a.useProductDataContext)();if(!o)return Object(n.createElement)("div",{className:s()(e,"wc-block-components-product-summary",{[c+"__product-summary"]:c})});const l=o.short_description?o.short_description:o.description;return l?Object(n.createElement)(r.a,{className:s()(e,"wc-block-components-product-summary",{[c+"__product-summary"]:c}),source:l,maxLength:150,countType:u.o.wordCountType||"words"}):null})},545:function(t,e){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/tag-list-frontend.js b/build/atomic-block-components/tag-list-frontend.js new file mode 100644 index 00000000000..6754fae22e1 --- /dev/null +++ b/build/atomic-block-components/tag-list-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{324:function(t,e){},364:function(t,e,c){"use strict";c.r(e);var a=c(0),n=c(1),l=(c(8),c(5)),s=c.n(l),o=c(65),u=c(4),r=c(134);c(324),e.default=Object(r.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(o.useInnerBlockLayoutContext)(),{product:l}=Object(o.useProductDataContext)();return Object(u.isEmpty)(l.tags)?null:Object(a.createElement)("div",{className:s()(e,"wc-block-components-product-tag-list",{[c+"__product-tag-list"]:c})},Object(n.__)("Tags:","woo-gutenberg-products-block")," ",Object(a.createElement)("ul",null,Object.values(l.tags).map(t=>{let{name:e,link:c,slug:n}=t;return Object(a.createElement)("li",{key:"tag-list-item-"+n},Object(a.createElement)("a",{href:c},e))})))})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/tag-list.js b/build/atomic-block-components/tag-list.js new file mode 100644 index 00000000000..214f9080ee1 --- /dev/null +++ b/build/atomic-block-components/tag-list.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{484:function(t,e,c){"use strict";c.r(e);var a=c(0),n=c(1),l=(c(2),c(5)),s=c.n(l),o=c(36),u=c(6),r=c(78);c(548),e.default=Object(r.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(o.useInnerBlockLayoutContext)(),{product:l}=Object(o.useProductDataContext)();return Object(u.isEmpty)(l.tags)?null:Object(a.createElement)("div",{className:s()(e,"wc-block-components-product-tag-list",{[c+"__product-tag-list"]:c})},Object(n.__)("Tags:","woo-gutenberg-products-block")," ",Object(a.createElement)("ul",null,Object.values(l.tags).map(t=>{let{name:e,link:c,slug:n}=t;return Object(a.createElement)("li",{key:"tag-list-item-"+n},Object(a.createElement)("a",{href:c},e))})))})},548:function(t,e){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/title-frontend.js b/build/atomic-block-components/title-frontend.js new file mode 100644 index 00000000000..61a7db7077e --- /dev/null +++ b/build/atomic-block-components/title-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[18],{156:function(e,t,o){"use strict";var n=o(18),l=o.n(n),c=o(0),a=o(25),r=o(5),i=o.n(r);o(191),t.a=e=>{let{className:t="",disabled:o=!1,name:n,permalink:r="",rel:s,style:u,onClick:d,...p}=e;const m=i()("wc-block-components-product-name",t);if(o){const e=p;return Object(c.createElement)("span",l()({className:m},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(n)}}))}return Object(c.createElement)("a",l()({className:m,href:r,rel:s},p,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(n)},style:u}))}},191:function(e,t){},315:function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o(202);var n=o(84);const l=()=>n.m>1},317:function(e,t){},387:function(e,t,o){"use strict";o.r(t);var n=o(134),l=o(0),c=o(5),a=o.n(c),r=o(65),i=o(201),s=o(315),u=o(156),d=o(42);o(317);const p=e=>{let{children:t,headingLevel:o,elementType:n="h"+o,...c}=e;return Object(l.createElement)(n,c,t)};var m=Object(n.withProductDataContext)(e=>{var t,o,n,c;let{className:m,headingLevel:b=2,showProductLink:v=!0,align:f,textColor:j,fontSize:O,style:h}=e;const{parentClassName:y}=Object(r.useInnerBlockLayoutContext)(),{product:g}=Object(r.useProductDataContext)(),{dispatchStoreEvent:k}=Object(d.a)(),w=Object(i.getColorClassName)("color",j),S=Object(i.getFontSizeClass)(O),C=a()("wp-block-woocommerce-product-title",{"has-text-color":j||(null==h||null===(t=h.color)||void 0===t?void 0:t.text)||(null==h?void 0:h.color),"has-font-size":O||(null==h||null===(o=h.typography)||void 0===o?void 0:o.fontSize)||(null==h?void 0:h.fontSize),[w]:w,[S]:S}),z={fontSize:(null==h?void 0:h.fontSize)||(null==h||null===(n=h.typography)||void 0===n?void 0:n.fontSize),color:(null==h||null===(c=h.color)||void 0===c?void 0:c.text)||(null==h?void 0:h.color)};return g.id?Object(l.createElement)(p,{headingLevel:b,className:a()(m,"wc-block-components-product-title",{[y+"__product-title"]:y,["wc-block-components-product-title--align-"+f]:f&&Object(s.a)()})},Object(l.createElement)(u.a,{className:a()({[C]:Object(s.a)()}),disabled:!v,name:g.name,permalink:g.permalink,rel:v?"nofollow":"",onClick:()=>{k("product-view-link",{product:g})},style:Object(s.a)()?z:{}})):Object(l.createElement)(p,{headingLevel:b,className:a()(m,"wc-block-components-product-title",{[y+"__product-title"]:y,["wc-block-components-product-title--align-"+f]:f&&Object(s.a)(),[C]:Object(s.a)()})})});let b={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(s.a)()&&(b={...b,align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}});var v=b;t.default=Object(n.withFilteredAttributes)(v)(m)}}]); \ No newline at end of file diff --git a/build/atomic-block-components/title.js b/build/atomic-block-components/title.js new file mode 100644 index 00000000000..0498cecc505 --- /dev/null +++ b/build/atomic-block-components/title.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{173:function(e,t,o){"use strict";var n=o(7),l=o.n(n),c=o(0),r=o(20),a=o(5),i=o.n(a);o(219),t.a=e=>{let{className:t="",disabled:o=!1,name:n,permalink:a="",rel:s,style:u,onClick:d,...b}=e;const p=i()("wc-block-components-product-name",t);if(o){const e=b;return Object(c.createElement)("span",l()({className:p},e,{dangerouslySetInnerHTML:{__html:Object(r.decodeEntities)(n)}}))}return Object(c.createElement)("a",l()({className:p,href:a,rel:s},b,{dangerouslySetInnerHTML:{__html:Object(r.decodeEntities)(n)},style:u}))}},219:function(e,t){},367:function(e,t,o){"use strict";var n=o(110);let l={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(n.b)()&&(l={...l,align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}),t.a=l},368:function(e,t,o){"use strict";var n=o(0),l=o(5),c=o.n(l),r=o(36),a=o(9),i=o(110),s=o(78),u=o(173),d=o(75);o(540);const b=e=>{let{children:t,headingLevel:o,elementType:l="h"+o,...c}=e;return Object(n.createElement)(l,c,t)};t.a=Object(s.withProductDataContext)(e=>{var t,o,l,s;let{className:p,headingLevel:m=2,showProductLink:v=!0,align:f,textColor:j,fontSize:O,style:h}=e;const{parentClassName:y}=Object(r.useInnerBlockLayoutContext)(),{product:g}=Object(r.useProductDataContext)(),{dispatchStoreEvent:k}=Object(d.a)(),w=Object(a.getColorClassName)("color",j),S=Object(a.getFontSizeClass)(O),C=c()("wp-block-woocommerce-product-title",{"has-text-color":j||(null==h||null===(t=h.color)||void 0===t?void 0:t.text)||(null==h?void 0:h.color),"has-font-size":O||(null==h||null===(o=h.typography)||void 0===o?void 0:o.fontSize)||(null==h?void 0:h.fontSize),[w]:w,[S]:S}),z={fontSize:(null==h?void 0:h.fontSize)||(null==h||null===(l=h.typography)||void 0===l?void 0:l.fontSize),color:(null==h||null===(s=h.color)||void 0===s?void 0:s.text)||(null==h?void 0:h.color)};return g.id?Object(n.createElement)(b,{headingLevel:m,className:c()(p,"wc-block-components-product-title",{[y+"__product-title"]:y,["wc-block-components-product-title--align-"+f]:f&&Object(i.b)()})},Object(n.createElement)(u.a,{className:c()({[C]:Object(i.b)()}),disabled:!v,name:g.name,permalink:g.permalink,rel:v?"nofollow":"",onClick:()=>{k("product-view-link",{product:g})},style:Object(i.b)()?z:{}})):Object(n.createElement)(b,{headingLevel:m,className:c()(p,"wc-block-components-product-title",{[y+"__product-title"]:y,["wc-block-components-product-title--align-"+f]:f&&Object(i.b)(),[C]:Object(i.b)()})})})},540:function(e,t){},902:function(e,t,o){"use strict";o.r(t);var n=o(78),l=o(368),c=o(367);t.default=Object(n.withFilteredAttributes)(c.a)(l.a)}}]); \ No newline at end of file diff --git a/build/attribute-filter-frontend.asset.php b/build/attribute-filter-frontend.asset.php new file mode 100644 index 00000000000..ab7f688cdeb --- /dev/null +++ b/build/attribute-filter-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'df8b91963056135409f3c5262e08a902'); \ No newline at end of file diff --git a/build/attribute-filter-frontend.js b/build/attribute-filter-frontend.js new file mode 100644 index 00000000000..d41a9919852 --- /dev/null +++ b/build/attribute-filter-frontend.js @@ -0,0 +1,29 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=214)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},105:function(e,t){e.exports=window.wp.components},108:function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{srcElement:t,size:n=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:n,height:n,...o}):null}},110:function(e,t){},124:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(2);const o=Object(r.getSetting)("attributes",[]).reduce((e,t)=>{const n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;var r;return n.id&&e.push(n),e},[]),i=e=>{if(e)return o.find(t=>t.id===e)},a=e=>{if(e)return o.find(t=>t.taxonomy===e)}},125:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(4);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const i=e.filter(e=>e.attribute===n.taxonomy),a=i.length?i[0]:null;if(!(a&&a.slug&&Array.isArray(a.slug)&&a.slug.includes(o)))return;const c=a.slug.filter(e=>e!==o),s=e.filter(e=>e.attribute!==n.taxonomy);c.length>0&&(a.slug=c.sort(),s.push(a)),t(Object(r.sortBy)(s,"attribute"))},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";const a=e.filter(e=>e.attribute!==n.taxonomy);0===o.length?t(a):(a.push({attribute:n.taxonomy,operator:i,slug:o.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(r.sortBy)(a,"attribute")))}},126:function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(5),a=n.n(i);n(144),t.a=e=>{let{className:t,onChange:n=(()=>{}),options:i=[],checked:c=[],isLoading:s=!1,isDisabled:u=!1,limit:l=10}=e;const[d,p]=Object(r.useState)(!1),f=Object(r.useMemo)(()=>[...Array(5)].map((e,t)=>Object(r.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),m=Object(r.useMemo)(()=>{const e=i.length-l;return!d&&Object(r.createElement)("li",{key:"show-more",className:"show-more"},Object(r.createElement)("button",{onClick:()=>{p(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)( +/* translators: %s is referring the remaining count of options */ +Object(o._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(o.sprintf)( +/* translators: %s number of options to reveal. */ +Object(o._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))},[i,l,d]),b=Object(r.useMemo)(()=>d&&Object(r.createElement)("li",{key:"show-less",className:"show-less"},Object(r.createElement)("button",{onClick:()=>{p(!1)},"aria-expanded":!0,"aria-label":Object(o.__)("Show less options","woo-gutenberg-products-block")},Object(o.__)("Show less","woo-gutenberg-products-block"))),[d]),g=Object(r.useMemo)(()=>{const e=i.length>l+5;return Object(r.createElement)(r.Fragment,null,i.map((t,o)=>Object(r.createElement)(r.Fragment,{key:t.value},Object(r.createElement)("li",e&&!d&&o>=l&&{hidden:!0},Object(r.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:e=>{n(e.target.value)},checked:c.includes(t.value),disabled:u}),Object(r.createElement)("label",{htmlFor:t.value},t.label)),e&&o===l-1&&m)),e&&b)},[i,n,c,d,l,b,m,u]),h=a()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":s},t);return Object(r.createElement)("ul",{className:h},s?f:g)}},138:function(e,t){},143:function(e,t){},144:function(e,t){},150:function(e,t,n){"use strict";e.exports=n(217)},162:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),o=n(98),i=n(4),a=n(33),c=n(59),s=n(82),u=n(43);const l=e=>{let{queryAttribute:t,queryPrices:n,queryStock:l,queryState:d}=e,p=Object(u.a)();p+="-collection-data";const[f]=Object(c.a)(p),[m,b]=Object(c.b)("calculate_attribute_counts",[],p),[g,h]=Object(c.b)("calculate_price_range",null,p),[v,y]=Object(c.b)("calculate_stock_status_counts",null,p),w=Object(a.a)(t||{}),O=Object(a.a)(n),j=Object(a.a)(l);Object(r.useEffect)(()=>{"object"==typeof w&&Object.keys(w).length&&(m.find(e=>e.taxonomy===w.taxonomy)||b([...m,w]))},[w,m,b]),Object(r.useEffect)(()=>{g!==O&&void 0!==O&&h(O)},[O,h,g]),Object(r.useEffect)(()=>{v!==j&&void 0!==j&&y(j)},[j,y,v]);const[E,I]=Object(r.useState)(!1),[_]=Object(o.a)(E,200);E||I(!0);const S=Object(r.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(i.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:n}=e;return{taxonomy:t,query_type:n}}),["taxonomy","query_type"])),t})(f),[f]);return Object(s.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...d,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...S},shouldSelect:_})}},17:function(e,t){e.exports=window.wp.isShallowEqual},18:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t{let{className:t,size:n,...r}=e;return Object(i.createElement)(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(i.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=c},2:function(e,t){e.exports=window.wc.wcSettings},203:function(e,t,n){"use strict";var r=n(18),o=n.n(r),i=n(0),a=n(5),c=n.n(a),s=n(1),u=n(108),l=n(198);n(138);var d=e=>{let{text:t,screenReaderText:n="",element:r="li",className:a="",radius:s="small",children:u=null,...l}=e;const d=r,p=c()(a,"wc-block-components-chip","wc-block-components-chip--radius-"+s),f=Boolean(n&&n!==t);return Object(i.createElement)(d,o()({className:p},l),Object(i.createElement)("span",{"aria-hidden":f,className:"wc-block-components-chip__text"},t),f&&Object(i.createElement)("span",{className:"screen-reader-text"},n),u)};t.a=e=>{let{ariaLabel:t="",className:n="",disabled:r=!1,onRemove:a=(()=>{}),removeOnAnyClick:p=!1,text:f,screenReaderText:m="",...b}=e;const g=p?"span":"button";if(!t){const e=m&&"string"==typeof m?m:f;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const h={"aria-label":t,disabled:r,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},v=p?h:{},y=p?{"aria-hidden":!0}:h;return Object(i.createElement)(d,o()({},b,v,{className:c()(n,"is-removable"),element:p?"button":b.element,screenReaderText:m,text:f}),Object(i.createElement)(g,o()({className:"wc-block-components-chip__remove"},y),Object(i.createElement)(u.a,{className:"wc-block-components-chip__remove-icon",srcElement:l.a,size:16})))}},214:function(e,t,n){e.exports=n(232)},215:function(e,t){},216:function(e,t){},217:function(e,t,n){"use strict";var r=60103,o=60106,i=60107,a=60108,c=60114,s=60109,u=60110,l=60112,d=60113,p=60120,f=60115,m=60116,b=60121,g=60122,h=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element"),o=w("react.portal"),i=w("react.fragment"),a=w("react.strict_mode"),c=w("react.profiler"),s=w("react.provider"),u=w("react.context"),l=w("react.forward_ref"),d=w("react.suspense"),p=w("react.suspense_list"),f=w("react.memo"),m=w("react.lazy"),b=w("react.block"),g=w("react.server.block"),h=w("react.fundamental"),v=w("react.debug_trace_mode"),y=w("react.legacy_hidden")}function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case c:case a:case d:case p:return e;default:switch(e=e&&e.$$typeof){case u:case l:case m:case f:case s:return e;default:return t}}case o:return t}}}var j=s,E=r,I=l,_=i,S=m,k=f,x=o,C=c,P=a,R=d;t.ContextConsumer=u,t.ContextProvider=j,t.Element=E,t.ForwardRef=I,t.Fragment=_,t.Lazy=S,t.Memo=k,t.Portal=x,t.Profiler=C,t.StrictMode=P,t.Suspense=R,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return O(e)===u},t.isContextProvider=function(e){return O(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return O(e)===l},t.isFragment=function(e){return O(e)===i},t.isLazy=function(e){return O(e)===m},t.isMemo=function(e){return O(e)===f},t.isPortal=function(e){return O(e)===o},t.isProfiler=function(e){return O(e)===c},t.isStrictMode=function(e){return O(e)===a},t.isSuspense=function(e){return O(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===c||e===v||e===a||e===d||e===p||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===s||e.$$typeof===u||e.$$typeof===l||e.$$typeof===h||e.$$typeof===b||e[0]===g)},t.typeOf=O},232:function(e,t,n){"use strict";n.r(t);var r=n(74),o=n(0),i=n(1),a=n(27),c=n(33),s=n(75),u=n(59),l=n(82),d=n(162),p=n(126),f=n(8),m=n.n(f),b=n(5),g=n.n(b);function h(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}function v(){return(v=Object.assign||function(e){for(var t=1;tt||i>e&&a=t&&c>=n?i-e-r:a>t&&cn?a-t+o:0}n(150);var S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&E>=0&&O<=f&&w<=p&&y>=A&&O<=N&&E>=H&&w<=D)return x;var B=getComputedStyle(P),L=parseInt(B.borderLeftWidth,10),V=parseInt(B.borderTopWidth,10),F=parseInt(B.borderRightWidth,10),K=parseInt(B.borderBottomWidth,10),q=0,U=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-L-F:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-K:0;if(u===P)q="start"===o?S:"end"===o?S-f:"nearest"===o?_(b,b+f,f,V,K,b+S,b+S+h,h):S-f/2,U="start"===i?k:"center"===i?k-p/2:"end"===i?k-p:_(m,m+p,p,L,F,m+k,m+k+v,v),q=Math.max(0,q+b),U=Math.max(0,U+m);else{q="start"===o?S-A-V:"end"===o?S-N+K+W:"nearest"===o?_(A,N,T,V,K+W,S,S+h,h):S-(A+T/2)+W/2,U="start"===i?k-H-L:"center"===i?k-(H+M/2)+$/2:"end"===i?k-D+F+$:_(H,D,M,L,F+$,k,k+v,v);var G=P.scrollLeft,Y=P.scrollTop;S+=Y-(q=Math.max(0,Math.min(Y+q,P.scrollHeight-T+W))),k+=G-(U=Math.max(0,Math.min(G+U,P.scrollWidth-M+$)))}x.push({el:P,top:q,left:U})}return x}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function R(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function T(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a1?n-1:0),o=1;o=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function F(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var c=K(e,a,n,r,o);return-1===c?t>=n?-1:t:c}function K(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a=0;c--)if(!r(c).hasAttribute("disabled"))return c;return o?e>0?K(1,0,n,r,!1):K(-1,n-1,n,r,!1):-1}function q(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(R(t,e,n)||r&&R(t,n.document.activeElement,n))}))}var U=T((function(e){W(e).textContent=""}),500);function $(e,t){var n=W(t);e&&(n.textContent=e,U(t))}function W(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var G=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),Y=["refKey","ref"],z=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],Q=["onKeyDown","onBlur","onChange","onInput","onChangeText"],X=["refKey","ref"],J=["onMouseMove","onMouseDown","onClick","onPress","index","item"],Z=function(){var e=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).id=n.props.id||"downshift-"+String(k++),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=B(t),n.internalSetState(v({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=B(t),n.internalSetState(v({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},a="function"==typeof e;return!a&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,v({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var c=a?e(t):e;c=n.props.stateReducer(t,c),r=c.hasOwnProperty("selectedItem");var s={},u={};return r&&c.selectedItem!==t.selectedItem&&(o=c.selectedItem),c.type=c.type||0,Object.keys(c).forEach((function(e){t[e]!==c[e]&&(i[e]=c[e]),"type"!==e&&(u[e]=c[e],L(n.props,e)||(s[e]=c[e]))})),a&&c.hasOwnProperty("inputValue")&&n.props.onInputValueChange(c.inputValue,v({},n.getStateAndHelpers(),c)),s}),(function(){x(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,c=o.ref,s=h(o,Y),u=(void 0===t?{}:t).suppressRefError,l=void 0!==u&&u;n.getRootProps.called=!0,n.getRootProps.refKey=a,n.getRootProps.suppressRefError=l;var d=n.getState().isOpen;return v(((r={})[a]=A(c,n.rootRef),r.role="combobox",r["aria-expanded"]=d,r["aria-haspopup"]="listbox",r["aria-owns"]=d?n.menuId:null,r["aria-labelledby"]=n.labelId,r),s)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=F(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=F(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset(v({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=v({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=v({},n.keyDownHandlers,{Home:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=K(1,0,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}}},End:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=K(-1,r-1,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:8})}}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick;t.onPress;var o=t.onKeyDown,i=t.onKeyUp,a=t.onBlur,c=h(t,z),s=n.getState().isOpen,u={onClick:M(r,n.buttonHandleClick),onKeyDown:M(o,n.buttonHandleKeyDown),onKeyUp:M(i,n.buttonHandleKeyUp),onBlur:M(a,n.buttonHandleBlur)};return v({type:"button",role:"button","aria-label":s?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},c.disabled?{}:u,c)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=V(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(y(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return v({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,a=t.onInput;t.onChangeText;var c,s=h(t,Q),u={},l=n.getState(),d=l.inputValue,p=l.isOpen,f=l.highlightedIndex;return s.disabled||((c={}).onChange=M(i,a,n.inputHandleChange),c.onKeyDown=M(r,n.inputHandleKeyDown),c.onBlur=M(o,n.inputHandleBlur),u=c),v({"aria-autocomplete":"list","aria-activedescendant":p&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":p?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:d,id:n.inputId},u,s)},n.inputHandleKeyDown=function(e){var t=V(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(y(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,c=o.ref,s=h(o,X),u=(void 0===t?{}:t).suppressRefError,l=void 0!==u&&u;return n.getMenuProps.called=!0,n.getMenuProps.refKey=a,n.getMenuProps.suppressRefError=l,v(((r={})[a]=A(c,n.menuRef),r.role="listbox",r["aria-labelledby"]=s&&s["aria-label"]?null:n.labelId,r.id=n.menuId,r),s)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,a=r.onClick;r.onPress;var c=r.index,s=r.item,u=void 0===s?void 0:s,l=h(r,J);void 0===c?(n.items.push(u),c=n.items.indexOf(u)):n.items[c]=u;var d=a,p=((t={onMouseMove:M(o,(function(){c!==n.getState().highlightedIndex&&(n.setHighlightedIndex(c,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:M(i,(function(e){e.preventDefault()}))}).onClick=M(d,(function(){n.selectItemAtIndex(c,{type:9})})),t),f=l.disabled?{onMouseDown:p.onMouseDown}:p;return v({id:n.getItemId(c),role:"option","aria-selected":n.getState().highlightedIndex===c},f,l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=B(e),n.internalSetState((function(t){var r=t.selectedItem;return v({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=B(e),n.internalSetState((function(t){var r=t.isOpen;return v({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),x(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=T((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(v({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,$(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,a=void 0===i?o:i,c=r.defaultIsOpen,s=r.initialIsOpen,u=void 0===s?c:s,l=r.initialInputValue,d=void 0===l?"":l,p=r.initialSelectedItem,f=void 0===p?null:p,m=n.getState({highlightedIndex:a,isOpen:u,inputValue:d,selectedItem:f});return null!=m.selectedItem&&void 0===n.props.initialInputValue&&(m.inputValue=n.props.itemToString(m.selectedItem)),n.state=m,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,w(t,n);var o=r.prototype;return o.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},o.getState=function(e){return void 0===e&&(e=this.state),t=e,n=this.props,Object.keys(t).reduce((function(e,r){return e[r]=L(n,r)?n[r]:t[r],e}),{});var t,n},o.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},o.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},o.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},o.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=F(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},o.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,a=this.id,c=this.getRootProps,s=this.getToggleButtonProps,u=this.getLabelProps,l=this.getMenuProps,d=this.getInputProps,p=this.getItemProps,f=this.openMenu,m=this.closeMenu,b=this.toggleMenu,g=this.selectItem,h=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,w=this.clearSelection,O=this.clearItems;return{getRootProps:c,getToggleButtonProps:s,getLabelProps:u,getMenuProps:l,getInputProps:d,getItemProps:p,reset:this.reset,openMenu:f,closeMenu:m,toggleMenu:b,selectItem:g,selectItemAtIndex:h,selectHighlightedItem:v,setHighlightedIndex:y,clearSelection:w,clearItems:O,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},o.componentDidMount=function(){var e=this,t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!q(t.target,[e._rootNode,e._menuNode],e.props.environment)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},i=function(t){var n=q(t.target,[e._rootNode,e._menuNode],e.props.environment,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},a=this.props.environment;a.addEventListener("mousedown",t),a.addEventListener("mouseup",n),a.addEventListener("touchstart",r),a.addEventListener("touchmove",o),a.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),a.removeEventListener("mousedown",t),a.removeEventListener("mouseup",n),a.removeEventListener("touchstart",r),a.removeEventListener("touchmove",o),a.removeEventListener("touchend",i)}},o.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},o.componentDidUpdate=function(e,t){L(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},o.componentWillUnmount=function(){this.cleanup()},o.render=function(){var e=N(this.props.children,C);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=N(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:function(e){return"string"==typeof e.type}(t)?Object(O.cloneElement)(t,this.getRootProps(function(e){return e.props}(t))):void 0:null},r}(O.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:D,itemToString:function(e){return null==e?"":String(e)},onStateChange:C,onInputValueChange:C,onUserAction:C,onChange:C,onSelect:C,onOuterClick:C,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:P},e.stateChangeTypes=G,e}();T((function(e,t){$(e(),t)}),200),"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?O.useLayoutEffect:O.useEffect;var ee={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:P,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};m.a.array.isRequired,m.a.func,m.a.func,m.a.func,m.a.bool,m.a.number,m.a.number,m.a.number,m.a.bool,m.a.bool,m.a.bool,m.a.any,m.a.any,m.a.any,m.a.string,m.a.string,m.a.string,m.a.func,m.a.string,m.a.func,m.a.func,m.a.func,m.a.func,m.a.func,m.a.shape({addEventListener:m.a.func,removeEventListener:m.a.func,document:m.a.shape({getElementById:m.a.func,activeElement:m.a.any,body:m.a.any})}),S(S({},ee),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}}),m.a.array.isRequired,m.a.func,m.a.func,m.a.func,m.a.bool,m.a.number,m.a.number,m.a.number,m.a.bool,m.a.bool,m.a.bool,m.a.any,m.a.any,m.a.any,m.a.string,m.a.string,m.a.string,m.a.string,m.a.string,m.a.string,m.a.func,m.a.string,m.a.string,m.a.func,m.a.func,m.a.func,m.a.func,m.a.func,m.a.func,m.a.shape({addEventListener:m.a.func,removeEventListener:m.a.func,document:m.a.shape({getElementById:m.a.func,activeElement:m.a.any,body:m.a.any})}),v({},ee,{getA11yStatusMessage:D,circularNavigation:!0}),m.a.array,m.a.array,m.a.array,m.a.func,m.a.func,m.a.func,m.a.number,m.a.number,m.a.number,m.a.func,m.a.func,m.a.string,m.a.string,m.a.shape({addEventListener:m.a.func,removeEventListener:m.a.func,document:m.a.shape({getElementById:m.a.func,activeElement:m.a.any,body:m.a.any})});var te=e=>{let{checked:t,getInputProps:n,inputRef:r,isDisabled:i,onFocus:a,onRemoveItem:c,placeholder:s,tabIndex:u,value:l}=e;return Object(o.createElement)("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:i,onFocus:a,onKeyDown(e){"Backspace"===e.key&&!l&&t.length>0&&c(t[t.length-1])},placeholder:s,tabIndex:u}))},ne=e=>{let{children:t,onClick:n}=e;return Object(o.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},re=e=>{let{checked:t,getItemProps:n,getMenuProps:r,highlightedIndex:a,options:c}=e;return Object(o.createElement)("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),c.map((e,r)=>{const c=t.includes(e.value);return Object(o.createElement)("li",n({key:e.value,className:g()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":c,"is-highlighted":a===r}),index:r,item:e.value,"aria-label":c?Object(i.sprintf)( +/* translators: %s is referring to the filter option being removed. */ +Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)}))},oe=n(203),ie=e=>{let{onRemoveItem:t,option:n}=e;return Object(o.createElement)(oe.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:()=>{t(n.value)},ariaLabel:Object(i.sprintf)( +/* translators: %s is referring to the filter option being removed. */ +Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},ae=n(108),ce=n(198),se=e=>{let{onClick:t,onRemoveItem:n,option:r}=e;const a=Object(o.useRef)(null);return Object(o.useEffect)(()=>{a.current.focus()},[a]),Object(o.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(o.createElement)("button",{ref:a,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:e=>{e.stopPropagation(),t(r.value)},"aria-label":Object(i.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(i.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:()=>{n(r.value)},onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(i.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},Object(o.createElement)(ae.a,{srcElement:ce.a,size:16})))};n(216);var ue=e=>{let{attributeLabel:t="",className:n,checked:r=[],inputLabel:a="",isDisabled:c=!1,isLoading:s=!1,multiple:u=!1,onChange:l=(()=>{}),options:d=[]}=e;const p=Object(o.useRef)(null),f=g()(n,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":c,"is-loading":s}),m=Object(o.useCallback)((e,t)=>{switch(t.type){case Z.stateChangeTypes.keyDownEnter:case Z.stateChangeTypes.clickItem:return{...t,highlightedIndex:e.highlightedIndex,isOpen:u,inputValue:""};case Z.stateChangeTypes.blurInput:case Z.stateChangeTypes.mouseUp:return{...t,inputValue:e.inputValue};default:return t}},[u]);return Object(o.createElement)(Z,{onChange:l,selectedItem:null,stateReducer:m},e=>{let{getInputProps:n,getItemProps:s,getLabelProps:m,getMenuProps:b,highlightedIndex:h,inputValue:v,isOpen:y,openMenu:w}=e;return Object(o.createElement)("div",{className:g()(f,{"is-multiple":u,"is-single":!u,"has-checked":r.length>0,"is-open":y})},Object(o.createElement)("label",m({className:"screen-reader-text"}),a),Object(o.createElement)(ne,{isOpen:y,onClick:()=>p.current.focus()},r.map(e=>{const t=d.find(t=>t.value===e),n=e=>{l(e),p.current.focus()};return u?Object(o.createElement)(ie,{key:e,onRemoveItem:n,option:t}):Object(o.createElement)(se,{key:e,onClick:()=>p.current.focus(),onRemoveItem:n,option:t})}),Object(o.createElement)(te,{checked:r,getInputProps:n,inputRef:p,isDisabled:c,onFocus:w,onRemoveItem:e=>{l(e),p.current.focus()},placeholder:r.length>0&&u?null:Object(i.sprintf)( +/* translators: %s attribute name. */ +Object(i.__)("Any %s","woo-gutenberg-products-block"),t),tabIndex:!u&&r.length>0?"-1":"0",value:v})),y&&!c&&Object(o.createElement)(re,{checked:r,getItemProps:s,getMenuProps:b,highlightedIndex:h,options:d.filter(e=>!v||e.value.startsWith(v))}))})},le=n(72),de=n(99),pe=n(17),fe=n.n(pe),me=n(25),be=n(105),ge=n(124),he=n(125);const ve=[{value:"preview-1",name:"Blue",label:Object(o.createElement)(le.a,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(o.createElement)(le.a,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(o.createElement)(le.a,{name:"Red",count:2})}],ye={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(215);Object(r.b)({selector:".wp-block-woocommerce-attribute-filter",Block:e=>{let{attributes:t,isEditor:n=!1}=e;const r=t.isPreview&&!t.attributeId?ye:Object(ge.a)(t.attributeId),[f,m]=Object(o.useState)([]),[b,g]=Object(o.useState)(t.isPreview&&!t.attributeId?ve:[]),[h]=Object(u.a)(),[v,y]=Object(u.b)("attributes",[]),{results:w,isLoading:O}=Object(l.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[(null==r?void 0:r.id)||0],shouldSelect:t.attributeId>0}),j="dropdown"!==t.displayStyle&&"and"===t.queryType,{results:E,isLoading:I}=Object(d.a)({queryAttribute:{taxonomy:null==r?void 0:r.taxonomy,queryType:t.queryType},queryState:{...h,attributes:j?h.attributes:null}}),_=Object(o.useCallback)(e=>E.attribute_counts?E.attribute_counts.find(t=>{let{term:n}=t;return n===e}):null,[E]);Object(o.useEffect)(()=>{if(O||I)return;const e=w.map(e=>{const n=_(e.id);if(!(n||f.includes(e.slug)||(i=e.slug,null!=h&&h.attributes&&h.attributes.some(e=>{let{attribute:t,slug:n=[]}=e;return t===r.taxonomy&&n.includes(i)}))))return null;var i;const a=n?n.count:0;return{value:e.slug,name:Object(me.decodeEntities)(e.name),label:Object(o.createElement)(le.a,{name:Object(me.decodeEntities)(e.name),count:t.showCounts?a:null})}}).filter(Boolean);g(e)},[null==r?void 0:r.taxonomy,w,O,t.showCounts,I,_,f,h.attributes]);const S=Object(o.useCallback)(e=>w.reduce((t,n)=>(e.includes(n.slug)&&t.push(n),t),[]),[w]),k=Object(o.useCallback)(e=>{n||Object(he.b)(v,y,r,S(e),"or"===t.queryType?"in":"and")},[n,v,y,r,S,t.queryType]),x=Object(o.useMemo)(()=>v.filter(e=>{let{attribute:t}=e;return t===(null==r?void 0:r.taxonomy)}).flatMap(e=>{let{slug:t}=e;return t}),[v,null==r?void 0:r.taxonomy]),C=Object(c.a)(x),P=Object(s.a)(C);Object(o.useEffect)(()=>{fe()(P,C)||fe()(f,C)||(m(C),t.showFilterButton||k(C))},[f,C,P,k,t.showFilterButton]);const R="dropdown"!==t.displayStyle||"or"===t.queryType,T=Object(o.useCallback)(e=>{const n=e=>{const{name:t}=b.find(t=>t.value===e);return t},r=e=>{let{filterAdded:t,filterRemoved:r}=e;const o=t?n(t):null,c=r?n(r):null;o&&c?Object(a.speak)(Object(i.sprintf)( +/* translators: %1$s and %2$s are attribute terms (for example: 'red', 'blue', 'large'...). */ +Object(i.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),o,c)):o?Object(a.speak)(Object(i.sprintf)( +/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */ +Object(i.__)("%s filter added.","woo-gutenberg-products-block"),o)):c&&Object(a.speak)(Object(i.sprintf)( +/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */ +Object(i.__)("%s filter removed.","woo-gutenberg-products-block"),c))},o=f.includes(e);let c;R?(c=f.filter(t=>t!==e),o?r({filterRemoved:e}):(c.push(e),c.sort(),r({filterAdded:e}))):(c=o?[]:[e],r({filterAdded:o?null:e,filterRemoved:1===f.length?f[0]:null})),m(c),t.showFilterButton||k(c)},[f,b,R,k,t.showFilterButton]);if(!r)return n?Object(o.createElement)(be.Notice,{status:"warning",isDismissible:!1},Object(o.createElement)("p",null,Object(i.__)("Please select an attribute to use this filter!","woo-gutenberg-products-block"))):null;if(0===b.length&&!O)return n?Object(o.createElement)(be.Notice,{status:"warning",isDismissible:!1},Object(o.createElement)("p",null,Object(i.__)("The selected attribute does not have any term assigned to products.","woo-gutenberg-products-block"))):null;const M="h"+t.headingLevel,A=!t.isPreview&&O,D=!t.isPreview&&I;return Object(o.createElement)(o.Fragment,null,!n&&t.heading&&b.length>0&&Object(o.createElement)(M,{className:"wc-block-attribute-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-attribute-filter style-"+t.displayStyle},"dropdown"===t.displayStyle?Object(o.createElement)(ue,{attributeLabel:r.label,checked:f,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:A,multiple:R,onChange:T,options:b}):Object(o.createElement)(p.a,{className:"wc-block-attribute-filter-list",options:b,checked:f,onChange:T,isLoading:A,isDisabled:D}),t.showFilterButton&&Object(o.createElement)(de.a,{className:"wc-block-attribute-filter__button",disabled:A||D,onClick:()=>k(f)})))},getProps:e=>({attributes:{attributeId:parseInt(e.dataset.attributeId||0,10),showCounts:"true"===e.dataset.showCounts,queryType:e.dataset.queryType,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3,displayStyle:e.dataset.displayStyle,showFilterButton:"true"===e.dataset.showFilterButton}})})},25:function(e,t){e.exports=window.wp.htmlEntities},27:function(e,t){e.exports=window.wp.a11y},29:function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},3:function(e,t){e.exports=window.React},32:function(e,t){e.exports=window.wp.primitives},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n(17),i=n.n(o);function a(e){const t=Object(r.useRef)(e);return i()(e,t.current)||(t.current=e),t.current}},34:function(e,t,n){"use strict";var r=n(29),o=n.n(r),i=n(0),a=n(3),c=n(1),s=n(84),u=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:n=Object(c.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(c.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(c.__)("Error:","woo-gutenberg-products-block"),button:u}=e;return Object(i.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(i.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(i.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},n&&Object(i.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},n),r&&Object(i.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(i.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),u&&Object(i.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},u)))};n(55);class l extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:n=!0,text:r,errorMessagePrefix:o,renderError:a,button:c}=this.props,{errorMessage:s,hasError:l}=this.state;return l?"function"==typeof a?a({errorMessage:s}):Object(i.createElement)(u,{errorMessage:n?s:null,header:e,imageUrl:t,text:r,errorMessagePrefix:o,button:c}):this.props.children}}t.a=l},37:function(e,t,n){"use strict";var r=n(0),o=n(5),i=n.n(o);t.a=e=>{let t,{label:n,screenReaderLabel:o,wrapperElement:a,wrapperProps:c={}}=e;const s=null!=n,u=null!=o;return!s&&u?(t=a||"span",c={...c,className:i()(c.className,"screen-reader-text")},Object(r.createElement)(t,c,o)):(t=a||r.Fragment,s&&u&&n!==o?Object(r.createElement)(t,c,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,c,n))}},4:function(e,t){e.exports=window.lodash},43:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);const o=Object(r.createContext)("page"),i=()=>Object(r.useContext)(o);o.Provider},5:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t{const t=Object(l.a)();e=e||t;const n=Object(o.useSelect)(t=>t(r.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:a}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[n,Object(i.useCallback)(t=>{a(e,t)},[e,a])]},p=(e,t,n)=>{const a=Object(l.a)();n=n||a;const c=Object(o.useSelect)(o=>o(r.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t),[n,e]),{setQueryValue:s}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[c,Object(i.useCallback)(t=>{s(n,e,t)},[n,e,s])]},f=(e,t)=>{const n=Object(l.a)();t=t||n;const[r,o]=d(t),a=Object(s.a)(r),p=Object(s.a)(e),f=Object(u.a)(p),m=Object(i.useRef)(!1);return Object(i.useEffect)(()=>{c()(f,p)||(o(Object.assign({},a,p)),m.current=!0)},[a,p,f,o]),m.current?[r,o]:[e,o]}},6:function(e,t){e.exports=window.wc.wcBlocksData},61:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t,n){var o=this,i=Object(r.useRef)(null),a=Object(r.useRef)(0),c=Object(r.useRef)(null),s=Object(r.useRef)([]),u=Object(r.useRef)(),l=Object(r.useRef)(),d=Object(r.useRef)(e),p=Object(r.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,g="maxWait"in n,h=g?Math.max(+n.maxWait||0,t):null;return Object(r.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(r.useMemo)((function(){var e=function(e){var t=s.current,n=u.current;return s.current=u.current=null,a.current=e,l.current=d.current.apply(n,t)},n=function(e,t){f&&cancelAnimationFrame(c.current),c.current=f?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!p.current)return!1;var n=e-i.current,r=e-a.current;return!i.current||n>=t||n<0||g&&r>=h},v=function(t){return c.current=null,b&&s.current?e(t):(s.current=u.current=null,l.current)},y=function(){var e=Date.now();if(r(e))return v(e);if(p.current){var o=e-i.current,c=e-a.current,s=t-o,u=g?Math.min(s,h-c):s;n(y,u)}},w=function(){for(var d=[],f=0;f{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},72:function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(37);n(143),t.a=e=>{let{name:t,count:n}=e;return Object(r.createElement)(r.Fragment,null,t,Number.isFinite(n)&&Object(r.createElement)(i.a,{label:n,screenReaderLabel:Object(o.sprintf)( +/* translators: %s number of products. */ +Object(o._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},74:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(18),o=n.n(r),i=n(0),a=n(34);const c=[".wp-block-woocommerce-cart"],s=e=>{let{Block:t,containers:n,getProps:r=(()=>({})),getErrorBoundaryProps:o=(()=>({}))}=e;0!==n.length&&Array.prototype.forEach.call(n,(e,n)=>{const i=r(e,n),a=o(e,n),c={...e.dataset,...i.attributes||{}};e.classList.remove("is-loading"),u({Block:t,container:e,props:i,attributes:c,errorBoundaryProps:a})})},u=e=>{let{Block:t,container:n,attributes:r={},props:c={},errorBoundaryProps:s={}}=e;Object(i.render)(Object(i.createElement)(a.a,s,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},Object(i.createElement)(t,o()({},c,{attributes:r})))),n)},l=e=>{const t=document.body.querySelectorAll(c.join(","));(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrappers:i}=e;const a=document.body.querySelectorAll(o);i.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),s({Block:t,containers:a,getProps:n,getErrorBoundaryProps:r})})({...e,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrapper:i}=e;const a=i.querySelectorAll(o);s({Block:t,containers:a,getProps:n,getErrorBoundaryProps:r})})({...e,wrapper:t})})})}},75:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t){const n=Object(r.useRef)();return Object(r.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},8:function(e,t,n){e.exports=n(56)()},82:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),o=n(9),i=n(0),a=n(33),c=n(64);const s=e=>{const{namespace:t,resourceName:n,resourceValues:s=[],query:u={},shouldSelect:l=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(i.useRef)({results:[],isLoading:!0}),p=Object(a.a)(u),f=Object(a.a)(s),m=Object(c.a)(),b=Object(o.useSelect)(e=>{if(!l)return null;const o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,p,f],a=o.getCollectionError(...i);return a&&m(a),{results:o.getCollection(...i),isLoading:!o.hasFinishedResolution("getCollection",i)}},[t,n,f,p,l]);return null!==b&&(d.current=b),d.current}},84:function(e,t,n){"use strict";n.d(t,"n",(function(){return i})),n.d(t,"l",(function(){return a})),n.d(t,"k",(function(){return c})),n.d(t,"m",(function(){return s})),n.d(t,"i",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"j",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"e",(function(){return m})),n.d(t,"g",(function(){return b})),n.d(t,"a",(function(){return g})),n.d(t,"h",(function(){return h})),n.d(t,"b",(function(){return v}));var r,o=n(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=i.pluginUrl+"images/",c=i.pluginUrl+"build/",s=i.buildPhase,u=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},9:function(e,t){e.exports=window.wp.data},98:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(3),o=n(61);function i(e,t){return e===t}function a(e){return"function"==typeof e?function(){return e}:e}function c(e,t,n){var c=n&&n.equalityFn||i,s=function(e){var t=Object(r.useState)(a(e)),n=t[0],o=t[1];return[n,Object(r.useCallback)((function(e){return o(a(e))}),[])]}(e),u=s[0],l=s[1],d=Object(o.a)(Object(r.useCallback)((function(e){return l(e)}),[l]),t,n),p=Object(r.useRef)(e);return c(p.current,e)||(d(e),p.current=e),[u,d]}},99:function(e,t,n){"use strict";var r=n(0),o=n(1),i=(n(8),n(5)),a=n.n(i),c=n(37);n(110);const s=e=>{let{className:t,disabled:n,label: +/* translators: Submit button text for filters. */ +i=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:s,screenReaderLabel:u=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(r.createElement)("button",{type:"submit",className:a()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:s},Object(r.createElement)(c.a,{label:i,screenReaderLabel:u}))};s.defaultProps={disabled:!1},t.a=s}}); \ No newline at end of file diff --git a/build/attribute-filter.asset.php b/build/attribute-filter.asset.php new file mode 100644 index 00000000000..bf997bcf2fe --- /dev/null +++ b/build/attribute-filter.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '4e076ca3c10912d3a79e1fca88bec3bf'); \ No newline at end of file diff --git a/build/attribute-filter.js b/build/attribute-filter.js new file mode 100644 index 00000000000..c96d4a022af --- /dev/null +++ b/build/attribute-filter.js @@ -0,0 +1,35 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var n,l,a=t[0],s=t[1],i=t[2],b=0,d=[];b{const t=Object(u.a)();e=e||t;const c=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:l}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(r.useCallback)(t=>{l(e,t)},[e,l])]},d=(e,t,c)=>{const l=Object(u.a)();c=c||l;const a=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:s}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[a,Object(r.useCallback)(t=>{s(c,e,t)},[c,e,s])]},p=(e,t)=>{const c=Object(u.a)();t=t||c;const[n,o]=b(t),l=Object(s.a)(n),d=Object(s.a)(e),p=Object(i.a)(d),m=Object(r.useRef)(!1);return Object(r.useEffect)(()=>{a()(p,d)||(o(Object.assign({},l,d)),m.current=!0)},[l,d,p,o]),m.current?[n,o]:[e,o]}},11:function(e,t){e.exports=window.wp.apiFetch},115:function(e,t){},116:function(e,t){e.exports=window.wp.coreData},117:function(e,t){},12:function(e,t){e.exports=window.wp.compose},121:function(e,t,c){"use strict";var n=c(0),o=c(6),r=c(1),l=c(4);function a(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(n.createElement)(l.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(l.Path,{d:c[t]})):null}class s extends n.Component{createLevelControl(e,t,c){const o=e===t;return{icon:Object(n.createElement)(a,{level:e}),title:Object(r.sprintf)( +/* translators: %s: heading level e.g: "2", "3", "4" */ +Object(r.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:o,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:r,onChange:s}=this.props;return Object(n.createElement)(l.ToolbarGroup,{isCollapsed:e,icon:Object(n.createElement)(a,{level:r}),controls:Object(o.range)(t,c).map(e=>this.createLevelControl(e,r,s))})}}t.a=s},126:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},128:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(37);c(330),t.a=e=>{let{name:t,count:c}=e;return Object(n.createElement)(n.Fragment,null,t,Number.isFinite(c)&&Object(n.createElement)(r.a,{label:c,screenReaderLabel:Object(o.sprintf)( +/* translators: %s number of products. */ +Object(o._n)("%s product","%s products",c,"woo-gutenberg-products-block"),c),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},13:function(e,t){e.exports=window.wp.url},14:function(e,t){e.exports=window.wp.blocks},140:function(e,t,c){"use strict";var n=c(0),o=(c(2),c(9)),r=c(12),l=c(1);c(194),t.a=Object(r.withInstanceId)(e=>{let{className:t,headingLevel:c,onChange:r,heading:a,instanceId:s}=e;const i="h"+c;return Object(n.createElement)(i,{className:t},Object(n.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+s},Object(l.__)("Block title","woo-gutenberg-products-block")),Object(n.createElement)(o.PlainText,{id:"block-title-"+s,className:"wc-block-editor-components-title",value:a,onChange:r}))})},142:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(8);function o(e,t){const c=Object(n.useRef)();return Object(n.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},149:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(19),o=c(10),r=c(0),l=c(52),a=c(126);const s=e=>{const{namespace:t,resourceName:c,resourceValues:s=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(r.useRef)({results:[],isLoading:!0}),d=Object(l.a)(i),p=Object(l.a)(s),m=Object(a.a)(),w=Object(o.useSelect)(e=>{if(!u)return null;const o=e(n.COLLECTIONS_STORE_KEY),r=[t,c,d,p],l=o.getCollectionError(...r);return l&&m(l),{results:o.getCollection(...r),isLoading:!o.hasFinishedResolution("getCollection",r)}},[t,c,p,d,u]);return null!==w&&(b.current=w),b.current}},161:function(e,t,c){"use strict";var n=c(0),o=c(18);const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(n.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(n.createElement)("g",{mask:"url(#external-mask)"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=r},179:function(e,t,c){"use strict";var n=c(0),o=c(1),r=(c(2),c(5)),l=c.n(r),a=c(37);c(241);const s=e=>{let{className:t,disabled:c,label: +/* translators: Submit button text for filters. */ +r=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:s,screenReaderLabel:i=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:l()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:c,onClick:s},Object(n.createElement)(a.a,{label:r,screenReaderLabel:i}))};s.defaultProps={disabled:!1},t.a=s},18:function(e,t){e.exports=window.wp.primitives},19:function(e,t){e.exports=window.wc.wcBlocksData},194:function(e,t){},195:function(e,t){},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},241:function(e,t){},246:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return l}));var n=c(3);const o=Object(n.getSetting)("attributes",[]).reduce((e,t)=>{const c=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;var n;return c.id&&e.push(c),e},[]),r=e=>{if(e)return o.find(t=>t.id===e)},l=e=>{if(e)return o.find(t=>t.taxonomy===e)}},247:function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return r}));var n=c(6);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},c=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const r=e.filter(e=>e.attribute===c.taxonomy),l=r.length?r[0]:null;if(!(l&&l.slug&&Array.isArray(l.slug)&&l.slug.includes(o)))return;const a=l.slug.filter(e=>e!==o),s=e.filter(e=>e.attribute!==c.taxonomy);a.length>0&&(l.slug=a.sort(),s.push(l)),t(Object(n.sortBy)(s,"attribute"))},r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},c=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";const l=e.filter(e=>e.attribute!==c.taxonomy);0===o.length?t(l):(l.push({attribute:c.taxonomy,operator:r,slug:o.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(n.sortBy)(l,"attribute")))}},248:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(5),l=c.n(r);c(332),t.a=e=>{let{className:t,onChange:c=(()=>{}),options:r=[],checked:a=[],isLoading:s=!1,isDisabled:i=!1,limit:u=10}=e;const[b,d]=Object(n.useState)(!1),p=Object(n.useMemo)(()=>[...Array(5)].map((e,t)=>Object(n.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),m=Object(n.useMemo)(()=>{const e=r.length-u;return!b&&Object(n.createElement)("li",{key:"show-more",className:"show-more"},Object(n.createElement)("button",{onClick:()=>{d(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)( +/* translators: %s is referring the remaining count of options */ +Object(o._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(o.sprintf)( +/* translators: %s number of options to reveal. */ +Object(o._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))},[r,u,b]),w=Object(n.useMemo)(()=>b&&Object(n.createElement)("li",{key:"show-less",className:"show-less"},Object(n.createElement)("button",{onClick:()=>{d(!1)},"aria-expanded":!0,"aria-label":Object(o.__)("Show less options","woo-gutenberg-products-block")},Object(o.__)("Show less","woo-gutenberg-products-block"))),[b]),g=Object(n.useMemo)(()=>{const e=r.length>u+5;return Object(n.createElement)(n.Fragment,null,r.map((t,o)=>Object(n.createElement)(n.Fragment,{key:t.value},Object(n.createElement)("li",e&&!b&&o>=u&&{hidden:!0},Object(n.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:e=>{c(e.target.value)},checked:a.includes(t.value),disabled:i}),Object(n.createElement)("label",{htmlFor:t.value},t.label)),e&&o===u-1&&m)),e&&w)},[r,c,a,b,u,w,m,i]),h=l()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":s},t);return Object(n.createElement)("ul",{className:h},s?p:g)}},256:function(e,t,c){"use strict";var n=c(7),o=c.n(n),r=c(0),l=c(5),a=c.n(l),s=c(1),i=c(55),u=c(331);c(195);var b=e=>{let{text:t,screenReaderText:c="",element:n="li",className:l="",radius:s="small",children:i=null,...u}=e;const b=n,d=a()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+s),p=Boolean(c&&c!==t);return Object(r.createElement)(b,o()({className:d},u),Object(r.createElement)("span",{"aria-hidden":p,className:"wc-block-components-chip__text"},t),p&&Object(r.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:n=!1,onRemove:l=(()=>{}),removeOnAnyClick:d=!1,text:p,screenReaderText:m="",...w}=e;const g=d?"span":"button";if(!t){const e=m&&"string"==typeof m?m:p;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const h={"aria-label":t,disabled:n,onClick:l,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||l()}},O=d?h:{},j=d?{"aria-hidden":!0}:h;return Object(r.createElement)(b,o()({},w,O,{className:a()(c,"is-removable"),element:d?"button":w.element,screenReaderText:m,text:p}),Object(r.createElement)(g,o()({className:"wc-block-components-chip__remove"},j),Object(r.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},31:function(e,t){e.exports=window.wp.isShallowEqual},330:function(e,t){},331:function(e,t,c){"use strict";var n=c(7),o=c.n(n),r=c(0),l=c(18);const a=Object(r.createElement)(e=>{let{className:t,size:c,...n}=e;return Object(r.createElement)(l.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},n),Object(r.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=a},332:function(e,t){},37:function(e,t,c){"use strict";var n=c(0),o=c(5),r=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:l,wrapperProps:a={}}=e;const s=null!=c,i=null!=o;return!s&&i?(t=l||"span",a={...a,className:r()(a.className,"screen-reader-text")},Object(n.createElement)(t,a,o)):(t=l||n.Fragment,s&&i&&c!==o?Object(n.createElement)(t,a,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,a,c))}},38:function(e,t){e.exports=window.wp.keycodes},4:function(e,t){e.exports=window.wp.components},45:function(e,t){e.exports=window.wp.hooks},488:function(e,t,c){"use strict";c.d(t,"a",(function(){return u}));var n=c(0),o=c(365),r=c(6),l=c(52),a=c(102),s=c(149),i=c(68);const u=e=>{let{queryAttribute:t,queryPrices:c,queryStock:u,queryState:b}=e,d=Object(i.a)();d+="-collection-data";const[p]=Object(a.a)(d),[m,w]=Object(a.b)("calculate_attribute_counts",[],d),[g,h]=Object(a.b)("calculate_price_range",null,d),[O,j]=Object(a.b)("calculate_stock_status_counts",null,d),f=Object(l.a)(t||{}),v=Object(l.a)(c),_=Object(l.a)(u);Object(n.useEffect)(()=>{"object"==typeof f&&Object.keys(f).length&&(m.find(e=>e.taxonomy===f.taxonomy)||w([...m,f]))},[f,m,w]),Object(n.useEffect)(()=>{g!==v&&void 0!==v&&h(v)},[v,h,g]),Object(n.useEffect)(()=>{O!==_&&void 0!==_&&j(_)},[_,j,O]);const[k,y]=Object(n.useState)(!1),[E]=Object(o.a)(k,200);k||y(!0);const x=Object(n.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(r.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:c}=e;return{taxonomy:t,query_type:c}}),["taxonomy","query_type"])),t})(p),[p]);return Object(s.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...b,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...x},shouldSelect:E})}},51:function(e,t){e.exports=window.wp.deprecated},52:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var n=c(0),o=c(31),r=c.n(o);function l(e){const t=Object(n.useRef)(e);return r()(e,t.current)||(t.current=e),t.current}},55:function(e,t,c){"use strict";var n=c(0);t.a=function(e){let{srcElement:t,size:c=24,...o}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:c,height:c,...o}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},62:function(e,t){e.exports=window.wp.a11y},64:function(e,t){e.exports=window.regeneratorRuntime},68:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0);const o=Object(n.createContext)("page"),r=()=>Object(n.useContext)(o);o.Provider},787:function(e,t,c){e.exports=c(850)},788:function(e,t,c){"use strict";var n=c(0),o=c(18);const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"}));t.a=r},789:function(e,t){},79:function(e,t){e.exports=window.ReactDOM},790:function(e,t){},791:function(e,t){},8:function(e,t){e.exports=window.React},80:function(e,t,c){"use strict";var n=c(7),o=c.n(n),r=c(0),l=c(6),a=c(5),s=c.n(a),i=c(4),u=c(12);c(117);class b extends r.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:c,className:n,help:a,options:u,value:b}=this.props,d="inspector-toggle-button-control-"+c;let p;return a&&(p=Object(l.isFunction)(a)?a(t):a),Object(r.createElement)(i.BaseControl,{id:d,help:p,className:s()("components-toggle-button-control",n)},Object(r.createElement)("label",{id:d+"__label",htmlFor:d,className:"components-toggle-button-control__label"},e),Object(r.createElement)(i.ButtonGroup,{"aria-labelledby":d+"__label"},u.map((t,c)=>{const n={};return b===t.value?(n.isPrimary=!0,n["aria-pressed"]=!0):(n.isSecondary=!0,n["aria-pressed"]=!1),Object(r.createElement)(i.Button,o()({key:`${t.label}-${t.value}-${c}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},n),t.label)})))}}t.a=Object(u.withInstanceId)(b)},82:function(e,t){e.exports=window.wp.viewport},850:function(e,t,c){"use strict";c.r(t);var n=c(7),o=c.n(n),r=c(0),l=c(1),a=c(14),s=c(55),i=c(788),u=c(5),b=c.n(u),d=c(9),p=c(4),m=c(161),w=c(40),g=c(6),h=c(3),O=c(121),j=c(140),f=c(80),v=c(62),_=c(52),k=c(142),y=c(102),E=c(149),x=c(488),C=c(248),S=(c(2),c(218)),N=e=>{let{checked:t,getInputProps:c,inputRef:n,isDisabled:o,onFocus:l,onRemoveItem:a,placeholder:s,tabIndex:i,value:u}=e;return Object(r.createElement)("input",c({ref:n,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:o,onFocus:l,onKeyDown(e){"Backspace"===e.key&&!u&&t.length>0&&a(t[t.length-1])},placeholder:s,tabIndex:i}))},P=e=>{let{children:t,onClick:c}=e;return Object(r.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:c},t)},R=e=>{let{checked:t,getItemProps:c,getMenuProps:n,highlightedIndex:o,options:a}=e;return Object(r.createElement)("ul",n({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),a.map((e,n)=>{const a=t.includes(e.value);return Object(r.createElement)("li",c({key:e.value,className:b()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":a,"is-highlighted":o===n}),index:n,item:e.value,"aria-label":a?Object(l.sprintf)( +/* translators: %s is referring to the filter option being removed. */ +Object(l.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)}))},L=c(256),T=e=>{let{onRemoveItem:t,option:c}=e;return Object(r.createElement)(L.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:()=>{t(c.value)},ariaLabel:Object(l.sprintf)( +/* translators: %s is referring to the filter option being removed. */ +Object(l.__)("Remove %s filter","woo-gutenberg-products-block"),c.name),text:c.label,radius:"large"})},I=c(331),B=e=>{let{onClick:t,onRemoveItem:c,option:n}=e;const o=Object(r.useRef)(null);return Object(r.useEffect)(()=>{o.current.focus()},[o]),Object(r.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(r.createElement)("button",{ref:o,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:e=>{e.stopPropagation(),t(n.value)},"aria-label":Object(l.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(l.__)("Replace current %s filter","woo-gutenberg-products-block"),n.name)},n.label),Object(r.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:()=>{c(n.value)},onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||c(n.value)},"aria-label":Object(l.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(l.__)("Remove %s filter","woo-gutenberg-products-block"),n.name)},Object(r.createElement)(s.a,{srcElement:I.a,size:16})))};c(791);var V=e=>{let{attributeLabel:t="",className:c,checked:n=[],inputLabel:o="",isDisabled:a=!1,isLoading:s=!1,multiple:i=!1,onChange:u=(()=>{}),options:d=[]}=e;const p=Object(r.useRef)(null),m=b()(c,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":a,"is-loading":s}),w=Object(r.useCallback)((e,t)=>{switch(t.type){case S.a.stateChangeTypes.keyDownEnter:case S.a.stateChangeTypes.clickItem:return{...t,highlightedIndex:e.highlightedIndex,isOpen:i,inputValue:""};case S.a.stateChangeTypes.blurInput:case S.a.stateChangeTypes.mouseUp:return{...t,inputValue:e.inputValue};default:return t}},[i]);return Object(r.createElement)(S.a,{onChange:u,selectedItem:null,stateReducer:w},e=>{let{getInputProps:c,getItemProps:s,getLabelProps:w,getMenuProps:g,highlightedIndex:h,inputValue:O,isOpen:j,openMenu:f}=e;return Object(r.createElement)("div",{className:b()(m,{"is-multiple":i,"is-single":!i,"has-checked":n.length>0,"is-open":j})},Object(r.createElement)("label",w({className:"screen-reader-text"}),o),Object(r.createElement)(P,{isOpen:j,onClick:()=>p.current.focus()},n.map(e=>{const t=d.find(t=>t.value===e),c=e=>{u(e),p.current.focus()};return i?Object(r.createElement)(T,{key:e,onRemoveItem:c,option:t}):Object(r.createElement)(B,{key:e,onClick:()=>p.current.focus(),onRemoveItem:c,option:t})}),Object(r.createElement)(N,{checked:n,getInputProps:c,inputRef:p,isDisabled:a,onFocus:f,onRemoveItem:e=>{u(e),p.current.focus()},placeholder:n.length>0&&i?null:Object(l.sprintf)( +/* translators: %s attribute name. */ +Object(l.__)("Any %s","woo-gutenberg-products-block"),t),tabIndex:!i&&n.length>0?"-1":"0",value:O})),j&&!a&&Object(r.createElement)(R,{checked:n,getItemProps:s,getMenuProps:g,highlightedIndex:h,options:d.filter(e=>!O||e.value.startsWith(O))}))})},F=c(128),M=c(179),A=c(31),H=c.n(A),z=c(20),D=c(246),q=c(247);const G=[{value:"preview-1",name:"Blue",label:Object(r.createElement)(F.a,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(r.createElement)(F.a,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(r.createElement)(F.a,{name:"Red",count:2})}],Y={id:0,name:"preview",taxonomy:"preview",label:"Preview"};c(790);var K=e=>{let{attributes:t,isEditor:c=!1}=e;const n=t.isPreview&&!t.attributeId?Y:Object(D.a)(t.attributeId),[o,a]=Object(r.useState)([]),[s,i]=Object(r.useState)(t.isPreview&&!t.attributeId?G:[]),[u]=Object(y.a)(),[b,d]=Object(y.b)("attributes",[]),{results:m,isLoading:w}=Object(E.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[(null==n?void 0:n.id)||0],shouldSelect:t.attributeId>0}),g="dropdown"!==t.displayStyle&&"and"===t.queryType,{results:h,isLoading:O}=Object(x.a)({queryAttribute:{taxonomy:null==n?void 0:n.taxonomy,queryType:t.queryType},queryState:{...u,attributes:g?u.attributes:null}}),j=Object(r.useCallback)(e=>h.attribute_counts?h.attribute_counts.find(t=>{let{term:c}=t;return c===e}):null,[h]);Object(r.useEffect)(()=>{if(w||O)return;const e=m.map(e=>{const c=j(e.id);if(!(c||o.includes(e.slug)||(l=e.slug,null!=u&&u.attributes&&u.attributes.some(e=>{let{attribute:t,slug:c=[]}=e;return t===n.taxonomy&&c.includes(l)}))))return null;var l;const a=c?c.count:0;return{value:e.slug,name:Object(z.decodeEntities)(e.name),label:Object(r.createElement)(F.a,{name:Object(z.decodeEntities)(e.name),count:t.showCounts?a:null})}}).filter(Boolean);i(e)},[null==n?void 0:n.taxonomy,m,w,t.showCounts,O,j,o,u.attributes]);const f=Object(r.useCallback)(e=>m.reduce((t,c)=>(e.includes(c.slug)&&t.push(c),t),[]),[m]),S=Object(r.useCallback)(e=>{c||Object(q.b)(b,d,n,f(e),"or"===t.queryType?"in":"and")},[c,b,d,n,f,t.queryType]),N=Object(r.useMemo)(()=>b.filter(e=>{let{attribute:t}=e;return t===(null==n?void 0:n.taxonomy)}).flatMap(e=>{let{slug:t}=e;return t}),[b,null==n?void 0:n.taxonomy]),P=Object(_.a)(N),R=Object(k.a)(P);Object(r.useEffect)(()=>{H()(R,P)||H()(o,P)||(a(P),t.showFilterButton||S(P))},[o,P,R,S,t.showFilterButton]);const L="dropdown"!==t.displayStyle||"or"===t.queryType,T=Object(r.useCallback)(e=>{const c=e=>{const{name:t}=s.find(t=>t.value===e);return t},n=e=>{let{filterAdded:t,filterRemoved:n}=e;const o=t?c(t):null,r=n?c(n):null;o&&r?Object(v.speak)(Object(l.sprintf)( +/* translators: %1$s and %2$s are attribute terms (for example: 'red', 'blue', 'large'...). */ +Object(l.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),o,r)):o?Object(v.speak)(Object(l.sprintf)( +/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */ +Object(l.__)("%s filter added.","woo-gutenberg-products-block"),o)):r&&Object(v.speak)(Object(l.sprintf)( +/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */ +Object(l.__)("%s filter removed.","woo-gutenberg-products-block"),r))},r=o.includes(e);let i;L?(i=o.filter(t=>t!==e),r?n({filterRemoved:e}):(i.push(e),i.sort(),n({filterAdded:e}))):(i=r?[]:[e],n({filterAdded:r?null:e,filterRemoved:1===o.length?o[0]:null})),a(i),t.showFilterButton||S(i)},[o,s,L,S,t.showFilterButton]);if(!n)return c?Object(r.createElement)(p.Notice,{status:"warning",isDismissible:!1},Object(r.createElement)("p",null,Object(l.__)("Please select an attribute to use this filter!","woo-gutenberg-products-block"))):null;if(0===s.length&&!w)return c?Object(r.createElement)(p.Notice,{status:"warning",isDismissible:!1},Object(r.createElement)("p",null,Object(l.__)("The selected attribute does not have any term assigned to products.","woo-gutenberg-products-block"))):null;const I="h"+t.headingLevel,B=!t.isPreview&&w,A=!t.isPreview&&O;return Object(r.createElement)(r.Fragment,null,!c&&t.heading&&s.length>0&&Object(r.createElement)(I,{className:"wc-block-attribute-filter__title"},t.heading),Object(r.createElement)("div",{className:"wc-block-attribute-filter style-"+t.displayStyle},"dropdown"===t.displayStyle?Object(r.createElement)(V,{attributeLabel:n.label,checked:o,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:B,multiple:L,onChange:T,options:s}):Object(r.createElement)(C.a,{className:"wc-block-attribute-filter-list",options:s,checked:o,onChange:T,isLoading:B,isDisabled:A}),t.showFilterButton&&Object(r.createElement)(M.a,{className:"wc-block-attribute-filter__button",disabled:B||A,onClick:()=>S(o)})))};c(789);const Q=Object(h.getSetting)("attributes",[]);var U=Object(p.withSpokenMessages)(e=>{let{attributes:t,setAttributes:c,debouncedSpeak:n}=e;const{attributeId:o,className:a,displayStyle:u,heading:b,headingLevel:v,isPreview:_,queryType:k,showCounts:y,showFilterButton:E}=t,[x,C]=Object(r.useState)(!o&&!_),S=e=>{if(!e||!e.length)return;const t=e[0].id,n=Q.find(e=>e.attribute_id===t.toString());if(!n||o===t)return;const r=n.attribute_label;c({attributeId:t,heading:Object(l.sprintf)( +/* translators: %s attribute name. */ +Object(l.__)("Filter by %s","woo-gutenberg-products-block"),r)})},N=e=>{let{isCompact:t}=e;const c={clear:Object(l.__)("Clear selected attribute","woo-gutenberg-products-block"),list:Object(l.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(l.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(l.__)("Search for a product attribute:","woo-gutenberg-products-block"),selected:e=>Object(l.sprintf)( +/* translators: %d is the number of attributes selected. */ +Object(l._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e),updated:Object(l.__)("Product attribute search results updated.","woo-gutenberg-products-block")},n=Object(g.sortBy)(Object(g.toArray)(Object(g.mapValues)(Q,e=>({id:parseInt(e.attribute_id,10),name:e.attribute_label}))),"name");return Object(r.createElement)(w.b,{className:"woocommerce-product-attributes",list:n,selected:n.filter(e=>{let{id:t}=e;return t===o}),onChange:S,messages:c,isSingle:!0,isCompact:t})};return 0===Object.keys(Q).length?Object(r.createElement)(p.Placeholder,{className:"wc-block-attribute-filter",icon:Object(r.createElement)(s.a,{srcElement:i.a}),label:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(l.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(r.createElement)("p",null,Object(l.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woo-gutenberg-products-block")),Object(r.createElement)(p.Button,{className:"wc-block-attribute-filter__add-attribute-button",isSecondary:!0,href:Object(h.getAdminLink)("edit.php?post_type=product&page=product_attributes")},Object(l.__)("Add new attribute","woo-gutenberg-products-block")+" ",Object(r.createElement)(s.a,{srcElement:m.a})),Object(r.createElement)(p.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(l.__)("Learn more","woo-gutenberg-products-block"))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(d.BlockControls,null,Object(r.createElement)(p.ToolbarGroup,{controls:[{icon:"edit",title:Object(l.__)("Edit","woo-gutenberg-products-block"),onClick:()=>C(!x),isActive:x}]})),Object(r.createElement)(d.InspectorControls,{key:"inspector"},Object(r.createElement)(p.PanelBody,{title:Object(l.__)("Content","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(l.__)("Product count","woo-gutenberg-products-block"),help:y?Object(l.__)("Product count is visible.","woo-gutenberg-products-block"):Object(l.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:y,onChange:()=>c({showCounts:!y})}),Object(r.createElement)("p",null,Object(l.__)("Heading Level","woo-gutenberg-products-block")),Object(r.createElement)(O.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:v,onChange:e=>c({headingLevel:e})})),Object(r.createElement)(p.PanelBody,{title:Object(l.__)("Block Settings","woo-gutenberg-products-block")},Object(r.createElement)(f.a,{label:Object(l.__)("Query Type","woo-gutenberg-products-block"),help:"and"===k?Object(l.__)("Products that have all of the selected attributes will be shown.","woo-gutenberg-products-block"):Object(l.__)("Products that have any of the selected attributes will be shown.","woo-gutenberg-products-block"),value:k,options:[{label:Object(l.__)("And","woo-gutenberg-products-block"),value:"and"},{label:Object(l.__)("Or","woo-gutenberg-products-block"),value:"or"}],onChange:e=>c({queryType:e})}),Object(r.createElement)(f.a,{label:Object(l.__)("Display Style","woo-gutenberg-products-block"),value:u,options:[{label:Object(l.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(l.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:e=>c({displayStyle:e})}),Object(r.createElement)(p.ToggleControl,{label:Object(l.__)("Filter button","woo-gutenberg-products-block"),help:E?Object(l.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(l.__)("Products will update as options are selected.","woo-gutenberg-products-block"),checked:E,onChange:e=>c({showFilterButton:e})})),Object(r.createElement)(p.PanelBody,{title:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),initialOpen:!1},N({isCompact:!0}))),x?Object(r.createElement)(p.Placeholder,{className:"wc-block-attribute-filter",icon:Object(r.createElement)(s.a,{srcElement:i.a}),label:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(l.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(r.createElement)("div",{className:"wc-block-attribute-filter__selection"},N({isCompact:!1}),Object(r.createElement)(p.Button,{isPrimary:!0,onClick:()=>{C(!1),n(Object(l.__)("Showing Filter Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(l.__)("Done","woo-gutenberg-products-block")))):Object(r.createElement)("div",{className:a},Object(r.createElement)(j.a,{className:"wc-block-attribute-filter__title",headingLevel:v,heading:b,onChange:e=>c({heading:e})}),Object(r.createElement)(p.Disabled,null,Object(r.createElement)(K,{attributes:t,isEditor:!0}))))});Object(a.registerBlockType)("woocommerce/attribute-filter",{title:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(s.a,{srcElement:i.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(l.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(l.__)("Allow customers to filter the grid by product attribute, such as color. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1},example:{attributes:{isPreview:!0}},attributes:{attributeId:{type:"number",default:0},showCounts:{type:"boolean",default:!0},queryType:{type:"string",default:"or"},heading:{type:"string",default:Object(l.__)("Filter by attribute","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3},displayStyle:{type:"string",default:"list"},showFilterButton:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:U,save(e){let{attributes:t}=e;const{className:c,showCounts:n,queryType:l,attributeId:a,heading:s,headingLevel:i,displayStyle:u,showFilterButton:d}=t,p={"data-attribute-id":a,"data-show-counts":n,"data-query-type":l,"data-heading":s,"data-heading-level":i};return"list"!==u&&(p["data-display-style"]=u),d&&(p["data-show-filter-button"]=d),Object(r.createElement)("div",o()({className:b()("is-loading",c)},p),Object(r.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"}))}})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/blocks-checkout.asset.php b/build/blocks-checkout.asset.php new file mode 100644 index 00000000000..da91a3a6d42 --- /dev/null +++ b/build/blocks-checkout.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-warning'), 'version' => '59f3dc06e11e961a2948126b51439981'); \ No newline at end of file diff --git a/build/blocks-checkout.js b/build/blocks-checkout.js new file mode 100644 index 00000000000..d8a8d8012ed --- /dev/null +++ b/build/blocks-checkout.js @@ -0,0 +1,5 @@ +this.wc=this.wc||{},this.wc.blocksCheckout=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=141)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},11:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));var r=n(1);const o="wc/store/cart",i={code:"cart_api_error",message:Object(r.__)("Unable to get cart data from the API.","woo-gutenberg-products-block"),data:{status:500}}},12:function(e,t){e.exports=window.wp.compose},13:function(e,t){e.exports=window.React},133:function(e,t){},134:function(e,t){},135:function(e,t){},136:function(e,t){},137:function(e,t){},138:function(e,t){},139:function(e,t){},14:function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},140:function(e,t){},141:function(e,t,n){"use strict";n.r(t),n.d(t,"TotalsItem",(function(){return D})),n.d(t,"Subtotal",(function(){return M})),n.d(t,"TotalsTaxes",(function(){return B})),n.d(t,"TotalsFees",(function(){return L})),n.d(t,"TotalsWrapper",(function(){return V})),n.d(t,"ExperimentalOrderMeta",(function(){return He})),n.d(t,"ExperimentalDiscountsMeta",(function(){return Ke})),n.d(t,"ExperimentalOrderShippingPackages",(function(){return Ye})),n.d(t,"Panel",(function(){return Xe})),n.d(t,"Button",(function(){return Vt})),n.d(t,"Label",(function(){return Ut})),n.d(t,"CheckboxControl",(function(){return Wt})),n.d(t,"mustContain",(function(){return Ht})),n.d(t,"extensionCartUpdate",(function(){return Kt})),n.d(t,"hasValidFills",(function(){return Be})),n.d(t,"useSlot",(function(){return Le})),n.d(t,"createSlotFill",(function(){return Ve})),n.d(t,"__experimentalRegisterCheckoutFilters",(function(){return Yt})),n.d(t,"__experimentalApplyCheckoutFilter",(function(){return Zt})),n.d(t,"hasInnerBlocks",(function(){return Xt})),n.d(t,"getRegisteredBlocks",(function(){return en})),n.d(t,"registerCheckoutBlock",(function(){return rn})),n.d(t,"innerBlockAreas",(function(){return Jt})),n.d(t,"SlotFillProvider",(function(){return Se}));var r=n(0),o=n(3),i=n.n(o),c=n(9),a=n.n(c),u=n(13),s=n.n(u);function l(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),i=o[0],c=o[1]||"";return{beforeDecimal:i,afterDecimal:c,hasNagation:n,addNegation:r}}function S(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function E(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function k(e,t,n){return Math.min(Math.max(e,t),n)}function x(e){return Math.max(e.selectionStart,e.selectionEnd)}var P={thousandSeparator:v.oneOfType([v.string,v.oneOf([!0])]),decimalSeparator:v.string,allowedDecimalSeparators:v.arrayOf(v.string),thousandsGroupStyle:v.oneOf(["thousand","lakh","wan"]),decimalScale:v.number,fixedDecimalScale:v.bool,displayType:v.oneOf(["input","text"]),prefix:v.string,suffix:v.string,format:v.oneOfType([v.string,v.func]),removeFormatting:v.func,mask:v.oneOfType([v.string,v.arrayOf(v.string)]),value:v.oneOfType([v.number,v.string]),defaultValue:v.oneOfType([v.number,v.string]),isNumericString:v.bool,customInput:v.elementType,allowNegative:v.bool,allowEmptyFormatting:v.bool,allowLeadingZeros:v.bool,onValueChange:v.func,onKeyDown:v.func,onMouseUp:v.func,onChange:v.func,onFocus:v.func,onBlur:v.func,type:v.oneOf(["text","tel","password"]),isAllowed:v.func,renderText:v.func,getInputRef:v.oneOfType([v.func,v.shape({current:v.any})])},F={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:g,onChange:g,onKeyDown:g,onMouseUp:g,onFocus:g,onBlur:g,isAllowed:function(){return!0}},C=function(e){function t(e){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=!(r=p(t).call(this,e))||"object"!=typeof r&&"function"!=typeof r?m(this):r;var o=e.defaultValue;n.validateProps();var i=n.formatValueProp(o);return n.state={value:i,numAsString:n.removeFormatting(i)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(m(n)),n.onKeyDown=n.onKeyDown.bind(m(n)),n.onMouseUp=n.onMouseUp.bind(m(n)),n.onFocus=n.onFocus.bind(m(n)),n.onBlur=n.onBlur.bind(m(n)),n}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,i=n.numAsString,c=void 0===i?"":i;if(e!==t){this.validateProps();var a=this.formatNumString(c),u=O(t.value)?a:this.formatValueProp(),s=this.removeFormatting(u),l=parseFloat(s),f=parseFloat(c);(isNaN(l)&&isNaN(f)||l===f)&&a===o&&(null!==r||u===o)||this.updateValue({formattedValue:u,numAsString:s,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),i="-"===e[0];i&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var c=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==c&&(e="".concat(e.substring(0,c),".").concat(e.substring(c+1,e.length).replace(new RegExp(w(r),"g"),""))),i&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,i=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!i||0===o||t||r?"":"|"+w(i)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){E(e,t),setTimeout((function(){e.value===n&&E(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,i=r.suffix,c=r.format;if(""===e)return 0;if(t=k(t,0,e.length),!c){var a="-"===e[0];return k(t,o.length+(a?1:0),e.length-i.length)}if("function"==typeof c)return t;if("#"===c[t]&&y(e[t]))return t;if("#"===c[t-1]&&y(e[t-1]))return t;var u=c.indexOf("#");t=k(t,u,c.lastIndexOf("#")+1);for(var s=c.substring(t,c.length).indexOf("#"),l=t,f=t+(-1===s?0:s);l>u&&("#"!==c[l]||!y(e[l]));)l-=1;return!y(e[f])||"left"===n&&t!==u||t-l0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,i=t.allowEmptyFormatting,c=this.props,a=c.value,u=c.isNumericString,s=!(a=O(a)?e:a)&&0!==a;return s&&i&&(a=""),s&&!i?"":("number"==typeof a&&(a=a.toString(),u=!0),"Infinity"===a&&u&&(a=""),u&&!n&&"number"==typeof r&&(a=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=j(e),i=o.beforeDecimal,c=o.afterDecimal,a=o.hasNagation,u=parseFloat("0.".concat(c||"0")).toFixed(t).split("."),s=i.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),l=S(u[1]||"",Math.min(t,c.length),n),f=r?".":"";return"".concat(a?"-":"").concat(s).concat(f).concat(l)}(a,r,o)),u?this.formatNumString(a):this.formatInput(a))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,i=n.suffix,c=n.decimalScale,a=n.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e=t.length-i.length||c&&a&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;rn&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),v=b.start,g=b.end;if(!o&&v===g&&-1!==l.indexOf(n[m])){var y=0===u?"":f;return n.substr(0,m)+y+n.substr(m+1,n.length)}var O=o?0:c.length,w=t.length-(o?0:a.length);if(n.length>t.length||!n.length||v===g||0===m&&h===t.length||m===O&&h===w)return n;if(this.checkIfFormatGotDeleted(v,g,t)&&(n=t),!o){var S=this.removeFormatting(n),E=j(S,i),k=E.beforeDecimal,x=E.afterDecimal,P=E.addNegation,F=eO;)y--;y=this.correctCaretPosition(a,y,"left")}}else for(;!b.test(a[y])&&yw)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,a)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,a),m(e)}else m(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,i=void 0===o?"":o;if(n===r){var c=this.correctCaretPosition(i,n);c!==n&&this.setPatchedCaretPosition(t,c,i)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,i=n.value,c=void 0===i?"":i,a=t.correctCaretPosition(c,r);a===r||0===r&&o===c.length||t.setPatchedCaretPosition(n,a,c),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.type,i=r.displayType,c=r.customInput,a=r.renderText,u=r.getInputRef,l=r.format,p=this.state.value,d=(e=this.props,t=P,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),m=f({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(l)?"numeric":void 0},d,{type:o,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===i)return a?a(p)||null:s.a.createElement("span",f({},d,{ref:u}),p);if(c){var h=c;return s.a.createElement(h,f({},m,{ref:u}))}return s.a.createElement("input",f({},m,{ref:u}))}}])&&l(n.prototype,r),t}(s.a.Component);C.propTypes=P,C.defaultProps=F;var _=C;n(134);const T=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});var N=e=>{let{className:t,value:n,currency:o,onValueChange:c,displayType:u="text",...s}=e;const l="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(l))return null;const f=l/10**o.minorUnit;if(!Number.isFinite(f))return null;const p=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),d={...s,...T(o),value:void 0,currency:void 0,onValueChange:void 0},m=c?e=>{const t=e.value*10**o.minorUnit;c(t)}:()=>{};return Object(r.createElement)(_,a()({className:p,displayType:u},d,{value:f,onValueChange:m}))};n(133);const R=e=>{let{value:t,currency:n}=e;return Object(r.isValidElement)(t)?Object(r.createElement)("div",{className:"wc-block-components-totals-item__value"},t):Number.isFinite(t)?Object(r.createElement)(N,{className:"wc-block-components-totals-item__value",currency:n||{},value:t}):null};var D=e=>{let{className:t,currency:n,label:o,value:c,description:a}=e;return Object(r.createElement)("div",{className:i()("wc-block-components-totals-item",t)},Object(r.createElement)("span",{className:"wc-block-components-totals-item__label"},o),Object(r.createElement)(R,{value:c,currency:n}),Object(r.createElement)("div",{className:"wc-block-components-totals-item__description"},a))},I=n(1),A=n(4),M=e=>{let{currency:t,values:n,className:o}=e;const{total_items:i,total_items_tax:c}=n,a=parseInt(i,10),u=parseInt(c,10);return Object(r.createElement)(D,{className:o,currency:t,label:Object(I.__)("Subtotal","woo-gutenberg-products-block"),value:Object(A.getSetting)("displayCartPricesIncludingTax",!1)?a+u:a})};n(135);var B=e=>{let{currency:t,values:n,className:o,showRateAfterTaxName:c}=e;const{total_tax:a,tax_lines:u}=n;if(!Object(A.getSetting)("taxesEnabled",!0)&&parseInt(a,10)<=0)return null;const s=Object(A.getSetting)("displayItemizedTaxes",!1),l=s&&u.length>0?Object(r.createElement)("div",{className:i()("wc-block-components-totals-taxes",o)},u.map((e,n)=>{let{name:o,rate:i,price:a}=e;const u=`${o}${c?" "+i:""}`;return Object(r.createElement)(D,{key:"tax-line-"+n,className:"wc-block-components-totals-taxes__grouped-rate",currency:t,label:u,value:parseInt(a,10)})})," "):null;return s?l:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(D,{className:i()("wc-block-components-totals-taxes",o),currency:t,label:Object(I.__)("Taxes","woo-gutenberg-products-block"),value:parseInt(a,10),description:null}))},L=e=>{let{currency:t,cartFees:n,className:o}=e;return Object(r.createElement)(r.Fragment,null,n.map((e,n)=>{let{id:c,name:a,totals:u}=e;const s=parseInt(u.total,10);if(!s)return null;const l=parseInt(u.total_tax,10);return Object(r.createElement)(D,{key:c||`${n}-${a}`,className:i()("wc-block-components-totals-fees",o),currency:t,label:a||Object(I.__)("Fee","woo-gutenberg-products-block"),value:Object(A.getSetting)("displayCartPricesIncludingTax",!1)?s+l:s})}))};n(136);var V=e=>{let{children:t,slotWrapper:n=!1}=e;return u.Children.count(t)?Object(r.createElement)("div",{className:"wc-block-components-totals-wrapper"+(n?" slot-wrapper":"")},t):null},U=n(6),W=n.n(U),H=n(8);function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $=n(17);function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nArray.isArray(e)&&e.filter(Boolean).length>0;let Le;Le=q;const Ve=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const{Fill:n,Slot:o}=Re(e),i=e=>{let{children:o}=e;return Object(r.createElement)(n,null,e=>r.Children.map(o,n=>Object(r.createElement)(Me,{renderError:A.CURRENT_USER_IS_ADMIN?t:()=>null},Object(r.cloneElement)(n,e))))},c=e=>Object(r.createElement)(o,a()({},e,{bubblesVirtually:!0}));return{Fill:i,Slot:c}},{Fill:Ue,Slot:We}=Ve("__experimentalOrderMeta");Ue.Slot=e=>{let{className:t,extensions:n,cart:o}=e;const{fills:c}=Le("__experimentalOrderMeta");return Be(c)&&Object(r.createElement)(V,{slotWrapper:!0},Object(r.createElement)(We,{className:i()(t,"wc-block-components-order-meta"),fillProps:{extensions:n,cart:o}}))};var He=Ue;const{Fill:ze,Slot:$e}=Ve("__experimentalDiscountsMeta");ze.Slot=e=>{let{className:t,extensions:n,cart:o}=e;const{fills:c}=Le("__experimentalDiscountsMeta");return Be(c)&&Object(r.createElement)(V,{slotWrapper:!0},Object(r.createElement)($e,{className:i()(t,"wc-block-components-discounts-meta"),fillProps:{extensions:n,cart:o}}))};var Ke=ze;const{Fill:Ge,Slot:qe}=Ve("__experimentalOrderShippingPackages");Ge.Slot=e=>{let{className:t,collapsible:n,noResultsMessage:o,renderOption:c,extensions:a,cart:u,components:s}=e;const{fills:l}=Le("__experimentalOrderShippingPackages"),f=l.length>1;return Object(r.createElement)(qe,{className:i()("wc-block-components-shipping-rates-control",t),fillProps:{collapsible:n,collapse:f,showItems:f,noResultsMessage:o,renderOption:c,extensions:a,cart:u,components:s}})};var Ye=Ge,Ze=function(e){let{srcElement:t,size:n=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:n,height:n,...o}):null},Je=Object(r.createElement)(H.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{d:"M12 8l-6 5.4 1 1.2 5-4.6 5 4.6 1-1.2z"})),Qe=Object(r.createElement)(H.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"}));n(137);var Xe=e=>{let{children:t,className:n,initialOpen:o=!1,hasBorder:c=!1,title:a,titleTag:u="div"}=e;const[s,l]=Object(r.useState)(o);return Object(r.createElement)("div",{className:i()(n,"wc-block-components-panel",{"has-border":c})},Object(r.createElement)(u,null,Object(r.createElement)("button",{"aria-expanded":s,className:"wc-block-components-panel__button",onClick:()=>l(!s)},Object(r.createElement)(Ze,{"aria-hidden":"true",className:"wc-block-components-panel__button-icon",srcElement:s?Je:Qe}),a)),s&&Object(r.createElement)("div",{className:"wc-block-components-panel__content"},t))},et=n(15),tt=n(20),nt=n(12),rt=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t0?a/2:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===r?f=e.right:"middle"!==i&&(f=s);var p=e.right;"left"===r?p=e.left:"middle"!==i&&(p=s);var d,m={popoverLeft:f,contentWidth:f-a>0?a:f},h={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},b=n,v=null;if(!o)if("center"===n&&l.contentWidth===a)b="center";else if("left"===n&&m.contentWidth===a)b="left";else if("right"===n&&h.contentWidth===a)b="right";else{var g="left"==(b=m.contentWidth>h.contentWidth?"left":"right")?m.contentWidth:h.contentWidth;v=g!==a?g:null}if(d="center"===b?l.popoverLeft:"left"===b?m.popoverLeft:h.popoverLeft,c){var y=c.getBoundingClientRect();d=Math.min(d,y.right-a)}return{xAxis:b,popoverLeft:d,contentWidth:v}}function at(e,t,n,r,o,i,c){var a=t.height;if(o){var u=(Object(et.getScrollContainer)(i)||document.body).getBoundingClientRect().top+a-c;if(e.top<=u)return{yAxis:n,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===r?s=e.bottom:"top"===r&&(s=e.top);var l={popoverTop:s,contentHeight:(s-a/2>0?a/2:s)+(s+a/2>window.innerHeight?window.innerHeight-s:a/2)},f={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},d=n,m=null;if(!o)if("middle"===n&&l.contentHeight===a)d="middle";else if("top"===n&&f.contentHeight===a)d="top";else if("bottom"===n&&p.contentHeight===a)d="bottom";else{var h="top"==(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;m=h!==a?h:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:m}}var ut=Object(r.createContext)({focusHistory:[]}),st=ut.Provider,lt=ut.Consumer;st.displayName="FocusReturnProvider",lt.displayName="FocusReturnConsumer",r.Component;var ft=Object(nt.createHigherOrderComponent)((function e(t){if((o=t)instanceof r.Component||"function"==typeof o){var n=t;return e({})(n)}var o,i=t.onFocusReturn,c=void 0===i?ue.stubTrue:i;return function(e){var t=function(t){oe(a,t);var n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=te(n);if(o){var r=te(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return ae(this,e)});function a(){var e;return J(this,a),(e=i.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return X(a,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==c())for(var r,o=[].concat(pe(ue.without.apply(void 0,[this.props.focus.focusHistory].concat(pe(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(r.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(r.createElement)(e,this.props.childProps))}}]),a}(r.Component);return function(e){return Object(r.createElement)(lt,null,(function(n){return Object(r.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");var pt=Object(nt.createHigherOrderComponent)((function(e){return function(t){oe(c,t);var n,o,i=(n=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=te(n);if(o){var r=te(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return ae(this,e)});function c(){var e;return J(this,c),(e=i.apply(this,arguments)).focusContainRef=Object(r.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(ee(e)),e}return X(c,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===tt.TAB){var t=et.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return Object(r.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(r.createElement)(e,this.props))}}]),c}(r.Component)}),"withConstrainedTabbing");var dt=["button","submit"];var mt=Object(nt.createHigherOrderComponent)((function(e){return function(t){oe(c,t);var n,o,i=(n=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=te(n);if(o){var r=te(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return ae(this,e)});function c(){var e;return J(this,c),(e=i.apply(this,arguments)).bindNode=e.bindNode.bind(ee(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(ee(e)),e.queueBlurCheck=e.queueBlurCheck.bind(ee(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(ee(e)),e}return X(c,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout((function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()}),0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,n=e.target;Object(ue.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(ue.includes)(dt,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(r.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(r.createElement)(e,Y({ref:this.bindNode},this.props)))}}]),c}(r.Component)}),"withFocusOutside")(function(e){oe(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=te(t);if(n){var o=te(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return ae(this,e)});function o(){return J(this,o),r.apply(this,arguments)}return X(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(r.Component));function ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=te(e);if(t){var o=te(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ae(this,n)}}var bt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,o=e.className,i=void 0===o?"lockscroll":o,c=0,a=0;function u(e){var t=n.scrollingElement||n.body;e&&(a=t.scrollTop);var r=e?"add":"remove";t.classList[r](i),n.documentElement.classList[r](i),e||(t.scrollTop=a)}function s(){0===c&&u(!0),++c}function l(){1===c&&u(!1),--c}return function(e){oe(n,e);var t=ht(n);function n(){return J(this,n),t.apply(this,arguments)}return X(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(r.Component)}();function vt(e){e.stopPropagation()}var gt=Object(r.forwardRef)((function(e,t){var n=e.children,o=Z(e,["children"]);return Object(r.createElement)("div",Y({},o,{ref:t,onMouseDown:vt}),n)}));function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ot(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function Pt(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var Ft=function(e){var t=e.headerTitle,n=e.onClose,o=e.onKeyDown,c=e.children,a=e.className,u=e.noArrow,s=void 0===u||u,l=e.isAlternate,f=e.position,p=void 0===f?"bottom right":f,d=(e.range,e.focusOnMount),m=void 0===d?"firstElement":d,h=e.anchorRef,b=e.shouldAnchorIncludePadding,v=e.anchorRect,g=e.getAnchorRect,y=e.expandOnMobile,O=e.animate,w=void 0===O||O,j=e.onClickOutside,S=e.onFocusOutside,E=e.__unstableSticky,k=e.__unstableSlotName,x=void 0===k?"Popover":k,P=e.__unstableObserveElement,F=e.__unstableBoundaryParent,C=Z(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),_=Object(r.useRef)(null),T=Object(r.useRef)(null),N=Object(r.useRef)(),R=Object(nt.useViewportMatch)("medium","<"),D=fe(Object(r.useState)(),2),I=D[0],A=D[1],M=q(x),B=y&&R,L=fe(Object(nt.useResizeObserver)(),2),V=L[0],U=L[1];s=B||s,Object(r.useLayoutEffect)((function(){if(B)return Pt(N.current,"is-without-arrow",s),Pt(N.current,"is-alternate",l),kt(N.current,"data-x-axis"),kt(N.current,"data-y-axis"),xt(N.current,"top"),xt(N.current,"left"),xt(T.current,"maxHeight"),void xt(T.current,"maxWidth");var e=function(){if(N.current&&T.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(et.getRectangleFromRange)(r);if(r instanceof window.Element){var i=r.getBoundingClientRect();return o?i:Et(i,r)}var c=r.top,a=r.bottom,u=c.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:Et(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:Et(p,f)}}(_,v,g,h,b);if(e){var t,n,r=N.current,o=r.offsetParent,i=r.ownerDocument,c=0;if(o&&o!==i.body){var a=o.getBoundingClientRect();c=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}F&&(t=null===(n=N.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode);var u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0,a=n.split(" "),u=fe(a,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=at(e,t,s,p,r,o,i),m=ct(e,t,f,p,r,d.yAxis,c);return it(it({},m),d)}(e,U.height?U:T.current.getBoundingClientRect(),p,E,N.current,c,t),f=u.popoverTop,d=u.popoverLeft,m=u.xAxis,y=u.yAxis,O=u.contentHeight,w=u.contentWidth;"number"==typeof f&&"number"==typeof d&&(xt(N.current,"top",f+"px"),xt(N.current,"left",d+"px")),Pt(N.current,"is-without-arrow",s||"center"===m&&"middle"===y),Pt(N.current,"is-alternate",l),kt(N.current,"data-x-axis",m),kt(N.current,"data-y-axis",y),xt(T.current,"maxHeight","number"==typeof O?O+"px":""),xt(T.current,"maxWidth","number"==typeof w?w+"px":""),A(({left:"right",right:"left"}[m]||"center")+" "+({top:"bottom",bottom:"top"}[y]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),P&&(n=new window.MutationObserver(e)).observe(P,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[B,v,g,h,b,p,U,E,P,F]),function(e,t){Object(r.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=et.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(m,T);var H=function(e){e.keyCode===tt.ESCAPE&&n&&(e.stopPropagation(),n()),o&&o(e)},z=Object(r.createElement)(mt,{onFocusOutside:function(e){if(S)S(e);else if(j){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),W()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),j(t)}else n&&n()}},Object(r.createElement)(jt,{type:w&&I?"appear":null,options:{origin:I}},(function(e){var o=e.className;return Object(r.createElement)(gt,Y({className:i()("components-popover",a,o,{"is-expanded":B,"is-without-arrow":s,"is-alternate":l})},C,{onKeyDown:H,ref:N}),B&&Object(r.createElement)(bt,null),B&&Object(r.createElement)("div",{className:"components-popover__header"},Object(r.createElement)("span",{className:"components-popover__header-title"},t),Object(r.createElement)(Bt,{className:"components-popover__close",icon:rt,onClick:n})),Object(r.createElement)("div",{ref:T,className:"components-popover__content",tabIndex:"-1"},Object(r.createElement)("div",{style:{position:"relative"}},V,c)))})));return m&&(z=Object(r.createElement)(St,null,z)),M.ref&&(z=Object(r.createElement)(Ne,{name:x},z)),h||v?z:Object(r.createElement)("span",{ref:_},z)};Ft.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(r.createElement)(Te,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var Ct=Ft,_t=function(e){var t,n,o=e.shortcut,i=e.className;return o?(Object(ue.isString)(o)&&(t=o),Object(ue.isObject)(o)&&(t=o.display,n=o.ariaLabel),Object(r.createElement)("span",{className:i,"aria-label":n},t)):null};var Tt=function(e){oe(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=te(t);if(n){var o=te(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return ae(this,e)});function i(){var e;return J(this,i),(e=o.apply(this,arguments)).delayedSetIsOver=Object(ue.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return X(i,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===r.Children.count(n)){var o=r.Children.only(n);"function"==typeof o.props[e]&&o.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(ue.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,o=e.text,i=e.shortcut;if(1!==r.Children.count(t))return t;var c=r.Children.only(t),a=this.state.isOver;return Object(r.cloneElement)(c,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(r.concatChildren)(c.props.children,a&&Object(r.createElement)(Ct,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,Object(r.createElement)(_t,{className:"components-tooltip__shortcut",shortcut:i})))})}}]),i}(r.Component),Nt=function(e){var t=e.icon,n=e.className,o=Z(e,["icon","className"]),i=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" ");return Object(r.createElement)("span",Y({className:i},o))};function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw i}}}}(Mt);try{for(T.s();!(_=T.n()).done;)k[_.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){T.e(e)}finally{T.f()}}var N=!P&&(y&&j||w||!!j&&(!S||Object(ue.isArray)(S)&&!S.length)&&!1!==y),R=Object(r.createElement)(F,Y({},C,k,{className:x,"aria-label":k["aria-label"]||j,ref:t}),v&&Object(r.createElement)(It,{icon:v,size:g}),S);return N?Object(r.createElement)(Tt,{text:j,shortcut:w,position:O},R):R}));n(139);var Lt=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"});n(138);var Vt=e=>{let{className:t,showSpinner:n=!1,children:o,...c}=e;const u=i()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(r.createElement)(Bt,a()({className:u},c),n&&Object(r.createElement)(Lt,null),Object(r.createElement)("span",{className:"wc-block-components-button__text"},o))},Ut=e=>{let t,{label:n,screenReaderLabel:o,wrapperElement:c,wrapperProps:a={}}=e;const u=null!=n,s=null!=o;return!u&&s?(t=c||"span",a={...a,className:i()(a.className,"screen-reader-text")},Object(r.createElement)(t,a,o)):(t=c||r.Fragment,u&&s&&n!==o?Object(r.createElement)(t,a,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,a,n))};n(140);var Wt=Object(nt.withInstanceId)(e=>{let{className:t,label:n,id:o,instanceId:c,onChange:u,children:s,hasError:l=!1,...f}=e;const p=o||"checkbox-control-"+c;return Object(r.createElement)("div",{className:i()("wc-block-components-checkbox",{"has-error":l},t)},Object(r.createElement)("label",{htmlFor:p},Object(r.createElement)("input",a()({id:p,className:"wc-block-components-checkbox__input",type:"checkbox",onChange:e=>u(e.target.checked),"aria-invalid":!0===l},f)),Object(r.createElement)("svg",{className:"wc-block-components-checkbox__mark","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"})),n&&Object(r.createElement)("span",{className:"wc-block-components-checkbox__label"},n),s))});const Ht=(e,t)=>{if(!e.includes(t))throw Error(Object(I.sprintf)( +/* translators: %1$s value passed to filter, %2$s : value that must be included. */ +Object(I.__)('Returned value must include %1$s, you passed "%2$s"',"woo-gutenberg-products-block"),t,e));return!0};var zt=n(7),$t=n(11);const Kt=e=>{const{applyExtensionCartUpdate:t}=Object(zt.dispatch)($t.b);return t(e)},Gt=()=>!0;let qt={};const Yt=(e,t)=>{Object.keys(t).includes("couponName")&&W()("snackbarNotices",{alternative:"snackbarNoticeVisibility",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4417"}),Object.keys(t).includes("couponName")&&W()("couponName",{alternative:"coupons",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/bb921d21f42e21f38df2b1c87b48e07aa4cb0538/docs/extensibility/available-filters.md#coupons"}),qt={...qt,[e]:t}},Zt=e=>{let{filterName:t,defaultValue:n,extensions:o=null,arg:i=null,validation:c=Gt}=e;return Object(r.useMemo)(()=>{const e=(e=>Object.keys(qt).map(t=>qt[t][e]).filter(Boolean))(t);let r=n;return e.forEach(e=>{try{const t=e(r,o||{},i);if(typeof t!=typeof r)throw new Error(Object(I.sprintf)( +/* translators: %1$s is the type of the variable passed to the filter function, %2$s is the type of the value returned by the filter function. */ +Object(I.__)("The type returned by checkout filters must be the same as the type they receive. The function received %1$s but returned %2$s.","woo-gutenberg-products-block"),typeof r,typeof t));r=c(t)?t:r}catch(e){if(A.CURRENT_USER_IS_ADMIN)throw e;console.error(e)}}),r},[t,n,o,i,c])};let Jt;!function(e){e.CHECKOUT="woocommerce/checkout",e.CHECKOUT_FIELDS="woocommerce/checkout-fields-block",e.CHECKOUT_TOTALS="woocommerce/checkout-totals-block",e.CONTACT_INFORMATION="woocommerce/checkout-contact-information-block",e.SHIPPING_ADDRESS="woocommerce/checkout-shipping-address-block",e.BILLING_ADDRESS="woocommerce/checkout-billing-address-block",e.SHIPPING_METHODS="woocommerce/checkout-shipping-methods-block",e.PAYMENT_METHODS="woocommerce/checkout-payment-methods-block",e.CART="woocommerce/cart",e.EMPTY_CART="woocommerce/empty-cart-block",e.FILLED_CART="woocommerce/filled-cart-block",e.CART_ITEMS="woocommerce/cart-items-block",e.CART_TOTALS="woocommerce/cart-totals-block"}(Jt||(Jt={}));const Qt={},Xt=e=>Object.values(Jt).includes(e),en=e=>Xt(e)?Object.values(Qt).filter(t=>{let{metadata:n}=t;return((null==n?void 0:n.parent)||[]).includes(e)}):[];var tn=n(32);const nn=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,rn=e=>{var t,n,r,o;((e,t,n)=>{if(!nn(e))return;const r=typeof e.metadata;if("object"!==r)throw new Error(`Incorrect value for the metadata argument when registering a block component. It was a ${r}, but must be a object.`)})(e),(e=>{if(((e,t,n)=>{const r=typeof t;if("string"!==r)throw new Error(`Incorrect value for the blockName argument when registering a checkout block. It was a ${r}, but must be a string.`)})(0,e),!e)throw new Error("Value for the blockName argument must not be empty.")})(e.metadata.name),(e=>{if("string"!=typeof e&&!Array.isArray(e))throw new Error(`Incorrect value for the parent argument when registering a checkout block. It was a ${typeof e}, but must be a string or array of strings.`);if("string"==typeof e&&!Xt(e))throw new Error("When registering a checkout block, the parent must be a valid inner block area.");if(Array.isArray(e)&&!e.some(e=>Xt(e)))throw new Error("When registering a checkout block, the parent must be a valid inner block area.")})(e.metadata.parent),((e,t)=>{const n=e.component;if(n){if("function"==typeof n)return;if(nn(n)&&n.$$typeof&&n.$$typeof===Symbol.for("react.lazy"))return}throw new Error("Incorrect value for the component argument when registering a block component. Component must be a valid React Element or Lazy callback.")})(e),Object(tn.registerBlockComponent)({blockName:e.metadata.name,component:e.component}),Qt[e.metadata.name]={blockName:e.metadata.name,metadata:e.metadata,component:e.component,force:!(null===(t=e.metadata)||void 0===t||null===(n=t.attributes)||void 0===n||null===(r=n.lock)||void 0===r||null===(o=r.default)||void 0===o||!o.remove)}}},15:function(e,t){e.exports=window.wp.dom},17:function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(28),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(18))},18:function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:c}catch(e){r=c}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f1)for(var n=1;n"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+t;var r=t=>{let{id:e,src:s=null,alt:a=""}=t;return s?Object(c.createElement)("img",{className:i(e),src:s,alt:a}):null},d=s(84);const m=[{id:"alipay",alt:"Alipay",src:d.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.l+"payment-methods/wechat.svg"}];var p=s(52);s(190),e.a=t=>{let{icons:e=[],align:s="center",className:a}=t;const o=(t=>{const e={};return t.forEach(t=>{let s={};"string"==typeof t&&(s={id:t,alt:t,src:null}),"object"==typeof t&&(s={id:t.id||"",alt:t.alt||"",src:t.src||null}),s.id&&Object(p.d)(s.id)&&!e[s.id]&&(e[s.id]=s)}),Object.values(e)})(e);if(0===o.length)return null;const i=l()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===s,"wc-block-components-payment-method-icons--align-right":"right"===s},a);return Object(c.createElement)("div",{className:i},o.map(t=>{const e={...t,...(s=t.id,m.find(t=>t.id===s)||{})};var s;return Object(c.createElement)(r,n()({key:"payment-method-icon-"+t.id},e))}))}},190:function(t,e){},246:function(t,e,s){"use strict";s.d(e,"b",(function(){return o})),s.d(e,"a",(function(){return l}));var a=s(33),n=s(147);const c=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:e,expressPaymentMethods:s,paymentMethodsInitialized:c,expressPaymentMethodsInitialized:o}=Object(n.b)(),l=Object(a.a)(e),i=Object(a.a)(s);return{paymentMethods:t?i:l,isInitialized:t?o:c}},o=()=>c(!1),l=()=>c(!0)},390:function(t,e,s){"use strict";s.r(e);var a=s(0),n=s(155),c=s(246);const o=t=>Object.values(t).reduce((t,e)=>(null!==e.icons&&(t=t.concat(e.icons)),t),[]);e.default=t=>{let{className:e}=t;const{paymentMethods:s}=Object(c.b)();return Object(a.createElement)(n.a,{className:e,icons:o(s)})}}}]); \ No newline at end of file diff --git a/build/cart-blocks/checkout-button-frontend.js b/build/cart-blocks/checkout-button-frontend.js new file mode 100644 index 00000000000..39e7258d971 --- /dev/null +++ b/build/cart-blocks/checkout-button-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[22],{137:function(e,t,c){"use strict";var n=c(18),o=c.n(n),s=c(0),r=c(62),a=c(5),i=c.n(a),u=c(106);c(188),t.a=e=>{let{className:t,showSpinner:c=!1,children:n,...a}=e;const b=i()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(s.createElement)(r.a,o()({className:b},a),c&&Object(s.createElement)(u.a,null),Object(s.createElement)("span",{className:"wc-block-components-button__text"},n))}},188:function(e,t){},341:function(e,t,c){"use strict";(function(e){var n=c(0),o=c(1),s=c(5),r=c.n(s),a=c(137),i=c(84),u=c(41),b=c(371),l=c(2);c(343),t.a=t=>{let{checkoutPageId:c,className:s}=t;const d=Object(l.getSetting)("page-"+c,!1),{isCalculating:m}=Object(u.b)(),[f,w]=Object(b.a)(),[p,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 j=Object(n.createElement)(a.a,{className:"wc-block-cart__submit-button",href:d||i.d,disabled:m,onClick:()=>v(!0),showSpinner:p},Object(o.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(n.createElement)("div",{className:r()("wc-block-cart__submit",s)},f,Object(n.createElement)("div",{className:"wc-block-cart__submit-container"},j),"below"===w&&Object(n.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},j))}}).call(this,c(342))},342: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},343:function(e,t){},371:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(0);const o={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},s=()=>{const[e,t]=Object(n.useState)(""),c=Object(n.useRef)(null),s=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=s.current;return e&&t.observe(e),()=>{t.unobserve(e)}},[]),[Object(n.createElement)("div",{"aria-hidden":!0,ref:c,style:o}),e]}},389:function(e,t,c){"use strict";c.r(t);var n=c(134),o=c(341);t.default=Object(n.withFilteredAttributes)({checkoutPageId:{type:"number",default:0},lock:{type:"object",default:{move:!0,remove:!0}}})(o.a)}}]); \ No newline at end of file diff --git a/build/cart-blocks/empty-cart-frontend.js b/build/cart-blocks/empty-cart-frontend.js new file mode 100644 index 00000000000..26ba08737a3 --- /dev/null +++ b/build/cart-blocks/empty-cart-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[23],{331:function(e,c){},367:function(e,c,t){"use strict";t.r(c);var n=t(0),o=t(26),s=t(87);t(331),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)}}}]); \ No newline at end of file diff --git a/build/cart-blocks/express-payment-frontend.js b/build/cart-blocks/express-payment-frontend.js new file mode 100644 index 00000000000..d611c7358a8 --- /dev/null +++ b/build/cart-blocks/express-payment-frontend.js @@ -0,0 +1,5 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[24],{101:function(e,t,n){},108:function(e,t,n){"use strict";var c=n(0);t.a=function(e){let{srcElement:t,size:n=24,...s}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:n,height:n,...s}):null}},155:function(e,t,n){"use strict";var c=n(18),s=n.n(c),o=n(0),r=n(5),a=n.n(r);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:n=null,alt:c=""}=e;return n?Object(o.createElement)("img",{className:i(t),src:n,alt:c}):null},p=n(84);const u=[{id:"alipay",alt:"Alipay",src:p.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:p.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:p.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:p.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:p.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:p.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:p.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:p.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:p.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:p.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:p.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:p.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:p.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:p.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:p.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:p.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:p.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:p.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:p.l+"payment-methods/wechat.svg"}];var d=n(52);n(190),t.a=e=>{let{icons:t=[],align:n="center",className:c}=e;const r=(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(d.d)(n.id)&&!t[n.id]&&(t[n.id]=n)}),Object.values(t)})(t);if(0===r.length)return null;const i=a()("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},c);return Object(o.createElement)("div",{className:i},r.map(e=>{const t={...e,...(n=e.id,u.find(e=>e.id===n)||{})};var n;return Object(o.createElement)(l,s()({key:"payment-method-icon-"+e.id},t))}))}},190:function(e,t){},246:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var c=n(33),s=n(147);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:r}=Object(s.b)(),a=Object(c.a)(t),i=Object(c.a)(n);return{paymentMethods:e?i:a,isInitialized:e?r:o}},r=()=>o(!1),a=()=>o(!0)},259:function(e,t){},268:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var c=n(0),s=(n(8),n(154));n(259);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:r,getValidationErrorId:a}=Object(s.b)();if(!t||"string"!=typeof t){const e=r(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(c.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(c.createElement)("p",{id:a(o)},t))}},271:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var c=n(1),s=n(9),o=n(6),r=n(25),a=n(26),i=n(0),l=n(241),p=n(154),u=n(39);const d=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(a.a)(),{addErrorNotice:n}=Object(u.a)(),{addSnackbarNotice:d}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:n,setIsSuppressed:c}=Object(l.b)(),s=Object(i.useRef)(e);Object(i.useEffect)(()=>{s.current=e},[e]);const o=Object(i.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeSnackbarNotice:n}),[n]),r=Object(i.useMemo)(()=>({addSnackbarNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,n)}}),[t]);return{notices:e,...o,...r,setIsSuppressed:c}})(),{setValidationErrors:m}=Object(p.b)();return{appliedCoupons:e,isLoading:t,...Object(s.useSelect)((e,t)=>{let{dispatch:s}=t;const a=e(o.CART_STORE_KEY),i=a.isApplyingCoupon(),l=a.isRemovingCoupon(),{applyCoupon:p,removeCoupon:u,receiveApplyingCoupon:b}=s(o.CART_STORE_KEY);return{applyCoupon:e=>{p(e).then(t=>{!0===t&&d(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{m({coupon:{message:Object(r.decodeEntities)(e.message),hidden:!1}}),b("")})},removeCoupon:e=>{u(e).then(t=>{!0===t&&d(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{n(e.message,{id:"coupon-form"}),b("")})},isApplyingCoupon:i,isRemovingCoupon:l}},[n,d])}}},278:function(e,t){},279:function(e,t,n){"use strict";var c=n(29),s=n.n(c),o=n(0),r=n(1),a=n(3),i=(n(8),n(2)),l=n(101);class p extends a.Component{constructor(){super(...arguments),s()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:n}=this.props;if(e){let e=Object(r.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(n||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(r.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const c=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.StoreNoticesContainer,{notices:c})}return this.props.children}}p.defaultProps={isEditor:!1},t.a=p},291:function(e,t){},292:function(e,t,n){"use strict";var c=n(0),s=n(1),o=n(310),r=n(246),a=n(28),i=n(147),l=n(40),p=n.n(l),u=n(279);t.a=()=>{const{isEditor:e}=Object(a.a)(),{setActivePaymentMethod:t,setExpressPaymentError:n,activePaymentMethod:l,paymentMethodData:d,setPaymentStatus:m}=Object(i.b)(),b=Object(o.a)(),{paymentMethods:h}=Object(r.a)(),g=Object(c.useRef)(l),v=Object(c.useRef)(d),j=Object(c.useCallback)(e=>()=>{g.current=l,v.current=d,m().started({}),t(e)},[l,d,t,m]),O=Object(c.useCallback)(()=>{m().pristine(),t(g.current),v.current.isSavedToken&&m().started(v.current)},[t,m]),y=Object(c.useCallback)(e=>{m().error(e),n(e),t(g.current),v.current.isSavedToken&&m().started(v.current)},[t,m,n]),E=Object(c.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";p()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?y(e):n("")}),[n,y]),f=Object.entries(h),k=f.length>0?f.map(t=>{let[n,s]=t;const o=e?s.edit:s.content;return Object(c.isValidElement)(o)?Object(c.createElement)("li",{key:n,id:"express-payment-method-"+n},Object(c.cloneElement)(o,{...b,onClick:j(n),onClose:O,onError:y,setExpressPaymentError:E})):null}):Object(c.createElement)("li",{key:"noneRegistered"},Object(s.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(c.createElement)(u.a,{isEditor:e},Object(c.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},k))}},305:function(e,t,n){"use strict";var c=n(0),s=n(32);const o=Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{fill:"currentColor",d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},310:function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var c=n(1),s=n(48),o=n(0),r=n(5),a=n.n(r),i=n(32),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),p=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"})),u=n(305),d=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(o.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),m=n(108),b=n(52);n(278);const h={bank:l,bill:p,card:u.a,checkPayment:d};var g=e=>{let{icon:t="",text:n=""}=e;const c=!!t,s=Object(o.useCallback)(e=>c&&Object(b.d)(e)&&Object(b.e)(h,e),[c]),r=a()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":c});return Object(o.createElement)("span",{className:r},s(t)?Object(o.createElement)(m.a,{srcElement:h[t]}):t,n)},v=n(155),j=n(2),O=n(40),y=n.n(O),E=n(153),f=n(268),k=n(26),w=n(271),S=n(31),C=n(41),P=n(147),_=n(51),x=n(45);const M=(e,t)=>{const n=[],s=(t,n)=>{const c=n+"_tax",s=Object(b.e)(e,n)&&Object(b.d)(e[n])?parseInt(e[n],10):0;return{key:n,label:t,value:s,valueWithTax:s+(Object(b.e)(e,c)&&Object(b.d)(e[c])?parseInt(e[c],10):0)}};return n.push(s(Object(c.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(s(Object(c.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(s(Object(c.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({key:"total_tax",label:Object(c.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(s(Object(c.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n},R=()=>{const{isCalculating:e,isComplete:t,isIdle:n,isProcessing:r,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:p,onSubmit:u,customerId:d}=Object(C.b)(),{currentStatus:m,activePaymentMethod:b,onPaymentProcessing:h,setExpressPaymentError:O,shouldSavePayment:R}=Object(P.b)(),{shippingErrorStatus:z,shippingErrorTypes:V,shippingRates:I,shippingRatesLoading:N,selectedRates:T,setSelectedRates:A,isSelectingRate:H,onShippingRateSuccess:B,onShippingRateFail:D,onShippingRateSelectSuccess:L,onShippingRateSelectFail:W,needsShipping:F}=Object(_.b)(),{billingData:G,shippingAddress:J,setShippingAddress:U}=Object(x.b)(),{cartTotals:Y}=Object(k.a)(),{appliedCoupons:K}=Object(w.a)(),{noticeContexts:X,responseTypes:q}=Object(S.c)(),Q=Object(o.useRef)(M(Y,F)),Z=Object(o.useRef)({label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(Y.total_price,10)});Object(o.useEffect)(()=>{Q.current=M(Y,F),Z.current={label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(Y.total_price,10)}},[Y,F]);const $=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";y()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),O(e)}),[O]);return{activePaymentMethod:b,billing:{billingData:G,cartTotal:Z.current,currency:Object(s.getCurrencyFromPriceResponse)(Y),cartTotalItems:Q.current,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1),appliedCoupons:K,customerId:d},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:n,isProcessing:r},components:{ValidationInputError:f.a,PaymentMethodIcons:v.a,PaymentMethodLabel:g,LoadingMask:E.a},emitResponse:{noticeContexts:X,responseTypes:q},eventRegistration:{onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:p,onShippingRateSuccess:B,onShippingRateFail:D,onShippingRateSelectSuccess:L,onShippingRateSelectFail:W,onPaymentProcessing:h},onSubmit:u,paymentStatus:m,setExpressPaymentError:$,shippingData:{shippingRates:I,shippingRatesLoading:N,selectedRates:T,setSelectedRates:A,isSelectingRate:H,shippingAddress:J,setShippingAddress:U,needsShipping:F},shippingStatus:{shippingErrorStatus:z,shippingErrorTypes:V},shouldSavePayment:R}}},388:function(e,t,n){"use strict";n.r(t);var c=n(0),s=n(26),o=n(5),r=n.n(o),a=n(1),i=n(246),l=n(31),p=n(41),u=n(147),d=n(80),m=n(153),b=n(292);n(291);var h=()=>{const{paymentMethods:e,isInitialized:t}=Object(i.a)(),{noticeContexts:n}=Object(l.c)(),{isCalculating:s,isProcessing:o,isAfterProcessing:r,isBeforeProcessing:h,isComplete:g,hasError:v}=Object(p.b)(),{currentStatus:j}=Object(u.b)();if(!t||t&&0===Object.keys(e).length)return null;const O=o||r||h||g&&!v;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.a,{isLoading:s||O||j.isDoingExpressPayment},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)(d.a,{context:n.EXPRESS_PAYMENTS},Object(c.createElement)(b.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","woo-gutenberg-products-block")))};t.default=e=>{let{className:t}=e;const{cartNeedsPayment:n}=Object(s.a)();return n?Object(c.createElement)("div",{className:r()("wc-block-cart__payment-options",t)},Object(c.createElement)(h,null)):null}}}]); \ No newline at end of file diff --git a/build/cart-blocks/filled-cart-frontend.js b/build/cart-blocks/filled-cart-frontend.js new file mode 100644 index 00000000000..c69bed13d24 --- /dev/null +++ b/build/cart-blocks/filled-cart-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[25],{199:function(e,t){},244: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(8),s(21)),i=s(5),r=s.n(i);const n=Object(a.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=()=>Object(a.useContext)(n),o=e=>{let{children:t,className:s=""}=e;const[i,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)(n.Provider,{value:o},Object(a.createElement)("div",{className:r()(s,l)},i,t))}},253:function(e,t,s){"use strict";var a=s(0),c=s(5),i=s.n(c),r=(s(8),s(244));s(199),t.a=e=>{let{children:t,className:s}=e;return Object(a.createElement)(r.a,{className:i()("wc-block-components-sidebar-layout",s)},t)}},366:function(e,t,s){"use strict";s.r(t);var a=s(0),c=s(5),i=s.n(c),r=s(253),n=s(26),l=s(39),o=s(25),m=s(165);t.default=e=>{let{children:t,className:s}=e;const{cartItems:c,cartIsLoading:u,cartItemErrors:d}=Object(n.a)(),{hasDarkControls:b}=Object(m.b)(),{addErrorNotice:h}=Object(l.a)();return Object(a.useEffect)(()=>{d.forEach(e=>{h(Object(o.decodeEntities)(e.message),{isDismissible:!0,id:e.code})})},[h,d]),u||c.length>=1?Object(a.createElement)(r.a,{className:i()("wc-block-cart",s,{"has-dark-controls":b})},t):null}}}]); \ No newline at end of file diff --git a/build/cart-blocks/items-frontend.js b/build/cart-blocks/items-frontend.js new file mode 100644 index 00000000000..b1fb35e5beb --- /dev/null +++ b/build/cart-blocks/items-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[26],{332:function(e,c,a){"use strict";var n=a(0),t=a(3),s=a(5),r=a.n(s);const l=Object(t.forwardRef)((e,c)=>{let{children:a,className:t=""}=e;return Object(n.createElement)("div",{ref:c,className:r()("wc-block-components-main",t)},a)});c.a=l},368:function(e,c,a){"use strict";a.r(c);var n=a(0),t=a(332),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)}}}]); \ No newline at end of file diff --git a/build/cart-blocks/line-items-frontend.js b/build/cart-blocks/line-items-frontend.js new file mode 100644 index 00000000000..cfae9079ec0 --- /dev/null +++ b/build/cart-blocks/line-items-frontend.js @@ -0,0 +1,15 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[27],{104:function(e,t,c){"use strict";var r=c(0),a=c(5),n=c.n(a);c(194),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)("div",{className:n()("wc-block-components-product-badge",c)},t)}},136:function(e,t){},139:function(e,t,c){"use strict";var r=c(0),a=c(1),n=c(66),l=c(5),o=c.n(l),s=c(48);c(192);const i=e=>{let{currency:t,maxPrice:c,minPrice:l,priceClassName:i,priceStyle:u}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(a.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(s.formatPrice)(l),Object(s.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(n.a,{className:o()("wc-block-components-product-price__value",i),currency:t,value:l,style:u})," — ",Object(r.createElement)(n.a,{className:o()("wc-block-components-product-price__value",i),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:l,regularPrice:s,priceClassName:i,priceStyle:u,price:m}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:o()("wc-block-components-product-price__regular",c),style:l},e),value:s}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:o()("wc-block-components-product-price__value","is-discounted",i),style:u},e),value:m}))};t.a=e=>{let{align:t,className:c,currency:a,format:l="",maxPrice:s,minPrice:m,price:b,priceClassName:p,priceStyle:d,regularPrice:O,regularPriceClassName:j,regularPriceStyle:_}=e;const y=o()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});l.includes("")||(l="",console.error("Price formats need to include the `` tag."));const g=O&&b!==O;let f=Object(r.createElement)("span",{className:o()("wc-block-components-product-price__value",p)});return g?f=Object(r.createElement)(u,{currency:a,price:b,priceClassName:p,priceStyle:d,regularPrice:O,regularPriceClassName:j,regularPriceStyle:_}):void 0!==m&&void 0!==s?f=Object(r.createElement)(i,{currency:a,maxPrice:s,minPrice:m,priceClassName:p,priceStyle:d}):b&&(f=Object(r.createElement)(n.a,{className:o()("wc-block-components-product-price__value",p),currency:a,value:b,style:d})),Object(r.createElement)("span",{className:y},Object(r.createInterpolateElement)(l,{price:f}))}},156:function(e,t,c){"use strict";var r=c(18),a=c.n(r),n=c(0),l=c(25),o=c(5),s=c.n(o);c(191),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:o="",rel:i,style:u,onClick:m,...b}=e;const p=s()("wc-block-components-product-name",t);if(c){const e=b;return Object(n.createElement)("span",a()({className:p},e,{dangerouslySetInnerHTML:{__html:Object(l.decodeEntities)(r)}}))}return Object(n.createElement)("a",a()({className:p,href:o,rel:i},b,{dangerouslySetInnerHTML:{__html:Object(l.decodeEntities)(r)},style:u}))}},157:function(e,t,c){"use strict";var r=c(0),a=c(102),n=c(86);const l=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},o=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),s=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=o(e),a=r.split(" ").splice(0,t).join(" ");return Object(n.autop)(s(a,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const a=o(e),l=a.slice(0,t);if(c)return Object(n.autop)(s(l,r));const i=l.match(/([\s]+)/g),u=i?i.length:0,m=a.slice(0,t+u);return Object(n.autop)(s(m,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:o="words",className:s=""}=e;const m=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(n.autop)(e),o=Object(a.count)(r,c);if(o<=t)return r;const s=l(r),m=Object(a.count)(s,c);return m<=t?s:"words"===c?i(s,t):u(s,t,"characters_including_spaces"===c)}(t,c,o),[t,c,o]);return Object(r.createElement)(r.RawHTML,{className:s},m)}},160:function(e,t,c){"use strict";var r=c(0),a=c(5),n=c.n(a),l=c(1),o=c(27),s=c(46);c(200);var i=e=>{let{className:t,quantity:c=1,minimum:a=1,maximum:i,onChange:u=(()=>{}),itemName:m="",disabled:b}=e;const p=n()("wc-block-components-quantity-selector",t),d=void 0!==i,O=c>a,j=!d||c{const t=void 0!==typeof e.key?"ArrowDown"===e.key:e.keyCode===s.DOWN,r=void 0!==typeof e.key?"ArrowUp"===e.key:e.keyCode===s.UP;t&&O&&(e.preventDefault(),u(c-1)),r&&j&&(e.preventDefault(),u(c+1))},[c,u,j,O]);return Object(r.createElement)("div",{className:p},Object(r.createElement)("input",{className:"wc-block-components-quantity-selector__input",disabled:b,type:"number",step:"1",min:"0",value:c,onKeyDown:_,onChange:e=>{let t=Number.isNaN(e.target.value)||!e.target.value?0:parseInt(e.target.value,10);d&&(t=Math.min(t,i)),t=Math.max(t,a),t!==c&&u(t)},"aria-label":Object(l.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(l.__)("Quantity of %s in your cart.","woo-gutenberg-products-block"),m)}),Object(r.createElement)("button",{"aria-label":Object(l.__)("Reduce quantity","woo-gutenberg-products-block"),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:b||!O,onClick:()=>{const e=c-1;u(e),Object(o.speak)(Object(l.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(l.__)("Quantity reduced to %s.","woo-gutenberg-products-block"),e))}},"-"),Object(r.createElement)("button",{"aria-label":Object(l.__)("Increase quantity","woo-gutenberg-products-block"),disabled:b||!j,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:()=>{const e=c+1;u(e),Object(o.speak)(Object(l.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(l.__)("Quantity increased to %s.","woo-gutenberg-products-block"),e))}},"+"))},u=c(139),m=c(156),b=c(9),p=c(6),d=c(98),O=c(75),j=c(87),_=c(52),y=c(26),g=c(41);var f=c(42),k=c(249),E=c(250),w=c(251),v=c(66),N=c(104),h=e=>{let{currency:t,saleAmount:c,format:a=""}=e;if(!c||c<=0)return null;a.includes("")||(a="",console.error("Price formats need to include the `` tag."));const n=Object(l.sprintf)( +/* translators: %s will be replaced by the discount amount */ +Object(l.__)("Save %s","woo-gutenberg-products-block"),a);return Object(r.createElement)(N.a,{className:"wc-block-components-sale-badge"},Object(r.createInterpolateElement)(n,{price:Object(r.createElement)(v.a,{currency:t,value:c})}))},C=c(252),x=c(48),I=c(22),P=c(133),S=c(2);const q=(e,t)=>e.convertPrecision(t.minorUnit).getAmount(),D=e=>Object(I.mustContain)(e,"");var A=Object(r.forwardRef)((e,t)=>{let{lineItem:c,onRemove:a=(()=>{}),tabIndex:s=null}=e;const{name:v="",catalog_visibility:N="visible",short_description:A="",description:R="",low_stock_remaining:T=null,show_backorder_badge:F=!1,quantity_limit:L=99,permalink:M="",images:U=[],variation:Q=[],item_data:V=[],prices:$={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}},totals:H={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_subtotal:"0",line_subtotal_tax:"0"},extensions:B}=c,{quantity:K,setItemQuantity:W,removeItem:J,isPendingDelete:Y}=(e=>{const t={key:"",quantity:1};(e=>Object(_.c)(e)&&Object(_.e)(e,"key")&&Object(_.e)(e,"quantity")&&Object(_.d)(e.key)&&Object(_.b)(e.quantity))(e)&&(t.key=e.key,t.quantity=e.quantity);const{key:c="",quantity:a=1}=t,{cartErrors:n}=Object(y.a)(),{dispatchActions:l}=Object(g.b)(),[o,s]=Object(r.useState)(a),[i]=Object(d.a)(o,400),u=Object(O.a)(i),{removeItemFromCart:m,changeCartItemQuantity:f}=Object(b.useDispatch)(p.CART_STORE_KEY),k=Object(b.useSelect)(e=>{if(!c)return{quantity:!1,delete:!1};const t=e(p.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(c),delete:t.isItemPendingDelete(c)}},[c]),E=Object(r.useCallback)(()=>c?m(c).then(()=>(Object(j.c)(),!0)):Promise.resolve(!1),[c,m]);return Object(r.useEffect)(()=>{c&&Object(_.b)(u)&&Number.isFinite(u)&&u!==i&&f(c,i)},[c,f,i,u]),Object(r.useEffect)(()=>(k.delete?l.incrementCalculating():l.decrementCalculating(),()=>{k.delete&&l.decrementCalculating()}),[l,k.delete]),Object(r.useEffect)(()=>(k.quantity||i!==o?l.incrementCalculating():l.decrementCalculating(),()=>{(k.quantity||i!==o)&&l.decrementCalculating()}),[l,k.quantity,i,o]),{isPendingDelete:k.delete,quantity:o,setItemQuantity:s,removeItem:E,cartItemQuantityErrors:n}})(c),{dispatchStoreEvent:z}=Object(f.a)(),{receiveCart:G,...X}=Object(y.a)(),Z=Object(r.useMemo)(()=>({context:"cart",cartItem:c,cart:X}),[c,X]),ee=Object(x.getCurrencyFromPriceResponse)($),te=Object(I.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:v,extensions:B,arg:Z}),ce=Object(P.a)({amount:parseInt($.raw_prices.regular_price,10),precision:$.raw_prices.precision}),re=Object(P.a)({amount:parseInt($.raw_prices.price,10),precision:$.raw_prices.precision}),ae=ce.subtract(re),ne=ae.multiply(K),le=Object(x.getCurrencyFromPriceResponse)(H);let oe=parseInt(H.line_subtotal,10);Object(S.getSetting)("displayCartPricesIncludingTax",!1)&&(oe+=parseInt(H.line_subtotal_tax,10));const se=Object(P.a)({amount:oe,precision:le.minorUnit}),ie=U.length?U[0]:{},ue="hidden"===N||"search"===N,me=Object(I.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:B,arg:Z}),be=Object(I.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:B,arg:Z,validation:D}),pe=Object(I.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:B,arg:Z,validation:D}),de=Object(I.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"",extensions:B,arg:Z,validation:D});return Object(r.createElement)("tr",{className:n()("wc-block-cart-items__row",me,{"is-disabled":Y}),ref:t,tabIndex:s},Object(r.createElement)("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(_.e)(ie,"alt")||!ie.alt},ue?Object(r.createElement)(k.a,{image:ie,fallbackAlt:te}):Object(r.createElement)("a",{href:M,tabIndex:-1},Object(r.createElement)(k.a,{image:ie,fallbackAlt:te}))),Object(r.createElement)("td",{className:"wc-block-cart-item__product"},Object(r.createElement)(m.a,{disabled:Y||ue,name:te,permalink:M}),F?Object(r.createElement)(E.a,null):!!T&&Object(r.createElement)(w.a,{lowStockRemaining:T}),Object(r.createElement)("div",{className:"wc-block-cart-item__prices"},Object(r.createElement)(u.a,{currency:ee,regularPrice:q(ce,ee),price:q(re,ee),format:pe})),Object(r.createElement)(h,{currency:ee,saleAmount:q(ae,ee),format:de}),Object(r.createElement)(C.a,{shortDescription:A,fullDescription:R,itemData:V,variation:Q}),Object(r.createElement)("div",{className:"wc-block-cart-item__quantity"},Object(r.createElement)(i,{disabled:Y,quantity:K,maximum:L,onChange:e=>{W(e),z("cart-set-item-quantity",{product:c,quantity:e})},itemName:te}),Object(r.createElement)("button",{className:"wc-block-cart-item__remove-link",onClick:()=>{a(),J(),z("cart-remove-item",{product:c,quantity:K}),Object(o.speak)(Object(l.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(l.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),te))},disabled:Y},Object(l.__)("Remove item","woo-gutenberg-products-block")))),Object(r.createElement)("td",{className:"wc-block-cart-item__total"},Object(r.createElement)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},Object(r.createElement)(u.a,{currency:le,format:be,price:se.getAmount()}),K>1&&Object(r.createElement)(h,{currency:ee,saleAmount:q(ne,ee),format:de}))))});const R=[...Array(3)].map((_x,e)=>Object(r.createElement)(A,{lineItem:{},key:e})),T=e=>{const t={};return e.forEach(e=>{let{key:c}=e;t[c]=Object(r.createRef)()}),t};t.a=e=>{let{lineItems:t=[],isLoading:c=!1,className:a}=e;const o=Object(r.useRef)(null),s=Object(r.useRef)(T(t));Object(r.useEffect)(()=>{s.current=T(t)},[t]);const i=e=>()=>{null!=s&&s.current&&e&&s.current[e].current instanceof HTMLElement?s.current[e].current.focus():o.current instanceof HTMLElement&&o.current.focus()},u=c?R:t.map((e,c)=>{const a=t.length>c+1?t[c+1].key:null;return Object(r.createElement)(A,{key:e.key,lineItem:e,onRemove:i(a),ref:s.current[e.key],tabIndex:-1})});return Object(r.createElement)("table",{className:n()("wc-block-cart-items",a),ref:o,tabIndex:-1},Object(r.createElement)("thead",null,Object(r.createElement)("tr",{className:"wc-block-cart-items__header"},Object(r.createElement)("th",{className:"wc-block-cart-items__header-image"},Object(r.createElement)("span",null,Object(l.__)("Product","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(r.createElement)("span",null,Object(l.__)("Details","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(r.createElement)("span",null,Object(l.__)("Total","woo-gutenberg-products-block"))))),Object(r.createElement)("tbody",null,u))}},191:function(e,t){},192:function(e,t){},193:function(e,t){},194:function(e,t){},195:function(e,t){},196:function(e,t){},200:function(e,t){},249:function(e,t,c){"use strict";var r=c(18),a=c.n(r),n=c(0),l=c(25),o=c(2);c(193),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(l.decodeEntities)(t.alt)||c||"Product Image"}:{src:o.PLACEHOLDER_IMG_SRC,alt:""};return Object(n.createElement)("img",a()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},250:function(e,t,c){"use strict";var r=c(0),a=c(1),n=c(104);t.a=()=>Object(r.createElement)(n.a,{className:"wc-block-components-product-backorder-badge"},Object(a.__)("Available on backorder","woo-gutenberg-products-block"))},251:function(e,t,c){"use strict";var r=c(0),a=c(1),n=c(104);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(n.a,{className:"wc-block-components-product-low-stock-badge"},Object(a.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(a.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},252:function(e,t,c){"use strict";var r=c(0),a=c(4),n=c(25);c(196);var l=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(a.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(n.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(n.decodeEntities)(e.display||e.value)))}))):null},o=c(157),s=c(84),i=e=>{let{className:t,shortDescription:c="",fullDescription:a=""}=e;const n=c||a;return n?Object(r.createElement)(o.a,{className:t,source:n,maxLength:15,countType:s.n.wordCountType||"words"}):null};c(195),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:a=[],variation:n=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(i,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(l,{details:a}),Object(r.createElement)(l,{details:n.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},369:function(e,t,c){"use strict";c.r(t);var r=c(0),a=c(26),n=c(160);t.default=e=>{let{className:t}=e;const{cartItems:c,cartIsLoading:l}=Object(a.a)();return Object(r.createElement)(n.a,{className:t,lineItems:c,isLoading:l})}},66:function(e,t,c){"use strict";var r=c(18),a=c.n(r),n=c(0),l=c(107),o=c(5),s=c.n(o);c(136);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:r,onValueChange:o,displayType:u="text",...m}=e;const b="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(b))return null;const p=b/10**r.minorUnit;if(!Number.isFinite(p))return null;const d=s()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),O={...m,...i(r),value:void 0,currency:void 0,onValueChange:void 0},j=o?e=>{const t=e.value*10**r.minorUnit;o(t)}:()=>{};return Object(n.createElement)(l.a,a()({className:d,displayType:u},O,{value:p,onValueChange:j}))}}}]); \ No newline at end of file diff --git a/build/cart-blocks/order-summary-frontend.js b/build/cart-blocks/order-summary-frontend.js new file mode 100644 index 00000000000..7fbf0da4c5c --- /dev/null +++ b/build/cart-blocks/order-summary-frontend.js @@ -0,0 +1,23 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[28],{108:function(e,t,n){"use strict";var c=n(0);t.a=function(e){let{srcElement:t,size:n=24,...a}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:n,height:n,...a}):null}},136:function(e,t){},137:function(e,t,n){"use strict";var c=n(18),a=n.n(c),o=n(0),s=n(62),r=n(5),l=n.n(r),i=n(106);n(188),t.a=e=>{let{className:t,showSpinner:n=!1,children:c,...r}=e;const p=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(o.createElement)(s.a,a()({className:p},r),n&&Object(o.createElement)(i.a,null),Object(o.createElement)("span",{className:"wc-block-components-button__text"},c))}},138:function(e,t){},188:function(e,t){},198:function(e,t,n){"use strict";var c=n(18),a=n.n(c),o=n(0),s=n(32);const r=Object(o.createElement)(e=>{let{className:t,size:n,...c}=e;return Object(o.createElement)(s.SVG,a()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},c),Object(o.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=r},203:function(e,t,n){"use strict";var c=n(18),a=n.n(c),o=n(0),s=n(5),r=n.n(s),l=n(1),i=n(108),p=n(198);n(138);var u=e=>{let{text:t,screenReaderText:n="",element:c="li",className:s="",radius:l="small",children:i=null,...p}=e;const u=c,b=r()(s,"wc-block-components-chip","wc-block-components-chip--radius-"+l),d=Boolean(n&&n!==t);return Object(o.createElement)(u,a()({className:b},p),Object(o.createElement)("span",{"aria-hidden":d,className:"wc-block-components-chip__text"},t),d&&Object(o.createElement)("span",{className:"screen-reader-text"},n),i)};t.a=e=>{let{ariaLabel:t="",className:n="",disabled:c=!1,onRemove:s=(()=>{}),removeOnAnyClick:b=!1,text:d,screenReaderText:m="",...g}=e;const O=b?"span":"button";if(!t){const e=m&&"string"==typeof m?m:d;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const j={"aria-label":t,disabled:c,onClick:s,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||s()}},h=b?j:{},E=b?{"aria-hidden":!0}:j;return Object(o.createElement)(u,a()({},g,h,{className:r()(n,"is-removable"),element:b?"button":g.element,screenReaderText:m,text:d}),Object(o.createElement)(O,a()({className:"wc-block-components-chip__remove"},E),Object(o.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},259:function(e,t){},260:function(e,t,n){"use strict";var c=n(0);t.a=e=>{let{label:t,secondaryLabel:n,description:a,secondaryDescription:o,id:s}=e;return Object(c.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(c.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(c.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),n&&Object(c.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},n)),Object(c.createElement)("div",{className:"wc-block-components-radio-control__description-group"},a&&Object(c.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},a),o&&Object(c.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},o)))}},261:function(e,t,n){"use strict";var c=n(18),a=n.n(c),o=n(0),s=n(5),r=n.n(s);n(8),n(262),t.a=e=>{let{children:t,className:n,headingLevel:c,...s}=e;const l=r()("wc-block-components-title",n),i="h"+c;return Object(o.createElement)(i,a()({className:l},s),t)}},262:function(e,t){},263:function(e,t,n){"use strict";var c=n(0),a=n(5),o=n.n(a),s=n(260);t.a=e=>{let{checked:t,name:n,onChange:a,option:r}=e;const{value:l,label:i,description:p,secondaryLabel:u,secondaryDescription:b}=r;return Object(c.createElement)("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${n}-${l}`},Object(c.createElement)("input",{id:`${n}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:n,value:l,onChange:e=>a(e.target.value),checked:t,"aria-describedby":o()({[`${n}-${l}__label`]:i,[`${n}-${l}__secondary-label`]:u,[`${n}-${l}__description`]:p,[`${n}-${l}__secondary-description`]:b})}),Object(c.createElement)(s.a,{id:`${n}-${l}`,label:i,secondaryLabel:u,description:p,secondaryDescription:b}))}},264:function(e,t){},268:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var c=n(0),a=(n(8),n(154));n(259);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:s,getValidationErrorId:r}=Object(a.b)();if(!t||"string"!=typeof t){const e=s(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(c.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(c.createElement)("p",{id:r(o)},t))}},269:function(e,t,n){"use strict";var c=n(0),a=n(5),o=n.n(a),s=n(21),r=n(263);n(270),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:n,id:a,selected:s,onChange:l,options:i=[]}=e;const p=a||n;return i.length&&Object(c.createElement)("div",{className:o()("wc-block-components-radio-control",t)},i.map(e=>Object(c.createElement)(r.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===s,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},270:function(e,t){},271:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var c=n(1),a=n(9),o=n(6),s=n(25),r=n(26),l=n(0),i=n(241),p=n(154),u=n(39);const b=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(r.a)(),{addErrorNotice:n}=Object(u.a)(),{addSnackbarNotice:b}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:n,setIsSuppressed:c}=Object(i.b)(),a=Object(l.useRef)(e);Object(l.useEffect)(()=>{a.current=e},[e]);const o=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeSnackbarNotice:n}),[n]),s=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,n)}}),[t]);return{notices:e,...o,...s,setIsSuppressed:c}})(),{setValidationErrors:d}=Object(p.b)();return{appliedCoupons:e,isLoading:t,...Object(a.useSelect)((e,t)=>{let{dispatch:a}=t;const r=e(o.CART_STORE_KEY),l=r.isApplyingCoupon(),i=r.isRemovingCoupon(),{applyCoupon:p,removeCoupon:u,receiveApplyingCoupon:m}=a(o.CART_STORE_KEY);return{applyCoupon:e=>{p(e).then(t=>{!0===t&&b(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{d({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),m("")})},removeCoupon:e=>{u(e).then(t=>{!0===t&&b(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{n(e.message,{id:"coupon-form"}),m("")})},isApplyingCoupon:l,isRemovingCoupon:i}},[n,b])}}},273:function(e,t){},274:function(e,t){},275:function(e,t){},276:function(e,t){},277:function(e,t){},282:function(e,t,n){"use strict";var c=n(0),a=n(1),o=n(27),s=n(153),r=n(22),l=n(304),i=n(26),p=n(28),u=n(5),b=n.n(u),d=n(25),m=n(37),g=n(17),O=n.n(g),j=n(95),h=n(42);const E=e=>{var t;return null===(t=e.find(e=>e.selected))||void 0===t?void 0:t.rate_id};var f=n(269),_=n(260),k=n(48),v=n(66),w=n(2);const y=e=>{const t=Object(w.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(d.decodeEntities)(e.name),value:e.rate_id,description:Object(c.createElement)(c.Fragment,null,Number.isFinite(t)&&Object(c.createElement)(v.a,{currency:Object(k.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(d.decodeEntities)(e.delivery_time))}};var C=e=>{let{className:t,noResultsMessage:n,onSelectRate:a,rates:o,renderOption:s=y,selected:r}=e;if(0===o.length)return n;if(o.length>1)return Object(c.createElement)(f.a,{className:t,onChange:e=>{a(e)},selected:r,options:o.map(s)});const{label:l,secondaryLabel:i,description:p,secondaryDescription:u}=s(o[0]);return Object(c.createElement)(_.a,{label:l,secondaryLabel:i,description:p,secondaryDescription:u})};n(277);var N=e=>{let{packageId:t,className:n,noResultsMessage:o,renderOption:s,packageData:l,collapsible:i=!1,collapse:p=!1,showItems:u=!1}=e;const{selectShippingRate:g,selectedShippingRate:f}=((e,t)=>{const{dispatchCheckoutEvent:n}=Object(h.a)(),{selectShippingRate:a,isSelectingRate:o}=Object(j.a)(),[s,r]=Object(c.useState)(()=>E(t)),l=Object(c.useRef)(t);return Object(c.useEffect)(()=>{O()(l.current,t)||(l.current=t,r(E(t)))},[t]),{selectShippingRate:Object(c.useCallback)(t=>{r(t),a(t,e),n("set-selected-shipping-rate",{shippingRateId:t})},[e,a,n]),selectedShippingRate:s,isSelectingRate:o}})(t,l.shipping_rates),_=Object(c.createElement)(c.Fragment,null,(u||i)&&Object(c.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),u&&Object(c.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(d.decodeEntities)(e.name),n=e.quantity;return Object(c.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(c.createElement)(m.a,{label:n>1?`${t} × ${n}`:""+t,screenReaderLabel:Object(a.sprintf)( +/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ +Object(a._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))}))),k=Object(c.createElement)(C,{className:n,noResultsMessage:o,rates:l.shipping_rates,onSelectRate:g,selected:f,renderOption:s});return i?Object(c.createElement)(r.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:_},k):Object(c.createElement)("div",{className:b()("wc-block-components-shipping-rates-control__package",n)},_,k)};const S=e=>{let{packages:t,collapse:n,showItems:a,collapsible:o,noResultsMessage:s,renderOption:r}=e;return t.length?Object(c.createElement)(c.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(c.createElement)(N,{key:t,packageId:t,packageData:l,collapsible:o,collapse:n,showItems:a,noResultsMessage:s,renderOption:r})})):null};t.a=e=>{let{shippingRates:t,shippingRatesLoading:n,className:u,collapsible:b=!1,noResultsMessage:d,renderOption:m}=e;Object(c.useEffect)(()=>{if(n)return;const e=Object(l.a)(t),c=Object(l.b)(t);1===e?Object(o.speak)(Object(a.sprintf)( +/* translators: %d number of shipping options found. */ +Object(a._n)("%d shipping option was found.","%d shipping options were found.",c,"woo-gutenberg-products-block"),c)):Object(o.speak)(Object(a.sprintf)( +/* translators: %d number of shipping packages packages. */ +Object(a._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(a.sprintf)( +/* translators: %d number of shipping options available. */ +Object(a._n)("%d shipping option was found","%d shipping options were found",c,"woo-gutenberg-products-block"),c))},[n,t]);const{extensions:g,receiveCart:O,...j}=Object(i.a)(),h={className:u,collapsible:b,noResultsMessage:d,renderOption:m,extensions:g,cart:j,components:{ShippingRatesControlPackage:N}},{isEditor:E}=Object(p.a)();return Object(c.createElement)(s.a,{isLoading:n,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},E?Object(c.createElement)(S,{packages:t,noResultsMessage:d,renderOption:m}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(r.ExperimentalOrderShippingPackages.Slot,h),Object(c.createElement)(r.ExperimentalOrderShippingPackages,null,Object(c.createElement)(S,{packages:t,noResultsMessage:d,renderOption:m}))))}},287:function(e,t){},288:function(e,t){},289:function(e,t){},290:function(e,t){},293:function(e,t,n){"use strict";var c=n(18),a=n.n(c),o=n(0),s=n(1),r=n(3),l=n(5),i=n.n(l),p=n(154),u=n(41),b=n(268),d=n(21),m=n(52),g=n(37);n(264);var O=Object(r.forwardRef)((e,t)=>{let{className:n,id:c,type:s="text",ariaLabel:r,ariaDescribedBy:l,label:p,screenReaderLabel:u,disabled:b,help:d,autoCapitalize:m="off",autoComplete:O="off",value:j="",onChange:h,required:E=!1,onBlur:f=(()=>{}),feedback:_,...k}=e;const[v,w]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:i()("wc-block-components-text-input",n,{"is-active":v||j})},Object(o.createElement)("input",a()({type:s,id:c,value:j,ref:t,autoCapitalize:m,autoComplete:O,onChange:e=>{h(e.target.value)},onFocus:()=>w(!0),onBlur:e=>{f(e.target.value),w(!1)},"aria-label":r||p,disabled:b,"aria-describedby":d&&!l?c+"__help":l,required:E},k)),Object(o.createElement)(g.a,{label:p,screenReaderLabel:u||p,wrapperElement:"label",wrapperProps:{htmlFor:c},htmlFor:c}),!!d&&Object(o.createElement)("p",{id:c+"__help",className:"wc-block-components-text-input__help"},d),_)});t.a=Object(d.withInstanceId)(e=>{let{className:t,instanceId:n,id:c,ariaDescribedBy:l,errorId:d,validateOnMount:g=!0,focusOnMount:j=!1,onChange:h,showError:E=!0,errorMessage:f="",..._}=e;const[k,v]=Object(r.useState)(!0),w=Object(r.useRef)(null),{getValidationError:y,hideValidationError:C,setValidationErrors:N,clearValidationError:S,getValidationErrorId:R}=Object(p.b)(),{isBeforeProcessing:x}=Object(u.b)(),I=void 0!==c?c:"textinput-"+n,L=void 0!==d?d:I,M=Object(r.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=w.current||null;if(!t)return;t.value=t.value.trim();const n=t.checkValidity();n?S(L):N({[L]:{message:t.validationMessage||Object(s.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[S,L,N]);Object(r.useEffect)(()=>{var e;k&&(j&&(null===(e=w.current)||void 0===e||e.focus()),v(!1))},[j,k,v]),Object(r.useEffect)(()=>{k&&(g&&M(),v(!1))},[k,v,g,M]),Object(r.useEffect)(()=>{x&&M()},[x,M]),Object(r.useEffect)(()=>()=>{S(L)},[S,L]);const T=y(L)||{};Object(m.d)(f)&&""!==f&&(T.message=f);const F=T.message&&!T.hidden,$=E&&F&&R(L)?R(L):l;return Object(o.createElement)(O,a()({className:i()(t,{"has-error":F}),"aria-invalid":!0===F,id:I,onBlur:()=>{M(!1)},feedback:E&&Object(o.createElement)(b.a,{errorMessage:f,propertyName:L}),ref:w,onChange:e=>{C(L),h(e)},ariaDescribedBy:$},_))})},304:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a}));const c=e=>e.length,a=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},309:function(e,t,n){"use strict";var c=n(0),a=n(293),o=n(18),s=n.n(o),r=n(84),l=n(1),i=n(25),p=n(5),u=n.n(p),b=n(21),d=n(380),m=n(154),g=n(268),O=n(52);n(275);var j=Object(b.withInstanceId)(e=>{let{id:t,className:n,label:a,onChange:o,options:s,value:r,required:i=!1,errorMessage:p=Object(l.__)("Please select a value.","woo-gutenberg-products-block"),errorId:b,instanceId:j="0",autoComplete:h="off"}=e;const{getValidationError:E,setValidationErrors:f,clearValidationError:_}=Object(m.b)(),k=Object(c.useRef)(null),v=t||"control-"+j,w=b||v,y=E(w)||{message:"",hidden:!1};return Object(c.useEffect)(()=>(!i||r?_(w):f({[w]:{message:p,hidden:!0}}),()=>{_(w)}),[_,r,w,p,i,f]),Object(c.createElement)("div",{id:v,className:u()("wc-block-components-combobox",n,{"is-active":r,"has-error":y.message&&!y.hidden}),ref:k},Object(c.createElement)(d.a,{className:"wc-block-components-combobox-control",label:a,onChange:o,onFilterValueChange:e=>{if(e.length){const t=Object(O.c)(k.current)?k.current.ownerDocument.activeElement:void 0;if(t&&Object(O.c)(k.current)&&k.current.contains(t))return;const n=e.toLocaleUpperCase(),c=s.find(e=>e.label.toLocaleUpperCase().startsWith(n)||e.value.toLocaleUpperCase()===n);c&&o(c.value)}},options:s,value:r||"",allowReset:!1,autoComplete:h,"aria-invalid":y.message&&!y.hidden}),Object(c.createElement)(g.a,{propertyName:w}))});n(274);var h=e=>{let{className:t,countries:n,id:a,label:o,onChange:s,value:r="",autoComplete:p="off",required:b=!1,errorId:d,errorMessage:m=Object(l.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(c.useMemo)(()=>Object.keys(n).map(e=>({value:e,label:Object(i.decodeEntities)(n[e])})),[n]);return Object(c.createElement)("div",{className:u()(t,"wc-block-components-country-input")},Object(c.createElement)(j,{id:a,label:o,onChange:s,options:g,value:r,errorId:d,errorMessage:m,required:b,autoComplete:p}),"off"!==p&&Object(c.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:r,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),n=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);s(n?n.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},E=e=>Object(c.createElement)(h,s()({countries:r.g},e)),f=e=>Object(c.createElement)(h,s()({countries:r.a},e));n(276);const _=(e,t)=>{const n=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return n?n.value:""};var k=e=>{let{className:t,id:n,states:o,country:s,label:r,onChange:p,autoComplete:b="off",value:d="",required:m=!1}=e;const g=o[s],O=Object(c.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),h=Object(c.useCallback)(e=>{p(O.length>0?_(e,O):e)},[p,O]),E=Object(c.useRef)(d);return Object(c.useEffect)(()=>{E.current!==d&&(E.current=d)},[d]),Object(c.useEffect)(()=>{if(O.length>0&&E.current){const e=_(E.current,O);e!==E.current&&h(e)}},[O,h]),O.length>0?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(j,{className:u()(t,"wc-block-components-state-input"),id:n,label:r,onChange:h,options:O,value:d,errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:b}),"off"!==b&&Object(c.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:b,value:d,onChange:e=>h(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(c.createElement)(a.a,{className:t,id:n,label:r,onChange:h,autoComplete:b,value:d,required:m})},v=e=>Object(c.createElement)(k,s()({states:r.h},e)),w=e=>Object(c.createElement)(k,s()({states:r.b},e)),y=n(33),C=n(2),N=n(67);t.a=Object(b.withInstanceId)(e=>{let{id:t,fields:n=Object.keys(C.defaultAddressFields),fieldConfig:o={},instanceId:s,onChange:r,type:i="shipping",values:p}=e;const{getValidationError:u,setValidationErrors:b,clearValidationError:d}=Object(m.b)(),g=Object(y.a)(n),O=u("shipping-missing-country")||{},j=Object(c.useMemo)(()=>Object(N.a)(g,o,p.country),[g,o,p.country]);return Object(c.useEffect)(()=>{j.forEach(e=>{e.hidden&&p[e.key]&&r({...p,[e.key]:""})})},[j,r,p]),Object(c.useEffect)(()=>{"shipping"===i&&((e,t,n,c)=>{c||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(l.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),c&&e.country&&n("shipping-missing-country")})(p,b,d,!!O.message&&!O.hidden)},[p,O.message,O.hidden,b,d,i]),t=t||s,Object(c.createElement)("div",{id:t,className:"wc-block-components-address-form"},j.map(e=>{if(e.hidden)return null;if("country"===e.key){const n="shipping"===i?E:f;return Object(c.createElement)(n,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:p.country,autoComplete:e.autocomplete,onChange:e=>r({...p,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const n="shipping"===i?v:w;return Object(c.createElement)(n,{key:e.key,id:`${t}-${e.key}`,country:p.country,label:e.required?e.label:e.optionalLabel,value:p.state,autoComplete:e.autocomplete,onChange:e=>r({...p,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(c.createElement)(a.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:p[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>r({...p,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},335:function(e,t,n){"use strict";var c=n(0),a=n(1),o=n(153),s=n(203),r=(n(8),n(22)),l=n(2);n(287);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:n,isRemovingCoupon:p,removeCoupon:u,values:b}=e;const{total_discount:d,total_discount_tax:m}=b,g=parseInt(d,10);if(!g&&0===t.length)return null;const O=parseInt(m,10),j=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?g+O:g,h=Object(r.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(c.createElement)(r.TotalsItem,{className:"wc-block-components-totals-discount",currency:n,description:0!==h.length&&Object(c.createElement)(o.a,{screenReaderLabel:Object(a.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:p,showSpinner:!1},Object(c.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},h.map(e=>Object(c.createElement)(s.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(a.sprintf)( +/* translators: %s Coupon code. */ +Object(a.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:p,onRemove:()=>{u(e.code)},radius:"large",ariaLabel:Object(a.sprintf)( +/* translators: %s is a coupon code. */ +Object(a.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:j?Object(a.__)("Discount","woo-gutenberg-products-block"):Object(a.__)("Coupons","woo-gutenberg-products-block"),value:j?-1*j:"-"})}},336:function(e,t,n){"use strict";var c=n(0),a=n(1),o=n(137),s=n(293),r=n(37),l=n(153),i=(n(8),n(21)),p=n(154),u=n(268),b=n(22);n(288),t.a=Object(i.withInstanceId)(e=>{let{instanceId:t,isLoading:n=!1,initialOpen:i=!1,onSubmit:d=(()=>{})}=e;const[m,g]=Object(c.useState)(""),O=Object(c.useRef)(!1),{getValidationError:j,getValidationErrorId:h}=Object(p.b)(),E=j("coupon");Object(c.useEffect)(()=>{O.current!==n&&(n||!m||E||g(""),O.current=n)},[n,m,E]);const f="wc-block-components-totals-coupon__input-"+t;return Object(c.createElement)(b.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:i,title:Object(c.createElement)(r.a,{label:Object(a.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:f})},Object(c.createElement)(l.a,{screenReaderLabel:Object(a.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:n,showSpinner:!1},Object(c.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(c.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(c.createElement)(s.a,{id:f,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(a.__)("Enter code","woo-gutenberg-products-block"),value:m,ariaDescribedBy:h(f),onChange:e=>{g(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),Object(c.createElement)(o.a,{className:"wc-block-components-totals-coupon__button",disabled:n||!m,showSpinner:n,onClick:e=>{e.preventDefault(),d(m)},type:"submit"},Object(a.__)("Apply","woo-gutenberg-products-block"))),Object(c.createElement)(u.a,{propertyName:"coupon",elementId:f}))))})},340:function(e,t,n){"use strict";var c=n(0),a=n(1),o=n(66),s=(n(8),n(22)),r=n(26),l=n(2);n(290),t.a=e=>{let{currency:t,values:n}=e;const i=Object(l.getSetting)("taxesEnabled",!0)&&Object(l.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:u}=n,{receiveCart:b,...d}=Object(r.a)(),m=Object(s.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(a.__)("Total","woo-gutenberg-products-block"),extensions:d.extensions,arg:{cart:d}}),g=parseInt(u,10);return Object(c.createElement)(s.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:m,value:parseInt(p,10),description:i&&0!==g&&Object(c.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(c.createInterpolateElement)(Object(a.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(c.createElement)(o.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},356:function(e,t,n){"use strict";var c=n(18),a=n.n(c),o=n(0),s=n(5),r=n.n(s),l=n(1),i=n(26),p=n(22),u=n(2),b=n(25);const d=e=>{let{selectedShippingRates:t}=e;return Object(o.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(l.__)("via","woo-gutenberg-products-block")," ",Object(b.decodeEntities)(t.join(", ")))};var m=n(132),g=n(282),O=e=>{let{hasRates:t,shippingRates:n,shippingRatesLoading:c}=e;const a=t?Object(l.__)("Shipping options","woo-gutenberg-products-block"):Object(l.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(o.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(o.createElement)("legend",{className:"screen-reader-text"},a),Object(o.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(o.createElement)(m.a,{isDismissible:!1,className:r()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(l.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:n,shippingRatesLoading:c}))},j=n(51),h=n(137),E=n(17),f=n.n(E),_=n(154),k=(n(273),n(309)),v=e=>{let{address:t,onUpdate:n,addressFields:c}=e;const[a,s]=Object(o.useState)(t),{hasValidationErrors:r,showAllValidationErrors:i}=Object(_.b)();return Object(o.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(o.createElement)(k.a,{fields:c,onChange:s,values:a}),Object(o.createElement)(h.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:f()(a,t),onClick:e=>{if(e.preventDefault(),i(),!r)return n(a)},type:"submit"},Object(l.__)("Update","woo-gutenberg-products-block")))},w=e=>{let{onUpdate:t=(()=>{}),addressFields:n=["country","state","city","postcode"]}=e;const{shippingAddress:c,setShippingAddress:a}=Object(j.b)();return Object(o.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(o.createElement)(v,{address:c,addressFields:n,onUpdate:e=>{a(e),t(e)}}))},y=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const n=Object(u.getSetting)("shippingCountries",{}),c=Object(u.getSetting)("shippingStates",{}),a="string"==typeof n[t.country]?Object(b.decodeEntities)(n[t.country]):"",s="object"==typeof c[t.country]&&"string"==typeof c[t.country][t.state]?Object(b.decodeEntities)(c[t.country][t.state]):t.state,r=[];r.push(t.postcode.toUpperCase()),r.push(t.city),r.push(s),r.push(a);const i=r.filter(Boolean).join(", ");return i?Object(o.createElement)("span",{className:"wc-block-components-shipping-address"},Object(l.sprintf)( +/* translators: %s location. */ +Object(l.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" "):null};n(289);const C=e=>{let{label:t=Object(l.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c}=e;return Object(o.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{c(!n)},"aria-expanded":n},t)},N=e=>{let{showCalculator:t,isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c,shippingAddress:a}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(y,{address:a}),t&&Object(o.createElement)(C,{label:Object(l.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c}))},S=e=>{let{showCalculator:t,isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c}=e;return t?Object(o.createElement)(C,{isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c}):Object(o.createElement)("em",null,Object(l.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:n,showCalculator:c=!0,showRateSelector:s=!0,className:b}=e;const[m,g]=Object(o.useState)(!1),{shippingAddress:j,cartHasCalculatedShipping:h,shippingRates:E,shippingRatesLoading:f}=Object(i.a)(),_=Object(u.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(n.total_shipping,10)+parseInt(n.total_shipping_tax,10):parseInt(n.total_shipping,10),k=E.some(e=>e.shipping_rates.length)||_,v={isShippingCalculatorOpen:m,setIsShippingCalculatorOpen:g},y=E.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(o.createElement)("div",{className:r()("wc-block-components-totals-shipping",b)},Object(o.createElement)(p.TotalsItem,{label:Object(l.__)("Shipping","woo-gutenberg-products-block"),value:h?_:Object(o.createElement)(S,a()({showCalculator:c},v)),description:Object(o.createElement)(o.Fragment,null,h&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d,{selectedShippingRates:y}),Object(o.createElement)(N,a()({shippingAddress:j,showCalculator:c},v)))),currency:t}),c&&m&&Object(o.createElement)(w,{onUpdate:()=>{g(!1)}}),s&&h&&Object(o.createElement)(O,{hasRates:k,shippingRates:E,shippingRatesLoading:f}))}},37:function(e,t,n){"use strict";var c=n(0),a=n(5),o=n.n(a);t.a=e=>{let t,{label:n,screenReaderLabel:a,wrapperElement:s,wrapperProps:r={}}=e;const l=null!=n,i=null!=a;return!l&&i?(t=s||"span",r={...r,className:o()(r.className,"screen-reader-text")},Object(c.createElement)(t,r,a)):(t=s||c.Fragment,l&&i&&n!==a?Object(c.createElement)(t,r,Object(c.createElement)("span",{"aria-hidden":"true"},n),Object(c.createElement)("span",{className:"screen-reader-text"},a)):Object(c.createElement)(t,r,n))}},381:function(e,t,n){"use strict";n.r(t);var c=n(134),a=n(0),o=n(1),s=n(335),r=n(336),l=n(356),i=n(340),p=n(22),u=n(48),b=n(26),d=n(271),m=n(2),g=n(261),O={isShippingCalculatorEnabled:{type:"boolean",default:Object(m.getSetting)("isShippingCalculatorEnabled",!0)},showRateAfterTaxName:{type:"boolean",default:Object(m.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{move:!0,remove:!0}}};t.default=Object(c.withFilteredAttributes)(O)(e=>{let{className:t,showRateAfterTaxName:n=!1,isShippingCalculatorEnabled:c=!0}=e;const{cartFees:O,cartTotals:j,cartNeedsShipping:h}=Object(b.a)(),{applyCoupon:E,removeCoupon:f,isApplyingCoupon:_,isRemovingCoupon:k,appliedCoupons:v}=Object(d.a)(),w=Object(u.getCurrencyFromPriceResponse)(j),{extensions:y,receiveCart:C,...N}=Object(b.a)(),S={extensions:y,cart:N},R={extensions:y,cart:N};return Object(a.createElement)("div",{className:t},Object(a.createElement)(g.a,{headingLevel:"2",className:"wc-block-cart__totals-title"},Object(o.__)("Cart totals","woo-gutenberg-products-block")),Object(a.createElement)(p.TotalsWrapper,null,Object(a.createElement)(p.Subtotal,{currency:w,values:j}),Object(a.createElement)(p.TotalsFees,{currency:w,cartFees:O}),Object(a.createElement)(s.a,{cartCoupons:v,currency:w,isRemovingCoupon:k,removeCoupon:f,values:j})),Object(m.getSetting)("couponsEnabled",!0)&&Object(a.createElement)(p.TotalsWrapper,null,Object(a.createElement)(r.a,{onSubmit:E,isLoading:_})),Object(a.createElement)(p.ExperimentalDiscountsMeta.Slot,R),h&&Object(a.createElement)(p.TotalsWrapper,null,Object(a.createElement)(l.a,{showCalculator:c,showRateSelector:!0,values:j,currency:w})),!Object(m.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(j.total_tax,10)>0&&Object(a.createElement)(p.TotalsWrapper,null,Object(a.createElement)(p.TotalsTaxes,{showRateAfterTaxName:n,currency:w,values:j})),Object(a.createElement)(p.TotalsWrapper,null,Object(a.createElement)(i.a,{currency:w,values:j})),Object(a.createElement)(p.ExperimentalOrderMeta.Slot,S))})},66:function(e,t,n){"use strict";var c=n(18),a=n.n(c),o=n(0),s=n(107),r=n(5),l=n.n(r);n(136);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:c,onValueChange:r,displayType:p="text",...u}=e;const b="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(b))return null;const d=b/10**c.minorUnit;if(!Number.isFinite(d))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...u,...i(c),value:void 0,currency:void 0,onValueChange:void 0},O=r?e=>{const t=e.value*10**c.minorUnit;r(t)}:()=>{};return Object(o.createElement)(s.a,a()({className:m,displayType:p},g,{value:d,onValueChange:O}))}}}]); \ No newline at end of file diff --git a/build/cart-blocks/totals-frontend.js b/build/cart-blocks/totals-frontend.js new file mode 100644 index 00000000000..24dbdcfea90 --- /dev/null +++ b/build/cart-blocks/totals-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[29],{333:function(e,c){},334:function(e,c,t){"use strict";var a=t(0),n=t(3),s=t(5),r=t.n(s);const l=Object(n.forwardRef)((e,c)=>{let{children:t,className:n=""}=e;return Object(a.createElement)("div",{ref:c,className:r()("wc-block-components-sidebar",n)},t)});c.a=l},370:function(e,c,t){"use strict";t.r(c);var a=t(0),n=t(5),s=t.n(n),r=t(334);t(333),c.default=e=>{let{children:c,className:t}=e;return Object(a.createElement)(r.a,{className:s()("wc-block-cart__sidebar",t)},c)}}}]); \ No newline at end of file diff --git a/build/cart-frontend.asset.php b/build/cart-frontend.asset.php new file mode 100644 index 00000000000..6a667dab704 --- /dev/null +++ b/build/cart-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'f34bf5893e98f2858932f77e4486cd37'); \ No newline at end of file diff --git a/build/cart-frontend.js b/build/cart-frontend.js new file mode 100644 index 00000000000..11e7c3e17ac --- /dev/null +++ b/build/cart-frontend.js @@ -0,0 +1,5 @@ +!function(e){function t(t){for(var r,o,i=t[0],c=t[1],a=0,u=[];a=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r.d(t,"a",(function(){return n}))},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t{const t=e.detail;t&&t.preserveCartData||Object(c.dispatch)(i.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",f),document.body.addEventListener("wc-blocks_removed_from_cart",f),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",f),document.body.removeEventListener("wc-blocks_removed_from_cart",f)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},h={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},b={...h,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:i.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},v=e=>Object(s.a)(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(a.decodeEntities)(r)]})),y={cartCoupons:i.EMPTY_CART_COUPONS,cartItems:i.EMPTY_CART_ITEMS,cartFees:i.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:i.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:i.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:h,shippingRates:i.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:i.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:i.EMPTY_EXTENSIONS},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),a=null==r?void 0:r.previewCart,{shouldSelect:s}=e,d=Object(o.useRef)();m();const f=Object(c.useSelect)((e,r)=>{let{dispatch:n}=r;if(!s)return y;if(t)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:i.EMPTY_CART_ITEM_ERRORS,cartTotals:a.totals,cartIsLoading:!1,cartErrors:i.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:h,extensions:i.EMPTY_EXTENSIONS,shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:()=>{}};const o=e(i.CART_STORE_KEY),c=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),f=!o.hasFinishedResolution("getCartData"),p=o.isCustomerDataUpdating(),{receiveCart:m}=n(i.CART_STORE_KEY),g=v(c.billingAddress),O=c.needsShipping?v(c.shippingAddress):g,E=c.fees.length>0?c.fees.map(e=>v(e)):i.EMPTY_CART_FEES;return{cartCoupons:c.coupons.length>0?c.coupons.map(e=>({...e,label:e.code})):i.EMPTY_CART_COUPONS,cartItems:c.items,cartFees:E,cartItemsCount:c.itemsCount,cartItemsWeight:c.itemsWeight,cartNeedsPayment:c.needsPayment,cartNeedsShipping:c.needsShipping,cartItemErrors:c.errors,cartTotals:d,cartIsLoading:f,cartErrors:l,billingAddress:Object(u.a)(g),shippingAddress:Object(u.a)(O),extensions:c.extensions,shippingRates:c.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:c.hasCalculatedShipping,paymentRequirements:c.paymentRequirements,receiveCart:m}},[s]);return d.current&&Object(n.isEqual)(d.current,f)||(d.current=f),d.current}},function(e,t){e.exports=window.wp.a11y},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0);r(9);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),i=()=>Object(n.useContext)(o)},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.dom},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return d}));var n=r(52);let o,i;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(i||(i={}));const c=(e,t)=>Object(n.c)(e)&&"type"in e&&e.type===t,a=e=>c(e,o.SUCCESS),s=e=>c(e,o.ERROR),u=e=>c(e,o.FAIL),l=e=>!Object(n.c)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:i,shouldRetry:l,isSuccessResponse:a,isErrorResponse:s,isFailResponse:u})},function(e,t){e.exports=window.wp.primitives},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=r(17),i=r.n(o);function c(e){const t=Object(n.useRef)(e);return i()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";var n=r(29),o=r.n(n),i=r(0),c=r(3),a=r(1),s=r(84),u=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:r=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:c=Object(a.__)("Error:","woo-gutenberg-products-block"),button:u}=e;return Object(i.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(i.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(i.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(i.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(i.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(i.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},c?c+" ":"",o),u&&Object(i.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},u)))};r(55);class l extends c.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:o,renderError:c,button:a}=this.props,{errorMessage:s,hasError:l}=this.state;return l?"function"==typeof c?c({errorMessage:s}):Object(i.createElement)(u,{errorMessage:r?s:null,header:e,imageUrl:t,text:n,errorMessagePrefix:o,button:a}):this.props.children}}t.a=l},,function(e,t,r){"use strict";(function(e){var n=r(0),o=(r(60),Object(n.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,r(77))},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(80);const i=()=>{const{notices:e,createNotice:t,removeNotice:r,setIsSuppressed:i}=Object(o.b)(),c=Object(n.useRef)(e);Object(n.useEffect)(()=>{c.current=e},[e]);const a=Object(n.useMemo)(()=>({hasNoticesOfType:e=>c.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;c.current.forEach(t=>{null!==e&&t.status!==e||r(t.id)})},removeNotice:r}),[r]),s=Object(n.useMemo)(()=>({addDefaultNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...r})},addErrorNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...r})},addWarningNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...r})},addInfoNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...r})},addSuccessNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...r})}}),[t]);return{notices:e,...a,...s,setIsSuppressed:i}}},function(e,t){e.exports=window.wp.deprecated},function(e,t,r){"use strict";r.d(t,"b",(function(){return T})),r.d(t,"a",(function(){return P}));var n=r(0),o=r(1),i=r(75),c=r(40),a=r.n(c),s=r(52);let u;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(u||(u={}));const l=()=>({type:u.SET_IDLE}),d=e=>({type:u.SET_REDIRECT_URL,redirectUrl:e}),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:u.SET_COMPLETE,data:e}},p=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?u.SET_HAS_ERROR:u.SET_NO_ERROR}};var m=r(2);let h;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(h||(h={}));const b={order_id:0,customer_id:0,...Object(m.getSetting)("checkoutData",{})||{}},g={redirectUrl:"",status:h.PRISTINE,hasError:!1,calculatingCount:0,orderId:b.order_id,orderNotes:"",customerId:b.customer_id,shouldCreateAccount:!1,processingResponse:null,extensionData:{}},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,{redirectUrl:t,type:r,customerId:n,orderId:o,orderNotes:i,extensionData:c,shouldCreateAccount:a,data:s}=arguments.length>1?arguments[1]:void 0,l=e;switch(r){case u.SET_PRISTINE:l=g;break;case u.SET_IDLE:l=e.status!==h.IDLE?{...e,status:h.IDLE}:e;break;case u.SET_REDIRECT_URL:l=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case u.SET_PROCESSING_RESPONSE:l={...e,processingResponse:s};break;case u.SET_COMPLETE:l=e.status!==h.COMPLETE?{...e,status:h.COMPLETE,redirectUrl:void 0!==s&&"string"==typeof s.redirectUrl&&s.redirectUrl?s.redirectUrl:e.redirectUrl}:e;break;case u.SET_PROCESSING:l=e.status!==h.PROCESSING?{...e,status:h.PROCESSING,hasError:!1}:e,l=!1===l.hasError?l:{...l,hasError:!1};break;case u.SET_BEFORE_PROCESSING:l=e.status!==h.BEFORE_PROCESSING?{...e,status:h.BEFORE_PROCESSING,hasError:!1}:e;break;case u.SET_AFTER_PROCESSING:l=e.status!==h.AFTER_PROCESSING?{...e,status:h.AFTER_PROCESSING}:e;break;case u.SET_HAS_ERROR:l=e.hasError?e:{...e,hasError:!0},l=e.status===h.PROCESSING||e.status===h.BEFORE_PROCESSING?{...l,status:h.IDLE}:l;break;case u.SET_NO_ERROR:l=e.hasError?{...e,hasError:!1}:e;break;case u.INCREMENT_CALCULATING:l={...e,calculatingCount:e.calculatingCount+1};break;case u.DECREMENT_CALCULATING:l={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case u.SET_CUSTOMER_ID:l=void 0!==n?{...e,customerId:n}:e;break;case u.SET_ORDER_ID:l=void 0!==o?{...e,orderId:o}:e;break;case u.SET_SHOULD_CREATE_ACCOUNT:void 0!==a&&a!==e.shouldCreateAccount&&(l={...e,shouldCreateAccount:a});break;case u.SET_ORDER_NOTES:void 0!==i&&e.orderNotes!==i&&(l={...e,orderNotes:i});break;case u.SET_EXTENSION_DATA:void 0!==c&&e.extensionData!==c&&(l={...e,extensionData:c})}return l!==e&&r!==u.SET_PRISTINE&&l.status===h.PRISTINE&&(l.status=h.IDLE),l};var y=r(25),O=r(78),E=r(159);var S=r(161),j=r(154),w=r(39),_=r(42),k=r(9),C=r(31);const R=Object(n.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),T=()=>Object(n.useContext)(R),P=e=>{let{children:t,redirectUrl:r,isCart:c=!1}=e;g.redirectUrl=r;const[m,b]=Object(n.useReducer)(v,g),{setValidationErrors:T}=Object(j.b)(),{addErrorNotice:P,removeNotices:x}=Object(w.a)(),{dispatchCheckoutEvent:A}=Object(_.a)(),M=m.calculatingCount>0,{isSuccessResponse:N,isErrorResponse:I,isFailResponse:D,shouldRetry:F}=Object(C.c)(),{checkoutNotices:L,paymentNotices:B,expressPaymentNotices:V}=(()=>{const{noticeContexts:e}=Object(C.c)();return{checkoutNotices:Object(k.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(k.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(k.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[U,H]=Object(n.useReducer)(O.b,{}),G=Object(n.useRef)(U),{onCheckoutAfterProcessingWithSuccess:z,onCheckoutAfterProcessingWithError:q,onCheckoutValidationBeforeProcessing:W}=(e=>Object(n.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(E.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(E.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(E.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(n.useEffect)(()=>{G.current=U},[U]);const Y=Object(n.useMemo)(()=>function(){return a()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),W(...arguments)},[W]),X=Object(n.useMemo)(()=>({resetCheckout:()=>{b({type:u.SET_PRISTINE})},setRedirectUrl:e=>{b(d(e))},setHasError:e=>{b(p(e))},incrementCalculating:()=>{b({type:u.INCREMENT_CALCULATING})},decrementCalculating:()=>{b({type:u.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;b((t=e,{type:u.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{b((e=>({type:u.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{b((e=>({type:u.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{b((e=>({type:u.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:r,value:n}=e;t.paymentDetails[r]=Object(y.decodeEntities)(n)})),"message"in e&&(t.message=Object(y.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var r;t.redirectUrl&&b(d(t.redirectUrl)),b((r=t,{type:u.SET_PROCESSING_RESPONSE,data:r})),b({type:u.SET_AFTER_PROCESSING})}}),[]);Object(n.useEffect)(()=>{m.status===h.BEFORE_PROCESSING&&(x("error"),Object(S.a)(G.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;P(t),T(r)}),b(l()),b(p())):b({type:u.SET_PROCESSING})}))},[m.status,T,P,x,b]);const K=Object(i.a)(m.status),$=Object(i.a)(m.hasError);Object(n.useEffect)(()=>{if((m.status!==K||m.hasError!==$)&&m.status===h.AFTER_PROCESSING){const e={redirectUrl:m.redirectUrl,orderId:m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,processingResponse:m.processingResponse};m.hasError?Object(S.b)(G.current,"checkout_after_processing_with_error",e).then(t=>{const r=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message){const r=e.messageContext?{context:e.messageContext}:void 0;t=e,P(e.message,r)}}),t})(t);if(null!==r)F(r)?b(l()):b(f(r));else{if(!(L.some(e=>"error"===e.status)||V.some(e=>"error"===e.status)||B.some(e=>"error"===e.status))){var n;const t=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");P(t,{id:"checkout"})}b(l())}}):Object(S.b)(G.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,r=null;if(e.forEach(e=>{N(e)&&(t=e),(I(e)||D(e))&&(r=e)}),t&&!r)b(f(t));else if(Object(s.c)(r)){if(r.message){const e=r.messageContext?{context:r.messageContext}:void 0;P(r.message,e)}F(r)?b(p(!0)):b(f(r))}else b(f())})}},[m.status,m.hasError,m.redirectUrl,m.orderId,m.customerId,m.orderNotes,m.processingResponse,K,$,X,P,I,D,N,F,L,V,B]);const J={onSubmit:Object(n.useCallback)(()=>{A("submit"),b({type:u.SET_BEFORE_PROCESSING})},[A]),isComplete:m.status===h.COMPLETE,isIdle:m.status===h.IDLE,isCalculating:M,isProcessing:m.status===h.PROCESSING,isBeforeProcessing:m.status===h.BEFORE_PROCESSING,isAfterProcessing:m.status===h.AFTER_PROCESSING,hasError:m.hasError,redirectUrl:m.redirectUrl,onCheckoutBeforeProcessing:Y,onCheckoutValidationBeforeProcessing:W,onCheckoutAfterProcessingWithSuccess:z,onCheckoutAfterProcessingWithError:q,dispatchActions:X,isCart:c,orderId:m.orderId,hasOrder:!!m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,shouldCreateAccount:m.shouldCreateAccount,setShouldCreateAccount:e=>{return b((t=e,{type:u.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:m.extensionData};return Object(n.createElement)(R.Provider,{value:J},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(58),o=r(0),i=r(26);const c=()=>{const e=Object(i.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},,function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r!(!function(e){return"email"in e}(t)||Object(l.c)(t)===Object(l.c)(e))||!!t.country&&!u()(Object(l.b)(e),Object(l.b)(t));var h=r(41);const b=Object(n.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>null,setShippingAddress:()=>null,shippingAsBilling:!0,setShippingAsBilling:()=>null}),g=()=>Object(n.useContext)(b),v=e=>{let{children:t}=e;const{billingData:r,shippingAddress:s,setBillingData:l,setShippingAddress:g}=(()=>{const{updateCustomerData:e}=Object(i.useDispatch)(c.CART_STORE_KEY),{addErrorNotice:t,removeNotice:r}=Object(p.a)(),{billingAddress:o,shippingAddress:s}=Object(f.a)(),[l,h]=Object(n.useState)({billingData:o,shippingAddress:s}),[b,g]=Object(n.useState)(!1);!b&&m(l.shippingAddress,s)&&(h({billingData:o,shippingAddress:s}),g(!0));const v=Object(n.useRef)(l),[y]=Object(a.a)(l,1e3,{equalityFn:(e,t)=>u()(e.billingData,t.billingData)&&u()(e.shippingAddress,t.shippingAddress)}),O=Object(n.useCallback)(e=>{h(t=>({...t,billingData:{...t.billingData,...e}}))},[]),E=Object(n.useCallback)(e=>{h(t=>({...t,shippingAddress:{...t.shippingAddress,...e}}))},[]);return Object(n.useEffect)(()=>{const n=m(v.current.billingData,y.billingData),o=m(v.current.shippingAddress,y.shippingAddress);if(!n&&!o)return;const i={};n&&(i.billing_address=y.billingData),o&&(i.shipping_address=y.shippingAddress),v.current=y,e(i).then(()=>{r("checkout")}).catch(e=>{t(Object(d.b)(e),{id:"checkout"})})},[y,t,r,e]),{billingData:l.billingData,shippingAddress:l.shippingAddress,setBillingData:O,setShippingAddress:E}})(),{cartNeedsShipping:v}=Object(f.a)(),{customerId:y}=Object(h.b)(),[O,E]=Object(n.useState)(()=>{return v&&(!y||(e=s,t=r,Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r])));var e,t}),S={billingData:r,shippingAddress:s,setBillingData:l,setShippingAddress:g,shippingAsBilling:O,setShippingAsBilling:E};return Object(n.createElement)(b.Provider,{value:S},t)}},function(e,t){e.exports=window.wp.keycodes},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.wc.priceFormat},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(44);function o(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return w})),r.d(t,"a",(function(){return _}));var n=r(0),o=r(17),i=r.n(o),c=r(81);const a=e=>Object(c.a)(e.map(e=>{var t;let{package_id:r,shipping_rates:n}=e;return[r,null===(t=n.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})),s={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},u={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},l={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:s,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},d=(e,t)=>{let{type:r}=t;return Object.values(s).includes(r)?r:e};var f=r(78),p=r(159);const m=e=>({onSuccess:Object(p.a)("shipping_rates_success",e),onFail:Object(p.a)("shipping_rates_fail",e),onSelectSuccess:Object(p.a)("shipping_rate_select_success",e),onSelectFail:Object(p.a)("shipping_rate_select_fail",e)});var h=r(161),b=r(41),g=r(45),v=r(26),y=r(95);const{NONE:O,INVALID_ADDRESS:E,UNKNOWN:S}=s,j=Object(n.createContext)(l),w=()=>Object(n.useContext)(j),_=e=>{let{children:t}=e;const{dispatchActions:r}=Object(b.b)(),{shippingAddress:o,setShippingAddress:c}=Object(g.b)(),{cartNeedsShipping:l,cartHasCalculatedShipping:p,shippingRates:w,shippingRatesLoading:_,cartErrors:k}=Object(v.a)(),{selectShippingRate:C,isSelectingRate:R}=Object(y.a)(),[T,P]=Object(n.useReducer)(d,O),[x,A]=Object(n.useReducer)(f.b,{}),M=Object(n.useRef)(x),N=Object(n.useMemo)(()=>({onShippingRateSuccess:m(A).onSuccess,onShippingRateFail:m(A).onFail,onShippingRateSelectSuccess:m(A).onSelectSuccess,onShippingRateSelectFail:m(A).onSelectFail}),[A]);Object(n.useEffect)(()=>{M.current=x},[x]);const I=Object(n.useRef)(()=>a(w));Object(n.useEffect)(()=>{const e=a(w);i()(I.current,e)||(I.current=e)},[w]),Object(n.useEffect)(()=>{_?r.incrementCalculating():r.decrementCalculating()},[_,r]),Object(n.useEffect)(()=>{R?r.incrementCalculating():r.decrementCalculating()},[R,r]),Object(n.useEffect)(()=>{k.length>0&&k.some(e=>!(!e.code||!Object.values(u).includes(e.code)))?P({type:E}):P({type:O})},[k]);const D=Object(n.useMemo)(()=>({isPristine:T===O,isValid:T===O,hasInvalidAddress:T===E,hasError:T===S||T===E}),[T]);Object(n.useEffect)(()=>{_||0!==w.length&&!D.hasError||Object(h.a)(M.current,"shipping_rates_fail",{hasInvalidAddress:D.hasInvalidAddress,hasError:D.hasError})},[w,_,D.hasError,D.hasInvalidAddress]),Object(n.useEffect)(()=>{!_&&w.length>0&&!D.hasError&&Object(h.a)(M.current,"shipping_rates_success",w)},[w,_,D.hasError]),Object(n.useEffect)(()=>{R||(D.hasError?Object(h.a)(M.current,"shipping_rate_select_fail",{hasError:D.hasError,hasInvalidAddress:D.hasInvalidAddress}):Object(h.a)(M.current,"shipping_rate_select_success",I.current))},[R,D.hasError,D.hasInvalidAddress]);const F={shippingErrorStatus:D,dispatchErrorStatus:P,shippingErrorTypes:s,shippingRates:w,shippingRatesLoading:_,selectedRates:I.current,setSelectedRates:C,isSelectingRate:R,shippingAddress:o,setShippingAddress:c,needsShipping:l,hasCalculatedShipping:p,...N};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(j.Provider,{value:F},t))}},function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return i})),r.d(t,"e",(function(){return c})),r.d(t,"a",(function(){return a}));const n=e=>"number"==typeof e,o=e=>"string"==typeof e,i=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function c(e,t){return i(e)&&t in e}const a=e=>"boolean"==typeof e},function(e,t){e.exports=window.wp.url},,function(e,t){},function(e,t,r){"use strict";var n=r(57);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,c){if(c!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,i=Object(n.useRef)(null),c=Object(n.useRef)(0),a=Object(n.useRef)(null),s=Object(n.useRef)([]),u=Object(n.useRef)(),l=Object(n.useRef)(),d=Object(n.useRef)(e),f=Object(n.useRef)(!0);d.current=e;var p=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return f.current=!0,function(){f.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=s.current,r=u.current;return s.current=u.current=null,c.current=e,l.current=d.current.apply(r,t)},r=function(e,t){p&&cancelAnimationFrame(a.current),a.current=p?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!f.current)return!1;var r=e-i.current,n=e-c.current;return!i.current||r>=t||r<0||b&&n>=g},v=function(t){return a.current=null,h&&s.current?e(t):(s.current=u.current=null,l.current)},y=function(){var e=Date.now();if(n(e))return v(e);if(f.current){var o=e-i.current,a=e-c.current,s=t-o,u=b?Math.min(s,g-a):s;r(y,u)}},O=function(){for(var d=[],p=0;p0?a/2:u)+(u+a/2>window.innerWidth?window.innerWidth-u:a/2)},d=e.left;"right"===n?d=e.right:"middle"!==i&&(d=u);var f=e.right;"left"===n?f=e.left:"middle"!==i&&(f=u);var p,m={popoverLeft:d,contentWidth:d-a>0?a:d},h={popoverLeft:f,contentWidth:f+a>window.innerWidth?window.innerWidth-f:a},b=r,g=null;if(!o)if("center"===r&&l.contentWidth===a)b="center";else if("left"===r&&m.contentWidth===a)b="left";else if("right"===r&&h.contentWidth===a)b="right";else{var v="left"==(b=m.contentWidth>h.contentWidth?"left":"right")?m.contentWidth:h.contentWidth;g=v!==a?v:null}if(p="center"===b?l.popoverLeft:"left"===b?m.popoverLeft:h.popoverLeft,c){var y=c.getBoundingClientRect();p=Math.min(p,y.right-a)}return{xAxis:b,popoverLeft:p,contentWidth:g}}function _(e,t,r,n,o,i,c){var a=t.height;if(o){var s=(Object(g.getScrollContainer)(i)||document.body).getBoundingClientRect().top+a-c;if(e.top<=s)return{yAxis:r,popoverTop:Math.min(e.bottom,s)}}var u=e.top+e.height/2;"bottom"===n?u=e.bottom:"top"===n&&(u=e.top);var l={popoverTop:u,contentHeight:(u-a/2>0?a/2:u)+(u+a/2>window.innerHeight?window.innerHeight-u:a/2)},d={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},f={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},p=r,m=null;if(!o)if("middle"===r&&l.contentHeight===a)p="middle";else if("top"===r&&d.contentHeight===a)p="top";else if("bottom"===r&&f.contentHeight===a)p="bottom";else{var h="top"==(p=d.contentHeight>f.contentHeight?"top":"bottom")?d.contentHeight:f.contentHeight;m=h!==a?h:null}return{yAxis:p,popoverTop:"middle"===p?l.popoverTop:"top"===p?d.popoverTop:f.popoverTop,contentHeight:m}}var k=r(23),C=r(10);var R=Object(i.createContext)({focusHistory:[]}),T=R.Provider,P=R.Consumer;T.displayName="FocusReturnProvider",P.displayName="FocusReturnConsumer",i.Component;var x=Object(y.createHigherOrderComponent)((function e(t){if((n=t)instanceof i.Component||"function"==typeof n){var r=t;return e({})(r)}var n,o=t.onFocusReturn,c=void 0===o?s.stubTrue:o;return function(e){var t=function(t){Object(p.a)(a,t);var r,n,o=(r=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(h.a)(r);if(n){var o=Object(h.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(m.a)(this,e)});function a(){var e;return Object(d.a)(this,a),(e=o.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return Object(f.a)(a,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,r=this.ownFocusedElements;if(t&&!1!==c())for(var n,o=[].concat(Object(k.a)(s.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(k.a)(r)))),[e]);n=o.pop();)if(document.body.contains(n))return void n.focus()}},{key:"render",value:function(){return Object(i.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(i.createElement)(e,this.props.childProps))}}]),a}(i.Component);return function(e){return Object(i.createElement)(P,null,(function(r){return Object(i.createElement)(t,{childProps:e,focus:r})}))}}}),"withFocusReturn");var A=Object(y.createHigherOrderComponent)((function(e){return function(t){Object(p.a)(c,t);var r,n,o=(r=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(h.a)(r);if(n){var o=Object(h.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(m.a)(this,e)});function c(){var e;return Object(d.a)(this,c),(e=o.apply(this,arguments)).focusContainRef=Object(i.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(C.a)(e)),e}return Object(f.a)(c,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===v.TAB){var t=g.focus.tabbable.find(this.focusContainRef.current);if(t.length){var r=t[0],n=t[t.length-1];e.shiftKey&&e.target===r?(e.preventDefault(),n.focus()):(e.shiftKey||e.target!==n)&&t.includes(e.target)||(e.preventDefault(),r.focus())}}}},{key:"render",value:function(){return Object(i.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(i.createElement)(e,this.props))}}]),c}(i.Component)}),"withConstrainedTabbing"),M=r(70);var N=function(e){Object(p.a)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=Object(h.a)(t);if(r){var o=Object(h.a)(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return Object(m.a)(this,e)});function o(){return Object(d.a)(this,o),n.apply(this,arguments)}return Object(f.a)(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(i.Component),I=Object(M.a)(N);function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(h.a)(e);if(t){var o=Object(h.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(m.a)(this,r)}}var F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,r=void 0===t?document:t,n=e.className,o=void 0===n?"lockscroll":n,c=0,a=0;function s(e){var t=r.scrollingElement||r.body;e&&(a=t.scrollTop);var n=e?"add":"remove";t.classList[n](o),r.documentElement.classList[n](o),e||(t.scrollTop=a)}function u(){0===c&&s(!0),++c}function l(){1===c&&s(!1),--c}return function(e){Object(p.a)(r,e);var t=D(r);function r(){return Object(d.a)(this,r),t.apply(this,arguments)}return Object(f.a)(r,[{key:"componentDidMount",value:function(){u()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),r}(i.Component)}();function L(e){e.stopPropagation()}var B=Object(i.forwardRef)((function(e,t){var r=e.children,c=Object(o.a)(e,["children"]);return Object(i.createElement)("div",Object(n.a)({},c,{ref:t,onMouseDown:L}),r)})),V=r(36);function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function H(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==r&&(e.style[t]=r)}function le(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var de=function(e){var t=e.headerTitle,r=e.onClose,c=e.onKeyDown,s=e.children,u=e.className,d=e.noArrow,f=void 0===d||d,p=e.isAlternate,m=e.position,h=void 0===m?"bottom right":m,E=(e.range,e.focusOnMount),S=void 0===E?"firstElement":E,k=e.anchorRef,C=e.shouldAnchorIncludePadding,R=e.anchorRect,T=e.getAnchorRect,P=e.expandOnMobile,x=e.animate,A=void 0===x||x,M=e.onClickOutside,N=e.onFocusOutside,D=e.__unstableSticky,L=e.__unstableSlotName,V=void 0===L?"Popover":L,U=e.__unstableObserveElement,H=e.__unstableBoundaryParent,z=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),q=Object(i.useRef)(null),W=Object(i.useRef)(null),Y=Object(i.useRef)(),X=Object(y.useViewportMatch)("medium","<"),K=Object(i.useState)(),$=Object(b.a)(K,2),J=$[0],Q=$[1],Z=G(V),ee=P&&X,re=Object(y.useResizeObserver)(),ne=Object(b.a)(re,2),oe=ne[0],de=ne[1];f=ee||f,Object(i.useLayoutEffect)((function(){if(ee)return le(Y.current,"is-without-arrow",f),le(Y.current,"is-alternate",p),se(Y.current,"data-x-axis"),se(Y.current,"data-y-axis"),ue(Y.current,"top"),ue(Y.current,"left"),ue(W.current,"maxHeight"),void ue(W.current,"maxWidth");var e=function(){if(Y.current&&W.current){var e=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(r){if(!e.current)return;return r(e.current)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if(n instanceof window.Range)return Object(g.getRectangleFromRange)(n);if(n instanceof window.Element){var i=n.getBoundingClientRect();return o?i:ae(i,n)}var c=n.top,a=n.bottom,s=c.getBoundingClientRect(),u=a.getBoundingClientRect(),l=new window.DOMRect(s.left,s.top,s.width,u.bottom-s.top);return o?l:ae(l,n)}if(e.current){var d=e.current.parentNode,f=d.getBoundingClientRect();return o?f:ae(f,d)}}(q,R,T,k,C);if(e){var t,r,n=Y.current,o=n.offsetParent,i=n.ownerDocument,c=0;if(o&&o!==i.body){var a=o.getBoundingClientRect();c=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}H&&(t=null===(r=Y.current.closest(".popover-slot"))||void 0===r?void 0:r.parentNode);var s=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0,a=r.split(" "),s=Object(b.a)(a,3),u=s[0],l=s[1],d=void 0===l?"center":l,f=s[2],p=_(e,t,u,f,n,o,i),m=w(e,t,d,f,n,p.yAxis,c);return j(j({},m),p)}(e,de.height?de:W.current.getBoundingClientRect(),h,D,Y.current,c,t),u=s.popoverTop,l=s.popoverLeft,d=s.xAxis,m=s.yAxis,v=s.contentHeight,y=s.contentWidth;"number"==typeof u&&"number"==typeof l&&(ue(Y.current,"top",u+"px"),ue(Y.current,"left",l+"px")),le(Y.current,"is-without-arrow",f||"center"===d&&"middle"===m),le(Y.current,"is-alternate",p),se(Y.current,"data-x-axis",d),se(Y.current,"data-y-axis",m),ue(W.current,"maxHeight","number"==typeof v?v+"px":""),ue(W.current,"maxWidth","number"==typeof y?y+"px":""),Q(({left:"right",right:"left"}[d]||"center")+" "+({top:"bottom",bottom:"top"}[m]||"middle"))}}};e();var t,r,n=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),U&&(r=new window.MutationObserver(e)).observe(U,{attributes:!0}),function(){window.clearInterval(n),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),r&&r.disconnect()}}),[ee,R,T,k,C,h,de,D,U,H]),function(e,t){Object(i.useEffect)((function(){var r=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var r=g.focus.tabbable.find(t.current)[0];r?r.focus():t.current.focus()}}),0);return function(){return clearTimeout(r)}}),[])}(S,W);var fe=function(e){e.keyCode===v.ESCAPE&&r&&(e.stopPropagation(),r()),c&&c(e)},pe=Object(i.createElement)(I,{onFocusOutside:function(e){if(N)N(e);else if(M){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),M(t)}else r&&r()}},Object(i.createElement)(ie,{type:A&&J?"appear":null,options:{origin:J}},(function(e){var o=e.className;return Object(i.createElement)(B,Object(n.a)({className:a()("components-popover",u,o,{"is-expanded":ee,"is-without-arrow":f,"is-alternate":p})},z,{onKeyDown:fe,ref:Y}),ee&&Object(i.createElement)(F,null),ee&&Object(i.createElement)("div",{className:"components-popover__header"},Object(i.createElement)("span",{className:"components-popover__header-title"},t),Object(i.createElement)(ve,{className:"components-popover__close",icon:O.a,onClick:r})),Object(i.createElement)("div",{ref:W,className:"components-popover__content",tabIndex:"-1"},Object(i.createElement)("div",{style:{position:"relative"}},oe,s)))})));return S&&(pe=Object(i.createElement)(ce,null,pe)),Z.ref&&(pe=Object(i.createElement)(te,{name:V},pe)),k||R?pe:Object(i.createElement)("span",{ref:q},pe)};de.Slot=function(e){var t=e.name,r=void 0===t?"Popover":t;return Object(i.createElement)(ee,{bubblesVirtually:!0,name:r,className:"popover-slot"})};var fe=de,pe=function(e){var t,r,n=e.shortcut,o=e.className;return n?(Object(s.isString)(n)&&(t=n),Object(s.isObject)(n)&&(t=n.display,r=n.ariaLabel),Object(i.createElement)("span",{className:o,"aria-label":r},t)):null};var me=function(e){Object(p.a)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=Object(h.a)(t);if(r){var o=Object(h.a)(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return Object(m.a)(this,e)});function o(){var e;return Object(d.a)(this,o),(e=n.apply(this,arguments)).delayedSetIsOver=Object(s.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return Object(f.a)(o,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var r=this.props.children;if(1===i.Children.count(r)){var n=i.Children.only(r);"function"==typeof n.props[e]&&n.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var r=this;return function(n){if(r.emitToChild(e,n),!(n.currentTarget.disabled||"focus"===n.type&&r.isInMouseDown)){r.delayedSetIsOver.cancel();var o=Object(s.includes)(["focus","mouseenter"],n.type);o!==r.state.isOver&&(t?r.delayedSetIsOver(o):r.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(r){t.emitToChild(e?"onMouseDown":"onMouseUp",r),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.position,n=e.text,o=e.shortcut;if(1!==i.Children.count(t))return t;var c=i.Children.only(t),a=this.state.isOver;return Object(i.cloneElement)(c,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(i.concatChildren)(c.props.children,a&&Object(i.createElement)(fe,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(i.createElement)(pe,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(i.Component),he=r(68);function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==r.return||r.return()}finally{if(a)throw i}}}}(ge);try{for(I.s();!(N=I.n()).done;)T[N.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){I.e(e)}finally{I.f()}}var D=!x&&(j&&k||_||!!k&&(!C||Object(s.isArray)(C)&&!C.length)&&!1!==j),F=Object(i.createElement)(A,Object(n.a)({},M,T,{className:P,"aria-label":T["aria-label"]||k,ref:t}),E&&Object(i.createElement)(he.a,{icon:E,size:S}),C);return D?Object(i.createElement)(me,{text:k,shortcut:_,position:w},F):F}))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},,,function(e,t,r){"use strict";var n=r(2),o=r(1),i=r(52);const c=Object(n.getSetting)("countryLocale",{}),a=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(i.b)(e.priority)&&(t.index=e.priority),Object(i.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},s=Object.entries(c).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,a(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==s[r]?s[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,r){"use strict";var n=r(19),o=r(11),i=r(16),c=r(0),a=r(32),s=function(e){var t=e.icon,r=e.className,n=Object(i.a)(e,["icon","className"]),a=["dashicon","dashicons","dashicons-"+t,r].filter(Boolean).join(" ");return Object(c.createElement)("span",Object(o.a)({className:a},n))};function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:o=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const i=n(e,r),c=o(e,r),a={...e.dataset,...i.attributes||{}};e.classList.remove("is-loading"),u({Block:t,container:e,props:i,attributes:a,errorBoundaryProps:c})})},u=e=>{let{Block:t,container:r,attributes:n={},props:a={},errorBoundaryProps:s={}}=e;Object(i.render)(Object(i.createElement)(c.a,s,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},Object(i.createElement)(t,o()({},a,{attributes:n})))),r)},l=e=>{const t=document.body.querySelectorAll(a.join(","));(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:i}=e;const c=document.body.querySelectorAll(o);i.length>0&&Array.prototype.filter.call(c,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),s({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({...e,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:i}=e;const c=i.querySelectorAll(o);s({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},,function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var s,u=[],l=!1,d=-1;function f(){l&&s&&(l=!1,s.length?u=s.concat(u):d=-1,u.length&&p())}function p(){if(!l){var e=a(f);l=!0;for(var t=u.length;t;){for(s=u,u=[];++d1)for(var r=1;r2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},c={},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,eventType:r,id:n,callback:i,priority:a}=arguments.length>1?arguments[1]:void 0;const s=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return s.set(n,{priority:a,callback:i}),{...e,[r]:s};case o.REMOVE_EVENT_CALLBACK:return s.delete(n),{...e,[r]:s}}}},function(e,t){e.exports=window.regeneratorRuntime},function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return b}));var n=r(0),o=(r(8),r(9)),i=r(42),c=r(28),a=r(18),s=r.n(a),u=r(5),l=r.n(u),d=r(132);r(85);const f=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var p=e=>{let{className:t,notices:r,removeNotice:o}=e;const i=r.filter(e=>"snackbar"!==e.type);if(!i.length)return null;const c=l()(t,"wc-block-components-notices");return Object(n.createElement)("div",{className:c},i.map(e=>Object(n.createElement)(d.a,s()({key:"store-notice-"+e.id},e,{className:l()("wc-block-components-notices__notice",f(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(n.createContext)({notices:[],createNotice:(e,t,r)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),h=()=>Object(n.useContext)(m),b=e=>{let{children:t,className:r="",createNoticeContainer:a=!0,context:s="wc/core"}=e;const{createNotice:u,removeNotice:l}=Object(o.useDispatch)("core/notices"),[d,f]=Object(n.useState)(!1),{dispatchStoreEvent:h}=Object(i.a)(),{isEditor:b}=Object(c.a)(),g=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u(e,t,{...r,context:r.context||s}),h("store-notice-create",{status:e,content:t,options:r})}),[u,h,s]),v=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;l(e,t)}),[l,s]),{notices:y}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(s)}),[s]),O={notices:y,createNotice:g,removeNotice:v,context:s,setIsSuppressed:f},E=d?null:Object(n.createElement)(p,{className:r,notices:O.notices,removeNotice:O.removeNotice,isEditor:b});return Object(n.createElement)(m.Provider,{value:O},a&&E,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},,,function(e,t,r){"use strict";r.d(t,"n",(function(){return i})),r.d(t,"l",(function(){return c})),r.d(t,"k",(function(){return a})),r.d(t,"m",(function(){return s})),r.d(t,"i",(function(){return u})),r.d(t,"d",(function(){return l})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return f})),r.d(t,"c",(function(){return p})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return v}));var n,o=r(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),c=i.pluginUrl+"images/",a=i.pluginUrl+"build/",s=i.buildPhase,u=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,f=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),p=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},function(e,t){},function(e,t){e.exports=window.wp.autop},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return a}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:i,detail:c={}}=t;if(!n)return;i||(i=document.body);const a=new n(e,{bubbles:r,cancelable:o,detail:c});i.dispatchEvent(a)};let i;const c=()=>{i&&clearTimeout(i),i=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const i=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,i),()=>jQuery(document).off(e,i)}},function(e,t,r){"use strict";var n=r(0),o=r(32),i=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},,,,function(e,t,r){var n=r(112),o=r(93),i=o.setStyleProp,c=n.html,a=n.svg,s=n.isCustomAttribute,u=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,l;e=e||{};var d={};for(t in e)n=e[t],s(t)?d[t]=n:(r=t.toLowerCase(),u.call(c,r)?d[(l=c[r]).propertyName]=!!(l.hasBooleanValue||l.hasOverloadedBooleanValue&&!n)||n:u.call(a,t)?d[(l=a[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return i(e.style,d),d}},function(e,t,r){var n=r(3),o=r(116).default,i={reactCompat:!0},c=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:c,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,i={},c={};for(r in e)n=e[r],o&&(i=t(r,n))&&2===i.length?c[i[0]]=i[1]:"string"==typeof n&&(c[n]=r);return c},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,i))}}},function(e,t,r){for(var n,o=r(122).CASE_SENSITIVE_TAG_NAMES,i={},c=0,a=o.length;c{const e=Object(c.a)(),{selectShippingRate:t}=Object(n.useDispatch)(i.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((r,n)=>{t(r,n).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(n.useSelect)(e=>e(i.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},i=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";var n=r(18),o=r.n(n),i=r(0);r(109);const c=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(i.useRef)(null);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(i.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];c(e),null==e||e.focus()}else c(e)})(e,r):c(e))})(r.current,e)}})))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(3),o=r(61);function i(e,t){return e===t}function c(e){return"function"==typeof e?function(){return e}:e}function a(e,t,r){var a=r&&r.equalityFn||i,s=function(e){var t=Object(n.useState)(c(e)),r=t[0],o=t[1];return[r,Object(n.useCallback)((function(e){return o(c(e))}),[])]}(e),u=s[0],l=s[1],d=Object(o.a)(Object(n.useCallback)((function(e){return l(e)}),[l]),t,r),f=Object(n.useRef)(e);return a(f.current,e)||(d(e),f.current=e),[u,d]}},,function(e,t,r){var n=r(111),o=r(92),i=r(120),c={decodeEntities:!0,lowerCaseAttributeNames:!1};function a(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(i(e,(t=t||{}).htmlparser2||c),t)}a.domToReact=n,a.htmlToDOM=i,a.attributesToProps=o,e.exports=a,e.exports.default=a},,function(e,t){e.exports=window.wp.wordcount},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(18)),i=n(r(145)),c=r(3),a=n(c),s=n(r(140)),u=n(r(146)),l={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(l.str(e)||l.num(e))return e===t;if(l.obj(e)&&l.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!l.und(r)||e===t}};function d(){var e=c.useState(!1)[1];return c.useCallback((function(){return e((function(e){return!e}))}),[])}function f(e,t){return l.und(e)||l.nul(e)?t:e}function p(e){return l.und(e)?[]:l.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}for(var c=i,a=!1,s=0;s=p.startTime+u.duration;else if(u.decay)b=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-p.startTime))),(l=Math.abs(p.lastPosition-b)<.1)&&(h=b);else{d=void 0!==p.lastTime?p.lastTime:t,y=void 0!==p.lastVelocity?p.lastVelocity:u.initialVelocity,t>d+64&&(d=t);for(var O=Math.floor(t-d),E=0;Eh:b=e);++r);return r-1}(e,i);return function(e,t,r,n,o,i,c,a,s){var u=s?s(e):e;if(ur){if("identity"===a)return u;"clamp"===a&&(u=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?u=-u:r===1/0?u-=t:u=(u-t)/(r-t),u=i(u),n===-1/0?u=-u:o===1/0?u+=n:u=u*(o-n)+n,u)}(e,i[t],i[t+1],o[t],o[t+1],s,c,a,n.map)}}var V=function(e){function t(r,n,o,i){var c;return(c=e.call(this)||this).calc=void 0,c.payload=r instanceof y&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],c.calc=B(n,o,i),c}s(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=B(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(y),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}s(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new V(this,e,t,r)},t}(v),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}s(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new V(this,e,t)},t}(y),G=0,z=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,c=t.to,a=i(t,["delay","to"]);if(l.arr(c)||l.fun(c))this.queue.push(o({},a,{delay:n,to:c}));else if(c){var s={};Object.entries(c).forEach((function(e){var t,r=e[0],i=e[1],c=o({to:(t={},t[r]=i,t),delay:m(n,r)},a),u=s[c.delay]&&s[c.delay].to;s[c.delay]=o({},s[c.delay],c,{to:o({},u,c.to)})})),this.queue=Object.values(s)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,i=e.to,c=void 0===i?{}:i;l.obj(n)&&(t.merged=o({},n,t.merged)),l.obj(c)&&(t.merged=o({},t.merged,c))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,c){var a=o.delay,s=i(o,["delay"]),u=function(o){c===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=l.arr(s.to)||l.fun(s.to);a?setTimeout((function(){r===t.guid&&(d?t.runAsync(s,u):t.diff(s).start(u))}),a):d?t.runAsync(s,u):t.diff(s).start(u)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,F.has(this)||F.add(this),D||(D=!0,w(x||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,F.has(this)&&F.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,i(e,["delay"])),c=this.local,a=Promise.resolve(void 0);if(l.arr(n.to))for(var s=function(e){var t=e,i=o({},n,h(n.to[t]));l.arr(i.config)&&(i.config=i.config[t]),a=a.then((function(){if(c===r.guid)return new Promise((function(e){return r.diff(i).start(e)}))}))},u=0;u=n.length)return"break";c=n[i++]}else{if((i=n.next()).done)return"break";c=i.value}var r=c.key,a=function(e){return e.key!==r};(l.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},n=e.current.deleted,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var c;if("break"===r())break}e.current.forceUpdate()}var $=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof v||(t=b.transform(t)),r.payload=t,r}return s(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function ue(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,i=se(o,n,e+1/3),c=se(o,n,e),a=se(o,n,e-1/3);return Math.round(255*i)<<24|Math.round(255*c)<<16|Math.round(255*a)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function fe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function pe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ce.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(le(r[1])<<24|le(r[2])<<16|le(r[3])<<8|255)>>>0:(r=te.exec(t))?(le(r[1])<<24|le(r[2])<<16|le(r[3])<<8|fe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=ae.exec(t))?parseInt(r[1],16)>>>0:(r=ie.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|ue(de(r[1]),pe(r[2]),pe(r[3])))>>>0:(r=ne.exec(t))?(ue(de(r[1]),pe(r[2]),pe(r[3]))|fe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}ve=Object.keys(ve).reduce((function(e,t){return ye.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),ve);var Ee={};M((function(e){return new $(e)})),T("div"),k((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return B(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),S(J),E((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,c=t.scrollLeft,a=i(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var u in void 0!==o&&(e.scrollTop=o),void 0!==c&&(e.scrollLeft=c),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(u)){var l=0===u.indexOf("--"),d=Oe(u,r[u],l);"float"===u&&(u="cssFloat"),l?e.style.setProperty(u,d):e.style[u]=d}for(var f in a){var p=s?f:Ee[f]||(Ee[f]=f.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(p)&&e.setAttribute(p,a[f])}}),(function(e){return e}));var Se,je,we=(Se=function(e){return c.forwardRef((function(t,r){var n=d(),s=c.useRef(!0),u=c.useRef(null),f=c.useRef(null),p=c.useCallback((function(e){var t=u.current;u.current=new I(e,(function(){var e=!1;f.current&&(e=b.fn(f.current,u.current.getAnimatedValue())),f.current&&!1!==e||n()})),t&&t.detach()}),[]);c.useEffect((function(){return function(){s.current=!1,u.current&&u.current.detach()}}),[]),c.useImperativeHandle(r,(function(){return A(f,s,n)})),p(t);var m,h=u.current.getValue(),g=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),v=(m=e,!l.fun(m)||m.prototype instanceof a.Component?function(e){return f.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return a.createElement(e,o({},g,{ref:v}))}))},void 0===(je=!1)&&(je=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=je?t[0].toLowerCase()+t.substring(1):t;return e[r]=Se(r),e}),Se)}),_e=we(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=we,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=L,t.animated=_e,t.a=_e,t.interpolate=function(e,t,r){return e&&new V(e,t,r)},t.Globals=N,t.useSpring=function(e){var t=l.fun(e),r=q(1,t?e:[e]),n=r[0],o=r[1],i=r[2];return t?[n[0],o,i]:n},t.useTrail=function(e,t){var r=c.useRef(!1),n=l.fun(t),i=m(t),a=c.useRef(),s=q(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},i,{config:m(i.config,e),attach:e>0&&function(){return a.current[e-1]}})})),u=s[0],d=s[1],f=s[2],p=c.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,c=a.current[n];return o({},e,{config:m(e.config||i.config,t),attach:c&&function(){return c}})}))}}),[e,i.reverse]);return c.useEffect((function(){r.current&&!n&&p(t)})),c.useEffect((function(){r.current=!0}),[]),n?[u,p,f]:u},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),a=X(n),s=a.lazy,u=void 0!==s&&s,l=(a.unique,a.reset),f=void 0!==l&&l,p=(a.enter,a.leave,a.update,a.onDestroyed),h=(a.keys,a.items,a.onFrame),b=a.onRest,g=a.onStart,v=a.ref,y=i(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=d(),E=c.useRef(!1),S=c.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!E.current&&new Map,forceUpdate:O});return c.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(S.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(S.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(S.current.instances).map((function(e){return e[1]}))}}})),S.current=function(e,t){for(var r=e.first,n=e.prevProps,c=i(e,["first","prevProps"]),a=X(t),s=a.items,u=a.keys,l=a.initial,d=a.from,f=a.enter,p=a.leave,h=a.update,b=a.trail,g=void 0===b?0:b,v=a.unique,y=a.config,O=a.order,E=void 0===O?["enter","leave","update"]:O,S=X(n),j=S.keys,w=S.items,_=o({},c.current),k=[].concat(c.deleted),C=Object.keys(_),R=new Set(C),T=new Set(u),P=u.filter((function(e){return!R.has(e)})),x=c.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),A=u.filter((function(e){return R.has(e)})),M=-g;E.length;)switch(E.shift()){case"enter":P.forEach((function(e,t){v&&k.find((function(t){return t.originalKey===e}))&&(k=k.filter((function(t){return t.originalKey!==e})));var n=u.indexOf(e),o=s[n],i=r&&void 0!==l?"initial":"enter";_[e]={slot:i,originalKey:e,key:v?String(e):W++,item:o,trail:M+=g,config:m(y,o,i),from:m(r&&void 0!==l?l||{}:d,o),to:m(f,o)}}));break;case"leave":x.forEach((function(e){var t=j.indexOf(e),r=w[t];k.unshift(o({},_[e],{slot:"leave",destroyed:!0,left:j[Math.max(0,t-1)],right:j[Math.min(j.length,t+1)],trail:M+=g,config:m(y,r,"leave"),to:m(p,r)})),delete _[e]}));break;case"update":A.forEach((function(e){var t=u.indexOf(e),r=s[t];_[e]=o({},_[e],{item:r,slot:"update",trail:M+=g,config:m(y,r,"update"),to:m(h,r)})}))}var N=u.map((function(e){return _[e]}));return k.forEach((function(e){var t,r=e.left,n=(e.right,i(e,["left","right"]));-1!==(t=N.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),N=[].concat(N.slice(0,t),[n],N.slice(t))})),o({},c,{changed:P.length||x.length||A.length,first:r&&0===P.length,transitions:N,current:_,deleted:k,prevProps:t})}(S.current,n),S.current.changed&&S.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,i=e.config,c=e.trail,a=e.key,s=e.item;S.current.instances.has(a)||S.current.instances.set(a,new z);var l=S.current.instances.get(a),d=o({},y,{to:n,from:r,config:i,ref:v,onRest:function(r){S.current.mounted&&(e.destroyed&&(v||u||K(S,a),p&&p(s)),!Array.from(S.current.instances).some((function(e){return!e[1].idle}))&&(v||u)&&S.current.deleted.length>0&&K(S),b&&b(s,t,r))},onStart:g&&function(){return g(s,t)},onFrame:h&&function(e){return h(s,t,e)},delay:c,reset:f&&"enter"===t});l.update(d),S.current.paused||l.start()})),c.useEffect((function(){return S.current.mounted=E.current=!0,function(){S.current.mounted=E.current=!1,Array.from(S.current.instances).map((function(e){return e[1].destroy()})),S.current.instances.clear()}}),[]),S.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:S.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=c.useRef();c.useEffect((function(){l.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var i=e.current;if(i){var c=i.controllers;if(c.length){var a=r*t[n];c.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=q},,,function(e,t,r){"use strict";var n=r(0);r(135),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,,function(e,t){},,function(e,t,r){var n=r(3),o=r(92),i=r(93),c=i.setStyleProp;function a(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var i,s,u,l,d=(r=r||{}).library||n,f=d.cloneElement,p=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,v=0,y=t.length;v1&&(s=f(s,{key:s.key||v})),h.push(s);else if("text"!==i.type){switch(u=i.attribs,a(i)?c(u.style,u):u&&(u=o(u)),l=null,i.type){case"script":case"style":i.children[0]&&(u.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?u.defaultValue=i.children[0].data:i.children&&i.children.length&&(l=e(i.children,r));break;default:continue}y>1&&(u.key=v),h.push(p(i.name,u,l))}else g?i.data.trim()&&h.push(i.data):h.push(i.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(113),o=r(114),i=r(115),c=i.MUST_USE_PROPERTY,a=i.HAS_BOOLEAN_VALUE,s=i.HAS_NUMERIC_VALUE,u=i.HAS_POSITIVE_NUMERIC_VALUE,l=i.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function f(e,t,r){var n,o,i,f=e.Properties,p=e.DOMAttributeNames;for(o in f)n=p[o]||(r?o:o.toLowerCase()),i=f[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(i,c),hasBooleanValue:d(i,a),hasNumericValue:d(i,s),hasPositiveNumericValue:d(i,u),hasOverloadedBooleanValue:d(i,l)}}var p={};f(n,p);var m={};f(o,m,!0);var h={};f(n,h),f(o,h,!0),e.exports={html:p,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(117)),i=r(119);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[i.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(118);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var i,c,a=n(e),s="function"==typeof t,u=0,l=a.length;u/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(a);return r&&r[1]&&(t=r[1],c&&(e=e.replace(r[0],""))),i(n(e),null,t)}},function(e,t,r){var n=r(94),o=/<([a-zA-Z]+[0-9]?)/,i=//i,c=//i,a=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,s=n.isIE(9),u=s||n.isIE(),l=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var f=new window.DOMParser,p=s?"text/xml":"text/html";l=d=function(e,t){return t&&(e="<"+t+">"+e+""),s&&(e=e.replace(a,"<$1$2$3/>")),f.parseFromString(e,p)}}if(document.implementation){var m=document.implementation.createHTMLDocument(u?"html-dom-parser":void 0);l=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,a,s=e.match(o);switch(s&&s[1]&&(t=s[1].toLowerCase()),t){case"html":return r=d(e),i.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),c.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return a=l(e).getElementsByTagName(t),c.test(e)&&i.test(e)?a[0].parentNode.childNodes:a;default:return h?h(e):l(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(4),i=r(5),c=r.n(i),a=r(27),s=r(1),u=(r(60),r(62));t.a=Object(n.forwardRef)((function(t,r){var i=t.className,l=t.children,d=t.spokenMessage,f=void 0===d?l:d,p=t.politeness,m=void 0===p?"polite":p,h=t.actions,b=void 0===h?[]:h,g=t.onRemove,v=void 0===g?o.noop:g;!function(e,t){var r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)((function(){r&&Object(a.speak)(r,t)}),[r,t])}(f,m),Object(n.useEffect)((function(){var e=setTimeout((function(){v()}),1e4);return function(){return clearTimeout(e)}}),[]);var y=c()(i,"components-snackbar");return b&&b.length>1&&(void 0!==e&&e.env,b=[b[0]]),Object(n.createElement)("div",{ref:r,className:y,onClick:v,tabIndex:"0",role:"button",onKeyPress:v,"aria-label":Object(s.__)("Dismiss this notice")},Object(n.createElement)("div",{className:"components-snackbar__content"},l,b.map((function(e,t){var r=e.label,o=e.onClick,i=e.url;return Object(n.createElement)(u.a,{key:t,href:i,isTertiary:!0,onClick:function(e){e.stopPropagation(),o&&o(e)},className:"components-snackbar__action"},r)}))))}))}).call(this,r(77))},function(e,t){e.exports=window.wp.plugins},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return a})),r.d(t,"a",(function(){return s}));var n=r(2),o=r(67),i=r(53);const c=e=>{let{country:t="",state:r="",city:n="",postcode:o=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},a=e=>{let{email:t=""}=e;return Object(i.isEmail)(t)?t.trim():""},s=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),i=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(i[r]="")}),i}},function(e,t,r){"use strict";var n=r(0),o=r(4),i=r(5),c=r.n(i),a=r(1),s=r(27),u=r(88),l=r(62);t.a=function(e){var t=e.className,r=e.status,i=void 0===r?"info":r,d=e.children,f=e.spokenMessage,p=void 0===f?d:f,m=e.onRemove,h=void 0===m?o.noop:m,b=e.isDismissible,g=void 0===b||b,v=e.actions,y=void 0===v?[]:v,O=e.politeness,E=void 0===O?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(i):O,S=e.__unstableHTML;!function(e,t){var r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)((function(){r&&Object(s.speak)(r,t)}),[r,t])}(p,E);var j=c()(t,"components-notice","is-"+i,{"is-dismissible":g});return S&&(d=Object(n.createElement)(n.RawHTML,null,d)),Object(n.createElement)("div",{className:j},Object(n.createElement)("div",{className:"components-notice__content"},d,y.map((function(e,t){var r=e.className,o=e.label,i=e.isPrimary,a=e.noDefaultClasses,s=void 0!==a&&a,u=e.onClick,d=e.url;return Object(n.createElement)(l.a,{key:t,href:d,isPrimary:i,isSecondary:!s&&!d,isLink:!s&&!!d,onClick:d?void 0:u,className:c()("components-notice__action",r)},o)}))),g&&Object(n.createElement)(l.a,{className:"components-notice__dismiss",icon:u.a,label:Object(a.__)("Dismiss this notice"),onClick:h,showTooltip:!1}))}},,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},function(e,t){},,,,,function(e,t,r){var n=r(141);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,r(t,n)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},,,,function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"b",(function(){return F})),r.d(t,"a",(function(){return L}));var n=r(0);let o,i;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(o||(o={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method"}(i||(i={}));const c={currentStatus:o.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},a={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:o,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:()=>{},activeSavedToken:"",setActiveSavedToken:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1},s=e=>!("object"!=typeof e||!e.isSavedToken);var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:a="",paymentMethods:u={}}=arguments.length>1?arguments[1]:void 0;switch(t){case o.STARTED:return{...e,currentStatus:o.STARTED,paymentMethodData:r||e.paymentMethodData,hasSavedToken:s(r||e.paymentMethodData)};case o.ERROR:return e.currentStatus!==o.ERROR?{...e,currentStatus:o.ERROR,errorMessage:a||e.errorMessage}:e;case o.FAILED:return e.currentStatus!==o.FAILED?{...e,currentStatus:o.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:a||e.errorMessage}:e;case o.SUCCESS:return e.currentStatus!==o.SUCCESS?{...e,currentStatus:o.SUCCESS,paymentMethodData:r||e.paymentMethodData,hasSavedToken:s(r||e.paymentMethodData)}:e;case o.PROCESSING:return e.currentStatus!==o.PROCESSING?{...e,currentStatus:o.PROCESSING,errorMessage:""}:e;case o.COMPLETE:return e.currentStatus!==o.COMPLETE?{...e,currentStatus:o.COMPLETE}:e;case o.PRISTINE:return{...c,currentStatus:o.PRISTINE,paymentMethods:{...e.paymentMethods},expressPaymentMethods:{...e.expressPaymentMethods},shouldSavePaymentMethod:e.shouldSavePaymentMethod};case i.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:u};case i.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:u};case i.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n}}},l=r(1),d=r(24),f=r(33),p=r(2),m=r(61),h=r(28),b=r(51),g=r(45),v=r(26),y=r(39),O=r(31);const E=(e,t,r,o)=>{const[i,c]=Object(n.useState)(!1),{isEditor:a}=Object(h.a)(),{selectedRates:s}=Object(b.b)(),{billingData:u,shippingAddress:d}=Object(g.b)(),O=Object(f.a)(s),E=Object(f.a)(r),S=Object(v.a)(),{cartTotals:j,cartNeedsShipping:w,paymentRequirements:_}=S,k=Object(n.useRef)({cart:S,cartTotals:j,cartNeedsShipping:w,billingData:u,shippingAddress:d,selectedShippingMethods:O,paymentRequirements:_}),{addErrorNotice:C}=Object(y.a)();Object(n.useEffect)(()=>{k.current={cart:S,cartTotals:j,cartNeedsShipping:w,billingData:u,shippingAddress:d,selectedShippingMethods:O,paymentRequirements:_}},[S,j,w,u,d,O,_]);const R=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e{T()},[T,S,O,u]),i},S=e=>({type:e}),j=e=>({type:o.ERROR,errorMessage:e}),w=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:o.FAILED,errorMessage:t,paymentMethodData:r}},_=e=>{let{paymentMethodData:t}=e;return{type:o.SUCCESS,paymentMethodData:t}},k=e=>{let{paymentMethodData:t}=e;return{type:o.STARTED,paymentMethodData:t}},C=e=>({type:i.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:i.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),T=e=>({type:i.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e});var P=r(42),x=r(41),A=r(78),M=r(159);var N=r(161),I=r(154);const D=Object(n.createContext)(a),F=()=>Object(n.useContext)(D),L=e=>{let{children:t}=e;const{isProcessing:r,isIdle:i,isCalculating:a,hasError:s}=Object(x.b)(),{isEditor:l,getPreviewData:f}=Object(h.a)(),{setValidationErrors:m}=Object(I.b)(),{addErrorNotice:v,removeNotice:F}=Object(y.a)(),{isSuccessResponse:L,isErrorResponse:B,isFailResponse:V,noticeContexts:U}=Object(O.c)(),[H,G]=Object(n.useReducer)(A.b,{}),{onPaymentProcessing:z}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(M.a)("payment_processing",e)}),[e]))(G),q=Object(n.useRef)(H);Object(n.useEffect)(()=>{q.current=H},[H]);const[W,Y]=Object(n.useReducer)(u,c),{dispatchActions:X,setPaymentStatus:K}=(e=>{const{setBillingData:t}=Object(g.b)(),{setShippingAddress:r}=Object(b.b)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(C(t))},setRegisteredExpressPaymentMethods:t=>{e(R(t))},setShouldSavePayment:t=>{e(T(t))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(S(o.PRISTINE)),started:t=>{e(k({paymentMethodData:t}))},processing:()=>e(S(o.PROCESSING)),completed:()=>e(S(o.COMPLETE)),error:t=>e(j(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(w({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof i&&null!=i&&i.address&&r(i.address),e(_({paymentMethodData:n}))}}),[e,t,r])}})(Y),$=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:r}=Object(O.c)(),n=new Set([...Object(p.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return E(e,t,Array.from(n),r.PAYMENTS)})(X.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:r}=Object(O.c)();return E(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})(X.setRegisteredExpressPaymentMethods),{activePaymentMethod:Q,activeSavedToken:Z,setActivePaymentMethod:ee,setActiveSavedToken:te}=(()=>{const{dispatchCheckoutEvent:e}=Object(P.a)(),[t,r]=Object(n.useState)(""),[o,i]=Object(n.useState)("");return Object(n.useEffect)(()=>{e("set-active-payment-method",{activePaymentMethod:t})},[e,t]),{activePaymentMethod:t,activeSavedToken:o,setActivePaymentMethod:r,setActiveSavedToken:i}})(),re=Object(n.useMemo)(()=>l?f("previewSavedPaymentMethods"):$?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(p.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(W.paymentMethods):{},[l,f,$,W.paymentMethods]),ne=Object(n.useCallback)(e=>{e?v(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):F("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[v,U.EXPRESS_PAYMENTS,F]),oe=Object.keys(W.expressPaymentMethods).includes(Q),ie=Object(n.useMemo)(()=>({isPristine:W.currentStatus===o.PRISTINE,isStarted:W.currentStatus===o.STARTED,isProcessing:W.currentStatus===o.PROCESSING,isFinished:[o.ERROR,o.FAILED,o.SUCCESS].includes(W.currentStatus),hasError:W.currentStatus===o.ERROR,hasFailed:W.currentStatus===o.FAILED,isSuccessful:W.currentStatus===o.SUCCESS,isDoingExpressPayment:W.currentStatus!==o.PRISTINE&&oe}),[W.currentStatus,oe]);Object(n.useEffect)(()=>{const e=Object.keys(W.paymentMethods),t=[...e,...Object.keys(W.expressPaymentMethods)];$&&e.length&&ee(e=>e&&t.includes(e)?e:(K().pristine(),Object.keys(W.paymentMethods)[0]))},[$,W.paymentMethods,W.expressPaymentMethods,ee,K]),Object(n.useEffect)(()=>{!r||s||a||ie.isFinished||K().processing()},[r,s,a,ie.isFinished,K]),Object(n.useEffect)(()=>{i&&!ie.isSuccessful&&K().pristine()},[i,ie.isSuccessful,K]),Object(n.useEffect)(()=>{s&&ie.isSuccessful&&!W.hasSavedToken&&K().pristine()},[s,ie.isSuccessful,W.hasSavedToken,K]),Object(n.useEffect)(()=>{ie.isProcessing&&(F("wc-payment-error",U.PAYMENTS),Object(N.b)(q.current,"payment_processing",{}).then(e=>{let t,r;var n,o,i,c,a,s;if(e.forEach(e=>{L(e)&&(t=e),(B(e)||V(e))&&(r=e)}),t&&!r)K().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(i=t)||void 0===i||null===(c=i.meta)||void 0===c?void 0:c.billingData,null===(a=t)||void 0===a||null===(s=a.meta)||void 0===s?void 0:s.shippingData);else if(r&&V(r)){var u,l,d,f,p,h;r.message&&r.message.length&&v(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(h=r)||void 0===h?void 0:h.messageContext)||U.PAYMENTS}),K().failed(null===(u=r)||void 0===u?void 0:u.message,null===(l=r)||void 0===l||null===(d=l.meta)||void 0===d?void 0:d.paymentMethodData,null===(f=r)||void 0===f||null===(p=f.meta)||void 0===p?void 0:p.billingData)}else if(r){var b,g;r.message&&r.message.length&&v(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(g=r)||void 0===g?void 0:g.messageContext)||U.PAYMENTS}),K().error(r.message),m(null===(b=r)||void 0===b?void 0:b.validationErrors)}else K().success()}))},[ie.isProcessing,m,K,F,U.PAYMENTS,L,V,B,v]);const ce={setPaymentStatus:K,currentStatus:ie,paymentStatuses:o,paymentMethodData:W.paymentMethodData,errorMessage:W.errorMessage,activePaymentMethod:Q,setActivePaymentMethod:ee,activeSavedToken:Z,setActiveSavedToken:te,onPaymentProcessing:z,customerPaymentMethods:re,paymentMethods:W.paymentMethods,expressPaymentMethods:W.expressPaymentMethods,paymentMethodsInitialized:$,expressPaymentMethodsInitialized:J,setExpressPaymentError:ne,isExpressPaymentMethodActive:oe,shouldSavePayment:W.shouldSavePaymentMethod,setShouldSavePayment:X.setShouldSavePayment};return Object(n.createElement)(D.Provider,{value:ce},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(0),o=r(128),i=r(2),c=r(34),a=r(147),s=r(51),u=r(45),l=r(41),d=r(1),f=r(47),p=r.n(f),m=r(131),h=r(96);const b=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},g=(e,t)=>{p.a.setNonce&&"function"==typeof p.a.setNonce&&p.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var v=r(154),y=r(26),O=r(39),E=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:i,isBeforeProcessing:c,isComplete:f,orderNotes:E,shouldCreateAccount:S,extensionData:j}=Object(l.b)(),{hasValidationErrors:w}=Object(v.b)(),{shippingErrorStatus:_}=Object(s.b)(),{billingData:k,shippingAddress:C}=Object(u.b)(),{cartNeedsPayment:R,receiveCart:T}=Object(y.a)(),{activePaymentMethod:P,isExpressPaymentMethodActive:x,currentStatus:A,paymentMethodData:M,expressPaymentMethods:N,paymentMethods:I,shouldSavePayment:D}=Object(a.b)(),{addErrorNotice:F,removeNotice:L,setIsSuppressed:B}=Object(O.a)(),V=Object(n.useRef)(k),U=Object(n.useRef)(C),H=Object(n.useRef)(o),[G,z]=Object(n.useState)(!1),q=Object(n.useMemo)(()=>{var e;const t={...N,...I};return null==t||null===(e=t[P])||void 0===e?void 0:e.paymentMethodId},[P,N,I]),W=w&&!x||A.hasError||_.hasError,Y=!e&&!W&&(A.isSuccessful||!R)&&i;Object(n.useEffect)(()=>{B(x)},[x,B]),Object(n.useEffect)(()=>{W===e||!i&&!c||x||r.setHasError(W)},[W,e,i,c,x,r]),Object(n.useEffect)(()=>{V.current=k,U.current=C,H.current=o},[k,C,o]);const X=Object(n.useCallback)(()=>!w&&(A.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!_.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,A.hasError,_.hasError]);Object(n.useEffect)(()=>{let e;return x||(e=t(X,0)),()=>{x||e()}},[t,X,x]),Object(n.useEffect)(()=>{H.current&&(window.location.href=H.current)},[f]);const K=Object(n.useCallback)(async()=>{if(G)return;z(!0),L("checkout");const e=R?{payment_method:q,payment_data:b(M,D,P)}:{},t={billing_address:Object(m.a)(V.current),shipping_address:Object(m.a)(U.current),customer_note:E,should_create_account:S,...e,extensions:{...j}};p()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(g(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),z(!1)}).catch(e=>{g(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&T(e.data.cart),F(Object(h.b)(e),{id:"checkout"}),null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{F(e.message,{id:e.error_code})}),r.setHasError(!0),r.setAfterProcessing(e),z(!1)})})},[G,L,E,S,R,q,M,D,P,j,r,F,T]);return Object(n.useEffect)(()=>{Y&&!G&&K()},[K,Y,G]),null};const S=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(l.a,{redirectUrl:d,isCart:r},Object(n.createElement)(u.a,null,Object(n.createElement)(s.a,null,Object(n.createElement)(a.a,null,t,Object(n.createElement)(c.a,{renderError:i.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(E,null)))))}},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide","full"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide","full"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e,t,r){"use strict";var n=r(0),o=r(1),i=(r(8),r(5)),c=r.n(i),a=(r(189),r(106));t.a=e=>{let{children:t,className:r,screenReaderLabel:i,showSpinner:s=!1,isLoading:u=!0}=e;return Object(n.createElement)("div",{className:c()(r,{"wc-block-components-loading-mask":u})},u&&s&&Object(n.createElement)(a.a,null),Object(n.createElement)("div",{className:c()({"wc-block-components-loading-mask__children":u}),"aria-hidden":u},t),u&&Object(n.createElement)("span",{className:"screen-reader-text"},i||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return u}));var n=r(0),o=r(4),i=r(17),c=r.n(i);const a=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),s=()=>Object(n.useContext)(a),u=e=>{let{children:t}=e;const[r,i]=Object(n.useState)({}),s=Object(n.useCallback)(e=>r[e],[r]),u=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),l=Object(n.useCallback)(e=>{i(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{i({})},[]),f=Object(n.useCallback)(e=>{e&&i(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&c()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),p=Object(n.useCallback)((e,t)=>{i(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return c()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:s,setValidationErrors:f,clearValidationError:l,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{p(e,{hidden:!0})},[p]),showValidationError:Object(n.useCallback)(e=>{p(e,{hidden:!1})},[p]),showAllValidationErrors:Object(n.useCallback)(()=>{i(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:u};return Object(n.createElement)(a.Provider,{value:m},t)}},,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(78);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const i=n.a.addEventCallback(e,r,o);return t(i),()=>{t(n.a.removeEventCallback(e,i.id))}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(31);const i=async(e,t,r)=>{const o=n(e,t),i=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&i.push(t)}catch(e){console.error(e)}return!i.length||i},c=async(e,t,r)=>{const i=[],c=n(e,t);for(const e of c)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return i.push(t),i;i.push(t)}catch(e){return console.error(e),i.push({type:"error"}),i}return i}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(0),o=r(74),i=r(100),c=r.n(i),a=r(22);const s=(e,t)=>e&&t[e]?t[e]:null,u=e=>{let{block:t,blockMap:r,blockWrapper:o,children:i,depth:l=1}=e;return i&&0!==i.length?Array.from(i).map((e,i)=>{const{blockName:d="",...f}={key:`${t}_${l}_${i}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},p=s(d,r);if(!p){const i=c()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof i&&i)return i;if(!Object(n.isValidElement)(i))return null;const a=e.childNodes.length?u({block:t,blockMap:r,children:e.childNodes,depth:l+1,blockWrapper:o}):void 0;return a?Object(n.cloneElement)(i,f,a):Object(n.cloneElement)(i,f)}const m=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${l}_${i}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(m,null,Object(n.createElement)(p,f,u({block:t,blockMap:r,children:e.children,depth:l+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(a.hasInnerBlocks)(e))return null;const i=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],c=Object(a.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!i.includes(t)}),u=o||n.Fragment;return Object(n.createElement)(u,null,c.map((e,r)=>{let{blockName:o,component:i}=e;const c=i||s(o,t);return c?Object(n.createElement)(c,{key:`${o}_forced_${r}`}):null}))})(d,r,e.children,o))))}):null},l=e=>{let{Block:t,selector:r,blockName:n,getProps:i=(()=>({})),blockMap:c,blockWrapper:a}=e;Object(o.b)({Block:t,selector:r,getProps:(e,t)=>{const r=u({block:n,blockMap:c,children:e.children||[],blockWrapper:a});return{...i(e,t),children:r}}})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(0);const o=Object(n.createContext)({hasDarkControls:!1}),i=()=>Object(n.useContext)(o)},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(239)},function(e,t){},,,,,,,,,,,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(163),o=r(0),i=r(26),c=r(24),a=r(164),s=r(84),u=r(22),l=r(151),d=r(152),f=r(168),p=r(172),m=r(169),h=r(171),b=r(170),g=r(173),v=r(174);r.p=s.k,Object(u.registerCheckoutBlock)({metadata:l,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,366)))}),Object(u.registerCheckoutBlock)({metadata:d,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,367)))}),Object(u.registerCheckoutBlock)({metadata:l,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,366)))}),Object(u.registerCheckoutBlock)({metadata:d,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,367)))}),Object(u.registerCheckoutBlock)({metadata:f,component:Object(o.lazy)(()=>r.e(26).then(r.bind(null,368)))}),Object(u.registerCheckoutBlock)({metadata:m,component:Object(o.lazy)(()=>Promise.all([r.e(1),r.e(4),r.e(27)]).then(r.bind(null,369)))}),Object(u.registerCheckoutBlock)({metadata:b,component:Object(o.lazy)(()=>r.e(29).then(r.bind(null,370)))}),Object(u.registerCheckoutBlock)({metadata:h,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(28)]).then(r.bind(null,381)))}),Object(u.registerCheckoutBlock)({metadata:p,component:Object(o.lazy)(()=>r.e(24).then(r.bind(null,388)))}),Object(u.registerCheckoutBlock)({metadata:g,component:Object(o.lazy)(()=>r.e(22).then(r.bind(null,389)))}),Object(u.registerCheckoutBlock)({metadata:v,component:Object(o.lazy)(()=>r.e(21).then(r.bind(null,390)))});var y=r(1),O=r(153),E=r(154),S=r(2),j=r(34),w=r(87),_=r(97),k=r(241),C=r(80),R=r(148);const T=e=>{let{children:t,redirectUrl:r}=e;return Object(o.createElement)(R.a,{isCart:!0,redirectUrl:r},t)};var P=r(165);r(223);const x=()=>{window.location.reload(!0)},A=e=>{let{children:t,attributes:r}=e;const{cartIsLoading:n}=Object(i.a)(),{hasDarkControls:c}=r;return Object(o.createElement)(O.a,{showSpinner:!0,isLoading:n},Object(o.createElement)(P.a.Provider,{value:{hasDarkControls:c}},Object(o.createElement)(E.a,null,t)))},M=e=>{let{scrollToTop:t}=e;return Object(o.useEffect)(()=>{const e=Object(w.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",t),()=>{e(),document.body.removeEventListener("wc-blocks_added_to_cart",t)}},[t]),null};var N=Object(_.a)(e=>{let{attributes:t,children:r,scrollToTop:n}=e;return Object(o.createElement)(j.a,{header:Object(y.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(y.__)("The cart has encountered an unexpected error. If the error persists, please get in touch with us for help.","woo-gutenberg-products-block"),button:Object(o.createElement)("button",{className:"wc-block-button",onClick:x},Object(y.__)("Reload the page","woo-gutenberg-products-block")),showErrorMessage:S.CURRENT_USER_IS_ADMIN},Object(o.createElement)(k.a,{context:"wc/cart"},Object(o.createElement)(C.a,{context:"wc/cart"},Object(o.createElement)(u.SlotFillProvider,null,Object(o.createElement)(T,null,Object(o.createElement)(A,{attributes:t},r),Object(o.createElement)(M,{scrollToTop:n}))))))});const I={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(S.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(S.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}};Object(a.a)({Block:N,blockName:"woocommerce/cart",selector:".wp-block-woocommerce-cart",getProps:e=>({attributes:Object(n.a)(I,e?e.dataset:{})}),blockMap:Object(c.getRegisteredBlockComponents)("woocommerce/cart"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:n,...c}=Object(i.a)();return o.Children.map(t,e=>{if(Object(o.isValidElement)(e)){const t={extensions:r,cart:c};return Object(o.cloneElement)(e,t)}return e})}})},,function(e,t,r){"use strict";r.d(t,"b",(function(){return w})),r.d(t,"a",(function(){return _}));var n=r(0),o=(r(8),r(9)),i=r(11),c=r(79),a=r.n(c);function s(e,t,r,n,o,i,c){try{var a=e[i](c),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){s(i,n,o,c,a,"next",e)}function a(e){s(i,n,o,c,a,"throw",e)}c(void 0)}))}}var l=r(20),d=r(5),f=r.n(d),p=r(4),m=r(103),h=r(21),b=r(127),g=function(e){var t=e.notices,r=e.className,o=e.children,c=e.onRemove,s=void 0===c?p.noop:c,d=Object(h.useReducedMotion)(),g=Object(n.useState)((function(){return new WeakMap})),v=Object(l.a)(g,1)[0],y=Object(m.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=u(a.a.mark((function t(r){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r({opacity:1,height:v.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(_x){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=u(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:d});r=f()("components-snackbar-list",r);var O=function(e){return function(){return s(e.id)}};return Object(n.createElement)("div",{className:r},o,y.map((function(e){var t=e.item,r=e.key,o=e.props;return Object(n.createElement)(m.animated.div,{key:r,style:o},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&v.set(t,e)}},Object(n.createElement)(b.a,Object(i.a)({},Object(p.omit)(t,["content"]),{onRemove:O(t)}),t.content)))})))},v=r(22);const y={};var O=e=>{let{className:t,notices:r,removeNotice:o,isEditor:i}=e;if(i)return null;const c=r.filter(e=>"snackbar"===e.type),a=c.length>0?c.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):y,s=Object(v.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:a}),u=c.filter(e=>!0===s[e.content]),l=f()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(g,{notices:u,className:l,onRemove:o})},E=r(42),S=r(28);const j=Object(n.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),w=()=>Object(n.useContext)(j),_=e=>{let{children:t,context:r="wc/core"}=e;const{createNotice:i,removeNotice:c}=Object(o.useDispatch)("core/notices"),[a,s]=Object(n.useState)(!1),{dispatchStoreEvent:u}=Object(E.a)(),{isEditor:l}=Object(S.a)(),d=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i("default",e,{...t,type:"snackbar",context:t.context||r}),u("store-notice-create",{status:"default",content:e,options:t})}),[i,u,r]),f=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;c(e,t)}),[c,r]),{notices:p}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(r)}),[r]),m={notices:p,createSnackbarNotice:d,removeSnackbarNotice:f,context:r,setIsSuppressed:s},h=a?null:Object(n.createElement)(O,{notices:m.notices,removeNotice:m.removeSnackbarNotice,isEditor:l});return Object(n.createElement)(j.Provider,{value:m},t,h)}}]); \ No newline at end of file diff --git a/build/cart.asset.php b/build/cart.asset.php new file mode 100644 index 00000000000..d82fb3b9a2d --- /dev/null +++ b/build/cart.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '963155d77b6ba971a8bfb6a4eec36b4a'); \ No newline at end of file diff --git a/build/cart.js b/build/cart.js new file mode 100644 index 00000000000..3aae9921023 --- /dev/null +++ b/build/cart.js @@ -0,0 +1,43 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.cart=function(e){function t(t){for(var r,a,s=t[0],i=t[1],l=t[2],d=0,p=[];d{let{className:t,showSpinner:c=!1,children:r,...s}=e;const u=i()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(o.createElement)(a.a,n()({className:u},s),c&&Object(o.createElement)(l.a,null),Object(o.createElement)("span",{className:"wc-block-components-button__text"},r))}},11:function(e,t){e.exports=window.wp.apiFetch},110:function(e,t,c){"use strict";c.d(t,"c",(function(){return o})),c.d(t,"d",(function(){return a})),c.d(t,"a",(function(){return s})),c.d(t,"b",(function(){return i}));var r=c(14),n=c(32);const o=(e,t)=>{if(n.n>2)return Object(r.registerBlockType)(e,t)},a=(e,t)=>{if(n.n>1)return Object(r.registerBlockType)(e,t)},s=()=>n.n>2,i=()=>n.n>1},113:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"c",(function(){return n})),c.d(t,"b",(function(){return o})),c.d(t,"d",(function(){return a}));const r=e=>"number"==typeof e,n=e=>"string"==typeof e,o=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function a(e,t){return o(e)&&t in e}},12:function(e,t){e.exports=window.wp.compose},126:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0);const n=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},13:function(e,t){e.exports=window.wp.url},132:function(e,t,c){"use strict";var r=c(3),n=c(1),o=c(113);const a=Object(r.getSetting)("countryLocale",{}),s=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(n.sprintf)( +/* translators: %s Field label. */ +Object(n.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(o.a)(e.priority)&&(t.index=e.priority),Object(o.c)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},i=Object.entries(a).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,s(c)]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=c&&void 0!==i[c]?i[c]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...n[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},133:function(e,t,c){"use strict";var r=c(0);c(223),t.a=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},134:function(e,t){e.exports=window.wp.wordcount},139:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(53),a=c(5),s=c.n(a),i=c(44);c(220);const l=e=>{let{currency:t,maxPrice:c,minPrice:a,priceClassName:l,priceStyle:u}=e;return Object(r.createElement)(r.Fragment,null,Object(r.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","woo-gutenberg-products-block"),Object(i.formatPrice)(a),Object(i.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:t,value:a,style:u})," — ",Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:a,regularPrice:i,priceClassName:l,priceStyle:u,price:d}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(o.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:a},e),value:i}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(o.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",l),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:n,format:a="",maxPrice:i,minPrice:d,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}=e;const j=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});a.includes("")||(a="",console.error("Price formats need to include the `` tag."));const E=g&&p!==g;let _=Object(r.createElement)("span",{className:s()("wc-block-components-product-price__value",b)});return E?_=Object(r.createElement)(u,{currency:n,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}):void 0!==d&&void 0!==i?_=Object(r.createElement)(l,{currency:n,maxPrice:i,minPrice:d,priceClassName:b,priceStyle:m}):p&&(_=Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",b),currency:n,value:p,style:m})),Object(r.createElement)("span",{className:j},Object(r.createInterpolateElement)(a,{price:_}))}},14:function(e,t){e.exports=window.wp.blocks},141:function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return s}));var r=c(6);let n;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(n||(n={}));const o={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:c,id:r,callback:o,priority:s}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case n.ADD_EVENT_CALLBACK:return i.set(r,{priority:s,callback:o}),{...e,[c]:i};case n.REMOVE_EVENT_CALLBACK:return i.delete(r),{...e,[c]:i}}}},142:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(8);function n(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},143:function(e,t,c){"use strict";var r=c(0),n=c(5),o=c.n(n);c(335),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)("div",{className:o()("wc-block-components-product-badge",c)},t)}},148:function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var r=c(0),n=c(6),o=c(31),a=c.n(o);const s=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(r.useContext)(s),l=e=>{let{children:t}=e;const[c,o]=Object(r.useState)({}),i=Object(r.useCallback)(e=>c[e],[c]),l=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{o(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{o({})},[]),p=Object(r.useCallback)(e=>{e&&o(t=>(e=Object(n.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),b=Object(r.useCallback)((e,t)=>{o(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return a()(c[e],r)?c:{...c,[e]:r}})},[]),m={getValidationError:i,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{b(e,{hidden:!0})},[b]),showValidationError:Object(r.useCallback)(e=>{b(e,{hidden:!1})},[b]),showAllValidationErrors:Object(r.useCallback)(()=>{o(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:l};return Object(r.createElement)(s.Provider,{value:m},t)}},150:function(e,t,c){"use strict";var r=c(16),n=c.n(r),o=c(0),a=c(8),s=c(1),i=c(32),l=e=>{let{imageUrl:t=i.m+"/block-error.svg",header:c=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:n,errorMessagePrefix:a=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(o.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(o.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(o.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(o.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),r&&Object(o.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),n&&Object(o.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",n),l&&Object(o.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};c(244);class u extends a.Component{constructor(){super(...arguments),n()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,text:r,errorMessagePrefix:n,renderError:a,button:s}=this.props,{errorMessage:i,hasError:u}=this.state;return u?"function"==typeof a?a({errorMessage:i}):Object(o.createElement)(l,{errorMessage:c?i:null,header:e,imageUrl:t,text:r,errorMessagePrefix:n,button:s}):this.props.children}}t.a=u},159:function(e,t,c){"use strict";var r=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:n,secondaryDescription:o,id:a}=e;return Object(r.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(r.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(r.createElement)("span",{id:a&&a+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(r.createElement)("span",{id:a&&a+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},n&&Object(r.createElement)("span",{id:a&&a+"__description",className:"wc-block-components-radio-control__description"},n),o&&Object(r.createElement)("span",{id:a&&a+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},o)))}},160:function(e,t,c){"use strict";var r=c(0),n=c(5),o=c.n(n),a=c(159);t.a=e=>{let{checked:t,name:c,onChange:n,option:s}=e;const{value:i,label:l,description:u,secondaryLabel:d,secondaryDescription:p}=s;return Object(r.createElement)("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${i}`},Object(r.createElement)("input",{id:`${c}-${i}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:i,onChange:e=>n(e.target.value),checked:t,"aria-describedby":o()({[`${c}-${i}__label`]:l,[`${c}-${i}__secondary-label`]:d,[`${c}-${i}__description`]:u,[`${c}-${i}__secondary-description`]:p})}),Object(r.createElement)(a.a,{id:`${c}-${i}`,label:l,secondaryLabel:d,description:u,secondaryDescription:p}))}},161:function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},162:function(e,t,c){"use strict";var r=c(7),n=c.n(r),o=c(0),a=c(5),s=c.n(a);c(2),c(338),t.a=e=>{let{children:t,className:c,headingLevel:r,...a}=e;const i=s()("wc-block-components-title",c),l="h"+r;return Object(o.createElement)(l,n()({className:i},a),t)}},163:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(10),n=c(0),o=c(19),a=c(126);const s=()=>{const e=Object(a.a)(),{selectShippingRate:t}=Object(r.useDispatch)(o.CART_STORE_KEY);return{selectShippingRate:Object(n.useCallback)((c,r)=>{t(c,r).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(r.useSelect)(e=>e(o.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},173:function(e,t,c){"use strict";var r=c(7),n=c.n(r),o=c(0),a=c(20),s=c(5),i=c.n(s);c(219),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:s="",rel:l,style:u,onClick:d,...p}=e;const b=i()("wc-block-components-product-name",t);if(c){const e=p;return Object(o.createElement)("span",n()({className:b},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)}}))}return Object(o.createElement)("a",n()({className:b,href:s,rel:l},p,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)},style:u}))}},174:function(e,t,c){"use strict";c.d(t,"b",(function(){return g})),c.d(t,"a",(function(){return h}));var r=c(0),n=(c(2),c(10)),o=c(75),a=c(73),s=c(7),i=c.n(s),l=c(5),u=c.n(l),d=c(888);c(221);const p=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var b=e=>{let{className:t,notices:c,removeNotice:n}=e;const o=c.filter(e=>"snackbar"!==e.type);if(!o.length)return null;const a=u()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:a},o.map(e=>Object(r.createElement)(d.a,i()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&n(e.id)}}),e.content)))};const m=Object(r.createContext)({notices:[],createNotice:(e,t,c)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),g=()=>Object(r.useContext)(m),h=e=>{let{children:t,className:c="",createNoticeContainer:s=!0,context:i="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(n.useDispatch)("core/notices"),[d,p]=Object(r.useState)(!1),{dispatchStoreEvent:g}=Object(o.a)(),{isEditor:h}=Object(a.b)(),O=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...c,context:c.context||i}),g("store-notice-create",{status:e,content:t,options:c})}),[l,g,i]),j=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;u(e,t)}),[u,i]),{notices:E}=Object(n.useSelect)(e=>({notices:e("core/notices").getNotices(i)}),[i]),_={notices:E,createNotice:O,removeNotice:j,context:i,setIsSuppressed:p},f=d?null:Object(r.createElement)(b,{className:c,notices:_.notices,removeNotice:_.removeNotice,isEditor:h});return Object(r.createElement)(m.Provider,{value:_},s&&f,t)}},175:function(e,t,c){"use strict";var r=c(0),n=c(134),o=c(103);const a=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),i=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,l=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=s(e),n=r.split(" ").splice(0,t).join(" ");return Object(o.autop)(i(n,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const n=s(e),a=n.slice(0,t);if(c)return Object(o.autop)(i(a,r));const l=a.match(/([\s]+)/g),u=l?l.length:0,d=n.slice(0,t+u);return Object(o.autop)(i(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:i=""}=e;const d=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(o.autop)(e),s=Object(n.count)(r,c);if(s<=t)return r;const i=a(r),d=Object(n.count)(i,c);return d<=t?i:"words"===c?l(i,t):u(i,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{className:i},d)}},18:function(e,t){e.exports=window.wp.primitives},186:function(e,t){},19:function(e,t){e.exports=window.wc.wcBlocksData},195:function(e,t){},197:function(e,t){e.exports=window.wp.warning},198:function(e,t,c){"use strict";var r=c(0),n=c(5),o=c.n(n),a=c(12),s=c(160);c(347),t.a=Object(a.withInstanceId)(e=>{let{className:t,instanceId:c,id:n,selected:a,onChange:i,options:l=[]}=e;const u=n||c;return l.length&&Object(r.createElement)("div",{className:o()("wc-block-components-radio-control",t)},l.map(e=>Object(r.createElement)(s.a,{key:`${u}-${e.value}`,name:"radio-control-"+u,checked:e.value===a,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},199:function(e,t,c){"use strict";var r=c(16),n=c.n(r),o=c(0),a=c(1),s=c(8),i=(c(2),c(3)),l=c(43);class u extends s.Component{constructor(){super(...arguments),n()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(a.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(a.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const r=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.StoreNoticesContainer,{notices:r})}return this.props.children}}u.defaultProps={isEditor:!1},t.a=u},20:function(e,t){e.exports=window.wp.htmlEntities},211:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})},219:function(e,t){},22:function(e,t){e.exports=window.wc.blocksCheckout},220:function(e,t){},221:function(e,t){},222:function(e,t){},223:function(e,t){},224:function(e,t){},242:function(e,t){},243:function(e,t){},244:function(e,t){},249:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(362),a=c(258),s=c(73),i=c(260),l=c(51),u=c.n(l),d=c(199);t.a=()=>{const{isEditor:e}=Object(s.b)(),{setActivePaymentMethod:t,setExpressPaymentError:c,activePaymentMethod:l,paymentMethodData:p,setPaymentStatus:b}=Object(i.b)(),m=Object(o.a)(),{paymentMethods:g}=Object(a.a)(),h=Object(r.useRef)(l),O=Object(r.useRef)(p),j=Object(r.useCallback)(e=>()=>{h.current=l,O.current=p,b().started({}),t(e)},[l,p,t,b]),E=Object(r.useCallback)(()=>{b().pristine(),t(h.current),O.current.isSavedToken&&b().started(O.current)},[t,b]),_=Object(r.useCallback)(e=>{b().error(e),c(e),t(h.current),O.current.isSavedToken&&b().started(O.current)},[t,b,c]),f=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?_(e):c("")}),[c,_]),y=Object.entries(g),v=y.length>0?y.map(t=>{let[c,n]=t;const o=e?n.edit:n.content;return Object(r.isValidElement)(o)?Object(r.createElement)("li",{key:c,id:"express-payment-method-"+c},Object(r.cloneElement)(o,{...m,onClick:j(c),onClose:E,onError:_,setExpressPaymentError:f})):null}):Object(r.createElement)("li",{key:"noneRegistered"},Object(n.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(r.createElement)(d.a,{isEditor:e},Object(r.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},v))}},250:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(4),a=c(10),s=c(34);t.a=e=>{let{setPageId:t,pageId:c,labels:i}=e;const l=Object(a.useSelect)(e=>e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100}),[])||null;return l?Object(r.createElement)(o.PanelBody,{title:i.title},Object(r.createElement)(o.SelectControl,{label:Object(n.__)("Link to","woo-gutenberg-products-block"),value:c,options:[{label:i.default,value:0},...l.map(e=>({label:Object(s.a)(e,l),value:parseInt(e.id,10)}))],onChange:e=>t(parseInt(e,10))})):null}},251:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(0),n=c(1),o=(c(2),c(55)),a=c(281),s=c(161);c(352);const i=e=>{let{text:t,url:c="https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565"}=e;return Object(r.createElement)("div",{className:"wc-block-feedback-prompt"},Object(r.createElement)(o.a,{srcElement:a.a}),Object(r.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(n.__)("Feedback?","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(r.createElement)("a",{href:c,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(n.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(r.createElement)(o.a,{srcElement:s.a,size:16})))},l=()=>Object(r.createElement)(i,{text:Object(n.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woo-gutenberg-products-block"),url:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?template=--cart-checkout-feedback.md"})},252:function(e,t){e.exports=window.wp.plugins},253:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(62),a=c(97),s=c(22),i=c(813),l=c(46),u=c(73),d=c(5),p=c.n(d),b=c(20),m=c(37),g=c(31),h=c.n(g),O=c(163),j=c(75);const E=e=>{var t;return null===(t=e.find(e=>e.selected))||void 0===t?void 0:t.rate_id};var _=c(198),f=c(159),y=c(44),v=c(53),k=c(3);const w=e=>{const t=Object(k.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(b.decodeEntities)(e.name),value:e.rate_id,description:Object(r.createElement)(r.Fragment,null,Number.isFinite(t)&&Object(r.createElement)(v.a,{currency:Object(y.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(b.decodeEntities)(e.delivery_time))}};var S=e=>{let{className:t,noResultsMessage:c,onSelectRate:n,rates:o,renderOption:a=w,selected:s}=e;if(0===o.length)return c;if(o.length>1)return Object(r.createElement)(_.a,{className:t,onChange:e=>{n(e)},selected:s,options:o.map(a)});const{label:i,secondaryLabel:l,description:u,secondaryDescription:d}=a(o[0]);return Object(r.createElement)(f.a,{label:i,secondaryLabel:l,description:u,secondaryDescription:d})};c(346);var C=e=>{let{packageId:t,className:c,noResultsMessage:o,renderOption:a,packageData:i,collapsible:l=!1,collapse:u=!1,showItems:d=!1}=e;const{selectShippingRate:g,selectedShippingRate:_}=((e,t)=>{const{dispatchCheckoutEvent:c}=Object(j.a)(),{selectShippingRate:n,isSelectingRate:o}=Object(O.a)(),[a,s]=Object(r.useState)(()=>E(t)),i=Object(r.useRef)(t);return Object(r.useEffect)(()=>{h()(i.current,t)||(i.current=t,s(E(t)))},[t]),{selectShippingRate:Object(r.useCallback)(t=>{s(t),n(t,e),c("set-selected-shipping-rate",{shippingRateId:t})},[e,n,c]),selectedShippingRate:a,isSelectingRate:o}})(t,i.shipping_rates),f=Object(r.createElement)(r.Fragment,null,(d||l)&&Object(r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},i.name),d&&Object(r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(i.items).map(e=>{const t=Object(b.decodeEntities)(e.name),c=e.quantity;return Object(r.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(r.createElement)(m.a,{label:c>1?`${t} × ${c}`:""+t,screenReaderLabel:Object(n.sprintf)( +/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ +Object(n._n)("%1$s (%2$d unit)","%1$s (%2$d units)",c,"woo-gutenberg-products-block"),t,c)}))}))),y=Object(r.createElement)(S,{className:c,noResultsMessage:o,rates:i.shipping_rates,onSelectRate:g,selected:_,renderOption:a});return l?Object(r.createElement)(s.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!u,title:f},y):Object(r.createElement)("div",{className:p()("wc-block-components-shipping-rates-control__package",c)},f,y)};const N=e=>{let{packages:t,collapse:c,showItems:n,collapsible:o,noResultsMessage:a,renderOption:s}=e;return t.length?Object(r.createElement)(r.Fragment,null,t.map(e=>{let{package_id:t,...i}=e;return Object(r.createElement)(C,{key:t,packageId:t,packageData:i,collapsible:o,collapse:c,showItems:n,noResultsMessage:a,renderOption:s})})):null};t.a=e=>{let{shippingRates:t,shippingRatesLoading:c,className:d,collapsible:p=!1,noResultsMessage:b,renderOption:m}=e;Object(r.useEffect)(()=>{if(c)return;const e=Object(i.a)(t),r=Object(i.b)(t);1===e?Object(o.speak)(Object(n.sprintf)( +/* translators: %d number of shipping options found. */ +Object(n._n)("%d shipping option was found.","%d shipping options were found.",r,"woo-gutenberg-products-block"),r)):Object(o.speak)(Object(n.sprintf)( +/* translators: %d number of shipping packages packages. */ +Object(n._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(n.sprintf)( +/* translators: %d number of shipping options available. */ +Object(n._n)("%d shipping option was found","%d shipping options were found",r,"woo-gutenberg-products-block"),r))},[c,t]);const{extensions:g,receiveCart:h,...O}=Object(l.a)(),j={className:d,collapsible:p,noResultsMessage:b,renderOption:m,extensions:g,cart:O,components:{ShippingRatesControlPackage:C}},{isEditor:E}=Object(u.b)();return Object(r.createElement)(a.a,{isLoading:c,screenReaderLabel:Object(n.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},E?Object(r.createElement)(N,{packages:t,noResultsMessage:b,renderOption:m}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.ExperimentalOrderShippingPackages.Slot,j),Object(r.createElement)(s.ExperimentalOrderShippingPackages,null,Object(r.createElement)(N,{packages:t,noResultsMessage:b,renderOption:m}))))}},254:function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var r=c(1),n=c(10),o=c(19),a=c(20),s=c(46),i=c(0);c(2),c(900),c(5),c(22),c(75),c(73);const l=Object(i.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"});var u=c(148),d=c(63);const p=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(s.a)(),{addErrorNotice:c}=Object(d.a)(),{addSnackbarNotice:p}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:r}=Object(i.useContext)(l),n=Object(i.useRef)(e);Object(i.useEffect)(()=>{n.current=e},[e]);const o=Object(i.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;n.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),a=Object(i.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...o,...a,setIsSuppressed:r}})(),{setValidationErrors:b}=Object(u.b)();return{appliedCoupons:e,isLoading:t,...Object(n.useSelect)((e,t)=>{let{dispatch:n}=t;const s=e(o.CART_STORE_KEY),i=s.isApplyingCoupon(),l=s.isRemovingCoupon(),{applyCoupon:u,removeCoupon:d,receiveApplyingCoupon:m}=n(o.CART_STORE_KEY);return{applyCoupon:e=>{u(e).then(t=>{!0===t&&p(Object(r.sprintf)( +/* translators: %s coupon code. */ +Object(r.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{b({coupon:{message:Object(a.decodeEntities)(e.message),hidden:!1}}),m("")})},removeCoupon:e=>{d(e).then(t=>{!0===t&&p(Object(r.sprintf)( +/* translators: %s coupon code. */ +Object(r.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{c(e.message,{id:"coupon-form"}),m("")})},isApplyingCoupon:i,isRemovingCoupon:l}},[c,p])}}},255:function(e,t,c){"use strict";var r=c(7),n=c.n(r),o=c(0),a=c(5),s=c.n(a);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:c=null,alt:r=""}=e;return c?Object(o.createElement)("img",{className:i(t),src:c,alt:r}):null},u=c(32);const d=[{id:"alipay",alt:"Alipay",src:u.m+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.m+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.m+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.m+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.m+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.m+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.m+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.m+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.m+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.m+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.m+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.m+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.m+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.m+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.m+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.m+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.m+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.m+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.m+"payment-methods/wechat.svg"}];var p=c(113);c(350),t.a=e=>{let{icons:t=[],align:c="center",className:r}=e;const a=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(p.c)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===a.length)return null;const i=s()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},r);return Object(o.createElement)("div",{className:i},a.map(e=>{const t={...e,...(c=e.id,d.find(e=>e.id===c)||{})};var c;return Object(o.createElement)(l,n()({key:"payment-method-icon-"+e.id},t))}))}},256:function(e,t,c){"use strict";var r=c(7),n=c.n(r),o=c(0),a=c(5),s=c.n(a),i=c(1),l=c(55),u=c(331);c(195);var d=e=>{let{text:t,screenReaderText:c="",element:r="li",className:a="",radius:i="small",children:l=null,...u}=e;const d=r,p=s()(a,"wc-block-components-chip","wc-block-components-chip--radius-"+i),b=Boolean(c&&c!==t);return Object(o.createElement)(d,n()({className:p},u),Object(o.createElement)("span",{"aria-hidden":b,className:"wc-block-components-chip__text"},t),b&&Object(o.createElement)("span",{className:"screen-reader-text"},c),l)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:r=!1,onRemove:a=(()=>{}),removeOnAnyClick:p=!1,text:b,screenReaderText:m="",...g}=e;const h=p?"span":"button";if(!t){const e=m&&"string"==typeof m?m:b;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(i.__)("Remove","woo-gutenberg-products-block"):Object(i.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(i.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:r,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},j=p?O:{},E=p?{"aria-hidden":!0}:O;return Object(o.createElement)(d,n()({},g,j,{className:s()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(o.createElement)(h,n()({className:"wc-block-components-chip__remove"},E),Object(o.createElement)(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},258:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(52),n=c(260);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:a}=Object(n.b)(),s=Object(r.a)(t),i=Object(r.a)(c);return{paymentMethods:e?i:s,isInitialized:e?a:o}},a=()=>o(!1),s=()=>o(!0)},260:function(e,t,c){"use strict";c.d(t,"b",(function(){return L})),c.d(t,"a",(function(){return B}));var r=c(0);let n,o;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(n||(n={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method"}(o||(o={}));const a={currentStatus:n.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},s={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:n,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:()=>{},activeSavedToken:"",setActiveSavedToken:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1},i=e=>!("object"!=typeof e||!e.isSavedToken);var l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:s="",paymentMethods:l={}}=arguments.length>1?arguments[1]:void 0;switch(t){case n.STARTED:return{...e,currentStatus:n.STARTED,paymentMethodData:c||e.paymentMethodData,hasSavedToken:i(c||e.paymentMethodData)};case n.ERROR:return e.currentStatus!==n.ERROR?{...e,currentStatus:n.ERROR,errorMessage:s||e.errorMessage}:e;case n.FAILED:return e.currentStatus!==n.FAILED?{...e,currentStatus:n.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:s||e.errorMessage}:e;case n.SUCCESS:return e.currentStatus!==n.SUCCESS?{...e,currentStatus:n.SUCCESS,paymentMethodData:c||e.paymentMethodData,hasSavedToken:i(c||e.paymentMethodData)}:e;case n.PROCESSING:return e.currentStatus!==n.PROCESSING?{...e,currentStatus:n.PROCESSING,errorMessage:""}:e;case n.COMPLETE:return e.currentStatus!==n.COMPLETE?{...e,currentStatus:n.COMPLETE}:e;case n.PRISTINE:return{...a,currentStatus:n.PRISTINE,paymentMethods:{...e.paymentMethods},expressPaymentMethods:{...e.expressPaymentMethods},shouldSavePaymentMethod:e.shouldSavePaymentMethod};case o.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:l};case o.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:l};case o.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r}}},u=c(1),d=c(47),p=c(52),b=c(3),m=c(165),g=c(73),h=c(98),O=c(81),j=c(46),E=c(63),_=c(59);const f=(e,t,c,n)=>{const[o,a]=Object(r.useState)(!1),{isEditor:s}=Object(g.b)(),{selectedRates:i}=Object(h.b)(),{billingData:l,shippingAddress:d}=Object(O.b)(),_=Object(p.a)(i),f=Object(p.a)(c),y=Object(j.a)(),{cartTotals:v,cartNeedsShipping:k,paymentRequirements:w}=y,S=Object(r.useRef)({cart:y,cartTotals:v,cartNeedsShipping:k,billingData:l,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:w}),{addErrorNotice:C}=Object(E.a)();Object(r.useEffect)(()=>{S.current={cart:y,cartTotals:v,cartNeedsShipping:k,billingData:l,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:w}},[y,v,k,l,d,_,w]);const N=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e{M()},[M,y,_,l]),o},y=e=>({type:e}),v=e=>({type:n.ERROR,errorMessage:e}),k=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:n.FAILED,errorMessage:t,paymentMethodData:c}},w=e=>{let{paymentMethodData:t}=e;return{type:n.SUCCESS,paymentMethodData:t}},S=e=>{let{paymentMethodData:t}=e;return{type:n.STARTED,paymentMethodData:t}},C=e=>({type:o.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),N=e=>({type:o.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),M=e=>({type:o.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e});var I=c(75),R=c(74),x=c(141),P=c(373);var T=c(376),A=c(148);const D=Object(r.createContext)(s),L=()=>Object(r.useContext)(D),B=e=>{let{children:t}=e;const{isProcessing:c,isIdle:o,isCalculating:s,hasError:i}=Object(R.b)(),{isEditor:u,getPreviewData:p}=Object(g.b)(),{setValidationErrors:m}=Object(A.b)(),{addErrorNotice:j,removeNotice:L}=Object(E.a)(),{isSuccessResponse:B,isErrorResponse:U,isFailResponse:V,noticeContexts:z}=Object(_.c)(),[F,G]=Object(r.useReducer)(x.b,{}),{onPaymentProcessing:H}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(P.a)("payment_processing",e)}),[e]))(G),Y=Object(r.useRef)(F);Object(r.useEffect)(()=>{Y.current=F},[F]);const[q,$]=Object(r.useReducer)(l,a),{dispatchActions:W,setPaymentStatus:Q}=(e=>{const{setBillingData:t}=Object(O.b)(),{setShippingAddress:c}=Object(h.b)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(C(t))},setRegisteredExpressPaymentMethods:t=>{e(N(t))},setShouldSavePayment:t=>{e(M(t))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(y(n.PRISTINE)),started:t=>{e(S({paymentMethodData:t}))},processing:()=>e(y(n.PROCESSING)),completed:()=>e(y(n.COMPLETE)),error:t=>e(v(t)),failed:function(c,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),e(k({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),void 0!==typeof o&&null!=o&&o.address&&c(o.address),e(w({paymentMethodData:r}))}}),[e,t,c])}})($),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:c}=Object(_.c)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return f(e,t,Array.from(r),c.PAYMENTS)})(W.setRegisteredPaymentMethods),X=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:c}=Object(_.c)();return f(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),{activePaymentMethod:Z,activeSavedToken:J,setActivePaymentMethod:ee,setActiveSavedToken:te}=(()=>{const{dispatchCheckoutEvent:e}=Object(I.a)(),[t,c]=Object(r.useState)(""),[n,o]=Object(r.useState)("");return Object(r.useEffect)(()=>{e("set-active-payment-method",{activePaymentMethod:t})},[e,t]),{activePaymentMethod:t,activeSavedToken:n,setActivePaymentMethod:c,setActiveSavedToken:o}})(),ce=Object(r.useMemo)(()=>u?p("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const n=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});n.length&&(r[c]=n)}),r}(q.paymentMethods):{},[u,p,K,q.paymentMethods]),re=Object(r.useCallback)(e=>{e?j(e,{id:"wc-express-payment-error",context:z.EXPRESS_PAYMENTS}):L("wc-express-payment-error",z.EXPRESS_PAYMENTS)},[j,z.EXPRESS_PAYMENTS,L]),ne=Object.keys(q.expressPaymentMethods).includes(Z),oe=Object(r.useMemo)(()=>({isPristine:q.currentStatus===n.PRISTINE,isStarted:q.currentStatus===n.STARTED,isProcessing:q.currentStatus===n.PROCESSING,isFinished:[n.ERROR,n.FAILED,n.SUCCESS].includes(q.currentStatus),hasError:q.currentStatus===n.ERROR,hasFailed:q.currentStatus===n.FAILED,isSuccessful:q.currentStatus===n.SUCCESS,isDoingExpressPayment:q.currentStatus!==n.PRISTINE&&ne}),[q.currentStatus,ne]);Object(r.useEffect)(()=>{const e=Object.keys(q.paymentMethods),t=[...e,...Object.keys(q.expressPaymentMethods)];K&&e.length&&ee(e=>e&&t.includes(e)?e:(Q().pristine(),Object.keys(q.paymentMethods)[0]))},[K,q.paymentMethods,q.expressPaymentMethods,ee,Q]),Object(r.useEffect)(()=>{!c||i||s||oe.isFinished||Q().processing()},[c,i,s,oe.isFinished,Q]),Object(r.useEffect)(()=>{o&&!oe.isSuccessful&&Q().pristine()},[o,oe.isSuccessful,Q]),Object(r.useEffect)(()=>{i&&oe.isSuccessful&&!q.hasSavedToken&&Q().pristine()},[i,oe.isSuccessful,q.hasSavedToken,Q]),Object(r.useEffect)(()=>{oe.isProcessing&&(L("wc-payment-error",z.PAYMENTS),Object(T.b)(Y.current,"payment_processing",{}).then(e=>{let t,c;var r,n,o,a,s,i;if(e.forEach(e=>{B(e)&&(t=e),(U(e)||V(e))&&(c=e)}),t&&!c)Q().success(null===(r=t)||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.paymentMethodData,null===(o=t)||void 0===o||null===(a=o.meta)||void 0===a?void 0:a.billingData,null===(s=t)||void 0===s||null===(i=s.meta)||void 0===i?void 0:i.shippingData);else if(c&&V(c)){var l,u,d,p,b,g;c.message&&c.message.length&&j(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(g=c)||void 0===g?void 0:g.messageContext)||z.PAYMENTS}),Q().failed(null===(l=c)||void 0===l?void 0:l.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingData)}else if(c){var h,O;c.message&&c.message.length&&j(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(O=c)||void 0===O?void 0:O.messageContext)||z.PAYMENTS}),Q().error(c.message),m(null===(h=c)||void 0===h?void 0:h.validationErrors)}else Q().success()}))},[oe.isProcessing,m,Q,L,z.PAYMENTS,B,V,U,j]);const ae={setPaymentStatus:Q,currentStatus:oe,paymentStatuses:n,paymentMethodData:q.paymentMethodData,errorMessage:q.errorMessage,activePaymentMethod:Z,setActivePaymentMethod:ee,activeSavedToken:J,setActiveSavedToken:te,onPaymentProcessing:H,customerPaymentMethods:ce,paymentMethods:q.paymentMethods,expressPaymentMethods:q.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:X,setExpressPaymentError:re,isExpressPaymentMethodActive:ne,shouldSavePayment:q.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(r.createElement)(D.Provider,{value:ae},t)}},276:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0),n=(c(2),c(148));c(224);const o=e=>{let{errorMessage:t="",propertyName:c="",elementId:o=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(n.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:s(o)},t))}},281:function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=o},3:function(e,t){e.exports=window.wc.wcSettings},31:function(e,t){e.exports=window.wp.isShallowEqual},32:function(e,t,c){"use strict";c.d(t,"o",(function(){return o})),c.d(t,"m",(function(){return a})),c.d(t,"l",(function(){return s})),c.d(t,"n",(function(){return i})),c.d(t,"j",(function(){return l})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return p})),c.d(t,"k",(function(){return b})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return g})),c.d(t,"h",(function(){return h})),c.d(t,"a",(function(){return O})),c.d(t,"i",(function(){return j})),c.d(t,"b",(function(){return E}));var r,n=c(3);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=o.pluginUrl+"images/",s=o.pluginUrl+"build/",i=o.buildPhase,l=null===(r=n.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=n.STORE_PAGES.checkout.id,d=n.STORE_PAGES.checkout.permalink,p=n.STORE_PAGES.privacy.permalink,b=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),m=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),g=n.STORE_PAGES.cart.permalink,h=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),O=Object(n.getSetting)("allowedCountries",{}),j=Object(n.getSetting)("shippingStates",{}),E=Object(n.getSetting)("allowedStates",{})},328:function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},329:function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=o},331:function(e,t,c){"use strict";var r=c(7),n=c.n(r),o=c(0),a=c(18);const s=Object(o.createElement)(e=>{let{className:t,size:c,...r}=e;return Object(o.createElement)(a.SVG,n()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},r),Object(o.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=s},333:function(e,t){},334:function(e,t){},335:function(e,t){},336:function(e,t){},337:function(e,t){},338:function(e,t){},339:function(e,t){},34:function(e,t,c){"use strict";c.d(t,"h",(function(){return l})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return p})),c.d(t,"f",(function(){return b})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return g})),c.d(t,"g",(function(){return h})),c.d(t,"a",(function(){return O}));var r=c(13),n=c(11),o=c.n(n),a=c(6),s=c(3),i=c(32);const l=e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const s=(e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const o=i.o.productCount>100,a={per_page:o?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},s=[Object(r.addQueryArgs)("/wc/store/products",{...a,...n})];return o&&t.length&&s.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:c,queryArgs:n});return Promise.all(s.map(e=>o()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),d=()=>o()({path:"wc/store/products/attributes"}),p=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),b=e=>{let{selected:t=[],search:c}=e;const n=(e=>{let{selected:t=[],search:c}=e;const n=Object(s.getSetting)("limitTags",!1),o=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:c})];return n&&t.length&&o.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:c});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},m=e=>o()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>o()({path:"wc/store/products/categories/"+e}),h=e=>o()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),O=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},340:function(e,t){},341:function(e,t){},342:function(e,t){},343:function(e,t){},344:function(e,t){},345:function(e,t){},346:function(e,t){},347:function(e,t){},348:function(e,t){},349:function(e,t){},35:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));var r=c(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},350:function(e,t){},351:function(e,t){},352:function(e,t){},353:function(e,t,c){"use strict";var r=c(7),n=c.n(r),o=c(0),a=c(20),s=c(3);c(334),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(a.decodeEntities)(t.alt)||c||"Product Image"}:{src:s.PLACEHOLDER_IMG_SRC,alt:""};return Object(o.createElement)("img",n()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},354:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(143);t.a=()=>Object(r.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(n.__)("Available on backorder","woo-gutenberg-products-block"))},355:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(143);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(n.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(n.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},356:function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(0),n=c(252),o=c(3),a=c(150),s=c(260),i=c(98),l=c(81),u=c(74),d=c(1),p=c(11),b=c.n(p),m=c(370),g=c(35);const h=(e,t,c)=>{const r=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),n=`wc-${c}-new-payment-method`;return r.push({key:n,value:t}),r},O=(e,t)=>{b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var j=c(148),E=c(46),_=c(63),f=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:c,redirectUrl:n,isProcessing:o,isBeforeProcessing:a,isComplete:p,orderNotes:f,shouldCreateAccount:y,extensionData:v}=Object(u.b)(),{hasValidationErrors:k}=Object(j.b)(),{shippingErrorStatus:w}=Object(i.b)(),{billingData:S,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:N,receiveCart:M}=Object(E.a)(),{activePaymentMethod:I,isExpressPaymentMethodActive:R,currentStatus:x,paymentMethodData:P,expressPaymentMethods:T,paymentMethods:A,shouldSavePayment:D}=Object(s.b)(),{addErrorNotice:L,removeNotice:B,setIsSuppressed:U}=Object(_.a)(),V=Object(r.useRef)(S),z=Object(r.useRef)(C),F=Object(r.useRef)(n),[G,H]=Object(r.useState)(!1),Y=Object(r.useMemo)(()=>{var e;const t={...T,...A};return null==t||null===(e=t[I])||void 0===e?void 0:e.paymentMethodId},[I,T,A]),q=k&&!R||x.hasError||w.hasError,$=!e&&!q&&(x.isSuccessful||!N)&&o;Object(r.useEffect)(()=>{U(R)},[R,U]),Object(r.useEffect)(()=>{q===e||!o&&!a||R||c.setHasError(q)},[q,e,o,a,R,c]),Object(r.useEffect)(()=>{V.current=S,z.current=C,F.current=n},[S,C,n]);const W=Object(r.useCallback)(()=>!k&&(x.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!w.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[k,x.hasError,w.hasError]);Object(r.useEffect)(()=>{let e;return R||(e=t(W,0)),()=>{R||e()}},[t,W,R]),Object(r.useEffect)(()=>{F.current&&(window.location.href=F.current)},[p]);const Q=Object(r.useCallback)(async()=>{if(G)return;H(!0),B("checkout");const e=N?{payment_method:Y,payment_data:h(P,D,I)}:{},t={billing_address:Object(m.a)(V.current),shipping_address:Object(m.a)(z.current),customer_note:f,should_create_account:y,...e,extensions:{...v}};b()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(O(e.headers,c),!e.ok)throw new Error(e);return e.json()}).then(e=>{c.setAfterProcessing(e),H(!1)}).catch(e=>{O(e.headers,c),e.json().then(e=>{var t,r,n;null!==(t=e.data)&&void 0!==t&&t.cart&&M(e.data.cart),L(Object(g.b)(e),{id:"checkout"}),null===(r=e.additional_errors)||void 0===r||null===(n=r.forEach)||void 0===n||n.call(r,e=>{L(e.message,{id:e.error_code})}),c.setHasError(!0),c.setAfterProcessing(e),H(!1)})})},[G,B,f,y,N,Y,P,D,I,v,c,L,M]);return Object(r.useEffect)(()=>{$&&!G&&Q()},[Q,$,G]),null};const y=e=>{let{children:t,isCart:c=!1,redirectUrl:d}=e;return Object(r.createElement)(u.a,{redirectUrl:d,isCart:c},Object(r.createElement)(l.a,null,Object(r.createElement)(i.a,null,Object(r.createElement)(s.a,null,t,Object(r.createElement)(a.a,{renderError:o.CURRENT_USER_IS_ADMIN?null:()=>null},Object(r.createElement)(n.PluginArea,{scope:"woocommerce-checkout"})),Object(r.createElement)(f,null)))))}},357:function(e,t,c){"use strict";var r=c(0),n=c(6),o=c(20);c(337);var a=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(n.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(o.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(o.decodeEntities)(e.display||e.value)))}))):null},s=c(175),i=c(32),l=e=>{let{className:t,shortDescription:c="",fullDescription:n=""}=e;const o=c||n;return o?Object(r.createElement)(s.a,{className:t,source:o,maxLength:15,countType:i.o.wordCountType||"words"}):null};c(336),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:n=[],variation:o=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(l,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(a,{details:n}),Object(r.createElement)(a,{details:o.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},362:function(e,t,c){"use strict";c.d(t,"a",(function(){return R}));var r=c(1),n=c(44),o=c(0),a=c(5),s=c.n(a),i=c(18),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),u=c(328),d=c(815),p=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(o.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),b=c(55),m=c(113);c(351);const g={bank:l,bill:u.a,card:d.a,checkPayment:p};var h=e=>{let{icon:t="",text:c=""}=e;const r=!!t,n=Object(o.useCallback)(e=>r&&Object(m.c)(e)&&Object(m.d)(g,e),[r]),a=s()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":r});return Object(o.createElement)("span",{className:a},n(t)?Object(o.createElement)(b.a,{srcElement:g[t]}):t,c)},O=c(255),j=c(3),E=c(51),_=c.n(E),f=c(97),y=c(276),v=c(46),k=c(254),w=c(59),S=c(74),C=c(260),N=c(98),M=c(81);const I=(e,t)=>{const c=[],n=(t,c)=>{const r=c+"_tax",n=Object(m.d)(e,c)&&Object(m.c)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:n,valueWithTax:n+(Object(m.d)(e,r)&&Object(m.c)(e[r])?parseInt(e[r],10):0)}};return c.push(n(Object(r.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(n(Object(r.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(n(Object(r.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(r.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(n(Object(r.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c},R=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:a,onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:u,onSubmit:d,customerId:p}=Object(S.b)(),{currentStatus:b,activePaymentMethod:m,onPaymentProcessing:g,setExpressPaymentError:E,shouldSavePayment:R}=Object(C.b)(),{shippingErrorStatus:x,shippingErrorTypes:P,shippingRates:T,shippingRatesLoading:A,selectedRates:D,setSelectedRates:L,isSelectingRate:B,onShippingRateSuccess:U,onShippingRateFail:V,onShippingRateSelectSuccess:z,onShippingRateSelectFail:F,needsShipping:G}=Object(N.b)(),{billingData:H,shippingAddress:Y,setShippingAddress:q}=Object(M.b)(),{cartTotals:$}=Object(v.a)(),{appliedCoupons:W}=Object(k.a)(),{noticeContexts:Q,responseTypes:K}=Object(w.c)(),X=Object(o.useRef)(I($,G)),Z=Object(o.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt($.total_price,10)});Object(o.useEffect)(()=>{X.current=I($,G),Z.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt($.total_price,10)}},[$,G]);const J=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),E(e)}),[E]);return{activePaymentMethod:m,billing:{billingData:H,cartTotal:Z.current,currency:Object(n.getCurrencyFromPriceResponse)($),cartTotalItems:X.current,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1),appliedCoupons:W,customerId:p},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:a},components:{ValidationInputError:y.a,PaymentMethodIcons:O.a,PaymentMethodLabel:h,LoadingMask:f.a},emitResponse:{noticeContexts:Q,responseTypes:K},eventRegistration:{onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:u,onShippingRateSuccess:U,onShippingRateFail:V,onShippingRateSelectSuccess:z,onShippingRateSelectFail:F,onPaymentProcessing:g},onSubmit:d,paymentStatus:b,setExpressPaymentError:J,shippingData:{shippingRates:T,shippingRatesLoading:A,selectedRates:D,setSelectedRates:L,isSelectingRate:B,shippingAddress:Y,setShippingAddress:q,needsShipping:G},shippingStatus:{shippingErrorStatus:x,shippingErrorTypes:P},shouldSavePayment:R}}},363:function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var r=c(0),n=(c(2),c(12)),o=c(5),a=c.n(o);const s=Object(r.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),i=()=>Object(r.useContext)(s),l=e=>{let{children:t,className:c=""}=e;const[o,i]=(()=>{const[e,{width:t}]=Object(n.useResizeObserver)();let c="";return t>700?c="is-large":t>520?c="is-medium":t>400?c="is-small":t&&(c="is-mobile"),[e,c]})(),l={hasContainerWidth:""!==i,containerClassName:i,isMobile:"is-mobile"===i,isSmall:"is-small"===i,isMedium:"is-medium"===i,isLarge:"is-large"===i};return Object(r.createElement)(s.Provider,{value:l},Object(r.createElement)("div",{className:a()(c,i)},o,t))}},364:function(e,t,c){"use strict";var r=c(7),n=c.n(r),o=c(0),a=c(1),s=c(8),i=c(5),l=c.n(i),u=c(148),d=c(74),p=c(276),b=c(12),m=c(113),g=c(37);c(242);var h=Object(s.forwardRef)((e,t)=>{let{className:c,id:r,type:a="text",ariaLabel:s,ariaDescribedBy:i,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:m="off",autoComplete:h="off",value:O="",onChange:j,required:E=!1,onBlur:_=(()=>{}),feedback:f,...y}=e;const[v,k]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:l()("wc-block-components-text-input",c,{"is-active":v||O})},Object(o.createElement)("input",n()({type:a,id:r,value:O,ref:t,autoCapitalize:m,autoComplete:h,onChange:e=>{j(e.target.value)},onFocus:()=>k(!0),onBlur:e=>{_(e.target.value),k(!1)},"aria-label":s||u,disabled:p,"aria-describedby":b&&!i?r+"__help":i,required:E},y)),Object(o.createElement)(g.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!b&&Object(o.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},b),f)});t.a=Object(b.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:i,errorId:b,validateOnMount:g=!0,focusOnMount:O=!1,onChange:j,showError:E=!0,errorMessage:_="",...f}=e;const[y,v]=Object(s.useState)(!0),k=Object(s.useRef)(null),{getValidationError:w,hideValidationError:S,setValidationErrors:C,clearValidationError:N,getValidationErrorId:M}=Object(u.b)(),{isBeforeProcessing:I}=Object(d.b)(),R=void 0!==r?r:"textinput-"+c,x=void 0!==b?b:R,P=Object(s.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=k.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?N(x):C({[x]:{message:t.validationMessage||Object(a.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[N,x,C]);Object(s.useEffect)(()=>{var e;y&&(O&&(null===(e=k.current)||void 0===e||e.focus()),v(!1))},[O,y,v]),Object(s.useEffect)(()=>{y&&(g&&P(),v(!1))},[y,v,g,P]),Object(s.useEffect)(()=>{I&&P()},[I,P]),Object(s.useEffect)(()=>()=>{N(x)},[N,x]);const T=w(x)||{};Object(m.c)(_)&&""!==_&&(T.message=_);const A=T.message&&!T.hidden,D=E&&A&&M(x)?M(x):i;return Object(o.createElement)(h,n()({className:l()(t,{"has-error":A}),"aria-invalid":!0===A,id:R,onBlur:()=>{P(!1)},feedback:E&&Object(o.createElement)(p.a,{errorMessage:_,propertyName:x}),ref:k,onChange:e=>{S(x),j(e)},ariaDescribedBy:D},f))})},369:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));const r=window.CustomEvent||null,n=(e,t)=>{let{bubbles:c=!1,cancelable:n=!1,element:o,detail:a={}}=t;if(!r)return;o||(o=document.body);const s=new r(e,{bubbles:c,cancelable:n,detail:a});o.dispatchEvent(s)};let o;const a=()=>{o&&clearTimeout(o),o=setTimeout(()=>{n("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const o=()=>{n(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,o),()=>jQuery(document).off(e,o)}},37:function(e,t,c){"use strict";var r=c(0),n=c(5),o=c.n(n);t.a=e=>{let t,{label:c,screenReaderLabel:n,wrapperElement:a,wrapperProps:s={}}=e;const i=null!=c,l=null!=n;return!i&&l?(t=a||"span",s={...s,className:o()(s.className,"screen-reader-text")},Object(r.createElement)(t,s,n)):(t=a||r.Fragment,i&&l&&c!==n?Object(r.createElement)(t,s,Object(r.createElement)("span",{"aria-hidden":"true"},c),Object(r.createElement)("span",{className:"screen-reader-text"},n)):Object(r.createElement)(t,s,c))}},370:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"c",(function(){return s})),c.d(t,"a",(function(){return i}));var r=c(3),n=c(132),o=c(13);const a=e=>{let{country:t="",state:c="",city:r="",postcode:n=""}=e;return{country:t.trim(),state:c.trim(),city:r.trim(),postcode:n?n.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(o.isEmail)(t)?t.trim():""},i=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(n.a)(t,{},e.country),o=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(o[c]="")}),o}},373:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(141);const n=(e,t)=>function(c){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const o=r.a.addEventCallback(e,c,n);return t(o),()=>{t(r.a.removeEventCallback(e,o.id))}}},376:function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var n=c(59);const o=async(e,t,c)=>{const n=r(e,t),o=[];for(const e of n)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&o.push(t)}catch(e){console.error(e)}return!o.length||o},a=async(e,t,c)=>{const o=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(n.a)(t)||Object(n.b)(t))return o.push(t),o;o.push(t)}catch(e){return console.error(e),o.push({type:"error"}),o}return o}},38:function(e,t){e.exports=window.wp.keycodes},4:function(e,t){e.exports=window.wp.components},43:function(e,t,c){},44:function(e,t){e.exports=window.wc.priceFormat},45:function(e,t){e.exports=window.wp.hooks},46:function(e,t,c){"use strict";c.d(t,"a",(function(){return _}));var r=c(6),n=c(0),o=c(19),a=c(10),s=c(20),i=c(211),l=c(370),u=c(73),d=c(369);const p=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(o.CART_STORE_KEY).invalidateResolutionForStore()},b=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(n.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),b),[])},g={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...g,email:""},O={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:o.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},j=e=>Object(i.a)(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(s.decodeEntities)(c)]})),E={cartCoupons:o.EMPTY_CART_COUPONS,cartItems:o.EMPTY_CART_ITEMS,cartFees:o.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:O,cartIsLoading:!0,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:g,shippingRates:o.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:o.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:o.EMPTY_EXTENSIONS},_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(u.b)(),s=null==c?void 0:c.previewCart,{shouldSelect:i}=e,d=Object(n.useRef)();m();const p=Object(a.useSelect)((e,c)=>{let{dispatch:r}=c;if(!i)return E;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:g,extensions:o.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const n=e(o.CART_STORE_KEY),a=n.getCartData(),u=n.getCartErrors(),d=n.getCartTotals(),p=!n.hasFinishedResolution("getCartData"),b=n.isCustomerDataUpdating(),{receiveCart:m}=r(o.CART_STORE_KEY),O=j(a.billingAddress),_=a.needsShipping?j(a.shippingAddress):O,f=a.fees.length>0?a.fees.map(e=>j(e)):o.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):o.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:f,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:Object(l.a)(O),shippingAddress:Object(l.a)(_),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:b,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}},[i]);return d.current&&Object(r.isEqual)(d.current,p)||(d.current=p),d.current}},47:function(e,t){e.exports=window.wc.wcBlocksRegistry},502:function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var r=c(0),n=c(4),o=c(1),a=c(3);const s=[];var i=c(7),l=c.n(i),u=e=>Object(r.createElement)("div",l()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(r.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{filter:"url(#filter0_ddd)"},Object(r.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(r.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(r.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(r.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(r.createElement)("defs",null,Object(r.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"2"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function d(e){let{blockName:t}=e;const[c,i]=(e=>{const[t,c]=((e,t)=>{const[c,n]=Object(r.useState)(()=>{const c=window.localStorage.getItem(e);if(c)try{return JSON.parse(c)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(r.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(c))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,c]),[c,n]})("wc-blocks_dismissed_compatibility_notices",s),[n,o]=Object(r.useState)(!1),a=t.includes(e);return Object(r.useEffect)(()=>{o(!a)},[a]),[n,()=>{const r=new Set(t);r.add(e),c([...r])}]})(t);return Object(a.isWpVersion)("5.4","<=")||!c?null:Object(r.createElement)(n.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(o.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>i(),finishButtonText:Object(o.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(r.createElement)(u,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(o.__)("Compatibility notice","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("This block may not be compatible with all checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(r.createElement)("em",null)})),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},51:function(e,t){e.exports=window.wp.deprecated},516:function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide","full"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},517:function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},518:function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},519:function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},52:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),n=c(31),o=c.n(n);function a(e){const t=Object(r.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},520:function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},523:function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},524:function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},525:function(e,t,c){"use strict";(function(e){var r=c(0),n=c(1),o=c(5),a=c.n(o),s=c(108),i=c(32),l=c(74),u=c(878),d=c(3);c(817),t.a=t=>{let{checkoutPageId:c,className:o}=t;const p=Object(d.getSetting)("page-"+c,!1),{isCalculating:b}=Object(l.b)(),[m,g]=Object(u.a)(),[h,O]=Object(r.useState)(!1);Object(r.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{O(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const j=Object(r.createElement)(s.a,{className:"wc-block-cart__submit-button",href:p||i.f,disabled:b,onClick:()=>O(!0),showSpinner:h},Object(n.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(r.createElement)("div",{className:a()("wc-block-cart__submit",o)},m,Object(r.createElement)("div",{className:"wc-block-cart__submit-container"},j),"below"===g&&Object(r.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},j))}}).call(this,c(229))},526:function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide","full"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},527:function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},53:function(e,t,c){"use strict";var r=c(7),n=c.n(r),o=c(0),a=c(178),s=c(5),i=c.n(s);c(186);const l=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:r,onValueChange:s,displayType:u="text",...d}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const b=p/10**r.minorUnit;if(!Number.isFinite(b))return null;const m=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...l(r),value:void 0,currency:void 0,onValueChange:void 0},h=s?e=>{const t=e.value*10**r.minorUnit;s(t)}:()=>{};return Object(o.createElement)(a.a,n()({className:m,displayType:u},g,{value:b,onValueChange:h}))}},55:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...n}):null}},59:function(e,t,c){"use strict";c.d(t,"a",(function(){return i})),c.d(t,"b",(function(){return l})),c.d(t,"c",(function(){return d}));var r=c(113);let n,o;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(n||(n={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(o||(o={}));const a=(e,t)=>Object(r.b)(e)&&"type"in e&&e.type===t,s=e=>a(e,n.SUCCESS),i=e=>a(e,n.ERROR),l=e=>a(e,n.FAIL),u=e=>!Object(r.b)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:n,noticeContexts:o,shouldRetry:u,isSuccessResponse:s,isErrorResponse:i,isFailResponse:l})},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},62:function(e,t){e.exports=window.wp.a11y},63:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0),n=c(174);const o=()=>{const{notices:e,createNotice:t,removeNotice:c,setIsSuppressed:o}=Object(n.b)(),a=Object(r.useRef)(e);Object(r.useEffect)(()=>{a.current=e},[e]);const s=Object(r.useMemo)(()=>({hasNoticesOfType:e=>a.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeNotice:c}),[c]),i=Object(r.useMemo)(()=>({addDefaultNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...c})},addErrorNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...c})},addWarningNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...c})},addInfoNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...c})},addSuccessNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...c})}}),[t]);return{notices:e,...s,...i,setIsSuppressed:o}}},64:function(e,t){e.exports=window.regeneratorRuntime},73:function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(0),n=c(10);const o=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),a=()=>Object(r.useContext)(o),s=e=>{let{children:t,currentPostId:c=0,currentView:a="",previewData:s={}}=e;const i=Object(n.useSelect)(e=>c||e("core/editor").getCurrentPostId(),[c]),l=Object(r.useCallback)(e=>e in s?s[e]:{},[s]),u={isEditor:!0,currentPostId:i,currentView:a,previewData:s,getPreviewData:l};return Object(r.createElement)(o.Provider,{value:u},t)}},74:function(e,t,c){"use strict";c.d(t,"b",(function(){return M})),c.d(t,"a",(function(){return I}));var r=c(0),n=c(1),o=c(142),a=c(51),s=c.n(a),i=c(113);let l;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(l||(l={}));const u=()=>({type:l.SET_IDLE}),d=e=>({type:l.SET_REDIRECT_URL,redirectUrl:e}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:l.SET_COMPLETE,data:e}},b=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?l.SET_HAS_ERROR:l.SET_NO_ERROR}};var m=c(3);let g;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(g||(g={}));const h={order_id:0,customer_id:0,...Object(m.getSetting)("checkoutData",{})||{}},O={redirectUrl:"",status:g.PRISTINE,hasError:!1,calculatingCount:0,orderId:h.order_id,orderNotes:"",customerId:h.customer_id,shouldCreateAccount:!1,processingResponse:null,extensionData:{}},j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,{redirectUrl:t,type:c,customerId:r,orderId:n,orderNotes:o,extensionData:a,shouldCreateAccount:s,data:i}=arguments.length>1?arguments[1]:void 0,u=e;switch(c){case l.SET_PRISTINE:u=O;break;case l.SET_IDLE:u=e.status!==g.IDLE?{...e,status:g.IDLE}:e;break;case l.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case l.SET_PROCESSING_RESPONSE:u={...e,processingResponse:i};break;case l.SET_COMPLETE:u=e.status!==g.COMPLETE?{...e,status:g.COMPLETE,redirectUrl:void 0!==i&&"string"==typeof i.redirectUrl&&i.redirectUrl?i.redirectUrl:e.redirectUrl}:e;break;case l.SET_PROCESSING:u=e.status!==g.PROCESSING?{...e,status:g.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case l.SET_BEFORE_PROCESSING:u=e.status!==g.BEFORE_PROCESSING?{...e,status:g.BEFORE_PROCESSING,hasError:!1}:e;break;case l.SET_AFTER_PROCESSING:u=e.status!==g.AFTER_PROCESSING?{...e,status:g.AFTER_PROCESSING}:e;break;case l.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===g.PROCESSING||e.status===g.BEFORE_PROCESSING?{...u,status:g.IDLE}:u;break;case l.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case l.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case l.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case l.SET_CUSTOMER_ID:u=void 0!==r?{...e,customerId:r}:e;break;case l.SET_ORDER_ID:u=void 0!==n?{...e,orderId:n}:e;break;case l.SET_SHOULD_CREATE_ACCOUNT:void 0!==s&&s!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:s});break;case l.SET_ORDER_NOTES:void 0!==o&&e.orderNotes!==o&&(u={...e,orderNotes:o});break;case l.SET_EXTENSION_DATA:void 0!==a&&e.extensionData!==a&&(u={...e,extensionData:a})}return u!==e&&c!==l.SET_PRISTINE&&u.status===g.PRISTINE&&(u.status=g.IDLE),u};var E=c(20),_=c(141),f=c(373);var y=c(376),v=c(148),k=c(63),w=c(75),S=c(10),C=c(59);const N=Object(r.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),M=()=>Object(r.useContext)(N),I=e=>{let{children:t,redirectUrl:c,isCart:a=!1}=e;O.redirectUrl=c;const[m,h]=Object(r.useReducer)(j,O),{setValidationErrors:M}=Object(v.b)(),{addErrorNotice:I,removeNotices:R}=Object(k.a)(),{dispatchCheckoutEvent:x}=Object(w.a)(),P=m.calculatingCount>0,{isSuccessResponse:T,isErrorResponse:A,isFailResponse:D,shouldRetry:L}=Object(C.c)(),{checkoutNotices:B,paymentNotices:U,expressPaymentNotices:V}=(()=>{const{noticeContexts:e}=Object(C.c)();return{checkoutNotices:Object(S.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(S.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(S.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[z,F]=Object(r.useReducer)(_.b,{}),G=Object(r.useRef)(z),{onCheckoutAfterProcessingWithSuccess:H,onCheckoutAfterProcessingWithError:Y,onCheckoutValidationBeforeProcessing:q}=(e=>Object(r.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(f.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(f.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(f.a)("checkout_validation_before_processing",e)}),[e]))(F);Object(r.useEffect)(()=>{G.current=z},[z]);const $=Object(r.useMemo)(()=>function(){return s()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),q(...arguments)},[q]),W=Object(r.useMemo)(()=>({resetCheckout:()=>{h({type:l.SET_PRISTINE})},setRedirectUrl:e=>{h(d(e))},setHasError:e=>{h(b(e))},incrementCalculating:()=>{h({type:l.INCREMENT_CALCULATING})},decrementCalculating:()=>{h({type:l.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;h((t=e,{type:l.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{h((e=>({type:l.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{h((e=>({type:l.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{h((e=>({type:l.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:c,value:r}=e;t.paymentDetails[c]=Object(E.decodeEntities)(r)})),"message"in e&&(t.message=Object(E.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var c;t.redirectUrl&&h(d(t.redirectUrl)),h((c=t,{type:l.SET_PROCESSING_RESPONSE,data:c})),h({type:l.SET_AFTER_PROCESSING})}}),[]);Object(r.useEffect)(()=>{m.status===g.BEFORE_PROCESSING&&(R("error"),Object(y.a)(G.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;I(t),M(c)}),h(u()),h(b())):h({type:l.SET_PROCESSING})}))},[m.status,M,I,R,h]);const Q=Object(o.a)(m.status),K=Object(o.a)(m.hasError);Object(r.useEffect)(()=>{if((m.status!==Q||m.hasError!==K)&&m.status===g.AFTER_PROCESSING){const e={redirectUrl:m.redirectUrl,orderId:m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,processingResponse:m.processingResponse};m.hasError?Object(y.b)(G.current,"checkout_after_processing_with_error",e).then(t=>{const c=(e=>{let t=null;return e.forEach(e=>{if((A(e)||D(e))&&e.message){const c=e.messageContext?{context:e.messageContext}:void 0;t=e,I(e.message,c)}}),t})(t);if(null!==c)L(c)?h(u()):h(p(c));else{if(!(B.some(e=>"error"===e.status)||V.some(e=>"error"===e.status)||U.some(e=>"error"===e.status))){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");I(t,{id:"checkout"})}h(u())}}):Object(y.b)(G.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,c=null;if(e.forEach(e=>{T(e)&&(t=e),(A(e)||D(e))&&(c=e)}),t&&!c)h(p(t));else if(Object(i.b)(c)){if(c.message){const e=c.messageContext?{context:c.messageContext}:void 0;I(c.message,e)}L(c)?h(b(!0)):h(p(c))}else h(p())})}},[m.status,m.hasError,m.redirectUrl,m.orderId,m.customerId,m.orderNotes,m.processingResponse,Q,K,W,I,A,D,T,L,B,V,U]);const X={onSubmit:Object(r.useCallback)(()=>{x("submit"),h({type:l.SET_BEFORE_PROCESSING})},[x]),isComplete:m.status===g.COMPLETE,isIdle:m.status===g.IDLE,isCalculating:P,isProcessing:m.status===g.PROCESSING,isBeforeProcessing:m.status===g.BEFORE_PROCESSING,isAfterProcessing:m.status===g.AFTER_PROCESSING,hasError:m.hasError,redirectUrl:m.redirectUrl,onCheckoutBeforeProcessing:$,onCheckoutValidationBeforeProcessing:q,onCheckoutAfterProcessingWithSuccess:H,onCheckoutAfterProcessingWithError:Y,dispatchActions:W,isCart:a,orderId:m.orderId,hasOrder:!!m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,shouldCreateAccount:m.shouldCreateAccount,setShouldCreateAccount:e=>{return h((t=e,{type:l.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:m.extensionData};return Object(r.createElement)(N.Provider,{value:X},t)}},75:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(45),n=c(0),o=c(46);const a=()=>{const e=Object(o.a)(),t=Object(n.useRef)(e);return Object(n.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(n.useCallback)((function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...c,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},798:function(e,t,c){e.exports=c(848)},799:function(e,t){},8:function(e,t){e.exports=window.React},800:function(e,t){},801:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(14);const n=["core/paragraph","core/image","core/separator"],o=e=>[...Object(r.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...n]},802:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(0),n=c(10),o=c(14),a=c(6);const s=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:s=[]}=e;const i=Object(r.useRef)(c),l=Object(r.useRef)(s),{insertBlock:u,replaceInnerBlocks:d}=Object(n.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:b}=Object(n.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:i.current.map(e=>Object(o.getBlockType)(e))}),[t,i.current]),m=Object(r.useCallback)((e,c)=>{const r=Object(o.createBlock)(e.name);u(r,c,t,!1)},[t,u]),g=Object(r.useMemo)(()=>b.filter(e=>e&&(e=>{var t,c,r;let{attributes:n}=e;return Boolean((null===(t=n.lock)||void 0===t?void 0:t.remove)||(null===(c=n.lock)||void 0===c||null===(r=c.default)||void 0===r?void 0:r.remove))})(e)),[b]);Object(r.useLayoutEffect)(()=>{if(t){if(0===p.length&&l.current.length>0){const e=Object(o.createBlocksFromInnerBlocksTemplate)(l.current);if(!Object(a.isEqual)(e,p))return void d(t,e)}g.forEach(e=>{if(p.find(t=>{let{name:c}=t;return c===e.name}))return;const t=l.current.findIndex(t=>{let[c]=t;return c===e.name});switch(t){case-1:m(e,p.length);break;case 0:m(e,0);break;default:const c=l.current[t-1],r=p.findIndex(e=>{let{name:t}=e;return t===c[0]});m(e,-1===r?t:r+1)}})}},[t,p,g,d,m])}},803:function(e,t,c){"use strict";var r=c(0),n=c(5),o=c.n(n),a=(c(2),c(363));c(333),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)(a.a,{className:o()("wc-block-components-sidebar-layout",c)},t)}},804:function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(5),a=c.n(o);const s=Object(n.forwardRef)((e,t)=>{let{children:c,className:n=""}=e;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-main",n)},c)});t.a=s},805:function(e,t){},806:function(e,t){},807:function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(5),a=c.n(o);const s=Object(n.forwardRef)((e,t)=>{let{children:c,className:n=""}=e;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-sidebar",n)},c)});t.a=s},808:function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),Object(r.createElement)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"}));t.a=o},809:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(97),a=c(256),s=(c(2),c(22)),i=c(3);c(339);const l={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:d,values:p}=e;const{total_discount:b,total_discount_tax:m}=p,g=parseInt(b,10);if(!g&&0===t.length)return null;const h=parseInt(m,10),O=Object(i.getSetting)("displayCartPricesIncludingTax",!1)?g+h:g,j=Object(s.__experimentalApplyCheckoutFilter)({arg:l,filterName:"coupons",defaultValue:t});return Object(r.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==j.length&&Object(r.createElement)(o.a,{screenReaderLabel:Object(n.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map(e=>Object(r.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","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{d(e.code)},radius:"large",ariaLabel:Object(n.sprintf)( +/* translators: %s is a coupon code. */ +Object(n.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:O?Object(n.__)("Discount","woo-gutenberg-products-block"):Object(n.__)("Coupons","woo-gutenberg-products-block"),value:O?-1*O:"-"})}},81:function(e,t,c){"use strict";c.d(t,"b",(function(){return O})),c.d(t,"a",(function(){return j}));var r=c(0),n=c(3),o=c(10),a=c(19),s=c(365),i=c(31),l=c.n(i),u=c(370),d=c(35),p=c(46),b=c(63);const m=(e,t)=>!(!function(e){return"email"in e}(t)||Object(u.c)(t)===Object(u.c)(e))||!!t.country&&!l()(Object(u.b)(e),Object(u.b)(t));var g=c(74);const h=Object(r.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>null,setShippingAddress:()=>null,shippingAsBilling:!0,setShippingAsBilling:()=>null}),O=()=>Object(r.useContext)(h),j=e=>{let{children:t}=e;const{billingData:c,shippingAddress:i,setBillingData:u,setShippingAddress:O}=(()=>{const{updateCustomerData:e}=Object(o.useDispatch)(a.CART_STORE_KEY),{addErrorNotice:t,removeNotice:c}=Object(b.a)(),{billingAddress:n,shippingAddress:i}=Object(p.a)(),[u,g]=Object(r.useState)({billingData:n,shippingAddress:i}),[h,O]=Object(r.useState)(!1);!h&&m(u.shippingAddress,i)&&(g({billingData:n,shippingAddress:i}),O(!0));const j=Object(r.useRef)(u),[E]=Object(s.a)(u,1e3,{equalityFn:(e,t)=>l()(e.billingData,t.billingData)&&l()(e.shippingAddress,t.shippingAddress)}),_=Object(r.useCallback)(e=>{g(t=>({...t,billingData:{...t.billingData,...e}}))},[]),f=Object(r.useCallback)(e=>{g(t=>({...t,shippingAddress:{...t.shippingAddress,...e}}))},[]);return Object(r.useEffect)(()=>{const r=m(j.current.billingData,E.billingData),n=m(j.current.shippingAddress,E.shippingAddress);if(!r&&!n)return;const o={};r&&(o.billing_address=E.billingData),n&&(o.shipping_address=E.shippingAddress),j.current=E,e(o).then(()=>{c("checkout")}).catch(e=>{t(Object(d.b)(e),{id:"checkout"})})},[E,t,c,e]),{billingData:u.billingData,shippingAddress:u.shippingAddress,setBillingData:_,setShippingAddress:f}})(),{cartNeedsShipping:j}=Object(p.a)(),{customerId:E}=Object(g.b)(),[_,f]=Object(r.useState)(()=>{return j&&(!E||(e=i,t=c,Object.keys(n.defaultAddressFields).every(c=>e[c]===t[c])));var e,t}),y={billingData:c,shippingAddress:i,setBillingData:u,setShippingAddress:O,shippingAsBilling:_,setShippingAsBilling:f};return Object(r.createElement)(h.Provider,{value:y},t)}},810:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(108),a=c(364),s=c(37),i=c(97),l=(c(2),c(12)),u=c(148),d=c(276),p=c(22);c(341),t.a=Object(l.withInstanceId)(e=>{let{instanceId:t,isLoading:c=!1,initialOpen:l=!1,onSubmit:b=(()=>{})}=e;const[m,g]=Object(r.useState)(""),h=Object(r.useRef)(!1),{getValidationError:O,getValidationErrorId:j}=Object(u.b)(),E=O("coupon");Object(r.useEffect)(()=>{h.current!==c&&(c||!m||E||g(""),h.current=c)},[c,m,E]);const _="wc-block-components-totals-coupon__input-"+t;return Object(r.createElement)(p.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:l,title:Object(r.createElement)(s.a,{label:Object(n.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(n.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:_})},Object(r.createElement)(i.a,{screenReaderLabel:Object(n.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:c,showSpinner:!1},Object(r.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(r.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(r.createElement)(a.a,{id:_,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(n.__)("Enter code","woo-gutenberg-products-block"),value:m,ariaDescribedBy:j(_),onChange:e=>{g(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),Object(r.createElement)(o.a,{className:"wc-block-components-totals-coupon__button",disabled:c||!m,showSpinner:c,onClick:e=>{e.preventDefault(),b(m)},type:"submit"},Object(n.__)("Apply","woo-gutenberg-products-block"))),Object(r.createElement)(d.a,{propertyName:"coupon",elementId:_}))))})},813:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));const r=e=>e.length,n=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},814:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(53),a=(c(2),c(22)),s=c(46),i=c(3);c(348),t.a=e=>{let{currency:t,values:c}=e;const l=Object(i.getSetting)("taxesEnabled",!0)&&Object(i.getSetting)("displayCartPricesIncludingTax",!1),{total_price:u,total_tax:d}=c,{receiveCart:p,...b}=Object(s.a)(),m=Object(a.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(n.__)("Total","woo-gutenberg-products-block"),extensions:b.extensions,arg:{cart:b}}),g=parseInt(d,10);return Object(r.createElement)(a.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:m,value:parseInt(u,10),description:l&&0!==g&&Object(r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(r.createInterpolateElement)(Object(n.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(r.createElement)(o.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},815:function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},816:function(e,t){},817:function(e,t){},818:function(e,t){},819:function(e,t){},820:function(e,t,c){"use strict";c.d(t,"a",(function(){return d})),c.d(t,"b",(function(){return b}));var r=c(9),n=c(61),o=c(10),a=c(0),s=c(38),i=c(45),l=c(14);const u=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},d=()=>{Object(i.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||Object(o.subscribe)(()=>{var e,t,c,n;const a=Object(o.select)(r.store);if(!a)return;const s=a.getSelectedBlock();s&&(u("wc-lock-selected-block--remove",!(null==s||null===(e=s.attributes)||void 0===e||null===(t=e.lock)||void 0===t||!t.remove)),u("wc-lock-selected-block--move",!(null==s||null===(c=s.attributes)||void 0===c||null===(n=c.lock)||void 0===n||!n.move)))})},p=e=>{let{ref:t}=e;const c=Object(i.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),u=t.current;return Object(a.useEffect)(()=>{if(u&&!c)return u.addEventListener("keydown",e,{capture:!0,passive:!1}),()=>{u.removeEventListener("keydown",e,{capture:!0})};function e(e){const{keyCode:t,target:c}=e;if(!(c instanceof HTMLElement))return;if(t!==s.BACKSPACE&&t!==s.DELETE)return;if(Object(n.isTextField)(c))return;const a=c;void 0!==a.dataset.block&&(e=>{var t,c,n,a,s;if(!e)return!1;const{getBlock:i}=Object(o.select)(r.store),u=i(e);if("boolean"==typeof(null==u||null===(t=u.attributes)||void 0===t||null===(c=t.lock)||void 0===c?void 0:c.remove))return u.attributes.lock.remove;const d=Object(l.getBlockType)(u.name);var p,b,m;return"boolean"==typeof(null==d||null===(n=d.attributes)||void 0===n||null===(a=n.lock)||void 0===a||null===(s=a.default)||void 0===s?void 0:s.remove)&&(null==d||null===(p=d.attributes)||void 0===p||null===(b=p.lock)||void 0===b||null===(m=b.default)||void 0===m?void 0:m.remove)})(a.dataset.block)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},[u,c])},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Object(a.useRef)(),c=Object(r.useBlockProps)({ref:t,...e});return p({ref:t}),c}},848:function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(5),a=c.n(o),s=c(9),i=c(55),l=c(329),u=c(110),d=c(14),p=c(251),b=c(4),m=c(502),g=c(32),h=c(150),O=c(73),j=c(356);const E=e=>{let{children:t,redirectUrl:c}=e;return Object(r.createElement)(j.a,{isCart:!0,redirectUrl:c},t)};var _=c(3),f=c(876),y=c(18),v=Object(r.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{fill:"currentColor",fillRule:"nonzero",d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49A.996.996 0 0 0 20.01 4H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45ZM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2Zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2Z"}))," "),k=Object(r.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"})),w=(c(819),c(820)),S=c(10),C=Object(r.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M12 6a9.77 9.77 0 0 1 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0 1 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 0 1 0 5 2.5 2.5 0 0 1 0-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"})),N=c(802);const M=Object(r.createContext)({hasDarkControls:!1});Object(w.a)();const I=["woocommerce/filled-cart-block","woocommerce/empty-cart-block"],R=e=>{let{attributes:t,setAttributes:c}=e;const{hasDarkControls:o}=t,{currentPostId:a}=Object(O.b)();return Object(r.createElement)(s.InspectorControls,null,a!==g.c&&Object(r.createElement)(b.Notice,{className:"wc-block-cart__page-notice",isDismissible:!1,status:"warning"},Object(r.createInterpolateElement)(Object(n.__)("If you would like to use this block as your default cart you must update your page settings in WooCommerce.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:Object(_.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(b.PanelBody,{title:Object(n.__)("Style","woo-gutenberg-products-block")},Object(r.createElement)(b.ToggleControl,{label:Object(n.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(n.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:o,onChange:()=>c({hasDarkControls:!o})})),Object(r.createElement)(p.a,null))};c(799);const x={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(_.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(_.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}};var P=c(7),T=c.n(P),A=c(22),D=c(803),L=c(801);c(800);var B=c(516);Object(u.d)(B,{icon:{src:Object(r.createElement)(i.a,{srcElement:v}),foreground:"#7f54b3"},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)(),{currentView:n}=Object(O.b)(),{hasDarkControls:o}=Object(r.useContext)(M),i=Object(L.a)(A.innerBlockAreas.FILLED_CART),l=[["woocommerce/cart-items-block",{},[]],["woocommerce/cart-totals-block",{},[]]];return Object(N.a)({clientId:t,registeredBlocks:i,defaultTemplate:l}),Object(r.createElement)("div",T()({},c,{hidden:"woocommerce/filled-cart-block"!==n}),Object(r.createElement)(D.a,{className:a()("wc-block-cart",{"has-dark-controls":o})},Object(r.createElement)(s.InnerBlocks,{allowedBlocks:i,template:l,templateLock:"insert"})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var U=c(890),V=c(891),z=c(804),F=c(517);Object(u.d)(F,{icon:{src:Object(r.createElement)(U.a,{icon:V.a}),foreground:"#7f54b3"},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)({className:"wc-block-cart__main"}),n=Object(L.a)(A.innerBlockAreas.CART_ITEMS),o=[["woocommerce/cart-line-items-block",{},[]]];return Object(N.a)({clientId:t,registeredBlocks:n,defaultTemplate:o}),Object(r.createElement)(z.a,c,Object(r.createElement)(s.InnerBlocks,{allowedBlocks:n,template:o,templateLock:!1,renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var G=c(86),H=c(46),Y=c(62),q=c(38);c(805);var $=e=>{let{className:t,quantity:c=1,minimum:o=1,maximum:s,onChange:i=(()=>{}),itemName:l="",disabled:u}=e;const d=a()("wc-block-components-quantity-selector",t),p=void 0!==s,b=c>o,m=!p||c{const t=void 0!==typeof e.key?"ArrowDown"===e.key:e.keyCode===q.DOWN,r=void 0!==typeof e.key?"ArrowUp"===e.key:e.keyCode===q.UP;t&&b&&(e.preventDefault(),i(c-1)),r&&m&&(e.preventDefault(),i(c+1))},[c,i,m,b]);return Object(r.createElement)("div",{className:d},Object(r.createElement)("input",{className:"wc-block-components-quantity-selector__input",disabled:u,type:"number",step:"1",min:"0",value:c,onKeyDown:g,onChange:e=>{let t=Number.isNaN(e.target.value)||!e.target.value?0:parseInt(e.target.value,10);p&&(t=Math.min(t,s)),t=Math.max(t,o),t!==c&&i(t)},"aria-label":Object(n.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(n.__)("Quantity of %s in your cart.","woo-gutenberg-products-block"),l)}),Object(r.createElement)("button",{"aria-label":Object(n.__)("Reduce quantity","woo-gutenberg-products-block"),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:u||!b,onClick:()=>{const e=c-1;i(e),Object(Y.speak)(Object(n.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(n.__)("Quantity reduced to %s.","woo-gutenberg-products-block"),e))}},"-"),Object(r.createElement)("button",{"aria-label":Object(n.__)("Increase quantity","woo-gutenberg-products-block"),disabled:u||!m,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:()=>{const e=c+1;i(e),Object(Y.speak)(Object(n.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(n.__)("Quantity increased to %s.","woo-gutenberg-products-block"),e))}},"+"))},W=c(139),Q=c(173),K=c(19),X=c(365),Z=c(142),J=c(369),ee=c(113),te=c(74);var ce=c(75),re=c(353),ne=c(354),oe=c(355),ae=c(53),se=c(143),ie=e=>{let{currency:t,saleAmount:c,format:o=""}=e;if(!c||c<=0)return null;o.includes("")||(o="",console.error("Price formats need to include the `` tag."));const a=Object(n.sprintf)( +/* translators: %s will be replaced by the discount amount */ +Object(n.__)("Save %s","woo-gutenberg-products-block"),o);return Object(r.createElement)(se.a,{className:"wc-block-components-sale-badge"},Object(r.createInterpolateElement)(a,{price:Object(r.createElement)(ae.a,{currency:t,value:c})}))},le=c(357),ue=c(44),de=c(184);const pe=(e,t)=>e.convertPrecision(t.minorUnit).getAmount(),be=e=>Object(A.mustContain)(e,"");var me=Object(r.forwardRef)((e,t)=>{let{lineItem:c,onRemove:o=(()=>{}),tabIndex:s=null}=e;const{name:i="",catalog_visibility:l="visible",short_description:u="",description:d="",low_stock_remaining:p=null,show_backorder_badge:b=!1,quantity_limit:m=99,permalink:g="",images:h=[],variation:O=[],item_data:j=[],prices:E={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}},totals:f={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_subtotal:"0",line_subtotal_tax:"0"},extensions:y}=c,{quantity:v,setItemQuantity:k,removeItem:w,isPendingDelete:C}=(e=>{const t={key:"",quantity:1};(e=>Object(ee.b)(e)&&Object(ee.d)(e,"key")&&Object(ee.d)(e,"quantity")&&Object(ee.c)(e.key)&&Object(ee.a)(e.quantity))(e)&&(t.key=e.key,t.quantity=e.quantity);const{key:c="",quantity:n=1}=t,{cartErrors:o}=Object(H.a)(),{dispatchActions:a}=Object(te.b)(),[s,i]=Object(r.useState)(n),[l]=Object(X.a)(s,400),u=Object(Z.a)(l),{removeItemFromCart:d,changeCartItemQuantity:p}=Object(S.useDispatch)(K.CART_STORE_KEY),b=Object(S.useSelect)(e=>{if(!c)return{quantity:!1,delete:!1};const t=e(K.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(c),delete:t.isItemPendingDelete(c)}},[c]),m=Object(r.useCallback)(()=>c?d(c).then(()=>(Object(J.b)(),!0)):Promise.resolve(!1),[c,d]);return Object(r.useEffect)(()=>{c&&Object(ee.a)(u)&&Number.isFinite(u)&&u!==l&&p(c,l)},[c,p,l,u]),Object(r.useEffect)(()=>(b.delete?a.incrementCalculating():a.decrementCalculating(),()=>{b.delete&&a.decrementCalculating()}),[a,b.delete]),Object(r.useEffect)(()=>(b.quantity||l!==s?a.incrementCalculating():a.decrementCalculating(),()=>{(b.quantity||l!==s)&&a.decrementCalculating()}),[a,b.quantity,l,s]),{isPendingDelete:b.delete,quantity:s,setItemQuantity:i,removeItem:m,cartItemQuantityErrors:o}})(c),{dispatchStoreEvent:N}=Object(ce.a)(),{receiveCart:M,...I}=Object(H.a)(),R=Object(r.useMemo)(()=>({context:"cart",cartItem:c,cart:I}),[c,I]),x=Object(ue.getCurrencyFromPriceResponse)(E),P=Object(A.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:i,extensions:y,arg:R}),T=Object(de.a)({amount:parseInt(E.raw_prices.regular_price,10),precision:E.raw_prices.precision}),D=Object(de.a)({amount:parseInt(E.raw_prices.price,10),precision:E.raw_prices.precision}),L=T.subtract(D),B=L.multiply(v),U=Object(ue.getCurrencyFromPriceResponse)(f);let V=parseInt(f.line_subtotal,10);Object(_.getSetting)("displayCartPricesIncludingTax",!1)&&(V+=parseInt(f.line_subtotal_tax,10));const z=Object(de.a)({amount:V,precision:U.minorUnit}),F=h.length?h[0]:{},G="hidden"===l||"search"===l,q=Object(A.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:y,arg:R}),ae=Object(A.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:y,arg:R,validation:be}),se=Object(A.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:y,arg:R,validation:be}),me=Object(A.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"",extensions:y,arg:R,validation:be});return Object(r.createElement)("tr",{className:a()("wc-block-cart-items__row",q,{"is-disabled":C}),ref:t,tabIndex:s},Object(r.createElement)("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(ee.d)(F,"alt")||!F.alt},G?Object(r.createElement)(re.a,{image:F,fallbackAlt:P}):Object(r.createElement)("a",{href:g,tabIndex:-1},Object(r.createElement)(re.a,{image:F,fallbackAlt:P}))),Object(r.createElement)("td",{className:"wc-block-cart-item__product"},Object(r.createElement)(Q.a,{disabled:C||G,name:P,permalink:g}),b?Object(r.createElement)(ne.a,null):!!p&&Object(r.createElement)(oe.a,{lowStockRemaining:p}),Object(r.createElement)("div",{className:"wc-block-cart-item__prices"},Object(r.createElement)(W.a,{currency:x,regularPrice:pe(T,x),price:pe(D,x),format:se})),Object(r.createElement)(ie,{currency:x,saleAmount:pe(L,x),format:me}),Object(r.createElement)(le.a,{shortDescription:u,fullDescription:d,itemData:j,variation:O}),Object(r.createElement)("div",{className:"wc-block-cart-item__quantity"},Object(r.createElement)($,{disabled:C,quantity:v,maximum:m,onChange:e=>{k(e),N("cart-set-item-quantity",{product:c,quantity:e})},itemName:P}),Object(r.createElement)("button",{className:"wc-block-cart-item__remove-link",onClick:()=>{o(),w(),N("cart-remove-item",{product:c,quantity:v}),Object(Y.speak)(Object(n.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(n.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),P))},disabled:C},Object(n.__)("Remove item","woo-gutenberg-products-block")))),Object(r.createElement)("td",{className:"wc-block-cart-item__total"},Object(r.createElement)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},Object(r.createElement)(W.a,{currency:U,format:ae,price:z.getAmount()}),v>1&&Object(r.createElement)(ie,{currency:x,saleAmount:pe(B,x),format:me}))))});const ge=[...Array(3)].map((_x,e)=>Object(r.createElement)(me,{lineItem:{},key:e})),he=e=>{const t={};return e.forEach(e=>{let{key:c}=e;t[c]=Object(r.createRef)()}),t};var Oe=e=>{let{lineItems:t=[],isLoading:c=!1,className:o}=e;const s=Object(r.useRef)(null),i=Object(r.useRef)(he(t));Object(r.useEffect)(()=>{i.current=he(t)},[t]);const l=e=>()=>{null!=i&&i.current&&e&&i.current[e].current instanceof HTMLElement?i.current[e].current.focus():s.current instanceof HTMLElement&&s.current.focus()},u=c?ge:t.map((e,c)=>{const n=t.length>c+1?t[c+1].key:null;return Object(r.createElement)(me,{key:e.key,lineItem:e,onRemove:l(n),ref:i.current[e.key],tabIndex:-1})});return Object(r.createElement)("table",{className:a()("wc-block-cart-items",o),ref:s,tabIndex:-1},Object(r.createElement)("thead",null,Object(r.createElement)("tr",{className:"wc-block-cart-items__header"},Object(r.createElement)("th",{className:"wc-block-cart-items__header-image"},Object(r.createElement)("span",null,Object(n.__)("Product","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(r.createElement)("span",null,Object(n.__)("Details","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(r.createElement)("span",null,Object(n.__)("Total","woo-gutenberg-products-block"))))),Object(r.createElement)("tbody",null,u))},je=e=>{let{className:t}=e;const{cartItems:c,cartIsLoading:n}=Object(H.a)();return Object(r.createElement)(Oe,{className:t,lineItems:c,isLoading:n})},Ee=c(518);Object(u.d)(Ee,{icon:{src:Object(r.createElement)(U.a,{icon:V.a}),foreground:"#7f54b3"},edit:e=>{let{attributes:t}=e;const{className:c}=t,n=Object(s.useBlockProps)();return Object(r.createElement)("div",n,Object(r.createElement)(G.a,null,Object(r.createElement)(je,{className:c})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var _e=c(807);c(806);var fe=c(519);Object(u.d)(fe,{icon:{src:Object(r.createElement)(U.a,{icon:V.a}),foreground:"#7f54b3"},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)({className:"wc-block-cart__sidebar"}),n=Object(L.a)(A.innerBlockAreas.CART_TOTALS),o=[["woocommerce/cart-order-summary-block",{},[]],["woocommerce/cart-express-payment-block",{},[]],["woocommerce/proceed-to-checkout-block",{},[]],["woocommerce/cart-accepted-payment-methods-block",{},[]]];return Object(N.a)({clientId:t,registeredBlocks:n,defaultTemplate:o}),Object(r.createElement)(_e.a,c,Object(r.createElement)(s.InnerBlocks,{allowedBlocks:n,template:o,templateLock:!1,renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var ye=c(808),ve=c(809),ke=c(810),we=c(854),Se=c(814),Ce=c(254),Ne=c(162),Me=e=>{let{className:t,showRateAfterTaxName:c=!1,isShippingCalculatorEnabled:o=!0}=e;const{cartFees:a,cartTotals:s,cartNeedsShipping:i}=Object(H.a)(),{applyCoupon:l,removeCoupon:u,isApplyingCoupon:d,isRemovingCoupon:p,appliedCoupons:b}=Object(Ce.a)(),m=Object(ue.getCurrencyFromPriceResponse)(s),{extensions:g,receiveCart:h,...O}=Object(H.a)(),j={extensions:g,cart:O},E={extensions:g,cart:O};return Object(r.createElement)("div",{className:t},Object(r.createElement)(Ne.a,{headingLevel:"2",className:"wc-block-cart__totals-title"},Object(n.__)("Cart totals","woo-gutenberg-products-block")),Object(r.createElement)(A.TotalsWrapper,null,Object(r.createElement)(A.Subtotal,{currency:m,values:s}),Object(r.createElement)(A.TotalsFees,{currency:m,cartFees:a}),Object(r.createElement)(ve.a,{cartCoupons:b,currency:m,isRemovingCoupon:p,removeCoupon:u,values:s})),Object(_.getSetting)("couponsEnabled",!0)&&Object(r.createElement)(A.TotalsWrapper,null,Object(r.createElement)(ke.a,{onSubmit:l,isLoading:d})),Object(r.createElement)(A.ExperimentalDiscountsMeta.Slot,E),i&&Object(r.createElement)(A.TotalsWrapper,null,Object(r.createElement)(we.a,{showCalculator:o,showRateSelector:!0,values:s,currency:m})),!Object(_.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(s.total_tax,10)>0&&Object(r.createElement)(A.TotalsWrapper,null,Object(r.createElement)(A.TotalsTaxes,{showRateAfterTaxName:c,currency:m,values:s})),Object(r.createElement)(A.TotalsWrapper,null,Object(r.createElement)(Se.a,{currency:m,values:s})),Object(r.createElement)(A.ExperimentalOrderMeta.Slot,j))},Ie={isShippingCalculatorEnabled:{type:"boolean",default:Object(_.getSetting)("isShippingCalculatorEnabled",!0)},showRateAfterTaxName:{type:"boolean",default:Object(_.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{move:!0,remove:!0}}},Re=c(520);Object(u.d)(Re,{icon:{src:Object(r.createElement)(i.a,{srcElement:ye.a}),foreground:"#7f54b3"},attributes:Ie,edit:e=>{let{attributes:t,setAttributes:c}=e;const{showRateAfterTaxName:o,isShippingCalculatorEnabled:a,className:i}=t,l=Object(s.useBlockProps)(),u=Object(_.getSetting)("taxesEnabled"),d=Object(_.getSetting)("displayItemizedTaxes",!1),p=Object(_.getSetting)("displayCartPricesIncludingTax",!1);return Object(r.createElement)("div",l,Object(r.createElement)(s.InspectorControls,null,Object(_.getSetting)("shippingEnabled",!0)&&Object(r.createElement)(b.PanelBody,{title:Object(n.__)("Shipping rates","woo-gutenberg-products-block")},Object(r.createElement)(b.ToggleControl,{label:Object(n.__)("Shipping calculator","woo-gutenberg-products-block"),help:Object(n.__)("Allow customers to estimate shipping by entering their address.","woo-gutenberg-products-block"),checked:a,onChange:()=>c({isShippingCalculatorEnabled:!a})})),u&&d&&!p&&Object(r.createElement)(b.PanelBody,{title:Object(n.__)("Taxes","woo-gutenberg-products-block")},Object(r.createElement)(b.ToggleControl,{label:Object(n.__)("Show rate after tax name","woo-gutenberg-products-block"),help:Object(n.__)("Show the percentage rate alongside each tax line in the summary.","woo-gutenberg-products-block"),checked:o,onChange:()=>c({showRateAfterTaxName:!o})}))),Object(r.createElement)(G.a,null,Object(r.createElement)(Me,{className:i,showRateAfterTaxName:o,isShippingCalculatorEnabled:a})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var xe=c(815),Pe=c(889),Te=c(185),Ae=c(258),De=c(59),Le=c(260),Be=c(174),Ue=c(97),Ve=c(249);c(349);var ze=()=>{const{paymentMethods:e,isInitialized:t}=Object(Ae.a)(),{noticeContexts:c}=Object(De.c)(),{isCalculating:o,isProcessing:a,isAfterProcessing:s,isBeforeProcessing:i,isComplete:l,hasError:u}=Object(te.b)(),{currentStatus:d}=Object(Le.b)();if(!t||t&&0===Object.keys(e).length)return null;const p=a||s||i||l&&!u;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Ue.a,{isLoading:o||p||d.isDoingExpressPayment},Object(r.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},Object(r.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(r.createElement)(Be.a,{context:c.EXPRESS_PAYMENTS},Object(r.createElement)(Ve.a,null))))),Object(r.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(n.__)("Or","woo-gutenberg-products-block")))},Fe=e=>{let{className:t}=e;const{cartNeedsPayment:c}=Object(H.a)();return c?Object(r.createElement)("div",{className:a()("wc-block-cart__payment-options",t)},Object(r.createElement)(ze,null)):null};c(816);const Ge=()=>Object(r.createElement)(Pe.a,{icon:Object(r.createElement)(i.a,{srcElement:xe.a}),label:Object(n.__)("Express Checkout","woo-gutenberg-products-block"),className:"wp-block-woocommerce-checkout-express-payment-block-placeholder"},Object(r.createElement)("span",{className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__description"},Object(n.__)("Your store doesn't have any Payment Methods that support the Express Checkout Block. If they are added, they will be shown here.","woo-gutenberg-products-block")),Object(r.createElement)(Te.a,{isPrimary:!0,href:_.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer",className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__button"},Object(n.__)("Configure Payment Methods","woo-gutenberg-products-block")));var He=c(523);Object(u.d)(He,{icon:{src:Object(r.createElement)(i.a,{srcElement:xe.a}),foreground:"#7f54b3"},edit:e=>{let{attributes:t}=e;const{paymentMethods:c,isInitialized:n}=Object(Ae.a)(),o=Object.keys(c).length>0,i=Object(s.useBlockProps)({className:a()({"wp-block-woocommerce-cart-express-payment-block--has-express-payment-methods":o})}),{className:l}=t;return n?Object(r.createElement)("div",i,o?Object(r.createElement)(Fe,{className:l}):Object(r.createElement)(Ge,null)):null},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var Ye=c(892),qe=c(250),$e=c(525),We=c(524);Object(u.d)(We,{icon:{src:Object(r.createElement)(U.a,{icon:Ye.a}),foreground:"#7f54b3"},attributes:{checkoutPageId:{type:"number",default:0},lock:{type:"object",default:{move:!0,remove:!0}}},edit:e=>{let{attributes:t,setAttributes:c}=e;const o=Object(s.useBlockProps)(),{checkoutPageId:a=0,className:i}=t,{current:l}=Object(r.useRef)(a),u=Object(S.useSelect)(e=>l||e("core/editor").getCurrentPostId(),[l]);return Object(r.createElement)("div",o,Object(r.createElement)(s.InspectorControls,null,!(u===g.c&&0===l)&&Object(r.createElement)(qe.a,{pageId:a,setPageId:e=>c({checkoutPageId:e}),labels:{title:Object(n.__)("Proceed to Checkout button","woo-gutenberg-products-block"),default:Object(n.__)("WooCommerce Checkout Page","woo-gutenberg-products-block")}})),Object(r.createElement)(G.a,null,Object(r.createElement)($e.a,{checkoutPageId:a,className:i})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())}),c(818);const Qe=g.j?["core/paragraph",{align:"center",content:Object(n.sprintf)( +/* translators: %s is the link to the store product directory. */ +Object(n.__)('Browse store.',"woo-gutenberg-products-block"),g.j),dropCap:!1}]:null,Ke=[["core/image",{align:"center",url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAzOCAzOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5IDBDOC41MDQwMyAwIDAgOC41MDQwMyAwIDE5QzAgMjkuNDk2IDguNTA0MDMgMzggMTkgMzhDMjkuNDk2IDM4IDM4IDI5LjQ5NiAzOCAxOUMzOCA4LjUwNDAzIDI5LjQ5NiAwIDE5IDBaTTI1LjEyOSAxMi44NzFDMjYuNDg1MSAxMi44NzEgMjcuNTgwNiAxMy45NjY1IDI3LjU4MDYgMTUuMzIyNkMyNy41ODA2IDE2LjY3ODYgMjYuNDg1MSAxNy43NzQyIDI1LjEyOSAxNy43NzQyQzIzLjc3MyAxNy43NzQyIDIyLjY3NzQgMTYuNjc4NiAyMi42Nzc0IDE1LjMyMjZDMjIuNjc3NCAxMy45NjY1IDIzLjc3MyAxMi44NzEgMjUuMTI5IDEyLjg3MVpNMTEuNjQ1MiAzMS4yNTgxQzkuNjE0OTIgMzEuMjU4MSA3Ljk2Nzc0IDI5LjY0OTIgNy45Njc3NCAyNy42NTczQzcuOTY3NzQgMjYuMTI1IDEwLjE1MTIgMjMuMDI5OCAxMS4xNTQ4IDIxLjY5NjhDMTEuNCAyMS4zNjczIDExLjg5MDMgMjEuMzY3MyAxMi4xMzU1IDIxLjY5NjhDMTMuMTM5MSAyMy4wMjk4IDE1LjMyMjYgMjYuMTI1IDE1LjMyMjYgMjcuNjU3M0MxNS4zMjI2IDI5LjY0OTIgMTMuNjc1NCAzMS4yNTgxIDExLjY0NTIgMzEuMjU4MVpNMTIuODcxIDE3Ljc3NDJDMTEuNTE0OSAxNy43NzQyIDEwLjQxOTQgMTYuNjc4NiAxMC40MTk0IDE1LjMyMjZDMTAuNDE5NCAxMy45NjY1IDExLjUxNDkgMTIuODcxIDEyLjg3MSAxMi44NzFDMTQuMjI3IDEyLjg3MSAxNS4zMjI2IDEzLjk2NjUgMTUuMzIyNiAxNS4zMjI2QzE1LjMyMjYgMTYuNjc4NiAxNC4yMjcgMTcuNzc0MiAxMi44NzEgMTcuNzc0MlpNMjUuOTEwNSAyOS41ODc5QzI0LjE5NDQgMjcuNTM0NyAyMS42NzM4IDI2LjM1NDggMTkgMjYuMzU0OEMxNy4zNzU4IDI2LjM1NDggMTcuMzc1OCAyMy45MDMyIDE5IDIzLjkwMzJDMjIuNDAxNiAyMy45MDMyIDI1LjYxMTcgMjUuNDA0OCAyNy43ODc1IDI4LjAyNUMyOC44NDQ4IDI5LjI4MTUgMjYuOTI5NCAzMC44MjE0IDI1LjkxMDUgMjkuNTg3OVoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=",sizeSlug:"small"}],["core/heading",{textAlign:"center",content:Object(n.__)("Your cart is currently empty!","woo-gutenberg-products-block"),level:2,className:"wc-block-cart__empty-cart__title"}],Qe,["core/separator",{className:"is-style-dots"}],["core/heading",{textAlign:"center",content:Object(n.__)("New in store","woo-gutenberg-products-block"),level:2}],["woocommerce/product-new",{columns:3,rows:1}]].filter(Boolean);var Xe=c(526);Object(u.d)(Xe,{icon:{src:Object(r.createElement)(i.a,{srcElement:k}),foreground:"#7f54b3"},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)(),{currentView:n}=Object(O.b)(),o=Object(L.a)(A.innerBlockAreas.EMPTY_CART);return Object(N.a)({clientId:t,registeredBlocks:o,defaultTemplate:Ke}),Object(r.createElement)("div",T()({},c,{hidden:"woocommerce/empty-cart-block"!==n}),Object(r.createElement)(s.InnerBlocks,{template:Ke,templateLock:!1,renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var Ze=c(255);const Je=e=>Object.values(e).reduce((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e),[]);var et=e=>{let{className:t}=e;const{paymentMethods:c}=Object(Ae.b)();return Object(r.createElement)(Ze.a,{className:t,icons:Je(c)})},tt=c(527);Object(u.d)(tt,{icon:{src:Object(r.createElement)(i.a,{srcElement:xe.a}),foreground:"#874FB9"},edit:e=>{let{attributes:t}=e;const{className:c}=t,n=Object(s.useBlockProps)();return Object(r.createElement)("div",n,Object(r.createElement)(et,{className:c}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});const ct={title:Object(n.__)("Cart","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(i.a,{srcElement:l.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Shopping cart.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1,__experimentalExposeControlsToChildren:!0},example:{attributes:{isPreview:!0}},attributes:x,edit:e=>{let{className:t,attributes:c,setAttributes:o,clientId:l}=e;const{hasDarkControls:u}=c,{currentView:d,component:p}=((e,t)=>{const c=t[0],[o,a]=Object(r.useState)(c),{selectBlock:l}=Object(S.useDispatch)("core/block-editor"),{getBlock:u}=Object(S.select)(s.store),d=Object(r.createElement)(b.ToolbarGroup,null,Object(r.createElement)(b.ToolbarDropdownMenu,{label:Object(n.__)("Switch view","woo-gutenberg-products-block"),text:o.label,icon:Object(r.createElement)(i.a,{srcElement:C,style:{marginRight:"8px"}}),controls:t.map(t=>({...t,title:Object(r.createElement)("span",null,t.label),isActive:t.view===o.view,onClick:()=>{var c;a(t),l((null===(c=u(e).innerBlocks.find(e=>e.name===t.view))||void 0===c?void 0:c.clientId)||e)}}))}));return{currentView:o.view,component:d}})(l,[{view:"woocommerce/filled-cart-block",label:Object(n.__)("Filled Cart","woo-gutenberg-products-block"),icon:Object(r.createElement)(i.a,{srcElement:v})},{view:"woocommerce/empty-cart-block",label:Object(n.__)("Empty Cart","woo-gutenberg-products-block"),icon:Object(r.createElement)(i.a,{srcElement:k})}]),g=[["woocommerce/filled-cart-block",{},[]],["woocommerce/empty-cart-block",{},[]]],j=Object(w.b)({className:a()(t,"wp-block-woocommerce-cart",{"is-editor-preview":c.isPreview})});return Object(N.a)({clientId:l,registeredBlocks:I,defaultTemplate:g}),Object(r.createElement)("div",j,Object(r.createElement)(h.a,{header:Object(n.__)("Cart Block Error","woo-gutenberg-products-block"),text:Object(n.__)("There was an error whilst rendering the cart block. If this problem continues, try re-creating the block.","woo-gutenberg-products-block"),showErrorMessage:!0,errorMessagePrefix:Object(n.__)("Error message:","woo-gutenberg-products-block")},Object(r.createElement)(O.a,{currentView:d,previewData:{previewCart:f.a}},Object(r.createElement)(R,{attributes:c,setAttributes:o}),Object(r.createElement)(s.BlockControls,{__experimentalShareWithChildBlocks:!0},p),Object(r.createElement)(M.Provider,{value:{hasDarkControls:u}},Object(r.createElement)(E,null,Object(r.createElement)(s.InnerBlocks,{allowedBlocks:I,template:g,templateLock:!1}))))),Object(r.createElement)(m.a,{blockName:"cart"}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save({className:"is-loading"}),Object(r.createElement)(s.InnerBlocks.Content,null)),deprecated:[{attributes:x,save:e=>{let{attributes:t}=e;return Object(r.createElement)("div",{className:a()("is-loading",t.className)},Object(r.createElement)(s.InnerBlocks.Content,null))},migrate:(e,t)=>{const{isShippingCalculatorEnabled:c,showRateAfterTaxName:r,checkoutPageId:n,align:o}=e;return[e,[Object(d.createBlock)("woocommerce/filled-cart-block",{align:o},[Object(d.createBlock)("woocommerce/cart-items-block"),Object(d.createBlock)("woocommerce/cart-totals-block",{},[Object(d.createBlock)("woocommerce/cart-order-summary-block",{isShippingCalculatorEnabled:c,showRateAfterTaxName:r}),Object(d.createBlock)("woocommerce/cart-express-payment-block"),Object(d.createBlock)("woocommerce/proceed-to-checkout-block",{checkoutPageId:n}),Object(d.createBlock)("woocommerce/cart-accepted-payment-methods-block")])]),Object(d.createBlock)("woocommerce/empty-cart-block",{align:o},t)]]},isEligible:(e,t)=>!t.find(e=>"woocommerce/filled-cart-block"===e.name)}]};Object(u.d)("woocommerce/cart",ct)},851:function(e,t,c){"use strict";var r=c(0),n=c(364),o=c(7),a=c.n(o),s=c(32),i=c(1),l=c(20),u=c(5),d=c.n(u),p=c(12),b=c(899),m=c(148),g=c(276),h=c(113);c(344);var O=Object(p.withInstanceId)(e=>{let{id:t,className:c,label:n,onChange:o,options:a,value:s,required:l=!1,errorMessage:u=Object(i.__)("Please select a value.","woo-gutenberg-products-block"),errorId:p,instanceId:O="0",autoComplete:j="off"}=e;const{getValidationError:E,setValidationErrors:_,clearValidationError:f}=Object(m.b)(),y=Object(r.useRef)(null),v=t||"control-"+O,k=p||v,w=E(k)||{message:"",hidden:!1};return Object(r.useEffect)(()=>(!l||s?f(k):_({[k]:{message:u,hidden:!0}}),()=>{f(k)}),[f,s,k,u,l,_]),Object(r.createElement)("div",{id:v,className:d()("wc-block-components-combobox",c,{"is-active":s,"has-error":w.message&&!w.hidden}),ref:y},Object(r.createElement)(b.a,{className:"wc-block-components-combobox-control",label:n,onChange:o,onFilterValueChange:e=>{if(e.length){const t=Object(h.b)(y.current)?y.current.ownerDocument.activeElement:void 0;if(t&&Object(h.b)(y.current)&&y.current.contains(t))return;const c=e.toLocaleUpperCase(),r=a.find(e=>e.label.toLocaleUpperCase().startsWith(c)||e.value.toLocaleUpperCase()===c);r&&o(r.value)}},options:a,value:s||"",allowReset:!1,autoComplete:j,"aria-invalid":w.message&&!w.hidden}),Object(r.createElement)(g.a,{propertyName:k}))});c(343);var j=e=>{let{className:t,countries:c,id:n,label:o,onChange:a,value:s="",autoComplete:u="off",required:p=!1,errorId:b,errorMessage:m=Object(i.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(r.useMemo)(()=>Object.keys(c).map(e=>({value:e,label:Object(l.decodeEntities)(c[e])})),[c]);return Object(r.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(r.createElement)(O,{id:n,label:o,onChange:a,options:g,value:s,errorId:b,errorMessage:m,required:p,autoComplete:u}),"off"!==u&&Object(r.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:u,value:s,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),c=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);a(c?c.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},E=e=>Object(r.createElement)(j,a()({countries:s.h},e)),_=e=>Object(r.createElement)(j,a()({countries:s.a},e));c(345);const f=(e,t)=>{const c=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return c?c.value:""};var y=e=>{let{className:t,id:c,states:o,country:a,label:s,onChange:u,autoComplete:p="off",value:b="",required:m=!1}=e;const g=o[a],h=Object(r.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(l.decodeEntities)(g[e])})):[],[g]),j=Object(r.useCallback)(e=>{u(h.length>0?f(e,h):e)},[u,h]),E=Object(r.useRef)(b);return Object(r.useEffect)(()=>{E.current!==b&&(E.current=b)},[b]),Object(r.useEffect)(()=>{if(h.length>0&&E.current){const e=f(E.current,h);e!==E.current&&j(e)}},[h,j]),h.length>0?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(O,{className:d()(t,"wc-block-components-state-input"),id:c,label:s,onChange:j,options:h,value:b,errorMessage:Object(i.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:p}),"off"!==p&&Object(r.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:b,onChange:e=>j(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(r.createElement)(n.a,{className:t,id:c,label:s,onChange:j,autoComplete:p,value:b,required:m})},v=e=>Object(r.createElement)(y,a()({states:s.i},e)),k=e=>Object(r.createElement)(y,a()({states:s.b},e)),w=c(52),S=c(3),C=c(132);t.a=Object(p.withInstanceId)(e=>{let{id:t,fields:c=Object.keys(S.defaultAddressFields),fieldConfig:o={},instanceId:a,onChange:s,type:l="shipping",values:u}=e;const{getValidationError:d,setValidationErrors:p,clearValidationError:b}=Object(m.b)(),g=Object(w.a)(c),h=d("shipping-missing-country")||{},O=Object(r.useMemo)(()=>Object(C.a)(g,o,u.country),[g,o,u.country]);return Object(r.useEffect)(()=>{O.forEach(e=>{e.hidden&&u[e.key]&&s({...u,[e.key]:""})})},[O,s,u]),Object(r.useEffect)(()=>{"shipping"===l&&((e,t,c,r)=>{r||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(i.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),r&&e.country&&c("shipping-missing-country")})(u,p,b,!!h.message&&!h.hidden)},[u,h.message,h.hidden,p,b,l]),t=t||a,Object(r.createElement)("div",{id:t,className:"wc-block-components-address-form"},O.map(e=>{if(e.hidden)return null;if("country"===e.key){const c="shipping"===l?E:_;return Object(r.createElement)(c,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:u.country,autoComplete:e.autocomplete,onChange:e=>s({...u,country:e,state:""}),errorId:"shipping"===l?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const c="shipping"===l?v:k;return Object(r.createElement)(c,{key:e.key,id:`${t}-${e.key}`,country:u.country,label:e.required?e.label:e.optionalLabel,value:u.state,autoComplete:e.autocomplete,onChange:e=>s({...u,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(r.createElement)(n.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:u[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>s({...u,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},854:function(e,t,c){"use strict";var r=c(7),n=c.n(r),o=c(0),a=c(5),s=c.n(a),i=c(1),l=c(46),u=c(22),d=c(3),p=c(20);const b=e=>{let{selectedShippingRates:t}=e;return Object(o.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(i.__)("via","woo-gutenberg-products-block")," ",Object(p.decodeEntities)(t.join(", ")))};var m=c(888),g=c(253),h=e=>{let{hasRates:t,shippingRates:c,shippingRatesLoading:r}=e;const n=t?Object(i.__)("Shipping options","woo-gutenberg-products-block"):Object(i.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(o.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(o.createElement)("legend",{className:"screen-reader-text"},n),Object(o.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(o.createElement)(m.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(i.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:c,shippingRatesLoading:r}))},O=c(98),j=c(108),E=c(31),_=c.n(E),f=c(148),y=(c(243),c(851)),v=e=>{let{address:t,onUpdate:c,addressFields:r}=e;const[n,a]=Object(o.useState)(t),{hasValidationErrors:s,showAllValidationErrors:l}=Object(f.b)();return Object(o.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(o.createElement)(y.a,{fields:r,onChange:a,values:n}),Object(o.createElement)(j.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:_()(n,t),onClick:e=>{if(e.preventDefault(),l(),!s)return c(n)},type:"submit"},Object(i.__)("Update","woo-gutenberg-products-block")))},k=e=>{let{onUpdate:t=(()=>{}),addressFields:c=["country","state","city","postcode"]}=e;const{shippingAddress:r,setShippingAddress:n}=Object(O.b)();return Object(o.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(o.createElement)(v,{address:r,addressFields:c,onUpdate:e=>{n(e),t(e)}}))},w=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const c=Object(d.getSetting)("shippingCountries",{}),r=Object(d.getSetting)("shippingStates",{}),n="string"==typeof c[t.country]?Object(p.decodeEntities)(c[t.country]):"",a="object"==typeof r[t.country]&&"string"==typeof r[t.country][t.state]?Object(p.decodeEntities)(r[t.country][t.state]):t.state,s=[];s.push(t.postcode.toUpperCase()),s.push(t.city),s.push(a),s.push(n);const l=s.filter(Boolean).join(", ");return l?Object(o.createElement)("span",{className:"wc-block-components-shipping-address"},Object(i.sprintf)( +/* translators: %s location. */ +Object(i.__)("Shipping to %s","woo-gutenberg-products-block"),l)+" "):null};c(342);const S=e=>{let{label:t=Object(i.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}=e;return Object(o.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{r(!c)},"aria-expanded":c},t)},C=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r,shippingAddress:n}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(w,{address:n}),t&&Object(o.createElement)(S,{label:Object(i.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}))},N=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}=e;return t?Object(o.createElement)(S,{isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}):Object(o.createElement)("em",null,Object(i.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:c,showCalculator:r=!0,showRateSelector:a=!0,className:p}=e;const[m,g]=Object(o.useState)(!1),{shippingAddress:O,cartHasCalculatedShipping:j,shippingRates:E,shippingRatesLoading:_}=Object(l.a)(),f=Object(d.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(c.total_shipping,10)+parseInt(c.total_shipping_tax,10):parseInt(c.total_shipping,10),y=E.some(e=>e.shipping_rates.length)||f,v={isShippingCalculatorOpen:m,setIsShippingCalculatorOpen:g},w=E.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(o.createElement)("div",{className:s()("wc-block-components-totals-shipping",p)},Object(o.createElement)(u.TotalsItem,{label:Object(i.__)("Shipping","woo-gutenberg-products-block"),value:j?f:Object(o.createElement)(N,n()({showCalculator:r},v)),description:Object(o.createElement)(o.Fragment,null,j&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(b,{selectedShippingRates:w}),Object(o.createElement)(C,n()({shippingAddress:O,showCalculator:r},v)))),currency:t}),r&&m&&Object(o.createElement)(k,{onUpdate:()=>{g(!1)}}),a&&j&&Object(o.createElement)(h,{hasRates:y,shippingRates:E,shippingRatesLoading:_}))}},86:function(e,t,c){"use strict";var r=c(7),n=c.n(r),o=c(0),a=c(61),s=c(165);const i=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:c={},...r}=e;const l=Object(o.useRef)(null),u=()=>{l.current&&a.focus.focusable.find(l.current).forEach(e=>{i.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=Object(s.a)(u,0,{leading:!0});return Object(o.useLayoutEffect)(()=>{let e;return u(),l.current&&(e=new window.MutationObserver(d),e.observe(l.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),Object(o.createElement)("div",n()({ref:l,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...c}},r),t)}},876:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(1),n=c(32),o=c(3);const a=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:Object(r.__)("Shipping","woo-gutenberg-products-block"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:Object(r._x)("Beanie with Logo","example product in Cart Block","woo-gutenberg-products-block"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:Object(r._x)("Beanie","example product in Cart Block","woo-gutenberg-products-block"),quantity:1}],shipping_rates:[{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(r.__)("Free shipping","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"000",taxes:"0",rate_id:"free_shipping:1",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!0},{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(r.__)("Local pickup","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"200",taxes:"0",rate_id:"local_pickup:1",instance_id:1,meta_data:[],method_id:"local_pickup",selected:!1}]}],s=Object(o.getSetting)("displayCartPricesIncludingTax",!1),i={coupons:[],shipping_rates:Object(o.getSetting)("shippingMethodsExist",!1)?a:[],items:[{key:"1",id:1,quantity:2,name:Object(r.__)("Beanie","woo-gutenberg-products-block"),short_description:Object(r.__)("Warm hat for winter","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-beanie",permalink:"https://example.org",low_stock_remaining:2,backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:10,src:n.m+"previews/beanie.jpg",thumbnail:n.m+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(r.__)("Color","woo-gutenberg-products-block"),value:Object(r.__)("Yellow","woo-gutenberg-products-block")},{attribute:Object(r.__)("Size","woo-gutenberg-products-block"),value:Object(r.__)("Small","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"12000":"10000",regular_price:s?"12000":"10000",sale_price:s?"12000":"10000",raw_prices:{precision:6,price:s?"12000000":"10000000",regular_price:s?"12000000":"10000000",sale_price:s?"12000000":"10000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}},{key:"2",id:2,quantity:1,name:Object(r.__)("Cap","woo-gutenberg-products-block"),short_description:Object(r.__)("Lightweight baseball cap","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-cap",permalink:"https://example.org",backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:11,src:n.m+"previews/cap.jpg",thumbnail:n.m+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(r.__)("Color","woo-gutenberg-products-block"),value:Object(r.__)("Orange","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"2400":"2000",regular_price:s?"2400":"2000",sale_price:s?"2400":"2000",raw_prices:{precision:6,price:s?"24000000":"20000000",regular_price:s?"24000000":"20000000",sale_price:s?"24000000":"20000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}}],fees:[],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:Object(o.getSetting)("shippingEnabled",!0),has_calculated_shipping:!0,shipping_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billing_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total_items:"4000",total_items_tax:"800",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"800",total_price:"4800",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"800"}]},errors:[],payment_requirements:["products"],extensions:{}}},878:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const n={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},o=()=>{const[e,t]=Object(r.useState)(""),c=Object(r.useRef)(null),o=Object(r.useRef)(new IntersectionObserver(e=>{e[0].isIntersecting?t("visible"):t(e[0].boundingClientRect.top>0?"below":"above")},{threshold:1}));return Object(r.useLayoutEffect)(()=>{const e=c.current,t=o.current;return e&&t.observe(e),()=>{t.unobserve(e)}},[]),[Object(r.createElement)("div",{"aria-hidden":!0,ref:c,style:n}),e]}},9:function(e,t){e.exports=window.wp.blockEditor},97:function(e,t,c){"use strict";var r=c(0),n=c(1),o=(c(2),c(5)),a=c.n(o),s=(c(340),c(133));t.a=e=>{let{children:t,className:c,screenReaderLabel:o,showSpinner:i=!1,isLoading:l=!0}=e;return Object(r.createElement)("div",{className:a()(c,{"wc-block-components-loading-mask":l})},l&&i&&Object(r.createElement)(s.a,null),Object(r.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(r.createElement)("span",{className:"screen-reader-text"},o||Object(n.__)("Loading…","woo-gutenberg-products-block")))}},98:function(e,t,c){"use strict";c.d(t,"b",(function(){return k})),c.d(t,"a",(function(){return w}));var r=c(0),n=c(31),o=c.n(n),a=c(211);const s=e=>Object(a.a)(e.map(e=>{var t;let{package_id:c,shipping_rates:r}=e;return[c,null===(t=r.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})),i={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},l={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},u={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:i,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},d=(e,t)=>{let{type:c}=t;return Object.values(i).includes(c)?c:e};var p=c(141),b=c(373);const m=e=>({onSuccess:Object(b.a)("shipping_rates_success",e),onFail:Object(b.a)("shipping_rates_fail",e),onSelectSuccess:Object(b.a)("shipping_rate_select_success",e),onSelectFail:Object(b.a)("shipping_rate_select_fail",e)});var g=c(376),h=c(74),O=c(81),j=c(46),E=c(163);const{NONE:_,INVALID_ADDRESS:f,UNKNOWN:y}=i,v=Object(r.createContext)(u),k=()=>Object(r.useContext)(v),w=e=>{let{children:t}=e;const{dispatchActions:c}=Object(h.b)(),{shippingAddress:n,setShippingAddress:a}=Object(O.b)(),{cartNeedsShipping:u,cartHasCalculatedShipping:b,shippingRates:k,shippingRatesLoading:w,cartErrors:S}=Object(j.a)(),{selectShippingRate:C,isSelectingRate:N}=Object(E.a)(),[M,I]=Object(r.useReducer)(d,_),[R,x]=Object(r.useReducer)(p.b,{}),P=Object(r.useRef)(R),T=Object(r.useMemo)(()=>({onShippingRateSuccess:m(x).onSuccess,onShippingRateFail:m(x).onFail,onShippingRateSelectSuccess:m(x).onSelectSuccess,onShippingRateSelectFail:m(x).onSelectFail}),[x]);Object(r.useEffect)(()=>{P.current=R},[R]);const A=Object(r.useRef)(()=>s(k));Object(r.useEffect)(()=>{const e=s(k);o()(A.current,e)||(A.current=e)},[k]),Object(r.useEffect)(()=>{w?c.incrementCalculating():c.decrementCalculating()},[w,c]),Object(r.useEffect)(()=>{N?c.incrementCalculating():c.decrementCalculating()},[N,c]),Object(r.useEffect)(()=>{S.length>0&&S.some(e=>!(!e.code||!Object.values(l).includes(e.code)))?I({type:f}):I({type:_})},[S]);const D=Object(r.useMemo)(()=>({isPristine:M===_,isValid:M===_,hasInvalidAddress:M===f,hasError:M===y||M===f}),[M]);Object(r.useEffect)(()=>{w||0!==k.length&&!D.hasError||Object(g.a)(P.current,"shipping_rates_fail",{hasInvalidAddress:D.hasInvalidAddress,hasError:D.hasError})},[k,w,D.hasError,D.hasInvalidAddress]),Object(r.useEffect)(()=>{!w&&k.length>0&&!D.hasError&&Object(g.a)(P.current,"shipping_rates_success",k)},[k,w,D.hasError]),Object(r.useEffect)(()=>{N||(D.hasError?Object(g.a)(P.current,"shipping_rate_select_fail",{hasError:D.hasError,hasInvalidAddress:D.hasInvalidAddress}):Object(g.a)(P.current,"shipping_rate_select_success",A.current))},[N,D.hasError,D.hasInvalidAddress]);const L={shippingErrorStatus:D,dispatchErrorStatus:I,shippingErrorTypes:i,shippingRates:k,shippingRatesLoading:w,selectedRates:A.current,setSelectedRates:C,isSelectingRate:N,shippingAddress:n,setShippingAddress:a,needsShipping:u,hasCalculatedShipping:b,...T};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(v.Provider,{value:L},t))}}}); \ No newline at end of file diff --git a/build/checkout-blocks/actions-frontend.js b/build/checkout-blocks/actions-frontend.js new file mode 100644 index 00000000000..a61e7eaa38c --- /dev/null +++ b/build/checkout-blocks/actions-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[31],{106:function(e,t,n){"use strict";var c=n(0);n(135),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},135:function(e,t){},137:function(e,t,n){"use strict";var c=n(18),o=n.n(c),a=n(0),r=n(62),s=n(5),i=n.n(s),l=n(106);n(188),t.a=e=>{let{className:t,showSpinner:n=!1,children:c,...s}=e;const u=i()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(a.createElement)(r.a,o()({className:u},s),n&&Object(a.createElement)(l.a,null),Object(a.createElement)("span",{className:"wc-block-components-button__text"},c))}},188:function(e,t){},246:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return s}));var c=n(33),o=n(147);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:a,expressPaymentMethodsInitialized:r}=Object(o.b)(),s=Object(c.a)(t),i=Object(c.a)(n);return{paymentMethods:e?i:s,isInitialized:e?r:a}},r=()=>a(!1),s=()=>a(!0)},327:function(e,t,n){"use strict";var c=n(0),o=n(32);const a=Object(c.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(c.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=a},351:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var c=n(1),o=n(41),a=n(147),r=n(246);const s=()=>{const{onSubmit:e,isCalculating:t,isBeforeProcessing:n,isProcessing:s,isAfterProcessing:i,isComplete:l,hasError:u}=Object(o.b)(),{paymentMethods:b={}}=Object(r.b)(),{activePaymentMethod:m,currentStatus:d}=Object(a.b)(),p=b[m]||{},w=s||i||n,g=l&&!u;return{submitButtonText:(null==p?void 0:p.placeOrderButtonLabel)||Object(c.__)("Place Order","woo-gutenberg-products-block"),onSubmit:e,isCalculating:t,isDisabled:s||d.isDoingExpressPayment,waitingForProcessing:w,waitingForRedirect:g}}},352:function(e,t){},353:function(e,t){},377:function(e,t,n){"use strict";n.r(t);var c=n(134),o=n(0),a=n(5),r=n.n(a),s=n(2),i=n(1),l=n(84),u=n(108),b=n(32),m=Object(o.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},Object(o.createElement)("path",{d:"M20 11H7.8l5.6-5.6L12 4l-8 8 8 8 1.4-1.4L7.8 13H20v-2z"}));n(353);var d=e=>{let{link:t}=e;return Object(o.createElement)("a",{href:t||l.c,className:"wc-block-components-checkout-return-to-cart-button"},Object(o.createElement)(u.a,{srcElement:m}),Object(i.__)("Return to Cart","woo-gutenberg-products-block"))},p=n(351),w=n(327),g=n(137),h=()=>{const{submitButtonText:e,onSubmit:t,isCalculating:n,isDisabled:c,waitingForProcessing:a,waitingForRedirect:r}=Object(p.a)();return Object(o.createElement)(g.a,{className:"wc-block-components-checkout-place-order-button",onClick:t,disabled:n||c||a||r,showSpinner:a},r?Object(o.createElement)(u.a,{srcElement:w.a,alt:Object(i.__)("Done","woo-gutenberg-products-block")}):e)};n(352);t.default=Object(c.withFilteredAttributes)({cartPageId:{type:"number",default:0},showReturnToCart:{type:"boolean",default:!0},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}})(e=>{let{cartPageId:t,showReturnToCart:n,className:c}=e;return Object(o.createElement)("div",{className:r()("wc-block-checkout__actions",c)},n&&Object(o.createElement)(d,{link:Object(s.getSetting)("page-"+t,!1)}),Object(o.createElement)(h,null))})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js b/build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js new file mode 100644 index 00000000000..b307852011e --- /dev/null +++ b/build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{259:function(e,t){},261:function(e,t,a){"use strict";var n=a(18),c=a.n(n),r=a(0),o=a(5),s=a.n(o);a(8),a(262),t.a=e=>{let{children:t,className:a,headingLevel:n,...o}=e;const l=s()("wc-block-components-title",a),i="h"+n;return Object(r.createElement)(i,c()({className:l},o),t)}},262:function(e,t){},264:function(e,t){},266:function(e,t){},267:function(e,t,a){"use strict";var n=a(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:a=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:c=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:a},showStepNumber:{type:"boolean",default:c}}}},268:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),c=(a(8),a(154));a(259);const r=e=>{let{errorMessage:t="",propertyName:a="",elementId:r=""}=e;const{getValidationError:o,getValidationErrorId:s}=Object(c.b)();if(!t||"string"!=typeof t){const e=o(a)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:s(r)},t))}},274:function(e,t){},275:function(e,t){},276:function(e,t){},281:function(e,t,a){"use strict";var n=a(0),c=a(5),r=a.n(c),o=a(261);a(266);const s=e=>{let{title:t,stepHeadingContent:a}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(o.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!a&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},a))};t.a=e=>{let{id:t,className:a,title:c,legend:o,description:l,children:i,disabled:u=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const p=o||c?"fieldset":"div";return Object(n.createElement)(p,{className:r()(a,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":u}),id:t,disabled:u},!(!o&&!c)&&Object(n.createElement)("legend",{className:"screen-reader-text"},o||c),!!c&&Object(n.createElement)(s,{title:c,stepHeadingContent:b()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!l&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},l),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},293:function(e,t,a){"use strict";var n=a(18),c=a.n(n),r=a(0),o=a(1),s=a(3),l=a(5),i=a.n(l),u=a(154),d=a(41),b=a(268),p=a(21),m=a(52),g=a(37);a(264);var h=Object(s.forwardRef)((e,t)=>{let{className:a,id:n,type:o="text",ariaLabel:s,ariaDescribedBy:l,label:u,screenReaderLabel:d,disabled:b,help:p,autoCapitalize:m="off",autoComplete:h="off",value:O="",onChange:f,required:j=!1,onBlur:E=(()=>{}),feedback:v,...k}=e;const[y,C]=Object(r.useState)(!1);return Object(r.createElement)("div",{className:i()("wc-block-components-text-input",a,{"is-active":y||O})},Object(r.createElement)("input",c()({type:o,id:n,value:O,ref:t,autoCapitalize:m,autoComplete:h,onChange:e=>{f(e.target.value)},onFocus:()=>C(!0),onBlur:e=>{E(e.target.value),C(!1)},"aria-label":s||u,disabled:b,"aria-describedby":p&&!l?n+"__help":l,required:j},k)),Object(r.createElement)(g.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:n},htmlFor:n}),!!p&&Object(r.createElement)("p",{id:n+"__help",className:"wc-block-components-text-input__help"},p),v)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:a,id:n,ariaDescribedBy:l,errorId:p,validateOnMount:g=!0,focusOnMount:O=!1,onChange:f,showError:j=!0,errorMessage:E="",...v}=e;const[k,y]=Object(s.useState)(!0),C=Object(s.useRef)(null),{getValidationError:w,hideValidationError:N,setValidationErrors:_,clearValidationError:I,getValidationErrorId:L}=Object(u.b)(),{isBeforeProcessing:M}=Object(d.b)(),q=void 0!==n?n:"textinput-"+a,S=void 0!==p?p:q,B=Object(s.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=C.current||null;if(!t)return;t.value=t.value.trim();const a=t.checkValidity();a?I(S):_({[S]:{message:t.validationMessage||Object(o.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[I,S,_]);Object(s.useEffect)(()=>{var e;k&&(O&&(null===(e=C.current)||void 0===e||e.focus()),y(!1))},[O,k,y]),Object(s.useEffect)(()=>{k&&(g&&B(),y(!1))},[k,y,g,B]),Object(s.useEffect)(()=>{M&&B()},[M,B]),Object(s.useEffect)(()=>()=>{I(S)},[I,S]);const F=w(S)||{};Object(m.d)(E)&&""!==E&&(F.message=E);const x=F.message&&!F.hidden,A=j&&x&&L(S)?L(S):l;return Object(r.createElement)(h,c()({className:i()(t,{"has-error":x}),"aria-invalid":!0===x,id:q,onBlur:()=>{B(!1)},feedback:j&&Object(r.createElement)(b.a,{errorMessage:E,propertyName:S}),ref:C,onChange:e=>{N(S),f(e)},ariaDescribedBy:A},v))})},306:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(2),c=a(0),r=a(51),o=a(45);const s=()=>{const{needsShipping:e}=Object(r.b)(),{billingData:t,setBillingData:a,shippingAddress:s,setShippingAddress:l,shippingAsBilling:i,setShippingAsBilling:u}=Object(o.b)(),d=Object(c.useRef)(i),b=Object(c.useRef)(t),p=Object(c.useCallback)(e=>{l(e),i&&a(e)},[i,l,a]),m=Object(c.useCallback)(t=>{a(t),e||l(t)},[e,l,a]);Object(c.useEffect)(()=>{if(d.current!==i){if(i)b.current=t,a(s);else{const{email:e,...t}=b.current;a({...t})}d.current=i}},[i,a,s,t]);const g=Object(c.useCallback)(e=>{a({email:e})},[a]),h=Object(c.useCallback)(e=>{a({phone:e})},[a]),O=Object(c.useCallback)(e=>{p({phone:e})},[p]);return{defaultAddressFields:n.defaultAddressFields,shippingFields:s,setShippingFields:p,billingFields:t,setBillingFields:m,setEmail:g,setPhone:h,setShippingPhone:O,shippingAsBilling:i,setShippingAsBilling:u,showShippingFields:e,showBillingFields:!e||!d.current}}},307:function(e,t,a){"use strict";var n=a(18),c=a.n(n),r=a(0),o=a(30),s=a(61);const l=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:a={},...n}=e;const i=Object(r.useRef)(null),u=()=>{i.current&&o.focus.focusable.find(i.current).forEach(e=>{l.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=Object(s.a)(u,0,{leading:!0});return Object(r.useLayoutEffect)(()=>{let e;return u(),i.current&&(e=new window.MutationObserver(d),e.observe(i.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),Object(r.createElement)("div",c()({ref:i,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...a}},n),t)}},308:function(e,t,a){"use strict";var n=a(0),c=a(1),r=a(293);t.a=e=>{let{id:t="phone",isRequired:a=!1,value:o="",onChange:s}=e;return Object(n.createElement)(r.a,{id:t,type:"tel",autoComplete:"tel",required:a,label:a?Object(c.__)("Phone","woo-gutenberg-products-block"):Object(c.__)("Phone (optional)","woo-gutenberg-products-block"),value:o,onChange:s})}},309:function(e,t,a){"use strict";var n=a(0),c=a(293),r=a(18),o=a.n(r),s=a(84),l=a(1),i=a(25),u=a(5),d=a.n(u),b=a(21),p=a(380),m=a(154),g=a(268),h=a(52);a(275);var O=Object(b.withInstanceId)(e=>{let{id:t,className:a,label:c,onChange:r,options:o,value:s,required:i=!1,errorMessage:u=Object(l.__)("Please select a value.","woo-gutenberg-products-block"),errorId:b,instanceId:O="0",autoComplete:f="off"}=e;const{getValidationError:j,setValidationErrors:E,clearValidationError:v}=Object(m.b)(),k=Object(n.useRef)(null),y=t||"control-"+O,C=b||y,w=j(C)||{message:"",hidden:!1};return Object(n.useEffect)(()=>(!i||s?v(C):E({[C]:{message:u,hidden:!0}}),()=>{v(C)}),[v,s,C,u,i,E]),Object(n.createElement)("div",{id:y,className:d()("wc-block-components-combobox",a,{"is-active":s,"has-error":w.message&&!w.hidden}),ref:k},Object(n.createElement)(p.a,{className:"wc-block-components-combobox-control",label:c,onChange:r,onFilterValueChange:e=>{if(e.length){const t=Object(h.c)(k.current)?k.current.ownerDocument.activeElement:void 0;if(t&&Object(h.c)(k.current)&&k.current.contains(t))return;const a=e.toLocaleUpperCase(),n=o.find(e=>e.label.toLocaleUpperCase().startsWith(a)||e.value.toLocaleUpperCase()===a);n&&r(n.value)}},options:o,value:s||"",allowReset:!1,autoComplete:f,"aria-invalid":w.message&&!w.hidden}),Object(n.createElement)(g.a,{propertyName:C}))});a(274);var f=e=>{let{className:t,countries:a,id:c,label:r,onChange:o,value:s="",autoComplete:u="off",required:b=!1,errorId:p,errorMessage:m=Object(l.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(n.useMemo)(()=>Object.keys(a).map(e=>({value:e,label:Object(i.decodeEntities)(a[e])})),[a]);return Object(n.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(n.createElement)(O,{id:c,label:r,onChange:o,options:g,value:s,errorId:p,errorMessage:m,required:b,autoComplete:u}),"off"!==u&&Object(n.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:u,value:s,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),a=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);o(a?a.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},j=e=>Object(n.createElement)(f,o()({countries:s.g},e)),E=e=>Object(n.createElement)(f,o()({countries:s.a},e));a(276);const v=(e,t)=>{const a=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return a?a.value:""};var k=e=>{let{className:t,id:a,states:r,country:o,label:s,onChange:u,autoComplete:b="off",value:p="",required:m=!1}=e;const g=r[o],h=Object(n.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),f=Object(n.useCallback)(e=>{u(h.length>0?v(e,h):e)},[u,h]),j=Object(n.useRef)(p);return Object(n.useEffect)(()=>{j.current!==p&&(j.current=p)},[p]),Object(n.useEffect)(()=>{if(h.length>0&&j.current){const e=v(j.current,h);e!==j.current&&f(e)}},[h,f]),h.length>0?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(O,{className:d()(t,"wc-block-components-state-input"),id:a,label:s,onChange:f,options:h,value:p,errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:b}),"off"!==b&&Object(n.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:b,value:p,onChange:e=>f(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(n.createElement)(c.a,{className:t,id:a,label:s,onChange:f,autoComplete:b,value:p,required:m})},y=e=>Object(n.createElement)(k,o()({states:s.h},e)),C=e=>Object(n.createElement)(k,o()({states:s.b},e)),w=a(33),N=a(2),_=a(67);t.a=Object(b.withInstanceId)(e=>{let{id:t,fields:a=Object.keys(N.defaultAddressFields),fieldConfig:r={},instanceId:o,onChange:s,type:i="shipping",values:u}=e;const{getValidationError:d,setValidationErrors:b,clearValidationError:p}=Object(m.b)(),g=Object(w.a)(a),h=d("shipping-missing-country")||{},O=Object(n.useMemo)(()=>Object(_.a)(g,r,u.country),[g,r,u.country]);return Object(n.useEffect)(()=>{O.forEach(e=>{e.hidden&&u[e.key]&&s({...u,[e.key]:""})})},[O,s,u]),Object(n.useEffect)(()=>{"shipping"===i&&((e,t,a,n)=>{n||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(l.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),n&&e.country&&a("shipping-missing-country")})(u,b,p,!!h.message&&!h.hidden)},[u,h.message,h.hidden,b,p,i]),t=t||o,Object(n.createElement)("div",{id:t,className:"wc-block-components-address-form"},O.map(e=>{if(e.hidden)return null;if("country"===e.key){const a="shipping"===i?j:E;return Object(n.createElement)(a,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:u.country,autoComplete:e.autocomplete,onChange:e=>s({...u,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const a="shipping"===i?y:C;return Object(n.createElement)(a,{key:e.key,id:`${t}-${e.key}`,country:u.country,label:e.required?e.label:e.optionalLabel,value:u.state,autoComplete:e.autocomplete,onChange:e=>s({...u,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(n.createElement)(c.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:u[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>s({...u,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},37:function(e,t,a){"use strict";var n=a(0),c=a(5),r=a.n(c);t.a=e=>{let t,{label:a,screenReaderLabel:c,wrapperElement:o,wrapperProps:s={}}=e;const l=null!=a,i=null!=c;return!l&&i?(t=o||"span",s={...s,className:r()(s.className,"screen-reader-text")},Object(n.createElement)(t,s,c)):(t=o||n.Fragment,l&&i&&a!==c?Object(n.createElement)(t,s,Object(n.createElement)("span",{"aria-hidden":"true"},a),Object(n.createElement)("span",{className:"screen-reader-text"},c)):Object(n.createElement)(t,s,a))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/billing-address-frontend.js b/build/checkout-blocks/billing-address-frontend.js new file mode 100644 index 00000000000..dca4703cb8e --- /dev/null +++ b/build/checkout-blocks/billing-address-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[32],{383:function(e,t,i){"use strict";i.r(t);var l=i(0),s=i(5),n=i.n(s),o=i(134),d=i(281),c=i(41),r=i(306),a=i(42),b=i(28),u=i(309),h=i(307),p=i(308),m=e=>{let{showCompanyField:t=!1,showApartmentField:i=!1,showPhoneField:s=!1,requireCompanyField:n=!1,requirePhoneField:o=!1}=e;const{defaultAddressFields:d,billingFields:c,setBillingFields:m,setPhone:w}=Object(r.a)(),{dispatchCheckoutEvent:F}=Object(a.a)(),{isEditor:g}=Object(b.a)();Object(l.useEffect)(()=>{s||w("")},[s,w]);const j=Object(l.useMemo)(()=>({company:{hidden:!t,required:n},address_2:{hidden:!i}}),[t,n,i]),O=g?h.a:l.Fragment;return Object(l.createElement)(O,null,Object(l.createElement)(u.a,{id:"billing",type:"billing",onChange:e=>{m(e),F("set-billing-address")},values:c,fields:Object.keys(d),fieldConfig:j}),s&&Object(l.createElement)(p.a,{isRequired:o,value:c.phone,onChange:e=>{w(e),F("set-phone-number",{step:"billing"})}}))},w=i(1),F=i(267),g={...Object(F.a)({defaultTitle:Object(w.__)("Billing address","woo-gutenberg-products-block"),defaultDescription:Object(w.__)("Enter the address that matches your card or payment method.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},j=i(158);t.default=Object(o.withFilteredAttributes)(g)(e=>{let{title:t,description:i,showStepNumber:s,children:o,className:a}=e;const{isProcessing:b}=Object(c.b)(),{showBillingFields:u}=Object(r.a)(),{requireCompanyField:h,requirePhoneField:p,showApartmentField:w,showCompanyField:F,showPhoneField:g}=Object(j.b)();return u?Object(l.createElement)(d.a,{id:"billing-fields",disabled:b,className:n()("wc-block-checkout__billing-fields",a),title:t,description:i,showStepNumber:s},Object(l.createElement)(m,{requireCompanyField:h,showApartmentField:w,showCompanyField:F,showPhoneField:g,requirePhoneField:p}),o):null})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/contact-information-frontend.js b/build/checkout-blocks/contact-information-frontend.js new file mode 100644 index 00000000000..54fd3bd0f99 --- /dev/null +++ b/build/checkout-blocks/contact-information-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[33],{259:function(e,t){},261:function(e,t,c){"use strict";var n=c(18),a=c.n(n),l=c(0),r=c(5),s=c.n(r);c(8),c(262),t.a=e=>{let{children:t,className:c,headingLevel:n,...r}=e;const o=s()("wc-block-components-title",c),i="h"+n;return Object(l.createElement)(i,a()({className:o},r),t)}},262:function(e,t){},264:function(e,t){},266:function(e,t){},267:function(e,t,c){"use strict";var n=c(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:a=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:a}}}},268:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var n=c(0),a=(c(8),c(154));c(259);const l=e=>{let{errorMessage:t="",propertyName:c="",elementId:l=""}=e;const{getValidationError:r,getValidationErrorId:s}=Object(a.b)();if(!t||"string"!=typeof t){const e=r(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:s(l)},t))}},281:function(e,t,c){"use strict";var n=c(0),a=c(5),l=c.n(a),r=c(261);c(266);const s=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(r.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:a,legend:r,description:o,children:i,disabled:u=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const p=r||a?"fieldset":"div";return Object(n.createElement)(p,{className:l()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":u}),id:t,disabled:u},!(!r&&!a)&&Object(n.createElement)("legend",{className:"screen-reader-text"},r||a),!!a&&Object(n.createElement)(s,{title:a,stepHeadingContent:b()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!o&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},o),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},293:function(e,t,c){"use strict";var n=c(18),a=c.n(n),l=c(0),r=c(1),s=c(3),o=c(5),i=c.n(o),u=c(154),d=c(41),b=c(268),p=c(21),m=c(52),g=c(37);c(264);var h=Object(s.forwardRef)((e,t)=>{let{className:c,id:n,type:r="text",ariaLabel:s,ariaDescribedBy:o,label:u,screenReaderLabel:d,disabled:b,help:p,autoCapitalize:m="off",autoComplete:h="off",value:O="",onChange:j,required:f=!1,onBlur:k=(()=>{}),feedback:w,...E}=e;const[v,_]=Object(l.useState)(!1);return Object(l.createElement)("div",{className:i()("wc-block-components-text-input",c,{"is-active":v||O})},Object(l.createElement)("input",a()({type:r,id:n,value:O,ref:t,autoCapitalize:m,autoComplete:h,onChange:e=>{j(e.target.value)},onFocus:()=>_(!0),onBlur:e=>{k(e.target.value),_(!1)},"aria-label":s||u,disabled:b,"aria-describedby":p&&!o?n+"__help":o,required:f},E)),Object(l.createElement)(g.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:n},htmlFor:n}),!!p&&Object(l.createElement)("p",{id:n+"__help",className:"wc-block-components-text-input__help"},p),w)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:c,id:n,ariaDescribedBy:o,errorId:p,validateOnMount:g=!0,focusOnMount:O=!1,onChange:j,showError:f=!0,errorMessage:k="",...w}=e;const[E,v]=Object(s.useState)(!0),_=Object(s.useRef)(null),{getValidationError:C,hideValidationError:N,setValidationErrors:S,clearValidationError:y,getValidationErrorId:A}=Object(u.b)(),{isBeforeProcessing:B}=Object(d.b)(),F=void 0!==n?n:"textinput-"+c,I=void 0!==p?p:F,x=Object(s.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=_.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?y(I):S({[I]:{message:t.validationMessage||Object(r.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[y,I,S]);Object(s.useEffect)(()=>{var e;E&&(O&&(null===(e=_.current)||void 0===e||e.focus()),v(!1))},[O,E,v]),Object(s.useEffect)(()=>{E&&(g&&x(),v(!1))},[E,v,g,x]),Object(s.useEffect)(()=>{B&&x()},[B,x]),Object(s.useEffect)(()=>()=>{y(I)},[y,I]);const R=C(I)||{};Object(m.d)(k)&&""!==k&&(R.message=k);const L=R.message&&!R.hidden,V=f&&L&&A(I)?A(I):o;return Object(l.createElement)(h,a()({className:i()(t,{"has-error":L}),"aria-invalid":!0===L,id:F,onBlur:()=>{x(!1)},feedback:f&&Object(l.createElement)(b.a,{errorMessage:k,propertyName:I}),ref:_,onChange:e=>{N(I),j(e)},ariaDescribedBy:V},w))})},306:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(2),a=c(0),l=c(51),r=c(45);const s=()=>{const{needsShipping:e}=Object(l.b)(),{billingData:t,setBillingData:c,shippingAddress:s,setShippingAddress:o,shippingAsBilling:i,setShippingAsBilling:u}=Object(r.b)(),d=Object(a.useRef)(i),b=Object(a.useRef)(t),p=Object(a.useCallback)(e=>{o(e),i&&c(e)},[i,o,c]),m=Object(a.useCallback)(t=>{c(t),e||o(t)},[e,o,c]);Object(a.useEffect)(()=>{if(d.current!==i){if(i)b.current=t,c(s);else{const{email:e,...t}=b.current;c({...t})}d.current=i}},[i,c,s,t]);const g=Object(a.useCallback)(e=>{c({email:e})},[c]),h=Object(a.useCallback)(e=>{c({phone:e})},[c]),O=Object(a.useCallback)(e=>{p({phone:e})},[p]);return{defaultAddressFields:n.defaultAddressFields,shippingFields:s,setShippingFields:p,billingFields:t,setBillingFields:m,setEmail:g,setPhone:h,setShippingPhone:O,shippingAsBilling:i,setShippingAsBilling:u,showShippingFields:e,showBillingFields:!e||!d.current}}},37:function(e,t,c){"use strict";var n=c(0),a=c(5),l=c.n(a);t.a=e=>{let t,{label:c,screenReaderLabel:a,wrapperElement:r,wrapperProps:s={}}=e;const o=null!=c,i=null!=a;return!o&&i?(t=r||"span",s={...s,className:l()(s.className,"screen-reader-text")},Object(n.createElement)(t,s,a)):(t=r||n.Fragment,o&&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))}},379:function(e,t,c){"use strict";c.r(t);var n=c(0),a=c(5),l=c.n(a),r=c(134),s=c(281),o=c(41),i=c(1),u=c(293),d=c(306),b=c(42),p=c(2),m=c(22),g=e=>{let{allowCreateAccount:t}=e;const{customerId:c,shouldCreateAccount:a,setShouldCreateAccount:l}=Object(o.b)(),{billingFields:r,setEmail:s}=Object(d.a)(),{dispatchCheckoutEvent:g}=Object(b.a)(),h=!c&&t&&Object(p.getSetting)("checkoutAllowsGuest",!1)&&Object(p.getSetting)("checkoutAllowsSignup",!1)&&Object(n.createElement)(m.CheckboxControl,{className:"wc-block-checkout__create-account",label:Object(i.__)("Create an account?","woo-gutenberg-products-block"),checked:a,onChange:e=>l(e)});return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{id:"email",type:"email",label:Object(i.__)("Email address","woo-gutenberg-products-block"),value:r.email,autoComplete:"email",onChange:e=>{s(e),g("set-email-address")},required:!0}),h)},h=c(267),O={...Object(h.a)({defaultTitle:Object(i.__)("Contact information","woo-gutenberg-products-block"),defaultDescription:Object(i.__)("We'll use this email to send you details and updates about your order.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{remove:!0,move:!0}}};const j=`${c(84).e}?redirect_to=${encodeURIComponent(window.location.href)}`;var f=()=>{const{customerId:e}=Object(o.b)();return!Object(p.getSetting)("checkoutShowLoginReminder",!0)||e?null:Object(n.createElement)(n.Fragment,null,Object(i.__)("Already have an account? ","woo-gutenberg-products-block"),Object(n.createElement)("a",{href:j},Object(i.__)("Log in.","woo-gutenberg-products-block")))},k=c(158);t.default=Object(r.withFilteredAttributes)(O)(e=>{let{title:t,description:c,showStepNumber:a,children:r,className:i}=e;const{isProcessing:u}=Object(o.b)(),{allowCreateAccount:d}=Object(k.b)();return Object(n.createElement)(s.a,{id:"contact-fields",disabled:u,className:l()("wc-block-checkout__contact-fields",i),title:t,description:c,showStepNumber:a,stepHeadingContent:()=>Object(n.createElement)(f,null)},Object(n.createElement)(g,{allowCreateAccount:d}),r)})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/express-payment-frontend.js b/build/checkout-blocks/express-payment-frontend.js new file mode 100644 index 00000000000..146b036bce8 --- /dev/null +++ b/build/checkout-blocks/express-payment-frontend.js @@ -0,0 +1,5 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[34],{101:function(e,t,n){},106:function(e,t,n){"use strict";var c=n(0);n(135),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},135:function(e,t){},153:function(e,t,n){"use strict";var c=n(0),s=n(1),o=(n(8),n(5)),r=n.n(o),a=(n(189),n(106));t.a=e=>{let{children:t,className:n,screenReaderLabel:o,showSpinner:i=!1,isLoading:l=!0}=e;return Object(c.createElement)("div",{className:r()(n,{"wc-block-components-loading-mask":l})},l&&i&&Object(c.createElement)(a.a,null),Object(c.createElement)("div",{className:r()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(c.createElement)("span",{className:"screen-reader-text"},o||Object(s.__)("Loading…","woo-gutenberg-products-block")))}},155:function(e,t,n){"use strict";var c=n(18),s=n.n(c),o=n(0),r=n(5),a=n.n(r);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:n=null,alt:c=""}=e;return n?Object(o.createElement)("img",{className:i(t),src:n,alt:c}):null},p=n(84);const u=[{id:"alipay",alt:"Alipay",src:p.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:p.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:p.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:p.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:p.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:p.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:p.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:p.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:p.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:p.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:p.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:p.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:p.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:p.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:p.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:p.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:p.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:p.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:p.l+"payment-methods/wechat.svg"}];var d=n(52);n(190),t.a=e=>{let{icons:t=[],align:n="center",className:c}=e;const r=(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(d.d)(n.id)&&!t[n.id]&&(t[n.id]=n)}),Object.values(t)})(t);if(0===r.length)return null;const i=a()("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},c);return Object(o.createElement)("div",{className:i},r.map(e=>{const t={...e,...(n=e.id,u.find(e=>e.id===n)||{})};var n;return Object(o.createElement)(l,s()({key:"payment-method-icon-"+e.id},t))}))}},189:function(e,t){},190:function(e,t){},246:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var c=n(33),s=n(147);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:r}=Object(s.b)(),a=Object(c.a)(t),i=Object(c.a)(n);return{paymentMethods:e?i:a,isInitialized:e?r:o}},r=()=>o(!1),a=()=>o(!0)},259:function(e,t){},261:function(e,t,n){"use strict";var c=n(18),s=n.n(c),o=n(0),r=n(5),a=n.n(r);n(8),n(262),t.a=e=>{let{children:t,className:n,headingLevel:c,...r}=e;const i=a()("wc-block-components-title",n),l="h"+c;return Object(o.createElement)(l,s()({className:i},r),t)}},262:function(e,t){},268:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var c=n(0),s=(n(8),n(154));n(259);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:r,getValidationErrorId:a}=Object(s.b)();if(!t||"string"!=typeof t){const e=r(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(c.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(c.createElement)("p",{id:a(o)},t))}},271:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var c=n(1),s=n(9),o=n(6),r=n(25),a=n(26),i=n(0),l=n(241),p=n(154),u=n(39);const d=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(a.a)(),{addErrorNotice:n}=Object(u.a)(),{addSnackbarNotice:d}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:n,setIsSuppressed:c}=Object(l.b)(),s=Object(i.useRef)(e);Object(i.useEffect)(()=>{s.current=e},[e]);const o=Object(i.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeSnackbarNotice:n}),[n]),r=Object(i.useMemo)(()=>({addSnackbarNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,n)}}),[t]);return{notices:e,...o,...r,setIsSuppressed:c}})(),{setValidationErrors:m}=Object(p.b)();return{appliedCoupons:e,isLoading:t,...Object(s.useSelect)((e,t)=>{let{dispatch:s}=t;const a=e(o.CART_STORE_KEY),i=a.isApplyingCoupon(),l=a.isRemovingCoupon(),{applyCoupon:p,removeCoupon:u,receiveApplyingCoupon:b}=s(o.CART_STORE_KEY);return{applyCoupon:e=>{p(e).then(t=>{!0===t&&d(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{m({coupon:{message:Object(r.decodeEntities)(e.message),hidden:!1}}),b("")})},removeCoupon:e=>{u(e).then(t=>{!0===t&&d(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{n(e.message,{id:"coupon-form"}),b("")})},isApplyingCoupon:i,isRemovingCoupon:l}},[n,d])}}},278:function(e,t){},279:function(e,t,n){"use strict";var c=n(29),s=n.n(c),o=n(0),r=n(1),a=n(3),i=(n(8),n(2)),l=n(101);class p extends a.Component{constructor(){super(...arguments),s()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:n}=this.props;if(e){let e=Object(r.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(n||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(r.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const c=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.StoreNoticesContainer,{notices:c})}return this.props.children}}p.defaultProps={isEditor:!1},t.a=p},291:function(e,t){},292:function(e,t,n){"use strict";var c=n(0),s=n(1),o=n(310),r=n(246),a=n(28),i=n(147),l=n(40),p=n.n(l),u=n(279);t.a=()=>{const{isEditor:e}=Object(a.a)(),{setActivePaymentMethod:t,setExpressPaymentError:n,activePaymentMethod:l,paymentMethodData:d,setPaymentStatus:m}=Object(i.b)(),b=Object(o.a)(),{paymentMethods:h}=Object(r.a)(),g=Object(c.useRef)(l),v=Object(c.useRef)(d),j=Object(c.useCallback)(e=>()=>{g.current=l,v.current=d,m().started({}),t(e)},[l,d,t,m]),O=Object(c.useCallback)(()=>{m().pristine(),t(g.current),v.current.isSavedToken&&m().started(v.current)},[t,m]),y=Object(c.useCallback)(e=>{m().error(e),n(e),t(g.current),v.current.isSavedToken&&m().started(v.current)},[t,m,n]),E=Object(c.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";p()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?y(e):n("")}),[n,y]),f=Object.entries(h),k=f.length>0?f.map(t=>{let[n,s]=t;const o=e?s.edit:s.content;return Object(c.isValidElement)(o)?Object(c.createElement)("li",{key:n,id:"express-payment-method-"+n},Object(c.cloneElement)(o,{...b,onClick:j(n),onClose:O,onError:y,setExpressPaymentError:E})):null}):Object(c.createElement)("li",{key:"noneRegistered"},Object(s.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(c.createElement)(u.a,{isEditor:e},Object(c.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},k))}},305:function(e,t,n){"use strict";var c=n(0),s=n(32);const o=Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{fill:"currentColor",d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},310:function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var c=n(1),s=n(48),o=n(0),r=n(5),a=n.n(r),i=n(32),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),p=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"})),u=n(305),d=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(o.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),m=n(108),b=n(52);n(278);const h={bank:l,bill:p,card:u.a,checkPayment:d};var g=e=>{let{icon:t="",text:n=""}=e;const c=!!t,s=Object(o.useCallback)(e=>c&&Object(b.d)(e)&&Object(b.e)(h,e),[c]),r=a()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":c});return Object(o.createElement)("span",{className:r},s(t)?Object(o.createElement)(m.a,{srcElement:h[t]}):t,n)},v=n(155),j=n(2),O=n(40),y=n.n(O),E=n(153),f=n(268),k=n(26),w=n(271),S=n(31),_=n(41),C=n(147),P=n(51),x=n(45);const M=(e,t)=>{const n=[],s=(t,n)=>{const c=n+"_tax",s=Object(b.e)(e,n)&&Object(b.d)(e[n])?parseInt(e[n],10):0;return{key:n,label:t,value:s,valueWithTax:s+(Object(b.e)(e,c)&&Object(b.d)(e[c])?parseInt(e[c],10):0)}};return n.push(s(Object(c.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(s(Object(c.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(s(Object(c.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({key:"total_tax",label:Object(c.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(s(Object(c.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n},R=()=>{const{isCalculating:e,isComplete:t,isIdle:n,isProcessing:r,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:p,onSubmit:u,customerId:d}=Object(_.b)(),{currentStatus:m,activePaymentMethod:b,onPaymentProcessing:h,setExpressPaymentError:O,shouldSavePayment:R}=Object(C.b)(),{shippingErrorStatus:N,shippingErrorTypes:I,shippingRates:z,shippingRatesLoading:T,selectedRates:V,setSelectedRates:A,isSelectingRate:H,onShippingRateSuccess:L,onShippingRateFail:B,onShippingRateSelectSuccess:D,onShippingRateSelectFail:W,needsShipping:F}=Object(P.b)(),{billingData:G,shippingAddress:U,setShippingAddress:Y}=Object(x.b)(),{cartTotals:J}=Object(k.a)(),{appliedCoupons:K}=Object(w.a)(),{noticeContexts:X,responseTypes:q}=Object(S.c)(),Q=Object(o.useRef)(M(J,F)),Z=Object(o.useRef)({label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)});Object(o.useEffect)(()=>{Q.current=M(J,F),Z.current={label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)}},[J,F]);const $=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";y()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),O(e)}),[O]);return{activePaymentMethod:b,billing:{billingData:G,cartTotal:Z.current,currency:Object(s.getCurrencyFromPriceResponse)(J),cartTotalItems:Q.current,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1),appliedCoupons:K,customerId:d},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:n,isProcessing:r},components:{ValidationInputError:f.a,PaymentMethodIcons:v.a,PaymentMethodLabel:g,LoadingMask:E.a},emitResponse:{noticeContexts:X,responseTypes:q},eventRegistration:{onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:p,onShippingRateSuccess:L,onShippingRateFail:B,onShippingRateSelectSuccess:D,onShippingRateSelectFail:W,onPaymentProcessing:h},onSubmit:u,paymentStatus:m,setExpressPaymentError:$,shippingData:{shippingRates:z,shippingRatesLoading:T,selectedRates:V,setSelectedRates:A,isSelectingRate:H,shippingAddress:U,setShippingAddress:Y,needsShipping:F},shippingStatus:{shippingErrorStatus:N,shippingErrorTypes:I},shouldSavePayment:R}}},391:function(e,t,n){"use strict";n.r(t);var c=n(0),s=n(26),o=n(1),r=n(246),a=n(31),i=n(41),l=n(147),p=n(28),u=n(80),d=n(261),m=n(153),b=n(2),h=n(292);n(291);var g=()=>{const{isCalculating:e,isProcessing:t,isAfterProcessing:n,isBeforeProcessing:s,isComplete:g,hasError:v}=Object(i.b)(),{currentStatus:j}=Object(l.b)(),{paymentMethods:O,isInitialized:y}=Object(r.a)(),{isEditor:E}=Object(p.a)(),{noticeContexts:f}=Object(a.c)();if(!y||y&&0===Object.keys(O).length)return E||b.CURRENT_USER_IS_ADMIN?Object(c.createElement)(u.a,{context:f.EXPRESS_PAYMENTS}):null;const k=t||n||s||g&&!v;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.a,{isLoading:e||k||j.isDoingExpressPayment},Object(c.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},Object(c.createElement)("div",{className:"wc-block-components-express-payment__title-container"},Object(c.createElement)(d.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(o.__)("Express checkout","woo-gutenberg-products-block"))),Object(c.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(c.createElement)(u.a,{context:f.EXPRESS_PAYMENTS},Object(c.createElement)("p",null,Object(o.__)("In a hurry? Use one of our express checkout options:","woo-gutenberg-products-block")),Object(c.createElement)(h.a,null))))),Object(c.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(o.__)("Or continue below","woo-gutenberg-products-block")))};t.default=e=>{let{className:t}=e;const{cartNeedsPayment:n}=Object(s.a)();return n?Object(c.createElement)("div",{className:t},Object(c.createElement)(g,null)):null}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/fields-frontend.js b/build/checkout-blocks/fields-frontend.js new file mode 100644 index 00000000000..4f8fca7195c --- /dev/null +++ b/build/checkout-blocks/fields-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[35],{332:function(c,e,t){"use strict";var n=t(0),o=t(3),a=t(5),s=t.n(a);const r=Object(o.forwardRef)((c,e)=>{let{children:t,className:o=""}=c;return Object(n.createElement)("div",{ref:e,className:s()("wc-block-components-main",o)},t)});e.a=r},344:function(c,e){},372:function(c,e,t){"use strict";t.r(e);var n=t(0),o=t(5),a=t.n(o),s=t(332);t(344),e.default=c=>{let{children:e,className:t}=c;return Object(n.createElement)(s.a,{className:a()("wc-block-checkout__main",t)},Object(n.createElement)("form",{className:"wc-block-components-form wc-block-checkout__form"},e))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/order-note-frontend.js b/build/checkout-blocks/order-note-frontend.js new file mode 100644 index 00000000000..77f755dbf8f --- /dev/null +++ b/build/checkout-blocks/order-note-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[36],{261:function(e,t,c){"use strict";var n=c(18),o=c.n(n),a=c(0),s=c(5),l=c.n(s);c(8),c(262),t.a=e=>{let{children:t,className:c,headingLevel:n,...s}=e;const r=l()("wc-block-components-title",c),d="h"+n;return Object(a.createElement)(d,o()({className:r},s),t)}},262:function(e,t){},266:function(e,t){},281:function(e,t,c){"use strict";var n=c(0),o=c(5),a=c.n(o),s=c(261);c(266);const l=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(s.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:o,legend:s,description:r,children:d,disabled:i=!1,showStepNumber:b=!0,stepHeadingContent:u=(()=>{})}=e;const p=s||o?"fieldset":"div";return Object(n.createElement)(p,{className:a()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":b,"wc-block-components-checkout-step--disabled":i}),id:t,disabled:i},!(!s&&!o)&&Object(n.createElement)("legend",{className:"screen-reader-text"},s||o),!!o&&Object(n.createElement)(l,{title:o,stepHeadingContent:u()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!r&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},r),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},d)))}},348:function(e,t){},349:function(e,t){},384:function(e,t,c){"use strict";c.r(t);var n=c(0),o=c(5),a=c.n(o),s=c(1),l=c(281),r=c(51),d=c(41),i=c(22),b=c(8),u=c.n(b);c(349);var p=e=>{let{className:t="",disabled:c=!1,onTextChange:o,placeholder:s,value:l=""}=e;return Object(n.createElement)("textarea",{className:a()("wc-block-components-textarea",t),disabled:c,onChange:e=>{o(e.target.value)},placeholder:s,rows:2,value:l})};c(348),p.propTypes={onTextChange:u.a.func.isRequired,disabled:u.a.bool,placeholder:u.a.string,value:u.a.string};var m=e=>{let{disabled:t,onChange:c,placeholder:o,value:a}=e;const[l,r]=Object(n.useState)(!1),[d,b]=Object(n.useState)("");return Object(n.createElement)("div",{className:"wc-block-checkout__add-note"},Object(n.createElement)(i.CheckboxControl,{disabled:t,label:Object(s.__)("Add a note to your order","woo-gutenberg-products-block"),checked:l,onChange:e=>{r(e),e?a!==d&&c(d):(c(""),b(a))}}),l&&Object(n.createElement)(p,{disabled:t,onTextChange:c,placeholder:o,value:a}))};t.default=e=>{let{className:t}=e;const{needsShipping:c}=Object(r.b)(),{isProcessing:o,orderNotes:i,dispatchActions:b}=Object(d.b)(),{setOrderNotes:u}=b;return Object(n.createElement)(l.a,{id:"order-notes",showStepNumber:!1,className:a()("wc-block-checkout__order-notes",t),disabled:o},Object(n.createElement)(m,{disabled:o,onChange:u,placeholder:c?Object(s.__)("Notes about your order, e.g. special notes for delivery.","woo-gutenberg-products-block"):Object(s.__)("Notes about your order.","woo-gutenberg-products-block"),value:i}))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/order-summary-frontend.js b/build/checkout-blocks/order-summary-frontend.js new file mode 100644 index 00000000000..238ee0d64e2 --- /dev/null +++ b/build/checkout-blocks/order-summary-frontend.js @@ -0,0 +1,31 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[37],{104:function(e,t,c){"use strict";var n=c(0),a=c(5),r=c.n(a);c(194),t.a=e=>{let{children:t,className:c}=e;return Object(n.createElement)("div",{className:r()("wc-block-components-product-badge",c)},t)}},106:function(e,t,c){"use strict";var n=c(0);c(135),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},135:function(e,t){},136:function(e,t){},137:function(e,t,c){"use strict";var n=c(18),a=c.n(n),r=c(0),o=c(62),s=c(5),l=c.n(s),i=c(106);c(188),t.a=e=>{let{className:t,showSpinner:c=!1,children:n,...s}=e;const p=l()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(r.createElement)(o.a,a()({className:p},s),c&&Object(r.createElement)(i.a,null),Object(r.createElement)("span",{className:"wc-block-components-button__text"},n))}},138:function(e,t){},139:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(66),o=c(5),s=c.n(o),l=c(48);c(192);const i=e=>{let{currency:t,maxPrice:c,minPrice:o,priceClassName:i,priceStyle:p}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(a.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(l.formatPrice)(o),Object(l.formatPrice)(c))),Object(n.createElement)("span",{"aria-hidden":!0},Object(n.createElement)(r.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:o,style:p})," — ",Object(n.createElement)(r.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:c,style:p})))},p=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:o,regularPrice:l,priceClassName:i,priceStyle:p,price:u}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(n.createElement)(r.a,{currency:t,renderText:e=>Object(n.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:o},e),value:l}),Object(n.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(n.createElement)(r.a,{currency:t,renderText:e=>Object(n.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",i),style:p},e),value:u}))};t.a=e=>{let{align:t,className:c,currency:a,format:o="",maxPrice:l,minPrice:u,price:b,priceClassName:m,priceStyle:d,regularPrice:g,regularPriceClassName:O,regularPriceStyle:j}=e;const h=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});o.includes("")||(o="",console.error("Price formats need to include the `` tag."));const _=g&&b!==g;let E=Object(n.createElement)("span",{className:s()("wc-block-components-product-price__value",m)});return _?E=Object(n.createElement)(p,{currency:a,price:b,priceClassName:m,priceStyle:d,regularPrice:g,regularPriceClassName:O,regularPriceStyle:j}):void 0!==u&&void 0!==l?E=Object(n.createElement)(i,{currency:a,maxPrice:l,minPrice:u,priceClassName:m,priceStyle:d}):b&&(E=Object(n.createElement)(r.a,{className:s()("wc-block-components-product-price__value",m),currency:a,value:b,style:d})),Object(n.createElement)("span",{className:h},Object(n.createInterpolateElement)(o,{price:E}))}},153:function(e,t,c){"use strict";var n=c(0),a=c(1),r=(c(8),c(5)),o=c.n(r),s=(c(189),c(106));t.a=e=>{let{children:t,className:c,screenReaderLabel:r,showSpinner:l=!1,isLoading:i=!0}=e;return Object(n.createElement)("div",{className:o()(c,{"wc-block-components-loading-mask":i})},i&&l&&Object(n.createElement)(s.a,null),Object(n.createElement)("div",{className:o()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},t),i&&Object(n.createElement)("span",{className:"screen-reader-text"},r||Object(a.__)("Loading…","woo-gutenberg-products-block")))}},156:function(e,t,c){"use strict";var n=c(18),a=c.n(n),r=c(0),o=c(25),s=c(5),l=c.n(s);c(191),t.a=e=>{let{className:t="",disabled:c=!1,name:n,permalink:s="",rel:i,style:p,onClick:u,...b}=e;const m=l()("wc-block-components-product-name",t);if(c){const e=b;return Object(r.createElement)("span",a()({className:m},e,{dangerouslySetInnerHTML:{__html:Object(o.decodeEntities)(n)}}))}return Object(r.createElement)("a",a()({className:m,href:s,rel:i},b,{dangerouslySetInnerHTML:{__html:Object(o.decodeEntities)(n)},style:p}))}},157:function(e,t,c){"use strict";var n=c(0),a=c(102),r=c(86);const o=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const n=s(e),a=n.split(" ").splice(0,t).join(" ");return Object(r.autop)(l(a,c))},p=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const a=s(e),o=a.slice(0,t);if(c)return Object(r.autop)(l(o,n));const i=o.match(/([\s]+)/g),p=i?i.length:0,u=a.slice(0,t+p);return Object(r.autop)(l(u,n))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:l=""}=e;const u=Object(n.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const n=Object(r.autop)(e),s=Object(a.count)(n,c);if(s<=t)return n;const l=o(n),u=Object(a.count)(l,c);return u<=t?l:"words"===c?i(l,t):p(l,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(n.createElement)(n.RawHTML,{className:l},u)}},188:function(e,t){},189:function(e,t){},191:function(e,t){},192:function(e,t){},193:function(e,t){},194:function(e,t){},195:function(e,t){},196:function(e,t){},198:function(e,t,c){"use strict";var n=c(18),a=c.n(n),r=c(0),o=c(32);const s=Object(r.createElement)(e=>{let{className:t,size:c,...n}=e;return Object(r.createElement)(o.SVG,a()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},n),Object(r.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=s},203:function(e,t,c){"use strict";var n=c(18),a=c.n(n),r=c(0),o=c(5),s=c.n(o),l=c(1),i=c(108),p=c(198);c(138);var u=e=>{let{text:t,screenReaderText:c="",element:n="li",className:o="",radius:l="small",children:i=null,...p}=e;const u=n,b=s()(o,"wc-block-components-chip","wc-block-components-chip--radius-"+l),m=Boolean(c&&c!==t);return Object(r.createElement)(u,a()({className:b},p),Object(r.createElement)("span",{"aria-hidden":m,className:"wc-block-components-chip__text"},t),m&&Object(r.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:n=!1,onRemove:o=(()=>{}),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","woo-gutenberg-products-block"):Object(l.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const j={"aria-label":t,disabled:n,onClick:o,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||o()}},h=b?j:{},_=b?{"aria-hidden":!0}:j;return Object(r.createElement)(u,a()({},g,h,{className:s()(c,"is-removable"),element:b?"button":g.element,screenReaderText:d,text:m}),Object(r.createElement)(O,a()({className:"wc-block-components-chip__remove"},_),Object(r.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},249:function(e,t,c){"use strict";var n=c(18),a=c.n(n),r=c(0),o=c(25),s=c(2);c(193),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const n=t.thumbnail?{src:t.thumbnail,alt:Object(o.decodeEntities)(t.alt)||c||"Product Image"}:{src:s.PLACEHOLDER_IMG_SRC,alt:""};return Object(r.createElement)("img",a()({className:"wc-block-components-product-image"},n,{alt:n.alt}))}},250:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(104);t.a=()=>Object(n.createElement)(r.a,{className:"wc-block-components-product-backorder-badge"},Object(a.__)("Available on backorder","woo-gutenberg-products-block"))},251:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(104);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(n.createElement)(r.a,{className:"wc-block-components-product-low-stock-badge"},Object(a.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(a.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},252:function(e,t,c){"use strict";var n=c(0),a=c(4),r=c(25);c(196);var o=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(n.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(a.kebabCase)(t):"";return Object(n.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"wc-block-components-product-details__name"},Object(r.decodeEntities)(t),":")," "),Object(n.createElement)("span",{className:"wc-block-components-product-details__value"},Object(r.decodeEntities)(e.display||e.value)))}))):null},s=c(157),l=c(84),i=e=>{let{className:t,shortDescription:c="",fullDescription:a=""}=e;const r=c||a;return r?Object(n.createElement)(s.a,{className:t,source:r,maxLength:15,countType:l.n.wordCountType||"words"}):null};c(195),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:a=[],variation:r=[]}=e;return Object(n.createElement)("div",{className:"wc-block-components-product-metadata"},Object(n.createElement)(i,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(n.createElement)(o,{details:a}),Object(n.createElement)(o,{details:r.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},259:function(e,t){},260:function(e,t,c){"use strict";var n=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:a,secondaryDescription:r,id:o}=e;return Object(n.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(n.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(n.createElement)("span",{id:o&&o+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(n.createElement)("span",{id:o&&o+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(n.createElement)("div",{className:"wc-block-components-radio-control__description-group"},a&&Object(n.createElement)("span",{id:o&&o+"__description",className:"wc-block-components-radio-control__description"},a),r&&Object(n.createElement)("span",{id:o&&o+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},r)))}},263:function(e,t,c){"use strict";var n=c(0),a=c(5),r=c.n(a),o=c(260);t.a=e=>{let{checked:t,name:c,onChange:a,option:s}=e;const{value:l,label:i,description:p,secondaryLabel:u,secondaryDescription:b}=s;return Object(n.createElement)("label",{className:r()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${l}`},Object(n.createElement)("input",{id:`${c}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:e=>a(e.target.value),checked:t,"aria-describedby":r()({[`${c}-${l}__label`]:i,[`${c}-${l}__secondary-label`]:u,[`${c}-${l}__description`]:p,[`${c}-${l}__secondary-description`]:b})}),Object(n.createElement)(o.a,{id:`${c}-${l}`,label:i,secondaryLabel:u,description:p,secondaryDescription:b}))}},264:function(e,t){},268:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0),a=(c(8),c(154));c(259);const r=e=>{let{errorMessage:t="",propertyName:c="",elementId:r=""}=e;const{getValidationError:o,getValidationErrorId:s}=Object(a.b)();if(!t||"string"!=typeof t){const e=o(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:s(r)},t))}},269:function(e,t,c){"use strict";var n=c(0),a=c(5),r=c.n(a),o=c(21),s=c(263);c(270),t.a=Object(o.withInstanceId)(e=>{let{className:t,instanceId:c,id:a,selected:o,onChange:l,options:i=[]}=e;const p=a||c;return i.length&&Object(n.createElement)("div",{className:r()("wc-block-components-radio-control",t)},i.map(e=>Object(n.createElement)(s.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===o,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},270:function(e,t){},271:function(e,t,c){"use strict";c.d(t,"a",(function(){return b}));var n=c(1),a=c(9),r=c(6),o=c(25),s=c(26),l=c(0),i=c(241),p=c(154),u=c(39);const b=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(s.a)(),{addErrorNotice:c}=Object(u.a)(),{addSnackbarNotice:b}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:n}=Object(i.b)(),a=Object(l.useRef)(e);Object(l.useEffect)(()=>{a.current=e},[e]);const r=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),o=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...r,...o,setIsSuppressed:n}})(),{setValidationErrors:m}=Object(p.b)();return{appliedCoupons:e,isLoading:t,...Object(a.useSelect)((e,t)=>{let{dispatch:a}=t;const s=e(r.CART_STORE_KEY),l=s.isApplyingCoupon(),i=s.isRemovingCoupon(),{applyCoupon:p,removeCoupon:u,receiveApplyingCoupon:d}=a(r.CART_STORE_KEY);return{applyCoupon:e=>{p(e).then(t=>{!0===t&&b(Object(n.sprintf)( +/* translators: %s coupon code. */ +Object(n.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{m({coupon:{message:Object(o.decodeEntities)(e.message),hidden:!1}}),d("")})},removeCoupon:e=>{u(e).then(t=>{!0===t&&b(Object(n.sprintf)( +/* translators: %s coupon code. */ +Object(n.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{c(e.message,{id:"coupon-form"}),d("")})},isApplyingCoupon:l,isRemovingCoupon:i}},[c,b])}}},273:function(e,t){},274:function(e,t){},275:function(e,t){},276:function(e,t){},277:function(e,t){},282:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(27),o=c(153),s=c(22),l=c(304),i=c(26),p=c(28),u=c(5),b=c.n(u),m=c(25),d=c(37),g=c(17),O=c.n(g),j=c(95),h=c(42);const _=e=>{var t;return null===(t=e.find(e=>e.selected))||void 0===t?void 0:t.rate_id};var E=c(269),f=c(260),k=c(48),v=c(66),y=c(2);const w=e=>{const t=Object(y.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(m.decodeEntities)(e.name),value:e.rate_id,description:Object(n.createElement)(n.Fragment,null,Number.isFinite(t)&&Object(n.createElement)(v.a,{currency:Object(k.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(m.decodeEntities)(e.delivery_time))}};var N=e=>{let{className:t,noResultsMessage:c,onSelectRate:a,rates:r,renderOption:o=w,selected:s}=e;if(0===r.length)return c;if(r.length>1)return Object(n.createElement)(E.a,{className:t,onChange:e=>{a(e)},selected:s,options:r.map(o)});const{label:l,secondaryLabel:i,description:p,secondaryDescription:u}=o(r[0]);return Object(n.createElement)(f.a,{label:l,secondaryLabel:i,description:p,secondaryDescription:u})};c(277);var C=e=>{let{packageId:t,className:c,noResultsMessage:r,renderOption:o,packageData:l,collapsible:i=!1,collapse:p=!1,showItems:u=!1}=e;const{selectShippingRate:g,selectedShippingRate:E}=((e,t)=>{const{dispatchCheckoutEvent:c}=Object(h.a)(),{selectShippingRate:a,isSelectingRate:r}=Object(j.a)(),[o,s]=Object(n.useState)(()=>_(t)),l=Object(n.useRef)(t);return Object(n.useEffect)(()=>{O()(l.current,t)||(l.current=t,s(_(t)))},[t]),{selectShippingRate:Object(n.useCallback)(t=>{s(t),a(t,e),c("set-selected-shipping-rate",{shippingRateId:t})},[e,a,c]),selectedShippingRate:o,isSelectingRate:r}})(t,l.shipping_rates),f=Object(n.createElement)(n.Fragment,null,(u||i)&&Object(n.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),u&&Object(n.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(m.decodeEntities)(e.name),c=e.quantity;return Object(n.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(n.createElement)(d.a,{label:c>1?`${t} × ${c}`:""+t,screenReaderLabel:Object(a.sprintf)( +/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ +Object(a._n)("%1$s (%2$d unit)","%1$s (%2$d units)",c,"woo-gutenberg-products-block"),t,c)}))}))),k=Object(n.createElement)(N,{className:c,noResultsMessage:r,rates:l.shipping_rates,onSelectRate:g,selected:E,renderOption:o});return i?Object(n.createElement)(s.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:f},k):Object(n.createElement)("div",{className:b()("wc-block-components-shipping-rates-control__package",c)},f,k)};const S=e=>{let{packages:t,collapse:c,showItems:a,collapsible:r,noResultsMessage:o,renderOption:s}=e;return t.length?Object(n.createElement)(n.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(n.createElement)(C,{key:t,packageId:t,packageData:l,collapsible:r,collapse:c,showItems:a,noResultsMessage:o,renderOption:s})})):null};t.a=e=>{let{shippingRates:t,shippingRatesLoading:c,className:u,collapsible:b=!1,noResultsMessage:m,renderOption:d}=e;Object(n.useEffect)(()=>{if(c)return;const e=Object(l.a)(t),n=Object(l.b)(t);1===e?Object(r.speak)(Object(a.sprintf)( +/* translators: %d number of shipping options found. */ +Object(a._n)("%d shipping option was found.","%d shipping options were found.",n,"woo-gutenberg-products-block"),n)):Object(r.speak)(Object(a.sprintf)( +/* translators: %d number of shipping packages packages. */ +Object(a._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(a.sprintf)( +/* translators: %d number of shipping options available. */ +Object(a._n)("%d shipping option was found","%d shipping options were found",n,"woo-gutenberg-products-block"),n))},[c,t]);const{extensions:g,receiveCart:O,...j}=Object(i.a)(),h={className:u,collapsible:b,noResultsMessage:m,renderOption:d,extensions:g,cart:j,components:{ShippingRatesControlPackage:C}},{isEditor:_}=Object(p.a)();return Object(n.createElement)(o.a,{isLoading:c,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},_?Object(n.createElement)(S,{packages:t,noResultsMessage:m,renderOption:d}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.ExperimentalOrderShippingPackages.Slot,h),Object(n.createElement)(s.ExperimentalOrderShippingPackages,null,Object(n.createElement)(S,{packages:t,noResultsMessage:m,renderOption:d}))))}},287:function(e,t){},288:function(e,t){},289:function(e,t){},290:function(e,t){},293:function(e,t,c){"use strict";var n=c(18),a=c.n(n),r=c(0),o=c(1),s=c(3),l=c(5),i=c.n(l),p=c(154),u=c(41),b=c(268),m=c(21),d=c(52),g=c(37);c(264);var O=Object(s.forwardRef)((e,t)=>{let{className:c,id:n,type:o="text",ariaLabel:s,ariaDescribedBy:l,label:p,screenReaderLabel:u,disabled:b,help:m,autoCapitalize:d="off",autoComplete:O="off",value:j="",onChange:h,required:_=!1,onBlur:E=(()=>{}),feedback:f,...k}=e;const[v,y]=Object(r.useState)(!1);return Object(r.createElement)("div",{className:i()("wc-block-components-text-input",c,{"is-active":v||j})},Object(r.createElement)("input",a()({type:o,id:n,value:j,ref:t,autoCapitalize:d,autoComplete:O,onChange:e=>{h(e.target.value)},onFocus:()=>y(!0),onBlur:e=>{E(e.target.value),y(!1)},"aria-label":s||p,disabled:b,"aria-describedby":m&&!l?n+"__help":l,required:_},k)),Object(r.createElement)(g.a,{label:p,screenReaderLabel:u||p,wrapperElement:"label",wrapperProps:{htmlFor:n},htmlFor:n}),!!m&&Object(r.createElement)("p",{id:n+"__help",className:"wc-block-components-text-input__help"},m),f)});t.a=Object(m.withInstanceId)(e=>{let{className:t,instanceId:c,id:n,ariaDescribedBy:l,errorId:m,validateOnMount:g=!0,focusOnMount:j=!1,onChange:h,showError:_=!0,errorMessage:E="",...f}=e;const[k,v]=Object(s.useState)(!0),y=Object(s.useRef)(null),{getValidationError:w,hideValidationError:N,setValidationErrors:C,clearValidationError:S,getValidationErrorId:x}=Object(p.b)(),{isBeforeProcessing:I}=Object(u.b)(),R=void 0!==n?n:"textinput-"+c,L=void 0!==m?m:R,P=Object(s.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=y.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?S(L):C({[L]:{message:t.validationMessage||Object(o.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[S,L,C]);Object(s.useEffect)(()=>{var e;k&&(j&&(null===(e=y.current)||void 0===e||e.focus()),v(!1))},[j,k,v]),Object(s.useEffect)(()=>{k&&(g&&P(),v(!1))},[k,v,g,P]),Object(s.useEffect)(()=>{I&&P()},[I,P]),Object(s.useEffect)(()=>()=>{S(L)},[S,L]);const T=w(L)||{};Object(d.d)(E)&&""!==E&&(T.message=E);const M=T.message&&!T.hidden,F=_&&M&&x(L)?x(L):l;return Object(r.createElement)(O,a()({className:i()(t,{"has-error":M}),"aria-invalid":!0===M,id:R,onBlur:()=>{P(!1)},feedback:_&&Object(r.createElement)(b.a,{errorMessage:E,propertyName:L}),ref:y,onChange:e=>{N(L),h(e)},ariaDescribedBy:F},f))})},304:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));const n=e=>e.length,a=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},309:function(e,t,c){"use strict";var n=c(0),a=c(293),r=c(18),o=c.n(r),s=c(84),l=c(1),i=c(25),p=c(5),u=c.n(p),b=c(21),m=c(380),d=c(154),g=c(268),O=c(52);c(275);var j=Object(b.withInstanceId)(e=>{let{id:t,className:c,label:a,onChange:r,options:o,value:s,required:i=!1,errorMessage:p=Object(l.__)("Please select a value.","woo-gutenberg-products-block"),errorId:b,instanceId:j="0",autoComplete:h="off"}=e;const{getValidationError:_,setValidationErrors:E,clearValidationError:f}=Object(d.b)(),k=Object(n.useRef)(null),v=t||"control-"+j,y=b||v,w=_(y)||{message:"",hidden:!1};return Object(n.useEffect)(()=>(!i||s?f(y):E({[y]:{message:p,hidden:!0}}),()=>{f(y)}),[f,s,y,p,i,E]),Object(n.createElement)("div",{id:v,className:u()("wc-block-components-combobox",c,{"is-active":s,"has-error":w.message&&!w.hidden}),ref:k},Object(n.createElement)(m.a,{className:"wc-block-components-combobox-control",label:a,onChange:r,onFilterValueChange:e=>{if(e.length){const t=Object(O.c)(k.current)?k.current.ownerDocument.activeElement:void 0;if(t&&Object(O.c)(k.current)&&k.current.contains(t))return;const c=e.toLocaleUpperCase(),n=o.find(e=>e.label.toLocaleUpperCase().startsWith(c)||e.value.toLocaleUpperCase()===c);n&&r(n.value)}},options:o,value:s||"",allowReset:!1,autoComplete:h,"aria-invalid":w.message&&!w.hidden}),Object(n.createElement)(g.a,{propertyName:y}))});c(274);var h=e=>{let{className:t,countries:c,id:a,label:r,onChange:o,value:s="",autoComplete:p="off",required:b=!1,errorId:m,errorMessage:d=Object(l.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(n.useMemo)(()=>Object.keys(c).map(e=>({value:e,label:Object(i.decodeEntities)(c[e])})),[c]);return Object(n.createElement)("div",{className:u()(t,"wc-block-components-country-input")},Object(n.createElement)(j,{id:a,label:r,onChange:o,options:g,value:s,errorId:m,errorMessage:d,required:b,autoComplete:p}),"off"!==p&&Object(n.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:s,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),c=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);o(c?c.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},_=e=>Object(n.createElement)(h,o()({countries:s.g},e)),E=e=>Object(n.createElement)(h,o()({countries:s.a},e));c(276);const f=(e,t)=>{const c=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return c?c.value:""};var k=e=>{let{className:t,id:c,states:r,country:o,label:s,onChange:p,autoComplete:b="off",value:m="",required:d=!1}=e;const g=r[o],O=Object(n.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),h=Object(n.useCallback)(e=>{p(O.length>0?f(e,O):e)},[p,O]),_=Object(n.useRef)(m);return Object(n.useEffect)(()=>{_.current!==m&&(_.current=m)},[m]),Object(n.useEffect)(()=>{if(O.length>0&&_.current){const e=f(_.current,O);e!==_.current&&h(e)}},[O,h]),O.length>0?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(j,{className:u()(t,"wc-block-components-state-input"),id:c,label:s,onChange:h,options:O,value:m,errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:d,autoComplete:b}),"off"!==b&&Object(n.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:b,value:m,onChange:e=>h(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(n.createElement)(a.a,{className:t,id:c,label:s,onChange:h,autoComplete:b,value:m,required:d})},v=e=>Object(n.createElement)(k,o()({states:s.h},e)),y=e=>Object(n.createElement)(k,o()({states:s.b},e)),w=c(33),N=c(2),C=c(67);t.a=Object(b.withInstanceId)(e=>{let{id:t,fields:c=Object.keys(N.defaultAddressFields),fieldConfig:r={},instanceId:o,onChange:s,type:i="shipping",values:p}=e;const{getValidationError:u,setValidationErrors:b,clearValidationError:m}=Object(d.b)(),g=Object(w.a)(c),O=u("shipping-missing-country")||{},j=Object(n.useMemo)(()=>Object(C.a)(g,r,p.country),[g,r,p.country]);return Object(n.useEffect)(()=>{j.forEach(e=>{e.hidden&&p[e.key]&&s({...p,[e.key]:""})})},[j,s,p]),Object(n.useEffect)(()=>{"shipping"===i&&((e,t,c,n)=>{n||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(l.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),n&&e.country&&c("shipping-missing-country")})(p,b,m,!!O.message&&!O.hidden)},[p,O.message,O.hidden,b,m,i]),t=t||o,Object(n.createElement)("div",{id:t,className:"wc-block-components-address-form"},j.map(e=>{if(e.hidden)return null;if("country"===e.key){const c="shipping"===i?_:E;return Object(n.createElement)(c,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:p.country,autoComplete:e.autocomplete,onChange:e=>s({...p,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const c="shipping"===i?v:y;return Object(n.createElement)(c,{key:e.key,id:`${t}-${e.key}`,country:p.country,label:e.required?e.label:e.optionalLabel,value:p.state,autoComplete:e.autocomplete,onChange:e=>s({...p,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(n.createElement)(a.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:p[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>s({...p,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},335:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(153),o=c(203),s=(c(8),c(22)),l=c(2);c(287);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:p,removeCoupon:u,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,h=Object(s.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(n.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==h.length&&Object(n.createElement)(r.a,{screenReaderLabel:Object(a.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:p,showSpinner:!1},Object(n.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},h.map(e=>Object(n.createElement)(o.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(a.sprintf)( +/* translators: %s Coupon code. */ +Object(a.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:p,onRemove:()=>{u(e.code)},radius:"large",ariaLabel:Object(a.sprintf)( +/* translators: %s is a coupon code. */ +Object(a.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:j?Object(a.__)("Discount","woo-gutenberg-products-block"):Object(a.__)("Coupons","woo-gutenberg-products-block"),value:j?-1*j:"-"})}},336:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(137),o=c(293),s=c(37),l=c(153),i=(c(8),c(21)),p=c(154),u=c(268),b=c(22);c(288),t.a=Object(i.withInstanceId)(e=>{let{instanceId:t,isLoading:c=!1,initialOpen:i=!1,onSubmit:m=(()=>{})}=e;const[d,g]=Object(n.useState)(""),O=Object(n.useRef)(!1),{getValidationError:j,getValidationErrorId:h}=Object(p.b)(),_=j("coupon");Object(n.useEffect)(()=>{O.current!==c&&(c||!d||_||g(""),O.current=c)},[c,d,_]);const E="wc-block-components-totals-coupon__input-"+t;return Object(n.createElement)(b.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:i,title:Object(n.createElement)(s.a,{label:Object(a.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:E})},Object(n.createElement)(l.a,{screenReaderLabel:Object(a.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:c,showSpinner:!1},Object(n.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(n.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(n.createElement)(o.a,{id:E,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(a.__)("Enter code","woo-gutenberg-products-block"),value:d,ariaDescribedBy:h(E),onChange:e=>{g(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),Object(n.createElement)(r.a,{className:"wc-block-components-totals-coupon__button",disabled:c||!d,showSpinner:c,onClick:e=>{e.preventDefault(),m(d)},type:"submit"},Object(a.__)("Apply","woo-gutenberg-products-block"))),Object(n.createElement)(u.a,{propertyName:"coupon",elementId:E}))))})},340:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(66),o=(c(8),c(22)),s=c(26),l=c(2);c(290),t.a=e=>{let{currency:t,values:c}=e;const i=Object(l.getSetting)("taxesEnabled",!0)&&Object(l.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:u}=c,{receiveCart:b,...m}=Object(s.a)(),d=Object(o.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(a.__)("Total","woo-gutenberg-products-block"),extensions:m.extensions,arg:{cart:m}}),g=parseInt(u,10);return Object(n.createElement)(o.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:d,value:parseInt(p,10),description:i&&0!==g&&Object(n.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(n.createInterpolateElement)(Object(a.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(n.createElement)(r.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},355:function(e,t){},356:function(e,t,c){"use strict";var n=c(18),a=c.n(n),r=c(0),o=c(5),s=c.n(o),l=c(1),i=c(26),p=c(22),u=c(2),b=c(25);const m=e=>{let{selectedShippingRates:t}=e;return Object(r.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(l.__)("via","woo-gutenberg-products-block")," ",Object(b.decodeEntities)(t.join(", ")))};var d=c(132),g=c(282),O=e=>{let{hasRates:t,shippingRates:c,shippingRatesLoading:n}=e;const a=t?Object(l.__)("Shipping options","woo-gutenberg-products-block"):Object(l.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(r.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(r.createElement)("legend",{className:"screen-reader-text"},a),Object(r.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(r.createElement)(d.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(l.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:c,shippingRatesLoading:n}))},j=c(51),h=c(137),_=c(17),E=c.n(_),f=c(154),k=(c(273),c(309)),v=e=>{let{address:t,onUpdate:c,addressFields:n}=e;const[a,o]=Object(r.useState)(t),{hasValidationErrors:s,showAllValidationErrors:i}=Object(f.b)();return Object(r.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(r.createElement)(k.a,{fields:n,onChange:o,values:a}),Object(r.createElement)(h.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:E()(a,t),onClick:e=>{if(e.preventDefault(),i(),!s)return c(a)},type:"submit"},Object(l.__)("Update","woo-gutenberg-products-block")))},y=e=>{let{onUpdate:t=(()=>{}),addressFields:c=["country","state","city","postcode"]}=e;const{shippingAddress:n,setShippingAddress:a}=Object(j.b)();return Object(r.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(r.createElement)(v,{address:n,addressFields:c,onUpdate:e=>{a(e),t(e)}}))},w=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const c=Object(u.getSetting)("shippingCountries",{}),n=Object(u.getSetting)("shippingStates",{}),a="string"==typeof c[t.country]?Object(b.decodeEntities)(c[t.country]):"",o="object"==typeof n[t.country]&&"string"==typeof n[t.country][t.state]?Object(b.decodeEntities)(n[t.country][t.state]):t.state,s=[];s.push(t.postcode.toUpperCase()),s.push(t.city),s.push(o),s.push(a);const i=s.filter(Boolean).join(", ");return i?Object(r.createElement)("span",{className:"wc-block-components-shipping-address"},Object(l.sprintf)( +/* translators: %s location. */ +Object(l.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" "):null};c(289);const N=e=>{let{label:t=Object(l.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:n}=e;return Object(r.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{n(!c)},"aria-expanded":c},t)},C=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:n,shippingAddress:a}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(w,{address:a}),t&&Object(r.createElement)(N,{label:Object(l.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:n}))},S=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:n}=e;return t?Object(r.createElement)(N,{isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:n}):Object(r.createElement)("em",null,Object(l.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:c,showCalculator:n=!0,showRateSelector:o=!0,className:b}=e;const[d,g]=Object(r.useState)(!1),{shippingAddress:j,cartHasCalculatedShipping:h,shippingRates:_,shippingRatesLoading:E}=Object(i.a)(),f=Object(u.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(c.total_shipping,10)+parseInt(c.total_shipping_tax,10):parseInt(c.total_shipping,10),k=_.some(e=>e.shipping_rates.length)||f,v={isShippingCalculatorOpen:d,setIsShippingCalculatorOpen:g},w=_.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(r.createElement)("div",{className:s()("wc-block-components-totals-shipping",b)},Object(r.createElement)(p.TotalsItem,{label:Object(l.__)("Shipping","woo-gutenberg-products-block"),value:h?f:Object(r.createElement)(S,a()({showCalculator:n},v)),description:Object(r.createElement)(r.Fragment,null,h&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(m,{selectedShippingRates:w}),Object(r.createElement)(C,a()({shippingAddress:j,showCalculator:n},v)))),currency:t}),n&&d&&Object(r.createElement)(y,{onUpdate:()=>{g(!1)}}),o&&h&&Object(r.createElement)(O,{hasRates:k,shippingRates:_,shippingRatesLoading:E}))}},37: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))}},385:function(e,t,c){"use strict";c.r(t);var n=c(0),a=c(1),r=c(244),o=c(22),s=c(5),l=c.n(s),i=c(37),p=c(139),u=c(156),b=c(48),m=c(133),d=c(2),g=c(26),O=c(52),j=c(250),h=c(249),_=c(251),E=c(252);const f=e=>Object(o.mustContain)(e,"");var k=e=>{let{cartItem:t}=e;const{images:c,low_stock_remaining:r,show_backorder_badge:s,name:k,permalink:v,prices:y,quantity:w,short_description:N,description:C,item_data:S,variation:x,totals:I,extensions:R}=t,{receiveCart:L,...P}=Object(g.a)(),T=Object(n.useMemo)(()=>({context:"summary",cartItem:t,cart:P}),[t,P]),M=Object(b.getCurrencyFromPriceResponse)(y),F=Object(o.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:k,extensions:R,arg:T}),$=Object(m.a)({amount:parseInt(y.raw_prices.regular_price,10),precision:Object(O.d)(y.raw_prices.precision)?parseInt(y.raw_prices.precision,10):y.raw_prices.precision}).convertPrecision(M.minorUnit).getAmount(),A=Object(m.a)({amount:parseInt(y.raw_prices.price,10),precision:Object(O.d)(y.raw_prices.precision)?parseInt(y.raw_prices.precision,10):y.raw_prices.precision}).convertPrecision(M.minorUnit).getAmount(),D=Object(b.getCurrencyFromPriceResponse)(I);let V=parseInt(I.line_subtotal,10);Object(d.getSetting)("displayCartPricesIncludingTax",!1)&&(V+=parseInt(I.line_subtotal_tax,10));const U=Object(m.a)({amount:V,precision:D.minorUnit}).getAmount(),q=Object(o.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:R,arg:T,validation:f}),B=Object(o.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:R,arg:T,validation:f}),W=Object(o.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:R,arg:T});return Object(n.createElement)("div",{className:l()("wc-block-components-order-summary-item",W)},Object(n.createElement)("div",{className:"wc-block-components-order-summary-item__image"},Object(n.createElement)("div",{className:"wc-block-components-order-summary-item__quantity"},Object(n.createElement)(i.a,{label:w.toString(),screenReaderLabel:Object(a.sprintf)( +/* translators: %d number of products of the same type in the cart */ +Object(a._n)("%d item","%d items",w,"woo-gutenberg-products-block"),w)})),Object(n.createElement)(h.a,{image:c.length?c[0]:{},fallbackAlt:F})),Object(n.createElement)("div",{className:"wc-block-components-order-summary-item__description"},Object(n.createElement)(u.a,{disabled:!0,name:F,permalink:v}),Object(n.createElement)(p.a,{currency:M,price:A,regularPrice:$,className:"wc-block-components-order-summary-item__individual-prices",priceClassName:"wc-block-components-order-summary-item__individual-price",regularPriceClassName:"wc-block-components-order-summary-item__regular-individual-price",format:q}),s?Object(n.createElement)(j.a,null):!!r&&Object(n.createElement)(_.a,{lowStockRemaining:r}),Object(n.createElement)(E.a,{shortDescription:N,fullDescription:C,itemData:S,variation:x})),Object(n.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)( +/* translators: %1$d is the number of items, %2$s is the item name and %3$s is the total price including the currency symbol. */ +Object(a._n)("Total price for %1$d %2$s item: %3$s","Total price for %1$d %2$s items: %3$s",w,"woo-gutenberg-products-block"),w,F,Object(b.formatPrice)(U,D))),Object(n.createElement)("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},Object(n.createElement)(p.a,{currency:D,format:B,price:U})))};c(355);var v=e=>{let{cartItems:t=[]}=e;const{isLarge:c,hasContainerWidth:s}=Object(r.b)();return s?Object(n.createElement)(o.Panel,{className:"wc-block-components-order-summary",initialOpen:c,hasBorder:!1,title:Object(n.createElement)("span",{className:"wc-block-components-order-summary__button-text"},Object(a.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},Object(n.createElement)("div",{className:"wc-block-components-order-summary__content"},t.map(e=>Object(n.createElement)(k,{key:e.key,cartItem:e})))):null},y=c(335),w=c(336),N=c(356),C=c(340),S=c(51),x=c(271);t.default=e=>{let{showRateAfterTaxName:t=!1,className:c}=e;const{cartItems:a,cartTotals:r,cartCoupons:s,cartFees:l}=Object(g.a)(),{applyCoupon:i,removeCoupon:p,isApplyingCoupon:u,isRemovingCoupon:m}=Object(x.a)(),{needsShipping:O}=Object(S.b)(),j=Object(b.getCurrencyFromPriceResponse)(r),{extensions:h,receiveCart:_,...E}=Object(g.a)(),f={extensions:h,cart:E};return Object(n.createElement)("div",{className:c},Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(v,{cartItems:a})),Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(o.Subtotal,{currency:j,values:r}),Object(n.createElement)(o.TotalsFees,{currency:j,cartFees:l}),Object(n.createElement)(y.a,{cartCoupons:s,currency:j,isRemovingCoupon:m,removeCoupon:p,values:r})),Object(d.getSetting)("couponsEnabled",!0)&&Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(w.a,{onSubmit:i,initialOpen:!1,isLoading:u})),O&&Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(N.a,{showCalculator:!1,showRateSelector:!1,values:r,currency:j})),Object(n.createElement)(o.ExperimentalDiscountsMeta.Slot,f),!Object(d.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(r.total_tax,10)>0&&Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(o.TotalsTaxes,{currency:j,showRateAfterTaxName:t,values:r})),Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(C.a,{currency:j,values:r})),Object(n.createElement)(o.ExperimentalOrderMeta.Slot,f))}},66:function(e,t,c){"use strict";var n=c(18),a=c.n(n),r=c(0),o=c(107),s=c(5),l=c.n(s);c(136);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:n,onValueChange:s,displayType:p="text",...u}=e;const b="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(b))return null;const m=b/10**n.minorUnit;if(!Number.isFinite(m))return null;const d=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...u,...i(n),value:void 0,currency:void 0,onValueChange:void 0},O=s?e=>{const t=e.value*10**n.minorUnit;s(t)}:()=>{};return Object(r.createElement)(o.a,a()({className:d,displayType:p},g,{value:m,onValueChange:O}))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/payment-frontend.js b/build/checkout-blocks/payment-frontend.js new file mode 100644 index 00000000000..e9a53dd75bd --- /dev/null +++ b/build/checkout-blocks/payment-frontend.js @@ -0,0 +1,9 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[38],{101:function(e,t,c){},106:function(e,t,c){"use strict";var n=c(0);c(135),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},135:function(e,t){},153:function(e,t,c){"use strict";var n=c(0),o=c(1),a=(c(8),c(5)),s=c.n(a),r=(c(189),c(106));t.a=e=>{let{children:t,className:c,screenReaderLabel:a,showSpinner:l=!1,isLoading:i=!0}=e;return Object(n.createElement)("div",{className:s()(c,{"wc-block-components-loading-mask":i})},i&&l&&Object(n.createElement)(r.a,null),Object(n.createElement)("div",{className:s()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},t),i&&Object(n.createElement)("span",{className:"screen-reader-text"},a||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},155:function(e,t,c){"use strict";var n=c(18),o=c.n(n),a=c(0),s=c(5),r=c.n(s);const l=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var i=e=>{let{id:t,src:c=null,alt:n=""}=e;return c?Object(a.createElement)("img",{className:l(t),src:c,alt:n}):null},d=c(84);const p=[{id:"alipay",alt:"Alipay",src:d.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.l+"payment-methods/wechat.svg"}];var m=c(52);c(190),t.a=e=>{let{icons:t=[],align:c="center",className:n}=e;const s=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(m.d)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===s.length)return null;const l=r()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},n);return Object(a.createElement)("div",{className:l},s.map(e=>{const t={...e,...(c=e.id,p.find(e=>e.id===c)||{})};var c;return Object(a.createElement)(i,o()({key:"payment-method-icon-"+e.id},t))}))}},189:function(e,t){},190:function(e,t){},246:function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return r}));var n=c(33),o=c(147);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:a,expressPaymentMethodsInitialized:s}=Object(o.b)(),r=Object(n.a)(t),l=Object(n.a)(c);return{paymentMethods:e?l:r,isInitialized:e?s:a}},s=()=>a(!1),r=()=>a(!0)},259:function(e,t){},260:function(e,t,c){"use strict";var n=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:o,secondaryDescription:a,id:s}=e;return Object(n.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(n.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(n.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(n.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(n.createElement)("div",{className:"wc-block-components-radio-control__description-group"},o&&Object(n.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},o),a&&Object(n.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},a)))}},261:function(e,t,c){"use strict";var n=c(18),o=c.n(n),a=c(0),s=c(5),r=c.n(s);c(8),c(262),t.a=e=>{let{children:t,className:c,headingLevel:n,...s}=e;const l=r()("wc-block-components-title",c),i="h"+n;return Object(a.createElement)(i,o()({className:l},s),t)}},262:function(e,t){},263:function(e,t,c){"use strict";var n=c(0),o=c(5),a=c.n(o),s=c(260);t.a=e=>{let{checked:t,name:c,onChange:o,option:r}=e;const{value:l,label:i,description:d,secondaryLabel:p,secondaryDescription:m}=r;return Object(n.createElement)("label",{className:a()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${l}`},Object(n.createElement)("input",{id:`${c}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:e=>o(e.target.value),checked:t,"aria-describedby":a()({[`${c}-${l}__label`]:i,[`${c}-${l}__secondary-label`]:p,[`${c}-${l}__description`]:d,[`${c}-${l}__secondary-description`]:m})}),Object(n.createElement)(s.a,{id:`${c}-${l}`,label:i,secondaryLabel:p,description:d,secondaryDescription:m}))}},266:function(e,t){},267:function(e,t,c){"use strict";var n=c(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:o=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:o}}}},268:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(0),o=(c(8),c(154));c(259);const a=e=>{let{errorMessage:t="",propertyName:c="",elementId:a=""}=e;const{getValidationError:s,getValidationErrorId:r}=Object(o.b)();if(!t||"string"!=typeof t){const e=s(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:r(a)},t))}},269:function(e,t,c){"use strict";var n=c(0),o=c(5),a=c.n(o),s=c(21),r=c(263);c(270),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,selected:s,onChange:l,options:i=[]}=e;const d=o||c;return i.length&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control",t)},i.map(e=>Object(n.createElement)(r.a,{key:`${d}-${e.value}`,name:"radio-control-"+d,checked:e.value===s,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},270:function(e,t){},271:function(e,t,c){"use strict";c.d(t,"a",(function(){return m}));var n=c(1),o=c(9),a=c(6),s=c(25),r=c(26),l=c(0),i=c(241),d=c(154),p=c(39);const m=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(r.a)(),{addErrorNotice:c}=Object(p.a)(),{addSnackbarNotice:m}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:n}=Object(i.b)(),o=Object(l.useRef)(e);Object(l.useEffect)(()=>{o.current=e},[e]);const a=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;o.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),s=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...a,...s,setIsSuppressed:n}})(),{setValidationErrors:b}=Object(d.b)();return{appliedCoupons:e,isLoading:t,...Object(o.useSelect)((e,t)=>{let{dispatch:o}=t;const r=e(a.CART_STORE_KEY),l=r.isApplyingCoupon(),i=r.isRemovingCoupon(),{applyCoupon:d,removeCoupon:p,receiveApplyingCoupon:u}=o(a.CART_STORE_KEY);return{applyCoupon:e=>{d(e).then(t=>{!0===t&&m(Object(n.sprintf)( +/* translators: %s coupon code. */ +Object(n.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{b({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),u("")})},removeCoupon:e=>{p(e).then(t=>{!0===t&&m(Object(n.sprintf)( +/* translators: %s coupon code. */ +Object(n.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{c(e.message,{id:"coupon-form"}),u("")})},isApplyingCoupon:l,isRemovingCoupon:i}},[c,m])}}},278:function(e,t){},279:function(e,t,c){"use strict";var n=c(29),o=c.n(n),a=c(0),s=c(1),r=c(3),l=(c(8),c(2)),i=c(101);class d extends r.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(s.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||l.CURRENT_USER_IS_ADMIN)&&(e=t||Object(s.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const n=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(a.createElement)(i.StoreNoticesContainer,{notices:n})}return this.props.children}}d.defaultProps={isEditor:!1},t.a=d},281:function(e,t,c){"use strict";var n=c(0),o=c(5),a=c.n(o),s=c(261);c(266);const r=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(s.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:o,legend:s,description:l,children:i,disabled:d=!1,showStepNumber:p=!0,stepHeadingContent:m=(()=>{})}=e;const b=s||o?"fieldset":"div";return Object(n.createElement)(b,{className:a()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":p,"wc-block-components-checkout-step--disabled":d}),id:t,disabled:d},!(!s&&!o)&&Object(n.createElement)("legend",{className:"screen-reader-text"},s||o),!!o&&Object(n.createElement)(r,{title:o,stepHeadingContent:m()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!l&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},l),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},302:function(e,t,c){"use strict";var n=c(11),o=c(20),a=c(16),s=c(0),r=c(5),l=c.n(r),i=c(21),d=c(68);t.a=function(e){var t,c=e.icon,r=e.children,p=e.label,m=e.instructions,b=e.className,u=e.notices,h=e.preview,g=e.isColumnLayout,O=Object(a.a)(e,["icon","children","label","instructions","className","notices","preview","isColumnLayout"]),j=Object(i.useResizeObserver)(),v=Object(o.a)(j,2),y=v[0],k=v[1].width;"number"==typeof k&&(t={"is-large":k>=320,"is-medium":k>=160&&k<320,"is-small":k<160});var w=l()("components-placeholder",b,t),_=l()("components-placeholder__fieldset",{"is-column-layout":g});return Object(s.createElement)("div",Object(n.a)({},O,{className:w}),y,u,h&&Object(s.createElement)("div",{className:"components-placeholder__preview"},h),Object(s.createElement)("div",{className:"components-placeholder__label"},Object(s.createElement)(d.a,{icon:c}),p),!!m&&Object(s.createElement)("div",{className:"components-placeholder__instructions"},m),Object(s.createElement)("div",{className:_},r))}},305:function(e,t,c){"use strict";var n=c(0),o=c(32);const a=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{fill:"currentColor",d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=a},310:function(e,t,c){"use strict";c.d(t,"a",(function(){return x}));var n=c(1),o=c(48),a=c(0),s=c(5),r=c.n(s),l=c(32),i=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(a.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),d=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(a.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"})),p=c(305),m=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(a.createElement)("path",{d:"M0 0h24v24H0z"}),Object(a.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(a.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),b=c(108),u=c(52);c(278);const h={bank:i,bill:d,card:p.a,checkPayment:m};var g=e=>{let{icon:t="",text:c=""}=e;const n=!!t,o=Object(a.useCallback)(e=>n&&Object(u.d)(e)&&Object(u.e)(h,e),[n]),s=r()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":n});return Object(a.createElement)("span",{className:s},o(t)?Object(a.createElement)(b.a,{srcElement:h[t]}):t,c)},O=c(155),j=c(2),v=c(40),y=c.n(v),k=c(153),w=c(268),_=c(26),E=c(271),f=c(31),S=c(41),N=c(147),C=c(51),P=c(45);const M=(e,t)=>{const c=[],o=(t,c)=>{const n=c+"_tax",o=Object(u.e)(e,c)&&Object(u.d)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:o,valueWithTax:o+(Object(u.e)(e,n)&&Object(u.d)(e[n])?parseInt(e[n],10):0)}};return c.push(o(Object(n.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(o(Object(n.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(o(Object(n.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(n.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(o(Object(n.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c},x=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:d,onSubmit:p,customerId:m}=Object(S.b)(),{currentStatus:b,activePaymentMethod:u,onPaymentProcessing:h,setExpressPaymentError:v,shouldSavePayment:x}=Object(N.b)(),{shippingErrorStatus:R,shippingErrorTypes:I,shippingRates:T,shippingRatesLoading:z,selectedRates:A,setSelectedRates:V,isSelectingRate:L,onShippingRateSuccess:$,onShippingRateFail:H,onShippingRateSelectSuccess:D,onShippingRateSelectFail:B,needsShipping:F}=Object(C.b)(),{billingData:W,shippingAddress:G,setShippingAddress:Y}=Object(P.b)(),{cartTotals:U}=Object(_.a)(),{appliedCoupons:J}=Object(E.a)(),{noticeContexts:K,responseTypes:q}=Object(f.c)(),Q=Object(a.useRef)(M(U,F)),X=Object(a.useRef)({label:Object(n.__)("Total","woo-gutenberg-products-block"),value:parseInt(U.total_price,10)});Object(a.useEffect)(()=>{Q.current=M(U,F),X.current={label:Object(n.__)("Total","woo-gutenberg-products-block"),value:parseInt(U.total_price,10)}},[U,F]);const Z=Object(a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";y()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),v(e)}),[v]);return{activePaymentMethod:u,billing:{billingData:W,cartTotal:X.current,currency:Object(o.getCurrencyFromPriceResponse)(U),cartTotalItems:Q.current,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1),appliedCoupons:J,customerId:m},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s},components:{ValidationInputError:w.a,PaymentMethodIcons:O.a,PaymentMethodLabel:g,LoadingMask:k.a},emitResponse:{noticeContexts:K,responseTypes:q},eventRegistration:{onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:d,onShippingRateSuccess:$,onShippingRateFail:H,onShippingRateSelectSuccess:D,onShippingRateSelectFail:B,onPaymentProcessing:h},onSubmit:p,paymentStatus:b,setExpressPaymentError:Z,shippingData:{shippingRates:T,shippingRatesLoading:z,selectedRates:A,setSelectedRates:V,isSelectingRate:L,shippingAddress:G,setShippingAddress:Y,needsShipping:F},shippingStatus:{shippingErrorStatus:R,shippingErrorTypes:I},shouldSavePayment:x}}},347:function(e,t){},37:function(e,t,c){"use strict";var n=c(0),o=c(5),a=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:s,wrapperProps:r={}}=e;const l=null!=c,i=null!=o;return!l&&i?(t=s||"span",r={...r,className:a()(r.className,"screen-reader-text")},Object(n.createElement)(t,r,o)):(t=s||n.Fragment,l&&i&&c!==o?Object(n.createElement)(t,r,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,r,c))}},376:function(e,t,c){"use strict";c.r(t);var n=c(0),o=c(5),a=c.n(o),s=c(26),r=c(31),l=c(134),i=c(281),d=c(41),p=c(80),m=c(246),b=c(1),u=c(37),h=c(147),g=c(302),O=c(62),j=c(132),v=c(108),y=c(305),k=c(2),w=c(28);c(347);const _=()=>Object(n.createElement)(g.a,{icon:Object(n.createElement)(v.a,{srcElement:y.a}),label:Object(b.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},Object(n.createElement)("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(b.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method (e.g. Stripe) it will be shown here.","woo-gutenberg-products-block")),Object(n.createElement)(O.a,{isSecondary:!0,href:k.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer"},Object(b.__)("Configure Payment Methods","woo-gutenberg-products-block"))),E=()=>Object(n.createElement)(j.a,{isDismissible:!1,className:a()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(b.__)("There are no payment methods available. This may be an error on our side. Please contact us if you need any help placing your order.","woo-gutenberg-products-block"));var f=()=>{const{isEditor:e}=Object(w.a)();return e?Object(n.createElement)(_,null):Object(n.createElement)(E,null)},S=c(310),N=c(39),C=c(21),P=c(263),M=Object(C.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,selected:s,onChange:r,options:l=[]}=e;const i=o||c;return l.length&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control",t)},l.map(e=>{const t="object"==typeof e&&"content"in e,c=e.value===s;return Object(n.createElement)("div",{className:"wc-block-components-radio-control-accordion-option",key:e.value},Object(n.createElement)(P.a,{name:"radio-control-"+i,checked:c,option:e,onChange:t=>{r(t),"function"==typeof e.onChange&&e.onChange(t)}}),t&&c&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control-accordion-content",{"wc-block-components-radio-control-accordion-content-hide":!c})},e.content))}))}),x=c(22),R=(c(8),c(279)),I=e=>{let{children:t,showSaveOption:c}=e;const{isEditor:o}=Object(w.a)(),{shouldSavePayment:a,setShouldSavePayment:s}=Object(h.b)(),{customerId:r}=Object(d.b)();return Object(n.createElement)(R.a,{isEditor:o},t,r>0&&c&&Object(n.createElement)(x.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:Object(b.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:a,onChange:()=>s(!a)}))},T=()=>{const{setActivePaymentMethod:e,activeSavedToken:t,setActiveSavedToken:c,isExpressPaymentMethodActive:o,customerPaymentMethods:s}=Object(h.b)(),{paymentMethods:l}=Object(m.b)(),{activePaymentMethod:i,...d}=Object(S.a)(),{noticeContexts:p}=Object(r.c)(),{removeNotice:b}=Object(N.a)(),{isEditor:u}=Object(w.a)(),g=Object.keys(l).map(e=>{const{edit:t,content:c,label:o,supports:a}=l[e],s=u?t:c;return{value:e,label:"string"==typeof o?o:Object(n.cloneElement)(o,{components:d.components}),name:"wc-saved-payment-method-token-"+e,content:Object(n.createElement)(I,{showSaveOption:a.showSaveOption},Object(n.cloneElement)(s,{activePaymentMethod:i,...d}))}}),O=0===Object.keys(s).length&&1===Object.keys(l).length,j=a()({"disable-radio-control":O});return o?null:Object(n.createElement)(M,{id:"wc-payment-method-options",className:j,selected:t?null:i,onChange:t=>{e(t),c(""),b("wc-payment-error",p.PAYMENTS)},options:g})},z=c(269),A=c(24),V=()=>{var e,t;const{setPaymentStatus:c,customerPaymentMethods:o,activePaymentMethod:a,setActivePaymentMethod:s,activeSavedToken:r,setActiveSavedToken:l}=Object(h.b)(),i=Object(A.getPaymentMethods)(),{paymentMethods:d}=Object(m.b)(),p=Object(S.a)(),u=Object(n.useRef)([]),g=Object(n.useCallback)(e=>{l(e)},[l]);Object(n.useEffect)(()=>{const e=Object.keys(o).flatMap(e=>o[e].map(t=>{const n="cc"===e||"echeck"===e?((e,t,c)=>{let{method:n,expires:o,tokenId:a}=e;return{value:a+"",label:Object(b.sprintf)( +/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */ +Object(b.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-products-block"),n.brand,n.last4,o),name:"wc-saved-payment-method-token-"+a,onChange:e=>{const o=`wc-${n.gateway}-payment-token`;t(n.gateway),c().started({payment_method:n.gateway,[o]:e+"",isSavedToken:!0})}}})(t,s,c):((e,t,c)=>{let{method:n,tokenId:o}=e;return{value:o+"",label:Object(b.sprintf)( +/* translators: %s is the name of the payment method gateway. */ +Object(b.__)("Saved token for %s","woo-gutenberg-products-block"),n.gateway),name:"wc-saved-payment-method-token-"+o,onChange:e=>{const o=`wc-${n.gateway}-payment-token`;t(n.gateway),c().started({payment_method:n.gateway,[o]:e+"",isSavedToken:!0})}}})(t,s,c);return!a&&t.is_default&&""===r&&(g(t.tokenId+""),n.onChange(t.tokenId)),n})).filter(Boolean);u.current=e},[o,g,r,a,s,c,i]);const O=r&&d[a]&&null!==(e=d[a])&&void 0!==e&&e.savedTokenComponent?Object(n.cloneElement)(null===(t=d[a])||void 0===t?void 0:t.savedTokenComponent,{token:r,...p}):null;return u.current.length>0?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(z.a,{id:"wc-payment-method-saved-tokens",selected:r,onChange:g,options:u.current}),O):null},L=()=>{const{isInitialized:e,paymentMethods:t}=Object(m.b)(),{customerPaymentMethods:c}=Object(h.b)();return e&&0===Object.keys(t).length?Object(n.createElement)(f,null):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(V,null),Object.keys(c).length>0&&Object(n.createElement)(u.a,{label:Object(b.__)("Use another payment method.","woo-gutenberg-products-block"),screenReaderLabel:Object(b.__)("Other available payment methods","woo-gutenberg-products-block"),wrapperElement:"p",wrapperProps:{className:["wc-block-components-checkout-step__description wc-block-components-checkout-step__description-payments-aligned"]}}),Object(n.createElement)(T,null))},$=()=>{const{noticeContexts:e}=Object(r.c)();return Object(n.createElement)(p.a,{context:e.PAYMENTS},Object(n.createElement)(L,null))},H=c(267),D={...Object(H.a)({defaultTitle:Object(b.__)("Payment options","woo-gutenberg-products-block"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};t.default=Object(l.withFilteredAttributes)(D)(e=>{let{title:t,description:c,showStepNumber:o,children:l,className:m}=e;const{isProcessing:b}=Object(d.b)(),{cartNeedsPayment:u}=Object(s.a)(),{noticeContexts:h}=Object(r.c)();return u?Object(n.createElement)(i.a,{id:"payment-method",disabled:b,className:a()("wc-block-checkout__payment-method",m),title:t,description:c,showStepNumber:o},Object(n.createElement)(p.a,{context:h.PAYMENTS},Object(n.createElement)($,null)),l):null})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/shipping-address-frontend.js b/build/checkout-blocks/shipping-address-frontend.js new file mode 100644 index 00000000000..62e7046fa6b --- /dev/null +++ b/build/checkout-blocks/shipping-address-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[39],{382:function(e,t,i){"use strict";i.r(t);var s=i(0),n=i(5),o=i.n(n),l=i(134),c=i(281),d=i(41),r=i(306),a=i(1),p=i(309),h=i(42),b=i(28),u=i(22),g=i(307),m=i(308),w=e=>{let{showCompanyField:t=!1,showApartmentField:i=!1,showPhoneField:n=!1,requireCompanyField:o=!1,requirePhoneField:l=!1}=e;const{defaultAddressFields:c,setShippingFields:d,shippingFields:w,setShippingAsBilling:j,shippingAsBilling:F,setShippingPhone:O}=Object(r.a)(),{dispatchCheckoutEvent:f}=Object(h.a)(),{isEditor:k}=Object(b.a)();Object(s.useEffect)(()=>{n||O("")},[n,O]);const y=Object(s.useMemo)(()=>({company:{hidden:!t,required:o},address_2:{hidden:!i}}),[t,o,i]),C=k?g.a:s.Fragment;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(C,null,Object(s.createElement)(p.a,{id:"shipping",type:"shipping",onChange:e=>{d(e),f("set-shipping-address")},values:w,fields:Object.keys(c),fieldConfig:y}),n&&Object(s.createElement)(m.a,{id:"shipping-phone",isRequired:l,value:w.phone,onChange:e=>{O(e),f("set-phone-number",{step:"shipping"})}})),Object(s.createElement)(u.CheckboxControl,{className:"wc-block-checkout__use-address-for-billing",label:Object(a.__)("Use same address for billing","woo-gutenberg-products-block"),checked:F,onChange:e=>j(e)}))},j=i(267),F={...Object(j.a)({defaultTitle:Object(a.__)("Shipping address","woo-gutenberg-products-block"),defaultDescription:Object(a.__)("Enter the address where you want your order delivered.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},O=i(158);t.default=Object(l.withFilteredAttributes)(F)(e=>{let{title:t,description:i,showStepNumber:n,children:l,className:a}=e;const{isProcessing:p}=Object(d.b)(),{showShippingFields:h}=Object(r.a)(),{requireCompanyField:b,requirePhoneField:u,showApartmentField:g,showCompanyField:m,showPhoneField:j}=Object(O.b)();return h?Object(s.createElement)(c.a,{id:"shipping-fields",disabled:p,className:o()("wc-block-checkout__shipping-fields",a),title:t,description:i,showStepNumber:n},Object(s.createElement)(w,{requireCompanyField:b,requirePhoneField:u,showApartmentField:g,showCompanyField:m,showPhoneField:j}),l):null})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/shipping-methods-frontend.js b/build/checkout-blocks/shipping-methods-frontend.js new file mode 100644 index 00000000000..71b90b5e90d --- /dev/null +++ b/build/checkout-blocks/shipping-methods-frontend.js @@ -0,0 +1,9 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[40],{106:function(e,t,n){"use strict";var c=n(0);n(135),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},135:function(e,t){},136:function(e,t){},153:function(e,t,n){"use strict";var c=n(0),a=n(1),s=(n(8),n(5)),o=n.n(s),i=(n(189),n(106));t.a=e=>{let{children:t,className:n,screenReaderLabel:s,showSpinner:r=!1,isLoading:l=!0}=e;return Object(c.createElement)("div",{className:o()(n,{"wc-block-components-loading-mask":l})},l&&r&&Object(c.createElement)(i.a,null),Object(c.createElement)("div",{className:o()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(c.createElement)("span",{className:"screen-reader-text"},s||Object(a.__)("Loading…","woo-gutenberg-products-block")))}},189:function(e,t){},260:function(e,t,n){"use strict";var c=n(0);t.a=e=>{let{label:t,secondaryLabel:n,description:a,secondaryDescription:s,id:o}=e;return Object(c.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(c.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(c.createElement)("span",{id:o&&o+"__label",className:"wc-block-components-radio-control__label"},t),n&&Object(c.createElement)("span",{id:o&&o+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},n)),Object(c.createElement)("div",{className:"wc-block-components-radio-control__description-group"},a&&Object(c.createElement)("span",{id:o&&o+"__description",className:"wc-block-components-radio-control__description"},a),s&&Object(c.createElement)("span",{id:o&&o+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},s)))}},261:function(e,t,n){"use strict";var c=n(18),a=n.n(c),s=n(0),o=n(5),i=n.n(o);n(8),n(262),t.a=e=>{let{children:t,className:n,headingLevel:c,...o}=e;const r=i()("wc-block-components-title",n),l="h"+c;return Object(s.createElement)(l,a()({className:r},o),t)}},262:function(e,t){},263:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a),o=n(260);t.a=e=>{let{checked:t,name:n,onChange:a,option:i}=e;const{value:r,label:l,description:p,secondaryLabel:d,secondaryDescription:b}=i;return Object(c.createElement)("label",{className:s()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${n}-${r}`},Object(c.createElement)("input",{id:`${n}-${r}`,className:"wc-block-components-radio-control__input",type:"radio",name:n,value:r,onChange:e=>a(e.target.value),checked:t,"aria-describedby":s()({[`${n}-${r}__label`]:l,[`${n}-${r}__secondary-label`]:d,[`${n}-${r}__description`]:p,[`${n}-${r}__secondary-description`]:b})}),Object(c.createElement)(o.a,{id:`${n}-${r}`,label:l,secondaryLabel:d,description:p,secondaryDescription:b}))}},266:function(e,t){},267:function(e,t,n){"use strict";var c=n(1);t.a=e=>{let{defaultTitle:t=Object(c.__)("Step","woo-gutenberg-products-block"),defaultDescription:n=Object(c.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:a=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:n},showStepNumber:{type:"boolean",default:a}}}},269:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a),o=n(21),i=n(263);n(270),t.a=Object(o.withInstanceId)(e=>{let{className:t,instanceId:n,id:a,selected:o,onChange:r,options:l=[]}=e;const p=a||n;return l.length&&Object(c.createElement)("div",{className:s()("wc-block-components-radio-control",t)},l.map(e=>Object(c.createElement)(i.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===o,option:e,onChange:t=>{r(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},270:function(e,t){},277:function(e,t){},281:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a),o=n(261);n(266);const i=e=>{let{title:t,stepHeadingContent:n}=e;return Object(c.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(c.createElement)(o.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!n&&Object(c.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},n))};t.a=e=>{let{id:t,className:n,title:a,legend:o,description:r,children:l,disabled:p=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const u=o||a?"fieldset":"div";return Object(c.createElement)(u,{className:s()(n,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":p}),id:t,disabled:p},!(!o&&!a)&&Object(c.createElement)("legend",{className:"screen-reader-text"},o||a),!!a&&Object(c.createElement)(i,{title:a,stepHeadingContent:b()}),Object(c.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!r&&Object(c.createElement)("p",{className:"wc-block-components-checkout-step__description"},r),Object(c.createElement)("div",{className:"wc-block-components-checkout-step__content"},l)))}},282:function(e,t,n){"use strict";var c=n(0),a=n(1),s=n(27),o=n(153),i=n(22),r=n(304),l=n(26),p=n(28),d=n(5),b=n.n(d),u=n(25),m=n(37),g=n(17),h=n.n(g),O=n(95),j=n(42);const _=e=>{var t;return null===(t=e.find(e=>e.selected))||void 0===t?void 0:t.rate_id};var k=n(269),f=n(260),w=n(48),E=n(66),v=n(2);const N=e=>{const t=Object(v.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(u.decodeEntities)(e.name),value:e.rate_id,description:Object(c.createElement)(c.Fragment,null,Number.isFinite(t)&&Object(c.createElement)(E.a,{currency:Object(w.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(u.decodeEntities)(e.delivery_time))}};var y=e=>{let{className:t,noResultsMessage:n,onSelectRate:a,rates:s,renderOption:o=N,selected:i}=e;if(0===s.length)return n;if(s.length>1)return Object(c.createElement)(k.a,{className:t,onChange:e=>{a(e)},selected:i,options:s.map(o)});const{label:r,secondaryLabel:l,description:p,secondaryDescription:d}=o(s[0]);return Object(c.createElement)(f.a,{label:r,secondaryLabel:l,description:p,secondaryDescription:d})};n(277);var S=e=>{let{packageId:t,className:n,noResultsMessage:s,renderOption:o,packageData:r,collapsible:l=!1,collapse:p=!1,showItems:d=!1}=e;const{selectShippingRate:g,selectedShippingRate:k}=((e,t)=>{const{dispatchCheckoutEvent:n}=Object(j.a)(),{selectShippingRate:a,isSelectingRate:s}=Object(O.a)(),[o,i]=Object(c.useState)(()=>_(t)),r=Object(c.useRef)(t);return Object(c.useEffect)(()=>{h()(r.current,t)||(r.current=t,i(_(t)))},[t]),{selectShippingRate:Object(c.useCallback)(t=>{i(t),a(t,e),n("set-selected-shipping-rate",{shippingRateId:t})},[e,a,n]),selectedShippingRate:o,isSelectingRate:s}})(t,r.shipping_rates),f=Object(c.createElement)(c.Fragment,null,(d||l)&&Object(c.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},r.name),d&&Object(c.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(r.items).map(e=>{const t=Object(u.decodeEntities)(e.name),n=e.quantity;return Object(c.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(c.createElement)(m.a,{label:n>1?`${t} × ${n}`:""+t,screenReaderLabel:Object(a.sprintf)( +/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ +Object(a._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))}))),w=Object(c.createElement)(y,{className:n,noResultsMessage:s,rates:r.shipping_rates,onSelectRate:g,selected:k,renderOption:o});return l?Object(c.createElement)(i.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:f},w):Object(c.createElement)("div",{className:b()("wc-block-components-shipping-rates-control__package",n)},f,w)};const R=e=>{let{packages:t,collapse:n,showItems:a,collapsible:s,noResultsMessage:o,renderOption:i}=e;return t.length?Object(c.createElement)(c.Fragment,null,t.map(e=>{let{package_id:t,...r}=e;return Object(c.createElement)(S,{key:t,packageId:t,packageData:r,collapsible:s,collapse:n,showItems:a,noResultsMessage:o,renderOption:i})})):null};t.a=e=>{let{shippingRates:t,shippingRatesLoading:n,className:d,collapsible:b=!1,noResultsMessage:u,renderOption:m}=e;Object(c.useEffect)(()=>{if(n)return;const e=Object(r.a)(t),c=Object(r.b)(t);1===e?Object(s.speak)(Object(a.sprintf)( +/* translators: %d number of shipping options found. */ +Object(a._n)("%d shipping option was found.","%d shipping options were found.",c,"woo-gutenberg-products-block"),c)):Object(s.speak)(Object(a.sprintf)( +/* translators: %d number of shipping packages packages. */ +Object(a._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(a.sprintf)( +/* translators: %d number of shipping options available. */ +Object(a._n)("%d shipping option was found","%d shipping options were found",c,"woo-gutenberg-products-block"),c))},[n,t]);const{extensions:g,receiveCart:h,...O}=Object(l.a)(),j={className:d,collapsible:b,noResultsMessage:u,renderOption:m,extensions:g,cart:O,components:{ShippingRatesControlPackage:S}},{isEditor:_}=Object(p.a)();return Object(c.createElement)(o.a,{isLoading:n,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},_?Object(c.createElement)(R,{packages:t,noResultsMessage:u,renderOption:m}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.ExperimentalOrderShippingPackages.Slot,j),Object(c.createElement)(i.ExperimentalOrderShippingPackages,null,Object(c.createElement)(R,{packages:t,noResultsMessage:u,renderOption:m}))))}},302:function(e,t,n){"use strict";var c=n(11),a=n(20),s=n(16),o=n(0),i=n(5),r=n.n(i),l=n(21),p=n(68);t.a=function(e){var t,n=e.icon,i=e.children,d=e.label,b=e.instructions,u=e.className,m=e.notices,g=e.preview,h=e.isColumnLayout,O=Object(s.a)(e,["icon","children","label","instructions","className","notices","preview","isColumnLayout"]),j=Object(l.useResizeObserver)(),_=Object(a.a)(j,2),k=_[0],f=_[1].width;"number"==typeof f&&(t={"is-large":f>=320,"is-medium":f>=160&&f<320,"is-small":f<160});var w=r()("components-placeholder",u,t),E=r()("components-placeholder__fieldset",{"is-column-layout":h});return Object(o.createElement)("div",Object(c.a)({},O,{className:w}),k,m,g&&Object(o.createElement)("div",{className:"components-placeholder__preview"},g),Object(o.createElement)("div",{className:"components-placeholder__label"},Object(o.createElement)(p.a,{icon:n}),d),!!b&&Object(o.createElement)("div",{className:"components-placeholder__instructions"},b),Object(o.createElement)("div",{className:E},i))}},304:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a}));const c=e=>e.length,a=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},306:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var c=n(2),a=n(0),s=n(51),o=n(45);const i=()=>{const{needsShipping:e}=Object(s.b)(),{billingData:t,setBillingData:n,shippingAddress:i,setShippingAddress:r,shippingAsBilling:l,setShippingAsBilling:p}=Object(o.b)(),d=Object(a.useRef)(l),b=Object(a.useRef)(t),u=Object(a.useCallback)(e=>{r(e),l&&n(e)},[l,r,n]),m=Object(a.useCallback)(t=>{n(t),e||r(t)},[e,r,n]);Object(a.useEffect)(()=>{if(d.current!==l){if(l)b.current=t,n(i);else{const{email:e,...t}=b.current;n({...t})}d.current=l}},[l,n,i,t]);const g=Object(a.useCallback)(e=>{n({email:e})},[n]),h=Object(a.useCallback)(e=>{n({phone:e})},[n]),O=Object(a.useCallback)(e=>{u({phone:e})},[u]);return{defaultAddressFields:c.defaultAddressFields,shippingFields:i,setShippingFields:u,billingFields:t,setBillingFields:m,setEmail:g,setPhone:h,setShippingPhone:O,shippingAsBilling:l,setShippingAsBilling:p,showShippingFields:e,showBillingFields:!e||!d.current}}},345:function(e,t){},346:function(e,t){},37:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a);t.a=e=>{let t,{label:n,screenReaderLabel:a,wrapperElement:o,wrapperProps:i={}}=e;const r=null!=n,l=null!=a;return!r&&l?(t=o||"span",i={...i,className:s()(i.className,"screen-reader-text")},Object(c.createElement)(t,i,a)):(t=o||c.Fragment,r&&l&&n!==a?Object(c.createElement)(t,i,Object(c.createElement)("span",{"aria-hidden":"true"},n),Object(c.createElement)("span",{className:"screen-reader-text"},a)):Object(c.createElement)(t,i,n))}},378:function(e,t,n){"use strict";n.r(t);var c=n(0),a=n(5),s=n.n(a),o=n(134),i=n(281),r=n(41),l=n(306),p=n(1),d=n(282),b=n(304),u=n(48),m=n(66),g=n(28),h=n(51),O=n(25),j=n(132),_=n(2),k=n(302),f=n(62),w=n(108),E=n(32),v=Object(c.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 13"},Object(c.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.667 2.5h1.666l3.334 3.333V10H15a2.5 2.5 0 11-5 0H6.667a2.5 2.5 0 11-5 0H0V1.667C0 .746.746 0 1.667 0H10c.92 0 1.667.746 1.667 1.667V2.5zM2.917 10a1.25 1.25 0 102.5 0 1.25 1.25 0 00-2.5 0zm-1.25-2.5V1.667H10V7.5H1.667zM11.25 10a1.25 1.25 0 102.5 0 1.25 1.25 0 00-2.5 0z"}));n(346);var N=()=>Object(c.createElement)(k.a,{icon:Object(c.createElement)(w.a,{srcElement:v}),label:Object(p.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},Object(c.createElement)("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(p.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woo-gutenberg-products-block")),Object(c.createElement)(f.a,{isSecondary:!0,href:_.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping",target:"_blank",rel:"noopener noreferrer"},Object(p.__)("Configure Shipping Options","woo-gutenberg-products-block")));n(345);const y=e=>{const t=Object(_.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(O.decodeEntities)(e.name),value:e.rate_id,description:Object(O.decodeEntities)(e.description),secondaryLabel:Object(c.createElement)(m.a,{currency:Object(u.getCurrencyFromPriceResponse)(e),value:t}),secondaryDescription:Object(O.decodeEntities)(e.delivery_time)}};var S=()=>{const{isEditor:e}=Object(g.a)(),{shippingRates:t,shippingRatesLoading:n,needsShipping:a,hasCalculatedShipping:o}=Object(h.b)();if(!a)return null;const i=Object(b.a)(t);return e||o||i?Object(c.createElement)(c.Fragment,null,e&&!i?Object(c.createElement)(N,null):Object(c.createElement)(d.a,{noResultsMessage:Object(c.createElement)(j.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(p.__)("There are no shipping options available. Please check your shipping address.","woo-gutenberg-products-block")),renderOption:y,shippingRates:t,shippingRatesLoading:n})):Object(c.createElement)("p",null,Object(p.__)("Shipping options will be displayed here after entering your full shipping address.","woo-gutenberg-products-block"))},R=n(267),C={...Object(R.a)({defaultTitle:Object(p.__)("Shipping options","woo-gutenberg-products-block"),defaultDescription:""}),allowCreateAccount:{type:"boolean",default:!1},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};t.default=Object(o.withFilteredAttributes)(C)(e=>{let{title:t,description:n,showStepNumber:a,children:o,className:p}=e;const{isProcessing:d}=Object(r.b)(),{showShippingFields:b}=Object(l.a)();return b?Object(c.createElement)(i.a,{id:"shipping-option",disabled:d,className:s()("wc-block-checkout__shipping-option",p),title:t,description:n,showStepNumber:a},Object(c.createElement)(S,null),o):null})},66:function(e,t,n){"use strict";var c=n(18),a=n.n(c),s=n(0),o=n(107),i=n(5),r=n.n(i);n(136);const l=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:c,onValueChange:i,displayType:p="text",...d}=e;const b="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(b))return null;const u=b/10**c.minorUnit;if(!Number.isFinite(u))return null;const m=r()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...l(c),value:void 0,currency:void 0,onValueChange:void 0},h=i?e=>{const t=e.value*10**c.minorUnit;i(t)}:()=>{};return Object(s.createElement)(o.a,a()({className:m,displayType:p},g,{value:u,onValueChange:h}))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/terms-frontend.js b/build/checkout-blocks/terms-frontend.js new file mode 100644 index 00000000000..c4dda93d434 --- /dev/null +++ b/build/checkout-blocks/terms-frontend.js @@ -0,0 +1,5 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[41],{246:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a}));var o=n(33),c=n(147);const r=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:r,expressPaymentMethodsInitialized:s}=Object(c.b)(),a=Object(o.a)(t),i=Object(o.a)(n);return{paymentMethods:e?i:a,isInitialized:e?s:r}},s=()=>r(!1),a=()=>r(!0)},350:function(e,t){},351:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n(1),c=n(41),r=n(147),s=n(246);const a=()=>{const{onSubmit:e,isCalculating:t,isBeforeProcessing:n,isProcessing:a,isAfterProcessing:i,isComplete:d,hasError:u}=Object(c.b)(),{paymentMethods:b={}}=Object(s.b)(),{activePaymentMethod:l,currentStatus:g}=Object(r.b)(),m=b[l]||{},p=a||i||n,h=d&&!u;return{submitButtonText:(null==m?void 0:m.placeOrderButtonLabel)||Object(o.__)("Place Order","woo-gutenberg-products-block"),onSubmit:e,isCalculating:t,isDisabled:a||g.isDoingExpressPayment,waitingForProcessing:p,waitingForRedirect:h}}},392:function(e,t,n){"use strict";n.r(t);var o=n(0),c=n(1),r=n(5),s=n.n(r),a=n(22),i=n(351),d=n(21),u=n(84);const b=u.j?`${Object(c.__)("Terms and Conditions","woo-gutenberg-products-block")}`:Object(c.__)("Terms and Conditions","woo-gutenberg-products-block"),l=u.f?`${Object(c.__)("Privacy Policy","woo-gutenberg-products-block")}`:Object(c.__)("Privacy Policy","woo-gutenberg-products-block"),g=Object(c.sprintf)( +/* translators: %1$s terms page link, %2$s privacy page link. */ +Object(c.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woo-gutenberg-products-block"),b,l),m=Object(c.sprintf)( +/* translators: %1$s terms page link, %2$s privacy page link. */ +Object(c.__)("You must accept our %1$s and %2$s to continue with your purchase.","woo-gutenberg-products-block"),b,l);n(350),t.default=Object(d.withInstanceId)(e=>{let{text:t,checkbox:n,instanceId:r,validation:d,className:u}=e;const[b,l]=Object(o.useState)(!1),{isDisabled:p}=Object(i.a)(),h="terms-and-conditions-"+r,{getValidationError:j,setValidationErrors:O,clearValidationError:_}=d,w=j(h)||{},f=w.message&&!w.hidden;return Object(o.useEffect)(()=>{if(n)return b?_(h):O({[h]:{message:Object(c.__)("Please read and accept the terms and conditions.","woo-gutenberg-products-block"),hidden:!0}}),()=>{_(h)}},[n,b,h,_,O]),Object(o.createElement)("div",{className:s()("wc-block-checkout__terms",{"wc-block-checkout__terms--disabled":p},u)},n?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.CheckboxControl,{id:"terms-and-conditions",checked:b,onChange:()=>l(e=>!e),hasError:f,disabled:p},Object(o.createElement)("span",{dangerouslySetInnerHTML:{__html:t||m}}))):Object(o.createElement)("span",{dangerouslySetInnerHTML:{__html:t||g}}))})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/totals-frontend.js b/build/checkout-blocks/totals-frontend.js new file mode 100644 index 00000000000..3d66f66eaae --- /dev/null +++ b/build/checkout-blocks/totals-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[42],{334:function(e,c,t){"use strict";var n=t(0),s=t(3),a=t(5),r=t.n(a);const o=Object(s.forwardRef)((e,c)=>{let{children:t,className:s=""}=e;return Object(n.createElement)("div",{ref:c,className:r()("wc-block-components-sidebar",s)},t)});c.a=o},354:function(e,c){},373:function(e,c,t){"use strict";t.r(c);var n=t(0),s=t(5),a=t.n(s),r=t(334);t(354),c.default=e=>{let{children:c,className:t}=e;return Object(n.createElement)(r.a,{className:a()("wc-block-checkout__sidebar",t)},c)}}}]); \ No newline at end of file diff --git a/build/checkout-frontend.asset.php b/build/checkout-frontend.asset.php new file mode 100644 index 00000000000..b2db4ee7ca8 --- /dev/null +++ b/build/checkout-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '04beabadb3c13099f0871acf081ad31b'); \ No newline at end of file diff --git a/build/checkout-frontend.js b/build/checkout-frontend.js new file mode 100644 index 00000000000..aec8e72ce03 --- /dev/null +++ b/build/checkout-frontend.js @@ -0,0 +1,5 @@ +!function(e){function t(t){for(var r,o,c=t[0],i=t[1],a=0,u=[];a=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r.d(t,"a",(function(){return n}))},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t{const t=e.detail;t&&t.preserveCartData||Object(i.dispatch)(c.CART_STORE_KEY).invalidateResolutionForStore()},f=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),f),[])},h={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},b={...h,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},v=e=>Object(s.a)(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(a.decodeEntities)(r)]})),y={cartCoupons:c.EMPTY_CART_COUPONS,cartItems:c.EMPTY_CART_ITEMS,cartFees:c.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:h,shippingRates:c.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:c.EMPTY_EXTENSIONS},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),a=null==r?void 0:r.previewCart,{shouldSelect:s}=e,d=Object(o.useRef)();m();const p=Object(i.useSelect)((e,r)=>{let{dispatch:n}=r;if(!s)return y;if(t)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:a.totals,cartIsLoading:!1,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:h,extensions:c.EMPTY_EXTENSIONS,shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:()=>{}};const o=e(c.CART_STORE_KEY),i=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),f=o.isCustomerDataUpdating(),{receiveCart:m}=n(c.CART_STORE_KEY),g=v(i.billingAddress),O=i.needsShipping?v(i.shippingAddress):g,E=i.fees.length>0?i.fees.map(e=>v(e)):c.EMPTY_CART_FEES;return{cartCoupons:i.coupons.length>0?i.coupons.map(e=>({...e,label:e.code})):c.EMPTY_CART_COUPONS,cartItems:i.items,cartFees:E,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingAddress:Object(u.a)(g),shippingAddress:Object(u.a)(O),extensions:i.extensions,shippingRates:i.shippingRates,shippingRatesLoading:f,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:m}},[s]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){e.exports=window.wp.a11y},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0);r(9);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),c=()=>Object(n.useContext)(o)},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.dom},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return d}));var n=r(52);let o,c;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(c||(c={}));const i=(e,t)=>Object(n.c)(e)&&"type"in e&&e.type===t,a=e=>i(e,o.SUCCESS),s=e=>i(e,o.ERROR),u=e=>i(e,o.FAIL),l=e=>!Object(n.c)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:c,shouldRetry:l,isSuccessResponse:a,isErrorResponse:s,isFailResponse:u})},function(e,t){e.exports=window.wp.primitives},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(17),c=r.n(o);function i(e){const t=Object(n.useRef)(e);return c()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";var n=r(29),o=r.n(n),c=r(0),i=r(3),a=r(1),s=r(84),u=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:r=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:i=Object(a.__)("Error:","woo-gutenberg-products-block"),button:u}=e;return Object(c.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(c.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(c.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(c.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(c.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(c.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},i?i+" ":"",o),u&&Object(c.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},u)))};r(55);class l extends i.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:o,renderError:i,button:a}=this.props,{errorMessage:s,hasError:l}=this.state;return l?"function"==typeof i?i({errorMessage:s}):Object(c.createElement)(u,{errorMessage:r?s:null,header:e,imageUrl:t,text:n,errorMessagePrefix:o,button:a}):this.props.children}}t.a=l},,function(e,t,r){"use strict";(function(e){var n=r(0),o=(r(60),Object(n.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,r(77))},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=r(80);const c=()=>{const{notices:e,createNotice:t,removeNotice:r,setIsSuppressed:c}=Object(o.b)(),i=Object(n.useRef)(e);Object(n.useEffect)(()=>{i.current=e},[e]);const a=Object(n.useMemo)(()=>({hasNoticesOfType:e=>i.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i.current.forEach(t=>{null!==e&&t.status!==e||r(t.id)})},removeNotice:r}),[r]),s=Object(n.useMemo)(()=>({addDefaultNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...r})},addErrorNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...r})},addWarningNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...r})},addInfoNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...r})},addSuccessNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...r})}}),[t]);return{notices:e,...a,...s,setIsSuppressed:c}}},function(e,t){e.exports=window.wp.deprecated},function(e,t,r){"use strict";r.d(t,"b",(function(){return P})),r.d(t,"a",(function(){return T}));var n=r(0),o=r(1),c=r(75),i=r(40),a=r.n(i),s=r(52);let u;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(u||(u={}));const l=()=>({type:u.SET_IDLE}),d=e=>({type:u.SET_REDIRECT_URL,redirectUrl:e}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:u.SET_COMPLETE,data:e}},f=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?u.SET_HAS_ERROR:u.SET_NO_ERROR}};var m=r(2);let h;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(h||(h={}));const b={order_id:0,customer_id:0,...Object(m.getSetting)("checkoutData",{})||{}},g={redirectUrl:"",status:h.PRISTINE,hasError:!1,calculatingCount:0,orderId:b.order_id,orderNotes:"",customerId:b.customer_id,shouldCreateAccount:!1,processingResponse:null,extensionData:{}},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,{redirectUrl:t,type:r,customerId:n,orderId:o,orderNotes:c,extensionData:i,shouldCreateAccount:a,data:s}=arguments.length>1?arguments[1]:void 0,l=e;switch(r){case u.SET_PRISTINE:l=g;break;case u.SET_IDLE:l=e.status!==h.IDLE?{...e,status:h.IDLE}:e;break;case u.SET_REDIRECT_URL:l=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case u.SET_PROCESSING_RESPONSE:l={...e,processingResponse:s};break;case u.SET_COMPLETE:l=e.status!==h.COMPLETE?{...e,status:h.COMPLETE,redirectUrl:void 0!==s&&"string"==typeof s.redirectUrl&&s.redirectUrl?s.redirectUrl:e.redirectUrl}:e;break;case u.SET_PROCESSING:l=e.status!==h.PROCESSING?{...e,status:h.PROCESSING,hasError:!1}:e,l=!1===l.hasError?l:{...l,hasError:!1};break;case u.SET_BEFORE_PROCESSING:l=e.status!==h.BEFORE_PROCESSING?{...e,status:h.BEFORE_PROCESSING,hasError:!1}:e;break;case u.SET_AFTER_PROCESSING:l=e.status!==h.AFTER_PROCESSING?{...e,status:h.AFTER_PROCESSING}:e;break;case u.SET_HAS_ERROR:l=e.hasError?e:{...e,hasError:!0},l=e.status===h.PROCESSING||e.status===h.BEFORE_PROCESSING?{...l,status:h.IDLE}:l;break;case u.SET_NO_ERROR:l=e.hasError?{...e,hasError:!1}:e;break;case u.INCREMENT_CALCULATING:l={...e,calculatingCount:e.calculatingCount+1};break;case u.DECREMENT_CALCULATING:l={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case u.SET_CUSTOMER_ID:l=void 0!==n?{...e,customerId:n}:e;break;case u.SET_ORDER_ID:l=void 0!==o?{...e,orderId:o}:e;break;case u.SET_SHOULD_CREATE_ACCOUNT:void 0!==a&&a!==e.shouldCreateAccount&&(l={...e,shouldCreateAccount:a});break;case u.SET_ORDER_NOTES:void 0!==c&&e.orderNotes!==c&&(l={...e,orderNotes:c});break;case u.SET_EXTENSION_DATA:void 0!==i&&e.extensionData!==i&&(l={...e,extensionData:i})}return l!==e&&r!==u.SET_PRISTINE&&l.status===h.PRISTINE&&(l.status=h.IDLE),l};var y=r(25),O=r(78),E=r(159);var j=r(161),S=r(154),w=r(39),k=r(42),_=r(9),C=r(31);const R=Object(n.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),P=()=>Object(n.useContext)(R),T=e=>{let{children:t,redirectUrl:r,isCart:i=!1}=e;g.redirectUrl=r;const[m,b]=Object(n.useReducer)(v,g),{setValidationErrors:P}=Object(S.b)(),{addErrorNotice:T,removeNotices:x}=Object(w.a)(),{dispatchCheckoutEvent:A}=Object(k.a)(),N=m.calculatingCount>0,{isSuccessResponse:M,isErrorResponse:I,isFailResponse:D,shouldRetry:F}=Object(C.c)(),{checkoutNotices:L,paymentNotices:V,expressPaymentNotices:B}=(()=>{const{noticeContexts:e}=Object(C.c)();return{checkoutNotices:Object(_.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(_.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(_.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[U,H]=Object(n.useReducer)(O.b,{}),z=Object(n.useRef)(U),{onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:q,onCheckoutValidationBeforeProcessing:W}=(e=>Object(n.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(E.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(E.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(E.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(n.useEffect)(()=>{z.current=U},[U]);const Y=Object(n.useMemo)(()=>function(){return a()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),W(...arguments)},[W]),$=Object(n.useMemo)(()=>({resetCheckout:()=>{b({type:u.SET_PRISTINE})},setRedirectUrl:e=>{b(d(e))},setHasError:e=>{b(f(e))},incrementCalculating:()=>{b({type:u.INCREMENT_CALCULATING})},decrementCalculating:()=>{b({type:u.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;b((t=e,{type:u.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{b((e=>({type:u.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{b((e=>({type:u.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{b((e=>({type:u.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:r,value:n}=e;t.paymentDetails[r]=Object(y.decodeEntities)(n)})),"message"in e&&(t.message=Object(y.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var r;t.redirectUrl&&b(d(t.redirectUrl)),b((r=t,{type:u.SET_PROCESSING_RESPONSE,data:r})),b({type:u.SET_AFTER_PROCESSING})}}),[]);Object(n.useEffect)(()=>{m.status===h.BEFORE_PROCESSING&&(x("error"),Object(j.a)(z.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;T(t),P(r)}),b(l()),b(f())):b({type:u.SET_PROCESSING})}))},[m.status,P,T,x,b]);const X=Object(c.a)(m.status),K=Object(c.a)(m.hasError);Object(n.useEffect)(()=>{if((m.status!==X||m.hasError!==K)&&m.status===h.AFTER_PROCESSING){const e={redirectUrl:m.redirectUrl,orderId:m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,processingResponse:m.processingResponse};m.hasError?Object(j.b)(z.current,"checkout_after_processing_with_error",e).then(t=>{const r=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message){const r=e.messageContext?{context:e.messageContext}:void 0;t=e,T(e.message,r)}}),t})(t);if(null!==r)F(r)?b(l()):b(p(r));else{if(!(L.some(e=>"error"===e.status)||B.some(e=>"error"===e.status)||V.some(e=>"error"===e.status))){var n;const t=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");T(t,{id:"checkout"})}b(l())}}):Object(j.b)(z.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,r=null;if(e.forEach(e=>{M(e)&&(t=e),(I(e)||D(e))&&(r=e)}),t&&!r)b(p(t));else if(Object(s.c)(r)){if(r.message){const e=r.messageContext?{context:r.messageContext}:void 0;T(r.message,e)}F(r)?b(f(!0)):b(p(r))}else b(p())})}},[m.status,m.hasError,m.redirectUrl,m.orderId,m.customerId,m.orderNotes,m.processingResponse,X,K,$,T,I,D,M,F,L,B,V]);const J={onSubmit:Object(n.useCallback)(()=>{A("submit"),b({type:u.SET_BEFORE_PROCESSING})},[A]),isComplete:m.status===h.COMPLETE,isIdle:m.status===h.IDLE,isCalculating:N,isProcessing:m.status===h.PROCESSING,isBeforeProcessing:m.status===h.BEFORE_PROCESSING,isAfterProcessing:m.status===h.AFTER_PROCESSING,hasError:m.hasError,redirectUrl:m.redirectUrl,onCheckoutBeforeProcessing:Y,onCheckoutValidationBeforeProcessing:W,onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:q,dispatchActions:$,isCart:i,orderId:m.orderId,hasOrder:!!m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,shouldCreateAccount:m.shouldCreateAccount,setShouldCreateAccount:e=>{return b((t=e,{type:u.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:m.extensionData};return Object(n.createElement)(R.Provider,{value:J},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(58),o=r(0),c=r(26);const i=()=>{const e=Object(c.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},,function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r!(!function(e){return"email"in e}(t)||Object(l.c)(t)===Object(l.c)(e))||!!t.country&&!u()(Object(l.b)(e),Object(l.b)(t));var h=r(41);const b=Object(n.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>null,setShippingAddress:()=>null,shippingAsBilling:!0,setShippingAsBilling:()=>null}),g=()=>Object(n.useContext)(b),v=e=>{let{children:t}=e;const{billingData:r,shippingAddress:s,setBillingData:l,setShippingAddress:g}=(()=>{const{updateCustomerData:e}=Object(c.useDispatch)(i.CART_STORE_KEY),{addErrorNotice:t,removeNotice:r}=Object(f.a)(),{billingAddress:o,shippingAddress:s}=Object(p.a)(),[l,h]=Object(n.useState)({billingData:o,shippingAddress:s}),[b,g]=Object(n.useState)(!1);!b&&m(l.shippingAddress,s)&&(h({billingData:o,shippingAddress:s}),g(!0));const v=Object(n.useRef)(l),[y]=Object(a.a)(l,1e3,{equalityFn:(e,t)=>u()(e.billingData,t.billingData)&&u()(e.shippingAddress,t.shippingAddress)}),O=Object(n.useCallback)(e=>{h(t=>({...t,billingData:{...t.billingData,...e}}))},[]),E=Object(n.useCallback)(e=>{h(t=>({...t,shippingAddress:{...t.shippingAddress,...e}}))},[]);return Object(n.useEffect)(()=>{const n=m(v.current.billingData,y.billingData),o=m(v.current.shippingAddress,y.shippingAddress);if(!n&&!o)return;const c={};n&&(c.billing_address=y.billingData),o&&(c.shipping_address=y.shippingAddress),v.current=y,e(c).then(()=>{r("checkout")}).catch(e=>{t(Object(d.b)(e),{id:"checkout"})})},[y,t,r,e]),{billingData:l.billingData,shippingAddress:l.shippingAddress,setBillingData:O,setShippingAddress:E}})(),{cartNeedsShipping:v}=Object(p.a)(),{customerId:y}=Object(h.b)(),[O,E]=Object(n.useState)(()=>{return v&&(!y||(e=s,t=r,Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r])));var e,t}),j={billingData:r,shippingAddress:s,setBillingData:l,setShippingAddress:g,shippingAsBilling:O,setShippingAsBilling:E};return Object(n.createElement)(b.Provider,{value:j},t)}},function(e,t){e.exports=window.wp.keycodes},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.wc.priceFormat},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(44);function o(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return w})),r.d(t,"a",(function(){return k}));var n=r(0),o=r(17),c=r.n(o),i=r(81);const a=e=>Object(i.a)(e.map(e=>{var t;let{package_id:r,shipping_rates:n}=e;return[r,null===(t=n.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})),s={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},u={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},l={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:s,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},d=(e,t)=>{let{type:r}=t;return Object.values(s).includes(r)?r:e};var p=r(78),f=r(159);const m=e=>({onSuccess:Object(f.a)("shipping_rates_success",e),onFail:Object(f.a)("shipping_rates_fail",e),onSelectSuccess:Object(f.a)("shipping_rate_select_success",e),onSelectFail:Object(f.a)("shipping_rate_select_fail",e)});var h=r(161),b=r(41),g=r(45),v=r(26),y=r(95);const{NONE:O,INVALID_ADDRESS:E,UNKNOWN:j}=s,S=Object(n.createContext)(l),w=()=>Object(n.useContext)(S),k=e=>{let{children:t}=e;const{dispatchActions:r}=Object(b.b)(),{shippingAddress:o,setShippingAddress:i}=Object(g.b)(),{cartNeedsShipping:l,cartHasCalculatedShipping:f,shippingRates:w,shippingRatesLoading:k,cartErrors:_}=Object(v.a)(),{selectShippingRate:C,isSelectingRate:R}=Object(y.a)(),[P,T]=Object(n.useReducer)(d,O),[x,A]=Object(n.useReducer)(p.b,{}),N=Object(n.useRef)(x),M=Object(n.useMemo)(()=>({onShippingRateSuccess:m(A).onSuccess,onShippingRateFail:m(A).onFail,onShippingRateSelectSuccess:m(A).onSelectSuccess,onShippingRateSelectFail:m(A).onSelectFail}),[A]);Object(n.useEffect)(()=>{N.current=x},[x]);const I=Object(n.useRef)(()=>a(w));Object(n.useEffect)(()=>{const e=a(w);c()(I.current,e)||(I.current=e)},[w]),Object(n.useEffect)(()=>{k?r.incrementCalculating():r.decrementCalculating()},[k,r]),Object(n.useEffect)(()=>{R?r.incrementCalculating():r.decrementCalculating()},[R,r]),Object(n.useEffect)(()=>{_.length>0&&_.some(e=>!(!e.code||!Object.values(u).includes(e.code)))?T({type:E}):T({type:O})},[_]);const D=Object(n.useMemo)(()=>({isPristine:P===O,isValid:P===O,hasInvalidAddress:P===E,hasError:P===j||P===E}),[P]);Object(n.useEffect)(()=>{k||0!==w.length&&!D.hasError||Object(h.a)(N.current,"shipping_rates_fail",{hasInvalidAddress:D.hasInvalidAddress,hasError:D.hasError})},[w,k,D.hasError,D.hasInvalidAddress]),Object(n.useEffect)(()=>{!k&&w.length>0&&!D.hasError&&Object(h.a)(N.current,"shipping_rates_success",w)},[w,k,D.hasError]),Object(n.useEffect)(()=>{R||(D.hasError?Object(h.a)(N.current,"shipping_rate_select_fail",{hasError:D.hasError,hasInvalidAddress:D.hasInvalidAddress}):Object(h.a)(N.current,"shipping_rate_select_success",I.current))},[R,D.hasError,D.hasInvalidAddress]);const F={shippingErrorStatus:D,dispatchErrorStatus:T,shippingErrorTypes:s,shippingRates:w,shippingRatesLoading:k,selectedRates:I.current,setSelectedRates:C,isSelectingRate:R,shippingAddress:o,setShippingAddress:i,needsShipping:l,hasCalculatedShipping:f,...M};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(S.Provider,{value:F},t))}},function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return c})),r.d(t,"e",(function(){return i})),r.d(t,"a",(function(){return a}));const n=e=>"number"==typeof e,o=e=>"string"==typeof e,c=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function i(e,t){return c(e)&&t in e}const a=e=>"boolean"==typeof e},function(e,t){e.exports=window.wp.url},,function(e,t){},function(e,t,r){"use strict";var n=r(57);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,c,i){if(i!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,c=Object(n.useRef)(null),i=Object(n.useRef)(0),a=Object(n.useRef)(null),s=Object(n.useRef)([]),u=Object(n.useRef)(),l=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=s.current,r=u.current;return s.current=u.current=null,i.current=e,l.current=d.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(a.current),a.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-c.current,n=e-i.current;return!c.current||r>=t||r<0||b&&n>=g},v=function(t){return a.current=null,h&&s.current?e(t):(s.current=u.current=null,l.current)},y=function(){var e=Date.now();if(n(e))return v(e);if(p.current){var o=e-c.current,a=e-i.current,s=t-o,u=b?Math.min(s,g-a):s;r(y,u)}},O=function(){for(var d=[],f=0;f0?a/2:u)+(u+a/2>window.innerWidth?window.innerWidth-u:a/2)},d=e.left;"right"===n?d=e.right:"middle"!==c&&(d=u);var p=e.right;"left"===n?p=e.left:"middle"!==c&&(p=u);var f,m={popoverLeft:d,contentWidth:d-a>0?a:d},h={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},b=r,g=null;if(!o)if("center"===r&&l.contentWidth===a)b="center";else if("left"===r&&m.contentWidth===a)b="left";else if("right"===r&&h.contentWidth===a)b="right";else{var v="left"==(b=m.contentWidth>h.contentWidth?"left":"right")?m.contentWidth:h.contentWidth;g=v!==a?v:null}if(f="center"===b?l.popoverLeft:"left"===b?m.popoverLeft:h.popoverLeft,i){var y=i.getBoundingClientRect();f=Math.min(f,y.right-a)}return{xAxis:b,popoverLeft:f,contentWidth:g}}function k(e,t,r,n,o,c,i){var a=t.height;if(o){var s=(Object(g.getScrollContainer)(c)||document.body).getBoundingClientRect().top+a-i;if(e.top<=s)return{yAxis:r,popoverTop:Math.min(e.bottom,s)}}var u=e.top+e.height/2;"bottom"===n?u=e.bottom:"top"===n&&(u=e.top);var l={popoverTop:u,contentHeight:(u-a/2>0?a/2:u)+(u+a/2>window.innerHeight?window.innerHeight-u:a/2)},d={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},f=r,m=null;if(!o)if("middle"===r&&l.contentHeight===a)f="middle";else if("top"===r&&d.contentHeight===a)f="top";else if("bottom"===r&&p.contentHeight===a)f="bottom";else{var h="top"==(f=d.contentHeight>p.contentHeight?"top":"bottom")?d.contentHeight:p.contentHeight;m=h!==a?h:null}return{yAxis:f,popoverTop:"middle"===f?l.popoverTop:"top"===f?d.popoverTop:p.popoverTop,contentHeight:m}}var _=r(23),C=r(10);var R=Object(c.createContext)({focusHistory:[]}),P=R.Provider,T=R.Consumer;P.displayName="FocusReturnProvider",T.displayName="FocusReturnConsumer",c.Component;var x=Object(y.createHigherOrderComponent)((function e(t){if((n=t)instanceof c.Component||"function"==typeof n){var r=t;return e({})(r)}var n,o=t.onFocusReturn,i=void 0===o?s.stubTrue:o;return function(e){var t=function(t){Object(f.a)(a,t);var r,n,o=(r=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(h.a)(r);if(n){var o=Object(h.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(m.a)(this,e)});function a(){var e;return Object(d.a)(this,a),(e=o.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return Object(p.a)(a,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,r=this.ownFocusedElements;if(t&&!1!==i())for(var n,o=[].concat(Object(_.a)(s.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(_.a)(r)))),[e]);n=o.pop();)if(document.body.contains(n))return void n.focus()}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(c.createElement)(e,this.props.childProps))}}]),a}(c.Component);return function(e){return Object(c.createElement)(T,null,(function(r){return Object(c.createElement)(t,{childProps:e,focus:r})}))}}}),"withFocusReturn");var A=Object(y.createHigherOrderComponent)((function(e){return function(t){Object(f.a)(i,t);var r,n,o=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(h.a)(r);if(n){var o=Object(h.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(m.a)(this,e)});function i(){var e;return Object(d.a)(this,i),(e=o.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(C.a)(e)),e}return Object(p.a)(i,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===v.TAB){var t=g.focus.tabbable.find(this.focusContainRef.current);if(t.length){var r=t[0],n=t[t.length-1];e.shiftKey&&e.target===r?(e.preventDefault(),n.focus()):(e.shiftKey||e.target!==n)&&t.includes(e.target)||(e.preventDefault(),r.focus())}}}},{key:"render",value:function(){return Object(c.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(c.createElement)(e,this.props))}}]),i}(c.Component)}),"withConstrainedTabbing"),N=r(70);var M=function(e){Object(f.a)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=Object(h.a)(t);if(r){var o=Object(h.a)(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return Object(m.a)(this,e)});function o(){return Object(d.a)(this,o),n.apply(this,arguments)}return Object(p.a)(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(c.Component),I=Object(N.a)(M);function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(h.a)(e);if(t){var o=Object(h.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(m.a)(this,r)}}var F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,r=void 0===t?document:t,n=e.className,o=void 0===n?"lockscroll":n,i=0,a=0;function s(e){var t=r.scrollingElement||r.body;e&&(a=t.scrollTop);var n=e?"add":"remove";t.classList[n](o),r.documentElement.classList[n](o),e||(t.scrollTop=a)}function u(){0===i&&s(!0),++i}function l(){1===i&&s(!1),--i}return function(e){Object(f.a)(r,e);var t=D(r);function r(){return Object(d.a)(this,r),t.apply(this,arguments)}return Object(p.a)(r,[{key:"componentDidMount",value:function(){u()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),r}(c.Component)}();function L(e){e.stopPropagation()}var V=Object(c.forwardRef)((function(e,t){var r=e.children,i=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(n.a)({},i,{ref:t,onMouseDown:L}),r)})),B=r(36);function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function H(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==r&&(e.style[t]=r)}function le(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var de=function(e){var t=e.headerTitle,r=e.onClose,i=e.onKeyDown,s=e.children,u=e.className,d=e.noArrow,p=void 0===d||d,f=e.isAlternate,m=e.position,h=void 0===m?"bottom right":m,E=(e.range,e.focusOnMount),j=void 0===E?"firstElement":E,_=e.anchorRef,C=e.shouldAnchorIncludePadding,R=e.anchorRect,P=e.getAnchorRect,T=e.expandOnMobile,x=e.animate,A=void 0===x||x,N=e.onClickOutside,M=e.onFocusOutside,D=e.__unstableSticky,L=e.__unstableSlotName,B=void 0===L?"Popover":L,U=e.__unstableObserveElement,H=e.__unstableBoundaryParent,G=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),q=Object(c.useRef)(null),W=Object(c.useRef)(null),Y=Object(c.useRef)(),$=Object(y.useViewportMatch)("medium","<"),X=Object(c.useState)(),K=Object(b.a)(X,2),J=K[0],Q=K[1],Z=z(B),ee=T&&$,re=Object(y.useResizeObserver)(),ne=Object(b.a)(re,2),oe=ne[0],de=ne[1];p=ee||p,Object(c.useLayoutEffect)((function(){if(ee)return le(Y.current,"is-without-arrow",p),le(Y.current,"is-alternate",f),se(Y.current,"data-x-axis"),se(Y.current,"data-y-axis"),ue(Y.current,"top"),ue(Y.current,"left"),ue(W.current,"maxHeight"),void ue(W.current,"maxWidth");var e=function(){if(Y.current&&W.current){var e=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(r){if(!e.current)return;return r(e.current)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if(n instanceof window.Range)return Object(g.getRectangleFromRange)(n);if(n instanceof window.Element){var c=n.getBoundingClientRect();return o?c:ae(c,n)}var i=n.top,a=n.bottom,s=i.getBoundingClientRect(),u=a.getBoundingClientRect(),l=new window.DOMRect(s.left,s.top,s.width,u.bottom-s.top);return o?l:ae(l,n)}if(e.current){var d=e.current.parentNode,p=d.getBoundingClientRect();return o?p:ae(p,d)}}(q,R,P,_,C);if(e){var t,r,n=Y.current,o=n.offsetParent,c=n.ownerDocument,i=0;if(o&&o!==c.body){var a=o.getBoundingClientRect();i=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}H&&(t=null===(r=Y.current.closest(".popover-slot"))||void 0===r?void 0:r.parentNode);var s=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=r.split(" "),s=Object(b.a)(a,3),u=s[0],l=s[1],d=void 0===l?"center":l,p=s[2],f=k(e,t,u,p,n,o,c),m=w(e,t,d,p,n,f.yAxis,i);return S(S({},m),f)}(e,de.height?de:W.current.getBoundingClientRect(),h,D,Y.current,i,t),u=s.popoverTop,l=s.popoverLeft,d=s.xAxis,m=s.yAxis,v=s.contentHeight,y=s.contentWidth;"number"==typeof u&&"number"==typeof l&&(ue(Y.current,"top",u+"px"),ue(Y.current,"left",l+"px")),le(Y.current,"is-without-arrow",p||"center"===d&&"middle"===m),le(Y.current,"is-alternate",f),se(Y.current,"data-x-axis",d),se(Y.current,"data-y-axis",m),ue(W.current,"maxHeight","number"==typeof v?v+"px":""),ue(W.current,"maxWidth","number"==typeof y?y+"px":""),Q(({left:"right",right:"left"}[d]||"center")+" "+({top:"bottom",bottom:"top"}[m]||"middle"))}}};e();var t,r,n=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),U&&(r=new window.MutationObserver(e)).observe(U,{attributes:!0}),function(){window.clearInterval(n),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),r&&r.disconnect()}}),[ee,R,P,_,C,h,de,D,U,H]),function(e,t){Object(c.useEffect)((function(){var r=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var r=g.focus.tabbable.find(t.current)[0];r?r.focus():t.current.focus()}}),0);return function(){return clearTimeout(r)}}),[])}(j,W);var pe=function(e){e.keyCode===v.ESCAPE&&r&&(e.stopPropagation(),r()),i&&i(e)},fe=Object(c.createElement)(I,{onFocusOutside:function(e){if(M)M(e);else if(N){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),N(t)}else r&&r()}},Object(c.createElement)(ce,{type:A&&J?"appear":null,options:{origin:J}},(function(e){var o=e.className;return Object(c.createElement)(V,Object(n.a)({className:a()("components-popover",u,o,{"is-expanded":ee,"is-without-arrow":p,"is-alternate":f})},G,{onKeyDown:pe,ref:Y}),ee&&Object(c.createElement)(F,null),ee&&Object(c.createElement)("div",{className:"components-popover__header"},Object(c.createElement)("span",{className:"components-popover__header-title"},t),Object(c.createElement)(ve,{className:"components-popover__close",icon:O.a,onClick:r})),Object(c.createElement)("div",{ref:W,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},oe,s)))})));return j&&(fe=Object(c.createElement)(ie,null,fe)),Z.ref&&(fe=Object(c.createElement)(te,{name:B},fe)),_||R?fe:Object(c.createElement)("span",{ref:q},fe)};de.Slot=function(e){var t=e.name,r=void 0===t?"Popover":t;return Object(c.createElement)(ee,{bubblesVirtually:!0,name:r,className:"popover-slot"})};var pe=de,fe=function(e){var t,r,n=e.shortcut,o=e.className;return n?(Object(s.isString)(n)&&(t=n),Object(s.isObject)(n)&&(t=n.display,r=n.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":r},t)):null};var me=function(e){Object(f.a)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=Object(h.a)(t);if(r){var o=Object(h.a)(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return Object(m.a)(this,e)});function o(){var e;return Object(d.a)(this,o),(e=n.apply(this,arguments)).delayedSetIsOver=Object(s.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return Object(p.a)(o,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var r=this.props.children;if(1===c.Children.count(r)){var n=c.Children.only(r);"function"==typeof n.props[e]&&n.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var r=this;return function(n){if(r.emitToChild(e,n),!(n.currentTarget.disabled||"focus"===n.type&&r.isInMouseDown)){r.delayedSetIsOver.cancel();var o=Object(s.includes)(["focus","mouseenter"],n.type);o!==r.state.isOver&&(t?r.delayedSetIsOver(o):r.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(r){t.emitToChild(e?"onMouseDown":"onMouseUp",r),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.position,n=e.text,o=e.shortcut;if(1!==c.Children.count(t))return t;var i=c.Children.only(t),a=this.state.isOver;return Object(c.cloneElement)(i,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(c.concatChildren)(i.props.children,a&&Object(c.createElement)(pe,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(c.createElement)(fe,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(c.Component),he=r(68);function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw c}}}}(ge);try{for(I.s();!(M=I.n()).done;)P[M.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){I.e(e)}finally{I.f()}}var D=!x&&(S&&_||k||!!_&&(!C||Object(s.isArray)(C)&&!C.length)&&!1!==S),F=Object(c.createElement)(A,Object(n.a)({},N,P,{className:T,"aria-label":P["aria-label"]||_,ref:t}),E&&Object(c.createElement)(he.a,{icon:E,size:j}),C);return D?Object(c.createElement)(me,{text:_,shortcut:k,position:w},F):F}))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},,,function(e,t,r){"use strict";var n=r(2),o=r(1),c=r(52);const i=Object(n.getSetting)("countryLocale",{}),a=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(c.b)(e.priority)&&(t.index=e.priority),Object(c.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},s=Object.entries(i).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,a(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==s[r]?s[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,r){"use strict";var n=r(19),o=r(11),c=r(16),i=r(0),a=r(32),s=function(e){var t=e.icon,r=e.className,n=Object(c.a)(e,["icon","className"]),a=["dashicon","dashicons","dashicons-"+t,r].filter(Boolean).join(" ");return Object(i.createElement)("span",Object(o.a)({className:a},n))};function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:o=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const c=n(e,r),i=o(e,r),a={...e.dataset,...c.attributes||{}};e.classList.remove("is-loading"),u({Block:t,container:e,props:c,attributes:a,errorBoundaryProps:i})})},u=e=>{let{Block:t,container:r,attributes:n={},props:a={},errorBoundaryProps:s={}}=e;Object(c.render)(Object(c.createElement)(i.a,s,Object(c.createElement)(c.Suspense,{fallback:Object(c.createElement)("div",{className:"wc-block-placeholder"})},Object(c.createElement)(t,o()({},a,{attributes:n})))),r)},l=e=>{const t=document.body.querySelectorAll(a.join(","));(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:c}=e;const i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,c)),s({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({...e,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:c}=e;const i=c.querySelectorAll(o);s({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},,function(e,t){var r,n,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===c||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:c}catch(e){r=c}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,u=[],l=!1,d=-1;function p(){l&&s&&(l=!1,s.length?u=s.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=a(p);l=!0;for(var t=u.length;t;){for(s=u,u=[];++d1)for(var r=1;r2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},i={},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,eventType:r,id:n,callback:c,priority:a}=arguments.length>1?arguments[1]:void 0;const s=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return s.set(n,{priority:a,callback:c}),{...e,[r]:s};case o.REMOVE_EVENT_CALLBACK:return s.delete(n),{...e,[r]:s}}}},function(e,t){e.exports=window.regeneratorRuntime},function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return b}));var n=r(0),o=(r(8),r(9)),c=r(42),i=r(28),a=r(18),s=r.n(a),u=r(5),l=r.n(u),d=r(132);r(85);const p=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var f=e=>{let{className:t,notices:r,removeNotice:o}=e;const c=r.filter(e=>"snackbar"!==e.type);if(!c.length)return null;const i=l()(t,"wc-block-components-notices");return Object(n.createElement)("div",{className:i},c.map(e=>Object(n.createElement)(d.a,s()({key:"store-notice-"+e.id},e,{className:l()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(n.createContext)({notices:[],createNotice:(e,t,r)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),h=()=>Object(n.useContext)(m),b=e=>{let{children:t,className:r="",createNoticeContainer:a=!0,context:s="wc/core"}=e;const{createNotice:u,removeNotice:l}=Object(o.useDispatch)("core/notices"),[d,p]=Object(n.useState)(!1),{dispatchStoreEvent:h}=Object(c.a)(),{isEditor:b}=Object(i.a)(),g=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u(e,t,{...r,context:r.context||s}),h("store-notice-create",{status:e,content:t,options:r})}),[u,h,s]),v=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;l(e,t)}),[l,s]),{notices:y}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(s)}),[s]),O={notices:y,createNotice:g,removeNotice:v,context:s,setIsSuppressed:p},E=d?null:Object(n.createElement)(f,{className:r,notices:O.notices,removeNotice:O.removeNotice,isEditor:b});return Object(n.createElement)(m.Provider,{value:O},a&&E,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},,,function(e,t,r){"use strict";r.d(t,"n",(function(){return c})),r.d(t,"l",(function(){return i})),r.d(t,"k",(function(){return a})),r.d(t,"m",(function(){return s})),r.d(t,"i",(function(){return u})),r.d(t,"d",(function(){return l})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return v}));var n,o=r(2);const c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=c.pluginUrl+"images/",a=c.pluginUrl+"build/",s=c.buildPhase,u=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},function(e,t){},function(e,t){e.exports=window.wp.autop},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return a}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:c,detail:i={}}=t;if(!n)return;c||(c=document.body);const a=new n(e,{bubbles:r,cancelable:o,detail:i});c.dispatchEvent(a)};let c;const i=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}},function(e,t,r){"use strict";var n=r(0),o=r(32),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},,,,function(e,t,r){var n=r(112),o=r(93),c=o.setStyleProp,i=n.html,a=n.svg,s=n.isCustomAttribute,u=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,l;e=e||{};var d={};for(t in e)n=e[t],s(t)?d[t]=n:(r=t.toLowerCase(),u.call(i,r)?d[(l=i[r]).propertyName]=!!(l.hasBooleanValue||l.hasOverloadedBooleanValue&&!n)||n:u.call(a,t)?d[(l=a[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return c(e.style,d),d}},function(e,t,r){var n=r(3),o=r(116).default,c={reactCompat:!0},i=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:i,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,c={},i={};for(r in e)n=e[r],o&&(c=t(r,n))&&2===c.length?i[c[0]]=c[1]:"string"==typeof n&&(i[n]=r);return i},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,c))}}},function(e,t,r){for(var n,o=r(122).CASE_SENSITIVE_TAG_NAMES,c={},i=0,a=o.length;i{const e=Object(i.a)(),{selectShippingRate:t}=Object(n.useDispatch)(c.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((r,n)=>{t(r,n).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(n.useSelect)(e=>e(c.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";var n=r(18),o=r.n(n),c=r(0);r(109);const i=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(c.useRef)(null);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(c.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];i(e),null==e||e.focus()}else i(e)})(e,r):i(e))})(r.current,e)}})))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(3),o=r(61);function c(e,t){return e===t}function i(e){return"function"==typeof e?function(){return e}:e}function a(e,t,r){var a=r&&r.equalityFn||c,s=function(e){var t=Object(n.useState)(i(e)),r=t[0],o=t[1];return[r,Object(n.useCallback)((function(e){return o(i(e))}),[])]}(e),u=s[0],l=s[1],d=Object(o.a)(Object(n.useCallback)((function(e){return l(e)}),[l]),t,r),p=Object(n.useRef)(e);return a(p.current,e)||(d(e),p.current=e),[u,d]}},,function(e,t,r){var n=r(111),o=r(92),c=r(120),i={decodeEntities:!0,lowerCaseAttributeNames:!1};function a(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(c(e,(t=t||{}).htmlparser2||i),t)}a.domToReact=n,a.htmlToDOM=c,a.attributesToProps=o,e.exports=a,e.exports.default=a},,function(e,t){e.exports=window.wp.wordcount},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(18)),c=n(r(145)),i=r(3),a=n(i),s=n(r(140)),u=n(r(146)),l={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(l.str(e)||l.num(e))return e===t;if(l.obj(e)&&l.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!l.und(r)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return l.und(e)||l.nul(e)?t:e}function f(e){return l.und(e)?[]:l.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=r.length)break;c=r[o++]}else{if((o=r.next()).done)break;c=o.value}for(var i=c,a=!1,s=0;s=f.startTime+u.duration;else if(u.decay)b=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(l=Math.abs(f.lastPosition-b)<.1)&&(h=b);else{d=void 0!==f.lastTime?f.lastTime:t,y=void 0!==f.lastVelocity?f.lastVelocity:u.initialVelocity,t>d+64&&(d=t);for(var O=Math.floor(t-d),E=0;Eh:b=e);++r);return r-1}(e,c);return function(e,t,r,n,o,c,i,a,s){var u=s?s(e):e;if(ur){if("identity"===a)return u;"clamp"===a&&(u=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?u=-u:r===1/0?u-=t:u=(u-t)/(r-t),u=c(u),n===-1/0?u=-u:o===1/0?u+=n:u=u*(o-n)+n,u)}(e,c[t],c[t+1],o[t],o[t+1],s,i,a,n.map)}}var B=function(e){function t(r,n,o,c){var i;return(i=e.call(this)||this).calc=void 0,i.payload=r instanceof y&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],i.calc=V(n,o,c),i}s(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=V(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(y),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}s(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new B(this,e,t,r)},t}(v),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}s(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new B(this,e,t)},t}(y),z=0,G=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,i=t.to,a=c(t,["delay","to"]);if(l.arr(i)||l.fun(i))this.queue.push(o({},a,{delay:n,to:i}));else if(i){var s={};Object.entries(i).forEach((function(e){var t,r=e[0],c=e[1],i=o({to:(t={},t[r]=c,t),delay:m(n,r)},a),u=s[i.delay]&&s[i.delay].to;s[i.delay]=o({},s[i.delay],i,{to:o({},u,i.to)})})),this.queue=Object.values(s)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,c=e.to,i=void 0===c?{}:c;l.obj(n)&&(t.merged=o({},n,t.merged)),l.obj(i)&&(t.merged=o({},t.merged,i))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,i){var a=o.delay,s=c(o,["delay"]),u=function(o){i===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=l.arr(s.to)||l.fun(s.to);a?setTimeout((function(){r===t.guid&&(d?t.runAsync(s,u):t.diff(s).start(u))}),a):d?t.runAsync(s,u):t.diff(s).start(u)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,F.has(this)||F.add(this),D||(D=!0,w(x||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,F.has(this)&&F.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(l.arr(n.to))for(var s=function(e){var t=e,c=o({},n,h(n.to[t]));l.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===r.guid)return new Promise((function(e){return r.diff(c).start(e)}))}))},u=0;u=n.length)return"break";i=n[c++]}else{if((c=n.next()).done)return"break";i=c.value}var r=i.key,a=function(e){return e.key!==r};(l.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},n=e.current.deleted,o=Array.isArray(n),c=0;for(n=o?n:n[Symbol.iterator]();;){var i;if("break"===r())break}e.current.forceUpdate()}var K=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof v||(t=b.transform(t)),r.payload=t,r}return s(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function ue(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,c=se(o,n,e+1/3),i=se(o,n,e),a=se(o,n,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ie.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(le(r[1])<<24|le(r[2])<<16|le(r[3])<<8|255)>>>0:(r=te.exec(t))?(le(r[1])<<24|le(r[2])<<16|le(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=ae.exec(t))?parseInt(r[1],16)>>>0:(r=ce.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|ue(de(r[1]),fe(r[2]),fe(r[3])))>>>0:(r=ne.exec(t))?(ue(de(r[1]),fe(r[2]),fe(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}ve=Object.keys(ve).reduce((function(e,t){return ye.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),ve);var Ee={};N((function(e){return new K(e)})),P("div"),_((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return V(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),j(J),E((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var u in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(u)){var l=0===u.indexOf("--"),d=Oe(u,r[u],l);"float"===u&&(u="cssFloat"),l?e.style.setProperty(u,d):e.style[u]=d}for(var p in a){var f=s?p:Ee[p]||(Ee[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,a[p])}}),(function(e){return e}));var je,Se,we=(je=function(e){return i.forwardRef((function(t,r){var n=d(),s=i.useRef(!0),u=i.useRef(null),p=i.useRef(null),f=i.useCallback((function(e){var t=u.current;u.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,u.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){s.current=!1,u.current&&u.current.detach()}}),[]),i.useImperativeHandle(r,(function(){return A(p,s,n)})),f(t);var m,h=u.current.getValue(),g=(h.scrollTop,h.scrollLeft,c(h,["scrollTop","scrollLeft"])),v=(m=e,!l.fun(m)||m.prototype instanceof a.Component?function(e){return p.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return a.createElement(e,o({},g,{ref:v}))}))},void 0===(Se=!1)&&(Se=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=Se?t[0].toLowerCase()+t.substring(1):t;return e[r]=je(r),e}),je)}),ke=we(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=we,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=L,t.animated=ke,t.a=ke,t.interpolate=function(e,t,r){return e&&new B(e,t,r)},t.Globals=M,t.useSpring=function(e){var t=l.fun(e),r=q(1,t?e:[e]),n=r[0],o=r[1],c=r[2];return t?[n[0],o,c]:n},t.useTrail=function(e,t){var r=i.useRef(!1),n=l.fun(t),c=m(t),a=i.useRef(),s=q(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:m(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),u=s[0],d=s[1],p=s[2],f=i.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,i=a.current[n];return o({},e,{config:m(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){r.current&&!n&&f(t)})),i.useEffect((function(){r.current=!0}),[]),n?[u,f,p]:u},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),a=$(n),s=a.lazy,u=void 0!==s&&s,l=(a.unique,a.reset),p=void 0!==l&&l,f=(a.enter,a.leave,a.update,a.onDestroyed),h=(a.keys,a.items,a.onFrame),b=a.onRest,g=a.onStart,v=a.ref,y=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=d(),E=i.useRef(!1),j=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!E.current&&new Map,forceUpdate:O});return i.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(j.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(j.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(j.current.instances).map((function(e){return e[1]}))}}})),j.current=function(e,t){for(var r=e.first,n=e.prevProps,i=c(e,["first","prevProps"]),a=$(t),s=a.items,u=a.keys,l=a.initial,d=a.from,p=a.enter,f=a.leave,h=a.update,b=a.trail,g=void 0===b?0:b,v=a.unique,y=a.config,O=a.order,E=void 0===O?["enter","leave","update"]:O,j=$(n),S=j.keys,w=j.items,k=o({},i.current),_=[].concat(i.deleted),C=Object.keys(k),R=new Set(C),P=new Set(u),T=u.filter((function(e){return!R.has(e)})),x=i.transitions.filter((function(e){return!e.destroyed&&!P.has(e.originalKey)})).map((function(e){return e.originalKey})),A=u.filter((function(e){return R.has(e)})),N=-g;E.length;)switch(E.shift()){case"enter":T.forEach((function(e,t){v&&_.find((function(t){return t.originalKey===e}))&&(_=_.filter((function(t){return t.originalKey!==e})));var n=u.indexOf(e),o=s[n],c=r&&void 0!==l?"initial":"enter";k[e]={slot:c,originalKey:e,key:v?String(e):W++,item:o,trail:N+=g,config:m(y,o,c),from:m(r&&void 0!==l?l||{}:d,o),to:m(p,o)}}));break;case"leave":x.forEach((function(e){var t=S.indexOf(e),r=w[t];_.unshift(o({},k[e],{slot:"leave",destroyed:!0,left:S[Math.max(0,t-1)],right:S[Math.min(S.length,t+1)],trail:N+=g,config:m(y,r,"leave"),to:m(f,r)})),delete k[e]}));break;case"update":A.forEach((function(e){var t=u.indexOf(e),r=s[t];k[e]=o({},k[e],{item:r,slot:"update",trail:N+=g,config:m(y,r,"update"),to:m(h,r)})}))}var M=u.map((function(e){return k[e]}));return _.forEach((function(e){var t,r=e.left,n=(e.right,c(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[n],M.slice(t))})),o({},i,{changed:T.length||x.length||A.length,first:r&&0===T.length,transitions:M,current:k,deleted:_,prevProps:t})}(j.current,n),j.current.changed&&j.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,c=e.config,i=e.trail,a=e.key,s=e.item;j.current.instances.has(a)||j.current.instances.set(a,new G);var l=j.current.instances.get(a),d=o({},y,{to:n,from:r,config:c,ref:v,onRest:function(r){j.current.mounted&&(e.destroyed&&(v||u||X(j,a),f&&f(s)),!Array.from(j.current.instances).some((function(e){return!e[1].idle}))&&(v||u)&&j.current.deleted.length>0&&X(j),b&&b(s,t,r))},onStart:g&&function(){return g(s,t)},onFrame:h&&function(e){return h(s,t,e)},delay:i,reset:p&&"enter"===t});l.update(d),j.current.paused||l.start()})),i.useEffect((function(){return j.current.mounted=E.current=!0,function(){j.current.mounted=E.current=!1,Array.from(j.current.instances).map((function(e){return e[1].destroy()})),j.current.instances.clear()}}),[]),j.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:j.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=i.useRef();i.useEffect((function(){l.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=r*t[n];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=q},,,,,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:r,height:r,...o}):null}},function(e,t){},,function(e,t,r){var n=r(3),o=r(92),c=r(93),i=c.setStyleProp;function a(e){return c.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&c.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var c,s,u,l,d=(r=r||{}).library||n,p=d.cloneElement,f=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,v=0,y=t.length;v1&&(s=p(s,{key:s.key||v})),h.push(s);else if("text"!==c.type){switch(u=c.attribs,a(c)?i(u.style,u):u&&(u=o(u)),l=null,c.type){case"script":case"style":c.children[0]&&(u.dangerouslySetInnerHTML={__html:c.children[0].data});break;case"tag":"textarea"===c.name&&c.children[0]?u.defaultValue=c.children[0].data:c.children&&c.children.length&&(l=e(c.children,r));break;default:continue}y>1&&(u.key=v),h.push(f(c.name,u,l))}else g?c.data.trim()&&h.push(c.data):h.push(c.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(113),o=r(114),c=r(115),i=c.MUST_USE_PROPERTY,a=c.HAS_BOOLEAN_VALUE,s=c.HAS_NUMERIC_VALUE,u=c.HAS_POSITIVE_NUMERIC_VALUE,l=c.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,c,p=e.Properties,f=e.DOMAttributeNames;for(o in p)n=f[o]||(r?o:o.toLowerCase()),c=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(c,i),hasBooleanValue:d(c,a),hasNumericValue:d(c,s),hasPositiveNumericValue:d(c,u),hasOverloadedBooleanValue:d(c,l)}}var f={};p(n,f);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:f,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(117)),c=r(119);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[c.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(118);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var c,i,a=n(e),s="function"==typeof t,u=0,l=a.length;u/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(a);return r&&r[1]&&(t=r[1],i&&(e=e.replace(r[0],""))),c(n(e),null,t)}},function(e,t,r){var n=r(94),o=/<([a-zA-Z]+[0-9]?)/,c=//i,i=//i,a=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,s=n.isIE(9),u=s||n.isIE(),l=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,f=s?"text/xml":"text/html";l=d=function(e,t){return t&&(e="<"+t+">"+e+""),s&&(e=e.replace(a,"<$1$2$3/>")),p.parseFromString(e,f)}}if(document.implementation){var m=document.implementation.createHTMLDocument(u?"html-dom-parser":void 0);l=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,a,s=e.match(o);switch(s&&s[1]&&(t=s[1].toLowerCase()),t){case"html":return r=d(e),c.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),i.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return a=l(e).getElementsByTagName(t),i.test(e)&&c.test(e)?a[0].parentNode.childNodes:a;default:return h?h(e):l(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(4),c=r(5),i=r.n(c),a=r(27),s=r(1),u=(r(60),r(62));t.a=Object(n.forwardRef)((function(t,r){var c=t.className,l=t.children,d=t.spokenMessage,p=void 0===d?l:d,f=t.politeness,m=void 0===f?"polite":f,h=t.actions,b=void 0===h?[]:h,g=t.onRemove,v=void 0===g?o.noop:g;!function(e,t){var r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)((function(){r&&Object(a.speak)(r,t)}),[r,t])}(p,m),Object(n.useEffect)((function(){var e=setTimeout((function(){v()}),1e4);return function(){return clearTimeout(e)}}),[]);var y=i()(c,"components-snackbar");return b&&b.length>1&&(void 0!==e&&e.env,b=[b[0]]),Object(n.createElement)("div",{ref:r,className:y,onClick:v,tabIndex:"0",role:"button",onKeyPress:v,"aria-label":Object(s.__)("Dismiss this notice")},Object(n.createElement)("div",{className:"components-snackbar__content"},l,b.map((function(e,t){var r=e.label,o=e.onClick,c=e.url;return Object(n.createElement)(u.a,{key:t,href:c,isTertiary:!0,onClick:function(e){e.stopPropagation(),o&&o(e)},className:"components-snackbar__action"},r)}))))}))}).call(this,r(77))},function(e,t){e.exports=window.wp.plugins},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return a})),r.d(t,"a",(function(){return s}));var n=r(2),o=r(67),c=r(53);const i=e=>{let{country:t="",state:r="",city:n="",postcode:o=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},a=e=>{let{email:t=""}=e;return Object(c.isEmail)(t)?t.trim():""},s=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),c=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(c[r]="")}),c}},function(e,t,r){"use strict";var n=r(0),o=r(4),c=r(5),i=r.n(c),a=r(1),s=r(27),u=r(88),l=r(62);t.a=function(e){var t=e.className,r=e.status,c=void 0===r?"info":r,d=e.children,p=e.spokenMessage,f=void 0===p?d:p,m=e.onRemove,h=void 0===m?o.noop:m,b=e.isDismissible,g=void 0===b||b,v=e.actions,y=void 0===v?[]:v,O=e.politeness,E=void 0===O?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(c):O,j=e.__unstableHTML;!function(e,t){var r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)((function(){r&&Object(s.speak)(r,t)}),[r,t])}(f,E);var S=i()(t,"components-notice","is-"+c,{"is-dismissible":g});return j&&(d=Object(n.createElement)(n.RawHTML,null,d)),Object(n.createElement)("div",{className:S},Object(n.createElement)("div",{className:"components-notice__content"},d,y.map((function(e,t){var r=e.className,o=e.label,c=e.isPrimary,a=e.noDefaultClasses,s=void 0!==a&&a,u=e.onClick,d=e.url;return Object(n.createElement)(l.a,{key:t,href:d,isPrimary:c,isSecondary:!s&&!d,isLink:!s&&!!d,onClick:d?void 0:u,className:i()("components-notice__action",r)},o)}))),g&&Object(n.createElement)(l.a,{className:"components-notice__dismiss",icon:u.a,label:Object(a.__)("Dismiss this notice"),onClick:h,showTooltip:!1}))}},,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,,,,function(e,t,r){var n=r(141);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,r(t,n)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},,,,function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"b",(function(){return F})),r.d(t,"a",(function(){return L}));var n=r(0);let o,c;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(o||(o={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method"}(c||(c={}));const i={currentStatus:o.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},a={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:o,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:()=>{},activeSavedToken:"",setActiveSavedToken:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1},s=e=>!("object"!=typeof e||!e.isSavedToken);var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:a="",paymentMethods:u={}}=arguments.length>1?arguments[1]:void 0;switch(t){case o.STARTED:return{...e,currentStatus:o.STARTED,paymentMethodData:r||e.paymentMethodData,hasSavedToken:s(r||e.paymentMethodData)};case o.ERROR:return e.currentStatus!==o.ERROR?{...e,currentStatus:o.ERROR,errorMessage:a||e.errorMessage}:e;case o.FAILED:return e.currentStatus!==o.FAILED?{...e,currentStatus:o.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:a||e.errorMessage}:e;case o.SUCCESS:return e.currentStatus!==o.SUCCESS?{...e,currentStatus:o.SUCCESS,paymentMethodData:r||e.paymentMethodData,hasSavedToken:s(r||e.paymentMethodData)}:e;case o.PROCESSING:return e.currentStatus!==o.PROCESSING?{...e,currentStatus:o.PROCESSING,errorMessage:""}:e;case o.COMPLETE:return e.currentStatus!==o.COMPLETE?{...e,currentStatus:o.COMPLETE}:e;case o.PRISTINE:return{...i,currentStatus:o.PRISTINE,paymentMethods:{...e.paymentMethods},expressPaymentMethods:{...e.expressPaymentMethods},shouldSavePaymentMethod:e.shouldSavePaymentMethod};case c.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:u};case c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:u};case c.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n}}},l=r(1),d=r(24),p=r(33),f=r(2),m=r(61),h=r(28),b=r(51),g=r(45),v=r(26),y=r(39),O=r(31);const E=(e,t,r,o)=>{const[c,i]=Object(n.useState)(!1),{isEditor:a}=Object(h.a)(),{selectedRates:s}=Object(b.b)(),{billingData:u,shippingAddress:d}=Object(g.b)(),O=Object(p.a)(s),E=Object(p.a)(r),j=Object(v.a)(),{cartTotals:S,cartNeedsShipping:w,paymentRequirements:k}=j,_=Object(n.useRef)({cart:j,cartTotals:S,cartNeedsShipping:w,billingData:u,shippingAddress:d,selectedShippingMethods:O,paymentRequirements:k}),{addErrorNotice:C}=Object(y.a)();Object(n.useEffect)(()=>{_.current={cart:j,cartTotals:S,cartNeedsShipping:w,billingData:u,shippingAddress:d,selectedShippingMethods:O,paymentRequirements:k}},[j,S,w,u,d,O,k]);const R=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e{P()},[P,j,O,u]),c},j=e=>({type:e}),S=e=>({type:o.ERROR,errorMessage:e}),w=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:o.FAILED,errorMessage:t,paymentMethodData:r}},k=e=>{let{paymentMethodData:t}=e;return{type:o.SUCCESS,paymentMethodData:t}},_=e=>{let{paymentMethodData:t}=e;return{type:o.STARTED,paymentMethodData:t}},C=e=>({type:c.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),P=e=>({type:c.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e});var T=r(42),x=r(41),A=r(78),N=r(159);var M=r(161),I=r(154);const D=Object(n.createContext)(a),F=()=>Object(n.useContext)(D),L=e=>{let{children:t}=e;const{isProcessing:r,isIdle:c,isCalculating:a,hasError:s}=Object(x.b)(),{isEditor:l,getPreviewData:p}=Object(h.a)(),{setValidationErrors:m}=Object(I.b)(),{addErrorNotice:v,removeNotice:F}=Object(y.a)(),{isSuccessResponse:L,isErrorResponse:V,isFailResponse:B,noticeContexts:U}=Object(O.c)(),[H,z]=Object(n.useReducer)(A.b,{}),{onPaymentProcessing:G}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(N.a)("payment_processing",e)}),[e]))(z),q=Object(n.useRef)(H);Object(n.useEffect)(()=>{q.current=H},[H]);const[W,Y]=Object(n.useReducer)(u,i),{dispatchActions:$,setPaymentStatus:X}=(e=>{const{setBillingData:t}=Object(g.b)(),{setShippingAddress:r}=Object(b.b)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(C(t))},setRegisteredExpressPaymentMethods:t=>{e(R(t))},setShouldSavePayment:t=>{e(P(t))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(j(o.PRISTINE)),started:t=>{e(_({paymentMethodData:t}))},processing:()=>e(j(o.PROCESSING)),completed:()=>e(j(o.COMPLETE)),error:t=>e(S(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(w({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof c&&null!=c&&c.address&&r(c.address),e(k({paymentMethodData:n}))}}),[e,t,r])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:r}=Object(O.c)(),n=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return E(e,t,Array.from(n),r.PAYMENTS)})($.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:r}=Object(O.c)();return E(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})($.setRegisteredExpressPaymentMethods),{activePaymentMethod:Q,activeSavedToken:Z,setActivePaymentMethod:ee,setActiveSavedToken:te}=(()=>{const{dispatchCheckoutEvent:e}=Object(T.a)(),[t,r]=Object(n.useState)(""),[o,c]=Object(n.useState)("");return Object(n.useEffect)(()=>{e("set-active-payment-method",{activePaymentMethod:t})},[e,t]),{activePaymentMethod:t,activeSavedToken:o,setActivePaymentMethod:r,setActiveSavedToken:c}})(),re=Object(n.useMemo)(()=>l?p("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(W.paymentMethods):{},[l,p,K,W.paymentMethods]),ne=Object(n.useCallback)(e=>{e?v(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):F("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[v,U.EXPRESS_PAYMENTS,F]),oe=Object.keys(W.expressPaymentMethods).includes(Q),ce=Object(n.useMemo)(()=>({isPristine:W.currentStatus===o.PRISTINE,isStarted:W.currentStatus===o.STARTED,isProcessing:W.currentStatus===o.PROCESSING,isFinished:[o.ERROR,o.FAILED,o.SUCCESS].includes(W.currentStatus),hasError:W.currentStatus===o.ERROR,hasFailed:W.currentStatus===o.FAILED,isSuccessful:W.currentStatus===o.SUCCESS,isDoingExpressPayment:W.currentStatus!==o.PRISTINE&&oe}),[W.currentStatus,oe]);Object(n.useEffect)(()=>{const e=Object.keys(W.paymentMethods),t=[...e,...Object.keys(W.expressPaymentMethods)];K&&e.length&&ee(e=>e&&t.includes(e)?e:(X().pristine(),Object.keys(W.paymentMethods)[0]))},[K,W.paymentMethods,W.expressPaymentMethods,ee,X]),Object(n.useEffect)(()=>{!r||s||a||ce.isFinished||X().processing()},[r,s,a,ce.isFinished,X]),Object(n.useEffect)(()=>{c&&!ce.isSuccessful&&X().pristine()},[c,ce.isSuccessful,X]),Object(n.useEffect)(()=>{s&&ce.isSuccessful&&!W.hasSavedToken&&X().pristine()},[s,ce.isSuccessful,W.hasSavedToken,X]),Object(n.useEffect)(()=>{ce.isProcessing&&(F("wc-payment-error",U.PAYMENTS),Object(M.b)(q.current,"payment_processing",{}).then(e=>{let t,r;var n,o,c,i,a,s;if(e.forEach(e=>{L(e)&&(t=e),(V(e)||B(e))&&(r=e)}),t&&!r)X().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(c=t)||void 0===c||null===(i=c.meta)||void 0===i?void 0:i.billingData,null===(a=t)||void 0===a||null===(s=a.meta)||void 0===s?void 0:s.shippingData);else if(r&&B(r)){var u,l,d,p,f,h;r.message&&r.message.length&&v(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(h=r)||void 0===h?void 0:h.messageContext)||U.PAYMENTS}),X().failed(null===(u=r)||void 0===u?void 0:u.message,null===(l=r)||void 0===l||null===(d=l.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingData)}else if(r){var b,g;r.message&&r.message.length&&v(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(g=r)||void 0===g?void 0:g.messageContext)||U.PAYMENTS}),X().error(r.message),m(null===(b=r)||void 0===b?void 0:b.validationErrors)}else X().success()}))},[ce.isProcessing,m,X,F,U.PAYMENTS,L,B,V,v]);const ie={setPaymentStatus:X,currentStatus:ce,paymentStatuses:o,paymentMethodData:W.paymentMethodData,errorMessage:W.errorMessage,activePaymentMethod:Q,setActivePaymentMethod:ee,activeSavedToken:Z,setActiveSavedToken:te,onPaymentProcessing:G,customerPaymentMethods:re,paymentMethods:W.paymentMethods,expressPaymentMethods:W.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:ne,isExpressPaymentMethodActive:oe,shouldSavePayment:W.shouldSavePaymentMethod,setShouldSavePayment:$.setShouldSavePayment};return Object(n.createElement)(D.Provider,{value:ie},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return j}));var n=r(0),o=r(128),c=r(2),i=r(34),a=r(147),s=r(51),u=r(45),l=r(41),d=r(1),p=r(47),f=r.n(p),m=r(131),h=r(96);const b=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},g=(e,t)=>{f.a.setNonce&&"function"==typeof f.a.setNonce&&f.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var v=r(154),y=r(26),O=r(39),E=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:c,isBeforeProcessing:i,isComplete:p,orderNotes:E,shouldCreateAccount:j,extensionData:S}=Object(l.b)(),{hasValidationErrors:w}=Object(v.b)(),{shippingErrorStatus:k}=Object(s.b)(),{billingData:_,shippingAddress:C}=Object(u.b)(),{cartNeedsPayment:R,receiveCart:P}=Object(y.a)(),{activePaymentMethod:T,isExpressPaymentMethodActive:x,currentStatus:A,paymentMethodData:N,expressPaymentMethods:M,paymentMethods:I,shouldSavePayment:D}=Object(a.b)(),{addErrorNotice:F,removeNotice:L,setIsSuppressed:V}=Object(O.a)(),B=Object(n.useRef)(_),U=Object(n.useRef)(C),H=Object(n.useRef)(o),[z,G]=Object(n.useState)(!1),q=Object(n.useMemo)(()=>{var e;const t={...M,...I};return null==t||null===(e=t[T])||void 0===e?void 0:e.paymentMethodId},[T,M,I]),W=w&&!x||A.hasError||k.hasError,Y=!e&&!W&&(A.isSuccessful||!R)&&c;Object(n.useEffect)(()=>{V(x)},[x,V]),Object(n.useEffect)(()=>{W===e||!c&&!i||x||r.setHasError(W)},[W,e,c,i,x,r]),Object(n.useEffect)(()=>{B.current=_,U.current=C,H.current=o},[_,C,o]);const $=Object(n.useCallback)(()=>!w&&(A.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!k.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,A.hasError,k.hasError]);Object(n.useEffect)(()=>{let e;return x||(e=t($,0)),()=>{x||e()}},[t,$,x]),Object(n.useEffect)(()=>{H.current&&(window.location.href=H.current)},[p]);const X=Object(n.useCallback)(async()=>{if(z)return;G(!0),L("checkout");const e=R?{payment_method:q,payment_data:b(N,D,T)}:{},t={billing_address:Object(m.a)(B.current),shipping_address:Object(m.a)(U.current),customer_note:E,should_create_account:j,...e,extensions:{...S}};f()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(g(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),G(!1)}).catch(e=>{g(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&P(e.data.cart),F(Object(h.b)(e),{id:"checkout"}),null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{F(e.message,{id:e.error_code})}),r.setHasError(!0),r.setAfterProcessing(e),G(!1)})})},[z,L,E,j,R,q,N,D,T,S,r,F,P]);return Object(n.useEffect)(()=>{Y&&!z&&X()},[X,Y,z]),null};const j=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(l.a,{redirectUrl:d,isCart:r},Object(n.createElement)(u.a,null,Object(n.createElement)(s.a,null,Object(n.createElement)(a.a,null,t,Object(n.createElement)(i.a,{renderError:c.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(E,null)))))}},,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return u}));var n=r(0),o=r(4),c=r(17),i=r.n(c);const a=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),s=()=>Object(n.useContext)(a),u=e=>{let{children:t}=e;const[r,c]=Object(n.useState)({}),s=Object(n.useCallback)(e=>r[e],[r]),u=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),l=Object(n.useCallback)(e=>{c(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{c({})},[]),p=Object(n.useCallback)(e=>{e&&c(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&i()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(n.useCallback)((e,t)=>{c(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return i()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:s,setValidationErrors:p,clearValidationError:l,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(n.useCallback)(()=>{c(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:u};return Object(n.createElement)(a.Provider,{value:m},t)}},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(0);const o=Object(n.createContext)({allowCreateAccount:!1,showCompanyField:!1,showApartmentField:!1,showPhoneField:!1,requireCompanyField:!1,requirePhoneField:!1,showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1}),c=(Object(n.createContext)({addressFieldControls:()=>null,accountControls:()=>null}),()=>Object(n.useContext)(o))},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(78);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const c=n.a.addEventCallback(e,r,o);return t(c),()=>{t(n.a.removeEventCallback(e,c.id))}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(31);const c=async(e,t,r)=>{const o=n(e,t),c=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&c.push(t)}catch(e){console.error(e)}return!c.length||c},i=async(e,t,r)=>{const c=[],i=n(e,t);for(const e of i)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return c.push(t),c;c.push(t)}catch(e){return console.error(e),c.push({type:"error"}),c}return c}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(0),o=r(74),c=r(100),i=r.n(c),a=r(22);const s=(e,t)=>e&&t[e]?t[e]:null,u=e=>{let{block:t,blockMap:r,blockWrapper:o,children:c,depth:l=1}=e;return c&&0!==c.length?Array.from(c).map((e,c)=>{const{blockName:d="",...p}={key:`${t}_${l}_${c}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},f=s(d,r);if(!f){const c=i()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof c&&c)return c;if(!Object(n.isValidElement)(c))return null;const a=e.childNodes.length?u({block:t,blockMap:r,children:e.childNodes,depth:l+1,blockWrapper:o}):void 0;return a?Object(n.cloneElement)(c,p,a):Object(n.cloneElement)(c,p)}const m=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${l}_${c}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(m,null,Object(n.createElement)(f,p,u({block:t,blockMap:r,children:e.children,depth:l+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(a.hasInnerBlocks)(e))return null;const c=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],i=Object(a.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!c.includes(t)}),u=o||n.Fragment;return Object(n.createElement)(u,null,i.map((e,r)=>{let{blockName:o,component:c}=e;const i=c||s(o,t);return i?Object(n.createElement)(i,{key:`${o}_forced_${r}`}):null}))})(d,r,e.children,o))))}):null},l=e=>{let{Block:t,selector:r,blockName:n,getProps:c=(()=>({})),blockMap:i,blockWrapper:a}=e;Object(o.b)({Block:t,selector:r,getProps:(e,t)=>{const r=u({block:n,blockMap:i,children:e.children||[],blockWrapper:a});return{...c(e,t),children:r}}})}},,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(234)},function(e,t){},function(e,t){},function(e,t){},,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(163),c=r(26),i=r(17),a=r.n(i),s=r(41),u=r(154),l=r(24),d=r(164),p=r(84),f=r(22),m=r(184),h=r(179),b=r(177),g=r(176),v=r(175),y=r(182),O=r(186),E=r(181),j=r(178),S=r(180),w=r(183),k=r(185);r.p=p.k,Object(f.registerCheckoutBlock)({metadata:v,component:Object(n.lazy)(()=>r.e(35).then(r.bind(null,372)))}),Object(f.registerCheckoutBlock)({metadata:g,component:Object(n.lazy)(()=>r.e(34).then(r.bind(null,391)))}),Object(f.registerCheckoutBlock)({metadata:b,component:Object(n.lazy)(()=>r.e(33).then(r.bind(null,379)))}),Object(f.registerCheckoutBlock)({metadata:j,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(2),r.e(3),r.e(39)]).then(r.bind(null,382)))}),Object(f.registerCheckoutBlock)({metadata:h,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(2),r.e(3),r.e(32)]).then(r.bind(null,383)))}),Object(f.registerCheckoutBlock)({metadata:S,component:Object(n.lazy)(()=>Promise.all([r.e(1),r.e(40)]).then(r.bind(null,378)))}),Object(f.registerCheckoutBlock)({metadata:E,component:Object(n.lazy)(()=>r.e(38).then(r.bind(null,376)))}),Object(f.registerCheckoutBlock)({metadata:y,component:Object(n.lazy)(()=>r.e(36).then(r.bind(null,384)))}),Object(f.registerCheckoutBlock)({metadata:w,component:Object(n.lazy)(()=>r.e(41).then(r.bind(null,392)))}),Object(f.registerCheckoutBlock)({metadata:m,component:Object(n.lazy)(()=>r.e(31).then(r.bind(null,377)))}),Object(f.registerCheckoutBlock)({metadata:k,component:Object(n.lazy)(()=>r.e(42).then(r.bind(null,373)))}),Object(f.registerCheckoutBlock)({metadata:O,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(4),r.e(37)]).then(r.bind(null,385)))});var _=r(1),C=r(5),R=r.n(C),P=r(39),T=r(80),x=r(148),A=r(241),N=r(34),M=r(253),I=r(2),D=r(97),F=(r(225),r(108)),L=r(32),V=Object(n.createElement)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));r(226);var B=()=>Object(n.createElement)("div",{className:"wc-block-checkout-empty"},Object(n.createElement)(F.a,{className:"wc-block-checkout-empty__image",alt:"",srcElement:V,size:100}),Object(n.createElement)("strong",{className:"wc-block-checkout-empty__title"},Object(_.__)("Your cart is empty!","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-empty__description"},Object(_.__)("Checkout is not available whilst your cart is empty—please take a look through our store and come back when you're ready to place an order.","woo-gutenberg-products-block")),p.i&&Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:p.i,className:"wp-block-button__link"},Object(_.__)("Browse store","woo-gutenberg-products-block")))),U=Object(n.createElement)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"})),H=r(25);r(227);const z=["woocommerce_product_out_of_stock","woocommerce_rest_cart_product_is_not_purchasable","woocommerce_rest_cart_product_no_stock","woocommerce_rest_cart_product_sold_individually","woocommerce_rest_cart_item_error"],G=Object(I.getSetting)("checkoutData",{}),q=e=>{let{errorData:t}=e,r=Object(_.__)("Checkout error","woo-gutenberg-products-block");return z.includes(t.code)&&(r=Object(_.__)("There is a problem with your cart","woo-gutenberg-products-block")),Object(n.createElement)("strong",{className:"wc-block-checkout-error_title"},r)},W=e=>{let{errorData:t}=e,r=t.message;return z.includes(t.code)&&(r=r+" "+Object(_.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-error__description"},r)},Y=e=>{let{errorData:t}=e,r=Object(_.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return z.includes(t.code)&&(r=Object(_.__)("Edit your cart","woo-gutenberg-products-block"),o=p.c),Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:o,className:"wp-block-button__link"},r))};var $=()=>{const e={code:"",message:"",...G||{}},t={code:e.code||"unknown",message:Object(H.decodeEntities)(e.message)||Object(_.__)("There was a problem checking out. Please try again. If the problem persists, please get in touch with us so we can assist.","woo-gutenberg-products-block")};return Object(n.createElement)("div",{className:"wc-block-checkout-error"},Object(n.createElement)(F.a,{className:"wc-block-checkout-error__image",alt:"",srcElement:U,size:100}),Object(n.createElement)(q,{errorData:t}),Object(n.createElement)(W,{errorData:t}),Object(n.createElement)(Y,{errorData:t}))};const X=`${p.e}?redirect_to=${encodeURIComponent(window.location.href)}`,K=()=>{window.location.reload(!0)};var J=r(158);const Q=()=>Object(n.createElement)(n.Fragment,null,Object(_.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),Object(n.createElement)("a",{href:X},Object(_.__)("Click here to log in.","woo-gutenberg-products-block"))),Z=e=>{let{attributes:t,children:r}=e;const{hasOrder:o,customerId:i}=Object(s.b)(),{cartItems:a,cartIsLoading:u}=Object(c.a)(),{allowCreateAccount:l,showCompanyField:d,requireCompanyField:p,showApartmentField:f,showPhoneField:m,requirePhoneField:h}=t;return u||0!==a.length?o?((e=>!e&&!Object(I.getSetting)("checkoutAllowsGuest",!1))(i)&&l&&Object(I.getSetting)("checkoutAllowsSignup",!1)&&Object(n.createElement)(Q,null),Object(n.createElement)(J.a.Provider,{value:{allowCreateAccount:l,showCompanyField:d,requireCompanyField:p,showApartmentField:f,showPhoneField:m,requirePhoneField:h}},r)):Object(n.createElement)($,null):Object(n.createElement)(B,null)},ee=e=>{let{scrollToTop:t}=e;const{hasNoticesOfType:r}=Object(P.a)(),{hasError:o,isIdle:c}=Object(s.b)(),{hasValidationErrors:i,showAllValidationErrors:a}=Object(u.b)(),l=c&&o&&(i||r("default"));return Object(n.useEffect)(()=>{let e;return l&&(a(),e=window.setTimeout(()=>{t({focusableSelector:"input:invalid, .has-error input"})},50)),()=>{clearTimeout(e)}},[l,t,a]),null};var te=Object(D.a)(e=>{let{attributes:t,children:r,scrollToTop:o}=e;return Object(n.createElement)(N.a,{header:Object(_.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(n.createInterpolateElement)(Object(_.__)("The checkout has encountered an unexpected error. . If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:Object(n.createElement)("button",{className:"wc-block-link-button",onClick:K})}),showErrorMessage:I.CURRENT_USER_IS_ADMIN},Object(n.createElement)(A.a,{context:"wc/checkout"},Object(n.createElement)(T.a,{context:"wc/checkout"},Object(n.createElement)(u.a,null,Object(n.createElement)(f.SlotFillProvider,null,Object(n.createElement)(x.a,null,Object(n.createElement)(M.a,{className:R()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(n.createElement)(Z,{attributes:t},r),Object(n.createElement)(ee,{scrollToTop:o}))))))))});const re={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(I.getSetting)("hasDarkEditorStyleSupport",!1)},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},allowCreateAccount:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1},showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:Object(I.getSetting)("displayCartPricesIncludingTax",!1)}};Object(d.a)({Block:te,blockName:"woocommerce/checkout",selector:".wp-block-woocommerce-checkout",getProps:e=>({attributes:Object(o.a)(re,e instanceof HTMLElement?e.dataset:{})}),blockMap:Object(l.getRegisteredBlockComponents)("woocommerce/checkout"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:o,...i}=Object(c.a)(),l=(()=>{const{dispatchActions:e,extensionData:t}=Object(s.b)(),r=Object(n.useRef)(t);Object(n.useEffect)(()=>{a()(t,r.current)||(r.current=t)},[t]);const o=Object(n.useCallback)((t,n,o)=>{const c=r.current[t]||{};e.setExtensionData({...r.current,[t]:{...c,[n]:o}})},[e]);return{extensionData:r.current,setExtensionData:o}})(),d=(()=>{const{hasValidationErrors:e,getValidationError:t,clearValidationError:r,hideValidationError:o,setValidationErrors:c}=Object(u.b)(),i="extensions-errors";return{hasValidationErrors:e,getValidationError:Object(n.useCallback)(e=>t(`${i}-${e}`),[t]),clearValidationError:Object(n.useCallback)(e=>r(`${i}-${e}`),[r]),hideValidationError:Object(n.useCallback)(e=>o(`${i}-${e}`),[o]),setValidationErrors:Object(n.useCallback)(e=>c(Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[`${i}-${t}`,r]}))),[c])}})();return n.Children.map(t,e=>{if(Object(n.isValidElement)(e)){const t={extensions:r,cart:i,checkoutExtensionData:l,validation:d};return Object(n.cloneElement)(e,t)}return e})}})},,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return w})),r.d(t,"a",(function(){return k}));var n=r(0),o=(r(8),r(9)),c=r(11),i=r(79),a=r.n(i);function s(e,t,r,n,o,c,i){try{var a=e[c](i),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var c=e.apply(t,r);function i(e){s(c,n,o,i,a,"next",e)}function a(e){s(c,n,o,i,a,"throw",e)}i(void 0)}))}}var l=r(20),d=r(5),p=r.n(d),f=r(4),m=r(103),h=r(21),b=r(127),g=function(e){var t=e.notices,r=e.className,o=e.children,i=e.onRemove,s=void 0===i?f.noop:i,d=Object(h.useReducedMotion)(),g=Object(n.useState)((function(){return new WeakMap})),v=Object(l.a)(g,1)[0],y=Object(m.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=u(a.a.mark((function t(r){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r({opacity:1,height:v.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(_x){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=u(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:d});r=p()("components-snackbar-list",r);var O=function(e){return function(){return s(e.id)}};return Object(n.createElement)("div",{className:r},o,y.map((function(e){var t=e.item,r=e.key,o=e.props;return Object(n.createElement)(m.animated.div,{key:r,style:o},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&v.set(t,e)}},Object(n.createElement)(b.a,Object(c.a)({},Object(f.omit)(t,["content"]),{onRemove:O(t)}),t.content)))})))},v=r(22);const y={};var O=e=>{let{className:t,notices:r,removeNotice:o,isEditor:c}=e;if(c)return null;const i=r.filter(e=>"snackbar"===e.type),a=i.length>0?i.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):y,s=Object(v.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:a}),u=i.filter(e=>!0===s[e.content]),l=p()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(g,{notices:u,className:l,onRemove:o})},E=r(42),j=r(28);const S=Object(n.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),w=()=>Object(n.useContext)(S),k=e=>{let{children:t,context:r="wc/core"}=e;const{createNotice:c,removeNotice:i}=Object(o.useDispatch)("core/notices"),[a,s]=Object(n.useState)(!1),{dispatchStoreEvent:u}=Object(E.a)(),{isEditor:l}=Object(j.a)(),d=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c("default",e,{...t,type:"snackbar",context:t.context||r}),u("store-notice-create",{status:"default",content:e,options:t})}),[c,u,r]),p=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;i(e,t)}),[i,r]),{notices:f}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(r)}),[r]),m={notices:f,createSnackbarNotice:d,removeSnackbarNotice:p,context:r,setIsSuppressed:s},h=a?null:Object(n.createElement)(O,{notices:m.notices,removeNotice:m.removeSnackbarNotice,isEditor:l});return Object(n.createElement)(S.Provider,{value:m},t,h)}},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return u}));var n=r(0),o=(r(8),r(21)),c=r(5),i=r.n(c);const a=Object(n.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),s=()=>Object(n.useContext)(a),u=e=>{let{children:t,className:r=""}=e;const[c,s]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let r="";return t>700?r="is-large":t>520?r="is-medium":t>400?r="is-small":t&&(r="is-mobile"),[e,r]})(),u={hasContainerWidth:""!==s,containerClassName:s,isMobile:"is-mobile"===s,isSmall:"is-small"===s,isMedium:"is-medium"===s,isLarge:"is-large"===s};return Object(n.createElement)(a.Provider,{value:u},Object(n.createElement)("div",{className:i()(r,s)},c,t))}},,,,,,,,,function(e,t,r){"use strict";var n=r(0),o=r(5),c=r.n(o),i=(r(8),r(244));r(199),t.a=e=>{let{children:t,className:r}=e;return Object(n.createElement)(i.a,{className:c()("wc-block-components-sidebar-layout",r)},t)}}]); \ No newline at end of file diff --git a/build/checkout.asset.php b/build/checkout.asset.php new file mode 100644 index 00000000000..2fa96a7c0d8 --- /dev/null +++ b/build/checkout.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'e2bed7c9436a357598c9cdf1c41c5a82'); \ No newline at end of file diff --git a/build/checkout.js b/build/checkout.js new file mode 100644 index 00000000000..bf6dcbbed40 --- /dev/null +++ b/build/checkout.js @@ -0,0 +1,45 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.checkout=function(e){function t(t){for(var r,s,a=t[0],l=t[1],i=t[2],d=0,p=[];d{let{className:t,showSpinner:c=!1,children:r,...a}=e;const u=l()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(n.createElement)(s.a,o()({className:u},a),c&&Object(n.createElement)(i.a,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},r))}},11:function(e,t){e.exports=window.wp.apiFetch},110:function(e,t,c){"use strict";c.d(t,"c",(function(){return n})),c.d(t,"d",(function(){return s})),c.d(t,"a",(function(){return a})),c.d(t,"b",(function(){return l}));var r=c(14),o=c(32);const n=(e,t)=>{if(o.n>2)return Object(r.registerBlockType)(e,t)},s=(e,t)=>{if(o.n>1)return Object(r.registerBlockType)(e,t)},a=()=>o.n>2,l=()=>o.n>1},113:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"c",(function(){return o})),c.d(t,"b",(function(){return n})),c.d(t,"d",(function(){return s}));const r=e=>"number"==typeof e,o=e=>"string"==typeof e,n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function s(e,t){return n(e)&&t in e}},12:function(e,t){e.exports=window.wp.compose},126:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},13:function(e,t){e.exports=window.wp.url},132:function(e,t,c){"use strict";var r=c(3),o=c(1),n=c(113);const s=Object(r.getSetting)("countryLocale",{}),a=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(n.a)(e.priority)&&(t.index=e.priority),Object(n.c)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(s).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,a(c)]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=c&&void 0!==l[c]?l[c]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},133:function(e,t,c){"use strict";var r=c(0);c(223),t.a=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},134:function(e,t){e.exports=window.wp.wordcount},139:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(53),s=c(5),a=c.n(s),l=c(44);c(220);const i=e=>{let{currency:t,maxPrice:c,minPrice:s,priceClassName:i,priceStyle:u}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(o.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(l.formatPrice)(s),Object(l.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(n.a,{className:a()("wc-block-components-product-price__value",i),currency:t,value:s,style:u})," — ",Object(r.createElement)(n.a,{className:a()("wc-block-components-product-price__value",i),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:s,regularPrice:l,priceClassName:i,priceStyle:u,price:d}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:a()("wc-block-components-product-price__regular",c),style:s},e),value:l}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:a()("wc-block-components-product-price__value","is-discounted",i),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:o,format:s="",maxPrice:l,minPrice:d,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}=e;const j=a()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});s.includes("")||(s="",console.error("Price formats need to include the `` tag."));const E=g&&p!==g;let _=Object(r.createElement)("span",{className:a()("wc-block-components-product-price__value",b)});return E?_=Object(r.createElement)(u,{currency:o,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}):void 0!==d&&void 0!==l?_=Object(r.createElement)(i,{currency:o,maxPrice:l,minPrice:d,priceClassName:b,priceStyle:m}):p&&(_=Object(r.createElement)(n.a,{className:a()("wc-block-components-product-price__value",b),currency:o,value:p,style:m})),Object(r.createElement)("span",{className:j},Object(r.createInterpolateElement)(s,{price:_}))}},14:function(e,t){e.exports=window.wp.blocks},141:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));var r=c(6);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const n={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},s={},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,eventType:c,id:r,callback:n,priority:a}=arguments.length>1?arguments[1]:void 0;const l=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return l.set(r,{priority:a,callback:n}),{...e,[c]:l};case o.REMOVE_EVENT_CALLBACK:return l.delete(r),{...e,[c]:l}}}},142:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(8);function o(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},143:function(e,t,c){"use strict";var r=c(0),o=c(5),n=c.n(o);c(335),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)("div",{className:n()("wc-block-components-product-badge",c)},t)}},148:function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=c(6),n=c(31),s=c.n(n);const a=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(r.useContext)(a),i=e=>{let{children:t}=e;const[c,n]=Object(r.useState)({}),l=Object(r.useCallback)(e=>c[e],[c]),i=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{n({})},[]),p=Object(r.useCallback)(e=>{e&&n(t=>(e=Object(o.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&s()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),b=Object(r.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return s()(c[e],r)?c:{...c,[e]:r}})},[]),m={getValidationError:l,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{b(e,{hidden:!0})},[b]),showValidationError:Object(r.useCallback)(e=>{b(e,{hidden:!1})},[b]),showAllValidationErrors:Object(r.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(r.createElement)(a.Provider,{value:m},t)}},150:function(e,t,c){"use strict";var r=c(16),o=c.n(r),n=c(0),s=c(8),a=c(1),l=c(32),i=e=>{let{imageUrl:t=l.m+"/block-error.svg",header:c=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:s=Object(a.__)("Error:","woo-gutenberg-products-block"),button:i}=e;return Object(n.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(n.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(n.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(n.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),r&&Object(n.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(n.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",o),i&&Object(n.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},i)))};c(244);class u extends s.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(n.createElement)(n.Fragment,null,Object(n.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,text:r,errorMessagePrefix:o,renderError:s,button:a}=this.props,{errorMessage:l,hasError:u}=this.state;return u?"function"==typeof s?s({errorMessage:l}):Object(n.createElement)(i,{errorMessage:c?l:null,header:e,imageUrl:t,text:r,errorMessagePrefix:o,button:a}):this.props.children}}t.a=u},159:function(e,t,c){"use strict";var r=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:o,secondaryDescription:n,id:s}=e;return Object(r.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(r.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(r.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(r.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},o&&Object(r.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},o),n&&Object(r.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},n)))}},160:function(e,t,c){"use strict";var r=c(0),o=c(5),n=c.n(o),s=c(159);t.a=e=>{let{checked:t,name:c,onChange:o,option:a}=e;const{value:l,label:i,description:u,secondaryLabel:d,secondaryDescription:p}=a;return Object(r.createElement)("label",{className:n()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${l}`},Object(r.createElement)("input",{id:`${c}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:e=>o(e.target.value),checked:t,"aria-describedby":n()({[`${c}-${l}__label`]:i,[`${c}-${l}__secondary-label`]:d,[`${c}-${l}__description`]:u,[`${c}-${l}__secondary-description`]:p})}),Object(r.createElement)(s.a,{id:`${c}-${l}`,label:i,secondaryLabel:d,description:u,secondaryDescription:p}))}},161:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=n},162:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),s=c(5),a=c.n(s);c(2),c(338),t.a=e=>{let{children:t,className:c,headingLevel:r,...s}=e;const l=a()("wc-block-components-title",c),i="h"+r;return Object(n.createElement)(i,o()({className:l},s),t)}},163:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(10),o=c(0),n=c(19),s=c(126);const a=()=>{const e=Object(s.a)(),{selectShippingRate:t}=Object(r.useDispatch)(n.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((c,r)=>{t(c,r).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(r.useSelect)(e=>e(n.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},173:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),s=c(20),a=c(5),l=c.n(a);c(219),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:a="",rel:i,style:u,onClick:d,...p}=e;const b=l()("wc-block-components-product-name",t);if(c){const e=p;return Object(n.createElement)("span",o()({className:b},e,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(r)}}))}return Object(n.createElement)("a",o()({className:b,href:a,rel:i},p,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(r)},style:u}))}},174:function(e,t,c){"use strict";c.d(t,"b",(function(){return g})),c.d(t,"a",(function(){return h}));var r=c(0),o=(c(2),c(10)),n=c(75),s=c(73),a=c(7),l=c.n(a),i=c(5),u=c.n(i),d=c(888);c(221);const p=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var b=e=>{let{className:t,notices:c,removeNotice:o}=e;const n=c.filter(e=>"snackbar"!==e.type);if(!n.length)return null;const s=u()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:s},n.map(e=>Object(r.createElement)(d.a,l()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(r.createContext)({notices:[],createNotice:(e,t,c)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),g=()=>Object(r.useContext)(m),h=e=>{let{children:t,className:c="",createNoticeContainer:a=!0,context:l="wc/core"}=e;const{createNotice:i,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,p]=Object(r.useState)(!1),{dispatchStoreEvent:g}=Object(n.a)(),{isEditor:h}=Object(s.b)(),O=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i(e,t,{...c,context:c.context||l}),g("store-notice-create",{status:e,content:t,options:c})}),[i,g,l]),j=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;u(e,t)}),[u,l]),{notices:E}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(l)}),[l]),_={notices:E,createNotice:O,removeNotice:j,context:l,setIsSuppressed:p},f=d?null:Object(r.createElement)(b,{className:c,notices:_.notices,removeNotice:_.removeNotice,isEditor:h});return Object(r.createElement)(m.Provider,{value:_},a&&f,t)}},175:function(e,t,c){"use strict";var r=c(0),o=c(134),n=c(103);const s=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},a=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=a(e),o=r.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(o,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const o=a(e),s=o.slice(0,t);if(c)return Object(n.autop)(l(s,r));const i=s.match(/([\s]+)/g),u=i?i.length:0,d=o.slice(0,t+u);return Object(n.autop)(l(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:a="words",className:l=""}=e;const d=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(n.autop)(e),a=Object(o.count)(r,c);if(a<=t)return r;const l=s(r),d=Object(o.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,a),[t,c,a]);return Object(r.createElement)(r.RawHTML,{className:l},d)}},18:function(e,t){e.exports=window.wp.primitives},186:function(e,t){},19:function(e,t){e.exports=window.wc.wcBlocksData},195:function(e,t){},197:function(e,t){e.exports=window.wp.warning},198:function(e,t,c){"use strict";var r=c(0),o=c(5),n=c.n(o),s=c(12),a=c(160);c(347),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,selected:s,onChange:l,options:i=[]}=e;const u=o||c;return i.length&&Object(r.createElement)("div",{className:n()("wc-block-components-radio-control",t)},i.map(e=>Object(r.createElement)(a.a,{key:`${u}-${e.value}`,name:"radio-control-"+u,checked:e.value===s,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},199:function(e,t,c){"use strict";var r=c(16),o=c.n(r),n=c(0),s=c(1),a=c(8),l=(c(2),c(3)),i=c(43);class u extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(s.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||l.CURRENT_USER_IS_ADMIN)&&(e=t||Object(s.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const r=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(n.createElement)(i.StoreNoticesContainer,{notices:r})}return this.props.children}}u.defaultProps={isEditor:!1},t.a=u},20:function(e,t){e.exports=window.wp.htmlEntities},211:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})},219:function(e,t){},22:function(e,t){e.exports=window.wc.blocksCheckout},220:function(e,t){},221:function(e,t){},222:function(e,t){},223:function(e,t){},224:function(e,t){},242:function(e,t){},243:function(e,t){},244:function(e,t){},249:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(362),s=c(258),a=c(73),l=c(260),i=c(51),u=c.n(i),d=c(199);t.a=()=>{const{isEditor:e}=Object(a.b)(),{setActivePaymentMethod:t,setExpressPaymentError:c,activePaymentMethod:i,paymentMethodData:p,setPaymentStatus:b}=Object(l.b)(),m=Object(n.a)(),{paymentMethods:g}=Object(s.a)(),h=Object(r.useRef)(i),O=Object(r.useRef)(p),j=Object(r.useCallback)(e=>()=>{h.current=i,O.current=p,b().started({}),t(e)},[i,p,t,b]),E=Object(r.useCallback)(()=>{b().pristine(),t(h.current),O.current.isSavedToken&&b().started(O.current)},[t,b]),_=Object(r.useCallback)(e=>{b().error(e),c(e),t(h.current),O.current.isSavedToken&&b().started(O.current)},[t,b,c]),f=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?_(e):c("")}),[c,_]),k=Object.entries(g),w=k.length>0?k.map(t=>{let[c,o]=t;const n=e?o.edit:o.content;return Object(r.isValidElement)(n)?Object(r.createElement)("li",{key:c,id:"express-payment-method-"+c},Object(r.cloneElement)(n,{...m,onClick:j(c),onClose:E,onError:_,setExpressPaymentError:f})):null}):Object(r.createElement)("li",{key:"noneRegistered"},Object(o.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(r.createElement)(d.a,{isEditor:e},Object(r.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},w))}},250:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(4),s=c(10),a=c(34);t.a=e=>{let{setPageId:t,pageId:c,labels:l}=e;const i=Object(s.useSelect)(e=>e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100}),[])||null;return i?Object(r.createElement)(n.PanelBody,{title:l.title},Object(r.createElement)(n.SelectControl,{label:Object(o.__)("Link to","woo-gutenberg-products-block"),value:c,options:[{label:l.default,value:0},...i.map(e=>({label:Object(a.a)(e,i),value:parseInt(e.id,10)}))],onChange:e=>t(parseInt(e,10))})):null}},251:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(0),o=c(1),n=(c(2),c(55)),s=c(281),a=c(161);c(352);const l=e=>{let{text:t,url:c="https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565"}=e;return Object(r.createElement)("div",{className:"wc-block-feedback-prompt"},Object(r.createElement)(n.a,{srcElement:s.a}),Object(r.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(o.__)("Feedback?","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(r.createElement)("a",{href:c,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(o.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(r.createElement)(n.a,{srcElement:a.a,size:16})))},i=()=>Object(r.createElement)(l,{text:Object(o.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woo-gutenberg-products-block"),url:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?template=--cart-checkout-feedback.md"})},252:function(e,t){e.exports=window.wp.plugins},253:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(62),s=c(97),a=c(22),l=c(813),i=c(46),u=c(73),d=c(5),p=c.n(d),b=c(20),m=c(37),g=c(31),h=c.n(g),O=c(163),j=c(75);const E=e=>{var t;return null===(t=e.find(e=>e.selected))||void 0===t?void 0:t.rate_id};var _=c(198),f=c(159),k=c(44),w=c(53),v=c(3);const y=e=>{const t=Object(v.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(b.decodeEntities)(e.name),value:e.rate_id,description:Object(r.createElement)(r.Fragment,null,Number.isFinite(t)&&Object(r.createElement)(w.a,{currency:Object(k.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(b.decodeEntities)(e.delivery_time))}};var S=e=>{let{className:t,noResultsMessage:c,onSelectRate:o,rates:n,renderOption:s=y,selected:a}=e;if(0===n.length)return c;if(n.length>1)return Object(r.createElement)(_.a,{className:t,onChange:e=>{o(e)},selected:a,options:n.map(s)});const{label:l,secondaryLabel:i,description:u,secondaryDescription:d}=s(n[0]);return Object(r.createElement)(f.a,{label:l,secondaryLabel:i,description:u,secondaryDescription:d})};c(346);var C=e=>{let{packageId:t,className:c,noResultsMessage:n,renderOption:s,packageData:l,collapsible:i=!1,collapse:u=!1,showItems:d=!1}=e;const{selectShippingRate:g,selectedShippingRate:_}=((e,t)=>{const{dispatchCheckoutEvent:c}=Object(j.a)(),{selectShippingRate:o,isSelectingRate:n}=Object(O.a)(),[s,a]=Object(r.useState)(()=>E(t)),l=Object(r.useRef)(t);return Object(r.useEffect)(()=>{h()(l.current,t)||(l.current=t,a(E(t)))},[t]),{selectShippingRate:Object(r.useCallback)(t=>{a(t),o(t,e),c("set-selected-shipping-rate",{shippingRateId:t})},[e,o,c]),selectedShippingRate:s,isSelectingRate:n}})(t,l.shipping_rates),f=Object(r.createElement)(r.Fragment,null,(d||i)&&Object(r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),d&&Object(r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(b.decodeEntities)(e.name),c=e.quantity;return Object(r.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(r.createElement)(m.a,{label:c>1?`${t} × ${c}`:""+t,screenReaderLabel:Object(o.sprintf)( +/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ +Object(o._n)("%1$s (%2$d unit)","%1$s (%2$d units)",c,"woo-gutenberg-products-block"),t,c)}))}))),k=Object(r.createElement)(S,{className:c,noResultsMessage:n,rates:l.shipping_rates,onSelectRate:g,selected:_,renderOption:s});return i?Object(r.createElement)(a.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!u,title:f},k):Object(r.createElement)("div",{className:p()("wc-block-components-shipping-rates-control__package",c)},f,k)};const N=e=>{let{packages:t,collapse:c,showItems:o,collapsible:n,noResultsMessage:s,renderOption:a}=e;return t.length?Object(r.createElement)(r.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(r.createElement)(C,{key:t,packageId:t,packageData:l,collapsible:n,collapse:c,showItems:o,noResultsMessage:s,renderOption:a})})):null};t.a=e=>{let{shippingRates:t,shippingRatesLoading:c,className:d,collapsible:p=!1,noResultsMessage:b,renderOption:m}=e;Object(r.useEffect)(()=>{if(c)return;const e=Object(l.a)(t),r=Object(l.b)(t);1===e?Object(n.speak)(Object(o.sprintf)( +/* translators: %d number of shipping options found. */ +Object(o._n)("%d shipping option was found.","%d shipping options were found.",r,"woo-gutenberg-products-block"),r)):Object(n.speak)(Object(o.sprintf)( +/* translators: %d number of shipping packages packages. */ +Object(o._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(o.sprintf)( +/* translators: %d number of shipping options available. */ +Object(o._n)("%d shipping option was found","%d shipping options were found",r,"woo-gutenberg-products-block"),r))},[c,t]);const{extensions:g,receiveCart:h,...O}=Object(i.a)(),j={className:d,collapsible:p,noResultsMessage:b,renderOption:m,extensions:g,cart:O,components:{ShippingRatesControlPackage:C}},{isEditor:E}=Object(u.b)();return Object(r.createElement)(s.a,{isLoading:c,screenReaderLabel:Object(o.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},E?Object(r.createElement)(N,{packages:t,noResultsMessage:b,renderOption:m}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.ExperimentalOrderShippingPackages.Slot,j),Object(r.createElement)(a.ExperimentalOrderShippingPackages,null,Object(r.createElement)(N,{packages:t,noResultsMessage:b,renderOption:m}))))}},254:function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var r=c(1),o=c(10),n=c(19),s=c(20),a=c(46),l=c(0);c(2),c(900),c(5),c(22),c(75),c(73);const i=Object(l.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"});var u=c(148),d=c(63);const p=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(a.a)(),{addErrorNotice:c}=Object(d.a)(),{addSnackbarNotice:p}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:r}=Object(l.useContext)(i),o=Object(l.useRef)(e);Object(l.useEffect)(()=>{o.current=e},[e]);const n=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;o.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),s=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...n,...s,setIsSuppressed:r}})(),{setValidationErrors:b}=Object(u.b)();return{appliedCoupons:e,isLoading:t,...Object(o.useSelect)((e,t)=>{let{dispatch:o}=t;const a=e(n.CART_STORE_KEY),l=a.isApplyingCoupon(),i=a.isRemovingCoupon(),{applyCoupon:u,removeCoupon:d,receiveApplyingCoupon:m}=o(n.CART_STORE_KEY);return{applyCoupon:e=>{u(e).then(t=>{!0===t&&p(Object(r.sprintf)( +/* translators: %s coupon code. */ +Object(r.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{b({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),m("")})},removeCoupon:e=>{d(e).then(t=>{!0===t&&p(Object(r.sprintf)( +/* translators: %s coupon code. */ +Object(r.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{c(e.message,{id:"coupon-form"}),m("")})},isApplyingCoupon:l,isRemovingCoupon:i}},[c,p])}}},255:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),s=c(5),a=c.n(s);const l=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var i=e=>{let{id:t,src:c=null,alt:r=""}=e;return c?Object(n.createElement)("img",{className:l(t),src:c,alt:r}):null},u=c(32);const d=[{id:"alipay",alt:"Alipay",src:u.m+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.m+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.m+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.m+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.m+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.m+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.m+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.m+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.m+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.m+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.m+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.m+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.m+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.m+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.m+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.m+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.m+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.m+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.m+"payment-methods/wechat.svg"}];var p=c(113);c(350),t.a=e=>{let{icons:t=[],align:c="center",className:r}=e;const s=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(p.c)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===s.length)return null;const l=a()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},r);return Object(n.createElement)("div",{className:l},s.map(e=>{const t={...e,...(c=e.id,d.find(e=>e.id===c)||{})};var c;return Object(n.createElement)(i,o()({key:"payment-method-icon-"+e.id},t))}))}},256:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),s=c(5),a=c.n(s),l=c(1),i=c(55),u=c(331);c(195);var d=e=>{let{text:t,screenReaderText:c="",element:r="li",className:s="",radius:l="small",children:i=null,...u}=e;const d=r,p=a()(s,"wc-block-components-chip","wc-block-components-chip--radius-"+l),b=Boolean(c&&c!==t);return Object(n.createElement)(d,o()({className:p},u),Object(n.createElement)("span",{"aria-hidden":b,className:"wc-block-components-chip__text"},t),b&&Object(n.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:r=!1,onRemove:s=(()=>{}),removeOnAnyClick:p=!1,text:b,screenReaderText:m="",...g}=e;const h=p?"span":"button";if(!t){const e=m&&"string"==typeof m?m:b;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:r,onClick:s,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||s()}},j=p?O:{},E=p?{"aria-hidden":!0}:O;return Object(n.createElement)(d,o()({},g,j,{className:a()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(n.createElement)(h,o()({className:"wc-block-components-chip__remove"},E),Object(n.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},258:function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var r=c(52),o=c(260);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:n,expressPaymentMethodsInitialized:s}=Object(o.b)(),a=Object(r.a)(t),l=Object(r.a)(c);return{paymentMethods:e?l:a,isInitialized:e?s:n}},s=()=>n(!1),a=()=>n(!0)},260:function(e,t,c){"use strict";c.d(t,"b",(function(){return L})),c.d(t,"a",(function(){return B}));var r=c(0);let o,n;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(o||(o={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method"}(n||(n={}));const s={currentStatus:o.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},a={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:o,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:()=>{},activeSavedToken:"",setActiveSavedToken:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1},l=e=>!("object"!=typeof e||!e.isSavedToken);var i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:a="",paymentMethods:i={}}=arguments.length>1?arguments[1]:void 0;switch(t){case o.STARTED:return{...e,currentStatus:o.STARTED,paymentMethodData:c||e.paymentMethodData,hasSavedToken:l(c||e.paymentMethodData)};case o.ERROR:return e.currentStatus!==o.ERROR?{...e,currentStatus:o.ERROR,errorMessage:a||e.errorMessage}:e;case o.FAILED:return e.currentStatus!==o.FAILED?{...e,currentStatus:o.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:a||e.errorMessage}:e;case o.SUCCESS:return e.currentStatus!==o.SUCCESS?{...e,currentStatus:o.SUCCESS,paymentMethodData:c||e.paymentMethodData,hasSavedToken:l(c||e.paymentMethodData)}:e;case o.PROCESSING:return e.currentStatus!==o.PROCESSING?{...e,currentStatus:o.PROCESSING,errorMessage:""}:e;case o.COMPLETE:return e.currentStatus!==o.COMPLETE?{...e,currentStatus:o.COMPLETE}:e;case o.PRISTINE:return{...s,currentStatus:o.PRISTINE,paymentMethods:{...e.paymentMethods},expressPaymentMethods:{...e.expressPaymentMethods},shouldSavePaymentMethod:e.shouldSavePaymentMethod};case n.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:i};case n.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:i};case n.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r}}},u=c(1),d=c(47),p=c(52),b=c(3),m=c(165),g=c(73),h=c(98),O=c(81),j=c(46),E=c(63),_=c(59);const f=(e,t,c,o)=>{const[n,s]=Object(r.useState)(!1),{isEditor:a}=Object(g.b)(),{selectedRates:l}=Object(h.b)(),{billingData:i,shippingAddress:d}=Object(O.b)(),_=Object(p.a)(l),f=Object(p.a)(c),k=Object(j.a)(),{cartTotals:w,cartNeedsShipping:v,paymentRequirements:y}=k,S=Object(r.useRef)({cart:k,cartTotals:w,cartNeedsShipping:v,billingData:i,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:y}),{addErrorNotice:C}=Object(E.a)();Object(r.useEffect)(()=>{S.current={cart:k,cartTotals:w,cartNeedsShipping:v,billingData:i,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:y}},[k,w,v,i,d,_,y]);const N=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e{P()},[P,k,_,i]),n},k=e=>({type:e}),w=e=>({type:o.ERROR,errorMessage:e}),v=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:o.FAILED,errorMessage:t,paymentMethodData:c}},y=e=>{let{paymentMethodData:t}=e;return{type:o.SUCCESS,paymentMethodData:t}},S=e=>{let{paymentMethodData:t}=e;return{type:o.STARTED,paymentMethodData:t}},C=e=>({type:n.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),N=e=>({type:n.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),P=e=>({type:n.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e});var R=c(75),x=c(74),T=c(141),A=c(373);var I=c(376),M=c(148);const D=Object(r.createContext)(a),L=()=>Object(r.useContext)(D),B=e=>{let{children:t}=e;const{isProcessing:c,isIdle:n,isCalculating:a,hasError:l}=Object(x.b)(),{isEditor:u,getPreviewData:p}=Object(g.b)(),{setValidationErrors:m}=Object(M.b)(),{addErrorNotice:j,removeNotice:L}=Object(E.a)(),{isSuccessResponse:B,isErrorResponse:F,isFailResponse:V,noticeContexts:U}=Object(_.c)(),[z,H]=Object(r.useReducer)(T.b,{}),{onPaymentProcessing:G}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(A.a)("payment_processing",e)}),[e]))(H),q=Object(r.useRef)(z);Object(r.useEffect)(()=>{q.current=z},[z]);const[$,Y]=Object(r.useReducer)(i,s),{dispatchActions:W,setPaymentStatus:X}=(e=>{const{setBillingData:t}=Object(O.b)(),{setShippingAddress:c}=Object(h.b)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(C(t))},setRegisteredExpressPaymentMethods:t=>{e(N(t))},setShouldSavePayment:t=>{e(P(t))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(k(o.PRISTINE)),started:t=>{e(S({paymentMethodData:t}))},processing:()=>e(k(o.PROCESSING)),completed:()=>e(k(o.COMPLETE)),error:t=>e(w(t)),failed:function(c,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(v({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof n&&null!=n&&n.address&&c(n.address),e(y({paymentMethodData:r}))}}),[e,t,c])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:c}=Object(_.c)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return f(e,t,Array.from(r),c.PAYMENTS)})(W.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:c}=Object(_.c)();return f(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),{activePaymentMethod:Q,activeSavedToken:Z,setActivePaymentMethod:ee,setActiveSavedToken:te}=(()=>{const{dispatchCheckoutEvent:e}=Object(R.a)(),[t,c]=Object(r.useState)(""),[o,n]=Object(r.useState)("");return Object(r.useEffect)(()=>{e("set-active-payment-method",{activePaymentMethod:t})},[e,t]),{activePaymentMethod:t,activeSavedToken:o,setActivePaymentMethod:c,setActiveSavedToken:n}})(),ce=Object(r.useMemo)(()=>u?p("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const o=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});o.length&&(r[c]=o)}),r}($.paymentMethods):{},[u,p,K,$.paymentMethods]),re=Object(r.useCallback)(e=>{e?j(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):L("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[j,U.EXPRESS_PAYMENTS,L]),oe=Object.keys($.expressPaymentMethods).includes(Q),ne=Object(r.useMemo)(()=>({isPristine:$.currentStatus===o.PRISTINE,isStarted:$.currentStatus===o.STARTED,isProcessing:$.currentStatus===o.PROCESSING,isFinished:[o.ERROR,o.FAILED,o.SUCCESS].includes($.currentStatus),hasError:$.currentStatus===o.ERROR,hasFailed:$.currentStatus===o.FAILED,isSuccessful:$.currentStatus===o.SUCCESS,isDoingExpressPayment:$.currentStatus!==o.PRISTINE&&oe}),[$.currentStatus,oe]);Object(r.useEffect)(()=>{const e=Object.keys($.paymentMethods),t=[...e,...Object.keys($.expressPaymentMethods)];K&&e.length&&ee(e=>e&&t.includes(e)?e:(X().pristine(),Object.keys($.paymentMethods)[0]))},[K,$.paymentMethods,$.expressPaymentMethods,ee,X]),Object(r.useEffect)(()=>{!c||l||a||ne.isFinished||X().processing()},[c,l,a,ne.isFinished,X]),Object(r.useEffect)(()=>{n&&!ne.isSuccessful&&X().pristine()},[n,ne.isSuccessful,X]),Object(r.useEffect)(()=>{l&&ne.isSuccessful&&!$.hasSavedToken&&X().pristine()},[l,ne.isSuccessful,$.hasSavedToken,X]),Object(r.useEffect)(()=>{ne.isProcessing&&(L("wc-payment-error",U.PAYMENTS),Object(I.b)(q.current,"payment_processing",{}).then(e=>{let t,c;var r,o,n,s,a,l;if(e.forEach(e=>{B(e)&&(t=e),(F(e)||V(e))&&(c=e)}),t&&!c)X().success(null===(r=t)||void 0===r||null===(o=r.meta)||void 0===o?void 0:o.paymentMethodData,null===(n=t)||void 0===n||null===(s=n.meta)||void 0===s?void 0:s.billingData,null===(a=t)||void 0===a||null===(l=a.meta)||void 0===l?void 0:l.shippingData);else if(c&&V(c)){var i,u,d,p,b,g;c.message&&c.message.length&&j(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(g=c)||void 0===g?void 0:g.messageContext)||U.PAYMENTS}),X().failed(null===(i=c)||void 0===i?void 0:i.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingData)}else if(c){var h,O;c.message&&c.message.length&&j(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(O=c)||void 0===O?void 0:O.messageContext)||U.PAYMENTS}),X().error(c.message),m(null===(h=c)||void 0===h?void 0:h.validationErrors)}else X().success()}))},[ne.isProcessing,m,X,L,U.PAYMENTS,B,V,F,j]);const se={setPaymentStatus:X,currentStatus:ne,paymentStatuses:o,paymentMethodData:$.paymentMethodData,errorMessage:$.errorMessage,activePaymentMethod:Q,setActivePaymentMethod:ee,activeSavedToken:Z,setActiveSavedToken:te,onPaymentProcessing:G,customerPaymentMethods:ce,paymentMethods:$.paymentMethods,expressPaymentMethods:$.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:re,isExpressPaymentMethodActive:oe,shouldSavePayment:$.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(r.createElement)(D.Provider,{value:se},t)}},276:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=(c(2),c(148));c(224);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:s,getValidationErrorId:a}=Object(o.b)();if(!t||"string"!=typeof t){const e=s(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:a(n)},t))}},281:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=n},3:function(e,t){e.exports=window.wc.wcSettings},31:function(e,t){e.exports=window.wp.isShallowEqual},32:function(e,t,c){"use strict";c.d(t,"o",(function(){return n})),c.d(t,"m",(function(){return s})),c.d(t,"l",(function(){return a})),c.d(t,"n",(function(){return l})),c.d(t,"j",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return p})),c.d(t,"k",(function(){return b})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return g})),c.d(t,"h",(function(){return h})),c.d(t,"a",(function(){return O})),c.d(t,"i",(function(){return j})),c.d(t,"b",(function(){return E}));var r,o=c(3);const n=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),s=n.pluginUrl+"images/",a=n.pluginUrl+"build/",l=n.buildPhase,i=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=o.STORE_PAGES.checkout.id,d=o.STORE_PAGES.checkout.permalink,p=o.STORE_PAGES.privacy.permalink,b=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),g=o.STORE_PAGES.cart.permalink,h=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),O=Object(o.getSetting)("allowedCountries",{}),j=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},328:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=n},331:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),s=c(18);const a=Object(n.createElement)(e=>{let{className:t,size:c,...r}=e;return Object(n.createElement)(s.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},r),Object(n.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=a},333:function(e,t){},334:function(e,t){},335:function(e,t){},336:function(e,t){},337:function(e,t){},338:function(e,t){},339:function(e,t){},34:function(e,t,c){"use strict";c.d(t,"h",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return p})),c.d(t,"f",(function(){return b})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return g})),c.d(t,"g",(function(){return h})),c.d(t,"a",(function(){return O}));var r=c(13),o=c(11),n=c.n(o),s=c(6),a=c(3),l=c(32);const i=e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const a=(e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const n=l.o.productCount>100,s={per_page:n?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},a=[Object(r.addQueryArgs)("/wc/store/products",{...s,...o})];return n&&t.length&&a.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),a})({selected:t,search:c,queryArgs:o});return Promise.all(a.map(e=>n()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),p=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),b=e=>{let{selected:t=[],search:c}=e;const o=(e=>{let{selected:t=[],search:c}=e;const o=Object(a.getSetting)("limitTags",!1),n=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:c})];return o&&t.length&&n.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:c});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id"))},m=e=>n()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>n()({path:"wc/store/products/categories/"+e}),h=e=>n()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),O=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},340:function(e,t){},341:function(e,t){},342:function(e,t){},343:function(e,t){},344:function(e,t){},345:function(e,t){},346:function(e,t){},347:function(e,t){},348:function(e,t){},349:function(e,t){},35:function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return n}));var r=c(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},350:function(e,t){},351:function(e,t){},352:function(e,t){},353:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),s=c(20),a=c(3);c(334),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(s.decodeEntities)(t.alt)||c||"Product Image"}:{src:a.PLACEHOLDER_IMG_SRC,alt:""};return Object(n.createElement)("img",o()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},354:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(143);t.a=()=>Object(r.createElement)(n.a,{className:"wc-block-components-product-backorder-badge"},Object(o.__)("Available on backorder","woo-gutenberg-products-block"))},355:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(143);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(n.a,{className:"wc-block-components-product-low-stock-badge"},Object(o.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(o.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},356:function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var r=c(0),o=c(252),n=c(3),s=c(150),a=c(260),l=c(98),i=c(81),u=c(74),d=c(1),p=c(11),b=c.n(p),m=c(370),g=c(35);const h=(e,t,c)=>{const r=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${c}-new-payment-method`;return r.push({key:o,value:t}),r},O=(e,t)=>{b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var j=c(148),E=c(46),_=c(63),f=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:c,redirectUrl:o,isProcessing:n,isBeforeProcessing:s,isComplete:p,orderNotes:f,shouldCreateAccount:k,extensionData:w}=Object(u.b)(),{hasValidationErrors:v}=Object(j.b)(),{shippingErrorStatus:y}=Object(l.b)(),{billingData:S,shippingAddress:C}=Object(i.b)(),{cartNeedsPayment:N,receiveCart:P}=Object(E.a)(),{activePaymentMethod:R,isExpressPaymentMethodActive:x,currentStatus:T,paymentMethodData:A,expressPaymentMethods:I,paymentMethods:M,shouldSavePayment:D}=Object(a.b)(),{addErrorNotice:L,removeNotice:B,setIsSuppressed:F}=Object(_.a)(),V=Object(r.useRef)(S),U=Object(r.useRef)(C),z=Object(r.useRef)(o),[H,G]=Object(r.useState)(!1),q=Object(r.useMemo)(()=>{var e;const t={...I,...M};return null==t||null===(e=t[R])||void 0===e?void 0:e.paymentMethodId},[R,I,M]),$=v&&!x||T.hasError||y.hasError,Y=!e&&!$&&(T.isSuccessful||!N)&&n;Object(r.useEffect)(()=>{F(x)},[x,F]),Object(r.useEffect)(()=>{$===e||!n&&!s||x||c.setHasError($)},[$,e,n,s,x,c]),Object(r.useEffect)(()=>{V.current=S,U.current=C,z.current=o},[S,C,o]);const W=Object(r.useCallback)(()=>!v&&(T.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!y.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[v,T.hasError,y.hasError]);Object(r.useEffect)(()=>{let e;return x||(e=t(W,0)),()=>{x||e()}},[t,W,x]),Object(r.useEffect)(()=>{z.current&&(window.location.href=z.current)},[p]);const X=Object(r.useCallback)(async()=>{if(H)return;G(!0),B("checkout");const e=N?{payment_method:q,payment_data:h(A,D,R)}:{},t={billing_address:Object(m.a)(V.current),shipping_address:Object(m.a)(U.current),customer_note:f,should_create_account:k,...e,extensions:{...w}};b()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(O(e.headers,c),!e.ok)throw new Error(e);return e.json()}).then(e=>{c.setAfterProcessing(e),G(!1)}).catch(e=>{O(e.headers,c),e.json().then(e=>{var t,r,o;null!==(t=e.data)&&void 0!==t&&t.cart&&P(e.data.cart),L(Object(g.b)(e),{id:"checkout"}),null===(r=e.additional_errors)||void 0===r||null===(o=r.forEach)||void 0===o||o.call(r,e=>{L(e.message,{id:e.error_code})}),c.setHasError(!0),c.setAfterProcessing(e),G(!1)})})},[H,B,f,k,N,q,A,D,R,w,c,L,P]);return Object(r.useEffect)(()=>{Y&&!H&&X()},[X,Y,H]),null};const k=e=>{let{children:t,isCart:c=!1,redirectUrl:d}=e;return Object(r.createElement)(u.a,{redirectUrl:d,isCart:c},Object(r.createElement)(i.a,null,Object(r.createElement)(l.a,null,Object(r.createElement)(a.a,null,t,Object(r.createElement)(s.a,{renderError:n.CURRENT_USER_IS_ADMIN?null:()=>null},Object(r.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(r.createElement)(f,null)))))}},357:function(e,t,c){"use strict";var r=c(0),o=c(6),n=c(20);c(337);var s=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(o.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(n.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(n.decodeEntities)(e.display||e.value)))}))):null},a=c(175),l=c(32),i=e=>{let{className:t,shortDescription:c="",fullDescription:o=""}=e;const n=c||o;return n?Object(r.createElement)(a.a,{className:t,source:n,maxLength:15,countType:l.o.wordCountType||"words"}):null};c(336),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:o=[],variation:n=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(i,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(s,{details:o}),Object(r.createElement)(s,{details:n.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},362:function(e,t,c){"use strict";c.d(t,"a",(function(){return x}));var r=c(1),o=c(44),n=c(0),s=c(5),a=c.n(s),l=c(18),i=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),u=c(328),d=c(815),p=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(n.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),b=c(55),m=c(113);c(351);const g={bank:i,bill:u.a,card:d.a,checkPayment:p};var h=e=>{let{icon:t="",text:c=""}=e;const r=!!t,o=Object(n.useCallback)(e=>r&&Object(m.c)(e)&&Object(m.d)(g,e),[r]),s=a()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":r});return Object(n.createElement)("span",{className:s},o(t)?Object(n.createElement)(b.a,{srcElement:g[t]}):t,c)},O=c(255),j=c(3),E=c(51),_=c.n(E),f=c(97),k=c(276),w=c(46),v=c(254),y=c(59),S=c(74),C=c(260),N=c(98),P=c(81);const R=(e,t)=>{const c=[],o=(t,c)=>{const r=c+"_tax",o=Object(m.d)(e,c)&&Object(m.c)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:o,valueWithTax:o+(Object(m.d)(e,r)&&Object(m.c)(e[r])?parseInt(e[r],10):0)}};return c.push(o(Object(r.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(o(Object(r.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(o(Object(r.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(r.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(o(Object(r.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c},x=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:u,onSubmit:d,customerId:p}=Object(S.b)(),{currentStatus:b,activePaymentMethod:m,onPaymentProcessing:g,setExpressPaymentError:E,shouldSavePayment:x}=Object(C.b)(),{shippingErrorStatus:T,shippingErrorTypes:A,shippingRates:I,shippingRatesLoading:M,selectedRates:D,setSelectedRates:L,isSelectingRate:B,onShippingRateSuccess:F,onShippingRateFail:V,onShippingRateSelectSuccess:U,onShippingRateSelectFail:z,needsShipping:H}=Object(N.b)(),{billingData:G,shippingAddress:q,setShippingAddress:$}=Object(P.b)(),{cartTotals:Y}=Object(w.a)(),{appliedCoupons:W}=Object(v.a)(),{noticeContexts:X,responseTypes:K}=Object(y.c)(),J=Object(n.useRef)(R(Y,H)),Q=Object(n.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(Y.total_price,10)});Object(n.useEffect)(()=>{J.current=R(Y,H),Q.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(Y.total_price,10)}},[Y,H]);const Z=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),E(e)}),[E]);return{activePaymentMethod:m,billing:{billingData:G,cartTotal:Q.current,currency:Object(o.getCurrencyFromPriceResponse)(Y),cartTotalItems:J.current,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1),appliedCoupons:W,customerId:p},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s},components:{ValidationInputError:k.a,PaymentMethodIcons:O.a,PaymentMethodLabel:h,LoadingMask:f.a},emitResponse:{noticeContexts:X,responseTypes:K},eventRegistration:{onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:u,onShippingRateSuccess:F,onShippingRateFail:V,onShippingRateSelectSuccess:U,onShippingRateSelectFail:z,onPaymentProcessing:g},onSubmit:d,paymentStatus:b,setExpressPaymentError:Z,shippingData:{shippingRates:I,shippingRatesLoading:M,selectedRates:D,setSelectedRates:L,isSelectingRate:B,shippingAddress:q,setShippingAddress:$,needsShipping:H},shippingStatus:{shippingErrorStatus:T,shippingErrorTypes:A},shouldSavePayment:x}}},363:function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=(c(2),c(12)),n=c(5),s=c.n(n);const a=Object(r.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=()=>Object(r.useContext)(a),i=e=>{let{children:t,className:c=""}=e;const[n,l]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let c="";return t>700?c="is-large":t>520?c="is-medium":t>400?c="is-small":t&&(c="is-mobile"),[e,c]})(),i={hasContainerWidth:""!==l,containerClassName:l,isMobile:"is-mobile"===l,isSmall:"is-small"===l,isMedium:"is-medium"===l,isLarge:"is-large"===l};return Object(r.createElement)(a.Provider,{value:i},Object(r.createElement)("div",{className:s()(c,l)},n,t))}},364:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),s=c(1),a=c(8),l=c(5),i=c.n(l),u=c(148),d=c(74),p=c(276),b=c(12),m=c(113),g=c(37);c(242);var h=Object(a.forwardRef)((e,t)=>{let{className:c,id:r,type:s="text",ariaLabel:a,ariaDescribedBy:l,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:m="off",autoComplete:h="off",value:O="",onChange:j,required:E=!1,onBlur:_=(()=>{}),feedback:f,...k}=e;const[w,v]=Object(n.useState)(!1);return Object(n.createElement)("div",{className:i()("wc-block-components-text-input",c,{"is-active":w||O})},Object(n.createElement)("input",o()({type:s,id:r,value:O,ref:t,autoCapitalize:m,autoComplete:h,onChange:e=>{j(e.target.value)},onFocus:()=>v(!0),onBlur:e=>{_(e.target.value),v(!1)},"aria-label":a||u,disabled:p,"aria-describedby":b&&!l?r+"__help":l,required:E},k)),Object(n.createElement)(g.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!b&&Object(n.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},b),f)});t.a=Object(b.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:l,errorId:b,validateOnMount:g=!0,focusOnMount:O=!1,onChange:j,showError:E=!0,errorMessage:_="",...f}=e;const[k,w]=Object(a.useState)(!0),v=Object(a.useRef)(null),{getValidationError:y,hideValidationError:S,setValidationErrors:C,clearValidationError:N,getValidationErrorId:P}=Object(u.b)(),{isBeforeProcessing:R}=Object(d.b)(),x=void 0!==r?r:"textinput-"+c,T=void 0!==b?b:x,A=Object(a.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=v.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?N(T):C({[T]:{message:t.validationMessage||Object(s.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[N,T,C]);Object(a.useEffect)(()=>{var e;k&&(O&&(null===(e=v.current)||void 0===e||e.focus()),w(!1))},[O,k,w]),Object(a.useEffect)(()=>{k&&(g&&A(),w(!1))},[k,w,g,A]),Object(a.useEffect)(()=>{R&&A()},[R,A]),Object(a.useEffect)(()=>()=>{N(T)},[N,T]);const I=y(T)||{};Object(m.c)(_)&&""!==_&&(I.message=_);const M=I.message&&!I.hidden,D=E&&M&&P(T)?P(T):l;return Object(n.createElement)(h,o()({className:i()(t,{"has-error":M}),"aria-invalid":!0===M,id:x,onBlur:()=>{A(!1)},feedback:E&&Object(n.createElement)(p.a,{errorMessage:_,propertyName:T}),ref:v,onChange:e=>{S(T),j(e)},ariaDescribedBy:D},f))})},369:function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:c=!1,cancelable:o=!1,element:n,detail:s={}}=t;if(!r)return;n||(n=document.body);const a=new r(e,{bubbles:c,cancelable:o,detail:s});n.dispatchEvent(a)};let n;const s=()=>{n&&clearTimeout(n),n=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{o(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},37:function(e,t,c){"use strict";var r=c(0),o=c(5),n=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:s,wrapperProps:a={}}=e;const l=null!=c,i=null!=o;return!l&&i?(t=s||"span",a={...a,className:n()(a.className,"screen-reader-text")},Object(r.createElement)(t,a,o)):(t=s||r.Fragment,l&&i&&c!==o?Object(r.createElement)(t,a,Object(r.createElement)("span",{"aria-hidden":"true"},c),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,a,c))}},370:function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"c",(function(){return a})),c.d(t,"a",(function(){return l}));var r=c(3),o=c(132),n=c(13);const s=e=>{let{country:t="",state:c="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:c.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},a=e=>{let{email:t=""}=e;return Object(n.isEmail)(t)?t.trim():""},l=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(o.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},373:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(141);const o=(e,t)=>function(c){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=r.a.addEventCallback(e,c,o);return t(n),()=>{t(r.a.removeEventCallback(e,n.id))}}},376:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=c(59);const n=async(e,t,c)=>{const o=r(e,t),n=[];for(const e of o)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},s=async(e,t,c)=>{const n=[],s=r(e,t);for(const e of s)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},38:function(e,t){e.exports=window.wp.keycodes},4:function(e,t){e.exports=window.wp.components},43:function(e,t,c){},44:function(e,t){e.exports=window.wc.priceFormat},45:function(e,t){e.exports=window.wp.hooks},46:function(e,t,c){"use strict";c.d(t,"a",(function(){return _}));var r=c(6),o=c(0),n=c(19),s=c(10),a=c(20),l=c(211),i=c(370),u=c(73),d=c(369);const p=e=>{const t=e.detail;t&&t.preserveCartData||Object(s.dispatch)(n.CART_STORE_KEY).invalidateResolutionForStore()},b=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),b),[])},g={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...g,email:""},O={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:n.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},j=e=>Object(l.a)(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(a.decodeEntities)(c)]})),E={cartCoupons:n.EMPTY_CART_COUPONS,cartItems:n.EMPTY_CART_ITEMS,cartFees:n.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:O,cartIsLoading:!0,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:g,shippingRates:n.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:n.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:n.EMPTY_EXTENSIONS},_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(u.b)(),a=null==c?void 0:c.previewCart,{shouldSelect:l}=e,d=Object(o.useRef)();m();const p=Object(s.useSelect)((e,c)=>{let{dispatch:r}=c;if(!l)return E;if(t)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:a.totals,cartIsLoading:!1,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:g,extensions:n.EMPTY_EXTENSIONS,shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:()=>{}};const o=e(n.CART_STORE_KEY),s=o.getCartData(),u=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),b=o.isCustomerDataUpdating(),{receiveCart:m}=r(n.CART_STORE_KEY),O=j(s.billingAddress),_=s.needsShipping?j(s.shippingAddress):O,f=s.fees.length>0?s.fees.map(e=>j(e)):n.EMPTY_CART_FEES;return{cartCoupons:s.coupons.length>0?s.coupons.map(e=>({...e,label:e.code})):n.EMPTY_CART_COUPONS,cartItems:s.items,cartFees:f,cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors,cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:Object(i.a)(O),shippingAddress:Object(i.a)(_),extensions:s.extensions,shippingRates:s.shippingRates,shippingRatesLoading:b,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements,receiveCart:m}},[l]);return d.current&&Object(r.isEqual)(d.current,p)||(d.current=p),d.current}},47:function(e,t){e.exports=window.wc.wcBlocksRegistry},502:function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var r=c(0),o=c(4),n=c(1),s=c(3);const a=[];var l=c(7),i=c.n(l),u=e=>Object(r.createElement)("div",i()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(r.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{filter:"url(#filter0_ddd)"},Object(r.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(r.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(r.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(r.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(r.createElement)("defs",null,Object(r.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"2"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function d(e){let{blockName:t}=e;const[c,l]=(e=>{const[t,c]=((e,t)=>{const[c,o]=Object(r.useState)(()=>{const c=window.localStorage.getItem(e);if(c)try{return JSON.parse(c)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(r.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(c))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,c]),[c,o]})("wc-blocks_dismissed_compatibility_notices",a),[o,n]=Object(r.useState)(!1),s=t.includes(e);return Object(r.useEffect)(()=>{n(!s)},[s]),[o,()=>{const r=new Set(t);r.add(e),c([...r])}]})(t);return Object(s.isWpVersion)("5.4","<=")||!c?null:Object(r.createElement)(o.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(n.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>l(),finishButtonText:Object(n.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(r.createElement)(u,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(n.__)("Compatibility notice","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(n.__)("This block may not be compatible with all checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(r.createElement)("em",null)})),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(n.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},51:function(e,t){e.exports=window.wp.deprecated},52:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(0),o=c(31),n=c.n(o);function s(e){const t=Object(r.useRef)(e);return n()(e,t.current)||(t.current=e),t.current}},528:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},529:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},53:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),s=c(178),a=c(5),l=c.n(a);c(186);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:r,onValueChange:a,displayType:u="text",...d}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const b=p/10**r.minorUnit;if(!Number.isFinite(b))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...i(r),value:void 0,currency:void 0,onValueChange:void 0},h=a?e=>{const t=e.value*10**r.minorUnit;a(t)}:()=>{};return Object(n.createElement)(s.a,o()({className:m,displayType:u},g,{value:b,onValueChange:h}))}},530:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},531:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},532:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},533:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},534:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},535:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},536:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},537:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},538:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},539:function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},55:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...o}):null}},551:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=n},59:function(e,t,c){"use strict";c.d(t,"a",(function(){return l})),c.d(t,"b",(function(){return i})),c.d(t,"c",(function(){return d}));var r=c(113);let o,n;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(n||(n={}));const s=(e,t)=>Object(r.b)(e)&&"type"in e&&e.type===t,a=e=>s(e,o.SUCCESS),l=e=>s(e,o.ERROR),i=e=>s(e,o.FAIL),u=e=>!Object(r.b)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:n,shouldRetry:u,isSuccessResponse:a,isErrorResponse:l,isFailResponse:i})},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},62:function(e,t){e.exports=window.wp.a11y},63:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=c(174);const n=()=>{const{notices:e,createNotice:t,removeNotice:c,setIsSuppressed:n}=Object(o.b)(),s=Object(r.useRef)(e);Object(r.useEffect)(()=>{s.current=e},[e]);const a=Object(r.useMemo)(()=>({hasNoticesOfType:e=>s.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeNotice:c}),[c]),l=Object(r.useMemo)(()=>({addDefaultNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...c})},addErrorNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...c})},addWarningNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...c})},addInfoNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...c})},addSuccessNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...c})}}),[t]);return{notices:e,...a,...l,setIsSuppressed:n}}},64:function(e,t){e.exports=window.regeneratorRuntime},73:function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var r=c(0),o=c(10);const n=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),s=()=>Object(r.useContext)(n),a=e=>{let{children:t,currentPostId:c=0,currentView:s="",previewData:a={}}=e;const l=Object(o.useSelect)(e=>c||e("core/editor").getCurrentPostId(),[c]),i=Object(r.useCallback)(e=>e in a?a[e]:{},[a]),u={isEditor:!0,currentPostId:l,currentView:s,previewData:a,getPreviewData:i};return Object(r.createElement)(n.Provider,{value:u},t)}},74:function(e,t,c){"use strict";c.d(t,"b",(function(){return P})),c.d(t,"a",(function(){return R}));var r=c(0),o=c(1),n=c(142),s=c(51),a=c.n(s),l=c(113);let i;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(i||(i={}));const u=()=>({type:i.SET_IDLE}),d=e=>({type:i.SET_REDIRECT_URL,redirectUrl:e}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:i.SET_COMPLETE,data:e}},b=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?i.SET_HAS_ERROR:i.SET_NO_ERROR}};var m=c(3);let g;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(g||(g={}));const h={order_id:0,customer_id:0,...Object(m.getSetting)("checkoutData",{})||{}},O={redirectUrl:"",status:g.PRISTINE,hasError:!1,calculatingCount:0,orderId:h.order_id,orderNotes:"",customerId:h.customer_id,shouldCreateAccount:!1,processingResponse:null,extensionData:{}},j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,{redirectUrl:t,type:c,customerId:r,orderId:o,orderNotes:n,extensionData:s,shouldCreateAccount:a,data:l}=arguments.length>1?arguments[1]:void 0,u=e;switch(c){case i.SET_PRISTINE:u=O;break;case i.SET_IDLE:u=e.status!==g.IDLE?{...e,status:g.IDLE}:e;break;case i.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case i.SET_PROCESSING_RESPONSE:u={...e,processingResponse:l};break;case i.SET_COMPLETE:u=e.status!==g.COMPLETE?{...e,status:g.COMPLETE,redirectUrl:void 0!==l&&"string"==typeof l.redirectUrl&&l.redirectUrl?l.redirectUrl:e.redirectUrl}:e;break;case i.SET_PROCESSING:u=e.status!==g.PROCESSING?{...e,status:g.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case i.SET_BEFORE_PROCESSING:u=e.status!==g.BEFORE_PROCESSING?{...e,status:g.BEFORE_PROCESSING,hasError:!1}:e;break;case i.SET_AFTER_PROCESSING:u=e.status!==g.AFTER_PROCESSING?{...e,status:g.AFTER_PROCESSING}:e;break;case i.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===g.PROCESSING||e.status===g.BEFORE_PROCESSING?{...u,status:g.IDLE}:u;break;case i.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case i.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case i.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case i.SET_CUSTOMER_ID:u=void 0!==r?{...e,customerId:r}:e;break;case i.SET_ORDER_ID:u=void 0!==o?{...e,orderId:o}:e;break;case i.SET_SHOULD_CREATE_ACCOUNT:void 0!==a&&a!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:a});break;case i.SET_ORDER_NOTES:void 0!==n&&e.orderNotes!==n&&(u={...e,orderNotes:n});break;case i.SET_EXTENSION_DATA:void 0!==s&&e.extensionData!==s&&(u={...e,extensionData:s})}return u!==e&&c!==i.SET_PRISTINE&&u.status===g.PRISTINE&&(u.status=g.IDLE),u};var E=c(20),_=c(141),f=c(373);var k=c(376),w=c(148),v=c(63),y=c(75),S=c(10),C=c(59);const N=Object(r.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),P=()=>Object(r.useContext)(N),R=e=>{let{children:t,redirectUrl:c,isCart:s=!1}=e;O.redirectUrl=c;const[m,h]=Object(r.useReducer)(j,O),{setValidationErrors:P}=Object(w.b)(),{addErrorNotice:R,removeNotices:x}=Object(v.a)(),{dispatchCheckoutEvent:T}=Object(y.a)(),A=m.calculatingCount>0,{isSuccessResponse:I,isErrorResponse:M,isFailResponse:D,shouldRetry:L}=Object(C.c)(),{checkoutNotices:B,paymentNotices:F,expressPaymentNotices:V}=(()=>{const{noticeContexts:e}=Object(C.c)();return{checkoutNotices:Object(S.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(S.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(S.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[U,z]=Object(r.useReducer)(_.b,{}),H=Object(r.useRef)(U),{onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:q,onCheckoutValidationBeforeProcessing:$}=(e=>Object(r.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(f.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(f.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(f.a)("checkout_validation_before_processing",e)}),[e]))(z);Object(r.useEffect)(()=>{H.current=U},[U]);const Y=Object(r.useMemo)(()=>function(){return a()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),$(...arguments)},[$]),W=Object(r.useMemo)(()=>({resetCheckout:()=>{h({type:i.SET_PRISTINE})},setRedirectUrl:e=>{h(d(e))},setHasError:e=>{h(b(e))},incrementCalculating:()=>{h({type:i.INCREMENT_CALCULATING})},decrementCalculating:()=>{h({type:i.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;h((t=e,{type:i.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{h((e=>({type:i.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{h((e=>({type:i.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{h((e=>({type:i.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:c,value:r}=e;t.paymentDetails[c]=Object(E.decodeEntities)(r)})),"message"in e&&(t.message=Object(E.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var c;t.redirectUrl&&h(d(t.redirectUrl)),h((c=t,{type:i.SET_PROCESSING_RESPONSE,data:c})),h({type:i.SET_AFTER_PROCESSING})}}),[]);Object(r.useEffect)(()=>{m.status===g.BEFORE_PROCESSING&&(x("error"),Object(k.a)(H.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;R(t),P(c)}),h(u()),h(b())):h({type:i.SET_PROCESSING})}))},[m.status,P,R,x,h]);const X=Object(n.a)(m.status),K=Object(n.a)(m.hasError);Object(r.useEffect)(()=>{if((m.status!==X||m.hasError!==K)&&m.status===g.AFTER_PROCESSING){const e={redirectUrl:m.redirectUrl,orderId:m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,processingResponse:m.processingResponse};m.hasError?Object(k.b)(H.current,"checkout_after_processing_with_error",e).then(t=>{const c=(e=>{let t=null;return e.forEach(e=>{if((M(e)||D(e))&&e.message){const c=e.messageContext?{context:e.messageContext}:void 0;t=e,R(e.message,c)}}),t})(t);if(null!==c)L(c)?h(u()):h(p(c));else{if(!(B.some(e=>"error"===e.status)||V.some(e=>"error"===e.status)||F.some(e=>"error"===e.status))){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");R(t,{id:"checkout"})}h(u())}}):Object(k.b)(H.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,c=null;if(e.forEach(e=>{I(e)&&(t=e),(M(e)||D(e))&&(c=e)}),t&&!c)h(p(t));else if(Object(l.b)(c)){if(c.message){const e=c.messageContext?{context:c.messageContext}:void 0;R(c.message,e)}L(c)?h(b(!0)):h(p(c))}else h(p())})}},[m.status,m.hasError,m.redirectUrl,m.orderId,m.customerId,m.orderNotes,m.processingResponse,X,K,W,R,M,D,I,L,B,V,F]);const J={onSubmit:Object(r.useCallback)(()=>{T("submit"),h({type:i.SET_BEFORE_PROCESSING})},[T]),isComplete:m.status===g.COMPLETE,isIdle:m.status===g.IDLE,isCalculating:A,isProcessing:m.status===g.PROCESSING,isBeforeProcessing:m.status===g.BEFORE_PROCESSING,isAfterProcessing:m.status===g.AFTER_PROCESSING,hasError:m.hasError,redirectUrl:m.redirectUrl,onCheckoutBeforeProcessing:Y,onCheckoutValidationBeforeProcessing:$,onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:q,dispatchActions:W,isCart:s,orderId:m.orderId,hasOrder:!!m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,shouldCreateAccount:m.shouldCreateAccount,setShouldCreateAccount:e=>{return h((t=e,{type:i.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:m.extensionData};return Object(r.createElement)(N.Provider,{value:J},t)}},75:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(45),o=c(0),n=c(46);const s=()=>{const e=Object(n.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...c,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},778:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M2 .75h12c.69 0 1.25.56 1.25 1.25v12c0 .69-.56 1.25-1.25 1.25H2c-.69 0-1.25-.56-1.25-1.25V2C.75 1.31 1.31.75 2 .75z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M12 6H4V4.75h8zM12 9H4V7.75h8zM10 12H4v-1.25h6z"})));t.a=n},8:function(e,t){e.exports=window.React},801:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(14);const o=["core/paragraph","core/image","core/separator"],n=e=>[...Object(r.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...o]},802:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),o=c(10),n=c(14),s=c(6);const a=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:a=[]}=e;const l=Object(r.useRef)(c),i=Object(r.useRef)(a),{insertBlock:u,replaceInnerBlocks:d}=Object(o.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:b}=Object(o.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:l.current.map(e=>Object(n.getBlockType)(e))}),[t,l.current]),m=Object(r.useCallback)((e,c)=>{const r=Object(n.createBlock)(e.name);u(r,c,t,!1)},[t,u]),g=Object(r.useMemo)(()=>b.filter(e=>e&&(e=>{var t,c,r;let{attributes:o}=e;return Boolean((null===(t=o.lock)||void 0===t?void 0:t.remove)||(null===(c=o.lock)||void 0===c||null===(r=c.default)||void 0===r?void 0:r.remove))})(e)),[b]);Object(r.useLayoutEffect)(()=>{if(t){if(0===p.length&&i.current.length>0){const e=Object(n.createBlocksFromInnerBlocksTemplate)(i.current);if(!Object(s.isEqual)(e,p))return void d(t,e)}g.forEach(e=>{if(p.find(t=>{let{name:c}=t;return c===e.name}))return;const t=i.current.findIndex(t=>{let[c]=t;return c===e.name});switch(t){case-1:m(e,p.length);break;case 0:m(e,0);break;default:const c=i.current[t-1],r=p.findIndex(e=>{let{name:t}=e;return t===c[0]});m(e,-1===r?t:r+1)}})}},[t,p,g,d,m])}},803:function(e,t,c){"use strict";var r=c(0),o=c(5),n=c.n(o),s=(c(2),c(363));c(333),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)(s.a,{className:n()("wc-block-components-sidebar-layout",c)},t)}},804:function(e,t,c){"use strict";var r=c(0),o=c(8),n=c(5),s=c.n(n);const a=Object(o.forwardRef)((e,t)=>{let{children:c,className:o=""}=e;return Object(r.createElement)("div",{ref:t,className:s()("wc-block-components-main",o)},c)});t.a=a},807:function(e,t,c){"use strict";var r=c(0),o=c(8),n=c(5),s=c.n(n);const a=Object(o.forwardRef)((e,t)=>{let{children:c,className:o=""}=e;return Object(r.createElement)("div",{ref:t,className:s()("wc-block-components-sidebar",o)},c)});t.a=a},808:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),Object(r.createElement)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"}));t.a=n},809:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(97),s=c(256),a=(c(2),c(22)),l=c(3);c(339);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:d,values:p}=e;const{total_discount:b,total_discount_tax:m}=p,g=parseInt(b,10);if(!g&&0===t.length)return null;const h=parseInt(m,10),O=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?g+h:g,j=Object(a.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(r.createElement)(a.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==j.length&&Object(r.createElement)(n.a,{screenReaderLabel:Object(o.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map(e=>Object(r.createElement)(s.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(o.sprintf)( +/* translators: %s Coupon code. */ +Object(o.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{d(e.code)},radius:"large",ariaLabel:Object(o.sprintf)( +/* translators: %s is a coupon code. */ +Object(o.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:O?Object(o.__)("Discount","woo-gutenberg-products-block"):Object(o.__)("Coupons","woo-gutenberg-products-block"),value:O?-1*O:"-"})}},81:function(e,t,c){"use strict";c.d(t,"b",(function(){return O})),c.d(t,"a",(function(){return j}));var r=c(0),o=c(3),n=c(10),s=c(19),a=c(365),l=c(31),i=c.n(l),u=c(370),d=c(35),p=c(46),b=c(63);const m=(e,t)=>!(!function(e){return"email"in e}(t)||Object(u.c)(t)===Object(u.c)(e))||!!t.country&&!i()(Object(u.b)(e),Object(u.b)(t));var g=c(74);const h=Object(r.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>null,setShippingAddress:()=>null,shippingAsBilling:!0,setShippingAsBilling:()=>null}),O=()=>Object(r.useContext)(h),j=e=>{let{children:t}=e;const{billingData:c,shippingAddress:l,setBillingData:u,setShippingAddress:O}=(()=>{const{updateCustomerData:e}=Object(n.useDispatch)(s.CART_STORE_KEY),{addErrorNotice:t,removeNotice:c}=Object(b.a)(),{billingAddress:o,shippingAddress:l}=Object(p.a)(),[u,g]=Object(r.useState)({billingData:o,shippingAddress:l}),[h,O]=Object(r.useState)(!1);!h&&m(u.shippingAddress,l)&&(g({billingData:o,shippingAddress:l}),O(!0));const j=Object(r.useRef)(u),[E]=Object(a.a)(u,1e3,{equalityFn:(e,t)=>i()(e.billingData,t.billingData)&&i()(e.shippingAddress,t.shippingAddress)}),_=Object(r.useCallback)(e=>{g(t=>({...t,billingData:{...t.billingData,...e}}))},[]),f=Object(r.useCallback)(e=>{g(t=>({...t,shippingAddress:{...t.shippingAddress,...e}}))},[]);return Object(r.useEffect)(()=>{const r=m(j.current.billingData,E.billingData),o=m(j.current.shippingAddress,E.shippingAddress);if(!r&&!o)return;const n={};r&&(n.billing_address=E.billingData),o&&(n.shipping_address=E.shippingAddress),j.current=E,e(n).then(()=>{c("checkout")}).catch(e=>{t(Object(d.b)(e),{id:"checkout"})})},[E,t,c,e]),{billingData:u.billingData,shippingAddress:u.shippingAddress,setBillingData:_,setShippingAddress:f}})(),{cartNeedsShipping:j}=Object(p.a)(),{customerId:E}=Object(g.b)(),[_,f]=Object(r.useState)(()=>{return j&&(!E||(e=l,t=c,Object.keys(o.defaultAddressFields).every(c=>e[c]===t[c])));var e,t}),k={billingData:c,shippingAddress:l,setBillingData:u,setShippingAddress:O,shippingAsBilling:_,setShippingAsBilling:f};return Object(r.createElement)(h.Provider,{value:k},t)}},810:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(108),s=c(364),a=c(37),l=c(97),i=(c(2),c(12)),u=c(148),d=c(276),p=c(22);c(341),t.a=Object(i.withInstanceId)(e=>{let{instanceId:t,isLoading:c=!1,initialOpen:i=!1,onSubmit:b=(()=>{})}=e;const[m,g]=Object(r.useState)(""),h=Object(r.useRef)(!1),{getValidationError:O,getValidationErrorId:j}=Object(u.b)(),E=O("coupon");Object(r.useEffect)(()=>{h.current!==c&&(c||!m||E||g(""),h.current=c)},[c,m,E]);const _="wc-block-components-totals-coupon__input-"+t;return Object(r.createElement)(p.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:i,title:Object(r.createElement)(a.a,{label:Object(o.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:_})},Object(r.createElement)(l.a,{screenReaderLabel:Object(o.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:c,showSpinner:!1},Object(r.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(r.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(r.createElement)(s.a,{id:_,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(o.__)("Enter code","woo-gutenberg-products-block"),value:m,ariaDescribedBy:j(_),onChange:e=>{g(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),Object(r.createElement)(n.a,{className:"wc-block-components-totals-coupon__button",disabled:c||!m,showSpinner:c,onClick:e=>{e.preventDefault(),b(m)},type:"submit"},Object(o.__)("Apply","woo-gutenberg-products-block"))),Object(r.createElement)(d.a,{propertyName:"coupon",elementId:_}))))})},813:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return o}));const r=e=>e.length,o=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},814:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(53),s=(c(2),c(22)),a=c(46),l=c(3);c(348),t.a=e=>{let{currency:t,values:c}=e;const i=Object(l.getSetting)("taxesEnabled",!0)&&Object(l.getSetting)("displayCartPricesIncludingTax",!1),{total_price:u,total_tax:d}=c,{receiveCart:p,...b}=Object(a.a)(),m=Object(s.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(o.__)("Total","woo-gutenberg-products-block"),extensions:b.extensions,arg:{cart:b}}),g=parseInt(d,10);return Object(r.createElement)(s.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:m,value:parseInt(u,10),description:i&&0!==g&&Object(r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(r.createInterpolateElement)(Object(o.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(r.createElement)(n.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},815:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=n},820:function(e,t,c){"use strict";c.d(t,"a",(function(){return d})),c.d(t,"b",(function(){return b}));var r=c(9),o=c(61),n=c(10),s=c(0),a=c(38),l=c(45),i=c(14);const u=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},d=()=>{Object(l.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||Object(n.subscribe)(()=>{var e,t,c,o;const s=Object(n.select)(r.store);if(!s)return;const a=s.getSelectedBlock();a&&(u("wc-lock-selected-block--remove",!(null==a||null===(e=a.attributes)||void 0===e||null===(t=e.lock)||void 0===t||!t.remove)),u("wc-lock-selected-block--move",!(null==a||null===(c=a.attributes)||void 0===c||null===(o=c.lock)||void 0===o||!o.move)))})},p=e=>{let{ref:t}=e;const c=Object(l.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),u=t.current;return Object(s.useEffect)(()=>{if(u&&!c)return u.addEventListener("keydown",e,{capture:!0,passive:!1}),()=>{u.removeEventListener("keydown",e,{capture:!0})};function e(e){const{keyCode:t,target:c}=e;if(!(c instanceof HTMLElement))return;if(t!==a.BACKSPACE&&t!==a.DELETE)return;if(Object(o.isTextField)(c))return;const s=c;void 0!==s.dataset.block&&(e=>{var t,c,o,s,a;if(!e)return!1;const{getBlock:l}=Object(n.select)(r.store),u=l(e);if("boolean"==typeof(null==u||null===(t=u.attributes)||void 0===t||null===(c=t.lock)||void 0===c?void 0:c.remove))return u.attributes.lock.remove;const d=Object(i.getBlockType)(u.name);var p,b,m;return"boolean"==typeof(null==d||null===(o=d.attributes)||void 0===o||null===(s=o.lock)||void 0===s||null===(a=s.default)||void 0===a?void 0:a.remove)&&(null==d||null===(p=d.attributes)||void 0===p||null===(b=p.lock)||void 0===b||null===(m=b.default)||void 0===m?void 0:m.remove)})(s.dataset.block)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},[u,c])},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Object(s.useRef)(),c=Object(r.useBlockProps)({ref:t,...e});return p({ref:t}),c}},821:function(e,t,c){e.exports=c(846)},822:function(e,t){},823:function(e,t){},824:function(e,t){},825:function(e,t){},826:function(e,t){},827:function(e,t){},828:function(e,t){},829:function(e,t){},830:function(e,t){},831:function(e,t){},832:function(e,t){},833:function(e,t){},834:function(e,t){},835:function(e,t){},836:function(e,t){},837:function(e,t){},838:function(e,t){},846:function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(5),s=c.n(n),a=c(55),l=c(18),i=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M5 3.75h14c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H5c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.4 10.75c0-.47.38-.85.85-.85h9.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-9.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h8.8v-.8H7.6zM12.4 15.25c0-.47.38-.85.85-.85h3.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-3.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h2.8v-.8h-2.8zM6.5 15.9a.6.6 0 01.6-.6h2.8a.6.6 0 010 1.2H7.1a.6.6 0 01-.6-.6zM6.5 7.9a.6.6 0 01.6-.6h9.8a.6.6 0 110 1.2H7.1a.6.6 0 01-.6-.6z",clipRule:"evenodd"})),u=c(110),d=c(14),p=c(9),b=c(803),m=c(73),g=c(356),h=c(876);const O={cc:[{method:{gateway:"stripe",last4:"5678",brand:"Visa"},expires:"12/20",is_default:!1,tokenId:"1"}]};var j=c(4),E=c(251),_=c(32),f=c(3),k=c(502),w=(c(838),c(820));const v=Object(r.createContext)({allowCreateAccount:!1,showCompanyField:!1,showApartmentField:!1,showPhoneField:!1,requireCompanyField:!1,requirePhoneField:!1,showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1}),y=Object(r.createContext)({addressFieldControls:()=>null,accountControls:()=>null}),S=()=>Object(r.useContext)(v),C=()=>Object(r.useContext)(y);Object(w.a)();const N=["woocommerce/checkout-fields-block","woocommerce/checkout-totals-block"],P=e=>{let{attributes:t,setAttributes:c}=e;const{hasDarkControls:n}=t,{currentPostId:s}=Object(m.b)();return Object(r.createElement)(p.InspectorControls,null,s!==_.e&&Object(r.createElement)(j.Notice,{className:"wc-block-checkout__page-notice",isDismissible:!1,status:"warning"},Object(r.createInterpolateElement)(Object(o.__)("If you would like to use this block as your default checkout you must update your page settings in WooCommerce.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:Object(f.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Style","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(o.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:n,onChange:()=>c({hasDarkControls:!n})})),Object(r.createElement)(E.a,null))},R={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(f.getSetting)("hasDarkEditorStyleSupport",!1)},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},allowCreateAccount:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1},showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:Object(f.getSetting)("displayCartPricesIncludingTax",!1)}};var x=c(890),T=c(891),A=c(804),I=c(22),M=c(801),D=c(802);c(822);var L=c(528);Object(u.d)(L,{icon:{src:Object(r.createElement)(x.a,{icon:T.a}),foreground:"#7f54b3"},edit:e=>{let{clientId:t,attributes:c}=e;const o=Object(p.useBlockProps)({className:s()("wc-block-checkout__main",null==c?void 0:c.className)}),n=Object(M.a)(I.innerBlockAreas.CHECKOUT_FIELDS),{addressFieldControls:a}=C(),l=[["woocommerce/checkout-express-payment-block",{},[]],["woocommerce/checkout-contact-information-block",{},[]],["woocommerce/checkout-shipping-address-block",{},[]],["woocommerce/checkout-billing-address-block",{},[]],["woocommerce/checkout-shipping-methods-block",{},[]],["woocommerce/checkout-payment-block",{},[]],["woocommerce/checkout-order-note-block",{},[]],["woocommerce/checkout-terms-block",{},[]],["woocommerce/checkout-actions-block",{},[]]].filter(Boolean);return Object(D.a)({clientId:t,registeredBlocks:n,defaultTemplate:l}),Object(r.createElement)(A.a,o,Object(r.createElement)(a,null),Object(r.createElement)("form",{className:"wc-block-components-form wc-block-checkout__form"},Object(r.createElement)(p.InnerBlocks,{allowedBlocks:n,templateLock:!1,template:l,renderAppender:p.InnerBlocks.ButtonBlockAppender})))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(p.InnerBlocks.Content,null))});var B=c(807);c(823);var F=c(529);Object(u.d)(F,{icon:{src:Object(r.createElement)(x.a,{icon:T.a}),foreground:"#7f54b3"},edit:e=>{let{clientId:t,attributes:c}=e;const o=Object(p.useBlockProps)({className:s()("wc-block-checkout__sidebar",null==c?void 0:c.className)}),{showRateAfterTaxName:n}=S(),a=Object(M.a)(I.innerBlockAreas.CHECKOUT_TOTALS),l=[["woocommerce/checkout-order-summary-block",{showRateAfterTaxName:n},[]]];return Object(D.a)({clientId:t,registeredBlocks:a,defaultTemplate:l}),Object(r.createElement)(B.a,o,Object(r.createElement)(p.InnerBlocks,{allowedBlocks:a,templateLock:!1,template:l,renderAppender:p.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(p.InnerBlocks.Content,null))});var V=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 16"},Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.6 0A5.596 5.596 0 000 5.6C0 9.8 5.6 16 5.6 16s5.6-6.2 5.6-10.4C11.2 2.504 8.696 0 5.6 0zm-4 5.6c0-2.208 1.792-4 4-4s4 1.792 4 4c0 2.304-2.304 5.752-4 7.904-1.664-2.136-4-5.624-4-7.904zm2 0a2 2 0 114 0 2 2 0 01-4 0z"})),U=c(162),z=e=>{let{children:t,stepHeadingContent:c}=e;return Object(r.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(r.createElement)(U.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(r.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};const H=e=>{let{attributes:t,setAttributes:c,className:n="",children:a}=e;const{title:l="",description:i="",showStepNumber:u=!0}=t,d=Object(p.useBlockProps)({className:s()("wc-block-components-checkout-step",n,{"wc-block-components-checkout-step--with-step-number":u})});return Object(r.createElement)("div",d,Object(r.createElement)(p.InspectorControls,null,Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Form Step Options","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Show step number","woo-gutenberg-products-block"),checked:u,onChange:()=>c({showStepNumber:!u})}))),Object(r.createElement)(z,null,Object(r.createElement)(p.PlainText,{className:"",value:l,onChange:e=>c({title:e})})),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__container"},Object(r.createElement)("p",{className:"wc-block-components-checkout-step__description"},Object(r.createElement)(p.PlainText,{className:i?"":"wc-block-components-checkout-step__description-placeholder",value:i,placeholder:Object(o.__)("Optional text for this form step.","woo-gutenberg-products-block"),onChange:e=>c({description:e})})),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__content"},a)))};c(824);const G=e=>{let{block:t}=e;const{"data-block":c}=Object(p.useBlockProps)(),o=Object(M.a)(t);return Object(D.a)({clientId:c,registeredBlocks:o}),Object(r.createElement)("div",{className:"wc-block-checkout__additional_fields"},Object(r.createElement)(p.InnerBlocks,{allowedBlocks:o}))},q=()=>Object(r.createElement)(p.InnerBlocks.Content,null);var $=c(851),Y=c(98),W=c(81);const X=()=>{const{needsShipping:e}=Object(Y.b)(),{billingData:t,setBillingData:c,shippingAddress:o,setShippingAddress:n,shippingAsBilling:s,setShippingAsBilling:a}=Object(W.b)(),l=Object(r.useRef)(s),i=Object(r.useRef)(t),u=Object(r.useCallback)(e=>{n(e),s&&c(e)},[s,n,c]),d=Object(r.useCallback)(t=>{c(t),e||n(t)},[e,n,c]);Object(r.useEffect)(()=>{if(l.current!==s){if(s)i.current=t,c(o);else{const{email:e,...t}=i.current;c({...t})}l.current=s}},[s,c,o,t]);const p=Object(r.useCallback)(e=>{c({email:e})},[c]),b=Object(r.useCallback)(e=>{c({phone:e})},[c]),m=Object(r.useCallback)(e=>{u({phone:e})},[u]);return{defaultAddressFields:f.defaultAddressFields,shippingFields:o,setShippingFields:u,billingFields:t,setBillingFields:d,setEmail:p,setPhone:b,setShippingPhone:m,shippingAsBilling:s,setShippingAsBilling:a,showShippingFields:e,showBillingFields:!e||!l.current}};var K=c(75),J=c(86),Q=c(364),Z=e=>{let{id:t="phone",isRequired:c=!1,value:n="",onChange:s}=e;return Object(r.createElement)(Q.a,{id:t,type:"tel",autoComplete:"tel",required:c,label:c?Object(o.__)("Phone","woo-gutenberg-products-block"):Object(o.__)("Phone (optional)","woo-gutenberg-products-block"),value:n,onChange:s})},ee=e=>{let{showCompanyField:t=!1,showApartmentField:c=!1,showPhoneField:n=!1,requireCompanyField:s=!1,requirePhoneField:a=!1}=e;const{defaultAddressFields:l,setShippingFields:i,shippingFields:u,setShippingAsBilling:d,shippingAsBilling:p,setShippingPhone:b}=X(),{dispatchCheckoutEvent:g}=Object(K.a)(),{isEditor:h}=Object(m.b)();Object(r.useEffect)(()=>{n||b("")},[n,b]);const O=Object(r.useMemo)(()=>({company:{hidden:!t,required:s},address_2:{hidden:!c}}),[t,s,c]),j=h?J.a:r.Fragment;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(j,null,Object(r.createElement)($.a,{id:"shipping",type:"shipping",onChange:e=>{i(e),g("set-shipping-address")},values:u,fields:Object.keys(l),fieldConfig:O}),n&&Object(r.createElement)(Z,{id:"shipping-phone",isRequired:a,value:u.phone,onChange:e=>{b(e),g("set-phone-number",{step:"shipping"})}})),Object(r.createElement)(I.CheckboxControl,{className:"wc-block-checkout__use-address-for-billing",label:Object(o.__)("Use same address for billing","woo-gutenberg-products-block"),checked:p,onChange:e=>d(e)}))},te=e=>{let{defaultTitle:t=Object(o.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(o.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:r=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:r}}},ce={...te({defaultTitle:Object(o.__)("Shipping address","woo-gutenberg-products-block"),defaultDescription:Object(o.__)("Enter the address where you want your order delivered.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},re=c(530);Object(u.d)(re,{icon:{src:Object(r.createElement)(a.a,{srcElement:V}),foreground:"#7f54b3"},attributes:ce,edit:e=>{let{attributes:t,setAttributes:c}=e;const{showCompanyField:o,showApartmentField:n,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}=S(),{addressFieldControls:u}=C();return Object(r.createElement)(H,{setAttributes:c,attributes:t,className:s()("wc-block-checkout__shipping-fields",null==t?void 0:t.className)},Object(r.createElement)(u,null),Object(r.createElement)(ee,{showCompanyField:o,showApartmentField:n,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}),Object(r.createElement)(G,{block:I.innerBlockAreas.SHIPPING_ADDRESS}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(q,null))});var oe=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},Object(r.createElement)("g",{fill:"currentColor",fillRule:"evenodd"},Object(r.createElement)("path",{d:"M13.147 2.527c.288.279.295.739.015 1.027L9 7.84l4.449 4.581a.726.726 0 11-1.042 1.012l-4.42-4.55-4.419 4.55a.726.726 0 01-1.042-1.012l4.45-4.581L2.81 3.554a.726.726 0 011.042-1.012l4.133 4.256 4.134-4.256a.726.726 0 011.027-.015z"}),Object(r.createElement)("path",{d:"M.467 7.915c0-.4.326-.726.727-.726H7.29l-.03-5.99a.726.726 0 011.452-.008l.031 5.998h6.229a.726.726 0 110 1.453H8.752l.033 6.328a.726.726 0 11-1.453.007L7.3 8.642H1.194a.726.726 0 01-.727-.727z"}))),ne=c(893);c(825);const se=_.k?`${Object(o.__)("Terms and Conditions","woo-gutenberg-products-block")}`:Object(o.__)("Terms and Conditions","woo-gutenberg-products-block"),ae=_.g?`${Object(o.__)("Privacy Policy","woo-gutenberg-products-block")}`:Object(o.__)("Privacy Policy","woo-gutenberg-products-block"),le=Object(o.sprintf)( +/* translators: %1$s terms page link, %2$s privacy page link. */ +Object(o.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woo-gutenberg-products-block"),se,ae),ie=Object(o.sprintf)( +/* translators: %1$s terms page link, %2$s privacy page link. */ +Object(o.__)("You must accept our %1$s and %2$s to continue with your purchase.","woo-gutenberg-products-block"),se,ae);var ue=c(531);Object(u.d)(ue,{icon:{src:Object(r.createElement)(a.a,{srcElement:oe}),foreground:"#7f54b3"},edit:e=>{let{attributes:{checkbox:t,text:c},setAttributes:n}=e;const s=Object(p.useBlockProps)(),a=c||(t?ie:le);return Object(r.createElement)("div",s,Object(r.createElement)(p.InspectorControls,null,Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Display options","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Require checkbox","woo-gutenberg-products-block"),checked:t,onChange:()=>n({checkbox:!t})}))),Object(r.createElement)("div",{className:"wc-block-checkout__terms"},t?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(I.CheckboxControl,{id:"terms-condition",checked:!1}),Object(r.createElement)(p.RichText,{value:a,onChange:e=>n({text:e})})):Object(r.createElement)(p.RichText,{tagName:"span",value:a,onChange:e=>n({text:e})})),(!_.k||!_.g)&&Object(r.createElement)(j.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:[!_.k&&{className:"wc-block-checkout__terms_notice-button",label:Object(r.createElement)(r.Fragment,null,Object(o.__)("Setup a Terms and Conditions page","woo-gutenberg-products-block"),Object(r.createElement)(x.a,{icon:ne.a,size:16,className:"wc-block-checkout__terms_notice-button__icon"})),onClick:()=>window.open(f.ADMIN_URL+"admin.php?page=wc-settings&tab=advanced","_blank")},!_.g&&{className:"wc-block-checkout__terms_notice-button",label:Object(r.createElement)(r.Fragment,null,Object(o.__)("Setup a Privacy Policy page","woo-gutenberg-products-block"),Object(r.createElement)(x.a,{size:16,icon:ne.a,className:"wc-block-checkout__terms_notice-button__icon"})),onClick:()=>window.open(f.ADMIN_URL+"options-privacy.php","_blank")}].filter(Boolean)},Object(r.createElement)("p",null,Object(o.__)("You don't seem to have a Terms and Conditions and/or a Privacy Policy pages setup.","woo-gutenberg-products-block"))),_.k&&_.g&&!(a.includes(_.k)&&a.includes(_.g))&&Object(r.createElement)(j.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:le!==c?[{label:Object(o.__)("Restore default text","woo-gutenberg-products-block"),onClick:()=>n({text:""})}]:[]},Object(r.createElement)("p",null,Object(o.__)("Ensure you add links to your policy pages in this section.","woo-gutenberg-products-block"))))},save:()=>Object(r.createElement)("div",p.useBlockProps.save())});var de=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 16"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M2 .75h16c.69 0 1.25.56 1.25 1.25v12c0 .69-.56 1.25-1.25 1.25H2c-.69 0-1.25-.56-1.25-1.25V2C.75 1.31 1.31.75 2 .75z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M7.667 7.667A2.34 2.34 0 0010 5.333 2.34 2.34 0 007.667 3a2.34 2.34 0 00-2.334 2.333 2.34 2.34 0 002.334 2.334zM11.556 3H17v3.889h-5.444V3zm2.722 2.916l1.944-1.36v-.779L14.278 5.14l-1.945-1.362v.778l1.945 1.361zm-5.834-.583a.78.78 0 00-.777-.777.78.78 0 00-.778.777c0 .428.35.778.778.778a.78.78 0 00.777-.778zm3.89 5.904c0-1.945-3.088-2.785-4.667-2.785-1.58 0-4.667.84-4.667 2.785v1.097h9.333v-1.097zM7.666 10c-1.012 0-2.163.389-2.738.778h5.475C9.821 10.38 8.678 10 7.667 10z"}))),pe=c(74),be=e=>{let{allowCreateAccount:t}=e;const{customerId:c,shouldCreateAccount:n,setShouldCreateAccount:s}=Object(pe.b)(),{billingFields:a,setEmail:l}=X(),{dispatchCheckoutEvent:i}=Object(K.a)(),u=!c&&t&&Object(f.getSetting)("checkoutAllowsGuest",!1)&&Object(f.getSetting)("checkoutAllowsSignup",!1)&&Object(r.createElement)(I.CheckboxControl,{className:"wc-block-checkout__create-account",label:Object(o.__)("Create an account?","woo-gutenberg-products-block"),checked:n,onChange:e=>s(e)});return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Q.a,{id:"email",type:"email",label:Object(o.__)("Email address","woo-gutenberg-products-block"),value:a.email,autoComplete:"email",onChange:e=>{l(e),i("set-email-address")},required:!0}),u)},me={...te({defaultTitle:Object(o.__)("Contact information","woo-gutenberg-products-block"),defaultDescription:Object(o.__)("We'll use this email to send you details and updates about your order.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{remove:!0,move:!0}}},ge=c(532);Object(u.d)(ge,{icon:{src:Object(r.createElement)(a.a,{srcElement:de}),foreground:"#7f54b3"},attributes:me,edit:e=>{let{attributes:t,setAttributes:c}=e;const{allowCreateAccount:o}=S(),{accountControls:n}=C();return Object(r.createElement)(H,{attributes:t,setAttributes:c,className:s()("wc-block-checkout__contact-fields",null==t?void 0:t.className)},Object(r.createElement)(n,null),Object(r.createElement)(J.a,null,Object(r.createElement)(be,{allowCreateAccount:o})),Object(r.createElement)(G,{block:I.innerBlockAreas.CONTACT_INFORMATION}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(q,null))});var he=e=>{let{showCompanyField:t=!1,showApartmentField:c=!1,showPhoneField:o=!1,requireCompanyField:n=!1,requirePhoneField:s=!1}=e;const{defaultAddressFields:a,billingFields:l,setBillingFields:i,setPhone:u}=X(),{dispatchCheckoutEvent:d}=Object(K.a)(),{isEditor:p}=Object(m.b)();Object(r.useEffect)(()=>{o||u("")},[o,u]);const b=Object(r.useMemo)(()=>({company:{hidden:!t,required:n},address_2:{hidden:!c}}),[t,n,c]),g=p?J.a:r.Fragment;return Object(r.createElement)(g,null,Object(r.createElement)($.a,{id:"billing",type:"billing",onChange:e=>{i(e),d("set-billing-address")},values:l,fields:Object.keys(a),fieldConfig:b}),o&&Object(r.createElement)(Z,{isRequired:s,value:l.phone,onChange:e=>{u(e),d("set-phone-number",{step:"billing"})}}))},Oe={...te({defaultTitle:Object(o.__)("Billing address","woo-gutenberg-products-block"),defaultDescription:Object(o.__)("Enter the address that matches your card or payment method.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},je=c(533);Object(u.d)(je,{icon:{src:Object(r.createElement)(a.a,{srcElement:V}),foreground:"#7f54b3"},attributes:Oe,edit:e=>{let{attributes:t,setAttributes:c}=e;const{showCompanyField:o,showApartmentField:n,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}=S(),{addressFieldControls:u}=C(),{showBillingFields:d}=X();return d?Object(r.createElement)(H,{setAttributes:c,attributes:t,className:s()("wc-block-checkout__billing-fields",null==t?void 0:t.className)},Object(r.createElement)(u,null),Object(r.createElement)(he,{showCompanyField:o,showApartmentField:n,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}),Object(r.createElement)(G,{block:I.innerBlockAreas.BILLING_ADDRESS})):null},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(q,null))});var Ee=c(892),_e=c(10),fe=c(250),ke=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},Object(r.createElement)("path",{d:"M20 11H7.8l5.6-5.6L12 4l-8 8 8 8 1.4-1.4L7.8 13H20v-2z"}));c(827);var we=e=>{let{link:t}=e;return Object(r.createElement)("a",{href:t||_.d,className:"wc-block-components-checkout-return-to-cart-button"},Object(r.createElement)(a.a,{srcElement:ke}),Object(o.__)("Return to Cart","woo-gutenberg-products-block"))},ve=c(260),ye=c(258),Se=c(551),Ce=c(108),Ne=()=>{const{submitButtonText:e,onSubmit:t,isCalculating:c,isDisabled:n,waitingForProcessing:s,waitingForRedirect:l}=(()=>{const{onSubmit:e,isCalculating:t,isBeforeProcessing:c,isProcessing:r,isAfterProcessing:n,isComplete:s,hasError:a}=Object(pe.b)(),{paymentMethods:l={}}=Object(ye.b)(),{activePaymentMethod:i,currentStatus:u}=Object(ve.b)(),d=l[i]||{},p=r||n||c,b=s&&!a;return{submitButtonText:(null==d?void 0:d.placeOrderButtonLabel)||Object(o.__)("Place Order","woo-gutenberg-products-block"),onSubmit:e,isCalculating:t,isDisabled:r||u.isDoingExpressPayment,waitingForProcessing:p,waitingForRedirect:b}})();return Object(r.createElement)(Ce.a,{className:"wc-block-components-checkout-place-order-button",onClick:t,disabled:c||n||s||l,showSpinner:s},l?Object(r.createElement)(a.a,{srcElement:Se.a,alt:Object(o.__)("Done","woo-gutenberg-products-block")}):e)};c(826);var Pe=e=>{let{cartPageId:t,showReturnToCart:c,className:o}=e;return Object(r.createElement)("div",{className:s()("wc-block-checkout__actions",o)},c&&Object(r.createElement)(we,{link:Object(f.getSetting)("page-"+t,!1)}),Object(r.createElement)(Ne,null))},Re=c(534);Object(u.d)(Re,{icon:{src:Object(r.createElement)(x.a,{icon:Ee.a}),foreground:"#7f54b3"},attributes:{cartPageId:{type:"number",default:0},showReturnToCart:{type:"boolean",default:!0},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},edit:e=>{let{attributes:t,setAttributes:c}=e;const n=Object(p.useBlockProps)(),{cartPageId:s=0,showReturnToCart:a=!0}=t,{current:l}=Object(r.useRef)(s),i=Object(_e.useSelect)(e=>l||e("core/editor").getCurrentPostId(),[l]);return Object(r.createElement)("div",n,Object(r.createElement)(p.InspectorControls,null,Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Account options","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)('Show a "Return to Cart" link',"woo-gutenberg-products-block"),checked:a,onChange:()=>c({showReturnToCart:!a})})),a&&!(i===_.e&&0===l)&&Object(r.createElement)(fe.a,{pageId:s,setPageId:e=>c({cartPageId:e}),labels:{title:Object(o.__)("Return to Cart button","woo-gutenberg-products-block"),default:Object(o.__)("WooCommerce Cart Page","woo-gutenberg-products-block")}})),Object(r.createElement)(J.a,null,Object(r.createElement)(Pe,{showReturnToCart:a,cartPageId:s})))},save:()=>Object(r.createElement)("div",p.useBlockProps.save())});var xe=c(778);c(829);const Te=e=>{let{title:t,stepHeadingContent:c}=e;return Object(r.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(r.createElement)(U.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(r.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};var Ae=e=>{let{id:t,className:c,title:o,legend:n,description:a,children:l,disabled:i=!1,showStepNumber:u=!0,stepHeadingContent:d=(()=>{})}=e;const p=n||o?"fieldset":"div";return Object(r.createElement)(p,{className:s()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":u,"wc-block-components-checkout-step--disabled":i}),id:t,disabled:i},!(!n&&!o)&&Object(r.createElement)("legend",{className:"screen-reader-text"},n||o),!!o&&Object(r.createElement)(Te,{title:o,stepHeadingContent:d()}),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!a&&Object(r.createElement)("p",{className:"wc-block-components-checkout-step__description"},a),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__content"},l)))},Ie=c(2),Me=c.n(Ie);c(831);var De=e=>{let{className:t="",disabled:c=!1,onTextChange:o,placeholder:n,value:a=""}=e;return Object(r.createElement)("textarea",{className:s()("wc-block-components-textarea",t),disabled:c,onChange:e=>{o(e.target.value)},placeholder:n,rows:2,value:a})};c(830),De.propTypes={onTextChange:Me.a.func.isRequired,disabled:Me.a.bool,placeholder:Me.a.string,value:Me.a.string};var Le=e=>{let{disabled:t,onChange:c,placeholder:n,value:s}=e;const[a,l]=Object(r.useState)(!1),[i,u]=Object(r.useState)("");return Object(r.createElement)("div",{className:"wc-block-checkout__add-note"},Object(r.createElement)(I.CheckboxControl,{disabled:t,label:Object(o.__)("Add a note to your order","woo-gutenberg-products-block"),checked:a,onChange:e=>{l(e),e?s!==i&&c(i):(c(""),u(s))}}),a&&Object(r.createElement)(De,{disabled:t,onTextChange:c,placeholder:n,value:s}))},Be=e=>{let{className:t}=e;const{needsShipping:c}=Object(Y.b)(),{isProcessing:n,orderNotes:a,dispatchActions:l}=Object(pe.b)(),{setOrderNotes:i}=l;return Object(r.createElement)(Ae,{id:"order-notes",showStepNumber:!1,className:s()("wc-block-checkout__order-notes",t),disabled:n},Object(r.createElement)(Le,{disabled:n,onChange:i,placeholder:c?Object(o.__)("Notes about your order, e.g. special notes for delivery.","woo-gutenberg-products-block"):Object(o.__)("Notes about your order.","woo-gutenberg-products-block"),value:a}))};c(828);var Fe=c(535);Object(u.d)(Fe,{icon:{src:Object(r.createElement)(a.a,{srcElement:xe.a}),foreground:"#7f54b3"},edit:()=>{const e=Object(p.useBlockProps)();return Object(r.createElement)("div",e,Object(r.createElement)(J.a,null,Object(r.createElement)(Be,null)))},save:()=>Object(r.createElement)("div",p.useBlockProps.save())});var Ve=c(808),Ue=c(363),ze=c(37),He=c(139),Ge=c(173),qe=c(44),$e=c(184),Ye=c(46),We=c(113),Xe=c(354),Ke=c(353),Je=c(355),Qe=c(357);const Ze=e=>Object(I.mustContain)(e,"");var et=e=>{let{cartItem:t}=e;const{images:c,low_stock_remaining:n,show_backorder_badge:a,name:l,permalink:i,prices:u,quantity:d,short_description:p,description:b,item_data:m,variation:g,totals:h,extensions:O}=t,{receiveCart:j,...E}=Object(Ye.a)(),_=Object(r.useMemo)(()=>({context:"summary",cartItem:t,cart:E}),[t,E]),k=Object(qe.getCurrencyFromPriceResponse)(u),w=Object(I.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:l,extensions:O,arg:_}),v=Object($e.a)({amount:parseInt(u.raw_prices.regular_price,10),precision:Object(We.c)(u.raw_prices.precision)?parseInt(u.raw_prices.precision,10):u.raw_prices.precision}).convertPrecision(k.minorUnit).getAmount(),y=Object($e.a)({amount:parseInt(u.raw_prices.price,10),precision:Object(We.c)(u.raw_prices.precision)?parseInt(u.raw_prices.precision,10):u.raw_prices.precision}).convertPrecision(k.minorUnit).getAmount(),S=Object(qe.getCurrencyFromPriceResponse)(h);let C=parseInt(h.line_subtotal,10);Object(f.getSetting)("displayCartPricesIncludingTax",!1)&&(C+=parseInt(h.line_subtotal_tax,10));const N=Object($e.a)({amount:C,precision:S.minorUnit}).getAmount(),P=Object(I.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:O,arg:_,validation:Ze}),R=Object(I.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:O,arg:_,validation:Ze}),x=Object(I.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:O,arg:_});return Object(r.createElement)("div",{className:s()("wc-block-components-order-summary-item",x)},Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__image"},Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__quantity"},Object(r.createElement)(ze.a,{label:d.toString(),screenReaderLabel:Object(o.sprintf)( +/* translators: %d number of products of the same type in the cart */ +Object(o._n)("%d item","%d items",d,"woo-gutenberg-products-block"),d)})),Object(r.createElement)(Ke.a,{image:c.length?c[0]:{},fallbackAlt:w})),Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__description"},Object(r.createElement)(Ge.a,{disabled:!0,name:w,permalink:i}),Object(r.createElement)(He.a,{currency:k,price:y,regularPrice:v,className:"wc-block-components-order-summary-item__individual-prices",priceClassName:"wc-block-components-order-summary-item__individual-price",regularPriceClassName:"wc-block-components-order-summary-item__regular-individual-price",format:P}),a?Object(r.createElement)(Xe.a,null):!!n&&Object(r.createElement)(Je.a,{lowStockRemaining:n}),Object(r.createElement)(Qe.a,{shortDescription:p,fullDescription:b,itemData:m,variation:g})),Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.sprintf)( +/* translators: %1$d is the number of items, %2$s is the item name and %3$s is the total price including the currency symbol. */ +Object(o._n)("Total price for %1$d %2$s item: %3$s","Total price for %1$d %2$s items: %3$s",d,"woo-gutenberg-products-block"),d,w,Object(qe.formatPrice)(N,S))),Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},Object(r.createElement)(He.a,{currency:S,format:R,price:N})))};c(832);var tt=e=>{let{cartItems:t=[]}=e;const{isLarge:c,hasContainerWidth:n}=Object(Ue.b)();return n?Object(r.createElement)(I.Panel,{className:"wc-block-components-order-summary",initialOpen:c,hasBorder:!1,title:Object(r.createElement)("span",{className:"wc-block-components-order-summary__button-text"},Object(o.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},Object(r.createElement)("div",{className:"wc-block-components-order-summary__content"},t.map(e=>Object(r.createElement)(et,{key:e.key,cartItem:e})))):null},ct=c(809),rt=c(810),ot=c(854),nt=c(814),st=c(254),at=e=>{let{showRateAfterTaxName:t=!1,className:c}=e;const{cartItems:o,cartTotals:n,cartCoupons:s,cartFees:a}=Object(Ye.a)(),{applyCoupon:l,removeCoupon:i,isApplyingCoupon:u,isRemovingCoupon:d}=Object(st.a)(),{needsShipping:p}=Object(Y.b)(),b=Object(qe.getCurrencyFromPriceResponse)(n),{extensions:m,receiveCart:g,...h}=Object(Ye.a)(),O={extensions:m,cart:h};return Object(r.createElement)("div",{className:c},Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(tt,{cartItems:o})),Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(I.Subtotal,{currency:b,values:n}),Object(r.createElement)(I.TotalsFees,{currency:b,cartFees:a}),Object(r.createElement)(ct.a,{cartCoupons:s,currency:b,isRemovingCoupon:d,removeCoupon:i,values:n})),Object(f.getSetting)("couponsEnabled",!0)&&Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(rt.a,{onSubmit:l,initialOpen:!1,isLoading:u})),p&&Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(ot.a,{showCalculator:!1,showRateSelector:!1,values:n,currency:b})),Object(r.createElement)(I.ExperimentalDiscountsMeta.Slot,O),!Object(f.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(n.total_tax,10)>0&&Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(I.TotalsTaxes,{currency:b,showRateAfterTaxName:t,values:n})),Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(nt.a,{currency:b,values:n})),Object(r.createElement)(I.ExperimentalOrderMeta.Slot,O))},lt={showRateAfterTaxName:{type:"boolean",default:Object(f.getSetting)("displayCartPricesIncludingTax",!1)},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},it=c(536);Object(u.d)(it,{icon:{src:Object(r.createElement)(a.a,{srcElement:Ve.a}),foreground:"#7f54b3"},attributes:lt,edit:e=>{let{attributes:t,setAttributes:c}=e;const n=Object(p.useBlockProps)(),s=Object(f.getSetting)("taxesEnabled"),a=Object(f.getSetting)("displayItemizedTaxes",!1),l=Object(f.getSetting)("displayCartPricesIncludingTax",!1);return Object(r.createElement)("div",n,Object(r.createElement)(p.InspectorControls,null,s&&a&&!l&&Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Taxes","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Show rate after tax name","woo-gutenberg-products-block"),help:Object(o.__)("Show the percentage rate alongside each tax line in the summary.","woo-gutenberg-products-block"),checked:t.showRateAfterTaxName,onChange:()=>c({showRateAfterTaxName:!t.showRateAfterTaxName})}))),Object(r.createElement)(J.a,null,Object(r.createElement)(at,{showRateAfterTaxName:t.showRateAfterTaxName})))},save:()=>Object(r.createElement)("div",p.useBlockProps.save())});var ut=c(815);c(833);var dt=e=>{let{href:t,title:c,description:n}=e;return Object(r.createElement)("a",{href:t,className:"wc-block-editor-components-external-link-card",target:"_blank",rel:"noreferrer"},Object(r.createElement)("span",{className:"wc-block-editor-components-external-link-card__content"},Object(r.createElement)("strong",{className:"wc-block-editor-components-external-link-card__title"},c),n&&Object(r.createElement)("span",{className:"wc-block-editor-components-external-link-card__description"},n)),Object(r.createElement)(j.VisuallyHidden,{as:"span"}, +/* translators: accessibility text */ +Object(o.__)("(opens in a new tab)","woo-gutenberg-products-block")),Object(r.createElement)(x.a,{icon:ne.a,className:"wc-block-editor-components-external-link-card__icon"}))},pt=c(174),bt=c(59),mt=c(889),gt=c(185),ht=c(888);c(834);const Ot=()=>Object(r.createElement)(mt.a,{icon:Object(r.createElement)(a.a,{srcElement:ut.a}),label:Object(o.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},Object(r.createElement)("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(o.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method (e.g. Stripe) it will be shown here.","woo-gutenberg-products-block")),Object(r.createElement)(gt.a,{isSecondary:!0,href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Configure Payment Methods","woo-gutenberg-products-block"))),jt=()=>Object(r.createElement)(ht.a,{isDismissible:!1,className:s()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(o.__)("There are no payment methods available. This may be an error on our side. Please contact us if you need any help placing your order.","woo-gutenberg-products-block"));var Et=()=>{const{isEditor:e}=Object(m.b)();return e?Object(r.createElement)(Ot,null):Object(r.createElement)(jt,null)},_t=c(362),ft=c(63),kt=c(12),wt=c(160),vt=Object(kt.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,selected:n,onChange:a,options:l=[]}=e;const i=o||c;return l.length&&Object(r.createElement)("div",{className:s()("wc-block-components-radio-control",t)},l.map(e=>{const t="object"==typeof e&&"content"in e,c=e.value===n;return Object(r.createElement)("div",{className:"wc-block-components-radio-control-accordion-option",key:e.value},Object(r.createElement)(wt.a,{name:"radio-control-"+i,checked:c,option:e,onChange:t=>{a(t),"function"==typeof e.onChange&&e.onChange(t)}}),t&&c&&Object(r.createElement)("div",{className:s()("wc-block-components-radio-control-accordion-content",{"wc-block-components-radio-control-accordion-content-hide":!c})},e.content))}))}),yt=c(199),St=e=>{let{children:t,showSaveOption:c}=e;const{isEditor:n}=Object(m.b)(),{shouldSavePayment:s,setShouldSavePayment:a}=Object(ve.b)(),{customerId:l}=Object(pe.b)();return Object(r.createElement)(yt.a,{isEditor:n},t,l>0&&c&&Object(r.createElement)(I.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:Object(o.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:s,onChange:()=>a(!s)}))},Ct=()=>{const{setActivePaymentMethod:e,activeSavedToken:t,setActiveSavedToken:c,isExpressPaymentMethodActive:o,customerPaymentMethods:n}=Object(ve.b)(),{paymentMethods:a}=Object(ye.b)(),{activePaymentMethod:l,...i}=Object(_t.a)(),{noticeContexts:u}=Object(bt.c)(),{removeNotice:d}=Object(ft.a)(),{isEditor:p}=Object(m.b)(),b=Object.keys(a).map(e=>{const{edit:t,content:c,label:o,supports:n}=a[e],s=p?t:c;return{value:e,label:"string"==typeof o?o:Object(r.cloneElement)(o,{components:i.components}),name:"wc-saved-payment-method-token-"+e,content:Object(r.createElement)(St,{showSaveOption:n.showSaveOption},Object(r.cloneElement)(s,{activePaymentMethod:l,...i}))}}),g=0===Object.keys(n).length&&1===Object.keys(a).length,h=s()({"disable-radio-control":g});return o?null:Object(r.createElement)(vt,{id:"wc-payment-method-options",className:h,selected:t?null:l,onChange:t=>{e(t),c(""),d("wc-payment-error",u.PAYMENTS)},options:b})},Nt=c(198),Pt=c(47),Rt=()=>{var e,t;const{setPaymentStatus:c,customerPaymentMethods:n,activePaymentMethod:s,setActivePaymentMethod:a,activeSavedToken:l,setActiveSavedToken:i}=Object(ve.b)(),u=Object(Pt.getPaymentMethods)(),{paymentMethods:d}=Object(ye.b)(),p=Object(_t.a)(),b=Object(r.useRef)([]),m=Object(r.useCallback)(e=>{i(e)},[i]);Object(r.useEffect)(()=>{const e=Object.keys(n).flatMap(e=>n[e].map(t=>{const r="cc"===e||"echeck"===e?((e,t,c)=>{let{method:r,expires:n,tokenId:s}=e;return{value:s+"",label:Object(o.sprintf)( +/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */ +Object(o.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-products-block"),r.brand,r.last4,n),name:"wc-saved-payment-method-token-"+s,onChange:e=>{const o=`wc-${r.gateway}-payment-token`;t(r.gateway),c().started({payment_method:r.gateway,[o]:e+"",isSavedToken:!0})}}})(t,a,c):((e,t,c)=>{let{method:r,tokenId:n}=e;return{value:n+"",label:Object(o.sprintf)( +/* translators: %s is the name of the payment method gateway. */ +Object(o.__)("Saved token for %s","woo-gutenberg-products-block"),r.gateway),name:"wc-saved-payment-method-token-"+n,onChange:e=>{const o=`wc-${r.gateway}-payment-token`;t(r.gateway),c().started({payment_method:r.gateway,[o]:e+"",isSavedToken:!0})}}})(t,a,c);return!s&&t.is_default&&""===l&&(m(t.tokenId+""),r.onChange(t.tokenId)),r})).filter(Boolean);b.current=e},[n,m,l,s,a,c,u]);const g=l&&d[s]&&null!==(e=d[s])&&void 0!==e&&e.savedTokenComponent?Object(r.cloneElement)(null===(t=d[s])||void 0===t?void 0:t.savedTokenComponent,{token:l,...p}):null;return b.current.length>0?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Nt.a,{id:"wc-payment-method-saved-tokens",selected:l,onChange:m,options:b.current}),g):null},xt=()=>{const{isInitialized:e,paymentMethods:t}=Object(ye.b)(),{customerPaymentMethods:c}=Object(ve.b)();return e&&0===Object.keys(t).length?Object(r.createElement)(Et,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Rt,null),Object.keys(c).length>0&&Object(r.createElement)(ze.a,{label:Object(o.__)("Use another payment method.","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Other available payment methods","woo-gutenberg-products-block"),wrapperElement:"p",wrapperProps:{className:["wc-block-components-checkout-step__description wc-block-components-checkout-step__description-payments-aligned"]}}),Object(r.createElement)(Ct,null))},Tt=()=>{const{noticeContexts:e}=Object(bt.c)();return Object(r.createElement)(pt.a,{context:e.PAYMENTS},Object(r.createElement)(xt,null))},At={...te({defaultTitle:Object(o.__)("Payment options","woo-gutenberg-products-block"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},It=c(537);Object(u.d)(It,{icon:{src:Object(r.createElement)(a.a,{srcElement:ut.a}),foreground:"#7f54b3"},attributes:At,edit:e=>{let{attributes:t,setAttributes:c}=e;const n=Object(f.getSetting)("globalPaymentMethods");return Object(r.createElement)(H,{attributes:t,setAttributes:c,className:s()("wc-block-checkout__payment-method",null==t?void 0:t.className)},Object(r.createElement)(p.InspectorControls,null,n.length>0&&Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Methods","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(o.__)("You currently have the following payment integrations active.","woo-gutenberg-products-block")),n.map(e=>Object(r.createElement)(dt,{key:e.id,href:`${f.ADMIN_URL}admin.php?page=wc-settings&tab=checkout§ion=${e.id}`,title:e.title,description:e.description})),Object(r.createElement)(j.ExternalLink,{href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout"},Object(o.__)("Manage payment methods","woo-gutenberg-products-block")))),Object(r.createElement)(J.a,null,Object(r.createElement)(Tt,null)),Object(r.createElement)(G,{block:I.innerBlockAreas.PAYMENT_METHODS}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(q,null))});var Mt=c(97),Dt=c(249);c(349);var Lt=()=>{const{isCalculating:e,isProcessing:t,isAfterProcessing:c,isBeforeProcessing:n,isComplete:s,hasError:a}=Object(pe.b)(),{currentStatus:l}=Object(ve.b)(),{paymentMethods:i,isInitialized:u}=Object(ye.a)(),{isEditor:d}=Object(m.b)(),{noticeContexts:p}=Object(bt.c)();if(!u||u&&0===Object.keys(i).length)return d||f.CURRENT_USER_IS_ADMIN?Object(r.createElement)(pt.a,{context:p.EXPRESS_PAYMENTS}):null;const b=t||c||n||s&&!a;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Mt.a,{isLoading:e||b||l.isDoingExpressPayment},Object(r.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},Object(r.createElement)("div",{className:"wc-block-components-express-payment__title-container"},Object(r.createElement)(U.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(o.__)("Express checkout","woo-gutenberg-products-block"))),Object(r.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(r.createElement)(pt.a,{context:p.EXPRESS_PAYMENTS},Object(r.createElement)("p",null,Object(o.__)("In a hurry? Use one of our express checkout options:","woo-gutenberg-products-block")),Object(r.createElement)(Dt.a,null))))),Object(r.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(o.__)("Or continue below","woo-gutenberg-products-block")))},Bt=e=>{let{className:t}=e;const{cartNeedsPayment:c}=Object(Ye.a)();return c?Object(r.createElement)("div",{className:t},Object(r.createElement)(Lt,null)):null};c(835);const Ft=()=>Object(r.createElement)(mt.a,{icon:Object(r.createElement)(a.a,{srcElement:ut.a}),label:Object(o.__)("Express Checkout","woo-gutenberg-products-block"),className:"wp-block-woocommerce-checkout-express-payment-block-placeholder"},Object(r.createElement)("span",{className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__description"},Object(o.__)("Your store doesn't have any Payment Methods that support the Express Checkout Block. If they are added, they will be shown here.","woo-gutenberg-products-block")),Object(r.createElement)(gt.a,{isPrimary:!0,href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer",className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__button"},Object(o.__)("Configure Payment Methods","woo-gutenberg-products-block")));var Vt=c(538);Object(u.d)(Vt,{icon:{src:Object(r.createElement)(a.a,{srcElement:ut.a}),foreground:"#7f54b3"},edit:e=>{let{attributes:t}=e;const{paymentMethods:c,isInitialized:o}=Object(ye.a)(),n=Object.keys(c).length>0,a=Object(p.useBlockProps)({className:s()({"wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods":n},null==t?void 0:t.className),attributes:t});return o?Object(r.createElement)("div",a,n?Object(r.createElement)(Bt,null):Object(r.createElement)(Ft,null)):null},save:()=>Object(r.createElement)("div",p.useBlockProps.save())});var Ut=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 13"},Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.667 2.5h1.666l3.334 3.333V10H15a2.5 2.5 0 11-5 0H6.667a2.5 2.5 0 11-5 0H0V1.667C0 .746.746 0 1.667 0H10c.92 0 1.667.746 1.667 1.667V2.5zM2.917 10a1.25 1.25 0 102.5 0 1.25 1.25 0 00-2.5 0zm-1.25-2.5V1.667H10V7.5H1.667zM11.25 10a1.25 1.25 0 102.5 0 1.25 1.25 0 00-2.5 0z"})),zt=c(253),Ht=c(813),Gt=c(53),qt=c(20);c(837);var $t=()=>Object(r.createElement)(mt.a,{icon:Object(r.createElement)(a.a,{srcElement:Ut}),label:Object(o.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},Object(r.createElement)("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(o.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woo-gutenberg-products-block")),Object(r.createElement)(gt.a,{isSecondary:!0,href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping",target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Configure Shipping Options","woo-gutenberg-products-block")));c(836);const Yt=e=>{const t=Object(f.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(qt.decodeEntities)(e.name),value:e.rate_id,description:Object(qt.decodeEntities)(e.description),secondaryLabel:Object(r.createElement)(Gt.a,{currency:Object(qe.getCurrencyFromPriceResponse)(e),value:t}),secondaryDescription:Object(qt.decodeEntities)(e.delivery_time)}};var Wt=()=>{const{isEditor:e}=Object(m.b)(),{shippingRates:t,shippingRatesLoading:c,needsShipping:n,hasCalculatedShipping:a}=Object(Y.b)();if(!n)return null;const l=Object(Ht.a)(t);return e||a||l?Object(r.createElement)(r.Fragment,null,e&&!l?Object(r.createElement)($t,null):Object(r.createElement)(zt.a,{noResultsMessage:Object(r.createElement)(ht.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(o.__)("There are no shipping options available. Please check your shipping address.","woo-gutenberg-products-block")),renderOption:Yt,shippingRates:t,shippingRatesLoading:c})):Object(r.createElement)("p",null,Object(o.__)("Shipping options will be displayed here after entering your full shipping address.","woo-gutenberg-products-block"))},Xt={...te({defaultTitle:Object(o.__)("Shipping options","woo-gutenberg-products-block"),defaultDescription:""}),allowCreateAccount:{type:"boolean",default:!1},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},Kt=c(539);Object(u.d)(Kt,{icon:{src:Object(r.createElement)(a.a,{srcElement:Ut}),foreground:"#7f54b3"},attributes:Xt,edit:e=>{let{attributes:t,setAttributes:c}=e;const n=Object(f.getSetting)("globalShippingMethods"),a=Object(f.getSetting)("activeShippingZones");return Object(r.createElement)(H,{attributes:t,setAttributes:c,className:s()("wc-block-checkout__shipping-option",null==t?void 0:t.className)},Object(r.createElement)(p.InspectorControls,null,n.length>0&&Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Methods","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(o.__)("You currently have the following shipping integrations active.","woo-gutenberg-products-block")),n.map(e=>Object(r.createElement)(dt,{key:e.id,href:`${f.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=${e.id}`,title:e.title,description:e.description})),Object(r.createElement)(j.ExternalLink,{href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping"},Object(o.__)("Manage shipping methods","woo-gutenberg-products-block"))),a.length&&Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Zones","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(o.__)("You currently have the following shipping zones active.","woo-gutenberg-products-block")),a.map(e=>Object(r.createElement)(dt,{key:e.id,href:`${f.ADMIN_URL}admin.php?page=wc-settings&tab=shipping&zone_id=${e.id}`,title:e.title,description:e.description})),Object(r.createElement)(j.ExternalLink,{href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping"},Object(o.__)("Manage shipping zones","woo-gutenberg-products-block")))),Object(r.createElement)(J.a,null,Object(r.createElement)(Wt,null)),Object(r.createElement)(G,{block:I.innerBlockAreas.SHIPPING_METHODS}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(q,null))});const Jt={title:Object(o.__)("Checkout","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(a.a,{srcElement:i}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a checkout form so your customers can submit orders.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},attributes:R,apiVersion:2,edit:e=>{let{attributes:t,setAttributes:c}=e;const{allowCreateAccount:n,showCompanyField:a,requireCompanyField:l,showApartmentField:i,showPhoneField:u,requirePhoneField:d,showOrderNotes:E,showPolicyLinks:_,showReturnToCart:f,showRateAfterTaxName:S,cartPageId:C}=t,R=e=>{const r={};r[e]=!t[e],c(r)},x=Object(w.b)();return Object(r.createElement)("div",x,Object(r.createElement)(m.a,{previewData:{previewCart:h.a,previewSavedPaymentMethods:O}},Object(r.createElement)(P,{attributes:t,setAttributes:c}),Object(r.createElement)(g.a,null,Object(r.createElement)(b.a,{className:s()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(r.createElement)(y.Provider,{value:{addressFieldControls:()=>Object(r.createElement)(p.InspectorControls,null,Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Address Fields","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(o.__)("Show or hide fields in the checkout address forms.","woo-gutenberg-products-block")),Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Company","woo-gutenberg-products-block"),checked:a,onChange:()=>R("showCompanyField")}),a&&Object(r.createElement)(j.CheckboxControl,{label:Object(o.__)("Require company name?","woo-gutenberg-products-block"),checked:l,onChange:()=>R("requireCompanyField"),className:"components-base-control--nested"}),Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),checked:i,onChange:()=>R("showApartmentField")}),Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Phone","woo-gutenberg-products-block"),checked:u,onChange:()=>R("showPhoneField")}),u&&Object(r.createElement)(j.CheckboxControl,{label:Object(o.__)("Require phone number?","woo-gutenberg-products-block"),checked:d,onChange:()=>R("requirePhoneField"),className:"components-base-control--nested"}))),accountControls:()=>Object(r.createElement)(p.InspectorControls,null,Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Account options","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Allow shoppers to sign up for a user account during checkout","woo-gutenberg-products-block"),checked:n,onChange:()=>c({allowCreateAccount:!n})})))}},Object(r.createElement)(v.Provider,{value:{allowCreateAccount:n,showCompanyField:a,requireCompanyField:l,showApartmentField:i,showPhoneField:u,requirePhoneField:d,showOrderNotes:E,showPolicyLinks:_,showReturnToCart:f,cartPageId:C,showRateAfterTaxName:S}},Object(r.createElement)(p.InnerBlocks,{allowedBlocks:N,template:[["woocommerce/checkout-fields-block",{},[]],["woocommerce/checkout-totals-block",{},[]]],templateLock:"insert"})))))),Object(r.createElement)(k.a,{blockName:"checkout"}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save({className:"wc-block-checkout is-loading"}),Object(r.createElement)(p.InnerBlocks.Content,null)),deprecated:[{attributes:R,save(e){let{attributes:t}=e;return Object(r.createElement)("div",{className:s()("is-loading",t.className)})},migrate:e=>{const{showOrderNotes:t,showPolicyLinks:c,showReturnToCart:r,cartPageId:o}=e;return[e,[Object(d.createBlock)("woocommerce/checkout-fields-block",{},[Object(d.createBlock)("woocommerce/checkout-express-payment-block",{},[]),Object(d.createBlock)("woocommerce/checkout-contact-information-block",{},[]),Object(d.createBlock)("woocommerce/checkout-shipping-address-block",{},[]),Object(d.createBlock)("woocommerce/checkout-billing-address-block",{},[]),Object(d.createBlock)("woocommerce/checkout-shipping-methods-block",{},[]),Object(d.createBlock)("woocommerce/checkout-payment-block",{},[]),!!t&&Object(d.createBlock)("woocommerce/checkout-order-note-block",{},[]),!!c&&Object(d.createBlock)("woocommerce/checkout-terms-block",{},[]),Object(d.createBlock)("woocommerce/checkout-actions-block",{showReturnToCart:r,cartPageId:o},[])].filter(Boolean)),Object(d.createBlock)("woocommerce/checkout-totals-block",{})]]},isEligible:(e,t)=>!t.some(e=>"woocommerce/checkout-fields-block"===e.name)}]};Object(u.d)("woocommerce/checkout",Jt)},851:function(e,t,c){"use strict";var r=c(0),o=c(364),n=c(7),s=c.n(n),a=c(32),l=c(1),i=c(20),u=c(5),d=c.n(u),p=c(12),b=c(899),m=c(148),g=c(276),h=c(113);c(344);var O=Object(p.withInstanceId)(e=>{let{id:t,className:c,label:o,onChange:n,options:s,value:a,required:i=!1,errorMessage:u=Object(l.__)("Please select a value.","woo-gutenberg-products-block"),errorId:p,instanceId:O="0",autoComplete:j="off"}=e;const{getValidationError:E,setValidationErrors:_,clearValidationError:f}=Object(m.b)(),k=Object(r.useRef)(null),w=t||"control-"+O,v=p||w,y=E(v)||{message:"",hidden:!1};return Object(r.useEffect)(()=>(!i||a?f(v):_({[v]:{message:u,hidden:!0}}),()=>{f(v)}),[f,a,v,u,i,_]),Object(r.createElement)("div",{id:w,className:d()("wc-block-components-combobox",c,{"is-active":a,"has-error":y.message&&!y.hidden}),ref:k},Object(r.createElement)(b.a,{className:"wc-block-components-combobox-control",label:o,onChange:n,onFilterValueChange:e=>{if(e.length){const t=Object(h.b)(k.current)?k.current.ownerDocument.activeElement:void 0;if(t&&Object(h.b)(k.current)&&k.current.contains(t))return;const c=e.toLocaleUpperCase(),r=s.find(e=>e.label.toLocaleUpperCase().startsWith(c)||e.value.toLocaleUpperCase()===c);r&&n(r.value)}},options:s,value:a||"",allowReset:!1,autoComplete:j,"aria-invalid":y.message&&!y.hidden}),Object(r.createElement)(g.a,{propertyName:v}))});c(343);var j=e=>{let{className:t,countries:c,id:o,label:n,onChange:s,value:a="",autoComplete:u="off",required:p=!1,errorId:b,errorMessage:m=Object(l.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(r.useMemo)(()=>Object.keys(c).map(e=>({value:e,label:Object(i.decodeEntities)(c[e])})),[c]);return Object(r.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(r.createElement)(O,{id:o,label:n,onChange:s,options:g,value:a,errorId:b,errorMessage:m,required:p,autoComplete:u}),"off"!==u&&Object(r.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:u,value:a,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),c=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);s(c?c.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},E=e=>Object(r.createElement)(j,s()({countries:a.h},e)),_=e=>Object(r.createElement)(j,s()({countries:a.a},e));c(345);const f=(e,t)=>{const c=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return c?c.value:""};var k=e=>{let{className:t,id:c,states:n,country:s,label:a,onChange:u,autoComplete:p="off",value:b="",required:m=!1}=e;const g=n[s],h=Object(r.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),j=Object(r.useCallback)(e=>{u(h.length>0?f(e,h):e)},[u,h]),E=Object(r.useRef)(b);return Object(r.useEffect)(()=>{E.current!==b&&(E.current=b)},[b]),Object(r.useEffect)(()=>{if(h.length>0&&E.current){const e=f(E.current,h);e!==E.current&&j(e)}},[h,j]),h.length>0?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(O,{className:d()(t,"wc-block-components-state-input"),id:c,label:a,onChange:j,options:h,value:b,errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:p}),"off"!==p&&Object(r.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:b,onChange:e=>j(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(r.createElement)(o.a,{className:t,id:c,label:a,onChange:j,autoComplete:p,value:b,required:m})},w=e=>Object(r.createElement)(k,s()({states:a.i},e)),v=e=>Object(r.createElement)(k,s()({states:a.b},e)),y=c(52),S=c(3),C=c(132);t.a=Object(p.withInstanceId)(e=>{let{id:t,fields:c=Object.keys(S.defaultAddressFields),fieldConfig:n={},instanceId:s,onChange:a,type:i="shipping",values:u}=e;const{getValidationError:d,setValidationErrors:p,clearValidationError:b}=Object(m.b)(),g=Object(y.a)(c),h=d("shipping-missing-country")||{},O=Object(r.useMemo)(()=>Object(C.a)(g,n,u.country),[g,n,u.country]);return Object(r.useEffect)(()=>{O.forEach(e=>{e.hidden&&u[e.key]&&a({...u,[e.key]:""})})},[O,a,u]),Object(r.useEffect)(()=>{"shipping"===i&&((e,t,c,r)=>{r||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(l.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),r&&e.country&&c("shipping-missing-country")})(u,p,b,!!h.message&&!h.hidden)},[u,h.message,h.hidden,p,b,i]),t=t||s,Object(r.createElement)("div",{id:t,className:"wc-block-components-address-form"},O.map(e=>{if(e.hidden)return null;if("country"===e.key){const c="shipping"===i?E:_;return Object(r.createElement)(c,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:u.country,autoComplete:e.autocomplete,onChange:e=>a({...u,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const c="shipping"===i?w:v;return Object(r.createElement)(c,{key:e.key,id:`${t}-${e.key}`,country:u.country,label:e.required?e.label:e.optionalLabel,value:u.state,autoComplete:e.autocomplete,onChange:e=>a({...u,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(r.createElement)(o.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:u[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>a({...u,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},854:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),s=c(5),a=c.n(s),l=c(1),i=c(46),u=c(22),d=c(3),p=c(20);const b=e=>{let{selectedShippingRates:t}=e;return Object(n.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(l.__)("via","woo-gutenberg-products-block")," ",Object(p.decodeEntities)(t.join(", ")))};var m=c(888),g=c(253),h=e=>{let{hasRates:t,shippingRates:c,shippingRatesLoading:r}=e;const o=t?Object(l.__)("Shipping options","woo-gutenberg-products-block"):Object(l.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(n.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(n.createElement)("legend",{className:"screen-reader-text"},o),Object(n.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(n.createElement)(m.a,{isDismissible:!1,className:a()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(l.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:c,shippingRatesLoading:r}))},O=c(98),j=c(108),E=c(31),_=c.n(E),f=c(148),k=(c(243),c(851)),w=e=>{let{address:t,onUpdate:c,addressFields:r}=e;const[o,s]=Object(n.useState)(t),{hasValidationErrors:a,showAllValidationErrors:i}=Object(f.b)();return Object(n.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(n.createElement)(k.a,{fields:r,onChange:s,values:o}),Object(n.createElement)(j.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:_()(o,t),onClick:e=>{if(e.preventDefault(),i(),!a)return c(o)},type:"submit"},Object(l.__)("Update","woo-gutenberg-products-block")))},v=e=>{let{onUpdate:t=(()=>{}),addressFields:c=["country","state","city","postcode"]}=e;const{shippingAddress:r,setShippingAddress:o}=Object(O.b)();return Object(n.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(n.createElement)(w,{address:r,addressFields:c,onUpdate:e=>{o(e),t(e)}}))},y=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const c=Object(d.getSetting)("shippingCountries",{}),r=Object(d.getSetting)("shippingStates",{}),o="string"==typeof c[t.country]?Object(p.decodeEntities)(c[t.country]):"",s="object"==typeof r[t.country]&&"string"==typeof r[t.country][t.state]?Object(p.decodeEntities)(r[t.country][t.state]):t.state,a=[];a.push(t.postcode.toUpperCase()),a.push(t.city),a.push(s),a.push(o);const i=a.filter(Boolean).join(", ");return i?Object(n.createElement)("span",{className:"wc-block-components-shipping-address"},Object(l.sprintf)( +/* translators: %s location. */ +Object(l.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" "):null};c(342);const S=e=>{let{label:t=Object(l.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}=e;return Object(n.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{r(!c)},"aria-expanded":c},t)},C=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r,shippingAddress:o}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(y,{address:o}),t&&Object(n.createElement)(S,{label:Object(l.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}))},N=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}=e;return t?Object(n.createElement)(S,{isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}):Object(n.createElement)("em",null,Object(l.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:c,showCalculator:r=!0,showRateSelector:s=!0,className:p}=e;const[m,g]=Object(n.useState)(!1),{shippingAddress:O,cartHasCalculatedShipping:j,shippingRates:E,shippingRatesLoading:_}=Object(i.a)(),f=Object(d.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(c.total_shipping,10)+parseInt(c.total_shipping_tax,10):parseInt(c.total_shipping,10),k=E.some(e=>e.shipping_rates.length)||f,w={isShippingCalculatorOpen:m,setIsShippingCalculatorOpen:g},y=E.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(n.createElement)("div",{className:a()("wc-block-components-totals-shipping",p)},Object(n.createElement)(u.TotalsItem,{label:Object(l.__)("Shipping","woo-gutenberg-products-block"),value:j?f:Object(n.createElement)(N,o()({showCalculator:r},w)),description:Object(n.createElement)(n.Fragment,null,j&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(b,{selectedShippingRates:y}),Object(n.createElement)(C,o()({shippingAddress:O,showCalculator:r},w)))),currency:t}),r&&m&&Object(n.createElement)(v,{onUpdate:()=>{g(!1)}}),s&&j&&Object(n.createElement)(h,{hasRates:k,shippingRates:E,shippingRatesLoading:_}))}},86:function(e,t,c){"use strict";var r=c(7),o=c.n(r),n=c(0),s=c(61),a=c(165);const l=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:c={},...r}=e;const i=Object(n.useRef)(null),u=()=>{i.current&&s.focus.focusable.find(i.current).forEach(e=>{l.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=Object(a.a)(u,0,{leading:!0});return Object(n.useLayoutEffect)(()=>{let e;return u(),i.current&&(e=new window.MutationObserver(d),e.observe(i.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),Object(n.createElement)("div",o()({ref:i,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...c}},r),t)}},876:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(1),o=c(32),n=c(3);const s=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:Object(r.__)("Shipping","woo-gutenberg-products-block"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:Object(r._x)("Beanie with Logo","example product in Cart Block","woo-gutenberg-products-block"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:Object(r._x)("Beanie","example product in Cart Block","woo-gutenberg-products-block"),quantity:1}],shipping_rates:[{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(r.__)("Free shipping","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"000",taxes:"0",rate_id:"free_shipping:1",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!0},{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(r.__)("Local pickup","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"200",taxes:"0",rate_id:"local_pickup:1",instance_id:1,meta_data:[],method_id:"local_pickup",selected:!1}]}],a=Object(n.getSetting)("displayCartPricesIncludingTax",!1),l={coupons:[],shipping_rates:Object(n.getSetting)("shippingMethodsExist",!1)?s:[],items:[{key:"1",id:1,quantity:2,name:Object(r.__)("Beanie","woo-gutenberg-products-block"),short_description:Object(r.__)("Warm hat for winter","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-beanie",permalink:"https://example.org",low_stock_remaining:2,backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:10,src:o.m+"previews/beanie.jpg",thumbnail:o.m+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(r.__)("Color","woo-gutenberg-products-block"),value:Object(r.__)("Yellow","woo-gutenberg-products-block")},{attribute:Object(r.__)("Size","woo-gutenberg-products-block"),value:Object(r.__)("Small","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:a?"12000":"10000",regular_price:a?"12000":"10000",sale_price:a?"12000":"10000",raw_prices:{precision:6,price:a?"12000000":"10000000",regular_price:a?"12000000":"10000000",sale_price:a?"12000000":"10000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}},{key:"2",id:2,quantity:1,name:Object(r.__)("Cap","woo-gutenberg-products-block"),short_description:Object(r.__)("Lightweight baseball cap","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-cap",permalink:"https://example.org",backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:11,src:o.m+"previews/cap.jpg",thumbnail:o.m+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(r.__)("Color","woo-gutenberg-products-block"),value:Object(r.__)("Orange","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:a?"2400":"2000",regular_price:a?"2400":"2000",sale_price:a?"2400":"2000",raw_prices:{precision:6,price:a?"24000000":"20000000",regular_price:a?"24000000":"20000000",sale_price:a?"24000000":"20000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}}],fees:[],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:Object(n.getSetting)("shippingEnabled",!0),has_calculated_shipping:!0,shipping_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billing_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total_items:"4000",total_items_tax:"800",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"800",total_price:"4800",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"800"}]},errors:[],payment_requirements:["products"],extensions:{}}},9:function(e,t){e.exports=window.wp.blockEditor},97:function(e,t,c){"use strict";var r=c(0),o=c(1),n=(c(2),c(5)),s=c.n(n),a=(c(340),c(133));t.a=e=>{let{children:t,className:c,screenReaderLabel:n,showSpinner:l=!1,isLoading:i=!0}=e;return Object(r.createElement)("div",{className:s()(c,{"wc-block-components-loading-mask":i})},i&&l&&Object(r.createElement)(a.a,null),Object(r.createElement)("div",{className:s()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},t),i&&Object(r.createElement)("span",{className:"screen-reader-text"},n||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},98:function(e,t,c){"use strict";c.d(t,"b",(function(){return v})),c.d(t,"a",(function(){return y}));var r=c(0),o=c(31),n=c.n(o),s=c(211);const a=e=>Object(s.a)(e.map(e=>{var t;let{package_id:c,shipping_rates:r}=e;return[c,null===(t=r.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})),l={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},i={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},u={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:l,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},d=(e,t)=>{let{type:c}=t;return Object.values(l).includes(c)?c:e};var p=c(141),b=c(373);const m=e=>({onSuccess:Object(b.a)("shipping_rates_success",e),onFail:Object(b.a)("shipping_rates_fail",e),onSelectSuccess:Object(b.a)("shipping_rate_select_success",e),onSelectFail:Object(b.a)("shipping_rate_select_fail",e)});var g=c(376),h=c(74),O=c(81),j=c(46),E=c(163);const{NONE:_,INVALID_ADDRESS:f,UNKNOWN:k}=l,w=Object(r.createContext)(u),v=()=>Object(r.useContext)(w),y=e=>{let{children:t}=e;const{dispatchActions:c}=Object(h.b)(),{shippingAddress:o,setShippingAddress:s}=Object(O.b)(),{cartNeedsShipping:u,cartHasCalculatedShipping:b,shippingRates:v,shippingRatesLoading:y,cartErrors:S}=Object(j.a)(),{selectShippingRate:C,isSelectingRate:N}=Object(E.a)(),[P,R]=Object(r.useReducer)(d,_),[x,T]=Object(r.useReducer)(p.b,{}),A=Object(r.useRef)(x),I=Object(r.useMemo)(()=>({onShippingRateSuccess:m(T).onSuccess,onShippingRateFail:m(T).onFail,onShippingRateSelectSuccess:m(T).onSelectSuccess,onShippingRateSelectFail:m(T).onSelectFail}),[T]);Object(r.useEffect)(()=>{A.current=x},[x]);const M=Object(r.useRef)(()=>a(v));Object(r.useEffect)(()=>{const e=a(v);n()(M.current,e)||(M.current=e)},[v]),Object(r.useEffect)(()=>{y?c.incrementCalculating():c.decrementCalculating()},[y,c]),Object(r.useEffect)(()=>{N?c.incrementCalculating():c.decrementCalculating()},[N,c]),Object(r.useEffect)(()=>{S.length>0&&S.some(e=>!(!e.code||!Object.values(i).includes(e.code)))?R({type:f}):R({type:_})},[S]);const D=Object(r.useMemo)(()=>({isPristine:P===_,isValid:P===_,hasInvalidAddress:P===f,hasError:P===k||P===f}),[P]);Object(r.useEffect)(()=>{y||0!==v.length&&!D.hasError||Object(g.a)(A.current,"shipping_rates_fail",{hasInvalidAddress:D.hasInvalidAddress,hasError:D.hasError})},[v,y,D.hasError,D.hasInvalidAddress]),Object(r.useEffect)(()=>{!y&&v.length>0&&!D.hasError&&Object(g.a)(A.current,"shipping_rates_success",v)},[v,y,D.hasError]),Object(r.useEffect)(()=>{N||(D.hasError?Object(g.a)(A.current,"shipping_rate_select_fail",{hasError:D.hasError,hasInvalidAddress:D.hasInvalidAddress}):Object(g.a)(A.current,"shipping_rate_select_success",M.current))},[N,D.hasError,D.hasInvalidAddress]);const L={shippingErrorStatus:D,dispatchErrorStatus:R,shippingErrorTypes:l,shippingRates:v,shippingRatesLoading:y,selectedRates:M.current,setSelectedRates:C,isSelectingRate:N,shippingAddress:o,setShippingAddress:s,needsShipping:u,hasCalculatedShipping:b,...I};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(w.Provider,{value:L},t))}}}); \ No newline at end of file diff --git a/build/featured-category.asset.php b/build/featured-category.asset.php new file mode 100644 index 00000000000..8c3866f0b6a --- /dev/null +++ b/build/featured-category.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '5a29913c595942c98be88cfba5bf1a42'); \ No newline at end of file diff --git a/build/featured-category.js b/build/featured-category.js new file mode 100644 index 00000000000..bcbc09c00da --- /dev/null +++ b/build/featured-category.js @@ -0,0 +1,11 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-category"]=function(e){function t(t){for(var o,a,i=t[0],l=t[1],s=t[2],d=0,g=[];d{let{className:t,error:r,isLoading:i=!1,onRetry:d}=e;return Object(o.createElement)(s.Placeholder,{icon:Object(o.createElement)(c.a,{srcElement:a.a}),label:Object(n.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:l()("wc-block-api-error",t)},Object(o.createElement)(u.a,{error:r}),d&&Object(o.createElement)(o.Fragment,null,i?Object(o.createElement)(s.Spinner,null):Object(o.createElement)(s.Button,{isSecondary:!0,onClick:d},Object(n.__)("Retry","woo-gutenberg-products-block"))))}},11:function(e,t){e.exports=window.wp.apiFetch},115:function(e,t){},116:function(e,t){e.exports=window.wp.coreData},12:function(e,t){e.exports=window.wp.compose},124:function(e,t){},13:function(e,t){e.exports=window.wp.url},136:function(e,t,r){"use strict";var o=r(0),n=r(18);const c=Object(o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},137:function(e,t){},14:function(e,t){e.exports=window.wp.blocks},18:function(e,t){e.exports=window.wp.primitives},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},32:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return i})),r.d(t,"n",(function(){return l})),r.d(t,"j",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return g})),r.d(t,"k",(function(){return p})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return m})),r.d(t,"h",(function(){return w})),r.d(t,"a",(function(){return h})),r.d(t,"i",(function(){return O})),r.d(t,"b",(function(){return f}));var o,n=r(3);const c=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",i=c.pluginUrl+"build/",l=c.buildPhase,s=null===(o=n.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,u=n.STORE_PAGES.checkout.id,d=n.STORE_PAGES.checkout.permalink,g=n.STORE_PAGES.privacy.permalink,p=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),b=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),m=n.STORE_PAGES.cart.permalink,w=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),h=Object(n.getSetting)("allowedCountries",{}),O=Object(n.getSetting)("shippingStates",{}),f=Object(n.getSetting)("allowedStates",{})},34:function(e,t,r){"use strict";r.d(t,"h",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"i",(function(){return g})),r.d(t,"f",(function(){return p})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return m})),r.d(t,"g",(function(){return w})),r.d(t,"a",(function(){return h}));var o=r(13),n=r(11),c=r.n(n),a=r(6),i=r(3),l=r(32);const s=e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const i=(e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const c=l.o.productCount>100,a={per_page:c?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},i=[Object(o.addQueryArgs)("/wc/store/products",{...a,...n})];return c&&t.length&&i.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:r,queryArgs:n});return Promise.all(i.map(e=>c()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>c()({path:"/wc/store/products/"+e}),d=()=>c()({path:"wc/store/products/attributes"}),g=e=>c()({path:`wc/store/products/attributes/${e}/terms`}),p=e=>{let{selected:t=[],search:r}=e;const n=(e=>{let{selected:t=[],search:r}=e;const n=Object(i.getSetting)("limitTags",!1),c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:r})];return n&&t.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:t})),c})({selected:t,search:r});return Promise.all(n.map(e=>c()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},b=e=>c()({path:Object(o.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),m=e=>c()({path:"wc/store/products/categories/"+e}),w=e=>c()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var o=r(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(39);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):"api"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var o=r(0);t.a=function(e){let{srcElement:t,size:r=24,...n}=e;return Object(o.isValidElement)(t)?Object(o.cloneElement)(t,{width:r,height:r,...n}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},771:function(e,t,r){e.exports=r(852)},772:function(e,t){},773:function(e,t){},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},852:function(e,t,r){"use strict";r.r(t);var o=r(0),n=r(1),c=r(9),a=r(14),i=r(3),l=r(55),s=r(18),u=Object(o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-6.92-3.96L12.39 17 15 15.47 17.61 17l-.69-2.96 2.3-1.99-3.03-.26L15 9l-1.19 2.79-3.03.26z"})),d=(r(772),r(773),r(7)),g=r.n(d),p=r(16),b=r.n(p),m=r(4),w=r(5),h=r.n(w),O=r(10),f=r(12),j=(r(2),r(90)),y=r(100),_=r(6);function k(e){return e&&Object(_.isObject)(e.image)?e.image.src:""}var v=r(34),E=r(35),S=Object(f.createHigherOrderComponent)(e=>class extends o.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,category:"preview"===this.props.attributes.categoryId?this.props.attributes.previewCategory:null},this.loadCategory=this.loadCategory.bind(this)}componentDidMount(){this.loadCategory()}componentDidUpdate(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}loadCategory(){const{categoryId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),Object(v.d)(e).then(e=>{this.setState({category:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(E.a)(e);this.setState({category:null,loading:!1,error:t})})):this.setState({category:null,loading:!1,error:null}))}render(){const{error:t,loading:r,category:n}=this.state;return Object(o.createElement)(e,g()({},this.props,{error:t,getCategory:this.loadCategory,isLoading:r,category:n}))}},"withCategory"),C=Object(f.compose)([S,Object(c.withColors)({overlayColor:"background-color"}),m.withSpokenMessages,Object(O.withSelect)((e,t,r)=>{var o,n;let{clientId:c}=t,{dispatch:a}=r;const i=e("core/block-editor").getBlock(c),l=(null==i||null===(o=i.innerBlocks[0])||void 0===o?void 0:o.clientId)||"";return{updateBlockAttributes:e=>{l&&a("core/block-editor").updateBlockAttributes(l,e)},currentButtonAttributes:(null==i||null===(n=i.innerBlocks[0])||void 0===n?void 0:n.attributes)||{}}}),Object(f.createHigherOrderComponent)(e=>{class t extends o.Component{constructor(){super(...arguments),b()(this,"state",{doUrlUpdate:!1}),b()(this,"triggerUrlUpdate",()=>{this.setState({doUrlUpdate:!0})})}componentDidUpdate(){const{attributes:e,updateBlockAttributes:t,currentButtonAttributes:r,category:o}=this.props;this.state.doUrlUpdate&&!e.editMode&&null!=o&&o.permalink&&null!=r&&r.url&&o.permalink!==r.url&&(t({...r,url:o.permalink}),this.setState({doUrlUpdate:!1}))}render(){return Object(o.createElement)(e,g()({triggerUrlUpdate:this.triggerUrlUpdate},this.props))}}return t},"withUpdateButtonAttributes")])(e=>{let{attributes:t,isSelected:r,setAttributes:a,error:s,getCategory:d,isLoading:g,category:p,overlayColor:b,setOverlayColor:w,debouncedSpeak:O,triggerUrlUpdate:f=(()=>{})}=e;const{editMode:v}=t;return s?Object(o.createElement)(y.a,{className:"wc-block-featured-category-error",error:s,isLoading:g,onRetry:d}):v?Object(o.createElement)(m.Placeholder,{icon:Object(o.createElement)(l.a,{srcElement:u}),label:Object(n.__)("Featured Category","woo-gutenberg-products-block"),className:"wc-block-featured-category"},Object(n.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-featured-category__selection"},Object(o.createElement)(j.a,{selected:[t.categoryId],onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;a({categoryId:t,mediaId:0,mediaSrc:""}),f()},isSingle:!0}),Object(o.createElement)(m.Button,{isPrimary:!0,onClick:()=>{a({editMode:!1}),O(Object(n.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block")))):Object(o.createElement)(o.Fragment,null,(()=>{const{contentAlign:e,mediaSrc:r}=t,i=t.mediaId||function(e){return e&&Object(_.isObject)(e.image)?e.image.id:0}(p);return Object(o.createElement)(c.BlockControls,null,Object(o.createElement)(c.AlignmentToolbar,{value:e,onChange:e=>{a({contentAlign:e})}}),Object(o.createElement)(c.MediaReplaceFlow,{mediaId:i,mediaURL:r,accept:"image/*",onSelect:e=>{a({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"]}),Object(o.createElement)(m.ToolbarGroup,{controls:[{icon:"edit",title:Object(n.__)("Edit selected category","woo-gutenberg-products-block"),onClick:()=>a({editMode:!v}),isActive:v}]}))})(),(()=>{const e=t.mediaSrc||k(p),{focalPoint:r={x:.5,y:.5}}=t,i="function"==typeof m.FocalPointPicker;return Object(o.createElement)(c.InspectorControls,{key:"inspector"},Object(o.createElement)(m.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(m.ToggleControl,{label:Object(n.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:()=>a({showDesc:!t.showDesc})})),Object(o.createElement)(c.PanelColorSettings,{title:Object(n.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:b.color,onChange:w,label:Object(n.__)("Overlay Color","woo-gutenberg-products-block")}]},!!e&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(m.RangeControl,{label:Object(n.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:e=>a({dimRatio:e}),min:0,max:100,step:10}),i&&Object(o.createElement)(m.FocalPointPicker,{label:Object(n.__)("Focal Point Picker","woo-gutenberg-products-block"),url:e,value:r,onChange:e=>a({focalPoint:e})}))))})(),p?(()=>{const{className:e,contentAlign:l,dimRatio:s,focalPoint:u,height:d,showDesc:w}=t,O=h()("wc-block-featured-category",{"is-selected":r&&"preview"!==t.productId,"is-loading":!p&&g,"is-not-found":!p&&!g,"has-background-dim":0!==s},0===(f=s)||50===f?null:"has-background-dim-"+10*Math.round(f/10),"center"!==l&&`has-${l}-content`,e);var f;const j=t.mediaSrc||k(p),y=p&&(_=j)?{backgroundImage:`url(${_})`}:{};var _;if(b.color&&(y.backgroundColor=b.color),u){const e=100*u.x,t=100*u.y;y.backgroundPosition=`${e}% ${t}%`}return Object(o.createElement)(m.ResizableBox,{className:O,size:{height:d},minHeight:Object(i.getSetting)("min_height",500),enable:{bottom:!0},onResizeStop:(e,t,r)=>{a({height:parseInt(r.style.height,10)})},style:y},Object(o.createElement)("div",{className:"wc-block-featured-category__wrapper"},Object(o.createElement)("h2",{className:"wc-block-featured-category__title",dangerouslySetInnerHTML:{__html:p.name}}),w&&Object(o.createElement)("div",{className:"wc-block-featured-category__description",dangerouslySetInnerHTML:{__html:p.description}}),Object(o.createElement)("div",{className:"wc-block-featured-category__link"},(()=>{const e=h()("wp-block-button__link","is-style-fill");return"preview"===t.categoryId?Object(o.createElement)("div",{className:"wp-block-button aligncenter",style:{width:"100%"}},Object(o.createElement)(c.RichText.Content,{tagName:"a",className:e,href:p.permalink,title:t.linkText,style:{backgroundColor:"vivid-green-cyan",borderRadius:"5px"},value:t.linkText,target:p.permalink})):Object(o.createElement)(c.InnerBlocks,{template:[["core/button",{text:Object(n.__)("Shop now","woo-gutenberg-products-block"),url:p.permalink,align:"center"}]],templateLock:"all"})})())))})():Object(o.createElement)(m.Placeholder,{className:"wc-block-featured-category",icon:Object(o.createElement)(l.a,{srcElement:u}),label:Object(n.__)("Featured Category","woo-gutenberg-products-block")},g?Object(o.createElement)(m.Spinner,null):Object(n.__)("No product category is selected.","woo-gutenberg-products-block")))}),x=r(32);const P=[{id:1,name:Object(n.__)("Clothing","woo-gutenberg-products-block"),slug:"clothing",parent:0,count:10,description:`

${Object(n.__)("Branded t-shirts, jumpers, pants and more!","woo-gutenberg-products-block")}

\n`,image:{id:1,date_created:"2019-07-15T17:05:04",date_created_gmt:"2019-07-15T17:05:04",date_modified:"2019-07-15T17:05:04",date_modified_gmt:"2019-07-15T17:05:04",src:x.m+"previews/collection.jpg",name:"",alt:""},permalink:"#"}],A={attributes:{contentAlign:"center",dimRatio:50,editMode:!1,height:Object(i.getSetting)("default_height",500),mediaSrc:"",showDesc:!0,categoryId:"preview",previewCategory:P[0]}};Object(a.registerBlockType)("woocommerce/featured-category",{title:Object(n.__)("Featured Category","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(l.a,{srcElement:u}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:A,attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:Object(i.getSetting)("default_height",500)},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(n.__)("Shop now","woo-gutenberg-products-block")},categoryId:{type:"number"},showDesc:{type:"boolean",default:!0},previewCategory:{type:"object",default:null}},edit:e=>Object(o.createElement)(C,e),save:()=>Object(o.createElement)(c.InnerBlocks.Content,null)})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor},90:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),a=r(1),i=(r(2),r(40)),l=r(4),s=r(12),u=r(34),d=r(35),g=Object(s.createHigherOrderComponent)(e=>class extends c.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(u.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(d.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:r,categories:o}=this.state;return Object(c.createElement)(e,n()({},this.props,{error:t,isLoading:r,categories:o}))}},"withCategories"),p=r(41),b=r(5),m=r.n(b);r(124);const w=e=>{let{categories:t,error:r,isLoading:o,onChange:s,onOperatorChange:u,operator:d,selected:g,isCompact:b,isSingle:w,showReviewCount:h}=e;const O={clear:Object(a.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(a.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(a.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(a.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(a.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(a._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(a.__)("Category search results updated.","woo-gutenberg-products-block")};return r?Object(c.createElement)(p.a,{error:r}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.b,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:g.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:s,renderItem:e=>{const{item:t,search:r,depth:o=0}=e,l=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,s=h?Object(a.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(a._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),l,t.review_count):Object(a.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(a._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),l,t.count),u=h?Object(a.sprintf)( +/* translators: %d is the count of reviews. */ +Object(a._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(a.sprintf)( +/* translators: %d is the count of products. */ +Object(a._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(c.createElement)(i.c,n()({className:m()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===o&&0!==t.parent})},e,{countLabel:u,"aria-label":s}))},messages:O,isCompact:b,isHierarchical:!0,isSingle:w}),!!u&&Object(c.createElement)("div",{hidden:g.length<2},Object(c.createElement)(l.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(a.__)("Display products matching","woo-gutenberg-products-block"),help:Object(a.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:d,onChange:u,options:[{label:Object(a.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(a.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};w.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=g(w)}}); \ No newline at end of file diff --git a/build/featured-product.asset.php b/build/featured-product.asset.php new file mode 100644 index 00000000000..4d7706f4e17 --- /dev/null +++ b/build/featured-product.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '2ebbac8bafda5f3911abb5a511358a62'); \ No newline at end of file diff --git a/build/featured-product.js b/build/featured-product.js new file mode 100644 index 00000000000..70af24c364b --- /dev/null +++ b/build/featured-product.js @@ -0,0 +1,5 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-product"]=function(e){function t(t){for(var o,a,i=t[0],s=t[1],l=t[2],d=0,p=[];d{let{className:t,error:r,isLoading:i=!1,onRetry:d}=e;return Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(c.a,{srcElement:a.a}),label:Object(n.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:s()("wc-block-api-error",t)},Object(o.createElement)(u.a,{error:r}),d&&Object(o.createElement)(o.Fragment,null,i?Object(o.createElement)(l.Spinner,null):Object(o.createElement)(l.Button,{isSecondary:!0,onClick:d},Object(n.__)("Retry","woo-gutenberg-products-block"))))}},11:function(e,t){e.exports=window.wp.apiFetch},115:function(e,t){},116:function(e,t){e.exports=window.wp.coreData},12:function(e,t){e.exports=window.wp.compose},120:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),a=r(40),i=r(4),s=r(5),l=r.n(s);t.a=e=>{let{className:t,item:r,isSelected:o,isLoading:s,onSelect:u,disabled:d,...p}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(a.c,n()({},p,{key:r.id,className:t,isSelected:o,item:r,onSelect:u,isSingle:!0,disabled:d})),o&&s&&Object(c.createElement)("div",{key:"loading",className:l()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(c.createElement)(i.Spinner,null)))}},13:function(e,t){e.exports=window.wp.url},135:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),a=r(1),i=r(6),s=(r(2),r(40)),l=r(12),u=Object(l.createHigherOrderComponent)(e=>{class t extends c.Component{render(){const{selected:t}=this.props,r=null==t;return Object(c.createElement)(e,n()({},this.props,{selected:r?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),d=r(273),p=r(16),b=r.n(p),g=r(31),m=r.n(g),h=r(34),w=r(35),f=Object(l.createHigherOrderComponent)(e=>{class t extends c.Component{constructor(){super(...arguments),b()(this,"state",{error:null,loading:!1,variations:{}}),b()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:r}=this.state;if(t)return;const o=this.getExpandedProduct();if(!o||r[o])return;const n=e.find(e=>e.id===o);n.variations&&0!==n.variations.length?(this.setState({loading:!0}),Object(h.g)(o).then(e=>{const t=e.map(e=>({...e,parent:o}));this.setState({variations:{...this.state.variations,[o]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(w.a)(e);this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:r,showVariations:o}=this.props;o&&(!m()(e.selected,r)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props;return t.filter(t=>t.variations&&t.variations.find(t=>{let{id:r}=t;return r===e}))[0].id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:r}=this.props;if(!r)return null;let o=t&&t.length?t[0]:null;return o?this.prevSelectedItem=o:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(o=this.prevSelectedItem)),!e&&o?this.isProductId(o)?o:this.findParentProduct(o):null}render(){const{error:t,isLoading:r}=this.props,{error:o,loading:a,variations:i}=this.state;return Object(c.createElement)(e,n()({},this.props,{error:o||t,expandedProduct:this.getExpandedProduct(),isLoading:r,variations:i,variationsLoading:a}))}}return b()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),O=r(41),j=r(5),_=r.n(j),v=r(120);r(191);const k={list:Object(a.__)("Products","woo-gutenberg-products-block"),noItems:Object(a.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(a.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(a.__)("Product search results updated.","woo-gutenberg-products-block")},y=e=>{let{expandedProduct:t,error:r,instanceId:o,isCompact:l,isLoading:u,onChange:d,onSearch:p,products:b,renderItem:g,selected:m,showVariations:h,variations:w,variationsLoading:f}=e;if(r)return Object(c.createElement)(O.a,{error:r});const j=[...b,...w&&w[t]?w[t]:[]];return Object(c.createElement)(s.b,{className:"woocommerce-products",list:j,isCompact:l,isLoading:u,isSingle:!0,selected:j.filter(e=>{let{id:t}=e;return m.includes(t)}),onChange:d,renderItem:g||(h?e=>{const{item:t,search:r,depth:l=0,isSelected:d,onSelect:p}=e,b=t.variations&&Array.isArray(t.variations)?t.variations.length:0,g=_()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+l,"has-count",{"is-searching":r.length>0,"is-skip-level":0===l&&0!==t.parent,"is-variable":b>0});if(!t.breadcrumbs.length)return Object(c.createElement)(v.a,n()({},e,{className:_()(g,{"is-selected":d}),isSelected:d,item:t,onSelect:()=>()=>{p(t)()},isLoading:u||f,countLabel:t.variations.length>0?Object(a.sprintf)( +/* translators: %1$d is the number of variations of a product product. */ +Object(a.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-"+o,"aria-label":Object(a.sprintf)( +/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ +Object(a._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const m=Object(i.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(c.createElement)(s.c,n()({},m,{className:g,name:"variations-"+o}))}:null),onSearch:p,messages:k,isHierarchical:!0})};y.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=u(Object(d.a)(f(Object(l.withInstanceId)(y))))},136:function(e,t,r){"use strict";var o=r(0),n=r(18);const c=Object(o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},137:function(e,t){},14:function(e,t){e.exports=window.wp.blocks},18:function(e,t){e.exports=window.wp.primitives},191:function(e,t){},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},273:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),a=r(32),i=r(34),s=r(165),l=r(35);t.a=e=>t=>{let{selected:r,...o}=t;const[u,d]=Object(c.useState)(!0),[p,b]=Object(c.useState)(null),[g,m]=Object(c.useState)([]),h=a.o.productCount>100,w=async e=>{const t=await Object(l.a)(e);b(t),d(!1)},f=Object(c.useRef)(r);Object(c.useEffect)(()=>{Object(i.h)({selected:f.current}).then(e=>{m(e),d(!1)}).catch(w)},[f]);const O=Object(s.a)(e=>{Object(i.h)({selected:r,search:e}).then(e=>{m(e),d(!1)}).catch(w)},400),j=Object(c.useCallback)(e=>{d(!0),O(e)},[d,O]);return Object(c.createElement)(e,n()({},o,{selected:r,error:p,products:g,isLoading:u,onSearch:h?j:null}))}},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},31:function(e,t){e.exports=window.wp.isShallowEqual},32:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return i})),r.d(t,"n",(function(){return s})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return p})),r.d(t,"k",(function(){return b})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return m})),r.d(t,"h",(function(){return h})),r.d(t,"a",(function(){return w})),r.d(t,"i",(function(){return f})),r.d(t,"b",(function(){return O}));var o,n=r(3);const c=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",i=c.pluginUrl+"build/",s=c.buildPhase,l=null===(o=n.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,u=n.STORE_PAGES.checkout.id,d=n.STORE_PAGES.checkout.permalink,p=n.STORE_PAGES.privacy.permalink,b=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),g=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),m=n.STORE_PAGES.cart.permalink,h=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),w=Object(n.getSetting)("allowedCountries",{}),f=Object(n.getSetting)("shippingStates",{}),O=Object(n.getSetting)("allowedStates",{})},34:function(e,t,r){"use strict";r.d(t,"h",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"i",(function(){return p})),r.d(t,"f",(function(){return b})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return w}));var o=r(13),n=r(11),c=r.n(n),a=r(6),i=r(3),s=r(32);const l=e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const i=(e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const c=s.o.productCount>100,a={per_page:c?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},i=[Object(o.addQueryArgs)("/wc/store/products",{...a,...n})];return c&&t.length&&i.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:r,queryArgs:n});return Promise.all(i.map(e=>c()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>c()({path:"/wc/store/products/"+e}),d=()=>c()({path:"wc/store/products/attributes"}),p=e=>c()({path:`wc/store/products/attributes/${e}/terms`}),b=e=>{let{selected:t=[],search:r}=e;const n=(e=>{let{selected:t=[],search:r}=e;const n=Object(i.getSetting)("limitTags",!1),c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:r})];return n&&t.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:t})),c})({selected:t,search:r});return Promise.all(n.map(e=>c()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},g=e=>c()({path:Object(o.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),m=e=>c()({path:"wc/store/products/categories/"+e}),h=e=>c()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),w=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var o=r(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(39);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):"api"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},476:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(16),a=r.n(c),i=r(0),s=r(12),l=r(34),u=r(35);const d=Object(s.createHigherOrderComponent)(e=>class extends i.Component{constructor(){super(...arguments),a()(this,"state",{error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null}),a()(this,"loadProduct",()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),Object(l.e)(e).then(e=>{this.setState({product:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(u.a)(e);this.setState({product:null,loading:!1,error:t})})):this.setState({product:null,loading:!1,error:null}))})}componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}render(){const{error:t,loading:r,product:o}=this.state;return Object(i.createElement)(e,n()({},this.props,{error:t,getProduct:this.loadProduct,isLoading:r,product:o}))}},"withProduct");t.a=d},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var o=r(0);t.a=function(e){let{srcElement:t,size:r=24,...n}=e;return Object(o.isValidElement)(t)?Object(o.cloneElement)(t,{width:r,height:r,...n}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},758:function(e,t,r){e.exports=r(858)},759:function(e,t){},760:function(e,t){},761:function(e,t,r){"use strict";var o=r(0),n=r(18);const c=Object(o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}));t.a=c},762:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(1),n=r(32);const c=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:Object(o.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'$7.99',images:[{id:1,src:n.m+"previews/pennant.jpg",thumbnail:n.m+"previews/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:Object(o.__)("Add to cart","woo-gutenberg-products-block"),description:Object(o.__)("Add to cart","woo-gutenberg-products-block")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},858:function(e,t,r){"use strict";r.r(t);var o=r(0),n=r(1),c=r(9),a=r(14),i=r(3),s=r(55),l=r(761),u=(r(759),r(760),r(762));const d={attributes:{contentAlign:"center",dimRatio:50,editMode:!1,height:Object(i.getSetting)("default_height",500),mediaSrc:"",showDesc:!0,productId:"preview",previewProduct:u.a[0]}};var p=r(7),b=r.n(p),g=r(16),m=r.n(g),h=r(10),w=r(4),f=r(5),O=r.n(f),j=r(12),_=r(6),v=(r(2),r(135)),k=r(100),y=r(476);function S(e){return e&&e.images&&e.images.length&&e.images[0].src||""}var E=Object(j.compose)([y.a,Object(c.withColors)({overlayColor:"background-color"}),w.withSpokenMessages,Object(h.withSelect)((e,t,r)=>{var o,n;let{clientId:c}=t,{dispatch:a}=r;const i=e("core/block-editor").getBlock(c),s=(null==i||null===(o=i.innerBlocks[0])||void 0===o?void 0:o.clientId)||"";return{updateBlockAttributes:e=>{s&&a("core/block-editor").updateBlockAttributes(s,e)},currentButtonAttributes:(null==i||null===(n=i.innerBlocks[0])||void 0===n?void 0:n.attributes)||{}}}),Object(j.createHigherOrderComponent)(e=>{class t extends o.Component{constructor(){super(...arguments),m()(this,"state",{doUrlUpdate:!1}),m()(this,"triggerUrlUpdate",()=>{this.setState({doUrlUpdate:!0})})}componentDidUpdate(){const{attributes:e,updateBlockAttributes:t,currentButtonAttributes:r,product:o}=this.props;this.state.doUrlUpdate&&!e.editMode&&null!=o&&o.permalink&&null!=r&&r.url&&o.permalink!==r.url&&(t({...r,url:o.permalink}),this.setState({doUrlUpdate:!1}))}render(){return Object(o.createElement)(e,b()({triggerUrlUpdate:this.triggerUrlUpdate},this.props))}}return t},"withUpdateButtonAttributes")])(e=>{let{attributes:t,debouncedSpeak:r,error:a,getProduct:u,isLoading:d,isSelected:p,overlayColor:b,product:g,setAttributes:m,setOverlayColor:h,triggerUrlUpdate:f=(()=>{})}=e;const j=()=>{const{contentAlign:e,editMode:r,mediaSrc:a}=t,i=t.mediaId||function(e){return e&&e.images&&e.images.length&&e.images[0].id||0}(g);return Object(o.createElement)(c.BlockControls,null,Object(o.createElement)(c.AlignmentToolbar,{value:e,onChange:e=>{m({contentAlign:e})}}),Object(o.createElement)(c.MediaReplaceFlow,{mediaId:i,mediaURL:a,accept:"image/*",onSelect:e=>{m({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"]}),Object(o.createElement)(w.ToolbarGroup,{controls:[{icon:"edit",title:Object(n.__)("Edit selected product","woo-gutenberg-products-block"),onClick:()=>m({editMode:!r}),isActive:r}]}))},{editMode:y}=t;return a?Object(o.createElement)(k.a,{className:"wc-block-featured-product-error",error:a,isLoading:d,onRetry:u}):y?Object(o.createElement)(o.Fragment,null,j(),Object(o.createElement)(w.Placeholder,{icon:Object(o.createElement)(s.a,{srcElement:l.a}),label:Object(n.__)("Featured Product","woo-gutenberg-products-block"),className:"wc-block-featured-product"},Object(n.__)("Visually highlight a product or variation and encourage prompt action","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-featured-product__selection"},Object(o.createElement)(v.a,{selected:t.productId||0,showVariations:!0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;m({productId:t,mediaId:0,mediaSrc:""}),f()}}),Object(o.createElement)(w.Button,{isPrimary:!0,onClick:()=>{m({editMode:!1}),r(Object(n.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))):Object(o.createElement)(o.Fragment,null,j(),(()=>{const e=t.mediaSrc||S(g),{focalPoint:r={x:.5,y:.5}}=t,a="function"==typeof w.FocalPointPicker;return Object(o.createElement)(c.InspectorControls,{key:"inspector"},Object(o.createElement)(w.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(w.ToggleControl,{label:Object(n.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:()=>m({showDesc:!t.showDesc})}),Object(o.createElement)(w.ToggleControl,{label:Object(n.__)("Show price","woo-gutenberg-products-block"),checked:t.showPrice,onChange:()=>m({showPrice:!t.showPrice})})),Object(o.createElement)(c.PanelColorSettings,{title:Object(n.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:b.color,onChange:h,label:Object(n.__)("Overlay Color","woo-gutenberg-products-block")}]},!!e&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(w.RangeControl,{label:Object(n.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:e=>m({dimRatio:e}),min:0,max:100,step:10}),a&&Object(o.createElement)(w.FocalPointPicker,{label:Object(n.__)("Focal Point Picker","woo-gutenberg-products-block"),url:e,value:r,onChange:e=>m({focalPoint:e})}))))})(),g?(()=>{const{className:e,contentAlign:r,dimRatio:a,focalPoint:s,height:l,showDesc:u,showPrice:h}=t,f=O()("wc-block-featured-product",{"is-selected":p&&"preview"!==t.productId,"is-loading":!g&&d,"is-not-found":!g&&!d,"has-background-dim":0!==a},0===(j=a)||50===j?null:"has-background-dim-"+10*Math.round(j/10),"center"!==r&&`has-${r}-content`,e);var j;const v=(k=t.mediaSrc||g,Object(_.isObject)(k)&&(k=S(k)),k?{backgroundImage:`url(${k})`}:{});var k;if(b.color&&(v.backgroundColor=b.color),s){const e=100*s.x,t=100*s.y;v.backgroundPosition=`${e}% ${t}%`}return Object(o.createElement)(w.ResizableBox,{className:f,size:{height:l},minHeight:Object(i.getSetting)("min_height",500),enable:{bottom:!0},onResizeStop:(e,t,r)=>{m({height:parseInt(r.style.height,10)})},style:v},Object(o.createElement)("div",{className:"wc-block-featured-product__wrapper"},Object(o.createElement)("h2",{className:"wc-block-featured-product__title",dangerouslySetInnerHTML:{__html:g.name}}),!Object(_.isEmpty)(g.variation)&&Object(o.createElement)("h3",{className:"wc-block-featured-product__variation",dangerouslySetInnerHTML:{__html:g.variation}}),u&&Object(o.createElement)("div",{className:"wc-block-featured-product__description",dangerouslySetInnerHTML:{__html:g.short_description}}),h&&Object(o.createElement)("div",{className:"wc-block-featured-product__price",dangerouslySetInnerHTML:{__html:g.price_html}}),Object(o.createElement)("div",{className:"wc-block-featured-product__link"},(()=>{const e=O()("wp-block-button__link","is-style-fill");return"preview"===t.productId?Object(o.createElement)("div",{className:"wp-block-button aligncenter",style:{width:"100%"}},Object(o.createElement)(c.RichText.Content,{tagName:"a",className:e,href:g.permalink,title:t.linkText,style:{backgroundColor:"vivid-green-cyan",borderRadius:"5px"},value:t.linkText,target:g.permalink})):Object(o.createElement)(c.InnerBlocks,{template:[["core/button",{text:Object(n.__)("Shop now","woo-gutenberg-products-block"),url:g.permalink,align:"center"}]],templateLock:"all"})})())))})():Object(o.createElement)(w.Placeholder,{className:"wc-block-featured-product",icon:Object(o.createElement)(s.a,{srcElement:l.a}),label:Object(n.__)("Featured Product","woo-gutenberg-products-block")},d?Object(o.createElement)(w.Spinner,null):Object(n.__)("No product is selected.","woo-gutenberg-products-block")))});Object(a.registerBlockType)("woocommerce/featured-product",{title:Object(n.__)("Featured Product","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(s.a,{srcElement:l.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Visually highlight a product or variation and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:d,attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:Object(i.getSetting)("default_height",500)},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(n.__)("Shop now","woo-gutenberg-products-block")},productId:{type:"number"},showDesc:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!0},previewProduct:{type:"object",default:null}},edit:e=>Object(o.createElement)(E,e),save:()=>Object(o.createElement)(c.InnerBlocks.Content,null)})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/handpicked-products.asset.php b/build/handpicked-products.asset.php new file mode 100644 index 00000000000..854069cad25 --- /dev/null +++ b/build/handpicked-products.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => 'da83899e06c325b580440144fbdac5c5'); \ No newline at end of file diff --git a/build/handpicked-products.js b/build/handpicked-products.js new file mode 100644 index 00000000000..247666c2664 --- /dev/null +++ b/build/handpicked-products.js @@ -0,0 +1,3 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["handpicked-products"]=function(e){function t(t){for(var c,l,i=t[0],s=t[1],a=t[2],d=0,b=[];d{let{value:t,setAttributes:r}=e;return Object(c.createElement)(o.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:e=>r({orderby:e})})}},12:function(e,t){e.exports=window.wp.compose},13:function(e,t){e.exports=window.wp.url},14:function(e,t){e.exports=window.wp.blocks},172:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var c=r(0);const n=Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(c.createElement)("title",null,"Grid Block Preview"),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},18:function(e,t){e.exports=window.wp.primitives},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},273:function(e,t,r){"use strict";var c=r(7),n=r.n(c),o=r(0),l=r(32),i=r(34),s=r(165),a=r(35);t.a=e=>t=>{let{selected:r,...c}=t;const[u,d]=Object(o.useState)(!0),[b,p]=Object(o.useState)(null),[g,h]=Object(o.useState)([]),E=l.o.productCount>100,w=async e=>{const t=await Object(a.a)(e);p(t),d(!1)},O=Object(o.useRef)(r);Object(o.useEffect)(()=>{Object(i.h)({selected:O.current}).then(e=>{h(e),d(!1)}).catch(w)},[O]);const m=Object(s.a)(e=>{Object(i.h)({selected:r,search:e}).then(e=>{h(e),d(!1)}).catch(w)},400),f=Object(o.useCallback)(e=>{d(!0),m(e)},[d,m]);return Object(o.createElement)(e,n()({},c,{selected:r,error:b,products:g,isLoading:u,onSearch:E?f:null}))}},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},32:function(e,t,r){"use strict";r.d(t,"o",(function(){return o})),r.d(t,"m",(function(){return l})),r.d(t,"l",(function(){return i})),r.d(t,"n",(function(){return s})),r.d(t,"j",(function(){return a})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return p})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return h})),r.d(t,"h",(function(){return E})),r.d(t,"a",(function(){return w})),r.d(t,"i",(function(){return O})),r.d(t,"b",(function(){return m}));var c,n=r(3);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",i=o.pluginUrl+"build/",s=o.buildPhase,a=null===(c=n.STORE_PAGES.shop)||void 0===c?void 0:c.permalink,u=n.STORE_PAGES.checkout.id,d=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,p=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),g=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),h=n.STORE_PAGES.cart.permalink,E=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),w=Object(n.getSetting)("allowedCountries",{}),O=Object(n.getSetting)("shippingStates",{}),m=Object(n.getSetting)("allowedStates",{})},34:function(e,t,r){"use strict";r.d(t,"h",(function(){return a})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return p})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return h})),r.d(t,"g",(function(){return E})),r.d(t,"a",(function(){return w}));var c=r(13),n=r(11),o=r.n(n),l=r(6),i=r(3),s=r(32);const a=e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const i=(e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const o=s.o.productCount>100,l={per_page:o?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},i=[Object(c.addQueryArgs)("/wc/store/products",{...l,...n})];return o&&t.length&&i.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:r,queryArgs:n});return Promise.all(i.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),d=()=>o()({path:"wc/store/products/attributes"}),b=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),p=e=>{let{selected:t=[],search:r}=e;const n=(e=>{let{selected:t=[],search:r}=e;const n=Object(i.getSetting)("limitTags",!1),o=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:r})];return n&&t.length&&o.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:r});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},g=e=>o()({path:Object(c.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>o()({path:"wc/store/products/categories/"+e}),E=e=>o()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),w=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));var c=r(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var c=r(0),n=r(1),o=r(39);t.a=e=>{let{error:t}=e;return Object(c.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(c.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(o.escapeHTML)(t))):"api"===r?Object(c.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(o.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var c=r(0);t.a=function(e){let{srcElement:t,size:r=24,...n}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:r,height:r,...n}):null}},568:function(e,t,r){e.exports=r(859)},569:function(e,t){},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},76:function(e,t){e.exports=window.wp.serverSideRender},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},84:function(e,t,r){"use strict";var c=r(0),n=r(1),o=(r(2),r(4));t.a=e=>{let{onChange:t,settings:r}=e;const{button:l,price:i,rating:s,title:a}=r;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(o.ToggleControl,{label:Object(n.__)("Product title","woo-gutenberg-products-block"),help:a?Object(n.__)("Product title is visible.","woo-gutenberg-products-block"):Object(n.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...r,title:!a})}),Object(c.createElement)(o.ToggleControl,{label:Object(n.__)("Product price","woo-gutenberg-products-block"),help:i?Object(n.__)("Product price is visible.","woo-gutenberg-products-block"):Object(n.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...r,price:!i})}),Object(c.createElement)(o.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(n.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(n.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...r,rating:!s})}),Object(c.createElement)(o.ToggleControl,{label:Object(n.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(n.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(n.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...r,button:!l})}))}},859:function(e,t,r){"use strict";r.r(t);var c=r(0),n=r(1),o=r(14),l=r(3),i=r(55),s=r(18),a=Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M16.66 4.52l2.83 2.83-2.83 2.83-2.83-2.83 2.83-2.83M9 5v4H5V5h4m10 10v4h-4v-4h4M9 15v4H5v-4h4m7.66-13.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65zM11 3H3v8h8V3zm10 10h-8v8h8v-8zm-10 0H3v8h8v-8z"})),u=(r(569),r(9)),d=r(76),b=r.n(d),p=r(4),g=(r(2),r(84)),h=r(40),E=r(273),w=r(41);const O=e=>{let{error:t,onChange:r,onSearch:o,selected:l,products:i,isLoading:s,isCompact:a}=e;const u={clear:Object(n.__)("Clear all products","woo-gutenberg-products-block"),list:Object(n.__)("Products","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(n.__)("Search for products to display","woo-gutenberg-products-block"),selected:e=>Object(n.sprintf)( +/* translators: %d is the number of selected products. */ +Object(n._n)("%d product selected","%d products selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Product search results updated.","woo-gutenberg-products-block")};return t?Object(c.createElement)(w.a,{error:t}):Object(c.createElement)(h.b,{className:"woocommerce-products",list:i.map(e=>{const t=e.sku?" ("+e.sku+")":"";return{...e,name:`${e.name}${t}`}}),isCompact:a,isLoading:s,selected:i.filter(e=>{let{id:t}=e;return l.includes(t)}),onSearch:o,onChange:r,messages:u})};O.defaultProps={selected:[],products:[],isCompact:!1,isLoading:!0};var m=Object(E.a)(O),f=r(119),j=r(172);class x extends c.Component{getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{columns:r,contentVisibility:o,orderby:i,alignButtons:s}=e;return Object(c.createElement)(u.InspectorControls,{key:"inspector"},Object(c.createElement)(p.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(p.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:r,onChange:e=>t({columns:e}),min:Object(l.getSetting)("min_columns",1),max:Object(l.getSetting)("max_columns",6)}),Object(c.createElement)(p.ToggleControl,{label:Object(n.__)("Align Buttons","woo-gutenberg-products-block"),help:s?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({alignButtons:!s})})),Object(c.createElement)(p.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(g.a,{settings:o,onChange:e=>t({contentVisibility:e})})),Object(c.createElement)(p.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(f.a,{setAttributes:t,value:i})),Object(c.createElement)(p.PanelBody,{title:Object(n.__)("Products","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(m,{selected:e.products,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=e.map(e=>{let{id:t}=e;return t});t({products:r})},isCompact:!0})))}renderEditMode(){const{attributes:e,debouncedSpeak:t,setAttributes:r}=this.props;return Object(c.createElement)(p.Placeholder,{icon:Object(c.createElement)(i.a,{srcElement:a}),label:Object(n.__)("Hand-picked Products","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-handpicked-products"},Object(n.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(c.createElement)(m,{selected:e.products,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e.map(e=>{let{id:t}=e;return t});r({products:t})}}),Object(c.createElement)(p.Button,{isPrimary:!0,onClick:()=>{r({editMode:!1}),t(Object(n.__)("Showing Hand-picked Products block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))}render(){const{attributes:e,name:t,setAttributes:r}=this.props,{editMode:o}=e;return e.isPreview?j.a:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.BlockControls,null,Object(c.createElement)(p.ToolbarGroup,{controls:[{icon:"edit",title:Object(n.__)("Edit selected products","woo-gutenberg-products-block"),onClick:()=>r({editMode:!o}),isActive:o}]})),this.getInspectorControls(),o?this.renderEditMode():Object(c.createElement)(p.Disabled,null,Object(c.createElement)(b.a,{block:t,attributes:e})))}}var y=Object(p.withSpokenMessages)(x);Object(o.registerBlockType)("woocommerce/handpicked-products",{title:Object(n.__)("Hand-picked Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(i.a,{srcElement:a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(n.__)("Handpicked Products","woo-gutenberg-products-block"),Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{align:{type:"string"},columns:{type:"number",default:Object(l.getSetting)("default_columns",3)},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]},alignButtons:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:e=>Object(c.createElement)(y,e),save:()=>null})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/legacy-template.asset.php b/build/legacy-template.asset.php new file mode 100644 index 00000000000..423bf9efc2f --- /dev/null +++ b/build/legacy-template.asset.php @@ -0,0 +1 @@ + array('wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '34f0bfd2c3053e2244297c1d649324c1'); \ No newline at end of file diff --git a/build/legacy-template.js b/build/legacy-template.js new file mode 100644 index 00000000000..23a33a050de --- /dev/null +++ b/build/legacy-template.js @@ -0,0 +1,3 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["legacy-template"]=function(e){function t(t){for(var r,l,i=t[0],u=t[1],a=t[2],s=0,d=[];s{var t,o,n,s;let{attributes:d}=e;const m=Object(l.useBlockProps)(),b=null!==(t=null===(o=p[d.template])||void 0===o?void 0:o.title)&&void 0!==t?t:d.template,g=null!==(n=null===(s=p[d.template])||void 0===s?void 0:s.placeholder)&&void 0!==n?n:"fallback";return Object(r.createElement)("div",m,Object(r.createElement)(i.Placeholder,{icon:a.a,label:b,className:"wp-block-woocommerce-legacy-template__placeholder"},Object(r.createElement)("div",{className:"wp-block-woocommerce-legacy-template__placeholder-copy"},Object(u.sprintf)( +/* translators: %s is the template title */ +Object(u.__)("This is an editor placeholder for the %s. On your store this will be replaced by the template and display with your product image(s), title, price, etc. You can move this placeholder around and add further blocks around it to extend the template.","woo-gutenberg-products-block"),b)),Object(r.createElement)("div",{className:"wp-block-woocommerce-legacy-template__placeholder-wireframe"},Object(r.createElement)("img",{className:"wp-block-woocommerce-legacy-template__placeholder-image",src:`${c.m}template-placeholders/${g}.svg`,alt:b}))))},save:()=>null})},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/mini-cart-component-frontend.asset.php b/build/mini-cart-component-frontend.asset.php new file mode 100644 index 00000000000..7d394120c05 --- /dev/null +++ b/build/mini-cart-component-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-autop', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'bc98dbd84b78cfd0a5dba8982b045cd9'); \ No newline at end of file diff --git a/build/mini-cart-component-frontend.js b/build/mini-cart-component-frontend.js new file mode 100644 index 00000000000..bb692c1c9a6 --- /dev/null +++ b/build/mini-cart-component-frontend.js @@ -0,0 +1,23 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=237)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(c.CART_STORE_KEY).invalidateResolutionForStore()},f=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),f),[])},b={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...b,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},v=e=>Object(s.a)(Object.entries(e).map(e=>{let[t,n]=e;return[t,Object(i.decodeEntities)(n)]})),O={cartCoupons:c.EMPTY_CART_COUPONS,cartItems:c.EMPTY_CART_ITEMS,cartFees:c.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:b,shippingRates:c.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:c.EMPTY_EXTENSIONS},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:n}=Object(l.a)(),i=null==n?void 0:n.previewCart,{shouldSelect:s}=e,d=Object(o.useRef)();m();const p=Object(a.useSelect)((e,n)=>{let{dispatch:r}=n;if(!s)return O;if(t)return{cartCoupons:i.coupons,cartItems:i.items,cartFees:i.fees,cartItemsCount:i.items_count,cartItemsWeight:i.items_weight,cartNeedsPayment:i.needs_payment,cartNeedsShipping:i.needs_shipping,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:i.totals,cartIsLoading:!1,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:b,extensions:c.EMPTY_EXTENSIONS,shippingRates:i.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:i.has_calculated_shipping,paymentRequirements:i.paymentRequirements,receiveCart:"function"==typeof(null==i?void 0:i.receiveCart)?i.receiveCart:()=>{}};const o=e(c.CART_STORE_KEY),a=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),f=o.isCustomerDataUpdating(),{receiveCart:m}=r(c.CART_STORE_KEY),g=v(a.billingAddress),y=a.needsShipping?v(a.shippingAddress):g,E=a.fees.length>0?a.fees.map(e=>v(e)):c.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):c.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:E,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingAddress:Object(u.a)(g),shippingAddress:Object(u.a)(y),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:f,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}},[s]);return d.current&&Object(r.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){e.exports=window.wp.a11y},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0);n(9);const o=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),c=()=>Object(r.useContext)(o)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.dom},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return d}));var r=n(52);let o,c;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(c||(c={}));const a=(e,t)=>Object(r.c)(e)&&"type"in e&&e.type===t,i=e=>a(e,o.SUCCESS),s=e=>a(e,o.ERROR),u=e=>a(e,o.FAIL),l=e=>!Object(r.c)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:c,shouldRetry:l,isSuccessResponse:i,isErrorResponse:s,isFailResponse:u})},function(e,t){e.exports=window.wp.primitives},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n(17),c=n.n(o);function a(e){const t=Object(r.useRef)(e);return c()(e,t.current)||(t.current=e),t.current}},function(e,t,n){"use strict";var r=n(29),o=n.n(r),c=n(0),a=n(3),i=n(1),s=n(84),u=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:n=Object(i.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(i.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(i.__)("Error:","woo-gutenberg-products-block"),button:u}=e;return Object(c.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(c.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(c.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},n&&Object(c.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},n),r&&Object(c.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(c.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),u&&Object(c.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},u)))};n(55);class l extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:n=!0,text:r,errorMessagePrefix:o,renderError:a,button:i}=this.props,{errorMessage:s,hasError:l}=this.state;return l?"function"==typeof a?a({errorMessage:s}):Object(c.createElement)(u,{errorMessage:n?s:null,header:e,imageUrl:t,text:r,errorMessagePrefix:o,button:i}):this.props.children}}t.a=l},,function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(60),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(77))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(80);const c=()=>{const{notices:e,createNotice:t,removeNotice:n,setIsSuppressed:c}=Object(o.b)(),a=Object(r.useRef)(e);Object(r.useEffect)(()=>{a.current=e},[e]);const i=Object(r.useMemo)(()=>({hasNoticesOfType:e=>a.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeNotice:n}),[n]),s=Object(r.useMemo)(()=>({addDefaultNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...n})},addErrorNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...n})},addWarningNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...n})},addInfoNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...n})},addSuccessNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...n})}}),[t]);return{notices:e,...i,...s,setIsSuppressed:c}}},function(e,t){e.exports=window.wp.deprecated},function(e,t,n){"use strict";n.d(t,"b",(function(){return R})),n.d(t,"a",(function(){return T}));var r=n(0),o=n(1),c=n(75),a=n(40),i=n.n(a),s=n(52);let u;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(u||(u={}));const l=()=>({type:u.SET_IDLE}),d=e=>({type:u.SET_REDIRECT_URL,redirectUrl:e}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:u.SET_COMPLETE,data:e}},f=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?u.SET_HAS_ERROR:u.SET_NO_ERROR}};var m=n(2);let b;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(b||(b={}));const h={order_id:0,customer_id:0,...Object(m.getSetting)("checkoutData",{})||{}},g={redirectUrl:"",status:b.PRISTINE,hasError:!1,calculatingCount:0,orderId:h.order_id,orderNotes:"",customerId:h.customer_id,shouldCreateAccount:!1,processingResponse:null,extensionData:{}},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,{redirectUrl:t,type:n,customerId:r,orderId:o,orderNotes:c,extensionData:a,shouldCreateAccount:i,data:s}=arguments.length>1?arguments[1]:void 0,l=e;switch(n){case u.SET_PRISTINE:l=g;break;case u.SET_IDLE:l=e.status!==b.IDLE?{...e,status:b.IDLE}:e;break;case u.SET_REDIRECT_URL:l=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case u.SET_PROCESSING_RESPONSE:l={...e,processingResponse:s};break;case u.SET_COMPLETE:l=e.status!==b.COMPLETE?{...e,status:b.COMPLETE,redirectUrl:void 0!==s&&"string"==typeof s.redirectUrl&&s.redirectUrl?s.redirectUrl:e.redirectUrl}:e;break;case u.SET_PROCESSING:l=e.status!==b.PROCESSING?{...e,status:b.PROCESSING,hasError:!1}:e,l=!1===l.hasError?l:{...l,hasError:!1};break;case u.SET_BEFORE_PROCESSING:l=e.status!==b.BEFORE_PROCESSING?{...e,status:b.BEFORE_PROCESSING,hasError:!1}:e;break;case u.SET_AFTER_PROCESSING:l=e.status!==b.AFTER_PROCESSING?{...e,status:b.AFTER_PROCESSING}:e;break;case u.SET_HAS_ERROR:l=e.hasError?e:{...e,hasError:!0},l=e.status===b.PROCESSING||e.status===b.BEFORE_PROCESSING?{...l,status:b.IDLE}:l;break;case u.SET_NO_ERROR:l=e.hasError?{...e,hasError:!1}:e;break;case u.INCREMENT_CALCULATING:l={...e,calculatingCount:e.calculatingCount+1};break;case u.DECREMENT_CALCULATING:l={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case u.SET_CUSTOMER_ID:l=void 0!==r?{...e,customerId:r}:e;break;case u.SET_ORDER_ID:l=void 0!==o?{...e,orderId:o}:e;break;case u.SET_SHOULD_CREATE_ACCOUNT:void 0!==i&&i!==e.shouldCreateAccount&&(l={...e,shouldCreateAccount:i});break;case u.SET_ORDER_NOTES:void 0!==c&&e.orderNotes!==c&&(l={...e,orderNotes:c});break;case u.SET_EXTENSION_DATA:void 0!==a&&e.extensionData!==a&&(l={...e,extensionData:a})}return l!==e&&n!==u.SET_PRISTINE&&l.status===b.PRISTINE&&(l.status=b.IDLE),l};var O=n(25),y=n(78),E=n(159);var j=n(161),_=n(154),S=n(39),w=n(42),k=n(9),C=n(31);const P=Object(r.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),R=()=>Object(r.useContext)(P),T=e=>{let{children:t,redirectUrl:n,isCart:a=!1}=e;g.redirectUrl=n;const[m,h]=Object(r.useReducer)(v,g),{setValidationErrors:R}=Object(_.b)(),{addErrorNotice:T,removeNotices:N}=Object(S.a)(),{dispatchCheckoutEvent:A}=Object(w.a)(),x=m.calculatingCount>0,{isSuccessResponse:M,isErrorResponse:I,isFailResponse:D,shouldRetry:F}=Object(C.c)(),{checkoutNotices:L,paymentNotices:B,expressPaymentNotices:U}=(()=>{const{noticeContexts:e}=Object(C.c)();return{checkoutNotices:Object(k.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(k.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(k.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[V,H]=Object(r.useReducer)(y.b,{}),G=Object(r.useRef)(V),{onCheckoutAfterProcessingWithSuccess:q,onCheckoutAfterProcessingWithError:W,onCheckoutValidationBeforeProcessing:Y}=(e=>Object(r.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(E.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(E.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(E.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(r.useEffect)(()=>{G.current=V},[V]);const z=Object(r.useMemo)(()=>function(){return i()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),Y(...arguments)},[Y]),K=Object(r.useMemo)(()=>({resetCheckout:()=>{h({type:u.SET_PRISTINE})},setRedirectUrl:e=>{h(d(e))},setHasError:e=>{h(f(e))},incrementCalculating:()=>{h({type:u.INCREMENT_CALCULATING})},decrementCalculating:()=>{h({type:u.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;h((t=e,{type:u.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{h((e=>({type:u.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{h((e=>({type:u.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{h((e=>({type:u.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:n,value:r}=e;t.paymentDetails[n]=Object(O.decodeEntities)(r)})),"message"in e&&(t.message=Object(O.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var n;t.redirectUrl&&h(d(t.redirectUrl)),h((n=t,{type:u.SET_PROCESSING_RESPONSE,data:n})),h({type:u.SET_AFTER_PROCESSING})}}),[]);Object(r.useEffect)(()=>{m.status===b.BEFORE_PROCESSING&&(N("error"),Object(j.a)(G.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:n}=e;T(t),R(n)}),h(l()),h(f())):h({type:u.SET_PROCESSING})}))},[m.status,R,T,N,h]);const $=Object(c.a)(m.status),X=Object(c.a)(m.hasError);Object(r.useEffect)(()=>{if((m.status!==$||m.hasError!==X)&&m.status===b.AFTER_PROCESSING){const e={redirectUrl:m.redirectUrl,orderId:m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,processingResponse:m.processingResponse};m.hasError?Object(j.b)(G.current,"checkout_after_processing_with_error",e).then(t=>{const n=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message){const n=e.messageContext?{context:e.messageContext}:void 0;t=e,T(e.message,n)}}),t})(t);if(null!==n)F(n)?h(l()):h(p(n));else{if(!(L.some(e=>"error"===e.status)||U.some(e=>"error"===e.status)||B.some(e=>"error"===e.status))){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");T(t,{id:"checkout"})}h(l())}}):Object(j.b)(G.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,n=null;if(e.forEach(e=>{M(e)&&(t=e),(I(e)||D(e))&&(n=e)}),t&&!n)h(p(t));else if(Object(s.c)(n)){if(n.message){const e=n.messageContext?{context:n.messageContext}:void 0;T(n.message,e)}F(n)?h(f(!0)):h(p(n))}else h(p())})}},[m.status,m.hasError,m.redirectUrl,m.orderId,m.customerId,m.orderNotes,m.processingResponse,$,X,K,T,I,D,M,F,L,U,B]);const Q={onSubmit:Object(r.useCallback)(()=>{A("submit"),h({type:u.SET_BEFORE_PROCESSING})},[A]),isComplete:m.status===b.COMPLETE,isIdle:m.status===b.IDLE,isCalculating:x,isProcessing:m.status===b.PROCESSING,isBeforeProcessing:m.status===b.BEFORE_PROCESSING,isAfterProcessing:m.status===b.AFTER_PROCESSING,hasError:m.hasError,redirectUrl:m.redirectUrl,onCheckoutBeforeProcessing:z,onCheckoutValidationBeforeProcessing:Y,onCheckoutAfterProcessingWithSuccess:q,onCheckoutAfterProcessingWithError:W,dispatchActions:K,isCart:a,orderId:m.orderId,hasOrder:!!m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,shouldCreateAccount:m.shouldCreateAccount,setShouldCreateAccount:e=>{return h((t=e,{type:u.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:m.extensionData};return Object(r.createElement)(P.Provider,{value:Q},t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(58),o=n(0),c=n(26);const a=()=>{const e=Object(c.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...n,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},,function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n!(!function(e){return"email"in e}(t)||Object(l.c)(t)===Object(l.c)(e))||!!t.country&&!u()(Object(l.b)(e),Object(l.b)(t));var b=n(41);const h=Object(r.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>null,setShippingAddress:()=>null,shippingAsBilling:!0,setShippingAsBilling:()=>null}),g=()=>Object(r.useContext)(h),v=e=>{let{children:t}=e;const{billingData:n,shippingAddress:s,setBillingData:l,setShippingAddress:g}=(()=>{const{updateCustomerData:e}=Object(c.useDispatch)(a.CART_STORE_KEY),{addErrorNotice:t,removeNotice:n}=Object(f.a)(),{billingAddress:o,shippingAddress:s}=Object(p.a)(),[l,b]=Object(r.useState)({billingData:o,shippingAddress:s}),[h,g]=Object(r.useState)(!1);!h&&m(l.shippingAddress,s)&&(b({billingData:o,shippingAddress:s}),g(!0));const v=Object(r.useRef)(l),[O]=Object(i.a)(l,1e3,{equalityFn:(e,t)=>u()(e.billingData,t.billingData)&&u()(e.shippingAddress,t.shippingAddress)}),y=Object(r.useCallback)(e=>{b(t=>({...t,billingData:{...t.billingData,...e}}))},[]),E=Object(r.useCallback)(e=>{b(t=>({...t,shippingAddress:{...t.shippingAddress,...e}}))},[]);return Object(r.useEffect)(()=>{const r=m(v.current.billingData,O.billingData),o=m(v.current.shippingAddress,O.shippingAddress);if(!r&&!o)return;const c={};r&&(c.billing_address=O.billingData),o&&(c.shipping_address=O.shippingAddress),v.current=O,e(c).then(()=>{n("checkout")}).catch(e=>{t(Object(d.b)(e),{id:"checkout"})})},[O,t,n,e]),{billingData:l.billingData,shippingAddress:l.shippingAddress,setBillingData:y,setShippingAddress:E}})(),{cartNeedsShipping:v}=Object(p.a)(),{customerId:O}=Object(b.b)(),[y,E]=Object(r.useState)(()=>{return v&&(!O||(e=s,t=n,Object.keys(o.defaultAddressFields).every(n=>e[n]===t[n])));var e,t}),j={billingData:n,shippingAddress:s,setBillingData:l,setShippingAddress:g,shippingAsBilling:y,setShippingAsBilling:E};return Object(r.createElement)(h.Provider,{value:j},t)}},function(e,t){e.exports=window.wp.keycodes},,function(e,t){e.exports=window.wc.priceFormat},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(44);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return S})),n.d(t,"a",(function(){return w}));var r=n(0),o=n(17),c=n.n(o),a=n(81);const i=e=>Object(a.a)(e.map(e=>{var t;let{package_id:n,shipping_rates:r}=e;return[n,null===(t=r.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})),s={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},u={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},l={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:s,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},d=(e,t)=>{let{type:n}=t;return Object.values(s).includes(n)?n:e};var p=n(78),f=n(159);const m=e=>({onSuccess:Object(f.a)("shipping_rates_success",e),onFail:Object(f.a)("shipping_rates_fail",e),onSelectSuccess:Object(f.a)("shipping_rate_select_success",e),onSelectFail:Object(f.a)("shipping_rate_select_fail",e)});var b=n(161),h=n(41),g=n(45),v=n(26),O=n(95);const{NONE:y,INVALID_ADDRESS:E,UNKNOWN:j}=s,_=Object(r.createContext)(l),S=()=>Object(r.useContext)(_),w=e=>{let{children:t}=e;const{dispatchActions:n}=Object(h.b)(),{shippingAddress:o,setShippingAddress:a}=Object(g.b)(),{cartNeedsShipping:l,cartHasCalculatedShipping:f,shippingRates:S,shippingRatesLoading:w,cartErrors:k}=Object(v.a)(),{selectShippingRate:C,isSelectingRate:P}=Object(O.a)(),[R,T]=Object(r.useReducer)(d,y),[N,A]=Object(r.useReducer)(p.b,{}),x=Object(r.useRef)(N),M=Object(r.useMemo)(()=>({onShippingRateSuccess:m(A).onSuccess,onShippingRateFail:m(A).onFail,onShippingRateSelectSuccess:m(A).onSelectSuccess,onShippingRateSelectFail:m(A).onSelectFail}),[A]);Object(r.useEffect)(()=>{x.current=N},[N]);const I=Object(r.useRef)(()=>i(S));Object(r.useEffect)(()=>{const e=i(S);c()(I.current,e)||(I.current=e)},[S]),Object(r.useEffect)(()=>{w?n.incrementCalculating():n.decrementCalculating()},[w,n]),Object(r.useEffect)(()=>{P?n.incrementCalculating():n.decrementCalculating()},[P,n]),Object(r.useEffect)(()=>{k.length>0&&k.some(e=>!(!e.code||!Object.values(u).includes(e.code)))?T({type:E}):T({type:y})},[k]);const D=Object(r.useMemo)(()=>({isPristine:R===y,isValid:R===y,hasInvalidAddress:R===E,hasError:R===j||R===E}),[R]);Object(r.useEffect)(()=>{w||0!==S.length&&!D.hasError||Object(b.a)(x.current,"shipping_rates_fail",{hasInvalidAddress:D.hasInvalidAddress,hasError:D.hasError})},[S,w,D.hasError,D.hasInvalidAddress]),Object(r.useEffect)(()=>{!w&&S.length>0&&!D.hasError&&Object(b.a)(x.current,"shipping_rates_success",S)},[S,w,D.hasError]),Object(r.useEffect)(()=>{P||(D.hasError?Object(b.a)(x.current,"shipping_rate_select_fail",{hasError:D.hasError,hasInvalidAddress:D.hasInvalidAddress}):Object(b.a)(x.current,"shipping_rate_select_success",I.current))},[P,D.hasError,D.hasInvalidAddress]);const F={shippingErrorStatus:D,dispatchErrorStatus:T,shippingErrorTypes:s,shippingRates:S,shippingRatesLoading:w,selectedRates:I.current,setSelectedRates:C,isSelectingRate:P,shippingAddress:o,setShippingAddress:a,needsShipping:l,hasCalculatedShipping:f,...M};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(_.Provider,{value:F},t))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return i}));const r=e=>"number"==typeof e,o=e=>"string"==typeof e,c=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function a(e,t){return c(e)&&t in e}const i=e=>"boolean"==typeof e},function(e,t){e.exports=window.wp.url},,function(e,t){},function(e,t,n){"use strict";var r=n(57);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.warning},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t,n){var o=this,c=Object(r.useRef)(null),a=Object(r.useRef)(0),i=Object(r.useRef)(null),s=Object(r.useRef)([]),u=Object(r.useRef)(),l=Object(r.useRef)(),d=Object(r.useRef)(e),p=Object(r.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,h="maxWait"in n,g=h?Math.max(+n.maxWait||0,t):null;return Object(r.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(r.useMemo)((function(){var e=function(e){var t=s.current,n=u.current;return s.current=u.current=null,a.current=e,l.current=d.current.apply(n,t)},n=function(e,t){f&&cancelAnimationFrame(i.current),i.current=f?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!p.current)return!1;var n=e-c.current,r=e-a.current;return!c.current||n>=t||n<0||h&&r>=g},v=function(t){return i.current=null,b&&s.current?e(t):(s.current=u.current=null,l.current)},O=function(){var e=Date.now();if(r(e))return v(e);if(p.current){var o=e-c.current,i=e-a.current,s=t-o,u=h?Math.min(s,g-i):s;n(O,u)}},y=function(){for(var d=[],f=0;f0?i/2:u)+(u+i/2>window.innerWidth?window.innerWidth-u:i/2)},d=e.left;"right"===r?d=e.right:"middle"!==c&&(d=u);var p=e.right;"left"===r?p=e.left:"middle"!==c&&(p=u);var f,m={popoverLeft:d,contentWidth:d-i>0?i:d},b={popoverLeft:p,contentWidth:p+i>window.innerWidth?window.innerWidth-p:i},h=n,g=null;if(!o)if("center"===n&&l.contentWidth===i)h="center";else if("left"===n&&m.contentWidth===i)h="left";else if("right"===n&&b.contentWidth===i)h="right";else{var v="left"==(h=m.contentWidth>b.contentWidth?"left":"right")?m.contentWidth:b.contentWidth;g=v!==i?v:null}if(f="center"===h?l.popoverLeft:"left"===h?m.popoverLeft:b.popoverLeft,a){var O=a.getBoundingClientRect();f=Math.min(f,O.right-i)}return{xAxis:h,popoverLeft:f,contentWidth:g}}function w(e,t,n,r,o,c,a){var i=t.height;if(o){var s=(Object(g.getScrollContainer)(c)||document.body).getBoundingClientRect().top+i-a;if(e.top<=s)return{yAxis:n,popoverTop:Math.min(e.bottom,s)}}var u=e.top+e.height/2;"bottom"===r?u=e.bottom:"top"===r&&(u=e.top);var l={popoverTop:u,contentHeight:(u-i/2>0?i/2:u)+(u+i/2>window.innerHeight?window.innerHeight-u:i/2)},d={popoverTop:e.top,contentHeight:e.top-10-i>0?i:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+i>window.innerHeight?window.innerHeight-10-e.bottom:i},f=n,m=null;if(!o)if("middle"===n&&l.contentHeight===i)f="middle";else if("top"===n&&d.contentHeight===i)f="top";else if("bottom"===n&&p.contentHeight===i)f="bottom";else{var b="top"==(f=d.contentHeight>p.contentHeight?"top":"bottom")?d.contentHeight:p.contentHeight;m=b!==i?b:null}return{yAxis:f,popoverTop:"middle"===f?l.popoverTop:"top"===f?d.popoverTop:p.popoverTop,contentHeight:m}}var k=n(23),C=n(10);var P=Object(c.createContext)({focusHistory:[]}),R=P.Provider,T=P.Consumer;R.displayName="FocusReturnProvider",T.displayName="FocusReturnConsumer",c.Component;var N=Object(O.createHigherOrderComponent)((function e(t){if((r=t)instanceof c.Component||"function"==typeof r){var n=t;return e({})(n)}var r,o=t.onFocusReturn,a=void 0===o?s.stubTrue:o;return function(e){var t=function(t){Object(f.a)(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(b.a)(n);if(r){var o=Object(b.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(m.a)(this,e)});function i(){var e;return Object(d.a)(this,i),(e=o.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return Object(p.a)(i,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==a())for(var r,o=[].concat(Object(k.a)(s.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(k.a)(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(c.createElement)(e,this.props.childProps))}}]),i}(c.Component);return function(e){return Object(c.createElement)(T,null,(function(n){return Object(c.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");var A=Object(O.createHigherOrderComponent)((function(e){return function(t){Object(f.a)(a,t);var n,r,o=(n=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(b.a)(n);if(r){var o=Object(b.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(m.a)(this,e)});function a(){var e;return Object(d.a)(this,a),(e=o.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(C.a)(e)),e}return Object(p.a)(a,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===v.TAB){var t=g.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return Object(c.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(c.createElement)(e,this.props))}}]),a}(c.Component)}),"withConstrainedTabbing"),x=n(70);var M=function(e){Object(f.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(b.a)(t);if(n){var o=Object(b.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(m.a)(this,e)});function o(){return Object(d.a)(this,o),r.apply(this,arguments)}return Object(p.a)(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(c.Component),I=Object(x.a)(M);function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(b.a)(e);if(t){var o=Object(b.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(m.a)(this,n)}}var F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,r=e.className,o=void 0===r?"lockscroll":r,a=0,i=0;function s(e){var t=n.scrollingElement||n.body;e&&(i=t.scrollTop);var r=e?"add":"remove";t.classList[r](o),n.documentElement.classList[r](o),e||(t.scrollTop=i)}function u(){0===a&&s(!0),++a}function l(){1===a&&s(!1),--a}return function(e){Object(f.a)(n,e);var t=D(n);function n(){return Object(d.a)(this,n),t.apply(this,arguments)}return Object(p.a)(n,[{key:"componentDidMount",value:function(){u()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(c.Component)}();function L(e){e.stopPropagation()}var B=Object(c.forwardRef)((function(e,t){var n=e.children,a=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({},a,{ref:t,onMouseDown:L}),n)})),U=n(36);function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function le(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var de=function(e){var t=e.headerTitle,n=e.onClose,a=e.onKeyDown,s=e.children,u=e.className,d=e.noArrow,p=void 0===d||d,f=e.isAlternate,m=e.position,b=void 0===m?"bottom right":m,E=(e.range,e.focusOnMount),j=void 0===E?"firstElement":E,k=e.anchorRef,C=e.shouldAnchorIncludePadding,P=e.anchorRect,R=e.getAnchorRect,T=e.expandOnMobile,N=e.animate,A=void 0===N||N,x=e.onClickOutside,M=e.onFocusOutside,D=e.__unstableSticky,L=e.__unstableSlotName,U=void 0===L?"Popover":L,V=e.__unstableObserveElement,H=e.__unstableBoundaryParent,q=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),W=Object(c.useRef)(null),Y=Object(c.useRef)(null),z=Object(c.useRef)(),K=Object(O.useViewportMatch)("medium","<"),$=Object(c.useState)(),X=Object(h.a)($,2),Q=X[0],Z=X[1],J=G(U),ee=T&&K,ne=Object(O.useResizeObserver)(),re=Object(h.a)(ne,2),oe=re[0],de=re[1];p=ee||p,Object(c.useLayoutEffect)((function(){if(ee)return le(z.current,"is-without-arrow",p),le(z.current,"is-alternate",f),se(z.current,"data-x-axis"),se(z.current,"data-y-axis"),ue(z.current,"top"),ue(z.current,"left"),ue(Y.current,"maxHeight"),void ue(Y.current,"maxWidth");var e=function(){if(z.current&&Y.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(g.getRectangleFromRange)(r);if(r instanceof window.Element){var c=r.getBoundingClientRect();return o?c:ie(c,r)}var a=r.top,i=r.bottom,s=a.getBoundingClientRect(),u=i.getBoundingClientRect(),l=new window.DOMRect(s.left,s.top,s.width,u.bottom-s.top);return o?l:ie(l,r)}if(e.current){var d=e.current.parentNode,p=d.getBoundingClientRect();return o?p:ie(p,d)}}(W,P,R,k,C);if(e){var t,n,r=z.current,o=r.offsetParent,c=r.ownerDocument,a=0;if(o&&o!==c.body){var i=o.getBoundingClientRect();a=i.top,e=new window.DOMRect(e.left-i.left,e.top-i.top,e.width,e.height)}H&&(t=null===(n=z.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode);var s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,i=n.split(" "),s=Object(h.a)(i,3),u=s[0],l=s[1],d=void 0===l?"center":l,p=s[2],f=w(e,t,u,p,r,o,c),m=S(e,t,d,p,r,f.yAxis,a);return _(_({},m),f)}(e,de.height?de:Y.current.getBoundingClientRect(),b,D,z.current,a,t),u=s.popoverTop,l=s.popoverLeft,d=s.xAxis,m=s.yAxis,v=s.contentHeight,O=s.contentWidth;"number"==typeof u&&"number"==typeof l&&(ue(z.current,"top",u+"px"),ue(z.current,"left",l+"px")),le(z.current,"is-without-arrow",p||"center"===d&&"middle"===m),le(z.current,"is-alternate",f),se(z.current,"data-x-axis",d),se(z.current,"data-y-axis",m),ue(Y.current,"maxHeight","number"==typeof v?v+"px":""),ue(Y.current,"maxWidth","number"==typeof O?O+"px":""),Z(({left:"right",right:"left"}[d]||"center")+" "+({top:"bottom",bottom:"top"}[m]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),V&&(n=new window.MutationObserver(e)).observe(V,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[ee,P,R,k,C,b,de,D,V,H]),function(e,t){Object(c.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=g.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(j,Y);var pe=function(e){e.keyCode===v.ESCAPE&&n&&(e.stopPropagation(),n()),a&&a(e)},fe=Object(c.createElement)(I,{onFocusOutside:function(e){if(M)M(e);else if(x){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),x(t)}else n&&n()}},Object(c.createElement)(ce,{type:A&&Q?"appear":null,options:{origin:Q}},(function(e){var o=e.className;return Object(c.createElement)(B,Object(r.a)({className:i()("components-popover",u,o,{"is-expanded":ee,"is-without-arrow":p,"is-alternate":f})},q,{onKeyDown:pe,ref:z}),ee&&Object(c.createElement)(F,null),ee&&Object(c.createElement)("div",{className:"components-popover__header"},Object(c.createElement)("span",{className:"components-popover__header-title"},t),Object(c.createElement)(ve,{className:"components-popover__close",icon:y.a,onClick:n})),Object(c.createElement)("div",{ref:Y,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},oe,s)))})));return j&&(fe=Object(c.createElement)(ae,null,fe)),J.ref&&(fe=Object(c.createElement)(te,{name:U},fe)),k||P?fe:Object(c.createElement)("span",{ref:W},fe)};de.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(c.createElement)(ee,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var pe=de,fe=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(s.isString)(r)&&(t=r),Object(s.isObject)(r)&&(t=r.display,n=r.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":n},t)):null};var me=function(e){Object(f.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(b.a)(t);if(n){var o=Object(b.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(m.a)(this,e)});function o(){var e;return Object(d.a)(this,o),(e=r.apply(this,arguments)).delayedSetIsOver=Object(s.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return Object(p.a)(o,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===c.Children.count(n)){var r=c.Children.only(n);"function"==typeof r.props[e]&&r.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(s.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,r=e.text,o=e.shortcut;if(1!==c.Children.count(t))return t;var a=c.Children.only(t),i=this.state.isOver;return Object(c.cloneElement)(a,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(c.concatChildren)(a.props.children,i&&Object(c.createElement)(pe,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(c.createElement)(fe,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(c.Component),be=n(68);function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw c}}}}(ge);try{for(I.s();!(M=I.n()).done;)R[M.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){I.e(e)}finally{I.f()}}var D=!N&&(_&&k||w||!!k&&(!C||Object(s.isArray)(C)&&!C.length)&&!1!==_),F=Object(c.createElement)(A,Object(r.a)({},x,R,{className:T,"aria-label":R["aria-label"]||k,ref:t}),E&&Object(c.createElement)(be.a,{icon:E,size:j}),C);return D?Object(c.createElement)(me,{text:k,shortcut:w,position:S},F):F}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,n){"use strict";var r=n(18),o=n.n(r),c=n(0),a=n(107),i=n(5),s=n.n(i);n(136);const u=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:r,onValueChange:i,displayType:l="text",...d}=e;const p="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(p))return null;const f=p/10**r.minorUnit;if(!Number.isFinite(f))return null;const m=s()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),b={...d,...u(r),value:void 0,currency:void 0,onValueChange:void 0},h=i?e=>{const t=e.value*10**r.minorUnit;i(t)}:()=>{};return Object(c.createElement)(a.a,o()({className:m,displayType:l},b,{value:f,onValueChange:h}))}},function(e,t,n){"use strict";var r=n(2),o=n(1),c=n(52);const a=Object(r.getSetting)("countryLocale",{}),i=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(c.b)(e.priority)&&(t.index=e.priority),Object(c.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},s=Object.entries(a).map(e=>{let[t,n]=e;return[t,Object.entries(n).map(e=>{let[t,n]=e;return[t,i(n)]}).reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{})]}).reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{});t.a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=n&&void 0!==s[n]?s[n]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,n){"use strict";var r=n(19),o=n(11),c=n(16),a=n(0),i=n(32),s=function(e){var t=e.icon,n=e.className,r=Object(c.a)(e,["icon","className"]),i=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" ");return Object(a.createElement)("span",Object(o.a)({className:i},r))};function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t{let{Block:t,containers:n,getProps:r=(()=>({})),getErrorBoundaryProps:o=(()=>({}))}=e;0!==n.length&&Array.prototype.forEach.call(n,(e,n)=>{const c=r(e,n),a=o(e,n),i={...e.dataset,...c.attributes||{}};e.classList.remove("is-loading"),u({Block:t,container:e,props:c,attributes:i,errorBoundaryProps:a})})},u=e=>{let{Block:t,container:n,attributes:r={},props:i={},errorBoundaryProps:s={}}=e;Object(c.render)(Object(c.createElement)(a.a,s,Object(c.createElement)(c.Suspense,{fallback:Object(c.createElement)("div",{className:"wc-block-placeholder"})},Object(c.createElement)(t,o()({},i,{attributes:r})))),n)},l=e=>{const t=document.body.querySelectorAll(i.join(","));(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrappers:c}=e;const a=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,c)),s({Block:t,containers:a,getProps:n,getErrorBoundaryProps:r})})({...e,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrapper:c}=e;const a=c.querySelectorAll(o);s({Block:t,containers:a,getProps:n,getErrorBoundaryProps:r})})({...e,wrapper:t})})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t){const n=Object(r.useRef)();return Object(r.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},,function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,u=[],l=!1,d=-1;function p(){l&&s&&(l=!1,s.length?u=s.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=i(p);l=!0;for(var t=u.length;t;){for(s=u,u=[];++d1)for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:n}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:n,id:r,callback:c,priority:i}=arguments.length>1?arguments[1]:void 0;const s=e.hasOwnProperty(n)?new Map(e[n]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return s.set(r,{priority:i,callback:c}),{...e,[n]:s};case o.REMOVE_EVENT_CALLBACK:return s.delete(r),{...e,[n]:s}}}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return h}));var r=n(0),o=(n(8),n(9)),c=n(42),a=n(28),i=n(18),s=n.n(i),u=n(5),l=n.n(u),d=n(132);n(85);const p=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var f=e=>{let{className:t,notices:n,removeNotice:o}=e;const c=n.filter(e=>"snackbar"!==e.type);if(!c.length)return null;const a=l()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:a},c.map(e=>Object(r.createElement)(d.a,s()({key:"store-notice-"+e.id},e,{className:l()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(r.createContext)({notices:[],createNotice:(e,t,n)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),b=()=>Object(r.useContext)(m),h=e=>{let{children:t,className:n="",createNoticeContainer:i=!0,context:s="wc/core"}=e;const{createNotice:u,removeNotice:l}=Object(o.useDispatch)("core/notices"),[d,p]=Object(r.useState)(!1),{dispatchStoreEvent:b}=Object(c.a)(),{isEditor:h}=Object(a.a)(),g=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u(e,t,{...n,context:n.context||s}),b("store-notice-create",{status:e,content:t,options:n})}),[u,b,s]),v=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;l(e,t)}),[l,s]),{notices:O}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(s)}),[s]),y={notices:O,createNotice:g,removeNotice:v,context:s,setIsSuppressed:p},E=d?null:Object(r.createElement)(f,{className:n,notices:y.notices,removeNotice:y.removeNotice,isEditor:h});return Object(r.createElement)(m.Provider,{value:y},i&&E,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{})},,,function(e,t,n){"use strict";n.d(t,"n",(function(){return c})),n.d(t,"l",(function(){return a})),n.d(t,"k",(function(){return i})),n.d(t,"m",(function(){return s})),n.d(t,"i",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"j",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"e",(function(){return m})),n.d(t,"g",(function(){return b})),n.d(t,"a",(function(){return h})),n.d(t,"h",(function(){return g})),n.d(t,"b",(function(){return v}));var r,o=n(2);const c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",i=c.pluginUrl+"build/",s=c.buildPhase,u=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),h=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},function(e,t){},function(e,t){e.exports=window.wp.autop},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return i}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:n=!1,cancelable:o=!1,element:c,detail:a={}}=t;if(!r)return;c||(c=document.body);const i=new r(e,{bubbles:n,cancelable:o,detail:a});c.dispatchEvent(i)};let c;const a=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{o(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}},function(e,t,n){"use strict";var r=n(0),o=n(32),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(9),o=n(0),c=n(6),a=n(64);const i=()=>{const e=Object(a.a)(),{selectShippingRate:t}=Object(r.useDispatch)(c.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((n,r)=>{t(n,r).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(r.useSelect)(e=>e(c.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c}));var r=n(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(3),o=n(61);function c(e,t){return e===t}function a(e){return"function"==typeof e?function(){return e}:e}function i(e,t,n){var i=n&&n.equalityFn||c,s=function(e){var t=Object(r.useState)(a(e)),n=t[0],o=t[1];return[n,Object(r.useCallback)((function(e){return o(a(e))}),[])]}(e),u=s[0],l=s[1],d=Object(o.a)(Object(r.useCallback)((function(e){return l(e)}),[l]),t,n),p=Object(r.useRef)(e);return i(p.current,e)||(d(e),p.current=e),[u,d]}},,,,function(e,t){e.exports=window.wp.wordcount},,function(e,t,n){"use strict";var r=n(0),o=n(5),c=n.n(o);n(194),t.a=e=>{let{children:t,className:n}=e;return Object(r.createElement)("div",{className:c()("wc-block-components-product-badge",n)},t)}},function(e,t){e.exports=window.wp.components},function(e,t,n){"use strict";var r=n(0);n(135),t.a=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},function(e,t,n){"use strict";var r=n(3),o=n.n(r);function c(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),c=o[0],a=o[1]||"";return{beforeDecimal:c,afterDecimal:a,hasNagation:n,addNegation:r}}function v(e,t,n){for(var r="",o=n?"0":"",c=0;c<=t-1;c++)r+=e[c]||o;return r}function O(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function y(e,t,n){return Math.min(Math.max(e,t),n)}function E(e){return Math.max(e.selectionStart,e.selectionEnd)}var j={thousandSeparator:p.oneOfType([p.string,p.oneOf([!0])]),decimalSeparator:p.string,allowedDecimalSeparators:p.arrayOf(p.string),thousandsGroupStyle:p.oneOf(["thousand","lakh","wan"]),decimalScale:p.number,fixedDecimalScale:p.bool,displayType:p.oneOf(["input","text"]),prefix:p.string,suffix:p.string,format:p.oneOfType([p.string,p.func]),removeFormatting:p.func,mask:p.oneOfType([p.string,p.arrayOf(p.string)]),value:p.oneOfType([p.number,p.string]),defaultValue:p.oneOfType([p.number,p.string]),isNumericString:p.bool,customInput:p.elementType,allowNegative:p.bool,allowEmptyFormatting:p.bool,allowLeadingZeros:p.bool,onValueChange:p.func,onKeyDown:p.func,onMouseUp:p.func,onChange:p.func,onFocus:p.func,onBlur:p.func,type:p.oneOf(["text","tel","password"]),isAllowed:p.func,renderText:p.func,getInputRef:p.oneOfType([p.func,p.shape({current:p.any})])},_={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:f,onChange:f,onKeyDown:f,onMouseUp:f,onFocus:f,onBlur:f,isAllowed:function(){return!0}},S=function(e){function t(e){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=!(r=i(t).call(this,e))||"object"!=typeof r&&"function"!=typeof r?u(this):r;var o=e.defaultValue;n.validateProps();var c=n.formatValueProp(o);return n.state={value:c,numAsString:n.removeFormatting(c)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(u(n)),n.onKeyDown=n.onKeyDown.bind(u(n)),n.onMouseUp=n.onMouseUp.bind(u(n)),n.onFocus=n.onFocus.bind(u(n)),n.onBlur=n.onBlur.bind(u(n)),n}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,c=n.numAsString,a=void 0===c?"":c;if(e!==t){this.validateProps();var i=this.formatNumString(a),s=b(t.value)?i:this.formatValueProp(),u=this.removeFormatting(s),l=parseFloat(u),d=parseFloat(a);(isNaN(l)&&isNaN(d)||l===d)&&i===o&&(null!==r||s===o)||this.updateValue({formattedValue:s,numAsString:u,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),c="-"===e[0];c&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var a=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==a&&(e="".concat(e.substring(0,a),".").concat(e.substring(a+1,e.length).replace(new RegExp(h(r),"g"),""))),c&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,c=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!c||0===o||t||r?"":"|"+h(c)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){O(e,t),setTimeout((function(){e.value===n&&O(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,c=r.suffix,a=r.format;if(""===e)return 0;if(t=y(t,0,e.length),!a){var i="-"===e[0];return y(t,o.length+(i?1:0),e.length-c.length)}if("function"==typeof a)return t;if("#"===a[t]&&m(e[t]))return t;if("#"===a[t-1]&&m(e[t-1]))return t;var s=a.indexOf("#");t=y(t,s,a.lastIndexOf("#")+1);for(var u=a.substring(t,a.length).indexOf("#"),l=t,d=t+(-1===u?0:u);l>s&&("#"!==a[l]||!m(e[l]));)l-=1;return!m(e[d])||"left"===n&&t!==s||t-l0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,c=t.allowEmptyFormatting,a=this.props,i=a.value,s=a.isNumericString,u=!(i=b(i)?e:i)&&0!==i;return u&&c&&(i=""),u&&!c?"":("number"==typeof i&&(i=i.toString(),s=!0),"Infinity"===i&&s&&(i=""),s&&!n&&"number"==typeof r&&(i=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=g(e),c=o.beforeDecimal,a=o.afterDecimal,i=o.hasNagation,s=parseFloat("0.".concat(a||"0")).toFixed(t).split("."),u=c.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),s[0]),l=v(s[1]||"",Math.min(t,a.length),n),d=r?".":"";return"".concat(i?"-":"").concat(u).concat(d).concat(l)}(i,r,o)),s?this.formatNumString(i):this.formatInput(i))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),c=r.test(e);return e=e.replace(/-/g,""),o&&!c&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,c=n.suffix,a=n.decimalScale,i=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e=t.length-c.length||a&&i&&t[e]===s))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;rn&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),v=h.start,O=h.end;if(!o&&v===O&&-1!==l.indexOf(n[m])){var y=0===s?"":d;return n.substr(0,m)+y+n.substr(m+1,n.length)}var E=o?0:a.length,j=t.length-(o?0:i.length);if(n.length>t.length||!n.length||v===O||0===m&&b===t.length||m===E&&b===j)return n;if(this.checkIfFormatGotDeleted(v,O,t)&&(n=t),!o){var _=this.removeFormatting(n),S=g(_,c),w=S.beforeDecimal,k=S.afterDecimal,C=S.addNegation,P=ey;)O--;O=this.correctCaretPosition(i,O,"left")}}else for(;!h.test(i[O])&&OE)&&(e.preventDefault(),this.setPatchedCaretPosition(n,O,i)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,O,i),m(e)}else m(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,c=void 0===o?"":o;if(n===r){var a=this.correctCaretPosition(c,n);a!==n&&this.setPatchedCaretPosition(t,a,c)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,c=n.value,a=void 0===c?"":c,i=t.correctCaretPosition(a,r);i===r||0===r&&o===a.length||t.setPatchedCaretPosition(n,i,a),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,c=r.type,i=r.displayType,s=r.customInput,u=r.renderText,l=r.getInputRef,d=r.format,p=this.state.value,f=(e=this.props,t=j,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),m=a({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(d)?"numeric":void 0},f,{type:c,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===i)return u?u(p)||null:o.a.createElement("span",a({},f,{ref:l}),p);if(s){var b=s;return o.a.createElement(b,a({},m,{ref:l}))}return o.a.createElement("input",a({},m,{ref:l}))}}])&&c(n.prototype,r),t}(o.a.Component);S.propTypes=j,S.defaultProps=_,t.a=S},function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{srcElement:t,size:n=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:n,height:n,...o}):null}},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return s}));var r=n(2),o=n(67),c=n(53);const a=e=>{let{country:t="",state:n="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:n.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},i=e=>{let{email:t=""}=e;return Object(c.isEmail)(t)?t.trim():""},s=e=>{const t=Object.keys(r.defaultAddressFields),n=Object(o.a)(t,{},e.country),c=Object.assign({},e);return n.forEach(t=>{let{key:n="",hidden:r=!1}=t;r&&((e,t)=>e in t)(n,e)&&(c[n]="")}),c}},function(e,t,n){"use strict";var r=n(0),o=n(4),c=n(5),a=n.n(c),i=n(1),s=n(27),u=n(88),l=n(62);t.a=function(e){var t=e.className,n=e.status,c=void 0===n?"info":n,d=e.children,p=e.spokenMessage,f=void 0===p?d:p,m=e.onRemove,b=void 0===m?o.noop:m,h=e.isDismissible,g=void 0===h||h,v=e.actions,O=void 0===v?[]:v,y=e.politeness,E=void 0===y?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(c):y,j=e.__unstableHTML;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(s.speak)(n,t)}),[n,t])}(f,E);var _=a()(t,"components-notice","is-"+c,{"is-dismissible":g});return j&&(d=Object(r.createElement)(r.RawHTML,null,d)),Object(r.createElement)("div",{className:_},Object(r.createElement)("div",{className:"components-notice__content"},d,O.map((function(e,t){var n=e.className,o=e.label,c=e.isPrimary,i=e.noDefaultClasses,s=void 0!==i&&i,u=e.onClick,d=e.url;return Object(r.createElement)(l.a,{key:t,href:d,isPrimary:c,isSecondary:!s&&!d,isLink:!s&&!!d,onClick:d?void 0:u,className:a()("components-notice__action",n)},o)}))),g&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:u.a,label:Object(i.__)("Dismiss this notice"),onClick:b,showTooltip:!1}))}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,void 0):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};for(var n in t)e.setRequestHeader(n,t[n]);return e}function p(e){return void 0===e}function f(){var e={HALF_ODD:function(e){var t=Math.round(e);return l(e)&&s(t)?t-1:t},HALF_EVEN:function(e){var t=Math.round(e);return l(e)?s(t)?t:t-1:t},HALF_UP:function(e){return Math.round(e)},HALF_DOWN:function(e){return l(e)?Math.floor(e):Math.round(e)},HALF_TOWARDS_ZERO:function(e){return l(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e)},HALF_AWAY_FROM_ZERO:function(e){return l(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e)},DOWN:function(e){return Math.floor(e)}};return{add:function(e,t){return e+t},subtract:function(e,t){return e-t},multiply:function(e,t){return u(e)||u(t)?function(e,t){var n=function(e){return Math.pow(10,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e.toString();if(t.indexOf("e-")>0)return parseInt(t.split("e-")[1]);var n=t.split(".")[1];return n?n.length:0}(e))},r=Math.max(n(e),n(t));return Math.round(e*r)*Math.round(t*r)/(r*r)}(e,t):e*t},divide:function(e,t){return e/t},modulo:function(e,t){return e%t},round:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HALF_EVEN";return e[n](t)}}}var m=f();function b(e){var t=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(e);return{getMatches:function(){return null!==t?t.slice(1).filter((function(e){return!p(e)})):[]},getMinimumFractionDigits:function(){var e=function(e){return"."===e};return p(this.getMatches().find(e))?0:this.getMatches()[m.add(this.getMatches().findIndex(e),1)].split("").length},getCurrencyDisplay:function(){return{USD:"code",dollar:"name",$:"symbol"}[this.getMatches().find((function(e){return"USD"===e||"dollar"===e||"$"===e}))]},getStyle:function(){return p(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!p(this.getMatches().find((function(e){return","===e})))}}}function h(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;for(var n in t)e=e.replace("{{".concat(n,"}}"),t[n]);return e};return{getExchangeRate:function(n,o){return(c=e.endpoint,!Boolean(c)||"object"!==r(c)&&"function"!=typeof c||"function"!=typeof c.then?function(n,r){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var o=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){4===o.readyState&&(o.status>=200&&o.status<400?n(JSON.parse(o.responseText)):r(new Error(o.statusText)))},onerror:function(){r(new Error("Network error"))}});o.open("GET",e,!0),d(o,t.headers),o.send()}))}(t(e.endpoint,{from:n,to:r}),{headers:e.headers})}(n,o):e.endpoint).then((function(c){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",o={};return Object.entries(t).forEach((function(t){if("object"===r(t[1])){var c=e(t[1]);Object.entries(c).forEach((function(e){o[t[0]+n+e[0]]=e[1]}))}else o[t[0]]=t[1]})),o}(c)[t(e.propertyPath,{from:n,to:o})]}));var c}}}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Error;if(!e)throw new n(t)}function v(e){g(function(e){return i(e)&&e<=100&&e>=0}(e),"You must provide a numeric value between 0 and 100.",RangeError)}function O(e){g(Number.isInteger(e),"You must provide an integer.",TypeError)}var y=f(),E=Object.assign((function e(t){var n=Object.assign({},{amount:e.defaultAmount,currency:e.defaultCurrency,precision:e.defaultPrecision},t),r=n.amount,o=n.currency,c=n.precision;O(r),O(c);var a=e.globalLocale,i=e.globalFormat,s=e.globalRoundingMode,u=e.globalFormatRoundingMode,l=Object.assign({},e.globalExchangeRatesApi),d=function(t){var n=Object.assign({},Object.assign({},{amount:r,currency:o,precision:c},t),Object.assign({},{locale:this.locale},t));return Object.assign(e({amount:n.amount,currency:n.currency,precision:n.precision}),{locale:n.locale})},f=function(e){g(this.hasSameCurrency(e),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return r},getCurrency:function(){return o},getLocale:function(){return this.locale||a},setLocale:function(e){return d.call(this,{locale:e})},getPrecision:function(){return c},convertPrecision:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;O(e);var n=this.getPrecision(),r=e>n,o=r?y.multiply:y.divide,c=r?[e,n]:[n,e],a=Math.pow(10,y.subtract.apply(y,c));return d.call(this,{amount:y.round(o(this.getAmount(),a),t),precision:e})},add:function(t){f.call(this,t);var n=e.normalizePrecision([this,t]);return d.call(this,{amount:y.add(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},subtract:function(t){f.call(this,t);var n=e.normalizePrecision([this,t]);return d.call(this,{amount:y.subtract(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},multiply:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return d.call(this,{amount:y.round(y.multiply(this.getAmount(),e),t)})},divide:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return d.call(this,{amount:y.round(y.divide(this.getAmount(),e),t)})},percentage:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return v(e),this.multiply(y.divide(e,100),t)},allocate:function(e){var t=this;!function(e){g(function(e){return e.length>0&&e.every((function(e){return e>=0}))&&e.some((function(e){return e>0}))}(e),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}(e);for(var n=e.reduce((function(e,t){return y.add(e,t)})),r=this.getAmount(),o=e.map((function(e){var o=Math.floor(y.divide(y.multiply(t.getAmount(),e),n));return r=y.subtract(r,o),d.call(t,{amount:o})})),c=0;r>0;)e[c]>0&&(o[c]=o[c].add(d.call(this,{amount:1})),r=y.subtract(r,1)),c+=1;return o},convert:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.endpoint,o=void 0===r?l.endpoint:r,c=n.propertyPath,a=void 0===c?l.propertyPath||"rates.{{to}}":c,i=n.headers,u=void 0===i?l.headers:i,f=n.roundingMode,m=void 0===f?s:f,b=Object.assign({},{endpoint:o,propertyPath:a,headers:u,roundingMode:m});return h(b).getExchangeRate(this.getCurrency(),e).then((function(n){return g(!p(n),'No rate was found for the destination currency "'.concat(e,'".'),TypeError),d.call(t,{amount:y.round(y.multiply(t.getAmount(),parseFloat(n)),b.roundingMode),currency:e})}))},equalsTo:function(e){return this.hasSameAmount(e)&&this.hasSameCurrency(e)},lessThan:function(t){f.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()n[1].getAmount()},greaterThanOrEqual:function(t){f.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()>=n[1].getAmount()},isZero:function(){return 0===this.getAmount()},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return 0!==y.modulo(this.getAmount(),Math.pow(10,c))},hasCents:function(){return 0!==y.modulo(this.getAmount(),Math.pow(10,c))},hasSameCurrency:function(e){return this.getCurrency()===e.getCurrency()},hasSameAmount:function(t){var n=e.normalizePrecision([this,t]);return n[0].getAmount()===n[1].getAmount()},toFormat:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,n=b(e);return this.toRoundedUnit(n.getMinimumFractionDigits(),t).toLocaleString(this.getLocale(),{currencyDisplay:n.getCurrencyDisplay(),useGrouping:n.getUseGrouping(),minimumFractionDigits:n.getMinimumFractionDigits(),style:n.getStyle(),currency:this.getCurrency()})},toUnit:function(){return y.divide(this.getAmount(),Math.pow(10,c))},toRoundedUnit:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,n=Math.pow(10,e);return y.divide(y.round(y.multiply(this.toUnit(),n),t),n)},toObject:function(){return{amount:r,currency:o,precision:c}},toJSON:function(){return this.toObject()}}}),{defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},{globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}},a);t.a=E},,function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(18),o=n.n(r),c=n(0),a=n(62),i=n(5),s=n.n(i),u=n(106);n(188),t.a=e=>{let{className:t,showSpinner:n=!1,children:r,...i}=e;const l=s()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(c.createElement)(a.a,o()({className:l},i),n&&Object(c.createElement)(u.a,null),Object(c.createElement)("span",{className:"wc-block-components-button__text"},r))}},,function(e,t,n){"use strict";var r=n(0),o=n(1),c=n(66),a=n(5),i=n.n(a),s=n(48);n(192);const u=e=>{let{currency:t,maxPrice:n,minPrice:a,priceClassName:u,priceStyle:l}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(o.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(s.formatPrice)(a),Object(s.formatPrice)(n))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(c.a,{className:i()("wc-block-components-product-price__value",u),currency:t,value:a,style:l})," — ",Object(r.createElement)(c.a,{className:i()("wc-block-components-product-price__value",u),currency:t,value:n,style:l})))},l=e=>{let{currency:t,regularPriceClassName:n,regularPriceStyle:a,regularPrice:s,priceClassName:u,priceStyle:l,price:d}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(c.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:i()("wc-block-components-product-price__regular",n),style:a},e),value:s}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(c.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:i()("wc-block-components-product-price__value","is-discounted",u),style:l},e),value:d}))};t.a=e=>{let{align:t,className:n,currency:o,format:a="",maxPrice:s,minPrice:d,price:p,priceClassName:f,priceStyle:m,regularPrice:b,regularPriceClassName:h,regularPriceStyle:g}=e;const v=i()(n,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});a.includes("")||(a="",console.error("Price formats need to include the `` tag."));const O=b&&p!==b;let y=Object(r.createElement)("span",{className:i()("wc-block-components-product-price__value",f)});return O?y=Object(r.createElement)(l,{currency:o,price:p,priceClassName:f,priceStyle:m,regularPrice:b,regularPriceClassName:h,regularPriceStyle:g}):void 0!==d&&void 0!==s?y=Object(r.createElement)(u,{currency:o,maxPrice:s,minPrice:d,priceClassName:f,priceStyle:m}):p&&(y=Object(r.createElement)(c.a,{className:i()("wc-block-components-product-price__value",f),currency:o,value:p,style:m})),Object(r.createElement)("span",{className:v},Object(r.createInterpolateElement)(a,{price:y}))}},,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return F})),n.d(t,"a",(function(){return L}));var r=n(0);let o,c;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(o||(o={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method"}(c||(c={}));const a={currentStatus:o.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},i={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:o,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:()=>{},activeSavedToken:"",setActiveSavedToken:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1},s=e=>!("object"!=typeof e||!e.isSavedToken);var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,paymentMethodData:n,shouldSavePaymentMethod:r=!1,errorMessage:i="",paymentMethods:u={}}=arguments.length>1?arguments[1]:void 0;switch(t){case o.STARTED:return{...e,currentStatus:o.STARTED,paymentMethodData:n||e.paymentMethodData,hasSavedToken:s(n||e.paymentMethodData)};case o.ERROR:return e.currentStatus!==o.ERROR?{...e,currentStatus:o.ERROR,errorMessage:i||e.errorMessage}:e;case o.FAILED:return e.currentStatus!==o.FAILED?{...e,currentStatus:o.FAILED,paymentMethodData:n||e.paymentMethodData,errorMessage:i||e.errorMessage}:e;case o.SUCCESS:return e.currentStatus!==o.SUCCESS?{...e,currentStatus:o.SUCCESS,paymentMethodData:n||e.paymentMethodData,hasSavedToken:s(n||e.paymentMethodData)}:e;case o.PROCESSING:return e.currentStatus!==o.PROCESSING?{...e,currentStatus:o.PROCESSING,errorMessage:""}:e;case o.COMPLETE:return e.currentStatus!==o.COMPLETE?{...e,currentStatus:o.COMPLETE}:e;case o.PRISTINE:return{...a,currentStatus:o.PRISTINE,paymentMethods:{...e.paymentMethods},expressPaymentMethods:{...e.expressPaymentMethods},shouldSavePaymentMethod:e.shouldSavePaymentMethod};case c.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:u};case c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:u};case c.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r}}},l=n(1),d=n(24),p=n(33),f=n(2),m=n(61),b=n(28),h=n(51),g=n(45),v=n(26),O=n(39),y=n(31);const E=(e,t,n,o)=>{const[c,a]=Object(r.useState)(!1),{isEditor:i}=Object(b.a)(),{selectedRates:s}=Object(h.b)(),{billingData:u,shippingAddress:d}=Object(g.b)(),y=Object(p.a)(s),E=Object(p.a)(n),j=Object(v.a)(),{cartTotals:_,cartNeedsShipping:S,paymentRequirements:w}=j,k=Object(r.useRef)({cart:j,cartTotals:_,cartNeedsShipping:S,billingData:u,shippingAddress:d,selectedShippingMethods:y,paymentRequirements:w}),{addErrorNotice:C}=Object(O.a)();Object(r.useEffect)(()=>{k.current={cart:j,cartTotals:_,cartNeedsShipping:S,billingData:u,shippingAddress:d,selectedShippingMethods:y,paymentRequirements:w}},[j,_,S,u,d,y,w]);const P=Object(r.useCallback)(async()=>{let n={};const r=e=>{n={...n,[e.name]:e}};for(let e=0;e{R()},[R,j,y,u]),c},j=e=>({type:e}),_=e=>({type:o.ERROR,errorMessage:e}),S=e=>{let{errorMessage:t,paymentMethodData:n}=e;return{type:o.FAILED,errorMessage:t,paymentMethodData:n}},w=e=>{let{paymentMethodData:t}=e;return{type:o.SUCCESS,paymentMethodData:t}},k=e=>{let{paymentMethodData:t}=e;return{type:o.STARTED,paymentMethodData:t}},C=e=>({type:c.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),P=e=>({type:c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:c.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e});var T=n(42),N=n(41),A=n(78),x=n(159);var M=n(161),I=n(154);const D=Object(r.createContext)(i),F=()=>Object(r.useContext)(D),L=e=>{let{children:t}=e;const{isProcessing:n,isIdle:c,isCalculating:i,hasError:s}=Object(N.b)(),{isEditor:l,getPreviewData:p}=Object(b.a)(),{setValidationErrors:m}=Object(I.b)(),{addErrorNotice:v,removeNotice:F}=Object(O.a)(),{isSuccessResponse:L,isErrorResponse:B,isFailResponse:U,noticeContexts:V}=Object(y.c)(),[H,G]=Object(r.useReducer)(A.b,{}),{onPaymentProcessing:q}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(x.a)("payment_processing",e)}),[e]))(G),W=Object(r.useRef)(H);Object(r.useEffect)(()=>{W.current=H},[H]);const[Y,z]=Object(r.useReducer)(u,a),{dispatchActions:K,setPaymentStatus:$}=(e=>{const{setBillingData:t}=Object(g.b)(),{setShippingAddress:n}=Object(h.b)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(C(t))},setRegisteredExpressPaymentMethods:t=>{e(P(t))},setShouldSavePayment:t=>{e(R(t))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(j(o.PRISTINE)),started:t=>{e(k({paymentMethodData:t}))},processing:()=>e(j(o.PROCESSING)),completed:()=>e(j(o.COMPLETE)),error:t=>e(_(t)),failed:function(n,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(S({errorMessage:n||"",paymentMethodData:r||{}}))},success:function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof c&&null!=c&&c.address&&n(c.address),e(w({paymentMethodData:r}))}}),[e,t,n])}})(z),X=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:n}=Object(y.c)(),r=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return E(e,t,Array.from(r),n.PAYMENTS)})(K.setRegisteredPaymentMethods),Q=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:n}=Object(y.c)();return E(e,t,Object.keys(t),n.EXPRESS_PAYMENTS)})(K.setRegisteredExpressPaymentMethods),{activePaymentMethod:Z,activeSavedToken:J,setActivePaymentMethod:ee,setActiveSavedToken:te}=(()=>{const{dispatchCheckoutEvent:e}=Object(T.a)(),[t,n]=Object(r.useState)(""),[o,c]=Object(r.useState)("");return Object(r.useEffect)(()=>{e("set-active-payment-method",{activePaymentMethod:t})},[e,t]),{activePaymentMethod:t,activeSavedToken:o,setActivePaymentMethod:n,setActiveSavedToken:c}})(),ne=Object(r.useMemo)(()=>l?p("previewSavedPaymentMethods"):X?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),n=Object.keys(t),r={};return n.forEach(n=>{const o=t[n].filter(t=>{var n;let{method:{gateway:r}}=t;return r in e&&(null===(n=e[r].supports)||void 0===n?void 0:n.showSavedCards)});o.length&&(r[n]=o)}),r}(Y.paymentMethods):{},[l,p,X,Y.paymentMethods]),re=Object(r.useCallback)(e=>{e?v(e,{id:"wc-express-payment-error",context:V.EXPRESS_PAYMENTS}):F("wc-express-payment-error",V.EXPRESS_PAYMENTS)},[v,V.EXPRESS_PAYMENTS,F]),oe=Object.keys(Y.expressPaymentMethods).includes(Z),ce=Object(r.useMemo)(()=>({isPristine:Y.currentStatus===o.PRISTINE,isStarted:Y.currentStatus===o.STARTED,isProcessing:Y.currentStatus===o.PROCESSING,isFinished:[o.ERROR,o.FAILED,o.SUCCESS].includes(Y.currentStatus),hasError:Y.currentStatus===o.ERROR,hasFailed:Y.currentStatus===o.FAILED,isSuccessful:Y.currentStatus===o.SUCCESS,isDoingExpressPayment:Y.currentStatus!==o.PRISTINE&&oe}),[Y.currentStatus,oe]);Object(r.useEffect)(()=>{const e=Object.keys(Y.paymentMethods),t=[...e,...Object.keys(Y.expressPaymentMethods)];X&&e.length&&ee(e=>e&&t.includes(e)?e:($().pristine(),Object.keys(Y.paymentMethods)[0]))},[X,Y.paymentMethods,Y.expressPaymentMethods,ee,$]),Object(r.useEffect)(()=>{!n||s||i||ce.isFinished||$().processing()},[n,s,i,ce.isFinished,$]),Object(r.useEffect)(()=>{c&&!ce.isSuccessful&&$().pristine()},[c,ce.isSuccessful,$]),Object(r.useEffect)(()=>{s&&ce.isSuccessful&&!Y.hasSavedToken&&$().pristine()},[s,ce.isSuccessful,Y.hasSavedToken,$]),Object(r.useEffect)(()=>{ce.isProcessing&&(F("wc-payment-error",V.PAYMENTS),Object(M.b)(W.current,"payment_processing",{}).then(e=>{let t,n;var r,o,c,a,i,s;if(e.forEach(e=>{L(e)&&(t=e),(B(e)||U(e))&&(n=e)}),t&&!n)$().success(null===(r=t)||void 0===r||null===(o=r.meta)||void 0===o?void 0:o.paymentMethodData,null===(c=t)||void 0===c||null===(a=c.meta)||void 0===a?void 0:a.billingData,null===(i=t)||void 0===i||null===(s=i.meta)||void 0===s?void 0:s.shippingData);else if(n&&U(n)){var u,l,d,p,f,b;n.message&&n.message.length&&v(n.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=n)||void 0===b?void 0:b.messageContext)||V.PAYMENTS}),$().failed(null===(u=n)||void 0===u?void 0:u.message,null===(l=n)||void 0===l||null===(d=l.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=n)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingData)}else if(n){var h,g;n.message&&n.message.length&&v(n.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(g=n)||void 0===g?void 0:g.messageContext)||V.PAYMENTS}),$().error(n.message),m(null===(h=n)||void 0===h?void 0:h.validationErrors)}else $().success()}))},[ce.isProcessing,m,$,F,V.PAYMENTS,L,U,B,v]);const ae={setPaymentStatus:$,currentStatus:ce,paymentStatuses:o,paymentMethodData:Y.paymentMethodData,errorMessage:Y.errorMessage,activePaymentMethod:Z,setActivePaymentMethod:ee,activeSavedToken:J,setActiveSavedToken:te,onPaymentProcessing:q,customerPaymentMethods:ne,paymentMethods:Y.paymentMethods,expressPaymentMethods:Y.expressPaymentMethods,paymentMethodsInitialized:X,expressPaymentMethodsInitialized:Q,setExpressPaymentError:re,isExpressPaymentMethodActive:oe,shouldSavePayment:Y.shouldSavePaymentMethod,setShouldSavePayment:K.setShouldSavePayment};return Object(r.createElement)(D.Provider,{value:ae},t)}},,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return u}));var r=n(0),o=n(4),c=n(17),a=n.n(c);const i=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),s=()=>Object(r.useContext)(i),u=e=>{let{children:t}=e;const[n,c]=Object(r.useState)({}),s=Object(r.useCallback)(e=>n[e],[n]),u=Object(r.useCallback)(e=>{const t=n[e];return!t||t.hidden?"":"validate-error-"+e},[n]),l=Object(r.useCallback)(e=>{c(t=>{if(!t[e])return t;const{[e]:n,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{c({})},[]),p=Object(r.useCallback)(e=>{e&&c(t=>(e=Object(o.pickBy)(e,(e,n)=>!("string"!=typeof e.message||t.hasOwnProperty(n)&&a()(t[n],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(r.useCallback)((e,t)=>{c(n=>{if(!n.hasOwnProperty(e))return n;const r={...n[e],...t};return a()(n[e],r)?n:{...n,[e]:r}})},[]),m={getValidationError:s,setValidationErrors:p,clearValidationError:l,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(r.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(r.useCallback)(()=>{c(e=>{const t={};return Object.keys(e).forEach(n=>{e[n].hidden&&(t[n]={...e[n],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(n).length>0,getValidationErrorId:u};return Object(r.createElement)(i.Provider,{value:m},t)}},function(e,t,n){"use strict";var r=n(18),o=n.n(r),c=n(0),a=n(5),i=n.n(a);const s=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var u=e=>{let{id:t,src:n=null,alt:r=""}=e;return n?Object(c.createElement)("img",{className:s(t),src:n,alt:r}):null},l=n(84);const d=[{id:"alipay",alt:"Alipay",src:l.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:l.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:l.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:l.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:l.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:l.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:l.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:l.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:l.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:l.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:l.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:l.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:l.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:l.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:l.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:l.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:l.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:l.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:l.l+"payment-methods/wechat.svg"}];var p=n(52);n(190),t.a=e=>{let{icons:t=[],align:n="center",className:r}=e;const a=(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.d)(n.id)&&!t[n.id]&&(t[n.id]=n)}),Object.values(t)})(t);if(0===a.length)return null;const s=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},r);return Object(c.createElement)("div",{className:s},a.map(e=>{const t={...e,...(n=e.id,d.find(e=>e.id===n)||{})};var n;return Object(c.createElement)(u,o()({key:"payment-method-icon-"+e.id},t))}))}},function(e,t,n){"use strict";var r=n(18),o=n.n(r),c=n(0),a=n(25),i=n(5),s=n.n(i);n(191),t.a=e=>{let{className:t="",disabled:n=!1,name:r,permalink:i="",rel:u,style:l,onClick:d,...p}=e;const f=s()("wc-block-components-product-name",t);if(n){const e=p;return Object(c.createElement)("span",o()({className:f},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)}}))}return Object(c.createElement)("a",o()({className:f,href:i,rel:u},p,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)},style:l}))}},function(e,t,n){"use strict";var r=n(0),o=n(102),c=n(86);const a=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},i=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),s=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=i(e),o=r.split(" ").splice(0,t).join(" ");return Object(c.autop)(s(o,n))},l=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const o=i(e),a=o.slice(0,t);if(n)return Object(c.autop)(s(a,r));const u=a.match(/([\s]+)/g),l=u?u.length:0,d=o.slice(0,t+l);return Object(c.autop)(s(d,r))};t.a=e=>{let{source:t,maxLength:n=15,countType:i="words",className:s=""}=e;const d=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(c.autop)(e),i=Object(o.count)(r,n);if(i<=t)return r;const s=a(r),d=Object(o.count)(s,n);return d<=t?s:"words"===n?u(s,t):l(s,t,"characters_including_spaces"===n)}(t,n,i),[t,n,i]);return Object(r.createElement)(r.RawHTML,{className:s},d)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(78);const o=(e,t)=>function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const c=r.a.addEventCallback(e,n,o);return t(c),()=>{t(r.a.removeEventCallback(e,c.id))}}},function(e,t,n){"use strict";var r=n(0),o=n(5),c=n.n(o),a=n(1),i=n(27),s=n(46);n(200);var u=e=>{let{className:t,quantity:n=1,minimum:o=1,maximum:u,onChange:l=(()=>{}),itemName:d="",disabled:p}=e;const f=c()("wc-block-components-quantity-selector",t),m=void 0!==u,b=n>o,h=!m||n{const t=void 0!==typeof e.key?"ArrowDown"===e.key:e.keyCode===s.DOWN,r=void 0!==typeof e.key?"ArrowUp"===e.key:e.keyCode===s.UP;t&&b&&(e.preventDefault(),l(n-1)),r&&h&&(e.preventDefault(),l(n+1))},[n,l,h,b]);return Object(r.createElement)("div",{className:f},Object(r.createElement)("input",{className:"wc-block-components-quantity-selector__input",disabled:p,type:"number",step:"1",min:"0",value:n,onKeyDown:g,onChange:e=>{let t=Number.isNaN(e.target.value)||!e.target.value?0:parseInt(e.target.value,10);m&&(t=Math.min(t,u)),t=Math.max(t,o),t!==n&&l(t)},"aria-label":Object(a.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(a.__)("Quantity of %s in your cart.","woo-gutenberg-products-block"),d)}),Object(r.createElement)("button",{"aria-label":Object(a.__)("Reduce quantity","woo-gutenberg-products-block"),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:p||!b,onClick:()=>{const e=n-1;l(e),Object(i.speak)(Object(a.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(a.__)("Quantity reduced to %s.","woo-gutenberg-products-block"),e))}},"-"),Object(r.createElement)("button",{"aria-label":Object(a.__)("Increase quantity","woo-gutenberg-products-block"),disabled:p||!h,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:()=>{const e=n+1;l(e),Object(i.speak)(Object(a.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(a.__)("Quantity increased to %s.","woo-gutenberg-products-block"),e))}},"+"))},l=n(139),d=n(156),p=n(9),f=n(6),m=n(98),b=n(75),h=n(87),g=n(52),v=n(26),O=n(41);var y=n(42),E=n(249),j=n(250),_=n(251),S=n(66),w=n(104),k=e=>{let{currency:t,saleAmount:n,format:o=""}=e;if(!n||n<=0)return null;o.includes("")||(o="",console.error("Price formats need to include the `` tag."));const c=Object(a.sprintf)( +/* translators: %s will be replaced by the discount amount */ +Object(a.__)("Save %s","woo-gutenberg-products-block"),o);return Object(r.createElement)(w.a,{className:"wc-block-components-sale-badge"},Object(r.createInterpolateElement)(c,{price:Object(r.createElement)(S.a,{currency:t,value:n})}))},C=n(252),P=n(48),R=n(22),T=n(133),N=n(2);const A=(e,t)=>e.convertPrecision(t.minorUnit).getAmount(),x=e=>Object(R.mustContain)(e,"");var M=Object(r.forwardRef)((e,t)=>{let{lineItem:n,onRemove:o=(()=>{}),tabIndex:s=null}=e;const{name:S="",catalog_visibility:w="visible",short_description:M="",description:I="",low_stock_remaining:D=null,show_backorder_badge:F=!1,quantity_limit:L=99,permalink:B="",images:U=[],variation:V=[],item_data:H=[],prices:G={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}},totals:q={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_subtotal:"0",line_subtotal_tax:"0"},extensions:W}=n,{quantity:Y,setItemQuantity:z,removeItem:K,isPendingDelete:$}=(e=>{const t={key:"",quantity:1};(e=>Object(g.c)(e)&&Object(g.e)(e,"key")&&Object(g.e)(e,"quantity")&&Object(g.d)(e.key)&&Object(g.b)(e.quantity))(e)&&(t.key=e.key,t.quantity=e.quantity);const{key:n="",quantity:o=1}=t,{cartErrors:c}=Object(v.a)(),{dispatchActions:a}=Object(O.b)(),[i,s]=Object(r.useState)(o),[u]=Object(m.a)(i,400),l=Object(b.a)(u),{removeItemFromCart:d,changeCartItemQuantity:y}=Object(p.useDispatch)(f.CART_STORE_KEY),E=Object(p.useSelect)(e=>{if(!n)return{quantity:!1,delete:!1};const t=e(f.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(n),delete:t.isItemPendingDelete(n)}},[n]),j=Object(r.useCallback)(()=>n?d(n).then(()=>(Object(h.c)(),!0)):Promise.resolve(!1),[n,d]);return Object(r.useEffect)(()=>{n&&Object(g.b)(l)&&Number.isFinite(l)&&l!==u&&y(n,u)},[n,y,u,l]),Object(r.useEffect)(()=>(E.delete?a.incrementCalculating():a.decrementCalculating(),()=>{E.delete&&a.decrementCalculating()}),[a,E.delete]),Object(r.useEffect)(()=>(E.quantity||u!==i?a.incrementCalculating():a.decrementCalculating(),()=>{(E.quantity||u!==i)&&a.decrementCalculating()}),[a,E.quantity,u,i]),{isPendingDelete:E.delete,quantity:i,setItemQuantity:s,removeItem:j,cartItemQuantityErrors:c}})(n),{dispatchStoreEvent:X}=Object(y.a)(),{receiveCart:Q,...Z}=Object(v.a)(),J=Object(r.useMemo)(()=>({context:"cart",cartItem:n,cart:Z}),[n,Z]),ee=Object(P.getCurrencyFromPriceResponse)(G),te=Object(R.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:S,extensions:W,arg:J}),ne=Object(T.a)({amount:parseInt(G.raw_prices.regular_price,10),precision:G.raw_prices.precision}),re=Object(T.a)({amount:parseInt(G.raw_prices.price,10),precision:G.raw_prices.precision}),oe=ne.subtract(re),ce=oe.multiply(Y),ae=Object(P.getCurrencyFromPriceResponse)(q);let ie=parseInt(q.line_subtotal,10);Object(N.getSetting)("displayCartPricesIncludingTax",!1)&&(ie+=parseInt(q.line_subtotal_tax,10));const se=Object(T.a)({amount:ie,precision:ae.minorUnit}),ue=U.length?U[0]:{},le="hidden"===w||"search"===w,de=Object(R.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:W,arg:J}),pe=Object(R.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:W,arg:J,validation:x}),fe=Object(R.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:W,arg:J,validation:x}),me=Object(R.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"",extensions:W,arg:J,validation:x});return Object(r.createElement)("tr",{className:c()("wc-block-cart-items__row",de,{"is-disabled":$}),ref:t,tabIndex:s},Object(r.createElement)("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(g.e)(ue,"alt")||!ue.alt},le?Object(r.createElement)(E.a,{image:ue,fallbackAlt:te}):Object(r.createElement)("a",{href:B,tabIndex:-1},Object(r.createElement)(E.a,{image:ue,fallbackAlt:te}))),Object(r.createElement)("td",{className:"wc-block-cart-item__product"},Object(r.createElement)(d.a,{disabled:$||le,name:te,permalink:B}),F?Object(r.createElement)(j.a,null):!!D&&Object(r.createElement)(_.a,{lowStockRemaining:D}),Object(r.createElement)("div",{className:"wc-block-cart-item__prices"},Object(r.createElement)(l.a,{currency:ee,regularPrice:A(ne,ee),price:A(re,ee),format:fe})),Object(r.createElement)(k,{currency:ee,saleAmount:A(oe,ee),format:me}),Object(r.createElement)(C.a,{shortDescription:M,fullDescription:I,itemData:H,variation:V}),Object(r.createElement)("div",{className:"wc-block-cart-item__quantity"},Object(r.createElement)(u,{disabled:$,quantity:Y,maximum:L,onChange:e=>{z(e),X("cart-set-item-quantity",{product:n,quantity:e})},itemName:te}),Object(r.createElement)("button",{className:"wc-block-cart-item__remove-link",onClick:()=>{o(),K(),X("cart-remove-item",{product:n,quantity:Y}),Object(i.speak)(Object(a.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(a.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),te))},disabled:$},Object(a.__)("Remove item","woo-gutenberg-products-block")))),Object(r.createElement)("td",{className:"wc-block-cart-item__total"},Object(r.createElement)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},Object(r.createElement)(l.a,{currency:ae,format:pe,price:se.getAmount()}),Y>1&&Object(r.createElement)(k,{currency:ee,saleAmount:A(ce,ee),format:me}))))});const I=[...Array(3)].map((_x,e)=>Object(r.createElement)(M,{lineItem:{},key:e})),D=e=>{const t={};return e.forEach(e=>{let{key:n}=e;t[n]=Object(r.createRef)()}),t};t.a=e=>{let{lineItems:t=[],isLoading:n=!1,className:o}=e;const i=Object(r.useRef)(null),s=Object(r.useRef)(D(t));Object(r.useEffect)(()=>{s.current=D(t)},[t]);const u=e=>()=>{null!=s&&s.current&&e&&s.current[e].current instanceof HTMLElement?s.current[e].current.focus():i.current instanceof HTMLElement&&i.current.focus()},l=n?I:t.map((e,n)=>{const o=t.length>n+1?t[n+1].key:null;return Object(r.createElement)(M,{key:e.key,lineItem:e,onRemove:u(o),ref:s.current[e.key],tabIndex:-1})});return Object(r.createElement)("table",{className:c()("wc-block-cart-items",o),ref:i,tabIndex:-1},Object(r.createElement)("thead",null,Object(r.createElement)("tr",{className:"wc-block-cart-items__header"},Object(r.createElement)("th",{className:"wc-block-cart-items__header-image"},Object(r.createElement)("span",null,Object(a.__)("Product","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(r.createElement)("span",null,Object(a.__)("Details","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(r.createElement)("span",null,Object(a.__)("Total","woo-gutenberg-products-block"))))),Object(r.createElement)("tbody",null,l))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=n(31);const c=async(e,t,n)=>{const o=r(e,t),c=[];for(const e of o)try{const t=await Promise.resolve(e.callback(n));"object"==typeof t&&c.push(t)}catch(e){console.error(e)}return!c.length||c},a=async(e,t,n)=>{const c=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(n));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return c.push(t),c;c.push(t)}catch(e){return console.error(e),c.push({type:"error"}),c}return c}},,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,function(e,t){},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t){},,,,,,function(e,t,n){"use strict";n.r(t);var r=n(74),o=n(0),c=n(5),a=n.n(c),i=n(1),s=n(87),u=n(26),l=n(105),d=n(98);n(231);var p=e=>{let{children:t,className:n,isOpen:r,onClose:c,slideIn:s=!0,slideOut:u=!0,title:p}=e;const[f]=Object(d.a)(r,300);return r||!r&&f?Object(o.createElement)(l.Modal,{title:p,focusOnMount:!0,onRequestClose:c,className:a()(n,"wc-block-components-drawer"),overlayClassName:a()("wc-block-components-drawer__screen-overlay",{"wc-block-components-drawer__screen-overlay--is-hidden":!r,"wc-block-components-drawer__screen-overlay--with-slide-in":s,"wc-block-components-drawer__screen-overlay--with-slide-out":u}),closeButtonLabel:Object(i.__)("Close mini cart","woo-gutenberg-products-block")},t):null},f=n(48),m=n(2),b=n(52),h=n(108),g=n(32),v=Object(o.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"none"},Object(o.createElement)("g",{clipPath:"url(#clip0)"},Object(o.createElement)("path",{d:"M7.50008 18.3332C7.96032 18.3332 8.33341 17.9601 8.33341 17.4998C8.33341 17.0396 7.96032 16.6665 7.50008 16.6665C7.03984 16.6665 6.66675 17.0396 6.66675 17.4998C6.66675 17.9601 7.03984 18.3332 7.50008 18.3332Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(o.createElement)("path",{d:"M16.6666 18.3332C17.1268 18.3332 17.4999 17.9601 17.4999 17.4998C17.4999 17.0396 17.1268 16.6665 16.6666 16.6665C16.2063 16.6665 15.8333 17.0396 15.8333 17.4998C15.8333 17.9601 16.2063 18.3332 16.6666 18.3332Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(o.createElement)("path",{d:"M0.833252 0.833496H4.16658L6.39992 11.9918C6.47612 12.3755 6.68484 12.7201 6.98954 12.9654C7.29424 13.2107 7.6755 13.341 8.06658 13.3335H16.1666C16.5577 13.341 16.9389 13.2107 17.2436 12.9654C17.5483 12.7201 17.757 12.3755 17.8333 11.9918L19.1666 5.00016H4.99992",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clip0"},Object(o.createElement)("rect",{width:"20",height:"20",fill:"white"}))));n(230);var O=e=>{let{count:t,colorClassNames:n,style:r}=e;return Object(o.createElement)("span",{className:"wc-block-mini-cart__quantity-badge"},Object(o.createElement)(h.a,{className:"wc-block-mini-cart__icon",size:20,srcElement:v}),Object(o.createElement)("span",{className:"wc-block-mini-cart__badge "+n,style:r},t))},y=n(246),E=n(22),j=n(84),_=n(137),S=n(147);const w=e=>Object.values(e).reduce((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e),[]);var k=n(155),C=n(160);const P=()=>{const{paymentMethods:e}=Object(y.b)();return Object(o.createElement)(k.a,{icons:w(e)})};var R=()=>{const{cartItems:e,cartIsLoading:t,cartTotals:n}=Object(u.a)(),r=Object(o.useRef)(null),c=Object(m.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(n.total_items,10)+parseInt(n.total_items_tax,10):parseInt(n.total_items,10);return Object(o.useEffect)(()=>{t||0!==e.length||r.current instanceof HTMLElement&&r.current.focus()},[t,e.length,r]),t||0!==e.length?Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:"wc-block-mini-cart__items"},Object(o.createElement)(C.a,{lineItems:e,isLoading:t})),Object(o.createElement)("div",{className:"wc-block-mini-cart__footer"},Object(o.createElement)(E.TotalsItem,{className:"wc-block-mini-cart__footer-subtotal",currency:Object(f.getCurrencyFromPriceResponse)(n),label:Object(i.__)("Subtotal","woo-gutenberg-products-block"),value:c,description:Object(i.__)("Shipping, taxes, and discounts calculated at checkout.","woo-gutenberg-products-block")}),Object(o.createElement)("div",{className:"wc-block-mini-cart__footer-actions"},Object(o.createElement)(_.a,{className:"wc-block-mini-cart__footer-cart",href:j.c},Object(i.__)("View my cart","woo-gutenberg-products-block")),Object(o.createElement)(_.a,{className:"wc-block-mini-cart__footer-checkout",href:j.d},Object(i.__)("Go to checkout","woo-gutenberg-products-block"))),Object(o.createElement)(S.a,null,Object(o.createElement)(P,null)))):Object(o.createElement)("div",{className:"wc-block-mini-cart__empty-cart",tabIndex:-1,ref:r},Object(i.__)("Cart is empty","woo-gutenberg-products-block"))};n(166);var T=e=>{var t,n;let{isInitiallyOpen:c=!1,colorClassNames:l,style:d,contents:h=""}=e;const{cartItemsCount:g,cartIsLoading:v,cartTotals:y}=Object(u.a)(),[E,j]=Object(o.useState)(c),[_,S]=Object(o.useState)(c),[w,k]=Object(o.useState)(null),C=Object(o.useCallback)(e=>{k(e)},[]);Object(o.useEffect)(()=>{if(w instanceof Element){const e=w.querySelector(".wc-block-mini-cart-contents");if(!e)return;E&&Object(r.a)({Block:R,container:e})}return()=>{if(w instanceof Element&&E){const e=w.querySelector(".wc-block-mini-cart-contents");e&&Object(o.unmountComponentAtNode)(e)}}},[E,w]),Object(o.useEffect)(()=>{const e=()=>{S(!1),j(!0)},t=Object(s.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",e),()=>{t(),document.body.removeEventListener("wc-blocks_added_to_cart",e)}},[]);const P=Object(m.getSettingWithCoercion)("displayCartPricesIncludingTax",!1,b.a),T=Object(m.getSettingWithCoercion)("taxLabel","",b.d),N=P?parseInt(y.total_items,10)+parseInt(y.total_items_tax,10):parseInt(y.total_items,10),A=Object(i.sprintf)( +/* translators: %1$d is the number of products in the cart. %2$s is the cart total */ +Object(i._n)("%1$d item in cart, total price of %2$s","%1$d items in cart, total price of %2$s",g,"woo-gutenberg-products-block"),g,Object(f.formatPrice)(N,Object(f.getCurrencyFromPriceResponse)(y))),x={backgroundColor:null==d||null===(t=d.color)||void 0===t?void 0:t.background,color:null==d||null===(n=d.color)||void 0===n?void 0:n.text};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("button",{className:"wc-block-mini-cart__button "+l,style:x,onClick:()=>{E||(j(!0),S(!1))},"aria-label":A},Object(o.createElement)("span",{className:"wc-block-mini-cart__amount"},Object(f.formatPrice)(N,Object(f.getCurrencyFromPriceResponse)(y))),""!==T&&0!==N&&Object(o.createElement)("small",{className:"wc-block-mini-cart__tax-label"},T),Object(o.createElement)(O,{count:g,colorClassNames:l,style:x})),Object(o.createElement)(p,{className:a()("wc-block-mini-cart__drawer","is-mobile",{"is-loading":v}),title:v?Object(i.__)("Your cart","woo-gutenberg-products-block"):Object(i.sprintf)( +/* translators: %d is the count of items in the cart. */ +Object(i._n)("Your cart (%d item)","Your cart (%d items)",g,"woo-gutenberg-products-block"),g),isOpen:E,onClose:()=>{j(!1)},slideIn:!_},Object(o.createElement)("div",{ref:C},Object(o.createElement)(o.RawHTML,null,h))))};(()=>{let e=null;if(document.activeElement&&document.activeElement.classList.contains("wc-block-mini-cart__button")&&document.activeElement.parentNode instanceof HTMLElement&&(e=document.activeElement.parentNode),Object(r.b)({selector:".wc-block-mini-cart",Block:T,getProps:e=>{var t;let n="";const r=e.querySelector(".wc-block-mini-cart__button");return null!==r&&(n=r.classList.toString().replace("wc-block-mini-cart__button","")),{isDataOutdated:e.dataset.isDataOutdated,isInitiallyOpen:"true"===e.dataset.isInitiallyOpen,colorClassNames:n,style:e.dataset.style?JSON.parse(e.dataset.style):{},contents:null===(t=e.querySelector(".wc-block-mini-cart__template-part"))||void 0===t?void 0:t.innerHTML}}}),e instanceof HTMLElement&&!e.dataset.isInitiallyOpen){const t=e.querySelector(".wc-block-mini-cart__button");t instanceof HTMLElement&&t.focus()}})()},,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return i}));var r=n(33),o=n(147);const c=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:c,expressPaymentMethodsInitialized:a}=Object(o.b)(),i=Object(r.a)(t),s=Object(r.a)(n);return{paymentMethods:e?s:i,isInitialized:e?a:c}},a=()=>c(!1),i=()=>c(!0)},,,function(e,t,n){"use strict";var r=n(18),o=n.n(r),c=n(0),a=n(25),i=n(2);n(193),t.a=e=>{let{image:t={},fallbackAlt:n=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(a.decodeEntities)(t.alt)||n||"Product Image"}:{src:i.PLACEHOLDER_IMG_SRC,alt:""};return Object(c.createElement)("img",o()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},function(e,t,n){"use strict";var r=n(0),o=n(1),c=n(104);t.a=()=>Object(r.createElement)(c.a,{className:"wc-block-components-product-backorder-badge"},Object(o.__)("Available on backorder","woo-gutenberg-products-block"))},function(e,t,n){"use strict";var r=n(0),o=n(1),c=n(104);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(c.a,{className:"wc-block-components-product-low-stock-badge"},Object(o.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(o.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,n){"use strict";var r=n(0),o=n(4),c=n(25);n(196);var a=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",n=t?"wc-block-components-product-details__"+Object(o.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:n},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(c.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(c.decodeEntities)(e.display||e.value)))}))):null},i=n(157),s=n(84),u=e=>{let{className:t,shortDescription:n="",fullDescription:o=""}=e;const c=n||o;return c?Object(r.createElement)(i.a,{className:t,source:c,maxLength:15,countType:s.n.wordCountType||"words"}):null};n(195),t.a=e=>{let{shortDescription:t="",fullDescription:n="",itemData:o=[],variation:c=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(u,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:n}),Object(r.createElement)(a,{details:o}),Object(r.createElement)(a,{details:c.map(e=>{let{attribute:t="",value:n}=e;return{key:t,value:n}})}))}}]); \ No newline at end of file diff --git a/build/mini-cart-contents.asset.php b/build/mini-cart-contents.asset.php new file mode 100644 index 00000000000..0d5705a4ca4 --- /dev/null +++ b/build/mini-cart-contents.asset.php @@ -0,0 +1 @@ + array('wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '29cb0857aed131ed1d4e49104a6250fc'); \ No newline at end of file diff --git a/build/mini-cart-contents.js b/build/mini-cart-contents.js new file mode 100644 index 00000000000..979052d3a25 --- /dev/null +++ b/build/mini-cart-contents.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["mini-cart-contents"]=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=841)}({0:function(t,e){t.exports=window.wp.element},1:function(t,e){t.exports=window.wp.i18n},110:function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"d",(function(){return c})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return l}));var r=n(14),o=n(32);const i=(t,e)=>{if(o.n>2)return Object(r.registerBlockType)(t,e)},c=(t,e)=>{if(o.n>1)return Object(r.registerBlockType)(t,e)},u=()=>o.n>2,l=()=>o.n>1},14:function(t,e){t.exports=window.wp.blocks},18:function(t,e){t.exports=window.wp.primitives},3:function(t,e){t.exports=window.wc.wcSettings},32:function(t,e,n){"use strict";n.d(e,"o",(function(){return i})),n.d(e,"m",(function(){return c})),n.d(e,"l",(function(){return u})),n.d(e,"n",(function(){return l})),n.d(e,"j",(function(){return s})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return d})),n.d(e,"g",(function(){return p})),n.d(e,"k",(function(){return f})),n.d(e,"c",(function(){return b})),n.d(e,"d",(function(){return m})),n.d(e,"h",(function(){return w})),n.d(e,"a",(function(){return g})),n.d(e,"i",(function(){return O})),n.d(e,"b",(function(){return S}));var r,o=n(3);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),c=i.pluginUrl+"images/",u=i.pluginUrl+"build/",l=i.buildPhase,s=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,a=o.STORE_PAGES.checkout.id,d=o.STORE_PAGES.checkout.permalink,p=o.STORE_PAGES.privacy.permalink,f=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),b=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),m=o.STORE_PAGES.cart.permalink,w=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),g=Object(o.getSetting)("allowedCountries",{}),O=Object(o.getSetting)("shippingStates",{}),S=Object(o.getSetting)("allowedStates",{})},329:function(t,e,n){"use strict";var r=n(0),o=n(18);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));e.a=i},55:function(t,e,n){"use strict";var r=n(0);e.a=function(t){let{srcElement:e,size:n=24,...o}=t;return Object(r.isValidElement)(e)?Object(r.cloneElement)(e,{width:n,height:n,...o}):null}},841:function(t,e,n){t.exports=n(873)},873:function(t,e,n){"use strict";n.r(e);var r=n(0),o=n(1),i=n(55),c=n(329),u=n(110),l=n(9);const s={apiVersion:2,title:Object(o.__)("Mini Cart Contents","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(i.a,{srcElement:c.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a mini cart widget.","woo-gutenberg-products-block"),supports:{align:!1,html:!1,multiple:!1,reusable:!1,inserter:!1},attributes:{lock:{type:"object",default:{remove:!0,move:!0}}},example:{attributes:{isPreview:!0}},attributes:{isPreview:{type:"boolean",default:!1,save:!1}},edit:()=>{const t=Object(l.useBlockProps)();return Object(r.createElement)("div",t,Object(r.createElement)("p",null,"Editing the mini cart contents"))},save:()=>null};Object(u.c)("woocommerce/mini-cart-contents",s)},9:function(t,e){t.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/mini-cart-frontend.asset.php b/build/mini-cart-frontend.asset.php new file mode 100644 index 00000000000..5b48cf5df87 --- /dev/null +++ b/build/mini-cart-frontend.asset.php @@ -0,0 +1 @@ + array('wc-settings', 'wp-polyfill'), 'version' => '22f5f5984a524710ee72d9983c23dfb1'); \ No newline at end of file diff --git a/build/mini-cart-frontend.js b/build/mini-cart-frontend.js new file mode 100644 index 00000000000..2e0dbb1f71f --- /dev/null +++ b/build/mini-cart-frontend.js @@ -0,0 +1 @@ +!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=228)}({2:function(e,t){e.exports=window.wc.wcSettings},228:function(e,t,n){e.exports=n(243)},243:function(e,t,n){"use strict";n.r(t);var o=n(2),r=e=>{let{handle:t,src:n,version:o}=e;if(0===document.querySelectorAll(`#${t}-js, #${t}-js-prefetch`).length){const e=document.createElement("link");e.href=o?`${n}?ver=${o}`:n,e.rel="preload",e.as="script",e.id=t+"-js-prefetch",document.head.appendChild(e)}},c=n(52);const d=e=>document.querySelectorAll("script#"+e).length>0,i=e=>{if(!Object(c.d)(e.id)||d(e.id))return;const t=document.createElement("script");for(const n in e){if(!e.hasOwnProperty(n))continue;const o=n;if("onload"===o||"onerror"===o)continue;const r=e[o];Object(c.d)(r)&&(t[o]=r)}"function"==typeof e.onload&&(t.onload=e.onload),"function"==typeof e.onerror&&(t.onerror=e.onerror),document.body.appendChild(t)};var a=e=>{let{handle:t,src:n,version:o,after:r,before:c,translations:a}=e;return new Promise((e,s)=>{d(t+"-js")&&e(),a&&i({id:t+"-js-translations",innerHTML:a}),c&&i({id:t+"-js-before",innerHTML:c}),i({id:t+"-js",onerror:s,onload:()=>{r&&i({id:t+"-js-after",innerHTML:r}),e()},src:o?`${n}?ver=${o}`:n})})},s=n(87);window.addEventListener("load",()=>{const e=document.querySelectorAll(".wc-block-mini-cart");let t=!1;if(0===e.length)return;const n=Object(o.getSetting)("mini_cart_block_frontend_dependencies",{});for(const e in n){const t=n[e];r({handle:e,...t})}const c=Object(s.b)("adding_to_cart","wc-blocks_adding_to_cart"),d=Object(s.b)("added_to_cart","wc-blocks_added_to_cart"),i=Object(s.b)("removed_from_cart","wc-blocks_removed_from_cart"),u=async()=>{if(!t){t=!0,document.body.removeEventListener("wc-blocks_adding_to_cart",u),c();for(const e in n){const t=n[e];await a({handle:e,...t})}}};document.body.addEventListener("wc-blocks_adding_to_cart",u),e.forEach((e,n)=>{if(!(e instanceof HTMLElement))return;const o=e.querySelector(".wc-block-mini-cart__button"),r=e.querySelector(".wc-block-components-drawer__screen-overlay");if(!o||!r)return;const c=()=>{t||u(),document.body.removeEventListener("wc-blocks_added_to_cart",s),document.body.removeEventListener("wc-blocks_removed_from_cart",l),d(),i()},a=()=>{e.dataset.isInitiallyOpen="true",r.classList.add("wc-block-components-drawer__screen-overlay--with-slide-in"),r.classList.remove("wc-block-components-drawer__screen-overlay--is-hidden"),c()},s=()=>{e.dataset.isDataOutdated="true",a()},l=()=>{e.dataset.isDataOutdated="true",e.dataset.isInitiallyOpen="false",c()};o.addEventListener("mouseover",u),o.addEventListener("focus",u),o.addEventListener("click",a),0===n&&(document.body.addEventListener("wc-blocks_added_to_cart",s),document.body.addEventListener("wc-blocks_removed_from_cart",l))})})},52:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return d})),n.d(t,"a",(function(){return i}));const o=e=>"number"==typeof e,r=e=>"string"==typeof e,c=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function d(e,t){return c(e)&&t in e}const i=e=>"boolean"==typeof e},87:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return i}));const o=window.CustomEvent||null,r=(e,t)=>{let{bubbles:n=!1,cancelable:r=!1,element:c,detail:d={}}=t;if(!o)return;c||(c=document.body);const i=new o(e,{bubbles:n,cancelable:r,detail:d});c.dispatchEvent(i)};let c;const d=()=>{c&&clearTimeout(c),c=setTimeout(()=>{r("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{r(t,{bubbles:n,cancelable:o})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}}}); \ No newline at end of file diff --git a/build/mini-cart.asset.php b/build/mini-cart.asset.php new file mode 100644 index 00000000000..4063ecb5419 --- /dev/null +++ b/build/mini-cart.asset.php @@ -0,0 +1 @@ + array('wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'f0b271d8107eccf246456bb768ba8af5'); \ No newline at end of file diff --git a/build/mini-cart.js b/build/mini-cart.js new file mode 100644 index 00000000000..2f332e11436 --- /dev/null +++ b/build/mini-cart.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["mini-cart"]=function(e){function t(t){for(var r,l,i=t[0],a=t[1],u=t[2],b=0,d=[];b{if(c.n>2)return Object(r.registerBlockType)(e,t)},l=(e,t)=>{if(c.n>1)return Object(r.registerBlockType)(e,t)},i=()=>c.n>2,a=()=>c.n>1},113:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return l}));const r=e=>"number"==typeof e,c=e=>"string"==typeof e,o=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function l(e,t){return o(e)&&t in e}},13:function(e,t){e.exports=window.wp.url},14:function(e,t){e.exports=window.wp.blocks},18:function(e,t){e.exports=window.wp.primitives},3:function(e,t){e.exports=window.wc.wcSettings},32:function(e,t,n){"use strict";n.d(t,"o",(function(){return o})),n.d(t,"m",(function(){return l})),n.d(t,"l",(function(){return i})),n.d(t,"n",(function(){return a})),n.d(t,"j",(function(){return u})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return b})),n.d(t,"g",(function(){return d})),n.d(t,"k",(function(){return m})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"h",(function(){return g})),n.d(t,"a",(function(){return O})),n.d(t,"i",(function(){return w})),n.d(t,"b",(function(){return j}));var r,c=n(3);const o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",i=o.pluginUrl+"build/",a=o.buildPhase,u=null===(r=c.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,s=c.STORE_PAGES.checkout.id,b=c.STORE_PAGES.checkout.permalink,d=c.STORE_PAGES.privacy.permalink,m=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),p=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),f=c.STORE_PAGES.cart.permalink,g=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),O=Object(c.getSetting)("allowedCountries",{}),w=Object(c.getSetting)("shippingStates",{}),j=Object(c.getSetting)("allowedStates",{})},329:function(e,t,n){"use strict";var r=n(0),c=n(18);const o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=o},4:function(e,t){e.exports=window.wp.components},44:function(e,t){e.exports=window.wc.priceFormat},502:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(0),c=n(4),o=n(1),l=n(3);const i=[];var a=n(7),u=n.n(a),s=e=>Object(r.createElement)("div",u()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(r.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{filter:"url(#filter0_ddd)"},Object(r.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(r.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(r.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(r.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(r.createElement)("defs",null,Object(r.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"2"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function b(e){let{blockName:t}=e;const[n,a]=(e=>{const[t,n]=((e,t)=>{const[n,c]=Object(r.useState)(()=>{const n=window.localStorage.getItem(e);if(n)try{return JSON.parse(n)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(r.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(n))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,n]),[n,c]})("wc-blocks_dismissed_compatibility_notices",i),[c,o]=Object(r.useState)(!1),l=t.includes(e);return Object(r.useEffect)(()=>{o(!l)},[l]),[c,()=>{const r=new Set(t);r.add(e),n([...r])}]})(t);return Object(l.isWpVersion)("5.4","<=")||!n?null:Object(r.createElement)(c.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(o.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>a(),finishButtonText:Object(o.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(r.createElement)(s,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(o.__)("Compatibility notice","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("This block may not be compatible with all checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(r.createElement)("em",null)})),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},55:function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{srcElement:t,size:n=24,...c}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:n,height:n,...c}):null}},839:function(e,t,n){e.exports=n(864)},840:function(e,t){},864:function(e,t,n){"use strict";n.r(t);var r=n(0),c=n(1),o=n(55),l=n(329),i=n(110),a=n(9),u=n(44),s=n(502),b=n(4),d=n(13),m=n(3),p=n(894),f=n(895),g=n(896),O=n(5),w=n.n(O),j=n(113),h=n(18),C=Object(r.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"none"},Object(r.createElement)("g",{clipPath:"url(#clip0)"},Object(r.createElement)("path",{d:"M7.50008 18.3332C7.96032 18.3332 8.33341 17.9601 8.33341 17.4998C8.33341 17.0396 7.96032 16.6665 7.50008 16.6665C7.03984 16.6665 6.66675 17.0396 6.66675 17.4998C6.66675 17.9601 7.03984 18.3332 7.50008 18.3332Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(r.createElement)("path",{d:"M16.6666 18.3332C17.1268 18.3332 17.4999 17.9601 17.4999 17.4998C17.4999 17.0396 17.1268 16.6665 16.6666 16.6665C16.2063 16.6665 15.8333 17.0396 15.8333 17.4998C15.8333 17.9601 16.2063 18.3332 16.6666 18.3332Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(r.createElement)("path",{d:"M0.833252 0.833496H4.16658L6.39992 11.9918C6.47612 12.3755 6.68484 12.7201 6.98954 12.9654C7.29424 13.2107 7.6755 13.341 8.06658 13.3335H16.1666C16.5577 13.341 16.9389 13.2107 17.2436 12.9654C17.5483 12.7201 17.757 12.3755 17.8333 11.9918L19.1666 5.00016H4.99992",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),Object(r.createElement)("defs",null,Object(r.createElement)("clipPath",{id:"clip0"},Object(r.createElement)("rect",{width:"20",height:"20",fill:"white"}))));n(840);var E=e=>{let{count:t,colorClassNames:n,style:c}=e;return Object(r.createElement)("span",{className:"wc-block-mini-cart__quantity-badge"},Object(r.createElement)(o.a,{className:"wc-block-mini-cart__icon",size:20,srcElement:C}),Object(r.createElement)("span",{className:"wc-block-mini-cart__badge "+n,style:c},t))};const _={apiVersion:2,title:Object(c.__)("Mini Cart","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(o.a,{srcElement:l.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Display a mini cart widget.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1,color:{__experimentalSkipSerialization:!0},__experimentalSelector:".wc-block-mini-cart__button, .wc-block-mini-cart__badge"},example:{attributes:{isPreview:!0}},attributes:{align:{type:"string",default:"right"},isPreview:{type:"boolean",default:!1,save:!1},transparentButton:{type:"boolean",default:!0}},edit:e=>{var t,n,o,l;let{attributes:i,setAttributes:O}=e;const{transparentButton:h,backgroundColor:C,textColor:_,style:k,align:v}=i,y=Object(a.useBlockProps)({className:w()("wc-block-mini-cart align-"+v,{"is-transparent":h})}),S=Object(m.getSetting)("themeSlug",""),x=Object(m.getSetting)("isSiteEditorAvailable",!1),B=Object(a.getColorClassName)("background-color",C),P=Object(a.getColorClassName)("color",_),M={backgroundColor:null==k||null===(t=k.color)||void 0===t?void 0:t.background,color:null==k||null===(n=k.color)||void 0===n?void 0:n.text},A=w()(B,P,{"has-background":B||(null==k||null===(o=k.color)||void 0===o?void 0:o.background),"has-text-color":P||(null==k||null===(l=k.color)||void 0===l?void 0:l.text)});return Object(r.createElement)("div",y,Object(r.createElement)(a.BlockControls,null,Object(r.createElement)(a.AlignmentControl,{value:v,alignmentControls:[{icon:p.a,title:Object(c.__)("Align button left","woo-gutenberg-products-block"),align:"left"},{icon:f.a,title:Object(c.__)("Align button center","woo-gutenberg-products-block"),align:"center"},{icon:g.a,title:Object(c.__)("Align button right","woo-gutenberg-products-block"),align:"right"}],onChange:e=>O({align:e})})),Object(r.createElement)(a.InspectorControls,null,Object(r.createElement)(b.PanelBody,{title:Object(c.__)("Button style","woo-gutenberg-products-block")},Object(r.createElement)(b.ToggleControl,{label:Object(c.__)("Use transparent button","woo-gutenberg-products-block"),checked:h,onChange:()=>O({transparentButton:!h})})),x&&Object(j.c)(S)&&S.length>0&&Object(r.createElement)(b.PanelBody,{title:Object(c.__)("Template Editor","woo-gutenberg-products-block")},Object(r.createElement)(b.ExternalLink,{href:Object(d.addQueryArgs)(m.ADMIN_URL+"themes.php",{page:"gutenberg-edit-site",postId:S+"//mini-cart",postType:"wp_template_part"})},Object(c.__)("Edit template part","woo-gutenberg-products-block")))),Object(r.createElement)("button",{className:w()("wc-block-mini-cart__button",A),style:M},Object(r.createElement)("span",{className:"wc-block-mini-cart__amount"},Object(u.formatPrice)(0)),Object(r.createElement)(E,{count:0,colorClassNames:A,style:M})),Object(r.createElement)(s.a,{blockName:"mini-cart"}))},save:()=>null};Object(i.c)("woocommerce/mini-cart",_)},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/price-filter-frontend.asset.php b/build/price-filter-frontend.asset.php new file mode 100644 index 00000000000..32957fd9d71 --- /dev/null +++ b/build/price-filter-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-data', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '4cc2fe9922a2ed8fadeb0431ec61eec7'); \ No newline at end of file diff --git a/build/price-filter-frontend.js b/build/price-filter-frontend.js new file mode 100644 index 00000000000..9884e59b8a2 --- /dev/null +++ b/build/price-filter-frontend.js @@ -0,0 +1,3 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=212)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},107:function(e,t,r){"use strict";var n=r(3),o=r.n(n);function a(e,t){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],r="-"===e[0],n=r&&t,o=(e=e.replace("-","")).split("."),a=o[0],i=o[1]||"";return{beforeDecimal:a,afterDecimal:i,hasNagation:r,addNegation:n}}function v(e,t,r){for(var n="",o=r?"0":"",a=0;a<=t-1;a++)n+=e[a]||o;return n}function y(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function O(e,t,r){return Math.min(Math.max(e,t),r)}function w(e){return Math.max(e.selectionStart,e.selectionEnd)}var _={thousandSeparator:f.oneOfType([f.string,f.oneOf([!0])]),decimalSeparator:f.string,allowedDecimalSeparators:f.arrayOf(f.string),thousandsGroupStyle:f.oneOf(["thousand","lakh","wan"]),decimalScale:f.number,fixedDecimalScale:f.bool,displayType:f.oneOf(["input","text"]),prefix:f.string,suffix:f.string,format:f.oneOfType([f.string,f.func]),removeFormatting:f.func,mask:f.oneOfType([f.string,f.arrayOf(f.string)]),value:f.oneOfType([f.number,f.string]),defaultValue:f.oneOfType([f.number,f.string]),isNumericString:f.bool,customInput:f.elementType,allowNegative:f.bool,allowEmptyFormatting:f.bool,allowLeadingZeros:f.bool,onValueChange:f.func,onKeyDown:f.func,onMouseUp:f.func,onChange:f.func,onFocus:f.func,onBlur:f.func,type:f.oneOf(["text","tel","password"]),isAllowed:f.func,renderText:f.func,getInputRef:f.oneOfType([f.func,f.shape({current:f.any})])},j={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:m,onChange:m,onKeyDown:m,onMouseUp:m,onFocus:m,onBlur:m,isAllowed:function(){return!0}},S=function(e){function t(e){var r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=!(n=c(t).call(this,e))||"object"!=typeof n&&"function"!=typeof n?s(this):n;var o=e.defaultValue;r.validateProps();var a=r.formatValueProp(o);return r.state={value:a,numAsString:r.removeFormatting(a)},r.selectionBeforeInput={selectionStart:0,selectionEnd:0},r.onChange=r.onChange.bind(s(r)),r.onKeyDown=r.onKeyDown.bind(s(r)),r.onMouseUp=r.onMouseUp.bind(s(r)),r.onFocus=r.onFocus.bind(s(r)),r.onBlur=r.onBlur.bind(s(r)),r}var r,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),r=t,(n=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,r=this.state,n=this.focusedElm,o=r.value,a=r.numAsString,i=void 0===a?"":a;if(e!==t){this.validateProps();var c=this.formatNumString(i),u=b(t.value)?c:this.formatValueProp(),s=this.removeFormatting(u),l=parseFloat(s),p=parseFloat(i);(isNaN(l)&&isNaN(p)||l===p)&&c===o&&(null!==n||u===o)||this.updateValue({formattedValue:u,numAsString:s,input:n})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,r=this.getSeparators(),n=r.decimalSeparator,o=this.getNumberRegex(!0),a="-"===e[0];a&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var i=(e=(e.match(o)||[]).join("").replace(n,".")).indexOf(".");return-1!==i&&(e="".concat(e.substring(0,i),".").concat(e.substring(i+1,e.length).replace(new RegExp(g(n),"g"),""))),a&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var r=this.props,n=r.format,o=r.decimalScale,a=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!a||0===o||t||n?"":"|"+g(a)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,r=t.thousandSeparator,n=t.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[e,"."]),{decimalSeparator:e,thousandSeparator:r,allowedDecimalSeparators:n}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,r=void 0===t?" ":t;return"string"==typeof r?r:r[e]||" "}},{key:"getValueObject",value:function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),r=t.decimalSeparator,n=t.thousandSeparator;if(r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(n,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(r," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,r){y(e,t),setTimeout((function(){e.value===r&&y(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,r){var n=this.props,o=n.prefix,a=n.suffix,i=n.format;if(""===e)return 0;if(t=O(t,0,e.length),!i){var c="-"===e[0];return O(t,o.length+(c?1:0),e.length-a.length)}if("function"==typeof i)return t;if("#"===i[t]&&d(e[t]))return t;if("#"===i[t-1]&&d(e[t-1]))return t;var u=i.indexOf("#");t=O(t,u,i.lastIndexOf("#")+1);for(var s=i.substring(t,i.length).indexOf("#"),l=t,p=t+(-1===s?0:s);l>u&&("#"!==i[l]||!d(e[l]));)l-=1;return!d(e[p])||"left"===r&&t!==u||t-l0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,r=t.format,n=t.allowEmptyFormatting,o=e;return""!==e||n?"-"!==e||r?"string"==typeof r?this.formatWithPattern(o):"function"==typeof r?r(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,r=t.format,n=t.decimalScale,o=t.fixedDecimalScale,a=t.allowEmptyFormatting,i=this.props,c=i.value,u=i.isNumericString,s=!(c=b(c)?e:c)&&0!==c;return s&&a&&(c=""),s&&!a?"":("number"==typeof c&&(c=c.toString(),u=!0),"Infinity"===c&&u&&(c=""),u&&!r&&"number"==typeof n&&(c=function(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=-1!==e.indexOf(".")&&t,o=h(e),a=o.beforeDecimal,i=o.afterDecimal,c=o.hasNagation,u=parseFloat("0.".concat(i||"0")).toFixed(t).split("."),s=a.split("").reverse().reduce((function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),l=v(u[1]||"",Math.min(t,i.length),r),p=n?".":"";return"".concat(c?"-":"").concat(s).concat(p).concat(l)}(c,n,o)),u?this.formatNumString(c):this.formatInput(c))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),a=n.test(e);return e=e.replace(/-/g,""),o&&!a&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var r=this.props,n=r.format,o=r.prefix,a=r.suffix,i=r.decimalScale,c=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof n&&"#"!==n[e]||!(n||!(e=t.length-a.length||i&&c&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,r){for(var n=e;nr&&o-n>r;)n++;return{start:r,end:o-n}}(t,r),v=g.start,y=g.end;if(!o&&v===y&&-1!==l.indexOf(r[d])){var O=0===u?"":p;return r.substr(0,d)+O+r.substr(d+1,r.length)}var w=o?0:i.length,_=t.length-(o?0:c.length);if(r.length>t.length||!r.length||v===y||0===d&&b===t.length||d===w&&b===_)return r;if(this.checkIfFormatGotDeleted(v,y,t)&&(r=t),!o){var j=this.removeFormatting(r),S=h(j,a),k=S.beforeDecimal,x=S.afterDecimal,E=S.addNegation,P=eO;)y--;y=this.correctCaretPosition(c,y,"left")}}else for(;!g.test(c[y])&&yw)&&(e.preventDefault(),this.setPatchedCaretPosition(r,y,c)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,y,c),d(e)}else d(e)}},{key:"onMouseUp",value:function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,o=t.value,a=void 0===o?"":o;if(r===n){var i=this.correctCaretPosition(a,r);i!==r&&this.setPatchedCaretPosition(t,i,a)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var r=e.target,n=r.selectionStart,o=r.selectionEnd,a=r.value,i=void 0===a?"":a,c=t.correctCaretPosition(i,n);c===n||0===n&&o===i.length||t.setPatchedCaretPosition(r,c,i),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,r,n=this.props,a=n.type,c=n.displayType,u=n.customInput,s=n.renderText,l=n.getInputRef,p=n.format,f=this.state.value,m=(e=this.props,t=_,r={},Object.keys(e).forEach((function(n){t[n]||(r[n]=e[n])})),r),d=i({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(p)?"numeric":void 0},m,{type:a,value:f,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===c)return s?s(f)||null:o.a.createElement("span",i({},m,{ref:l}),f);if(u){var b=u;return o.a.createElement(b,i({},d,{ref:l}))}return o.a.createElement("input",i({},d,{ref:l}))}}])&&a(r.prototype,n),t}(o.a.Component);S.propTypes=_,S.defaultProps=j,t.a=S},110:function(e,t){},136:function(e,t){},162:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(0),o=r(98),a=r(4),i=r(33),c=r(59),u=r(82),s=r(43);const l=e=>{let{queryAttribute:t,queryPrices:r,queryStock:l,queryState:p}=e,f=Object(s.a)();f+="-collection-data";const[m]=Object(c.a)(f),[d,b]=Object(c.b)("calculate_attribute_counts",[],f),[g,h]=Object(c.b)("calculate_price_range",null,f),[v,y]=Object(c.b)("calculate_stock_status_counts",null,f),O=Object(i.a)(t||{}),w=Object(i.a)(r),_=Object(i.a)(l);Object(n.useEffect)(()=>{"object"==typeof O&&Object.keys(O).length&&(d.find(e=>e.taxonomy===O.taxonomy)||b([...d,O]))},[O,d,b]),Object(n.useEffect)(()=>{g!==w&&void 0!==w&&h(w)},[w,h,g]),Object(n.useEffect)(()=>{v!==_&&void 0!==_&&y(_)},[_,y,v]);const[j,S]=Object(n.useState)(!1),[k]=Object(o.a)(j,200);j||S(!0);const x=Object(n.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(a.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:r}=e;return{taxonomy:t,query_type:r}}),["taxonomy","query_type"])),t})(m),[m]);return Object(u.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...p,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...x},shouldSelect:k})}},17:function(e,t){e.exports=window.wp.isShallowEqual},18:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=parseInt(e[0],10),i=parseInt(e[1],10);return Number.isFinite(a)||(a=t||0),Number.isFinite(i)||(i=r||n),Number.isFinite(t)&&t>a&&(a=t),Number.isFinite(r)&&r<=a&&(a=r-n),Number.isFinite(t)&&t>=i&&(i=t+n),Number.isFinite(r)&&r=i&&(a=i-n),o&&i<=a&&(i=a+n),[a,i]};var d=r(99),b=e=>{let{minPrice:t,maxPrice:r,minConstraint:n,maxConstraint:a,onChange:i=(()=>{}),step:c,currency:s,showInputFields:b=!0,showFilterButton:g=!1,isLoading:h=!1,onSubmit:v=(()=>{})}=e;const y=Object(o.useRef)(),O=Object(o.useRef)(),w=c||10*10**s.minorUnit,[_,j]=Object(o.useState)(t),[S,k]=Object(o.useState)(r);Object(o.useEffect)(()=>{j(t)},[t]),Object(o.useEffect)(()=>{k(r)},[r]);const x=Object(o.useMemo)(()=>isFinite(n)&&isFinite(a),[n,a]),E=Object(o.useMemo)(()=>isFinite(t)&&isFinite(r)&&x?{"--low":Math.round((t-n)/(a-n)*100)-.5+"%","--high":Math.round((r-n)/(a-n)*100)+.5+"%"}:{"--low":"0%","--high":"100%"},[t,r,n,a,x]),P=Object(o.useCallback)(e=>{if(h||!x)return;const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=y.current.offsetWidth,o=y.current.value,i=O.current.offsetWidth,c=O.current.value,u=n*(o/a),s=i*(c/a);Math.abs(r-u)>Math.abs(r-s)?(y.current.style.zIndex=20,O.current.style.zIndex=21):(y.current.style.zIndex=21,O.current.style.zIndex=20)},[h,a,x]),N=Object(o.useCallback)(e=>{const o=e.target.classList.contains("wc-block-price-filter__range-input--min"),c=e.target.value,u=o?[Math.round(c/w)*w,r]:[t,Math.round(c/w)*w],s=m(u,n,a,w,o);i([parseInt(s[0],10),parseInt(s[1],10)])},[i,t,r,n,a,w]),F=Object(o.useCallback)(e=>{if(e.relatedTarget&&e.relatedTarget.classList&&e.relatedTarget.classList.contains("wc-block-price-filter__amount"))return;const t=e.target.classList.contains("wc-block-price-filter__amount--min"),r=m([_,S],null,null,w,t);i([parseInt(r[0],10),parseInt(r[1],10)])},[i,w,_,S]),T=l()("wc-block-price-filter","wc-block-components-price-slider",b&&"wc-block-price-filter--has-input-fields",b&&"wc-block-components-price-slider--has-input-fields",g&&"wc-block-price-filter--has-filter-button",g&&"wc-block-components-price-slider--has-filter-button",h&&"is-loading",!x&&"is-disabled"),C=Object(f.c)(y.current)?y.current.ownerDocument.activeElement:void 0,R=C&&C===y.current?w:1,A=C&&C===O.current?w:1,D=_/10**s.minorUnit,M=S/10**s.minorUnit;return Object(o.createElement)("div",{className:T},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-wrapper wc-block-components-price-slider__range-input-wrapper",onMouseMove:P,onFocus:P},x&&Object(o.createElement)("div",{"aria-hidden":b},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:E}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--min wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--min","aria-label":Object(u.__)("Filter products by minimum price","woo-gutenberg-products-block"),"aria-valuetext":D,value:Number.isFinite(t)?t:n,onChange:N,step:R,min:n,max:a,ref:y,disabled:h,tabIndex:b?"-1":"0"}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--max wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--max","aria-label":Object(u.__)("Filter products by maximum price","woo-gutenberg-products-block"),"aria-valuetext":M,value:Number.isFinite(r)?r:a,onChange:N,step:A,min:n,max:a,ref:O,disabled:h,tabIndex:b?"-1":"0"}))),Object(o.createElement)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},b&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.a,{currency:s,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--min wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--min","aria-label":Object(u.__)("Filter products by minimum price","woo-gutenberg-products-block"),onValueChange:e=>{e!==_&&j(e)},onBlur:F,disabled:h||!x,value:_}),Object(o.createElement)(p.a,{currency:s,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--max wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--max","aria-label":Object(u.__)("Filter products by maximum price","woo-gutenberg-products-block"),onValueChange:e=>{e!==S&&k(e)},onBlur:F,disabled:h||!x,value:S})),!b&&!h&&Number.isFinite(t)&&Number.isFinite(r)&&Object(o.createElement)("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text"},Object(u.__)("Price","woo-gutenberg-products-block"),":  ",Object(o.createElement)(p.a,{currency:s,value:t})," – ",Object(o.createElement)(p.a,{currency:s,value:r})),g&&Object(o.createElement)(d.a,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",disabled:h||!x,onClick:v,screenReaderLabel:Object(u.__)("Apply price filter","woo-gutenberg-products-block")})))},g=r(61),h=r(48);const v=(e,t,r)=>{const n=10*10**t;let o;"ROUND_UP"===r?o=isNaN(e)?null:Math.ceil(parseFloat(e,10)/n)*n:"ROUND_DOWN"===r&&(o=isNaN(e)?null:Math.floor(parseFloat(e,10)/n)*n);const i=Object(a.a)(o,Number.isFinite);return Number.isFinite(o)?o:i};Object(n.b)({selector:".wp-block-woocommerce-price-filter",Block:e=>{let{attributes:t,isEditor:r=!1}=e;const[n,u]=Object(i.b)("min_price",null),[s,l]=Object(i.b)("max_price",null),[p]=Object(i.a)(),{results:f,isLoading:m}=Object(c.a)({queryPrices:!0,queryState:p}),[d,y]=Object(o.useState)(),[O,w]=Object(o.useState)(),_=Object(h.getCurrencyFromPriceResponse)(f.price_range),{minConstraint:j,maxConstraint:S}=(e=>{let{minPrice:t,maxPrice:r,minorUnit:n}=e;return{minConstraint:v(t,n,"ROUND_DOWN"),maxConstraint:v(r,n,"ROUND_UP")}})({minPrice:f.price_range?f.price_range.min_price:void 0,maxPrice:f.price_range?f.price_range.max_price:void 0,minorUnit:_.minorUnit}),k=Object(o.useCallback)((e,t)=>{u(e===j?void 0:e),l(t===S?void 0:t)},[j,S,u,l]),x=Object(g.a)(k,500),E=Object(o.useCallback)(e=>{e[0]!==d&&y(e[0]),e[1]!==O&&w(e[1])},[d,O,y,w]);Object(o.useEffect)(()=>{t.showFilterButton||x(d,O)},[d,O,t.showFilterButton,x]);const P=Object(a.a)(n),N=Object(a.a)(s),F=Object(a.a)(j),T=Object(a.a)(S);if(Object(o.useEffect)(()=>{(!Number.isFinite(d)||n!==P&&n!==d||j!==F&&j!==d)&&y(Number.isFinite(n)?n:j),(!Number.isFinite(O)||s!==N&&s!==O||S!==T&&S!==O)&&w(Number.isFinite(s)?s:S)},[d,O,n,s,j,S,F,T,P,N]),!m&&(null===j||null===S||j===S))return null;const C="h"+t.headingLevel;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(C,{className:"wc-block-price-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-price-slider"},Object(o.createElement)(b,{minConstraint:j,maxConstraint:S,minPrice:d,maxPrice:O,currency:_,showInputFields:t.showInputFields,showFilterButton:t.showFilterButton,onChange:E,onSubmit:()=>k(d,O),isLoading:m})))},getProps:e=>({attributes:{showInputFields:"true"===e.dataset.showinputfields,showFilterButton:"true"===e.dataset.showfilterbutton}})})},29:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},3:function(e,t){e.exports=window.React},33:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(17),a=r.n(o);function i(e){const t=Object(n.useRef)(e);return a()(e,t.current)||(t.current=e),t.current}},34:function(e,t,r){"use strict";var n=r(29),o=r.n(n),a=r(0),i=r(3),c=r(1),u=r(84),s=e=>{let{imageUrl:t=u.l+"/block-error.svg",header:r=Object(c.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(c.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:i=Object(c.__)("Error:","woo-gutenberg-products-block"),button:s}=e;return Object(a.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(a.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(a.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(a.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(a.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(a.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},i?i+" ":"",o),s&&Object(a.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},s)))};r(55);class l extends i.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:o,renderError:i,button:c}=this.props,{errorMessage:u,hasError:l}=this.state;return l?"function"==typeof i?i({errorMessage:u}):Object(a.createElement)(s,{errorMessage:r?u:null,header:e,imageUrl:t,text:n,errorMessagePrefix:o,button:c}):this.props.children}}t.a=l},37:function(e,t,r){"use strict";var n=r(0),o=r(5),a=r.n(o);t.a=e=>{let t,{label:r,screenReaderLabel:o,wrapperElement:i,wrapperProps:c={}}=e;const u=null!=r,s=null!=o;return!u&&s?(t=i||"span",c={...c,className:a()(c.className,"screen-reader-text")},Object(n.createElement)(t,c,o)):(t=i||n.Fragment,u&&s&&r!==o?Object(n.createElement)(t,c,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,c,r))}},4:function(e,t){e.exports=window.lodash},43:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0);const o=Object(n.createContext)("page"),a=()=>Object(n.useContext)(o);o.Provider},48:function(e,t){e.exports=window.wc.priceFormat},5:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t"number"==typeof e,o=e=>"string"==typeof e,a=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function i(e,t){return a(e)&&t in e}const c=e=>"boolean"==typeof e},55:function(e,t){},56:function(e,t,r){"use strict";var n=r(57);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},57:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},59:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return m}));var n=r(6),o=r(9),a=r(0),i=r(17),c=r.n(i),u=r(33),s=r(75),l=r(43);const p=e=>{const t=Object(l.a)();e=e||t;const r=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:i}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(a.useCallback)(t=>{i(e,t)},[e,i])]},f=(e,t,r)=>{const i=Object(l.a)();r=r||i;const c=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t),[r,e]),{setQueryValue:u}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(a.useCallback)(t=>{u(r,e,t)},[r,e,u])]},m=(e,t)=>{const r=Object(l.a)();t=t||r;const[n,o]=p(t),i=Object(u.a)(n),f=Object(u.a)(e),m=Object(s.a)(f),d=Object(a.useRef)(!1);return Object(a.useEffect)(()=>{c()(m,f)||(o(Object.assign({},i,f)),d.current=!0)},[i,f,m,o]),d.current?[n,o]:[e,o]}},6:function(e,t){e.exports=window.wc.wcBlocksData},61:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,a=Object(n.useRef)(null),i=Object(n.useRef)(0),c=Object(n.useRef)(null),u=Object(n.useRef)([]),s=Object(n.useRef)(),l=Object(n.useRef)(),p=Object(n.useRef)(e),f=Object(n.useRef)(!0);p.current=e;var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var d=!!(r=r||{}).leading,b=!("trailing"in r)||!!r.trailing,g="maxWait"in r,h=g?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return f.current=!0,function(){f.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=u.current,r=s.current;return u.current=s.current=null,i.current=e,l.current=p.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(c.current),c.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!f.current)return!1;var r=e-a.current,n=e-i.current;return!a.current||r>=t||r<0||g&&n>=h},v=function(t){return c.current=null,b&&u.current?e(t):(u.current=s.current=null,l.current)},y=function(){var e=Date.now();if(n(e))return v(e);if(f.current){var o=e-a.current,c=e-i.current,u=t-o,s=g?Math.min(u,h-c):u;r(y,s)}},O=function(){for(var p=[],m=0;m{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},66:function(e,t,r){"use strict";var n=r(18),o=r.n(n),a=r(0),i=r(107),c=r(5),u=r.n(c);r(136);const s=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:r,currency:n,onValueChange:c,displayType:l="text",...p}=e;const f="string"==typeof r?parseInt(r,10):r;if(!Number.isFinite(f))return null;const m=f/10**n.minorUnit;if(!Number.isFinite(m))return null;const d=u()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),b={...p,...s(n),value:void 0,currency:void 0,onValueChange:void 0},g=c?e=>{const t=e.value*10**n.minorUnit;c(t)}:()=>{};return Object(a.createElement)(i.a,o()({className:d,displayType:l},b,{value:m,onValueChange:g}))}},74:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}));var n=r(18),o=r.n(n),a=r(0),i=r(34);const c=[".wp-block-woocommerce-cart"],u=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:o=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const a=n(e,r),i=o(e,r),c={...e.dataset,...a.attributes||{}};e.classList.remove("is-loading"),s({Block:t,container:e,props:a,attributes:c,errorBoundaryProps:i})})},s=e=>{let{Block:t,container:r,attributes:n={},props:c={},errorBoundaryProps:u={}}=e;Object(a.render)(Object(a.createElement)(i.a,u,Object(a.createElement)(a.Suspense,{fallback:Object(a.createElement)("div",{className:"wc-block-placeholder"})},Object(a.createElement)(t,o()({},c,{attributes:n})))),r)},l=e=>{const t=document.body.querySelectorAll(c.join(","));(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:a}=e;const i=document.body.querySelectorAll(o);a.length>0&&Array.prototype.filter.call(i,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,a)),u({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({...e,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:a}=e;const i=a.querySelectorAll(o);u({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},75:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},8:function(e,t,r){e.exports=r(56)()},82:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(6),o=r(9),a=r(0),i=r(33),c=r(64);const u=e=>{const{namespace:t,resourceName:r,resourceValues:u=[],query:s={},shouldSelect:l=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const p=Object(a.useRef)({results:[],isLoading:!0}),f=Object(i.a)(s),m=Object(i.a)(u),d=Object(c.a)(),b=Object(o.useSelect)(e=>{if(!l)return null;const o=e(n.COLLECTIONS_STORE_KEY),a=[t,r,f,m],i=o.getCollectionError(...a);return i&&d(i),{results:o.getCollection(...a),isLoading:!o.hasFinishedResolution("getCollection",a)}},[t,r,m,f,l]);return null!==b&&(p.current=b),p.current}},84:function(e,t,r){"use strict";r.d(t,"n",(function(){return a})),r.d(t,"l",(function(){return i})),r.d(t,"k",(function(){return c})),r.d(t,"m",(function(){return u})),r.d(t,"i",(function(){return s})),r.d(t,"d",(function(){return l})),r.d(t,"f",(function(){return p})),r.d(t,"j",(function(){return f})),r.d(t,"c",(function(){return m})),r.d(t,"e",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return v}));var n,o=r(2);const a=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=a.pluginUrl+"images/",c=a.pluginUrl+"build/",u=a.buildPhase,s=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),p=o.STORE_PAGES.privacy.permalink,f=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),d=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},9:function(e,t){e.exports=window.wp.data},98:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(3),o=r(61);function a(e,t){return e===t}function i(e){return"function"==typeof e?function(){return e}:e}function c(e,t,r){var c=r&&r.equalityFn||a,u=function(e){var t=Object(n.useState)(i(e)),r=t[0],o=t[1];return[r,Object(n.useCallback)((function(e){return o(i(e))}),[])]}(e),s=u[0],l=u[1],p=Object(o.a)(Object(n.useCallback)((function(e){return l(e)}),[l]),t,r),f=Object(n.useRef)(e);return c(f.current,e)||(p(e),f.current=e),[s,p]}},99:function(e,t,r){"use strict";var n=r(0),o=r(1),a=(r(8),r(5)),i=r.n(a),c=r(37);r(110);const u=e=>{let{className:t,disabled:r,label: +/* translators: Submit button text for filters. */ +a=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:u,screenReaderLabel:s=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:r,onClick:u},Object(n.createElement)(c.a,{label:a,screenReaderLabel:s}))};u.defaultProps={disabled:!1},t.a=u}}); \ No newline at end of file diff --git a/build/price-filter.asset.php b/build/price-filter.asset.php new file mode 100644 index 00000000000..cddfc67276f --- /dev/null +++ b/build/price-filter.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'd78ef49d98695ea6b057f8e4d3f98071'); \ No newline at end of file diff --git a/build/price-filter.js b/build/price-filter.js new file mode 100644 index 00000000000..f9bb0fd6c94 --- /dev/null +++ b/build/price-filter.js @@ -0,0 +1,5 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["price-filter"]=function(e){function t(t){for(var c,i,l=t[0],a=t[1],s=t[2],b=0,p=[];b{const t=Object(u.a)();e=e||t;const n=Object(r.useSelect)(t=>t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:i}=Object(r.useDispatch)(c.QUERY_STATE_STORE_KEY);return[n,Object(o.useCallback)(t=>{i(e,t)},[e,i])]},p=(e,t,n)=>{const i=Object(u.a)();n=n||i;const l=Object(r.useSelect)(r=>r(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t),[n,e]),{setQueryValue:a}=Object(r.useDispatch)(c.QUERY_STATE_STORE_KEY);return[l,Object(o.useCallback)(t=>{a(n,e,t)},[n,e,a])]},d=(e,t)=>{const n=Object(u.a)();t=t||n;const[c,r]=b(t),i=Object(a.a)(c),p=Object(a.a)(e),d=Object(s.a)(p),m=Object(o.useRef)(!1);return Object(o.useEffect)(()=>{l()(d,p)||(r(Object.assign({},i,p)),m.current=!0)},[i,p,d,r]),m.current?[c,r]:[e,r]}},113:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return i}));const c=e=>"number"==typeof e,r=e=>"string"==typeof e,o=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function i(e,t){return o(e)&&t in e}},117:function(e,t){},12:function(e,t){e.exports=window.wp.compose},121:function(e,t,n){"use strict";var c=n(0),r=n(6),o=n(1),i=n(4);function l(e){let{level:t}=e;const n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(c.createElement)(i.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)(i.Path,{d:n[t]})):null}class a extends c.Component{createLevelControl(e,t,n){const r=e===t;return{icon:Object(c.createElement)(l,{level:e}),title:Object(o.sprintf)( +/* translators: %s: heading level e.g: "2", "3", "4" */ +Object(o.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:r,onClick:()=>n(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:n,selectedLevel:o,onChange:a}=this.props;return Object(c.createElement)(i.ToolbarGroup,{isCollapsed:e,icon:Object(c.createElement)(l,{level:o}),controls:Object(r.range)(t,n).map(e=>this.createLevelControl(e,o,a))})}}t.a=a},126:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(0);const r=()=>{const[,e]=Object(c.useState)();return Object(c.useCallback)(t=>{e(()=>{throw t})},[])}},14:function(e,t){e.exports=window.wp.blocks},140:function(e,t,n){"use strict";var c=n(0),r=(n(2),n(9)),o=n(12),i=n(1);n(194),t.a=Object(o.withInstanceId)(e=>{let{className:t,headingLevel:n,onChange:o,heading:l,instanceId:a}=e;const s="h"+n;return Object(c.createElement)(s,{className:t},Object(c.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+a},Object(i.__)("Block title","woo-gutenberg-products-block")),Object(c.createElement)(r.PlainText,{id:"block-title-"+a,className:"wc-block-editor-components-title",value:l,onChange:o}))})},142:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(8);function r(e,t){const n=Object(c.useRef)();return Object(c.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},149:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var c=n(19),r=n(10),o=n(0),i=n(52),l=n(126);const a=e=>{const{namespace:t,resourceName:n,resourceValues:a=[],query:s={},shouldSelect:u=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(o.useRef)({results:[],isLoading:!0}),p=Object(i.a)(s),d=Object(i.a)(a),m=Object(l.a)(),f=Object(r.useSelect)(e=>{if(!u)return null;const r=e(c.COLLECTIONS_STORE_KEY),o=[t,n,p,d],i=r.getCollectionError(...o);return i&&m(i),{results:r.getCollection(...o),isLoading:!r.hasFinishedResolution("getCollection",o)}},[t,n,d,p,u]);return null!==f&&(b.current=f),b.current}},161:function(e,t,n){"use strict";var c=n(0),r=n(18);const o=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(c.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(c.createElement)("g",{mask:"url(#external-mask)"},Object(c.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},179:function(e,t,n){"use strict";var c=n(0),r=n(1),o=(n(2),n(5)),i=n.n(o),l=n(37);n(241);const a=e=>{let{className:t,disabled:n,label: +/* translators: Submit button text for filters. */ +o=Object(r.__)("Go","woo-gutenberg-products-block"),onClick:a,screenReaderLabel:s=Object(r.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(c.createElement)("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:a},Object(c.createElement)(l.a,{label:o,screenReaderLabel:s}))};a.defaultProps={disabled:!1},t.a=a},18:function(e,t){e.exports=window.wp.primitives},186:function(e,t){},19:function(e,t){e.exports=window.wc.wcBlocksData},194:function(e,t){},241:function(e,t){},3:function(e,t){e.exports=window.wc.wcSettings},31:function(e,t){e.exports=window.wp.isShallowEqual},32:function(e,t,n){"use strict";n.d(t,"o",(function(){return o})),n.d(t,"m",(function(){return i})),n.d(t,"l",(function(){return l})),n.d(t,"n",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return b})),n.d(t,"g",(function(){return p})),n.d(t,"k",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return f})),n.d(t,"h",(function(){return O})),n.d(t,"a",(function(){return g})),n.d(t,"i",(function(){return h})),n.d(t,"b",(function(){return w}));var c,r=n(3);const o=Object(r.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=o.pluginUrl+"images/",l=o.pluginUrl+"build/",a=o.buildPhase,s=null===(c=r.STORE_PAGES.shop)||void 0===c?void 0:c.permalink,u=r.STORE_PAGES.checkout.id,b=r.STORE_PAGES.checkout.permalink,p=r.STORE_PAGES.privacy.permalink,d=(r.STORE_PAGES.privacy.title,r.STORE_PAGES.terms.permalink),m=(r.STORE_PAGES.terms.title,r.STORE_PAGES.cart.id),f=r.STORE_PAGES.cart.permalink,O=(r.STORE_PAGES.myaccount.permalink?r.STORE_PAGES.myaccount.permalink:Object(r.getSetting)("wpLoginUrl","/wp-login.php"),Object(r.getSetting)("shippingCountries",{})),g=Object(r.getSetting)("allowedCountries",{}),h=Object(r.getSetting)("shippingStates",{}),w=Object(r.getSetting)("allowedStates",{})},328:function(e,t,n){"use strict";var c=n(0),r=n(18);const o=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},37:function(e,t,n){"use strict";var c=n(0),r=n(5),o=n.n(r);t.a=e=>{let t,{label:n,screenReaderLabel:r,wrapperElement:i,wrapperProps:l={}}=e;const a=null!=n,s=null!=r;return!a&&s?(t=i||"span",l={...l,className:o()(l.className,"screen-reader-text")},Object(c.createElement)(t,l,r)):(t=i||c.Fragment,a&&s&&n!==r?Object(c.createElement)(t,l,Object(c.createElement)("span",{"aria-hidden":"true"},n),Object(c.createElement)("span",{className:"screen-reader-text"},r)):Object(c.createElement)(t,l,n))}},4:function(e,t){e.exports=window.wp.components},44:function(e,t){e.exports=window.wc.priceFormat},488:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var c=n(0),r=n(365),o=n(6),i=n(52),l=n(102),a=n(149),s=n(68);const u=e=>{let{queryAttribute:t,queryPrices:n,queryStock:u,queryState:b}=e,p=Object(s.a)();p+="-collection-data";const[d]=Object(l.a)(p),[m,f]=Object(l.b)("calculate_attribute_counts",[],p),[O,g]=Object(l.b)("calculate_price_range",null,p),[h,w]=Object(l.b)("calculate_stock_status_counts",null,p),j=Object(i.a)(t||{}),_=Object(i.a)(n),v=Object(i.a)(u);Object(c.useEffect)(()=>{"object"==typeof j&&Object.keys(j).length&&(m.find(e=>e.taxonomy===j.taxonomy)||f([...m,j]))},[j,m,f]),Object(c.useEffect)(()=>{O!==_&&void 0!==_&&g(_)},[_,g,O]),Object(c.useEffect)(()=>{h!==v&&void 0!==v&&w(v)},[v,w,h]);const[k,E]=Object(c.useState)(!1),[y]=Object(r.a)(k,200);k||E(!0);const x=Object(c.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(o.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:n}=e;return{taxonomy:t,query_type:n}}),["taxonomy","query_type"])),t})(d),[d]);return Object(a.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...b,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...x},shouldSelect:y})}},52:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var c=n(0),r=n(31),o=n.n(r);function i(e){const t=Object(c.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},53:function(e,t,n){"use strict";var c=n(7),r=n.n(c),o=n(0),i=n(178),l=n(5),a=n.n(l);n(186);const s=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:c,onValueChange:l,displayType:u="text",...b}=e;const p="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(p))return null;const d=p/10**c.minorUnit;if(!Number.isFinite(d))return null;const m=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),f={...b,...s(c),value:void 0,currency:void 0,onValueChange:void 0},O=l?e=>{const t=e.value*10**c.minorUnit;l(t)}:()=>{};return Object(o.createElement)(i.a,r()({className:m,displayType:u},f,{value:d,onValueChange:O}))}},55:function(e,t,n){"use strict";var c=n(0);t.a=function(e){let{srcElement:t,size:n=24,...r}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:n,height:n,...r}):null}},6:function(e,t){e.exports=window.lodash},68:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var c=n(0);const r=Object(c.createContext)("page"),o=()=>Object(c.useContext)(r);r.Provider},784:function(e,t,n){e.exports=n(853)},785:function(e,t){},786:function(e,t){},8:function(e,t){e.exports=window.React},80:function(e,t,n){"use strict";var c=n(7),r=n.n(c),o=n(0),i=n(6),l=n(5),a=n.n(l),s=n(4),u=n(12);n(117);class b extends o.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:n,className:c,help:l,options:u,value:b}=this.props,p="inspector-toggle-button-control-"+n;let d;return l&&(d=Object(i.isFunction)(l)?l(t):l),Object(o.createElement)(s.BaseControl,{id:p,help:d,className:a()("components-toggle-button-control",c)},Object(o.createElement)("label",{id:p+"__label",htmlFor:p,className:"components-toggle-button-control__label"},e),Object(o.createElement)(s.ButtonGroup,{"aria-labelledby":p+"__label"},u.map((t,n)=>{const c={};return b===t.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isSecondary=!0,c["aria-pressed"]=!1),Object(o.createElement)(s.Button,r()({key:`${t.label}-${t.value}-${n}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},c),t.label)})))}}t.a=Object(u.withInstanceId)(b)},853:function(e,t,n){"use strict";n.r(t);var c=n(7),r=n.n(c),o=n(0),i=n(1),l=n(14),a=n(5),s=n.n(a),u=n(55),b=n(328),p=n(9),d=n(4),m=n(3),f=n(32),O=n(121),g=n(140),h=n(80),w=n(161),j=n(142),_=n(102),v=n(488),k=(n(2),n(53)),E=n(113);n(786);const y=function(e,t,n){let c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=parseInt(e[0],10),i=parseInt(e[1],10);return Number.isFinite(o)||(o=t||0),Number.isFinite(i)||(i=n||c),Number.isFinite(t)&&t>o&&(o=t),Number.isFinite(n)&&n<=o&&(o=n-c),Number.isFinite(t)&&t>=i&&(i=t+c),Number.isFinite(n)&&n=i&&(o=i-c),r&&i<=o&&(i=o+c),[o,i]};var x=n(179),S=e=>{let{minPrice:t,maxPrice:n,minConstraint:c,maxConstraint:r,onChange:l=(()=>{}),step:a,currency:u,showInputFields:b=!0,showFilterButton:p=!1,isLoading:d=!1,onSubmit:m=(()=>{})}=e;const f=Object(o.useRef)(),O=Object(o.useRef)(),g=a||10*10**u.minorUnit,[h,w]=Object(o.useState)(t),[j,_]=Object(o.useState)(n);Object(o.useEffect)(()=>{w(t)},[t]),Object(o.useEffect)(()=>{_(n)},[n]);const v=Object(o.useMemo)(()=>isFinite(c)&&isFinite(r),[c,r]),S=Object(o.useMemo)(()=>isFinite(t)&&isFinite(n)&&v?{"--low":Math.round((t-c)/(r-c)*100)-.5+"%","--high":Math.round((n-c)/(r-c)*100)+.5+"%"}:{"--low":"0%","--high":"100%"},[t,n,c,r,v]),C=Object(o.useCallback)(e=>{if(d||!v)return;const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,c=f.current.offsetWidth,o=f.current.value,i=O.current.offsetWidth,l=O.current.value,a=c*(o/r),s=i*(l/r);Math.abs(n-a)>Math.abs(n-s)?(f.current.style.zIndex=20,O.current.style.zIndex=21):(f.current.style.zIndex=21,O.current.style.zIndex=20)},[d,r,v]),N=Object(o.useCallback)(e=>{const o=e.target.classList.contains("wc-block-price-filter__range-input--min"),i=e.target.value,a=o?[Math.round(i/g)*g,n]:[t,Math.round(i/g)*g],s=y(a,c,r,g,o);l([parseInt(s[0],10),parseInt(s[1],10)])},[l,t,n,c,r,g]),F=Object(o.useCallback)(e=>{if(e.relatedTarget&&e.relatedTarget.classList&&e.relatedTarget.classList.contains("wc-block-price-filter__amount"))return;const t=e.target.classList.contains("wc-block-price-filter__amount--min"),n=y([h,j],null,null,g,t);l([parseInt(n[0],10),parseInt(n[1],10)])},[l,g,h,j]),P=s()("wc-block-price-filter","wc-block-components-price-slider",b&&"wc-block-price-filter--has-input-fields",b&&"wc-block-components-price-slider--has-input-fields",p&&"wc-block-price-filter--has-filter-button",p&&"wc-block-components-price-slider--has-filter-button",d&&"is-loading",!v&&"is-disabled"),T=Object(E.b)(f.current)?f.current.ownerDocument.activeElement:void 0,R=T&&T===f.current?g:1,V=T&&T===O.current?g:1,L=h/10**u.minorUnit,B=j/10**u.minorUnit;return Object(o.createElement)("div",{className:P},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-wrapper wc-block-components-price-slider__range-input-wrapper",onMouseMove:C,onFocus:C},v&&Object(o.createElement)("div",{"aria-hidden":b},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:S}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--min wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--min","aria-label":Object(i.__)("Filter products by minimum price","woo-gutenberg-products-block"),"aria-valuetext":L,value:Number.isFinite(t)?t:c,onChange:N,step:R,min:c,max:r,ref:f,disabled:d,tabIndex:b?"-1":"0"}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--max wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--max","aria-label":Object(i.__)("Filter products by maximum price","woo-gutenberg-products-block"),"aria-valuetext":B,value:Number.isFinite(n)?n:r,onChange:N,step:V,min:c,max:r,ref:O,disabled:d,tabIndex:b?"-1":"0"}))),Object(o.createElement)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},b&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(k.a,{currency:u,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--min wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--min","aria-label":Object(i.__)("Filter products by minimum price","woo-gutenberg-products-block"),onValueChange:e=>{e!==h&&w(e)},onBlur:F,disabled:d||!v,value:h}),Object(o.createElement)(k.a,{currency:u,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--max wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--max","aria-label":Object(i.__)("Filter products by maximum price","woo-gutenberg-products-block"),onValueChange:e=>{e!==j&&_(e)},onBlur:F,disabled:d||!v,value:j})),!b&&!d&&Number.isFinite(t)&&Number.isFinite(n)&&Object(o.createElement)("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text"},Object(i.__)("Price","woo-gutenberg-products-block"),":  ",Object(o.createElement)(k.a,{currency:u,value:t})," – ",Object(o.createElement)(k.a,{currency:u,value:n})),p&&Object(o.createElement)(x.a,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",disabled:d||!v,onClick:m,screenReaderLabel:Object(i.__)("Apply price filter","woo-gutenberg-products-block")})))},C=n(165),N=n(44);const F=(e,t,n)=>{const c=10*10**t;let r;"ROUND_UP"===n?r=isNaN(e)?null:Math.ceil(parseFloat(e,10)/c)*c:"ROUND_DOWN"===n&&(r=isNaN(e)?null:Math.floor(parseFloat(e,10)/c)*c);const o=Object(j.a)(r,Number.isFinite);return Number.isFinite(r)?r:o};var P=e=>{let{attributes:t,isEditor:n=!1}=e;const[c,r]=Object(_.b)("min_price",null),[i,l]=Object(_.b)("max_price",null),[a]=Object(_.a)(),{results:s,isLoading:u}=Object(v.a)({queryPrices:!0,queryState:a}),[b,p]=Object(o.useState)(),[d,m]=Object(o.useState)(),f=Object(N.getCurrencyFromPriceResponse)(s.price_range),{minConstraint:O,maxConstraint:g}=(e=>{let{minPrice:t,maxPrice:n,minorUnit:c}=e;return{minConstraint:F(t,c,"ROUND_DOWN"),maxConstraint:F(n,c,"ROUND_UP")}})({minPrice:s.price_range?s.price_range.min_price:void 0,maxPrice:s.price_range?s.price_range.max_price:void 0,minorUnit:f.minorUnit}),h=Object(o.useCallback)((e,t)=>{r(e===O?void 0:e),l(t===g?void 0:t)},[O,g,r,l]),w=Object(C.a)(h,500),k=Object(o.useCallback)(e=>{e[0]!==b&&p(e[0]),e[1]!==d&&m(e[1])},[b,d,p,m]);Object(o.useEffect)(()=>{t.showFilterButton||w(b,d)},[b,d,t.showFilterButton,w]);const E=Object(j.a)(c),y=Object(j.a)(i),x=Object(j.a)(O),P=Object(j.a)(g);if(Object(o.useEffect)(()=>{(!Number.isFinite(b)||c!==E&&c!==b||O!==x&&O!==b)&&p(Number.isFinite(c)?c:O),(!Number.isFinite(d)||i!==y&&i!==d||g!==P&&g!==d)&&m(Number.isFinite(i)?i:g)},[b,d,c,i,O,g,x,P,E,y]),!u&&(null===O||null===g||O===g))return null;const T="h"+t.headingLevel;return Object(o.createElement)(o.Fragment,null,!n&&t.heading&&Object(o.createElement)(T,{className:"wc-block-price-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-price-slider"},Object(o.createElement)(S,{minConstraint:O,maxConstraint:g,minPrice:b,maxPrice:d,currency:f,showInputFields:t.showInputFields,showFilterButton:t.showFilterButton,onChange:k,onSubmit:()=>h(b,d),isLoading:u})))};n(785),Object(l.registerBlockType)("woocommerce/price-filter",{title:Object(i.__)("Filter Products by Price","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(u.a,{srcElement:b.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Allow customers to filter the products by choosing a lower or upper price limit. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{},attributes:{showInputFields:{type:"boolean",default:!0},showFilterButton:{type:"boolean",default:!1},heading:{type:"string",default:Object(i.__)("Filter by price","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:function(e){let{attributes:t,setAttributes:n}=e;const{className:c,heading:r,headingLevel:l,showInputFields:a,showFilterButton:s}=t;return Object(o.createElement)(o.Fragment,null,0===f.o.productCount?Object(o.createElement)(d.Placeholder,{className:"wc-block-price-slider",icon:Object(o.createElement)(u.a,{srcElement:b.a}),label:Object(i.__)("Filter Products by Price","woo-gutenberg-products-block"),instructions:Object(i.__)("Display a slider to filter products in your store by price.","woo-gutenberg-products-block")},Object(o.createElement)("p",null,Object(i.__)("Products with prices are needed for filtering by price. You haven't created any products yet.","woo-gutenberg-products-block")),Object(o.createElement)(d.Button,{className:"wc-block-price-slider__add-product-button",isSecondary:!0,href:Object(m.getAdminLink)("post-new.php?post_type=product")},Object(i.__)("Add new product","woo-gutenberg-products-block")+" ",Object(o.createElement)(u.a,{srcElement:w.a})),Object(o.createElement)(d.Button,{className:"wc-block-price-slider__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(i.__)("Learn more","woo-gutenberg-products-block"))):Object(o.createElement)("div",{className:c},Object(o.createElement)(p.InspectorControls,{key:"inspector"},Object(o.createElement)(d.PanelBody,{title:Object(i.__)("Block Settings","woo-gutenberg-products-block")},Object(o.createElement)(h.a,{label:Object(i.__)("Price Range","woo-gutenberg-products-block"),value:a?"editable":"text",options:[{label:Object(i.__)("Editable","woo-gutenberg-products-block"),value:"editable"},{label:Object(i.__)("Text","woo-gutenberg-products-block"),value:"text"}],onChange:e=>n({showInputFields:"editable"===e})}),Object(o.createElement)(d.ToggleControl,{label:Object(i.__)("Filter button","woo-gutenberg-products-block"),help:s?Object(i.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(i.__)("Products will update when the slider is moved.","woo-gutenberg-products-block"),checked:s,onChange:()=>n({showFilterButton:!s})}),Object(o.createElement)("p",null,Object(i.__)("Heading Level","woo-gutenberg-products-block")),Object(o.createElement)(O.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:l,onChange:e=>n({headingLevel:e})}))),Object(o.createElement)(g.a,{className:"wc-block-price-filter__title",headingLevel:l,heading:r,onChange:e=>n({heading:e})}),Object(o.createElement)(d.Disabled,null,Object(o.createElement)(P,{attributes:t,isEditor:!0}))))},save(e){let{attributes:t}=e;const{className:n,showInputFields:c,showFilterButton:i,heading:l,headingLevel:a}=t,u={"data-showinputfields":c,"data-showfilterbutton":i,"data-heading":l,"data-heading-level":a};return Object(o.createElement)("div",r()({className:s()("is-loading",n)},u),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}))}})},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/price-format.asset.php b/build/price-format.asset.php new file mode 100644 index 00000000000..dba4869a7b0 --- /dev/null +++ b/build/price-format.asset.php @@ -0,0 +1 @@ + array('wc-settings', 'wp-polyfill'), 'version' => 'cfb79d1fdcc6384378e07676c79bd458'); \ No newline at end of file diff --git a/build/price-format.js b/build/price-format.js new file mode 100644 index 00000000000..7b110718375 --- /dev/null +++ b/build/price-format.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.priceFormat=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=147)}({147:function(e,r,t){"use strict";t.r(r),t.d(r,"getCurrencyFromPriceResponse",(function(){return u})),t.d(r,"getCurrency",(function(){return a})),t.d(r,"formatPrice",(function(){return f}));var n=t(4);const o={code:n.CURRENCY.code,symbol:n.CURRENCY.symbol,thousandSeparator:n.CURRENCY.thousandSeparator,decimalSeparator:n.CURRENCY.decimalSeparator,minorUnit:n.CURRENCY.precision,prefix:(i=n.CURRENCY.symbol,c=n.CURRENCY.symbolPosition,{left:i,left_space:" "+i,right:"",right_space:""}[c]||""),suffix:((e,r)=>({left:"",left_space:"",right:e,right_space:" "+e}[r]||""))(n.CURRENCY.symbol,n.CURRENCY.symbolPosition)};var i,c;const u=e=>{if(null==e||!e.currency_code)return o;const{currency_code:r,currency_symbol:t,currency_thousand_separator:n,currency_decimal_separator:i,currency_minor_unit:c,currency_prefix:u,currency_suffix:a}=e;return{code:r||"USD",symbol:t||"$",thousandSeparator:"string"==typeof n?n:",",decimalSeparator:"string"==typeof i?i:".",minorUnit:Number.isFinite(c)?c:2,prefix:"string"==typeof u?u:"$",suffix:"string"==typeof a?a:""}},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...o,...e}},f=(e,r)=>{if(""===e||void 0===e)return"";const t="number"==typeof e?e:parseInt(e,10);if(!Number.isFinite(t))return"";const n=a(r),{minorUnit:o,prefix:i,suffix:c,decimalSeparator:u,thousandSeparator:f}=n,s=t/10**o,{beforeDecimal:l,afterDecimal:p}=(e=>{const r=e.split(".");return{beforeDecimal:r[0],afterDecimal:r[1]||""}})(s.toString()),d=`${i}${((e,r)=>e.replace(/\B(?=(\d{3})+(?!\d))/g,r))(l,f)}${((e,r,t)=>e?`${r}${e.padEnd(t,"0")}`:t>0?`${r}${"0".repeat(t)}`:"")(p,u,o)}${c}`,m=document.createElement("textarea");return m.innerHTML=d,m.value}},4:function(e,r){e.exports=window.wc.wcSettings}}); \ No newline at end of file diff --git a/build/product-best-sellers.asset.php b/build/product-best-sellers.asset.php new file mode 100644 index 00000000000..4b642f193bf --- /dev/null +++ b/build/product-best-sellers.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '23a10f3fe44d16e01db13b13b99efbb6'); \ No newline at end of file diff --git a/build/product-best-sellers.js b/build/product-best-sellers.js new file mode 100644 index 00000000000..dd4b9c35280 --- /dev/null +++ b/build/product-best-sellers.js @@ -0,0 +1,11 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-best-sellers"]=function(e){function t(t){for(var c,i,l=t[0],s=t[1],a=t[2],d=0,b=[];d{let{selected:t=[],search:r="",queryArgs:o={}}=e;const l=(e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const n=s.o.productCount>100,i={per_page:n?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},l=[Object(c.addQueryArgs)("/wc/store/products",{...i,...o})];return n&&t.length&&l.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),l})({selected:t,search:r,queryArgs:o});return Promise.all(l.map(e=>n()({path:e}))).then(e=>Object(i.uniqBy)(Object(i.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),b=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:r}=e;const o=(e=>{let{selected:t=[],search:r}=e;const o=Object(l.getSetting)("limitTags",!1),n=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:r})];return o&&t.length&&n.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:r});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(i.uniqBy)(Object(i.flatten)(e),"id"))},p=e=>n()({path:Object(c.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>n()({path:"wc/store/products/categories/"+e}),w=e=>n()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return n}));var c=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(39);t.a=e=>{let{error:t}=e;return Object(c.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var c=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:r,height:r,...o}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},743:function(e,t,r){e.exports=r(865)},76:function(e,t){e.exports=window.wp.serverSideRender},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},84:function(e,t,r){"use strict";var c=r(0),o=r(1),n=(r(2),r(4));t.a=e=>{let{onChange:t,settings:r}=e;const{button:i,price:l,rating:s,title:a}=r;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product title","woo-gutenberg-products-block"),help:a?Object(o.__)("Product title is visible.","woo-gutenberg-products-block"):Object(o.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...r,title:!a})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product price","woo-gutenberg-products-block"),help:l?Object(o.__)("Product price is visible.","woo-gutenberg-products-block"):Object(o.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...r,price:!l})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(o.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(o.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...r,rating:!s})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Add to Cart button","woo-gutenberg-products-block"),help:i?Object(o.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(o.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...r,button:!i})}))}},85:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(6),i=(r(2),r(4));t.a=e=>{let{columns:t,rows:r,setAttributes:l,alignButtons:s,minColumns:a=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(n.clamp)(e,a,u);l({columns:Number.isNaN(t)?"":t})},min:a,max:u}),Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:e=>{const t=Object(n.clamp)(e,d,b);l({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(c.createElement)(i.ToggleControl,{label:Object(o.__)("Align Last Block","woo-gutenberg-products-block"),help:s?Object(o.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:s,onChange:()=>l({alignButtons:!s})}))}},865:function(e,t,r){"use strict";r.r(t);var c=r(0),o=r(1),n=r(6),i=r(55),l=r(18),s=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99l1.5 1.5z"})),a=r(14),u=r(4),d=r(9),b=r(76),g=r.n(b),p=(r(2),r(84)),h=r(85),w=r(90),E=r(172),m=r(3);class O extends c.Component{getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{categories:r,catOperator:n,columns:i,contentVisibility:l,rows:s,alignButtons:a}=e;return Object(c.createElement)(d.InspectorControls,{key:"inspector"},Object(c.createElement)(u.PanelBody,{title:Object(o.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(h.a,{columns:i,rows:s,alignButtons:a,setAttributes:t,minColumns:Object(m.getSetting)("min_columns",1),maxColumns:Object(m.getSetting)("max_columns",6),minRows:Object(m.getSetting)("min_rows",1),maxRows:Object(m.getSetting)("max_rows",6)})),Object(c.createElement)(u.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(p.a,{settings:l,onChange:e=>t({contentVisibility:e})})),Object(c.createElement)(u.PanelBody,{title:Object(o.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(w.a,{selected:r,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=e.map(e=>{let{id:t}=e;return t});t({categories:r})},operator:n,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({catOperator:e})}})))}render(){const{attributes:e,name:t}=this.props;return e.isPreview?E.a:Object(c.createElement)("div",{className:"wc-block-product-best-sellers"},this.getInspectorControls(),Object(c.createElement)(u.Disabled,null,Object(c.createElement)(g.a,{block:t,attributes:e})))}}var f=O,j=r(101);Object(a.registerBlockType)("woocommerce/product-best-sellers",{title:Object(o.__)("Best Selling Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(i.a,{srcElement:s}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a grid of your all-time best selling products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{...j.a},transforms:{from:[{type:"block",blocks:Object(n.without)(j.b,"woocommerce/product-best-sellers"),transform:e=>Object(a.createBlock)("woocommerce/product-best-sellers",e)}]},edit:e=>Object(c.createElement)(f,e),save:()=>null})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor},90:function(e,t,r){"use strict";var c=r(7),o=r.n(c),n=r(0),i=r(1),l=(r(2),r(40)),s=r(4),a=r(12),u=r(34),d=r(35),b=Object(a.createHigherOrderComponent)(e=>class extends n.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(u.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(d.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:r,categories:c}=this.state;return Object(n.createElement)(e,o()({},this.props,{error:t,isLoading:r,categories:c}))}},"withCategories"),g=r(41),p=r(5),h=r.n(p);r(124);const w=e=>{let{categories:t,error:r,isLoading:c,onChange:a,onOperatorChange:u,operator:d,selected:b,isCompact:p,isSingle:w,showReviewCount:E}=e;const m={clear:Object(i.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(i.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(i.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(i.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(i.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(i._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(i.__)("Category search results updated.","woo-gutenberg-products-block")};return r?Object(n.createElement)(g.a,{error:r}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(l.b,{className:"woocommerce-product-categories",list:t,isLoading:c,selected:b.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:a,renderItem:e=>{const{item:t,search:r,depth:c=0}=e,s=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,a=E?Object(i.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(i._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),s,t.review_count):Object(i.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(i._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),s,t.count),u=E?Object(i.sprintf)( +/* translators: %d is the count of reviews. */ +Object(i._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(i.sprintf)( +/* translators: %d is the count of products. */ +Object(i._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(n.createElement)(l.c,o()({className:h()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===c&&0!==t.parent})},e,{countLabel:u,"aria-label":a}))},messages:m,isCompact:p,isHierarchical:!0,isSingle:w}),!!u&&Object(n.createElement)("div",{hidden:b.length<2},Object(n.createElement)(s.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(i.__)("Display products matching","woo-gutenberg-products-block"),help:Object(i.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:d,onChange:u,options:[{label:Object(i.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(i.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};w.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=b(w)}}); \ No newline at end of file diff --git a/build/product-categories.asset.php b/build/product-categories.asset.php new file mode 100644 index 00000000000..35d0c333f4d --- /dev/null +++ b/build/product-categories.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render'), 'version' => 'ca1547f187c55f8c278413d13c515f4d'); \ No newline at end of file diff --git a/build/product-categories.js b/build/product-categories.js new file mode 100644 index 00000000000..d7b303b39c3 --- /dev/null +++ b/build/product-categories.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-categories"]=function(e){function t(t){for(var r,a,l=t[0],i=t[1],s=t[2],b=0,d=[];b{if(n.n>2)return Object(r.registerBlockType)(e,t)},a=(e,t)=>{if(n.n>1)return Object(r.registerBlockType)(e,t)},l=()=>n.n>2,i=()=>n.n>1},117:function(e,t){},12:function(e,t){e.exports=window.wp.compose},14:function(e,t){e.exports=window.wp.blocks},18:function(e,t){e.exports=window.wp.primitives},3:function(e,t){e.exports=window.wc.wcSettings},32:function(e,t,o){"use strict";o.d(t,"o",(function(){return c})),o.d(t,"m",(function(){return a})),o.d(t,"l",(function(){return l})),o.d(t,"n",(function(){return i})),o.d(t,"j",(function(){return s})),o.d(t,"e",(function(){return u})),o.d(t,"f",(function(){return b})),o.d(t,"g",(function(){return d})),o.d(t,"k",(function(){return p})),o.d(t,"c",(function(){return g})),o.d(t,"d",(function(){return h})),o.d(t,"h",(function(){return w})),o.d(t,"a",(function(){return m})),o.d(t,"i",(function(){return f})),o.d(t,"b",(function(){return O}));var r,n=o(3);const c=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",l=c.pluginUrl+"build/",i=c.buildPhase,s=null===(r=n.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=n.STORE_PAGES.checkout.id,b=n.STORE_PAGES.checkout.permalink,d=n.STORE_PAGES.privacy.permalink,p=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),g=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),h=n.STORE_PAGES.cart.permalink,w=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),m=Object(n.getSetting)("allowedCountries",{}),f=Object(n.getSetting)("shippingStates",{}),O=Object(n.getSetting)("allowedStates",{})},4:function(e,t){e.exports=window.wp.components},55:function(e,t,o){"use strict";var r=o(0);t.a=function(e){let{srcElement:t,size:o=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:o,height:o,...n}):null}},6:function(e,t){e.exports=window.lodash},747:function(e,t,o){e.exports=o(866)},748:function(e,t){},749:function(e,t){},76:function(e,t){e.exports=window.wp.serverSideRender},80:function(e,t,o){"use strict";var r=o(7),n=o.n(r),c=o(0),a=o(6),l=o(5),i=o.n(l),s=o(4),u=o(12);o(117);class b extends c.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:o,className:r,help:l,options:u,value:b}=this.props,d="inspector-toggle-button-control-"+o;let p;return l&&(p=Object(a.isFunction)(l)?l(t):l),Object(c.createElement)(s.BaseControl,{id:d,help:p,className:i()("components-toggle-button-control",r)},Object(c.createElement)("label",{id:d+"__label",htmlFor:d,className:"components-toggle-button-control__label"},e),Object(c.createElement)(s.ButtonGroup,{"aria-labelledby":d+"__label"},u.map((t,o)=>{const r={};return b===t.value?(r.isPrimary=!0,r["aria-pressed"]=!0):(r.isSecondary=!0,r["aria-pressed"]=!1),Object(c.createElement)(s.Button,n()({key:`${t.label}-${t.value}-${o}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},r),t.label)})))}}t.a=Object(u.withInstanceId)(b)},866:function(e,t,o){"use strict";o.r(t);var r=o(7),n=o.n(r),c=o(0),a=o(1),l=o(14),i=o(55),s=o(18),u=Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7zM20.1 3H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9zM19 19H5V5h14v14z"})),b=o(110),d=(o(748),o(749),o(9)),p=o(76),g=o.n(p),h=(o(2),o(4)),w=o(80);const m=()=>Object(c.createElement)(h.Placeholder,{icon:Object(c.createElement)(i.a,{srcElement:u}),label:Object(a.__)("Product Categories List","woo-gutenberg-products-block"),className:"wc-block-product-categories"},Object(a.__)("This block shows product categories for your store. To use it, you'll first need to create a product and assign it to a category.","woo-gutenberg-products-block"));var f=e=>{let{attributes:t,setAttributes:o,name:r}=e;const n=Object(d.useBlockProps)({className:"wc-block-product-categories"});return Object(c.createElement)("div",n,(()=>{const{hasCount:e,hasImage:r,hasEmpty:n,isDropdown:l,isHierarchical:i}=t;return Object(c.createElement)(d.InspectorControls,{key:"inspector"},Object(c.createElement)(h.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(w.a,{label:Object(a.__)("Display style","woo-gutenberg-products-block"),value:l?"dropdown":"list",options:[{label:Object(a.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(a.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:e=>o({isDropdown:"dropdown"===e})})),Object(c.createElement)(h.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show product count","woo-gutenberg-products-block"),help:e?Object(a.__)("Product count is visible.","woo-gutenberg-products-block"):Object(a.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:e,onChange:()=>o({hasCount:!e})}),!l&&Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show category images","woo-gutenberg-products-block"),help:r?Object(a.__)("Category images are visible.","woo-gutenberg-products-block"):Object(a.__)("Category images are hidden.","woo-gutenberg-products-block"),checked:r,onChange:()=>o({hasImage:!r})}),Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show hierarchy","woo-gutenberg-products-block"),help:i?Object(a.__)("Hierarchy is visible.","woo-gutenberg-products-block"):Object(a.__)("Hierarchy is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>o({isHierarchical:!i})}),Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show empty categories","woo-gutenberg-products-block"),help:n?Object(a.__)("Empty categories are visible.","woo-gutenberg-products-block"):Object(a.__)("Empty categories are hidden.","woo-gutenberg-products-block"),checked:n,onChange:()=>o({hasEmpty:!n})})))})(),Object(c.createElement)(h.Disabled,null,Object(c.createElement)(g.a,{block:r,attributes:t,EmptyResponsePlaceholder:m})))};Object(l.registerBlockType)("woocommerce/product-categories",{apiVersion:2,title:Object(a.__)("Product Categories List","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(i.a,{srcElement:u}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show all product categories as a list or dropdown.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,...Object(b.b)()&&{color:{background:!1,link:!0},typography:{fontSize:!0,lineHeight:!0}}},example:{attributes:{hasCount:!0,hasImage:!1}},attributes:{align:{type:"string"},hasCount:{type:"boolean",default:!0},hasImage:{type:"boolean",default:!1},hasEmpty:{type:"boolean",default:!1},isDropdown:{type:"boolean",default:!1},isHierarchical:{type:"boolean",default:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:o}=e;return"woocommerce_product_categories"===t&&!(null==o||!o.raw)},transform:e=>{let{instance:t}=e;return Object(l.createBlock)("woocommerce/product-categories",{hasCount:!!t.raw.count,hasEmpty:!t.raw.hide_empty,isDropdown:!!t.raw.dropdown,isHierarchical:!!t.raw.hierarchical})}}]},deprecated:[{attributes:{hasCount:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-has-count"},hasEmpty:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-has-empty"},isDropdown:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-is-dropdown"},isHierarchical:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-is-hierarchical"}},migrate:e=>e,save(e){const{hasCount:t,hasEmpty:o,isDropdown:r,isHierarchical:a}=e.attributes,l={};return t&&(l["data-has-count"]=!0),o&&(l["data-has-empty"]=!0),r&&(l["data-is-dropdown"]=!0),a&&(l["data-is-hierarchical"]=!0),Object(c.createElement)("div",n()({className:"is-loading"},l),r?Object(c.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}):Object(c.createElement)("ul",{"aria-hidden":!0},Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-product-categories__placeholder"}))))}}],edit:e=>Object(c.createElement)(f,e),save:()=>null})},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/product-category.asset.php b/build/product-category.asset.php new file mode 100644 index 00000000000..745e18eb661 --- /dev/null +++ b/build/product-category.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => 'f7cfbb28fb17601a70ffd96dbf04256a'); \ No newline at end of file diff --git a/build/product-category.js b/build/product-category.js new file mode 100644 index 00000000000..65e8f6eb53f --- /dev/null +++ b/build/product-category.js @@ -0,0 +1,11 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-category"]=function(e){function t(t){for(var c,i,l=t[0],s=t[1],a=t[2],d=0,b=[];d{let{value:t,setAttributes:r}=e;return Object(c.createElement)(n.SelectControl,{label:Object(o.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(o.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(o.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(o.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(o.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(o.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(o.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(o.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:e=>r({orderby:e})})}},12:function(e,t){e.exports=window.wp.compose},124:function(e,t){},13:function(e,t){e.exports=window.wp.url},14:function(e,t){e.exports=window.wp.blocks},172:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var c=r(0);const o=Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(c.createElement)("title",null,"Grid Block Preview"),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},18:function(e,t){e.exports=window.wp.primitives},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},32:function(e,t,r){"use strict";r.d(t,"o",(function(){return n})),r.d(t,"m",(function(){return i})),r.d(t,"l",(function(){return l})),r.d(t,"n",(function(){return s})),r.d(t,"j",(function(){return a})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return g})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return h})),r.d(t,"h",(function(){return w})),r.d(t,"a",(function(){return E})),r.d(t,"i",(function(){return m})),r.d(t,"b",(function(){return O}));var c,o=r(3);const n=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=n.pluginUrl+"images/",l=n.pluginUrl+"build/",s=n.buildPhase,a=null===(c=o.STORE_PAGES.shop)||void 0===c?void 0:c.permalink,u=o.STORE_PAGES.checkout.id,d=o.STORE_PAGES.checkout.permalink,b=o.STORE_PAGES.privacy.permalink,g=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),p=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),h=o.STORE_PAGES.cart.permalink,w=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),E=Object(o.getSetting)("allowedCountries",{}),m=Object(o.getSetting)("shippingStates",{}),O=Object(o.getSetting)("allowedStates",{})},34:function(e,t,r){"use strict";r.d(t,"h",(function(){return a})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return g})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return h})),r.d(t,"g",(function(){return w})),r.d(t,"a",(function(){return E}));var c=r(13),o=r(11),n=r.n(o),i=r(6),l=r(3),s=r(32);const a=e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const l=(e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const n=s.o.productCount>100,i={per_page:n?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},l=[Object(c.addQueryArgs)("/wc/store/products",{...i,...o})];return n&&t.length&&l.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),l})({selected:t,search:r,queryArgs:o});return Promise.all(l.map(e=>n()({path:e}))).then(e=>Object(i.uniqBy)(Object(i.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),b=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:r}=e;const o=(e=>{let{selected:t=[],search:r}=e;const o=Object(l.getSetting)("limitTags",!1),n=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:r})];return o&&t.length&&n.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:r});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(i.uniqBy)(Object(i.flatten)(e),"id"))},p=e=>n()({path:Object(c.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>n()({path:"wc/store/products/categories/"+e}),w=e=>n()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return n}));var c=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(39);t.a=e=>{let{error:t}=e;return Object(c.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var c=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:r,height:r,...o}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},744:function(e,t,r){e.exports=r(871)},745:function(e,t){},746:function(e,t,r){"use strict";var c=r(0),o=r(18);const n=Object(c.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"}));t.a=n},76:function(e,t){e.exports=window.wp.serverSideRender},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},84:function(e,t,r){"use strict";var c=r(0),o=r(1),n=(r(2),r(4));t.a=e=>{let{onChange:t,settings:r}=e;const{button:i,price:l,rating:s,title:a}=r;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product title","woo-gutenberg-products-block"),help:a?Object(o.__)("Product title is visible.","woo-gutenberg-products-block"):Object(o.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...r,title:!a})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product price","woo-gutenberg-products-block"),help:l?Object(o.__)("Product price is visible.","woo-gutenberg-products-block"):Object(o.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...r,price:!l})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(o.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(o.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...r,rating:!s})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Add to Cart button","woo-gutenberg-products-block"),help:i?Object(o.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(o.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...r,button:!i})}))}},85:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(6),i=(r(2),r(4));t.a=e=>{let{columns:t,rows:r,setAttributes:l,alignButtons:s,minColumns:a=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(n.clamp)(e,a,u);l({columns:Number.isNaN(t)?"":t})},min:a,max:u}),Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:e=>{const t=Object(n.clamp)(e,d,b);l({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(c.createElement)(i.ToggleControl,{label:Object(o.__)("Align Last Block","woo-gutenberg-products-block"),help:s?Object(o.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:s,onChange:()=>l({alignButtons:!s})}))}},871:function(e,t,r){"use strict";r.r(t);var c=r(0),o=r(1),n=r(14),i=r(6),l=r(55),s=r(746),a=(r(745),r(16)),u=r.n(a),d=r(9),b=r(76),g=r.n(b),p=r(4),h=(r(2),r(84)),w=r(85),E=r(90),m=r(119),O=r(172),j=r(3);const f=()=>Object(c.createElement)(p.Placeholder,{icon:Object(c.createElement)(l.a,{srcElement:s.a}),label:Object(o.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(o.__)("No products were found that matched your selection.","woo-gutenberg-products-block"));class y extends c.Component{constructor(){super(...arguments),u()(this,"state",{changedAttributes:{},isEditing:!1}),u()(this,"startEditing",()=>{this.setState({isEditing:!0,changedAttributes:{}})}),u()(this,"stopEditing",()=>{this.setState({isEditing:!1,changedAttributes:{}})}),u()(this,"setChangedAttributes",e=>{this.setState(t=>({changedAttributes:{...t.changedAttributes,...e}}))}),u()(this,"save",()=>{const{changedAttributes:e}=this.state,{setAttributes:t}=this.props;t(e),this.stopEditing()})}componentDidMount(){const{attributes:e}=this.props;e.categories.length||this.setState({isEditing:!0})}getInspectorControls(){var e=this;const{attributes:t,setAttributes:r}=this.props,{isEditing:n}=this.state,{columns:i,catOperator:l,contentVisibility:s,orderby:a,rows:u,alignButtons:b}=t;return Object(c.createElement)(d.InspectorControls,{key:"inspector"},Object(c.createElement)(p.PanelBody,{title:Object(o.__)("Product Category","woo-gutenberg-products-block"),initialOpen:!t.categories.length&&!n},Object(c.createElement)(E.a,{selected:t.categories,onChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=t.map(e=>{let{id:t}=e;return t}),o={categories:c};r(o),e.setChangedAttributes(o)},operator:l,onOperatorChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";const c={catOperator:t};r(c),e.setChangedAttributes(c)},isCompact:!0})),Object(c.createElement)(p.PanelBody,{title:Object(o.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(w.a,{columns:i,rows:u,alignButtons:b,setAttributes:r,minColumns:Object(j.getSetting)("min_columns",1),maxColumns:Object(j.getSetting)("max_columns",6),minRows:Object(j.getSetting)("min_rows",1),maxRows:Object(j.getSetting)("max_rows",6)})),Object(c.createElement)(p.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(h.a,{settings:s,onChange:e=>r({contentVisibility:e})})),Object(c.createElement)(p.PanelBody,{title:Object(o.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(m.a,{setAttributes:r,value:a})))}renderEditMode(){var e=this;const{attributes:t,debouncedSpeak:r}=this.props,{changedAttributes:n}=this.state,i={...t,...n};return Object(c.createElement)(p.Placeholder,{icon:Object(c.createElement)(l.a,{srcElement:s.a}),label:Object(o.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(o.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-products-category__selection"},Object(c.createElement)(E.a,{selected:i.categories,onChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=t.map(e=>{let{id:t}=e;return t});e.setChangedAttributes({categories:r})},operator:i.catOperator,onOperatorChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({catOperator:t})}}),Object(c.createElement)(p.Button,{isPrimary:!0,onClick:()=>{this.save(),r(Object(o.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block")),Object(c.createElement)(p.Button,{className:"wc-block-products-category__cancel-button",isTertiary:!0,onClick:()=>{this.stopEditing(),r(Object(o.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Cancel","woo-gutenberg-products-block"))))}renderViewMode(){const{attributes:e,name:t}=this.props,r=e.categories.length;return Object(c.createElement)(p.Disabled,null,r?Object(c.createElement)(g.a,{block:t,attributes:e,EmptyResponsePlaceholder:f}):Object(o.__)("Select at least one category to display its products.","woo-gutenberg-products-block"))}render(){const{isEditing:e}=this.state,{attributes:t}=this.props;return t.isPreview?O.a:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(d.BlockControls,null,Object(c.createElement)(p.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit selected categories","woo-gutenberg-products-block"),onClick:()=>e?this.stopEditing():this.startEditing(),isActive:e}]})),this.getInspectorControls(),e?this.renderEditMode():this.renderViewMode())}}var _=Object(p.withSpokenMessages)(y),x=r(101);Object(n.registerBlockType)("woocommerce/product-category",{title:Object(o.__)("Products by Category","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{srcElement:s.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{...x.a,editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}},transforms:{from:[{type:"block",blocks:Object(i.without)(x.b,"woocommerce/product-category"),transform:e=>Object(n.createBlock)("woocommerce/product-category",{...e,editMode:!1})}]},edit:e=>Object(c.createElement)(_,e),save:()=>null})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor},90:function(e,t,r){"use strict";var c=r(7),o=r.n(c),n=r(0),i=r(1),l=(r(2),r(40)),s=r(4),a=r(12),u=r(34),d=r(35),b=Object(a.createHigherOrderComponent)(e=>class extends n.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(u.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(d.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:r,categories:c}=this.state;return Object(n.createElement)(e,o()({},this.props,{error:t,isLoading:r,categories:c}))}},"withCategories"),g=r(41),p=r(5),h=r.n(p);r(124);const w=e=>{let{categories:t,error:r,isLoading:c,onChange:a,onOperatorChange:u,operator:d,selected:b,isCompact:p,isSingle:w,showReviewCount:E}=e;const m={clear:Object(i.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(i.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(i.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(i.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(i.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(i._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(i.__)("Category search results updated.","woo-gutenberg-products-block")};return r?Object(n.createElement)(g.a,{error:r}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(l.b,{className:"woocommerce-product-categories",list:t,isLoading:c,selected:b.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:a,renderItem:e=>{const{item:t,search:r,depth:c=0}=e,s=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,a=E?Object(i.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(i._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),s,t.review_count):Object(i.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(i._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),s,t.count),u=E?Object(i.sprintf)( +/* translators: %d is the count of reviews. */ +Object(i._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(i.sprintf)( +/* translators: %d is the count of products. */ +Object(i._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(n.createElement)(l.c,o()({className:h()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===c&&0!==t.parent})},e,{countLabel:u,"aria-label":a}))},messages:m,isCompact:p,isHierarchical:!0,isSingle:w}),!!u&&Object(n.createElement)("div",{hidden:b.length<2},Object(n.createElement)(s.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(i.__)("Display products matching","woo-gutenberg-products-block"),help:Object(i.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:d,onChange:u,options:[{label:Object(i.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(i.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};w.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=b(w)}}); \ No newline at end of file diff --git a/build/product-new.asset.php b/build/product-new.asset.php new file mode 100644 index 00000000000..9c26aba8237 --- /dev/null +++ b/build/product-new.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '8f367fc61d1e60562019e21017b95686'); \ No newline at end of file diff --git a/build/product-new.js b/build/product-new.js new file mode 100644 index 00000000000..77c5cb42f0f --- /dev/null +++ b/build/product-new.js @@ -0,0 +1,11 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-new"]=function(e){function t(t){for(var c,i,l=t[0],a=t[1],s=t[2],d=0,b=[];d{let{selected:t=[],search:r="",queryArgs:o={}}=e;const l=(e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const n=a.o.productCount>100,i={per_page:n?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},l=[Object(c.addQueryArgs)("/wc/store/products",{...i,...o})];return n&&t.length&&l.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),l})({selected:t,search:r,queryArgs:o});return Promise.all(l.map(e=>n()({path:e}))).then(e=>Object(i.uniqBy)(Object(i.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),b=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:r}=e;const o=(e=>{let{selected:t=[],search:r}=e;const o=Object(l.getSetting)("limitTags",!1),n=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:r})];return o&&t.length&&n.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:r});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(i.uniqBy)(Object(i.flatten)(e),"id"))},p=e=>n()({path:Object(c.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>n()({path:"wc/store/products/categories/"+e}),w=e=>n()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return n}));var c=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(39);t.a=e=>{let{error:t}=e;return Object(c.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var c=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:r,height:r,...o}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},750:function(e,t,r){e.exports=r(867)},76:function(e,t){e.exports=window.wp.serverSideRender},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},84:function(e,t,r){"use strict";var c=r(0),o=r(1),n=(r(2),r(4));t.a=e=>{let{onChange:t,settings:r}=e;const{button:i,price:l,rating:a,title:s}=r;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product title","woo-gutenberg-products-block"),help:s?Object(o.__)("Product title is visible.","woo-gutenberg-products-block"):Object(o.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...r,title:!s})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product price","woo-gutenberg-products-block"),help:l?Object(o.__)("Product price is visible.","woo-gutenberg-products-block"):Object(o.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...r,price:!l})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(o.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(o.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...r,rating:!a})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Add to Cart button","woo-gutenberg-products-block"),help:i?Object(o.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(o.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...r,button:!i})}))}},85:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(6),i=(r(2),r(4));t.a=e=>{let{columns:t,rows:r,setAttributes:l,alignButtons:a,minColumns:s=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(n.clamp)(e,s,u);l({columns:Number.isNaN(t)?"":t})},min:s,max:u}),Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:e=>{const t=Object(n.clamp)(e,d,b);l({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(c.createElement)(i.ToggleControl,{label:Object(o.__)("Align Last Block","woo-gutenberg-products-block"),help:a?Object(o.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:a,onChange:()=>l({alignButtons:!a})}))}},867:function(e,t,r){"use strict";r.r(t);var c=r(0),o=r(1),n=r(14),i=r(6),l=r(55),a=r(18),s=Object(c.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-4.51 2.11l.26 2.79-2.74.62-1.43 2.41L12 18.82l-2.58 1.11-1.43-2.41-2.74-.62.26-2.8L3.66 12l1.85-2.12-.26-2.78 2.74-.61 1.43-2.41L12 5.18l2.58-1.11 1.43 2.41 2.74.62-.26 2.79L20.34 12l-1.85 2.11zM11 15h2v2h-2zm0-8h2v6h-2z"})),u=r(4),d=r(9),b=r(76),g=r.n(b),p=(r(2),r(84)),h=r(85),w=r(90),E=r(172),m=r(3);class O extends c.Component{getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{categories:r,catOperator:n,columns:i,contentVisibility:l,rows:a,alignButtons:s}=e;return Object(c.createElement)(d.InspectorControls,{key:"inspector"},Object(c.createElement)(u.PanelBody,{title:Object(o.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(h.a,{columns:i,rows:a,alignButtons:s,setAttributes:t,minColumns:Object(m.getSetting)("min_columns",1),maxColumns:Object(m.getSetting)("max_columns",6),minRows:Object(m.getSetting)("min_rows",1),maxRows:Object(m.getSetting)("max_rows",6)})),Object(c.createElement)(u.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(p.a,{settings:l,onChange:e=>t({contentVisibility:e})})),Object(c.createElement)(u.PanelBody,{title:Object(o.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(w.a,{selected:r,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=e.map(e=>{let{id:t}=e;return t});t({categories:r})},operator:n,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({catOperator:e})}})))}render(){const{attributes:e,name:t}=this.props;return e.isPreview?E.a:Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(u.Disabled,null,Object(c.createElement)(g.a,{block:t,attributes:e})))}}var f=O,j=r(101);Object(n.registerBlockType)("woocommerce/product-new",{title:Object(o.__)("Newest Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{srcElement:s}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a grid of your newest products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{...j.a},example:{attributes:{isPreview:!0}},transforms:{from:[{type:"block",blocks:Object(i.without)(j.b,"woocommerce/product-new"),transform:e=>Object(n.createBlock)("woocommerce/product-new",e)}]},edit:e=>Object(c.createElement)(f,e),save:()=>null})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor},90:function(e,t,r){"use strict";var c=r(7),o=r.n(c),n=r(0),i=r(1),l=(r(2),r(40)),a=r(4),s=r(12),u=r(34),d=r(35),b=Object(s.createHigherOrderComponent)(e=>class extends n.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(u.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(d.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:r,categories:c}=this.state;return Object(n.createElement)(e,o()({},this.props,{error:t,isLoading:r,categories:c}))}},"withCategories"),g=r(41),p=r(5),h=r.n(p);r(124);const w=e=>{let{categories:t,error:r,isLoading:c,onChange:s,onOperatorChange:u,operator:d,selected:b,isCompact:p,isSingle:w,showReviewCount:E}=e;const m={clear:Object(i.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(i.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(i.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(i.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(i.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(i._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(i.__)("Category search results updated.","woo-gutenberg-products-block")};return r?Object(n.createElement)(g.a,{error:r}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(l.b,{className:"woocommerce-product-categories",list:t,isLoading:c,selected:b.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:s,renderItem:e=>{const{item:t,search:r,depth:c=0}=e,a=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,s=E?Object(i.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(i._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),a,t.review_count):Object(i.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(i._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),a,t.count),u=E?Object(i.sprintf)( +/* translators: %d is the count of reviews. */ +Object(i._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(i.sprintf)( +/* translators: %d is the count of products. */ +Object(i._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(n.createElement)(l.c,o()({className:h()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===c&&0!==t.parent})},e,{countLabel:u,"aria-label":s}))},messages:m,isCompact:p,isHierarchical:!0,isSingle:w}),!!u&&Object(n.createElement)("div",{hidden:b.length<2},Object(n.createElement)(a.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(i.__)("Display products matching","woo-gutenberg-products-block"),help:Object(i.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:d,onChange:u,options:[{label:Object(i.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(i.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};w.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=b(w)}}); \ No newline at end of file diff --git a/build/product-on-sale.asset.php b/build/product-on-sale.asset.php new file mode 100644 index 00000000000..6a8e334b0dc --- /dev/null +++ b/build/product-on-sale.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '63af288ca686a82fe6998ddef2b82b82'); \ No newline at end of file diff --git a/build/product-on-sale.js b/build/product-on-sale.js new file mode 100644 index 00000000000..298b9a5527a --- /dev/null +++ b/build/product-on-sale.js @@ -0,0 +1,11 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-on-sale"]=function(e){function t(t){for(var c,l,i=t[0],a=t[1],s=t[2],b=0,d=[];b{let{value:t,setAttributes:r}=e;return Object(c.createElement)(n.SelectControl,{label:Object(o.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(o.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(o.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(o.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(o.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(o.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(o.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(o.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:e=>r({orderby:e})})}},12:function(e,t){e.exports=window.wp.compose},124:function(e,t){},13:function(e,t){e.exports=window.wp.url},14:function(e,t){e.exports=window.wp.blocks},172:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var c=r(0);const o=Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(c.createElement)("title",null,"Grid Block Preview"),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},18:function(e,t){e.exports=window.wp.primitives},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},32:function(e,t,r){"use strict";r.d(t,"o",(function(){return n})),r.d(t,"m",(function(){return l})),r.d(t,"l",(function(){return i})),r.d(t,"n",(function(){return a})),r.d(t,"j",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return b})),r.d(t,"g",(function(){return d})),r.d(t,"k",(function(){return g})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return h})),r.d(t,"h",(function(){return w})),r.d(t,"a",(function(){return E})),r.d(t,"i",(function(){return m})),r.d(t,"b",(function(){return O}));var c,o=r(3);const n=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=n.pluginUrl+"images/",i=n.pluginUrl+"build/",a=n.buildPhase,s=null===(c=o.STORE_PAGES.shop)||void 0===c?void 0:c.permalink,u=o.STORE_PAGES.checkout.id,b=o.STORE_PAGES.checkout.permalink,d=o.STORE_PAGES.privacy.permalink,g=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),p=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),h=o.STORE_PAGES.cart.permalink,w=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),E=Object(o.getSetting)("allowedCountries",{}),m=Object(o.getSetting)("shippingStates",{}),O=Object(o.getSetting)("allowedStates",{})},34:function(e,t,r){"use strict";r.d(t,"h",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return b})),r.d(t,"i",(function(){return d})),r.d(t,"f",(function(){return g})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return h})),r.d(t,"g",(function(){return w})),r.d(t,"a",(function(){return E}));var c=r(13),o=r(11),n=r.n(o),l=r(6),i=r(3),a=r(32);const s=e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const i=(e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const n=a.o.productCount>100,l={per_page:n?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},i=[Object(c.addQueryArgs)("/wc/store/products",{...l,...o})];return n&&t.length&&i.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:r,queryArgs:o});return Promise.all(i.map(e=>n()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),b=()=>n()({path:"wc/store/products/attributes"}),d=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:r}=e;const o=(e=>{let{selected:t=[],search:r}=e;const o=Object(i.getSetting)("limitTags",!1),n=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:r})];return o&&t.length&&n.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:r});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},p=e=>n()({path:Object(c.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>n()({path:"wc/store/products/categories/"+e}),w=e=>n()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return n}));var c=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(39);t.a=e=>{let{error:t}=e;return Object(c.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var c=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:r,height:r,...o}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},751:function(e,t,r){e.exports=r(872)},752:function(e,t){},753:function(e,t,r){"use strict";var c=r(0),o=r(18);const n=Object(c.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}),Object(c.createElement)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),Object(c.createElement)("path",{d:"M8.9 12.55c0 .57.23 1.07.6 1.45l3.5 3.5 3.5-3.5c.37-.37.6-.89.6-1.45 0-1.13-.92-2.05-2.05-2.05-.57 0-1.08.23-1.45.6l-.6.6-.6-.59c-.37-.38-.89-.61-1.45-.61-1.13 0-2.05.92-2.05 2.05z"}));t.a=n},76:function(e,t){e.exports=window.wp.serverSideRender},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},84:function(e,t,r){"use strict";var c=r(0),o=r(1),n=(r(2),r(4));t.a=e=>{let{onChange:t,settings:r}=e;const{button:l,price:i,rating:a,title:s}=r;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product title","woo-gutenberg-products-block"),help:s?Object(o.__)("Product title is visible.","woo-gutenberg-products-block"):Object(o.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...r,title:!s})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product price","woo-gutenberg-products-block"),help:i?Object(o.__)("Product price is visible.","woo-gutenberg-products-block"):Object(o.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...r,price:!i})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(o.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(o.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...r,rating:!a})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(o.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(o.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...r,button:!l})}))}},85:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(6),l=(r(2),r(4));t.a=e=>{let{columns:t,rows:r,setAttributes:i,alignButtons:a,minColumns:s=1,maxColumns:u=6,minRows:b=1,maxRows:d=6}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(n.clamp)(e,s,u);i({columns:Number.isNaN(t)?"":t})},min:s,max:u}),Object(c.createElement)(l.RangeControl,{label:Object(o.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:e=>{const t=Object(n.clamp)(e,b,d);i({rows:Number.isNaN(t)?"":t})},min:b,max:d}),Object(c.createElement)(l.ToggleControl,{label:Object(o.__)("Align Last Block","woo-gutenberg-products-block"),help:a?Object(o.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:a,onChange:()=>i({alignButtons:!a})}))}},872:function(e,t,r){"use strict";r.r(t);var c=r(0),o=r(1),n=r(14),l=r(6),i=r(55),a=r(753),s=r(4),u=r(9),b=r(76),d=r.n(b),g=(r(2),r(84)),p=r(85),h=r(90),w=r(119),E=r(172),m=r(3);const O=()=>Object(c.createElement)(s.Placeholder,{icon:Object(c.createElement)(i.a,{srcElement:a.a}),label:Object(o.__)("On Sale Products","woo-gutenberg-products-block"),className:"wc-block-product-on-sale"},Object(o.__)("This block shows on-sale products. There are currently no discounted products in your store.","woo-gutenberg-products-block"));class f extends c.Component{getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{categories:r,catOperator:n,columns:l,contentVisibility:i,rows:a,orderby:b,alignButtons:d}=e;return Object(c.createElement)(u.InspectorControls,{key:"inspector"},Object(c.createElement)(s.PanelBody,{title:Object(o.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(p.a,{columns:l,rows:a,alignButtons:d,setAttributes:t,minColumns:Object(m.getSetting)("min_columns",1),maxColumns:Object(m.getSetting)("max_columns",6),minRows:Object(m.getSetting)("min_rows",1),maxRows:Object(m.getSetting)("max_rows",6)})),Object(c.createElement)(s.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(g.a,{settings:i,onChange:e=>t({contentVisibility:e})})),Object(c.createElement)(s.PanelBody,{title:Object(o.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(w.a,{setAttributes:t,value:b})),Object(c.createElement)(s.PanelBody,{title:Object(o.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(h.a,{selected:r,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=e.map(e=>{let{id:t}=e;return t});t({categories:r})},operator:n,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({catOperator:e})}})))}render(){const{attributes:e,name:t}=this.props;return e.isPreview?E.a:Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(s.Disabled,null,Object(c.createElement)(d.a,{block:t,attributes:e,EmptyResponsePlaceholder:O})))}}var j=f,y=(r(752),r(101));Object(n.registerBlockType)("woocommerce/product-on-sale",{title:Object(o.__)("On Sale Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(i.a,{srcElement:a.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a grid of products currently on sale.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{...y.a,orderby:{type:"string",default:"date"}},example:{attributes:{isPreview:!0}},transforms:{from:[{type:"block",blocks:Object(l.without)(y.b,"woocommerce/product-on-sale"),transform:e=>Object(n.createBlock)("woocommerce/product-on-sale",e)}]},edit:e=>Object(c.createElement)(j,e),save:()=>null})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor},90:function(e,t,r){"use strict";var c=r(7),o=r.n(c),n=r(0),l=r(1),i=(r(2),r(40)),a=r(4),s=r(12),u=r(34),b=r(35),d=Object(s.createHigherOrderComponent)(e=>class extends n.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(u.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(b.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:r,categories:c}=this.state;return Object(n.createElement)(e,o()({},this.props,{error:t,isLoading:r,categories:c}))}},"withCategories"),g=r(41),p=r(5),h=r.n(p);r(124);const w=e=>{let{categories:t,error:r,isLoading:c,onChange:s,onOperatorChange:u,operator:b,selected:d,isCompact:p,isSingle:w,showReviewCount:E}=e;const m={clear:Object(l.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(l.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(l.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(l.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(l.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(l._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(l.__)("Category search results updated.","woo-gutenberg-products-block")};return r?Object(n.createElement)(g.a,{error:r}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.b,{className:"woocommerce-product-categories",list:t,isLoading:c,selected:d.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:s,renderItem:e=>{const{item:t,search:r,depth:c=0}=e,a=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,s=E?Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(l._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),a,t.review_count):Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(l._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),a,t.count),u=E?Object(l.sprintf)( +/* translators: %d is the count of reviews. */ +Object(l._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(l.sprintf)( +/* translators: %d is the count of products. */ +Object(l._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(n.createElement)(i.c,o()({className:h()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===c&&0!==t.parent})},e,{countLabel:u,"aria-label":s}))},messages:m,isCompact:p,isHierarchical:!0,isSingle:w}),!!u&&Object(n.createElement)("div",{hidden:d.length<2},Object(n.createElement)(a.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(l.__)("Display products matching","woo-gutenberg-products-block"),help:Object(l.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:b,onChange:u,options:[{label:Object(l.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(l.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};w.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=d(w)}}); \ No newline at end of file diff --git a/build/product-search.asset.php b/build/product-search.asset.php new file mode 100644 index 00000000000..880832bd785 --- /dev/null +++ b/build/product-search.asset.php @@ -0,0 +1 @@ + array('wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'bd4ce77e483025945e53eb9585f47ab1'); \ No newline at end of file diff --git a/build/product-search.js b/build/product-search.js new file mode 100644 index 00000000000..9d041ee75f1 --- /dev/null +++ b/build/product-search.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-search"]=function(e){function t(t){for(var r,n,a=t[0],s=t[1],b=t[2],u=0,d=[];u{let{attributes:{label:t,placeholder:c,formId:l,className:n,hasLabel:a,align:s}}=e;const u=b()("wc-block-product-search",s?"align"+s:"",n);return Object(r.createElement)("div",{className:u},Object(r.createElement)("form",{role:"search",method:"get",action:i.HOME_URL},Object(r.createElement)("label",{htmlFor:l,className:a?"wc-block-product-search__label":"wc-block-product-search__label screen-reader-text"},t),Object(r.createElement)("div",{className:"wc-block-product-search__fields"},Object(r.createElement)("input",{type:"search",id:l,className:"wc-block-product-search__field",placeholder:c,name:"s"}),Object(r.createElement)("input",{type:"hidden",name:"post_type",value:"product"}),Object(r.createElement)("button",{type:"submit",className:"wc-block-product-search__button",label:Object(o.__)("Search","woo-gutenberg-products-block")},Object(r.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(r.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"}))))))},d=c(9),p=c(4),h=c(12),w=Object(h.withInstanceId)(e=>{let{attributes:{label:t,placeholder:c,formId:l,className:n,hasLabel:a,align:s},instanceId:i,setAttributes:u}=e;const h=b()("wc-block-product-search",s?"align"+s:"",n);return Object(r.useEffect)(()=>{l||u({formId:"wc-block-product-search-"+i})},[l,u,i]),Object(r.createElement)(r.Fragment,null,Object(r.createElement)(d.InspectorControls,{key:"inspector"},Object(r.createElement)(p.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(p.ToggleControl,{label:Object(o.__)("Show search field label","woo-gutenberg-products-block"),help:a?Object(o.__)("Label is visible.","woo-gutenberg-products-block"):Object(o.__)("Label is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>u({hasLabel:!a})}))),Object(r.createElement)("div",{className:h},!!a&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("label",{className:"screen-reader-text",htmlFor:"wc-block-product-search__label"},Object(o.__)("Search Label","woo-gutenberg-products-block")),Object(r.createElement)(d.PlainText,{className:"wc-block-product-search__label",id:"wc-block-product-search__label",value:t,onChange:e=>u({label:e})})),Object(r.createElement)("div",{className:"wc-block-product-search__fields"},Object(r.createElement)(p.TextControl,{className:"wc-block-product-search__field input-control",value:c,placeholder:Object(o.__)("Enter search placeholder text","woo-gutenberg-products-block"),onChange:e=>u({placeholder:e})}),Object(r.createElement)("button",{type:"submit",className:"wc-block-product-search__button",label:Object(o.__)("Search","woo-gutenberg-products-block"),onClick:e=>e.preventDefault(),tabIndex:"-1"},Object(r.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(r.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"}))))))});const m={hasLabel:{type:"boolean",default:!0},label:{type:"string",default:Object(o.__)("Search","woo-gutenberg-products-block")},placeholder:{type:"string",default:Object(o.__)("Search products…","woo-gutenberg-products-block")},formId:{type:"string",default:""}};Object(l.registerBlockType)("woocommerce/product-search",{title:Object(o.__)("Product Search","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(n.a,{srcElement:a.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("A search box to allow customers to search for products by keyword.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},example:{attributes:{hasLabel:!0}},attributes:m,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:c}=e;return"woocommerce_product_search"===t&&!(null==c||!c.raw)},transform:e=>{let{instance:t}=e;return Object(l.createBlock)("woocommerce/product-search",{label:""===t.raw.title?Object(o.__)("Search","woo-gutenberg-products-block"):t.raw.title})}}]},deprecated:[{attributes:m,save:e=>Object(r.createElement)("div",null,Object(r.createElement)(u,e))}],edit:w,save:()=>null})},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/product-tag.asset.php b/build/product-tag.asset.php new file mode 100644 index 00000000000..a4708576ffe --- /dev/null +++ b/build/product-tag.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '200a870f1931c6d08b82f57543c05a9c'); \ No newline at end of file diff --git a/build/product-tag.js b/build/product-tag.js new file mode 100644 index 00000000000..210d1a7dfa8 --- /dev/null +++ b/build/product-tag.js @@ -0,0 +1,5 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-tag"]=function(e){function t(t){for(var c,i,l=t[0],s=t[1],a=t[2],d=0,b=[];d{let{value:t,setAttributes:r}=e;return Object(c.createElement)(n.SelectControl,{label:Object(o.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(o.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(o.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(o.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(o.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(o.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(o.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(o.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:e=>r({orderby:e})})}},12:function(e,t){e.exports=window.wp.compose},13:function(e,t){e.exports=window.wp.url},14:function(e,t){e.exports=window.wp.blocks},172:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var c=r(0);const o=Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(c.createElement)("title",null,"Grid Block Preview"),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},18:function(e,t){e.exports=window.wp.primitives},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},32:function(e,t,r){"use strict";r.d(t,"o",(function(){return n})),r.d(t,"m",(function(){return i})),r.d(t,"l",(function(){return l})),r.d(t,"n",(function(){return s})),r.d(t,"j",(function(){return a})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return g})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return p})),r.d(t,"h",(function(){return E})),r.d(t,"a",(function(){return w})),r.d(t,"i",(function(){return m})),r.d(t,"b",(function(){return O}));var c,o=r(3);const n=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=n.pluginUrl+"images/",l=n.pluginUrl+"build/",s=n.buildPhase,a=null===(c=o.STORE_PAGES.shop)||void 0===c?void 0:c.permalink,u=o.STORE_PAGES.checkout.id,d=o.STORE_PAGES.checkout.permalink,b=o.STORE_PAGES.privacy.permalink,g=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),h=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),p=o.STORE_PAGES.cart.permalink,E=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),w=Object(o.getSetting)("allowedCountries",{}),m=Object(o.getSetting)("shippingStates",{}),O=Object(o.getSetting)("allowedStates",{})},34:function(e,t,r){"use strict";r.d(t,"h",(function(){return a})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return g})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return p})),r.d(t,"g",(function(){return E})),r.d(t,"a",(function(){return w}));var c=r(13),o=r(11),n=r.n(o),i=r(6),l=r(3),s=r(32);const a=e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const l=(e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const n=s.o.productCount>100,i={per_page:n?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},l=[Object(c.addQueryArgs)("/wc/store/products",{...i,...o})];return n&&t.length&&l.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),l})({selected:t,search:r,queryArgs:o});return Promise.all(l.map(e=>n()({path:e}))).then(e=>Object(i.uniqBy)(Object(i.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),b=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:r}=e;const o=(e=>{let{selected:t=[],search:r}=e;const o=Object(l.getSetting)("limitTags",!1),n=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:r})];return o&&t.length&&n.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:r});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(i.uniqBy)(Object(i.flatten)(e),"id"))},h=e=>n()({path:Object(c.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),p=e=>n()({path:"wc/store/products/categories/"+e}),E=e=>n()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),w=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},38:function(e,t){e.exports=window.wp.keycodes},4:function(e,t){e.exports=window.wp.components},45:function(e,t){e.exports=window.wp.hooks},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var c=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:r,height:r,...o}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},76:function(e,t){e.exports=window.wp.serverSideRender},768:function(e,t,r){e.exports=r(862)},769:function(e,t){},770:function(e,t){},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},84:function(e,t,r){"use strict";var c=r(0),o=r(1),n=(r(2),r(4));t.a=e=>{let{onChange:t,settings:r}=e;const{button:i,price:l,rating:s,title:a}=r;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product title","woo-gutenberg-products-block"),help:a?Object(o.__)("Product title is visible.","woo-gutenberg-products-block"):Object(o.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...r,title:!a})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product price","woo-gutenberg-products-block"),help:l?Object(o.__)("Product price is visible.","woo-gutenberg-products-block"):Object(o.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...r,price:!l})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(o.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(o.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...r,rating:!s})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Add to Cart button","woo-gutenberg-products-block"),help:i?Object(o.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(o.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...r,button:!i})}))}},85:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(6),i=(r(2),r(4));t.a=e=>{let{columns:t,rows:r,setAttributes:l,alignButtons:s,minColumns:a=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(n.clamp)(e,a,u);l({columns:Number.isNaN(t)?"":t})},min:a,max:u}),Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:e=>{const t=Object(n.clamp)(e,d,b);l({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(c.createElement)(i.ToggleControl,{label:Object(o.__)("Align Last Block","woo-gutenberg-products-block"),help:s?Object(o.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:s,onChange:()=>l({alignButtons:!s})}))}},862:function(e,t,r){"use strict";r.r(t);var c=r(0),o=r(1),n=r(14),i=r(3),l=r(55),s=r(18),a=Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.97.89 1.66.89H22c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7.07L2.4 12l4.66-7H22v14z"}),Object(c.createElement)("circle",{cx:"9",cy:"12",r:"1.5"}),Object(c.createElement)("circle",{cx:"14",cy:"12",r:"1.5"}),Object(c.createElement)("circle",{cx:"19",cy:"12",r:"1.5"})),u=(r(769),r(9)),d=r(76),b=r.n(d),g=r(4),h=(r(2),r(84)),p=r(85),E=r(7),w=r.n(E),m=r(6),O=r(40),j=r(5),f=r.n(j),_=r(34);r(770);class x extends c.Component{constructor(){super(...arguments),this.state={list:[],loading:!0},this.renderItem=this.renderItem.bind(this),this.debouncedOnSearch=Object(m.debounce)(this.onSearch.bind(this),400)}componentDidMount(){const{selected:e}=this.props;Object(_.f)({selected:e}).then(e=>{this.setState({list:e,loading:!1})}).catch(()=>{this.setState({list:[],loading:!1})})}onSearch(e){const{selected:t}=this.props;this.setState({loading:!0}),Object(_.f)({selected:t,search:e}).then(e=>{this.setState({list:e,loading:!1})}).catch(()=>{this.setState({list:[],loading:!1})})}renderItem(e){const{item:t,search:r,depth:n=0}=e,i=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name;return Object(c.createElement)(O.c,w()({className:f()("woocommerce-product-tags__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===n&&0!==t.parent})},e,{"aria-label":Object(o.sprintf)( +/* translators: %1$d is the count of products, %2$s is the name of the tag. */ +Object(o._n)("%1$d product tagged as %2$s","%1$d products tagged as %2$s",t.count,"woo-gutenberg-products-block"),t.count,i)}))}render(){const{list:e,loading:t}=this.state,{isCompact:r,onChange:n,onOperatorChange:l,operator:s,selected:a}=this.props,u={clear:Object(o.__)("Clear all product tags","woo-gutenberg-products-block"),list:Object(o.__)("Product Tags","woo-gutenberg-products-block"),noItems:Object(o.__)("Your store doesn't have any product tags.","woo-gutenberg-products-block"),search:Object(o.__)("Search for product tags","woo-gutenberg-products-block"),selected:e=>Object(o.sprintf)( +/* translators: %d is the count of selected tags. */ +Object(o._n)("%d tag selected","%d tags selected",e,"woo-gutenberg-products-block"),e),updated:Object(o.__)("Tag search results updated.","woo-gutenberg-products-block")},d=Object(i.getSetting)("limitTags",!1);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(O.b,{className:"woocommerce-product-tags",list:e,isLoading:t,selected:a.map(t=>e.find(e=>e.id===t)).filter(Boolean),onChange:n,onSearch:d?this.debouncedOnSearch:null,renderItem:this.renderItem,messages:u,isCompact:r,isHierarchical:!0}),!!l&&Object(c.createElement)("div",{hidden:a.length<2},Object(c.createElement)(g.SelectControl,{className:"woocommerce-product-tags__operator",label:Object(o.__)("Display products matching","woo-gutenberg-products-block"),help:Object(o.__)("Pick at least two tags to use this setting.","woo-gutenberg-products-block"),value:s,onChange:l,options:[{label:Object(o.__)("Any selected tags","woo-gutenberg-products-block"),value:"any"},{label:Object(o.__)("All selected tags","woo-gutenberg-products-block"),value:"all"}]})))}}x.defaultProps={isCompact:!1,operator:"any"};var y=x,k=r(119),v=r(172);class S extends c.Component{constructor(){super(...arguments),this.state={changedAttributes:{},isEditing:!1},this.startEditing=this.startEditing.bind(this),this.stopEditing=this.stopEditing.bind(this),this.setChangedAttributes=this.setChangedAttributes.bind(this),this.save=this.save.bind(this)}componentDidMount(){const{attributes:e}=this.props;e.tags.length||this.setState({isEditing:!0})}startEditing(){this.setState({isEditing:!0,changedAttributes:{}})}stopEditing(){this.setState({isEditing:!1,changedAttributes:{}})}setChangedAttributes(e){this.setState(t=>({changedAttributes:{...t.changedAttributes,...e}}))}save(){const{changedAttributes:e}=this.state,{setAttributes:t}=this.props;t(e),this.stopEditing()}getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{isEditing:r}=this.state,{columns:n,tagOperator:l,contentVisibility:s,orderby:a,rows:d,alignButtons:b}=e;return Object(c.createElement)(u.InspectorControls,{key:"inspector"},Object(c.createElement)(g.PanelBody,{title:Object(o.__)("Product Tag","woo-gutenberg-products-block"),initialOpen:!e.tags.length&&!r},Object(c.createElement)(y,{selected:e.tags,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=e.map(e=>{let{id:t}=e;return t});t({tags:r})},operator:l,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({tagOperator:e})},isCompact:!0})),Object(c.createElement)(g.PanelBody,{title:Object(o.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(p.a,{columns:n,rows:d,alignButtons:b,setAttributes:t,minColumns:Object(i.getSetting)("min_columns",1),maxColumns:Object(i.getSetting)("max_columns",6),minRows:Object(i.getSetting)("min_rows",1),maxRows:Object(i.getSetting)("max_rows",6)})),Object(c.createElement)(g.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(h.a,{settings:s,onChange:e=>t({contentVisibility:e})})),Object(c.createElement)(g.PanelBody,{title:Object(o.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(k.a,{setAttributes:t,value:a})))}renderEditMode(){var e=this;const{attributes:t,debouncedSpeak:r}=this.props,{changedAttributes:n}=this.state,i={...t,...n};return Object(c.createElement)(g.Placeholder,{icon:Object(c.createElement)(l.a,{srcElement:a,className:"block-editor-block-icon"}),label:Object(o.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(o.__)("Display a grid of products from your selected tags.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-product-tag__selection"},Object(c.createElement)(y,{selected:i.tags,onChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=t.map(e=>{let{id:t}=e;return t});e.setChangedAttributes({tags:r})},operator:i.tagOperator,onOperatorChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({tagOperator:t})}}),Object(c.createElement)(g.Button,{isPrimary:!0,onClick:()=>{this.save(),r(Object(o.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block")),Object(c.createElement)(g.Button,{className:"wc-block-product-tag__cancel-button",isTertiary:!0,onClick:()=>{this.stopEditing(),r(Object(o.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Cancel","woo-gutenberg-products-block"))))}renderViewMode(){const{attributes:e,name:t}=this.props,r=e.tags.length;return Object(c.createElement)(g.Disabled,null,r?Object(c.createElement)(b.a,{block:t,attributes:e}):Object(c.createElement)(g.Placeholder,{icon:Object(c.createElement)(l.a,{icon:a,className:"block-editor-block-icon"}),label:Object(o.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(o.__)("This block displays products from selected tags. Select at least one tag to display its products.","woo-gutenberg-products-block")))}render(){const{isEditing:e}=this.state,{attributes:t}=this.props;return t.isPreview?v.a:Object(i.getSetting)("hasTags",!0)?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.BlockControls,null,Object(c.createElement)(g.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit selected tags","woo-gutenberg-products-block"),onClick:()=>e?this.stopEditing():this.startEditing(),isActive:e}]})),this.getInspectorControls(),e?this.renderEditMode():this.renderViewMode()):Object(c.createElement)(g.Placeholder,{icon:Object(c.createElement)(l.a,{icon:a,className:"block-editor-block-icon"}),label:Object(o.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(o.__)("This block displays products from selected tags. In order to preview this you'll first need to create a product and assign it some tags.","woo-gutenberg-products-block"))}}var C=Object(g.withSpokenMessages)(S);Object(n.registerBlockType)("woocommerce/product-tag",{title:Object(o.__)("Products by Tag","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{srcElement:a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a grid of products with selected tags.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number",default:Object(i.getSetting)("default_columns",3)},rows:{type:"number",default:Object(i.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},tags:{type:"array",default:[]},tagOperator:{type:"string",default:"any"},orderby:{type:"string",default:"date"},isPreview:{type:"boolean",default:!1}},edit:e=>Object(c.createElement)(C,e),save:()=>null})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/product-top-rated.asset.php b/build/product-top-rated.asset.php new file mode 100644 index 00000000000..4127a285566 --- /dev/null +++ b/build/product-top-rated.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => 'e13c9fa5e35575e512b4fdbf080d5bd3'); \ No newline at end of file diff --git a/build/product-top-rated.js b/build/product-top-rated.js new file mode 100644 index 00000000000..b5ff20f4c7d --- /dev/null +++ b/build/product-top-rated.js @@ -0,0 +1,11 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-top-rated"]=function(e){function t(t){for(var c,i,l=t[0],a=t[1],s=t[2],d=0,b=[];d{let{selected:t=[],search:r="",queryArgs:o={}}=e;const l=(e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const n=a.o.productCount>100,i={per_page:n?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},l=[Object(c.addQueryArgs)("/wc/store/products",{...i,...o})];return n&&t.length&&l.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),l})({selected:t,search:r,queryArgs:o});return Promise.all(l.map(e=>n()({path:e}))).then(e=>Object(i.uniqBy)(Object(i.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),b=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:r}=e;const o=(e=>{let{selected:t=[],search:r}=e;const o=Object(l.getSetting)("limitTags",!1),n=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:r})];return o&&t.length&&n.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:r});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(i.uniqBy)(Object(i.flatten)(e),"id"))},p=e=>n()({path:Object(c.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>n()({path:"wc/store/products/categories/"+e}),w=e=>n()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return n}));var c=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(39);t.a=e=>{let{error:t}=e;return Object(c.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var c=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:r,height:r,...o}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},754:function(e,t,r){e.exports=r(868)},76:function(e,t){e.exports=window.wp.serverSideRender},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},84:function(e,t,r){"use strict";var c=r(0),o=r(1),n=(r(2),r(4));t.a=e=>{let{onChange:t,settings:r}=e;const{button:i,price:l,rating:a,title:s}=r;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product title","woo-gutenberg-products-block"),help:s?Object(o.__)("Product title is visible.","woo-gutenberg-products-block"):Object(o.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...r,title:!s})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product price","woo-gutenberg-products-block"),help:l?Object(o.__)("Product price is visible.","woo-gutenberg-products-block"):Object(o.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...r,price:!l})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(o.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(o.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...r,rating:!a})}),Object(c.createElement)(n.ToggleControl,{label:Object(o.__)("Add to Cart button","woo-gutenberg-products-block"),help:i?Object(o.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(o.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...r,button:!i})}))}},85:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(6),i=(r(2),r(4));t.a=e=>{let{columns:t,rows:r,setAttributes:l,alignButtons:a,minColumns:s=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(n.clamp)(e,s,u);l({columns:Number.isNaN(t)?"":t})},min:s,max:u}),Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:e=>{const t=Object(n.clamp)(e,d,b);l({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(c.createElement)(i.ToggleControl,{label:Object(o.__)("Align Last Block","woo-gutenberg-products-block"),help:a?Object(o.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:a,onChange:()=>l({alignButtons:!a})}))}},868:function(e,t,r){"use strict";r.r(t);var c=r(0),o=r(1),n=r(14),i=r(55),l=r(18),a=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{opacity:".87",fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M21 8h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2zm0 4l-3 7H9V9l4.34-4.34L12.23 10H21v2zM1 9h4v12H1z"})),s=r(6),u=r(4),d=r(9),b=r(76),g=r.n(b),p=(r(2),r(84)),h=r(85),w=r(90),E=r(172),m=r(3);class O extends c.Component{getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{categories:r,catOperator:n,columns:i,contentVisibility:l,rows:a,alignButtons:s}=e;return Object(c.createElement)(d.InspectorControls,{key:"inspector"},Object(c.createElement)(u.PanelBody,{title:Object(o.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(h.a,{columns:i,rows:a,alignButtons:s,setAttributes:t,minColumns:Object(m.getSetting)("min_columns",1),maxColumns:Object(m.getSetting)("max_columns",6),minRows:Object(m.getSetting)("min_rows",1),maxRows:Object(m.getSetting)("max_rows",6)})),Object(c.createElement)(u.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(p.a,{settings:l,onChange:e=>t({contentVisibility:e})})),Object(c.createElement)(u.PanelBody,{title:Object(o.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(w.a,{selected:r,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=e.map(e=>{let{id:t}=e;return t});t({categories:r})},operator:n,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({catOperator:e})}})))}render(){const{name:e,attributes:t}=this.props;return t.isPreview?E.a:Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(u.Disabled,null,Object(c.createElement)(g.a,{block:e,attributes:t})))}}var f=O,j=r(101);Object(n.registerBlockType)("woocommerce/product-top-rated",{title:Object(o.__)("Top Rated Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(i.a,{srcElement:a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a grid of your top rated products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{...j.a},transforms:{from:[{type:"block",blocks:Object(s.without)(j.b,"woocommerce/product-top-rated"),transform:e=>Object(n.createBlock)("woocommerce/product-top-rated",e)}]},edit:e=>Object(c.createElement)(f,e),save:()=>null})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor},90:function(e,t,r){"use strict";var c=r(7),o=r.n(c),n=r(0),i=r(1),l=(r(2),r(40)),a=r(4),s=r(12),u=r(34),d=r(35),b=Object(s.createHigherOrderComponent)(e=>class extends n.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(u.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(d.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:r,categories:c}=this.state;return Object(n.createElement)(e,o()({},this.props,{error:t,isLoading:r,categories:c}))}},"withCategories"),g=r(41),p=r(5),h=r.n(p);r(124);const w=e=>{let{categories:t,error:r,isLoading:c,onChange:s,onOperatorChange:u,operator:d,selected:b,isCompact:p,isSingle:w,showReviewCount:E}=e;const m={clear:Object(i.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(i.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(i.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(i.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(i.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(i._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(i.__)("Category search results updated.","woo-gutenberg-products-block")};return r?Object(n.createElement)(g.a,{error:r}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(l.b,{className:"woocommerce-product-categories",list:t,isLoading:c,selected:b.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:s,renderItem:e=>{const{item:t,search:r,depth:c=0}=e,a=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,s=E?Object(i.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(i._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),a,t.review_count):Object(i.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(i._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),a,t.count),u=E?Object(i.sprintf)( +/* translators: %d is the count of reviews. */ +Object(i._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(i.sprintf)( +/* translators: %d is the count of products. */ +Object(i._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(n.createElement)(l.c,o()({className:h()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===c&&0!==t.parent})},e,{countLabel:u,"aria-label":s}))},messages:m,isCompact:p,isHierarchical:!0,isSingle:w}),!!u&&Object(n.createElement)("div",{hidden:b.length<2},Object(n.createElement)(a.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(i.__)("Display products matching","woo-gutenberg-products-block"),help:Object(i.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:d,onChange:u,options:[{label:Object(i.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(i.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};w.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=b(w)}}); \ No newline at end of file diff --git a/build/products-by-attribute.asset.php b/build/products-by-attribute.asset.php new file mode 100644 index 00000000000..38cd2fff245 --- /dev/null +++ b/build/products-by-attribute.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '742da225eecd58d2097b4ccd7231842c'); \ No newline at end of file diff --git a/build/products-by-attribute.js b/build/products-by-attribute.js new file mode 100644 index 00000000000..5f2ed0114f3 --- /dev/null +++ b/build/products-by-attribute.js @@ -0,0 +1,11 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["products-by-attribute"]=function(e){function t(t){for(var c,l,i=t[0],a=t[1],s=t[2],b=0,d=[];b{let{value:t,setAttributes:r}=e;return Object(c.createElement)(o.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:e=>r({orderby:e})})}},12:function(e,t){e.exports=window.wp.compose},120:function(e,t,r){"use strict";var c=r(7),n=r.n(c),o=r(0),l=r(40),i=r(4),a=r(5),s=r.n(a);t.a=e=>{let{className:t,item:r,isSelected:c,isLoading:a,onSelect:u,disabled:b,...d}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(l.c,n()({},d,{key:r.id,className:t,isSelected:c,item:r,onSelect:u,isSingle:!0,disabled:b})),c&&a&&Object(o.createElement)("div",{key:"loading",className:s()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(o.createElement)(i.Spinner,null)))}},13:function(e,t){e.exports=window.wp.url},14:function(e,t){e.exports=window.wp.blocks},172:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var c=r(0);const n=Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(c.createElement)("title",null,"Grid Block Preview"),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(c.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(c.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},18:function(e,t){e.exports=window.wp.primitives},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},32:function(e,t,r){"use strict";r.d(t,"o",(function(){return o})),r.d(t,"m",(function(){return l})),r.d(t,"l",(function(){return i})),r.d(t,"n",(function(){return a})),r.d(t,"j",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return b})),r.d(t,"g",(function(){return d})),r.d(t,"k",(function(){return g})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return h})),r.d(t,"h",(function(){return E})),r.d(t,"a",(function(){return w})),r.d(t,"i",(function(){return m})),r.d(t,"b",(function(){return O}));var c,n=r(3);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",i=o.pluginUrl+"build/",a=o.buildPhase,s=null===(c=n.STORE_PAGES.shop)||void 0===c?void 0:c.permalink,u=n.STORE_PAGES.checkout.id,b=n.STORE_PAGES.checkout.permalink,d=n.STORE_PAGES.privacy.permalink,g=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),p=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),h=n.STORE_PAGES.cart.permalink,E=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),w=Object(n.getSetting)("allowedCountries",{}),m=Object(n.getSetting)("shippingStates",{}),O=Object(n.getSetting)("allowedStates",{})},34:function(e,t,r){"use strict";r.d(t,"h",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return b})),r.d(t,"i",(function(){return d})),r.d(t,"f",(function(){return g})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return h})),r.d(t,"g",(function(){return E})),r.d(t,"a",(function(){return w}));var c=r(13),n=r(11),o=r.n(n),l=r(6),i=r(3),a=r(32);const s=e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const i=(e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const o=a.o.productCount>100,l={per_page:o?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},i=[Object(c.addQueryArgs)("/wc/store/products",{...l,...n})];return o&&t.length&&i.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:r,queryArgs:n});return Promise.all(i.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),b=()=>o()({path:"wc/store/products/attributes"}),d=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:r}=e;const n=(e=>{let{selected:t=[],search:r}=e;const n=Object(i.getSetting)("limitTags",!1),o=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:r})];return n&&t.length&&o.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:r});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},p=e=>o()({path:Object(c.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>o()({path:"wc/store/products/categories/"+e}),E=e=>o()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),w=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));var c=r(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var c=r(0),n=r(1),o=r(39);t.a=e=>{let{error:t}=e;return Object(c.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(c.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(o.escapeHTML)(t))):"api"===r?Object(c.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(o.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var c=r(0);t.a=function(e){let{srcElement:t,size:r=24,...n}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:r,height:r,...n}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},755:function(e,t,r){e.exports=r(857)},756:function(e,t){},757:function(e,t){},76:function(e,t){e.exports=window.wp.serverSideRender},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},84:function(e,t,r){"use strict";var c=r(0),n=r(1),o=(r(2),r(4));t.a=e=>{let{onChange:t,settings:r}=e;const{button:l,price:i,rating:a,title:s}=r;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(o.ToggleControl,{label:Object(n.__)("Product title","woo-gutenberg-products-block"),help:s?Object(n.__)("Product title is visible.","woo-gutenberg-products-block"):Object(n.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...r,title:!s})}),Object(c.createElement)(o.ToggleControl,{label:Object(n.__)("Product price","woo-gutenberg-products-block"),help:i?Object(n.__)("Product price is visible.","woo-gutenberg-products-block"):Object(n.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...r,price:!i})}),Object(c.createElement)(o.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(n.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(n.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...r,rating:!a})}),Object(c.createElement)(o.ToggleControl,{label:Object(n.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(n.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(n.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...r,button:!l})}))}},85:function(e,t,r){"use strict";var c=r(0),n=r(1),o=r(6),l=(r(2),r(4));t.a=e=>{let{columns:t,rows:r,setAttributes:i,alignButtons:a,minColumns:s=1,maxColumns:u=6,minRows:b=1,maxRows:d=6}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(o.clamp)(e,s,u);i({columns:Number.isNaN(t)?"":t})},min:s,max:u}),Object(c.createElement)(l.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:e=>{const t=Object(o.clamp)(e,b,d);i({rows:Number.isNaN(t)?"":t})},min:b,max:d}),Object(c.createElement)(l.ToggleControl,{label:Object(n.__)("Align Last Block","woo-gutenberg-products-block"),help:a?Object(n.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:a,onChange:()=>i({alignButtons:!a})}))}},857:function(e,t,r){"use strict";r.r(t);var c=r(0),n=r(1),o=r(55),l=r(18),i=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M2.53 19.65l1.34.56v-9.03l-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61zm19.5-3.7L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6zm-9.2 3.8L7.87 7.79l7.35-3.04h.01l4.95 11.95-7.35 3.05z"}),Object(c.createElement)("circle",{cx:"11",cy:"9",r:"1"}),Object(c.createElement)("path",{d:"M5.88 19.75c0 1.1.9 2 2 2h1.45l-3.45-8.34v6.34z"})),a=r(14),s=r(3),u=(r(756),r(9)),b=r(76),d=r.n(b),g=r(4),p=(r(2),r(84)),h=r(85),E=r(7),w=r.n(E),m=r(40),O=r(12),j=r(34),f=r(35);const y=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";return Array.isArray(t)?t.find(t=>t[r]===e):null};var _=r(41),x=r(5),k=r.n(x),v=r(120);r(757);const S=e=>{let{attributes:t,error:r,expandedAttribute:o,onChange:l,onExpandAttribute:i,onOperatorChange:a,instanceId:s,isCompact:u,isLoading:b,operator:d,selected:p,termsAreLoading:h,termsList:E}=e;const O=[...t,...E[o]||[]],j={clear:Object(n.__)("Clear all product attributes","woo-gutenberg-products-block"),list:Object(n.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(n.__)("Search for product attributes","woo-gutenberg-products-block"),selected:e=>Object(n.sprintf)( +/* translators: %d is the count of attributes selected. */ +Object(n._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Product attribute search results updated.","woo-gutenberg-products-block")};return r?Object(c.createElement)(_.a,{error:r}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.b,{className:"woocommerce-product-attributes",list:O,isLoading:b,selected:p.map(e=>{let{id:t}=e;return O.find(e=>e.id===t)}).filter(Boolean),onChange:l,renderItem:e=>{const{item:t,search:r,depth:a=0}=e,u=["woocommerce-product-attributes__item","woocommerce-search-list__item",{"is-searching":r.length>0,"is-skip-level":0===a&&0!==t.parent}];if(!t.breadcrumbs.length){const r=o===t.id;return Object(c.createElement)(v.a,w()({},e,{className:k()(...u,{"is-selected":r}),isSelected:r,item:t,isLoading:h,disabled:"0"===t.count,onSelect:e=>{let{id:t}=e;return()=>{l([]),i(t)}},name:"attributes-"+s,countLabel:Object(n.sprintf)( +/* translators: %d is the count of terms. */ +Object(n._n)("%d term","%d terms",t.count,"woo-gutenberg-products-block"),t.count),"aria-label":Object(n.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of terms for the item. */ +Object(n._n)("%1$s, has %2$d term","%1$s, has %2$d terms",t.count,"woo-gutenberg-products-block"),t.name,t.count)}))}const b=`${t.breadcrumbs[0]}: ${t.name}`;return Object(c.createElement)(m.c,w()({},e,{name:"terms-"+s,className:k()(...u,"has-count"),countLabel:Object(n.sprintf)( +/* translators: %d is the count of products. */ +Object(n._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count),"aria-label":Object(n.sprintf)( +/* translators: %1$s is the attribute name, %2$d is the count of products for that attribute. */ +Object(n._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),b,t.count)}))},messages:j,isCompact:u,isHierarchical:!0}),!!a&&Object(c.createElement)("div",{hidden:p.length<2},Object(c.createElement)(g.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(n.__)("Display products matching","woo-gutenberg-products-block"),help:Object(n.__)("Pick at least two attributes to use this setting.","woo-gutenberg-products-block"),value:d,onChange:a,options:[{label:Object(n.__)("Any selected attributes","woo-gutenberg-products-block"),value:"any"},{label:Object(n.__)("All selected attributes","woo-gutenberg-products-block"),value:"all"}]})))};S.defaultProps={isCompact:!1,operator:"any"};var C,P=(C=Object(O.withInstanceId)(S),e=>{const{selected:t=[]}=e,r=t.length?t[0].attr_slug:null,[n,o]=Object(c.useState)(null),[l,i]=Object(c.useState)(0),[a,s]=Object(c.useState)({}),[u,b]=Object(c.useState)(!0),[d,g]=Object(c.useState)(!1),[p,h]=Object(c.useState)(null);return Object(c.useEffect)(()=>{null===n&&Object(j.b)().then(e=>{if(e=e.map(e=>({...e,parent:0})),o(e),r){const t=y(r,e,"taxonomy");t&&i(t.id)}}).catch(async e=>{h(await Object(f.a)(e))}).finally(()=>{b(!1)})},[n,r]),Object(c.useEffect)(()=>{const e=y(l,n);e&&(g(!0),Object(j.i)(l).then(t=>{t=t.map(t=>({...t,parent:l,attr_slug:e.taxonomy})),s(e=>({...e,[l]:t}))}).catch(async e=>{h(await Object(f.a)(e))}).finally(()=>{g(!1)}))},[l,n]),Object(c.createElement)(C,w()({},e,{attributes:n||[],error:p,expandedAttribute:l,onExpandAttribute:i,isLoading:u,termsAreLoading:d,termsList:a}))}),A=r(119),T=r(172);class R extends c.Component{getInspectorControls(){const{setAttributes:e}=this.props,{attributes:t,attrOperator:r,columns:o,contentVisibility:l,orderby:i,rows:a,alignButtons:b}=this.props.attributes;return Object(c.createElement)(u.InspectorControls,{key:"inspector"},Object(c.createElement)(g.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(h.a,{columns:o,rows:a,alignButtons:b,setAttributes:e,minColumns:Object(s.getSetting)("min_columns",1),maxColumns:Object(s.getSetting)("max_columns",6),minRows:Object(s.getSetting)("min_rows",1),maxRows:Object(s.getSetting)("max_rows",6)})),Object(c.createElement)(g.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(p.a,{settings:l,onChange:t=>e({contentVisibility:t})})),Object(c.createElement)(g.PanelBody,{title:Object(n.__)("Filter by Product Attribute","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(P,{selected:t,onChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=t.map(e=>{let{id:t,attr_slug:r}=e;return{id:t,attr_slug:r}});e({attributes:r})},operator:r,onOperatorChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e({attrOperator:t})},isCompact:!0})),Object(c.createElement)(g.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(A.a,{setAttributes:e,value:i})))}renderEditMode(){const{debouncedSpeak:e,setAttributes:t}=this.props,r=this.props.attributes;return Object(c.createElement)(g.Placeholder,{icon:Object(c.createElement)(o.a,{srcElement:i}),label:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-by-attribute"},Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-products-by-attribute__selection"},Object(c.createElement)(P,{selected:r.attributes,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=e.map(e=>{let{id:t,attr_slug:r}=e;return{id:t,attr_slug:r}});t({attributes:r})},operator:r.attrOperator,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({attrOperator:e})}}),Object(c.createElement)(g.Button,{isPrimary:!0,onClick:()=>{t({editMode:!1}),e(Object(n.__)("Showing Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))}render(){const{attributes:e,name:t,setAttributes:r}=this.props,{editMode:o}=e;return e.isPreview?T.a:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.BlockControls,null,Object(c.createElement)(g.ToolbarGroup,{controls:[{icon:"edit",title:Object(n.__)("Edit selected attribute","woo-gutenberg-products-block"),onClick:()=>r({editMode:!o}),isActive:o}]})),this.getInspectorControls(),o?this.renderEditMode():Object(c.createElement)(g.Disabled,null,Object(c.createElement)(d.a,{block:t,attributes:e})))}}var B=Object(g.withSpokenMessages)(R);Object(a.registerBlockType)("woocommerce/products-by-attribute",{title:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(o.a,{srcElement:i}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of products with selected attributes.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:Object(s.getSetting)("default_columns",3)},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:Object(s.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:e=>Object(c.createElement)(B,e),save:()=>null})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/reviews-by-category.asset.php b/build/reviews-by-category.asset.php new file mode 100644 index 00000000000..264f69c6779 --- /dev/null +++ b/build/reviews-by-category.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => 'b70baeed1049ff08eb76645823c06e7f'); \ No newline at end of file diff --git a/build/reviews-by-category.js b/build/reviews-by-category.js new file mode 100644 index 00000000000..0168c3c0abe --- /dev/null +++ b/build/reviews-by-category.js @@ -0,0 +1,17 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["reviews-by-category"]=function(e){function t(t){for(var o,a,s=t[0],i=t[1],l=t[2],u=0,b=[];u{let{className:t,error:r,isLoading:s=!1,onRetry:u}=e;return Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(c.a,{srcElement:a.a}),label:Object(n.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",t)},Object(o.createElement)(d.a,{error:r}),u&&Object(o.createElement)(o.Fragment,null,s?Object(o.createElement)(l.Spinner,null):Object(o.createElement)(l.Button,{isSecondary:!0,onClick:u},Object(n.__)("Retry","woo-gutenberg-products-block"))))}},11:function(e,t){e.exports=window.wp.apiFetch},115:function(e,t){},116:function(e,t){e.exports=window.wp.coreData},117:function(e,t){},12:function(e,t){e.exports=window.wp.compose},124:function(e,t){},127:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return u}));var o=r(0),n=r(1),c=r(4),a=r(9),s=r(3),i=r(80);const l=(e,t,r)=>Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),d=(e,t)=>{const r=Object(s.getSetting)("showAvatars",!0),a=Object(s.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!a&&Object(o.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Product rating is disabled in your store settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.a,{label:Object(n.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(n.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(n.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:e=>t({imageType:e})}),"reviewer"===e.imageType&&!r&&Object(o.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},u=(e,t)=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(o.createElement)(c.SelectControl,{label:Object(n.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:e=>t({orderby:e})}),Object(o.createElement)(c.RangeControl,{label:Object(n.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(o.createElement)(c.RangeControl,{label:Object(n.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))},13:function(e,t){e.exports=window.wp.url},136:function(e,t,r){"use strict";var o=r(0),n=r(18);const c=Object(o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},137:function(e,t){},138:function(e,t,r){"use strict";var o=r(0),n=(r(2),r(5)),c=r.n(n),a=r(37),s=r(12);r(193),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:r,label:n,onChange:s,options:i,screenReaderLabel:l,readOnly:d,value:u}=e;const b="wc-block-components-sort-select__select-"+r;return Object(o.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(a.a,{label:n,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(o.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,readOnly:d,value:u},i.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},14:function(e,t){e.exports=window.wp.blocks},145:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(1),n=r(32);const c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(o.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Alice","woo-gutenberg-products-block"),review:`

${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Bob","woo-gutenberg-products-block"),review:`

${Object(o.__)("This product is awesome, I love it!","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:null,verified:!1}]}}},176:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},177:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),a=r(9),s=(r(192),r(77));t.a=e=>{let{attributes:t}=e;return Object(c.createElement)("div",n()({},a.useBlockProps.save({className:Object(s.a)(t)}),Object(s.b)(t)))}},18:function(e,t){e.exports=window.wp.primitives},180:function(e,t,r){"use strict";var o=r(0),n=r(1),c=(r(2),r(6)),a=r(4),s=r(9),i=r(8),l=r(3),d=r(100),u=r(37);r(240);const b=e=>{let{onClick:t,label:r,screenReaderLabel:n}=e;return Object(o.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(o.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(o.createElement)(u.a,{label:r,screenReaderLabel:n})))};b.defaultProps={label:Object(n.__)("Load more","woo-gutenberg-products-block")};var w=b,p=r(138);r(237);var g=e=>{let{onChange:t,readOnly:r,value:c}=e;return Object(o.createElement)(p.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(n.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(n.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(n.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(n.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(n.__)("Order reviews by","woo-gutenberg-products-block"),value:c})},m=r(5),h=r.n(m),v=r(212),O=r.n(v);const _=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const o=O()(e,{suffix:r,limit:t});return o.html},j=(e,t,r,o)=>{const n=f(e,t,r);return _(e,n-o.length,o)},f=(e,t,r)=>{let o={start:0,middle:0,end:e.length};for(;o.start<=o.end;)o.middle=Math.floor((o.start+o.end)/2),t.innerHTML=_(e,o.middle),o=y(o,t.clientHeight,r);return o.middle},y=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e);class k extends i.Component{constructor(e){super(...arguments),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewSummary=Object(i.createRef)(),this.reviewContent=Object(i.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props,r=(this.reviewSummary.current.clientHeight+1)*e+1,o=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:o}),o&&this.setState({summary:j(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:n}=this.props,c=e?r:n;if(c)return Object(o.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:n,isExpanded:c}=this.state;return t?!1===n?Object(o.createElement)("div",{className:e},Object(o.createElement)("div",{ref:this.reviewContent},t)):Object(o.createElement)("div",{className:e},(!c||null===n)&&Object(o.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:r}}),(c||null===n)&&Object(o.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},t),this.getButton()):null}}k.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(n.__)("Read more","woo-gutenberg-products-block"),lessText:Object(n.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var E=k;r(239);var R=e=>{let{attributes:t,review:r={}}=e;const{imageType:c,showReviewDate:a,showReviewerName:s,showReviewImage:i,showReviewRating:l,showReviewContent:d,showProductName:u}=t,{rating:b}=r,w=!Object.keys(r).length>0,p=Number.isFinite(b)&&l;return Object(o.createElement)("li",{className:h()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":w,"wc-block-components-review-list-item__item--has-image":i}),"aria-hidden":w},(u||a||s||i||p)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},i&&function(e,t,r){var c,a;return r||!e?Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(o.createElement)("img",{"aria-hidden":"true",alt:(null===(c=e.product_image)||void 0===c?void 0:c.alt)||"",src:(null===(a=e.product_image)||void 0===a?void 0:a.thumbnail)||""}):Object(o.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(o.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(n.__)("Verified buyer","woo-gutenberg-products-block")},Object(n.__)("Verified buyer","woo-gutenberg-products-block")))}(r,c,w),(u||s||p||a)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},p&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},c=Object(n.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(n.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(o.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(o.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":c},Object(o.createElement)("span",{style:r},c)))}(r),u&&function(e){return Object(o.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(o.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),s&&function(e){const{reviewer:t=""}=e;return Object(o.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),a&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(o.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),d&&function(e){return Object(o.createElement)(E,{maxLines:10,moreText:Object(n.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(n.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(o.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(238);var C=e=>{let{attributes:t,reviews:r}=e;const n=Object(l.getSetting)("showAvatars",!0),c=Object(l.getSetting)("reviewRatingsEnabled",!0),a=(n||"product"===t.imageType)&&t.showReviewImage,s=c&&t.showReviewRating,i={...t,showReviewImage:a,showReviewRating:s};return Object(o.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(o.createElement)(R,{attributes:i}):r.map((e,t)=>Object(o.createElement)(R,{key:e.id||t,attributes:i,review:e})))},S=r(7),P=r.n(S),N=r(16),x=r.n(N),T=r(31),L=r.n(T),A=r(77),I=r(35);class M extends i.Component{render(){const{attributes:e,error:t,isLoading:r,noReviewsPlaceholder:c,reviews:s,totalReviews:i}=this.props;if(t)return Object(o.createElement)(d.a,{className:"wc-block-featured-product-error",error:t,isLoading:r});if(0===s.length&&!r)return Object(o.createElement)(c,{attributes:e});const u=Object(l.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(a.Disabled,null,e.showOrderby&&u&&Object(o.createElement)(g,{readOnly:!0,value:e.orderby}),Object(o.createElement)(C,{attributes:e,reviews:s}),e.showLoadMore&&i>s.length&&Object(o.createElement)(w,{screenReaderLabel:Object(n.__)("Load more reviews","woo-gutenberg-products-block")}))}}var D=(e=>{class t extends i.Component{constructor(){super(...arguments),x()(this,"isPreview",!!this.props.attributes.previewReviews),x()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),x()(this,"isMounted",!1),x()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),x()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(I.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,o=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(o).fill({}))}),Object(A.c)(this.getArgs(e.length)).then(t=>{let{reviews:r,totalReviews:o}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:o,loading:!1,error:null}),{newReviews:r}}).catch(this.setError)}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:n,reviews:c,totalReviews:a}=this.state;return Object(o.createElement)(e,P()({},this.props,{error:r,isLoading:n,reviews:c.slice(0,t),totalReviews:a}))}}x()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(M);t.a=e=>{let{attributes:t,icon:r,name:i,noReviewsPlaceholder:l}=e;const{categoryIds:d,productId:u,reviewsOnPageLoad:b,showProductName:w,showReviewDate:p,showReviewerName:g,showReviewContent:m,showReviewImage:h,showReviewRating:v}=t,{order:O,orderby:_}=Object(A.d)(t.orderby),j=!(m||v||p||g||h||w),f=Object(s.useBlockProps)({className:Object(A.a)(t)});return j?Object(o.createElement)(a.Placeholder,{icon:r,label:i},Object(n.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(o.createElement)("div",f,Object(o.createElement)(D,{attributes:t,categoryIds:d,delayFunction:e=>Object(c.debounce)(e,400),noReviewsPlaceholder:l,orderby:_,order:O,productId:u,reviewsToDisplay:b}))}},192:function(e,t){},193:function(e,t){},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},237:function(e,t){},238:function(e,t){},239:function(e,t){},240:function(e,t){},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},31:function(e,t){e.exports=window.wp.isShallowEqual},32:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return s})),r.d(t,"n",(function(){return i})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return w})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return g})),r.d(t,"h",(function(){return m})),r.d(t,"a",(function(){return h})),r.d(t,"i",(function(){return v})),r.d(t,"b",(function(){return O}));var o,n=r(3);const c=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",s=c.pluginUrl+"build/",i=c.buildPhase,l=null===(o=n.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,d=n.STORE_PAGES.checkout.id,u=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,w=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),p=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),g=n.STORE_PAGES.cart.permalink,m=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),h=Object(n.getSetting)("allowedCountries",{}),v=Object(n.getSetting)("shippingStates",{}),O=Object(n.getSetting)("allowedStates",{})},34:function(e,t,r){"use strict";r.d(t,"h",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return u})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return w})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return g})),r.d(t,"g",(function(){return m})),r.d(t,"a",(function(){return h}));var o=r(13),n=r(11),c=r.n(n),a=r(6),s=r(3),i=r(32);const l=e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const s=(e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const c=i.o.productCount>100,a={per_page:c?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},s=[Object(o.addQueryArgs)("/wc/store/products",{...a,...n})];return c&&t.length&&s.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:r,queryArgs:n});return Promise.all(s.map(e=>c()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},d=e=>c()({path:"/wc/store/products/"+e}),u=()=>c()({path:"wc/store/products/attributes"}),b=e=>c()({path:`wc/store/products/attributes/${e}/terms`}),w=e=>{let{selected:t=[],search:r}=e;const n=(e=>{let{selected:t=[],search:r}=e;const n=Object(s.getSetting)("limitTags",!1),c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:r})];return n&&t.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:t})),c})({selected:t,search:r});return Promise.all(n.map(e=>c()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},p=e=>c()({path:Object(o.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>c()({path:"wc/store/products/categories/"+e}),m=e=>c()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var o=r(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},37:function(e,t,r){"use strict";var o=r(0),n=r(5),c=r.n(n);t.a=e=>{let t,{label:r,screenReaderLabel:n,wrapperElement:a,wrapperProps:s={}}=e;const i=null!=r,l=null!=n;return!i&&l?(t=a||"span",s={...s,className:c()(s.className,"screen-reader-text")},Object(o.createElement)(t,s,n)):(t=a||o.Fragment,i&&l&&r!==n?Object(o.createElement)(t,s,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,s,r))}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(39);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):"api"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var o=r(0);t.a=function(e){let{srcElement:t,size:r=24,...n}=e;return Object(o.isValidElement)(t)?Object(o.cloneElement)(t,{width:r,height:r,...n}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},765:function(e,t,r){e.exports=r(861)},77:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return u}));var o=r(11),n=r.n(o),c=r(5),a=r.n(c),s=r(3);const i=e=>{if(Object(s.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=e=>n()({path:"/wc/store/products/reviews?"+Object.entries(e).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}))),d=e=>{const{className:t,categoryIds:r,productId:o,showReviewDate:n,showReviewerName:c,showReviewContent:s,showProductName:i,showReviewImage:l,showReviewRating:d}=e;let u="wc-block-all-reviews";return o&&(u="wc-block-reviews-by-product"),Array.isArray(r)&&(u="wc-block-reviews-by-category"),a()(u,t,{"has-image":l,"has-name":c,"has-date":n,"has-rating":d,"has-content":s,"has-product-name":i})},u=e=>{const{categoryIds:t,imageType:r,orderby:o,productId:n,reviewsOnPageLoad:c,reviewsOnLoadMore:a,showLoadMore:s,showOrderby:i}=e,l={"data-image-type":r,"data-orderby":o,"data-reviews-on-page-load":c,"data-reviews-on-load-more":a,"data-show-load-more":s,"data-show-orderby":i};return n&&(l["data-product-id"]=n),Array.isArray(t)&&(l["data-category-ids"]=t.join(",")),l}},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},80:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),a=r(6),s=r(5),i=r.n(s),l=r(4),d=r(12);r(117);class u extends c.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:r,className:o,help:s,options:d,value:u}=this.props,b="inspector-toggle-button-control-"+r;let w;return s&&(w=Object(a.isFunction)(s)?s(t):s),Object(c.createElement)(l.BaseControl,{id:b,help:w,className:i()("components-toggle-button-control",o)},Object(c.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},e),Object(c.createElement)(l.ButtonGroup,{"aria-labelledby":b+"__label"},d.map((t,r)=>{const o={};return u===t.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(c.createElement)(l.Button,n()({key:`${t.label}-${t.value}-${r}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},o),t.label)})))}}t.a=Object(d.withInstanceId)(u)},82:function(e,t){e.exports=window.wp.viewport},861:function(e,t,r){"use strict";r.r(t);var o=r(0),n=r(1),c=r(14),a=r(55),s=r(18),i=Object(o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17l-.59.59-.58.58V4h16v12zm-9.5-2H18v-2h-5.5zm3.86-5.87c.2-.2.2-.51 0-.71l-1.77-1.77c-.2-.2-.51-.2-.71 0L6 11.53V14h2.47l5.89-5.87z"})),l=r(9),d=r(4),u=(r(2),r(90)),b=r(180),w=()=>Object(o.createElement)(d.Placeholder,{className:"wc-block-reviews-by-category",icon:Object(o.createElement)(a.a,{srcElement:i,className:"block-editor-block-icon"}),label:Object(n.__)("Reviews by Category","woo-gutenberg-products-block")},Object(n.__)("This block lists reviews for products from selected categories. The selected categories do not have any reviews yet, but they will show up here when they do.","woo-gutenberg-products-block")),p=r(127),g=Object(d.withSpokenMessages)(e=>{let{attributes:t,debouncedSpeak:r,setAttributes:c}=e;const{editMode:s,categoryIds:g}=t;if(!g||s)return Object(o.createElement)(d.Placeholder,{icon:Object(o.createElement)(a.a,{srcElement:i,className:"block-editor-block-icon"}),label:Object(n.__)("Reviews by Category","woo-gutenberg-products-block"),className:"wc-block-reviews-by-category"},Object(n.__)("Show product reviews from specific categories.","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-reviews__selection"},Object(o.createElement)(u.a,{selected:t.categoryIds,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e.map(e=>{let{id:t}=e;return t});c({categoryIds:t})},showReviewCount:!0}),Object(o.createElement)(d.Button,{isPrimary:!0,onClick:()=>{c({editMode:!1}),r(Object(n.__)("Showing Reviews by Category block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))));const m=Object(n.__)("Edit selected categories","woo-gutenberg-products-block");return Object(o.createElement)(o.Fragment,null,Object(p.a)(s,c,m),Object(o.createElement)(l.InspectorControls,{key:"inspector"},Object(o.createElement)(d.PanelBody,{title:Object(n.__)("Category","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(u.a,{selected:t.categoryIds,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e.map(e=>{let{id:t}=e;return t});c({categoryIds:t})},isCompact:!0,showReviewCount:!0})),Object(o.createElement)(d.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(d.ToggleControl,{label:Object(n.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:()=>c({showProductName:!t.showProductName})}),Object(p.b)(t,c)),Object(o.createElement)(d.PanelBody,{title:Object(n.__)("List Settings","woo-gutenberg-products-block")},Object(p.c)(t,c))),Object(o.createElement)(b.a,{attributes:t,icon:Object(o.createElement)(a.a,{srcElement:i,className:"block-editor-block-icon"}),name:Object(n.__)("Reviews by Category","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))}),m=r(176),h=r(177),v=r(145);Object(c.registerBlockType)("woocommerce/reviews-by-category",{apiVersion:2,title:Object(n.__)("Reviews by Category","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(a.a,{srcElement:i}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Show product reviews from specific categories.","woo-gutenberg-products-block"),supports:{html:!1,color:{background:!1},typography:{fontSize:!0}},example:{...v.a,attributes:{...v.a.attributes,categoryIds:[1],showProductName:!0}},attributes:{...m.a,categoryIds:{type:"array",default:[]},showProductName:{type:"boolean",default:!0}},edit:e=>Object(o.createElement)(g,e),save:h.a})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor},90:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),a=r(1),s=(r(2),r(40)),i=r(4),l=r(12),d=r(34),u=r(35),b=Object(l.createHigherOrderComponent)(e=>class extends c.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(d.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(u.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:r,categories:o}=this.state;return Object(c.createElement)(e,n()({},this.props,{error:t,isLoading:r,categories:o}))}},"withCategories"),w=r(41),p=r(5),g=r.n(p);r(124);const m=e=>{let{categories:t,error:r,isLoading:o,onChange:l,onOperatorChange:d,operator:u,selected:b,isCompact:p,isSingle:m,showReviewCount:h}=e;const v={clear:Object(a.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(a.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(a.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(a.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(a.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(a._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(a.__)("Category search results updated.","woo-gutenberg-products-block")};return r?Object(c.createElement)(w.a,{error:r}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.b,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:b.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:l,renderItem:e=>{const{item:t,search:r,depth:o=0}=e,i=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,l=h?Object(a.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(a._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),i,t.review_count):Object(a.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(a._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),i,t.count),d=h?Object(a.sprintf)( +/* translators: %d is the count of reviews. */ +Object(a._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(a.sprintf)( +/* translators: %d is the count of products. */ +Object(a._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(c.createElement)(s.c,n()({className:g()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===o&&0!==t.parent})},e,{countLabel:d,"aria-label":l}))},messages:v,isCompact:p,isHierarchical:!0,isSingle:m}),!!d&&Object(c.createElement)("div",{hidden:b.length<2},Object(c.createElement)(i.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(a.__)("Display products matching","woo-gutenberg-products-block"),help:Object(a.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:u,onChange:d,options:[{label:Object(a.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(a.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};m.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=b(m)}}); \ No newline at end of file diff --git a/build/reviews-by-product.asset.php b/build/reviews-by-product.asset.php new file mode 100644 index 00000000000..d44c6e116d5 --- /dev/null +++ b/build/reviews-by-product.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '484b7d12fdc6bd32eb4854a06d811d8b'); \ No newline at end of file diff --git a/build/reviews-by-product.js b/build/reviews-by-product.js new file mode 100644 index 00000000000..4fd24a1ec5c --- /dev/null +++ b/build/reviews-by-product.js @@ -0,0 +1,17 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["reviews-by-product"]=function(e){function t(t){for(var o,s,a=t[0],i=t[1],l=t[2],u=0,b=[];u{let{className:t,error:r,isLoading:a=!1,onRetry:u}=e;return Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(c.a,{srcElement:s.a}),label:Object(n.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",t)},Object(o.createElement)(d.a,{error:r}),u&&Object(o.createElement)(o.Fragment,null,a?Object(o.createElement)(l.Spinner,null):Object(o.createElement)(l.Button,{isSecondary:!0,onClick:u},Object(n.__)("Retry","woo-gutenberg-products-block"))))}},11:function(e,t){e.exports=window.wp.apiFetch},115:function(e,t){},116:function(e,t){e.exports=window.wp.coreData},117:function(e,t){},12:function(e,t){e.exports=window.wp.compose},120:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),s=r(40),a=r(4),i=r(5),l=r.n(i);t.a=e=>{let{className:t,item:r,isSelected:o,isLoading:i,onSelect:d,disabled:u,...b}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.c,n()({},b,{key:r.id,className:t,isSelected:o,item:r,onSelect:d,isSingle:!0,disabled:u})),o&&i&&Object(c.createElement)("div",{key:"loading",className:l()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(c.createElement)(a.Spinner,null)))}},127:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return u}));var o=r(0),n=r(1),c=r(4),s=r(9),a=r(3),i=r(80);const l=(e,t,r)=>Object(o.createElement)(s.BlockControls,null,Object(o.createElement)(c.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),d=(e,t)=>{const r=Object(a.getSetting)("showAvatars",!0),s=Object(a.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!s&&Object(o.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Product rating is disabled in your store settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(a.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.a,{label:Object(n.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(n.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(n.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:e=>t({imageType:e})}),"reviewer"===e.imageType&&!r&&Object(o.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(a.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},u=(e,t)=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(o.createElement)(c.SelectControl,{label:Object(n.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:e=>t({orderby:e})}),Object(o.createElement)(c.RangeControl,{label:Object(n.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(o.createElement)(c.RangeControl,{label:Object(n.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))},13:function(e,t){e.exports=window.wp.url},135:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),s=r(1),a=r(6),i=(r(2),r(40)),l=r(12),d=Object(l.createHigherOrderComponent)(e=>{class t extends c.Component{render(){const{selected:t}=this.props,r=null==t;return Object(c.createElement)(e,n()({},this.props,{selected:r?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),u=r(273),b=r(16),p=r.n(b),w=r(31),m=r.n(w),g=r(34),h=r(35),v=Object(l.createHigherOrderComponent)(e=>{class t extends c.Component{constructor(){super(...arguments),p()(this,"state",{error:null,loading:!1,variations:{}}),p()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:r}=this.state;if(t)return;const o=this.getExpandedProduct();if(!o||r[o])return;const n=e.find(e=>e.id===o);n.variations&&0!==n.variations.length?(this.setState({loading:!0}),Object(g.g)(o).then(e=>{const t=e.map(e=>({...e,parent:o}));this.setState({variations:{...this.state.variations,[o]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(h.a)(e);this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:r,showVariations:o}=this.props;o&&(!m()(e.selected,r)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props;return t.filter(t=>t.variations&&t.variations.find(t=>{let{id:r}=t;return r===e}))[0].id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:r}=this.props;if(!r)return null;let o=t&&t.length?t[0]:null;return o?this.prevSelectedItem=o:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(o=this.prevSelectedItem)),!e&&o?this.isProductId(o)?o:this.findParentProduct(o):null}render(){const{error:t,isLoading:r}=this.props,{error:o,loading:s,variations:a}=this.state;return Object(c.createElement)(e,n()({},this.props,{error:o||t,expandedProduct:this.getExpandedProduct(),isLoading:r,variations:a,variationsLoading:s}))}}return p()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),O=r(41),j=r(5),_=r.n(j),f=r(120);r(191);const y={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},k=e=>{let{expandedProduct:t,error:r,instanceId:o,isCompact:l,isLoading:d,onChange:u,onSearch:b,products:p,renderItem:w,selected:m,showVariations:g,variations:h,variationsLoading:v}=e;if(r)return Object(c.createElement)(O.a,{error:r});const j=[...p,...h&&h[t]?h[t]:[]];return Object(c.createElement)(i.b,{className:"woocommerce-products",list:j,isCompact:l,isLoading:d,isSingle:!0,selected:j.filter(e=>{let{id:t}=e;return m.includes(t)}),onChange:u,renderItem:w||(g?e=>{const{item:t,search:r,depth:l=0,isSelected:u,onSelect:b}=e,p=t.variations&&Array.isArray(t.variations)?t.variations.length:0,w=_()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+l,"has-count",{"is-searching":r.length>0,"is-skip-level":0===l&&0!==t.parent,"is-variable":p>0});if(!t.breadcrumbs.length)return Object(c.createElement)(f.a,n()({},e,{className:_()(w,{"is-selected":u}),isSelected:u,item:t,onSelect:()=>()=>{b(t)()},isLoading:d||v,countLabel:t.variations.length>0?Object(s.sprintf)( +/* translators: %1$d is the number of variations of a product product. */ +Object(s.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-"+o,"aria-label":Object(s.sprintf)( +/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ +Object(s._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const m=Object(a.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(c.createElement)(i.c,n()({},m,{className:w,name:"variations-"+o}))}:null),onSearch:b,messages:y,isHierarchical:!0})};k.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=d(Object(u.a)(v(Object(l.withInstanceId)(k))))},136:function(e,t,r){"use strict";var o=r(0),n=r(18);const c=Object(o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},137:function(e,t){},138:function(e,t,r){"use strict";var o=r(0),n=(r(2),r(5)),c=r.n(n),s=r(37),a=r(12);r(193),t.a=Object(a.withInstanceId)(e=>{let{className:t,instanceId:r,label:n,onChange:a,options:i,screenReaderLabel:l,readOnly:d,value:u}=e;const b="wc-block-components-sort-select__select-"+r;return Object(o.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(s.a,{label:n,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(o.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:a,readOnly:d,value:u},i.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},14:function(e,t){e.exports=window.wp.blocks},145:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(1),n=r(32);const c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(o.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Alice","woo-gutenberg-products-block"),review:`

${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Bob","woo-gutenberg-products-block"),review:`

${Object(o.__)("This product is awesome, I love it!","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:null,verified:!1}]}}},176:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},177:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),s=r(9),a=(r(192),r(77));t.a=e=>{let{attributes:t}=e;return Object(c.createElement)("div",n()({},s.useBlockProps.save({className:Object(a.a)(t)}),Object(a.b)(t)))}},18:function(e,t){e.exports=window.wp.primitives},180:function(e,t,r){"use strict";var o=r(0),n=r(1),c=(r(2),r(6)),s=r(4),a=r(9),i=r(8),l=r(3),d=r(100),u=r(37);r(240);const b=e=>{let{onClick:t,label:r,screenReaderLabel:n}=e;return Object(o.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(o.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(o.createElement)(u.a,{label:r,screenReaderLabel:n})))};b.defaultProps={label:Object(n.__)("Load more","woo-gutenberg-products-block")};var p=b,w=r(138);r(237);var m=e=>{let{onChange:t,readOnly:r,value:c}=e;return Object(o.createElement)(w.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(n.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(n.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(n.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(n.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(n.__)("Order reviews by","woo-gutenberg-products-block"),value:c})},g=r(5),h=r.n(g),v=r(212),O=r.n(v);const j=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const o=O()(e,{suffix:r,limit:t});return o.html},_=(e,t,r,o)=>{const n=f(e,t,r);return j(e,n-o.length,o)},f=(e,t,r)=>{let o={start:0,middle:0,end:e.length};for(;o.start<=o.end;)o.middle=Math.floor((o.start+o.end)/2),t.innerHTML=j(e,o.middle),o=y(o,t.clientHeight,r);return o.middle},y=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e);class k extends i.Component{constructor(e){super(...arguments),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewSummary=Object(i.createRef)(),this.reviewContent=Object(i.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props,r=(this.reviewSummary.current.clientHeight+1)*e+1,o=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:o}),o&&this.setState({summary:_(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:n}=this.props,c=e?r:n;if(c)return Object(o.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:n,isExpanded:c}=this.state;return t?!1===n?Object(o.createElement)("div",{className:e},Object(o.createElement)("div",{ref:this.reviewContent},t)):Object(o.createElement)("div",{className:e},(!c||null===n)&&Object(o.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:r}}),(c||null===n)&&Object(o.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},t),this.getButton()):null}}k.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(n.__)("Read more","woo-gutenberg-products-block"),lessText:Object(n.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var E=k;r(239);var R=e=>{let{attributes:t,review:r={}}=e;const{imageType:c,showReviewDate:s,showReviewerName:a,showReviewImage:i,showReviewRating:l,showReviewContent:d,showProductName:u}=t,{rating:b}=r,p=!Object.keys(r).length>0,w=Number.isFinite(b)&&l;return Object(o.createElement)("li",{className:h()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":p,"wc-block-components-review-list-item__item--has-image":i}),"aria-hidden":p},(u||s||a||i||w)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},i&&function(e,t,r){var c,s;return r||!e?Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(o.createElement)("img",{"aria-hidden":"true",alt:(null===(c=e.product_image)||void 0===c?void 0:c.alt)||"",src:(null===(s=e.product_image)||void 0===s?void 0:s.thumbnail)||""}):Object(o.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(o.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(n.__)("Verified buyer","woo-gutenberg-products-block")},Object(n.__)("Verified buyer","woo-gutenberg-products-block")))}(r,c,p),(u||a||w||s)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},w&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},c=Object(n.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(n.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(o.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(o.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":c},Object(o.createElement)("span",{style:r},c)))}(r),u&&function(e){return Object(o.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(o.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),a&&function(e){const{reviewer:t=""}=e;return Object(o.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),s&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(o.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),d&&function(e){return Object(o.createElement)(E,{maxLines:10,moreText:Object(n.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(n.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(o.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(238);var S=e=>{let{attributes:t,reviews:r}=e;const n=Object(l.getSetting)("showAvatars",!0),c=Object(l.getSetting)("reviewRatingsEnabled",!0),s=(n||"product"===t.imageType)&&t.showReviewImage,a=c&&t.showReviewRating,i={...t,showReviewImage:s,showReviewRating:a};return Object(o.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(o.createElement)(R,{attributes:i}):r.map((e,t)=>Object(o.createElement)(R,{key:e.id||t,attributes:i,review:e})))},P=r(7),C=r.n(P),x=r(16),L=r.n(x),N=r(31),I=r.n(N),T=r(77),A=r(35);class M extends i.Component{render(){const{attributes:e,error:t,isLoading:r,noReviewsPlaceholder:c,reviews:a,totalReviews:i}=this.props;if(t)return Object(o.createElement)(d.a,{className:"wc-block-featured-product-error",error:t,isLoading:r});if(0===a.length&&!r)return Object(o.createElement)(c,{attributes:e});const u=Object(l.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(s.Disabled,null,e.showOrderby&&u&&Object(o.createElement)(m,{readOnly:!0,value:e.orderby}),Object(o.createElement)(S,{attributes:e,reviews:a}),e.showLoadMore&&i>a.length&&Object(o.createElement)(p,{screenReaderLabel:Object(n.__)("Load more reviews","woo-gutenberg-products-block")}))}}var D=(e=>{class t extends i.Component{constructor(){super(...arguments),L()(this,"isPreview",!!this.props.attributes.previewReviews),L()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),L()(this,"isMounted",!1),L()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),L()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(A.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,o=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(o).fill({}))}),Object(T.c)(this.getArgs(e.length)).then(t=>{let{reviews:r,totalReviews:o}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:o,loading:!1,error:null}),{newReviews:r}}).catch(this.setError)}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:n,reviews:c,totalReviews:s}=this.state;return Object(o.createElement)(e,C()({},this.props,{error:r,isLoading:n,reviews:c.slice(0,t),totalReviews:s}))}}L()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(M);t.a=e=>{let{attributes:t,icon:r,name:i,noReviewsPlaceholder:l}=e;const{categoryIds:d,productId:u,reviewsOnPageLoad:b,showProductName:p,showReviewDate:w,showReviewerName:m,showReviewContent:g,showReviewImage:h,showReviewRating:v}=t,{order:O,orderby:j}=Object(T.d)(t.orderby),_=!(g||v||w||m||h||p),f=Object(a.useBlockProps)({className:Object(T.a)(t)});return _?Object(o.createElement)(s.Placeholder,{icon:r,label:i},Object(n.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(o.createElement)("div",f,Object(o.createElement)(D,{attributes:t,categoryIds:d,delayFunction:e=>Object(c.debounce)(e,400),noReviewsPlaceholder:l,orderby:j,order:O,productId:u,reviewsToDisplay:b}))}},191:function(e,t){},192:function(e,t){},193:function(e,t){},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},237:function(e,t){},238:function(e,t){},239:function(e,t){},240:function(e,t){},273:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),s=r(32),a=r(34),i=r(165),l=r(35);t.a=e=>t=>{let{selected:r,...o}=t;const[d,u]=Object(c.useState)(!0),[b,p]=Object(c.useState)(null),[w,m]=Object(c.useState)([]),g=s.o.productCount>100,h=async e=>{const t=await Object(l.a)(e);p(t),u(!1)},v=Object(c.useRef)(r);Object(c.useEffect)(()=>{Object(a.h)({selected:v.current}).then(e=>{m(e),u(!1)}).catch(h)},[v]);const O=Object(i.a)(e=>{Object(a.h)({selected:r,search:e}).then(e=>{m(e),u(!1)}).catch(h)},400),j=Object(c.useCallback)(e=>{u(!0),O(e)},[u,O]);return Object(c.createElement)(e,n()({},o,{selected:r,error:b,products:w,isLoading:d,onSearch:g?j:null}))}},281:function(e,t,r){"use strict";var o=r(0),n=r(18);const c=Object(o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=c},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},31:function(e,t){e.exports=window.wp.isShallowEqual},32:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return s})),r.d(t,"l",(function(){return a})),r.d(t,"n",(function(){return i})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return p})),r.d(t,"c",(function(){return w})),r.d(t,"d",(function(){return m})),r.d(t,"h",(function(){return g})),r.d(t,"a",(function(){return h})),r.d(t,"i",(function(){return v})),r.d(t,"b",(function(){return O}));var o,n=r(3);const c=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),s=c.pluginUrl+"images/",a=c.pluginUrl+"build/",i=c.buildPhase,l=null===(o=n.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,d=n.STORE_PAGES.checkout.id,u=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,p=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),w=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),m=n.STORE_PAGES.cart.permalink,g=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),h=Object(n.getSetting)("allowedCountries",{}),v=Object(n.getSetting)("shippingStates",{}),O=Object(n.getSetting)("allowedStates",{})},34:function(e,t,r){"use strict";r.d(t,"h",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return u})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return p})),r.d(t,"c",(function(){return w})),r.d(t,"d",(function(){return m})),r.d(t,"g",(function(){return g})),r.d(t,"a",(function(){return h}));var o=r(13),n=r(11),c=r.n(n),s=r(6),a=r(3),i=r(32);const l=e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const a=(e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const c=i.o.productCount>100,s={per_page:c?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},a=[Object(o.addQueryArgs)("/wc/store/products",{...s,...n})];return c&&t.length&&a.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),a})({selected:t,search:r,queryArgs:n});return Promise.all(a.map(e=>c()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},d=e=>c()({path:"/wc/store/products/"+e}),u=()=>c()({path:"wc/store/products/attributes"}),b=e=>c()({path:`wc/store/products/attributes/${e}/terms`}),p=e=>{let{selected:t=[],search:r}=e;const n=(e=>{let{selected:t=[],search:r}=e;const n=Object(a.getSetting)("limitTags",!1),c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:r})];return n&&t.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:t})),c})({selected:t,search:r});return Promise.all(n.map(e=>c()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id"))},w=e=>c()({path:Object(o.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),m=e=>c()({path:"wc/store/products/categories/"+e}),g=e=>c()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var o=r(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},37:function(e,t,r){"use strict";var o=r(0),n=r(5),c=r.n(n);t.a=e=>{let t,{label:r,screenReaderLabel:n,wrapperElement:s,wrapperProps:a={}}=e;const i=null!=r,l=null!=n;return!i&&l?(t=s||"span",a={...a,className:c()(a.className,"screen-reader-text")},Object(o.createElement)(t,a,n)):(t=s||o.Fragment,i&&l&&r!==n?Object(o.createElement)(t,a,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,a,r))}},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(39);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):"api"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},45:function(e,t){e.exports=window.wp.hooks},476:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(16),s=r.n(c),a=r(0),i=r(12),l=r(34),d=r(35);const u=Object(i.createHigherOrderComponent)(e=>class extends a.Component{constructor(){super(...arguments),s()(this,"state",{error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null}),s()(this,"loadProduct",()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),Object(l.e)(e).then(e=>{this.setState({product:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(d.a)(e);this.setState({product:null,loading:!1,error:t})})):this.setState({product:null,loading:!1,error:null}))})}componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}render(){const{error:t,loading:r,product:o}=this.state;return Object(a.createElement)(e,n()({},this.props,{error:t,getProduct:this.loadProduct,isLoading:r,product:o}))}},"withProduct");t.a=u},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,r){"use strict";var o=r(0);t.a=function(e){let{srcElement:t,size:r=24,...n}=e;return Object(o.isValidElement)(t)?Object(o.cloneElement)(t,{width:r,height:r,...n}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},64:function(e,t){e.exports=window.regeneratorRuntime},764:function(e,t,r){e.exports=r(869)},77:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return u}));var o=r(11),n=r.n(o),c=r(5),s=r.n(c),a=r(3);const i=e=>{if(Object(a.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=e=>n()({path:"/wc/store/products/reviews?"+Object.entries(e).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}))),d=e=>{const{className:t,categoryIds:r,productId:o,showReviewDate:n,showReviewerName:c,showReviewContent:a,showProductName:i,showReviewImage:l,showReviewRating:d}=e;let u="wc-block-all-reviews";return o&&(u="wc-block-reviews-by-product"),Array.isArray(r)&&(u="wc-block-reviews-by-category"),s()(u,t,{"has-image":l,"has-name":c,"has-date":n,"has-rating":d,"has-content":a,"has-product-name":i})},u=e=>{const{categoryIds:t,imageType:r,orderby:o,productId:n,reviewsOnPageLoad:c,reviewsOnLoadMore:s,showLoadMore:a,showOrderby:i}=e,l={"data-image-type":r,"data-orderby":o,"data-reviews-on-page-load":c,"data-reviews-on-load-more":s,"data-show-load-more":a,"data-show-orderby":i};return n&&(l["data-product-id"]=n),Array.isArray(t)&&(l["data-category-ids"]=t.join(",")),l}},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},80:function(e,t,r){"use strict";var o=r(7),n=r.n(o),c=r(0),s=r(6),a=r(5),i=r.n(a),l=r(4),d=r(12);r(117);class u extends c.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:r,className:o,help:a,options:d,value:u}=this.props,b="inspector-toggle-button-control-"+r;let p;return a&&(p=Object(s.isFunction)(a)?a(t):a),Object(c.createElement)(l.BaseControl,{id:b,help:p,className:i()("components-toggle-button-control",o)},Object(c.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},e),Object(c.createElement)(l.ButtonGroup,{"aria-labelledby":b+"__label"},d.map((t,r)=>{const o={};return u===t.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(c.createElement)(l.Button,n()({key:`${t.label}-${t.value}-${r}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},o),t.label)})))}}t.a=Object(d.withInstanceId)(u)},82:function(e,t){e.exports=window.wp.viewport},869:function(e,t,r){"use strict";r.r(t);var o=r(0),n=r(1),c=r(14),s=r(55),a=r(281),i=(r(192),r(7)),l=r.n(i),d=r(9),u=r(4),b=r(40),p=(r(2),r(135)),w=r(180),m=r(100),g=r(476),h=Object(g.a)(e=>{let{error:t,getProduct:r,isLoading:c,product:i}=e;if(t)return Object(o.createElement)(m.a,{className:"wc-block-featured-product-error",error:t,isLoading:c,onRetry:r});const l=!i||c?Object(o.createElement)(u.Spinner,null):Object(n.sprintf)( +/* translators: %s is the product name. */ +Object(n.__)("This block lists reviews for a selected product. %s doesn't have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"),i.name);return Object(o.createElement)(u.Placeholder,{className:"wc-block-reviews-by-product",icon:Object(o.createElement)(s.a,{srcElement:a.a,className:"block-editor-block-icon"}),label:Object(n.__)("Reviews by Product","woo-gutenberg-products-block")},l)}),v=r(127),O=Object(u.withSpokenMessages)(e=>{let{attributes:t,debouncedSpeak:r,setAttributes:c}=e;const{editMode:i,productId:m}=t,g=e=>{const{item:t=0}=e;return Object(o.createElement)(b.c,l()({},e,{countLabel:Object(n.sprintf)( +/* translators: %d is the review count. */ +Object(n._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count),"aria-label":Object(n.sprintf)( +/* translators: %1$s is the item name, and %2$d is the number of reviews for the item. */ +Object(n._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),t.name,t.review_count)}))};if(!m||i)return Object(o.createElement)(u.Placeholder,{icon:Object(o.createElement)(s.a,{icon:a.a,className:"block-editor-block-icon"}),label:Object(n.__)("Reviews by Product","woo-gutenberg-products-block"),className:"wc-block-reviews-by-product"},Object(n.__)("Show reviews of your product to build trust","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-reviews__selection"},Object(o.createElement)(p.a,{selected:t.productId||0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;c({productId:t})},queryArgs:{orderby:"comment_count",order:"desc"},renderItem:g}),Object(o.createElement)(u.Button,{isPrimary:!0,onClick:()=>{c({editMode:!1}),r(Object(n.__)("Showing Reviews by Product block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))));const O=Object(n.__)("Edit selected product","woo-gutenberg-products-block");return Object(o.createElement)(o.Fragment,null,Object(v.a)(i,c,O),Object(o.createElement)(d.InspectorControls,{key:"inspector"},Object(o.createElement)(u.PanelBody,{title:Object(n.__)("Product","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(p.a,{selected:t.productId||0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;c({productId:t})},renderItem:g,isCompact:!0})),Object(o.createElement)(u.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block")},Object(v.b)(t,c)),Object(o.createElement)(u.PanelBody,{title:Object(n.__)("List Settings","woo-gutenberg-products-block")},Object(v.c)(t,c))),Object(o.createElement)(w.a,{attributes:t,icon:Object(o.createElement)(s.a,{icon:a.a,className:"block-editor-block-icon"}),name:Object(n.__)("Reviews by Product","woo-gutenberg-products-block"),noReviewsPlaceholder:h}))}),j=r(176),_=r(177),f=r(145);Object(c.registerBlockType)("woocommerce/reviews-by-product",{apiVersion:2,title:Object(n.__)("Reviews by Product","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(s.a,{srcElement:a.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Show reviews of your products to build trust.","woo-gutenberg-products-block"),supports:{html:!1,color:{background:!1},typography:{fontSize:!0}},example:{...f.a,attributes:{...f.a.attributes,productId:1}},attributes:{...j.a,productId:{type:"number"}},edit:e=>Object(o.createElement)(O,e),save:_.a})},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/reviews-frontend.asset.php b/build/reviews-frontend.asset.php new file mode 100644 index 00000000000..710c787a604 --- /dev/null +++ b/build/reviews-frontend.asset.php @@ -0,0 +1 @@ + array('react', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '1e6b72888918b0f65eb0b5800bb35668'); \ No newline at end of file diff --git a/build/reviews-frontend.js b/build/reviews-frontend.js new file mode 100644 index 00000000000..c8b26cc4567 --- /dev/null +++ b/build/reviews-frontend.js @@ -0,0 +1,5 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=235)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},123:function(e,t,r){"use strict";var n=r(0),o=(r(8),r(5)),s=r.n(o),i=r(37),c=r(21);r(142),t.a=Object(c.withInstanceId)(e=>{let{className:t,instanceId:r,label:o,onChange:c,options:a,screenReaderLabel:l,readOnly:p,value:u}=e;const d="wc-block-components-sort-select__select-"+r;return Object(n.createElement)("div",{className:s()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(i.a,{label:o,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(n.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:c,readOnly:p,value:u},a.map(e=>Object(n.createElement)("option",{key:e.key,value:e.key},e.label))))})},142:function(e,t){},167:function(e,t,r){function n(e){for(var t,r,n=[],o=0;o/g,">\n").replace(/\n\n/g,"\n").replace(/^\n/g,"").replace(/\n$/g,"").split("\n"),g=0,h=[],v=!1,f=0;f=a)r="";else if(g+_.length>=a){if(" "===_[(o=a-g)-1])for(;o&&" "===_[(o-=1)-1];);else s=_.slice(o).indexOf(" "),p||(-1!==s?o+=s:o=r.length);r=_.slice(0,o).join("")+u,d&&(r+=''+b+""),g=a,v=!0}else g+=_.length;else if(l){if(g>=a)if(c=(i=r.match(/[a-zA-Z]+/))?i[0]:"")if("{let{onClick:t,label:r,screenReaderLabel:n}=e;return Object(o.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(o.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(o.createElement)(b.a,{label:r,screenReaderLabel:n})))};w.defaultProps={label:Object(s.__)("Load more","woo-gutenberg-products-block")};var m=w,g=r(123);r(204);var h=e=>{let{onChange:t,readOnly:r,value:n}=e;return Object(o.createElement)(g.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(s.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(s.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(s.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(s.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(s.__)("Order reviews by","woo-gutenberg-products-block"),value:n})},v=r(167),f=r.n(v);const _=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const n=f()(e,{suffix:r,limit:t});return n.html},y=(e,t,r,n)=>{const o=O(e,t,r);return _(e,o-n.length,n)},O=(e,t,r)=>{let n={start:0,middle:0,end:e.length};for(;n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=_(e,n.middle),n=k(n,t.clientHeight,r);return n.middle},k=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e);class j extends c.Component{constructor(e){super(...arguments),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewSummary=Object(c.createRef)(),this.reviewContent=Object(c.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props,r=(this.reviewSummary.current.clientHeight+1)*e+1,n=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:n}),n&&this.setState({summary:y(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:n}=this.props,s=e?r:n;if(s)return Object(o.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},s)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:n,isExpanded:s}=this.state;return t?!1===n?Object(o.createElement)("div",{className:e},Object(o.createElement)("div",{ref:this.reviewContent},t)):Object(o.createElement)("div",{className:e},(!s||null===n)&&Object(o.createElement)("div",{ref:this.reviewSummary,"aria-hidden":s,dangerouslySetInnerHTML:{__html:r}}),(s||null===n)&&Object(o.createElement)("div",{ref:this.reviewContent,"aria-hidden":!s},t),this.getButton()):null}}j.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(s.__)("Read more","woo-gutenberg-products-block"),lessText:Object(s.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var E=j;r(206);var R=e=>{let{attributes:t,review:r={}}=e;const{imageType:n,showReviewDate:i,showReviewerName:c,showReviewImage:a,showReviewRating:l,showReviewContent:p,showProductName:d}=t,{rating:b}=r,w=!Object.keys(r).length>0,m=Number.isFinite(b)&&l;return Object(o.createElement)("li",{className:u()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":w,"wc-block-components-review-list-item__item--has-image":a}),"aria-hidden":w},(d||i||c||a||m)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},a&&function(e,t,r){var n,i;return r||!e?Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(o.createElement)("img",{"aria-hidden":"true",alt:(null===(n=e.product_image)||void 0===n?void 0:n.alt)||"",src:(null===(i=e.product_image)||void 0===i?void 0:i.thumbnail)||""}):Object(o.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(o.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(s.__)("Verified buyer","woo-gutenberg-products-block")},Object(s.__)("Verified buyer","woo-gutenberg-products-block")))}(r,n,w),(d||c||m||i)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},m&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},n=Object(s.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(s.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(o.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(o.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":n},Object(o.createElement)("span",{style:r},n)))}(r),d&&function(e){return Object(o.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(o.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),c&&function(e){const{reviewer:t=""}=e;return Object(o.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),i&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(o.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),p&&function(e){return Object(o.createElement)(E,{maxLines:10,moreText:Object(s.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(s.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(o.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(205);var S=e=>{let{attributes:t,reviews:r}=e;const n=Object(d.getSetting)("showAvatars",!0),s=Object(d.getSetting)("reviewRatingsEnabled",!0),i=(n||"product"===t.imageType)&&t.showReviewImage,c=s&&t.showReviewRating,a={...t,showReviewImage:i,showReviewRating:c};return Object(o.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(o.createElement)(R,{attributes:a}):r.map((e,t)=>Object(o.createElement)(R,{key:e.id||t,attributes:a,review:e})))},x=r(18),P=r.n(x),T=r(29),N=r.n(T),A=r(17),C=r.n(A),L=r(96),M=(e=>{class t extends c.Component{constructor(){super(...arguments),N()(this,"isPreview",!!this.props.attributes.previewReviews),N()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),N()(this,"isMounted",!1),N()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),N()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(L.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,n=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(n).fill({}))}),(o=this.getArgs(e.length),l()({path:"/wc/store/products/reviews?"+Object.entries(o).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)})))).then(t=>{let{reviews:r,totalReviews:n}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:n,loading:!1,error:null}),{newReviews:r}}).catch(this.setError);var o}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:n,reviews:s,totalReviews:i}=this.state;return Object(o.createElement)(e,P()({},this.props,{error:r,isLoading:n,reviews:s.slice(0,t),totalReviews:i}))}}N()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(e=>{let{attributes:t,onAppendReviews:r,onChangeOrderby:n,reviews:i,sortSelectValue:c,totalReviews:a}=e;if(0===i.length)return null;const l=Object(d.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,"false"!==t.showOrderby&&l&&Object(o.createElement)(h,{value:c,onChange:n}),Object(o.createElement)(S,{attributes:t,reviews:i}),"false"!==t.showLoadMore&&a>i.length&&Object(o.createElement)(m,{onClick:r,screenReaderLabel:Object(s.__)("Load more reviews","woo-gutenberg-products-block")}))});class I extends c.Component{constructor(){super(...arguments);const{attributes:e}=this.props;this.state={orderby:e.orderby,reviewsToDisplay:parseInt(e.reviewsOnPageLoad,10)},this.onAppendReviews=this.onAppendReviews.bind(this),this.onChangeOrderby=this.onChangeOrderby.bind(this)}onAppendReviews(){const{attributes:e}=this.props,{reviewsToDisplay:t}=this.state;this.setState({reviewsToDisplay:t+parseInt(e.reviewsOnLoadMore,10)})}onChangeOrderby(e){const{attributes:t}=this.props;this.setState({orderby:e.target.value,reviewsToDisplay:parseInt(t.reviewsOnPageLoad,10)})}onReviewsAppended(e){let{newReviews:t}=e;Object(i.speak)(Object(s.sprintf)( +/* translators: %d is the count of reviews loaded. */ +Object(s._n)("%d review loaded.","%d reviews loaded.",t.length,"woo-gutenberg-products-block"),t.length))}onReviewsReplaced(){Object(i.speak)(Object(s.__)("Reviews list updated.","woo-gutenberg-products-block"))}onReviewsLoadError(){Object(i.speak)(Object(s.__)("There was an error loading the reviews.","woo-gutenberg-products-block"))}render(){const{attributes:e}=this.props,{categoryIds:t,productId:r}=e,{reviewsToDisplay:n}=this.state,{order:s,orderby:i}=(e=>{if(Object(d.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}})(this.state.orderby);return Object(o.createElement)(M,{attributes:e,categoryIds:t,onAppendReviews:this.onAppendReviews,onChangeOrderby:this.onChangeOrderby,onReviewsAppended:this.onReviewsAppended,onReviewsLoadError:this.onReviewsLoadError,onReviewsReplaced:this.onReviewsReplaced,order:s,orderby:i,productId:r,reviewsToDisplay:n,sortSelectValue:this.state.orderby})}}var B=I;Object(n.b)({selector:"\n\t.wp-block-woocommerce-all-reviews,\n\t.wp-block-woocommerce-reviews-by-product,\n\t.wp-block-woocommerce-reviews-by-category\n",Block:B,getProps:e=>({attributes:{showReviewDate:e.classList.contains("has-date"),showReviewerName:e.classList.contains("has-name"),showReviewImage:e.classList.contains("has-image"),showReviewRating:e.classList.contains("has-rating"),showReviewContent:e.classList.contains("has-content"),showProductName:e.classList.contains("has-product-name")}})})},27:function(e,t){e.exports=window.wp.a11y},29:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},3:function(e,t){e.exports=window.React},34:function(e,t,r){"use strict";var n=r(29),o=r.n(n),s=r(0),i=r(3),c=r(1),a=r(84),l=e=>{let{imageUrl:t=a.l+"/block-error.svg",header:r=Object(c.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(c.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:i=Object(c.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(s.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(s.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(s.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(s.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(s.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(s.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},i?i+" ":"",o),l&&Object(s.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};r(55);class p extends i.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(s.createElement)(s.Fragment,null,Object(s.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:o,renderError:i,button:c}=this.props,{errorMessage:a,hasError:p}=this.state;return p?"function"==typeof i?i({errorMessage:a}):Object(s.createElement)(l,{errorMessage:r?a:null,header:e,imageUrl:t,text:n,errorMessagePrefix:o,button:c}):this.props.children}}t.a=p},37:function(e,t,r){"use strict";var n=r(0),o=r(5),s=r.n(o);t.a=e=>{let t,{label:r,screenReaderLabel:o,wrapperElement:i,wrapperProps:c={}}=e;const a=null!=r,l=null!=o;return!a&&l?(t=i||"span",c={...c,className:s()(c.className,"screen-reader-text")},Object(n.createElement)(t,c,o)):(t=i||n.Fragment,a&&l&&r!==o?Object(n.createElement)(t,c,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,c,r))}},47:function(e,t){e.exports=window.wp.apiFetch},5:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:o=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const s=n(e,r),i=o(e,r),c={...e.dataset,...s.attributes||{}};e.classList.remove("is-loading"),l({Block:t,container:e,props:s,attributes:c,errorBoundaryProps:i})})},l=e=>{let{Block:t,container:r,attributes:n={},props:c={},errorBoundaryProps:a={}}=e;Object(s.render)(Object(s.createElement)(i.a,a,Object(s.createElement)(s.Suspense,{fallback:Object(s.createElement)("div",{className:"wc-block-placeholder"})},Object(s.createElement)(t,o()({},c,{attributes:n})))),r)},p=e=>{const t=document.body.querySelectorAll(c.join(","));(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:s}=e;const i=document.body.querySelectorAll(o);s.length>0&&Array.prototype.filter.call(i,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,s)),a({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({...e,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:s}=e;const i=s.querySelectorAll(o);a({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},8:function(e,t,r){e.exports=r(56)()},84:function(e,t,r){"use strict";r.d(t,"n",(function(){return s})),r.d(t,"l",(function(){return i})),r.d(t,"k",(function(){return c})),r.d(t,"m",(function(){return a})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return p})),r.d(t,"f",(function(){return u})),r.d(t,"j",(function(){return d})),r.d(t,"c",(function(){return b})),r.d(t,"e",(function(){return w})),r.d(t,"g",(function(){return m})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return v}));var n,o=r(2);const s=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=s.pluginUrl+"images/",c=s.pluginUrl+"build/",a=s.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,p=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),u=o.STORE_PAGES.privacy.permalink,d=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),b=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),w=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),m=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},96:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},s=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}}}); \ No newline at end of file diff --git a/build/single-product-frontend.asset.php b/build/single-product-frontend.asset.php new file mode 100644 index 00000000000..4824ff9f2cb --- /dev/null +++ b/build/single-product-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '29dcfd62be7e748844518f8eeed02a56'); \ No newline at end of file diff --git a/build/single-product-frontend.js b/build/single-product-frontend.js new file mode 100644 index 00000000000..2399d879122 --- /dev/null +++ b/build/single-product-frontend.js @@ -0,0 +1,3 @@ +!function(e){function t(t){for(var n,o,c=t[0],i=t[1],a=0,u=[];a=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t{const t=e.detail;t&&t.preserveCartData||Object(i.dispatch)(c.CART_STORE_KEY).invalidateResolutionForStore()},d=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(p.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(p.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",f),document.body.addEventListener("wc-blocks_removed_from_cart",f),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",f),document.body.removeEventListener("wc-blocks_removed_from_cart",f)}}window.wcBlocksStoreCartListeners.count++})(),d),[])},b={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...b,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},v=e=>Object(s.a)(Object.entries(e).map(e=>{let[t,n]=e;return[t,Object(a.decodeEntities)(n)]})),y={cartCoupons:c.EMPTY_CART_COUPONS,cartItems:c.EMPTY_CART_ITEMS,cartFees:c.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:b,shippingRates:c.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:c.EMPTY_EXTENSIONS},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:n}=Object(l.a)(),a=null==n?void 0:n.previewCart,{shouldSelect:s}=e,p=Object(o.useRef)();m();const f=Object(i.useSelect)((e,n)=>{let{dispatch:r}=n;if(!s)return y;if(t)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:a.totals,cartIsLoading:!1,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:b,extensions:c.EMPTY_EXTENSIONS,shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:()=>{}};const o=e(c.CART_STORE_KEY),i=o.getCartData(),l=o.getCartErrors(),p=o.getCartTotals(),f=!o.hasFinishedResolution("getCartData"),d=o.isCustomerDataUpdating(),{receiveCart:m}=r(c.CART_STORE_KEY),g=v(i.billingAddress),O=i.needsShipping?v(i.shippingAddress):g,w=i.fees.length>0?i.fees.map(e=>v(e)):c.EMPTY_CART_FEES;return{cartCoupons:i.coupons.length>0?i.coupons.map(e=>({...e,label:e.code})):c.EMPTY_CART_COUPONS,cartItems:i.items,cartFees:w,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:p,cartIsLoading:f,cartErrors:l,billingAddress:Object(u.a)(g),shippingAddress:Object(u.a)(O),extensions:i.extensions,shippingRates:i.shippingRates,shippingRatesLoading:d,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:m}},[s]);return p.current&&Object(r.isEqual)(p.current,f)||(p.current=f),p.current}},function(e,t){e.exports=window.wp.a11y},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0);n(9);const o=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),c=()=>Object(r.useContext)(o)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.dom},,function(e,t){e.exports=window.wp.primitives},,function(e,t,n){"use strict";var r=n(29),o=n.n(r),c=n(0),i=n(3),a=n(1),s=n(84),u=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:n=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:i=Object(a.__)("Error:","woo-gutenberg-products-block"),button:u}=e;return Object(c.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(c.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(c.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},n&&Object(c.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},n),r&&Object(c.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(c.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},i?i+" ":"",o),u&&Object(c.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},u)))};n(55);class l extends i.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:n=!0,text:r,errorMessagePrefix:o,renderError:i,button:a}=this.props,{errorMessage:s,hasError:l}=this.state;return l?"function"==typeof i?i({errorMessage:s}):Object(c.createElement)(u,{errorMessage:n?s:null,header:e,imageUrl:t,text:r,errorMessagePrefix:o,button:a}):this.props.children}}t.a=l},,function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(60),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(77))},,,,function(e,t){e.exports=window.wp.deprecated},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(58),o=n(0),c=n(26);const i=()=>{const e=Object(c.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...n,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},,function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"number"==typeof e,o=e=>"string"==typeof e,c=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function i(e,t){return c(e)&&t in e}const a=e=>"boolean"==typeof e},function(e,t){e.exports=window.wp.url},,function(e,t){},function(e,t,n){"use strict";var r=n(57);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.warning},,function(e,t,n){"use strict";var r=n(11),o=n(16),c=n(0),i=n(5),a=n.n(i),s=n(4),u=n(40),l=n.n(u),p=n(12),f=n(13),d=n(14),m=n(15),b=n(7),h=n(20),g=n(30),v=n(46),y=n(21),O=n(88),w=n(19);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t0?a/2:u)+(u+a/2>window.innerWidth?window.innerWidth-u:a/2)},p=e.left;"right"===r?p=e.right:"middle"!==c&&(p=u);var f=e.right;"left"===r?f=e.left:"middle"!==c&&(f=u);var d,m={popoverLeft:p,contentWidth:p-a>0?a:p},b={popoverLeft:f,contentWidth:f+a>window.innerWidth?window.innerWidth-f:a},h=n,g=null;if(!o)if("center"===n&&l.contentWidth===a)h="center";else if("left"===n&&m.contentWidth===a)h="left";else if("right"===n&&b.contentWidth===a)h="right";else{var v="left"==(h=m.contentWidth>b.contentWidth?"left":"right")?m.contentWidth:b.contentWidth;g=v!==a?v:null}if(d="center"===h?l.popoverLeft:"left"===h?m.popoverLeft:b.popoverLeft,i){var y=i.getBoundingClientRect();d=Math.min(d,y.right-a)}return{xAxis:h,popoverLeft:d,contentWidth:g}}function _(e,t,n,r,o,c,i){var a=t.height;if(o){var s=(Object(g.getScrollContainer)(c)||document.body).getBoundingClientRect().top+a-i;if(e.top<=s)return{yAxis:n,popoverTop:Math.min(e.bottom,s)}}var u=e.top+e.height/2;"bottom"===r?u=e.bottom:"top"===r&&(u=e.top);var l={popoverTop:u,contentHeight:(u-a/2>0?a/2:u)+(u+a/2>window.innerHeight?window.innerHeight-u:a/2)},p={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},f={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},d=n,m=null;if(!o)if("middle"===n&&l.contentHeight===a)d="middle";else if("top"===n&&p.contentHeight===a)d="top";else if("bottom"===n&&f.contentHeight===a)d="bottom";else{var b="top"==(d=p.contentHeight>f.contentHeight?"top":"bottom")?p.contentHeight:f.contentHeight;m=b!==a?b:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?p.popoverTop:f.popoverTop,contentHeight:m}}var S=n(23),x=n(10);var C=Object(c.createContext)({focusHistory:[]}),T=C.Provider,P=C.Consumer;T.displayName="FocusReturnProvider",P.displayName="FocusReturnConsumer",c.Component;var R=Object(y.createHigherOrderComponent)((function e(t){if((r=t)instanceof c.Component||"function"==typeof r){var n=t;return e({})(n)}var r,o=t.onFocusReturn,i=void 0===o?s.stubTrue:o;return function(e){var t=function(t){Object(d.a)(a,t);var n,r,o=(n=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(b.a)(n);if(r){var o=Object(b.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(m.a)(this,e)});function a(){var e;return Object(p.a)(this,a),(e=o.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return Object(f.a)(a,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==i())for(var r,o=[].concat(Object(S.a)(s.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(S.a)(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(c.createElement)(e,this.props.childProps))}}]),a}(c.Component);return function(e){return Object(c.createElement)(P,null,(function(n){return Object(c.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");var A=Object(y.createHigherOrderComponent)((function(e){return function(t){Object(d.a)(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(b.a)(n);if(r){var o=Object(b.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(m.a)(this,e)});function i(){var e;return Object(p.a)(this,i),(e=o.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(x.a)(e)),e}return Object(f.a)(i,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===v.TAB){var t=g.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return Object(c.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(c.createElement)(e,this.props))}}]),i}(c.Component)}),"withConstrainedTabbing"),N=n(70);var M=function(e){Object(d.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(b.a)(t);if(n){var o=Object(b.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(m.a)(this,e)});function o(){return Object(p.a)(this,o),r.apply(this,arguments)}return Object(f.a)(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(c.Component),F=Object(N.a)(M);function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(b.a)(e);if(t){var o=Object(b.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(m.a)(this,n)}}var L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,r=e.className,o=void 0===r?"lockscroll":r,i=0,a=0;function s(e){var t=n.scrollingElement||n.body;e&&(a=t.scrollTop);var r=e?"add":"remove";t.classList[r](o),n.documentElement.classList[r](o),e||(t.scrollTop=a)}function u(){0===i&&s(!0),++i}function l(){1===i&&s(!1),--i}return function(e){Object(d.a)(n,e);var t=B(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(f.a)(n,[{key:"componentDidMount",value:function(){u()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(c.Component)}();function D(e){e.stopPropagation()}var I=Object(c.forwardRef)((function(e,t){var n=e.children,i=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({},i,{ref:t,onMouseDown:D}),n)})),z=n(36);function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function le(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var pe=function(e){var t=e.headerTitle,n=e.onClose,i=e.onKeyDown,s=e.children,u=e.className,p=e.noArrow,f=void 0===p||p,d=e.isAlternate,m=e.position,b=void 0===m?"bottom right":m,w=(e.range,e.focusOnMount),j=void 0===w?"firstElement":w,S=e.anchorRef,x=e.shouldAnchorIncludePadding,C=e.anchorRect,T=e.getAnchorRect,P=e.expandOnMobile,R=e.animate,A=void 0===R||R,N=e.onClickOutside,M=e.onFocusOutside,B=e.__unstableSticky,D=e.__unstableSlotName,z=void 0===D?"Popover":D,U=e.__unstableObserveElement,H=e.__unstableBoundaryParent,W=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),q=Object(c.useRef)(null),Y=Object(c.useRef)(null),G=Object(c.useRef)(),$=Object(y.useViewportMatch)("medium","<"),X=Object(c.useState)(),K=Object(h.a)(X,2),Z=K[0],Q=K[1],J=V(z),ee=P&&$,ne=Object(y.useResizeObserver)(),re=Object(h.a)(ne,2),oe=re[0],pe=re[1];f=ee||f,Object(c.useLayoutEffect)((function(){if(ee)return le(G.current,"is-without-arrow",f),le(G.current,"is-alternate",d),se(G.current,"data-x-axis"),se(G.current,"data-y-axis"),ue(G.current,"top"),ue(G.current,"left"),ue(Y.current,"maxHeight"),void ue(Y.current,"maxWidth");var e=function(){if(G.current&&Y.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(g.getRectangleFromRange)(r);if(r instanceof window.Element){var c=r.getBoundingClientRect();return o?c:ae(c,r)}var i=r.top,a=r.bottom,s=i.getBoundingClientRect(),u=a.getBoundingClientRect(),l=new window.DOMRect(s.left,s.top,s.width,u.bottom-s.top);return o?l:ae(l,r)}if(e.current){var p=e.current.parentNode,f=p.getBoundingClientRect();return o?f:ae(f,p)}}(q,C,T,S,x);if(e){var t,n,r=G.current,o=r.offsetParent,c=r.ownerDocument,i=0;if(o&&o!==c.body){var a=o.getBoundingClientRect();i=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}H&&(t=null===(n=G.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode);var s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=n.split(" "),s=Object(h.a)(a,3),u=s[0],l=s[1],p=void 0===l?"center":l,f=s[2],d=_(e,t,u,f,r,o,c),m=E(e,t,p,f,r,d.yAxis,i);return k(k({},m),d)}(e,pe.height?pe:Y.current.getBoundingClientRect(),b,B,G.current,i,t),u=s.popoverTop,l=s.popoverLeft,p=s.xAxis,m=s.yAxis,v=s.contentHeight,y=s.contentWidth;"number"==typeof u&&"number"==typeof l&&(ue(G.current,"top",u+"px"),ue(G.current,"left",l+"px")),le(G.current,"is-without-arrow",f||"center"===p&&"middle"===m),le(G.current,"is-alternate",d),se(G.current,"data-x-axis",p),se(G.current,"data-y-axis",m),ue(Y.current,"maxHeight","number"==typeof v?v+"px":""),ue(Y.current,"maxWidth","number"==typeof y?y+"px":""),Q(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[m]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),U&&(n=new window.MutationObserver(e)).observe(U,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[ee,C,T,S,x,b,pe,B,U,H]),function(e,t){Object(c.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=g.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(j,Y);var fe=function(e){e.keyCode===v.ESCAPE&&n&&(e.stopPropagation(),n()),i&&i(e)},de=Object(c.createElement)(F,{onFocusOutside:function(e){if(M)M(e);else if(N){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),N(t)}else n&&n()}},Object(c.createElement)(ce,{type:A&&Z?"appear":null,options:{origin:Z}},(function(e){var o=e.className;return Object(c.createElement)(I,Object(r.a)({className:a()("components-popover",u,o,{"is-expanded":ee,"is-without-arrow":f,"is-alternate":d})},W,{onKeyDown:fe,ref:G}),ee&&Object(c.createElement)(L,null),ee&&Object(c.createElement)("div",{className:"components-popover__header"},Object(c.createElement)("span",{className:"components-popover__header-title"},t),Object(c.createElement)(ve,{className:"components-popover__close",icon:O.a,onClick:n})),Object(c.createElement)("div",{ref:Y,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},oe,s)))})));return j&&(de=Object(c.createElement)(ie,null,de)),J.ref&&(de=Object(c.createElement)(te,{name:z},de)),S||C?de:Object(c.createElement)("span",{ref:q},de)};pe.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(c.createElement)(ee,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var fe=pe,de=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(s.isString)(r)&&(t=r),Object(s.isObject)(r)&&(t=r.display,n=r.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":n},t)):null};var me=function(e){Object(d.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(b.a)(t);if(n){var o=Object(b.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(m.a)(this,e)});function o(){var e;return Object(p.a)(this,o),(e=r.apply(this,arguments)).delayedSetIsOver=Object(s.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return Object(f.a)(o,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===c.Children.count(n)){var r=c.Children.only(n);"function"==typeof r.props[e]&&r.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(s.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,r=e.text,o=e.shortcut;if(1!==c.Children.count(t))return t;var i=c.Children.only(t),a=this.state.isOver;return Object(c.cloneElement)(i,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(c.concatChildren)(i.props.children,a&&Object(c.createElement)(fe,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(c.createElement)(de,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(c.Component),be=n(68);function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(ge);try{for(F.s();!(M=F.n()).done;)T[M.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){F.e(e)}finally{F.f()}}var B=!R&&(k&&S||_||!!S&&(!x||Object(s.isArray)(x)&&!x.length)&&!1!==k),L=Object(c.createElement)(A,Object(r.a)({},N,T,{className:P,"aria-label":T["aria-label"]||S,ref:t}),w&&Object(c.createElement)(be.a,{icon:w,size:j}),x);return B?Object(c.createElement)(me,{text:S,shortcut:_,position:E},L):L}))},,,function(e,t){e.exports=window.wc.wcBlocksSharedContext},,function(e,t,n){"use strict";var r=n(2),o=n(1),c=n(52);const i=Object(r.getSetting)("countryLocale",{}),a=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(c.b)(e.priority)&&(t.index=e.priority),Object(c.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},s=Object.entries(i).map(e=>{let[t,n]=e;return[t,Object.entries(n).map(e=>{let[t,n]=e;return[t,a(n)]}).reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{})]}).reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{});t.a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=n&&void 0!==s[n]?s[n]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,n){"use strict";var r=n(19),o=n(11),c=n(16),i=n(0),a=n(32),s=function(e){var t=e.icon,n=e.className,r=Object(c.a)(e,["icon","className"]),a=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" ");return Object(i.createElement)("span",Object(o.a)({className:a},r))};function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t{let{Block:t,containers:n,getProps:r=(()=>({})),getErrorBoundaryProps:o=(()=>({}))}=e;0!==n.length&&Array.prototype.forEach.call(n,(e,n)=>{const c=r(e,n),i=o(e,n),a={...e.dataset,...c.attributes||{}};e.classList.remove("is-loading"),u({Block:t,container:e,props:c,attributes:a,errorBoundaryProps:i})})},u=e=>{let{Block:t,container:n,attributes:r={},props:a={},errorBoundaryProps:s={}}=e;Object(c.render)(Object(c.createElement)(i.a,s,Object(c.createElement)(c.Suspense,{fallback:Object(c.createElement)("div",{className:"wc-block-placeholder"})},Object(c.createElement)(t,o()({},a,{attributes:r})))),n)},l=e=>{const t=document.body.querySelectorAll(a.join(","));(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrappers:c}=e;const i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,c)),s({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})})({...e,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrapper:c}=e;const i=c.querySelectorAll(o);s({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})})({...e,wrapper:t})})})}},,,function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,u=[],l=!1,p=-1;function f(){l&&s&&(l=!1,s.length?u=s.concat(u):p=-1,u.length&&d())}function d(){if(!l){var e=a(f);l=!0;for(var t=u.length;t;){for(s=u,u=[];++p1)for(var n=1;n{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var d=e=>{let{className:t,notices:n,removeNotice:o}=e;const c=n.filter(e=>"snackbar"!==e.type);if(!c.length)return null;const i=l()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:i},c.map(e=>Object(r.createElement)(p.a,s()({key:"store-notice-"+e.id},e,{className:l()("wc-block-components-notices__notice",f(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(r.createContext)({notices:[],createNotice:(e,t,n)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),b=()=>Object(r.useContext)(m),h=e=>{let{children:t,className:n="",createNoticeContainer:a=!0,context:s="wc/core"}=e;const{createNotice:u,removeNotice:l}=Object(o.useDispatch)("core/notices"),[p,f]=Object(r.useState)(!1),{dispatchStoreEvent:b}=Object(c.a)(),{isEditor:h}=Object(i.a)(),g=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u(e,t,{...n,context:n.context||s}),b("store-notice-create",{status:e,content:t,options:n})}),[u,b,s]),v=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;l(e,t)}),[l,s]),{notices:y}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(s)}),[s]),O={notices:y,createNotice:g,removeNotice:v,context:s,setIsSuppressed:f},w=p?null:Object(r.createElement)(d,{className:n,notices:O.notices,removeNotice:O.removeNotice,isEditor:h});return Object(r.createElement)(m.Provider,{value:O},a&&w,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{})},,,function(e,t,n){"use strict";n.d(t,"n",(function(){return c})),n.d(t,"l",(function(){return i})),n.d(t,"k",(function(){return a})),n.d(t,"m",(function(){return s})),n.d(t,"i",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return p})),n.d(t,"j",(function(){return f})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return m})),n.d(t,"g",(function(){return b})),n.d(t,"a",(function(){return h})),n.d(t,"h",(function(){return g})),n.d(t,"b",(function(){return v}));var r,o=n(2);const c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=c.pluginUrl+"images/",a=c.pluginUrl+"build/",s=c.buildPhase,u=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),p=o.STORE_PAGES.privacy.permalink,f=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),d=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),h=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},function(e,t){},function(e,t){e.exports=window.wp.autop},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:n=!1,cancelable:o=!1,element:c,detail:i={}}=t;if(!r)return;c||(c=document.body);const a=new r(e,{bubbles:n,cancelable:o,detail:i});c.dispatchEvent(a)};let c;const i=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{o(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}},function(e,t,n){"use strict";var r=n(0),o=n(32),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},,,,function(e,t,n){var r=n(112),o=n(93),c=o.setStyleProp,i=r.html,a=r.svg,s=r.isCustomAttribute,u=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n,r,l;e=e||{};var p={};for(t in e)r=e[t],s(t)?p[t]=r:(n=t.toLowerCase(),u.call(i,n)?p[(l=i[n]).propertyName]=!!(l.hasBooleanValue||l.hasOverloadedBooleanValue&&!r)||r:u.call(a,t)?p[(l=a[t]).propertyName]=r:o.PRESERVE_CUSTOM_ATTRIBUTES&&(p[t]=r));return c(e.style,p),p}},function(e,t,n){var r=n(3),o=n(116).default,c={reactCompat:!0},i=r.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:i,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var n,r,o="function"==typeof t,c={},i={};for(n in e)r=e[n],o&&(c=t(n,r))&&2===c.length?i[c[0]]=c[1]:"string"==typeof r&&(i[r]=n);return i},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,c))}}},function(e,t,n){for(var r,o=n(122).CASE_SENSITIVE_TAG_NAMES,c={},i=0,a=o.length;i{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},,,,function(e,t,n){var r=n(111),o=n(92),c=n(120),i={decodeEntities:!0,lowerCaseAttributeNames:!1};function a(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:r(c(e,(t=t||{}).htmlparser2||i),t)}a.domToReact=r,a.htmlToDOM=c,a.attributesToProps=o,e.exports=a,e.exports.default=a},,function(e,t){e.exports=window.wp.wordcount},,,,,,function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{srcElement:t,size:n=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:n,height:n,...o}):null}},,,function(e,t,n){var r=n(3),o=n(92),c=n(93),i=c.setStyleProp;function a(e){return c.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&c.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var c,s,u,l,p=(n=n||{}).library||r,f=p.cloneElement,d=p.createElement,m=p.isValidElement,b=[],h="function"==typeof n.replace,g=n.trim,v=0,y=t.length;v1&&(s=f(s,{key:s.key||v})),b.push(s);else if("text"!==c.type){switch(u=c.attribs,a(c)?i(u.style,u):u&&(u=o(u)),l=null,c.type){case"script":case"style":c.children[0]&&(u.dangerouslySetInnerHTML={__html:c.children[0].data});break;case"tag":"textarea"===c.name&&c.children[0]?u.defaultValue=c.children[0].data:c.children&&c.children.length&&(l=e(c.children,n));break;default:continue}y>1&&(u.key=v),b.push(d(c.name,u,l))}else g?c.data.trim()&&b.push(c.data):b.push(c.data);return 1===b.length?b[0]:b}},function(e,t,n){var r=n(113),o=n(114),c=n(115),i=c.MUST_USE_PROPERTY,a=c.HAS_BOOLEAN_VALUE,s=c.HAS_NUMERIC_VALUE,u=c.HAS_POSITIVE_NUMERIC_VALUE,l=c.HAS_OVERLOADED_BOOLEAN_VALUE;function p(e,t){return(e&t)===t}function f(e,t,n){var r,o,c,f=e.Properties,d=e.DOMAttributeNames;for(o in f)r=d[o]||(n?o:o.toLowerCase()),c=f[o],t[r]={attributeName:r,propertyName:o,mustUseProperty:p(c,i),hasBooleanValue:p(c,a),hasNumericValue:p(c,s),hasPositiveNumericValue:p(c,u),hasOverloadedBooleanValue:p(c,l)}}var d={};f(r,d);var m={};f(o,m,!0);var b={};f(r,b),f(o,b,!0),e.exports={html:d,svg:m,properties:b,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=r(n(117)),c=n(119);t.default=function(e,t){var n={};return e&&"string"==typeof e?(o.default(e,(function(e,r){e&&r&&(n[c.camelCase(e,t)]=r)})),n):n}},function(e,t,n){var r=n(118);e.exports=function(e,t){var n,o=null;if(!e||"string"!=typeof e)return o;for(var c,i,a=r(e),s="function"==typeof t,u=0,l=a.length;u/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,n=e.match(a);return n&&n[1]&&(t=n[1],i&&(e=e.replace(n[0],""))),c(r(e),null,t)}},function(e,t,n){var r=n(94),o=/<([a-zA-Z]+[0-9]?)/,c=//i,i=//i,a=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,s=r.isIE(9),u=s||r.isIE(),l=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},p=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var f=new window.DOMParser,d=s?"text/xml":"text/html";l=p=function(e,t){return t&&(e="<"+t+">"+e+""),s&&(e=e.replace(a,"<$1$2$3/>")),f.parseFromString(e,d)}}if(document.implementation){var m=document.implementation.createHTMLDocument(u?"html-dom-parser":void 0);l=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(p)return p(e)}}}var b,h=document.createElement("template");h.content&&(b=function(e){return h.innerHTML=e,h.content.childNodes}),e.exports=function(e){var t,n,r,a,s=e.match(o);switch(s&&s[1]&&(t=s[1].toLowerCase()),t){case"html":return n=p(e),c.test(e)||(r=n.getElementsByTagName("head")[0])&&r.parentNode.removeChild(r),i.test(e)||(r=n.getElementsByTagName("body")[0])&&r.parentNode.removeChild(r),n.getElementsByTagName("html");case"head":case"body":return a=l(e).getElementsByTagName(t),i.test(e)&&c.test(e)?a[0].parentNode.childNodes:a;default:return b?b(e):l(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(2),o=n(67),c=n(53);const i=e=>{let{country:t="",state:n="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:n.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},a=e=>{let{email:t=""}=e;return Object(c.isEmail)(t)?t.trim():""},s=e=>{const t=Object.keys(r.defaultAddressFields),n=Object(o.a)(t,{},e.country),c=Object.assign({},e);return n.forEach(t=>{let{key:n="",hidden:r=!1}=t;r&&((e,t)=>e in t)(n,e)&&(c[n]="")}),c}},function(e,t,n){"use strict";var r=n(0),o=n(4),c=n(5),i=n.n(c),a=n(1),s=n(27),u=n(88),l=n(62);t.a=function(e){var t=e.className,n=e.status,c=void 0===n?"info":n,p=e.children,f=e.spokenMessage,d=void 0===f?p:f,m=e.onRemove,b=void 0===m?o.noop:m,h=e.isDismissible,g=void 0===h||h,v=e.actions,y=void 0===v?[]:v,O=e.politeness,w=void 0===O?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(c):O,j=e.__unstableHTML;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(s.speak)(n,t)}),[n,t])}(d,w);var k=i()(t,"components-notice","is-"+c,{"is-dismissible":g});return j&&(p=Object(r.createElement)(r.RawHTML,null,p)),Object(r.createElement)("div",{className:k},Object(r.createElement)("div",{className:"components-notice__content"},p,y.map((function(e,t){var n=e.className,o=e.label,c=e.isPrimary,a=e.noDefaultClasses,s=void 0!==a&&a,u=e.onClick,p=e.url;return Object(r.createElement)(l.a,{key:t,href:p,isPrimary:c,isSecondary:!s&&!p,isLink:!s&&!!p,onClick:p?void 0:u,className:i()("components-notice__action",n)},o)}))),g&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:u.a,label:Object(a.__)("Dismiss this notice"),onClick:b,showTooltip:!1}))}},,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(24),o=n(0),c=n(84);n.p=c.k,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)(()=>Promise.all([n.e(1),n.e(11)]).then(n.bind(null,358)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)(()=>n.e(10).then(n.bind(null,386)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)(()=>n.e(18).then(n.bind(null,387)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)(()=>n.e(12).then(n.bind(null,359)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)(()=>n.e(8).then(n.bind(null,360)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)(()=>n.e(16).then(n.bind(null,361)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)(()=>n.e(13).then(n.bind(null,297)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)(()=>n.e(14).then(n.bind(null,362)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)(()=>n.e(9).then(n.bind(null,363)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)(()=>n.e(17).then(n.bind(null,364)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)(()=>n.e(15).then(n.bind(null,365)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)(()=>Promise.all([n.e(0),n.e(49),n.e(7)]).then(n.bind(null,374)))});const i=e=>Object(r.getRegisteredBlockComponents)(e)},,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=(e,t)=>{const n=[];return Object.keys(e).forEach(r=>{if(void 0!==t[r])switch(e[r].type){case"boolean":n[r]="false"!==t[r]&&!1!==t[r];break;case"number":n[r]=parseInt(t[r],10);break;case"array":case"object":n[r]=JSON.parse(t[r]);break;default:n[r]=t[r]}else n[r]=e[r].default}),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),o=n(74),c=n(100),i=n.n(c),a=n(22);const s=(e,t)=>e&&t[e]?t[e]:null,u=e=>{let{block:t,blockMap:n,blockWrapper:o,children:c,depth:l=1}=e;return c&&0!==c.length?Array.from(c).map((e,c)=>{const{blockName:p="",...f}={key:`${t}_${l}_${c}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},d=s(p,n);if(!d){const c=i()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof c&&c)return c;if(!Object(r.isValidElement)(c))return null;const a=e.childNodes.length?u({block:t,blockMap:n,children:e.childNodes,depth:l+1,blockWrapper:o}):void 0;return a?Object(r.cloneElement)(c,f,a):Object(r.cloneElement)(c,f)}const m=o||r.Fragment;return Object(r.createElement)(r.Suspense,{key:`${t}_${l}_${c}_suspense`,fallback:Object(r.createElement)("div",{className:"wc-block-placeholder"})},Object(r.createElement)(m,null,Object(r.createElement)(d,f,u({block:t,blockMap:n,children:e.children,depth:l+1,blockWrapper:o}),((e,t,n,o)=>{if(!Object(a.hasInnerBlocks)(e))return null;const c=n?Array.from(n).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],i=Object(a.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:n}=e;return!0===n&&!c.includes(t)}),u=o||r.Fragment;return Object(r.createElement)(u,null,i.map((e,n)=>{let{blockName:o,component:c}=e;const i=c||s(o,t);return i?Object(r.createElement)(i,{key:`${o}_forced_${n}`}):null}))})(p,n,e.children,o))))}):null},l=e=>{let{Block:t,selector:n,blockName:r,getProps:c=(()=>({})),blockMap:i,blockWrapper:a}=e;Object(o.b)({Block:t,selector:n,getProps:(e,t)=>{const n=u({block:r,blockMap:i,children:e.children||[],blockWrapper:a});return{...c(e,t),children:n}}})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.blocks},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(236)},,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(163),o=n(164),c=n(149),i=n(74),a=n(0),s=n(18),u=n.n(s),l=n(29),p=n.n(l),f=n(21),d=(n(53),n(47)),m=n.n(d);n(4),n(2),n(84);var b=n(96),h=Object(f.createHigherOrderComponent)(e=>class extends a.Component{constructor(){super(...arguments),p()(this,"state",{error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null}),p()(this,"loadProduct",()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),(e=>m()({path:"/wc/store/products/"+e}))(e).then(e=>{this.setState({product:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(b.a)(e);this.setState({product:null,loading:!1,error:t})})):this.setState({product:null,loading:!1,error:null}))})}componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}render(){const{error:t,loading:n,product:r}=this.state;return Object(a.createElement)(e,u()({},this.props,{error:t,getProduct:this.loadProduct,isLoading:n,product:r}))}},"withProduct"),g=n(65),v=n(80),y=n(42),O=n(1),w=n(108),j=n(32),k=Object(a.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)("path",{d:"M21 4H3a2 2 0 00-2 2v13c0 1.1.9 2 2 2h18a2 2 0 002-2V6a2 2 0 00-2-2zM3 19V6h8v13H3zm18 0h-8V6h8v13zm-7-9.5h6V11h-6zm0 2.5h6v1.5h-6zm0 2.5h6V16h-6z"}));const E="woocommerce/single-product";Object(O.__)("Single Product","woo-gutenberg-products-block"),Object(a.createElement)(w.a,{srcElement:k}),Object(O.__)("Display a single product.","woo-gutenberg-products-block"),Object.keys(Object(c.a)(E));var _=h(e=>{let{isLoading:t,product:n,children:r}=e;const{dispatchStoreEvent:o}=Object(y.a)(),c="wc-block-single-product wc-block-layout",i="woocommerce/single-product/"+((null==n?void 0:n.id)||0);return Object(a.useEffect)(()=>{o("product-render",{product:n,listName:E})},[n,o]),Object(a.createElement)(g.InnerBlockLayoutContextProvider,{parentName:E,parentClassName:c},Object(a.createElement)(g.ProductDataContextProvider,{product:n,isLoading:t},Object(a.createElement)(v.a,{context:i},Object(a.createElement)("div",{className:c},r))))}),S={isPreview:{type:"boolean",default:!1,save:!1},productId:{type:"number"}};Object(o.a)({Block:_,blockName:E,selector:".wp-block-woocommerce-single-product",getProps:e=>({attributes:Object(r.a)(S,e.dataset)}),blockMap:Object(c.a)(E)}),(()=>{const e=Object(c.a)("");Object.keys(e).forEach(t=>{const n=".wp-block-"+t.replace("/","-");Object(i.b)({Block:e[t],selector:n,getProps:e=>e.dataset})})})()}]); \ No newline at end of file diff --git a/build/single-product.asset.php b/build/single-product.asset.php new file mode 100644 index 00000000000..f84371ec6ae --- /dev/null +++ b/build/single-product.asset.php @@ -0,0 +1 @@ + array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '5e039693058ec8f2923f71dbfbc79db0'); \ No newline at end of file diff --git a/build/single-product.js b/build/single-product.js new file mode 100644 index 00000000000..d670f7a36c2 --- /dev/null +++ b/build/single-product.js @@ -0,0 +1,5 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["single-product"]=function(e){function t(t){for(var r,a,s=t[0],i=t[1],l=t[2],d=0,p=[];d{let{className:t,error:o,isLoading:s=!1,onRetry:d}=e;return Object(r.createElement)(l.Placeholder,{icon:Object(r.createElement)(n.a,{srcElement:a.a}),label:Object(c.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",t)},Object(r.createElement)(u.a,{error:o}),d&&Object(r.createElement)(r.Fragment,null,s?Object(r.createElement)(l.Spinner,null):Object(r.createElement)(l.Button,{isSecondary:!0,onClick:d},Object(c.__)("Retry","woo-gutenberg-products-block"))))}},103:function(e,t){e.exports=window.wp.autop},11:function(e,t){e.exports=window.wp.apiFetch},110:function(e,t,o){"use strict";o.d(t,"c",(function(){return n})),o.d(t,"d",(function(){return a})),o.d(t,"a",(function(){return s})),o.d(t,"b",(function(){return i}));var r=o(14),c=o(32);const n=(e,t)=>{if(c.n>2)return Object(r.registerBlockType)(e,t)},a=(e,t)=>{if(c.n>1)return Object(r.registerBlockType)(e,t)},s=()=>c.n>2,i=()=>c.n>1},115:function(e,t){},116:function(e,t){e.exports=window.wp.coreData},12:function(e,t){e.exports=window.wp.compose},120:function(e,t,o){"use strict";var r=o(7),c=o.n(r),n=o(0),a=o(40),s=o(4),i=o(5),l=o.n(i);t.a=e=>{let{className:t,item:o,isSelected:r,isLoading:i,onSelect:u,disabled:d,...p}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.c,c()({},p,{key:o.id,className:t,isSelected:r,item:o,onSelect:u,isSingle:!0,disabled:d})),r&&i&&Object(n.createElement)("div",{key:"loading",className:l()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(n.createElement)(s.Spinner,null)))}},125:function(e,t,o){"use strict";var r=o(0),c=o(1),n=o(55),a=o(161),s=o(3),i=o(9),l=o(36);t.a=e=>{const t=(Object(l.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(r.createElement)(i.InspectorControls,null,Object(r.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(r.createElement)("a",{href:`${s.ADMIN_URL}post.php?post=${t}&action=edit`,target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Edit this product's details","woo-gutenberg-products-block"),Object(r.createElement)(n.a,{srcElement:a.a,size:16}))),Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(c.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}},13:function(e,t){e.exports=window.wp.url},134:function(e,t){e.exports=window.wp.wordcount},135:function(e,t,o){"use strict";var r=o(7),c=o.n(r),n=o(0),a=o(1),s=o(6),i=(o(2),o(40)),l=o(12),u=Object(l.createHigherOrderComponent)(e=>{class t extends n.Component{render(){const{selected:t}=this.props,o=null==t;return Object(n.createElement)(e,c()({},this.props,{selected:o?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),d=o(273),p=o(16),m=o.n(p),b=o(31),g=o.n(b),w=o(34),h=o(35),O=Object(l.createHigherOrderComponent)(e=>{class t extends n.Component{constructor(){super(...arguments),m()(this,"state",{error:null,loading:!1,variations:{}}),m()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:o}=this.state;if(t)return;const r=this.getExpandedProduct();if(!r||o[r])return;const c=e.find(e=>e.id===r);c.variations&&0!==c.variations.length?(this.setState({loading:!0}),Object(w.g)(r).then(e=>{const t=e.map(e=>({...e,parent:r}));this.setState({variations:{...this.state.variations,[r]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(h.a)(e);this.setState({variations:{...this.state.variations,[r]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[r]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:o,showVariations:r}=this.props;r&&(!g()(e.selected,o)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props;return t.filter(t=>t.variations&&t.variations.find(t=>{let{id:o}=t;return o===e}))[0].id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:o}=this.props;if(!o)return null;let r=t&&t.length?t[0]:null;return r?this.prevSelectedItem=r:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(r=this.prevSelectedItem)),!e&&r?this.isProductId(r)?r:this.findParentProduct(r):null}render(){const{error:t,isLoading:o}=this.props,{error:r,loading:a,variations:s}=this.state;return Object(n.createElement)(e,c()({},this.props,{error:r||t,expandedProduct:this.getExpandedProduct(),isLoading:o,variations:s,variationsLoading:a}))}}return m()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),f=o(41),j=o(5),k=o.n(j),v=o(120);o(191);const E={list:Object(a.__)("Products","woo-gutenberg-products-block"),noItems:Object(a.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(a.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(a.__)("Product search results updated.","woo-gutenberg-products-block")},_=e=>{let{expandedProduct:t,error:o,instanceId:r,isCompact:l,isLoading:u,onChange:d,onSearch:p,products:m,renderItem:b,selected:g,showVariations:w,variations:h,variationsLoading:O}=e;if(o)return Object(n.createElement)(f.a,{error:o});const j=[...m,...h&&h[t]?h[t]:[]];return Object(n.createElement)(i.b,{className:"woocommerce-products",list:j,isCompact:l,isLoading:u,isSingle:!0,selected:j.filter(e=>{let{id:t}=e;return g.includes(t)}),onChange:d,renderItem:b||(w?e=>{const{item:t,search:o,depth:l=0,isSelected:d,onSelect:p}=e,m=t.variations&&Array.isArray(t.variations)?t.variations.length:0,b=k()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+l,"has-count",{"is-searching":o.length>0,"is-skip-level":0===l&&0!==t.parent,"is-variable":m>0});if(!t.breadcrumbs.length)return Object(n.createElement)(v.a,c()({},e,{className:k()(b,{"is-selected":d}),isSelected:d,item:t,onSelect:()=>()=>{p(t)()},isLoading:u||O,countLabel:t.variations.length>0?Object(a.sprintf)( +/* translators: %1$d is the number of variations of a product product. */ +Object(a.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-"+r,"aria-label":Object(a.sprintf)( +/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ +Object(a._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const g=Object(s.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(n.createElement)(i.c,c()({},g,{className:b,name:"variations-"+r}))}:null),onSearch:p,messages:E,isHierarchical:!0})};_.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=u(Object(d.a)(O(Object(l.withInstanceId)(_))))},136:function(e,t,o){"use strict";var r=o(0),c=o(18);const n=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=n},137:function(e,t){},14:function(e,t){e.exports=window.wp.blocks},150:function(e,t,o){"use strict";var r=o(16),c=o.n(r),n=o(0),a=o(8),s=o(1),i=o(32),l=e=>{let{imageUrl:t=i.m+"/block-error.svg",header:o=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:c,errorMessagePrefix:a=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(n.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(n.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(n.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&Object(n.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},o),r&&Object(n.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),c&&Object(n.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",c),l&&Object(n.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};o(244);class u extends a.Component{constructor(){super(...arguments),c()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(n.createElement)(n.Fragment,null,Object(n.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:o=!0,text:r,errorMessagePrefix:c,renderError:a,button:s}=this.props,{errorMessage:i,hasError:u}=this.state;return u?"function"==typeof a?a({errorMessage:i}):Object(n.createElement)(l,{errorMessage:o?i:null,header:e,imageUrl:t,text:r,errorMessagePrefix:c,button:s}):this.props.children}}t.a=u},161:function(e,t,o){"use strict";var r=o(0),c=o(18);const n=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=n},18:function(e,t){e.exports=window.wp.primitives},19:function(e,t){e.exports=window.wc.wcBlocksData},191:function(e,t){},197:function(e,t){e.exports=window.wp.warning},20:function(e,t){e.exports=window.wp.htmlEntities},21:function(e,t){e.exports=window.moment},244:function(e,t){},273:function(e,t,o){"use strict";var r=o(7),c=o.n(r),n=o(0),a=o(32),s=o(34),i=o(165),l=o(35);t.a=e=>t=>{let{selected:o,...r}=t;const[u,d]=Object(n.useState)(!0),[p,m]=Object(n.useState)(null),[b,g]=Object(n.useState)([]),w=a.o.productCount>100,h=async e=>{const t=await Object(l.a)(e);m(t),d(!1)},O=Object(n.useRef)(o);Object(n.useEffect)(()=>{Object(s.h)({selected:O.current}).then(e=>{g(e),d(!1)}).catch(h)},[O]);const f=Object(i.a)(e=>{Object(s.h)({selected:o,search:e}).then(e=>{g(e),d(!1)}).catch(h)},400),j=Object(n.useCallback)(e=>{d(!0),f(e)},[d,f]);return Object(n.createElement)(e,c()({},r,{selected:o,error:p,products:b,isLoading:u,onSearch:w?j:null}))}},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t){e.exports=window.wp.dataControls},31:function(e,t){e.exports=window.wp.isShallowEqual},32:function(e,t,o){"use strict";o.d(t,"o",(function(){return n})),o.d(t,"m",(function(){return a})),o.d(t,"l",(function(){return s})),o.d(t,"n",(function(){return i})),o.d(t,"j",(function(){return l})),o.d(t,"e",(function(){return u})),o.d(t,"f",(function(){return d})),o.d(t,"g",(function(){return p})),o.d(t,"k",(function(){return m})),o.d(t,"c",(function(){return b})),o.d(t,"d",(function(){return g})),o.d(t,"h",(function(){return w})),o.d(t,"a",(function(){return h})),o.d(t,"i",(function(){return O})),o.d(t,"b",(function(){return f}));var r,c=o(3);const n=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=n.pluginUrl+"images/",s=n.pluginUrl+"build/",i=n.buildPhase,l=null===(r=c.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=c.STORE_PAGES.checkout.id,d=c.STORE_PAGES.checkout.permalink,p=c.STORE_PAGES.privacy.permalink,m=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),b=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),g=c.STORE_PAGES.cart.permalink,w=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),h=Object(c.getSetting)("allowedCountries",{}),O=Object(c.getSetting)("shippingStates",{}),f=Object(c.getSetting)("allowedStates",{})},34:function(e,t,o){"use strict";o.d(t,"h",(function(){return l})),o.d(t,"e",(function(){return u})),o.d(t,"b",(function(){return d})),o.d(t,"i",(function(){return p})),o.d(t,"f",(function(){return m})),o.d(t,"c",(function(){return b})),o.d(t,"d",(function(){return g})),o.d(t,"g",(function(){return w})),o.d(t,"a",(function(){return h}));var r=o(13),c=o(11),n=o.n(c),a=o(6),s=o(3),i=o(32);const l=e=>{let{selected:t=[],search:o="",queryArgs:c={}}=e;const s=(e=>{let{selected:t=[],search:o="",queryArgs:c={}}=e;const n=i.o.productCount>100,a={per_page:n?100:0,catalog_visibility:"any",search:o,orderby:"title",order:"asc"},s=[Object(r.addQueryArgs)("/wc/store/products",{...a,...c})];return n&&t.length&&s.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:o,queryArgs:c});return Promise.all(s.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),p=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:o}=e;const c=(e=>{let{selected:t=[],search:o}=e;const c=Object(s.getSetting)("limitTags",!1),n=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:o})];return c&&t.length&&n.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:o});return Promise.all(c.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},b=e=>n()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>n()({path:"wc/store/products/categories/"+e}),w=e=>n()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const o=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(o?"":" - "+e.slug)}},35:function(e,t,o){"use strict";o.d(t,"a",(function(){return c})),o.d(t,"b",(function(){return n}));var r=o(1);const c=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},36:function(e,t){e.exports=window.wc.wcBlocksSharedContext},38:function(e,t){e.exports=window.wp.keycodes},39:function(e,t){e.exports=window.wp.escapeHtml},4:function(e,t){e.exports=window.wp.components},41:function(e,t,o){"use strict";var r=o(0),c=o(1),n=o(39);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:o}=e;return t?"general"===o?Object(r.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===o?Object(r.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},44:function(e,t){e.exports=window.wc.priceFormat},45:function(e,t){e.exports=window.wp.hooks},47:function(e,t){e.exports=window.wc.wcBlocksRegistry},476:function(e,t,o){"use strict";var r=o(7),c=o.n(r),n=o(16),a=o.n(n),s=o(0),i=o(12),l=o(34),u=o(35);const d=Object(i.createHigherOrderComponent)(e=>class extends s.Component{constructor(){super(...arguments),a()(this,"state",{error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null}),a()(this,"loadProduct",()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),Object(l.e)(e).then(e=>{this.setState({product:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(u.a)(e);this.setState({product:null,loading:!1,error:t})})):this.setState({product:null,loading:!1,error:null}))})}componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}render(){const{error:t,loading:o,product:r}=this.state;return Object(s.createElement)(e,c()({},this.props,{error:t,getProduct:this.loadProduct,isLoading:o,product:r}))}},"withProduct");t.a=d},51:function(e,t){e.exports=window.wp.deprecated},55:function(e,t,o){"use strict";var r=o(0);t.a=function(e){let{srcElement:t,size:o=24,...c}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:o,height:o,...c}):null}},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.dom},62:function(e,t){e.exports=window.wp.a11y},64:function(e,t){e.exports=window.regeneratorRuntime},78:function(e,t){e.exports=window.wc.wcBlocksSharedHocs},79:function(e,t){e.exports=window.ReactDOM},8:function(e,t){e.exports=window.React},82:function(e,t){e.exports=window.wp.viewport},842:function(e,t,o){e.exports=o(849)},843:function(e,t){},849:function(e,t,o){"use strict";o.r(t);var r=o(1),c=o(110),n=o(0),a=o(4),s=o(476),i=o(150),l=o(125);const u=Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 230 100"},Object(n.createElement)("path",{fill:"#E1E3E6",d:"M76 0h11v6H76zm0 11h88v11H76zm0 16h28v6H76zm0 17h154v28H76zm0 39h22v17H76zm28 0h44v17h-44zM0 0h66v66H0z",style:{width:"100%"}}));var d=o(9),p=(o(843),o(100)),m=e=>{let{error:t,isLoading:o,getProduct:r}=e;return Object(n.createElement)(p.a,{className:"wc-block-single-product-error",error:t,isLoading:o,onRetry:r})},b=o(135),g=e=>{let{attributes:t,setAttributes:o}=e;return Object(n.createElement)(b.a,{selected:t.productId||0,showVariations:!0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;o({productId:t})}})},w=e=>{let{isEditing:t,setIsEditing:o}=e;return Object(n.createElement)(d.BlockControls,null,Object(n.createElement)(a.ToolbarGroup,{controls:[{icon:"edit",title:Object(r.__)("Edit selected product","woo-gutenberg-products-block"),onClick:()=>o(!t),isActive:t}]}))},h=o(10),O=o(36),f=o(14);const j=e=>e.map(e=>{let[t,o={},r=[]]=e;const c=r?j(r):[];return Object(f.createBlock)(t,o,c)});var k=o(55),v=o(18),E=Object(n.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-2-9c-5 0-9 4-9 9H0l4 4 4-4H5a7 7 0 113 5.7l-1.5 1.4A9 9 0 1012 3z"})),_=Object(n.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M21 4H3a2 2 0 00-2 2v13c0 1.1.9 2 2 2h18a2 2 0 002-2V6a2 2 0 00-2-2zM3 19V6h8v13H3zm18 0h-8V6h8v13zm-7-9.5h6V11h-6zm0 2.5h6v1.5h-6zm0 2.5h6V16h-6z"})),y=o(875);const S="woocommerce/single-product",x=Object(r.__)("Single Product","woo-gutenberg-products-block"),P=Object(n.createElement)(k.a,{srcElement:_}),C=Object(r.__)("Display a single product.","woo-gutenberg-products-block"),B=[["core/columns",{},[["core/column",{},[["woocommerce/product-image",{showSaleBadge:!1}]]],["core/column",{},[["woocommerce/product-sale-badge"],["woocommerce/product-title",{headingLevel:2}],["woocommerce/product-rating"],["woocommerce/product-price"],["woocommerce/product-summary"],["woocommerce/product-stock-indicator"],["woocommerce/product-add-to-cart",{showFormElements:!0}],["woocommerce/product-sku"],["woocommerce/product-category-list"],["woocommerce/product-tag-list"]]]]]],N=["core/columns","core/column",...Object.keys(Object(y.a)(S))];var I=e=>{let{isLoading:t,product:o,clientId:c}=e;const{replaceInnerBlocks:s}=Object(h.useDispatch)("core/block-editor"),i=Object(n.useCallback)(()=>{s(c,j(B),!1)},[c,s]);return Object(n.createElement)(O.InnerBlockLayoutContextProvider,{parentName:S,parentClassName:"wc-block-single-product wc-block-layout"},Object(n.createElement)(O.ProductDataContextProvider,{product:o,isLoading:t},Object(n.createElement)(d.InspectorControls,null,Object(n.createElement)(a.PanelBody,{title:Object(r.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(a.Button,{label:Object(r.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:i,isTertiary:!0,className:"wc-block-single-product__reset-layout"},Object(n.createElement)(k.a,{srcElement:E})," ",Object(r.__)("Reset layout","woo-gutenberg-products-block")))),Object(n.createElement)("div",{className:"wc-block-single-product wc-block-layout"},Object(n.createElement)(d.InnerBlocks,{template:B,allowedBlocks:N,templateLock:!1,renderAppender:!1}))))},z=Object(s.a)(e=>{let{className:t,attributes:o,setAttributes:c,error:s,getProduct:p,product:b,isLoading:h,clientId:O}=e;const{productId:f,isPreview:j}=o,[k,v]=Object(n.useState)(!f);return j?u:s?Object(n.createElement)(m,{error:s,isLoading:h,getProduct:p}):Object(n.createElement)("div",{className:t},Object(n.createElement)(i.a,{header:Object(r.__)("Single Product Block Error","woo-gutenberg-products-block")},Object(n.createElement)(w,{setIsEditing:v,isEditing:k}),k?Object(n.createElement)(a.Placeholder,{icon:P,label:x,className:"wc-block-single-product"},C,Object(n.createElement)("div",{className:"wc-block-single-product__selection"},Object(n.createElement)(g,{attributes:o,setAttributes:c}),Object(n.createElement)(a.Button,{isSecondary:!0,onClick:()=>{v(!1)}},Object(r.__)("Done","woo-gutenberg-products-block")))):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(d.InspectorControls,null,Object(n.createElement)(a.PanelBody,{title:Object(r.__)("Product","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(g,{attributes:o,setAttributes:c}))),Object(n.createElement)(l.a,{productId:f}),Object(n.createElement)(I,{clientId:O,product:b,isLoading:h}))))}),A=o(5),L=o.n(A);const M={title:x,icon:{src:P,foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:C,supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{isPreview:{type:"boolean",default:!1,save:!1},productId:{type:"number"}},edit:z,save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",{className:L()("is-loading",t.className)},Object(n.createElement)(d.InnerBlocks.Content,null))}};Object(c.c)(S,M)},875:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var r=o(47),c=o(0),n=o(32);o.p=n.l,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(c.lazy)(()=>Promise.all([o.e(0),o.e(11)]).then(o.bind(null,477)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(c.lazy)(()=>Promise.all([o.e(1),o.e(3),o.e(10)]).then(o.bind(null,901)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(c.lazy)(()=>Promise.all([o.e(1),o.e(17)]).then(o.bind(null,902)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(c.lazy)(()=>o.e(12).then(o.bind(null,478)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(c.lazy)(()=>Promise.all([o.e(0),o.e(1),o.e(2),o.e(8)]).then(o.bind(null,479)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(c.lazy)(()=>o.e(15).then(o.bind(null,481)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(c.lazy)(()=>o.e(3).then(o.bind(null,274)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(c.lazy)(()=>o.e(13).then(o.bind(null,482)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(c.lazy)(()=>o.e(9).then(o.bind(null,483)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(c.lazy)(()=>o.e(16).then(o.bind(null,484)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(c.lazy)(()=>o.e(14).then(o.bind(null,485)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(c.lazy)(()=>Promise.all([o.e(0),o.e(1),o.e(2),o.e(7)]).then(o.bind(null,903)))});const a=e=>Object(r.getRegisteredBlockComponents)(e)},89:function(e,t){e.exports=window.wp.date},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/stock-filter-frontend.asset.php b/build/stock-filter-frontend.asset.php new file mode 100644 index 00000000000..215402432ec --- /dev/null +++ b/build/stock-filter-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'c78102b7bf554d0f5750408960b9e244'); \ No newline at end of file diff --git a/build/stock-filter-frontend.js b/build/stock-filter-frontend.js new file mode 100644 index 00000000000..d77865a6566 --- /dev/null +++ b/build/stock-filter-frontend.js @@ -0,0 +1,13 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=218)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},110:function(e,t){},126:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(5),u=r.n(o);r(144),t.a=e=>{let{className:t,onChange:r=(()=>{}),options:o=[],checked:s=[],isLoading:a=!1,isDisabled:l=!1,limit:i=10}=e;const[b,p]=Object(n.useState)(!1),f=Object(n.useMemo)(()=>[...Array(5)].map((e,t)=>Object(n.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),d=Object(n.useMemo)(()=>{const e=o.length-i;return!b&&Object(n.createElement)("li",{key:"show-more",className:"show-more"},Object(n.createElement)("button",{onClick:()=>{p(!0)},"aria-expanded":!1,"aria-label":Object(c.sprintf)( +/* translators: %s is referring the remaining count of options */ +Object(c._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(c.sprintf)( +/* translators: %s number of options to reveal. */ +Object(c._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))},[o,i,b]),O=Object(n.useMemo)(()=>b&&Object(n.createElement)("li",{key:"show-less",className:"show-less"},Object(n.createElement)("button",{onClick:()=>{p(!1)},"aria-expanded":!0,"aria-label":Object(c.__)("Show less options","woo-gutenberg-products-block")},Object(c.__)("Show less","woo-gutenberg-products-block"))),[b]),m=Object(n.useMemo)(()=>{const e=o.length>i+5;return Object(n.createElement)(n.Fragment,null,o.map((t,c)=>Object(n.createElement)(n.Fragment,{key:t.value},Object(n.createElement)("li",e&&!b&&c>=i&&{hidden:!0},Object(n.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:e=>{r(e.target.value)},checked:s.includes(t.value),disabled:l}),Object(n.createElement)("label",{htmlFor:t.value},t.label)),e&&c===i-1&&d)),e&&O)},[o,r,s,b,i,O,d,l]),j=u()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":a},t);return Object(n.createElement)("ul",{className:j},a?f:m)}},143:function(e,t){},144:function(e,t){},162:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),c=r(98),o=r(4),u=r(33),s=r(59),a=r(82),l=r(43);const i=e=>{let{queryAttribute:t,queryPrices:r,queryStock:i,queryState:b}=e,p=Object(l.a)();p+="-collection-data";const[f]=Object(s.a)(p),[d,O]=Object(s.b)("calculate_attribute_counts",[],p),[m,j]=Object(s.b)("calculate_price_range",null,p),[g,w]=Object(s.b)("calculate_stock_status_counts",null,p),E=Object(u.a)(t||{}),_=Object(u.a)(r),h=Object(u.a)(i);Object(n.useEffect)(()=>{"object"==typeof E&&Object.keys(E).length&&(d.find(e=>e.taxonomy===E.taxonomy)||O([...d,E]))},[E,d,O]),Object(n.useEffect)(()=>{m!==_&&void 0!==_&&j(_)},[_,j,m]),Object(n.useEffect)(()=>{g!==h&&void 0!==h&&w(h)},[h,w,g]);const[k,y]=Object(n.useState)(!1),[v]=Object(c.a)(k,200);k||y(!0);const S=Object(n.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(o.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:r}=e;return{taxonomy:t,query_type:r}}),["taxonomy","query_type"])),t})(f),[f]);return Object(a.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...b,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...S},shouldSelect:v})}},17:function(e,t){e.exports=window.wp.isShallowEqual},18:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t{let{attributes:t,isEditor:r=!1}=e;const[n]=Object(c.useState)(Object(b.getSetting)("hideOutOfStockItems",!1)),[{outofstock:O,...w}]=Object(c.useState)(Object(b.getSetting)("stockStatusOptions",{})),[E]=Object(c.useState)(n?w:{outofstock:O,...w}),[_,h]=Object(c.useState)([]),[k,y]=Object(c.useState)(t.isPreview?g:[]),[v]=Object(c.useState)(Object.entries(E).map(e=>{let[t,r]=e;return{slug:t,name:r}}).filter(e=>!!e.name).sort((e,t)=>e.slug.localeCompare(t.slug))),[S]=Object(l.a)(),[x,P]=Object(l.b)("stock_status",[]),{results:R,isLoading:T}=Object(i.a)({queryStock:!0,queryState:S}),C=Object(c.useCallback)(e=>R.stock_status_counts?R.stock_status_counts.find(t=>{let{status:r,count:n}=t;return r===e&&0!==Number(n)}):null,[R]);Object(c.useEffect)(()=>{if(T||t.isPreview)return;const e=v.map(e=>{const r=C(e.slug);if(!(r||_.includes(e.slug)||(n=e.slug,null!=S&&S.stock_status&&S.stock_status.some(e=>{let{status:t=[]}=e;return t.includes(n)}))))return null;var n;const o=r?Number(r.count):0;return{value:e.slug,name:Object(j.decodeEntities)(e.name),label:Object(c.createElement)(d.a,{name:Object(j.decodeEntities)(e.name),count:t.showCounts?o:null})}}).filter(Boolean);y(e)},[t.showCounts,t.isPreview,T,C,_,S.stock_status,v]);const A=Object(c.useCallback)(e=>{r||e&&P(_)},[r,P,_]);Object(c.useEffect)(()=>{t.showFilterButton||A(_)},[t.showFilterButton,_,A]);const N=Object(c.useMemo)(()=>x,[x]),M=Object(s.a)(N),B=Object(a.a)(M);Object(c.useEffect)(()=>{m()(B,M)||m()(_,M)||h(M)},[_,M,B]);const F=Object(c.useCallback)(e=>{const t=e=>{const{name:t}=k.find(t=>t.value===e);return t},r=e=>{let{filterAdded:r,filterRemoved:n}=e;const c=r?t(r):null,s=n?t(n):null;c?Object(u.speak)(Object(o.sprintf)( +/* translators: %s stock statuses (for example: 'instock'...) */ +Object(o.__)("%s filter added.","woo-gutenberg-products-block"),c)):s&&Object(u.speak)(Object(o.sprintf)( +/* translators: %s stock statuses (for example:'instock'...) */ +Object(o.__)("%s filter removed.","woo-gutenberg-products-block"),s))},n=_.includes(e),c=_.filter(t=>t!==e);n?r({filterRemoved:e}):(c.push(e),c.sort(),r({filterAdded:e})),h(c)},[_,k]);if(0===k.length)return null;const L="h"+t.headingLevel,q=!t.isPreview&&!E,U=!t.isPreview&&T;return Object(c.createElement)(c.Fragment,null,!r&&t.heading&&Object(c.createElement)(L,{className:"wc-block-stock-filter__title"},t.heading),Object(c.createElement)("div",{className:"wc-block-stock-filter"},Object(c.createElement)(p.a,{className:"wc-block-stock-filter-list",options:k,checked:_,onChange:F,isLoading:q,isDisabled:U}),t.showFilterButton&&Object(c.createElement)(f.a,{className:"wc-block-stock-filter__button",disabled:q||U,onClick:()=>A(_)})))},getProps:e=>({attributes:{showCounts:"true"===e.dataset.showCounts,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3,showFilterButton:"true"===e.dataset.showFilterButton}})})},25:function(e,t){e.exports=window.wp.htmlEntities},27:function(e,t){e.exports=window.wp.a11y},29:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},3:function(e,t){e.exports=window.React},33:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),c=r(17),o=r.n(c);function u(e){const t=Object(n.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},34:function(e,t,r){"use strict";var n=r(29),c=r.n(n),o=r(0),u=r(3),s=r(1),a=r(84),l=e=>{let{imageUrl:t=a.l+"/block-error.svg",header:r=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:c,errorMessagePrefix:u=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(o.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(o.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(o.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(o.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(o.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),c&&Object(o.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},u?u+" ":"",c),l&&Object(o.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};r(55);class i extends u.Component{constructor(){super(...arguments),c()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:c,renderError:u,button:s}=this.props,{errorMessage:a,hasError:i}=this.state;return i?"function"==typeof u?u({errorMessage:a}):Object(o.createElement)(l,{errorMessage:r?a:null,header:e,imageUrl:t,text:n,errorMessagePrefix:c,button:s}):this.props.children}}t.a=i},37:function(e,t,r){"use strict";var n=r(0),c=r(5),o=r.n(c);t.a=e=>{let t,{label:r,screenReaderLabel:c,wrapperElement:u,wrapperProps:s={}}=e;const a=null!=r,l=null!=c;return!a&&l?(t=u||"span",s={...s,className:o()(s.className,"screen-reader-text")},Object(n.createElement)(t,s,c)):(t=u||n.Fragment,a&&l&&r!==c?Object(n.createElement)(t,s,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},c)):Object(n.createElement)(t,s,r))}},4:function(e,t){e.exports=window.lodash},43:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const c=Object(n.createContext)("page"),o=()=>Object(n.useContext)(c);c.Provider},5:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t{const t=Object(i.a)();e=e||t;const r=Object(c.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:u}=Object(c.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(o.useCallback)(t=>{u(e,t)},[e,u])]},p=(e,t,r)=>{const u=Object(i.a)();r=r||u;const s=Object(c.useSelect)(c=>c(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t),[r,e]),{setQueryValue:a}=Object(c.useDispatch)(n.QUERY_STATE_STORE_KEY);return[s,Object(o.useCallback)(t=>{a(r,e,t)},[r,e,a])]},f=(e,t)=>{const r=Object(i.a)();t=t||r;const[n,c]=b(t),u=Object(a.a)(n),p=Object(a.a)(e),f=Object(l.a)(p),d=Object(o.useRef)(!1);return Object(o.useEffect)(()=>{s()(f,p)||(c(Object.assign({},u,p)),d.current=!0)},[u,p,f,c]),d.current?[n,c]:[e,c]}},6:function(e,t){e.exports=window.wc.wcBlocksData},61:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(3);function c(e,t,r){var c=this,o=Object(n.useRef)(null),u=Object(n.useRef)(0),s=Object(n.useRef)(null),a=Object(n.useRef)([]),l=Object(n.useRef)(),i=Object(n.useRef)(),b=Object(n.useRef)(e),p=Object(n.useRef)(!0);b.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var d=!!(r=r||{}).leading,O=!("trailing"in r)||!!r.trailing,m="maxWait"in r,j=m?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=a.current,r=l.current;return a.current=l.current=null,u.current=e,i.current=b.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(s.current),s.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-o.current,n=e-u.current;return!o.current||r>=t||r<0||m&&n>=j},g=function(t){return s.current=null,O&&a.current?e(t):(a.current=l.current=null,i.current)},w=function(){var e=Date.now();if(n(e))return g(e);if(p.current){var c=e-o.current,s=e-u.current,a=t-c,l=m?Math.min(a,j-s):a;r(w,l)}},E=function(){for(var b=[],f=0;f{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},72:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(37);r(143),t.a=e=>{let{name:t,count:r}=e;return Object(n.createElement)(n.Fragment,null,t,Number.isFinite(r)&&Object(n.createElement)(o.a,{label:r,screenReaderLabel:Object(c.sprintf)( +/* translators: %s number of products. */ +Object(c._n)("%s product","%s products",r,"woo-gutenberg-products-block"),r),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},74:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return i}));var n=r(18),c=r.n(n),o=r(0),u=r(34);const s=[".wp-block-woocommerce-cart"],a=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:c=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const o=n(e,r),u=c(e,r),s={...e.dataset,...o.attributes||{}};e.classList.remove("is-loading"),l({Block:t,container:e,props:o,attributes:s,errorBoundaryProps:u})})},l=e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:a={}}=e;Object(o.render)(Object(o.createElement)(u.a,a,Object(o.createElement)(o.Suspense,{fallback:Object(o.createElement)("div",{className:"wc-block-placeholder"})},Object(o.createElement)(t,c()({},s,{attributes:n})))),r)},i=e=>{const t=document.body.querySelectorAll(s.join(","));(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:c,wrappers:o}=e;const u=document.body.querySelectorAll(c);o.length>0&&Array.prototype.filter.call(u,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,o)),a({Block:t,containers:u,getProps:r,getErrorBoundaryProps:n})})({...e,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:c,wrapper:o}=e;const u=o.querySelectorAll(c);a({Block:t,containers:u,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},75:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(3);function c(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},8:function(e,t,r){e.exports=r(56)()},82:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(6),c=r(9),o=r(0),u=r(33),s=r(64);const a=e=>{const{namespace:t,resourceName:r,resourceValues:a=[],query:l={},shouldSelect:i=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(o.useRef)({results:[],isLoading:!0}),p=Object(u.a)(l),f=Object(u.a)(a),d=Object(s.a)(),O=Object(c.useSelect)(e=>{if(!i)return null;const c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,p,f],u=c.getCollectionError(...o);return u&&d(u),{results:c.getCollection(...o),isLoading:!c.hasFinishedResolution("getCollection",o)}},[t,r,f,p,i]);return null!==O&&(b.current=O),b.current}},84:function(e,t,r){"use strict";r.d(t,"n",(function(){return o})),r.d(t,"l",(function(){return u})),r.d(t,"k",(function(){return s})),r.d(t,"m",(function(){return a})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return i})),r.d(t,"f",(function(){return b})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return d})),r.d(t,"g",(function(){return O})),r.d(t,"a",(function(){return m})),r.d(t,"h",(function(){return j})),r.d(t,"b",(function(){return g}));var n,c=r(2);const o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),u=o.pluginUrl+"images/",s=o.pluginUrl+"build/",a=o.buildPhase,l=null===(n=c.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,i=(c.STORE_PAGES.checkout.id,c.STORE_PAGES.checkout.permalink),b=c.STORE_PAGES.privacy.permalink,p=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),f=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id,c.STORE_PAGES.cart.permalink),d=c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),O=Object(c.getSetting)("shippingCountries",{}),m=Object(c.getSetting)("allowedCountries",{}),j=Object(c.getSetting)("shippingStates",{}),g=Object(c.getSetting)("allowedStates",{})},9:function(e,t){e.exports=window.wp.data},98:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(3),c=r(61);function o(e,t){return e===t}function u(e){return"function"==typeof e?function(){return e}:e}function s(e,t,r){var s=r&&r.equalityFn||o,a=function(e){var t=Object(n.useState)(u(e)),r=t[0],c=t[1];return[r,Object(n.useCallback)((function(e){return c(u(e))}),[])]}(e),l=a[0],i=a[1],b=Object(c.a)(Object(n.useCallback)((function(e){return i(e)}),[i]),t,r),p=Object(n.useRef)(e);return s(p.current,e)||(b(e),p.current=e),[l,b]}},99:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(8),r(5)),u=r.n(o),s=r(37);r(110);const a=e=>{let{className:t,disabled:r,label: +/* translators: Submit button text for filters. */ +o=Object(c.__)("Go","woo-gutenberg-products-block"),onClick:a,screenReaderLabel:l=Object(c.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:u()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:r,onClick:a},Object(n.createElement)(s.a,{label:o,screenReaderLabel:l}))};a.defaultProps={disabled:!1},t.a=a}}); \ No newline at end of file diff --git a/build/stock-filter.asset.php b/build/stock-filter.asset.php new file mode 100644 index 00000000000..a98bff687fe --- /dev/null +++ b/build/stock-filter.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'f2b99bb22e2b60ee9d0f83e9ef9b91ec'); \ No newline at end of file diff --git a/build/stock-filter.js b/build/stock-filter.js new file mode 100644 index 00000000000..89b534987c7 --- /dev/null +++ b/build/stock-filter.js @@ -0,0 +1,15 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["stock-filter"]=function(e){function t(t){for(var n,s,l=t[0],a=t[1],u=t[2],b=0,d=[];b{const t=Object(i.a)();e=e||t;const c=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:s}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(r.useCallback)(t=>{s(e,t)},[e,s])]},d=(e,t,c)=>{const s=Object(i.a)();c=c||s;const l=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:a}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[l,Object(r.useCallback)(t=>{a(c,e,t)},[c,e,a])]},p=(e,t)=>{const c=Object(i.a)();t=t||c;const[n,o]=b(t),s=Object(a.a)(n),d=Object(a.a)(e),p=Object(u.a)(d),m=Object(r.useRef)(!1);return Object(r.useEffect)(()=>{l()(p,d)||(o(Object.assign({},s,d)),m.current=!0)},[s,d,p,o]),m.current?[n,o]:[e,o]}},12:function(e,t){e.exports=window.wp.compose},121:function(e,t,c){"use strict";var n=c(0),o=c(6),r=c(1),s=c(4);function l(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(n.createElement)(s.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(s.Path,{d:c[t]})):null}class a extends n.Component{createLevelControl(e,t,c){const o=e===t;return{icon:Object(n.createElement)(l,{level:e}),title:Object(r.sprintf)( +/* translators: %s: heading level e.g: "2", "3", "4" */ +Object(r.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:o,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:r,onChange:a}=this.props;return Object(n.createElement)(s.ToolbarGroup,{isCollapsed:e,icon:Object(n.createElement)(l,{level:r}),controls:Object(o.range)(t,c).map(e=>this.createLevelControl(e,r,a))})}}t.a=a},126:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},128:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(37);c(330),t.a=e=>{let{name:t,count:c}=e;return Object(n.createElement)(n.Fragment,null,t,Number.isFinite(c)&&Object(n.createElement)(r.a,{label:c,screenReaderLabel:Object(o.sprintf)( +/* translators: %s number of products. */ +Object(o._n)("%s product","%s products",c,"woo-gutenberg-products-block"),c),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},14:function(e,t){e.exports=window.wp.blocks},140:function(e,t,c){"use strict";var n=c(0),o=(c(2),c(9)),r=c(12),s=c(1);c(194),t.a=Object(r.withInstanceId)(e=>{let{className:t,headingLevel:c,onChange:r,heading:l,instanceId:a}=e;const u="h"+c;return Object(n.createElement)(u,{className:t},Object(n.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+a},Object(s.__)("Block title","woo-gutenberg-products-block")),Object(n.createElement)(o.PlainText,{id:"block-title-"+a,className:"wc-block-editor-components-title",value:l,onChange:r}))})},142:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(8);function o(e,t){const c=Object(n.useRef)();return Object(n.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},149:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(19),o=c(10),r=c(0),s=c(52),l=c(126);const a=e=>{const{namespace:t,resourceName:c,resourceValues:a=[],query:u={},shouldSelect:i=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(r.useRef)({results:[],isLoading:!0}),d=Object(s.a)(u),p=Object(s.a)(a),m=Object(l.a)(),O=Object(o.useSelect)(e=>{if(!i)return null;const o=e(n.COLLECTIONS_STORE_KEY),r=[t,c,d,p],s=o.getCollectionError(...r);return s&&m(s),{results:o.getCollection(...r),isLoading:!o.hasFinishedResolution("getCollection",r)}},[t,c,p,d,i]);return null!==O&&(b.current=O),b.current}},179:function(e,t,c){"use strict";var n=c(0),o=c(1),r=(c(2),c(5)),s=c.n(r),l=c(37);c(241);const a=e=>{let{className:t,disabled:c,label: +/* translators: Submit button text for filters. */ +r=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:a,screenReaderLabel:u=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:s()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:c,onClick:a},Object(n.createElement)(l.a,{label:r,screenReaderLabel:u}))};a.defaultProps={disabled:!1},t.a=a},18:function(e,t){e.exports=window.wp.primitives},19:function(e,t){e.exports=window.wc.wcBlocksData},194:function(e,t){},20:function(e,t){e.exports=window.wp.htmlEntities},241:function(e,t){},248:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(5),s=c.n(r);c(332),t.a=e=>{let{className:t,onChange:c=(()=>{}),options:r=[],checked:l=[],isLoading:a=!1,isDisabled:u=!1,limit:i=10}=e;const[b,d]=Object(n.useState)(!1),p=Object(n.useMemo)(()=>[...Array(5)].map((e,t)=>Object(n.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),m=Object(n.useMemo)(()=>{const e=r.length-i;return!b&&Object(n.createElement)("li",{key:"show-more",className:"show-more"},Object(n.createElement)("button",{onClick:()=>{d(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)( +/* translators: %s is referring the remaining count of options */ +Object(o._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(o.sprintf)( +/* translators: %s number of options to reveal. */ +Object(o._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))},[r,i,b]),O=Object(n.useMemo)(()=>b&&Object(n.createElement)("li",{key:"show-less",className:"show-less"},Object(n.createElement)("button",{onClick:()=>{d(!1)},"aria-expanded":!0,"aria-label":Object(o.__)("Show less options","woo-gutenberg-products-block")},Object(o.__)("Show less","woo-gutenberg-products-block"))),[b]),j=Object(n.useMemo)(()=>{const e=r.length>i+5;return Object(n.createElement)(n.Fragment,null,r.map((t,o)=>Object(n.createElement)(n.Fragment,{key:t.value},Object(n.createElement)("li",e&&!b&&o>=i&&{hidden:!0},Object(n.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:e=>{c(e.target.value)},checked:l.includes(t.value),disabled:u}),Object(n.createElement)("label",{htmlFor:t.value},t.label)),e&&o===i-1&&m)),e&&O)},[r,c,l,b,i,O,m,u]),h=s()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":a},t);return Object(n.createElement)("ul",{className:h},a?p:j)}},3:function(e,t){e.exports=window.wc.wcSettings},31:function(e,t){e.exports=window.wp.isShallowEqual},330:function(e,t){},332:function(e,t){},37:function(e,t,c){"use strict";var n=c(0),o=c(5),r=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:s,wrapperProps:l={}}=e;const a=null!=c,u=null!=o;return!a&&u?(t=s||"span",l={...l,className:r()(l.className,"screen-reader-text")},Object(n.createElement)(t,l,o)):(t=s||n.Fragment,a&&u&&c!==o?Object(n.createElement)(t,l,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,l,c))}},4:function(e,t){e.exports=window.wp.components},488:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var n=c(0),o=c(365),r=c(6),s=c(52),l=c(102),a=c(149),u=c(68);const i=e=>{let{queryAttribute:t,queryPrices:c,queryStock:i,queryState:b}=e,d=Object(u.a)();d+="-collection-data";const[p]=Object(l.a)(d),[m,O]=Object(l.b)("calculate_attribute_counts",[],d),[j,h]=Object(l.b)("calculate_price_range",null,d),[w,f]=Object(l.b)("calculate_stock_status_counts",null,d),g=Object(s.a)(t||{}),v=Object(s.a)(c),k=Object(s.a)(i);Object(n.useEffect)(()=>{"object"==typeof g&&Object.keys(g).length&&(m.find(e=>e.taxonomy===g.taxonomy)||O([...m,g]))},[g,m,O]),Object(n.useEffect)(()=>{j!==v&&void 0!==v&&h(v)},[v,h,j]),Object(n.useEffect)(()=>{w!==k&&void 0!==k&&f(k)},[k,f,w]);const[E,_]=Object(n.useState)(!1),[y]=Object(o.a)(E,200);E||_(!0);const S=Object(n.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(r.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:c}=e;return{taxonomy:t,query_type:c}}),["taxonomy","query_type"])),t})(p),[p]);return Object(a.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...b,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...S},shouldSelect:y})}},52:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(0),o=c(31),r=c.n(o);function s(e){const t=Object(n.useRef)(e);return r()(e,t.current)||(t.current=e),t.current}},55:function(e,t,c){"use strict";var n=c(0);t.a=function(e){let{srcElement:t,size:c=24,...o}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:c,height:c,...o}):null}},6:function(e,t){e.exports=window.lodash},62:function(e,t){e.exports=window.wp.a11y},68:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0);const o=Object(n.createContext)("page"),r=()=>Object(n.useContext)(o);o.Provider},788:function(e,t,c){"use strict";var n=c(0),o=c(18);const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"}));t.a=r},793:function(e,t,c){e.exports=c(863)},794:function(e,t){},795:function(e,t){},8:function(e,t){e.exports=window.React},863:function(e,t,c){"use strict";c.r(t);var n=c(7),o=c.n(n),r=c(0),s=c(1),l=c(14),a=c(55),u=c(788),i=c(5),b=c.n(i),d=c(9),p=c(4),m=c(121),O=c(140),j=c(62),h=c(52),w=c(142),f=c(102),g=c(488),v=c(3),k=c(248),E=c(179),_=c(128),y=c(31),S=c.n(y),C=c(20);const x=[{value:"preview-1",name:"In Stock",label:Object(r.createElement)(_.a,{name:"In Stock",count:3})},{value:"preview-2",name:"Out of sotck",label:Object(r.createElement)(_.a,{name:"Out of stock",count:3})},{value:"preview-3",name:"On backorder",label:Object(r.createElement)(_.a,{name:"On backorder",count:2})}];c(795);var P=e=>{let{attributes:t,isEditor:c=!1}=e;const[n]=Object(r.useState)(Object(v.getSetting)("hideOutOfStockItems",!1)),[{outofstock:o,...l}]=Object(r.useState)(Object(v.getSetting)("stockStatusOptions",{})),[a]=Object(r.useState)(n?l:{outofstock:o,...l}),[u,i]=Object(r.useState)([]),[b,d]=Object(r.useState)(t.isPreview?x:[]),[p]=Object(r.useState)(Object.entries(a).map(e=>{let[t,c]=e;return{slug:t,name:c}}).filter(e=>!!e.name).sort((e,t)=>e.slug.localeCompare(t.slug))),[m]=Object(f.a)(),[O,y]=Object(f.b)("stock_status",[]),{results:P,isLoading:N}=Object(g.a)({queryStock:!0,queryState:m}),H=Object(r.useCallback)(e=>P.stock_status_counts?P.stock_status_counts.find(t=>{let{status:c,count:n}=t;return c===e&&0!==Number(n)}):null,[P]);Object(r.useEffect)(()=>{if(N||t.isPreview)return;const e=p.map(e=>{const c=H(e.slug);if(!(c||u.includes(e.slug)||(n=e.slug,null!=m&&m.stock_status&&m.stock_status.some(e=>{let{status:t=[]}=e;return t.includes(n)}))))return null;var n;const o=c?Number(c.count):0;return{value:e.slug,name:Object(C.decodeEntities)(e.name),label:Object(r.createElement)(_.a,{name:Object(C.decodeEntities)(e.name),count:t.showCounts?o:null})}}).filter(Boolean);d(e)},[t.showCounts,t.isPreview,N,H,u,m.stock_status,p]);const L=Object(r.useCallback)(e=>{c||e&&y(u)},[c,y,u]);Object(r.useEffect)(()=>{t.showFilterButton||L(u)},[t.showFilterButton,u,L]);const V=Object(r.useMemo)(()=>O,[O]),M=Object(h.a)(V),F=Object(w.a)(M);Object(r.useEffect)(()=>{S()(F,M)||S()(u,M)||i(M)},[u,M,F]);const T=Object(r.useCallback)(e=>{const t=e=>{const{name:t}=b.find(t=>t.value===e);return t},c=e=>{let{filterAdded:c,filterRemoved:n}=e;const o=c?t(c):null,r=n?t(n):null;o?Object(j.speak)(Object(s.sprintf)( +/* translators: %s stock statuses (for example: 'instock'...) */ +Object(s.__)("%s filter added.","woo-gutenberg-products-block"),o)):r&&Object(j.speak)(Object(s.sprintf)( +/* translators: %s stock statuses (for example:'instock'...) */ +Object(s.__)("%s filter removed.","woo-gutenberg-products-block"),r))},n=u.includes(e),o=u.filter(t=>t!==e);n?c({filterRemoved:e}):(o.push(e),o.sort(),c({filterAdded:e})),i(o)},[u,b]);if(0===b.length)return null;const R="h"+t.headingLevel,z=!t.isPreview&&!a,B=!t.isPreview&&N;return Object(r.createElement)(r.Fragment,null,!c&&t.heading&&Object(r.createElement)(R,{className:"wc-block-stock-filter__title"},t.heading),Object(r.createElement)("div",{className:"wc-block-stock-filter"},Object(r.createElement)(k.a,{className:"wc-block-stock-filter-list",options:b,checked:u,onChange:T,isLoading:z,isDisabled:B}),t.showFilterButton&&Object(r.createElement)(E.a,{className:"wc-block-stock-filter__button",disabled:z||B,onClick:()=>L(u)})))};c(794);var N=Object(p.withSpokenMessages)(e=>{let{attributes:t,setAttributes:c}=e;const{className:n,heading:o,headingLevel:l,showCounts:a,showFilterButton:u}=t;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(d.InspectorControls,{key:"inspector"},Object(r.createElement)(p.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(s.__)("Product count","woo-gutenberg-products-block"),help:a?Object(s.__)("Product count is visible.","woo-gutenberg-products-block"):Object(s.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>c({showCounts:!a})}),Object(r.createElement)("p",null,Object(s.__)("Heading Level","woo-gutenberg-products-block")),Object(r.createElement)(m.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:l,onChange:e=>c({headingLevel:e})})),Object(r.createElement)(p.PanelBody,{title:Object(s.__)("Block Settings","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(s.__)("Filter button","woo-gutenberg-products-block"),help:u?Object(s.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(s.__)("Products will update as options are selected.","woo-gutenberg-products-block"),checked:u,onChange:e=>c({showFilterButton:e})}))),Object(r.createElement)("div",{className:b()("wc-block-stock-filter",n)},Object(r.createElement)(O.a,{className:"wc-block-stock-filter__title",headingLevel:l,heading:o,onChange:e=>c({heading:e})}),Object(r.createElement)(p.Disabled,null,Object(r.createElement)(P,{attributes:t,isEditor:!0}))))});Object(l.registerBlockType)("woocommerce/stock-filter",{title:Object(s.__)("Filter Products by Stock","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(a.a,{srcElement:u.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Allow customers to filter the grid by products stock status. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{heading:{type:"string",default:Object(s.__)("Filter by stock status","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3},showCounts:{type:"boolean",default:!0},showFilterButton:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:N,save(e){let{attributes:t}=e;const{className:c,showCounts:n,heading:s,headingLevel:l,showFilterButton:a}=t,u={"data-show-counts":n,"data-heading":s,"data-heading-level":l};return a&&(u["data-show-filter-button"]=a),Object(r.createElement)("div",o()({className:b()("is-loading",c)},u),Object(r.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-stock-filter__placeholder"}))}})},9:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/vendors--atomic-block-components/add-to-cart--cart-blocks/order-summary--checkout-blocks/billing-ad--c5eb4dcd-frontend.js b/build/vendors--atomic-block-components/add-to-cart--cart-blocks/order-summary--checkout-blocks/billing-ad--c5eb4dcd-frontend.js new file mode 100644 index 00000000000..c490e8bce47 --- /dev/null +++ b/build/vendors--atomic-block-components/add-to-cart--cart-blocks/order-summary--checkout-blocks/billing-ad--c5eb4dcd-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[0],{272:function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"c",(function(){return d})),r.d(t,"b",(function(){return b}));r(69);var a=r(3),n=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,r=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(r,t),this.tags.push(r)}var a=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;ta&&(a=(t=t.trim()).charCodeAt(0)),a){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*r&&0c.charCodeAt(8))break;case 115:o=o.replace(c,"-webkit-"+c)+";"+o;break;case 207:case 102:o=o.replace(c,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0d)&&(M=($=$.replace(" ",":")).length),096?h:d};function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function p(e){for(var t=1;t=4;++a,n-=4)t=1540483477*(65535&(t=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(n){case 3:r^=(255&e.charCodeAt(a+2))<<16;case 2:r^=(255&e.charCodeAt(a+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(a)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)},n={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=r(298),o=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},f=Object(i.a)((function(e){return c(e)?e:e.replace(o,"-$&").toLowerCase()})),u=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,(function(e,t,r){return d={name:t,styles:r,next:d},t}))}return 1===n[e]||c(e)||"number"!=typeof t||0===t?t:t+"px"};function h(e,t,r,a){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return d={name:r.name,styles:r.styles,next:d},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)d={name:n.name,styles:n.styles,next:d},n=n.next;return r.styles+";"}return function(e,t,r){var a="";if(Array.isArray(r))for(var n=0;n *{",i,":",a,"px;&:last-child{",i,":0;}}")})," ",(function(e){return e.isReversed?i:""}),""),s=Object(a.a)("div",{target:"eboqfv51",label:"Item"})({name:"13luw5d",styles:"box-sizing:border-box;min-width:0;max-width:100%;"}),c=Object(a.a)(s,{target:"eboqfv52",label:"Block"})({name:"1rr4qq7",styles:"flex:1;"})},298:function(e,t,r){"use strict";t.a=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}},299:function(e,t,r){"use strict";r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return v}));var a=r(19),n=r(4),i=r(329);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:1;return isNaN(e)?"".concat(8,"px"):"".concat(8*e,"px")}var h=r(329),d=Object(s.a)("div",{target:"e1puf3u0",label:"Wrapper"})("font-family:",f("default.fontFamily"),";font-size:",f("default.fontSize"),";"),b=Object(s.a)("div",{target:"e1puf3u1",label:"StyledField"})("margin-bottom:",u(1),";.components-panel__row &{margin-bottom:inherit;}"),g=Object(s.a)("label",{target:"e1puf3u2",label:"StyledLabel"})("display:inline-block;margin-bottom:",u(1),";"),p=Object(s.a)("p",{target:"e1puf3u3",label:"StyledHelp"})("margin-top:-",u(1),";font-size:",f("helpText.fontSize"),";font-style:normal;color:",Object(h.a)("mediumGray.text"),";");function m(e){var t=e.id,r=e.label,n=e.hideLabelFromVision,s=e.help,c=e.className,l=e.children;return Object(a.createElement)(d,{className:i()("components-base-control",c)},Object(a.createElement)(b,{className:"components-base-control__field"},r&&t&&(n?Object(a.createElement)(o.a,{as:"label",htmlFor:t},r):Object(a.createElement)(g,{className:"components-base-control__label",htmlFor:t},r)),r&&!t&&(n?Object(a.createElement)(o.a,{as:"label"},r):Object(a.createElement)(m.VisualLabel,null,r)),l),!!s&&Object(a.createElement)(p,{id:t+"__help",className:"components-base-control__help"},s))}m.VisualLabel=function(e){var t=e.className,r=e.children;return t=i()("components-base-control__label",t),Object(a.createElement)("span",{className:t},r)},t.a=m},312:function(e,t,r){"use strict";var a=r(19),n=r(16),i=r(5),o=r.n(i),s=r(0);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}t.a=function(e){var t=e.as,r=void 0===t?"div":t,i=e.className,l=Object(n.a)(e,["as","className"]);return function(e){var t=e.as,r=void 0===t?"div":t,a=Object(n.a)(e,["as"]);return"function"==typeof a.children?a.children(a):Object(s.createElement)(r,a)}(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=i()(e).toRgb(),a=r.r,n=r.g,o=r.b;return"rgba(".concat(a,", ").concat(n,", ").concat(o,", ").concat(t,")")}function c(e){return Object(a.get)(o.a,e,"#000")}},330:function(e,t,r){var a;!function(n){var i=/^\s+/,o=/\s+$/,s=0,c=n.round,l=n.min,f=n.max,u=n.random;function h(e,t){if(t=t||{},(e=e||"")instanceof h)return e;if(!(this instanceof h))return new h(e,t);var r=function(e){var t,r,a,s={r:0,g:0,b:0},c=1,u=null,h=null,d=null,b=!1,g=!1;return"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(o,"").toLowerCase();var t,r=!1;if(P[e])e=P[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:z(t[1]),g:z(t[2]),b:z(t[3]),a:M(t[4]),format:r?"name":"hex8"}:(t=G.hex6.exec(e))?{r:z(t[1]),g:z(t[2]),b:z(t[3]),format:r?"name":"hex"}:(t=G.hex4.exec(e))?{r:z(t[1]+""+t[1]),g:z(t[2]+""+t[2]),b:z(t[3]+""+t[3]),a:M(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:z(t[1]+""+t[1]),g:z(t[2]+""+t[2]),b:z(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,r=e.g,a=e.b,s={r:255*N(t,255),g:255*N(r,255),b:255*N(a,255)},b=!0,g="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(u=L(e.s),h=L(e.v),s=function(e,t,r){e=6*N(e,360),t=N(t,100),r=N(r,100);var a=n.floor(e),i=e-a,o=r*(1-t),s=r*(1-i*t),c=r*(1-(1-i)*t),l=a%6;return{r:255*[r,s,o,o,c,r][l],g:255*[c,r,r,s,o,o][l],b:255*[o,o,c,r,r,s][l]}}(e.h,u,h),b=!0,g="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(u=L(e.s),d=L(e.l),s=function(e,t,r){var a,n,i;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=N(e,360),t=N(t,100),r=N(r,100),0===t)a=n=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;a=o(c,s,e+1/3),n=o(c,s,e),i=o(c,s,e-1/3)}return{r:255*a,g:255*n,b:255*i}}(e.h,u,d),b=!0,g="hsl"),e.hasOwnProperty("a")&&(c=e.a)),c=F(c),{ok:b,format:e.format||g,r:l(255,f(s.r,0)),g:l(255,f(s.g,0)),b:l(255,f(s.b,0)),a:c}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=c(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=r.ok,this._tc_id=s++}function d(e,t,r){e=N(e,255),t=N(t,255),r=N(r,255);var a,n,i=f(e,t,r),o=l(e,t,r),s=(i+o)/2;if(i==o)a=n=0;else{var c=i-o;switch(n=s>.5?c/(2-i-o):c/(i+o),i){case e:a=(t-r)/c+(t>1)+720)%360;--t;)a.h=(a.h+n)%360,i.push(h(a));return i}function R(e,t){t=t||6;for(var r=h(e).toHsv(),a=r.h,n=r.s,i=r.v,o=[],s=1/t;t--;)o.push(h({h:a,s:n,v:i})),i=(i+s)%1;return o}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,a=this.toRgb();return e=a.r/255,t=a.g/255,r=a.b/255,.2126*(e<=.03928?e/12.92:n.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:n.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:n.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=b(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=b(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),a=c(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+a+"%)":"hsva("+t+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),a=c(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+a+"%)":"hsla("+t+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,a,n){var i=[T(c(e).toString(16)),T(c(t).toString(16)),T(c(r).toString(16)),T(D(a))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*N(this._r,255))+"%",g:c(100*N(this._g,255))+"%",b:c(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*N(this._r,255))+"%, "+c(100*N(this._g,255))+"%, "+c(100*N(this._b,255))+"%)":"rgba("+c(100*N(this._r,255))+"%, "+c(100*N(this._g,255))+"%, "+c(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+p(this._r,this._g,this._b,this._a),r=t,a=this._gradientType?"GradientType = 1, ":"";if(e){var n=h(e);r="#"+p(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,a=this._a<1&&this._a>=0;return t||!a||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(k,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(R,arguments)},splitcomplement:function(){return this._applyCombination(C,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(j,arguments)}},h.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var a in e)e.hasOwnProperty(a)&&(r[a]="a"===a?e[a]:L(e[a]));e=r}return h(e,t)},h.equals=function(e,t){return!(!e||!t)&&h(e).toRgbString()==h(t).toRgbString()},h.random=function(){return h.fromRatio({r:u(),g:u(),b:u()})},h.mix=function(e,t,r){r=0===r?0:r||50;var a=h(e).toRgb(),n=h(t).toRgb(),i=r/100;return h({r:(n.r-a.r)*i+a.r,g:(n.g-a.g)*i+a.g,b:(n.b-a.b)*i+a.b,a:(n.a-a.a)*i+a.a})},h.readability=function(e,t){var r=h(e),a=h(t);return(n.max(r.getLuminance(),a.getLuminance())+.05)/(n.min(r.getLuminance(),a.getLuminance())+.05)},h.isReadable=function(e,t,r){var a,n,i,o,s,c=h.readability(e,t);switch(n=!1,(i=r,"AA"!==(o=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(s=(i.size||"small").toLowerCase())&&"large"!==s&&(s="small"),a={level:o,size:s}).level+a.size){case"AAsmall":case"AAAlarge":n=c>=4.5;break;case"AAlarge":n=c>=3;break;case"AAAsmall":n=c>=7}return n},h.mostReadable=function(e,t,r){var a,n,i,o,s=null,c=0;n=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var l=0;lc&&(c=a,s=h(t[l]));return h.isReadable(e,s,{level:i,size:o})||!n?s:(r.includeFallbackColors=!1,h.mostReadable(e,["#fff","#000"],r))};var P=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},E=h.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(P);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,f(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),n.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function H(e){return l(1,f(0,e))}function z(e){return parseInt(e,16)}function T(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function D(e){return n.round(255*parseFloat(e)).toString(16)}function M(e){return z(e)/255}var I,q,$,G=(q="[\\s|\\(]+("+(I="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+I+")[,|\\s]+("+I+")\\s*\\)?",$="[\\s|\\(]+("+I+")[,|\\s]+("+I+")[,|\\s]+("+I+")[,|\\s]+("+I+")\\s*\\)?",{CSS_UNIT:new RegExp(I),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+$),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+$),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+$),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=h:void 0===(a=function(){return h}.call(t,r,t,e))||(e.exports=a)}(Math)}}]); \ No newline at end of file diff --git a/build/vendors--atomic-block-components/add-to-cart-frontend.js b/build/vendors--atomic-block-components/add-to-cart-frontend.js new file mode 100644 index 00000000000..f268a3c0fea --- /dev/null +++ b/build/vendors--atomic-block-components/add-to-cart-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[49],{140:function(e,t,n){var i=n(141);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},141:function(e,t){function n(t,i){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,i)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},302:function(e,t,n){"use strict";var i=n(11),r=n(20),o=n(16),a=n(0),c=n(5),l=n.n(c),s=n(21),u=n(68);t.a=function(e){var t,n=e.icon,c=e.children,b=e.label,d=e.instructions,p=e.className,f=e.notices,m=e.preview,h=e.isColumnLayout,g=Object(o.a)(e,["icon","children","label","instructions","className","notices","preview","isColumnLayout"]),O=Object(s.useResizeObserver)(),x=Object(r.a)(O,2),j=x[0],v=x[1].width;"number"==typeof v&&(t={"is-large":v>=320,"is-medium":v>=160&&v<320,"is-small":v<160});var w=l()("components-placeholder",p,t),z=l()("components-placeholder__fieldset",{"is-column-layout":h});return Object(a.createElement)("div",Object(i.a)({},g,{className:w}),j,f,m&&Object(a.createElement)("div",{className:"components-placeholder__preview"},m),Object(a.createElement)("div",{className:"components-placeholder__label"},Object(a.createElement)(u.a,{icon:n}),b),!!d&&Object(a.createElement)("div",{className:"components-placeholder__instructions"},d),Object(a.createElement)("div",{className:z},c))}},375:function(e,t,n){"use strict";var i=n(11),r=n(23),o=n(20),a=n(16),c=n(0),l=n(4),s=n(5),u=n.n(s),b=n(21),d=n(19);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var f=function(e){var t=e.icon,n=e.size,i=void 0===n?24:n,r=Object(a.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"body";switch(e){case"title.large":return z(C(),I,S);case"title.medium":return z(R(),I,B);case"title.small":return z(L(),I,D);case"subtitle":return z(N(),H,"\n\tfont-size: 16px;\n\tline-height: 24px;\n");case"subtitle.small":return z(P(),H,"\n\tfont-size: 14px;\n\tline-height: 20px;\n");case"body":return z(F(),V);case"body.large":return z(k(),V,W);case"body.small":return z(E(),V,M);case"button":return U;case"caption":return J;case"label":return T;case"sectionheading":return q}}(e.variant))}),""),G=n(329),K=new RegExp(/-left/g),Q=new RegExp(/-right/g),X=new RegExp(/Left/g),Y=new RegExp(/Right/g);function Z(){return!(!document||"rtl"!==document.documentElement.dir)}function $(e){return"left"===e?"right":"right"===e?"left":K.test(e)?e.replace(K,"-right"):Q.test(e)?e.replace(Q,"-left"):X.test(e)?e.replace(X,"Right"):Y.test(e)?e.replace(Y,"Left"):e}var ee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(l.mapKeys)(e,(function(e,t){return $(t)}))};function te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return function(){var n=Z();return t?n?Object(x.b)(t,""):Object(x.b)(e,""):n?Object(x.b)(ee(e),""):Object(x.b)(e,"")}}var ne={name:"1dacand",styles:"padding-top:0;"},ie=function(){return ne},re={name:"r6z5ec",styles:"z-index:1;"},oe=function(e){return e.isFocused?re:""},ae={name:"uz6002",styles:"align-items:flex-start;flex-direction:column;"},ce={name:"53hdd7",styles:"align-items:flex-start;flex-direction:column-reverse;"},le={name:"x4dmss",styles:"justify-content:space-between;"},se=function(e){switch(e.labelPosition){case"top":return ae;case"bottom":return ce;case"edge":return le;default:return""}},ue=Object(O.a)(j.b,{target:"e1cr7zh10",label:"Root"})("position:relative;border-radius:2px;",ie," ",oe," ",se,""),be={name:"8atqhb",styles:"width:100%;"},de=Object(O.a)("div",{target:"e1cr7zh11",label:"Container"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(function(e){var t=e.disabled?Object(G.a)("ui.backgroundDisabled"):Object(G.a)("ui.background");return Object(x.b)({backgroundColor:t},"")})," ",(function(e){var t=e.__unstableInputWidth,n=e.labelPosition;return t?"side"===n?"":"edge"===n?Object(x.b)({flex:"0 0 ".concat(t)},""):Object(x.b)({width:t},""):be}),""),pe={name:"103r1kr",styles:"&::-webkit-input-placeholder{line-height:normal;}"},fe=(Object(O.a)("input",{target:"e1cr7zh12",label:"Input"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none !important;color:",Object(G.a)("black"),";display:block;margin:0;outline:none;padding-left:8px;padding-right:8px;width:100%;",(function(e){var t=e.isDragging,n=e.dragCursor,i="",r="";return t&&(i=Object(x.b)("cursor:",n,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none !important;margin:0 !important;}")),t&&n&&(r=Object(x.b)("&:active{cursor:",n,";}")),Object(x.b)(i," ",r,"")})," ",(function(e){return e.disabled?Object(x.b)({color:Object(G.a)("ui.textDisabled")},""):""})," ",(function(e){var t={default:"13px",small:"11px"}[e.size];return t?Object(x.b)("font-size:","16px",";@media ( min-width:600px ){font-size:",t,";}"):""})," ",(function(e){var t={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}},n=t[e.size]||t.default;return Object(x.b)(n,"")})," ",(function(){return pe}),"}"),{name:"8uhtka",styles:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"}),me=function(){return fe},he=function(e){var t=e.labelPosition,n=4;return"edge"!==t&&"side"!==t||(n=0),Object(x.b)({paddingTop:0,paddingBottom:n},"")},ge=Object(O.a)(A,{target:"e1cr7zh13",label:"BaseLabel"})("&&&{box-sizing:border-box;color:currentColor;display:block;margin:0;max-width:100%;z-index:1;",he," ",me,"}"),Oe=function(e){return Object(c.createElement)(ge,Object(i.a)({},e,{as:"label"}))},xe=Object(O.a)(v.a,{target:"e1cr7zh14",label:"LabelWrapper"})({name:"120o8im",styles:"max-width:calc( 100% - 10px );"}),je=Object(O.a)("div",{target:"e1cr7zh15",label:"BackdropUI"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(function(e){var t=e.disabled,n=e.isFocused,i=n?Object(G.a)("ui.borderFocus"):Object(G.a)("ui.border"),r=null;return n&&(r="0 0 0 1px ".concat(Object(G.a)("ui.borderFocus")," inset")),t&&(i=Object(G.a)("ui.borderDisabled")),Object(x.b)({boxShadow:r,borderColor:i,borderStyle:"solid",borderWidth:1},"")})," ",te({paddingLeft:2}),"}"),ve=Object(O.a)("span",{target:"e1cr7zh16",label:"Prefix"})({name:"1pxuk39",styles:"box-sizing:border-box;display:block;"}),we=Object(O.a)("span",{target:"e1cr7zh17",label:"Suffix"})({name:"1pxuk39",styles:"box-sizing:border-box;display:block;"}),ze=Object(c.memo)((function(e){var t=e.disabled,n=void 0!==t&&t,i=e.isFocused,r=void 0!==i&&i;return Object(c.createElement)(je,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:n,isFocused:r})})),ye=n(312);function _e(e){var t=e.children,n=e.hideLabelFromVision,r=e.htmlFor,o=Object(a.a)(e,["children","hideLabelFromVision","htmlFor"]);return t?n?Object(c.createElement)(ye.a,{as:"label",htmlFor:r},t):Object(c.createElement)(Oe,Object(i.a)({htmlFor:r},o),t):null}var Ee=Object(c.forwardRef)((function e(t,n){var r=t.__unstableInputWidth,o=t.children,l=t.className,s=t.disabled,u=void 0!==s&&s,d=t.hideLabelFromVision,p=void 0!==d&&d,f=t.labelPosition,m=t.id,h=t.isFocused,g=void 0!==h&&h,O=t.label,x=t.prefix,j=t.size,v=void 0===j?"default":j,w=t.suffix,z=Object(a.a)(t,["__unstableInputWidth","children","className","disabled","hideLabelFromVision","labelPosition","id","isFocused","label","prefix","size","suffix"]),y=function(t){var n=Object(b.useInstanceId)(e),i="input-base-control-".concat(n);return t||i}(m);return Object(c.createElement)(ue,Object(i.a)({},z,{className:l,isFocused:g,labelPosition:f,ref:n}),Object(c.createElement)(xe,null,Object(c.createElement)(_e,{className:"components-input-control__label",hideLabelFromVision:p,labelPosition:f,htmlFor:y,size:v},O)),Object(c.createElement)(de,{__unstableInputWidth:r,className:"components-input-control__container",disabled:u,isFocused:g,labelPosition:f},x&&Object(c.createElement)(ve,{className:"components-input-control__prefix"},x),o,w&&Object(c.createElement)(we,{className:"components-input-control__suffix"},w),Object(c.createElement)(ze,{"aria-hidden":"true",disabled:u,isFocused:g,label:O,size:v})))})),ke=Object(O.a)("select",{target:"e12x0a390",label:"Select"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none !important;color:",Object(G.a)("black"),";display:block;margin:0;outline:none;width:100%;",(function(e){return e.disabled?Object(x.b)({color:Object(G.a)("ui.textDisabled")},""):""}),";",(function(e){var t={default:"13px",small:"11px"}[e.size];return t?Object(x.b)("font-size:","16px",";@media ( min-width:600px ){font-size:",t,";}"):""}),";",(function(e){var t={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}},n=t[e.size]||t.default;return Object(x.b)(n,"")}),";",te({paddingLeft:8,paddingRight:24})(),"}"),Fe=Object(O.a)("div",{target:"e12x0a391",label:"DownArrowWrapper"})("align-items:center;bottom:0;box-sizing:border-box;display:flex;padding:0 4px;pointer-events:none;position:absolute;top:0;",te({right:0})()," svg{display:block;}");var Pe=Object(c.forwardRef)((function e(t,n){var s=t.className,d=t.disabled,p=void 0!==d&&d,m=t.help,O=t.hideLabelFromVision,x=t.id,j=t.label,v=t.multiple,w=void 0!==v&&v,z=t.onBlur,y=void 0===z?l.noop:z,_=t.onChange,E=void 0===_?l.noop:_,k=t.onFocus,F=void 0===k?l.noop:k,P=t.options,N=void 0===P?[]:P,L=t.size,R=void 0===L?"default":L,C=t.value,I=t.labelPosition,S=void 0===I?"top":I,B=Object(a.a)(t,["className","disabled","help","hideLabelFromVision","id","label","multiple","onBlur","onChange","onFocus","options","size","value","labelPosition"]),D=Object(c.useState)(!1),H=Object(o.a)(D,2),V=H[0],W=H[1],M=function(t){var n=Object(b.useInstanceId)(e),i="inspector-select-control-".concat(n);return t||i}(x),U=m?"".concat(M,"__help"):void 0;if(Object(l.isEmpty)(N))return null;var J=u()("components-select-control",s);return Object(c.createElement)(g.a,{help:m},Object(c.createElement)(Ee,{className:J,disabled:p,hideLabelFromVision:O,id:M,isFocused:V,label:j,size:R,suffix:Object(c.createElement)(Fe,null,Object(c.createElement)(f,{icon:h,size:18})),labelPosition:S},Object(c.createElement)(ke,Object(i.a)({},B,{"aria-describedby":U,className:"components-select-control__input",disabled:p,id:M,multiple:w,onBlur:function(e){y(e),W(!1)},onChange:function(e){if(w){var t=Object(r.a)(e.target.options).filter((function(e){return e.selected})).map((function(e){return e.value}));E(t)}else E(e.target.value,{event:e})},onFocus:function(e){F(e),W(!0)},ref:n,size:R,value:C}),N.map((function(e,t){var n=e.id||"".concat(e.label,"-").concat(e.value,"-").concat(t);return Object(c.createElement)("option",{key:n,value:e.value,disabled:e.disabled},e.label)})))))}));t.a=Pe}}]); \ No newline at end of file diff --git a/build/vendors--atomic-block-components/price--cart-blocks/line-items--cart-blocks/order-summary--checkout--8a3571de-frontend.js b/build/vendors--atomic-block-components/price--cart-blocks/line-items--cart-blocks/order-summary--checkout--8a3571de-frontend.js new file mode 100644 index 00000000000..c6bd8a054ad --- /dev/null +++ b/build/vendors--atomic-block-components/price--cart-blocks/line-items--cart-blocks/order-summary--checkout--8a3571de-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[1],{107:function(e,t,r){"use strict";var n=r(3),a=r.n(n);function o(e,t){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],r="-"===e[0],n=r&&t,a=(e=e.replace("-","")).split("."),o=a[0],i=a[1]||"";return{beforeDecimal:o,afterDecimal:i,hasNagation:r,addNegation:n}}function y(e,t,r){for(var n="",a=r?"0":"",o=0;o<=t-1;o++)n+=e[o]||a;return n}function S(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function b(e,t,r){return Math.min(Math.max(e,t),r)}function x(e){return Math.max(e.selectionStart,e.selectionEnd)}var w={thousandSeparator:p.oneOfType([p.string,p.oneOf([!0])]),decimalSeparator:p.string,allowedDecimalSeparators:p.arrayOf(p.string),thousandsGroupStyle:p.oneOf(["thousand","lakh","wan"]),decimalScale:p.number,fixedDecimalScale:p.bool,displayType:p.oneOf(["input","text"]),prefix:p.string,suffix:p.string,format:p.oneOfType([p.string,p.func]),removeFormatting:p.func,mask:p.oneOfType([p.string,p.arrayOf(p.string)]),value:p.oneOfType([p.number,p.string]),defaultValue:p.oneOfType([p.number,p.string]),isNumericString:p.bool,customInput:p.elementType,allowNegative:p.bool,allowEmptyFormatting:p.bool,allowLeadingZeros:p.bool,onValueChange:p.func,onKeyDown:p.func,onMouseUp:p.func,onChange:p.func,onFocus:p.func,onBlur:p.func,type:p.oneOf(["text","tel","password"]),isAllowed:p.func,renderText:p.func,getInputRef:p.oneOfType([p.func,p.shape({current:p.any})])},k={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:h,onChange:h,onKeyDown:h,onMouseUp:h,onFocus:h,onBlur:h,isAllowed:function(){return!0}},O=function(e){function t(e){var r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=!(n=s(t).call(this,e))||"object"!=typeof n&&"function"!=typeof n?l(this):n;var a=e.defaultValue;r.validateProps();var o=r.formatValueProp(a);return r.state={value:o,numAsString:r.removeFormatting(o)},r.selectionBeforeInput={selectionStart:0,selectionEnd:0},r.onChange=r.onChange.bind(l(r)),r.onKeyDown=r.onKeyDown.bind(l(r)),r.onMouseUp=r.onMouseUp.bind(l(r)),r.onFocus=r.onFocus.bind(l(r)),r.onBlur=r.onBlur.bind(l(r)),r}var r,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),r=t,(n=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,r=this.state,n=this.focusedElm,a=r.value,o=r.numAsString,i=void 0===o?"":o;if(e!==t){this.validateProps();var s=this.formatNumString(i),u=m(t.value)?s:this.formatValueProp(),l=this.removeFormatting(u),c=parseFloat(l),f=parseFloat(i);(isNaN(c)&&isNaN(f)||c===f)&&s===a&&(null!==n||u===a)||this.updateValue({formattedValue:u,numAsString:l,input:n})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,r=this.getSeparators(),n=r.decimalSeparator,a=this.getNumberRegex(!0),o="-"===e[0];o&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var i=(e=(e.match(a)||[]).join("").replace(n,".")).indexOf(".");return-1!==i&&(e="".concat(e.substring(0,i),".").concat(e.substring(i+1,e.length).replace(new RegExp(d(n),"g"),""))),o&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var r=this.props,n=r.format,a=r.decimalScale,o=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!o||0===a||t||n?"":"|"+d(o)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,r=t.thousandSeparator,n=t.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[e,"."]),{decimalSeparator:e,thousandSeparator:r,allowedDecimalSeparators:n}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,r=void 0===t?" ":t;return"string"==typeof r?r:r[e]||" "}},{key:"getValueObject",value:function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),r=t.decimalSeparator,n=t.thousandSeparator;if(r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(n,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(r," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,r){S(e,t),setTimeout((function(){e.value===r&&S(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,r){var n=this.props,a=n.prefix,o=n.suffix,i=n.format;if(""===e)return 0;if(t=b(t,0,e.length),!i){var s="-"===e[0];return b(t,a.length+(s?1:0),e.length-o.length)}if("function"==typeof i)return t;if("#"===i[t]&&g(e[t]))return t;if("#"===i[t-1]&&g(e[t-1]))return t;var u=i.indexOf("#");t=b(t,u,i.lastIndexOf("#")+1);for(var l=i.substring(t,i.length).indexOf("#"),c=t,f=t+(-1===l?0:l);c>u&&("#"!==i[c]||!g(e[c]));)c-=1;return!g(e[f])||"left"===r&&t!==u||t-c0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,r=t.format,n=t.allowEmptyFormatting,a=e;return""!==e||n?"-"!==e||r?"string"==typeof r?this.formatWithPattern(a):"function"==typeof r?r(a):this.formatAsNumber(a):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,r=t.format,n=t.decimalScale,a=t.fixedDecimalScale,o=t.allowEmptyFormatting,i=this.props,s=i.value,u=i.isNumericString,l=!(s=m(s)?e:s)&&0!==s;return l&&o&&(s=""),l&&!o?"":("number"==typeof s&&(s=s.toString(),u=!0),"Infinity"===s&&u&&(s=""),u&&!r&&"number"==typeof n&&(s=function(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=-1!==e.indexOf(".")&&t,a=v(e),o=a.beforeDecimal,i=a.afterDecimal,s=a.hasNagation,u=parseFloat("0.".concat(i||"0")).toFixed(t).split("."),l=o.split("").reverse().reduce((function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),c=y(u[1]||"",Math.min(t,i.length),r),f=n?".":"";return"".concat(s?"-":"").concat(l).concat(f).concat(c)}(s,n,a)),u?this.formatNumString(s):this.formatInput(s))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),o=n.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var r=this.props,n=r.format,a=r.prefix,o=r.suffix,i=r.decimalScale,s=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof n&&"#"!==n[e]||!(n||!(e=t.length-o.length||i&&s&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,r){for(var n=e;nr&&a-n>r;)n++;return{start:r,end:a-n}}(t,r),y=d.start,S=d.end;if(!a&&y===S&&-1!==c.indexOf(r[g])){var b=0===u?"":f;return r.substr(0,g)+b+r.substr(g+1,r.length)}var x=a?0:i.length,w=t.length-(a?0:s.length);if(r.length>t.length||!r.length||y===S||0===g&&m===t.length||g===x&&m===w)return r;if(this.checkIfFormatGotDeleted(y,S,t)&&(r=t),!a){var k=this.removeFormatting(r),O=v(k,o),P=O.beforeDecimal,F=O.afterDecimal,N=O.addNegation,C=eb;)S--;S=this.correctCaretPosition(s,S,"left")}}else for(;!d.test(s[S])&&Sx)&&(e.preventDefault(),this.setPatchedCaretPosition(r,S,s)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,S,s),g(e)}else g(e)}},{key:"onMouseUp",value:function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,a=t.value,o=void 0===a?"":a;if(r===n){var i=this.correctCaretPosition(o,r);i!==r&&this.setPatchedCaretPosition(t,i,o)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var r=e.target,n=r.selectionStart,a=r.selectionEnd,o=r.value,i=void 0===o?"":o,s=t.correctCaretPosition(i,n);s===n||0===n&&a===i.length||t.setPatchedCaretPosition(r,s,i),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,r,n=this.props,o=n.type,s=n.displayType,u=n.customInput,l=n.renderText,c=n.getInputRef,f=n.format,p=this.state.value,h=(e=this.props,t=w,r={},Object.keys(e).forEach((function(n){t[n]||(r[n]=e[n])})),r),g=i({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(f)?"numeric":void 0},h,{type:o,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===s)return l?l(p)||null:a.a.createElement("span",i({},h,{ref:c}),p);if(u){var m=u;return a.a.createElement(m,i({},g,{ref:c}))}return a.a.createElement("input",i({},g,{ref:c}))}}])&&o(r.prototype,n),t}(a.a.Component);O.propTypes=w,O.defaultProps=k,t.a=O}}]); \ No newline at end of file diff --git a/build/vendors--cart-blocks/line-items--checkout-blocks/order-summary-frontend.js b/build/vendors--cart-blocks/line-items--checkout-blocks/order-summary-frontend.js new file mode 100644 index 00000000000..ada49d3108e --- /dev/null +++ b/build/vendors--cart-blocks/line-items--checkout-blocks/order-summary-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[4],{133:function(t,n,r){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return i(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,void 0):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r1&&void 0!==arguments[1]?arguments[1]:{};for(var r in n)t.setRequestHeader(r,n[r]);return t}function h(t){return void 0===t}function d(){var t={HALF_ODD:function(t){var n=Math.round(t);return l(t)&&c(n)?n-1:n},HALF_EVEN:function(t){var n=Math.round(t);return l(t)?c(n)?n:n-1:n},HALF_UP:function(t){return Math.round(t)},HALF_DOWN:function(t){return l(t)?Math.floor(t):Math.round(t)},HALF_TOWARDS_ZERO:function(t){return l(t)?Math.sign(t)*Math.floor(Math.abs(t)):Math.round(t)},HALF_AWAY_FROM_ZERO:function(t){return l(t)?Math.sign(t)*Math.ceil(Math.abs(t)):Math.round(t)},DOWN:function(t){return Math.floor(t)}};return{add:function(t,n){return t+n},subtract:function(t,n){return t-n},multiply:function(t,n){return s(t)||s(n)?function(t,n){var r=function(t){return Math.pow(10,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t.toString();if(n.indexOf("e-")>0)return parseInt(n.split("e-")[1]);var r=n.split(".")[1];return r?r.length:0}(t))},e=Math.max(r(t),r(n));return Math.round(t*e)*Math.round(n*e)/(e*e)}(t,n):t*n},divide:function(t,n){return t/n},modulo:function(t,n){return t%n},round:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HALF_EVEN";return t[r](n)}}}var g=d();function m(t){var n=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(t);return{getMatches:function(){return null!==n?n.slice(1).filter((function(t){return!h(t)})):[]},getMinimumFractionDigits:function(){var t=function(t){return"."===t};return h(this.getMatches().find(t))?0:this.getMatches()[g.add(this.getMatches().findIndex(t),1)].split("").length},getCurrencyDisplay:function(){return{USD:"code",dollar:"name",$:"symbol"}[this.getMatches().find((function(t){return"USD"===t||"dollar"===t||"$"===t}))]},getStyle:function(){return h(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!h(this.getMatches().find((function(t){return","===t})))}}}function v(t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;for(var r in n)t=t.replace("{{".concat(r,"}}"),n[r]);return t};return{getExchangeRate:function(r,o){return(i=t.endpoint,!Boolean(i)||"object"!==e(i)&&"function"!=typeof i||"function"!=typeof i.then?function(r,e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(r,e){var o=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){4===o.readyState&&(o.status>=200&&o.status<400?r(JSON.parse(o.responseText)):e(new Error(o.statusText)))},onerror:function(){e(new Error("Network error"))}});o.open("GET",t,!0),f(o,n.headers),o.send()}))}(n(t.endpoint,{from:r,to:e}),{headers:t.headers})}(r,o):t.endpoint).then((function(i){return function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",o={};return Object.entries(n).forEach((function(n){if("object"===e(n[1])){var i=t(n[1]);Object.entries(i).forEach((function(t){o[n[0]+r+t[0]]=t[1]}))}else o[n[0]]=n[1]})),o}(i)[n(t.propertyPath,{from:r,to:o})]}));var i}}}function p(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Error;if(!t)throw new r(n)}function y(t){p(function(t){return a(t)&&t<=100&&t>=0}(t),"You must provide a numeric value between 0 and 100.",RangeError)}function b(t){p(Number.isInteger(t),"You must provide an integer.",TypeError)}var A=d(),M=Object.assign((function t(n){var r=Object.assign({},{amount:t.defaultAmount,currency:t.defaultCurrency,precision:t.defaultPrecision},n),e=r.amount,o=r.currency,i=r.precision;b(e),b(i);var u=t.globalLocale,a=t.globalFormat,c=t.globalRoundingMode,s=t.globalFormatRoundingMode,l=Object.assign({},t.globalExchangeRatesApi),f=function(n){var r=Object.assign({},Object.assign({},{amount:e,currency:o,precision:i},n),Object.assign({},{locale:this.locale},n));return Object.assign(t({amount:r.amount,currency:r.currency,precision:r.precision}),{locale:r.locale})},d=function(t){p(this.hasSameCurrency(t),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return e},getCurrency:function(){return o},getLocale:function(){return this.locale||u},setLocale:function(t){return f.call(this,{locale:t})},getPrecision:function(){return i},convertPrecision:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;b(t);var r=this.getPrecision(),e=t>r,o=e?A.multiply:A.divide,i=e?[t,r]:[r,t],u=Math.pow(10,A.subtract.apply(A,i));return f.call(this,{amount:A.round(o(this.getAmount(),u),n),precision:t})},add:function(n){d.call(this,n);var r=t.normalizePrecision([this,n]);return f.call(this,{amount:A.add(r[0].getAmount(),r[1].getAmount()),precision:r[0].getPrecision()})},subtract:function(n){d.call(this,n);var r=t.normalizePrecision([this,n]);return f.call(this,{amount:A.subtract(r[0].getAmount(),r[1].getAmount()),precision:r[0].getPrecision()})},multiply:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return f.call(this,{amount:A.round(A.multiply(this.getAmount(),t),n)})},divide:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return f.call(this,{amount:A.round(A.divide(this.getAmount(),t),n)})},percentage:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return y(t),this.multiply(A.divide(t,100),n)},allocate:function(t){var n=this;!function(t){p(function(t){return t.length>0&&t.every((function(t){return t>=0}))&&t.some((function(t){return t>0}))}(t),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}(t);for(var r=t.reduce((function(t,n){return A.add(t,n)})),e=this.getAmount(),o=t.map((function(t){var o=Math.floor(A.divide(A.multiply(n.getAmount(),t),r));return e=A.subtract(e,o),f.call(n,{amount:o})})),i=0;e>0;)t[i]>0&&(o[i]=o[i].add(f.call(this,{amount:1})),e=A.subtract(e,1)),i+=1;return o},convert:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.endpoint,o=void 0===e?l.endpoint:e,i=r.propertyPath,u=void 0===i?l.propertyPath||"rates.{{to}}":i,a=r.headers,s=void 0===a?l.headers:a,d=r.roundingMode,g=void 0===d?c:d,m=Object.assign({},{endpoint:o,propertyPath:u,headers:s,roundingMode:g});return v(m).getExchangeRate(this.getCurrency(),t).then((function(r){return p(!h(r),'No rate was found for the destination currency "'.concat(t,'".'),TypeError),f.call(n,{amount:A.round(A.multiply(n.getAmount(),parseFloat(r)),m.roundingMode),currency:t})}))},equalsTo:function(t){return this.hasSameAmount(t)&&this.hasSameCurrency(t)},lessThan:function(n){d.call(this,n);var r=t.normalizePrecision([this,n]);return r[0].getAmount()r[1].getAmount()},greaterThanOrEqual:function(n){d.call(this,n);var r=t.normalizePrecision([this,n]);return r[0].getAmount()>=r[1].getAmount()},isZero:function(){return 0===this.getAmount()},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return 0!==A.modulo(this.getAmount(),Math.pow(10,i))},hasCents:function(){return 0!==A.modulo(this.getAmount(),Math.pow(10,i))},hasSameCurrency:function(t){return this.getCurrency()===t.getCurrency()},hasSameAmount:function(n){var r=t.normalizePrecision([this,n]);return r[0].getAmount()===r[1].getAmount()},toFormat:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,r=m(t);return this.toRoundedUnit(r.getMinimumFractionDigits(),n).toLocaleString(this.getLocale(),{currencyDisplay:r.getCurrencyDisplay(),useGrouping:r.getUseGrouping(),minimumFractionDigits:r.getMinimumFractionDigits(),style:r.getStyle(),currency:this.getCurrency()})},toUnit:function(){return A.divide(this.getAmount(),Math.pow(10,i))},toRoundedUnit:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,r=Math.pow(10,t);return A.divide(A.round(A.multiply(this.toUnit(),r),n),r)},toObject:function(){return{amount:e,currency:o,precision:i}},toJSON:function(){return this.toObject()}}}),{defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},{globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}},u);n.a=M}}]); \ No newline at end of file diff --git a/build/vendors--cart-blocks/order-summary--checkout-blocks/billing-address--checkout-blocks/order-summary---eb4d2cec-frontend.js b/build/vendors--cart-blocks/order-summary--checkout-blocks/billing-address--checkout-blocks/order-summary---eb4d2cec-frontend.js new file mode 100644 index 00000000000..f7d2c723fb4 --- /dev/null +++ b/build/vendors--cart-blocks/order-summary--checkout-blocks/billing-address--checkout-blocks/order-summary---eb4d2cec-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{303:function(e,t,o){"use strict";var n=o(11),r=o(16),i=o(0),c=o(5),s=o.n(c),l=o(286);t.a=Object(i.forwardRef)((function(e,t){var o=e.className,c=Object(r.a)(e,["className"]),a=s()("components-flex__block",o);return Object(i.createElement)(l.a,Object(n.a)({},c,{className:a,ref:t}))}))},337:function(e,t,o){"use strict";e.exports=o(338)},338:function(e,t,o){"use strict";var n=o(339);e.exports=function(e,t,o){o=o||{},9===t.nodeType&&(t=n.getWindow(t));var r=o.allowHorizontalScroll,i=o.onlyScrollIfNeeded,c=o.alignWithTop,s=o.alignWithLeft,l=o.offsetTop||0,a=o.offsetLeft||0,u=o.offsetBottom||0,f=o.offsetRight||0;r=void 0===r||r;var d=n.isWindow(t),p=n.offset(e),h=n.outerHeight(e),v=n.outerWidth(e),b=void 0,m=void 0,g=void 0,y=void 0,w=void 0,O=void 0,j=void 0,x=void 0,k=void 0,L=void 0;d?(j=t,L=n.height(j),k=n.width(j),x={left:n.scrollLeft(j),top:n.scrollTop(j)},w={left:p.left-x.left-a,top:p.top-x.top-l},O={left:p.left+v-(x.left+k)+f,top:p.top+h-(x.top+L)+u},y=x):(b=n.offset(t),m=t.clientHeight,g=t.clientWidth,y={left:t.scrollLeft,top:t.scrollTop},w={left:p.left-(b.left+(parseFloat(n.css(t,"borderLeftWidth"))||0))-a,top:p.top-(b.top+(parseFloat(n.css(t,"borderTopWidth"))||0))-l},O={left:p.left+v-(b.left+g+(parseFloat(n.css(t,"borderRightWidth"))||0))+f,top:p.top+h-(b.top+m+(parseFloat(n.css(t,"borderBottomWidth"))||0))+u}),w.top<0||O.top>0?!0===c?n.scrollTop(t,y.top+w.top):!1===c?n.scrollTop(t,y.top+O.top):w.top<0?n.scrollTop(t,y.top+w.top):n.scrollTop(t,y.top+O.top):i||((c=void 0===c||!!c)?n.scrollTop(t,y.top+w.top):n.scrollTop(t,y.top+O.top)),r&&(w.left<0||O.left>0?!0===s?n.scrollLeft(t,y.left+w.left):!1===s?n.scrollLeft(t,y.left+O.left):w.left<0?n.scrollLeft(t,y.left+w.left):n.scrollLeft(t,y.left+O.left):i||((s=void 0===s||!!s)?n.scrollLeft(t,y.left+w.left):n.scrollLeft(t,y.left+O.left)))}},339:function(e,t,o){"use strict";var n=Object.assign||function(e){for(var t=1;t-1&&this.props.scrollIntoView&&(this.scrollingIntoView=!0,x()(this.list.children[this.props.selectedIndex],this.list,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){e.scrollingIntoView=!1}),100))}},{key:"bindList",value:function(e){this.list=e}},{key:"handleHover",value:function(e){var t=this;return function(){t.scrollingIntoView||t.props.onHover(e)}}},{key:"handleClick",value:function(e){var t=this;return function(){t.props.onSelect(e)}}},{key:"handleMouseDown",value:function(e){e.preventDefault()}},{key:"computeSuggestionMatch",value:function(e){var t=this.props.displayTransform(this.props.match||"").toLocaleLowerCase();if(0===t.length)return null;var o=(e=this.props.displayTransform(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,o),suggestionMatch:e.substring(o,o+t.length),suggestionAfterMatch:e.substring(o+t.length)}}},{key:"render",value:function(){var e=this;return Object(n.createElement)("ul",{ref:this.bindList,className:"components-form-token-field__suggestions-list",id:"components-form-token-suggestions-".concat(this.props.instanceId),role:"listbox"},Object(c.map)(this.props.suggestions,(function(t,o){var r=e.computeSuggestionMatch(t),c=i()("components-form-token-field__suggestion",{"is-selected":o===e.props.selectedIndex});return Object(n.createElement)("li",{id:"components-form-token-suggestions-".concat(e.props.instanceId,"-").concat(o),role:"option",className:c,key:e.props.displayTransform(t),onMouseDown:e.handleMouseDown,onClick:e.handleClick(t),onMouseEnter:e.handleHover(t),"aria-selected":o===e.props.selectedIndex},r?Object(n.createElement)("span",{"aria-label":e.props.displayTransform(t)},r.suggestionBeforeMatch,Object(n.createElement)("strong",{className:"components-form-token-field__suggestion-match"},r.suggestionMatch),r.suggestionAfterMatch):e.props.displayTransform(t))})))}}]),s}(n.Component);k.defaultProps={match:"",onHover:function(){},onSelect:function(){},suggestions:Object.freeze([])};var L=Object(l.withSafeTimeout)(k),S=o(311),E=o(62),T=o(300),I=o(303),C=o(301),W=o(70);const _=Object(W.a)(class extends n.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}});t.a=function e({value:t,label:o,options:r,onChange:f,onFilterValueChange:p=c.noop,hideLabelFromVision:h,help:v,allowReset:b=!0,className:m,messages:g={selected:Object(s.__)("Item selected.")}}){var y;const w=r.find(e=>e.value===t),j=null!==(y=null==w?void 0:w.label)&&void 0!==y?y:"",x=Object(l.useInstanceId)(e),[k,W]=Object(n.useState)(w||null),[R,N]=Object(n.useState)(!1),[D,M]=Object(n.useState)(!1),[F,P]=Object(n.useState)(""),H=Object(n.useRef)(),V=Object(n.useMemo)(()=>{const e=[],t=[],o=Object(c.deburr)(F.toLocaleLowerCase());return r.forEach(n=>{const r=Object(c.deburr)(n.label).toLocaleLowerCase().indexOf(o);0===r?e.push(n):r>0&&t.push(n)}),e.concat(t)},[F,r,t]),B=e=>{f(e.value),Object(u.speak)(g.selected,"assertive"),W(e),P(""),N(!1)},z=(e=1)=>{let t=V.indexOf(k)+e;t<0?t=V.length-1:t>=V.length&&(t=0),W(V[t]),N(!0)};return Object(n.useEffect)(()=>{const e=V.length>0,t=V.indexOf(k)>0;e&&!t&&W(V[0])},[V,k]),Object(n.useEffect)(()=>{const e=V.length>0;if(R){const t=e?Object(s.sprintf)( +/* translators: %d: number of results. */ +Object(s._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",V.length),V.length):Object(s.__)("No results.");Object(u.speak)(t,"polite")}},[V,R]),Object(n.createElement)(_,{onFocusOutside:()=>{N(!1)}},Object(n.createElement)(S.a,{className:i()(m,"components-combobox-control"),tabIndex:"-1",label:o,id:"components-form-token-input-"+x,hideLabelFromVision:h,help:v},Object(n.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:"-1",onKeyDown:e=>{let t=!1;if(!e.defaultPrevented){switch(e.keyCode){case a.ENTER:k&&(B(k),t=!0);break;case a.UP:z(-1),t=!0;break;case a.DOWN:z(1),t=!0;break;case a.ESCAPE:N(!1),W(null),t=!0}t&&e.preventDefault()}}},Object(n.createElement)(T.a,null,Object(n.createElement)(I.a,null,Object(n.createElement)(O,{className:"components-combobox-control__input",instanceId:x,ref:H,value:R?F:j,"aria-label":j?`${j}, ${o}`:null,onFocus:()=>{M(!0),N(!0),p(""),P("")},onBlur:()=>{M(!1)},isExpanded:R,selectedSuggestionIndex:V.indexOf(k),onChange:e=>{const t=e.value;P(t),p(t),D&&N(!0)}})),b&&Object(n.createElement)(C.a,null,Object(n.createElement)(E.a,{className:"components-combobox-control__reset",icon:d,disabled:!t,onClick:()=>{f(null),H.current.input.focus()},label:Object(s.__)("Reset")}))),R&&Object(n.createElement)(L,{instanceId:x,match:{label:F},displayTransform:e=>e.label,suggestions:V,selectedIndex:V.indexOf(k),onHover:W,onSelect:B,scrollIntoView:!0}))))}}}]); \ No newline at end of file diff --git a/build/wc-blocks-data.asset.php b/build/wc-blocks-data.asset.php new file mode 100644 index 00000000000..306927c6469 --- /dev/null +++ b/build/wc-blocks-data.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-data', 'wp-data-controls', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-url'), 'version' => '2c531578a6290a998320b770357737d7'); \ No newline at end of file diff --git a/build/wc-blocks-data.js b/build/wc-blocks-data.js new file mode 100644 index 00000000000..8a1d6d8619d --- /dev/null +++ b/build/wc-blocks-data.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcBlocksData=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=142)}({1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wp.apiFetch},11:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(1);const o="wc/store/cart",a={code:"cart_api_error",message:Object(r.__)("Unable to get cart data from the API.","woo-gutenberg-products-block"),data:{status:500}}},128:function(e,t){e.exports=window.wp.notices},129:function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(130),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(24))},130:function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,a,i,c,s=1,u={},l=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(i="setImmediate$"+Math.random()+"$",c=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&p(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",c,!1):e.attachEvent("onmessage",c),r=function(t){e.postMessage(i+t,"*")}):e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){a.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(p,0,e)},f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nfunction(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const a=e(m).hasFinishedResolution("getRoutes",[n]);let i="";if((t=t.routes)[n]?t[n][r]||(i=Object(g.sprintf)("There is no route for the given resource name (%s) in the store",r)):i=Object(g.sprintf)("There is no route for the given namespace (%s) in the store",n),""!==i){if(a)throw new Error(i);return""}const c=v(t[n][r],o);if(""===c&&a)throw new Error(Object(g.sprintf)("While there is a route for the given namespace (%1$s) and resource name (%2$s), there is no route utilizing the number of ids you included in the select arguments. The available routes are: (%3$s)",n,r,JSON.stringify(t[n][r])));return c}),_=Object(p.createRegistrySelector)(e=>(t,n)=>{const r=e(m).hasFinishedResolution("getRoutes",[n]),o=t.routes[n];if(!o){if(r)throw new Error(Object(g.sprintf)("There is no route for the given namespace (%s) in the store",n));return[]}let a=[];for(const e in o)a=[...a,...Object.keys(o[e])];return a}),v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(e=Object.entries(e)).find(e=>{let[,n]=e;return t.length===n.length}),[r,o]=n||[];return r?0===t.length?r:T(r,o,t):""},T=(e,t,n)=>(t.forEach((t,r)=>{e=e.replace(`{${t}}`,n[r])}),e),b="wc/blocks",w=[],C=[],R=[],O=[],I=[],S=[],A=[],D={},P=[];function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;return{type:"RECEIVE_MODEL_ROUTES",routes:e,namespace:t}}function*M(e){yield Object(y.select)(m,"getRoutes",e)}function*k(e){const t=yield Object(y.apiFetch)({path:e}),n=t&&t.routes?Object.keys(t.routes):[];yield N(n,e)}const j=(e,t)=>(t=t.replace(e+"/","")).replace(/\/\(\?P\<[a-z_]*\>\[\\*[a-z]\]\+\)/g,""),L=e=>{const t=e.match(/\<[a-z_]*\>/g);return Array.isArray(t)&&0!==t.length?t.map(e=>e.replace(/<|>/g,"")):[]},x=(e,t)=>Array.isArray(t)&&0!==t.length?(t.forEach(t=>{const n=`\\(\\?P<${t}>.*?\\)`;e=e.replace(new RegExp(n),`{${t}}`)}),e):e;var F=n(2);function V(e,t){return Object(F.has)(e,t)}function U(e,t,n){return Object(F.setWith)(Object(F.clone)(e),t,n,F.clone)}var G=Object(p.combineReducers)({routes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const{type:n,routes:r,namespace:o}=t;return"RECEIVE_MODEL_ROUTES"===n&&r.forEach(t=>{const n=j(o,t);if(n&&n!==o){const r=L(t),a=x(t,r);V(e,[o,n,a])||(e=U(e,[o,n,a],r))}}),e}});Object(p.registerStore)(m,{reducer:G,actions:o,controls:y.controls,selectors:r,resolvers:a});const Y=m,K=[];var Q=n(19);const H=e=>{let{state:t,namespace:n,resourceName:r,query:o,ids:a,type:i="items",fallback:c=K}=e;return a=JSON.stringify(a),o=null!==o?Object(Q.addQueryArgs)("",o):"",V(t,[n,r,a,o,i])?t[n][r][a][o][i]:c},q=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:K;return H({state:e,namespace:t,resourceName:n,query:r,ids:o,type:"headers",fallback:void 0})},B=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:K;return H({state:e,namespace:t,resourceName:n,query:r,ids:o})},z=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:K;return H({state:e,namespace:t,resourceName:n,query:r,ids:o,type:"error",fallback:null})},J=function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:K;const i=q(e,n,r,o,a);return i&&i.get?i.has(t)?i.get(t):void 0:null},$=e=>e.lastModified||0;let W=window.Headers||null;function X(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{items:[],headers:W},a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return{type:a?"RESET_COLLECTION":"RECEIVE_COLLECTION",namespace:e,resourceName:t,queryString:n,ids:r,response:o}}function Z(e,t,n,r,o){return{type:"ERROR",namespace:e,resourceName:t,queryString:n,ids:r,response:{items:[],headers:W,error:o}}}function ee(e){return{type:"RECEIVE_LAST_MODIFIED",timestamp:e}}W=W?new W:{get:()=>{},has:()=>{}};var te=n(10),ne=n.n(te),re=n(27),oe=n.n(re),ae=n(4);const ie=e=>({type:"API_FETCH_WITH_HEADERS",options:e}),ce={},se={code:"invalid_json",message:Object(g.__)("The response is not a valid JSON response.","woo-gutenberg-products-block")},ue=e=>{ne.a.setNonce&&"function"==typeof ne.a.setNonce?ne.a.setNonce(e):console.error('The monkey patched function on APIFetch, "setNonce", is not present, likely another plugin or some other code has removed this augmentation')},le=new oe.a(e=>ne()({path:"/wc/store/batch",method:"POST",data:{requests:e.map(e=>({...e,body:null==e?void 0:e.data}))}}).then(t=>(function(e){if("object"!=typeof e||null===e||!e.hasOwnProperty("responses"))throw new Error("Response not valid")}(t),e.map((e,n)=>t.responses[n]||ce))),{batchScheduleFn:e=>setTimeout(e,300),cache:!1,maxBatchSize:25}),de={API_FETCH_WITH_HEADERS:e=>{let{options:t}=e;return new Promise((e,n)=>{!t.method||"GET"===t.method||Object(ae.isWpVersion)("5.6","<")?ne()({...t,parse:!1}).then(t=>{t.json().then(n=>{e({response:n,headers:t.headers}),ue(t.headers)}).catch(()=>{n(se)})}).catch(e=>{ue(e.headers),"function"==typeof e.json?e.json().then(e=>{n(e)}).catch(()=>{n(se)}):n(e.message)}):(async e=>await le.load(e))(t).then(t=>{throw function(e){if("object"!=typeof e||null===e||!e.hasOwnProperty("body")||!e.hasOwnProperty("headers"))throw new Error("Response not valid")}(t),t.status>=200&&t.status<300&&(e({response:t.body,headers:t.headers}),ue(t.headers)),t}).catch(e=>{e.headers&&ue(e.headers),e.body?n(e.body):n()})})}};function*fe(e,t,n,r){const o=yield Object(y.select)(m,"getRoute",e,t,r),a=Object(Q.addQueryArgs)("",n);if(o)try{const{response:n=K,headers:i}=yield ie({path:o+a});i&&i.get&&i.has("last-modified")&&(yield function*(e){const t=yield Object(y.select)("wc/store/collections","getCollectionLastModified");t?e>t&&(yield Object(y.dispatch)("wc/store/collections","invalidateResolutionForStore"),yield Object(y.dispatch)("wc/store/collections","receiveLastModified",e)):yield Object(y.dispatch)("wc/store/collections","receiveLastModified",e)}(parseInt(i.get("last-modified"),10))),yield X(e,t,a,r,{items:n,headers:i})}catch(n){yield Z(e,t,a,r,n)}else yield X(e,t,a,r)}function*he(e,t,n,r,o){const a=[t,n,r,o].filter(e=>void 0!==e);yield Object(y.select)("wc/store/collections","getCollection",...a)}Object(p.registerStore)("wc/store/collections",{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECEIVE_LAST_MODIFIED"===t.type)return t.timestamp===e.lastModified?e:{...e,lastModified:t.timestamp};if("INVALIDATE_RESOLUTION_FOR_STORE"===t.type)return{};const{type:n,namespace:r,resourceName:o,queryString:a,response:i}=t,c=t.ids?JSON.stringify(t.ids):"[]";switch(n){case"RECEIVE_COLLECTION":if(V(e,[r,o,c,a]))return e;e=U(e,[r,o,c,a],i);break;case"RESET_COLLECTION":case"ERROR":e=U(e,[r,o,c,a],i)}return e},actions:c,controls:{...y.controls,...de},selectors:i,resolvers:s});const pe="wc/store/collections";var ye=n(11);const me={cartItemsPendingQuantity:[],cartItemsPendingDelete:[],cartData:{coupons:w,shippingRates:S,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:"",email:""},items:C,itemsCount:0,itemsWeight:0,needsShipping:!0,needsPayment:!1,hasCalculatedShipping:!0,fees:R,totals:{currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"",currency_suffix:"",total_items:"0",total_items_tax:"0",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_price:"0",total_tax:"0",tax_lines:P},errors:O,paymentRequirements:A,extensions:D},metaData:{updatingCustomerData:!1,updatingSelectedRate:!1,applyingCoupon:"",removingCoupon:"",isCartDataStale:!1},errors:I},ge=e=>e.cartData,Ee=e=>e.cartData.totals||me.cartData.totals,_e=e=>e.metaData||me.metaData,ve=e=>e.errors,Te=e=>!!e.metaData.applyingCoupon,be=e=>e.metaData.isCartDataStale,we=e=>e.metaData.applyingCoupon||"",Ce=e=>!!e.metaData.removingCoupon,Re=e=>e.metaData.removingCoupon||"",Oe=(e,t)=>e.cartData.items.find(e=>e.key===t),Ie=(e,t)=>e.cartItemsPendingQuantity.includes(t),Se=(e,t)=>e.cartItemsPendingDelete.includes(t),Ae=e=>!!e.metaData.updatingCustomerData,De=e=>!!e.metaData.updatingSelectedRate,Pe=e=>({type:"RECEIVE_CART",response:Object(F.mapKeys)(e,(e,t)=>Object(F.camelCase)(t))}),Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:t?"REPLACE_ERRORS":"RECEIVE_ERROR",error:e}},Me=e=>({type:"APPLYING_COUPON",couponCode:e}),ke=e=>({type:"REMOVING_COUPON",couponCode:e}),je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:"RECEIVE_CART_ITEM",cartItem:e}},Le=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"ITEM_PENDING_QUANTITY",cartItemKey:e,isPendingQuantity:t}},xe=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"RECEIVE_REMOVED_ITEM",cartItemKey:e,isPendingDelete:t}},Fe=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"SET_IS_CART_DATA_STALE",isCartDataStale:e}},Ve=e=>({type:"UPDATING_CUSTOMER_DATA",isResolving:e}),Ue=e=>({type:"UPDATING_SELECTED_SHIPPING_RATE",isResolving:e}),Ge=()=>({type:"UPDATE_LEGACY_CART_FRAGMENTS"}),Ye=()=>({type:"TRIGGER_ADDING_TO_CART_EVENT"}),Ke=e=>{let{preserveCartData:t}=e;return{type:"TRIGGER_ADDED_TO_CART_EVENT",preserveCartData:t}};function*Qe(e){try{const{response:t}=yield ie({path:"/wc/store/cart/extensions",method:"POST",data:{namespace:e.namespace,data:e.data},cache:"no-store"});return yield Pe(t),yield Ge(),t}catch(e){var t;throw yield Ne(e),null!==(t=e.data)&&void 0!==t&&t.cart&&(yield Pe(e.data.cart)),e}}function*He(e){yield Me(e);try{const{response:t}=yield ie({path:"/wc/store/cart/apply-coupon",method:"POST",data:{code:e},cache:"no-store"});yield Pe(t),yield Me(""),yield Ge()}catch(e){var t;throw yield Ne(e),yield Me(""),null!==(t=e.data)&&void 0!==t&&t.cart&&(yield Pe(e.data.cart)),e}return!0}function*qe(e){yield ke(e);try{const{response:t}=yield ie({path:"/wc/store/cart/remove-coupon",method:"POST",data:{code:e},cache:"no-store"});yield Pe(t),yield ke(""),yield Ge()}catch(e){var t;throw yield Ne(e),yield ke(""),null!==(t=e.data)&&void 0!==t&&t.cart&&(yield Pe(e.data.cart)),e}return!0}function*Be(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;try{yield Ye();const{response:n}=yield ie({path:"/wc/store/cart/add-item",method:"POST",data:{id:e,quantity:t},cache:"no-store"});yield Pe(n),yield Ke({preserveCartData:!0}),yield Ge()}catch(e){var n;throw yield Ne(e),null!==(n=e.data)&&void 0!==n&&n.cart&&(yield Pe(e.data.cart)),e}}function*ze(e){yield xe(e);try{const{response:t}=yield ie({path:"/wc/store/cart/remove-item",data:{key:e},method:"POST",cache:"no-store"});yield Pe(t),yield Ge()}catch(e){var t;yield Ne(e),null!==(t=e.data)&&void 0!==t&&t.cart&&(yield Pe(e.data.cart))}yield xe(e,!1)}function*Je(e,t){const n=yield Object(y.select)(ye.b,"getCartItem",e);if(yield Le(e),(null==n?void 0:n.quantity)!==t){try{const{response:n}=yield ie({path:"/wc/store/cart/update-item",method:"POST",data:{key:e,quantity:t},cache:"no-store"});yield Pe(n),yield Ge()}catch(e){var r;yield Ne(e),null!==(r=e.data)&&void 0!==r&&r.cart&&(yield Pe(e.data.cart))}yield Le(e,!1)}}function*$e(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;try{yield Ue(!0);const{response:n}=yield ie({path:"/wc/store/cart/select-shipping-rate",method:"POST",data:{package_id:t,rate_id:e},cache:"no-store"});yield Pe(n)}catch(e){var n;throw yield Ne(e),yield Ue(!1),null!==(n=e.data)&&void 0!==n&&n.cart&&(yield Pe(e.data.cart)),e}return yield Ue(!1),!0}function*We(e){yield Ve(!0);try{const{response:t}=yield ie({path:"/wc/store/cart/update-customer",method:"POST",data:e,cache:"no-store"});yield Pe(t)}catch(e){var t;throw yield Ne(e),yield Ve(!1),null!==(t=e.data)&&void 0!==t&&t.cart&&(yield Pe(e.data.cart)),e}return yield Ve(!1),!0}function*Xe(){const e=yield Object(y.apiFetch)({path:"/wc/store/cart",method:"GET",cache:"no-store"});e?yield Pe(e):yield Ne(ye.a)}function*Ze(){yield Object(y.select)(ye.b,"getCartData")}const et=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CART_ITEM":return e.map(e=>{var n;return e.key===(null===(n=t.cartItem)||void 0===n?void 0:n.key)?t.cartItem:e})}return e};const tt=window.CustomEvent||null,nt=(e,t)=>{let{bubbles:n=!1,cancelable:r=!1,element:o,detail:a={}}=t;if(!tt)return;o||(o=document.body);const i=new tt(e,{bubbles:n,cancelable:r,detail:a});o.dispatchEvent(i)};let rt;const ot={UPDATE_LEGACY_CART_FRAGMENTS(){rt&&clearTimeout(rt),rt=setTimeout(()=>{nt("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},TRIGGER_ADDING_TO_CART_EVENT(){nt("wc-blocks_adding_to_cart",{bubbles:!0,cancelable:!0})},TRIGGER_ADDED_TO_CART_EVENT(e){(e=>{let{preserveCartData:t=!1}=e;nt("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})})(e)}};Object(p.registerStore)(ye.b,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:me,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ERROR":t.error&&(e={...e,errors:e.errors.concat(t.error)});break;case"REPLACE_ERRORS":t.error&&(e={...e,errors:[t.error]});break;case"RECEIVE_CART":t.response&&(e={...e,errors:I,cartData:t.response});break;case"APPLYING_COUPON":(t.couponCode||""===t.couponCode)&&(e={...e,metaData:{...e.metaData,applyingCoupon:t.couponCode}});break;case"REMOVING_COUPON":(t.couponCode||""===t.couponCode)&&(e={...e,metaData:{...e.metaData,removingCoupon:t.couponCode}});break;case"ITEM_PENDING_QUANTITY":const n=e.cartItemsPendingQuantity.filter(e=>e!==t.cartItemKey);t.isPendingQuantity&&t.cartItemKey&&n.push(t.cartItemKey),e={...e,cartItemsPendingQuantity:n};break;case"RECEIVE_REMOVED_ITEM":const r=e.cartItemsPendingDelete.filter(e=>e!==t.cartItemKey);t.isPendingDelete&&t.cartItemKey&&r.push(t.cartItemKey),e={...e,cartItemsPendingDelete:r};break;case"RECEIVE_CART_ITEM":e={...e,errors:I,cartData:{...e.cartData,items:et(e.cartData.items,t)}};break;case"UPDATING_CUSTOMER_DATA":e={...e,metaData:{...e.metaData,updatingCustomerData:!!t.isResolving}};break;case"UPDATING_SELECTED_SHIPPING_RATE":e={...e,metaData:{...e.metaData,updatingSelectedRate:!!t.isResolving}};break;case"SET_IS_CART_DATA_STALE":e={...e,metaData:{...e.metaData,isCartDataStale:t.isCartDataStale}}}return e},actions:l,controls:{...y.controls,...de,...ot},selectors:u,resolvers:d});const at=ye.b,it=(e,t)=>void 0===e[t]?null:e[t],ct=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=it(e,t);return null===o?r:(o=JSON.parse(o),void 0!==o[n]?o[n]:r)},st=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=it(e,t);return null===r?n:JSON.parse(r)},ut=(e,t,n)=>({type:"SET_QUERY_KEY_VALUE",context:e,queryKey:t,value:n}),lt=(e,t)=>({type:"SET_QUERY_CONTEXT_VALUE",context:e,value:t});Object(p.registerStore)("wc/store/query-state",{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const{type:n,context:r,queryKey:o,value:a}=t,i=it(e,r);let c;switch(n){case"SET_QUERY_KEY_VALUE":const t=null!==i?JSON.parse(i):{};t[o]=a,c=JSON.stringify(t),i!==c&&(e={...e,[r]:c});break;case"SET_QUERY_CONTEXT_VALUE":c=JSON.stringify(a),i!==c&&(e={...e,[r]:c})}return e},actions:h,selectors:f});const dt="wc/store/query-state"},18:function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,u=[],l=!1,d=-1;function f(){l&&s&&(l=!1,s.length?u=s.concat(u):d=-1,u.length&&h())}function h(){if(!l){var e=c(f);l=!0;for(var t=u.length;t;){for(s=u,u=[];++d1)for(var n=1;n and returns Promise>, but got: "+e+".");this._batchLoadFn=e,this._maxBatchSize=function(e){if(e&&!1===e.batch)return 1;var t=e&&e.maxBatchSize;if(void 0===t)return 1/0;if("number"!=typeof t||t<1)throw new TypeError("maxBatchSize must be a positive number: "+t);return t}(t),this._batchScheduleFn=function(e){var t=e&&e.batchScheduleFn;if(void 0===t)return a;if("function"!=typeof t)throw new TypeError("batchScheduleFn must be a function: "+t);return t}(t),this._cacheKeyFn=function(e){var t=e&&e.cacheKeyFn;if(void 0===t)return function(e){return e};if("function"!=typeof t)throw new TypeError("cacheKeyFn must be a function: "+t);return t}(t),this._cacheMap=function(e){if(e&&!1===e.cache)return null;var t=e&&e.cacheMap;if(void 0===t)return new Map;if(null!==t){var n=["get","set","delete","clear"].filter((function(e){return t&&"function"!=typeof t[e]}));if(0!==n.length)throw new TypeError("Custom cacheMap missing methods: "+n.join(", "))}return t}(t),this._batch=null}var t=e.prototype;return t.load=function(e){if(null==e)throw new TypeError("The loader.load() function must be called with a value,but got: "+String(e)+".");var t=function(e){var t=e._batch;if(null!==t&&!t.hasDispatched&&t.keys.length and returns Promise>, but the function did not return a Promise: "+String(n)+"."));n.then((function(e){if(!s(e))throw new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array: "+String(e)+".");if(e.length!==t.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array of the same length as the Array of keys.\n\nKeys:\n"+String(t.keys)+"\n\nValues:\n"+String(e));c(t);for(var n=0;n but got: "+e+".");for(var t=[],n=0;n0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}e.exports=o}).call(this,n(18),n(129).setImmediate)},4:function(e,t){e.exports=window.wc.wcSettings},5:function(e,t){e.exports=window.wp.dataControls},7:function(e,t){e.exports=window.wp.data}}); \ No newline at end of file diff --git a/build/wc-blocks-editor-style-rtl.css b/build/wc-blocks-editor-style-rtl.css new file mode 100644 index 00000000000..296ff42c569 --- /dev/null +++ b/build/wc-blocks-editor-style-rtl.css @@ -0,0 +1 @@ +@charset "UTF-8";:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-calendar{width:100%;background-color:#f0f0f0;border-top:1px solid #ccc;height:396px}.woocommerce-calendar.is-mobile{height:100%}.woocommerce-calendar__react-dates{width:100%;overflow-x:hidden}.woocommerce-calendar__react-dates .DayPicker{margin:0 auto}.woocommerce-calendar__react-dates .CalendarMonth_table{margin-top:10px}.woocommerce-calendar__react-dates .CalendarDay__selected_span{background:#007cba;background:var(--wp-admin-theme-color);border:1px solid #ccc}.woocommerce-calendar__react-dates .CalendarDay__selected_span:hover{background:#006ba1;background:var(--wp-admin-theme-color-darker-10);border:1px solid #f0f0f0}.woocommerce-calendar__react-dates .CalendarDay__selected{background:#005a87;background:var(--wp-admin-theme-color-darker-20);border:1px solid #ccc}.woocommerce-calendar__react-dates .CalendarDay__hovered_span,.woocommerce-calendar__react-dates .CalendarDay__selected:hover{background:#006ba1;background:var(--wp-admin-theme-color-darker-10);border:1px solid #f0f0f0}.woocommerce-calendar__react-dates .CalendarDay__hovered_span{color:#fff}.woocommerce-calendar__react-dates .CalendarDay__hovered_span:hover{color:#fff;background:#007cba;background:var(--wp-admin-theme-color)}.woocommerce-calendar__react-dates .CalendarDay__blocked_out_of_range{color:#ccc}.woocommerce-calendar__react-dates .CalendarMonth,.woocommerce-calendar__react-dates .CalendarMonthGrid,.woocommerce-calendar__react-dates .DayPicker,.woocommerce-calendar__react-dates .DayPicker_transitionContainer{background-color:#f0f0f0}.woocommerce-calendar__react-dates .DayPicker_weekHeader_li{color:#757575}.woocommerce-calendar__react-dates .DayPickerNavigation_button:focus{outline:2px solid #bfe7f3}.woocommerce-calendar__react-dates.is-core-datepicker .components-datetime__date{padding-right:0}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__default{background-color:transparent}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__selected{background:#533582;border:none}.woocommerce-calendar__inputs{padding:1em;width:100%;max-width:500px;display:-ms-grid;display:grid;-ms-grid-columns:43% 14% 43%;grid-template-columns:43% 14% 43%;margin:0 auto}.woocommerce-calendar__inputs .components-base-control{margin:0}.woocommerce-calendar__inputs-to{display:flex;align-items:center;justify-content:center;-ms-grid-column:2;grid-column-start:2}.woocommerce-calendar__input{position:relative}.woocommerce-calendar__input .dashicons-calendar{position:absolute;top:50%;transform:translateY(-50%);right:10px}.woocommerce-calendar__input .dashicons-calendar path{fill:#757575}.woocommerce-calendar__input:first-child{-ms-grid-column:1;grid-column-start:1}.woocommerce-calendar__input:last-child{-ms-grid-column:3;grid-column-start:3}.woocommerce-calendar__input.is-empty .dashicons-calendar path{fill:#757575}.woocommerce-calendar__input.is-error .dashicons-calendar path{fill:#d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text{border:1px solid #d94f4f;box-shadow:inset 0 0 8px #d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text:focus{box-shadow:inset 0 0 8px #d94f4f,0 0 6px rgba(30,140,190,.8)}.woocommerce-calendar__input .woocommerce-calendar__input-text{color:#757575;border-radius:3px;padding:10px 30px 10px 10px;width:100%;font-size:13px;font-size:.8125rem}.woocommerce-calendar__input .woocommerce-calendar__input-text:-ms-input-placeholder{color:#757575}.woocommerce-calendar__input .woocommerce-calendar__input-text::-moz-placeholder{color:#757575}.woocommerce-calendar__input .woocommerce-calendar__input-text::placeholder{color:#757575}.woocommerce-filters-date__content.is-mobile .woocommerce-calendar__input-error .components-popover__content{height:auto}.woocommerce-calendar__input-error{display:none}.is-error .woocommerce-calendar__input-text:focus+span .woocommerce-calendar__input-error{display:block;right:50%!important;position:absolute;top:auto!important}.woocommerce-calendar__input-error .components-popover__content{background-color:#757575;color:#fff;padding:.5em;border:none}.woocommerce-calendar__input-error.components-popover .components-popover__content{min-width:100px;width:100px;text-align:center}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-bottom:before{border-bottom-color:#757575;z-index:1;top:-6px}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-top:after{border-top-color:#757575;z-index:1;top:0}.woocommerce-calendar__date-picker-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#757575;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-card{margin-bottom:24px;background:#fff;border-radius:3px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow .2s cubic-bezier(.4,1,.4,1)}@media (max-width:782px){.woocommerce-card{margin-bottom:12px;width:auto}}.woocommerce-card.is-inactive{background-color:#f6f7f7;box-shadow:none}.woocommerce-card__header{padding:16px;display:-ms-grid;display:grid;align-items:center;border-top-right-radius:3px;border-top-right-radius:4px}.has-action .woocommerce-card__header{-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr}.has-menu .woocommerce-card__header{-ms-grid-columns:auto 24px;grid-template-columns:auto 24px}.has-menu.has-action .woocommerce-card__header{grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-card__header-item{-ms-grid-row-align:center}.woocommerce-card__header-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__action,.woocommerce-card__menu{text-align:left}.woocommerce-card__body{padding:16px}.woocommerce-card__title{margin:0;font-size:24px;font-size:1.5rem;line-height:1.2;font-weight:400}.woocommerce-card__description{font-size:16px;font-size:1rem;line-height:1.5;color:#646970;margin-top:12px;margin-bottom:0;font-weight:400}.woocommerce-chart{margin-top:-16px;margin-bottom:24px;background:#fff;border:1px solid #e2e4e7;border-top:0}@media (max-width:782px){.woocommerce-chart{margin-right:-16px;margin-left:-16px;margin-bottom:12px;border-right:none;border-left:none;width:auto}}.woocommerce-chart .woocommerce-chart__header{min-height:50px;border-bottom:1px solid #e2e4e7;display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;width:100%}.woocommerce-chart .woocommerce-chart__header .woocommerce-chart__title{height:18px;color:#24292d;font-size:15px;font-weight:600;line-height:18px;margin-right:16px;margin-left:16px}.woocommerce-chart .woocommerce-chart__body{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;width:100%}.woocommerce-chart .woocommerce-chart__body.woocommerce-chart__body-column{flex-direction:column}.woocommerce-chart .woocommerce-chart__footer{width:100%}.woocommerce-chart-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#f0f0f0;color:transparent;padding:0;width:100%;display:flex;align-items:center;justify-content:center}.woocommerce-chart-placeholder:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-chart-placeholder{-webkit-animation:none;animation:none}}.woocommerce-chart-placeholder .components-spinner{margin:0}.woocommerce-chart__interval-select{align-items:start;border-left:1px solid #e2e4e7;display:flex;flex-direction:column;justify-content:center;margin:0 auto 0 0;min-height:50px;padding:8px 16px 0}@media (max-width:960px){.woocommerce-chart__interval-select{width:100%;order:1;margin-top:-8px;margin-right:0;padding-right:8px;border-left:0;min-height:0}}#wpbody .woocommerce-chart__interval-select .components-select-control__input{font-size:13px;font-size:.8125rem;border:0;box-shadow:none}#wpbody .woocommerce-chart__interval-select .components-select-control__input:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff;color:#1e1e1e;box-shadow:inset 0 0 0 1px #757575,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-chart__types{padding:0 8px;white-space:nowrap}.woocommerce-chart__type-button{background:transparent!important}.woocommerce-chart__type-button.components-button{color:#e2e4e7;display:inline-flex;padding:8px}.woocommerce-chart__type-button.components-button.woocommerce-chart__type-button-selected{color:#757575}@media (max-width:960px){.woocommerce-summary+.woocommerce-chart .woocommerce-chart__title{display:none}.woocommerce-summary+.woocommerce-chart .woocommerce-chart__interval-select{width:auto;order:0;margin-top:0}}.woocommerce-legend.has-total{padding-bottom:50px;position:relative}.woocommerce-legend.woocommerce-legend__direction-column{border-left:1px solid #ccc;min-width:320px}.woocommerce-chart__footer .woocommerce-legend.woocommerce-legend__direction-column{border-left:none}.woocommerce-legend__list{color:#24292d;display:flex;height:100%;margin:0}.woocommerce-legend__direction-column .woocommerce-legend__list{flex-direction:column;height:300px;overflow:auto}.woocommerce-chart__footer .woocommerce-legend__direction-column .woocommerce-legend__list{border-top:1px solid #ccc;height:100%;max-height:none;min-height:none}.has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:250px}.woocommerce-chart__footer .has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:auto;max-height:220px;min-height:none}.woocommerce-legend__direction-row .woocommerce-legend__list{flex-direction:row}.woocommerce-legend__item>button{display:flex;justify-content:center;align-items:center;background-color:#fff;color:#757575;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%;border:none;padding:0}.woocommerce-legend__item>button .woocommerce-legend__item-container{display:flex;flex-direction:row;flex-wrap:nowrap;position:relative;padding:3px 24px 3px 0;font-size:13px;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;width:100%}.woocommerce-legend__item>button .woocommerce-legend__item-container:hover input~.woocommerce-legend__item-checkmark{background-color:#e0e0e0}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{border:1px solid #ccc;position:absolute;top:4px;right:0;height:16px;width:16px;background-color:#fff}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark:after{content:"";position:absolute;display:none}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked{background-color:currentColor;border-color:currentColor}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked:after{display:block;right:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 0 2px 2px;transform:rotate(-45deg)}.rtl .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked:after{transform:rotate(45deg) scaleX(-1)}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-total{margin-right:auto;font-weight:700}.woocommerce-legend__item>button:focus{outline:none}.woocommerce-legend__item>button:focus .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{outline:2px solid #ccc}.woocommerce-legend__item>button:hover{background-color:#f0f0f0}.woocommerce-legend__direction-column .woocommerce-legend__item{margin:0;padding:0}.woocommerce-legend__direction-column .woocommerce-legend__item>button{min-height:36px;padding:0 17px;text-align:right}.woocommerce-legend__direction-column .woocommerce-legend__item:first-child{margin-top:12px}.woocommerce-legend__direction-column .woocommerce-legend__item:last-child:after{content:"";display:block;height:12px;width:100%}.woocommerce-legend__direction-row .woocommerce-legend__item{padding:0;margin:0}.woocommerce-legend__direction-row .woocommerce-legend__item>button{padding:0 17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container{height:50px;align-items:center}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{top:17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-title{margin-left:17px}.woocommerce-legend__total{align-items:center;background:#fff;border-top:1px solid #ccc;bottom:0;color:#757575;display:flex;height:50px;justify-content:center;right:0;position:absolute;left:0;text-transform:uppercase}.woocommerce-legend__total:before{background:linear-gradient(-180deg,transparent,rgba(0,0,0,.2));bottom:100%;content:"";height:20px;right:0;opacity:0;pointer-events:none;position:absolute;left:0;transition:opacity .3s}.is-scrollable .woocommerce-legend__total:before{opacity:1}.woocommerce-chart__body-row .d3-chart__container{width:calc(100% - 320px)}.d3-chart__container{position:relative;width:100%}.d3-chart__container svg{overflow:visible}.d3-chart__container .d3-chart__empty-message{align-items:center;bottom:0;color:#757575;display:flex;font-size:18px;font-size:1.125rem;font-weight:700;justify-content:center;right:0;line-height:1.5;margin:0 auto;max-width:50%;padding-bottom:48px;pointer-events:none;position:absolute;left:0;top:0;text-align:center}@media (max-width:782px){.d3-chart__container .d3-chart__empty-message{font-size:13px;font-size:.8125rem}}.d3-chart__container .d3-chart__tooltip{border:1px solid #ccc;position:absolute;display:flex;min-width:324px;height:auto;background-color:#fff;text-align:right;padding:17px;box-shadow:0 3px 20px 0 rgba(18,24,30,.1),0 1px 3px 0 rgba(18,24,30,.1);flex-direction:column;flex-wrap:nowrap;justify-content:flex-start;pointer-events:none;visibility:hidden;z-index:1}@media (max-width:600px){.d3-chart__container .d3-chart__tooltip{min-width:auto;width:calc(100% - 48px)}}.d3-chart__container .d3-chart__tooltip h4{text-align:right;line-height:18px;width:100%;text-transform:uppercase;font-size:11px;color:#757575;margin-top:0}.d3-chart__container .d3-chart__tooltip ul{list-style:none;margin-bottom:2px;margin-top:2px;font-size:14px}.d3-chart__container .d3-chart__tooltip ul li{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center}.d3-chart__container .d3-chart__tooltip ul li.key-row{display:flex;flex-direction:row;justify-content:space-between;width:100%}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container{width:100%;min-width:100px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-color{display:inline-block;width:16px;height:16px;margin-left:8px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-key{margin-left:6px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-value{font-weight:600}.d3-chart__container .bargrouprect{shape-rendering:crispEdges}.d3-chart__container .grid .tick line{stroke:#f0f0f0;stroke-width:1;shape-rendering:crispEdges}.d3-chart__container .grid .tick:first-child line{stroke:#757575}.d3-chart__container .grid.with-positive-ticks .tick:last-child line{opacity:0}.d3-chart__container .tick{padding-top:10px;stroke-width:1}.d3-chart__container .y-axis{text-anchor:start}.d3-chart__container .y-axis.ticktext{fill:#757575}.d3-chart__container .axis-month .tick text,.d3-chart__container .y-axis .tick text{font-size:10px}.d3-chart__container .focus-grid line{stroke:rgba(0,0,0,.1);stroke-width:1px}.d3-chart__container .barfocus{fill:rgba(0,0,0,.1)}.d3-base{background:transparent;overflow-x:auto;overflow-y:hidden;position:relative;width:100%;height:100%}.woocommerce-count{border:1px solid;border-radius:10px;padding:0 8px;font-weight:700}.woocommerce-page .woocommerce-dropdown-button{background-color:#fff;position:relative;border:1px solid #757575;color:#1e1e1e;border-radius:4px;padding:0 0 0 40px;width:100%;height:auto}.woocommerce-page .woocommerce-dropdown-button:after{content:"";background:#1e1e1e;-webkit-mask:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20%2F%3E%3C%2Fsvg%3E) no-repeat right 0 top 55%;mask:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20%2F%3E%3C%2Fsvg%3E) no-repeat right 0 top 55%;position:absolute;left:14px;width:32px;height:48px}.woocommerce-page .woocommerce-dropdown-button.is-open:after{transform:translateX(-12px) translateY(2px) rotate(-180deg)}.woocommerce-page .woocommerce-dropdown-button.is-open,.woocommerce-page .woocommerce-dropdown-button:active,.woocommerce-page .woocommerce-dropdown-button:hover{color:#007cba;color:var(--wp-admin-theme-color)}.woocommerce-page .woocommerce-dropdown-button.is-open:after,.woocommerce-page .woocommerce-dropdown-button:active:after,.woocommerce-page .woocommerce-dropdown-button:hover:after{background:#007cba;background:var(--wp-admin-theme-color)}.woocommerce-page .woocommerce-dropdown-button.is-multi-line .woocommerce-dropdown-button__labels{flex-direction:column}.woocommerce-page .woocommerce-dropdown-button:not(:focus):not(.is-open){border-color:#757575}.woocommerce-dropdown-button__labels{text-align:right;padding:8px 12px;min-height:48px;display:flex;align-items:center;width:100%;justify-content:space-around}@media (max-width:400px){.woocommerce-dropdown-button__labels{min-height:46px}}.woocommerce-dropdown-button__labels span{width:100%;text-align:right}.woocommerce-dropdown-button__labels span:last-child{font-size:12px;font-size:.75rem;margin:0}.woocommerce-dropdown-button__labels span:first-child{font-size:13px;font-size:.8125rem;font-weight:600}@media (max-width:400px){.woocommerce-dropdown-button__labels span:last-child{font-size:10px;font-size:.625rem}.woocommerce-dropdown-button__labels span:first-child{font-size:12px;font-size:.75rem}}.woocommerce-ellipsis-menu{text-align:center}.woocommerce-ellipsis-menu__toggle{justify-content:center;vertical-align:middle;width:24px}.woocommerce-ellipsis-menu__toggle .dashicon{transform:rotate(-90deg)}.woocommerce-ellipsis-menu__popover{text-align:right}.woocommerce-ellipsis-menu__popover:not(.is-mobile):after,.woocommerce-ellipsis-menu__popover:not(.is-mobile):before{margin-right:-16px}.woocommerce-ellipsis-menu__popover .components-popover__content{width:182px;padding:2px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__content{width:100%}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{padding:4px 12px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item{cursor:pointer;color:#757575}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item:focus{box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item .components-form-toggle{margin-left:8px}.woocommerce-ellipsis-menu__popover .components-base-control__label,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{color:#1e1e1e;padding-top:8px;padding-bottom:8px;font-size:15px;font-size:.9375rem;margin-bottom:4px}.woocommerce-ellipsis-menu__popover .components-toggle-control .components-base-control__field{margin:4px 0}.woocommerce-ellipsis-menu__popover .components-base-control{margin:0}.woocommerce-empty-content{margin-bottom:16px;text-align:center}.woocommerce-empty-content .woocommerce-empty-content__illustration{max-width:100%}.woocommerce-empty-content .woocommerce-empty-content__actions .components-button+.components-button{margin-right:16px}.woocommerce-filters-advanced{margin:24px 0}.woocommerce-filters-advanced .components-card__body{background-color:#f0f0f0}.woocommerce-filters-advanced .components-card__body.is-size-small:hover,.woocommerce-filters-advanced .components-card__body ul li:hover{background-color:#e0e0e0}.woocommerce-filters-advanced .components-select-control__input{height:38px;padding:0 8px 0 0;margin:0}.woocommerce-filters-advanced .components-card__header .components-base-control__field{margin-bottom:0}@media (max-width:782px){.woocommerce-filters-advanced{margin:16px 0;border:1px solid #ccc}}@media (max-width:400px){.woocommerce-filters-advanced{margin:12px 0}}.woocommerce-filters-advanced__title-select{width:70px;display:inline-block;margin:0 8px}.woocommerce-filters-advanced__list{margin:0}.woocommerce-filters-advanced__list-item{padding:0 0 0 16px;margin:0;display:-ms-grid;display:grid;-ms-grid-columns:1fr 40px;grid-template-columns:1fr 40px;border-bottom:1px solid #ccc}.woocommerce-filters-advanced__list-item:hover{background-color:#e0e0e0}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item fieldset{padding:8px 16px 8px 8px}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{width:40px;height:38px;-ms-grid-row-align:center;align-self:center;color:#757575;padding:8px}@media (max-width:400px){.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{position:absolute;top:0;left:4px}}.woocommerce-filters-advanced__list-item .components-form-token-field{border-radius:4px}@media (max-width:400px){.woocommerce-filters-advanced__list-item{display:block;position:relative;padding:8px 0 0 8px}}.woocommerce-filters-advanced__add-filter{margin:0;display:block}.woocommerce-filters-advanced__add-filter div div{display:inline-block}.woocommerce-filters-advanced__add-filter .components-popover:not(.is-mobile) .components-popover__content{min-width:180px}.woocommerce-filters-advanced__add-filter .components-popover__content>div{width:100%}.woocommerce-filters-advanced__fieldset{display:flex;align-items:center}.woocommerce-filters-advanced__fieldset>div{padding:0 4px}@media (max-width:782px){.woocommerce-filters-advanced__fieldset>div{width:100%;padding:4px 0}}@media (max-width:782px){.woocommerce-filters-advanced__fieldset{display:block}}.woocommerce-filters-advanced__fieldset.is-english{display:-ms-grid;display:grid;-ms-grid-columns:100px 150px 1fr;grid-template-columns:100px 150px 1fr}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{display:flex;align-items:center}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item .components-base-control__field{margin-bottom:0}@media (max-width:782px){.woocommerce-filters-advanced__fieldset.is-english{display:block}}.woocommerce-filters-advanced__rule{width:150px}.woocommerce-filters-advanced__input{width:100%}.woocommerce-filters-advanced__input.woocommerce-search.woocommerce-select-control .woocommerce-select-control__control{height:38px}.woocommerce-filters-advanced__add-filter-dropdown{display:inline-block}.woocommerce-filters-advanced__add-button{align-items:center;color:#757575;padding:8px}.woocommerce-filters-advanced__add-button svg{fill:currentColor;margin:0 0 0 6px}.woocommerce-filters-advanced__controls .components-button{margin-left:16px}.woocommerce-filters-advanced__add-dropdown{padding:8px 0}.woocommerce-filters-advanced__add-dropdown li{margin:0}.woocommerce-filters-advanced__add-dropdown .components-button{width:100%;padding:8px}.woocommerce-filters-advanced__add-dropdown .components-button:hover{background-color:#e0e0e0}.woocommerce-filters-advanced__add-dropdown .components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#f0f0f0;box-shadow:none}.woocommerce-filters-advanced__input-range{align-items:center;display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-filters-advanced__input-range.is-between{-ms-grid-columns:1fr 36px 1fr;grid-template-columns:1fr 36px 1fr}.woocommerce-filters-advanced__input-range input{height:38px;margin:0}.woocommerce-filters-advanced__input-range .separator{text-align:center}.woocommerce-filters-advanced__attribute-fieldset{align-items:center;display:-ms-grid;display:grid;-ms-grid-columns:1fr 20px 1fr;grid-template-columns:1fr 20px 1fr}.woocommerce-filters-advanced__attribute-fieldset .woocommerce-filters-advanced__attribute-field-separator{padding:0 6px}.woocommerce-filters-date__content.is-mobile .components-popover__header{border:none;height:0}.woocommerce-filters-date__content.is-mobile .components-popover__close{transform:translateY(22px)}.woocommerce-filters-date__content.is-mobile .components-tab-panel__tab-content{height:calc(100% - 46px);overflow:auto}.woocommerce-filters-date__content.components-dropdown__content .components-popover__content>div{padding:0}.woocommerce-filters-date__tabs{height:calc(100% - 42px);border-top:1px solid #ccc}.woocommerce-filters-date__tabs .components-tab-panel__tabs{display:flex;justify-content:space-between}.woocommerce-filters-date__tabs .components-tab-panel__tabs .components-button{display:block;text-align:center;width:50%}.woocommerce-filters-date__tabs .components-tab-panel__tab-content{display:flex;flex-direction:column;align-items:center}.woocommerce-filters-date__tabs:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-date__tabs:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-date__text{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#757575;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-filters-date__content-controls{display:flex;flex-direction:column;width:100%;align-items:center;padding-bottom:1em;background-color:#fff}.woocommerce-filters-date__content-controls.is-custom{border-top:1px solid #ccc}.woocommerce-filters-date__button-group{padding-top:1em;display:flex;justify-content:center;width:100%}.woocommerce-filters-date__button-group .woocommerce-filters-date__button{justify-content:center;width:40%;height:34px;margin:0 12px}.woocommerce-filters-filter__content.is-mobile .components-popover__header-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#757575}.woocommerce-filters-filter__content.is-mobile .woocommerce-filters-filter__content-list-item:last-child{border-bottom:1px solid #ccc}.woocommerce-filters-filter__content-list{margin:0;width:100%;min-width:100%}.woocommerce-filters-filter__content-list-item{border:1px solid transparent;border-bottom-color:#ccc;margin:0}.woocommerce-filters-filter__content-list-item:last-child{border-bottom:1px solid transparent}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button,.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button:before{content:"";width:8px;height:8px;background-color:#7f54b3;position:absolute;top:50%;right:1em;transform:translate(-50%,-50%)}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button{position:relative;align-items:center;display:flex;width:100%;padding:1em 3em 1em 1em;background-color:#f0f0f0;text-align:right}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button{color:#757575}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button:hover{background-color:#e0e0e0;color:#757575}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#f0f0f0}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button svg{position:absolute;right:1em}.woocommerce-filters .components-base-control__field{margin-bottom:0}@media (max-width:400px){.woocommerce-filters{margin-right:-8px;margin-left:-8px}}.woocommerce-filters__basic-filters{display:flex;margin-bottom:24px}@media (max-width:1280px){.woocommerce-filters__basic-filters{flex-direction:column}}@media (max-width:782px){.woocommerce-filters__basic-filters{margin-bottom:16px}}.woocommerce-filters__advanced-filters .components-card__body{background-color:#f0f0f0}.woocommerce-filters__advanced-filters .components-card__footer .components-button{margin-left:16px}.woocommerce-filters-filter{width:25%;padding:0 12px;min-height:82px;display:flex;flex-direction:column;justify-content:flex-end}.woocommerce-filters-filter:first-child{padding-right:0}.woocommerce-filters-filter:last-child{padding-left:0}@media (max-width:1440px){.woocommerce-filters-filter{width:33.3%}}@media (max-width:1280px){.woocommerce-filters-filter{width:50%;padding:0;min-height:78px}}@media (max-width:782px){.woocommerce-filters-filter{width:100%}}.woocommerce-filters-label{margin:7px 0;display:block}@media (max-width:1280px){.woocommerce-filters-label{margin:5px 0}}.woocommerce-filters-date__content .components-popover__content,.woocommerce-filters-filter__content .components-popover__content{width:320px;border:1px solid #ccc;background-color:#fff}.woocommerce-filters-date__content .woocommerce-calendar__input-error .components-popover__content,.woocommerce-filters-filter__content .woocommerce-calendar__input-error .components-popover__content{background-color:#757575}.woocommerce-filters-date__content.is-mobile .components-popover__content,.woocommerce-filters-filter__content.is-mobile .components-popover__content{width:100%;height:100%;border:none}.woocommerce-filters-filter__search .woocommerce-search__autocomplete-results{position:static}.woocommerce-filters-filter__search .woocommerce-search__inline-container{overflow:hidden}.woocommerce-filters-filter__search .woocommerce-search__inline-container:not(.is-active){border:none}.woocommerce-filters-advanced__list-item .components-base-control+.components-base-control{margin-bottom:0}.woocommerce-flag span{vertical-align:middle}.woocommerce-flag .woocommerce-flag__fallback{background:#f0f0f0;color:transparent;width:24px;height:18px;display:block;overflow:hidden}.woocommerce-gravatar{border-radius:50%}.woocommerce-image-upload .woocommerce-image-upload__image-preview{font-size:16px;margin-left:2em}.woocommerce-image-upload .woocommerce-image-upload__image-preview img{max-width:240px;height:auto}.woocommerce-image-upload .woocommerce-image-upload__add-image{margin:16px 0}.woocommerce-image-upload.has-image{display:flex;align-items:center}.woocommerce-list{margin:0;padding:0}a.woocommerce-list__item{color:inherit}.woocommerce-list__item{display:flex;align-items:center;margin-bottom:0;text-decoration:none;background-color:#fff}.woocommerce-list__item.has-gutters{padding:16px 24px}.woocommerce-list__item.has-action{cursor:pointer}.woocommerce-list__item:focus{box-shadow:inset 0 0 0 1px #006088,inset 0 0 0 2px #fff}.woocommerce-list__item:focus-visible{box-shadow:none}.woocommerce-list__item:not(.transitions-disabled).woocommerce-list__item-enter{opacity:0;max-height:0;transform:translateX(-50%)}.woocommerce-list__item:not(.transitions-disabled).woocommerce-list__item-enter-active{opacity:1;max-height:100vh;transform:translateX(0);transition:opacity .5s,transform .5s,max-height .5s}.woocommerce-list__item:not(.transitions-disabled).woocommerce-list__item-exit{opacity:1;max-height:100vh;transform:translateX(0)}.woocommerce-list__item:not(.transitions-disabled).woocommerce-list__item-exit-active{opacity:0;max-height:0;transform:translateX(-50%);transition:opacity .5s,transform .5s,max-height .5s}.woocommerce-list__item>.woocommerce-list__item-inner{text-decoration:none;width:100%;display:flex;align-items:center;padding:16px 24px}.woocommerce-list__item>.woocommerce-list__item-inner:focus{box-shadow:inset 0 0 0 1px #006088,inset 0 0 0 2px #fff}.woocommerce-list__item .woocommerce-list__item-title{color:#1d2327}.woocommerce-list__item .woocommerce-list__item-content{margin-top:4px;display:block;font-size:14px;line-height:20px;color:#50575d}.woocommerce-list__item .woocommerce-list__item-before{margin-left:20px;display:flex;align-items:center}.woocommerce-list__item .woocommerce-list__item-after{display:flex;align-items:center;margin-right:auto}.woocommerce-list__item:not(:first-child){border-top:1px solid #f0f0f0}.woocommerce-list__item:hover{background-color:#f0f0f0}.woocommerce-list__item:hover .woocommerce-list__item-title{color:#007cba;color:var(--wp-admin-theme-color)}.woocommerce-list__item:hover .woocommerce-list__item-before>svg{fill:#007cba;fill:var(--wp-admin-theme-color)}.woocommerce-list__item .woocommerce-list__item-title{color:#007cba;color:var(--wp-admin-theme-color)}.woocommerce-list__item .woocommerce-list__item-before>svg{fill:#007cba;fill:var(--wp-admin-theme-color)}.woocommerce-list__item .woocommerce-list__item-after>svg{fill:#1e1e1e}.woocommerce-list__item.is-complete .woocommerce-task__icon{background-color:#007cba;background-color:var(--wp-admin-theme-color)}.woocommerce-list__item.is-complete .woocommerce-list__item-title{color:#757575}.woocommerce-list__item.is-complete .woocommerce-list__item-content{display:none}.woocommerce-list__item-title{color:#2c3338}.woocommerce-list__item-content{color:#646970}.woocommerce-order-status{display:flex;align-items:center}.woocommerce-order-status__indicator{min-width:16px;width:16px;height:16px;display:block;background:#ccc;margin-left:8px;border-radius:50%;border:3px solid #f0f0f0}.woocommerce-order-status__indicator.is-processing{background:#4ab866;border-color:#93d5a4}.woocommerce-order-status__indicator.is-on-hold{background:#ffb900;border-color:#ffd566}.woocommerce-pagination{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center}@media (max-width:782px){.woocommerce-pagination{flex-direction:column}}.woocommerce-pagination input{border-radius:4px}.woocommerce-pagination__page-arrows{display:flex;flex-direction:row}.woocommerce-pagination__page-arrows-buttons{display:inline-flex;align-items:baseline;border:1px solid #b5bfc9;border-radius:4px;background:#f0f2f4}.woocommerce-pagination__page-arrows-buttons .components-button{color:#24292d;height:30px;width:32px;justify-content:center}.woocommerce-pagination__page-arrows-buttons .components-button:not(:disabled):not([aria-disabled=true]):hover{color:#757575}.woocommerce-pagination__page-arrows-buttons button:first-child{border-top-left-radius:0;border-bottom-left-radius:0;border-left:2px solid #d3d9de}.woocommerce-pagination__page-arrows-buttons button:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.woocommerce-pagination__page-arrows-buttons .woocommerce-pagination__link{padding:4px}.woocommerce-pagination__page-arrows-label{margin-top:8px;margin-left:8px}.woocommerce-pagination__page-picker{margin-right:16px}@media (max-width:782px){.woocommerce-pagination__page-picker{margin-top:16px;margin-right:0}}.woocommerce-pagination__page-picker .woocommerce-pagination__page-picker-input{margin-right:8px;width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker{margin-right:16px}@media (max-width:782px){.woocommerce-pagination__per-page-picker{margin-top:16px;margin-right:0}}.woocommerce-pagination__per-page-picker .components-base-control{margin-bottom:0}.woocommerce-pagination__per-page-picker .components-base-control .components-base-control__field{display:flex;flex-direction:row;align-items:baseline;margin-bottom:0}.woocommerce-pagination__per-page-picker .components-base-control .components-select-control__input{width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker .components-base-control .components-base-control__label{margin-left:8px}.woocommerce-pagination__page-picker-input.has-error,.woocommerce-pagination__page-picker-input.has-error:focus{border-color:#d94f4f;box-shadow:0 0 2px #d94f4f}.woocommerce-pill{border:1px solid #757575;border-radius:28px;color:#757575;display:inline-block;padding:4px 8px}@media (max-width:320px){.woocommerce-pill{font-size:11px}}.woocommerce-product-image{border-radius:2px}.woocommerce-rating{position:relative;vertical-align:middle;display:inline-block;overflow:hidden;white-space:nowrap}.woocommerce-rating .gridicon{fill:#e0e0e0}.woocommerce-rating .woocommerce-rating__star-outline{position:absolute;right:0;top:0;white-space:nowrap;overflow:hidden}.woocommerce-rating .woocommerce-rating__star-outline .gridicon{fill:#757575}.woocommerce-search.woocommerce-select-control{position:relative}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__control-icon{position:absolute;top:50%;right:10px;transform:translateY(-50%);color:#ccc;font-size:20px}.woocommerce-search.woocommerce-select-control:not(.has-inline-tags) .woocommerce-tag{margin:8px 0 0 6px}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__control{height:auto;font-size:13px;width:100%;padding:3px 36px 3px 2px;border-radius:4px;border:1px solid #757575;box-shadow:0 2px 6px rgba(0,0,0,.05)}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__control.is-active{border-color:#007cba;border-color:var(--wp-admin-theme-color)}.woocommerce-search.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input{margin:0;font-size:13px;min-height:auto}.woocommerce-search.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input[type=number]::-webkit-inner-spin-button,.woocommerce-search.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.woocommerce-search.woocommerce-select-control .components-base-control .components-base-control__label{font-size:13px;color:#72777c;margin:0;width:calc(100% - 36px);top:50%;right:36px}.woocommerce-search.woocommerce-select-control.has-inline-tags .has-tags.components-base-control .components-base-control__label,.woocommerce-search.woocommerce-select-control .is-active.components-base-control .components-base-control__label,.woocommerce-search.woocommerce-select-control .with-value.components-base-control .components-base-control__label{display:none}.woocommerce-search.woocommerce-select-control .components-base-control .woocommerce-select-control__tags{margin:0}.woocommerce-search.woocommerce-select-control .components-base-control .woocommerce-tag{max-height:24px}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__listbox{border:1px solid #ccc;top:38px}.woocommerce-search.woocommerce-select-control.is-static-results .woocommerce-select-control__listbox{position:static}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option{margin-bottom:0;display:flex;flex-direction:row;flex-grow:1;flex-shrink:0;align-items:center;padding:12px;color:#7f54b3;text-align:right;background:#f0f0f0;border-bottom:1px solid #f0f0f0;font-size:13px;min-height:43px}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option:last-of-type{border-bottom:none}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option:hover{box-shadow:none;color:#7f54b3;background:#e0e0e0}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option.is-selected,.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option:active,.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option:focus{color:#7f54b3;background:#fff;box-shadow:inset 0 0 0 1px #e0e0e0,inset 0 0 0 2px #24292d}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option .woocommerce-search__result-thumbnail{margin-left:12px}.woocommerce-search__result-name{text-decoration:underline}.woocommerce-search-list{width:100%;padding:0 0 16px;text-align:right}.woocommerce-search-list__selected{margin:16px 0;padding:16px 0 0;min-height:76px;border-top:1px solid #f0f0f0}.woocommerce-search-list__selected .woocommerce-search-list__selected-header{margin-bottom:8px}.woocommerce-search-list__selected .woocommerce-search-list__selected-header button{margin-right:12px}.woocommerce-search-list__selected .woocommerce-tag__text{max-width:13em}.woocommerce-search-list__selected ul{list-style:none}.woocommerce-search-list__selected ul li{float:right}.woocommerce-search-list__search{margin:16px 0;padding:16px 0 0;border-top:1px solid #f0f0f0}.woocommerce-search-list__search .components-base-control__field{margin-bottom:16px}.woocommerce-search-list__list{border:1px solid #e0e0e0;padding:0;max-height:17em;overflow-x:hidden;overflow-y:auto}.woocommerce-search-list__list li{margin-bottom:0}.woocommerce-search-list__list.is-loading,.woocommerce-search-list__list.is-not-found{padding:12px 0;text-align:center;border:none}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon,.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-text{display:inline-block}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon{margin-left:16px}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon .gridicon{vertical-align:top;margin-top:-1px}.woocommerce-search-list__list .components-spinner{float:none;margin:0 auto}.woocommerce-search-list__list .components-menu-group__label{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.woocommerce-search-list__list>[role=menu]{border:1px solid #f0f0f0;border-bottom:none}.woocommerce-search-list__list .woocommerce-search-list__item{display:flex;align-items:center;margin-bottom:0;padding:12px 16px;background:#fff;border-bottom:1px solid #f0f0f0;color:#757575}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus,.woocommerce-search-list__list .woocommerce-search-list__item:hover{background:#f0f0f0}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus{box-shadow:none}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-input{margin:0 0 0 8px}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-label{display:flex;flex:1}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0+.depth-1{margin-top:-1px}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0){border-bottom:0!important}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0)+.depth-0{border-top:1px solid #f0f0f0}.woocommerce-search-list__list .woocommerce-search-list__item[class*=depth-] .woocommerce-search-list__item-label:before{margin-left:4px;content:"— — — — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0 .woocommerce-search-list__item-label:before{margin-left:0;content:""}.woocommerce-search-list__list .woocommerce-search-list__item.depth-1 .woocommerce-search-list__item-label:before{content:"— "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-2 .woocommerce-search-list__item-label:before{content:"— — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-3 .woocommerce-search-list__item-label:before{content:"— — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-4 .woocommerce-search-list__item-label:before{content:"— — — — "}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-name{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-prefix{display:none;color:#757575}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-label,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-label{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix{display:inline}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix:after{margin-left:4px;content:" ›"}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-name{color:#1e1e1e}.woocommerce-search-list__list .woocommerce-search-list__item.has-count>.components-menu-item__item{width:100%}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-count{flex:0 1 auto;padding:2px 8px;border:1px solid #f0f0f0;border-radius:12px;font-size:.8em;line-height:1.4;color:#757575;background:#fff;white-space:nowrap}.woocommerce-search-list__list li:last-child .woocommerce-search-list__item{border-bottom:none}.woocommerce-search-list.is-compact .woocommerce-search-list__selected{margin:0 0 16px;padding:0;border-top:none;min-height:54px}.woocommerce-search-list.is-compact .woocommerce-search-list__search{margin:0 0 16px;padding:0;border-top:none}.woocommerce-section-header{padding:13px;border-bottom:none;display:flex;justify-content:space-between}@media (max-width:782px){.woocommerce-section-header{margin-right:-16px;margin-left:-16px;margin-bottom:12px;border-right:none;border-left:none;width:auto}}.woocommerce-section-header hr{-ms-grid-row-align:center;align-self:center;flex-grow:1;height:1px;margin:0 10px}@media (max-width:782px){.woocommerce-section-header.has-interval-select{position:relative;padding-bottom:30px}.woocommerce-section-header.has-interval-select .woocommerce-chart__interval-select{position:absolute;right:0;bottom:0;padding-right:6px}}.woocommerce-section-header__actions,.woocommerce-section-header__menu{text-align:left}.woocommerce-section-header__actions{display:flex;flex-grow:1;justify-content:flex-end}.woocommerce-section-header__actions .components-base-control{padding-top:0;min-height:34px}.woocommerce-section-header__actions .components-base-control .components-base-control__field{margin-bottom:0}.woocommerce-section-header__actions .components-base-control .components-base-control__field select{background:transparent}.woocommerce-ellipsis-menu__toggle{padding:0}.woocommerce-section-header__menu{display:flex;flex-direction:column;justify-content:center}.woocommerce-section-header__title{margin:0 0 0 16px;padding:3px 0;font-size:20px;font-size:1.25rem;line-height:2.2;font-weight:400}.woocommerce-segmented-selection{width:100%;color:#757575}.woocommerce-segmented-selection__container{width:100%;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;display:-ms-grid;display:grid;border-top:1px solid #ccc;border-bottom:1px solid #ccc;background-color:#ccc}.woocommerce-segmented-selection__item:nth-child(2n){border-right:1px solid #ccc;border-top:1px solid #ccc}.woocommerce-segmented-selection__item:nth-child(odd){border-top:1px solid #ccc}.woocommerce-segmented-selection__item:nth-child(-n+2){border-top:0}.woocommerce-segmented-selection__label{background-color:#f0f0f0;padding:12px 36px 12px 12px;position:relative;display:block;height:100%}.woocommerce-segmented-selection__label:active,.woocommerce-segmented-selection__label:hover{background-color:#e0e0e0}.woocommerce-segmented-selection__input{opacity:0;position:absolute;right:-9999px}.woocommerce-segmented-selection__input:active+label .woocommerce-segmented-selection__label{background-color:#e0e0e0}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label{background-color:#fff;font-weight:600}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label:before{content:"";width:8px;height:8px;background-color:#007cba;background-color:var(--wp-admin-theme-color);position:absolute;top:50%;transform:translate(20px,-50%)}.woocommerce-segmented-selection__input:focus+label .woocommerce-segmented-selection__label{box-shadow:inset 0 0 0 1px #24292d}.woocommerce-select-control{position:relative}.woocommerce-select-control .components-base-control{height:56px;display:flex;align-items:center;border:1px solid #a7aaad;border-radius:3px;background:#fff;padding:12px;position:relative}.woocommerce-select-control .components-base-control .woocommerce-select-control__tags{margin:12px 0 0 4px}.woocommerce-select-control .components-base-control .woocommerce-tag{max-height:20px}.woocommerce-select-control .components-base-control .components-base-control__field{display:flex;align-items:center;flex:1;margin-bottom:0;max-width:100%}.woocommerce-select-control .components-base-control .components-base-control__label{position:absolute;top:50%;transform:translateY(-50%);color:#646970;font-size:16px}.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input{font-size:16px;border:0;box-shadow:none;color:#2c3338;margin:12px 0 0;padding-right:0;padding-left:0;width:100%;line-height:24px;text-align:right;letter-spacing:inherit;background:transparent}.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input::-webkit-search-cancel-button{display:none}.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input:focus{outline:none}.woocommerce-select-control .components-base-control i{color:#636d75;margin-left:12px;width:24px}.woocommerce-select-control .components-base-control.is-active{box-shadow:0 0 0 1px #006088;border-color:#006088}.woocommerce-select-control .components-base-control.has-tags .components-base-control__label,.woocommerce-select-control .components-base-control.with-value .components-base-control__label{font-size:12px;margin-top:-12px}.woocommerce-select-control .components-base-control.is-disabled{opacity:.5}.woocommerce-select-control .components-base-control.is-disabled .components-base-control__label{cursor:default}.woocommerce-select-control .woocommerce-select-control__autofill-input{position:absolute;z-index:-1}.woocommerce-select-control .woocommerce-select-control__tags{position:relative;margin:12px 0 0}.woocommerce-select-control .woocommerce-select-control__tags.has-clear{padding-left:24px}.woocommerce-select-control .woocommerce-tag{max-height:24px}.woocommerce-select-control .woocommerce-select-control__clear{position:absolute;left:10px;top:calc(50% - 10px)}.woocommerce-select-control .woocommerce-select-control__clear>.dashicon{color:#c9c9c9}.woocommerce-select-control .woocommerce-select-control__listbox{background:#fff;display:flex;flex-direction:column;align-items:stretch;box-shadow:0 3px 5px rgba(0,0,0,.2),0 1px 18px rgba(0,0,0,.12),0 6px 10px rgba(0,0,0,.14);border-radius:3px;position:absolute;right:0;left:0;top:57px;z-index:10;overflow-y:auto;max-height:350px}.woocommerce-select-control .woocommerce-select-control__listbox.is-static{position:static}.woocommerce-select-control .woocommerce-select-control__option{padding:16px;min-height:56px;font-size:16px;text-align:right}.woocommerce-select-control .woocommerce-select-control__option.is-selected,.woocommerce-select-control .woocommerce-select-control__option:hover{background:#f6f7f7}.woocommerce-select-control.is-searchable .components-base-control__label{right:48px}.woocommerce-select-control.is-searchable .components-base-control.is-active .components-base-control__label{font-size:12px;margin-top:-12px}.woocommerce-stepper .woocommerce-stepper__steps{display:flex;justify-content:space-around;margin-bottom:24px}.woocommerce-stepper .woocommerce-stepper__step{padding:8px;font-weight:400;position:relative}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-label-wrapper{display:flex;text-align:right;border:0;background-color:transparent;padding:0}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-label-wrapper:focus{outline:none;box-shadow:none}.woocommerce-stepper .woocommerce-stepper__step button.woocommerce-stepper__step-label-wrapper{cursor:pointer}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-text{width:100%}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-label{color:#1e1e1e;line-height:24px;font-size:16px}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-description{display:none;font-size:14px;color:#757575;font-weight:400;margin-top:2px}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-icon svg{display:none}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner{display:block;margin-left:12px;max-height:24px;min-width:24px;width:24px;border-radius:50%;background:#007cba;background:var(--wp-admin-theme-color)}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner__circle{stroke:#fff}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-icon,.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-icon{background:#007cba;background:var(--wp-admin-theme-color);color:#fff}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-label,.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-label{color:#1e1e1e}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-icon{font-weight:600}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-label{font-weight:600;margin:0}.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-number{display:none}.woocommerce-stepper .woocommerce-stepper__step.is-complete svg{display:inline}.woocommerce-stepper .woocommerce-stepper__step-icon{font-size:16px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-width:24px;margin-left:12px;background:#f0f0f0;color:#757575;border-radius:50%}.woocommerce-stepper .woocommerce-stepper__step-divider{align-self:flex-start;flex-grow:1;border-bottom:1px solid #f0f0f0;margin-top:20px}.woocommerce-stepper .woocommerce-stepper__step-divider:last-child{display:none}@media (max-width:782px){.woocommerce-stepper .woocommerce-stepper__step-label{display:none;padding-top:24px}.woocommerce-stepper .woocommerce-stepper__step-icon{margin-left:0}}.woocommerce-stepper.is-vertical .woocommerce-stepper__steps{align-items:normal;flex-direction:column;margin-bottom:0}.woocommerce-stepper.is-vertical .woocommerce-stepper__step{padding-bottom:36px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:after{content:"";position:absolute;right:20px;top:40px;height:calc(100% - 40px);border-right:1px solid #f0f0f0}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:last-child{padding-bottom:8px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:last-child:after{display:none}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-label{display:initial}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-icon{margin-left:12px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-description{display:block}.woocommerce-stepper.is-vertical .woocommerce-stepper_content{margin-top:16px;margin-right:36px}@-webkit-keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(-270deg)}}@keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(-270deg)}}@-webkit-keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;transform:rotate(-135deg)}to{transform:rotate(-450deg)}}@keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;transform:rotate(-135deg)}to{transform:rotate(-450deg)}}.woocommerce-spinner{-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;width:40px;min-width:40px;height:40px;max-height:40px}.woocommerce-spinner__circle{stroke-dasharray:200;stroke-dashoffset:0;transform-origin:center;-webkit-animation:growAndShrink 2s ease-in-out infinite;animation:growAndShrink 2s ease-in-out infinite;stroke:#1d2327}.woocommerce-summary{margin:16px 0;display:-ms-grid;display:grid;border-color:#e0e0e0;border-style:solid;border-width:1px 1px 0 0;background-color:#f0f0f0;box-shadow:inset 1px -1px 0 #e0e0e0;width:100%}@media (max-width:782px){.woocommerce-summary{border-width:0}.woocommerce-summary.is-placeholder{border-top:0}.woocommerce-summary .woocommerce-summary__item-container.is-placeholder{border-top:1px solid #e0e0e0}}.woocommerce-summary .components-popover:not(.components-tooltip){position:static!important;top:auto!important;right:auto!important;left:auto!important;bottom:auto!important;margin-top:0!important;margin-right:0}.woocommerce-summary .components-popover:not(.components-tooltip) .components-popover__header{display:none}.woocommerce-summary .components-popover:not(.components-tooltip) .components-popover__content{position:static;right:auto;left:auto;margin:0;width:100%;max-width:100%!important;max-height:100%!important;box-shadow:none;border:none;transform:none}.woocommerce-summary .components-popover:not(.components-tooltip) .components-popover__content .woocommerce-summary__item.is-selected{display:none}.components-popover__content .woocommerce-summary{max-height:100%;margin-top:0;margin-bottom:0;overflow-y:auto;border:none}.woocommerce-summary .woocommerce-summary__item-delta,.woocommerce-summary .woocommerce-summary__item-value{flex:1 0 auto}.woocommerce-summary .woocommerce-summary__item-delta{flex:0 1 auto;display:flex}.woocommerce-summary,.woocommerce-summary.has-1-items,.woocommerce-summary.has-one-item{-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-summary.has-2-items{-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(2n) .woocommerce-summary__item{border-left-color:#e0e0e0}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2) .woocommerce-summary__item,.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-3-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-left-color:#e0e0e0}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-4-items,.woocommerce-summary.has-7-items,.woocommerce-summary.has-8-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-left-color:#e0e0e0}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-5-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-left-color:#e0e0e0}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-5-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-5-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label{margin-left:calc(100% - 80px)}@media (min-width:1441px){.woocommerce-summary.has-6-items{-ms-grid-columns:(1fr)[6];grid-template-columns:repeat(6,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n) .woocommerce-summary__item{border-left-color:#e0e0e0}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-6-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-6-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label{margin-left:calc(100% - 80px)}.woocommerce-summary.has-9-items,.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-left-color:#e0e0e0}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-9-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-9-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label{margin-left:calc(100% - 80px)}}@media (max-width:1440px){.woocommerce-summary.has-4-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-4-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label{margin-left:calc(100% - 80px)}.woocommerce-summary.has-6-items,.woocommerce-summary.has-9-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-left-color:#e0e0e0}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-left-color:#e0e0e0}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label{margin-left:calc(100% - 80px)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-left-color:#e0e0e0}}@media (max-width:960px){.woocommerce-summary .woocommerce-summary__item{border-left-color:#e0e0e0}}@media (max-width:782px){.woocommerce-summary .woocommerce-summary__item-container{margin-right:-16px;margin-left:-16px;width:auto}.woocommerce-summary .woocommerce-summary__item-container .woocommerce-summary__item{border-left:none}.woocommerce-summary .components-popover.components-popover{margin-right:-16px;margin-left:-16px}.woocommerce-summary .components-popover.components-popover .woocommerce-summary__item-container{margin-right:0;margin-left:0}}.woocommerce-summary__item-container{margin-bottom:0}.woocommerce-summary__item-container:last-of-type .woocommerce-summary__item{border-bottom-color:#e0e0e0!important}.woocommerce-summary__item-container.is-dropdown-button{padding:0;list-style:none;border-left:1px solid #e0e0e0}.woocommerce-summary__item-container.is-dropdown-button .components-button{border-bottom:1px solid #e0e0e0;text-align:right;display:block}@media (max-width:782px){.woocommerce-summary__item-container.is-dropdown-button{border-left:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item{height:117px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#f0f0f0;color:transparent;display:inline-block;height:20px;margin-top:2.2px;max-width:110px;width:70%}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:none;animation:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-data{justify-content:space-between}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#f0f0f0;color:transparent;display:inline-block;height:28px;width:60px;max-width:60px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:none;animation:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#f0f0f0;color:transparent;width:60px;border-radius:2px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta{-webkit-animation:none;animation:none}}.woocommerce-summary__item{display:flex;flex-direction:column;height:100%;padding:24px;background-color:#f8f9fa;border-bottom:1px solid #e0e0e0;border-left:1px solid #e0e0e0;line-height:1.4em;text-decoration:none;color:#1e1e1e}.woocommerce-summary__item.components-button{height:auto;padding:16px;align-items:normal}.woocommerce-summary__item:hover{background-color:#f0f0f0}.woocommerce-summary__item:hover,.woocommerce-summary__item:hover .woocommerce-summary__item-label{color:#007cba;color:var(--wp-admin-theme-color)}.woocommerce-summary__item:active{background-color:#f0f0f0}.woocommerce-summary__item:focus{box-shadow:inset 1px 1px 0 #757575,inset -1px -1px 0 #757575!important}.woocommerce-summary__item.is-selected:focus{box-shadow:inset 1px -1px 0 #757575,inset -1px 0 0 #757575,inset 0 4px 0 #007cba!important;box-shadow:inset 1px -1px 0 #757575,inset -1px 0 0 #757575,inset 0 4px 0 var(--wp-admin-theme-color)!important}.is-dropdown-button .woocommerce-summary__item{position:relative;width:100%;padding-left:56px}@media (max-width:782px){.is-dropdown-button .woocommerce-summary__item{border-left:none}}.woocommerce-summary__item .woocommerce-summary__item-data{display:flex;justify-content:space-between}.woocommerce-summary__item .woocommerce-summary__item-label{display:block;margin-bottom:16px;color:#757575}.woocommerce-summary__item .woocommerce-summary__item-value{margin-bottom:4px;font-weight:500;color:#1e1e1e}.woocommerce-summary__item .woocommerce-summary__item-delta{padding:5px;border-radius:3px;height:-webkit-min-content;height:-moz-min-content;height:min-content;background-color:#f0f0f0;color:#1e1e1e}.woocommerce-summary__item.is-selected{background:#fff;box-shadow:inset 0 4px 0 #007cba;box-shadow:inset 0 4px 0 var(--wp-admin-theme-color)}.woocommerce-summary__item.is-selected .woocommerce-summary__item-value{font-weight:600}.woocommerce-summary__item.is-selected .woocommerce-summary__item-delta{font-weight:400}.woocommerce-summary__item.is-good-trend .woocommerce-summary__item-delta{background-color:#4ab866;color:#fff}.woocommerce-summary__item.is-bad-trend .woocommerce-summary__item-delta{background-color:#d94f4f;color:#fff}.woocommerce-summary__item .woocommerce-summary__toggle{position:absolute;top:44px;left:16px;transition:transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item .woocommerce-summary__toggle{transition:none}}.is-dropdown-expanded .woocommerce-summary__item .woocommerce-summary__toggle{transform:rotate(180deg)}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-delta,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-label,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-value{margin-bottom:0}.woocommerce-table{margin-bottom:40px}.woocommerce-table .woocommerce-table__actions{display:inline-flex;justify-content:flex-end;align-items:center}.woocommerce-table .woocommerce-table__actions>*{margin-left:16px}.woocommerce-table .woocommerce-table__actions>:last-child{margin-left:0}.woocommerce-table .woocommerce-table__actions>div{width:100%}.woocommerce-table .components-card__footer{flex-direction:column}.woocommerce-table .components-card__footer>*{padding-left:0}.woocommerce-table.is-empty{align-items:center;background:#f0f0f0;color:#757575;display:flex;height:calc(182px + 6.825rem);height:calc(17px + 1.1375rem + (33px + 1.1375rem)*var(--number-of-rows));justify-content:center;padding:16px;text-align:center}.woocommerce-table .woocommerce-pagination{margin-bottom:16px;z-index:1;background:#fff;position:relative}.woocommerce-table .components-card__header{align-items:center;text-align:right;display:-ms-grid;display:grid;width:100%;-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}@media (max-width:960px){.woocommerce-table.has-search .woocommerce-table__actions{grid-gap:12px;-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr;-ms-grid-row:2;grid-row-start:2;-ms-grid-row-span:0;grid-row-end:2;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:3;grid-column-end:4;margin:0}}.woocommerce-table .woocommerce-search .woocommerce-select-control__control{height:38px}.woocommerce-table .woocommerce-compare-button{padding:3px 12px;height:auto}.woocommerce-table .woocommerce-ellipsis-menu{justify-content:flex-end;display:flex}.woocommerce-table__caption{font-size:24px;font-size:1.5rem;text-align:right}.components-card__body{position:relative}.woocommerce-table__table{overflow-x:auto}.woocommerce-table__table:after,.woocommerce-table__table:before{content:"";position:absolute;top:0;width:60px;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:1}.woocommerce-table__table:after{left:0;background:linear-gradient(-90deg,hsla(0,0%,100%,0),#fff)}.woocommerce-table__table:before{right:0;background:linear-gradient(-90deg,#fff,hsla(0,0%,100%,0))}.woocommerce-table__table.is-scrollable-left:before,.woocommerce-table__table.is-scrollable-right:after{opacity:1}.woocommerce-table__table table{border-collapse:collapse;width:100%}.woocommerce-table__table tr:focus-within,.woocommerce-table__table tr:hover{background-color:#e0e0e0}.woocommerce-table__table tr:focus-within td,.woocommerce-table__table tr:focus-within th,.woocommerce-table__table tr:hover td,.woocommerce-table__table tr:hover th{background:transparent}.woocommerce-table__empty-item,.woocommerce-table__header,.woocommerce-table__item{padding:16px 24px}.woocommerce-table__header,.woocommerce-table__item{font-size:13px;font-size:.8125rem;text-align:right;border-bottom:1px solid #e2e4e7}.woocommerce-table__header>a:only-child,.woocommerce-table__item>a:only-child{display:block}.woocommerce-table__header a:focus,.woocommerce-table__header a:hover,.woocommerce-table__item a:focus,.woocommerce-table__item a:hover{color:#533582}.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#f0f0f0;color:transparent;display:inline-block;height:16px;max-width:120px;width:80%}.woocommerce-table__header .is-placeholder:after,.woocommerce-table__item .is-placeholder:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:none;animation:none}}.woocommerce-table__header:not(.is-left-aligned),.woocommerce-table__item:not(.is-left-aligned){text-align:left}.woocommerce-table__header:not(.is-left-aligned) button,.woocommerce-table__item:not(.is-left-aligned) button{justify-content:flex-end}.woocommerce-table__header.is-numeric .is-placeholder,.woocommerce-table__item.is-numeric .is-placeholder{max-width:40px}.woocommerce-table__header .is-negative,.woocommerce-table__item .is-negative{color:#d94f4f;font-weight:700}.woocommerce-table__header.is-sorted,.woocommerce-table__item.is-sorted{background-color:#f0f0f0}.woocommerce-table__header.is-checkbox-column,.woocommerce-table__item.is-checkbox-column{width:33px;max-width:33px;padding-left:0;padding-right:16px}.woocommerce-table__header.is-checkbox-column+th,.woocommerce-table__item.is-checkbox-column+th{border-right:0}.woocommerce-table tr:last-child .woocommerce-table__item{border-bottom:0}.woocommerce-table__empty-item{text-align:center;font-size:18px;font-size:1.125rem;color:#757575;font-weight:700}@media (max-width:782px){.woocommerce-table__empty-item{font-size:13px;font-size:.8125rem}}th.woocommerce-table__item{font-weight:400}.woocommerce-table__header{padding:8px 24px;background-color:#f8f9fa;font-weight:700;white-space:nowrap}.woocommerce-table__header.is-left-aligned.is-sortable{padding-right:16px}.woocommerce-table__header.is-left-aligned.is-sortable svg{display:inline-flex;order:1;margin-right:0}.woocommerce-table__header .components-button.is-button{height:auto;width:100%;padding:8px 0 8px 24px;vertical-align:middle;line-height:1;border:none;background:transparent!important;box-shadow:none!important;align-items:center}.woocommerce-table__header .components-button.is-button:active,.woocommerce-table__header .components-button.is-button:hover{box-shadow:none!important}.woocommerce-table__header.is-sortable{padding:0}.woocommerce-table__header.is-sortable svg{visibility:hidden;margin-right:4px}.woocommerce-table__header.is-sortable .components-button:focus svg,.woocommerce-table__header.is-sortable .components-button:hover svg,.woocommerce-table__header.is-sortable.is-sorted .components-button svg{visibility:visible}.woocommerce-table__summary{text-align:center;margin:0}.woocommerce-table__summary-item{display:inline-block;margin-bottom:0;margin-right:8px;margin-left:8px}.woocommerce-table__summary-item .woocommerce-table__summary-label,.woocommerce-table__summary-item .woocommerce-table__summary-value{display:inline-block}.woocommerce-table__summary-item .woocommerce-table__summary-label{margin-right:4px}.woocommerce-table__summary-item .woocommerce-table__summary-value{font-weight:600}.woocommerce-tag{display:inline-flex;margin:1px 0 1px 4px;overflow:hidden;vertical-align:middle}.woocommerce-tag .woocommerce-tag__remove,.woocommerce-tag .woocommerce-tag__text{display:inline-block;line-height:24px;background:#f0f0f0;transition:all .2s cubic-bezier(.4,1,.4,1)}.woocommerce-tag .woocommerce-tag__text{-ms-grid-row-align:center;align-self:center;padding:0 8px;border-radius:12px;color:#757575;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.woocommerce-tag.has-remove .woocommerce-tag__text{padding:0 8px 0 4px;border-radius:0 12px 12px 0}.woocommerce-tag .woocommerce-tag__remove{cursor:pointer;height:inherit;padding:0 2px;border-radius:12px 0 0 12px;color:#757575;line-height:10px;text-indent:0;height:24px}.woocommerce-tag .woocommerce-tag__remove:hover{color:#1e1e1e}.muriel-input-text{background:#fff;border:1px solid #a7aaad;border-radius:3px;height:56px;box-shadow:none;padding:12px 12px 4px;position:relative;box-shadow:0 2px 6px rgba(0,0,0,.05)}.muriel-input-text:hover{border-color:#787c82}.muriel-input-text label{color:#646970;font-size:14px;line-height:21px}.muriel-input-text label.components-base-control__label{margin:0}.muriel-input-text .components-text-control__input,.muriel-input-text .components-text-control__input[type=color],.muriel-input-text .components-text-control__input[type=date],.muriel-input-text .components-text-control__input[type=datetime-local],.muriel-input-text .components-text-control__input[type=datetime],.muriel-input-text .components-text-control__input[type=email],.muriel-input-text .components-text-control__input[type=month],.muriel-input-text .components-text-control__input[type=number],.muriel-input-text .components-text-control__input[type=password],.muriel-input-text .components-text-control__input[type=tel],.muriel-input-text .components-text-control__input[type=text],.muriel-input-text .components-text-control__input[type=time],.muriel-input-text .components-text-control__input[type=url],.muriel-input-text .components-text-control__input[type=week]{border:0;box-shadow:none;font-size:16px;line-height:21px;margin:0;padding:0;min-height:30px}.muriel-input-text .components-text-control__input:focus,.muriel-input-text .components-text-control__input[type=color]:focus,.muriel-input-text .components-text-control__input[type=date]:focus,.muriel-input-text .components-text-control__input[type=datetime-local]:focus,.muriel-input-text .components-text-control__input[type=datetime]:focus,.muriel-input-text .components-text-control__input[type=email]:focus,.muriel-input-text .components-text-control__input[type=month]:focus,.muriel-input-text .components-text-control__input[type=number]:focus,.muriel-input-text .components-text-control__input[type=password]:focus,.muriel-input-text .components-text-control__input[type=tel]:focus,.muriel-input-text .components-text-control__input[type=text]:focus,.muriel-input-text .components-text-control__input[type=time]:focus,.muriel-input-text .components-text-control__input[type=url]:focus,.muriel-input-text .components-text-control__input[type=week]:focus{box-shadow:none}.muriel-input-text.active{box-shadow:0 0 0 2px #007cba;box-shadow:0 0 0 2px var(--wp-admin-theme-color);border-color:transparent}.muriel-input-text.active input{color:#2c3338}.muriel-input-text.with-value .components-base-control__label{display:block;position:relative;top:-8px;width:100%;font-size:12px}.muriel-input-text.with-value input{color:#2c3338;position:relative;top:-12px}.muriel-input-text.empty label{display:none}.muriel-input-text.empty input{color:#646970}.muriel-input-text.has-error{box-shadow:none}.muriel-input-text.disabled label{display:none}.muriel-input-text.disabled input{color:#a7aaad}.muriel-input-text.disabled input:-ms-input-placeholder{opacity:1}.muriel-input-text.disabled input::-moz-placeholder{color:#a7aaad;opacity:1}.muriel-input-text.disabled input::placeholder{color:#a7aaad;opacity:1}.muriel-input-text.disabled input:-ms-input-placeholder{color:#a7aaad}.muriel-input-text.disabled input::-ms-input-placeholder{color:#a7aaad}.text-control-with-affixes{display:inline-flex;flex-direction:row;width:100%}.text-control-with-affixes input[type=email],.text-control-with-affixes input[type=number],.text-control-with-affixes input[type=password],.text-control-with-affixes input[type=text],.text-control-with-affixes input[type=url]{flex-grow:1;margin:0}.text-control-with-affixes input[type=email]:disabled,.text-control-with-affixes input[type=number]:disabled,.text-control-with-affixes input[type=password]:disabled,.text-control-with-affixes input[type=text]:disabled,.text-control-with-affixes input[type=url]:disabled{border-left-width:0}.text-control-with-affixes input[type=email]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=number]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=password]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=text]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=url]:disabled+.text-control-with-affixes__suffix{border-right:1px solid #f0f0f0}.text-control-with-affixes.text-control-with-prefix input{border-top-right-radius:0;border-bottom-right-radius:0}.text-control-with-affixes.text-control-with-suffix input{border-top-left-radius:0;border-bottom-left-radius:0}.text-control-with-affixes__prefix,.text-control-with-affixes__suffix{position:relative;background:#fff;border:1px solid #757575;color:#757575;padding:7px 14px;white-space:nowrap;flex:1 0 auto;font-size:14px;line-height:1.5}.disabled .text-control-with-affixes__prefix,.disabled .text-control-with-affixes__suffix{background:hsla(0,0%,100%,.5);border-color:hsla(0,0%,87.1%,.75);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}.text-control-with-affixes__prefix{border-left:none;border-radius:0 4px 4px 0}.text-control-with-affixes__prefix+input[type=email]:disabled,.text-control-with-affixes__prefix+input[type=number]:disabled,.text-control-with-affixes__prefix+input[type=password]:disabled,.text-control-with-affixes__prefix+input[type=text]:disabled,.text-control-with-affixes__prefix+input[type=url]:disabled{border-right-color:#f0f0f0}.text-control-with-affixes__suffix{border-right:none;border-radius:4px 0 0 4px}.woocommerce-timeline ul{margin:0;padding-right:0;list-style-type:none}.woocommerce-timeline ul li{margin-bottom:0}.woocommerce-timeline .woocommerce-timeline-group .woocommerce-timeline-group__title{color:#1d2327;font-size:12px;font-weight:600;text-transform:uppercase;margin:0 0 16px;display:inline-block}.woocommerce-timeline .woocommerce-timeline-group hr{float:left;width:calc(100% - 40px);margin-bottom:16px;border:.5px solid #e3dfe2}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__top-border{min-height:16px;border-right:1px solid #c3c4c7;margin:0 12px}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__title{display:flex;align-items:center;flex-direction:row;justify-content:space-between;color:#2c3338}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__title *{font-size:16px}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline{display:flex;align-items:center;flex-direction:row;margin:8px 0}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline *{margin:0}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline>*{padding:0 16px}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline svg{fill:#fff;padding:4px;background:#c3c4c7;border-radius:9999px;box-sizing:content-box;width:16px;height:16px}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline svg.is-success{background:#4ab866}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline svg.is-warning{background:#ffb900}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline svg.is-error{background:#d94f4f}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__timestamp{font-size:14px;line-height:16px}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__body{display:flex;flex-direction:column;color:#50575e;margin:0 12px;padding:8px 36px;border-right:1px solid #c3c4c7}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__body *{margin:0;font-size:14px}.woocommerce-timeline ul :last-child.woocommerce-timeline-group hr:last-child{display:none}.woocommerce-view-more-list{padding-right:4px;margin:0 4px 0 0;vertical-align:middle}.woocommerce-view-more-list__popover{margin:0;padding:16px;text-align:right}.woocommerce-view-more-list__popover__item{display:block;margin:16px 0}.woocommerce-view-more-list__popover__item:first-child{margin-top:0}.woocommerce-view-more-list__popover__item:last-child{margin-bottom:0}.woocommerce-web-preview{width:100%;display:flex;align-items:center;justify-content:center;background:#f6f7f7}.woocommerce-web-preview.is-loading .woocommerce-web-preview__iframe-wrapper{display:none}.woocommerce-web-preview .woocommerce-web-preview__iframe-wrapper{width:100%}.woocommerce-web-preview iframe{width:100%;height:100%;min-height:400px}.woocommerce-badge{background-color:#f0f0f0;border-radius:20px;display:inline-block;text-align:center;font-style:normal;font-weight:600;font-size:14px;line-height:27px;align-items:center;width:32px;height:28px}.woocommerce-component-settings .components-base-control{margin-top:16px;margin-bottom:16px;position:relative}.woocommerce-component-settings .components-base-control.has-error .components-base-control__help{right:0!important}.editor-block-preview__content{overflow:hidden}.components-placeholder__label .gridicon,.components-placeholder__label .material-icon{margin-left:1ch;fill:currentColor}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products{list-style:none;margin:0 -8px 16px;padding:0}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products .wc-block-grid__product{margin:0 0 24px}.editor-styles-wrapper .wc-block-grid.components-placeholder{padding:2em 1em}.editor-styles-wrapper .wc-block-grid.is-loading,.editor-styles-wrapper .wc-block-grid.is-not-found{display:block}.components-base-control+.wc-block-base-control-notice{margin:-16px 0 16px}.components-base-control+.wc-block-base-control-notice:last-child{margin:-16px 0 12px}.woocommerce-search-list__list.woocommerce-search-list__list{box-sizing:border-box;margin:0;padding:0}.woocommerce-search-list__selected.woocommerce-search-list__selected>ul{list-style:none;margin:0;padding:0}.theme-twentytwenty .wp-block .wc-block-active-filters__title,.theme-twentytwenty .wp-block .wc-block-attribute-filter__title,.theme-twentytwenty .wp-block .wc-block-grid__product-title,.theme-twentytwenty .wp-block .wc-block-price-filter__title,.theme-twentytwenty .wp-block .wc-block-stock-filter__title{font-size:1em}.wc-atomic-blocks-product__selection{width:100%}.wc-atomic-blocks-product__edit-card{padding:16px;border-top:1px solid #e0e0e0}.wc-atomic-blocks-product__edit-card .wc-atomic-blocks-product__edit-card-title{margin:0 0 16px}.wc-block-cart__page-notice{margin:0}.wp-block-woocommerce-cart-express-payment-block .components-placeholder__label svg{font-size:1em}.wp-block-woocommerce-cart-express-payment-block .wc-block-cart__payment-options{padding:0}.wp-block-woocommerce-cart-express-payment-block .wc-block-cart__payment-options .wc-block-components-express-payment-continue-rule{margin-bottom:-12px}.wp-block-woocommerce-filled-cart-block .wc-block-components-sidebar-layout{display:block}.wp-block-woocommerce-filled-cart-block .block-editor-block-list__layout{display:flex;flex-flow:row wrap;align-items:flex-start}.wp-block-woocommerce-filled-cart-block .block-editor-block-list__layout>:first-child,.wp-block-woocommerce-filled-cart-block .wc-block-components-main>:first-child,.wp-block-woocommerce-filled-cart-block .wc-block-components-sidebar>:first-child{margin-top:0}.wp-block-woocommerce-filled-cart-block .wp-block-woocommerce-cart-items-block .block-editor-block-list__layout,.wp-block-woocommerce-filled-cart-block .wp-block-woocommerce-cart-totals-block .block-editor-block-list__layout{display:block}.wc-block-checkout__additional_fields{margin:1.5em 0 -1.5em}.wc-block-components-checkout-step__description-placeholder{opacity:.5}.wc-block-components-checkout-step__title{display:flex;width:100%}.wp-block-woocommerce-checkout-express-payment-block{margin:14px 0 28px}.wp-block-woocommerce-checkout-express-payment-block .components-placeholder__label svg{font-size:1em}.wp-block-woocommerce-checkout-express-payment-block .wc-block-components-express-payment-continue-rule--checkout{margin-bottom:0}.wp-block-woocommerce-checkout-express-payment-block.wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods{padding:14px 0;margin:-14px 0 14px!important;position:relative}.wp-block-woocommerce-checkout-express-payment-block-placeholder *{pointer-events:all}.wp-block-woocommerce-checkout-express-payment-block-placeholder .wp-block-woocommerce-checkout-express-payment-block-placeholder__description{display:block;margin:0 0 1em}.wp-block-woocommerce-checkout-order-note-block{margin-top:20px;margin-bottom:20px;padding-top:4px;padding-bottom:4px}.wp-block-woocommerce-checkout-order-note-block .wc-block-checkout__add-note{margin-top:0;margin-bottom:0}.wc-block-checkout__terms{margin:20px 0;padding-top:4px;padding-bottom:4px;display:flex;align-items:flex-start}.wc-block-checkout__terms .block-editor-rich-text__editable{vertical-align:middle;line-height:1.5em}.wc-block-components-checkbox{margin-top:0}.wc-block-checkout__terms_notice .components-notice__action{margin-right:0}.wc-block-checkout__terms_notice-button{display:flex;flex-direction:row;align-items:center}.wc-block-checkout__terms_notice-button .wc-block-checkout__terms_notice-button__icon{margin-right:4px}.wp-block-woocommerce-checkout .wc-block-components-sidebar-layout{display:block}.wp-block-woocommerce-checkout .block-editor-block-list__layout{display:flex;flex-flow:row wrap;align-items:flex-start}.wp-block-woocommerce-checkout .block-editor-block-list__layout .wc-block-checkout__additional_fields{padding:0}.wp-block-woocommerce-checkout .block-editor-block-list__layout>:first-child,.wp-block-woocommerce-checkout .wc-block-components-main>:first-child,.wp-block-woocommerce-checkout .wc-block-components-sidebar>:first-child{margin-top:0}.wp-block-woocommerce-checkout .wp-block-woocommerce-checkout-fields-block .block-editor-block-list__layout,.wp-block-woocommerce-checkout .wp-block-woocommerce-checkout-totals-block .block-editor-block-list__layout{display:block}body.wc-lock-selected-block--move .block-editor-block-mover,body.wc-lock-selected-block--move .block-editor-block-mover__move-button-container,body.wc-lock-selected-block--remove .block-editor-block-settings-menu__popover .components-menu-group:last-child{display:none}body.wc-lock-selected-block--remove .block-editor-block-settings-menu__popover .components-menu-group:nth-last-child(2){margin-bottom:-12px}.wc-block-checkout__controls-text{color:#999;font-style:italic}.components-base-control--nested{padding-right:52px;margin-top:-12px}.wc-block-checkout__page-notice{margin:0}.components-panel__body-title .components-button{opacity:1}.wp-block-woocommerce-checkout.is-editor-preview{max-height:1000px;overflow:hidden}.wc-block-products .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-products .components-placeholder__label svg{fill:currentColor;margin-left:1ch}.wc-block-products .components-placeholder__fieldset{display:block}.wc-block-products .wc-block-products__add-product-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-products .wc-block-products__add-product-button svg{fill:currentColor;margin-right:.5ch;vertical-align:middle}.wc-block-products .wc-block-products__read_more_button{display:block;margin-bottom:1em}.wc-block-all-products .components-placeholder__fieldset{max-width:none;overflow:hidden}.wc-block-all-products .wc-block-all-products-grid-item-template{border-top:1px solid #e0e0e0;margin-top:20px;width:100%;overflow:hidden;text-align:center}.wc-block-all-products .wc-block-all-products-grid-item-template .components-tip{max-width:450px;margin:20px auto;text-align:right}.wc-block-all-products .wc-block-all-products-grid-item-template .components-tip p{margin:1em 0}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions{display:flex;margin:20px auto;padding:1em 0 0;align-items:center;vertical-align:middle;max-width:450px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__done-button{margin:0;order:3;line-height:32px;height:auto}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__cancel-button{margin:0 auto 0 1em;order:2}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__reset-button{margin:0;order:1}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__products{margin:0 auto!important;text-align:center;position:relative;max-width:450px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product{padding:1px 20px;margin:0 auto;background:#fff;box-shadow:0 5px 7px -2px rgba(0,0,0,.2);position:static}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product .wp-block-button__link{margin-top:0}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:after,.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:before{content:"";background:#e0e0e0;display:block;position:absolute;width:100%;top:20px;bottom:20px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:before{left:100%;margin-left:30px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:after{right:100%;margin-right:30px}.components-base-control+.wc-block-reviews-by-product__notice{margin:-16px 0 16px}.components-base-control:nth-last-child(2)+.wc-block-reviews-by-product__notice{margin:-16px 0 12px}.wc-block-single-product__selection{width:100%}.wc-block-single-product__reset-layout{padding:0}.wc-block-single-product__reset-layout svg{margin-left:4px}.wc-block-single-product__edit-card{padding:16px;border-top:1px solid #e0e0e0}.wc-block-single-product__edit-card .wc-block-single-product__edit-card-title{margin:0 0 16px}.wc-block-editor-components-title{background-color:transparent}.wc-block-welcome-guide{width:312px}.wc-block-welcome-guide.components-modal__frame.components-guide{height:auto}.wc-block-welcome-guide__image{background:#00a0d2;margin:0 0 16px}.wc-block-welcome-guide__heading{font-size:24px;line-height:1.4;margin:16px 0;padding:0 24px}.wc-block-welcome-guide__text{font-size:13px;line-height:1.4;margin:0 0 24px;padding:0 24px}.wc-block-welcome-guide__inserter-icon{margin:0 4px;vertical-align:text-top}.wc-block-error-message{margin-bottom:16px;margin-top:8px}.wc-block-api-error .components-placeholder__fieldset{display:block}.wc-block-api-error .wc-block-error-message{margin-top:0}.wc-block-api-error .components-spinner{float:none}.wc-block-editor-components-external-link-card{display:flex;flex-direction:row;text-decoration:none;margin:24px 0;color:inherit;align-items:flex-start}.wc-block-editor-components-external-link-card+.wc-block-editor-components-external-link-card{margin-top:-8px}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__content{flex:1 1 0;padding-left:16px}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__title{font-weight:500;display:block}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__description{color:#757575;display:block;font-size:.875em;margin-top:.5em}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__icon{flex:0 0 24px;margin:0;text-align:left;color:inherit;vertical-align:top}.wc-block-feedback-prompt{background-color:#f7f7f7;border-top:1px solid #e0e0e0;margin:0 -16px;padding:24px;text-align:center}.wc-block-feedback-prompt .wc-block-feedback-prompt__title{margin:0 0 12px}.wc-block-feedback-prompt .wc-block-feedback-prompt__link{color:inherit}.wc-block-feedback-prompt .wc-block-feedback-prompt__link>.gridicon{vertical-align:text-bottom}.woocommerce-product-attributes__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-attributes__operator .components-base-control__label{margin-bottom:0;margin-left:.5em}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:active,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:focus,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:hover{background:#fff}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading{justify-content:center}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0:after{margin-right:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:0;background-size:contain}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0.is-selected:after{background-image:url('data:image/svg+xml;utf8,')}.woocommerce-search-list__item.woocommerce-product-attributes__item[disabled].depth-0:after{margin-right:0;width:auto;background:none}.woocommerce-product-categories__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-categories__operator .components-base-control__label{margin-bottom:0;margin-left:.5em}.woocommerce-search-product__item .woocommerce-search-list__item-name .description{display:block}.woocommerce-search-product__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-product__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-product__item.is-not-active:active,.woocommerce-search-product__item.is-not-active:focus,.woocommerce-search-product__item.is-not-active:hover{background:#fff}.woocommerce-search-product__item.is-loading{justify-content:center}.woocommerce-search-product__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-product__item.depth-0.is-variable:after{margin-right:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:0;background-size:contain}.woocommerce-search-product__item.depth-0.is-variable.is-selected:after{background-image:url('data:image/svg+xml;utf8,')}.woocommerce-product-tags__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-tags__operator .components-base-control__label{margin-bottom:0;margin-left:.5em}.wc-block-text-toolbar-button{align-items:center}.wc-block-text-toolbar-button.is-toggled,.wc-block-text-toolbar-button.is-toggled:focus{background:#757575;color:#fff}.block-editor-block-toolbar__slot{flex-shrink:0}.components-toggle-button-control .components-base-control__field{flex-wrap:wrap}.components-toggle-button-control .components-toggle-button-control__label{width:100%;margin-bottom:8px;display:block}.components-toggle-button-control .components-base-control__help{margin-top:0}.wc-block-view-switch-control{text-align:right;background:#f0f2f3;box-shadow:0 0 0 13px #f0f2f3;margin:0 0 27px;visibility:hidden;color:#757575}.has-child-selected .wc-block-view-switch-control,.is-selected .wc-block-view-switch-control{visibility:visible}.wc-block-handpicked-products__selection,.wc-block-products-category__selection,.wc-block-reviews__selection{width:100%}.wc-block-products-category__cancel-button.is-tertiary{margin:1em auto 0}.wc-block-product-categories.wc-block-product-categories ul{margin-right:20px}.wc-block-product-categories .components-placeholder__label svg,.wc-block-product-on-sale .components-placeholder__label svg{margin-left:1ch;fill:currentColor}.wc-block-products-by-attribute__selection{width:100%}.wc-block-featured-product .components-resizable-box__handle{z-index:10}.wc-block-featured-product__message{margin-bottom:16px}.wc-block-featured-product__selection{width:100%}.wc-block-product-search__field.input-control{color:#828b96!important;padding:0}.wc-block-product-search__field.input-control .components-base-control__field{margin-bottom:0}.wc-block-product-search .wc-block-product-search__fields .block-editor-rich-text{flex-grow:1}.wc-block-product-tag__selection{width:100%}.wc-block-product-tag__cancel-button.is-tertiary{margin:1em auto 0}.wc-block-featured-category .components-resizable-box__handle{z-index:10}.wc-block-featured-category .components-placeholder__label svg{fill:currentColor;margin-left:1ch}.wc-block-featured-category__selection{width:100%}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-webkit-slider-thumb{pointer-events:none}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-moz-range-thumb{pointer-events:none}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-ms-thumb{pointer-events:none}.wc-block-price-slider .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-price-slider .components-placeholder__label svg{fill:currentColor;margin-left:1ch}.wc-block-price-slider .components-placeholder__fieldset{display:block}.wc-block-price-slider .wc-block-price-slider__add-product-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-price-slider .wc-block-price-slider__add-product-button svg{fill:currentColor;margin-right:.5ch;vertical-align:middle}.wc-block-price-slider .wc-block-price-slider__read_more_button{display:block;margin-bottom:1em}.wc-block-attribute-filter .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-attribute-filter .components-placeholder__label svg{fill:currentColor;margin-left:1ch}.wc-block-attribute-filter .components-placeholder__fieldset{display:block}.wc-block-attribute-filter .woocommerce-search-list__search{border-top:0;margin-top:0;padding-top:0}.wc-block-attribute-filter .wc-block-attribute-filter__add-attribute-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-attribute-filter .wc-block-attribute-filter__add-attribute-button svg{fill:currentColor;margin-right:.5ch;vertical-align:middle}.wc-block-attribute-filter .wc-block-attribute-filter__read_more_button{display:block;margin-bottom:1em}.wc-block-stock-filter .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-stock-filter .components-placeholder__label svg{fill:currentColor;margin-left:1ch}.wc-block-stock-filter .components-placeholder__fieldset{display:block}.wc-block-stock-filter .woocommerce-search-list__search{border-top:0;margin-top:0;padding-top:0}.wc-block-stock-filter .wc-block-stock-filter__add-stock-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-stock-filter .wc-block-stock-filter__add-stock-button svg{fill:currentColor;margin-right:.5ch;vertical-align:middle}.wc-block-stock-filter .wc-block-stock-filter__read_more_button{display:block;margin-bottom:1em}@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wp-block-woocommerce-legacy-template__placeholder-copy{max-width:900px;margin-bottom:30px}.wp-block-woocommerce-legacy-template__placeholder-wireframe{width:100%;height:250px;background:#e5e5e5}@media only screen and (min-width:768px){.wp-block-woocommerce-legacy-template__placeholder-wireframe{height:auto;background:transparent}}.wp-block-woocommerce-legacy-template__placeholder .wp-block-woocommerce-legacy-template__placeholder-image{display:none;width:100%;height:auto}@media only screen and (min-width:768px){.wp-block-woocommerce-legacy-template__placeholder .wp-block-woocommerce-legacy-template__placeholder-image{display:block}} \ No newline at end of file diff --git a/build/wc-blocks-editor-style.css b/build/wc-blocks-editor-style.css new file mode 100644 index 00000000000..112c707dbc9 --- /dev/null +++ b/build/wc-blocks-editor-style.css @@ -0,0 +1,2 @@ +@charset "UTF-8";:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-calendar{width:100%;background-color:#f0f0f0;border-top:1px solid #ccc;height:396px}.woocommerce-calendar.is-mobile{height:100%}.woocommerce-calendar__react-dates{width:100%;overflow-x:hidden}.woocommerce-calendar__react-dates .DayPicker{margin:0 auto}.woocommerce-calendar__react-dates .CalendarMonth_table{margin-top:10px}.woocommerce-calendar__react-dates .CalendarDay__selected_span{background:#007cba;background:var(--wp-admin-theme-color);border:1px solid #ccc}.woocommerce-calendar__react-dates .CalendarDay__selected_span:hover{background:#006ba1;background:var(--wp-admin-theme-color-darker-10);border:1px solid #f0f0f0}.woocommerce-calendar__react-dates .CalendarDay__selected{background:#005a87;background:var(--wp-admin-theme-color-darker-20);border:1px solid #ccc}.woocommerce-calendar__react-dates .CalendarDay__hovered_span,.woocommerce-calendar__react-dates .CalendarDay__selected:hover{background:#006ba1;background:var(--wp-admin-theme-color-darker-10);border:1px solid #f0f0f0}.woocommerce-calendar__react-dates .CalendarDay__hovered_span{color:#fff}.woocommerce-calendar__react-dates .CalendarDay__hovered_span:hover{color:#fff;background:#007cba;background:var(--wp-admin-theme-color)}.woocommerce-calendar__react-dates .CalendarDay__blocked_out_of_range{color:#ccc}.woocommerce-calendar__react-dates .CalendarMonth,.woocommerce-calendar__react-dates .CalendarMonthGrid,.woocommerce-calendar__react-dates .DayPicker,.woocommerce-calendar__react-dates .DayPicker_transitionContainer{background-color:#f0f0f0}.woocommerce-calendar__react-dates .DayPicker_weekHeader_li{color:#757575}.woocommerce-calendar__react-dates .DayPickerNavigation_button:focus{outline:2px solid #bfe7f3}.woocommerce-calendar__react-dates.is-core-datepicker .components-datetime__date{padding-left:0}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__default{background-color:transparent}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__selected{background:#533582;border:none}.woocommerce-calendar__inputs{padding:1em;width:100%;max-width:500px;display:-ms-grid;display:grid;-ms-grid-columns:43% 14% 43%;grid-template-columns:43% 14% 43%;margin:0 auto}.woocommerce-calendar__inputs .components-base-control{margin:0}.woocommerce-calendar__inputs-to{display:flex;align-items:center;justify-content:center;-ms-grid-column:2;grid-column-start:2}.woocommerce-calendar__input{position:relative}.woocommerce-calendar__input .dashicons-calendar{position:absolute;top:50%;transform:translateY(-50%);left:10px}.woocommerce-calendar__input .dashicons-calendar path{fill:#757575}.woocommerce-calendar__input:first-child{-ms-grid-column:1;grid-column-start:1}.woocommerce-calendar__input:last-child{-ms-grid-column:3;grid-column-start:3}.woocommerce-calendar__input.is-empty .dashicons-calendar path{fill:#757575}.woocommerce-calendar__input.is-error .dashicons-calendar path{fill:#d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text{border:1px solid #d94f4f;box-shadow:inset 0 0 8px #d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text:focus{box-shadow:inset 0 0 8px #d94f4f,0 0 6px rgba(30,140,190,.8)}.woocommerce-calendar__input .woocommerce-calendar__input-text{color:#757575;border-radius:3px;padding:10px 10px 10px 30px;width:100%;font-size:13px;font-size:.8125rem}.woocommerce-calendar__input .woocommerce-calendar__input-text:-ms-input-placeholder{color:#757575}.woocommerce-calendar__input .woocommerce-calendar__input-text::-moz-placeholder{color:#757575}.woocommerce-calendar__input .woocommerce-calendar__input-text::placeholder{color:#757575}.woocommerce-filters-date__content.is-mobile .woocommerce-calendar__input-error .components-popover__content{height:auto}.woocommerce-calendar__input-error{display:none}.is-error .woocommerce-calendar__input-text:focus+span .woocommerce-calendar__input-error{display:block;left:50%!important;position:absolute;top:auto!important}.woocommerce-calendar__input-error .components-popover__content{background-color:#757575;color:#fff;padding:.5em;border:none}.woocommerce-calendar__input-error.components-popover .components-popover__content{min-width:100px;width:100px;text-align:center}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-bottom:before{border-bottom-color:#757575;z-index:1;top:-6px}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-top:after{border-top-color:#757575;z-index:1;top:0}.woocommerce-calendar__date-picker-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#757575;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-card{margin-bottom:24px;background:#fff;border-radius:3px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow .2s cubic-bezier(.4,1,.4,1)}@media (max-width:782px){.woocommerce-card{margin-bottom:12px;width:auto}}.woocommerce-card.is-inactive{background-color:#f6f7f7;box-shadow:none}.woocommerce-card__header{padding:16px;display:-ms-grid;display:grid;align-items:center;border-top-left-radius:3px;border-top-left-radius:4px}.has-action .woocommerce-card__header{-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr}.has-menu .woocommerce-card__header{-ms-grid-columns:auto 24px;grid-template-columns:auto 24px}.has-menu.has-action .woocommerce-card__header{grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-card__header-item{-ms-grid-row-align:center}.woocommerce-card__header-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__action,.woocommerce-card__menu{text-align:right}.woocommerce-card__body{padding:16px}.woocommerce-card__title{margin:0;font-size:24px;font-size:1.5rem;line-height:1.2;font-weight:400}.woocommerce-card__description{font-size:16px;font-size:1rem;line-height:1.5;color:#646970;margin-top:12px;margin-bottom:0;font-weight:400}.woocommerce-chart{margin-top:-16px;margin-bottom:24px;background:#fff;border:1px solid #e2e4e7;border-top:0}@media (max-width:782px){.woocommerce-chart{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-chart .woocommerce-chart__header{min-height:50px;border-bottom:1px solid #e2e4e7;display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;width:100%}.woocommerce-chart .woocommerce-chart__header .woocommerce-chart__title{height:18px;color:#24292d;font-size:15px;font-weight:600;line-height:18px;margin-left:16px;margin-right:16px}.woocommerce-chart .woocommerce-chart__body{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;width:100%}.woocommerce-chart .woocommerce-chart__body.woocommerce-chart__body-column{flex-direction:column}.woocommerce-chart .woocommerce-chart__footer{width:100%}.woocommerce-chart-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#f0f0f0;color:transparent;padding:0;width:100%;display:flex;align-items:center;justify-content:center}.woocommerce-chart-placeholder:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-chart-placeholder{-webkit-animation:none;animation:none}}.woocommerce-chart-placeholder .components-spinner{margin:0}.woocommerce-chart__interval-select{align-items:start;border-right:1px solid #e2e4e7;display:flex;flex-direction:column;justify-content:center;margin:0 0 0 auto;min-height:50px;padding:8px 16px 0}@media (max-width:960px){.woocommerce-chart__interval-select{width:100%;order:1;margin-top:-8px;margin-left:0;padding-left:8px;border-right:0;min-height:0}}#wpbody .woocommerce-chart__interval-select .components-select-control__input{font-size:13px;font-size:.8125rem;border:0;box-shadow:none}#wpbody .woocommerce-chart__interval-select .components-select-control__input:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff;color:#1e1e1e;box-shadow:inset 0 0 0 1px #757575,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-chart__types{padding:0 8px;white-space:nowrap}.woocommerce-chart__type-button{background:transparent!important}.woocommerce-chart__type-button.components-button{color:#e2e4e7;display:inline-flex;padding:8px}.woocommerce-chart__type-button.components-button.woocommerce-chart__type-button-selected{color:#757575}@media (max-width:960px){.woocommerce-summary+.woocommerce-chart .woocommerce-chart__title{display:none}.woocommerce-summary+.woocommerce-chart .woocommerce-chart__interval-select{width:auto;order:0;margin-top:0}}.woocommerce-legend.has-total{padding-bottom:50px;position:relative}.woocommerce-legend.woocommerce-legend__direction-column{border-right:1px solid #ccc;min-width:320px}.woocommerce-chart__footer .woocommerce-legend.woocommerce-legend__direction-column{border-right:none}.woocommerce-legend__list{color:#24292d;display:flex;height:100%;margin:0}.woocommerce-legend__direction-column .woocommerce-legend__list{flex-direction:column;height:300px;overflow:auto}.woocommerce-chart__footer .woocommerce-legend__direction-column .woocommerce-legend__list{border-top:1px solid #ccc;height:100%;max-height:none;min-height:none}.has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:250px}.woocommerce-chart__footer .has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:auto;max-height:220px;min-height:none}.woocommerce-legend__direction-row .woocommerce-legend__list{flex-direction:row}.woocommerce-legend__item>button{display:flex;justify-content:center;align-items:center;background-color:#fff;color:#757575;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%;border:none;padding:0}.woocommerce-legend__item>button .woocommerce-legend__item-container{display:flex;flex-direction:row;flex-wrap:nowrap;position:relative;padding:3px 0 3px 24px;font-size:13px;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;width:100%}.woocommerce-legend__item>button .woocommerce-legend__item-container:hover input~.woocommerce-legend__item-checkmark{background-color:#e0e0e0}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{border:1px solid #ccc;position:absolute;top:4px;left:0;height:16px;width:16px;background-color:#fff}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark:after{content:"";position:absolute;display:none}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked{background-color:currentColor;border-color:currentColor}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked:after{display:block;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg) + /*!rtl:ignore*/}.rtl .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked:after{transform:rotate(45deg) scaleX(-1)}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-total{margin-left:auto;font-weight:700}.woocommerce-legend__item>button:focus{outline:none}.woocommerce-legend__item>button:focus .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{outline:2px solid #ccc}.woocommerce-legend__item>button:hover{background-color:#f0f0f0}.woocommerce-legend__direction-column .woocommerce-legend__item{margin:0;padding:0}.woocommerce-legend__direction-column .woocommerce-legend__item>button{min-height:36px;padding:0 17px;text-align:left}.woocommerce-legend__direction-column .woocommerce-legend__item:first-child{margin-top:12px}.woocommerce-legend__direction-column .woocommerce-legend__item:last-child:after{content:"";display:block;height:12px;width:100%}.woocommerce-legend__direction-row .woocommerce-legend__item{padding:0;margin:0}.woocommerce-legend__direction-row .woocommerce-legend__item>button{padding:0 17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container{height:50px;align-items:center}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{top:17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-title{margin-right:17px}.woocommerce-legend__total{align-items:center;background:#fff;border-top:1px solid #ccc;bottom:0;color:#757575;display:flex;height:50px;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase}.woocommerce-legend__total:before{background:linear-gradient(180deg,transparent,rgba(0,0,0,.2));bottom:100%;content:"";height:20px;left:0;opacity:0;pointer-events:none;position:absolute;right:0;transition:opacity .3s}.is-scrollable .woocommerce-legend__total:before{opacity:1}.woocommerce-chart__body-row .d3-chart__container{width:calc(100% - 320px)}.d3-chart__container{position:relative;width:100%}.d3-chart__container svg{overflow:visible}.d3-chart__container .d3-chart__empty-message{align-items:center;bottom:0;color:#757575;display:flex;font-size:18px;font-size:1.125rem;font-weight:700;justify-content:center;left:0;line-height:1.5;margin:0 auto;max-width:50%;padding-bottom:48px;pointer-events:none;position:absolute;right:0;top:0;text-align:center}@media (max-width:782px){.d3-chart__container .d3-chart__empty-message{font-size:13px;font-size:.8125rem}}.d3-chart__container .d3-chart__tooltip{border:1px solid #ccc;position:absolute;display:flex;min-width:324px;height:auto;background-color:#fff;text-align:left;padding:17px;box-shadow:0 3px 20px 0 rgba(18,24,30,.1),0 1px 3px 0 rgba(18,24,30,.1);flex-direction:column;flex-wrap:nowrap;justify-content:flex-start;pointer-events:none;visibility:hidden;z-index:1}@media (max-width:600px){.d3-chart__container .d3-chart__tooltip{min-width:auto;width:calc(100% - 48px)}}.d3-chart__container .d3-chart__tooltip h4{text-align:left;line-height:18px;width:100%;text-transform:uppercase;font-size:11px;color:#757575;margin-top:0}.d3-chart__container .d3-chart__tooltip ul{list-style:none;margin-bottom:2px;margin-top:2px;font-size:14px}.d3-chart__container .d3-chart__tooltip ul li{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center}.d3-chart__container .d3-chart__tooltip ul li.key-row{display:flex;flex-direction:row;justify-content:space-between;width:100%}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container{width:100%;min-width:100px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-color{display:inline-block;width:16px;height:16px;margin-right:8px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-key{margin-right:6px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-value{font-weight:600}.d3-chart__container .bargrouprect{shape-rendering:crispEdges}.d3-chart__container .grid .tick line{stroke:#f0f0f0;stroke-width:1;shape-rendering:crispEdges}.d3-chart__container .grid .tick:first-child line{stroke:#757575}.d3-chart__container .grid.with-positive-ticks .tick:last-child line{opacity:0}.d3-chart__container .tick{padding-top:10px;stroke-width:1}.d3-chart__container .y-axis{text-anchor:start}.d3-chart__container .y-axis.ticktext{fill:#757575}.d3-chart__container .axis-month .tick text,.d3-chart__container .y-axis .tick text{font-size:10px}.d3-chart__container .focus-grid line{stroke:rgba(0,0,0,.1);stroke-width:1px}.d3-chart__container .barfocus{fill:rgba(0,0,0,.1)}.d3-base{background:transparent;overflow-x:auto;overflow-y:hidden;position:relative;width:100%;height:100%}.woocommerce-count{border:1px solid;border-radius:10px;padding:0 8px;font-weight:700}.woocommerce-page .woocommerce-dropdown-button{background-color:#fff;position:relative;border:1px solid #757575;color:#1e1e1e;border-radius:4px;padding:0 40px 0 0;width:100%;height:auto}.woocommerce-page .woocommerce-dropdown-button:after{content:"";background:#1e1e1e;-webkit-mask:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20%2F%3E%3C%2Fsvg%3E) no-repeat right 0 top 55%;mask:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20%2F%3E%3C%2Fsvg%3E) no-repeat right 0 top 55%;position:absolute;right:14px;width:32px;height:48px}.woocommerce-page .woocommerce-dropdown-button.is-open:after{transform:translateX(12px) translateY(2px) rotate(180deg)}.woocommerce-page .woocommerce-dropdown-button.is-open,.woocommerce-page .woocommerce-dropdown-button:active,.woocommerce-page .woocommerce-dropdown-button:hover{color:#007cba;color:var(--wp-admin-theme-color)}.woocommerce-page .woocommerce-dropdown-button.is-open:after,.woocommerce-page .woocommerce-dropdown-button:active:after,.woocommerce-page .woocommerce-dropdown-button:hover:after{background:#007cba;background:var(--wp-admin-theme-color)}.woocommerce-page .woocommerce-dropdown-button.is-multi-line .woocommerce-dropdown-button__labels{flex-direction:column}.woocommerce-page .woocommerce-dropdown-button:not(:focus):not(.is-open){border-color:#757575}.woocommerce-dropdown-button__labels{text-align:left;padding:8px 12px;min-height:48px;display:flex;align-items:center;width:100%;justify-content:space-around}@media (max-width:400px){.woocommerce-dropdown-button__labels{min-height:46px}}.woocommerce-dropdown-button__labels span{width:100%;text-align:left}.woocommerce-dropdown-button__labels span:last-child{font-size:12px;font-size:.75rem;margin:0}.woocommerce-dropdown-button__labels span:first-child{font-size:13px;font-size:.8125rem;font-weight:600}@media (max-width:400px){.woocommerce-dropdown-button__labels span:last-child{font-size:10px;font-size:.625rem}.woocommerce-dropdown-button__labels span:first-child{font-size:12px;font-size:.75rem}}.woocommerce-ellipsis-menu{text-align:center}.woocommerce-ellipsis-menu__toggle{justify-content:center;vertical-align:middle;width:24px}.woocommerce-ellipsis-menu__toggle .dashicon{transform:rotate(90deg)}.woocommerce-ellipsis-menu__popover{text-align:left}.woocommerce-ellipsis-menu__popover:not(.is-mobile):after,.woocommerce-ellipsis-menu__popover:not(.is-mobile):before{margin-left:-16px}.woocommerce-ellipsis-menu__popover .components-popover__content{width:182px;padding:2px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__content{width:100%}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{padding:4px 12px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item{cursor:pointer;color:#757575}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item:focus{box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item .components-form-toggle{margin-right:8px}.woocommerce-ellipsis-menu__popover .components-base-control__label,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{color:#1e1e1e;padding-top:8px;padding-bottom:8px;font-size:15px;font-size:.9375rem;margin-bottom:4px}.woocommerce-ellipsis-menu__popover .components-toggle-control .components-base-control__field{margin:4px 0}.woocommerce-ellipsis-menu__popover .components-base-control{margin:0}.woocommerce-empty-content{margin-bottom:16px;text-align:center}.woocommerce-empty-content .woocommerce-empty-content__illustration{max-width:100%}.woocommerce-empty-content .woocommerce-empty-content__actions .components-button+.components-button{margin-left:16px}.woocommerce-filters-advanced{margin:24px 0}.woocommerce-filters-advanced .components-card__body{background-color:#f0f0f0}.woocommerce-filters-advanced .components-card__body.is-size-small:hover,.woocommerce-filters-advanced .components-card__body ul li:hover{background-color:#e0e0e0}.woocommerce-filters-advanced .components-select-control__input{height:38px;padding:0 0 0 8px;margin:0}.woocommerce-filters-advanced .components-card__header .components-base-control__field{margin-bottom:0}@media (max-width:782px){.woocommerce-filters-advanced{margin:16px 0;border:1px solid #ccc}}@media (max-width:400px){.woocommerce-filters-advanced{margin:12px 0}}.woocommerce-filters-advanced__title-select{width:70px;display:inline-block;margin:0 8px}.woocommerce-filters-advanced__list{margin:0}.woocommerce-filters-advanced__list-item{padding:0 16px 0 0;margin:0;display:-ms-grid;display:grid;-ms-grid-columns:1fr 40px;grid-template-columns:1fr 40px;border-bottom:1px solid #ccc}.woocommerce-filters-advanced__list-item:hover{background-color:#e0e0e0}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item fieldset{padding:8px 8px 8px 16px}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{width:40px;height:38px;-ms-grid-row-align:center;align-self:center;color:#757575;padding:8px}@media (max-width:400px){.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{position:absolute;top:0;right:4px}}.woocommerce-filters-advanced__list-item .components-form-token-field{border-radius:4px}@media (max-width:400px){.woocommerce-filters-advanced__list-item{display:block;position:relative;padding:8px 8px 0 0}}.woocommerce-filters-advanced__add-filter{margin:0;display:block}.woocommerce-filters-advanced__add-filter div div{display:inline-block}.woocommerce-filters-advanced__add-filter .components-popover:not(.is-mobile) .components-popover__content{min-width:180px}.woocommerce-filters-advanced__add-filter .components-popover__content>div{width:100%}.woocommerce-filters-advanced__fieldset{display:flex;align-items:center}.woocommerce-filters-advanced__fieldset>div{padding:0 4px}@media (max-width:782px){.woocommerce-filters-advanced__fieldset>div{width:100%;padding:4px 0}}@media (max-width:782px){.woocommerce-filters-advanced__fieldset{display:block}}.woocommerce-filters-advanced__fieldset.is-english{display:-ms-grid;display:grid;-ms-grid-columns:100px 150px 1fr;grid-template-columns:100px 150px 1fr}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{display:flex;align-items:center}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item .components-base-control__field{margin-bottom:0}@media (max-width:782px){.woocommerce-filters-advanced__fieldset.is-english{display:block}}.woocommerce-filters-advanced__rule{width:150px}.woocommerce-filters-advanced__input{width:100%}.woocommerce-filters-advanced__input.woocommerce-search.woocommerce-select-control .woocommerce-select-control__control{height:38px}.woocommerce-filters-advanced__add-filter-dropdown{display:inline-block}.woocommerce-filters-advanced__add-button{align-items:center;color:#757575;padding:8px}.woocommerce-filters-advanced__add-button svg{fill:currentColor;margin:0 6px 0 0}.woocommerce-filters-advanced__controls .components-button{margin-right:16px}.woocommerce-filters-advanced__add-dropdown{padding:8px 0}.woocommerce-filters-advanced__add-dropdown li{margin:0}.woocommerce-filters-advanced__add-dropdown .components-button{width:100%;padding:8px}.woocommerce-filters-advanced__add-dropdown .components-button:hover{background-color:#e0e0e0}.woocommerce-filters-advanced__add-dropdown .components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#f0f0f0;box-shadow:none}.woocommerce-filters-advanced__input-range{align-items:center;display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-filters-advanced__input-range.is-between{-ms-grid-columns:1fr 36px 1fr;grid-template-columns:1fr 36px 1fr}.woocommerce-filters-advanced__input-range input{height:38px;margin:0}.woocommerce-filters-advanced__input-range .separator{text-align:center}.woocommerce-filters-advanced__attribute-fieldset{align-items:center;display:-ms-grid;display:grid;-ms-grid-columns:1fr 20px 1fr;grid-template-columns:1fr 20px 1fr}.woocommerce-filters-advanced__attribute-fieldset .woocommerce-filters-advanced__attribute-field-separator{padding:0 6px}.woocommerce-filters-date__content.is-mobile .components-popover__header{border:none;height:0}.woocommerce-filters-date__content.is-mobile .components-popover__close{transform:translateY(22px)}.woocommerce-filters-date__content.is-mobile .components-tab-panel__tab-content{height:calc(100% - 46px);overflow:auto}.woocommerce-filters-date__content.components-dropdown__content .components-popover__content>div{padding:0}.woocommerce-filters-date__tabs{height:calc(100% - 42px);border-top:1px solid #ccc}.woocommerce-filters-date__tabs .components-tab-panel__tabs{display:flex;justify-content:space-between}.woocommerce-filters-date__tabs .components-tab-panel__tabs .components-button{display:block;text-align:center;width:50%}.woocommerce-filters-date__tabs .components-tab-panel__tab-content{display:flex;flex-direction:column;align-items:center}.woocommerce-filters-date__tabs:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-date__tabs:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-date__text{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#757575;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-filters-date__content-controls{display:flex;flex-direction:column;width:100%;align-items:center;padding-bottom:1em;background-color:#fff}.woocommerce-filters-date__content-controls.is-custom{border-top:1px solid #ccc}.woocommerce-filters-date__button-group{padding-top:1em;display:flex;justify-content:center;width:100%}.woocommerce-filters-date__button-group .woocommerce-filters-date__button{justify-content:center;width:40%;height:34px;margin:0 12px}.woocommerce-filters-filter__content.is-mobile .components-popover__header-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#757575}.woocommerce-filters-filter__content.is-mobile .woocommerce-filters-filter__content-list-item:last-child{border-bottom:1px solid #ccc}.woocommerce-filters-filter__content-list{margin:0;width:100%;min-width:100%}.woocommerce-filters-filter__content-list-item{border:1px solid transparent;border-bottom-color:#ccc;margin:0}.woocommerce-filters-filter__content-list-item:last-child{border-bottom:1px solid transparent}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button,.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button:before{content:"";width:8px;height:8px;background-color:#7f54b3;position:absolute;top:50%;left:1em;transform:translate(50%,-50%)}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button{position:relative;align-items:center;display:flex;width:100%;padding:1em 1em 1em 3em;background-color:#f0f0f0;text-align:left}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button{color:#757575}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button:hover{background-color:#e0e0e0;color:#757575}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#f0f0f0}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button svg{position:absolute;left:1em}.woocommerce-filters .components-base-control__field{margin-bottom:0}@media (max-width:400px){.woocommerce-filters{margin-left:-8px;margin-right:-8px}}.woocommerce-filters__basic-filters{display:flex;margin-bottom:24px}@media (max-width:1280px){.woocommerce-filters__basic-filters{flex-direction:column}}@media (max-width:782px){.woocommerce-filters__basic-filters{margin-bottom:16px}}.woocommerce-filters__advanced-filters .components-card__body{background-color:#f0f0f0}.woocommerce-filters__advanced-filters .components-card__footer .components-button{margin-right:16px}.woocommerce-filters-filter{width:25%;padding:0 12px;min-height:82px;display:flex;flex-direction:column;justify-content:flex-end}.woocommerce-filters-filter:first-child{padding-left:0}.woocommerce-filters-filter:last-child{padding-right:0}@media (max-width:1440px){.woocommerce-filters-filter{width:33.3%}}@media (max-width:1280px){.woocommerce-filters-filter{width:50%;padding:0;min-height:78px}}@media (max-width:782px){.woocommerce-filters-filter{width:100%}}.woocommerce-filters-label{margin:7px 0;display:block}@media (max-width:1280px){.woocommerce-filters-label{margin:5px 0}}.woocommerce-filters-date__content .components-popover__content,.woocommerce-filters-filter__content .components-popover__content{width:320px;border:1px solid #ccc;background-color:#fff}.woocommerce-filters-date__content .woocommerce-calendar__input-error .components-popover__content,.woocommerce-filters-filter__content .woocommerce-calendar__input-error .components-popover__content{background-color:#757575}.woocommerce-filters-date__content.is-mobile .components-popover__content,.woocommerce-filters-filter__content.is-mobile .components-popover__content{width:100%;height:100%;border:none}.woocommerce-filters-filter__search .woocommerce-search__autocomplete-results{position:static}.woocommerce-filters-filter__search .woocommerce-search__inline-container{overflow:hidden}.woocommerce-filters-filter__search .woocommerce-search__inline-container:not(.is-active){border:none}.woocommerce-filters-advanced__list-item .components-base-control+.components-base-control{margin-bottom:0}.woocommerce-flag span{vertical-align:middle}.woocommerce-flag .woocommerce-flag__fallback{background:#f0f0f0;color:transparent;width:24px;height:18px;display:block;overflow:hidden}.woocommerce-gravatar{border-radius:50%}.woocommerce-image-upload .woocommerce-image-upload__image-preview{font-size:16px;margin-right:2em}.woocommerce-image-upload .woocommerce-image-upload__image-preview img{max-width:240px;height:auto}.woocommerce-image-upload .woocommerce-image-upload__add-image{margin:16px 0}.woocommerce-image-upload.has-image{display:flex;align-items:center}.woocommerce-list{margin:0;padding:0}a.woocommerce-list__item{color:inherit}.woocommerce-list__item{display:flex;align-items:center;margin-bottom:0;text-decoration:none;background-color:#fff}.woocommerce-list__item.has-gutters{padding:16px 24px}.woocommerce-list__item.has-action{cursor:pointer}.woocommerce-list__item:focus{box-shadow:inset 0 0 0 1px #006088,inset 0 0 0 2px #fff}.woocommerce-list__item:focus-visible{box-shadow:none}.woocommerce-list__item:not(.transitions-disabled).woocommerce-list__item-enter{opacity:0;max-height:0;transform:translateX(50%)}.woocommerce-list__item:not(.transitions-disabled).woocommerce-list__item-enter-active{opacity:1;max-height:100vh;transform:translateX(0);transition:opacity .5s,transform .5s,max-height .5s}.woocommerce-list__item:not(.transitions-disabled).woocommerce-list__item-exit{opacity:1;max-height:100vh;transform:translateX(0)}.woocommerce-list__item:not(.transitions-disabled).woocommerce-list__item-exit-active{opacity:0;max-height:0;transform:translateX(50%);transition:opacity .5s,transform .5s,max-height .5s}.woocommerce-list__item>.woocommerce-list__item-inner{text-decoration:none;width:100%;display:flex;align-items:center;padding:16px 24px}.woocommerce-list__item>.woocommerce-list__item-inner:focus{box-shadow:inset 0 0 0 1px #006088,inset 0 0 0 2px #fff}.woocommerce-list__item .woocommerce-list__item-title{color:#1d2327}.woocommerce-list__item .woocommerce-list__item-content{margin-top:4px;display:block;font-size:14px;line-height:20px;color:#50575d}.woocommerce-list__item .woocommerce-list__item-before{margin-right:20px;display:flex;align-items:center}.woocommerce-list__item .woocommerce-list__item-after{display:flex;align-items:center;margin-left:auto}.woocommerce-list__item:not(:first-child){border-top:1px solid #f0f0f0}.woocommerce-list__item:hover{background-color:#f0f0f0}.woocommerce-list__item:hover .woocommerce-list__item-title{color:#007cba;color:var(--wp-admin-theme-color)}.woocommerce-list__item:hover .woocommerce-list__item-before>svg{fill:#007cba;fill:var(--wp-admin-theme-color)}.woocommerce-list__item .woocommerce-list__item-title{color:#007cba;color:var(--wp-admin-theme-color)}.woocommerce-list__item .woocommerce-list__item-before>svg{fill:#007cba;fill:var(--wp-admin-theme-color)}.woocommerce-list__item .woocommerce-list__item-after>svg{fill:#1e1e1e}.woocommerce-list__item.is-complete .woocommerce-task__icon{background-color:#007cba;background-color:var(--wp-admin-theme-color)}.woocommerce-list__item.is-complete .woocommerce-list__item-title{color:#757575}.woocommerce-list__item.is-complete .woocommerce-list__item-content{display:none}.woocommerce-list__item-title{color:#2c3338}.woocommerce-list__item-content{color:#646970}.woocommerce-order-status{display:flex;align-items:center}.woocommerce-order-status__indicator{min-width:16px;width:16px;height:16px;display:block;background:#ccc;margin-right:8px;border-radius:50%;border:3px solid #f0f0f0}.woocommerce-order-status__indicator.is-processing{background:#4ab866;border-color:#93d5a4}.woocommerce-order-status__indicator.is-on-hold{background:#ffb900;border-color:#ffd566}.woocommerce-pagination{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center}@media (max-width:782px){.woocommerce-pagination{flex-direction:column}}.woocommerce-pagination input{border-radius:4px}.woocommerce-pagination__page-arrows{display:flex;flex-direction:row}.woocommerce-pagination__page-arrows-buttons{display:inline-flex;align-items:baseline;border:1px solid #b5bfc9;border-radius:4px;background:#f0f2f4}.woocommerce-pagination__page-arrows-buttons .components-button{color:#24292d;height:30px;width:32px;justify-content:center}.woocommerce-pagination__page-arrows-buttons .components-button:not(:disabled):not([aria-disabled=true]):hover{color:#757575}.woocommerce-pagination__page-arrows-buttons button:first-child{border-top-right-radius:0;border-bottom-right-radius:0;border-right:2px solid #d3d9de}.woocommerce-pagination__page-arrows-buttons button:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.woocommerce-pagination__page-arrows-buttons .woocommerce-pagination__link{padding:4px}.woocommerce-pagination__page-arrows-label{margin-top:8px;margin-right:8px}.woocommerce-pagination__page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__page-picker .woocommerce-pagination__page-picker-input{margin-left:8px;width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__per-page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__per-page-picker .components-base-control{margin-bottom:0}.woocommerce-pagination__per-page-picker .components-base-control .components-base-control__field{display:flex;flex-direction:row;align-items:baseline;margin-bottom:0}.woocommerce-pagination__per-page-picker .components-base-control .components-select-control__input{width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker .components-base-control .components-base-control__label{margin-right:8px}.woocommerce-pagination__page-picker-input.has-error,.woocommerce-pagination__page-picker-input.has-error:focus{border-color:#d94f4f;box-shadow:0 0 2px #d94f4f}.woocommerce-pill{border:1px solid #757575;border-radius:28px;color:#757575;display:inline-block;padding:4px 8px}@media (max-width:320px){.woocommerce-pill{font-size:11px}}.woocommerce-product-image{border-radius:2px}.woocommerce-rating{position:relative;vertical-align:middle;display:inline-block;overflow:hidden;white-space:nowrap}.woocommerce-rating .gridicon{fill:#e0e0e0}.woocommerce-rating .woocommerce-rating__star-outline{position:absolute;left:0;top:0;white-space:nowrap;overflow:hidden}.woocommerce-rating .woocommerce-rating__star-outline .gridicon{fill:#757575}.woocommerce-search.woocommerce-select-control{position:relative}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__control-icon{position:absolute;top:50%;left:10px;transform:translateY(-50%);color:#ccc;font-size:20px}.woocommerce-search.woocommerce-select-control:not(.has-inline-tags) .woocommerce-tag{margin:8px 6px 0 0}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__control{height:auto;font-size:13px;width:100%;padding:3px 2px 3px 36px;border-radius:4px;border:1px solid #757575;box-shadow:0 2px 6px rgba(0,0,0,.05)}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__control.is-active{border-color:#007cba;border-color:var(--wp-admin-theme-color)}.woocommerce-search.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input{margin:0;font-size:13px;min-height:auto}.woocommerce-search.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input[type=number]::-webkit-inner-spin-button,.woocommerce-search.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.woocommerce-search.woocommerce-select-control .components-base-control .components-base-control__label{font-size:13px;color:#72777c;margin:0;width:calc(100% - 36px);top:50%;left:36px}.woocommerce-search.woocommerce-select-control.has-inline-tags .has-tags.components-base-control .components-base-control__label,.woocommerce-search.woocommerce-select-control .is-active.components-base-control .components-base-control__label,.woocommerce-search.woocommerce-select-control .with-value.components-base-control .components-base-control__label{display:none}.woocommerce-search.woocommerce-select-control .components-base-control .woocommerce-select-control__tags{margin:0}.woocommerce-search.woocommerce-select-control .components-base-control .woocommerce-tag{max-height:24px}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__listbox{border:1px solid #ccc;top:38px}.woocommerce-search.woocommerce-select-control.is-static-results .woocommerce-select-control__listbox{position:static}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option{margin-bottom:0;display:flex;flex-direction:row;flex-grow:1;flex-shrink:0;align-items:center;padding:12px;color:#7f54b3;text-align:left;background:#f0f0f0;border-bottom:1px solid #f0f0f0;font-size:13px;min-height:43px}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option:last-of-type{border-bottom:none}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option:hover{box-shadow:none;color:#7f54b3;background:#e0e0e0}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option.is-selected,.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option:active,.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option:focus{color:#7f54b3;background:#fff;box-shadow:inset 0 0 0 1px #e0e0e0,inset 0 0 0 2px #24292d}.woocommerce-search.woocommerce-select-control .woocommerce-select-control__option .woocommerce-search__result-thumbnail{margin-right:12px}.woocommerce-search__result-name{text-decoration:underline}.woocommerce-search-list{width:100%;padding:0 0 16px;text-align:left}.woocommerce-search-list__selected{margin:16px 0;padding:16px 0 0;min-height:76px;border-top:1px solid #f0f0f0}.woocommerce-search-list__selected .woocommerce-search-list__selected-header{margin-bottom:8px}.woocommerce-search-list__selected .woocommerce-search-list__selected-header button{margin-left:12px}.woocommerce-search-list__selected .woocommerce-tag__text{max-width:13em}.woocommerce-search-list__selected ul{list-style:none}.woocommerce-search-list__selected ul li{float:left}.woocommerce-search-list__search{margin:16px 0;padding:16px 0 0;border-top:1px solid #f0f0f0}.woocommerce-search-list__search .components-base-control__field{margin-bottom:16px}.woocommerce-search-list__list{border:1px solid #e0e0e0;padding:0;max-height:17em;overflow-x:hidden;overflow-y:auto}.woocommerce-search-list__list li{margin-bottom:0}.woocommerce-search-list__list.is-loading,.woocommerce-search-list__list.is-not-found{padding:12px 0;text-align:center;border:none}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon,.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-text{display:inline-block}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon{margin-right:16px}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon .gridicon{vertical-align:top;margin-top:-1px}.woocommerce-search-list__list .components-spinner{float:none;margin:0 auto}.woocommerce-search-list__list .components-menu-group__label{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.woocommerce-search-list__list>[role=menu]{border:1px solid #f0f0f0;border-bottom:none}.woocommerce-search-list__list .woocommerce-search-list__item{display:flex;align-items:center;margin-bottom:0;padding:12px 16px;background:#fff;border-bottom:1px solid #f0f0f0;color:#757575}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus,.woocommerce-search-list__list .woocommerce-search-list__item:hover{background:#f0f0f0}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus{box-shadow:none}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-input{margin:0 8px 0 0}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-label{display:flex;flex:1}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0+.depth-1{margin-top:-1px}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0){border-bottom:0!important}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0)+.depth-0{border-top:1px solid #f0f0f0}.woocommerce-search-list__list .woocommerce-search-list__item[class*=depth-] .woocommerce-search-list__item-label:before{margin-right:4px;content:"— — — — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0 .woocommerce-search-list__item-label:before{margin-right:0;content:""}.woocommerce-search-list__list .woocommerce-search-list__item.depth-1 .woocommerce-search-list__item-label:before{content:"— "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-2 .woocommerce-search-list__item-label:before{content:"— — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-3 .woocommerce-search-list__item-label:before{content:"— — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-4 .woocommerce-search-list__item-label:before{content:"— — — — "}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-name{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-prefix{display:none;color:#757575}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-label,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-label{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix{display:inline}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix:after{margin-right:4px;content:" ›"}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-name{color:#1e1e1e}.woocommerce-search-list__list .woocommerce-search-list__item.has-count>.components-menu-item__item{width:100%}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-count{flex:0 1 auto;padding:2px 8px;border:1px solid #f0f0f0;border-radius:12px;font-size:.8em;line-height:1.4;color:#757575;background:#fff;white-space:nowrap}.woocommerce-search-list__list li:last-child .woocommerce-search-list__item{border-bottom:none}.woocommerce-search-list.is-compact .woocommerce-search-list__selected{margin:0 0 16px;padding:0;border-top:none;min-height:54px}.woocommerce-search-list.is-compact .woocommerce-search-list__search{margin:0 0 16px;padding:0;border-top:none}.woocommerce-section-header{padding:13px;border-bottom:none;display:flex;justify-content:space-between}@media (max-width:782px){.woocommerce-section-header{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-section-header hr{-ms-grid-row-align:center;align-self:center;flex-grow:1;height:1px;margin:0 10px}@media (max-width:782px){.woocommerce-section-header.has-interval-select{position:relative;padding-bottom:30px}.woocommerce-section-header.has-interval-select .woocommerce-chart__interval-select{position:absolute;left:0;bottom:0;padding-left:6px}}.woocommerce-section-header__actions,.woocommerce-section-header__menu{text-align:right}.woocommerce-section-header__actions{display:flex;flex-grow:1;justify-content:flex-end}.woocommerce-section-header__actions .components-base-control{padding-top:0;min-height:34px}.woocommerce-section-header__actions .components-base-control .components-base-control__field{margin-bottom:0}.woocommerce-section-header__actions .components-base-control .components-base-control__field select{background:transparent}.woocommerce-ellipsis-menu__toggle{padding:0}.woocommerce-section-header__menu{display:flex;flex-direction:column;justify-content:center}.woocommerce-section-header__title{margin:0 16px 0 0;padding:3px 0;font-size:20px;font-size:1.25rem;line-height:2.2;font-weight:400}.woocommerce-segmented-selection{width:100%;color:#757575}.woocommerce-segmented-selection__container{width:100%;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;display:-ms-grid;display:grid;border-top:1px solid #ccc;border-bottom:1px solid #ccc;background-color:#ccc}.woocommerce-segmented-selection__item:nth-child(2n){border-left:1px solid #ccc;border-top:1px solid #ccc}.woocommerce-segmented-selection__item:nth-child(odd){border-top:1px solid #ccc}.woocommerce-segmented-selection__item:nth-child(-n+2){border-top:0}.woocommerce-segmented-selection__label{background-color:#f0f0f0;padding:12px 12px 12px 36px;position:relative;display:block;height:100%}.woocommerce-segmented-selection__label:active,.woocommerce-segmented-selection__label:hover{background-color:#e0e0e0}.woocommerce-segmented-selection__input{opacity:0;position:absolute;left:-9999px}.woocommerce-segmented-selection__input:active+label .woocommerce-segmented-selection__label{background-color:#e0e0e0}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label{background-color:#fff;font-weight:600}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label:before{content:"";width:8px;height:8px;background-color:#007cba;background-color:var(--wp-admin-theme-color);position:absolute;top:50%;transform:translate(-20px,-50%)}.woocommerce-segmented-selection__input:focus+label .woocommerce-segmented-selection__label{box-shadow:inset 0 0 0 1px #24292d}.woocommerce-select-control{position:relative}.woocommerce-select-control .components-base-control{height:56px;display:flex;align-items:center;border:1px solid #a7aaad;border-radius:3px;background:#fff;padding:12px;position:relative}.woocommerce-select-control .components-base-control .woocommerce-select-control__tags{margin:12px 4px 0 0}.woocommerce-select-control .components-base-control .woocommerce-tag{max-height:20px}.woocommerce-select-control .components-base-control .components-base-control__field{display:flex;align-items:center;flex:1;margin-bottom:0;max-width:100%}.woocommerce-select-control .components-base-control .components-base-control__label{position:absolute;top:50%;transform:translateY(-50%);color:#646970;font-size:16px}.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input{font-size:16px;border:0;box-shadow:none;color:#2c3338;margin:12px 0 0;padding-left:0;padding-right:0;width:100%;line-height:24px;text-align:left;letter-spacing:inherit;background:transparent}.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input::-webkit-search-cancel-button{display:none}.woocommerce-select-control .components-base-control .woocommerce-select-control__control-input:focus{outline:none}.woocommerce-select-control .components-base-control i{color:#636d75;margin-right:12px;width:24px}.woocommerce-select-control .components-base-control.is-active{box-shadow:0 0 0 1px #006088;border-color:#006088}.woocommerce-select-control .components-base-control.has-tags .components-base-control__label,.woocommerce-select-control .components-base-control.with-value .components-base-control__label{font-size:12px;margin-top:-12px}.woocommerce-select-control .components-base-control.is-disabled{opacity:.5}.woocommerce-select-control .components-base-control.is-disabled .components-base-control__label{cursor:default}.woocommerce-select-control .woocommerce-select-control__autofill-input{position:absolute;z-index:-1}.woocommerce-select-control .woocommerce-select-control__tags{position:relative;margin:12px 0 0}.woocommerce-select-control .woocommerce-select-control__tags.has-clear{padding-right:24px}.woocommerce-select-control .woocommerce-tag{max-height:24px}.woocommerce-select-control .woocommerce-select-control__clear{position:absolute;right:10px;top:calc(50% - 10px)}.woocommerce-select-control .woocommerce-select-control__clear>.dashicon{color:#c9c9c9}.woocommerce-select-control .woocommerce-select-control__listbox{background:#fff;display:flex;flex-direction:column;align-items:stretch;box-shadow:0 3px 5px rgba(0,0,0,.2),0 1px 18px rgba(0,0,0,.12),0 6px 10px rgba(0,0,0,.14);border-radius:3px;position:absolute;left:0;right:0;top:57px;z-index:10;overflow-y:auto;max-height:350px}.woocommerce-select-control .woocommerce-select-control__listbox.is-static{position:static}.woocommerce-select-control .woocommerce-select-control__option{padding:16px;min-height:56px;font-size:16px;text-align:left}.woocommerce-select-control .woocommerce-select-control__option.is-selected,.woocommerce-select-control .woocommerce-select-control__option:hover{background:#f6f7f7}.woocommerce-select-control.is-searchable .components-base-control__label{left:48px}.woocommerce-select-control.is-searchable .components-base-control.is-active .components-base-control__label{font-size:12px;margin-top:-12px}.woocommerce-stepper .woocommerce-stepper__steps{display:flex;justify-content:space-around;margin-bottom:24px}.woocommerce-stepper .woocommerce-stepper__step{padding:8px;font-weight:400;position:relative}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-label-wrapper{display:flex;text-align:left;border:0;background-color:transparent;padding:0}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-label-wrapper:focus{outline:none;box-shadow:none}.woocommerce-stepper .woocommerce-stepper__step button.woocommerce-stepper__step-label-wrapper{cursor:pointer}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-text{width:100%}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-label{color:#1e1e1e;line-height:24px;font-size:16px}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-description{display:none;font-size:14px;color:#757575;font-weight:400;margin-top:2px}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-icon svg{display:none}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner{display:block;margin-right:12px;max-height:24px;min-width:24px;width:24px;border-radius:50%;background:#007cba;background:var(--wp-admin-theme-color)}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner__circle{stroke:#fff}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-icon,.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-icon{background:#007cba;background:var(--wp-admin-theme-color);color:#fff}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-label,.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-label{color:#1e1e1e}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-icon{font-weight:600}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-label{font-weight:600;margin:0}.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-number{display:none}.woocommerce-stepper .woocommerce-stepper__step.is-complete svg{display:inline}.woocommerce-stepper .woocommerce-stepper__step-icon{font-size:16px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-width:24px;margin-right:12px;background:#f0f0f0;color:#757575;border-radius:50%}.woocommerce-stepper .woocommerce-stepper__step-divider{align-self:flex-start;flex-grow:1;border-bottom:1px solid #f0f0f0;margin-top:20px}.woocommerce-stepper .woocommerce-stepper__step-divider:last-child{display:none}@media (max-width:782px){.woocommerce-stepper .woocommerce-stepper__step-label{display:none;padding-top:24px}.woocommerce-stepper .woocommerce-stepper__step-icon{margin-right:0}}.woocommerce-stepper.is-vertical .woocommerce-stepper__steps{align-items:normal;flex-direction:column;margin-bottom:0}.woocommerce-stepper.is-vertical .woocommerce-stepper__step{padding-bottom:36px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:after{content:"";position:absolute;left:20px;top:40px;height:calc(100% - 40px);border-left:1px solid #f0f0f0}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:last-child{padding-bottom:8px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:last-child:after{display:none}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-label{display:initial}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-icon{margin-right:12px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-description{display:block}.woocommerce-stepper.is-vertical .woocommerce-stepper_content{margin-top:16px;margin-left:36px}@-webkit-keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(270deg)}}@keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(270deg)}}@-webkit-keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;transform:rotate(135deg)}to{transform:rotate(450deg)}}@keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;transform:rotate(135deg)}to{transform:rotate(450deg)}}.woocommerce-spinner{-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;width:40px;min-width:40px;height:40px;max-height:40px}.woocommerce-spinner__circle{stroke-dasharray:200;stroke-dashoffset:0;transform-origin:center;-webkit-animation:growAndShrink 2s ease-in-out infinite;animation:growAndShrink 2s ease-in-out infinite;stroke:#1d2327}.woocommerce-summary{margin:16px 0;display:-ms-grid;display:grid;border-color:#e0e0e0;border-style:solid;border-width:1px 0 0 1px;background-color:#f0f0f0;box-shadow:inset -1px -1px 0 #e0e0e0;width:100%}@media (max-width:782px){.woocommerce-summary{border-width:0}.woocommerce-summary.is-placeholder{border-top:0}.woocommerce-summary .woocommerce-summary__item-container.is-placeholder{border-top:1px solid #e0e0e0}}.woocommerce-summary .components-popover:not(.components-tooltip){position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;margin-top:0!important;margin-left:0}.woocommerce-summary .components-popover:not(.components-tooltip) .components-popover__header{display:none}.woocommerce-summary .components-popover:not(.components-tooltip) .components-popover__content{position:static;left:auto;right:auto;margin:0;width:100%;max-width:100%!important;max-height:100%!important;box-shadow:none;border:none;transform:none}.woocommerce-summary .components-popover:not(.components-tooltip) .components-popover__content .woocommerce-summary__item.is-selected{display:none}.components-popover__content .woocommerce-summary{max-height:100%;margin-top:0;margin-bottom:0;overflow-y:auto;border:none}.woocommerce-summary .woocommerce-summary__item-delta,.woocommerce-summary .woocommerce-summary__item-value{flex:1 0 auto}.woocommerce-summary .woocommerce-summary__item-delta{flex:0 1 auto;display:flex}.woocommerce-summary,.woocommerce-summary.has-1-items,.woocommerce-summary.has-one-item{-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-summary.has-2-items{-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(2n) .woocommerce-summary__item{border-right-color:#e0e0e0}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2) .woocommerce-summary__item,.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-3-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#e0e0e0}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-4-items,.woocommerce-summary.has-7-items,.woocommerce-summary.has-8-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#e0e0e0}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-5-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#e0e0e0}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-5-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-5-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}@media (min-width:1441px){.woocommerce-summary.has-6-items{-ms-grid-columns:(1fr)[6];grid-template-columns:repeat(6,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n) .woocommerce-summary__item{border-right-color:#e0e0e0}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-6-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-6-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-9-items,.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#e0e0e0}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-9-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-9-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}}@media (max-width:1440px){.woocommerce-summary.has-4-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-4-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-6-items,.woocommerce-summary.has-9-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#e0e0e0}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#e0e0e0}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#e0e0e0}.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-value .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#e0e0e0}}@media (max-width:960px){.woocommerce-summary .woocommerce-summary__item{border-right-color:#e0e0e0}}@media (max-width:782px){.woocommerce-summary .woocommerce-summary__item-container{margin-left:-16px;margin-right:-16px;width:auto}.woocommerce-summary .woocommerce-summary__item-container .woocommerce-summary__item{border-right:none}.woocommerce-summary .components-popover.components-popover{margin-left:-16px;margin-right:-16px}.woocommerce-summary .components-popover.components-popover .woocommerce-summary__item-container{margin-left:0;margin-right:0}}.woocommerce-summary__item-container{margin-bottom:0}.woocommerce-summary__item-container:last-of-type .woocommerce-summary__item{border-bottom-color:#e0e0e0!important}.woocommerce-summary__item-container.is-dropdown-button{padding:0;list-style:none;border-right:1px solid #e0e0e0}.woocommerce-summary__item-container.is-dropdown-button .components-button{border-bottom:1px solid #e0e0e0;text-align:left;display:block}@media (max-width:782px){.woocommerce-summary__item-container.is-dropdown-button{border-right:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item{height:117px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#f0f0f0;color:transparent;display:inline-block;height:20px;margin-top:2.2px;max-width:110px;width:70%}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:none;animation:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-data{justify-content:space-between}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#f0f0f0;color:transparent;display:inline-block;height:28px;width:60px;max-width:60px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:none;animation:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#f0f0f0;color:transparent;width:60px;border-radius:2px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta{-webkit-animation:none;animation:none}}.woocommerce-summary__item{display:flex;flex-direction:column;height:100%;padding:24px;background-color:#f8f9fa;border-bottom:1px solid #e0e0e0;border-right:1px solid #e0e0e0;line-height:1.4em;text-decoration:none;color:#1e1e1e}.woocommerce-summary__item.components-button{height:auto;padding:16px;align-items:normal}.woocommerce-summary__item:hover{background-color:#f0f0f0}.woocommerce-summary__item:hover,.woocommerce-summary__item:hover .woocommerce-summary__item-label{color:#007cba;color:var(--wp-admin-theme-color)}.woocommerce-summary__item:active{background-color:#f0f0f0}.woocommerce-summary__item:focus{box-shadow:inset -1px 1px 0 #757575,inset 1px -1px 0 #757575!important}.woocommerce-summary__item.is-selected:focus{box-shadow:inset -1px -1px 0 #757575,inset 1px 0 0 #757575,inset 0 4px 0 #007cba!important;box-shadow:inset -1px -1px 0 #757575,inset 1px 0 0 #757575,inset 0 4px 0 var(--wp-admin-theme-color)!important}.is-dropdown-button .woocommerce-summary__item{position:relative;width:100%;padding-right:56px}@media (max-width:782px){.is-dropdown-button .woocommerce-summary__item{border-right:none}}.woocommerce-summary__item .woocommerce-summary__item-data{display:flex;justify-content:space-between}.woocommerce-summary__item .woocommerce-summary__item-label{display:block;margin-bottom:16px;color:#757575}.woocommerce-summary__item .woocommerce-summary__item-value{margin-bottom:4px;font-weight:500;color:#1e1e1e}.woocommerce-summary__item .woocommerce-summary__item-delta{padding:5px;border-radius:3px;height:-webkit-min-content;height:-moz-min-content;height:min-content;background-color:#f0f0f0;color:#1e1e1e}.woocommerce-summary__item.is-selected{background:#fff;box-shadow:inset 0 4px 0 #007cba;box-shadow:inset 0 4px 0 var(--wp-admin-theme-color)}.woocommerce-summary__item.is-selected .woocommerce-summary__item-value{font-weight:600}.woocommerce-summary__item.is-selected .woocommerce-summary__item-delta{font-weight:400}.woocommerce-summary__item.is-good-trend .woocommerce-summary__item-delta{background-color:#4ab866;color:#fff}.woocommerce-summary__item.is-bad-trend .woocommerce-summary__item-delta{background-color:#d94f4f;color:#fff}.woocommerce-summary__item .woocommerce-summary__toggle{position:absolute;top:44px;right:16px;transition:transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item .woocommerce-summary__toggle{transition:none}}.is-dropdown-expanded .woocommerce-summary__item .woocommerce-summary__toggle{transform:rotate(-180deg)}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-delta,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-label,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-value{margin-bottom:0}.woocommerce-table{margin-bottom:40px}.woocommerce-table .woocommerce-table__actions{display:inline-flex;justify-content:flex-end;align-items:center}.woocommerce-table .woocommerce-table__actions>*{margin-right:16px}.woocommerce-table .woocommerce-table__actions>:last-child{margin-right:0}.woocommerce-table .woocommerce-table__actions>div{width:100%}.woocommerce-table .components-card__footer{flex-direction:column}.woocommerce-table .components-card__footer>*{padding-right:0}.woocommerce-table.is-empty{align-items:center;background:#f0f0f0;color:#757575;display:flex;height:calc(182px + 6.825rem);height:calc(17px + 1.1375rem + (33px + 1.1375rem)*var(--number-of-rows));justify-content:center;padding:16px;text-align:center}.woocommerce-table .woocommerce-pagination{margin-bottom:16px;z-index:1;background:#fff;position:relative}.woocommerce-table .components-card__header{align-items:center;text-align:left;display:-ms-grid;display:grid;width:100%;-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}@media (max-width:960px){.woocommerce-table.has-search .woocommerce-table__actions{grid-gap:12px;-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr;-ms-grid-row:2;grid-row-start:2;-ms-grid-row-span:0;grid-row-end:2;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:3;grid-column-end:4;margin:0}}.woocommerce-table .woocommerce-search .woocommerce-select-control__control{height:38px}.woocommerce-table .woocommerce-compare-button{padding:3px 12px;height:auto}.woocommerce-table .woocommerce-ellipsis-menu{justify-content:flex-end;display:flex}.woocommerce-table__caption{font-size:24px;font-size:1.5rem;text-align:left}.components-card__body{position:relative}.woocommerce-table__table{overflow-x:auto}.woocommerce-table__table:after,.woocommerce-table__table:before{content:"";position:absolute;top:0;width:60px;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:1}.woocommerce-table__table:after{right:0;background:linear-gradient(90deg,hsla(0,0%,100%,0),#fff)}.woocommerce-table__table:before{left:0;background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.woocommerce-table__table.is-scrollable-left:before,.woocommerce-table__table.is-scrollable-right:after{opacity:1}.woocommerce-table__table table{border-collapse:collapse;width:100%}.woocommerce-table__table tr:focus-within,.woocommerce-table__table tr:hover{background-color:#e0e0e0}.woocommerce-table__table tr:focus-within td,.woocommerce-table__table tr:focus-within th,.woocommerce-table__table tr:hover td,.woocommerce-table__table tr:hover th{background:transparent}.woocommerce-table__empty-item,.woocommerce-table__header,.woocommerce-table__item{padding:16px 24px}.woocommerce-table__header,.woocommerce-table__item{font-size:13px;font-size:.8125rem;text-align:left;border-bottom:1px solid #e2e4e7}.woocommerce-table__header>a:only-child,.woocommerce-table__item>a:only-child{display:block}.woocommerce-table__header a:focus,.woocommerce-table__header a:hover,.woocommerce-table__item a:focus,.woocommerce-table__item a:hover{color:#533582}.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#f0f0f0;color:transparent;display:inline-block;height:16px;max-width:120px;width:80%}.woocommerce-table__header .is-placeholder:after,.woocommerce-table__item .is-placeholder:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:none;animation:none}}.woocommerce-table__header:not(.is-left-aligned),.woocommerce-table__item:not(.is-left-aligned){text-align:right}.woocommerce-table__header:not(.is-left-aligned) button,.woocommerce-table__item:not(.is-left-aligned) button{justify-content:flex-end}.woocommerce-table__header.is-numeric .is-placeholder,.woocommerce-table__item.is-numeric .is-placeholder{max-width:40px}.woocommerce-table__header .is-negative,.woocommerce-table__item .is-negative{color:#d94f4f;font-weight:700}.woocommerce-table__header.is-sorted,.woocommerce-table__item.is-sorted{background-color:#f0f0f0}.woocommerce-table__header.is-checkbox-column,.woocommerce-table__item.is-checkbox-column{width:33px;max-width:33px;padding-right:0;padding-left:16px}.woocommerce-table__header.is-checkbox-column+th,.woocommerce-table__item.is-checkbox-column+th{border-left:0}.woocommerce-table tr:last-child .woocommerce-table__item{border-bottom:0}.woocommerce-table__empty-item{text-align:center;font-size:18px;font-size:1.125rem;color:#757575;font-weight:700}@media (max-width:782px){.woocommerce-table__empty-item{font-size:13px;font-size:.8125rem}}th.woocommerce-table__item{font-weight:400}.woocommerce-table__header{padding:8px 24px;background-color:#f8f9fa;font-weight:700;white-space:nowrap}.woocommerce-table__header.is-left-aligned.is-sortable{padding-left:16px}.woocommerce-table__header.is-left-aligned.is-sortable svg{display:inline-flex;order:1;margin-left:0}.woocommerce-table__header .components-button.is-button{height:auto;width:100%;padding:8px 24px 8px 0;vertical-align:middle;line-height:1;border:none;background:transparent!important;box-shadow:none!important;align-items:center}.woocommerce-table__header .components-button.is-button:active,.woocommerce-table__header .components-button.is-button:hover{box-shadow:none!important}.woocommerce-table__header.is-sortable{padding:0}.woocommerce-table__header.is-sortable svg{visibility:hidden;margin-left:4px}.woocommerce-table__header.is-sortable .components-button:focus svg,.woocommerce-table__header.is-sortable .components-button:hover svg,.woocommerce-table__header.is-sortable.is-sorted .components-button svg{visibility:visible}.woocommerce-table__summary{text-align:center;margin:0}.woocommerce-table__summary-item{display:inline-block;margin-bottom:0;margin-left:8px;margin-right:8px}.woocommerce-table__summary-item .woocommerce-table__summary-label,.woocommerce-table__summary-item .woocommerce-table__summary-value{display:inline-block}.woocommerce-table__summary-item .woocommerce-table__summary-label{margin-left:4px}.woocommerce-table__summary-item .woocommerce-table__summary-value{font-weight:600}.woocommerce-tag{display:inline-flex;margin:1px 4px 1px 0;overflow:hidden;vertical-align:middle}.woocommerce-tag .woocommerce-tag__remove,.woocommerce-tag .woocommerce-tag__text{display:inline-block;line-height:24px;background:#f0f0f0;transition:all .2s cubic-bezier(.4,1,.4,1)}.woocommerce-tag .woocommerce-tag__text{-ms-grid-row-align:center;align-self:center;padding:0 8px;border-radius:12px;color:#757575;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.woocommerce-tag.has-remove .woocommerce-tag__text{padding:0 4px 0 8px;border-radius:12px 0 0 12px}.woocommerce-tag .woocommerce-tag__remove{cursor:pointer;height:inherit;padding:0 2px;border-radius:0 12px 12px 0;color:#757575;line-height:10px;text-indent:0;height:24px}.woocommerce-tag .woocommerce-tag__remove:hover{color:#1e1e1e}.muriel-input-text{background:#fff;border:1px solid #a7aaad;border-radius:3px;height:56px;box-shadow:none;padding:12px 12px 4px;position:relative;box-shadow:0 2px 6px rgba(0,0,0,.05)}.muriel-input-text:hover{border-color:#787c82}.muriel-input-text label{color:#646970;font-size:14px;line-height:21px}.muriel-input-text label.components-base-control__label{margin:0}.muriel-input-text .components-text-control__input,.muriel-input-text .components-text-control__input[type=color],.muriel-input-text .components-text-control__input[type=date],.muriel-input-text .components-text-control__input[type=datetime-local],.muriel-input-text .components-text-control__input[type=datetime],.muriel-input-text .components-text-control__input[type=email],.muriel-input-text .components-text-control__input[type=month],.muriel-input-text .components-text-control__input[type=number],.muriel-input-text .components-text-control__input[type=password],.muriel-input-text .components-text-control__input[type=tel],.muriel-input-text .components-text-control__input[type=text],.muriel-input-text .components-text-control__input[type=time],.muriel-input-text .components-text-control__input[type=url],.muriel-input-text .components-text-control__input[type=week]{border:0;box-shadow:none;font-size:16px;line-height:21px;margin:0;padding:0;min-height:30px}.muriel-input-text .components-text-control__input:focus,.muriel-input-text .components-text-control__input[type=color]:focus,.muriel-input-text .components-text-control__input[type=date]:focus,.muriel-input-text .components-text-control__input[type=datetime-local]:focus,.muriel-input-text .components-text-control__input[type=datetime]:focus,.muriel-input-text .components-text-control__input[type=email]:focus,.muriel-input-text .components-text-control__input[type=month]:focus,.muriel-input-text .components-text-control__input[type=number]:focus,.muriel-input-text .components-text-control__input[type=password]:focus,.muriel-input-text .components-text-control__input[type=tel]:focus,.muriel-input-text .components-text-control__input[type=text]:focus,.muriel-input-text .components-text-control__input[type=time]:focus,.muriel-input-text .components-text-control__input[type=url]:focus,.muriel-input-text .components-text-control__input[type=week]:focus{box-shadow:none}.muriel-input-text.active{box-shadow:0 0 0 2px #007cba;box-shadow:0 0 0 2px var(--wp-admin-theme-color);border-color:transparent}.muriel-input-text.active input{color:#2c3338}.muriel-input-text.with-value .components-base-control__label{display:block;position:relative;top:-8px;width:100%;font-size:12px}.muriel-input-text.with-value input{color:#2c3338;position:relative;top:-12px}.muriel-input-text.empty label{display:none}.muriel-input-text.empty input{color:#646970}.muriel-input-text.has-error{box-shadow:none}.muriel-input-text.disabled label{display:none}.muriel-input-text.disabled input{color:#a7aaad}.muriel-input-text.disabled input:-ms-input-placeholder{opacity:1}.muriel-input-text.disabled input::-moz-placeholder{color:#a7aaad;opacity:1}.muriel-input-text.disabled input::placeholder{color:#a7aaad;opacity:1}.muriel-input-text.disabled input:-ms-input-placeholder{color:#a7aaad}.muriel-input-text.disabled input::-ms-input-placeholder{color:#a7aaad}.text-control-with-affixes{display:inline-flex;flex-direction:row;width:100%}.text-control-with-affixes input[type=email],.text-control-with-affixes input[type=number],.text-control-with-affixes input[type=password],.text-control-with-affixes input[type=text],.text-control-with-affixes input[type=url]{flex-grow:1;margin:0}.text-control-with-affixes input[type=email]:disabled,.text-control-with-affixes input[type=number]:disabled,.text-control-with-affixes input[type=password]:disabled,.text-control-with-affixes input[type=text]:disabled,.text-control-with-affixes input[type=url]:disabled{border-right-width:0}.text-control-with-affixes input[type=email]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=number]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=password]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=text]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=url]:disabled+.text-control-with-affixes__suffix{border-left:1px solid #f0f0f0}.text-control-with-affixes.text-control-with-prefix input{border-top-left-radius:0;border-bottom-left-radius:0}.text-control-with-affixes.text-control-with-suffix input{border-top-right-radius:0;border-bottom-right-radius:0}.text-control-with-affixes__prefix,.text-control-with-affixes__suffix{position:relative;background:#fff;border:1px solid #757575;color:#757575;padding:7px 14px;white-space:nowrap;flex:1 0 auto;font-size:14px;line-height:1.5}.disabled .text-control-with-affixes__prefix,.disabled .text-control-with-affixes__suffix{background:hsla(0,0%,100%,.5);border-color:hsla(0,0%,87.1%,.75);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}.text-control-with-affixes__prefix{border-right:none;border-radius:4px 0 0 4px}.text-control-with-affixes__prefix+input[type=email]:disabled,.text-control-with-affixes__prefix+input[type=number]:disabled,.text-control-with-affixes__prefix+input[type=password]:disabled,.text-control-with-affixes__prefix+input[type=text]:disabled,.text-control-with-affixes__prefix+input[type=url]:disabled{border-left-color:#f0f0f0}.text-control-with-affixes__suffix{border-left:none;border-radius:0 4px 4px 0}.woocommerce-timeline ul{margin:0;padding-left:0;list-style-type:none}.woocommerce-timeline ul li{margin-bottom:0}.woocommerce-timeline .woocommerce-timeline-group .woocommerce-timeline-group__title{color:#1d2327;font-size:12px;font-weight:600;text-transform:uppercase;margin:0 0 16px;display:inline-block}.woocommerce-timeline .woocommerce-timeline-group hr{float:right;width:calc(100% - 40px);margin-bottom:16px;border:.5px solid #e3dfe2}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__top-border{min-height:16px;border-left:1px solid #c3c4c7;margin:0 12px}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__title{display:flex;align-items:center;flex-direction:row;justify-content:space-between;color:#2c3338}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__title *{font-size:16px}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline{display:flex;align-items:center;flex-direction:row;margin:8px 0}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline *{margin:0}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline>*{padding:0 16px}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline svg{fill:#fff;padding:4px;background:#c3c4c7;border-radius:9999px;box-sizing:content-box;width:16px;height:16px}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline svg.is-success{background:#4ab866}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline svg.is-warning{background:#ffb900}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__headline svg.is-error{background:#d94f4f}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__timestamp{font-size:14px;line-height:16px}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__body{display:flex;flex-direction:column;color:#50575e;margin:0 12px;padding:8px 36px;border-left:1px solid #c3c4c7}.woocommerce-timeline .woocommerce-timeline-item .woocommerce-timeline-item__body *{margin:0;font-size:14px}.woocommerce-timeline ul :last-child.woocommerce-timeline-group hr:last-child{display:none}.woocommerce-view-more-list{padding-left:4px;margin:0 0 0 4px;vertical-align:middle}.woocommerce-view-more-list__popover{margin:0;padding:16px;text-align:left}.woocommerce-view-more-list__popover__item{display:block;margin:16px 0}.woocommerce-view-more-list__popover__item:first-child{margin-top:0}.woocommerce-view-more-list__popover__item:last-child{margin-bottom:0}.woocommerce-web-preview{width:100%;display:flex;align-items:center;justify-content:center;background:#f6f7f7}.woocommerce-web-preview.is-loading .woocommerce-web-preview__iframe-wrapper{display:none}.woocommerce-web-preview .woocommerce-web-preview__iframe-wrapper{width:100%}.woocommerce-web-preview iframe{width:100%;height:100%;min-height:400px}.woocommerce-badge{background-color:#f0f0f0;border-radius:20px;display:inline-block;text-align:center;font-style:normal;font-weight:600;font-size:14px;line-height:27px;align-items:center;width:32px;height:28px}.woocommerce-component-settings .components-base-control{margin-top:16px;margin-bottom:16px;position:relative}.woocommerce-component-settings .components-base-control.has-error .components-base-control__help{left:0!important}.editor-block-preview__content{overflow:hidden}.components-placeholder__label .gridicon,.components-placeholder__label .material-icon{margin-right:1ch;fill:currentColor}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products{list-style:none;margin:0 -8px 16px;padding:0}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products .wc-block-grid__product{margin:0 0 24px}.editor-styles-wrapper .wc-block-grid.components-placeholder{padding:2em 1em}.editor-styles-wrapper .wc-block-grid.is-loading,.editor-styles-wrapper .wc-block-grid.is-not-found{display:block}.components-base-control+.wc-block-base-control-notice{margin:-16px 0 16px}.components-base-control+.wc-block-base-control-notice:last-child{margin:-16px 0 12px}.woocommerce-search-list__list.woocommerce-search-list__list{box-sizing:border-box;margin:0;padding:0}.woocommerce-search-list__selected.woocommerce-search-list__selected>ul{list-style:none;margin:0;padding:0}.theme-twentytwenty .wp-block .wc-block-active-filters__title,.theme-twentytwenty .wp-block .wc-block-attribute-filter__title,.theme-twentytwenty .wp-block .wc-block-grid__product-title,.theme-twentytwenty .wp-block .wc-block-price-filter__title,.theme-twentytwenty .wp-block .wc-block-stock-filter__title{font-size:1em}.wc-atomic-blocks-product__selection{width:100%}.wc-atomic-blocks-product__edit-card{padding:16px;border-top:1px solid #e0e0e0}.wc-atomic-blocks-product__edit-card .wc-atomic-blocks-product__edit-card-title{margin:0 0 16px}.wc-block-cart__page-notice{margin:0}.wp-block-woocommerce-cart-express-payment-block .components-placeholder__label svg{font-size:1em}.wp-block-woocommerce-cart-express-payment-block .wc-block-cart__payment-options{padding:0}.wp-block-woocommerce-cart-express-payment-block .wc-block-cart__payment-options .wc-block-components-express-payment-continue-rule{margin-bottom:-12px}.wp-block-woocommerce-filled-cart-block .wc-block-components-sidebar-layout{display:block}.wp-block-woocommerce-filled-cart-block .block-editor-block-list__layout{display:flex;flex-flow:row wrap;align-items:flex-start}.wp-block-woocommerce-filled-cart-block .block-editor-block-list__layout>:first-child,.wp-block-woocommerce-filled-cart-block .wc-block-components-main>:first-child,.wp-block-woocommerce-filled-cart-block .wc-block-components-sidebar>:first-child{margin-top:0}.wp-block-woocommerce-filled-cart-block .wp-block-woocommerce-cart-items-block .block-editor-block-list__layout,.wp-block-woocommerce-filled-cart-block .wp-block-woocommerce-cart-totals-block .block-editor-block-list__layout{display:block}.wc-block-checkout__additional_fields{margin:1.5em 0 -1.5em}.wc-block-components-checkout-step__description-placeholder{opacity:.5}.wc-block-components-checkout-step__title{display:flex;width:100%}.wp-block-woocommerce-checkout-express-payment-block{margin:14px 0 28px}.wp-block-woocommerce-checkout-express-payment-block .components-placeholder__label svg{font-size:1em}.wp-block-woocommerce-checkout-express-payment-block .wc-block-components-express-payment-continue-rule--checkout{margin-bottom:0}.wp-block-woocommerce-checkout-express-payment-block.wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods{padding:14px 0;margin:-14px 0 14px!important;position:relative}.wp-block-woocommerce-checkout-express-payment-block-placeholder *{pointer-events:all}.wp-block-woocommerce-checkout-express-payment-block-placeholder .wp-block-woocommerce-checkout-express-payment-block-placeholder__description{display:block;margin:0 0 1em}.wp-block-woocommerce-checkout-order-note-block{margin-top:20px;margin-bottom:20px;padding-top:4px;padding-bottom:4px}.wp-block-woocommerce-checkout-order-note-block .wc-block-checkout__add-note{margin-top:0;margin-bottom:0}.wc-block-checkout__terms{margin:20px 0;padding-top:4px;padding-bottom:4px;display:flex;align-items:flex-start}.wc-block-checkout__terms .block-editor-rich-text__editable{vertical-align:middle;line-height:1.5em}.wc-block-components-checkbox{margin-top:0}.wc-block-checkout__terms_notice .components-notice__action{margin-left:0}.wc-block-checkout__terms_notice-button{display:flex;flex-direction:row;align-items:center}.wc-block-checkout__terms_notice-button .wc-block-checkout__terms_notice-button__icon{margin-left:4px}.wp-block-woocommerce-checkout .wc-block-components-sidebar-layout{display:block}.wp-block-woocommerce-checkout .block-editor-block-list__layout{display:flex;flex-flow:row wrap;align-items:flex-start}.wp-block-woocommerce-checkout .block-editor-block-list__layout .wc-block-checkout__additional_fields{padding:0}.wp-block-woocommerce-checkout .block-editor-block-list__layout>:first-child,.wp-block-woocommerce-checkout .wc-block-components-main>:first-child,.wp-block-woocommerce-checkout .wc-block-components-sidebar>:first-child{margin-top:0}.wp-block-woocommerce-checkout .wp-block-woocommerce-checkout-fields-block .block-editor-block-list__layout,.wp-block-woocommerce-checkout .wp-block-woocommerce-checkout-totals-block .block-editor-block-list__layout{display:block}body.wc-lock-selected-block--move .block-editor-block-mover,body.wc-lock-selected-block--move .block-editor-block-mover__move-button-container,body.wc-lock-selected-block--remove .block-editor-block-settings-menu__popover .components-menu-group:last-child{display:none}body.wc-lock-selected-block--remove .block-editor-block-settings-menu__popover .components-menu-group:nth-last-child(2){margin-bottom:-12px}.wc-block-checkout__controls-text{color:#999;font-style:italic}.components-base-control--nested{padding-left:52px;margin-top:-12px}.wc-block-checkout__page-notice{margin:0}.components-panel__body-title .components-button{opacity:1}.wp-block-woocommerce-checkout.is-editor-preview{max-height:1000px;overflow:hidden}.wc-block-products .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-products .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-products .components-placeholder__fieldset{display:block}.wc-block-products .wc-block-products__add-product-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-products .wc-block-products__add-product-button svg{fill:currentColor;margin-left:.5ch;vertical-align:middle}.wc-block-products .wc-block-products__read_more_button{display:block;margin-bottom:1em}.wc-block-all-products .components-placeholder__fieldset{max-width:none;overflow:hidden}.wc-block-all-products .wc-block-all-products-grid-item-template{border-top:1px solid #e0e0e0;margin-top:20px;width:100%;overflow:hidden;text-align:center}.wc-block-all-products .wc-block-all-products-grid-item-template .components-tip{max-width:450px;margin:20px auto;text-align:left}.wc-block-all-products .wc-block-all-products-grid-item-template .components-tip p{margin:1em 0}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions{display:flex;margin:20px auto;padding:1em 0 0;align-items:center;vertical-align:middle;max-width:450px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__done-button{margin:0;order:3;line-height:32px;height:auto}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__cancel-button{margin:0 1em 0 auto;order:2}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__reset-button{margin:0;order:1}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__products{margin:0 auto!important;text-align:center;position:relative;max-width:450px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product{padding:1px 20px;margin:0 auto;background:#fff;box-shadow:0 5px 7px -2px rgba(0,0,0,.2);position:static}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product .wp-block-button__link{margin-top:0}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:after,.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:before{content:"";background:#e0e0e0;display:block;position:absolute;width:100%;top:20px;bottom:20px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:before{right:100%;margin-right:30px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:after{left:100%;margin-left:30px}.components-base-control+.wc-block-reviews-by-product__notice{margin:-16px 0 16px}.components-base-control:nth-last-child(2)+.wc-block-reviews-by-product__notice{margin:-16px 0 12px}.wc-block-single-product__selection{width:100%}.wc-block-single-product__reset-layout{padding:0}.wc-block-single-product__reset-layout svg{margin-right:4px}.wc-block-single-product__edit-card{padding:16px;border-top:1px solid #e0e0e0}.wc-block-single-product__edit-card .wc-block-single-product__edit-card-title{margin:0 0 16px}.wc-block-editor-components-title{background-color:transparent}.wc-block-welcome-guide{width:312px}.wc-block-welcome-guide.components-modal__frame.components-guide{height:auto}.wc-block-welcome-guide__image{background:#00a0d2;margin:0 0 16px}.wc-block-welcome-guide__heading{font-size:24px;line-height:1.4;margin:16px 0;padding:0 24px}.wc-block-welcome-guide__text{font-size:13px;line-height:1.4;margin:0 0 24px;padding:0 24px}.wc-block-welcome-guide__inserter-icon{margin:0 4px;vertical-align:text-top}.wc-block-error-message{margin-bottom:16px;margin-top:8px}.wc-block-api-error .components-placeholder__fieldset{display:block}.wc-block-api-error .wc-block-error-message{margin-top:0}.wc-block-api-error .components-spinner{float:none}.wc-block-editor-components-external-link-card{display:flex;flex-direction:row;text-decoration:none;margin:24px 0;color:inherit;align-items:flex-start}.wc-block-editor-components-external-link-card+.wc-block-editor-components-external-link-card{margin-top:-8px}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__content{flex:1 1 0;padding-right:16px}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__title{font-weight:500;display:block}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__description{color:#757575;display:block;font-size:.875em;margin-top:.5em}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__icon{flex:0 0 24px;margin:0;text-align:right;color:inherit;vertical-align:top}.wc-block-feedback-prompt{background-color:#f7f7f7;border-top:1px solid #e0e0e0;margin:0 -16px;padding:24px;text-align:center}.wc-block-feedback-prompt .wc-block-feedback-prompt__title{margin:0 0 12px}.wc-block-feedback-prompt .wc-block-feedback-prompt__link{color:inherit}.wc-block-feedback-prompt .wc-block-feedback-prompt__link>.gridicon{vertical-align:text-bottom}.woocommerce-product-attributes__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-attributes__operator .components-base-control__label{margin-bottom:0;margin-right:.5em}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:active,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:focus,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:hover{background:#fff}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading{justify-content:center}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0.is-selected:after{background-image:url('data:image/svg+xml;utf8,')}.woocommerce-search-list__item.woocommerce-product-attributes__item[disabled].depth-0:after{margin-left:0;width:auto;background:none}.woocommerce-product-categories__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-categories__operator .components-base-control__label{margin-bottom:0;margin-right:.5em}.woocommerce-search-product__item .woocommerce-search-list__item-name .description{display:block}.woocommerce-search-product__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-product__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-product__item.is-not-active:active,.woocommerce-search-product__item.is-not-active:focus,.woocommerce-search-product__item.is-not-active:hover{background:#fff}.woocommerce-search-product__item.is-loading{justify-content:center}.woocommerce-search-product__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-product__item.depth-0.is-variable:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-product__item.depth-0.is-variable.is-selected:after{background-image:url('data:image/svg+xml;utf8,')}.woocommerce-product-tags__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-tags__operator .components-base-control__label{margin-bottom:0;margin-right:.5em}.wc-block-text-toolbar-button{align-items:center}.wc-block-text-toolbar-button.is-toggled,.wc-block-text-toolbar-button.is-toggled:focus{background:#757575;color:#fff}.block-editor-block-toolbar__slot{flex-shrink:0}.components-toggle-button-control .components-base-control__field{flex-wrap:wrap}.components-toggle-button-control .components-toggle-button-control__label{width:100%;margin-bottom:8px;display:block}.components-toggle-button-control .components-base-control__help{margin-top:0}.wc-block-view-switch-control{text-align:left;background:#f0f2f3;box-shadow:0 0 0 13px #f0f2f3;margin:0 0 27px;visibility:hidden;color:#757575}.has-child-selected .wc-block-view-switch-control,.is-selected .wc-block-view-switch-control{visibility:visible}.wc-block-handpicked-products__selection,.wc-block-products-category__selection,.wc-block-reviews__selection{width:100%}.wc-block-products-category__cancel-button.is-tertiary{margin:1em auto 0}.wc-block-product-categories.wc-block-product-categories ul{margin-left:20px}.wc-block-product-categories .components-placeholder__label svg,.wc-block-product-on-sale .components-placeholder__label svg{margin-right:1ch;fill:currentColor}.wc-block-products-by-attribute__selection{width:100%}.wc-block-featured-product .components-resizable-box__handle{z-index:10}.wc-block-featured-product__message{margin-bottom:16px}.wc-block-featured-product__selection{width:100%}.wc-block-product-search__field.input-control{color:#828b96!important;padding:0}.wc-block-product-search__field.input-control .components-base-control__field{margin-bottom:0}.wc-block-product-search .wc-block-product-search__fields .block-editor-rich-text{flex-grow:1}.wc-block-product-tag__selection{width:100%}.wc-block-product-tag__cancel-button.is-tertiary{margin:1em auto 0}.wc-block-featured-category .components-resizable-box__handle{z-index:10}.wc-block-featured-category .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-featured-category__selection{width:100%}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-webkit-slider-thumb{pointer-events:none}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-moz-range-thumb{pointer-events:none}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-ms-thumb{pointer-events:none}.wc-block-price-slider .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-price-slider .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-price-slider .components-placeholder__fieldset{display:block}.wc-block-price-slider .wc-block-price-slider__add-product-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-price-slider .wc-block-price-slider__add-product-button svg{fill:currentColor;margin-left:.5ch;vertical-align:middle}.wc-block-price-slider .wc-block-price-slider__read_more_button{display:block;margin-bottom:1em}.wc-block-attribute-filter .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-attribute-filter .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-attribute-filter .components-placeholder__fieldset{display:block}.wc-block-attribute-filter .woocommerce-search-list__search{border-top:0;margin-top:0;padding-top:0}.wc-block-attribute-filter .wc-block-attribute-filter__add-attribute-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-attribute-filter .wc-block-attribute-filter__add-attribute-button svg{fill:currentColor;margin-left:.5ch;vertical-align:middle}.wc-block-attribute-filter .wc-block-attribute-filter__read_more_button{display:block;margin-bottom:1em}.wc-block-stock-filter .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-stock-filter .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-stock-filter .components-placeholder__fieldset{display:block}.wc-block-stock-filter .woocommerce-search-list__search{border-top:0;margin-top:0;padding-top:0}.wc-block-stock-filter .wc-block-stock-filter__add-stock-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-stock-filter .wc-block-stock-filter__add-stock-button svg{fill:currentColor;margin-left:.5ch;vertical-align:middle}.wc-block-stock-filter .wc-block-stock-filter__read_more_button{display:block;margin-bottom:1em}@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wp-block-woocommerce-legacy-template__placeholder-copy{max-width:900px;margin-bottom:30px}.wp-block-woocommerce-legacy-template__placeholder-wireframe{width:100%;height:250px;background:#e5e5e5}@media only screen and (min-width:768px){.wp-block-woocommerce-legacy-template__placeholder-wireframe{height:auto;background:transparent}}.wp-block-woocommerce-legacy-template__placeholder .wp-block-woocommerce-legacy-template__placeholder-image{display:none;width:100%;height:auto}@media only screen and (min-width:768px){.wp-block-woocommerce-legacy-template__placeholder .wp-block-woocommerce-legacy-template__placeholder-image{display:block}} \ No newline at end of file diff --git a/build/wc-blocks-google-analytics.asset.php b/build/wc-blocks-google-analytics.asset.php new file mode 100644 index 00000000000..ce822c1ec30 --- /dev/null +++ b/build/wc-blocks-google-analytics.asset.php @@ -0,0 +1 @@ + array('wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'ca4afc6fb8557d3f4bf744a6446d1b9a'); \ No newline at end of file diff --git a/build/wc-blocks-google-analytics.js b/build/wc-blocks-google-analytics.js new file mode 100644 index 00000000000..7507e2a8dfb --- /dev/null +++ b/build/wc-blocks-google-analytics.js @@ -0,0 +1 @@ +!function(e){var t={};function o(c){if(t[c])return t[c].exports;var n=t[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=t,o.d=function(e,t,c){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(c,n,function(t){return e[t]}.bind(null,n));return c},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2)}([function(e,t){e.exports=window.wp.hooks},function(e,t){e.exports=window.wp.i18n},function(e,t,o){"use strict";o.r(t);var c=o(1),n=o(0);const r="woocommerce-google-analytics",i="experimental__woocommerce_blocks",a=(e,t)=>{const o=e.sku?e.sku:"#"+e.id,c="categories"in e&&e.categories.length?e.categories[0].name:"";return{id:o,name:e.name,quantity:t,category:c,price:(parseInt(e.prices.price,10)/10**e.prices.currency_minor_unit).toString()}},u=(e,t)=>{const o=e.sku?e.sku:"#"+e.id,c=e.categories.length?e.categories[0].name:"";return{id:o,name:e.name,list_name:t,category:c,price:(parseInt(e.prices.price,10)/10**e.prices.currency_minor_unit).toString()}},s=(e,t)=>{if("function"!=typeof gtag)throw new Error("Function gtag not implemented.");console.log("Tracking event "+e),window.gtag("event",e,t)};let d=-1;const l=e=>t=>{var o;let{storeCart:c}=t;d!==e&&(s(0===e?"begin_checkout":"checkout_progress",{items:c.cartItems.map(a),coupon:(null===(o=c.cartCoupons[0])||void 0===o?void 0:o.code)||"",currency:c.cartTotals.currency_code,value:(parseInt(c.cartTotals.total_price,10)/10**c.cartTotals.currency_minor_unit).toString(),checkout_step:e}),d=e)},p=e=>{let{step:t,option:o,value:c}=e;return()=>{s("set_checkout_option",{checkout_step:t,checkout_option:o,value:c}),d=t}};Object(n.addAction)(i+"-checkout-render-checkout-form",r,l(0)),Object(n.addAction)(i+"-checkout-set-email-address",r,l(1)),Object(n.addAction)(i+"-checkout-set-shipping-address",r,l(2)),Object(n.addAction)(i+"-checkout-set-billing-address",r,l(3)),Object(n.addAction)(i+"-checkout-set-phone-number",r,e=>{let{step:t,...o}=e;l("shipping"===t?2:3)(o)}),Object(n.addAction)(i+"-checkout-set-selected-shipping-rate",r,e=>{let{shippingRateId:t}=e;p({step:4,option:Object(c.__)("Shipping Method","woo-gutenberg-products-block"),value:t})()}),Object(n.addAction)(i+"-checkout-set-active-payment-method",r,e=>{let{paymentMethodSlug:t}=e;p({step:5,option:Object(c.__)("Payment Method","woo-gutenberg-products-block"),value:t})()}),Object(n.addAction)(i+"-checkout-submit",r,()=>{s("add_payment_info")}),Object(n.addAction)(i+"-cart-add-item",r,e=>{let{product:t,quantity:o=1}=e;s("add_to_cart",{event_category:"ecommerce",event_label:Object(c.__)("Add to Cart","woo-gutenberg-products-block"),items:[a(t,o)]})}),Object(n.addAction)(i+"-cart-remove-item",r,e=>{let{product:t,quantity:o=1}=e;s("remove_from_cart",{event_category:"ecommerce",event_label:Object(c.__)("Remove Cart Item","woo-gutenberg-products-block"),items:[a(t,o)]})}),Object(n.addAction)(i+"-cart-set-item-quantity",r,e=>{let{product:t,quantity:o=1}=e;s("change_cart_quantity",{event_category:"ecommerce",event_label:Object(c.__)("Change Cart Item Quantity","woo-gutenberg-products-block"),items:[a(t,o)]})}),Object(n.addAction)(i+"-product-list-render",r,e=>{let{products:t,listName:o=Object(c.__)("Product List","woo-gutenberg-products-block")}=e;0!==t.length&&s("view_item_list",{event_category:"engagement",event_label:Object(c.__)("Viewing products","woo-gutenberg-products-block"),items:t.map((e,t)=>({...u(e,o),list_position:t+1}))})}),Object(n.addAction)(i+"-product-view-link",r,e=>{let{product:t,listName:o}=e;s("select_content",{content_type:"product",items:[u(t,o)]})}),Object(n.addAction)(i+"-product-search",r,e=>{let{searchTerm:t}=e;s("search",{search_term:t})}),Object(n.addAction)(i+"-product-render",r,e=>{let{product:t,listName:o}=e;t&&s("view_item",{items:[u(t,o)]})}),Object(n.addAction)(i+"-store-notice-create",r,e=>{let{status:t,content:o}=e;"error"===t&&s("exception",{description:o,fatal:!1})})}]); \ No newline at end of file diff --git a/build/wc-blocks-middleware.asset.php b/build/wc-blocks-middleware.asset.php new file mode 100644 index 00000000000..a6ea62dd7fe --- /dev/null +++ b/build/wc-blocks-middleware.asset.php @@ -0,0 +1 @@ + array('wp-api-fetch', 'wp-polyfill'), 'version' => '52ba48418434766581f75e0f4e99e0a6'); \ No newline at end of file diff --git a/build/wc-blocks-middleware.js b/build/wc-blocks-middleware.js new file mode 100644 index 00000000000..19f8fe2d0e4 --- /dev/null +++ b/build/wc-blocks-middleware.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcBlocksMiddleware=function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=148)}({10:function(e,t){e.exports=window.wp.apiFetch},148:function(e,t,o){"use strict";o.r(t);var n=o(10),r=o.n(n);let i="",c=0;try{const e=window.localStorage.getItem("storeApiNonce"),t=e?JSON.parse(e):{};i=(null==t?void 0:t.nonce)||"",c=(null==t?void 0:t.timestamp)||0}catch{}const u=(e,t)=>{e!==i&&(c&&t{const t=e.headers||{};return e.headers={...t,"X-WC-Store-API-Nonce":i},e};r.a.use((e,t)=>{var o,n;return(e=>{const t=e.url||e.path;return!(!t||!e.method||"GET"===e.method)&&null!==/wc\/store\//.exec(t)})(e)&&(e=a(e),Array.isArray(null===(o=e)||void 0===o||null===(n=o.data)||void 0===n?void 0:n.requests)&&(e.data.requests=e.data.requests.map(a))),t(e,t)}),r.a.setNonce=e=>{const t="function"==typeof(null==e?void 0:e.get)?e.get("X-WC-Store-API-Nonce"):e["X-WC-Store-API-Nonce"],o="function"==typeof(null==e?void 0:e.get)?e.get("X-WC-Store-API-Nonce-Timestamp"):e["X-WC-Store-API-Nonce-Timestamp"];t&&u(t,o)},u(wcBlocksMiddlewareConfig.storeApiNonce,wcBlocksMiddlewareConfig.storeApiNonceTimestamp)}}); \ No newline at end of file diff --git a/build/wc-blocks-registry.asset.php b/build/wc-blocks-registry.asset.php new file mode 100644 index 00000000000..ce1638f7024 --- /dev/null +++ b/build/wc-blocks-registry.asset.php @@ -0,0 +1 @@ + array('wp-deprecated', 'wp-element', 'wp-polyfill'), 'version' => 'b57b7383f4d8aafd3509cc6e8baa5ac3'); \ No newline at end of file diff --git a/build/wc-blocks-registry.js b/build/wc-blocks-registry.js new file mode 100644 index 00000000000..7c09f7297be --- /dev/null +++ b/build/wc-blocks-registry.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcBlocksRegistry=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=143)}({0:function(e,t){e.exports=window.wp.element},14:function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},143:function(e,t,n){"use strict";n.r(t),n.d(t,"registerPaymentMethod",(function(){return g})),n.d(t,"registerExpressPaymentMethod",(function(){return v})),n.d(t,"registerPaymentMethodExtensionCallbacks",(function(){return w})),n.d(t,"__experimentalDeRegisterPaymentMethod",(function(){return k})),n.d(t,"__experimentalDeRegisterExpressPaymentMethod",(function(){return M})),n.d(t,"getPaymentMethods",(function(){return P})),n.d(t,"getExpressPaymentMethods",(function(){return T})),n.d(t,"getRegisteredBlockComponents",(function(){return C})),n.d(t,"getRegisteredInnerBlocks",(function(){return x})),n.d(t,"registerBlockComponent",(function(){return O})),n.d(t,"registerInnerBlock",(function(){return S}));var o=n(6),r=n.n(o),a=n(14),i=n.n(a),s=n(0);const c={},l=c,u=(e,t,n)=>{const o=((e,t)=>n=>((null==n?void 0:n.paymentRequirements)||[]).every(e=>t.includes(e))&&e(n))(e,t);return Object.values(l).some(e=>n in e)?((e,t,n)=>o=>{let r=e(o);if(r){const e={};Object.entries(t).forEach(t=>{let[o,r]=t;e[o]=r[n]}),r=Object.keys(e).every(t=>{try{return e[t](o)}catch(e){return console.error(`Error when executing callback for ${n} in ${t}`,e),!0}})}return r})(o,l,n):o},p=(e,t)=>{if(null!==e&&!Object(s.isValidElement)(e))throw new TypeError(`The ${t} property for the payment method must be a React element or null.`)},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=t.reduce((t,n)=>(e.hasOwnProperty(n)||t.push(n),t),[]);if(n.length>0)throw new TypeError("The payment method configuration object is missing the following properties:"+n.join(", "))},m=()=>null;class h{constructor(e){var t,n,o,r;h.assertValidConfig(e),this.name=e.name,this.label=e.label,this.placeOrderButtonLabel=e.placeOrderButtonLabel,this.ariaLabel=e.ariaLabel,this.content=e.content,this.savedTokenComponent=e.savedTokenComponent,this.icons=e.icons||null,this.edit=e.edit,this.paymentMethodId=e.paymentMethodId||this.name,this.supports={showSavedCards:(null==e||null===(t=e.supports)||void 0===t?void 0:t.showSavedCards)||(null==e||null===(n=e.supports)||void 0===n?void 0:n.savePaymentInfo)||!1,showSaveOption:(null==e||null===(o=e.supports)||void 0===o?void 0:o.showSaveOption)||!1,features:(null==e||null===(r=e.supports)||void 0===r?void 0:r.features)||["products"]},this.canMakePaymentFromConfig=e.canMakePayment}get canMakePayment(){return u(this.canMakePaymentFromConfig,this.supports.features,this.name)}}i()(h,"assertValidConfig",e=>{var t,n,o,a,i,c,l;if(e.savedTokenComponent=e.savedTokenComponent||Object(s.createElement)(m,null),d(e,["name","label","ariaLabel","content","edit","canMakePayment"]),"string"!=typeof e.name)throw new Error("The name property for the payment method must be a string");if(void 0!==e.icons&&!Array.isArray(e.icons)&&null!==e.icons)throw new Error("The icons property for the payment method must be an array or null.");if("string"!=typeof e.paymentMethodId&&void 0!==e.paymentMethodId)throw new Error("The paymentMethodId property for the payment method must be a string or undefined (in which case it will be the value of the name property).");if("string"!=typeof e.placeOrderButtonLabel&&void 0!==e.placeOrderButtonLabel)throw new TypeError("The placeOrderButtonLabel property for the payment method must be a string");if(((e,t)=>{if(null!==e&&!Object(s.isValidElement)(e)&&"string"!=typeof e)throw new TypeError("The label property for the payment method must be a React element, a string, or null.")})(e.label),p(e.content,"content"),p(e.edit,"edit"),p(e.savedTokenComponent,"savedTokenComponent"),"string"!=typeof e.ariaLabel)throw new TypeError("The ariaLabel property for the payment method must be a string");if("function"!=typeof e.canMakePayment)throw new TypeError("The canMakePayment property for the payment method must be a function.");if(void 0!==(null===(t=e.supports)||void 0===t?void 0:t.showSavedCards)&&"boolean"!=typeof(null===(n=e.supports)||void 0===n?void 0:n.showSavedCards))throw new TypeError("If the payment method includes the `supports.showSavedCards` property, it must be a boolean");if(void 0!==(null===(o=e.supports)||void 0===o?void 0:o.savePaymentInfo)&&r()("Passing savePaymentInfo when registering a payment method.",{alternative:"Pass showSavedCards and showSaveOption",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3686"}),void 0!==(null===(a=e.supports)||void 0===a?void 0:a.features)&&!Array.isArray(null===(i=e.supports)||void 0===i?void 0:i.features))throw new Error("The features property for the payment method must be an array or undefined.");if(void 0!==(null===(c=e.supports)||void 0===c?void 0:c.showSaveOption)&&"boolean"!=typeof(null===(l=e.supports)||void 0===l?void 0:l.showSaveOption))throw new TypeError("If the payment method includes the `supports.showSaveOption` property, it must be a boolean")});class f{constructor(e){var t;f.assertValidConfig(e),this.name=e.name,this.content=e.content,this.edit=e.edit,this.paymentMethodId=e.paymentMethodId||this.name,this.supports={features:(null==e||null===(t=e.supports)||void 0===t?void 0:t.features)||["products"]},this.canMakePaymentFromConfig=e.canMakePayment}get canMakePayment(){return u(this.canMakePaymentFromConfig,this.supports.features,this.name)}}i()(f,"assertValidConfig",e=>{var t,n;if(d(e,["name","content","edit"]),"string"!=typeof e.name)throw new TypeError("The name property for the express payment method must be a string");if("string"!=typeof e.paymentMethodId&&void 0!==e.paymentMethodId)throw new Error("The paymentMethodId property for the payment method must be a string or undefined (in which case it will be the value of the name property).");if(void 0!==(null===(t=e.supports)||void 0===t?void 0:t.features)&&!Array.isArray(null===(n=e.supports)||void 0===n?void 0:n.features))throw new Error("The features property for the payment method must be an array or undefined.");if(p(e.content,"content"),p(e.edit,"edit"),"function"!=typeof e.canMakePayment)throw new TypeError("The canMakePayment property for the express payment method must be a function.")});const y={},b={},g=e=>{let t;"function"==typeof e?(t=e(h),r()("Passing a callback to registerPaymentMethod()",{alternative:"a config options object",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3404"})):t=new h(e),t instanceof h&&(y[t.name]=t)},v=e=>{let t;"function"==typeof e?(t=e(f),r()("Passing a callback to registerExpressPaymentMethod()",{alternative:"a config options object",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3404"})):t=new f(e),t instanceof f&&(b[t.name]=t)},w=(e,t)=>{c[e]?console.error(`The namespace provided to registerPaymentMethodExtensionCallbacks must be unique. Callbacks have already been registered for the ${e} namespace.`):(c[e]={},Object.entries(t).forEach(t=>{let[n,o]=t;"function"==typeof o?c[e][n]=o:console.error(`All callbacks provided to registerPaymentMethodExtensionCallbacks must be functions. The callback for the ${n} payment method in the ${e} namespace was not a function.`)}))},k=e=>{delete y[e]},M=e=>{delete b[e]},P=()=>y,T=()=>b,E={};function C(e){return{..."object"==typeof E[e]&&Object.keys(E[e]).length>0?E[e]:{},...E.any}}function x(e){return r()("getRegisteredInnerBlocks",{version:"2.8.0",alternative:"getRegisteredBlockComponents",plugin:"WooCommerce Blocks"}),C(e)}function O(e){e.context||(e.context="any"),j(e,"context","string"),j(e,"blockName","string"),I(e,"component");const{context:t,blockName:n,component:o}=e;E[t]||(E[t]={}),E[t][n]=o}const I=(e,t)=>{if(e[t]){if("function"==typeof e[t])return;if(e[t].$$typeof&&e[t].$$typeof===Symbol.for("react.lazy"))return}throw new Error(`Incorrect value for the ${t} argument when registering a block component. Component must be a valid React Element or Lazy callback.`)},j=(e,t,n)=>{const o=typeof e[t];if(o!==n)throw new Error(`Incorrect value for the ${t} argument when registering a block component. It was a ${o}, but must be a ${n}.`)};function S(e){r()("registerInnerBlock",{version:"2.8.0",alternative:"registerBlockComponent",plugin:"WooCommerce Blocks",hint:'"main" has been replaced with "context" and is now optional.'}),j(e,"main","string"),O({...e,context:e.main})}},6:function(e,t){e.exports=window.wp.deprecated}}); \ No newline at end of file diff --git a/build/wc-blocks-shared-context.asset.php b/build/wc-blocks-shared-context.asset.php new file mode 100644 index 00000000000..b59d73290f7 --- /dev/null +++ b/build/wc-blocks-shared-context.asset.php @@ -0,0 +1 @@ + array('wp-element', 'wp-polyfill'), 'version' => '5da9eea37583e005b5aec3d08fbef805'); \ No newline at end of file diff --git a/build/wc-blocks-shared-context.js b/build/wc-blocks-shared-context.js new file mode 100644 index 00000000000..32488b4fa17 --- /dev/null +++ b/build/wc-blocks-shared-context.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcBlocksSharedContext=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=146)}({0:function(e,t){e.exports=window.wp.element},131:function(e,t,r){"use strict";var n=r(132);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,c){if(c!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},132:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},146:function(e,t,r){"use strict";r.r(t),r.d(t,"useInnerBlockLayoutContext",(function(){return i})),r.d(t,"InnerBlockLayoutContextProvider",(function(){return u})),r.d(t,"useProductDataContext",(function(){return l})),r.d(t,"ProductDataContextProvider",(function(){return d}));var n=r(0),o=r(16),a=r.n(o);const c=Object(n.createContext)({parentName:"",parentClassName:"",isLoading:!1}),i=()=>Object(n.useContext)(c),u=e=>{let{parentName:t="",parentClassName:r="",children:o}=e;const a={parentName:t,parentClassName:r};return Object(n.createElement)(c.Provider,{value:a},o)};u.propTypes={children:a.a.node,parentName:a.a.string,parentClassName:a.a.string};const s={id:0,name:"",parent:0,type:"simple",variation:"",permalink:"",sku:"",short_description:"",description:"",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:"0",regular_price:"0",sale_price:"0",price_range:null},price_html:"",average_rating:"0",review_count:0,images:[],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!1,is_in_stock:!1,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,quantity_limit:99,add_to_cart:{text:"Add to cart",description:"Add to cart",url:""}},p=Object(n.createContext)({product:s,hasContext:!1}),l=()=>Object(n.useContext)(p),d=e=>{let{product:t=null,children:r,isLoading:o=!1}=e;const a={product:t||s,hasContext:!0};return Object(n.createElement)(p.Provider,{value:a},o?Object(n.createElement)("div",{className:"is-loading"},r):r)};d.propTypes={children:a.a.node,product:a.a.object}},16:function(e,t,r){e.exports=r(131)()}}); \ No newline at end of file diff --git a/build/wc-blocks-shared-hocs.asset.php b/build/wc-blocks-shared-hocs.asset.php new file mode 100644 index 00000000000..eef427b5465 --- /dev/null +++ b/build/wc-blocks-shared-hocs.asset.php @@ -0,0 +1 @@ + array('wc-blocks-shared-context', 'wp-api-fetch', 'wp-element', 'wp-polyfill'), 'version' => '65ec8c5377e7514b48bf1291e7de8b46'); \ No newline at end of file diff --git a/build/wc-blocks-shared-hocs.js b/build/wc-blocks-shared-hocs.js new file mode 100644 index 00000000000..46bf3b96d50 --- /dev/null +++ b/build/wc-blocks-shared-hocs.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcBlocksSharedHocs=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=145)}({0:function(e,t){e.exports=window.wp.element},10:function(e,t){e.exports=window.wp.apiFetch},145:function(e,t,r){"use strict";r.r(t),r.d(t,"withProductDataContext",(function(){return l})),r.d(t,"withFilteredAttributes",(function(){return f}));var n=r(9),o=r.n(n),c=r(0),u=r(10),a=r.n(u),s=r(21);const i=e=>{const{productId:t,OriginalComponent:r}=e,[n,o]=Object(c.useState)(null),[u,i]=Object(c.useState)(!0);return Object(c.useEffect)(()=>{e.product&&(o(e.product),i(!1))},[e.product]),Object(c.useEffect)(()=>{t>0&&(i(!0),a()({path:"/wc/store/products/"+t}).then(e=>{o(e)}).catch(async()=>{o(null)}).finally(()=>{i(!1)}))},[t]),u||n?Object(c.createElement)(s.ProductDataContextProvider,{product:n,isLoading:u},Object(c.createElement)(r,e)):null},l=e=>t=>{const r=Object(s.useProductDataContext)();return t.product||!r.hasContext?Object(c.createElement)(i,o()({},t,{OriginalComponent:e})):Object(c.createElement)(e,t)},f=e=>t=>r=>{const n=((e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r})(e,r);return Object(c.createElement)(t,o()({},r,n))}},21:function(e,t){e.exports=window.wc.wcBlocksSharedContext},9:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-suspense-placeholder{-webkit-animation:none;animation:none}}.wc-block-suspense-placeholder:after{content:" "}.wc-block-grid__products .wc-block-grid__product-image{text-decoration:none;display:block;position:relative}.wc-block-grid__products .wc-block-grid__product-image a{text-decoration:none;border:0;outline:0;box-shadow:none}.wc-block-grid__products .wc-block-grid__product-image img{height:auto;width:100%}.wc-block-grid__products .wc-block-grid__product-image img[hidden]{display:none}.wc-block-grid__products .wc-block-grid__product-image img[alt=""]{border:1px solid #f2f2f2}.edit-post-visual-editor .editor-block-list__block .wc-block-grid__product-title,.editor-styles-wrapper .wc-block-grid__product-title,.wc-block-grid__product-title{font-family:inherit;line-height:1.2em;font-weight:700;padding:0;color:inherit;font-size:inherit;display:block}.wc-block-grid__product-price{display:block}.wc-block-grid__product-price .wc-block-grid__product-price__regular{margin-left:.5em}.wc-block-grid__product-add-to-cart.wp-block-button{word-break:break-word;white-space:normal}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link{word-break:break-word;white-space:normal;margin:0 auto!important;display:inline-flex;justify-content:center;text-align:center;padding:.5em 1em;font-size:1em}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.loading{opacity:.25}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.added:after{font-family:WooCommerce;content:"";margin-right:.5em;display:inline-block;width:auto;height:auto}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.loading:after{font-family:WooCommerce;content:"";-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite;margin-right:.5em;display:inline-block;width:auto;height:auto}.has-5-columns:not(.alignfull) .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-6-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-7-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-8-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-9-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after{content:"";margin:0}.wc-block-grid__product-rating{display:block}.wc-block-grid__product-rating .star-rating,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;margin:0 auto;text-align:right}.wc-block-grid__product-rating .star-rating:before,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars:before{content:"SSSSS";top:0;right:0;left:0;position:absolute;opacity:.5;color:#aaa;white-space:nowrap}.wc-block-grid__product-rating .star-rating span,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars span{overflow:hidden;top:0;right:0;left:0;position:absolute;padding-top:1.5em}.wc-block-grid__product-rating .star-rating span:before,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars span:before{content:"SSSSS";top:0;right:0;left:0;position:absolute;color:#000;white-space:nowrap}.wc-block-grid__product-onsale{font-size:.875em;padding:.25em .75em;display:inline-block;width:auto;border:1px solid #43454b;border-radius:3px;color:#43454b;background:#fff;text-align:center;text-transform:uppercase;font-weight:600;z-index:9;position:relative}.wc-block-grid__product .wc-block-grid__product-image,.wc-block-grid__product .wc-block-grid__product-title{margin:0 0 12px}.wc-block-grid__product .wc-block-grid__product-add-to-cart,.wc-block-grid__product .wc-block-grid__product-onsale,.wc-block-grid__product .wc-block-grid__product-price,.wc-block-grid__product .wc-block-grid__product-rating{margin:0 auto 12px}.theme-twentysixteen .wc-block-grid .price ins{color:#77a464}.theme-twentynineteen .wc-block-grid__product{font-size:.88889em}.theme-twentynineteen .wc-block-components-product-sale-badge,.theme-twentynineteen .wc-block-components-product-title,.theme-twentynineteen .wc-block-grid__product-onsale,.theme-twentynineteen .wc-block-grid__product-title{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.theme-twentynineteen .wc-block-grid__product-title:before{display:none}.theme-twentynineteen .wc-block-components-product-sale-badge,.theme-twentynineteen .wc-block-grid__product-onsale{line-height:1}.theme-twentynineteen .editor-styles-wrapper .wp-block-button .wp-block-button__link:not(.has-text-color){color:#fff}.theme-twentytwenty .wc-block-grid__product-link{color:#000}.theme-twentytwenty .wc-block-components-product-title,.theme-twentytwenty .wc-block-grid__product-title{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;color:#cd2653;font-size:1em}.theme-twentytwenty .wp-block-columns .wc-block-components-product-title{margin-top:0}.theme-twentytwenty .wc-block-components-product-price .woocommerce-Price-amount,.theme-twentytwenty .wc-block-components-product-price__value,.theme-twentytwenty .wc-block-grid__product-price .woocommerce-Price-amount,.theme-twentytwenty .wc-block-grid__product-price__value{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;font-size:.9em}.theme-twentytwenty .wc-block-components-product-price del,.theme-twentytwenty .wc-block-grid__product-price del{opacity:.5}.theme-twentytwenty .wc-block-components-product-price ins,.theme-twentytwenty .wc-block-grid__product-price ins{text-decoration:none}.theme-twentytwenty .star-rating,.theme-twentytwenty .wc-block-grid__product-rating{font-size:.7em}.theme-twentytwenty .star-rating .wc-block-components-product-rating__stars,.theme-twentytwenty .star-rating .wc-block-grid__product-rating__stars,.theme-twentytwenty .wc-block-grid__product-rating .wc-block-components-product-rating__stars,.theme-twentytwenty .wc-block-grid__product-rating .wc-block-grid__product-rating__stars{line-height:1}.theme-twentytwenty .wc-block-components-product-button>.wp-block-button__link,.theme-twentytwenty .wc-block-grid__product-add-to-cart>.wp-block-button__link{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif}.theme-twentytwenty .wc-block-components-product-sale-badge,.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{background:#cd2653;color:#fff;font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;font-weight:700;letter-spacing:-.02em;line-height:1.2;text-transform:uppercase}.theme-twentytwenty .wc-block-grid__products .wc-block-components-product-sale-badge{position:static}.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-image .wc-block-components-product-sale-badge{position:absolute}.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale:not(.wc-block-components-product-sale-badge){position:absolute;left:4px;top:4px;z-index:1}.theme-twentytwenty .wc-block-active-filters__title,.theme-twentytwenty .wc-block-attribute-filter__title,.theme-twentytwenty .wc-block-price-filter__title,.theme-twentytwenty .wc-block-stock-filter__title{font-size:1em}.theme-twentytwenty .wc-block-active-filters .wc-block-active-filters__clear-all{font-size:.75em}.theme-twentytwenty .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link{font-size:.75em;padding:.5em}@media only screen and (min-width:768px){.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{font-size:.875em;padding:.5em}}@media only screen and (min-width:1168px){.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{font-size:.875em;padding:.5em}}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.screen-reader-text:focus{background-color:#fff;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#2b2d2f;display:block;font-size:.875rem;font-weight:700;height:auto;right:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.wc-block-components-product-add-to-cart-attribute-picker{margin:0;flex-basis:100%}.wc-block-components-product-add-to-cart-attribute-picker label{display:block;font-size:1em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__container{position:relative}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select{margin:0 0 .75em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select select{min-width:60%;min-height:1.75em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error{margin-bottom:24px}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error select{border-color:#cc1818}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error select:focus{outline-color:#cc1818}.wc-block-components-product-add-to-cart{margin:0;display:flex;flex-wrap:wrap}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button{margin:0 0 .75em}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button .wc-block-components-button__text{display:block}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button .wc-block-components-button__text>svg{fill:currentColor;vertical-align:top;width:1.5em;height:1.5em;margin:-.25em .5em -.25em 0}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity{margin:0 0 .75em 1em;flex-basis:5em;padding:.618em;background:#fff;border:1px solid #ccc;border-radius:2px;color:#43454b;box-shadow:inset 0 1px 1px rgba(0,0,0,.125);text-align:center}.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button>*,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity>*,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button>*,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity{-webkit-animation:none;animation:none}}.wc-block-grid .wc-block-components-product-add-to-cart{justify-content:center}.wc-block-components-product-add-to-cart-notice{margin:0}.wp-block-button.wc-block-components-product-button{word-break:break-word;white-space:normal;margin-top:0;margin-bottom:12px}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button{word-break:break-word;white-space:normal;margin:0 auto;display:inline-flex;justify-content:center}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;min-width:8em;min-height:3em}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;min-width:8em;min-height:3em}.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button{-webkit-animation:none;animation:none}}.theme-twentytwentyone .editor-styles-wrapper .wc-block-components-product-button .wp-block-button__link{background-color:var(--button--color-background);color:var(--button--color-text);border-color:var(--button--color-background)}.wc-block-components-product-category-list{margin-top:0;margin-bottom:.75em}.wc-block-components-product-category-list ul{margin:0;padding:0;display:inline}.wc-block-components-product-category-list ul li{display:inline;list-style:none}.wc-block-components-product-category-list ul li:after{content:", "}.wc-block-components-product-category-list ul li:last-child:after{content:""}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image,.wc-block-components-product-image{margin-top:0;margin-bottom:12px;text-decoration:none;display:block;position:relative}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image a,.wc-block-components-product-image a{text-decoration:none;border:0;outline:0;box-shadow:none}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img,.wc-block-components-product-image img{vertical-align:middle;width:100%}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img[hidden],.wc-block-components-product-image img[hidden]{display:none}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img[alt=""],.wc-block-components-product-image img[alt=""]{border:1px solid #f2f2f2}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-left,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-left{position:absolute;right:4px;top:4px;left:auto;margin:0}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-center,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-center{position:absolute;top:4px;right:50%;left:auto;transform:translateX(50%);margin:0}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-right,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-right{position:absolute;left:4px;top:4px;right:auto;margin:0}.is-loading .wc-block-components-product-image{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.is-loading .wc-block-components-product-image>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-image{-webkit-animation:none;animation:none}}.wc-block-components-product-rating{display:block;margin-top:0;margin-bottom:12px}.wc-block-components-product-rating__stars{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;margin:0 auto;text-align:right}.wc-block-components-product-rating__stars:before{content:"SSSSS";top:0;right:0;left:0;position:absolute;opacity:.5;color:#aaa;white-space:nowrap}.wc-block-components-product-rating__stars span{overflow:hidden;top:0;right:0;left:0;position:absolute;padding-top:1.5em}.wc-block-components-product-rating__stars span:before{content:"SSSSS";top:0;right:0;left:0;position:absolute;color:#000;white-space:nowrap}.wc-block-single-product .wc-block-components-product-rating__stars{margin:0}.wc-block-components-product-sale-badge{margin:0 auto 12px;font-size:.875em;padding:.25em .75em;display:inline-block;width:auto;border:1px solid #43454b;border-radius:3px;color:#43454b;background:#fff;text-align:center;text-transform:uppercase;font-weight:600;z-index:9;position:static}.wc-block-components-product-sku{margin-top:0;margin-bottom:12px;display:block;text-transform:uppercase;font-size:.875em}.wc-block-components-product-stock-indicator{margin-top:0;margin-bottom:.75em;display:block;font-size:.875em}.wc-block-components-product-stock-indicator--in-stock{color:#4ab866}.wc-block-components-product-stock-indicator--out-of-stock{color:#cc1818}.wc-block-components-product-stock-indicator--available-on-backorder,.wc-block-components-product-stock-indicator--low-stock{color:#f0b849}.wc-block-components-product-summary{margin-top:0;margin-bottom:12px}.is-loading .wc-block-components-product-summary:before{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;content:".";display:block;width:100%;height:6em}.is-loading .wc-block-components-product-summary:before>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-summary:before{-webkit-animation:none;animation:none}}.wc-block-components-product-tag-list{margin-top:0;margin-bottom:.75em}.wc-block-components-product-tag-list ul{margin:0;padding:0;display:inline}.wc-block-components-product-tag-list ul li{display:inline;list-style:none}.wc-block-components-product-tag-list ul li:after{content:", "}.wc-block-components-product-tag-list ul li:last-child:after{content:""}.wc-block-components-product-title{margin-top:0;margin-bottom:12px}.wc-block-grid .wc-block-components-product-title{line-height:1.5;font-weight:700;padding:0;color:inherit;font-size:inherit;display:block}.is-loading .wc-block-components-product-title:before{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;content:".";display:inline-block;width:7em}.is-loading .wc-block-components-product-title:before>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-title:before{-webkit-animation:none;animation:none}}.is-loading .wc-block-grid .wc-block-components-product-title:before{width:10em}.wc-block-components-product-title--align-left{text-align:right}.wc-block-components-product-title--align-center{text-align:center}.wc-block-components-product-title--align-right{text-align:left}.wc-block-components-error{display:flex;padding:40px 0;margin:40px 0;align-items:center;justify-content:center;flex-direction:column;color:#757575;text-align:center}.wc-block-components-error__header{font-size:2em;margin:0;color:#646970}.wc-block-components-error__image{width:25%;margin:0 0 24px}.wc-block-components-error__text{margin:1em 0 0;color:#8c8f94;font-size:1.25em;max-width:60ch}.wc-block-components-error__message{margin:1em auto 0;font-style:italic;color:#8c8f94;max-width:60ch}.wc-block-error__button{margin:40px 0 0}.wc-block-components-button:not(.is-link){color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;align-items:center;background-color:#1e1e1e;color:#fff;display:inline-flex;font-weight:700;min-height:3em;justify-content:center;line-height:1;padding:0 1em;text-align:center;text-decoration:none;text-transform:none;position:relative}.wc-block-components-button:not(.is-link):active,.wc-block-components-button:not(.is-link):disabled,.wc-block-components-button:not(.is-link):focus,.wc-block-components-button:not(.is-link):hover{background-color:#1e1e1e;color:#fff}.wc-block-components-button:not(.is-link) .wc-block-components-button__text{display:block}.wc-block-components-button:not(.is-link) .wc-block-components-button__text>svg{fill:currentColor}.wc-block-components-button:not(.is-link) .wc-block-components-spinner+.wc-block-components-button__text{visibility:hidden}.wc-block-components-form{counter-reset:checkout-step}.wc-block-components-form .wc-block-components-checkout-step{position:relative;border:none;padding:0 24px 0 0;background:none;margin:0}.is-mobile .wc-block-components-form .wc-block-components-checkout-step,.is-small .wc-block-components-form .wc-block-components-checkout-step{padding-right:0}.wc-block-components-checkout-step--disabled{opacity:.6}.wc-block-components-checkout-step__container{position:relative}.wc-block-components-checkout-step__content>*{margin-bottom:1em}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__content>:last-child{margin-bottom:0;padding-bottom:1.5em}.wc-block-components-checkout-step__heading{display:flex;justify-content:space-between;align-content:center;flex-wrap:wrap;margin:.75em 0 1em;position:relative;align-items:center;gap:1em}.wc-block-components-checkout-step:first-child .wc-block-components-checkout-step__heading,.wc-block-components-express-payment-continue-rule+.wc-block-components-checkout-step .wc-block-components-checkout-step__heading{margin-top:0}.wc-block-components-checkout-step__title{margin:0 0 0 12px}.wc-block-components-checkout-step__heading-content{font-size:.75em}.wc-block-components-checkout-step__heading-content a{font-weight:700;color:inherit}.wc-block-components-checkout-step__description{font-size:.875em;line-height:1.25;margin-bottom:16px}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;background:transparent;counter-increment:checkout-step;content:" " counter(checkout-step) ".";content:" " counter(checkout-step) "."/"";position:absolute;width:24px;right:-24px;top:0;text-align:center;transform:translateX(50%)}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after{content:"";height:100%;border-right:1px solid;opacity:.3;position:absolute;right:-24px;top:0}.is-mobile .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before,.is-small .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before{position:static;transform:none;right:auto;top:auto;content:counter(checkout-step) ". ";content:counter(checkout-step) ". "/""}.is-mobile .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after,.is-small .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after{content:unset}.editor-styles-wrapper .wp-block h4.wc-block-components-checkout-step__title{font-size:1em;line-height:24px;margin:0 0 0 12px}.wc-block-components-order-summary .wc-block-components-panel__button{padding-top:0;margin-top:0}.wc-block-components-order-summary .wc-block-components-panel__content{margin-bottom:0}.wc-block-components-order-summary__content{display:table;width:100%}.wc-block-components-order-summary-item{position:relative;font-size:.875em;display:flex;padding-bottom:1px;padding-top:16px;width:100%}.wc-block-components-order-summary-item:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-components-order-summary-item:first-child{padding-top:0}.wc-block-components-order-summary-item:last-child>div{padding-bottom:0}.wc-block-components-order-summary-item:last-child:after{display:none}.wc-block-components-order-summary-item .wc-block-components-product-metadata{font-size:1em}.wc-block-components-order-summary-item__description,.wc-block-components-order-summary-item__image{display:table-cell;vertical-align:top}.wc-block-components-order-summary-item__image{width:48px;padding-bottom:16px;position:relative}.wc-block-components-order-summary-item__image>img{width:48px;max-width:48px}.wc-block-components-order-summary-item__quantity{align-items:center;background:#fff;border:2px solid;border-radius:1em;box-shadow:0 0 0 2px #fff;color:#000;display:flex;line-height:1;min-height:20px;padding:0 .4em;position:absolute;justify-content:center;min-width:20px;left:0;top:0;transform:translate(-50%,-50%);white-space:nowrap;z-index:1}.wc-block-components-order-summary-item__description{padding-right:24px;padding-left:12px;padding-bottom:16px}.wc-block-components-order-summary-item__description .wc-block-components-product-metadata,.wc-block-components-order-summary-item__description p{line-height:1.375;margin-top:4px}.wc-block-components-order-summary-item__total-price{font-weight:700;margin-right:auto;text-align:left}.wc-block-components-order-summary-item__individual-prices{display:block}.wc-block-components-payment-method-icons{margin:0 0 14px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center}.wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{display:inline-block;margin:0 4px 2px;padding:0;width:auto;max-width:38px;height:24px;max-height:24px}.wc-block-components-payment-method-icons--align-left{justify-content:flex-start}.wc-block-components-payment-method-icons--align-left .wc-block-components-payment-method-icon{margin-right:0;margin-left:8px}.wc-block-components-payment-method-icons--align-right{justify-content:flex-end}.wc-block-components-payment-method-icons--align-right .wc-block-components-payment-method-icon{margin-left:0;margin-right:8px}.wc-block-components-payment-method-icons:last-child{margin-bottom:0}.is-mobile .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon,.is-small .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{height:16px}.wc-block-components-payment-method-label--with-icon{display:inline-block;vertical-align:middle}.wc-block-components-payment-method-label--with-icon>img,.wc-block-components-payment-method-label--with-icon>svg{vertical-align:middle;margin:-2px 0 0 4px}.is-mobile .wc-block-components-payment-method-label--with-icon>img,.is-mobile .wc-block-components-payment-method-label--with-icon>svg,.is-small .wc-block-components-payment-method-label--with-icon>img,.is-small .wc-block-components-payment-method-label--with-icon>svg{display:none}.editor-styles-wrapper .wc-block-components-checkout-policies,.wc-block-components-checkout-policies{font-size:.75em;text-align:center;list-style:none outside;line-height:1;margin:24px 0}.wc-block-components-checkout-policies__item{list-style:none outside;display:inline-block;padding:0 .25em;margin:0}.wc-block-components-checkout-policies__item:not(:first-child){border-right:1px solid #ccc}.wc-block-components-checkout-policies__item>a{color:inherit;padding:0 .25em}.wc-block-components-product-badge{font-size:.75em;border-radius:2px;border:1px solid;display:inline-block;font-weight:600;padding:0 .66em;text-transform:uppercase;white-space:nowrap}.wc-block-components-product-details.wc-block-components-product-details{list-style:none;margin:.5em 0;padding:0}.wc-block-components-product-details.wc-block-components-product-details:last-of-type{margin-bottom:0}.wc-block-components-product-details.wc-block-components-product-details li{margin-right:0}.wc-block-components-product-details__name,.wc-block-components-product-details__value{display:inline-block}.is-large:not(.wc-block-checkout) .wc-block-components-product-details__name{font-weight:700}img.wc-block-components-product-image[alt=""]{border:1px solid #f2f2f2}.wc-block-components-product-metadata{font-size:.75em}.wc-block-components-product-metadata .wc-block-components-product-metadata__description>p,.wc-block-components-product-metadata .wc-block-components-product-metadata__variation-data{margin:.25em 0}.wc-block-components-checkout-return-to-cart-button{box-shadow:none;color:inherit;padding-right:calc(24px + .25em);position:relative;text-decoration:none}.wc-block-components-checkout-return-to-cart-button svg{right:0;position:absolute;transform:translateY(-50%);top:50%}.wc-block-components-shipping-calculator-address{margin-bottom:0}.wc-block-components-shipping-calculator-address__button{width:100%;margin-top:1.5em}.wc-block-components-shipping-calculator{padding:.5em 0 .75em}.wc-block-components-shipping-rates-control__package .wc-block-components-panel__button{margin-bottom:0;margin-top:0;padding-bottom:.75em;padding-top:.75em}.wc-block-components-shipping-rates-control__package .wc-block-components-panel__content,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control .wc-block-components-radio-control__option-layout,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control__option-layout{padding-bottom:0}.wc-block-components-shipping-rates-control__package-items{font-size:.875em;display:block;list-style:none;margin:0;padding:0}.wc-block-components-shipping-rates-control__package-item{overflow-wrap:anywhere;word-break:break-word;-ms-word-break:break-all;display:inline-block;margin:0;padding:0}.wc-block-components-shipping-rates-control__package-item:not(:last-child):after{content:", ";white-space:pre}.wc-block-components-totals-coupon .wc-block-components-panel__button{margin-top:0;padding-top:0}.wc-block-components-totals-coupon .wc-block-components-panel__content{padding-bottom:0}.wc-block-components-totals-coupon__form{display:flex;width:100%;margin-bottom:0}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__input{margin-bottom:0;margin-top:0;flex-grow:1}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button{height:3em;flex-shrink:0;margin-right:8px;padding-right:24px;padding-left:24px;white-space:nowrap}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button.no-margin{margin:0}.wc-block-components-totals-coupon__content{flex-direction:column;position:relative}.wc-block-components-totals-discount__coupon-list{list-style:none;margin:0;padding:0}.wc-block-components-totals-discount .wc-block-components-totals-item__value{color:#4ab866}.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,.wc-block-components-totals-footer-item .wc-block-components-totals-item__value{font-size:1.25em}.wc-block-components-totals-footer-item .wc-block-components-totals-item__label{font-weight:700}.wc-block-components-totals-footer-item .wc-block-components-totals-footer-item-tax{margin-bottom:0}.wc-block-components-totals-shipping fieldset.wc-block-components-totals-shipping__fieldset{background-color:transparent;margin:0;padding:0;border:0}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__via{margin-bottom:16px}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__description,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__label,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__secondary-description,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__secondary-label{flex-basis:100%;text-align:right}.wc-block-components-totals-shipping .wc-block-components-shipping-rates-control__no-results-notice{margin:0 0 .75em}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:active,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:focus,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:hover{background:transparent;opacity:.8}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:active,.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:focus,.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:hover{background:transparent}.editor-styles-wrapper .wc-block-components-checkbox-list,.wc-block-components-checkbox-list{margin:0;padding:0;list-style:none outside}.editor-styles-wrapper .wc-block-components-checkbox-list li,.wc-block-components-checkbox-list li{margin:0 0 4px;padding:0;list-style:none outside}.editor-styles-wrapper .wc-block-components-checkbox-list li.show-less button,.editor-styles-wrapper .wc-block-components-checkbox-list li.show-more button,.wc-block-components-checkbox-list li.show-less button,.wc-block-components-checkbox-list li.show-more button{background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li,.wc-block-components-checkbox-list.is-loading li{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li>*,.wc-block-components-checkbox-list.is-loading li>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li,.wc-block-components-checkbox-list.is-loading li{-webkit-animation:none;animation:none}}.wc-block-components-chip{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;align-items:center;border:0;display:inline-flex;padding:.125em .5em .25em;margin:0 0 .365em .365em;border-radius:0;line-height:1;max-width:100%}.wc-block-components-chip,.wc-block-components-chip:active,.wc-block-components-chip:focus,.wc-block-components-chip:hover{background:#e0e0e0;color:#1e1e1e}.wc-block-components-chip.wc-block-components-chip--radius-small{border-radius:3px}.wc-block-components-chip.wc-block-components-chip--radius-medium{border-radius:.433em}.wc-block-components-chip.wc-block-components-chip--radius-large{border-radius:2em;padding-right:.75em;padding-left:.75em}.wc-block-components-chip .wc-block-components-chip__text{flex-grow:1}.wc-block-components-chip.is-removable{padding-left:.5em}.wc-block-components-chip.is-removable .wc-block-components-chip__text{padding-left:.25em}.wc-block-components-chip .wc-block-components-chip__remove{font-size:.75em;background:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0}.wc-block-components-chip .wc-block-components-chip__remove-icon{vertical-align:middle}.theme-twentytwentyone .wc-block-components-chip,.theme-twentytwentyone .wc-block-components-chip:active,.theme-twentytwentyone .wc-block-components-chip:focus,.theme-twentytwentyone .wc-block-components-chip:hover{background:#fff}.theme-twentytwentyone .wc-block-components-chip:active button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip:focus button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip:hover button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background){background:transparent}.wc-block-components-chip__remove:focus,.wc-block-components-chip__remove:hover,button.wc-block-components-chip:focus>.wc-block-components-chip__remove,button.wc-block-components-chip:hover>.wc-block-components-chip__remove{fill:#cc1818}.wc-block-components-chip__remove:disabled,button.wc-block-components-chip:disabled>.wc-block-components-chip__remove{fill:#949494;cursor:not-allowed}.wc-block-components-combobox .wc-block-components-combobox-control,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-combobox .wc-block-components-combobox-control .components-base-control__field,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-base-control__field{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-combobox .wc-block-components-combobox-control .components-combobox-control__suggestions-container,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-combobox-control__suggestions-container{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;position:relative}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input{color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;box-sizing:border-box;outline:inherit;border:1px solid #50575e;background:#fff;box-shadow:none;color:#2b2d2f;font-family:inherit;font-weight:400;height:3em;letter-spacing:inherit;line-height:1;padding:1.5em 16px .25em;text-align:right;text-overflow:ellipsis;text-transform:none;white-space:nowrap;width:100%;opacity:1;border-radius:4px}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true],.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true]{background-color:#fff;color:#2b2d2f;outline:0;box-shadow:0 0 0 1px #50575e}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true],.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true]{border-bottom-left-radius:0;border-bottom-right-radius:0}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus{background-color:rgba(0,0,0,.1);color:#fff;box-shadow:0 0 0 1px hsla(0,0%,100%,.4)}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list{position:absolute;z-index:10;background-color:#fff;border:1px solid #50575e;border-top:0;margin:3em 0 0;padding:0;max-height:300px;min-width:100%;overflow:auto;color:#2b2d2f}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list{background-color:#1e1e1e;color:#fff}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion{font-size:1em;color:#757575;cursor:default;list-style:none;margin:0;padding:.25em 16px}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected{background-color:#ddd}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected{background-color:rgba(0,0,0,.4)}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-highlighted,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:active,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:focus,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:hover,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-highlighted,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:active,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:focus,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:hover{background-color:#00669e;color:#fff}.wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;line-height:1.375;position:absolute;transform:translateY(.75em);transform-origin:top right;transition:all .2s ease;color:#757575;z-index:1;margin:0 17px 0 0;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 32px);white-space:nowrap}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{color:hsla(0,0%,100%,.6)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{transition:none}}.wc-block-components-combobox.is-active .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-combobox:focus-within .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox.is-active .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox:focus-within .wc-block-components-combobox-control label.components-base-control__label{transform:translateY(4px) scale(.75)}.wc-block-components-combobox.has-error .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control label.components-base-control__label{color:#cc1818}.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:active,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:hover,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:active,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:hover{border-color:#cc1818}.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus{box-shadow:0 0 0 1px #cc1818}.wc-block-components-country-input{margin-top:1.5em}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}@-webkit-keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(480px)}}@keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(480px)}}@media only screen and (max-width:480px){@-webkit-keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(100vw)}}}.wc-block-components-drawer__screen-overlay{background-color:rgba(95,95,95,.35);bottom:0;right:0;position:fixed;left:0;top:0;transition:opacity .3s;z-index:9999;opacity:1}.wc-block-components-drawer__screen-overlay--with-slide-out{transition:opacity .3s}.wc-block-components-drawer__screen-overlay--with-slide-in{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:fadein;animation-name:fadein}.wc-block-components-drawer__screen-overlay--is-hidden{pointer-events:none;opacity:0}.wc-block-components-drawer{position:relative;background:#fff;display:block;height:100%;right:100%;overflow:auto;position:fixed;left:0;top:0;transform:translateX(480px);width:480px}.wc-block-components-drawer:after{border-style:solid;border-width:0 1px 0 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}@media only screen and (max-width:480px){.wc-block-components-drawer{transform:translateX(100vw);width:100vw}}.wc-block-components-drawer__screen-overlay--with-slide-out .wc-block-components-drawer{transition:transform .3s}.wc-block-components-drawer__screen-overlay--with-slide-in .wc-block-components-drawer{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:slidein;animation-name:slidein}.wc-block-components-drawer__screen-overlay--is-hidden .wc-block-components-drawer{transform:translateX(0)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-drawer,.wc-block-components-drawer__screen-overlay{-webkit-animation-name:none!important;animation-name:none!important;transition:none!important}}.wc-block-components-drawer .components-modal__content{padding:40px 16px}.wc-block-components-drawer .components-modal__header{position:relative}.wc-block-components-drawer .components-modal__header .components-button{border:0;border-radius:0;vertical-align:baseline;background:transparent;position:absolute;left:0;top:0;padding:1em;margin:-1em}.wc-block-components-drawer .components-modal__header .components-button>span{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.wc-block-components-drawer .components-modal__header-heading{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;font-size:1.25rem;word-break:break-word}.wc-block-components-dropdown-selector{max-width:300px;position:relative;width:100%}.wc-block-components-dropdown-selector__input-wrapper{background:#fff;border:1px solid #50575e;color:#2b2d2f;align-items:center;border-radius:4px;cursor:text;display:flex;flex-wrap:wrap;padding:2px 8px}.is-disabled .wc-block-components-dropdown-selector__input-wrapper{background-color:#e0e0e0}.is-multiple.has-checked>.wc-block-components-dropdown-selector__input-wrapper{padding:2px 4px}.is-open>.wc-block-components-dropdown-selector__input-wrapper{border-radius:4px 4px 0 0}.wc-block-components-dropdown-selector__input{font-size:.875em;line-height:1.2857142857;margin:.1875em 0;min-width:0;padding:.1875em 0}.is-single .wc-block-components-dropdown-selector__input{width:100%}.is-single .wc-block-components-dropdown-selector__input:active,.is-single .wc-block-components-dropdown-selector__input:focus,.is-single .wc-block-components-dropdown-selector__input:hover{outline:0}.is-single.has-checked.is-open .wc-block-components-dropdown-selector__input{margin-bottom:1.5px;margin-top:1.5px}.is-single.has-checked:not(.is-open) .wc-block-components-dropdown-selector__input{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px;position:absolute}.is-multiple .wc-block-components-dropdown-selector__input{flex:1;min-width:0}.is-multiple .wc-block-components-dropdown-selector__input,.is-single .wc-block-components-dropdown-selector__input:first-child{background:transparent;border:0}.is-multiple .wc-block-components-dropdown-selector__input:active,.is-multiple .wc-block-components-dropdown-selector__input:focus,.is-multiple .wc-block-components-dropdown-selector__input:hover,.is-single .wc-block-components-dropdown-selector__input:first-child:active,.is-single .wc-block-components-dropdown-selector__input:first-child:focus,.is-single .wc-block-components-dropdown-selector__input:first-child:hover{outline:0}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove{background-color:transparent;border:0;color:inherit;font-size:inherit;font-weight:inherit;text-transform:none}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:active,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:focus,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:hover,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:active,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:focus,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:hover{background-color:transparent;text-decoration:none}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value{font-size:.875em;align-items:center;color:#757575;display:inline-flex;margin:.1875em 0;padding:.1875em 0;width:100%}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label{flex-grow:1;line-height:1.2857142857;padding:0;text-align:right}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove{background-color:transparent;border:0;display:inline-block;line-height:1;padding:0 .3em 0 0}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove>svg{display:block}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-chip{font-size:.875em;margin-top:.1875em;margin-bottom:.1875em;line-height:1.2857142857}.wc-block-components-dropdown-selector__list{background-color:#fff;margin:-1px 0 0;padding:0;position:absolute;right:0;left:0;top:100%;max-height:300px;overflow-y:auto;z-index:1}.wc-block-components-dropdown-selector__list:not(:empty){border:1px solid #9f9f9f}.wc-block-components-dropdown-selector__list-item{font-size:.875em;color:#757575;cursor:default;list-style:none;margin:0;padding:0 4px}.wc-block-components-dropdown-selector__list-item.is-selected{background-color:#ddd}.wc-block-components-dropdown-selector__list-item.is-highlighted,.wc-block-components-dropdown-selector__list-item:active,.wc-block-components-dropdown-selector__list-item:focus,.wc-block-components-dropdown-selector__list-item:hover{background-color:#00669e;color:#fff}.wc-filter-element-label-list-count{opacity:.6}.wc-filter-element-label-list-count:before{content:" ("}.wc-filter-element-label-list-count:after{content:")"}.wc-block-components-filter-submit-button{display:block;margin-right:auto;white-space:nowrap}.wc-block-components-formatted-money-amount{white-space:nowrap}.wc-block-components-load-more{text-align:center;width:100%}.wc-block-components-loading-mask{position:relative;min-height:34px;pointer-events:none}.wc-block-components-loading-mask .components-spinner{position:absolute;margin:0;top:50%;right:50%;transform:translate(50%,-50%)}.wc-block-components-loading-mask .wc-block-components-loading-mask__children{opacity:.25}.wc-block-components-pagination{margin:0 auto 16px}.wc-block-components-pagination__ellipsis,.wc-block-components-pagination__page{font-size:1em;color:#333;display:inline-block;font-weight:400}.wc-block-components-pagination__page{border-color:transparent;padding:.3em .6em;min-width:2.2em}@media(max-width:782px){.wc-block-components-pagination__page{padding:.1em .2em;min-width:1.6em}}.wc-block-components-pagination__page:not(.toggle){background-color:transparent}.wc-block-components-pagination__ellipsis{padding:.3em}@media(max-width:782px){.wc-block-components-pagination__ellipsis{padding:.1em}}.wc-block-components-pagination__page--active[disabled]{color:#333;font-weight:700;opacity:1!important}.wc-block-components-pagination__page--active[disabled]:focus,.wc-block-components-pagination__page--active[disabled]:hover{background-color:inherit;color:#333;opacity:1!important}html[dir=rtl] .wc-block-components-pagination-page--arrow span{display:inline-block;transform:scaleX(-1)}.wc-block-components-price-slider{margin-bottom:24px}.wc-block-components-price-slider.wc-block-components-price-slider--has-filter-button .wc-block-components-price-slider__controls{justify-content:flex-end}.wc-block-components-price-slider.wc-block-components-price-slider--has-filter-button .wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--max{margin-right:0;margin-left:10px}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;pointer-events:none;max-width:100%;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount>*,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button>*,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}.wc-block-components-price-slider__range-input-wrapper{padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:9px;clear:both;position:relative;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);background:#e1e1e1;margin:15px 0}.wc-block-components-price-slider__range-input-progress{height:9px;width:100%;position:absolute;right:0;top:0;--track-background:linear-gradient(90deg,transparent var(--low),var(--range-color) 0,var(--range-color) var(--high),transparent 0) no-repeat 0 100%/100% 100%;--range-color:#af7dd1;background:var(--track-background)}.wc-block-components-price-slider__controls{display:flex}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount{margin:0;border-radius:4px;width:auto;max-width:100px;min-width:0}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--min{margin-left:10px}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--max{margin-right:auto}.wc-block-components-price-slider__range-input{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:0;display:block;position:relative;pointer-events:none;outline:none!important;position:absolute;right:0;top:0}.wc-block-components-price-slider__range-input::-webkit-slider-runnable-track{cursor:default;height:1px;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-webkit-slider-thumb{background-color:transparent;background-position:100% 0;width:28px;height:23px;border:0;padding:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-webkit-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:-6px 0 0}.wc-block-components-price-slider__range-input::-webkit-slider-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input::-webkit-slider-progress{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-focus-outer{border:0}.wc-block-components-price-slider__range-input::-moz-range-track{cursor:default;height:1px;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-progress{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-thumb{background-color:transparent;background-position:100% 0;width:28px;height:23px;border:0;padding:0;margin:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input::-ms-thumb{background-color:transparent;background-position:100% 0;width:28px;height:23px;border:0;padding:0;margin:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-ms-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-ms-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-webkit-slider-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-moz-range-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-ms-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min{z-index:21}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-webkit-slider-thumb{margin-right:-2px;background-position-x:right}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-moz-range-thumb{background-position-x:right;transform:translate(2px,4px)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-ms-thumb{background-position-x:right}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max{z-index:20}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-webkit-slider-thumb{background-position-x:left;margin-right:2px}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-moz-range-thumb{background-position-x:left;transform:translate(-2px,4px)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-ms-thumb{background-position-x:left}.rtl .wc-block-components-price-slider__range-input-progress{--track-background:linear-gradient(270deg,transparent var(--low),var(--range-color) 0,var(--range-color) var(--high),transparent 0) no-repeat 0 100%/100% 100%;--range-color:#af7dd1;background:var(--track-background)}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-price-slider__range-input-wrapper{background:transparent;box-shadow:none;height:24px}.wc-block-components-price-slider__range-input-progress{background:#af7dd1;width:100%;top:7px}.wc-block-components-price-slider__range-input{height:24px;pointer-events:auto}.wc-block-components-price-slider__range-input::-ms-track{background:transparent;border-color:transparent;border-width:7px 0;color:transparent}.wc-block-components-price-slider__range-input::-ms-fill-lower{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input::-ms-fill-upper{background:transparent}.wc-block-components-price-slider__range-input::-ms-tooltip{display:none}.wc-block-components-price-slider__range-input::-ms-thumb{transform:translate(-1px);pointer-events:auto}.wc-block-components-price-slider__range-input--max::-ms-fill-upper{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input--max::-ms-fill-lower{background:transparent}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;pointer-events:none;max-width:100%;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}}@media screen and (-ms-high-contrast:active)and (prefers-reduced-motion:reduce),screen and (-ms-high-contrast:none)and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}@supports(-ms-ime-align:auto){.wc-block-components-price-slider__range-input-wrapper{background:transparent;box-shadow:none;height:24px}.wc-block-components-price-slider__range-input-progress{background:#af7dd1;width:100%;top:7px}.wc-block-components-price-slider__range-input{height:24px;pointer-events:auto}.wc-block-components-price-slider__range-input::-ms-track{background:transparent;border-color:transparent;border-width:7px 0;color:transparent}.wc-block-components-price-slider__range-input::-ms-fill-lower{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input::-ms-fill-upper{background:transparent}.wc-block-components-price-slider__range-input::-ms-tooltip{display:none}.wc-block-components-price-slider__range-input::-ms-thumb{transform:translate(-1px);pointer-events:auto}.wc-block-components-price-slider__range-input--max::-ms-fill-upper{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input--max::-ms-fill-lower{background:transparent}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;pointer-events:none;max-width:100%;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.theme-twentytwentyone .wc-block-components-price-slider__range-input-wrapper{background:transparent;border:3px solid;box-sizing:border-box}.theme-twentytwentyone .wc-block-components-price-slider__range-input-progress{--range-color:currentColor;margin:-3px}.theme-twentytwentyone .wc-block-price-filter__range-input{background:transparent;margin:-3px;width:calc(100% + 6px)}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-webkit-slider-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-webkit-slider-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-moz-range-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-moz-range-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-ms-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-ms-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input::-webkit-slider-thumb{margin-top:-9px}.theme-twentytwentyone .wc-block-price-filter__range-input.wc-block-components-price-slider__range-input--max::-moz-range-thumb{transform:translate(-2px,1px)}.theme-twentytwentyone .wc-block-price-filter__range-input.wc-block-components-price-slider__range-input--min::-moz-range-thumb{transform:translate(2px,1px)}.theme-twentytwentyone .wc-block-price-filter__range-input::-ms-track{border-color:transparent!important}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.theme-twentytwentyone .wc-block-components-price-slider__range-input-wrapper{border:0;height:auto;position:relative;height:50px}.theme-twentytwentyone .wc-block-components-price-slider__range-input-progress{display:none}.theme-twentytwentyone .wc-block-price-filter__range-input{height:100%;margin:0;width:100%}}.wc-block-components-product-sort-select{margin-bottom:24px;text-align:right}@-webkit-keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.wc-block-grid{text-align:center}.wc-block-grid__no-products{padding:40px;text-align:center;width:100%}.wc-block-grid__no-products .wc-block-grid__no-products-image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-grid__no-products .wc-block-grid__no-products-title{display:block;margin:0;font-weight:700}.wc-block-grid__no-products .wc-block-grid__no-products-description{display:block;margin:.25em 0 1em}.wc-block-grid__products{display:flex;flex-wrap:wrap;padding:0;margin:0 -8px 16px;background-clip:padding-box}.wc-block-grid__product{box-sizing:border-box;padding:0;margin:0;float:none;width:auto;position:relative;text-align:center;border-right:8px solid transparent;border-left:8px solid transparent;border-bottom:16px solid transparent;list-style:none}.wc-block-grid__product.wc-block-grid__product{box-sizing:border-box}.theme-twentytwenty .wc-block-grid.has-aligned-buttons .wc-block-grid__product,.wc-block-grid.has-aligned-buttons .wc-block-grid__product{display:flex;flex-direction:column}.theme-twentytwenty .wc-block-grid.has-aligned-buttons .wc-block-grid__product>:last-child,.wc-block-grid.has-aligned-buttons .wc-block-grid__product>:last-child{margin-top:auto;margin-bottom:0;padding-bottom:12px}.theme-twentytwenty .wc-block-grid.has-1-columns .wc-block-grid__product,.wc-block-grid.has-1-columns .wc-block-grid__product{flex:1 0 100%;max-width:100%}.theme-twentytwenty .wc-block-grid.has-2-columns .wc-block-grid__product,.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%}.theme-twentytwenty .wc-block-grid.has-3-columns .wc-block-grid__product,.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 33.33333%;max-width:33.3333333333%}.theme-twentytwenty .wc-block-grid.has-4-columns .wc-block-grid__product,.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 25%;max-width:25%}.theme-twentytwenty .wc-block-grid.has-5-columns .wc-block-grid__product,.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 20%;max-width:20%}.theme-twentytwenty .wc-block-grid.has-6-columns .wc-block-grid__product,.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 16.66667%;max-width:16.6666666667%}.theme-twentytwenty .wc-block-grid.has-7-columns .wc-block-grid__product,.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 14.28571%;max-width:14.2857142857%}.theme-twentytwenty .wc-block-grid.has-8-columns .wc-block-grid__product,.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 12.5%;max-width:12.5%}.theme-twentytwenty .wc-block-grid.has-6-columns .wc-block-grid__product,.wc-block-grid.has-6-columns .wc-block-grid__product{font-size:.5em}.theme-twentytwenty .wc-block-grid.has-5-columns .wc-block-grid__product,.theme-twentytwenty .wc-block-grid.has-6-columns.alignfull .wc-block-grid__product,.wc-block-grid.has-5-columns .wc-block-grid__product,.wc-block-grid.has-6-columns.alignfull .wc-block-grid__product{font-size:.58em}.theme-twentytwenty .wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,.theme-twentytwenty .wc-block-grid.has-5-columns.alignfull .wc-block-grid__product,.wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,.wc-block-grid.has-5-columns.alignfull .wc-block-grid__product{font-size:.75em}.theme-twentytwenty .wc-block-grid.has-3-columns:not(.alignwide):not(.alignfull),.wc-block-grid.has-3-columns:not(.alignwide):not(.alignfull){font-size:.92em}@media(max-width:480px){.wc-block-grid.has-2-columns .wc-block-grid__products{display:block}.wc-block-grid.has-2-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-3-columns .wc-block-grid__products{display:block}.wc-block-grid.has-3-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-4-columns .wc-block-grid__products{display:block}.wc-block-grid.has-4-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-5-columns .wc-block-grid__products{display:block}.wc-block-grid.has-5-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-6-columns .wc-block-grid__products{display:block}.wc-block-grid.has-6-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-7-columns .wc-block-grid__products{display:block}.wc-block-grid.has-7-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-8-columns .wc-block-grid__products{display:block}.wc-block-grid.has-8-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}}@media(min-width:481px)and (max-width:600px){.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-2-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-2-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-3-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-3-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-4-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-4-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-5-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-5-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-6-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-6-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-7-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-7-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-8-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-8-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}}.wc-block-components-product-name{font-size:1em;overflow-wrap:anywhere;word-break:break-word;-ms-word-break:break-all}.wc-block-components-product-price--align-left{display:block;text-align:right}.wc-block-components-product-price--align-center{display:block;text-align:center}.wc-block-components-product-price--align-right{display:block;text-align:left}.wc-block-components-product-price__value.is-discounted{margin-right:.5em}.is-loading .wc-block-components-product-price:before{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;content:".";display:inline-block;width:5em}.is-loading .wc-block-components-product-price:before>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-price:before{-webkit-animation:none;animation:none}}.wc-block-components-quantity-selector{display:flex;width:107px;border:1px solid #ddd;background:#fff;border-radius:4px;box-sizing:content-box;margin:0 0 .25em}.has-dark-controls .wc-block-components-quantity-selector{background-color:transparent;border-color:hsla(0,0%,100%,.4)}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input{font-size:1em;order:2;min-width:40px;flex:1 1 auto;border:0;padding:.4em 0;margin:0;text-align:center;background:transparent;box-shadow:none;color:#000;line-height:1;vertical-align:middle;-moz-appearance:textfield}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus{background:#f0f0f0;outline:1px solid #ddd}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:disabled{color:#949494}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input{color:#fff;background:transparent}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus{background:transparent}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:disabled{color:hsla(0,0%,100%,.3)}.wc-block-components-quantity-selector input::-webkit-inner-spin-button,.wc-block-components-quantity-selector input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button{border:0;padding:0;margin:0;background:none transparent;box-shadow:none;font-size:1em;min-width:30px;cursor:pointer;color:#1e1e1e;font-style:normal;text-align:center;text-decoration:none}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus{outline:2px solid #ddd}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{border:0;padding:0;margin:0;background:none transparent;box-shadow:none;color:#1e1e1e}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus:focus,.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover:focus{outline:2px solid #ddd}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled{color:#949494;cursor:default;border:0;padding:0;margin:0;background:none transparent;box-shadow:none}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled:focus{outline:2px solid #ddd}.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button,.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{color:#fff}.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled{color:hsla(0,0%,100%,.3)}.wc-block-components-quantity-selector>.wc-block-components-quantity-selector__button--minus{order:1}.wc-block-components-quantity-selector>.wc-block-components-quantity-selector__button--plus{order:3}.theme-twentyseventeen .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.theme-twentyseventeen .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{background:none transparent}.wc-block-components-radio-control__option{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;display:block;margin:1em 0;padding:0 2.5em 0 0;position:relative}.wc-block-components-radio-control__option:first-child{margin-top:0}.wc-block-components-radio-control__option:last-child{margin-bottom:0}.wc-block-components-radio-control__option-layout{display:table;width:100%}.wc-block-components-radio-control__option .wc-block-components-radio-control__option-layout:after{display:none}.wc-block-components-radio-control__description-group,.wc-block-components-radio-control__label-group{display:table-row}.wc-block-components-radio-control__description-group>span,.wc-block-components-radio-control__label-group>span{display:table-cell}.wc-block-components-radio-control__description-group .wc-block-components-radio-control__secondary-description,.wc-block-components-radio-control__description-group .wc-block-components-radio-control__secondary-label,.wc-block-components-radio-control__label-group .wc-block-components-radio-control__secondary-description,.wc-block-components-radio-control__label-group .wc-block-components-radio-control__secondary-label{text-align:left;min-width:50%}.wc-block-components-radio-control__label,.wc-block-components-radio-control__secondary-label{line-height:max(1.5rem,24px)}.wc-block-components-radio-control__description,.wc-block-components-radio-control__secondary-description{font-size:.875em;line-height:20px}.wc-block-components-radio-control .wc-block-components-radio-control__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:2px solid #50575e;border-radius:50%;display:inline-block;height:1.5em;min-height:24px;min-width:24px;width:1.5em;position:absolute;right:0;top:50%;transform:translateY(-50%)}.wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background:#000;border-radius:50%;content:"";display:block;height:.75em;right:50%;margin:0;min-height:12px;min-width:12px;position:absolute;top:50%;transform:translate(50%,-50%);width:.75em}.has-dark-controls .wc-block-components-radio-control .wc-block-components-radio-control__input{border-color:hsla(0,0%,100%,.6);background-color:rgba(0,0,0,.1)}.has-dark-controls .wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background:#fff}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:checked{border-width:2px}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background-color:var(--form--color-text)}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:after{display:none}.is-loading .wc-block-components-review-list-item__text{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;display:block;width:60%}.is-loading .wc-block-components-review-list-item__text>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__text{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__text:after{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image:after{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;font-size:1em;width:80px}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author:after{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__product,.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__rating .wc-block-components-review-list-item__rating__stars>span{display:none}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;height:1em;width:120px}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date:after{content:" "}.editor-styles-wrapper .wc-block-components-review-list-item__item,.wc-block-components-review-list-item__item{margin:0 0 48px;list-style:none}.wc-block-components-review-list-item__info{display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr;margin-bottom:24px}.wc-block-components-review-list-item__meta{-ms-grid-column:1;grid-column:1;-ms-grid-row:1;grid-row:1}.wc-block-components-review-list-item__item--has-image .wc-block-components-review-list-item__info{-ms-grid-columns:calc(3em + 16px) 1fr;grid-template-columns:calc(3em + 16px) 1fr}.wc-block-components-review-list-item__item--has-image .wc-block-components-review-list-item__meta{-ms-grid-column:2;grid-column:2}.wc-block-components-review-list-item__image{align-items:center;display:flex;height:3em;-ms-grid-column:1;grid-column:1;-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/3;justify-content:center;position:relative;width:3em}.wc-block-components-review-list-item__image>img{display:block;max-height:100%;-o-object-fit:contain;object-fit:contain}.wc-block-components-review-list-item__verified{width:21px;height:21px;text-indent:21px;margin:0;line-height:21px;overflow:hidden;position:absolute;left:-7px;bottom:-7px}.wc-block-components-review-list-item__verified:before{width:21px;height:21px;background:transparent url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="21" height="21" fill="none"%3E%3Ccircle cx="10.5" cy="10.5" r="10.5" fill="%23fff"/%3E%3Cpath fill="%23008A21" fill-rule="evenodd" d="M2.1667 10.5003c0-4.6 3.7333-8.3333 8.3333-8.3333s8.3334 3.7333 8.3334 8.3333S15.1 18.8337 10.5 18.8337s-8.3333-3.7334-8.3333-8.3334zm2.5 0l4.1666 4.1667 7.5001-7.5-1.175-1.1833-6.325 6.325-2.9917-2.9834-1.175 1.175z" clip-rule="evenodd"/%3E%3Cmask id="a" width="17" height="17" x="2" y="2" maskUnits="userSpaceOnUse"%3E%3Cpath fill="%23fff" fill-rule="evenodd" d="M2.1667 10.5003c0-4.6 3.7333-8.3333 8.3333-8.3333s8.3334 3.7333 8.3334 8.3333S15.1 18.8337 10.5 18.8337s-8.3333-3.7334-8.3333-8.3334zm2.5 0l4.1666 4.1667 7.5001-7.5-1.175-1.1833-6.325 6.325-2.9917-2.9834-1.175 1.175z" clip-rule="evenodd"/%3E%3C/mask%3E%3Cg mask="url(%23a)"%3E%3Cpath fill="%23008A21" d="M.5.5h20v20H.5z"/%3E%3C/g%3E%3C/svg%3E') 50% no-repeat;display:block;content:""}.wc-block-components-review-list-item__meta{display:flex;align-items:center;flex-flow:row wrap}.wc-block-components-review-list-item__meta:after{order:3;content:"";flex-basis:100%}.wc-block-components-review-list-item__author,.wc-block-components-review-list-item__product{display:block;font-weight:700;order:1;margin-left:8px}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author{font-weight:400;order:4}.wc-block-components-review-list-item__published-date{order:5}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date{padding-right:8px;position:relative}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date:before{content:"";display:inline-block;margin-right:-8px;border-left:1px solid;opacity:.5;height:1em;vertical-align:middle;position:absolute;top:calc(50% + .1em);transform:translateY(-50%)}.wc-block-components-review-list-item__author:first-child+.wc-block-components-review-list-item__published-date:before,.wc-block-components-review-list-item__rating+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date:before{display:none}.wc-block-components-review-list-item__rating{order:2}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars{font-size:1em;display:block;top:0;overflow:hidden;position:relative;height:1em;line-height:1;width:5.3em;font-family:star;font-weight:400}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars:before{content:"SSSSS";opacity:.25;float:right;top:0;right:0;position:absolute}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars span{overflow:hidden;float:right;top:0;right:0;position:absolute;padding-top:1.5em}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars span:before{content:"SSSSS";top:0;position:absolute;right:0;color:#e6a237}.wc-block-components-review-list-item__text p{font-size:inherit}.wc-block-components-review-list.wc-block-components-review-list{margin:0}.wc-block-components-review-sort-select{text-align:left}.wc-block-components-sidebar-layout{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wc-block-components-sidebar-layout .wc-block-components-main{box-sizing:border-box;margin:0;padding-left:3.7735849057%;width:65%}.wc-block-components-sidebar{box-sizing:border-box;margin:0;padding-right:2.2641509434%;width:35%}.wc-block-components-sidebar .wc-block-components-panel>h2{font-size:1em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.is-medium.wc-block-components-sidebar-layout,.is-mobile.wc-block-components-sidebar-layout,.is-small.wc-block-components-sidebar-layout{flex-direction:column;margin:0 auto 16px}.is-medium.wc-block-components-sidebar-layout .wc-block-components-main,.is-medium.wc-block-components-sidebar-layout .wc-block-components-sidebar,.is-mobile.wc-block-components-sidebar-layout .wc-block-components-main,.is-mobile.wc-block-components-sidebar-layout .wc-block-components-sidebar,.is-small.wc-block-components-sidebar-layout .wc-block-components-main,.is-small.wc-block-components-sidebar-layout .wc-block-components-sidebar{padding:0;width:100%}.is-large .wc-block-components-sidebar .wc-block-components-panel,.is-large .wc-block-components-sidebar .wc-block-components-totals-item{padding-right:16px;padding-left:16px}.is-large .wc-block-components-sidebar .wc-block-components-panel .wc-block-components-totals-item{padding:0}.wc-block-components-sidebar .wc-block-components-panel>h2{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit}.wc-block-components-sidebar .wc-block-components-panel>h2 .wc-block-components-panel__button{font-weight:400}.theme-twentytwenty .wc-block-components-sidebar .wc-block-components-panel>h2{font-size:1.25em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-sort-select{margin-bottom:12px}.wc-block-components-sort-select__label{margin-left:12px;display:inline-block;font-weight:400}.wc-block-components-sort-select__select{font-size:inherit;width:-webkit-max-content;width:-moz-max-content;width:max-content}.wc-block-components-spinner{position:absolute;width:100%;height:100%;color:inherit;box-sizing:content-box;text-align:center;font-size:1.25em}.wc-block-components-spinner:after{content:" ";position:absolute;top:50%;right:50%;margin:-.5em -.5em 0 0;width:1em;height:1em;box-sizing:border-box;transform-origin:50% 50%;transform:translateZ(0) scale(.5);-webkit-backface-visibility:hidden;backface-visibility:hidden;border-radius:50%;border:.2em solid;border-right:.2em solid transparent;-webkit-animation:wc-block-components-spinner__animation 1s linear infinite;animation:wc-block-components-spinner__animation 1s linear infinite}@-webkit-keyframes wc-block-components-spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(-1turn)}}@keyframes wc-block-components-spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(-1turn)}}.wc-block-components-state-input{margin-top:1.5em}.wc-block-components-tabs .wc-block-components-tabs__list{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item{border:none;flex:auto;background:transparent;padding:12px 16px;color:inherit;outline-offset:-1px;text-align:center;transition:box-shadow .1s linear;box-shadow:inset 0 -1px currentColor;border-radius:0}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item.is-active{box-shadow:inset 0 -3px currentColor;font-weight:600;position:relative}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:focus{outline-offset:-1px;outline:1px dotted currentColor}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:active,.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:hover{background:transparent}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content{font-size:1em;line-height:1;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:inline-block;font-weight:700}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content>img,.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content>svg{height:1.2em;vertical-align:middle;margin:.2em 0 -.2em}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content .wc-block-components-payment-method-icons{margin:.2em 0 -.2em}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{height:1.2em;vertical-align:middle}.wc-block-components-tabs .wc-block-components-tabs__content{padding:16px 0;text-transform:none}.wc-block-components-form .wc-block-components-text-input,.wc-block-components-text-input{position:relative;margin-top:1.5em;white-space:nowrap}.wc-block-components-form .wc-block-components-text-input label,.wc-block-components-text-input label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;position:absolute;transform:translateY(.75em);right:0;top:0;transform-origin:top right;line-height:1.375;color:#757575;transition:transform .2s ease;margin:0 17px 0 0;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 32px);cursor:text}.has-dark-controls .wc-block-components-form .wc-block-components-text-input label,.has-dark-controls .wc-block-components-text-input label{color:hsla(0,0%,100%,.6)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-form .wc-block-components-text-input label,.wc-block-components-text-input label{transition:none}}.wc-block-components-form .wc-block-components-text-input input:-webkit-autofill+label,.wc-block-components-text-input input:-webkit-autofill+label{transform:translateY(4px) scale(.75)}.wc-block-components-form .wc-block-components-text-input.is-active label,.wc-block-components-text-input.is-active label{transform:translateY(4px) scale(.75)}.wc-block-components-form .wc-block-components-text-input input[type=email],.wc-block-components-form .wc-block-components-text-input input[type=number],.wc-block-components-form .wc-block-components-text-input input[type=tel],.wc-block-components-form .wc-block-components-text-input input[type=text],.wc-block-components-form .wc-block-components-text-input input[type=url],.wc-block-components-text-input input[type=email],.wc-block-components-text-input input[type=number],.wc-block-components-text-input input[type=tel],.wc-block-components-text-input input[type=text],.wc-block-components-text-input input[type=url]{font-size:1em;background-color:#fff;padding:.75em 16px;border-radius:4px;border:1px solid #50575e;width:100%;line-height:1.375;font-family:inherit;margin:0;box-sizing:border-box;height:3em;min-height:0;color:#2b2d2f}.wc-block-components-form .wc-block-components-text-input input[type=email]:focus,.wc-block-components-form .wc-block-components-text-input input[type=number]:focus,.wc-block-components-form .wc-block-components-text-input input[type=tel]:focus,.wc-block-components-form .wc-block-components-text-input input[type=text]:focus,.wc-block-components-form .wc-block-components-text-input input[type=url]:focus,.wc-block-components-text-input input[type=email]:focus,.wc-block-components-text-input input[type=number]:focus,.wc-block-components-text-input input[type=tel]:focus,.wc-block-components-text-input input[type=text]:focus,.wc-block-components-text-input input[type=url]:focus{background-color:#fff;color:#2b2d2f;outline:0;box-shadow:0 0 0 1px #50575e}.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=email],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=number],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=tel],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=text],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=url],.has-dark-controls .wc-block-components-text-input input[type=email],.has-dark-controls .wc-block-components-text-input input[type=number],.has-dark-controls .wc-block-components-text-input input[type=tel],.has-dark-controls .wc-block-components-text-input input[type=text],.has-dark-controls .wc-block-components-text-input input[type=url]{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=email]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=number]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=tel]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=text]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=url]:focus,.has-dark-controls .wc-block-components-text-input input[type=email]:focus,.has-dark-controls .wc-block-components-text-input input[type=number]:focus,.has-dark-controls .wc-block-components-text-input input[type=tel]:focus,.has-dark-controls .wc-block-components-text-input input[type=text]:focus,.has-dark-controls .wc-block-components-text-input input[type=url]:focus{background-color:rgba(0,0,0,.1);color:#fff;box-shadow:0 0 0 1px hsla(0,0%,100%,.4)}.wc-block-components-form .wc-block-components-text-input input[type=number],.wc-block-components-text-input input[type=number]{-moz-appearance:textfield}.wc-block-components-form .wc-block-components-text-input input[type=number]::-webkit-inner-spin-button,.wc-block-components-form .wc-block-components-text-input input[type=number]::-webkit-outer-spin-button,.wc-block-components-text-input input[type=number]::-webkit-inner-spin-button,.wc-block-components-text-input input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.wc-block-components-form .wc-block-components-text-input.is-active input[type=email],.wc-block-components-form .wc-block-components-text-input.is-active input[type=number],.wc-block-components-form .wc-block-components-text-input.is-active input[type=tel],.wc-block-components-form .wc-block-components-text-input.is-active input[type=text],.wc-block-components-form .wc-block-components-text-input.is-active input[type=url],.wc-block-components-text-input.is-active input[type=email],.wc-block-components-text-input.is-active input[type=number],.wc-block-components-text-input.is-active input[type=tel],.wc-block-components-text-input.is-active input[type=text],.wc-block-components-text-input.is-active input[type=url]{padding:1.5em 16px .25em 0}.wc-block-components-form .wc-block-components-text-input.has-error input,.wc-block-components-form .wc-block-components-text-input.has-error input:active,.wc-block-components-form .wc-block-components-text-input.has-error input:focus,.wc-block-components-form .wc-block-components-text-input.has-error input:hover,.wc-block-components-text-input.has-error input,.wc-block-components-text-input.has-error input:active,.wc-block-components-text-input.has-error input:focus,.wc-block-components-text-input.has-error input:hover{border-color:#cc1818}.wc-block-components-form .wc-block-components-text-input.has-error input:focus,.wc-block-components-text-input.has-error input:focus{box-shadow:0 0 0 1px #cc1818}.wc-block-components-form .wc-block-components-text-input.has-error label,.wc-block-components-text-input.has-error label{color:#cc1818}.wc-block-components-form .wc-block-components-text-input:only-child,.wc-block-components-text-input:only-child{margin-top:0}.wc-block-components-textarea{font-size:1em;background-color:#fff;border:1px solid #50575e;border-radius:4px;color:#2b2d2f;font-family:inherit;line-height:1.375;margin:0;padding:.75em 16px;width:100%}.has-dark-controls .wc-block-components-textarea{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-textarea::-moz-placeholder{color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-textarea:-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-textarea::placeholder{color:hsla(0,0%,100%,.6)}.theme-twentytwentyone .has-dark-controls .wc-block-components-textarea{background-color:rgba(0,0,0,.1);color:#fff}.theme-twentytwenty .wc-block-components-title.wc-block-components-title,.wc-block-components-title.wc-block-components-title{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;font-size:1.25em;word-break:break-word}.wc-block-components-notices{display:block;margin-bottom:2em}.wc-block-components-notices .wc-block-components-notices__notice{margin:0;display:flex;flex-wrap:nowrap}.wc-block-components-notices .wc-block-components-notices__notice .components-notice__dismiss{background:transparent none;padding:0;margin:0 auto 0 0;border:0;outline:0;color:currentColor}.wc-block-components-notices .wc-block-components-notices__notice .components-notice__dismiss svg{fill:currentColor;vertical-align:text-top}.wc-block-components-notices .wc-block-components-notices__notice+.wc-block-components-notices__notice{margin-top:1em}.theme-twentytwenty .wc-block-components-notices__notice,.theme-twentytwentyone .wc-block-components-notices__notice{padding:1.5rem 3rem}.wc-block-components-notices__snackbar{position:fixed;bottom:20px;right:16px;width:auto}@media(max-width:782px){.wc-block-components-notices__snackbar{position:fixed;top:10px;right:0;bottom:auto}}@media(max-width:782px){.wc-block-components-notices__snackbar .components-snackbar-list__notice-container{margin-right:10px;margin-left:10px}}.wc-block-components-validation-error{font-size:.75em;color:#cc1818;max-width:100%;white-space:normal}.wc-block-components-validation-error>p{margin:0;padding:4px 0 0}.wc-block-components-select+.wc-block-components-validation-error{margin-bottom:24px}.with-scroll-to-top__scroll-point{position:relative;top:-36px}.is-medium .wc-block-cart__sidebar,.is-mobile .wc-block-cart__sidebar,.is-small .wc-block-cart__sidebar{margin-bottom:24px;order:0}.editor-styles-wrapper .wc-block-cart__empty-cart__title,.wc-block-cart__empty-cart__title{font-size:inherit}.wc-block-cart__submit{position:relative;margin:0 0 16px}.wc-block-cart__submit-button{width:100%;margin:0}.wc-block-cart .wc-block-cart__submit-container{padding:0}@media(min-width:783px){.wc-block-cart .wc-block-cart__submit-container--sticky{display:none}}@media(max-width:782px){.wc-block-cart .wc-block-cart__submit-container--sticky{background:#fff;bottom:0;right:0;padding:16px;position:fixed;width:100%;z-index:9999}.wc-block-cart .wc-block-cart__submit-container--sticky:before{box-shadow:0 -10px 20px 10px currentColor;color:hsla(0,0%,80%,.5);content:"";height:100%;right:0;position:absolute;left:0;top:0}}.wc-block-cart .wc-block-components-shipping-calculator{white-space:nowrap}.wc-block-cart .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.wc-block-cart .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.wc-block-cart .wc-block-components-address-form .wc-block-components-text-input:first-of-type{margin-top:0}table.wc-block-cart-items,table.wc-block-cart-items td,table.wc-block-cart-items th{background:none!important;border:0;margin:0}.editor-styles-wrapper table.wc-block-cart-items,table.wc-block-cart-items{width:100%}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header,table.wc-block-cart-items .wc-block-cart-items__header{font-size:.75em;text-transform:uppercase}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image{width:100px}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-product,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-product{visibility:hidden}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-total,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-total{width:100px;text-align:left}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img{width:100%;margin:0}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline;font-size:.75em;text-transform:none;white-space:nowrap}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:active,.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus,.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:active,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover{background:transparent}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name{display:block;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total{font-size:1em;text-align:left;line-height:inherit}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata{margin-bottom:.75em}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row.is-disabled,table.wc-block-cart-items .wc-block-cart-items__row.is-disabled{opacity:.5;pointer-events:none;transition:opacity .2s ease}.wc-block-cart .wc-block-components-totals-footer-item,.wc-block-cart .wc-block-components-totals-taxes{margin:0}.wc-block-cart--is-loading h2 span,.wc-block-cart--is-loading th span,.wc-block-mini-cart__drawer.is-loading h2 span,.wc-block-mini-cart__drawer.is-loading th span{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;min-width:84px;display:inline-block}.wc-block-cart--is-loading h2 span>*,.wc-block-cart--is-loading th span>*,.wc-block-mini-cart__drawer.is-loading h2 span>*,.wc-block-mini-cart__drawer.is-loading th span>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading h2 span,.wc-block-cart--is-loading th span,.wc-block-mini-cart__drawer.is-loading h2 span,.wc-block-mini-cart__drawer.is-loading th span{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading h2 span:after,.wc-block-cart--is-loading th span:after,.wc-block-mini-cart__drawer.is-loading h2 span:after,.wc-block-mini-cart__drawer.is-loading th span:after{content:" "}.wc-block-cart--is-loading h2 span,.wc-block-mini-cart__drawer.is-loading h2 span{min-width:33%}.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-cart--is-loading .wc-block-components-quantity-selector,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.wc-block-cart--is-loading .wc-block-components-product-metadata>*,.wc-block-cart--is-loading .wc-block-components-product-price>*,.wc-block-cart--is-loading .wc-block-components-quantity-selector>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-cart--is-loading .wc-block-components-quantity-selector,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-name,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;min-width:84px;display:inline-block}.wc-block-cart--is-loading .wc-block-components-product-name>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-components-product-name,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-name:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name:after{content:" "}.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata{margin-top:.25em;min-width:8em}.wc-block-cart--is-loading .wc-block-cart-item__remove-link,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__remove-link{visibility:hidden}.wc-block-cart--is-loading .wc-block-cart-item__image>a,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;display:block}.wc-block-cart--is-loading .wc-block-cart-item__image>a>*,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-cart-item__image>a,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price{max-width:3em;display:block;margin-top:.25em}.wc-block-cart--is-loading .wc-block-components-product-price:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price:after{content:" "}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;min-height:460px}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card>*,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card:after,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card:after{content:" "}.wc-block-components-sidebar-layout.wc-block-cart--skeleton{display:none}.is-loading+.wc-block-components-sidebar-layout.wc-block-cart--skeleton{display:flex}.wc-block-cart-item__total-price-and-sale-badge-wrapper{display:flex;flex-direction:column;align-items:flex-end}.wc-block-cart-item__total-price-and-sale-badge-wrapper .wc-block-components-sale-badge{margin-top:4px}.is-medium.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title,.is-mobile .wc-block-cart-item__total .wc-block-components-sale-badge,.is-mobile.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title,.is-small .wc-block-cart-item__total .wc-block-components-sale-badge,.is-small.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title{display:none}.is-medium table.wc-block-cart-items td,.is-mobile table.wc-block-cart-items td,.is-small table.wc-block-cart-items td{padding:0}.is-medium table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-medium table.wc-block-cart-items .wc-block-cart-items__header,.is-mobile table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-mobile table.wc-block-cart-items .wc-block-cart-items__header,.is-small table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-small table.wc-block-cart-items .wc-block-cart-items__header{display:none}.is-medium table.wc-block-cart-items .wc-block-cart-items__row,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row,.is-small table.wc-block-cart-items .wc-block-cart-items__row{position:relative;display:-ms-grid;display:grid;-ms-grid-columns:80px 132px;grid-template-columns:80px 132px;padding:16px 0}.is-medium table.wc-block-cart-items .wc-block-cart-items__row:after,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row:after,.is-small table.wc-block-cart-items .wc-block-cart-items__row:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image{-ms-grid-column:1;grid-column-start:1;-ms-grid-row:1;grid-row-start:1;padding-left:16px}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product{-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:2;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:stretch;justify-self:stretch;padding:0 0 16px 16px}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity{-ms-grid-column:1;grid-column-start:1;-ms-grid-row:2;grid-row-start:2;vertical-align:bottom;padding-left:16px;-ms-grid-row-align:end;align-self:end;padding-top:16px}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total{-ms-grid-row:1;grid-row-start:1}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount{display:inline-block}.is-large.wc-block-cart{margin-bottom:3em}.is-large.wc-block-cart .wc-block-cart-items{position:relative}.is-large.wc-block-cart .wc-block-cart-items:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.is-large.wc-block-cart .wc-block-cart-items th{padding:.25rem 0 .25rem 16px;white-space:nowrap}.is-large.wc-block-cart .wc-block-cart-items td{position:relative;padding:16px 16px 16px 0;vertical-align:top}.is-large.wc-block-cart .wc-block-cart-items td:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.is-large.wc-block-cart .wc-block-cart-items th:last-child{padding-left:0}.is-large.wc-block-cart .wc-block-cart-items td:last-child{padding-left:16px}.is-large.wc-block-cart .wc-block-cart__sidebar>div:not(.wc-block-components-totals-wrapper){margin-right:16px;margin-left:16px}.is-large.wc-block-cart .wc-block-components-radio-control__input{right:0}.is-large.wc-block-cart .wc-block-cart__totals-title{border:0;border-radius:0;margin:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;box-shadow:none;display:inline;background:transparent;font-size:.75em;display:block;font-weight:600;padding:.25rem 0;text-align:left;text-transform:uppercase}.is-large.wc-block-cart .wc-block-components-sidebar .wc-block-components-shipping-calculator,.is-large.wc-block-cart .wc-block-components-sidebar .wc-block-components-shipping-rates-control__package:not(.wc-block-components-panel){padding-right:16px;padding-left:16px}.is-large.wc-block-cart .wc-block-cart__payment-options{padding:16px 0 0}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-empty-cart-block{display:none}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-filled-cart-block{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-items-block{box-sizing:border-box;margin:0;padding-left:3.7735849057%;width:65%;min-height:10em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block{min-height:15em;display:block;-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block{-webkit-animation:none;animation:none}}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-totals-block{box-sizing:border-box;margin:0;padding-right:2.2641509434%;width:35%;min-height:12em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block{min-height:3em;display:block;-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;margin:0 0 1em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block{-webkit-animation:none;animation:none}}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block{height:20em}@media only screen and (max-width:700px){.wp-block-woocommerce-cart.is-loading{padding-top:16px}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-filled-cart-block{flex-direction:column;margin:0 auto 16px}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-items-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-totals-block{padding:0;width:100%}}.wc-block-checkout-error{padding:40px;text-align:center;width:100%}.wc-block-checkout-error .wc-block-checkout-error__image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-checkout-error .wc-block-checkout-error__title{display:block;margin:0;font-weight:700}.wc-block-checkout-error .wc-block-checkout-error__description{display:block;margin:.25em 0 1em}.wc-block-checkout-empty{padding:40px;text-align:center;width:100%}.wc-block-checkout-empty .wc-block-checkout-empty__image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-checkout-empty .wc-block-checkout-empty__title{display:block;margin:0;font-weight:700}.wc-block-checkout-empty .wc-block-checkout-empty__description{display:block;margin:.25em 0 1em}.wc-block-checkout__actions{display:flex;justify-content:space-between;align-items:center}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button{width:50%;padding:1em;height:auto}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button .wc-block-components-button__text{line-height:24px}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button .wc-block-components-button__text>svg{fill:#fff;vertical-align:top}.is-mobile .wc-block-checkout__actions .wc-block-components-checkout-return-to-cart-button{display:none}.is-mobile .wc-block-checkout__actions .wc-block-components-checkout-place-order-button{width:100%}.is-large .wc-block-checkout__actions{position:relative;padding:1.5em 0}.is-large .wc-block-checkout__actions:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-checkout__form{margin:0;max-width:100%}.is-medium .wc-block-checkout__main,.is-mobile .wc-block-checkout__main,.is-small .wc-block-checkout__main{order:1}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form{margin-right:-6px;margin-left:-6px}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form:after,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form:after,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form:after{content:"";clear:both;display:block}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input{float:right;margin-right:6px;margin-left:6px;position:relative;width:calc(50% - 12px)}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2){margin-top:0}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company{width:calc(100% - 12px)}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox{clear:both}.components-placeholder.wc-block-checkout__no-shipping-placeholder{margin-bottom:16px}.components-placeholder.wc-block-checkout__no-shipping-placeholder *{pointer-events:all}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset{display:block}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset .components-button{background-color:#1e1e1e;color:#fff}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset .wc-block-checkout__no-shipping-placeholder-description{display:block;margin:.25em 0 1em}.wc-block-checkout__shipping-option .wc-block-components-radio-control__option{position:relative;margin:0;padding:.75em 2.5em .75em 0}.wc-block-checkout__shipping-option .wc-block-components-radio-control__option:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-checkout__shipping-option .wc-block-components-shipping-rates-control__no-results-notice{margin:.75em 0}.wc-block-checkout__terms{margin:1.5em 0}.wc-block-checkout__terms textarea{top:-5px;position:relative}.wc-block-checkout__terms.wc-block-checkout__terms--disabled{opacity:.6}.wc-block-checkout__sidebar .wc-block-components-product-name{display:block;color:inherit;flex-grow:1;flex-basis:0}.wc-block-checkout__sidebar .wc-block-components-totals-footer-item,.wc-block-checkout__sidebar .wc-block-components-totals-taxes{margin:0;padding:0}.is-medium .wc-block-checkout__sidebar,.is-mobile .wc-block-checkout__sidebar,.is-small .wc-block-checkout__sidebar{margin-bottom:24px;order:0}.wc-block-checkout__add-note{margin:1.5em 0}.is-medium .wc-block-checkout__add-note,.is-mobile .wc-block-checkout__add-note,.is-small .wc-block-checkout__add-note{position:relative;margin-bottom:1em;margin-top:1em;padding:1em 0}.is-medium .wc-block-checkout__add-note:after,.is-mobile .wc-block-checkout__add-note:after,.is-small .wc-block-checkout__add-note:after{border-style:solid;border-width:1px 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-checkout__add-note .wc-block-components-textarea{margin-top:16px}.wc-block-checkout__order-notes.wc-block-components-checkout-step{padding-right:0}.wp-block-woocommerce-checkout{margin:0}.wp-block-woocommerce-checkout .with-scroll-to-top__scroll-point{top:-96px}.wp-block-woocommerce-checkout.is-loading{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{width:35%;padding-right:2.2641509434%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block{width:65%;padding-left:3.7735849057%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{box-sizing:border-box;margin:0}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;margin:0 0 1.5em;display:none}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div>*,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div{-webkit-animation:none;animation:none}}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-contact-information-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-payment-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-contact-information-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-payment-block{min-height:10em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-shipping-address-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-shipping-address-block{min-height:24em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-actions-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-actions-block{width:50%;min-height:4em;margin-right:50%;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-order-summary-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-order-summary-block{min-height:47em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel>h2,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2{font-size:1em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel>h2 .wc-block-components-panel__button,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2 .wc-block-components-panel__button{font-weight:400}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-totals-item,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-item{padding-right:16px;padding-left:16px}@media only screen and (max-width:700px){.wp-block-woocommerce-checkout.is-loading{flex-direction:column;margin:0 auto 16px}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{padding:0;width:100%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-item{padding-right:0;padding-left:0}}.theme-twentytwenty .wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2{font-size:1.25em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-mini-cart__badge,.wc-block-mini-cart__quantity-badge{align-items:center;display:flex}.wc-block-mini-cart__badge{background:#fff;border:.15em solid;border-radius:1em;box-sizing:border-box;color:#000;font-size:.875em;font-weight:600;height:1.4285714286em;justify-content:center;margin-right:-.7142857143em;min-width:1.4285714286em;padding:0 .25em;transform:translateY(-50%);white-space:nowrap;z-index:1}.wc-block-mini-cart__icon{display:block;height:1.5em;width:1.5em;stroke:currentColor}.wc-block-mini-cart{background-color:transparent!important;display:flex;justify-content:flex-end}.wc-block-mini-cart.align-center{justify-content:center}.wc-block-mini-cart.align-left{justify-content:flex-start}.wc-block-mini-cart.is-transparent .wc-block-mini-cart__button{background-color:transparent!important}.wc-block-mini-cart__button{align-items:center;border:none;color:inherit;display:flex;font-weight:400;padding:.75em .5em}.wc-block-mini-cart__button:hover{opacity:.6}.wc-block-mini-cart__amount{display:none}.wc-block-mini-cart__tax-label{margin-left:.5em}@media screen and (min-width:768px){.wc-block-mini-cart__amount{display:initial;font-weight:600;margin-left:8px}}.modal-open .wc-block-mini-cart__button{pointer-events:none}.wc-block-mini-cart__drawer{font-size:1rem}.wc-block-mini-cart__drawer .components-modal__content{box-sizing:border-box;display:flex;flex-direction:column;height:100%}.wc-block-mini-cart__drawer .components-modal__header{margin:16px 0}.wc-block-mini-cart__drawer .wc-block-mini-cart__items{flex-grow:1;margin-left:-16px;overflow-y:auto;padding-left:16px}.wc-block-mini-cart__drawer .wc-block-mini-cart__items .wc-block-cart-items__row:last-child:after{content:none}.wc-block-mini-cart__footer{border-top:1px solid #ddd;margin-bottom:-40px;margin-right:-16px;margin-left:-16px;padding:24px}.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal{font-weight:600;margin-bottom:16px}.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal .wc-block-components-totals-item__description{display:none;font-size:.75em;font-weight:400}@media only screen and (min-width:480px){.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal .wc-block-components-totals-item__description{display:unset}}.wc-block-mini-cart__footer-actions{display:flex;gap:16px}.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart.wc-block-components-button{background-color:transparent;border:1px solid #1e1e1e;color:#1e1e1e;display:none;flex-grow:1;font-weight:600}@media only screen and (min-width:480px){.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart.wc-block-components-button{display:inline-flex}}.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout{border:1px solid #1e1e1e;flex-grow:1;font-weight:600}.wc-block-mini-cart__footer .wc-block-components-payment-method-icons{margin-top:16px}.wc-block-components-express-payment{margin:auto;position:relative}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons{list-style:none;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;padding:0;margin:0;overflow:hidden;text-align:center}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons>li{margin:0}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons>li>img{width:100%;height:48px}.wc-block-components-express-payment--checkout{margin-top:5px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container{display:flex;flex-direction:row;right:0;position:absolute;left:0;top:-5px;vertical-align:middle}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container:before{border-right:1px solid;border-top:1px solid;border-radius:0 5px 0 0;content:"";display:block;height:4px;margin-left:12px;opacity:.3;pointer-events:none;width:10px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container:after{border-left:1px solid;border-top:1px solid;border-radius:5px 0 0 0;content:"";display:block;height:4px;margin-right:12px;opacity:.3;pointer-events:none;flex-grow:1}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title{flex-grow:0;transform:translateY(-50%)}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content{position:relative;padding:1.5em 23px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content:after{border-style:solid;border-width:0 1px 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0;border-radius:0 0 5px 5px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content>p{margin-bottom:1em}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li{display:inline-block;width:50%}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li:nth-child(2n){padding-right:8px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li:nth-child(odd){padding-left:8px}.wc-block-components-express-payment--cart .wc-block-components-express-payment__event-buttons>li{padding-bottom:16px;text-align:center;width:100%}.wc-block-components-express-payment--cart .wc-block-components-express-payment__event-buttons>li:last-child{padding-bottom:0}.wc-block-components-express-payment-continue-rule{display:flex;align-items:center;text-align:center;padding:0 24px;margin:24px 0}.wc-block-components-express-payment-continue-rule:before{margin-left:10px}.wc-block-components-express-payment-continue-rule:after{margin-right:10px}.wc-block-components-express-payment-continue-rule:after,.wc-block-components-express-payment-continue-rule:before{content:" ";flex:1;border-bottom:1px solid;opacity:.3}.wc-block-components-express-payment-continue-rule--cart{margin:16px 0;text-transform:uppercase}.theme-twentynineteen .wc-block-components-express-payment__title:before{display:none}.theme-twentytwenty .wc-block-components-express-payment .wc-block-components-express-payment__title{padding-right:12px;padding-left:12px}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder{margin-bottom:16px}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder *{pointer-events:all}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset{display:block}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset .components-button{background-color:#1e1e1e;color:#fff}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset .wc-block-checkout__no-payment-methods-placeholder-description{display:block;margin:.25em 0 1em}.components-notice.wc-block-checkout__no-payment-methods-notice{margin-bottom:16px}.wc-block-card-elements{display:flex;width:100%}.wc-block-card-elements .wc-block-components-validation-error{position:static}.wc-block-gateway-container{position:relative;margin-bottom:1.5em;white-space:nowrap}.wc-block-gateway-container.wc-card-number-element{flex-basis:15em;flex-grow:1;min-width:min(15em,60%)}.wc-block-gateway-container.wc-card-expiry-element{flex-basis:7em;margin-right:12px;min-width:min(7em,calc(24% - 12px))}.wc-block-gateway-container.wc-card-cvc-element{flex-basis:7em;margin-right:12px;min-width:min(5em,calc(16% - 12px))}.wc-block-gateway-container .wc-block-gateway-input{font-size:1em;line-height:1.375;background-color:#fff;padding:.75em 16px .75em 0;border-radius:4px;border:1px solid #50575e;width:100%;font-family:inherit;margin:0;box-sizing:border-box;height:3em;color:#2b2d2f;cursor:text}.wc-block-gateway-container .wc-block-gateway-input:focus,.wc-block-gateway-container:focus{background-color:#fff}.wc-block-gateway-container label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;line-height:1.375;position:absolute;transform:translateY(.75em);right:0;top:0;transform-origin:top right;color:#757575;transition:transform .2s ease;margin:0 17px 0 0;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 24px);cursor:text}@media screen and (prefers-reduced-motion:reduce){.wc-block-gateway-container label{transition:none}}.wc-block-gateway-container.wc-inline-card-element label{margin-right:calc(24px + 1.5em)}.wc-block-gateway-container.wc-inline-card-element .wc-block-gateway-input.focused.empty+label,.wc-block-gateway-container.wc-inline-card-element .wc-block-gateway-input:not(.empty)+label{margin-right:16px;transform:translateY(4px) scale(.75)}.wc-block-gateway-container.wc-inline-card-element+.wc-block-components-validation-error{position:static;margin-top:-24px}.wc-block-gateway-container .wc-block-gateway-input.focused.empty,.wc-block-gateway-container .wc-block-gateway-input:not(.empty){padding:1.5em 16px .25em 0}.wc-block-gateway-container .wc-block-gateway-input.focused.empty+label,.wc-block-gateway-container .wc-block-gateway-input:not(.empty)+label{transform:translateY(4px) scale(.75)}.wc-block-gateway-container .wc-block-gateway-input.has-error{border-color:#cc1818}.wc-block-gateway-container .wc-block-gateway-input.has-error:focus{outline-color:#cc1818}.wc-block-gateway-container .wc-block-gateway-input.has-error+label{color:#cc1818}.is-large .wc-card-cvc-element .wc-block-components-validation-error>p,.is-large .wc-card-expiry-element .wc-block-components-validation-error>p,.is-medium .wc-card-cvc-element .wc-block-components-validation-error>p,.is-medium .wc-card-expiry-element .wc-block-components-validation-error>p{line-height:16px;padding-top:4px}.is-mobile .wc-card-cvc-element .wc-block-components-validation-error>p,.is-mobile .wc-card-expiry-element .wc-block-components-validation-error>p,.is-small .wc-card-cvc-element .wc-block-components-validation-error>p,.is-small .wc-card-expiry-element .wc-block-components-validation-error>p{min-height:28px}.wc-block-components-checkout-payment-methods *{pointer-events:all}.is-mobile .wc-block-card-elements,.is-small .wc-block-card-elements{flex-wrap:wrap}.is-mobile .wc-block-gateway-container.wc-card-number-element,.is-small .wc-block-gateway-container.wc-card-number-element{flex-basis:100%}.is-mobile .wc-block-gateway-container.wc-card-expiry-element,.is-small .wc-block-gateway-container.wc-card-expiry-element{flex-basis:calc(50% - 8px);margin-right:0;margin-left:8px}.is-mobile .wc-block-gateway-container.wc-card-cvc-element,.is-small .wc-block-gateway-container.wc-card-cvc-element{flex-basis:calc(50% - 8px);margin-right:8px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option{padding-right:56px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option:after{content:none}.wc-block-checkout__payment-method .wc-block-components-radio-control__option .wc-block-components-radio-control__input{right:16px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:first-child,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:last-child{margin:0;padding-bottom:1em;padding-top:1em}.wc-block-checkout__payment-method .wc-block-components-radio-control__option-checked{font-weight:700}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option,.wc-block-checkout__payment-method .wc-block-components-radio-control__option{position:relative}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:after,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:after{border-style:solid;border-width:1px 1px 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:last-child:after,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:last-child:after{border-width:1px}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option:after{border-width:0}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label{display:flex;align-items:center;justify-content:flex-start}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label img{height:24px;max-height:24px;-o-object-fit:contain;object-fit:contain;-o-object-position:left;object-position:left}.wc-block-checkout__payment-method .wc-block-components-radio-control.disable-radio-control .wc-block-components-radio-control__option{padding-right:16px}.wc-block-checkout__payment-method .wc-block-components-radio-control.disable-radio-control .wc-block-components-radio-control__input{display:none}.wc-block-checkout__payment-method .wc-block-components-checkout-step__description-payments-aligned{padding-top:14px;height:28px}.wc-block-components-radio-control-accordion-content{padding:0 16px 1em}.wc-block-components-radio-control-accordion-content:empty{display:none}.wc-block-checkout__order-notes .wc-block-components-checkout-step__content{padding-bottom:0}.wc-block-components-checkbox{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;margin-top:1.5em}.wc-block-components-checkbox label{align-items:flex-start;display:flex;position:relative}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]{font-size:1em;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid #50575e;border-radius:2px;box-sizing:border-box;height:1.5em;width:1.5em;margin:0 0 0 16px;min-height:1.5em;min-width:1.5em;overflow:hidden;position:static;vertical-align:middle;background-color:#fff}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{background:#fff;border-color:#50575e}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus{outline:2px solid #50575e;outline-offset:2px}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:after,.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:before{content:""}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:not(:checked)+.wc-block-components-checkbox__mark{display:none}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]{border-color:hsla(0,0%,100%,.6);background-color:rgba(0,0,0,.1)}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{background:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus{outline:2px solid hsla(0,0%,100%,.6);outline-offset:2px}.wc-block-components-checkbox.has-error,.wc-block-components-checkbox.has-error a{color:#cc1818}.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:active,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:focus,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:hover{border-color:#cc1818}.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:focus{outline:2px solid #cc1818;outline-offset:2px}.wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:#000;position:absolute;margin-right:.1875em;margin-top:.0625em;width:1.125em;height:1.125em;pointer-events:none}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:#fff}.wc-block-components-checkbox .wc-block-components-checkbox__label,.wc-block-components-checkbox>span{vertical-align:middle;line-height:1.5em}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-checkbox__mark{display:none}}.theme-twentytwentyone .has-dark-controls .wc-block-components-checkbox__input[type=checkbox],.theme-twentytwentyone .wc-block-components-checkbox__input[type=checkbox]{background-color:#fff;border-color:var(--form--border-color);position:relative}.theme-twentytwentyone .has-dark-controls .wc-block-components-checkbox__input[type=checkbox]:checked,.theme-twentytwentyone .wc-block-components-checkbox__input[type=checkbox]:checked{background-color:#fff;border-color:var(--form--border-color)}.theme-twentytwentyone .wc-block-components-checkbox__mark{display:none}.wc-block-components-panel.has-border{position:relative}.wc-block-components-panel.has-border:after{border-style:solid;border-width:1px 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-components-panel.has-border+.wc-block-components-panel.has-border:after{border-top-width:0}.wc-block-components-panel.has-border.no-top-border{position:relative}.wc-block-components-panel.has-border.no-top-border:after{border-style:solid;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0;border-width:0 0 1px}.wc-block-components-panel__button{border:0;border-radius:0;vertical-align:baseline;height:auto;line-height:1;margin:.375em 0 0;padding:.375em 0 0 32px;position:relative;text-align:right;width:100%;word-break:break-word}.wc-block-components-panel__button[aria-expanded=true]{padding-bottom:.375em;margin-bottom:.375em}.wc-block-components-panel__button,.wc-block-components-panel__button:active,.wc-block-components-panel__button:focus,.wc-block-components-panel__button:hover{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none}.wc-block-components-panel__button>.wc-block-components-panel__button-icon{fill:currentColor;position:absolute;left:0;top:50%;transform:translateY(-50%);width:auto}.wc-block-components-panel__content{padding-bottom:1em}.wc-block-components-panel__content[hidden]{display:none}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-panel__button{background-color:inherit;color:inherit}.theme-twentyseventeen .wc-block-components-panel__button,.theme-twentytwenty .wc-block-components-panel__button{background:none transparent;color:inherit}.theme-twentyseventeen .wc-block-components-panel__button.wc-block-components-panel__button:focus,.theme-twentyseventeen .wc-block-components-panel__button.wc-block-components-panel__button:hover,.theme-twentytwenty .wc-block-components-panel__button.wc-block-components-panel__button:focus,.theme-twentytwenty .wc-block-components-panel__button.wc-block-components-panel__button:hover{background:none transparent}.wc-block-components-totals-wrapper{position:relative;padding:16px 0}.wc-block-components-totals-wrapper:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-components-totals-wrapper:last-child{padding-bottom:0}.wc-block-components-totals-wrapper.has-bottom-border:after{border-bottom-width:1px}.wc-block-components-totals-wrapper.slot-wrapper{padding:0}.wc-block-components-totals-wrapper.slot-wrapper>*>*{position:relative;padding:16px 0}.wc-block-components-totals-wrapper.slot-wrapper>*>:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-components-totals-wrapper.slot-wrapper>*>:last-child:after{border-bottom-width:0}.wc-block-components-discounts-meta .wc-block-components-totals-wrapper:first-child{position:relative}.wc-block-components-discounts-meta .wc-block-components-totals-wrapper:first-child:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-components-totals-item{display:flex;flex-wrap:wrap;margin:.75em 0 0;width:100%}.wc-block-components-totals-item:first-child{margin-top:0}.wc-block-components-totals-item__label{flex-grow:1}.wc-block-components-totals-item__value{font-weight:700;white-space:nowrap}.wc-block-components-totals-item__description{font-size:.875em;width:100%}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate{margin:4px 0}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate:first-child{margin-top:0}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate:last-child{margin-bottom:0}.wc-block-product-categories{margin-bottom:1em}.wc-block-product-categories.is-dropdown{display:flex}.wc-block-product-categories select{margin-left:.5em}.wc-block-product-categories-list--has-images{list-style:none outside}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item{margin:4px 60px 4px 0;list-style:none outside;clear:both}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item ul{margin:4px 0 0}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item__image{max-width:50px;display:inline-block;padding:0;margin:0 -60px 0 .5em;position:relative;vertical-align:middle;border:1px solid #eee}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item__image img{display:block;height:auto;margin:0;max-width:100%;padding:0}.wc-block-product-categories-list-item-count:before{content:" ("}.wc-block-product-categories-list-item-count:after{content:")"}.wp-block-woocommerce-product-categories.is-loading .wc-block-product-categories__placeholder{display:inline-block;height:1em;width:50%;min-width:200px;background:currentColor;opacity:.2}.wc-block-product-categories__button{display:flex;align-items:center;margin:0;padding:0 .5em;position:relative;overflow:hidden}.wc-block-product-categories__button svg{fill:currentColor;outline:none}.rtl .wc-block-product-categories__button svg{transform:rotate(-180deg)}.wc-block-product-categories__button:active{color:currentColor}.wc-block-product-categories__button:disabled,.wc-block-product-categories__button[aria-disabled=true]{cursor:default;opacity:.3}.wc-block-product-categories__button:disabled:focus,.wc-block-product-categories__button[aria-disabled=true]:focus{box-shadow:none}.wc-block-featured-product{position:relative;background-color:#1e1e1e;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em}.wc-block-featured-product,.wc-block-featured-product .wc-block-featured-product__wrapper{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-product .wc-block-featured-product__wrapper{overflow:hidden;height:100%}.wc-block-featured-product.has-left-content{justify-content:flex-start}.wc-block-featured-product.has-left-content .wc-block-featured-product__description,.wc-block-featured-product.has-left-content .wc-block-featured-product__price,.wc-block-featured-product.has-left-content .wc-block-featured-product__title,.wc-block-featured-product.has-left-content .wc-block-featured-product__variation{margin-right:0;text-align:right}.wc-block-featured-product.has-right-content{justify-content:flex-end}.wc-block-featured-product.has-right-content .wc-block-featured-product__description,.wc-block-featured-product.has-right-content .wc-block-featured-product__price,.wc-block-featured-product.has-right-content .wc-block-featured-product__title,.wc-block-featured-product.has-right-content .wc-block-featured-product__variation{margin-left:0;text-align:left}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-product .wc-block-featured-product__description a,.wc-block-featured-product .wc-block-featured-product__description a:active,.wc-block-featured-product .wc-block-featured-product__description a:focus,.wc-block-featured-product .wc-block-featured-product__description a:hover,.wc-block-featured-product .wc-block-featured-product__price a,.wc-block-featured-product .wc-block-featured-product__price a:active,.wc-block-featured-product .wc-block-featured-product__price a:focus,.wc-block-featured-product .wc-block-featured-product__price a:hover,.wc-block-featured-product .wc-block-featured-product__title a,.wc-block-featured-product .wc-block-featured-product__title a:active,.wc-block-featured-product .wc-block-featured-product__title a:focus,.wc-block-featured-product .wc-block-featured-product__title a:hover,.wc-block-featured-product .wc-block-featured-product__variation a,.wc-block-featured-product .wc-block-featured-product__variation a:active,.wc-block-featured-product .wc-block-featured-product__variation a:focus,.wc-block-featured-product .wc-block-featured-product__variation a:hover{color:#fff}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__link,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{width:100%;padding:16px 48px 0;z-index:1}.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{margin-top:0;border:0}.wc-block-featured-product .wc-block-featured-product__title:before,.wc-block-featured-product .wc-block-featured-product__variation:before{display:none}.wc-block-featured-product .wc-block-featured-product__variation{font-style:italic;padding-top:0}.wc-block-featured-product .wc-block-featured-product__description p{margin:0;line-height:1.5em}.wc-block-featured-product .wp-block-button.aligncenter{text-align:center}.wc-block-featured-product.has-background-dim:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-product.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-product.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-product.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-product.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-product.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-product.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-product.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-product.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-product.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-product.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{max-width:290px;width:100%}.wc-block-featured-product:after{display:block;content:"";font-size:0;min-height:inherit}@supports((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-product:after{content:none}}.wc-block-featured-product.aligncenter,.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright,.wc-block-product-search .wc-block-product-search__fields{display:flex}.wc-block-product-search .wc-block-product-search__field{padding:6px 8px;line-height:1.8;flex-grow:1}.wc-block-product-search .wc-block-product-search__button{display:flex;align-items:center;margin:0 6px 0 0;cursor:pointer;padding:0 .5em;position:relative;overflow:hidden}.wc-block-product-search .wc-block-product-search__button svg{fill:currentColor;outline:none}.rtl .wc-block-product-search .wc-block-product-search__button svg{transform:rotate(-180deg)}.wc-block-product-search .wc-block-product-search__button:active{color:currentColor}.wc-block-product-search .wc-block-product-search__button:disabled,.wc-block-product-search .wc-block-product-search__button[aria-disabled=true]{cursor:default;opacity:.3}.wc-block-product-search .wc-block-product-search__button:disabled:focus,.wc-block-product-search .wc-block-product-search__button[aria-disabled=true]:focus{box-shadow:none}.wc-block-featured-category{position:relative;background-color:#1e1e1e;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category .wc-block-featured-category__wrapper{overflow:hidden;height:100%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category.has-left-content{justify-content:flex-start}.wc-block-featured-category.has-left-content .wc-block-featured-category__description,.wc-block-featured-category.has-left-content .wc-block-featured-category__price,.wc-block-featured-category.has-left-content .wc-block-featured-category__title{margin-right:0;text-align:right}.wc-block-featured-category.has-right-content{justify-content:flex-end}.wc-block-featured-category.has-right-content .wc-block-featured-category__description,.wc-block-featured-category.has-right-content .wc-block-featured-category__price,.wc-block-featured-category.has-right-content .wc-block-featured-category__title{margin-left:0;text-align:left}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-category .wc-block-featured-category__description a,.wc-block-featured-category .wc-block-featured-category__description a:active,.wc-block-featured-category .wc-block-featured-category__description a:focus,.wc-block-featured-category .wc-block-featured-category__description a:hover,.wc-block-featured-category .wc-block-featured-category__price a,.wc-block-featured-category .wc-block-featured-category__price a:active,.wc-block-featured-category .wc-block-featured-category__price a:focus,.wc-block-featured-category .wc-block-featured-category__price a:hover,.wc-block-featured-category .wc-block-featured-category__title a,.wc-block-featured-category .wc-block-featured-category__title a:active,.wc-block-featured-category .wc-block-featured-category__title a:focus,.wc-block-featured-category .wc-block-featured-category__title a:hover{color:#fff}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__link,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{width:100%;padding:0 48px 16px;z-index:1}.wc-block-featured-category .wc-block-featured-category__title{margin-top:0}.wc-block-featured-category .wc-block-featured-category__title:before{display:none}.wc-block-featured-category .wc-block-featured-category__description p{margin:0}.wc-block-featured-category .wp-block-button.aligncenter{text-align:center}.wc-block-featured-category.has-background-dim:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-category.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-category.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-category.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-category.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-category.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-category.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-category.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-category.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-category.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-category.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{max-width:290px;width:100%}.wc-block-featured-category:after{display:block;content:"";font-size:0;min-height:inherit}@supports((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-category:after{content:none}}.wc-block-featured-category.aligncenter,.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{display:flex}.wc-block-attribute-filter{margin-bottom:24px}.wc-block-attribute-filter.style-dropdown{display:flex;gap:16px}.wc-block-attribute-filter .wc-block-attribute-filter-list{margin:0;width:100%}.wc-block-attribute-filter .wc-block-attribute-filter-list li{text-decoration:underline}.wc-block-attribute-filter .wc-block-attribute-filter-list li label{cursor:pointer}.wc-block-attribute-filter .wc-block-attribute-filter-list li input{cursor:pointer;display:inline-block}.wc-block-attribute-filter .wc-block-attribute-filter-dropdown{flex-grow:1;max-width:unset;width:0}.wc-block-attribute-filter .is-single .wc-block-attribute-filter-list-count,.wc-block-attribute-filter .wc-block-dropdown-selector .wc-block-dropdown-selector__list .wc-block-attribute-filter-list-count{opacity:.6}.wc-block-attribute-filter .wc-block-components-dropdown-selector__input-wrapper{height:100%}.wc-block-stock-filter{margin-bottom:24px}.wc-block-stock-filter .wc-block-stock-filter-list{margin:0}.wc-block-stock-filter .wc-block-stock-filter-list li{text-decoration:underline}.wc-block-stock-filter .wc-block-stock-filter-list li label{cursor:pointer}.wc-block-stock-filter .wc-block-stock-filter-list li input{cursor:pointer;display:inline-block}.wc-block-stock-filter .is-single,.wc-block-stock-filter .wc-block-dropdown-selector .wc-block-dropdown-selector__list{opacity:.6}.wc-block-stock-filter .wc-block-stock-filter__button{margin-top:8px}@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-active-filters{margin-bottom:24px;overflow:hidden}.wc-block-active-filters .wc-block-active-filters__clear-all{font-size:1em;float:left;border:none;padding:0;text-decoration:underline;cursor:pointer}.wc-block-active-filters .wc-block-active-filters__clear-all,.wc-block-active-filters .wc-block-active-filters__clear-all:active,.wc-block-active-filters .wc-block-active-filters__clear-all:focus,.wc-block-active-filters .wc-block-active-filters__clear-all:hover{background:transparent;color:inherit}.wc-block-active-filters .wc-block-active-filters__list{margin:0 0 4px;padding:0;list-style:none outside;clear:both}.wc-block-active-filters .wc-block-active-filters__list li{margin:0;padding:0;list-style:none outside;clear:both}.wc-block-active-filters .wc-block-active-filters__list li ul{margin:0;padding:0;list-style:none outside}.wc-block-active-filters .wc-block-active-filters__list li:first-child .wc-block-active-filters__list-item-type{margin:0}.wc-block-active-filters .wc-block-active-filters__list-item-type{font-size:.75em;text-transform:uppercase;letter-spacing:.1em;margin:16px 0 0;display:block}.wc-block-active-filters .wc-block-active-filters__list-item-operator{font-weight:400;font-style:italic}.wc-block-active-filters .wc-block-active-filters__list-item-name{font-weight:700;display:block;position:relative;padding:0 0 0 16px}.wc-block-active-filters .wc-block-active-filters__list-item-remove{background:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;width:16px;padding:0;position:absolute;left:0;top:50%;margin:-8px 0 0;color:currentColor}.wc-block-active-filters .wc-block-active-filters__list--chips li,.wc-block-active-filters .wc-block-active-filters__list--chips ul{display:inline}.wc-block-active-filters .wc-block-active-filters__list--chips .wc-block-active-filters__list-item-type{display:none}.wc-block-active-filters .wc-block-active-filters__list--chips .wc-block-components-chip{font-size:.875em;margin-top:.1875em;margin-bottom:.1875em} \ No newline at end of file diff --git a/build/wc-blocks-style.css b/build/wc-blocks-style.css new file mode 100644 index 00000000000..48ba7680094 --- /dev/null +++ b/build/wc-blocks-style.css @@ -0,0 +1 @@ +.wc-block-link-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.wc-block-link-button,.wc-block-link-button:active,.wc-block-link-button:focus,.wc-block-link-button:hover{background:transparent}.wc-block-suspense-placeholder{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.wc-block-suspense-placeholder>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-suspense-placeholder{-webkit-animation:none;animation:none}}.wc-block-suspense-placeholder:after{content:" "}.wc-block-grid__products .wc-block-grid__product-image{text-decoration:none;display:block;position:relative}.wc-block-grid__products .wc-block-grid__product-image a{text-decoration:none;border:0;outline:0;box-shadow:none}.wc-block-grid__products .wc-block-grid__product-image img{height:auto;width:100%}.wc-block-grid__products .wc-block-grid__product-image img[hidden]{display:none}.wc-block-grid__products .wc-block-grid__product-image img[alt=""]{border:1px solid #f2f2f2}.edit-post-visual-editor .editor-block-list__block .wc-block-grid__product-title,.editor-styles-wrapper .wc-block-grid__product-title,.wc-block-grid__product-title{font-family:inherit;line-height:1.2em;font-weight:700;padding:0;color:inherit;font-size:inherit;display:block}.wc-block-grid__product-price{display:block}.wc-block-grid__product-price .wc-block-grid__product-price__regular{margin-right:.5em}.wc-block-grid__product-add-to-cart.wp-block-button{word-break:break-word;white-space:normal}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link{word-break:break-word;white-space:normal;margin:0 auto!important;display:inline-flex;justify-content:center;text-align:center;padding:.5em 1em;font-size:1em}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.loading{opacity:.25}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.added:after{font-family:WooCommerce;content:"";margin-left:.5em;display:inline-block;width:auto;height:auto}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.loading:after{font-family:WooCommerce;content:"";-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite;margin-left:.5em;display:inline-block;width:auto;height:auto}.has-5-columns:not(.alignfull) .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-6-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-7-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-8-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-9-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after{content:"";margin:0}.wc-block-grid__product-rating{display:block}.wc-block-grid__product-rating .star-rating,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;margin:0 auto;text-align:left}.wc-block-grid__product-rating .star-rating:before,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars:before{content:"SSSSS";top:0;left:0;right:0;position:absolute;opacity:.5;color:#aaa;white-space:nowrap}.wc-block-grid__product-rating .star-rating span,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars span{overflow:hidden;top:0;left:0;right:0;position:absolute;padding-top:1.5em}.wc-block-grid__product-rating .star-rating span:before,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars span:before{content:"SSSSS";top:0;left:0;right:0;position:absolute;color:#000;white-space:nowrap}.wc-block-grid__product-onsale{font-size:.875em;padding:.25em .75em;display:inline-block;width:auto;border:1px solid #43454b;border-radius:3px;color:#43454b;background:#fff;text-align:center;text-transform:uppercase;font-weight:600;z-index:9;position:relative}.wc-block-grid__product .wc-block-grid__product-image,.wc-block-grid__product .wc-block-grid__product-title{margin:0 0 12px}.wc-block-grid__product .wc-block-grid__product-add-to-cart,.wc-block-grid__product .wc-block-grid__product-onsale,.wc-block-grid__product .wc-block-grid__product-price,.wc-block-grid__product .wc-block-grid__product-rating{margin:0 auto 12px}.theme-twentysixteen .wc-block-grid .price ins{color:#77a464}.theme-twentynineteen .wc-block-grid__product{font-size:.88889em}.theme-twentynineteen .wc-block-components-product-sale-badge,.theme-twentynineteen .wc-block-components-product-title,.theme-twentynineteen .wc-block-grid__product-onsale,.theme-twentynineteen .wc-block-grid__product-title{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.theme-twentynineteen .wc-block-grid__product-title:before{display:none}.theme-twentynineteen .wc-block-components-product-sale-badge,.theme-twentynineteen .wc-block-grid__product-onsale{line-height:1}.theme-twentynineteen .editor-styles-wrapper .wp-block-button .wp-block-button__link:not(.has-text-color){color:#fff}.theme-twentytwenty .wc-block-grid__product-link{color:#000}.theme-twentytwenty .wc-block-components-product-title,.theme-twentytwenty .wc-block-grid__product-title{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;color:#cd2653;font-size:1em}.theme-twentytwenty .wp-block-columns .wc-block-components-product-title{margin-top:0}.theme-twentytwenty .wc-block-components-product-price .woocommerce-Price-amount,.theme-twentytwenty .wc-block-components-product-price__value,.theme-twentytwenty .wc-block-grid__product-price .woocommerce-Price-amount,.theme-twentytwenty .wc-block-grid__product-price__value{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;font-size:.9em}.theme-twentytwenty .wc-block-components-product-price del,.theme-twentytwenty .wc-block-grid__product-price del{opacity:.5}.theme-twentytwenty .wc-block-components-product-price ins,.theme-twentytwenty .wc-block-grid__product-price ins{text-decoration:none}.theme-twentytwenty .star-rating,.theme-twentytwenty .wc-block-grid__product-rating{font-size:.7em}.theme-twentytwenty .star-rating .wc-block-components-product-rating__stars,.theme-twentytwenty .star-rating .wc-block-grid__product-rating__stars,.theme-twentytwenty .wc-block-grid__product-rating .wc-block-components-product-rating__stars,.theme-twentytwenty .wc-block-grid__product-rating .wc-block-grid__product-rating__stars{line-height:1}.theme-twentytwenty .wc-block-components-product-button>.wp-block-button__link,.theme-twentytwenty .wc-block-grid__product-add-to-cart>.wp-block-button__link{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif}.theme-twentytwenty .wc-block-components-product-sale-badge,.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{background:#cd2653;color:#fff;font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;font-weight:700;letter-spacing:-.02em;line-height:1.2;text-transform:uppercase}.theme-twentytwenty .wc-block-grid__products .wc-block-components-product-sale-badge{position:static}.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-image .wc-block-components-product-sale-badge{position:absolute}.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale:not(.wc-block-components-product-sale-badge){position:absolute;right:4px;top:4px;z-index:1}.theme-twentytwenty .wc-block-active-filters__title,.theme-twentytwenty .wc-block-attribute-filter__title,.theme-twentytwenty .wc-block-price-filter__title,.theme-twentytwenty .wc-block-stock-filter__title{font-size:1em}.theme-twentytwenty .wc-block-active-filters .wc-block-active-filters__clear-all{font-size:.75em}.theme-twentytwenty .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link{font-size:.75em;padding:.5em}@media only screen and (min-width:768px){.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{font-size:.875em;padding:.5em}}@media only screen and (min-width:1168px){.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{font-size:.875em;padding:.5em}}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.screen-reader-text:focus{background-color:#fff;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#2b2d2f;display:block;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.wc-block-components-product-add-to-cart-attribute-picker{margin:0;flex-basis:100%}.wc-block-components-product-add-to-cart-attribute-picker label{display:block;font-size:1em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__container{position:relative}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select{margin:0 0 .75em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select select{min-width:60%;min-height:1.75em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error{margin-bottom:24px}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error select{border-color:#cc1818}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error select:focus{outline-color:#cc1818}.wc-block-components-product-add-to-cart{margin:0;display:flex;flex-wrap:wrap}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button{margin:0 0 .75em}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button .wc-block-components-button__text{display:block}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button .wc-block-components-button__text>svg{fill:currentColor;vertical-align:top;width:1.5em;height:1.5em;margin:-.25em 0 -.25em .5em}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity{margin:0 1em .75em 0;flex-basis:5em;padding:.618em;background:#fff;border:1px solid #ccc;border-radius:2px;color:#43454b;box-shadow:inset 0 1px 1px rgba(0,0,0,.125);text-align:center}.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button>*,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity>*,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button>*,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity{-webkit-animation:none;animation:none}}.wc-block-grid .wc-block-components-product-add-to-cart{justify-content:center}.wc-block-components-product-add-to-cart-notice{margin:0}.wp-block-button.wc-block-components-product-button{word-break:break-word;white-space:normal;margin-top:0;margin-bottom:12px}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button{word-break:break-word;white-space:normal;margin:0 auto;display:inline-flex;justify-content:center}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;min-width:8em;min-height:3em}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;min-width:8em;min-height:3em}.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button{-webkit-animation:none;animation:none}}.theme-twentytwentyone .editor-styles-wrapper .wc-block-components-product-button .wp-block-button__link{background-color:var(--button--color-background);color:var(--button--color-text);border-color:var(--button--color-background)}.wc-block-components-product-category-list{margin-top:0;margin-bottom:.75em}.wc-block-components-product-category-list ul{margin:0;padding:0;display:inline}.wc-block-components-product-category-list ul li{display:inline;list-style:none}.wc-block-components-product-category-list ul li:after{content:", "}.wc-block-components-product-category-list ul li:last-child:after{content:""}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image,.wc-block-components-product-image{margin-top:0;margin-bottom:12px;text-decoration:none;display:block;position:relative}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image a,.wc-block-components-product-image a{text-decoration:none;border:0;outline:0;box-shadow:none}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img,.wc-block-components-product-image img{vertical-align:middle;width:100%}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img[hidden],.wc-block-components-product-image img[hidden]{display:none}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img[alt=""],.wc-block-components-product-image img[alt=""]{border:1px solid #f2f2f2}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-left,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-left{position:absolute;left:4px;top:4px;right:auto;margin:0}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-center,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-center{position:absolute;top:4px;left:50%;right:auto;transform:translateX(-50%);margin:0}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-right,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-right{position:absolute;right:4px;top:4px;left:auto;margin:0}.is-loading .wc-block-components-product-image{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.is-loading .wc-block-components-product-image>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-image{-webkit-animation:none;animation:none}}.wc-block-components-product-rating{display:block;margin-top:0;margin-bottom:12px}.wc-block-components-product-rating__stars{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;margin:0 auto;text-align:left}.wc-block-components-product-rating__stars:before{content:"SSSSS";top:0;left:0;right:0;position:absolute;opacity:.5;color:#aaa;white-space:nowrap}.wc-block-components-product-rating__stars span{overflow:hidden;top:0;left:0;right:0;position:absolute;padding-top:1.5em}.wc-block-components-product-rating__stars span:before{content:"SSSSS";top:0;left:0;right:0;position:absolute;color:#000;white-space:nowrap}.wc-block-single-product .wc-block-components-product-rating__stars{margin:0}.wc-block-components-product-sale-badge{margin:0 auto 12px;font-size:.875em;padding:.25em .75em;display:inline-block;width:auto;border:1px solid #43454b;border-radius:3px;color:#43454b;background:#fff;text-align:center;text-transform:uppercase;font-weight:600;z-index:9;position:static}.wc-block-components-product-sku{margin-top:0;margin-bottom:12px;display:block;text-transform:uppercase;font-size:.875em}.wc-block-components-product-stock-indicator{margin-top:0;margin-bottom:.75em;display:block;font-size:.875em}.wc-block-components-product-stock-indicator--in-stock{color:#4ab866}.wc-block-components-product-stock-indicator--out-of-stock{color:#cc1818}.wc-block-components-product-stock-indicator--available-on-backorder,.wc-block-components-product-stock-indicator--low-stock{color:#f0b849}.wc-block-components-product-summary{margin-top:0;margin-bottom:12px}.is-loading .wc-block-components-product-summary:before{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;content:".";display:block;width:100%;height:6em}.is-loading .wc-block-components-product-summary:before>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-summary:before{-webkit-animation:none;animation:none}}.wc-block-components-product-tag-list{margin-top:0;margin-bottom:.75em}.wc-block-components-product-tag-list ul{margin:0;padding:0;display:inline}.wc-block-components-product-tag-list ul li{display:inline;list-style:none}.wc-block-components-product-tag-list ul li:after{content:", "}.wc-block-components-product-tag-list ul li:last-child:after{content:""}.wc-block-components-product-title{margin-top:0;margin-bottom:12px}.wc-block-grid .wc-block-components-product-title{line-height:1.5;font-weight:700;padding:0;color:inherit;font-size:inherit;display:block}.is-loading .wc-block-components-product-title:before{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;content:".";display:inline-block;width:7em}.is-loading .wc-block-components-product-title:before>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-title:before{-webkit-animation:none;animation:none}}.is-loading .wc-block-grid .wc-block-components-product-title:before{width:10em}.wc-block-components-product-title--align-left{text-align:left}.wc-block-components-product-title--align-center{text-align:center}.wc-block-components-product-title--align-right{text-align:right}.wc-block-components-error{display:flex;padding:40px 0;margin:40px 0;align-items:center;justify-content:center;flex-direction:column;color:#757575;text-align:center}.wc-block-components-error__header{font-size:2em;margin:0;color:#646970}.wc-block-components-error__image{width:25%;margin:0 0 24px}.wc-block-components-error__text{margin:1em 0 0;color:#8c8f94;font-size:1.25em;max-width:60ch}.wc-block-components-error__message{margin:1em auto 0;font-style:italic;color:#8c8f94;max-width:60ch}.wc-block-error__button{margin:40px 0 0}.wc-block-components-button:not(.is-link){color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;align-items:center;background-color:#1e1e1e;color:#fff;display:inline-flex;font-weight:700;min-height:3em;justify-content:center;line-height:1;padding:0 1em;text-align:center;text-decoration:none;text-transform:none;position:relative}.wc-block-components-button:not(.is-link):active,.wc-block-components-button:not(.is-link):disabled,.wc-block-components-button:not(.is-link):focus,.wc-block-components-button:not(.is-link):hover{background-color:#1e1e1e;color:#fff}.wc-block-components-button:not(.is-link) .wc-block-components-button__text{display:block}.wc-block-components-button:not(.is-link) .wc-block-components-button__text>svg{fill:currentColor}.wc-block-components-button:not(.is-link) .wc-block-components-spinner+.wc-block-components-button__text{visibility:hidden}.wc-block-components-form{counter-reset:checkout-step}.wc-block-components-form .wc-block-components-checkout-step{position:relative;border:none;padding:0 0 0 24px;background:none;margin:0}.is-mobile .wc-block-components-form .wc-block-components-checkout-step,.is-small .wc-block-components-form .wc-block-components-checkout-step{padding-left:0}.wc-block-components-checkout-step--disabled{opacity:.6}.wc-block-components-checkout-step__container{position:relative}.wc-block-components-checkout-step__content>*{margin-bottom:1em}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__content>:last-child{margin-bottom:0;padding-bottom:1.5em}.wc-block-components-checkout-step__heading{display:flex;justify-content:space-between;align-content:center;flex-wrap:wrap;margin:.75em 0 1em;position:relative;align-items:center;gap:1em}.wc-block-components-checkout-step:first-child .wc-block-components-checkout-step__heading,.wc-block-components-express-payment-continue-rule+.wc-block-components-checkout-step .wc-block-components-checkout-step__heading{margin-top:0}.wc-block-components-checkout-step__title{margin:0 12px 0 0}.wc-block-components-checkout-step__heading-content{font-size:.75em}.wc-block-components-checkout-step__heading-content a{font-weight:700;color:inherit}.wc-block-components-checkout-step__description{font-size:.875em;line-height:1.25;margin-bottom:16px}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;background:transparent;counter-increment:checkout-step;content:" " counter(checkout-step) ".";content:" " counter(checkout-step) "."/"";position:absolute;width:24px;left:-24px;top:0;text-align:center;transform:translateX(-50%)}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after{content:"";height:100%;border-left:1px solid;opacity:.3;position:absolute;left:-24px;top:0}.is-mobile .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before,.is-small .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before{position:static;transform:none;left:auto;top:auto;content:counter(checkout-step) ". ";content:counter(checkout-step) ". "/""}.is-mobile .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after,.is-small .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after{content:unset}.editor-styles-wrapper .wp-block h4.wc-block-components-checkout-step__title{font-size:1em;line-height:24px;margin:0 12px 0 0}.wc-block-components-order-summary .wc-block-components-panel__button{padding-top:0;margin-top:0}.wc-block-components-order-summary .wc-block-components-panel__content{margin-bottom:0}.wc-block-components-order-summary__content{display:table;width:100%}.wc-block-components-order-summary-item{position:relative;font-size:.875em;display:flex;padding-bottom:1px;padding-top:16px;width:100%}.wc-block-components-order-summary-item:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-components-order-summary-item:first-child{padding-top:0}.wc-block-components-order-summary-item:last-child>div{padding-bottom:0}.wc-block-components-order-summary-item:last-child:after{display:none}.wc-block-components-order-summary-item .wc-block-components-product-metadata{font-size:1em}.wc-block-components-order-summary-item__description,.wc-block-components-order-summary-item__image{display:table-cell;vertical-align:top}.wc-block-components-order-summary-item__image{width:48px;padding-bottom:16px;position:relative}.wc-block-components-order-summary-item__image>img{width:48px;max-width:48px}.wc-block-components-order-summary-item__quantity{align-items:center;background:#fff;border:2px solid;border-radius:1em;box-shadow:0 0 0 2px #fff;color:#000;display:flex;line-height:1;min-height:20px;padding:0 .4em;position:absolute;justify-content:center;min-width:20px;right:0;top:0;transform:translate(50%,-50%);white-space:nowrap;z-index:1}.wc-block-components-order-summary-item__description{padding-left:24px;padding-right:12px;padding-bottom:16px}.wc-block-components-order-summary-item__description .wc-block-components-product-metadata,.wc-block-components-order-summary-item__description p{line-height:1.375;margin-top:4px}.wc-block-components-order-summary-item__total-price{font-weight:700;margin-left:auto;text-align:right}.wc-block-components-order-summary-item__individual-prices{display:block}.wc-block-components-payment-method-icons{margin:0 0 14px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center}.wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{display:inline-block;margin:0 4px 2px;padding:0;width:auto;max-width:38px;height:24px;max-height:24px}.wc-block-components-payment-method-icons--align-left{justify-content:flex-start}.wc-block-components-payment-method-icons--align-left .wc-block-components-payment-method-icon{margin-left:0;margin-right:8px}.wc-block-components-payment-method-icons--align-right{justify-content:flex-end}.wc-block-components-payment-method-icons--align-right .wc-block-components-payment-method-icon{margin-right:0;margin-left:8px}.wc-block-components-payment-method-icons:last-child{margin-bottom:0}.is-mobile .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon,.is-small .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{height:16px}.wc-block-components-payment-method-label--with-icon{display:inline-block;vertical-align:middle}.wc-block-components-payment-method-label--with-icon>img,.wc-block-components-payment-method-label--with-icon>svg{vertical-align:middle;margin:-2px 4px 0 0}.is-mobile .wc-block-components-payment-method-label--with-icon>img,.is-mobile .wc-block-components-payment-method-label--with-icon>svg,.is-small .wc-block-components-payment-method-label--with-icon>img,.is-small .wc-block-components-payment-method-label--with-icon>svg{display:none}.editor-styles-wrapper .wc-block-components-checkout-policies,.wc-block-components-checkout-policies{font-size:.75em;text-align:center;list-style:none outside;line-height:1;margin:24px 0}.wc-block-components-checkout-policies__item{list-style:none outside;display:inline-block;padding:0 .25em;margin:0}.wc-block-components-checkout-policies__item:not(:first-child){border-left:1px solid #ccc}.wc-block-components-checkout-policies__item>a{color:inherit;padding:0 .25em}.wc-block-components-product-badge{font-size:.75em;border-radius:2px;border:1px solid;display:inline-block;font-weight:600;padding:0 .66em;text-transform:uppercase;white-space:nowrap}.wc-block-components-product-details.wc-block-components-product-details{list-style:none;margin:.5em 0;padding:0}.wc-block-components-product-details.wc-block-components-product-details:last-of-type{margin-bottom:0}.wc-block-components-product-details.wc-block-components-product-details li{margin-left:0}.wc-block-components-product-details__name,.wc-block-components-product-details__value{display:inline-block}.is-large:not(.wc-block-checkout) .wc-block-components-product-details__name{font-weight:700}img.wc-block-components-product-image[alt=""]{border:1px solid #f2f2f2}.wc-block-components-product-metadata{font-size:.75em}.wc-block-components-product-metadata .wc-block-components-product-metadata__description>p,.wc-block-components-product-metadata .wc-block-components-product-metadata__variation-data{margin:.25em 0}.wc-block-components-checkout-return-to-cart-button{box-shadow:none;color:inherit;padding-left:calc(24px + .25em);position:relative;text-decoration:none}.wc-block-components-checkout-return-to-cart-button svg{left:0;position:absolute;transform:translateY(-50%);top:50%}.wc-block-components-shipping-calculator-address{margin-bottom:0}.wc-block-components-shipping-calculator-address__button{width:100%;margin-top:1.5em}.wc-block-components-shipping-calculator{padding:.5em 0 .75em}.wc-block-components-shipping-rates-control__package .wc-block-components-panel__button{margin-bottom:0;margin-top:0;padding-bottom:.75em;padding-top:.75em}.wc-block-components-shipping-rates-control__package .wc-block-components-panel__content,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control .wc-block-components-radio-control__option-layout,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control__option-layout{padding-bottom:0}.wc-block-components-shipping-rates-control__package-items{font-size:.875em;display:block;list-style:none;margin:0;padding:0}.wc-block-components-shipping-rates-control__package-item{overflow-wrap:anywhere;word-break:break-word;-ms-word-break:break-all;display:inline-block;margin:0;padding:0}.wc-block-components-shipping-rates-control__package-item:not(:last-child):after{content:", ";white-space:pre}.wc-block-components-totals-coupon .wc-block-components-panel__button{margin-top:0;padding-top:0}.wc-block-components-totals-coupon .wc-block-components-panel__content{padding-bottom:0}.wc-block-components-totals-coupon__form{display:flex;width:100%;margin-bottom:0}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__input{margin-bottom:0;margin-top:0;flex-grow:1}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button{height:3em;flex-shrink:0;margin-left:8px;padding-left:24px;padding-right:24px;white-space:nowrap}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button.no-margin{margin:0}.wc-block-components-totals-coupon__content{flex-direction:column;position:relative}.wc-block-components-totals-discount__coupon-list{list-style:none;margin:0;padding:0}.wc-block-components-totals-discount .wc-block-components-totals-item__value{color:#4ab866}.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,.wc-block-components-totals-footer-item .wc-block-components-totals-item__value{font-size:1.25em}.wc-block-components-totals-footer-item .wc-block-components-totals-item__label{font-weight:700}.wc-block-components-totals-footer-item .wc-block-components-totals-footer-item-tax{margin-bottom:0}.wc-block-components-totals-shipping fieldset.wc-block-components-totals-shipping__fieldset{background-color:transparent;margin:0;padding:0;border:0}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__via{margin-bottom:16px}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__description,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__label,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__secondary-description,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__secondary-label{flex-basis:100%;text-align:left}.wc-block-components-totals-shipping .wc-block-components-shipping-rates-control__no-results-notice{margin:0 0 .75em}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:active,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:focus,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:hover{background:transparent;opacity:.8}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:active,.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:focus,.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:hover{background:transparent}.editor-styles-wrapper .wc-block-components-checkbox-list,.wc-block-components-checkbox-list{margin:0;padding:0;list-style:none outside}.editor-styles-wrapper .wc-block-components-checkbox-list li,.wc-block-components-checkbox-list li{margin:0 0 4px;padding:0;list-style:none outside}.editor-styles-wrapper .wc-block-components-checkbox-list li.show-less button,.editor-styles-wrapper .wc-block-components-checkbox-list li.show-more button,.wc-block-components-checkbox-list li.show-less button,.wc-block-components-checkbox-list li.show-more button{background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li,.wc-block-components-checkbox-list.is-loading li{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li>*,.wc-block-components-checkbox-list.is-loading li>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li,.wc-block-components-checkbox-list.is-loading li{-webkit-animation:none;animation:none}}.wc-block-components-chip{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;align-items:center;border:0;display:inline-flex;padding:.125em .5em .25em;margin:0 .365em .365em 0;border-radius:0;line-height:1;max-width:100%}.wc-block-components-chip,.wc-block-components-chip:active,.wc-block-components-chip:focus,.wc-block-components-chip:hover{background:#e0e0e0;color:#1e1e1e}.wc-block-components-chip.wc-block-components-chip--radius-small{border-radius:3px}.wc-block-components-chip.wc-block-components-chip--radius-medium{border-radius:.433em}.wc-block-components-chip.wc-block-components-chip--radius-large{border-radius:2em;padding-left:.75em;padding-right:.75em}.wc-block-components-chip .wc-block-components-chip__text{flex-grow:1}.wc-block-components-chip.is-removable{padding-right:.5em}.wc-block-components-chip.is-removable .wc-block-components-chip__text{padding-right:.25em}.wc-block-components-chip .wc-block-components-chip__remove{font-size:.75em;background:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0}.wc-block-components-chip .wc-block-components-chip__remove-icon{vertical-align:middle}.theme-twentytwentyone .wc-block-components-chip,.theme-twentytwentyone .wc-block-components-chip:active,.theme-twentytwentyone .wc-block-components-chip:focus,.theme-twentytwentyone .wc-block-components-chip:hover{background:#fff}.theme-twentytwentyone .wc-block-components-chip:active button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip:focus button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip:hover button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background){background:transparent}.wc-block-components-chip__remove:focus,.wc-block-components-chip__remove:hover,button.wc-block-components-chip:focus>.wc-block-components-chip__remove,button.wc-block-components-chip:hover>.wc-block-components-chip__remove{fill:#cc1818}.wc-block-components-chip__remove:disabled,button.wc-block-components-chip:disabled>.wc-block-components-chip__remove{fill:#949494;cursor:not-allowed}.wc-block-components-combobox .wc-block-components-combobox-control,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-combobox .wc-block-components-combobox-control .components-base-control__field,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-base-control__field{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-combobox .wc-block-components-combobox-control .components-combobox-control__suggestions-container,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-combobox-control__suggestions-container{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;position:relative}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input{color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;box-sizing:border-box;outline:inherit;border:1px solid #50575e;background:#fff;box-shadow:none;color:#2b2d2f;font-family:inherit;font-weight:400;height:3em;letter-spacing:inherit;line-height:1;padding:1.5em 16px .25em;text-align:left;text-overflow:ellipsis;text-transform:none;white-space:nowrap;width:100%;opacity:1;border-radius:4px}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true],.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true]{background-color:#fff;color:#2b2d2f;outline:0;box-shadow:0 0 0 1px #50575e}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true],.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true]{border-bottom-right-radius:0;border-bottom-left-radius:0}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus{background-color:rgba(0,0,0,.1);color:#fff;box-shadow:0 0 0 1px hsla(0,0%,100%,.4)}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list{position:absolute;z-index:10;background-color:#fff;border:1px solid #50575e;border-top:0;margin:3em 0 0;padding:0;max-height:300px;min-width:100%;overflow:auto;color:#2b2d2f}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list{background-color:#1e1e1e;color:#fff}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion{font-size:1em;color:#757575;cursor:default;list-style:none;margin:0;padding:.25em 16px}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected{background-color:#ddd}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected{background-color:rgba(0,0,0,.4)}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-highlighted,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:active,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:focus,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:hover,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-highlighted,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:active,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:focus,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:hover{background-color:#00669e;color:#fff}.wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;line-height:1.375;position:absolute;transform:translateY(.75em);transform-origin:top left;transition:all .2s ease;color:#757575;z-index:1;margin:0 0 0 17px;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 32px);white-space:nowrap}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{color:hsla(0,0%,100%,.6)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{transition:none}}.wc-block-components-combobox.is-active .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-combobox:focus-within .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox.is-active .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox:focus-within .wc-block-components-combobox-control label.components-base-control__label{transform:translateY(4px) scale(.75)}.wc-block-components-combobox.has-error .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control label.components-base-control__label{color:#cc1818}.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:active,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:hover,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:active,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:hover{border-color:#cc1818}.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus{box-shadow:0 0 0 1px #cc1818}.wc-block-components-country-input{margin-top:1.5em}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}@-webkit-keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(-480px)}}@keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(-480px)}}@media only screen and (max-width:480px){@-webkit-keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(-100vw)}}@keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(-100vw)}}}.wc-block-components-drawer__screen-overlay{background-color:rgba(95,95,95,.35);bottom:0;left:0;position:fixed;right:0;top:0;transition:opacity .3s;z-index:9999;opacity:1}.wc-block-components-drawer__screen-overlay--with-slide-out{transition:opacity .3s}.wc-block-components-drawer__screen-overlay--with-slide-in{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:fadein;animation-name:fadein}.wc-block-components-drawer__screen-overlay--is-hidden{pointer-events:none;opacity:0}.wc-block-components-drawer{position:relative;background:#fff;display:block;height:100%;left:100%;overflow:auto;position:fixed;right:0;top:0;transform:translateX(-480px);width:480px}.wc-block-components-drawer:after{border-style:solid;border-width:0 0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}@media only screen and (max-width:480px){.wc-block-components-drawer{transform:translateX(-100vw);width:100vw}}.wc-block-components-drawer__screen-overlay--with-slide-out .wc-block-components-drawer{transition:transform .3s}.wc-block-components-drawer__screen-overlay--with-slide-in .wc-block-components-drawer{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:slidein;animation-name:slidein}.wc-block-components-drawer__screen-overlay--is-hidden .wc-block-components-drawer{transform:translateX(0)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-drawer,.wc-block-components-drawer__screen-overlay{-webkit-animation-name:none!important;animation-name:none!important;transition:none!important}}.wc-block-components-drawer .components-modal__content{padding:40px 16px}.wc-block-components-drawer .components-modal__header{position:relative}.wc-block-components-drawer .components-modal__header .components-button{border:0;border-radius:0;vertical-align:baseline;background:transparent;position:absolute;right:0;top:0;padding:1em;margin:-1em}.wc-block-components-drawer .components-modal__header .components-button>span{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.wc-block-components-drawer .components-modal__header-heading{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;font-size:1.25rem;word-break:break-word}.wc-block-components-dropdown-selector{max-width:300px;position:relative;width:100%}.wc-block-components-dropdown-selector__input-wrapper{background:#fff;border:1px solid #50575e;color:#2b2d2f;align-items:center;border-radius:4px;cursor:text;display:flex;flex-wrap:wrap;padding:2px 8px}.is-disabled .wc-block-components-dropdown-selector__input-wrapper{background-color:#e0e0e0}.is-multiple.has-checked>.wc-block-components-dropdown-selector__input-wrapper{padding:2px 4px}.is-open>.wc-block-components-dropdown-selector__input-wrapper{border-radius:4px 4px 0 0}.wc-block-components-dropdown-selector__input{font-size:.875em;line-height:1.2857142857;margin:.1875em 0;min-width:0;padding:.1875em 0}.is-single .wc-block-components-dropdown-selector__input{width:100%}.is-single .wc-block-components-dropdown-selector__input:active,.is-single .wc-block-components-dropdown-selector__input:focus,.is-single .wc-block-components-dropdown-selector__input:hover{outline:0}.is-single.has-checked.is-open .wc-block-components-dropdown-selector__input{margin-bottom:1.5px;margin-top:1.5px}.is-single.has-checked:not(.is-open) .wc-block-components-dropdown-selector__input{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px;position:absolute}.is-multiple .wc-block-components-dropdown-selector__input{flex:1;min-width:0}.is-multiple .wc-block-components-dropdown-selector__input,.is-single .wc-block-components-dropdown-selector__input:first-child{background:transparent;border:0}.is-multiple .wc-block-components-dropdown-selector__input:active,.is-multiple .wc-block-components-dropdown-selector__input:focus,.is-multiple .wc-block-components-dropdown-selector__input:hover,.is-single .wc-block-components-dropdown-selector__input:first-child:active,.is-single .wc-block-components-dropdown-selector__input:first-child:focus,.is-single .wc-block-components-dropdown-selector__input:first-child:hover{outline:0}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove{background-color:transparent;border:0;color:inherit;font-size:inherit;font-weight:inherit;text-transform:none}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:active,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:focus,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:hover,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:active,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:focus,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:hover{background-color:transparent;text-decoration:none}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value{font-size:.875em;align-items:center;color:#757575;display:inline-flex;margin:.1875em 0;padding:.1875em 0;width:100%}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label{flex-grow:1;line-height:1.2857142857;padding:0;text-align:left}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove{background-color:transparent;border:0;display:inline-block;line-height:1;padding:0 0 0 .3em}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove>svg{display:block}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-chip{font-size:.875em;margin-top:.1875em;margin-bottom:.1875em;line-height:1.2857142857}.wc-block-components-dropdown-selector__list{background-color:#fff;margin:-1px 0 0;padding:0;position:absolute;left:0;right:0;top:100%;max-height:300px;overflow-y:auto;z-index:1}.wc-block-components-dropdown-selector__list:not(:empty){border:1px solid #9f9f9f}.wc-block-components-dropdown-selector__list-item{font-size:.875em;color:#757575;cursor:default;list-style:none;margin:0;padding:0 4px}.wc-block-components-dropdown-selector__list-item.is-selected{background-color:#ddd}.wc-block-components-dropdown-selector__list-item.is-highlighted,.wc-block-components-dropdown-selector__list-item:active,.wc-block-components-dropdown-selector__list-item:focus,.wc-block-components-dropdown-selector__list-item:hover{background-color:#00669e;color:#fff}.wc-filter-element-label-list-count{opacity:.6}.wc-filter-element-label-list-count:before{content:" ("}.wc-filter-element-label-list-count:after{content:")"}.wc-block-components-filter-submit-button{display:block;margin-left:auto;white-space:nowrap}.wc-block-components-formatted-money-amount{white-space:nowrap}.wc-block-components-load-more{text-align:center;width:100%}.wc-block-components-loading-mask{position:relative;min-height:34px;pointer-events:none}.wc-block-components-loading-mask .components-spinner{position:absolute;margin:0;top:50%;left:50%;transform:translate(-50%,-50%)}.wc-block-components-loading-mask .wc-block-components-loading-mask__children{opacity:.25}.wc-block-components-pagination{margin:0 auto 16px}.wc-block-components-pagination__ellipsis,.wc-block-components-pagination__page{font-size:1em;color:#333;display:inline-block;font-weight:400}.wc-block-components-pagination__page{border-color:transparent;padding:.3em .6em;min-width:2.2em}@media(max-width:782px){.wc-block-components-pagination__page{padding:.1em .2em;min-width:1.6em}}.wc-block-components-pagination__page:not(.toggle){background-color:transparent}.wc-block-components-pagination__ellipsis{padding:.3em}@media(max-width:782px){.wc-block-components-pagination__ellipsis{padding:.1em}}.wc-block-components-pagination__page--active[disabled]{color:#333;font-weight:700;opacity:1!important}.wc-block-components-pagination__page--active[disabled]:focus,.wc-block-components-pagination__page--active[disabled]:hover{background-color:inherit;color:#333;opacity:1!important}html[dir=rtl] .wc-block-components-pagination-page--arrow span{display:inline-block;transform:scaleX(-1)}.wc-block-components-price-slider{margin-bottom:24px}.wc-block-components-price-slider.wc-block-components-price-slider--has-filter-button .wc-block-components-price-slider__controls{justify-content:flex-end}.wc-block-components-price-slider.wc-block-components-price-slider--has-filter-button .wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--max{margin-left:0;margin-right:10px}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;pointer-events:none;max-width:100%;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount>*,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button>*,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}.wc-block-components-price-slider__range-input-wrapper{padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:9px;clear:both;position:relative;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);background:#e1e1e1;margin:15px 0}.wc-block-components-price-slider__range-input-progress{height:9px;width:100%;position:absolute;left:0;top:0;--track-background:linear-gradient(90deg,transparent var(--low),var(--range-color) 0,var(--range-color) var(--high),transparent 0) no-repeat 0 100%/100% 100%;--range-color:#af7dd1;background:var(--track-background)}.wc-block-components-price-slider__controls{display:flex}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount{margin:0;border-radius:4px;width:auto;max-width:100px;min-width:0}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--min{margin-right:10px}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--max{margin-left:auto}.wc-block-components-price-slider__range-input{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:0;display:block;position:relative;pointer-events:none;outline:none!important;position:absolute;left:0;top:0}.wc-block-components-price-slider__range-input::-webkit-slider-runnable-track{cursor:default;height:1px;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-webkit-slider-thumb{background-color:transparent;background-position:0 0;width:28px;height:23px;border:0;padding:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-webkit-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:-6px 0 0}.wc-block-components-price-slider__range-input::-webkit-slider-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input::-webkit-slider-progress{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-focus-outer{border:0}.wc-block-components-price-slider__range-input::-moz-range-track{cursor:default;height:1px;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-progress{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-thumb{background-color:transparent;background-position:0 0;width:28px;height:23px;border:0;padding:0;margin:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input::-ms-thumb{background-color:transparent;background-position:0 0;width:28px;height:23px;border:0;padding:0;margin:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-ms-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-ms-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-webkit-slider-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-moz-range-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-ms-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min{z-index:21}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-webkit-slider-thumb{margin-left:-2px;background-position-x:left}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-moz-range-thumb{background-position-x:left;transform:translate(-2px,4px)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-ms-thumb{background-position-x:left}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max{z-index:20}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-webkit-slider-thumb{background-position-x:right;margin-left:2px}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-moz-range-thumb{background-position-x:right;transform:translate(2px,4px)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-ms-thumb{background-position-x:right}.rtl .wc-block-components-price-slider__range-input-progress{--track-background:linear-gradient(270deg,transparent var(--low),var(--range-color) 0,var(--range-color) var(--high),transparent 0) no-repeat 0 100%/100% 100%;--range-color:#af7dd1;background:var(--track-background)}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-price-slider__range-input-wrapper{background:transparent;box-shadow:none;height:24px}.wc-block-components-price-slider__range-input-progress{background:#af7dd1;width:100%;top:7px}.wc-block-components-price-slider__range-input{height:24px;pointer-events:auto}.wc-block-components-price-slider__range-input::-ms-track{background:transparent;border-color:transparent;border-width:7px 0;color:transparent}.wc-block-components-price-slider__range-input::-ms-fill-lower{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input::-ms-fill-upper{background:transparent}.wc-block-components-price-slider__range-input::-ms-tooltip{display:none}.wc-block-components-price-slider__range-input::-ms-thumb{transform:translate(1px);pointer-events:auto}.wc-block-components-price-slider__range-input--max::-ms-fill-upper{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input--max::-ms-fill-lower{background:transparent}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;pointer-events:none;max-width:100%;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}}@media screen and (-ms-high-contrast:active)and (prefers-reduced-motion:reduce),screen and (-ms-high-contrast:none)and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}@supports(-ms-ime-align:auto){.wc-block-components-price-slider__range-input-wrapper{background:transparent;box-shadow:none;height:24px}.wc-block-components-price-slider__range-input-progress{background:#af7dd1;width:100%;top:7px}.wc-block-components-price-slider__range-input{height:24px;pointer-events:auto}.wc-block-components-price-slider__range-input::-ms-track{background:transparent;border-color:transparent;border-width:7px 0;color:transparent}.wc-block-components-price-slider__range-input::-ms-fill-lower{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input::-ms-fill-upper{background:transparent}.wc-block-components-price-slider__range-input::-ms-tooltip{display:none}.wc-block-components-price-slider__range-input::-ms-thumb{transform:translate(1px);pointer-events:auto}.wc-block-components-price-slider__range-input--max::-ms-fill-upper{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input--max::-ms-fill-lower{background:transparent}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;pointer-events:none;max-width:100%;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.theme-twentytwentyone .wc-block-components-price-slider__range-input-wrapper{background:transparent;border:3px solid;box-sizing:border-box}.theme-twentytwentyone .wc-block-components-price-slider__range-input-progress{--range-color:currentColor;margin:-3px}.theme-twentytwentyone .wc-block-price-filter__range-input{background:transparent;margin:-3px;width:calc(100% + 6px)}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-webkit-slider-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-webkit-slider-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-moz-range-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-moz-range-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-ms-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-ms-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input::-webkit-slider-thumb{margin-top:-9px}.theme-twentytwentyone .wc-block-price-filter__range-input.wc-block-components-price-slider__range-input--max::-moz-range-thumb{transform:translate(2px,1px)}.theme-twentytwentyone .wc-block-price-filter__range-input.wc-block-components-price-slider__range-input--min::-moz-range-thumb{transform:translate(-2px,1px)}.theme-twentytwentyone .wc-block-price-filter__range-input::-ms-track{border-color:transparent!important}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.theme-twentytwentyone .wc-block-components-price-slider__range-input-wrapper{border:0;height:auto;position:relative;height:50px}.theme-twentytwentyone .wc-block-components-price-slider__range-input-progress{display:none}.theme-twentytwentyone .wc-block-price-filter__range-input{height:100%;margin:0;width:100%}}.wc-block-components-product-sort-select{margin-bottom:24px;text-align:left}@-webkit-keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.wc-block-grid{text-align:center}.wc-block-grid__no-products{padding:40px;text-align:center;width:100%}.wc-block-grid__no-products .wc-block-grid__no-products-image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-grid__no-products .wc-block-grid__no-products-title{display:block;margin:0;font-weight:700}.wc-block-grid__no-products .wc-block-grid__no-products-description{display:block;margin:.25em 0 1em}.wc-block-grid__products{display:flex;flex-wrap:wrap;padding:0;margin:0 -8px 16px;background-clip:padding-box}.wc-block-grid__product{box-sizing:border-box;padding:0;margin:0;float:none;width:auto;position:relative;text-align:center;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:16px solid transparent;list-style:none}.wc-block-grid__product.wc-block-grid__product{box-sizing:border-box}.theme-twentytwenty .wc-block-grid.has-aligned-buttons .wc-block-grid__product,.wc-block-grid.has-aligned-buttons .wc-block-grid__product{display:flex;flex-direction:column}.theme-twentytwenty .wc-block-grid.has-aligned-buttons .wc-block-grid__product>:last-child,.wc-block-grid.has-aligned-buttons .wc-block-grid__product>:last-child{margin-top:auto;margin-bottom:0;padding-bottom:12px}.theme-twentytwenty .wc-block-grid.has-1-columns .wc-block-grid__product,.wc-block-grid.has-1-columns .wc-block-grid__product{flex:1 0 100%;max-width:100%}.theme-twentytwenty .wc-block-grid.has-2-columns .wc-block-grid__product,.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%}.theme-twentytwenty .wc-block-grid.has-3-columns .wc-block-grid__product,.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 33.33333%;max-width:33.3333333333%}.theme-twentytwenty .wc-block-grid.has-4-columns .wc-block-grid__product,.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 25%;max-width:25%}.theme-twentytwenty .wc-block-grid.has-5-columns .wc-block-grid__product,.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 20%;max-width:20%}.theme-twentytwenty .wc-block-grid.has-6-columns .wc-block-grid__product,.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 16.66667%;max-width:16.6666666667%}.theme-twentytwenty .wc-block-grid.has-7-columns .wc-block-grid__product,.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 14.28571%;max-width:14.2857142857%}.theme-twentytwenty .wc-block-grid.has-8-columns .wc-block-grid__product,.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 12.5%;max-width:12.5%}.theme-twentytwenty .wc-block-grid.has-6-columns .wc-block-grid__product,.wc-block-grid.has-6-columns .wc-block-grid__product{font-size:.5em}.theme-twentytwenty .wc-block-grid.has-5-columns .wc-block-grid__product,.theme-twentytwenty .wc-block-grid.has-6-columns.alignfull .wc-block-grid__product,.wc-block-grid.has-5-columns .wc-block-grid__product,.wc-block-grid.has-6-columns.alignfull .wc-block-grid__product{font-size:.58em}.theme-twentytwenty .wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,.theme-twentytwenty .wc-block-grid.has-5-columns.alignfull .wc-block-grid__product,.wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,.wc-block-grid.has-5-columns.alignfull .wc-block-grid__product{font-size:.75em}.theme-twentytwenty .wc-block-grid.has-3-columns:not(.alignwide):not(.alignfull),.wc-block-grid.has-3-columns:not(.alignwide):not(.alignfull){font-size:.92em}@media(max-width:480px){.wc-block-grid.has-2-columns .wc-block-grid__products{display:block}.wc-block-grid.has-2-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-3-columns .wc-block-grid__products{display:block}.wc-block-grid.has-3-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-4-columns .wc-block-grid__products{display:block}.wc-block-grid.has-4-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-5-columns .wc-block-grid__products{display:block}.wc-block-grid.has-5-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-6-columns .wc-block-grid__products{display:block}.wc-block-grid.has-6-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-7-columns .wc-block-grid__products{display:block}.wc-block-grid.has-7-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-8-columns .wc-block-grid__products{display:block}.wc-block-grid.has-8-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}}@media(min-width:481px)and (max-width:600px){.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-2-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-2-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-3-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-3-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-4-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-4-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-5-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-5-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-6-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-6-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-7-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-7-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-8-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-8-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}}.wc-block-components-product-name{font-size:1em;overflow-wrap:anywhere;word-break:break-word;-ms-word-break:break-all}.wc-block-components-product-price--align-left{display:block;text-align:left}.wc-block-components-product-price--align-center{display:block;text-align:center}.wc-block-components-product-price--align-right{display:block;text-align:right}.wc-block-components-product-price__value.is-discounted{margin-left:.5em}.is-loading .wc-block-components-product-price:before{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;content:".";display:inline-block;width:5em}.is-loading .wc-block-components-product-price:before>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-price:before{-webkit-animation:none;animation:none}}.wc-block-components-quantity-selector{display:flex;width:107px;border:1px solid #ddd;background:#fff;border-radius:4px;box-sizing:content-box;margin:0 0 .25em}.has-dark-controls .wc-block-components-quantity-selector{background-color:transparent;border-color:hsla(0,0%,100%,.4)}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input{font-size:1em;order:2;min-width:40px;flex:1 1 auto;border:0;padding:.4em 0;margin:0;text-align:center;background:transparent;box-shadow:none;color:#000;line-height:1;vertical-align:middle;-moz-appearance:textfield}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus{background:#f0f0f0;outline:1px solid #ddd}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:disabled{color:#949494}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input{color:#fff;background:transparent}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus{background:transparent}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:disabled{color:hsla(0,0%,100%,.3)}.wc-block-components-quantity-selector input::-webkit-inner-spin-button,.wc-block-components-quantity-selector input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button{border:0;padding:0;margin:0;background:none transparent;box-shadow:none;font-size:1em;min-width:30px;cursor:pointer;color:#1e1e1e;font-style:normal;text-align:center;text-decoration:none}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus{outline:2px solid #ddd}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{border:0;padding:0;margin:0;background:none transparent;box-shadow:none;color:#1e1e1e}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus:focus,.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover:focus{outline:2px solid #ddd}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled{color:#949494;cursor:default;border:0;padding:0;margin:0;background:none transparent;box-shadow:none}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled:focus{outline:2px solid #ddd}.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button,.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{color:#fff}.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled{color:hsla(0,0%,100%,.3)}.wc-block-components-quantity-selector>.wc-block-components-quantity-selector__button--minus{order:1}.wc-block-components-quantity-selector>.wc-block-components-quantity-selector__button--plus{order:3}.theme-twentyseventeen .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.theme-twentyseventeen .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{background:none transparent}.wc-block-components-radio-control__option{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;display:block;margin:1em 0;padding:0 0 0 2.5em;position:relative}.wc-block-components-radio-control__option:first-child{margin-top:0}.wc-block-components-radio-control__option:last-child{margin-bottom:0}.wc-block-components-radio-control__option-layout{display:table;width:100%}.wc-block-components-radio-control__option .wc-block-components-radio-control__option-layout:after{display:none}.wc-block-components-radio-control__description-group,.wc-block-components-radio-control__label-group{display:table-row}.wc-block-components-radio-control__description-group>span,.wc-block-components-radio-control__label-group>span{display:table-cell}.wc-block-components-radio-control__description-group .wc-block-components-radio-control__secondary-description,.wc-block-components-radio-control__description-group .wc-block-components-radio-control__secondary-label,.wc-block-components-radio-control__label-group .wc-block-components-radio-control__secondary-description,.wc-block-components-radio-control__label-group .wc-block-components-radio-control__secondary-label{text-align:right;min-width:50%}.wc-block-components-radio-control__label,.wc-block-components-radio-control__secondary-label{line-height:max(1.5rem,24px)}.wc-block-components-radio-control__description,.wc-block-components-radio-control__secondary-description{font-size:.875em;line-height:20px}.wc-block-components-radio-control .wc-block-components-radio-control__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:2px solid #50575e;border-radius:50%;display:inline-block;height:1.5em;min-height:24px;min-width:24px;width:1.5em;position:absolute;left:0;top:50%;transform:translateY(-50%)}.wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background:#000;border-radius:50%;content:"";display:block;height:.75em;left:50%;margin:0;min-height:12px;min-width:12px;position:absolute;top:50%;transform:translate(-50%,-50%);width:.75em}.has-dark-controls .wc-block-components-radio-control .wc-block-components-radio-control__input{border-color:hsla(0,0%,100%,.6);background-color:rgba(0,0,0,.1)}.has-dark-controls .wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background:#fff}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:checked{border-width:2px}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background-color:var(--form--color-text)}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:after{display:none}.is-loading .wc-block-components-review-list-item__text{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;display:block;width:60%}.is-loading .wc-block-components-review-list-item__text>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__text{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__text:after{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image:after{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;font-size:1em;width:80px}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author:after{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__product,.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__rating .wc-block-components-review-list-item__rating__stars>span{display:none}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;height:1em;width:120px}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date:after{content:" "}.editor-styles-wrapper .wc-block-components-review-list-item__item,.wc-block-components-review-list-item__item{margin:0 0 48px;list-style:none}.wc-block-components-review-list-item__info{display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr;margin-bottom:24px}.wc-block-components-review-list-item__meta{-ms-grid-column:1;grid-column:1;-ms-grid-row:1;grid-row:1}.wc-block-components-review-list-item__item--has-image .wc-block-components-review-list-item__info{-ms-grid-columns:calc(3em + 16px) 1fr;grid-template-columns:calc(3em + 16px) 1fr}.wc-block-components-review-list-item__item--has-image .wc-block-components-review-list-item__meta{-ms-grid-column:2;grid-column:2}.wc-block-components-review-list-item__image{align-items:center;display:flex;height:3em;-ms-grid-column:1;grid-column:1;-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/3;justify-content:center;position:relative;width:3em}.wc-block-components-review-list-item__image>img{display:block;max-height:100%;-o-object-fit:contain;object-fit:contain}.wc-block-components-review-list-item__verified{width:21px;height:21px;text-indent:21px;margin:0;line-height:21px;overflow:hidden;position:absolute;right:-7px;bottom:-7px}.wc-block-components-review-list-item__verified:before{width:21px;height:21px;background:transparent url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="21" height="21" fill="none"%3E%3Ccircle cx="10.5" cy="10.5" r="10.5" fill="%23fff"/%3E%3Cpath fill="%23008A21" fill-rule="evenodd" d="M2.1667 10.5003c0-4.6 3.7333-8.3333 8.3333-8.3333s8.3334 3.7333 8.3334 8.3333S15.1 18.8337 10.5 18.8337s-8.3333-3.7334-8.3333-8.3334zm2.5 0l4.1666 4.1667 7.5001-7.5-1.175-1.1833-6.325 6.325-2.9917-2.9834-1.175 1.175z" clip-rule="evenodd"/%3E%3Cmask id="a" width="17" height="17" x="2" y="2" maskUnits="userSpaceOnUse"%3E%3Cpath fill="%23fff" fill-rule="evenodd" d="M2.1667 10.5003c0-4.6 3.7333-8.3333 8.3333-8.3333s8.3334 3.7333 8.3334 8.3333S15.1 18.8337 10.5 18.8337s-8.3333-3.7334-8.3333-8.3334zm2.5 0l4.1666 4.1667 7.5001-7.5-1.175-1.1833-6.325 6.325-2.9917-2.9834-1.175 1.175z" clip-rule="evenodd"/%3E%3C/mask%3E%3Cg mask="url(%23a)"%3E%3Cpath fill="%23008A21" d="M.5.5h20v20H.5z"/%3E%3C/g%3E%3C/svg%3E') 50% no-repeat;display:block;content:""}.wc-block-components-review-list-item__meta{display:flex;align-items:center;flex-flow:row wrap}.wc-block-components-review-list-item__meta:after{order:3;content:"";flex-basis:100%}.wc-block-components-review-list-item__author,.wc-block-components-review-list-item__product{display:block;font-weight:700;order:1;margin-right:8px}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author{font-weight:400;order:4}.wc-block-components-review-list-item__published-date{order:5}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date{padding-left:8px;position:relative}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date:before{content:"";display:inline-block;margin-left:-8px;border-right:1px solid;opacity:.5;height:1em;vertical-align:middle;position:absolute;top:calc(50% + .1em);transform:translateY(-50%)}.wc-block-components-review-list-item__author:first-child+.wc-block-components-review-list-item__published-date:before,.wc-block-components-review-list-item__rating+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date:before{display:none}.wc-block-components-review-list-item__rating{order:2}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars{font-size:1em;display:block;top:0;overflow:hidden;position:relative;height:1em;line-height:1;width:5.3em;font-family:star;font-weight:400}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars:before{content:"SSSSS";opacity:.25;float:left;top:0;left:0;position:absolute}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars span:before{content:"SSSSS";top:0;position:absolute;left:0;color:#e6a237}.wc-block-components-review-list-item__text p{font-size:inherit}.wc-block-components-review-list.wc-block-components-review-list{margin:0}.wc-block-components-review-sort-select{text-align:right}.wc-block-components-sidebar-layout{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wc-block-components-sidebar-layout .wc-block-components-main{box-sizing:border-box;margin:0;padding-right:3.7735849057%;width:65%}.wc-block-components-sidebar{box-sizing:border-box;margin:0;padding-left:2.2641509434%;width:35%}.wc-block-components-sidebar .wc-block-components-panel>h2{font-size:1em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.is-medium.wc-block-components-sidebar-layout,.is-mobile.wc-block-components-sidebar-layout,.is-small.wc-block-components-sidebar-layout{flex-direction:column;margin:0 auto 16px}.is-medium.wc-block-components-sidebar-layout .wc-block-components-main,.is-medium.wc-block-components-sidebar-layout .wc-block-components-sidebar,.is-mobile.wc-block-components-sidebar-layout .wc-block-components-main,.is-mobile.wc-block-components-sidebar-layout .wc-block-components-sidebar,.is-small.wc-block-components-sidebar-layout .wc-block-components-main,.is-small.wc-block-components-sidebar-layout .wc-block-components-sidebar{padding:0;width:100%}.is-large .wc-block-components-sidebar .wc-block-components-panel,.is-large .wc-block-components-sidebar .wc-block-components-totals-item{padding-left:16px;padding-right:16px}.is-large .wc-block-components-sidebar .wc-block-components-panel .wc-block-components-totals-item{padding:0}.wc-block-components-sidebar .wc-block-components-panel>h2{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit}.wc-block-components-sidebar .wc-block-components-panel>h2 .wc-block-components-panel__button{font-weight:400}.theme-twentytwenty .wc-block-components-sidebar .wc-block-components-panel>h2{font-size:1.25em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-sort-select{margin-bottom:12px}.wc-block-components-sort-select__label{margin-right:12px;display:inline-block;font-weight:400}.wc-block-components-sort-select__select{font-size:inherit;width:-webkit-max-content;width:-moz-max-content;width:max-content}.wc-block-components-spinner{position:absolute;width:100%;height:100%;color:inherit;box-sizing:content-box;text-align:center;font-size:1.25em}.wc-block-components-spinner:after{content:" ";position:absolute;top:50%;left:50%;margin:-.5em 0 0 -.5em;width:1em;height:1em;box-sizing:border-box;transform-origin:50% 50%;transform:translateZ(0) scale(.5);-webkit-backface-visibility:hidden;backface-visibility:hidden;border-radius:50%;border:.2em solid;border-left:.2em solid transparent;-webkit-animation:wc-block-components-spinner__animation 1s linear infinite;animation:wc-block-components-spinner__animation 1s linear infinite}@-webkit-keyframes wc-block-components-spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes wc-block-components-spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(1turn)}}.wc-block-components-state-input{margin-top:1.5em}.wc-block-components-tabs .wc-block-components-tabs__list{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item{border:none;flex:auto;background:transparent;padding:12px 16px;color:inherit;outline-offset:-1px;text-align:center;transition:box-shadow .1s linear;box-shadow:inset 0 -1px currentColor;border-radius:0}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item.is-active{box-shadow:inset 0 -3px currentColor;font-weight:600;position:relative}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:focus{outline-offset:-1px;outline:1px dotted currentColor}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:active,.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:hover{background:transparent}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content{font-size:1em;line-height:1;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:inline-block;font-weight:700}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content>img,.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content>svg{height:1.2em;vertical-align:middle;margin:.2em 0 -.2em}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content .wc-block-components-payment-method-icons{margin:.2em 0 -.2em}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{height:1.2em;vertical-align:middle}.wc-block-components-tabs .wc-block-components-tabs__content{padding:16px 0;text-transform:none}.wc-block-components-form .wc-block-components-text-input,.wc-block-components-text-input{position:relative;margin-top:1.5em;white-space:nowrap}.wc-block-components-form .wc-block-components-text-input label,.wc-block-components-text-input label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;position:absolute;transform:translateY(.75em);left:0;top:0;transform-origin:top left;line-height:1.375;color:#757575;transition:transform .2s ease;margin:0 0 0 17px;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 32px);cursor:text}.has-dark-controls .wc-block-components-form .wc-block-components-text-input label,.has-dark-controls .wc-block-components-text-input label{color:hsla(0,0%,100%,.6)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-form .wc-block-components-text-input label,.wc-block-components-text-input label{transition:none}}.wc-block-components-form .wc-block-components-text-input input:-webkit-autofill+label,.wc-block-components-text-input input:-webkit-autofill+label{transform:translateY(4px) scale(.75)}.wc-block-components-form .wc-block-components-text-input.is-active label,.wc-block-components-text-input.is-active label{transform:translateY(4px) scale(.75)}.wc-block-components-form .wc-block-components-text-input input[type=email],.wc-block-components-form .wc-block-components-text-input input[type=number],.wc-block-components-form .wc-block-components-text-input input[type=tel],.wc-block-components-form .wc-block-components-text-input input[type=text],.wc-block-components-form .wc-block-components-text-input input[type=url],.wc-block-components-text-input input[type=email],.wc-block-components-text-input input[type=number],.wc-block-components-text-input input[type=tel],.wc-block-components-text-input input[type=text],.wc-block-components-text-input input[type=url]{font-size:1em;background-color:#fff;padding:.75em 16px;border-radius:4px;border:1px solid #50575e;width:100%;line-height:1.375;font-family:inherit;margin:0;box-sizing:border-box;height:3em;min-height:0;color:#2b2d2f}.wc-block-components-form .wc-block-components-text-input input[type=email]:focus,.wc-block-components-form .wc-block-components-text-input input[type=number]:focus,.wc-block-components-form .wc-block-components-text-input input[type=tel]:focus,.wc-block-components-form .wc-block-components-text-input input[type=text]:focus,.wc-block-components-form .wc-block-components-text-input input[type=url]:focus,.wc-block-components-text-input input[type=email]:focus,.wc-block-components-text-input input[type=number]:focus,.wc-block-components-text-input input[type=tel]:focus,.wc-block-components-text-input input[type=text]:focus,.wc-block-components-text-input input[type=url]:focus{background-color:#fff;color:#2b2d2f;outline:0;box-shadow:0 0 0 1px #50575e}.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=email],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=number],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=tel],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=text],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=url],.has-dark-controls .wc-block-components-text-input input[type=email],.has-dark-controls .wc-block-components-text-input input[type=number],.has-dark-controls .wc-block-components-text-input input[type=tel],.has-dark-controls .wc-block-components-text-input input[type=text],.has-dark-controls .wc-block-components-text-input input[type=url]{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=email]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=number]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=tel]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=text]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=url]:focus,.has-dark-controls .wc-block-components-text-input input[type=email]:focus,.has-dark-controls .wc-block-components-text-input input[type=number]:focus,.has-dark-controls .wc-block-components-text-input input[type=tel]:focus,.has-dark-controls .wc-block-components-text-input input[type=text]:focus,.has-dark-controls .wc-block-components-text-input input[type=url]:focus{background-color:rgba(0,0,0,.1);color:#fff;box-shadow:0 0 0 1px hsla(0,0%,100%,.4)}.wc-block-components-form .wc-block-components-text-input input[type=number],.wc-block-components-text-input input[type=number]{-moz-appearance:textfield}.wc-block-components-form .wc-block-components-text-input input[type=number]::-webkit-inner-spin-button,.wc-block-components-form .wc-block-components-text-input input[type=number]::-webkit-outer-spin-button,.wc-block-components-text-input input[type=number]::-webkit-inner-spin-button,.wc-block-components-text-input input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.wc-block-components-form .wc-block-components-text-input.is-active input[type=email],.wc-block-components-form .wc-block-components-text-input.is-active input[type=number],.wc-block-components-form .wc-block-components-text-input.is-active input[type=tel],.wc-block-components-form .wc-block-components-text-input.is-active input[type=text],.wc-block-components-form .wc-block-components-text-input.is-active input[type=url],.wc-block-components-text-input.is-active input[type=email],.wc-block-components-text-input.is-active input[type=number],.wc-block-components-text-input.is-active input[type=tel],.wc-block-components-text-input.is-active input[type=text],.wc-block-components-text-input.is-active input[type=url]{padding:1.5em 0 .25em 16px}.wc-block-components-form .wc-block-components-text-input.has-error input,.wc-block-components-form .wc-block-components-text-input.has-error input:active,.wc-block-components-form .wc-block-components-text-input.has-error input:focus,.wc-block-components-form .wc-block-components-text-input.has-error input:hover,.wc-block-components-text-input.has-error input,.wc-block-components-text-input.has-error input:active,.wc-block-components-text-input.has-error input:focus,.wc-block-components-text-input.has-error input:hover{border-color:#cc1818}.wc-block-components-form .wc-block-components-text-input.has-error input:focus,.wc-block-components-text-input.has-error input:focus{box-shadow:0 0 0 1px #cc1818}.wc-block-components-form .wc-block-components-text-input.has-error label,.wc-block-components-text-input.has-error label{color:#cc1818}.wc-block-components-form .wc-block-components-text-input:only-child,.wc-block-components-text-input:only-child{margin-top:0}.wc-block-components-textarea{font-size:1em;background-color:#fff;border:1px solid #50575e;border-radius:4px;color:#2b2d2f;font-family:inherit;line-height:1.375;margin:0;padding:.75em 16px;width:100%}.has-dark-controls .wc-block-components-textarea{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-textarea::-moz-placeholder{color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-textarea:-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-textarea::placeholder{color:hsla(0,0%,100%,.6)}.theme-twentytwentyone .has-dark-controls .wc-block-components-textarea{background-color:rgba(0,0,0,.1);color:#fff}.theme-twentytwenty .wc-block-components-title.wc-block-components-title,.wc-block-components-title.wc-block-components-title{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;font-size:1.25em;word-break:break-word}.wc-block-components-notices{display:block;margin-bottom:2em}.wc-block-components-notices .wc-block-components-notices__notice{margin:0;display:flex;flex-wrap:nowrap}.wc-block-components-notices .wc-block-components-notices__notice .components-notice__dismiss{background:transparent none;padding:0;margin:0 0 0 auto;border:0;outline:0;color:currentColor}.wc-block-components-notices .wc-block-components-notices__notice .components-notice__dismiss svg{fill:currentColor;vertical-align:text-top}.wc-block-components-notices .wc-block-components-notices__notice+.wc-block-components-notices__notice{margin-top:1em}.theme-twentytwenty .wc-block-components-notices__notice,.theme-twentytwentyone .wc-block-components-notices__notice{padding:1.5rem 3rem}.wc-block-components-notices__snackbar{position:fixed;bottom:20px;left:16px;width:auto}@media(max-width:782px){.wc-block-components-notices__snackbar{position:fixed;top:10px;left:0;bottom:auto}}@media(max-width:782px){.wc-block-components-notices__snackbar .components-snackbar-list__notice-container{margin-left:10px;margin-right:10px}}.wc-block-components-validation-error{font-size:.75em;color:#cc1818;max-width:100%;white-space:normal}.wc-block-components-validation-error>p{margin:0;padding:4px 0 0}.wc-block-components-select+.wc-block-components-validation-error{margin-bottom:24px}.with-scroll-to-top__scroll-point{position:relative;top:-36px}.is-medium .wc-block-cart__sidebar,.is-mobile .wc-block-cart__sidebar,.is-small .wc-block-cart__sidebar{margin-bottom:24px;order:0}.editor-styles-wrapper .wc-block-cart__empty-cart__title,.wc-block-cart__empty-cart__title{font-size:inherit}.wc-block-cart__submit{position:relative;margin:0 0 16px}.wc-block-cart__submit-button{width:100%;margin:0}.wc-block-cart .wc-block-cart__submit-container{padding:0}@media(min-width:783px){.wc-block-cart .wc-block-cart__submit-container--sticky{display:none}}@media(max-width:782px){.wc-block-cart .wc-block-cart__submit-container--sticky{background:#fff;bottom:0;left:0;padding:16px;position:fixed;width:100%;z-index:9999}.wc-block-cart .wc-block-cart__submit-container--sticky:before{box-shadow:0 -10px 20px 10px currentColor;color:hsla(0,0%,80%,.5);content:"";height:100%;left:0;position:absolute;right:0;top:0}}.wc-block-cart .wc-block-components-shipping-calculator{white-space:nowrap}.wc-block-cart .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.wc-block-cart .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.wc-block-cart .wc-block-components-address-form .wc-block-components-text-input:first-of-type{margin-top:0}table.wc-block-cart-items,table.wc-block-cart-items td,table.wc-block-cart-items th{background:none!important;border:0;margin:0}.editor-styles-wrapper table.wc-block-cart-items,table.wc-block-cart-items{width:100%}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header,table.wc-block-cart-items .wc-block-cart-items__header{font-size:.75em;text-transform:uppercase}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image{width:100px}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-product,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-product{visibility:hidden}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-total,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-total{width:100px;text-align:right}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img{width:100%;margin:0}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline;font-size:.75em;text-transform:none;white-space:nowrap}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:active,.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus,.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:active,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover{background:transparent}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name{display:block;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total{font-size:1em;text-align:right;line-height:inherit}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata{margin-bottom:.75em}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row.is-disabled,table.wc-block-cart-items .wc-block-cart-items__row.is-disabled{opacity:.5;pointer-events:none;transition:opacity .2s ease}.wc-block-cart .wc-block-components-totals-footer-item,.wc-block-cart .wc-block-components-totals-taxes{margin:0}.wc-block-cart--is-loading h2 span,.wc-block-cart--is-loading th span,.wc-block-mini-cart__drawer.is-loading h2 span,.wc-block-mini-cart__drawer.is-loading th span{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;min-width:84px;display:inline-block}.wc-block-cart--is-loading h2 span>*,.wc-block-cart--is-loading th span>*,.wc-block-mini-cart__drawer.is-loading h2 span>*,.wc-block-mini-cart__drawer.is-loading th span>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading h2 span,.wc-block-cart--is-loading th span,.wc-block-mini-cart__drawer.is-loading h2 span,.wc-block-mini-cart__drawer.is-loading th span{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading h2 span:after,.wc-block-cart--is-loading th span:after,.wc-block-mini-cart__drawer.is-loading h2 span:after,.wc-block-mini-cart__drawer.is-loading th span:after{content:" "}.wc-block-cart--is-loading h2 span,.wc-block-mini-cart__drawer.is-loading h2 span{min-width:33%}.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-cart--is-loading .wc-block-components-quantity-selector,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.wc-block-cart--is-loading .wc-block-components-product-metadata>*,.wc-block-cart--is-loading .wc-block-components-product-price>*,.wc-block-cart--is-loading .wc-block-components-quantity-selector>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-cart--is-loading .wc-block-components-quantity-selector,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-name,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;min-width:84px;display:inline-block}.wc-block-cart--is-loading .wc-block-components-product-name>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-components-product-name,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-name:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name:after{content:" "}.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata{margin-top:.25em;min-width:8em}.wc-block-cart--is-loading .wc-block-cart-item__remove-link,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__remove-link{visibility:hidden}.wc-block-cart--is-loading .wc-block-cart-item__image>a,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;display:block}.wc-block-cart--is-loading .wc-block-cart-item__image>a>*,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-cart-item__image>a,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price{max-width:3em;display:block;margin-top:.25em}.wc-block-cart--is-loading .wc-block-components-product-price:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price:after{content:" "}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;min-height:460px}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card>*,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card:after,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card:after{content:" "}.wc-block-components-sidebar-layout.wc-block-cart--skeleton{display:none}.is-loading+.wc-block-components-sidebar-layout.wc-block-cart--skeleton{display:flex}.wc-block-cart-item__total-price-and-sale-badge-wrapper{display:flex;flex-direction:column;align-items:flex-end}.wc-block-cart-item__total-price-and-sale-badge-wrapper .wc-block-components-sale-badge{margin-top:4px}.is-medium.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title,.is-mobile .wc-block-cart-item__total .wc-block-components-sale-badge,.is-mobile.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title,.is-small .wc-block-cart-item__total .wc-block-components-sale-badge,.is-small.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title{display:none}.is-medium table.wc-block-cart-items td,.is-mobile table.wc-block-cart-items td,.is-small table.wc-block-cart-items td{padding:0}.is-medium table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-medium table.wc-block-cart-items .wc-block-cart-items__header,.is-mobile table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-mobile table.wc-block-cart-items .wc-block-cart-items__header,.is-small table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-small table.wc-block-cart-items .wc-block-cart-items__header{display:none}.is-medium table.wc-block-cart-items .wc-block-cart-items__row,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row,.is-small table.wc-block-cart-items .wc-block-cart-items__row{position:relative;display:-ms-grid;display:grid;-ms-grid-columns:80px 132px;grid-template-columns:80px 132px;padding:16px 0}.is-medium table.wc-block-cart-items .wc-block-cart-items__row:after,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row:after,.is-small table.wc-block-cart-items .wc-block-cart-items__row:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image{-ms-grid-column:1;grid-column-start:1;-ms-grid-row:1;grid-row-start:1;padding-right:16px}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product{-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:2;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:stretch;justify-self:stretch;padding:0 16px 16px 0}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity{-ms-grid-column:1;grid-column-start:1;-ms-grid-row:2;grid-row-start:2;vertical-align:bottom;padding-right:16px;-ms-grid-row-align:end;align-self:end;padding-top:16px}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total{-ms-grid-row:1;grid-row-start:1}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount{display:inline-block}.is-large.wc-block-cart{margin-bottom:3em}.is-large.wc-block-cart .wc-block-cart-items{position:relative}.is-large.wc-block-cart .wc-block-cart-items:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.is-large.wc-block-cart .wc-block-cart-items th{padding:.25rem 16px .25rem 0;white-space:nowrap}.is-large.wc-block-cart .wc-block-cart-items td{position:relative;padding:16px 0 16px 16px;vertical-align:top}.is-large.wc-block-cart .wc-block-cart-items td:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.is-large.wc-block-cart .wc-block-cart-items th:last-child{padding-right:0}.is-large.wc-block-cart .wc-block-cart-items td:last-child{padding-right:16px}.is-large.wc-block-cart .wc-block-cart__sidebar>div:not(.wc-block-components-totals-wrapper){margin-left:16px;margin-right:16px}.is-large.wc-block-cart .wc-block-components-radio-control__input{left:0}.is-large.wc-block-cart .wc-block-cart__totals-title{border:0;border-radius:0;margin:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;box-shadow:none;display:inline;background:transparent;font-size:.75em;display:block;font-weight:600;padding:.25rem 0;text-align:right;text-transform:uppercase}.is-large.wc-block-cart .wc-block-components-sidebar .wc-block-components-shipping-calculator,.is-large.wc-block-cart .wc-block-components-sidebar .wc-block-components-shipping-rates-control__package:not(.wc-block-components-panel){padding-left:16px;padding-right:16px}.is-large.wc-block-cart .wc-block-cart__payment-options{padding:16px 0 0}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-empty-cart-block{display:none}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-filled-cart-block{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-items-block{box-sizing:border-box;margin:0;padding-right:3.7735849057%;width:65%;min-height:10em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block{min-height:15em;display:block;-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block{-webkit-animation:none;animation:none}}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-totals-block{box-sizing:border-box;margin:0;padding-left:2.2641509434%;width:35%;min-height:12em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block{min-height:3em;display:block;-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;margin:0 0 1em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block{-webkit-animation:none;animation:none}}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block{height:20em}@media only screen and (max-width:700px){.wp-block-woocommerce-cart.is-loading{padding-top:16px}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-filled-cart-block{flex-direction:column;margin:0 auto 16px}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-items-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-totals-block{padding:0;width:100%}}.wc-block-checkout-error{padding:40px;text-align:center;width:100%}.wc-block-checkout-error .wc-block-checkout-error__image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-checkout-error .wc-block-checkout-error__title{display:block;margin:0;font-weight:700}.wc-block-checkout-error .wc-block-checkout-error__description{display:block;margin:.25em 0 1em}.wc-block-checkout-empty{padding:40px;text-align:center;width:100%}.wc-block-checkout-empty .wc-block-checkout-empty__image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-checkout-empty .wc-block-checkout-empty__title{display:block;margin:0;font-weight:700}.wc-block-checkout-empty .wc-block-checkout-empty__description{display:block;margin:.25em 0 1em}.wc-block-checkout__actions{display:flex;justify-content:space-between;align-items:center}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button{width:50%;padding:1em;height:auto}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button .wc-block-components-button__text{line-height:24px}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button .wc-block-components-button__text>svg{fill:#fff;vertical-align:top}.is-mobile .wc-block-checkout__actions .wc-block-components-checkout-return-to-cart-button{display:none}.is-mobile .wc-block-checkout__actions .wc-block-components-checkout-place-order-button{width:100%}.is-large .wc-block-checkout__actions{position:relative;padding:1.5em 0}.is-large .wc-block-checkout__actions:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-checkout__form{margin:0;max-width:100%}.is-medium .wc-block-checkout__main,.is-mobile .wc-block-checkout__main,.is-small .wc-block-checkout__main{order:1}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form{margin-left:-6px;margin-right:-6px}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form:after,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form:after,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form:after{content:"";clear:both;display:block}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input{float:left;margin-left:6px;margin-right:6px;position:relative;width:calc(50% - 12px)}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2){margin-top:0}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company{width:calc(100% - 12px)}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox{clear:both}.components-placeholder.wc-block-checkout__no-shipping-placeholder{margin-bottom:16px}.components-placeholder.wc-block-checkout__no-shipping-placeholder *{pointer-events:all}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset{display:block}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset .components-button{background-color:#1e1e1e;color:#fff}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset .wc-block-checkout__no-shipping-placeholder-description{display:block;margin:.25em 0 1em}.wc-block-checkout__shipping-option .wc-block-components-radio-control__option{position:relative;margin:0;padding:.75em 0 .75em 2.5em}.wc-block-checkout__shipping-option .wc-block-components-radio-control__option:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-checkout__shipping-option .wc-block-components-shipping-rates-control__no-results-notice{margin:.75em 0}.wc-block-checkout__terms{margin:1.5em 0}.wc-block-checkout__terms textarea{top:-5px;position:relative}.wc-block-checkout__terms.wc-block-checkout__terms--disabled{opacity:.6}.wc-block-checkout__sidebar .wc-block-components-product-name{display:block;color:inherit;flex-grow:1;flex-basis:0}.wc-block-checkout__sidebar .wc-block-components-totals-footer-item,.wc-block-checkout__sidebar .wc-block-components-totals-taxes{margin:0;padding:0}.is-medium .wc-block-checkout__sidebar,.is-mobile .wc-block-checkout__sidebar,.is-small .wc-block-checkout__sidebar{margin-bottom:24px;order:0}.wc-block-checkout__add-note{margin:1.5em 0}.is-medium .wc-block-checkout__add-note,.is-mobile .wc-block-checkout__add-note,.is-small .wc-block-checkout__add-note{position:relative;margin-bottom:1em;margin-top:1em;padding:1em 0}.is-medium .wc-block-checkout__add-note:after,.is-mobile .wc-block-checkout__add-note:after,.is-small .wc-block-checkout__add-note:after{border-style:solid;border-width:1px 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-checkout__add-note .wc-block-components-textarea{margin-top:16px}.wc-block-checkout__order-notes.wc-block-components-checkout-step{padding-left:0}.wp-block-woocommerce-checkout{margin:0}.wp-block-woocommerce-checkout .with-scroll-to-top__scroll-point{top:-96px}.wp-block-woocommerce-checkout.is-loading{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{width:35%;padding-left:2.2641509434%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block{width:65%;padding-right:3.7735849057%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{box-sizing:border-box;margin:0}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div{-webkit-animation:loading-fade 1.2s ease-in-out infinite;animation:loading-fade 1.2s ease-in-out infinite;background-color:var(--global--color-primary,#e0e0e0)!important;color:var(--global--color-primary,#e0e0e0)!important;outline:0!important;border:0!important;box-shadow:none;pointer-events:none;max-width:100%;margin:0 0 1.5em;display:none}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div>*,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div>*{visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div{-webkit-animation:none;animation:none}}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-contact-information-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-payment-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-contact-information-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-payment-block{min-height:10em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-shipping-address-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-shipping-address-block{min-height:24em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-actions-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-actions-block{width:50%;min-height:4em;margin-left:50%;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-order-summary-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-order-summary-block{min-height:47em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel>h2,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2{font-size:1em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel>h2 .wc-block-components-panel__button,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2 .wc-block-components-panel__button{font-weight:400}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-totals-item,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-item{padding-left:16px;padding-right:16px}@media only screen and (max-width:700px){.wp-block-woocommerce-checkout.is-loading{flex-direction:column;margin:0 auto 16px}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{padding:0;width:100%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-item{padding-left:0;padding-right:0}}.theme-twentytwenty .wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2{font-size:1.25em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-mini-cart__badge,.wc-block-mini-cart__quantity-badge{align-items:center;display:flex}.wc-block-mini-cart__badge{background:#fff;border:.15em solid;border-radius:1em;box-sizing:border-box;color:#000;font-size:.875em;font-weight:600;height:1.4285714286em;justify-content:center;margin-left:-.7142857143em;min-width:1.4285714286em;padding:0 .25em;transform:translateY(-50%);white-space:nowrap;z-index:1}.wc-block-mini-cart__icon{display:block;height:1.5em;width:1.5em;stroke:currentColor}.wc-block-mini-cart{background-color:transparent!important;display:flex;justify-content:flex-end}.wc-block-mini-cart.align-center{justify-content:center}.wc-block-mini-cart.align-left{justify-content:flex-start}.wc-block-mini-cart.is-transparent .wc-block-mini-cart__button{background-color:transparent!important}.wc-block-mini-cart__button{align-items:center;border:none;color:inherit;display:flex;font-weight:400;padding:.75em .5em}.wc-block-mini-cart__button:hover{opacity:.6}.wc-block-mini-cart__amount{display:none}.wc-block-mini-cart__tax-label{margin-right:.5em}@media screen and (min-width:768px){.wc-block-mini-cart__amount{display:initial;font-weight:600;margin-right:8px}}.modal-open .wc-block-mini-cart__button{pointer-events:none}.wc-block-mini-cart__drawer{font-size:1rem}.wc-block-mini-cart__drawer .components-modal__content{box-sizing:border-box;display:flex;flex-direction:column;height:100%}.wc-block-mini-cart__drawer .components-modal__header{margin:16px 0}.wc-block-mini-cart__drawer .wc-block-mini-cart__items{flex-grow:1;margin-right:-16px;overflow-y:auto;padding-right:16px}.wc-block-mini-cart__drawer .wc-block-mini-cart__items .wc-block-cart-items__row:last-child:after{content:none}.wc-block-mini-cart__footer{border-top:1px solid #ddd;margin-bottom:-40px;margin-left:-16px;margin-right:-16px;padding:24px}.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal{font-weight:600;margin-bottom:16px}.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal .wc-block-components-totals-item__description{display:none;font-size:.75em;font-weight:400}@media only screen and (min-width:480px){.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal .wc-block-components-totals-item__description{display:unset}}.wc-block-mini-cart__footer-actions{display:flex;gap:16px}.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart.wc-block-components-button{background-color:transparent;border:1px solid #1e1e1e;color:#1e1e1e;display:none;flex-grow:1;font-weight:600}@media only screen and (min-width:480px){.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart.wc-block-components-button{display:inline-flex}}.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout{border:1px solid #1e1e1e;flex-grow:1;font-weight:600}.wc-block-mini-cart__footer .wc-block-components-payment-method-icons{margin-top:16px}.wc-block-components-express-payment{margin:auto;position:relative}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons{list-style:none;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;padding:0;margin:0;overflow:hidden;text-align:center}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons>li{margin:0}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons>li>img{width:100%;height:48px}.wc-block-components-express-payment--checkout{margin-top:5px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container{display:flex;flex-direction:row;left:0;position:absolute;right:0;top:-5px;vertical-align:middle}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container:before{border-left:1px solid;border-top:1px solid;border-radius:5px 0 0 0;content:"";display:block;height:4px;margin-right:12px;opacity:.3;pointer-events:none;width:10px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container:after{border-right:1px solid;border-top:1px solid;border-radius:0 5px 0 0;content:"";display:block;height:4px;margin-left:12px;opacity:.3;pointer-events:none;flex-grow:1}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title{flex-grow:0;transform:translateY(-50%)}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content{position:relative;padding:1.5em 23px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content:after{border-style:solid;border-width:0 1px 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0;border-radius:0 0 5px 5px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content>p{margin-bottom:1em}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li{display:inline-block;width:50%}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li:nth-child(2n){padding-left:8px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li:nth-child(odd){padding-right:8px}.wc-block-components-express-payment--cart .wc-block-components-express-payment__event-buttons>li{padding-bottom:16px;text-align:center;width:100%}.wc-block-components-express-payment--cart .wc-block-components-express-payment__event-buttons>li:last-child{padding-bottom:0}.wc-block-components-express-payment-continue-rule{display:flex;align-items:center;text-align:center;padding:0 24px;margin:24px 0}.wc-block-components-express-payment-continue-rule:before{margin-right:10px}.wc-block-components-express-payment-continue-rule:after{margin-left:10px}.wc-block-components-express-payment-continue-rule:after,.wc-block-components-express-payment-continue-rule:before{content:" ";flex:1;border-bottom:1px solid;opacity:.3}.wc-block-components-express-payment-continue-rule--cart{margin:16px 0;text-transform:uppercase}.theme-twentynineteen .wc-block-components-express-payment__title:before{display:none}.theme-twentytwenty .wc-block-components-express-payment .wc-block-components-express-payment__title{padding-left:12px;padding-right:12px}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder{margin-bottom:16px}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder *{pointer-events:all}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset{display:block}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset .components-button{background-color:#1e1e1e;color:#fff}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset .wc-block-checkout__no-payment-methods-placeholder-description{display:block;margin:.25em 0 1em}.components-notice.wc-block-checkout__no-payment-methods-notice{margin-bottom:16px}.wc-block-card-elements{display:flex;width:100%}.wc-block-card-elements .wc-block-components-validation-error{position:static}.wc-block-gateway-container{position:relative;margin-bottom:1.5em;white-space:nowrap}.wc-block-gateway-container.wc-card-number-element{flex-basis:15em;flex-grow:1;min-width:min(15em,60%)}.wc-block-gateway-container.wc-card-expiry-element{flex-basis:7em;margin-left:12px;min-width:min(7em,calc(24% - 12px))}.wc-block-gateway-container.wc-card-cvc-element{flex-basis:7em;margin-left:12px;min-width:min(5em,calc(16% - 12px))}.wc-block-gateway-container .wc-block-gateway-input{font-size:1em;line-height:1.375;background-color:#fff;padding:.75em 0 .75em 16px;border-radius:4px;border:1px solid #50575e;width:100%;font-family:inherit;margin:0;box-sizing:border-box;height:3em;color:#2b2d2f;cursor:text}.wc-block-gateway-container .wc-block-gateway-input:focus,.wc-block-gateway-container:focus{background-color:#fff}.wc-block-gateway-container label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;line-height:1.375;position:absolute;transform:translateY(.75em);left:0;top:0;transform-origin:top left;color:#757575;transition:transform .2s ease;margin:0 0 0 17px;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 24px);cursor:text}@media screen and (prefers-reduced-motion:reduce){.wc-block-gateway-container label{transition:none}}.wc-block-gateway-container.wc-inline-card-element label{margin-left:calc(24px + 1.5em)}.wc-block-gateway-container.wc-inline-card-element .wc-block-gateway-input.focused.empty+label,.wc-block-gateway-container.wc-inline-card-element .wc-block-gateway-input:not(.empty)+label{margin-left:16px;transform:translateY(4px) scale(.75)}.wc-block-gateway-container.wc-inline-card-element+.wc-block-components-validation-error{position:static;margin-top:-24px}.wc-block-gateway-container .wc-block-gateway-input.focused.empty,.wc-block-gateway-container .wc-block-gateway-input:not(.empty){padding:1.5em 0 .25em 16px}.wc-block-gateway-container .wc-block-gateway-input.focused.empty+label,.wc-block-gateway-container .wc-block-gateway-input:not(.empty)+label{transform:translateY(4px) scale(.75)}.wc-block-gateway-container .wc-block-gateway-input.has-error{border-color:#cc1818}.wc-block-gateway-container .wc-block-gateway-input.has-error:focus{outline-color:#cc1818}.wc-block-gateway-container .wc-block-gateway-input.has-error+label{color:#cc1818}.is-large .wc-card-cvc-element .wc-block-components-validation-error>p,.is-large .wc-card-expiry-element .wc-block-components-validation-error>p,.is-medium .wc-card-cvc-element .wc-block-components-validation-error>p,.is-medium .wc-card-expiry-element .wc-block-components-validation-error>p{line-height:16px;padding-top:4px}.is-mobile .wc-card-cvc-element .wc-block-components-validation-error>p,.is-mobile .wc-card-expiry-element .wc-block-components-validation-error>p,.is-small .wc-card-cvc-element .wc-block-components-validation-error>p,.is-small .wc-card-expiry-element .wc-block-components-validation-error>p{min-height:28px}.wc-block-components-checkout-payment-methods *{pointer-events:all}.is-mobile .wc-block-card-elements,.is-small .wc-block-card-elements{flex-wrap:wrap}.is-mobile .wc-block-gateway-container.wc-card-number-element,.is-small .wc-block-gateway-container.wc-card-number-element{flex-basis:100%}.is-mobile .wc-block-gateway-container.wc-card-expiry-element,.is-small .wc-block-gateway-container.wc-card-expiry-element{flex-basis:calc(50% - 8px);margin-left:0;margin-right:8px}.is-mobile .wc-block-gateway-container.wc-card-cvc-element,.is-small .wc-block-gateway-container.wc-card-cvc-element{flex-basis:calc(50% - 8px);margin-left:8px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option{padding-left:56px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option:after{content:none}.wc-block-checkout__payment-method .wc-block-components-radio-control__option .wc-block-components-radio-control__input{left:16px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:first-child,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:last-child{margin:0;padding-bottom:1em;padding-top:1em}.wc-block-checkout__payment-method .wc-block-components-radio-control__option-checked{font-weight:700}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option,.wc-block-checkout__payment-method .wc-block-components-radio-control__option{position:relative}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:after,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:after{border-style:solid;border-width:1px 1px 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:last-child:after,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:last-child:after{border-width:1px}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option:after{border-width:0}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label{display:flex;align-items:center;justify-content:flex-start}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label img{height:24px;max-height:24px;-o-object-fit:contain;object-fit:contain;-o-object-position:left;object-position:left}.wc-block-checkout__payment-method .wc-block-components-radio-control.disable-radio-control .wc-block-components-radio-control__option{padding-left:16px}.wc-block-checkout__payment-method .wc-block-components-radio-control.disable-radio-control .wc-block-components-radio-control__input{display:none}.wc-block-checkout__payment-method .wc-block-components-checkout-step__description-payments-aligned{padding-top:14px;height:28px}.wc-block-components-radio-control-accordion-content{padding:0 16px 1em}.wc-block-components-radio-control-accordion-content:empty{display:none}.wc-block-checkout__order-notes .wc-block-components-checkout-step__content{padding-bottom:0}.wc-block-components-checkbox{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;margin-top:1.5em}.wc-block-components-checkbox label{align-items:flex-start;display:flex;position:relative}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]{font-size:1em;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid #50575e;border-radius:2px;box-sizing:border-box;height:1.5em;width:1.5em;margin:0 16px 0 0;min-height:1.5em;min-width:1.5em;overflow:hidden;position:static;vertical-align:middle;background-color:#fff}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{background:#fff;border-color:#50575e}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus{outline:2px solid #50575e;outline-offset:2px}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:after,.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:before{content:""}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:not(:checked)+.wc-block-components-checkbox__mark{display:none}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]{border-color:hsla(0,0%,100%,.6);background-color:rgba(0,0,0,.1)}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{background:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus{outline:2px solid hsla(0,0%,100%,.6);outline-offset:2px}.wc-block-components-checkbox.has-error,.wc-block-components-checkbox.has-error a{color:#cc1818}.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:active,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:focus,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:hover{border-color:#cc1818}.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:focus{outline:2px solid #cc1818;outline-offset:2px}.wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:#000;position:absolute;margin-left:.1875em;margin-top:.0625em;width:1.125em;height:1.125em;pointer-events:none}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:#fff}.wc-block-components-checkbox .wc-block-components-checkbox__label,.wc-block-components-checkbox>span{vertical-align:middle;line-height:1.5em}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-checkbox__mark{display:none}}.theme-twentytwentyone .has-dark-controls .wc-block-components-checkbox__input[type=checkbox],.theme-twentytwentyone .wc-block-components-checkbox__input[type=checkbox]{background-color:#fff;border-color:var(--form--border-color);position:relative}.theme-twentytwentyone .has-dark-controls .wc-block-components-checkbox__input[type=checkbox]:checked,.theme-twentytwentyone .wc-block-components-checkbox__input[type=checkbox]:checked{background-color:#fff;border-color:var(--form--border-color)}.theme-twentytwentyone .wc-block-components-checkbox__mark{display:none}.wc-block-components-panel.has-border{position:relative}.wc-block-components-panel.has-border:after{border-style:solid;border-width:1px 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-components-panel.has-border+.wc-block-components-panel.has-border:after{border-top-width:0}.wc-block-components-panel.has-border.no-top-border{position:relative}.wc-block-components-panel.has-border.no-top-border:after{border-style:solid;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0;border-width:0 0 1px}.wc-block-components-panel__button{border:0;border-radius:0;vertical-align:baseline;height:auto;line-height:1;margin:.375em 0 0;padding:.375em 32px 0 0;position:relative;text-align:left;width:100%;word-break:break-word}.wc-block-components-panel__button[aria-expanded=true]{padding-bottom:.375em;margin-bottom:.375em}.wc-block-components-panel__button,.wc-block-components-panel__button:active,.wc-block-components-panel__button:focus,.wc-block-components-panel__button:hover{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none}.wc-block-components-panel__button>.wc-block-components-panel__button-icon{fill:currentColor;position:absolute;right:0;top:50%;transform:translateY(-50%);width:auto}.wc-block-components-panel__content{padding-bottom:1em}.wc-block-components-panel__content[hidden]{display:none}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-panel__button{background-color:inherit;color:inherit}.theme-twentyseventeen .wc-block-components-panel__button,.theme-twentytwenty .wc-block-components-panel__button{background:none transparent;color:inherit}.theme-twentyseventeen .wc-block-components-panel__button.wc-block-components-panel__button:focus,.theme-twentyseventeen .wc-block-components-panel__button.wc-block-components-panel__button:hover,.theme-twentytwenty .wc-block-components-panel__button.wc-block-components-panel__button:focus,.theme-twentytwenty .wc-block-components-panel__button.wc-block-components-panel__button:hover{background:none transparent}.wc-block-components-totals-wrapper{position:relative;padding:16px 0}.wc-block-components-totals-wrapper:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-components-totals-wrapper:last-child{padding-bottom:0}.wc-block-components-totals-wrapper.has-bottom-border:after{border-bottom-width:1px}.wc-block-components-totals-wrapper.slot-wrapper{padding:0}.wc-block-components-totals-wrapper.slot-wrapper>*>*{position:relative;padding:16px 0}.wc-block-components-totals-wrapper.slot-wrapper>*>:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-components-totals-wrapper.slot-wrapper>*>:last-child:after{border-bottom-width:0}.wc-block-components-discounts-meta .wc-block-components-totals-wrapper:first-child{position:relative}.wc-block-components-discounts-meta .wc-block-components-totals-wrapper:first-child:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-components-totals-item{display:flex;flex-wrap:wrap;margin:.75em 0 0;width:100%}.wc-block-components-totals-item:first-child{margin-top:0}.wc-block-components-totals-item__label{flex-grow:1}.wc-block-components-totals-item__value{font-weight:700;white-space:nowrap}.wc-block-components-totals-item__description{font-size:.875em;width:100%}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate{margin:4px 0}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate:first-child{margin-top:0}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate:last-child{margin-bottom:0}.wc-block-product-categories{margin-bottom:1em}.wc-block-product-categories.is-dropdown{display:flex}.wc-block-product-categories select{margin-right:.5em}.wc-block-product-categories-list--has-images{list-style:none outside}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item{margin:4px 0 4px 60px;list-style:none outside;clear:both}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item ul{margin:4px 0 0}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item__image{max-width:50px;display:inline-block;padding:0;margin:0 .5em 0 -60px;position:relative;vertical-align:middle;border:1px solid #eee}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item__image img{display:block;height:auto;margin:0;max-width:100%;padding:0}.wc-block-product-categories-list-item-count:before{content:" ("}.wc-block-product-categories-list-item-count:after{content:")"}.wp-block-woocommerce-product-categories.is-loading .wc-block-product-categories__placeholder{display:inline-block;height:1em;width:50%;min-width:200px;background:currentColor;opacity:.2}.wc-block-product-categories__button{display:flex;align-items:center;margin:0;padding:0 .5em;position:relative;overflow:hidden}.wc-block-product-categories__button svg{fill:currentColor;outline:none}.rtl .wc-block-product-categories__button svg{transform:rotate(180deg)}.wc-block-product-categories__button:active{color:currentColor}.wc-block-product-categories__button:disabled,.wc-block-product-categories__button[aria-disabled=true]{cursor:default;opacity:.3}.wc-block-product-categories__button:disabled:focus,.wc-block-product-categories__button[aria-disabled=true]:focus{box-shadow:none}.wc-block-featured-product{position:relative;background-color:#1e1e1e;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em}.wc-block-featured-product,.wc-block-featured-product .wc-block-featured-product__wrapper{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-product .wc-block-featured-product__wrapper{overflow:hidden;height:100%}.wc-block-featured-product.has-left-content{justify-content:flex-start}.wc-block-featured-product.has-left-content .wc-block-featured-product__description,.wc-block-featured-product.has-left-content .wc-block-featured-product__price,.wc-block-featured-product.has-left-content .wc-block-featured-product__title,.wc-block-featured-product.has-left-content .wc-block-featured-product__variation{margin-left:0;text-align:left}.wc-block-featured-product.has-right-content{justify-content:flex-end}.wc-block-featured-product.has-right-content .wc-block-featured-product__description,.wc-block-featured-product.has-right-content .wc-block-featured-product__price,.wc-block-featured-product.has-right-content .wc-block-featured-product__title,.wc-block-featured-product.has-right-content .wc-block-featured-product__variation{margin-right:0;text-align:right}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-product .wc-block-featured-product__description a,.wc-block-featured-product .wc-block-featured-product__description a:active,.wc-block-featured-product .wc-block-featured-product__description a:focus,.wc-block-featured-product .wc-block-featured-product__description a:hover,.wc-block-featured-product .wc-block-featured-product__price a,.wc-block-featured-product .wc-block-featured-product__price a:active,.wc-block-featured-product .wc-block-featured-product__price a:focus,.wc-block-featured-product .wc-block-featured-product__price a:hover,.wc-block-featured-product .wc-block-featured-product__title a,.wc-block-featured-product .wc-block-featured-product__title a:active,.wc-block-featured-product .wc-block-featured-product__title a:focus,.wc-block-featured-product .wc-block-featured-product__title a:hover,.wc-block-featured-product .wc-block-featured-product__variation a,.wc-block-featured-product .wc-block-featured-product__variation a:active,.wc-block-featured-product .wc-block-featured-product__variation a:focus,.wc-block-featured-product .wc-block-featured-product__variation a:hover{color:#fff}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__link,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{width:100%;padding:16px 48px 0;z-index:1}.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{margin-top:0;border:0}.wc-block-featured-product .wc-block-featured-product__title:before,.wc-block-featured-product .wc-block-featured-product__variation:before{display:none}.wc-block-featured-product .wc-block-featured-product__variation{font-style:italic;padding-top:0}.wc-block-featured-product .wc-block-featured-product__description p{margin:0;line-height:1.5em}.wc-block-featured-product .wp-block-button.aligncenter{text-align:center}.wc-block-featured-product.has-background-dim:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-product.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-product.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-product.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-product.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-product.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-product.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-product.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-product.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-product.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-product.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{max-width:290px;width:100%}.wc-block-featured-product:after{display:block;content:"";font-size:0;min-height:inherit}@supports((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-product:after{content:none}}.wc-block-featured-product.aligncenter,.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright,.wc-block-product-search .wc-block-product-search__fields{display:flex}.wc-block-product-search .wc-block-product-search__field{padding:6px 8px;line-height:1.8;flex-grow:1}.wc-block-product-search .wc-block-product-search__button{display:flex;align-items:center;margin:0 0 0 6px;cursor:pointer;padding:0 .5em;position:relative;overflow:hidden}.wc-block-product-search .wc-block-product-search__button svg{fill:currentColor;outline:none}.rtl .wc-block-product-search .wc-block-product-search__button svg{transform:rotate(180deg)}.wc-block-product-search .wc-block-product-search__button:active{color:currentColor}.wc-block-product-search .wc-block-product-search__button:disabled,.wc-block-product-search .wc-block-product-search__button[aria-disabled=true]{cursor:default;opacity:.3}.wc-block-product-search .wc-block-product-search__button:disabled:focus,.wc-block-product-search .wc-block-product-search__button[aria-disabled=true]:focus{box-shadow:none}.wc-block-featured-category{position:relative;background-color:#1e1e1e;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category .wc-block-featured-category__wrapper{overflow:hidden;height:100%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category.has-left-content{justify-content:flex-start}.wc-block-featured-category.has-left-content .wc-block-featured-category__description,.wc-block-featured-category.has-left-content .wc-block-featured-category__price,.wc-block-featured-category.has-left-content .wc-block-featured-category__title{margin-left:0;text-align:left}.wc-block-featured-category.has-right-content{justify-content:flex-end}.wc-block-featured-category.has-right-content .wc-block-featured-category__description,.wc-block-featured-category.has-right-content .wc-block-featured-category__price,.wc-block-featured-category.has-right-content .wc-block-featured-category__title{margin-right:0;text-align:right}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-category .wc-block-featured-category__description a,.wc-block-featured-category .wc-block-featured-category__description a:active,.wc-block-featured-category .wc-block-featured-category__description a:focus,.wc-block-featured-category .wc-block-featured-category__description a:hover,.wc-block-featured-category .wc-block-featured-category__price a,.wc-block-featured-category .wc-block-featured-category__price a:active,.wc-block-featured-category .wc-block-featured-category__price a:focus,.wc-block-featured-category .wc-block-featured-category__price a:hover,.wc-block-featured-category .wc-block-featured-category__title a,.wc-block-featured-category .wc-block-featured-category__title a:active,.wc-block-featured-category .wc-block-featured-category__title a:focus,.wc-block-featured-category .wc-block-featured-category__title a:hover{color:#fff}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__link,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{width:100%;padding:0 48px 16px;z-index:1}.wc-block-featured-category .wc-block-featured-category__title{margin-top:0}.wc-block-featured-category .wc-block-featured-category__title:before{display:none}.wc-block-featured-category .wc-block-featured-category__description p{margin:0}.wc-block-featured-category .wp-block-button.aligncenter{text-align:center}.wc-block-featured-category.has-background-dim:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-category.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-category.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-category.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-category.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-category.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-category.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-category.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-category.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-category.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-category.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{max-width:290px;width:100%}.wc-block-featured-category:after{display:block;content:"";font-size:0;min-height:inherit}@supports((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-category:after{content:none}}.wc-block-featured-category.aligncenter,.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{display:flex}.wc-block-attribute-filter{margin-bottom:24px}.wc-block-attribute-filter.style-dropdown{display:flex;gap:16px}.wc-block-attribute-filter .wc-block-attribute-filter-list{margin:0;width:100%}.wc-block-attribute-filter .wc-block-attribute-filter-list li{text-decoration:underline}.wc-block-attribute-filter .wc-block-attribute-filter-list li label{cursor:pointer}.wc-block-attribute-filter .wc-block-attribute-filter-list li input{cursor:pointer;display:inline-block}.wc-block-attribute-filter .wc-block-attribute-filter-dropdown{flex-grow:1;max-width:unset;width:0}.wc-block-attribute-filter .is-single .wc-block-attribute-filter-list-count,.wc-block-attribute-filter .wc-block-dropdown-selector .wc-block-dropdown-selector__list .wc-block-attribute-filter-list-count{opacity:.6}.wc-block-attribute-filter .wc-block-components-dropdown-selector__input-wrapper{height:100%}.wc-block-stock-filter{margin-bottom:24px}.wc-block-stock-filter .wc-block-stock-filter-list{margin:0}.wc-block-stock-filter .wc-block-stock-filter-list li{text-decoration:underline}.wc-block-stock-filter .wc-block-stock-filter-list li label{cursor:pointer}.wc-block-stock-filter .wc-block-stock-filter-list li input{cursor:pointer;display:inline-block}.wc-block-stock-filter .is-single,.wc-block-stock-filter .wc-block-dropdown-selector .wc-block-dropdown-selector__list{opacity:.6}.wc-block-stock-filter .wc-block-stock-filter__button{margin-top:8px}@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-active-filters{margin-bottom:24px;overflow:hidden}.wc-block-active-filters .wc-block-active-filters__clear-all{font-size:1em;float:right;border:none;padding:0;text-decoration:underline;cursor:pointer}.wc-block-active-filters .wc-block-active-filters__clear-all,.wc-block-active-filters .wc-block-active-filters__clear-all:active,.wc-block-active-filters .wc-block-active-filters__clear-all:focus,.wc-block-active-filters .wc-block-active-filters__clear-all:hover{background:transparent;color:inherit}.wc-block-active-filters .wc-block-active-filters__list{margin:0 0 4px;padding:0;list-style:none outside;clear:both}.wc-block-active-filters .wc-block-active-filters__list li{margin:0;padding:0;list-style:none outside;clear:both}.wc-block-active-filters .wc-block-active-filters__list li ul{margin:0;padding:0;list-style:none outside}.wc-block-active-filters .wc-block-active-filters__list li:first-child .wc-block-active-filters__list-item-type{margin:0}.wc-block-active-filters .wc-block-active-filters__list-item-type{font-size:.75em;text-transform:uppercase;letter-spacing:.1em;margin:16px 0 0;display:block}.wc-block-active-filters .wc-block-active-filters__list-item-operator{font-weight:400;font-style:italic}.wc-block-active-filters .wc-block-active-filters__list-item-name{font-weight:700;display:block;position:relative;padding:0 16px 0 0}.wc-block-active-filters .wc-block-active-filters__list-item-remove{background:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;width:16px;padding:0;position:absolute;right:0;top:50%;margin:-8px 0 0;color:currentColor}.wc-block-active-filters .wc-block-active-filters__list--chips li,.wc-block-active-filters .wc-block-active-filters__list--chips ul{display:inline}.wc-block-active-filters .wc-block-active-filters__list--chips .wc-block-active-filters__list-item-type{display:none}.wc-block-active-filters .wc-block-active-filters__list--chips .wc-block-components-chip{font-size:.875em;margin-top:.1875em;margin-bottom:.1875em} \ No newline at end of file diff --git a/build/wc-blocks-vendors-style-rtl.css b/build/wc-blocks-vendors-style-rtl.css new file mode 100644 index 00000000000..586c4f20591 --- /dev/null +++ b/build/wc-blocks-vendors-style-rtl.css @@ -0,0 +1 @@ +.components-custom-select-control{position:relative}.components-custom-select-control__label{display:block;margin-bottom:8px}.components-custom-select-control__button{border:1px solid #757575;border-radius:2px;min-height:30px;min-width:130px;position:relative;text-align:right}.components-custom-select-control__button.components-custom-select-control__button{padding-left:24px}.components-custom-select-control__button:focus:not(:disabled){border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color)}.components-custom-select-control__button .components-custom-select-control__button-icon{height:100%;padding:0;position:absolute;left:0;top:0}.components-custom-select-control__menu{background-color:#fff;max-height:400px;min-width:100%;overflow:auto;padding:0;position:absolute;z-index:1000000}.components-custom-select-control__menu:focus{border:1px solid #1e1e1e;border-radius:2px;outline:none;transition:none}.components-custom-select-control__item{align-items:center;display:flex;list-style-type:none;padding:10px 25px 10px 5px;cursor:default}.components-custom-select-control__item.is-highlighted{background:#ddd}.components-custom-select-control__item-icon{margin-right:-20px;margin-left:0}.components-spinner{display:inline-block;background-color:#949494;width:18px;height:18px;opacity:.7;margin:5px 11px 0;border-radius:100%;position:relative}.components-spinner:before{content:"";position:absolute;background-color:#fff;top:3px;right:3px;width:4px;height:4px;border-radius:100%;transform-origin:6px 6px;-webkit-animation:components-spinner__animation 1s linear infinite;animation:components-spinner__animation 1s linear infinite}@-webkit-keyframes components-spinner__animation{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}@keyframes components-spinner__animation{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.components-snackbar{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#1e1e1e;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.3);color:#fff;padding:16px 24px;width:100%;max-width:600px;box-sizing:border-box;cursor:pointer}@media(min-width:600px){.components-snackbar{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}}.components-snackbar:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.components-snackbar__action.components-button{margin-right:32px;color:#fff;height:auto;flex-shrink:0;line-height:1.4;padding:0}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary){text-decoration:underline;background-color:transparent}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):focus{color:#fff;box-shadow:none;outline:1px dotted #fff}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{color:var(--wp-admin-theme-color)}.components-snackbar__content{display:flex;align-items:baseline;justify-content:space-between;line-height:1.4}.components-snackbar-list{position:absolute;z-index:100000;width:100%;box-sizing:border-box}.components-snackbar-list__notice-container{position:relative;padding-top:8px}.components-combobox-control{width:100%}input.components-combobox-control__input[type=text]{width:100%;border:none;box-shadow:none;padding:2px;margin:0;line-height:inherit;min-height:auto}input.components-combobox-control__input[type=text]:focus{outline:none;box-shadow:none}.components-combobox-control__suggestions-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:flex;flex-wrap:wrap;align-items:flex-start;width:100%;margin:0 0 8px;padding:4px}@media(prefers-reduced-motion:reduce){.components-combobox-control__suggestions-container{transition-duration:0s}}@media(min-width:600px){.components-combobox-control__suggestions-container{font-size:13px;line-height:normal}}.components-combobox-control__suggestions-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__suggestions-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .components-combobox-control__suggestions-container::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .components-combobox-control__suggestions-container::-moz-placeholder{opacity:1;color:hsla(0,0%,100%,.65)}.is-dark-theme .components-combobox-control__suggestions-container:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.components-combobox-control__suggestions-container:focus-within{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__reset.components-button{display:flex;height:24px;min-width:24px;padding:0} \ No newline at end of file diff --git a/build/wc-blocks-vendors-style.css b/build/wc-blocks-vendors-style.css new file mode 100644 index 00000000000..7e62180a1ac --- /dev/null +++ b/build/wc-blocks-vendors-style.css @@ -0,0 +1 @@ +.components-custom-select-control{position:relative}.components-custom-select-control__label{display:block;margin-bottom:8px}.components-custom-select-control__button{border:1px solid #757575;border-radius:2px;min-height:30px;min-width:130px;position:relative;text-align:left}.components-custom-select-control__button.components-custom-select-control__button{padding-right:24px}.components-custom-select-control__button:focus:not(:disabled){border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color)}.components-custom-select-control__button .components-custom-select-control__button-icon{height:100%;padding:0;position:absolute;right:0;top:0}.components-custom-select-control__menu{background-color:#fff;max-height:400px;min-width:100%;overflow:auto;padding:0;position:absolute;z-index:1000000}.components-custom-select-control__menu:focus{border:1px solid #1e1e1e;border-radius:2px;outline:none;transition:none}.components-custom-select-control__item{align-items:center;display:flex;list-style-type:none;padding:10px 5px 10px 25px;cursor:default}.components-custom-select-control__item.is-highlighted{background:#ddd}.components-custom-select-control__item-icon{margin-left:-20px;margin-right:0}.components-spinner{display:inline-block;background-color:#949494;width:18px;height:18px;opacity:.7;margin:5px 11px 0;border-radius:100%;position:relative}.components-spinner:before{content:"";position:absolute;background-color:#fff;top:3px;left:3px;width:4px;height:4px;border-radius:100%;transform-origin:6px 6px;-webkit-animation:components-spinner__animation 1s linear infinite;animation:components-spinner__animation 1s linear infinite}@-webkit-keyframes components-spinner__animation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes components-spinner__animation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.components-snackbar{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#1e1e1e;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.3);color:#fff;padding:16px 24px;width:100%;max-width:600px;box-sizing:border-box;cursor:pointer}@media(min-width:600px){.components-snackbar{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}}.components-snackbar:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.components-snackbar__action.components-button{margin-left:32px;color:#fff;height:auto;flex-shrink:0;line-height:1.4;padding:0}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary){text-decoration:underline;background-color:transparent}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):focus{color:#fff;box-shadow:none;outline:1px dotted #fff}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{color:var(--wp-admin-theme-color)}.components-snackbar__content{display:flex;align-items:baseline;justify-content:space-between;line-height:1.4}.components-snackbar-list{position:absolute;z-index:100000;width:100%;box-sizing:border-box}.components-snackbar-list__notice-container{position:relative;padding-top:8px}.components-combobox-control{width:100%}input.components-combobox-control__input[type=text]{width:100%;border:none;box-shadow:none;padding:2px;margin:0;line-height:inherit;min-height:auto}input.components-combobox-control__input[type=text]:focus{outline:none;box-shadow:none}.components-combobox-control__suggestions-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:flex;flex-wrap:wrap;align-items:flex-start;width:100%;margin:0 0 8px;padding:4px}@media(prefers-reduced-motion:reduce){.components-combobox-control__suggestions-container{transition-duration:0s}}@media(min-width:600px){.components-combobox-control__suggestions-container{font-size:13px;line-height:normal}}.components-combobox-control__suggestions-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__suggestions-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .components-combobox-control__suggestions-container::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .components-combobox-control__suggestions-container::-moz-placeholder{opacity:1;color:hsla(0,0%,100%,.65)}.is-dark-theme .components-combobox-control__suggestions-container:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.components-combobox-control__suggestions-container:focus-within{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__reset.components-button{display:flex;height:24px;min-width:24px;padding:0} \ No newline at end of file diff --git a/build/wc-blocks-vendors.js b/build/wc-blocks-vendors.js new file mode 100644 index 00000000000..1ea820f94a9 --- /dev/null +++ b/build/wc-blocks-vendors.js @@ -0,0 +1,19 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[0],[,,function(e,t,n){e.exports=n(570)()},,,function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;tr?t.scrollTop=o-t.clientHeight:n.offsetTop-1&&this.scrollToOption(e),this.toggleKeyEvents(!0)}},{key:"componentWillUnmount",value:function(){this.toggleKeyEvents(!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,r=t.listboxId,o=t.options,a=t.selectedIndex,i=t.staticList,c=q()("woocommerce-select-control__listbox",{"is-static":i});return Object(v.createElement)("div",{ref:this.listbox,id:r,role:"listbox",className:c,tabIndex:"-1"},o.map((function(t,r){return Object(v.createElement)(w.Button,{ref:e.getOptionRef(r),key:t.key,id:"woocommerce-select-control__option-".concat(n,"-").concat(t.key),role:"option","aria-selected":r===a,disabled:t.isDisabled,className:q()("woocommerce-select-control__option",{"is-selected":r===a}),onClick:function(){return e.select(t)},tabIndex:"-1"},t.label)})))}}]),o}(v.Component);ee.propTypes={instanceId:S.a.number,listboxId:S.a.string,node:S.a.instanceOf(Element).isRequired,onSelect:S.a.func,options:S.a.arrayOf(S.a.shape({isDisabled:S.a.bool,key:S.a.oneOfType([S.a.number,S.a.string]).isRequired,keywords:S.a.arrayOf(S.a.oneOfType([S.a.string,S.a.number])),label:S.a.oneOfType([S.a.string,S.a.object]),value:S.a.any})).isRequired,selectedIndex:S.a.number,staticList:S.a.bool};var te=ee,ne=n(20),re=function(e){var t=e.id,n=e.instanceId,r=e.isVisible,o=e.label,a=e.popoverContents,i=e.remove,c=e.screenReaderLabel,s=e.setState,l=e.className;if(c=c||o,!o)return null;o=Object(ne.decodeEntities)(o);var u=q()("woocommerce-tag",l,{"has-remove":!!i}),d="woocommerce-tag__label-".concat(n),f=Object(v.createElement)(v.Fragment,null,Object(v.createElement)("span",{className:"screen-reader-text"},c),Object(v.createElement)("span",{"aria-hidden":"true"},o));return Object(v.createElement)("span",{className:u},a?Object(v.createElement)(w.Button,{className:"woocommerce-tag__text",id:d,onClick:function(){return s((function(){return{isVisible:!0}}))}},f):Object(v.createElement)("span",{className:"woocommerce-tag__text",id:d},f),a&&r&&Object(v.createElement)(w.Popover,{onClose:function(){return s((function(){return{isVisible:!1}}))}},a),i&&Object(v.createElement)(w.Button,{className:"woocommerce-tag__remove",onClick:i(t),label:Object(O.sprintf)(Object(O.__)("Remove %s","woocommerce-admin"),o),"aria-describedby":d},Object(v.createElement)(w.Dashicon,{icon:"dismiss",size:20})))};re.propTypes={id:S.a.oneOfType([S.a.number,S.a.string]),label:S.a.string.isRequired,popoverContents:S.a.node,remove:S.a.func,screenReaderLabel:S.a.string};var oe=Object(Z.withState)({isVisible:!1})(Object(Z.withInstanceId)(re));var ae=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).removeAll=t.removeAll.bind(f()(t)),t.removeResult=t.removeResult.bind(f()(t)),t}return u()(o,[{key:"removeAll",value:function(){(0,this.props.onChange)([])}},{key:"removeResult",value:function(e){var t=this;return function(){var n=t.props,r=n.selected,o=n.onChange,a=Object(_.findIndex)(r,{key:e});o([].concat(i()(r.slice(0,a)),i()(r.slice(a+1))))}}},{key:"render",value:function(){var e=this,t=this.props,n=t.selected,r=t.showClearButton;return n.length?Object(v.createElement)(v.Fragment,null,Object(v.createElement)("div",{className:"woocommerce-select-control__tags"},n.map((function(t,r){if(!t.label)return null;var o=Object(O.sprintf)(Object(O.__)("%1$s (%2$s of %3$s)","woocommerce-admin"),t.label,r+1,n.length);return Object(v.createElement)(oe,{key:t.key,id:t.key,label:t.label,remove:e.removeResult,screenReaderLabel:o})}))),r&&Object(v.createElement)(w.Button,{className:"woocommerce-select-control__clear",isLink:!0,onClick:this.removeAll},Object(v.createElement)(w.Icon,{icon:"dismiss"}),Object(v.createElement)("span",{className:"screen-reader-text"},Object(O.__)("Clear all","woocommerce-admin")))):null}}]),o}(v.Component);ae.propTypes={onChange:S.a.func,onSelect:S.a.func,selected:S.a.arrayOf(S.a.shape({key:S.a.oneOfType([S.a.number,S.a.string]).isRequired,label:S.a.string})),showClearButton:S.a.bool};var ie=ae,ce=n(87),se=n(48);function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ue=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,o=Object(se.a)(e,["icon","size"]);return Object(v.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.getSelected(),t=this.props,n=t.multiple,r=t.excludeSelectedOptions,o=ye({},be);!n&&e.length&&e[0].label&&(o.query=e[0].label,o.selectedIndex=r?null:this.props.options.findIndex((function(t){return t.key===e[0].key}))),this.setState(o)}},{key:"handleFocusOutside",value:function(){this.reset()}},{key:"hasMultiple",value:function(){var e=this.props,t=e.multiple,n=e.selected;return!!t&&(Array.isArray(n)?n.some((function(e){return Boolean(e.label)})):Boolean(n))}},{key:"getSelected",value:function(){var e=this.props,t=e.multiple,n=e.options,r=e.selected;if(t||Array.isArray(r))return r;var o=n.find((function(e){return e.key===r}));return o?[o]:[]}},{key:"selectOption",value:function(e){var t=this.props,n=t.multiple,r=t.selected,o=n?[].concat(i()(r),[e]):[e];this.reset(o),-1===(Array.isArray(r)?r:[{key:r}]).findIndex((function(t){return t.key===e.key}))&&this.setNewValue(o);var a=this.props.excludeSelectedOptions?null:this.getOptions().findIndex((function(t){return t.key===e.key}));this.setState({selectedIndex:a})}},{key:"setNewValue",value:function(e){var t=this.props,n=t.onChange,r=t.selected,o=t.multiple,a=this.state.query;o||Array.isArray(r)?n(e,a):n(e.length>0?e[0].key:"",a)}},{key:"decrementSelectedIndex",value:function(){var e=this.state.selectedIndex,t=this.getOptions(),n=null!==e?(0===e?t.length:e)-1:t.length-1;this.setState({selectedIndex:n})}},{key:"incrementSelectedIndex",value:function(){var e=this.state.selectedIndex,t=this.getOptions(),n=null!==e?(e+1)%t.length:0;this.setState({selectedIndex:n})}},{key:"announce",value:function(e){var t=this.props.debouncedSpeak;t&&(e.length?t(Object(O.sprintf)(Object(O._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"woocommerce-admin"),e.length),"assertive"):t(Object(O.__)("No results.","woocommerce-admin"),"assertive"))}},{key:"getOptions",value:function(){var e=this.props,t=e.isSearchable,n=e.options,r=e.excludeSelectedOptions,o=this.state.searchOptions,a=this.getSelected().map((function(e){return e.key})),i=t?o:n;return r?i.filter((function(e){return!a.includes(e.key)})):i}},{key:"getOptionsByQuery",value:function(e,t){for(var n=this.props,r=n.getSearchExpression,o=n.maxResults,a=n.onFilter,c=[],s=r(Object(_.escapeRegExp)(t?t.trim():"")),l=s?new RegExp(s,"i"):/^$/,u=0;u0?null:this.state.selectedIndex},(function(){t.setState({isExpanded:Boolean(t.getOptions().length)})})),this.updateSearchOptions(e)}},{key:"updateSearchOptions",value:function(e){var t=this,n=this.props,r=n.hideBeforeSearch,o=n.options,a=n.onSearch,i=this.activePromise=Promise.resolve(a(o,e)).then((function(n){if(i===t.activePromise){t.cacheSearchOptions=n;var o=null===e||e.length||r?t.getOptionsByQuery(n,e):n;t.setState({searchOptions:o,selectedIndex:(null==e?void 0:e.length)>0?null:t.state.selectedIndex},(function(){t.setState({isExpanded:Boolean(t.getOptions().length)}),t.announce(o)}))}}))}},{key:"onAutofillChange",value:function(e){var t=this.props.options,n=this.getOptionsByQuery(t,e.target.value);1===n.length&&this.selectOption(n[0])}},{key:"render",value:function(){var e=this.props,t=e.autofill,n=e.children,r=e.className,o=e.disabled,a=e.controlClassName,i=e.inlineTags,c=e.instanceId,s=e.isSearchable,l=e.options,u=this.state,d=u.isExpanded,f=u.isFocused,p=u.selectedIndex,h=this.hasMultiple(),m=(l[p]||{}).key,y=void 0===m?"":m,b=d?"woocommerce-select-control__listbox-".concat(c):null,g=d?"woocommerce-select-control__option-".concat(c,"-").concat(y):null;return Object(v.createElement)("div",{className:q()("woocommerce-select-control",r,{"has-inline-tags":h&&i,"is-focused":f,"is-searchable":s}),ref:this.bindNode},t&&Object(v.createElement)("input",{onChange:this.onAutofillChange,name:t,type:"text",className:"woocommerce-select-control__autofill-input",tabIndex:"-1"}),n,Object(v.createElement)(he,T()({},this.props,this.state,{activeId:g,className:a,disabled:o,hasTags:h,isExpanded:d,listboxId:b,onSearch:this.search,selected:this.getSelected(),onChange:this.setNewValue,setExpanded:this.setExpanded,updateSearchOptions:this.updateSearchOptions,decrementSelectedIndex:this.decrementSelectedIndex,incrementSelectedIndex:this.incrementSelectedIndex})),!i&&h&&Object(v.createElement)(ie,T()({},this.props,{selected:this.getSelected()})),d&&Object(v.createElement)(te,T()({},this.props,this.state,{activeId:g,listboxId:b,node:this.node,onSelect:this.selectOption,onSearch:this.search,options:this.getOptions(),decrementSelectedIndex:this.decrementSelectedIndex,incrementSelectedIndex:this.incrementSelectedIndex,setExpanded:this.setExpanded})))}}]),o}(v.Component);ge.propTypes={autofill:S.a.string,children:S.a.node,className:S.a.string,controlClassName:S.a.string,disabled:S.a.bool,excludeSelectedOptions:S.a.bool,onFilter:S.a.func,getSearchExpression:S.a.func,help:S.a.oneOfType([S.a.string,S.a.node]),inlineTags:S.a.bool,isSearchable:S.a.bool,label:S.a.string,onChange:S.a.func,onSearch:S.a.func,options:S.a.arrayOf(S.a.shape({isDisabled:S.a.bool,key:S.a.oneOfType([S.a.number,S.a.string]).isRequired,keywords:S.a.arrayOf(S.a.oneOfType([S.a.string,S.a.number])),label:S.a.oneOfType([S.a.string,S.a.object]),value:S.a.any})).isRequired,placeholder:S.a.string,searchDebounceTime:S.a.number,selected:S.a.oneOfType([S.a.string,S.a.arrayOf(S.a.shape({key:S.a.oneOfType([S.a.number,S.a.string]).isRequired,label:S.a.string}))]),maxResults:S.a.number,multiple:S.a.bool,showClearButton:S.a.bool,searchInputType:S.a.oneOf(["text","search","number","email","tel","url"]),hideBeforeSearch:S.a.bool,showAllOnFocus:S.a.bool,staticList:S.a.bool},ge.defaultProps={autofill:null,excludeSelectedOptions:!0,getSearchExpression:_.identity,inlineTags:!1,isSearchable:!1,onChange:_.noop,onFilter:_.identity,onSearch:function(e){return Promise.resolve(e)},maxResults:0,multiple:!1,searchDebounceTime:0,searchInputType:"search",selected:[],showAllOnFocus:!1,showClearButton:!1,hideBeforeSearch:!1,staticList:!1};var ve=Object(Z.compose)([w.withSpokenMessages,Z.withInstanceId,w.withFocusOutside])(ge),Oe=n(13),we=n(11),_e=n.n(we);function ke(e,t){if(!t)return null;var n=e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());return{suggestionBeforeMatch:Object(ne.decodeEntities)(e.substring(0,n)),suggestionMatch:Object(ne.decodeEntities)(e.substring(n,n+t.length)),suggestionAfterMatch:Object(ne.decodeEntities)(e.substring(n+t.length))}}function Se(e){return[e.country,e.state,e.name||Object(O.__)("TAX","woocommerce-admin"),e.priority].filter(Boolean).map((function(e){return e.toString().toUpperCase().trim()})).join("-")}var je={name:"attributes",className:"woocommerce-search__product-result",options:function(e){var t=e?{search:e,per_page:10,orderby:"count"}:{};return _e()({path:Object(Oe.addQueryArgs)("/wc-analytics/products/attributes",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.id},getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"name",label:Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},D()({mixedString:Object(O.__)("All attributes with names that include {{query /}}","woocommerce-admin"),components:{query:Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=ke(e.name,t)||{};return Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)},getOptionCompletion:function(e){return{key:e.id,label:e.name}}},Ee={name:"categories",className:"woocommerce-search__product-result",options:function(e){var t=e?{search:e,per_page:10,orderby:"count"}:{};return _e()({path:Object(Oe.addQueryArgs)("/wc-analytics/products/categories",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.id},getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"title",label:Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},D()({mixedString:Object(O.__)("All categories with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=ke(e.name,t)||{};return Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)},getOptionCompletion:function(e){return{key:e.id,label:e.name}}},Ce=n(507),De=n.n(Ce),Pe=function(e){var t=e.code,n=e.order,r=e.className,o=e.size,a=e.hideFromScreenReader,i=q()("woocommerce-flag",r),c=t||"unknown";n&&n.shipping&&n.shipping.country?c=n.shipping.country:n&&n.billing&&n.billing.country&&(c=n.billing.country);var s={fontSize:o},l=Object(_.get)(De.a.countryCode(c),"emoji");return Object(v.createElement)("div",{className:i,style:s,"aria-hidden":a},l&&Object(v.createElement)("span",null,l),!l&&Object(v.createElement)("span",{className:"woocommerce-flag__fallback"},"Invalid country flag"))};Pe.propTypes={code:S.a.string,order:S.a.object,className:S.a.string,size:S.a.number};var xe=Pe,Fe=null,Te={name:"countries",className:"woocommerce-search__country-result",isDebounced:!0,options:function(){return Fe?Promise.resolve(Fe):_e()({path:"/wc-analytics/data/countries"}).then((function(e){return Fe=e}))},getOptionIdentifier:function(e){return e.code},getSearchExpression:function(e){return"^"+e},getOptionKeywords:function(e){return[e.code,Object(ne.decodeEntities)(e.name)]},getOptionLabel:function(e,t){var n=Object(ne.decodeEntities)(e.name),r=ke(n,t)||{};return Object(v.createElement)(v.Fragment,null,Object(v.createElement)(xe,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",code:e.code,size:18,hideFromScreenReader:!0}),Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":n},t?Object(v.createElement)(v.Fragment,null,r.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},r.suggestionMatch),r.suggestionAfterMatch):n))},getOptionCompletion:function(e){return{key:e.code,label:Object(ne.decodeEntities)(e.name)}}},Me={name:"coupons",className:"woocommerce-search__coupon-result",options:function(e){var t=e?{search:e,per_page:10}:{};return _e()({path:Object(Oe.addQueryArgs)("/wc-analytics/coupons",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.id},getOptionKeywords:function(e){return[e.code]},getFreeTextOptions:function(e){return[{key:"code",label:Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},D()({mixedString:Object(O.__)("All coupons with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,code:e}}]},getOptionLabel:function(e,t){var n=ke(e.code,t)||{};return Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)},getOptionCompletion:function(e){return{key:e.id,label:e.code}}},Re={name:"customers",className:"woocommerce-search__customers-result",options:function(e){var t=e?{search:e,searchby:"name",per_page:10}:{};return _e()({path:Object(Oe.addQueryArgs)("/wc-analytics/customers",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.id},getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"name",label:Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},D()({mixedString:Object(O.__)("All customers with names that include {{query /}}","woocommerce-admin"),components:{query:Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=ke(e.name,t)||{};return Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)},getOptionCompletion:function(e){return{key:e.id,label:e.name}}},Ie={name:"download-ips",className:"woocommerce-search__download-ip-result",options:function(e){var t=e?{match:e}:{};return _e()({path:Object(Oe.addQueryArgs)("/wc-analytics/data/download-ips",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.user_ip_address},getOptionKeywords:function(e){return[e.user_ip_address]},getOptionLabel:function(e,t){var n=ke(e.user_ip_address,t)||{};return Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.user_ip_address},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)},getOptionCompletion:function(e){return{key:e.user_ip_address,label:e.user_ip_address}}},Ae={name:"emails",className:"woocommerce-search__emails-result",options:function(e){var t=e?{search:e,searchby:"email",per_page:10}:{};return _e()({path:Object(Oe.addQueryArgs)("/wc-analytics/customers",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.id},getOptionKeywords:function(e){return[e.email]},getOptionLabel:function(e,t){var n=ke(e.email,t)||{};return Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.email},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)},getOptionCompletion:function(e){return{key:e.id,label:e.email}}},Ne={name:"orders",className:"woocommerce-search__order-result",options:function(e){var t=e?{number:e,per_page:10}:{};return _e()({path:Object(Oe.addQueryArgs)("/wc-analytics/orders",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.id},getOptionKeywords:function(e){return["#"+e.number]},getOptionLabel:function(e,t){var n=ke("#"+e.number,t)||{};return Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":"#"+e.number},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)},getOptionCompletion:function(e){return{key:e.id,label:"#"+e.number}}},Le=function(e){var t=e.product,n=e.alt,r=e.width,o=e.height,a=e.className,i=R()(e,["product","alt","width","height","className"]),c=Object(_.get)(t,["images",0])||Object(_.get)(t,["image"]),s=c&&c.src||!1,l=n||c&&c.alt||"",u=q()("woocommerce-product-image",a,{"is-placeholder":!s});return Object(v.createElement)("img",T()({className:u,src:s||"data:image/svg+xml;utf8,%3Csvg width='421' height='421' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cstyle type='text/css'%3E.st0%7Bfill:url(%23SVGID_1_);stroke:%23717275;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10%7D .st1%7Bfill:%23FFFFFF;%7D .st2%7Bfill:%23717275;%7D .st3%7Bfill:%23DCDDE0;stroke:%23717275;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;%7D%3C/style%3E%3CradialGradient cx='105.8248' cy='287.7805' gradientUnits='userSpaceOnUse' id='SVGID_1_' r='372.6935'%3E%3Cstop offset='0.2613' stop-color='%23DCDDE0'/%3E%3Cstop offset='0.633' stop-color='%23D8DADD'/%3E%3Cstop offset='0.9665' stop-color='%23CECFD3'/%3E%3Cstop offset='1' stop-color='%23CCCED2'/%3E%3C/radialGradient%3E%3Cg class='layer' display='inline'%3E%3Ctitle%3ELayer 2%3C/title%3E%3Crect fill='%23ffffff' height='417.99996' id='svg_7' stroke-dasharray='null' stroke-linecap='null' stroke-linejoin='null' stroke-width='null' width='417.99996' x='1.50002' y='1.5'/%3E%3C/g%3E%3Cg class='layer' display='inline'%3E%3Ctitle%3ELayer 1%3C/title%3E%3Cg id='svg_2'/%3E%3Cg id='svg_6'%3E%3Cpath class='st0' d='m330.44409,336.12693c-0.12194,0.36582 0,0.67068 0.30485,0.79262c1.40232,-0.79262 3.17047,-1.0365 4.63377,-0.48776c0.67068,-1.46329 0.12194,-2.43882 0.06097,-3.90212c-0.91456,-15.66945 -0.73165,-31.9486 -0.73165,-47.73998c0,-16.34012 -0.30485,-32.74121 0.54874,-48.9594c0.79262,-15.9743 1.89009,-31.5218 1.28038,-47.55707c-0.60971,-15.79139 -0.06097,-31.70471 0.73165,-47.37416c0.36582,-8.04812 0.79262,-15.66945 0.36582,-23.77854c-0.48776,-9.08462 -0.36582,-21.88845 -0.36582,-30.97307c0,-1.0365 0.18291,-1.82912 -0.79262,-2.43882c-0.79262,-0.48776 -1.52427,-0.42679 -2.43882,-0.42679c-2.49979,0 -4.87765,-0.36582 -7.37744,-0.36582c-1.52427,0 -2.86562,0 -4.32891,0.30485c-0.79262,0.12194 -1.52427,0.06097 -2.31688,0.06097c-0.85359,0 -1.52427,0.18291 -2.31688,0.36582c-6.88968,1.15844 -15.73042,2.49979 -22.62009,1.76815c-6.88968,-0.73165 -13.71839,-0.67068 -20.54709,-2.01203c-6.46288,-1.28038 -12.92577,-0.42679 -19.38865,-0.42679c-4.146,0 -8.23103,0 -12.37703,0c-3.96309,0 -7.80424,-0.73165 -11.8283,-0.73165c-6.52385,0.06097 -13.10868,0.12194 -19.63253,0.36582c-4.51182,0.18291 -8.84074,0 -13.35256,0.42679c-6.82871,0.60971 -13.77936,1.09747 -20.66903,1.0365c-3.59727,0 -7.07259,0.24388 -10.60889,-0.42679c-3.17047,-0.60971 -6.58483,-0.12194 -9.7553,0.18291c-3.96309,0.36582 -7.86521,1.0365 -11.8283,1.0365c-3.84115,-0.06097 -7.74327,-0.85359 -11.58441,-0.85359c-4.38988,-0.12194 -8.59686,0.42679 -12.98674,0.12194c-5.36541,-0.36582 -10.60889,-0.06097 -15.91333,-0.12194c-0.91456,0 -1.34135,0.24388 -2.13397,0.36582c-0.79262,0.12194 -1.40232,0.36582 -2.19494,0.36582c-0.85359,0 -1.34135,-0.30485 -2.13397,-0.36582c-1.64621,-0.18291 -5.91415,-0.06097 -7.49938,-0.48776c-1.70718,-0.42679 -3.41435,-0.91456 -5.12153,-1.34135c-1.40232,1.34135 -1.52427,3.5363 -1.64621,5.48735c-0.85359,21.58359 -0.73165,43.16719 -0.60971,64.75078c0,4.99959 0.06097,9.99918 0.60971,14.9378c0.42679,3.84115 1.15844,7.6823 1.46329,11.52344c0.48776,6.219 -0.06097,12.49897 -0.36582,18.71798c-0.36582,7.31647 -0.36582,14.63295 0.06097,21.94942c0.97553,18.90089 -0.48776,40.30157 -0.79262,59.20246c-0.36582,18.41312 -0.67068,37.1311 3.90212,54.99549c4.63377,-1.82912 17.13274,1.15844 22.55912,1.40232c5.85318,0.24388 11.8283,0.30485 17.74245,0.30485c6.76774,0 13.59644,-0.36582 20.30321,0c8.47491,0.42679 16.09624,2.31688 24.63212,1.82912c4.146,-0.24388 8.65783,0.36582 12.68189,0.36582c3.29241,0 9.87724,-1.09747 12.25509,0.73165c8.77977,0 20.18127,0.12194 28.90007,-0.73165c9.08462,-0.85359 19.38865,-1.21941 28.47327,-0.36582c7.37744,0.73165 14.45003,1.34135 21.82748,0.36582c4.63377,-0.60971 9.14559,-1.09747 13.9013,-1.09747c4.32891,0 8.292,-1.58524 12.49897,-1.46329c4.63377,0.12194 9.38947,1.40232 14.02324,1.89009c3.04853,0.30485 9.63336,-2.49979 12.49897,-1.21941l-0.00003,-0.00001z' fill='black' id='svg_1'/%3E%3Cpath class='st1' d='m313.79912,275.40021c-1.09747,0 -3.90212,-4.20697 -4.99959,-5.85318c-0.42679,-0.67068 -0.79262,-1.21941 -1.0365,-1.52427c-1.76815,-2.25591 -4.02406,-4.51182 -6.219,-6.6458c-0.67068,-0.67068 -1.40232,-1.40232 -2.073,-2.073c-3.5363,-3.59727 -9.02365,-7.98715 -13.16965,-9.51141c-1.40232,-0.48776 -2.56077,-1.21941 -3.71921,-1.82912c-2.19494,-1.28038 -4.20697,-2.43882 -7.49938,-2.49979c-0.30485,0 -0.67068,0 -0.97553,0c-3.78018,0 -7.49938,0.48776 -11.34053,1.09747c-7.19453,1.09747 -16.82789,7.49938 -21.52262,14.32809c-0.73165,1.09747 -1.15844,2.31688 -1.21941,3.5363c-2.31688,-0.54874 -5.6093,-3.17047 -7.62133,-4.75571c-0.30485,-0.24388 -0.60971,-0.48776 -0.85359,-0.67068c-2.74368,-2.13397 -4.75571,-4.5728 -6.95065,-7.2555c-1.28038,-1.52427 -2.62174,-3.1095 -4.08503,-4.63377c-7.92618,-8.17006 -16.88886,-15.48653 -25.54668,-22.55912c-4.51182,-3.65824 -9.14559,-7.43841 -13.59644,-11.27956c-5.79221,-4.99959 -10.365,-9.81627 -14.45003,-15.12071c-0.42679,-0.54874 -0.85359,-1.09747 -1.21941,-1.64621c-1.58524,-2.13397 -3.23144,-4.26794 -5.12153,-6.15803c-0.67068,-0.67068 -2.31688,-1.89009 -4.20697,-3.23144c-2.98756,-2.19494 -7.56035,-5.48735 -7.92618,-6.70677c-0.42679,-1.40232 -3.5363,-3.5363 -3.59727,-3.5363c-0.85359,-0.48776 -1.76815,-1.40232 -1.82912,-2.62174l-0.06097,-0.85359l-0.79262,0.36582c-2.86562,1.34135 -4.93862,3.41435 -7.07259,5.6093c-0.36582,0.36582 -0.67068,0.73165 -1.0365,1.0365c-5.67027,5.73124 -11.15762,11.64539 -16.27915,17.49856c-2.49979,2.86562 -5.12153,6.03609 -7.31647,9.38947c-0.60971,0.91456 -1.15844,2.01203 -1.70718,3.17047c-0.91456,1.89009 -1.89009,3.84115 -3.04853,4.99959c-0.36582,-0.54874 -0.73165,-1.64621 -0.91456,-2.13397c-0.06097,-0.18291 -0.12194,-0.42679 -0.18291,-0.54874c-1.28038,-3.17047 -0.79262,-6.52385 -0.30485,-10.06015c0.36582,-2.49979 0.73165,-4.99959 0.48776,-7.62133c-0.12194,-0.97553 -0.30485,-2.01203 -0.48776,-3.04853c-0.60971,-3.47532 -1.21941,-7.01162 -0.73165,-10.24306c1.21941,-9.63336 2.43882,-19.51059 3.04853,-29.32686c0.97553,-9.69433 0.42679,-18.83992 -0.18291,-28.53424c-0.12194,-2.43882 -0.30485,-4.99959 -0.42679,-7.49938c0,-1.0365 -0.06097,-2.13397 -0.06097,-3.17047c-0.12194,-3.17047 -0.24388,-6.219 0.60971,-9.20656c0.18291,-0.12194 0.48776,-0.30485 0.85359,-0.36582l2.37785,1.0365c2.25591,0.91456 5.1825,1.40232 8.90171,1.40232c3.41435,0 7.01162,-0.36582 10.54791,-0.73165c3.23144,-0.30485 6.34094,-0.60971 9.02365,-0.60971c0.67068,0 1.28038,0 1.89009,0.06097c1.52427,0.12194 3.04853,0.30485 4.51182,0.48776c2.13397,0.24388 4.38988,0.54874 6.58483,0.54874c0.54874,0 1.09747,0 1.58524,0c3.90212,0 7.92618,-0.18291 11.76733,-0.36582c3.17047,-0.12194 6.46288,-0.30485 9.69433,-0.36582c5.48735,-0.06097 11.09665,-0.36582 16.46206,-0.60971c2.25591,-0.12194 4.45085,-0.24388 6.70677,-0.30485c4.38988,-0.18291 8.90171,-0.18291 13.23062,-0.18291c3.1095,0 6.34094,0 9.57238,-0.06097c6.6458,-0.18291 13.35256,-0.54874 19.81545,-0.97553c6.88968,-0.42679 14.08421,-0.85359 21.09583,-0.97553c1.76815,-0.06097 3.5363,-0.06097 5.24347,-0.06097c3.84115,-0.06097 7.80424,-0.06097 11.76733,-0.30485c2.25591,-0.12194 4.5728,-0.36582 6.82871,-0.54874c3.78018,-0.36582 7.74327,-0.67068 11.58441,-0.67068c1.40232,0 2.74368,0.06097 4.02406,0.12194c1.89009,0.12194 3.78018,0.48776 5.79221,0.85359c2.62174,0.48776 5.30444,0.91456 7.92618,0.91456c0.67068,0 1.34135,-0.06097 1.95106,-0.12194c-0.73165,1.40232 -0.73165,3.17047 -0.67068,4.08503c0.12194,2.31688 0.12194,4.81668 0.12194,7.19453c0,9.38947 -0.97553,18.29118 -2.01203,27.74163c-0.36582,3.23144 -0.73165,6.6458 -1.0365,9.99918c-0.60971,13.65742 0,28.10745 0.60971,40.8503l0,4.63377c0.30485,4.146 0,8.23103 -0.30485,12.13315c-0.30485,3.90212 -0.60971,7.92618 -0.30485,11.95024c1.28038,12.07218 1.82912,23.71757 1.64621,34.6313l0.42679,10.60889l0.06097,0.06097c0.48776,1.34135 0.97553,6.95065 -0.24388,8.77977c-0.36582,0.42679 -0.60971,0.48776 -0.79262,0.48776l0,0l-0.00004,0.00002z' id='svg_3'/%3E%3Cpath class='st2' d='m296.54444,101.02428c1.40232,0 2.68271,0.06097 3.96309,0.12194c1.82912,0.12194 3.71921,0.48776 5.73124,0.79262c2.62174,0.48776 5.36541,0.97553 8.04812,0.97553c0.36582,0 0.67068,0 1.0365,0c-0.36582,1.21941 -0.36582,2.49979 -0.36582,3.41435c0.12194,2.31688 0.12194,4.75571 0.12194,7.13356c0,9.38947 -0.97553,18.29118 -2.01203,27.68065c-0.36582,3.29241 -0.73165,6.6458 -1.0365,9.99918l0,0l0,0c-0.60971,13.59644 0,28.10745 0.60971,40.8503l0,4.63377l0,0.06097l0,0.06097c0.30485,4.02406 0,8.10909 -0.30485,12.01121c-0.30485,3.90212 -0.60971,7.98715 -0.30485,12.01121l0,0l0,0c1.28038,12.01121 1.82912,23.65659 1.64621,34.50936l0,0.06097l0,0.06097l0.42679,10.48694l0,0.18291l0.06097,0.18291c0.48776,1.34135 0.85359,6.70677 -0.18291,8.292c-0.06097,0.06097 -0.12194,0.18291 -0.18291,0.18291c-1.0365,-0.36582 -3.65824,-4.26794 -4.51182,-5.54833c-0.48776,-0.67068 -0.79262,-1.21941 -1.09747,-1.58524c-1.82912,-2.31688 -4.08503,-4.51182 -6.219,-6.70677c-0.67068,-0.67068 -1.40232,-1.34135 -2.073,-2.073c-3.59727,-3.65824 -9.14559,-8.04812 -13.41353,-9.63336c-1.34135,-0.48776 -2.49979,-1.15844 -3.59727,-1.82912c-2.13397,-1.21941 -4.32891,-2.49979 -7.80424,-2.62174c-0.30485,0 -0.67068,0 -0.97553,0c-3.84115,0 -7.56035,0.48776 -11.46247,1.09747c-7.37744,1.09747 -17.19371,7.62133 -21.94942,14.57197c-0.67068,0.97553 -1.09747,2.01203 -1.28038,3.1095c-2.13397,-0.79262 -4.93862,-3.04853 -6.70677,-4.45085c-0.30485,-0.24388 -0.60971,-0.48776 -0.85359,-0.67068c-2.68271,-2.073 -4.69474,-4.51182 -6.88968,-7.13356c-1.28038,-1.52427 -2.62174,-3.1095 -4.08503,-4.69474c-7.92618,-8.17006 -16.88886,-15.48653 -25.60765,-22.55912c-4.51182,-3.65824 -9.14559,-7.43841 -13.53547,-11.27956c-5.73124,-4.99959 -10.30403,-9.7553 -14.38906,-15.05974c-0.42679,-0.54874 -0.85359,-1.09747 -1.21941,-1.64621c-1.58524,-2.13397 -3.29241,-4.32891 -5.1825,-6.219c-0.73165,-0.73165 -2.31688,-1.89009 -4.26794,-3.29241c-2.37785,-1.70718 -7.31647,-5.30444 -7.6823,-6.40191c-0.48776,-1.70718 -3.84115,-3.90212 -3.84115,-3.90212c-0.67068,-0.42679 -1.46329,-1.15844 -1.52427,-2.13397l-0.12194,-1.70718l-1.58524,0.73165c-2.98756,1.34135 -5.1825,3.59727 -7.2555,5.73124c-0.36582,0.36582 -0.67068,0.73165 -1.0365,1.0365c-5.67027,5.73124 -11.15762,11.64539 -16.27915,17.49856c-2.56077,2.92659 -5.1825,6.09706 -7.37744,9.45044c-0.60971,0.91456 -1.15844,2.073 -1.76815,3.29241c-0.73165,1.46329 -1.46329,3.04853 -2.37785,4.146c-0.18291,-0.48776 -0.42679,-0.97553 -0.48776,-1.28038c-0.06097,-0.24388 -0.18291,-0.42679 -0.24388,-0.54874c-1.21941,-2.98756 -0.79262,-6.27997 -0.24388,-9.69433c0.36582,-2.49979 0.73165,-5.12153 0.48776,-7.74327l0,0l0,0c-0.12194,-0.97553 -0.30485,-1.95106 -0.48776,-2.98756c-0.60971,-3.41435 -1.15844,-6.95065 -0.73165,-10.06015c1.21941,-9.63336 2.43882,-19.51059 3.04853,-29.32686c0.97553,-9.7553 0.42679,-18.90089 -0.18291,-28.65618c-0.12194,-2.43882 -0.30485,-4.93862 -0.42679,-7.43841c0,-1.09747 -0.06097,-2.13397 -0.06097,-3.23144c-0.12194,-3.04853 -0.18291,-5.97512 0.54874,-8.84074c0.06097,-0.06097 0.18291,-0.06097 0.24388,-0.12194l2.25591,0.97553c2.31688,0.97553 5.30444,1.46329 9.14559,1.46329c3.41435,0 7.07259,-0.36582 10.60889,-0.73165c3.23144,-0.30485 6.27997,-0.60971 8.96268,-0.60971c0.67068,0 1.28038,0 1.82912,0.06097c1.46329,0.12194 2.98756,0.30485 4.45085,0.42679c2.19494,0.24388 4.38988,0.54874 6.6458,0.54874c0.54874,0 1.09747,0 1.58524,0c3.96309,0 7.92618,-0.18291 11.76733,-0.36582c3.17047,-0.12194 6.46288,-0.30485 9.69433,-0.36582c5.48735,-0.06097 11.09665,-0.36582 16.46206,-0.60971c2.25591,-0.12194 4.45085,-0.24388 6.70677,-0.30485c4.38988,-0.18291 8.84074,-0.18291 13.16965,-0.18291c3.1095,0 6.40191,0 9.57238,-0.06097c6.6458,-0.18291 13.35256,-0.54874 19.87642,-0.97553c6.88968,-0.42679 14.02324,-0.85359 21.09583,-0.97553c1.76815,-0.06097 3.5363,-0.06097 5.24347,-0.06097c3.84115,-0.06097 7.86521,-0.06097 11.76733,-0.30485c2.31688,-0.12194 4.63377,-0.36582 6.88968,-0.54874c3.78018,-0.30485 7.74327,-0.67068 11.52344,-0.67068l0,0m0,-1.21941c-6.15803,0 -12.31606,0.85359 -18.47409,1.21941c-5.67027,0.30485 -11.34053,0.24388 -16.94983,0.36582c-13.65742,0.24388 -27.25386,1.58524 -40.97225,1.95106c-7.62133,0.18291 -15.18168,-0.06097 -22.80301,0.30485c-7.74327,0.30485 -15.42556,0.79262 -23.16883,0.91456c-7.13356,0.12194 -14.26712,0.73165 -21.46165,0.73165c-0.54874,0 -1.0365,0 -1.58524,0c-3.71921,-0.06097 -7.37744,-0.73165 -11.03568,-1.0365c-0.60971,-0.06097 -1.21941,-0.06097 -1.89009,-0.06097c-5.6093,0 -13.04771,1.34135 -19.51059,1.34135c-3.23144,0 -6.27997,-0.30485 -8.7188,-1.34135l-2.49979,-1.09747c-0.91456,0 -1.52427,0.60971 -1.52427,0.60971c-1.21941,4.26794 -0.60971,8.53588 -0.60971,12.80383c0.60971,12.19412 1.82912,23.77854 0.60971,35.97266c-0.60971,9.7553 -1.82912,19.51059 -3.04853,29.26589c-0.60971,4.26794 0.60971,9.14559 1.21941,13.41353c0.60971,6.09706 -2.43882,12.19412 -0.12194,17.80342c0.30485,0.73165 0.97553,2.80465 1.64621,3.29241c2.31688,-1.70718 3.65824,-6.15803 5.30444,-8.7188c2.13397,-3.29241 4.75571,-6.46288 7.2555,-9.3285c5.24347,-5.97512 10.66986,-11.8283 16.21818,-17.43759c2.49979,-2.49979 4.69474,-5.06056 7.92618,-6.58483c0.12194,1.34135 1.0365,2.43882 2.13397,3.1095c0.24388,0.12194 2.98756,2.073 3.29241,3.17047c0.60971,2.19494 10.42597,8.35297 12.25509,10.24306c2.37785,2.37785 4.32891,5.12153 6.34094,7.74327c4.38988,5.67027 9.14559,10.54791 14.57197,15.24265c12.98674,11.27956 27.07095,21.40068 39.08216,33.77771c3.90212,4.02406 6.6458,8.47491 11.09665,11.88927c2.31688,1.82912 6.6458,5.48735 9.51141,5.67027c-0.12194,-1.40232 0.36582,-2.74368 1.15844,-3.90212c4.32891,-6.34094 13.65742,-12.92577 21.09583,-14.08421c3.65824,-0.54874 7.49938,-1.09747 11.27956,-1.09747c0.30485,0 0.60971,0 0.97553,0c4.81668,0.12194 6.95065,2.80465 10.97471,4.32891c4.26794,1.58524 9.69433,6.03609 12.98674,9.38947c2.74368,2.80465 5.85318,5.67027 8.17006,8.65783c0.97553,1.28038 4.63377,7.56035 6.52385,7.56035c0,0 0.06097,0 0.06097,0c2.74368,-0.18291 2.073,-8.41394 1.46329,-10.12112l-0.42679,-10.48694c0.18291,-11.52344 -0.42679,-23.10786 -1.64621,-34.69227c-0.60971,-7.92618 1.21941,-15.85236 0.60971,-24.02242l0,-4.69474c-0.60971,-13.35256 -1.21941,-27.3758 -0.60971,-40.78933c1.21941,-12.80383 3.04853,-24.99795 3.04853,-37.80177c0,-2.43882 0,-4.87765 -0.12194,-7.19453c-0.06097,-1.58524 0.12194,-3.84115 1.52427,-4.87765c-1.09747,0.24388 -2.25591,0.30485 -3.41435,0.30485c-4.5728,0 -9.26753,-1.46329 -13.65742,-1.76815c-1.34135,0.12194 -2.68271,0.06097 -4.08503,0.06097l0,0l0.00003,0zm22.80301,1.09747c-0.67068,0 -1.21941,0.18291 -1.64621,0.48776c0.60971,-0.12194 1.21941,-0.30485 1.82912,-0.48776c-0.06097,0 -0.12194,0 -0.18291,0l0,0z' id='svg_4'/%3E%3Cpath class='st3' d='m235.75674,146.69126c-3.1095,3.41435 -4.38988,9.81627 -4.81668,14.20615c-0.60971,6.03609 -1.46329,10.97471 2.74368,15.66945c4.63377,5.12153 12.55994,9.87724 19.20574,11.64539c3.47532,0.97553 7.49938,-0.73165 10.7918,-1.40232c7.92618,-1.70718 11.95024,-6.52385 15.42556,-13.9013c4.20697,-8.77977 0.67068,-15.73042 -2.86562,-23.96145c-3.84115,-8.90171 -15.5475,-12.92577 -24.81504,-11.70636c-3.78018,0.48776 -5.91415,2.80465 -8.90171,4.87765c-1.64621,1.15844 -6.52385,2.80465 -6.76774,4.5728l0.00001,-0.00001z' id='svg_5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E",width:r,height:o,alt:l},i))};Le.propTypes={width:S.a.number,height:S.a.number,className:S.a.string,product:S.a.object,alt:S.a.string},Le.defaultProps={width:33,height:33,className:""};var Ue=Le,Be={name:"products",className:"woocommerce-search__product-result",options:function(e){var t=e?{search:e,per_page:10,orderby:"popularity"}:{};return _e()({path:Object(Oe.addQueryArgs)("/wc-analytics/products",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.id},getOptionKeywords:function(e){return[e.name,e.sku]},getFreeTextOptions:function(e){return[{key:"title",label:Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},D()({mixedString:Object(O.__)("All products with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=ke(e.name,t)||{};return Object(v.createElement)(v.Fragment,null,Object(v.createElement)(Ue,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch))},getOptionCompletion:function(e){return{key:e.id,label:e.name}}},He={name:"taxes",className:"woocommerce-search__tax-result",options:function(e){var t=e?{code:e,per_page:10}:{};return _e()({path:Object(Oe.addQueryArgs)("/wc-analytics/taxes",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.id},getOptionKeywords:function(e){return[e.id,Se(e)]},getFreeTextOptions:function(e){return[{key:"code",label:Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},D()({mixedString:Object(O.__)("All taxes with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=ke(Se(e),t)||{};return Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)},getOptionCompletion:function(e){return{key:e.id,label:Se(e)}}},qe={name:"usernames",className:"woocommerce-search__usernames-result",options:function(e){var t=e?{search:e,searchby:"username",per_page:10}:{};return _e()({path:Object(Oe.addQueryArgs)("/wc-analytics/customers",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.id},getOptionKeywords:function(e){return[e.username]},getOptionLabel:function(e,t){var n=ke(e.username,t)||{};return Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.username},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)},getOptionCompletion:function(e){return{key:e.id,label:e.username}}};function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t-1)return n;var o=t.map((function(e){return e.option})).join(", ");return o?n+r+o:n}var Ge={name:"variations",className:"woocommerce-search__product-result",options:function(e){var t=e?{search:e,per_page:30,_fields:["attributes","description","id","name","sku"]}:{},n=Object(P.i)().products;return n?(n.includes(",")&&console.warn("Invalid product id supplied to Variations autocompleter"),_e()({path:Object(Oe.addQueryArgs)("/wc-analytics/products/".concat(n,"/variations"),t)})):_e()({path:Object(Oe.addQueryArgs)("/wc-analytics/variations",t)})},isDebounced:!0,getOptionIdentifier:function(e){return e.id},getOptionKeywords:function(e){return[We(e),e.sku]},getOptionLabel:function(e,t){var n=ke(We(e),t)||{};return Object(v.createElement)(v.Fragment,null,Object(v.createElement)(Ue,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(v.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.description},n.suggestionBeforeMatch,Object(v.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch))},getOptionCompletion:function(e){return{key:e.id,label:We(e)}}};var Ye=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state={options:[]},t.appendFreeTextSearch=t.appendFreeTextSearch.bind(f()(t)),t.fetchOptions=t.fetchOptions.bind(f()(t)),t.updateSelected=t.updateSelected.bind(f()(t)),t}return u()(o,[{key:"getAutocompleter",value:function(){switch(this.props.type){case"attributes":return je;case"categories":return Ee;case"countries":return Te;case"coupons":return Me;case"customers":return Re;case"downloadIps":return Ie;case"emails":return Ae;case"orders":return Ne;case"products":return Be;case"taxes":return He;case"usernames":return qe;case"variableProducts":return Ke;case"variations":return Ge;case"custom":if(!this.props.autocompleter||"object"!==$()(this.props.autocompleter))throw new Error("Invalid autocompleter provided to Search component, it requires a completer object when using 'custom' type.");return this.props.autocompleter;default:return{}}}},{key:"getFormattedOptions",value:function(e,t){var n=this.getAutocompleter(),r=[];return e.forEach((function(e){var o={key:n.getOptionIdentifier(e),label:n.getOptionLabel(e,t),keywords:n.getOptionKeywords(e).filter(Boolean),value:e};r.push(o)})),r}},{key:"fetchOptions",value:function(e,t){var n=this;if(!t)return[];var r=this.getAutocompleter().options;return Promise.resolve("function"==typeof r?r(t):r||[]).then(function(){var e=G()(J.a.mark((function e(r){var o;return J.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.getFormattedOptions(r,t),n.setState({options:o}),e.abrupt("return",o);case 3:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}())}},{key:"updateSelected",value:function(e){var t=this.props.onChange,n=this.getAutocompleter();t(e.map((function(e){return e.value?n.getOptionCompletion(e.value):e})))}},{key:"appendFreeTextSearch",value:function(e,t){var n=this.props.allowFreeTextSearch;if(!t||!t.length)return[];if(!n)return e;var r=this.getAutocompleter();return[].concat(i()(r.getFreeTextOptions(t)),i()(e))}},{key:"render",value:function(){var e=this.getAutocompleter(),t=this.props,n=t.className,r=t.inlineTags,o=t.placeholder,a=t.selected,i=t.showClearButton,c=t.staticResults,s=t.disabled,l=t.multiple,u=this.state.options,d=e.inputType?e.inputType:"text";return Object(v.createElement)("div",null,Object(v.createElement)(ve,{className:q()("woocommerce-search",n,{"is-static-results":c}),disabled:s,hideBeforeSearch:!0,inlineTags:r,isSearchable:!0,getSearchExpression:e.getSearchExpression,multiple:l,placeholder:o,onChange:this.updateSelected,onFilter:this.appendFreeTextSearch,onSearch:this.fetchOptions,options:u,searchDebounceTime:500,searchInputType:d,selected:a,showClearButton:i}))}}]),o}(v.Component);Ye.propTypes={allowFreeTextSearch:S.a.bool,className:S.a.string,onChange:S.a.func,type:S.a.oneOf(["attributes","categories","countries","coupons","customers","downloadIps","emails","orders","products","taxes","usernames","variableProducts","variations","custom"]).isRequired,autocompleter:S.a.object,placeholder:S.a.string,selected:S.a.oneOfType([S.a.string,S.a.arrayOf(S.a.shape({key:S.a.oneOfType([S.a.number,S.a.string]).isRequired,label:S.a.string}))]),inlineTags:S.a.bool,showClearButton:S.a.bool,staticResults:S.a.bool,disabled:S.a.bool},Ye.defaultProps={allowFreeTextSearch:!1,onChange:_.noop,selected:[],inlineTags:!1,showClearButton:!1,staticResults:!1,disabled:!1,multiple:!0};var $e=Ye;function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t0?o:null})}},{key:"render",value:function(){var e=this,t=this.props,n=t.date,r=t.disabled,o=t.text,a=t.dateFormat,i=t.error,c=t.isInvalidDate;return Object(v.createElement)(w.Dropdown,{position:"bottom center",focusOnMount:!1,renderToggle:function(t){var n=t.isOpen,c=t.onToggle;return Object(v.createElement)(dt,{disabled:r,value:o,onChange:e.onInputChange,dateFormat:a,label:Object(O.__)("Choose a date","woocommerce-admin"),error:i,describedBy:Object(O.sprintf)(Object(O.__)("Date input describing a selected date in format %s","woocommerce-admin"),a),onFocus:Object(_.partial)(e.handleFocus,n,c),"aria-expanded":n,focusOnMount:!1,onKeyDown:Object(_.partial)(e.handleKeyDown,n,c),errorPosition:"top center"})},renderContent:function(t){var r=t.onToggle;return Object(v.createElement)(ht,{component:!1},Object(v.createElement)(pt,{className:"woocommerce-calendar__date-picker-title"},Object(O.__)("select a date","woocommerce-admin")),Object(v.createElement)("div",{className:"woocommerce-calendar__react-dates is-core-datepicker"},Object(v.createElement)(w.DatePicker,{currentDate:n,onChange:Object(_.partial)(e.onDateChange,r),isInvalidDate:c})))}})}}]),o}(v.Component);mt.propTypes={date:S.a.object,disabled:S.a.bool,text:S.a.string,error:S.a.string,onUpdate:S.a.func.isRequired,dateFormat:S.a.string.isRequired,isInvalidDate:S.a.func};var yt=mt;var bt=Object(O.__)("MMM D, YYYY","woocommerce-admin"),gt=Object(O.__)("MM/DD/YYYY","woocommerce-admin"),vt=function(e){h()(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function a(e){var t,n=e.filter;s()(this,a),t=r.apply(this,arguments);var o=Array.isArray(n.value)?n.value:[null,n.value],i=tt()(o,2),c=i[0],l=i[1],u=c?Object(ct.i)(ct.f,c):null,d=l?Object(ct.i)(ct.f,l):null;return t.state={before:d,beforeText:d?d.format(gt):"",beforeError:null,after:u,afterText:u?u.format(gt):"",afterError:null},t.onSingleDateChange=t.onSingleDateChange.bind(f()(t)),t.onRangeDateChange=t.onRangeDateChange.bind(f()(t)),t}return u()(a,[{key:"getBetweenString",value:function(){return Object(O._x)("{{after /}}{{span}} and {{/span}}{{before /}}","Date range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var n=Object(_.find)(t.rules,{value:e.rule})||{},r=this.state,o=r.before,a=r.after;if(!o||"between"===n.value&&!a)return"";var i=o.format(bt);return"between"===n.value&&(i=D()({mixedString:this.getBetweenString(),components:{after:Object(v.createElement)(v.Fragment,null,a.format(bt)),before:Object(v.createElement)(v.Fragment,null,o.format(bt)),span:Object(v.createElement)(v.Fragment,null)}})),z(D()({mixedString:t.labels.title,components:{filter:Object(v.createElement)(v.Fragment,null,i),rule:Object(v.createElement)(v.Fragment,null,n.label),title:Object(v.createElement)(v.Fragment,null)}}))}},{key:"onSingleDateChange",value:function(e){var t=e.date,n=e.text,r=e.error,o=this.props.onFilterChange;this.setState({before:t,beforeText:n,beforeError:r}),t&&o("value",t.format(ct.f))}},{key:"onRangeDateChange",value:function(e,t){var n,r=t.date,a=t.text,i=t.error,c=this.props.onFilterChange;if(this.setState((n={},o()(n,e,r),o()(n,e+"Text",a),o()(n,e+"Error",i),n)),r){var s=this.state,l=s.before,u=s.after,d=null,f=null;"after"===e&&(d=r.format(ct.f),f=l?l.format(ct.f):null),"before"===e&&(d=u?u.format(ct.f):null,f=r.format(ct.f)),d&&f&&c("value",[d,f])}}},{key:"isFutureDate",value:function(e){return lt()().isBefore(lt()(e),"day")}},{key:"getFormControl",value:function(e){var t=e.date,n=e.error,r=e.onUpdate,o=e.text;return Object(v.createElement)(yt,{date:t,dateFormat:gt,error:n,isInvalidDate:this.isFutureDate,onUpdate:r,text:o})}},{key:"getRangeInput",value:function(){var e=this.state,t=e.before,n=e.beforeText,r=e.beforeError,o=e.after,a=e.afterText,i=e.afterError;return D()({mixedString:this.getBetweenString(),components:{after:this.getFormControl({date:o,error:i,onUpdate:Object(_.partial)(this.onRangeDateChange,"after"),text:a}),before:this.getFormControl({date:t,error:r,onUpdate:Object(_.partial)(this.onRangeDateChange,"before"),text:n}),span:Object(v.createElement)("span",{className:"separator"})}})}},{key:"getFilterInputs",value:function(){var e=this.props.filter,t=this.state,n=t.before,r=t.beforeText,o=t.beforeError;return"between"===e.rule?this.getRangeInput():this.getFormControl({date:n,error:o,onUpdate:this.onSingleDateChange,text:r})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.config,r=e.filter,o=e.isEnglish,a=e.onFilterChange,i=r.rule,c=n.labels,s=n.rules,l=this.getScreenReaderText(r,n),u=D()({mixedString:c.title,components:{title:Object(v.createElement)("span",{className:t}),rule:Object(v.createElement)(w.SelectControl,{className:q()(t,"woocommerce-filters-advanced__rule"),options:s,value:i,onChange:Object(_.partial)(a,"rule"),"aria-label":c.rule}),filter:Object(v.createElement)("div",{className:q()(t,"woocommerce-filters-advanced__input-range",{"is-between":"between"===i})},this.getFilterInputs())}});return Object(v.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(v.createElement)("legend",{className:"screen-reader-text"},c.add||""),Object(v.createElement)("div",{className:q()("woocommerce-filters-advanced__fieldset",{"is-english":o})},u),l&&Object(v.createElement)("span",{className:"screen-reader-text"},l))}}]),a}(v.Component),Ot=function(e){var t=e.className,n=e.config,r=e.filter,o=e.isEnglish,a=e.onFilterChange,i=r.rule,c=r.value,s=n.labels,l=n.rules,u=Object(v.useState)([]),d=tt()(u,2),f=d[0],p=d[1];Object(v.useEffect)((function(){!f.length&&Array.isArray(c)&&c[0]&&_e()({path:"/wc-analytics/products/attributes/".concat(c[0])}).then((function(e){var t=e.id,n=e.name;return[{key:t.toString(),label:n}]})).then(p)}),[c,f]);var h=Object(v.useState)([]),m=tt()(h,2),y=m[0],b=m[1];Object(v.useEffect)((function(){f.length&&(b(!1),_e()({path:"/wc-analytics/products/attributes/".concat(f[0].key,"/terms?per_page=100")}).then((function(e){return e.map((function(e){var t=e.id,n=e.name;return{key:t.toString(),label:n}}))})).then(b))}),[f]);var g=Object(v.useState)(Array.isArray(c)&&c[1]||""),k=tt()(g,2),S=k[0],j=k[1],E=function(e){var t=e.attributeTerms,n=e.config,r=e.filter,o=e.selectedAttribute,a=e.selectedAttributeTerm;if(!t||0===t.length||!o||0===o.length||""===a)return"";var i=Array.isArray(n.rules)&&n.rules.find((function(e){return e.value===r.rule}))||{},c=o[0].label,s=t.find((function(e){return e.key===a})),l=s&&s.label;if(!c||!l)return"";var u=D()({ +/* translators: Sentence fragment describing a product attribute match. Example: "Color Is Not Blue" - attribute = Color, equals = Is Not, value = Blue */ +mixedString:Object(O.__)("{{attribute /}} {{equals /}} {{value /}}","woocommerce-admin"),components:{attribute:Object(v.createElement)(v.Fragment,null,c),equals:Object(v.createElement)(v.Fragment,null,i.label),value:Object(v.createElement)(v.Fragment,null,l)}});return z(D()({mixedString:n.labels.title,components:{filter:Object(v.createElement)(v.Fragment,null,u),rule:Object(v.createElement)(v.Fragment,null),title:Object(v.createElement)(v.Fragment,null)}}))}({attributeTerms:y,config:n,filter:r,selectedAttribute:f,selectedAttributeTerm:S});return Object(v.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(v.createElement)("legend",{className:"screen-reader-text"},s.add||""),Object(v.createElement)("div",{className:q()("woocommerce-filters-advanced__fieldset",{"is-english":o})},D()({mixedString:s.title,components:{title:Object(v.createElement)("span",{className:t}),rule:Object(v.createElement)(w.SelectControl,{className:q()(t,"woocommerce-filters-advanced__rule"),options:l,value:i,onChange:Object(_.partial)(a,"rule"),"aria-label":s.rule}),filter:Object(v.createElement)("div",{className:q()(t,"woocommerce-filters-advanced__attribute-fieldset")},Array.isArray(c)&&c.length&&!f.length?Object(v.createElement)(w.Spinner,null):Object(v.createElement)($e,{className:"woocommerce-filters-advanced__input woocommerce-search",onChange:function(e){var t=tt()(e,1)[0];p(t?[t]:[]),j(""),a("value",[t&&t.key].filter(Boolean))},type:"attributes",placeholder:Object(O.__)("Attribute name","woocommerce-admin"),multiple:!1,selected:f,inlineTags:!0,"aria-label":Object(O.__)("Attribute name","woocommerce-admin")}),f.length>0&&(y.length?Object(v.createElement)(v.Fragment,null,Object(v.createElement)("span",{className:"woocommerce-filters-advanced__attribute-field-separator"},"="),Object(v.createElement)(ve,{className:"woocommerce-filters-advanced__input woocommerce-search",placeholder:Object(O.__)("Attribute value","woocommerce-admin"),inlineTags:!0,isSearchable:!0,multiple:!1,showAllOnFocus:!0,options:y,selected:S,onChange:function(e){"string"!=typeof e&&(e=""),j(e),a("value",[f[0].key,e].filter(Boolean))}})):Object(v.createElement)(w.Spinner,null)))}})),E&&Object(v.createElement)("span",{className:"screen-reader-text"},E))};Ot.propTypes={config:S.a.shape({labels:S.a.shape({rule:S.a.string,title:S.a.string,filter:S.a.string}),rules:S.a.arrayOf(S.a.object),input:S.a.object}).isRequired,filter:S.a.shape({key:S.a.string,rule:S.a.string,value:S.a.arrayOf(S.a.oneOfType([S.a.string,S.a.number]))}).isRequired,onFilterChange:S.a.func.isRequired};var wt=Ot;function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t0&&Object(v.createElement)(w.CardBody,null,Object(v.createElement)("div",{className:"woocommerce-filters-advanced__add-filter"},Object(v.createElement)(w.Dropdown,{className:"woocommerce-filters-advanced__add-filter-dropdown",position:"bottom center",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(v.createElement)(w.Button,{className:"woocommerce-filters-advanced__add-button",onClick:n,"aria-expanded":t},Object(v.createElement)(E.a,null),Object(O.__)("Add a Filter","woocommerce-admin"))},renderContent:function(t){var r=t.onClose;return Object(v.createElement)("ul",{className:"woocommerce-filters-advanced__add-dropdown"},s.map((function(t){return Object(v.createElement)("li",{key:t},Object(v.createElement)(w.Button,{onClick:Object(_.partial)(e.addFilter,t,r)},n.filters[t].labels.add))})))}}))),Object(v.createElement)(w.CardFooter,{align:"center"},Object(v.createElement)("div",{className:"woocommerce-filters-advanced__controls"},u&&Object(v.createElement)(w.Button,{isPrimary:!0,disabled:!0},Object(O.__)("Filter","woocommerce-admin")),!u&&Object(v.createElement)(L,{className:"components-button is-primary is-button",type:"wc-admin",href:l,onClick:this.onFilter},Object(O.__)("Filter","woocommerce-admin")),i.length>0&&Object(v.createElement)(L,{type:"wc-admin",href:this.getUpdateHref([]),onClick:this.clearFilters},Object(O.__)("Clear all filters","woocommerce-admin")))))}}]),a}(v.Component);Dt.propTypes={config:S.a.shape({title:S.a.string,filters:S.a.objectOf(S.a.shape({labels:S.a.shape({add:S.a.string,remove:S.a.string,rule:S.a.string,title:S.a.string,filter:S.a.string}),rules:S.a.arrayOf(S.a.object),input:S.a.object}))}).isRequired,path:S.a.string.isRequired,query:S.a.object,onAdvancedFilterAction:S.a.func,siteLocale:S.a.string,currency:S.a.object.isRequired},Dt.defaultProps={query:{},onAdvancedFilterAction:function(){},siteLocale:"en_US"};var Pt=Dt,xt=n(181),Ft=n(42),Tt=n(69),Mt=n(182),Rt=n(8),It=n.n(Rt),At=It.a.createContext(null);function Nt(e,t){var n=Object.create(null);return e&&Rt.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(Rt.isValidElement)(e)?t(e):e}(e)})),n}function Lt(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Ut(e,t,n){var r=Nt(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var c={};for(var s in t){if(o[s])for(r=0;r1?r[0]+r.slice(2):r,+e.slice(n+1)]}var tn=function(e){return(e=en(Math.abs(e)))?e[1]:NaN},nn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rn(e){if(!(t=nn.exec(e)))throw new Error("invalid format: "+e);var t;return new on({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function on(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}rn.prototype=on.prototype,on.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var an,cn,sn,ln,un=function(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")},dn={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return un(100*e,t)},r:un,s:function(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],o=n[1],a=o-(an=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,i=r.length;return a===i?r:a>i?r+new Array(a-i+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+en(e,Math.max(0,t+a-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},fn=function(e){return e},pn=Array.prototype.map,hn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mn(e){return cn=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?fn:(t=pn.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,a=[],i=0,c=t[0],s=0;o>0&&c>0&&(s+c+1>r&&(c=Math.max(1,r-s)),a.push(e.substring(o-=c,o+c)),!((s+=c+1)>r));)c=t[i=(i+1)%t.length];return a.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",c=void 0===e.numerals?fn:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(pn.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",l=void 0===e.minus?"-":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=rn(e)).fill,n=e.align,d=e.sign,f=e.symbol,p=e.zero,h=e.width,m=e.comma,y=e.precision,b=e.trim,g=e.type;"n"===g?(m=!0,g="g"):dn[g]||(void 0===y&&(y=12),b=!0,g="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var v="$"===f?o:"#"===f&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",O="$"===f?a:/[%p]/.test(g)?s:"",w=dn[g],_=/[defgprs%]/.test(g);function k(e){var o,a,s,f=v,k=O;if("c"===g)k=w(e)+k,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),y),b&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==d&&(S=!1),f=(S?"("===d?d:l:"-"===d||"("===d?"":d)+f,k=("s"===g?hn[8+an/3]:"")+k+(S&&"("===d?")":""),_)for(o=-1,a=e.length;++o(s=e.charCodeAt(o))||s>57){k=(46===s?i+e.slice(o+1):e.slice(o))+k,e=e.slice(0,o);break}}m&&!p&&(e=r(e,1/0));var j=f.length+e.length+k.length,E=j>1)+f+e+k+E.slice(j);break;default:e=E+f+e+k}return c(e)}return y=void 0===y?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return e+""},k}return{format:d,formatPrefix:function(e,t){var n=d(((e=rn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(tn(t)/3))),o=Math.pow(10,-r),a=hn[8+r/3];return function(e){return n(o*e)+a}}}}(e),sn=cn.format,ln=cn.formatPrefix,cn}mn({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var yn=n(508),bn=n.n(yn),gn=n(509),vn=n.n(gn),On=function(e){for(var t=e.length/6|0,n=new Array(t),r=0;r0))return c;do{c.push(i=new Date(+n)),t(n,a),e(n)}while(i=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return xn.setTime(+t),Fn.setTime(+r),e(xn),e(Fn),Math.floor(n(xn,Fn))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}function Mn(e){return Tn((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var Rn=Mn(0),In=Mn(1),An=Mn(2),Nn=Mn(3),Ln=Mn(4),Un=Mn(5),Bn=Mn(6),Hn=(Rn.range,In.range,An.range,Nn.range,Ln.range,Un.range,Bn.range,Tn((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}))),qn=Hn;function zn(e){return Tn((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}Hn.range;var Vn=zn(0),Kn=zn(1),Wn=zn(2),Gn=zn(3),Yn=zn(4),$n=zn(5),Qn=zn(6),Jn=(Vn.range,Kn.range,Wn.range,Gn.range,Yn.range,$n.range,Qn.range,Tn((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}))),Zn=Jn,Xn=(Jn.range,Tn((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()})));Xn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Tn((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var er=Xn,tr=(Xn.range,Tn((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()})));tr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Tn((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var nr=tr;function rr(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function or(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ar(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}tr.range;var ir,cr,sr,lr={"-":"",_:" ",0:"0"},ur=/^\s*\d+/,dr=/^%/,fr=/[\\^$*+?|[\]().{}]/g;function pr(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",a=o.length;return r+(a68?1900:2e3),n+r[0].length):-1}function Sr(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jr(e,t,n){var r=ur.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Er(e,t,n){var r=ur.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Cr(e,t,n){var r=ur.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Dr(e,t,n){var r=ur.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Pr(e,t,n){var r=ur.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function xr(e,t,n){var r=ur.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Fr(e,t,n){var r=ur.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Tr(e,t,n){var r=ur.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Mr(e,t,n){var r=ur.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Rr(e,t,n){var r=dr.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ir(e,t,n){var r=ur.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ar(e,t,n){var r=ur.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Nr(e,t){return pr(e.getDate(),t,2)}function Lr(e,t){return pr(e.getHours(),t,2)}function Ur(e,t){return pr(e.getHours()%12||12,t,2)}function Br(e,t){return pr(1+Zn.count(er(e),e),t,3)}function Hr(e,t){return pr(e.getMilliseconds(),t,3)}function qr(e,t){return Hr(e,t)+"000"}function zr(e,t){return pr(e.getMonth()+1,t,2)}function Vr(e,t){return pr(e.getMinutes(),t,2)}function Kr(e,t){return pr(e.getSeconds(),t,2)}function Wr(e){var t=e.getDay();return 0===t?7:t}function Gr(e,t){return pr(Vn.count(er(e)-1,e),t,2)}function Yr(e){var t=e.getDay();return t>=4||0===t?Yn(e):Yn.ceil(e)}function $r(e,t){return e=Yr(e),pr(Yn.count(er(e),e)+(4===er(e).getDay()),t,2)}function Qr(e){return e.getDay()}function Jr(e,t){return pr(Kn.count(er(e)-1,e),t,2)}function Zr(e,t){return pr(e.getFullYear()%100,t,2)}function Xr(e,t){return pr((e=Yr(e)).getFullYear()%100,t,2)}function eo(e,t){return pr(e.getFullYear()%1e4,t,4)}function to(e,t){var n=e.getDay();return pr((e=n>=4||0===n?Yn(e):Yn.ceil(e)).getFullYear()%1e4,t,4)}function no(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+pr(t/60|0,"0",2)+pr(t%60,"0",2)}function ro(e,t){return pr(e.getUTCDate(),t,2)}function oo(e,t){return pr(e.getUTCHours(),t,2)}function ao(e,t){return pr(e.getUTCHours()%12||12,t,2)}function io(e,t){return pr(1+qn.count(nr(e),e),t,3)}function co(e,t){return pr(e.getUTCMilliseconds(),t,3)}function so(e,t){return co(e,t)+"000"}function lo(e,t){return pr(e.getUTCMonth()+1,t,2)}function uo(e,t){return pr(e.getUTCMinutes(),t,2)}function fo(e,t){return pr(e.getUTCSeconds(),t,2)}function po(e){var t=e.getUTCDay();return 0===t?7:t}function ho(e,t){return pr(Rn.count(nr(e)-1,e),t,2)}function mo(e){var t=e.getUTCDay();return t>=4||0===t?Ln(e):Ln.ceil(e)}function yo(e,t){return e=mo(e),pr(Ln.count(nr(e),e)+(4===nr(e).getUTCDay()),t,2)}function bo(e){return e.getUTCDay()}function go(e,t){return pr(In.count(nr(e)-1,e),t,2)}function vo(e,t){return pr(e.getUTCFullYear()%100,t,2)}function Oo(e,t){return pr((e=mo(e)).getUTCFullYear()%100,t,2)}function wo(e,t){return pr(e.getUTCFullYear()%1e4,t,4)}function _o(e,t){var n=e.getUTCDay();return pr((e=n>=4||0===n?Ln(e):Ln.ceil(e)).getUTCFullYear()%1e4,t,4)}function ko(){return"+0000"}function So(){return"%"}function jo(e){return+e}function Eo(e){return Math.floor(+e/1e3)}function Co(){}ir=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,a=e.days,i=e.shortDays,c=e.months,s=e.shortMonths,l=mr(o),u=yr(o),d=mr(a),f=yr(a),p=mr(i),h=yr(i),m=mr(c),y=yr(c),b=mr(s),g=yr(s),v={a:function(e){return i[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return c[e.getMonth()]},c:null,d:Nr,e:Nr,f:qr,g:Xr,G:to,H:Lr,I:Ur,j:Br,L:Hr,m:zr,M:Vr,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:jo,s:Eo,S:Kr,u:Wr,U:Gr,V:$r,w:Qr,W:Jr,x:null,X:null,y:Zr,Y:eo,Z:no,"%":So},O={a:function(e){return i[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return s[e.getUTCMonth()]},B:function(e){return c[e.getUTCMonth()]},c:null,d:ro,e:ro,f:so,g:Oo,G:_o,H:oo,I:ao,j:io,L:co,m:lo,M:uo,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:jo,s:Eo,S:fo,u:po,U:ho,V:yo,w:bo,W:go,x:null,X:null,y:vo,Y:wo,Z:ko,"%":So},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=b.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:Cr,e:Cr,f:Mr,g:kr,G:_r,H:Pr,I:Pr,j:Dr,L:Tr,m:Er,M:xr,p:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:jr,Q:Ir,s:Ar,S:Fr,u:gr,U:vr,V:Or,w:br,W:wr,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:kr,Y:_r,Z:Sr,"%":Rr};function _(e,t){return function(n){var r,o,a,i=[],c=-1,s=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++c53)return null;"w"in a||(a.w=1),"Z"in a?(o=(r=or(ar(a.y,0,1))).getUTCDay(),r=o>4||0===o?In.ceil(r):In(r),r=qn.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(o=(r=rr(ar(a.y,0,1))).getDay(),r=o>4||0===o?Kn.ceil(r):Kn(r),r=Zn.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),o="Z"in a?or(ar(a.y,0,1)).getUTCDay():rr(ar(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(o+5)%7:a.w+7*a.U-(o+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,or(a)):rr(a)}}function S(e,t,n,r){for(var o,a,i=0,c=t.length,s=n.length;i=s)return-1;if(37===(o=t.charCodeAt(i++))){if(o=t.charAt(i++),!(a=w[o in lr?t.charAt(i++):o])||(r=a(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return v.x=_(n,v),v.X=_(r,v),v.c=_(t,v),O.x=_(n,O),O.X=_(r,O),O.c=_(t,O),{format:function(e){var t=_(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=_(e+="",O);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),cr=ir.format,ir.parse,ir.utcFormat,sr=ir.utcParse;var Do=function(e){return null==e?Co:function(){return this.querySelector(e)}};function Po(){return[]}var xo=function(e){return new Array(e.length)};function Fo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function To(e,t,n,r,o,a){for(var i,c=0,s=t.length,l=a.length;ct?1:e>=t?0:NaN}Fo.prototype={constructor:Fo,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var Io="http://www.w3.org/1999/xhtml",Ao={svg:"http://www.w3.org/2000/svg",xhtml:Io,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},No=function(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ao.hasOwnProperty(t)?{space:Ao[t],local:e}:e};function Lo(e){return function(){this.removeAttribute(e)}}function Uo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Bo(e,t){return function(){this.setAttribute(e,t)}}function Ho(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function qo(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function zo(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var Vo=function(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView};function Ko(e){return function(){this.style.removeProperty(e)}}function Wo(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Go(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Yo(e,t){return e.style.getPropertyValue(t)||Vo(e).getComputedStyle(e,null).getPropertyValue(t)}function $o(e){return function(){delete this[e]}}function Qo(e,t){return function(){this[e]=t}}function Jo(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Zo(e){return e.trim().split(/^|\s+/)}function Xo(e){return e.classList||new ea(e)}function ea(e){this._node=e,this._names=Zo(e.getAttribute("class")||"")}function ta(e,t){for(var n=Xo(e),r=-1,o=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var ya=function(e){var t=No(e);return(t.local?ma:ha)(t)};function ba(){return null}function ga(){var e=this.parentNode;e&&e.removeChild(this)}function va(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Oa(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}var wa={},_a=null;function ka(e,t,n){return e=Sa(e,t,n),function(t){var n=t.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||e.call(this,t)}}function Sa(e,t,n){return function(r){var o=_a;_a=r;try{e.call(this,this.__data__,t,n)}finally{_a=o}}}function ja(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function Ea(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,a=t.length;r=w&&(w=O+1);!(v=b[w])&&++w=0;)(r=o[a])&&(i&&4^r.compareDocumentPosition(i)&&i.parentNode.insertBefore(r,i),i=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Ro);for(var n=this._groups,r=n.length,o=new Array(r),a=0;a1?this.each((null==t?Ko:"function"==typeof t?Go:Wo)(e,t,null==n?"":n)):Yo(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?$o:"function"==typeof t?Jo:Qo)(e,t)):this.node()[e]},classed:function(e,t){var n=Zo(e+"");if(arguments.length<2){for(var r=Xo(this.node()),o=-1,a=n.length;++o1&&void 0!==arguments[1]?arguments[1]:sn;return"function"==typeof e?e:t(e)},Aa=function(e){var t=new Set(e.reduce((function(e,t){return e.concat(Object.keys(t))}),[]));return i()(t).filter((function(e){return"date"!==e}))},Na=function(e,t){return et?1:e>=t?0:NaN},La=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return Na(t(e),n)}),{left:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r>>1;e(t[a],n)<0?r=a+1:o=a}return r},right:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r>>1;e(t[a],n)>0?o=a:r=a+1}return r}}},Ua=La(Na),Ba=Ua.right,Ha=(Ua.left,Ba),qa=Array.prototype,za=(qa.slice,qa.map,function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(o);++r=0?(a>=Va?10:a>=Ka?5:a>=Wa?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(a>=Va?10:a>=Ka?5:a>=Wa?2:1)}function Ya(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/o;return a>=Va?o*=10:a>=Ka?o*=5:a>=Wa&&(o*=2),t>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ji(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ji(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=hi.exec(e))?new Di(t[1],t[2],t[3],1):(t=mi.exec(e))?new Di(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=yi.exec(e))?ji(t[1],t[2],t[3],t[4]):(t=bi.exec(e))?ji(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=gi.exec(e))?Ti(t[1],t[2]/100,t[3]/100,1):(t=vi.exec(e))?Ti(t[1],t[2]/100,t[3]/100,t[4]):Oi.hasOwnProperty(e)?Si(Oi[e]):"transparent"===e?new Di(NaN,NaN,NaN,0):null}function Si(e){return new Di(e>>16&255,e>>8&255,255&e,1)}function ji(e,t,n,r){return r<=0&&(e=t=n=NaN),new Di(e,t,n,r)}function Ei(e){return e instanceof li||(e=ki(e)),e?new Di((e=e.rgb()).r,e.g,e.b,e.opacity):new Di}function Ci(e,t,n,r){return 1===arguments.length?Ei(e):new Di(e,t,n,null==r?1:r)}function Di(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Pi(){return"#"+Fi(this.r)+Fi(this.g)+Fi(this.b)}function xi(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Fi(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ti(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ri(e,t,n,r)}function Mi(e){if(e instanceof Ri)return new Ri(e.h,e.s,e.l,e.opacity);if(e instanceof li||(e=ki(e)),!e)return new Ri;if(e instanceof Ri)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,c=a-o,s=(a+o)/2;return c?(i=t===a?(n-r)/c+6*(n0&&s<1?0:i,new Ri(i,c,s,e.opacity)}function Ri(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ii(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Ai(e,t,n,r,o){var a=e*e,i=a*e;return((1-3*e+3*a-i)*t+(4-6*a+3*i)*n+(1+3*e+3*a-3*i)*r+i*o)/6}ci(li,ki,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:wi,formatHex:wi,formatHsl:function(){return Mi(this).formatHsl()},formatRgb:_i,toString:_i}),ci(Di,Ci,si(li,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Di(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Di(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Pi,formatHex:Pi,formatRgb:xi,toString:xi})),ci(Ri,(function(e,t,n,r){return 1===arguments.length?Mi(e):new Ri(e,t,n,null==r?1:r)}),si(li,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Ri(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ri(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Di(Ii(e>=240?e-240:e+120,o,r),Ii(e,o,r),Ii(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Ni=function(e){return function(){return e}};function Li(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Ni(isNaN(e)?t:e)}var Ui=function e(t){var n=function(e){return 1==(e=+e)?Li:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Ni(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Ci(e)).r,(t=Ci(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=Li(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function Bi(e){return function(t){var n,r,o=t.length,a=new Array(o),i=new Array(o),c=new Array(o);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),o=e[r],a=e[r+1],i=r>0?e[r-1]:2*o-a,c=ra&&(o=t.slice(a,o),c[i]?c[i]+=o:c[++i]=o),(n=n[0])===(r=r[0])?c[i]?c[i]+=r:c[++i]=r:(c[++i]=null,s.push({i:i,x:Vi(n,r)})),a=Gi.lastIndex;return ar&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nc(e,t,n){var r=e[0],o=e[1],a=t[0],i=t[1];return o2?rc:nc,o=a=null,d}function d(t){return isNaN(t=+t)?n:(o||(o=r(i.map(e),c,s)))(e(l(t)))}return d.invert=function(n){return l(t((a||(a=r(c,i.map(e),Vi)))(n)))},d.domain=function(e){return arguments.length?(i=ni.call(e,Ji),l===Xi||(l=tc(i)),u()):i.slice()},d.range=function(e){return arguments.length?(c=ri.call(e),u()):c.slice()},d.rangeRound=function(e){return c=ri.call(e),s=Qi,u()},d.clamp=function(e){return arguments.length?(l=e?tc(i):Xi,d):l!==Xi},d.interpolate=function(e){return arguments.length?(s=e,u()):s},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function ic(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,o,a,i,c=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t0)for(e=Math.ceil(e/i),t=Math.floor(t/i),a=new Array(o=Math.ceil(t-e+1));++c0?r=Ga(c=Math.floor(c/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=Ga(c=Math.ceil(c*r)/r,s=Math.floor(s*r)/r,n)),r>0?(o[a]=Math.floor(c/r)*r,o[i]=Math.ceil(s/r)*r,t(o)):r<0&&(o[a]=Math.ceil(c*r)/r,o[i]=Math.floor(s*r)/r,t(o)),e},e}var cc=Tn((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),sc=cc,lc=(cc.range,Tn((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}))),uc=lc,dc=(lc.range,Tn((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()}))),fc=dc,pc=(dc.range,Tn((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}))),hc=pc,mc=(pc.range,Tn((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e})));mc.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Tn((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):mc:null};var yc=mc;function bc(e){return new Date(e)}function gc(e){return e instanceof Date?+e:+new Date(+e)}function vc(e,t,n,r,o,a,i,c,s){var l=ac(Xi,Xi),u=l.invert,d=l.domain,f=s(".%L"),p=s(":%S"),h=s("%I:%M"),m=s("%I %p"),y=s("%a %d"),b=s("%b %d"),g=s("%B"),v=s("%Y"),O=[[i,1,1e3],[i,5,5e3],[i,15,15e3],[i,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,36e5],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function w(c){return(i(c)2&&void 0!==arguments[2]&&arguments[2];return ii().domain(e.filter((function(e){return e.visible})).map((function(e){return e.key}))).rangeRound([0,t.bandwidth()]).padding(n?0:.07)},wc=function(e,t){return function(){return $a.apply(vc(er,sc,Vn,Zn,uc,fc,hc,yc,cr).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}().domain([lt()(e[0],"YYYY-MM-DD HH:mm").toDate(),lt()(e[e.length-1],"YYYY-MM-DD HH:mm").toDate()]).rangeRound([0,t])},_c=Array.prototype.slice,kc=function(e){return e};function Sc(e){return"translate("+(e+.5)+",0)"}function jc(e){return"translate(0,"+(e+.5)+")"}function Ec(e){return function(t){return+e(t)}}function Cc(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(n){return+e(n)+t}}function Dc(){return!this.__axis}function Pc(e,t){var n=[],r=null,o=null,a=6,i=6,c=3,s=1===e||4===e?-1:1,l=4===e||2===e?"x":"y",u=1===e||3===e?Sc:jc;function d(d){var f=null==r?t.ticks?t.ticks.apply(t,n):t.domain():r,p=null==o?t.tickFormat?t.tickFormat.apply(t,n):kc:o,h=Math.max(a,0)+c,m=t.range(),y=+m[0]+.5,b=+m[m.length-1]+.5,g=(t.bandwidth?Cc:Ec)(t.copy()),v=d.selection?d.selection():d,O=v.selectAll(".domain").data([null]),w=v.selectAll(".tick").data(f,t).order(),_=w.exit(),k=w.enter().append("g").attr("class","tick"),S=w.select("line"),j=w.select("text");O=O.merge(O.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(k),S=S.merge(k.append("line").attr("stroke","currentColor").attr(l+"2",s*a)),j=j.merge(k.append("text").attr("fill","currentColor").attr(l,s*h).attr("dy",1===e?"0em":3===e?"0.71em":"0.32em")),d!==v&&(O=O.transition(d),w=w.transition(d),S=S.transition(d),j=j.transition(d),_=_.transition(d).attr("opacity",1e-6).attr("transform",(function(e){return isFinite(e=g(e))?u(e):this.getAttribute("transform")})),k.attr("opacity",1e-6).attr("transform",(function(e){var t=this.parentNode.__axis;return u(t&&isFinite(t=t(e))?t:g(e))}))),_.remove(),O.attr("d",4===e||2==e?i?"M"+s*i+","+y+"H0.5V"+b+"H"+s*i:"M0.5,"+y+"V"+b:i?"M"+y+","+s*i+"V0.5H"+b+"V"+s*i:"M"+y+",0.5H"+b),w.attr("opacity",1).attr("transform",(function(e){return u(g(e))})),S.attr(l+"2",s*a),j.attr(l,s*h).text(p),v.filter(Dc).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===e?"start":4===e?"end":"middle"),v.each((function(){this.__axis=g}))}return d.scale=function(e){return arguments.length?(t=e,d):t},d.ticks=function(){return n=_c.call(arguments),d},d.tickArguments=function(e){return arguments.length?(n=null==e?[]:_c.call(e),d):n.slice()},d.tickValues=function(e){return arguments.length?(r=null==e?null:_c.call(e),d):r&&r.slice()},d.tickFormat=function(e){return arguments.length?(o=e,d):o},d.tickSize=function(e){return arguments.length?(a=i=+e,d):a},d.tickSizeInner=function(e){return arguments.length?(a=+e,d):a},d.tickSizeOuter=function(e){return arguments.length?(i=+e,d):i},d.tickPadding=function(e){return arguments.length?(c=+e,d):c},d}function xc(e){return Pc(3,e)}function Fc(e){return Pc(4,e)}var Tc=function(e){for(var t=[],n=1;n<=Math.floor(Math.sqrt(e));n++)e%n==0&&(t.push(n),e/n!==n&&t.push(e/n));return t.sort((function(e,t){return e-t})),t},Mc=function(e,t,n,r){var o=lt()(e).toDate(),a=0!==t?n[t-1]:n[t];return a=a instanceof Date?a:lt()(a).toDate(),0===t?r(o):function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new RegExp([" |,"],"g"),r=e.split(n),o=t.split(n),a=new Array,i=e.length>t.length?r:o,c=0;c=783&&e<=1130)return 12;if(e>1130&&e<=1365){if("time-comparison"===t)return 16;if("item-comparison"===t)return 12}else if(e>1365){if("time-comparison"===t)return 31;if("item-comparison"===t)return 16}return 16}(a,i),(o.length>=63&&"day"===c||o.length>=9&&"week"===c)&&(o=(s=o).filter((function(e,t){return 0===t||lt()(e).toDate().getMonth()!==lt()(s[t-1]).toDate().getMonth()}))),o.length<=l||"hour"===c&&function(e){var t=lt()(e[0]).toDate(),n=lt()(e[e.length-1]).toDate();return t.getDate()===n.getDate()&&t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear()}(o)&&a>783?o:function(e,t){for(var n=[],r=0;r=0)return[];var n=Math.ceil(-e/t);return Rc(n,e,e<-1)}(a,s)),i()(function(e,t){if(e<=0)return[];var n=Math.ceil(e/t);return Rc(n,e,e>1)}(c,s)))),u=t.xScale.range()[1],d=o?u+r.left+r.right/2-15:-r.left/2-15,f=t.yMin>=0||t.yMax>0?" with-positive-ticks":"";e.append("g").attr("class","grid"+f).attr("transform","translate(-".concat(r.left,", 0)")).call(Fc(t.yScale).tickValues(l).tickSize(-u-r.left-r.right).tickFormat("")),e.append("g").attr("class","axis y-axis").attr("aria-hidden","true").attr("transform","translate("+d+", 12)").attr("text-anchor","start").call(Fc(t.yScale).tickValues(0===t.yMax&&0===t.yMin?[l[0]]:l).tickFormat((function(e){return e>-1&&e<1&&n.yBelow1Format?n.yBelow1Format(e):n.yFormat(e)})))}(e,n,r,o,a),e.selectAll(".domain").remove(),e.selectAll(".axis .tick line").remove()},Ac=Math.PI,Nc=2*Ac,Lc=Nc-1e-6;function Uc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Bc(){return new Uc}Uc.prototype=Bc.prototype={constructor:Uc,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,o,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+o)+","+(this._y1=+a)},arcTo:function(e,t,n,r,o){e=+e,t=+t,n=+n,r=+r,o=+o;var a=this._x1,i=this._y1,c=n-e,s=r-t,l=a-e,u=i-t,d=l*l+u*u;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>1e-6)if(Math.abs(u*c-s*l)>1e-6&&o){var f=n-a,p=r-i,h=c*c+s*s,m=f*f+p*p,y=Math.sqrt(h),b=Math.sqrt(d),g=o*Math.tan((Ac-Math.acos((h+d-m)/(2*y*b)))/2),v=g/b,O=g/y;Math.abs(v-1)>1e-6&&(this._+="L"+(e+v*l)+","+(t+v*u)),this._+="A"+o+","+o+",0,0,"+ +(u*f>l*p)+","+(this._x1=e+O*c)+","+(this._y1=t+O*s)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,o,a){e=+e,t=+t,a=!!a;var i=(n=+n)*Math.cos(r),c=n*Math.sin(r),s=e+i,l=t+c,u=1^a,d=a?r-o:o-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+l:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+s+","+l),n&&(d<0&&(d=d%Nc+Nc),d>Lc?this._+="A"+n+","+n+",0,1,"+u+","+(e-i)+","+(t-c)+"A"+n+","+n+",0,1,"+u+","+(this._x1=s)+","+(this._y1=l):d>1e-6&&(this._+="A"+n+","+n+",0,"+ +(d>=Ac)+","+u+","+(this._x1=e+n*Math.cos(o))+","+(this._y1=t+n*Math.sin(o))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Hc=Bc,qc=function(e){return function(){return e}};function zc(e){this._context=e}zc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var Vc=function(e){return new zc(e)};function Kc(e){return e[0]}function Wc(e){return e[1]}function Gc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yc(e){for(var t=1;t=1?lt()(t[i-1]).toDate():lt()(t[0]).toDate()),u=i1?f:0,width:t.length>1?d:r,values:a.map((function(e){var t=e.key,r=c[t];return r?{key:t,value:r.value,date:n}:null})).filter(Boolean)}}))}(t,n.uniqueDates,n.visibleKeys,l,r.xScale),h=l<=1365||n.uniqueDates.length>50?2:3;h=l<=783?1.25:h;var m=l<=1365?4:6;n.uniqueDates.length>1&&f.append("path").attr("fill","none").attr("stroke-width",h).attr("stroke-linejoin","round").attr("stroke-linecap","round").attr("stroke",(function(e){return n.getColor(e.key)})).style("opacity",(function(e){var t=e.focus?1:.1;return e.visible?t:0})).attr("d",(function(e){return u(e.values)})),l/n.uniqueDates.length>36&&f.selectAll("circle").data((function(e,t){return e.values.map((function(n){return Yc(Yc({},n),{},{i:t,visible:e.visible,key:e.key})}))})).enter().append("circle").attr("r",m).attr("fill",(function(e){return n.getColor(e.key)})).attr("stroke","#fff").attr("stroke-width",h+1).style("opacity",(function(e){var t=e.focus?1:.1;return e.visible?t:0})).attr("cx",(function(e){return r.xScale(lt()(e.date).toDate())})).attr("cy",(function(e){return r.yScale(e.value)})).attr("tabindex","0").attr("role","graphics-symbol").attr("aria-label",(function(e){var t=o.screenReaderFormat(e.date instanceof Date?e.date:lt()(e.date).toDate());return"".concat(t," ").concat(a.valueFormat(e.value))})).on("focus",(function(e,n,r){a.show(t.find((function(t){return t.date===e.date})),r[n].parentNode,_a.target)})).on("blur",(function(){return a.hide()}));var y=e.append("g").attr("class","focusspaces").selectAll(".focus").data(p).enter().append("g").attr("class","focus"),b=y.append("g").attr("class","focus-grid").attr("opacity","0");b.append("line").attr("x1",(function(e){return r.xScale(lt()(e.date).toDate())})).attr("y1",0).attr("x2",(function(e){return r.xScale(lt()(e.date).toDate())})).attr("y2",s),b.selectAll("circle").data((function(e){return e.values})).enter().append("circle").attr("r",m+2).attr("fill",(function(e){return n.getColor(e.key)})).attr("stroke","#fff").attr("stroke-width",h+2).attr("cx",(function(e){return r.xScale(lt()(e.date).toDate())})).attr("cy",(function(e){return r.yScale(e.value)})),y.append("rect").attr("class","focus-g").attr("x",(function(e){return e.start})).attr("y",0).attr("width",(function(e){return e.width})).attr("height",s).attr("opacity",0).on("mouseover",(function(e,r,o){var i=(0===r||r===p.length-1)&&n.uniqueDates.length>1?0:.5;a.show(t.find((function(t){return t.date===e.date})),_a.target,o[r].parentNode,i)})).on("mouseout",(function(){return a.hide()}))},Qc=[[],[.5],[.333,.667],[.2,.5,.8],[.12,.375,.625,.88],[0,.25,.5,.75,1]],Jc=function(e,t){return function(n){var r=e.length>5?5:e.length,o=Object(_.findIndex)(e,(function(e){return e.key===n})),a=o<=4?Qc[r][o]:0;return t(a)}},Zc=function(){function e(){s()(this,e),this.ref=null,this.chart=null,this.position="",this.title="",this.labelFormat="",this.valueFormat="",this.visibleKeys="",this.getColor=null,this.margin=24}return u()(e,[{key:"calculateXPosition",value:function(e,t,n){var r=this.ref.getBoundingClientRect(),o=this.ref.parentNode.querySelector(".d3-base").getBoundingClientRect(),a=Math.max(o.left,t.left);if("below"===this.position)return Math.max(this.margin,Math.min(e.left+.5*e.width-r.width/2-a,o.width-r.width-this.margin));var i=e.left+e.width*n+this.margin-a;return i+r.width+this.margin>o.width?Math.max(this.margin,e.left+e.width*(1-n)-r.width-this.margin-a):i}},{key:"calculateYPosition",value:function(e,t){if("below"===this.position)return t.height;var n=this.ref.getBoundingClientRect(),r=e.top+this.margin-t.top;return r+n.height+this.margin>t.height?Math.max(0,e.top-n.height-this.margin-t.top):r}},{key:"calculatePosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.getBoundingClientRect(),r=this.chart.getBoundingClientRect();return"below"===this.position&&(t=0),{x:this.calculateXPosition(n,r,t),y:this.calculateYPosition(n,r)}}},{key:"hide",value:function(){Ma(this.chart).selectAll(".barfocus, .focus-grid").attr("opacity","0"),Ma(this.ref).style("visibility","hidden")}},{key:"getTooltipRowLabel",value:function(e,t){return e[t.key].labelDate?this.labelFormat(lt()(e[t.key].labelDate).toDate()):t.label||t.key}},{key:"show",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(this.visibleKeys.length){Ma(n).select(".focus-grid, .barfocus").attr("opacity","1");var a=this.calculatePosition(t,o),i=this.visibleKeys.map((function(t){return'\n\t\t\t\t\t
  • \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t').concat(r.getTooltipRowLabel(e,t),'\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t').concat(r.valueFormat(e[t.key].value),"\n\t\t\t\t\t
  • \n\t\t\t\t")})),c=this.title?this.title:this.labelFormat(lt()(e.date).toDate());Ma(this.ref).style("left",a.x+"px").style("top",a.y+"px").style("visibility","visible").html("\n\t\t\t\t
    \n\t\t\t\t\t

    ".concat(c,"

    \n\t\t\t\t\t
      \n\t\t\t\t\t").concat(i.join(""),"\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t"))}}}]),e}();var Xc=function(){return"rtl"===document.documentElement.dir},es=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).drawChart=t.drawChart.bind(f()(t)),t.getParams=t.getParams.bind(f()(t)),t.tooltipRef=Object(v.createRef)(),t}return u()(o,[{key:"getFormatParams",value:function(){var e=this.props,t=e.screenReaderFormat,n=e.xFormat,r=e.x2Format,o=e.yFormat,a=e.yBelow1Format;return{screenReaderFormat:Ia(t,cr),xFormat:Ia(n,cr),x2Format:Ia(r,cr),yBelow1Format:Ia(a),yFormat:Ia(o)}}},{key:"getScaleParams",value:function(e){var t=this.props,n=t.data,r=t.height,o=t.orderedKeys,a=t.chartType,i=this.getMargin(),c=r-i.top-i.bottom,s=this.getWidth()-i.left-i.right,l=function(e){var t=function(e){var t=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return e.forEach((function(e){for(var r=0,o=Object.entries(e);rt&&(t=c.value),"date"!==i&&Number.isFinite(c.value)&&c.value-1?Math.round(4*o)/4:Math.ceil(o)}(n,r),a={lower:0,upper:0,step:o};return(Number.isFinite(n)||n<0)&&(a.lower=Math.floor(n/o)*o,a.lower===n&&0!==n&&(a.lower-=o)),(Number.isFinite(r)||r>0)&&(a.upper=Math.ceil(r/o)*o,a.upper===r&&0!==r&&(a.upper+=o)),a}(n),u=l.upper,d=l.lower,f=l.step,p=function(e,t,n){return function e(){var t=ac(Xi,Xi);return t.copy=function(){return oc(t,e())},$a.apply(t,arguments),ic(t)}().domain([Math.min(t,0),0===n&&0===t?1:Math.max(n,0)]).rangeRound([e,0])}(c,d,u);if("line"===a)return{step:f,xScale:wc(e,s),yMax:u,yMin:d,yScale:p};var h=this.shouldBeCompact(),m=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return ii().domain(e).range([0,t]).paddingInner(n?0:.1)}(e,s,h);return{step:f,xGroupScale:Oc(o,m,h),xScale:m,yMax:u,yMin:d,yScale:p}}},{key:"getParams",value:function(e){var t=this.props,n=t.chartType,r=t.colorScheme,o=t.data,a=t.interval,i=t.mode,c=t.orderedKeys||function(e){return Aa(e).map((function(t){return{key:t,focus:!0,total:e.reduce((function(e,n){return e+n[t].value}),0),visible:!0}})).sort((function(e,t){return t.total-e.total}))}(o),s=c.filter((function(e){return e.visible})),l=c.length>5?s:c;return{getColor:Jc(l,r),interval:a,mode:i,chartType:n,uniqueDates:e,visibleKeys:s}}},{key:"createTooltip",value:function(e,t,n){var r=this.props,o=r.tooltipLabelFormat,a=r.tooltipPosition,i=r.tooltipTitle,c=r.tooltipValueFormat,s=new Zc;s.ref=this.tooltipRef.current,s.chart=e,s.position=a,s.title=i,s.labelFormat=Ia(o,cr),s.valueFormat=Ia(c),s.visibleKeys=n,s.getColor=t,this.tooltip=s}},{key:"drawChart",value:function(e){var t=this.props,n=t.data,r=t.dateParser,o=t.chartType,a=this.getMargin(),c=function(e,t){var n=sr(t),r=new Set(e.map((function(e){return e.date})));return i()(r).sort((function(e,t){return n(e)-n(t)}))}(n,r),s=this.getFormatParams(),l=this.getParams(c),u=this.getScaleParams(c),d=e.attr("id","chart").append("g").attr("transform","translate(".concat(a.left,", ").concat(a.top,")"));this.createTooltip(d.node(),l.getColor,l.visibleKeys),Ic(d,l,u,s,a,Xc()),"line"===o&&$c(d,n,l,u,s,this.tooltip),"bar"===o&&function(e,t,n,r,o,a){var i=r.yScale.range()[0],c=e.append("g").attr("class","bars").selectAll("g").data(t).enter().append("g").attr("transform",(function(e){return"translate(".concat(r.xScale(e.date),", 0)")})).attr("class","bargroup").attr("role","region").attr("aria-label",(function(e){return"item-comparison"===n.mode?o.screenReaderFormat(e.date instanceof Date?e.date:lt()(e.date).toDate()):null}));c.append("rect").attr("class","barfocus").attr("x",0).attr("y",0).attr("width",r.xGroupScale.range()[1]).attr("height",i).attr("opacity","0").on("mouseover",(function(e,n,r){a.show(t.find((function(t){return t.date===e.date})),_a.target,r[n].parentNode)})).on("mouseout",(function(){return a.hide()}));var s=r.yScale(0);c.selectAll(".bar").data((function(e){return n.visibleKeys.map((function(t){return{key:t.key,focus:t.focus,value:Object(_.get)(e,[t.key,"value"],0),label:t.label,visible:t.visible,date:e.date}}))})).enter().append("rect").attr("class","bar").attr("x",(function(e){return r.xGroupScale(e.key)})).attr("y",(function(e){return Math.min(s,r.yScale(e.value))})).attr("width",r.xGroupScale.bandwidth()).attr("height",(function(e){return Math.abs(s-r.yScale(e.value))})).attr("fill",(function(e){return n.getColor(e.key)})).attr("pointer-events","none").attr("tabindex","0").attr("aria-label",(function(e){var r=e.label||e.key;if("time-comparison"===n.mode){var i=t.find((function(t){return t.date===e.date}));r=o.screenReaderFormat(lt()(i[e.key].labelDate).toDate())}return"".concat(r," ").concat(a.valueFormat(e.value))})).style("opacity",(function(e){var t=e.focus?1:.1;return e.visible?t:0})).on("focus",(function(e,n,r){var o=e.value>0?_a.target:_a.target.parentNode;a.show(t.find((function(t){return t.date===e.date})),o,r[n].parentNode)})).on("blur",(function(){return a.hide()}))}(d,n,l,u,s,this.tooltip)}},{key:"shouldBeCompact",value:function(){var e=this.props,t=e.data,n=e.chartType,r=e.width;if("bar"!==n)return!1;var o=this.getMargin(),a=r-o.left-o.right,i=t&&t.length?Object.keys(t[0]).length-1:0;return a1&&void 0!==arguments[1]?arguments[1]:0,n=0;n5&&l,h=n.length>5?d:n;return Object(v.createElement)("div",{className:q()("woocommerce-legend","woocommerce-legend__direction-".concat(i),{"has-total":p,"is-scrollable":u},this.props.className)},Object(v.createElement)("ul",{className:"woocommerce-legend__list",ref:this.listRef,onScroll:p?this.updateListScroll:null},n.map((function(e){return Object(v.createElement)("li",{className:q()("woocommerce-legend__item",{"woocommerce-legend__item-checked":e.visible}),key:e.key,id:"woocommerce-legend-".concat(s,"__item__").concat(e.key),onMouseEnter:r,onMouseLeave:r,onBlur:r,onFocus:r},Object(v.createElement)("button",{role:"checkbox","aria-checked":e.visible?"true":"false",onClick:o,id:"woocommerce-legend-".concat(s,"__item-button__").concat(e.key),disabled:e.visible&&f<=1||!e.visible&&f>=5||!a,title:f>=5?Object(O.sprintf)(Object(O.__)("You may select up to %d items.","woocommerce-admin"),5):""},Object(v.createElement)("div",{className:"woocommerce-legend__item-container"},Object(v.createElement)("span",{className:q()("woocommerce-legend__item-checkmark",{"woocommerce-legend__item-checkmark-checked":e.visible}),style:e.visible?{color:Jc(h,t)(e.key)}:null}),Object(v.createElement)("span",{className:"woocommerce-legend__item-title"},e.label),Object(v.createElement)("span",{className:"woocommerce-legend__item-total"},Ia(c)(e.total)))))}))),p&&Object(v.createElement)("div",{className:"woocommerce-legend__total"},l))}}]),o}(v.Component);ns.propTypes={className:S.a.string,colorScheme:S.a.func,data:S.a.array.isRequired,handleLegendToggle:S.a.func,handleLegendHover:S.a.func,interactive:S.a.bool,legendDirection:S.a.oneOf(["row","column"]),legendValueFormat:S.a.oneOfType([S.a.string,S.a.func]),totalLabel:S.a.string,instanceId:S.a.number},ns.defaultProps={interactive:!0,legendDirection:"row",legendValueFormat:","};var rs=Object(Z.withInstanceId)(ns);function os(e,t){switch(t){case"left_space":return[e+" ",""];case"right":return["",e];case"right_space":return[""," "+e];case"left":default:return[e,""]}}var as=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;s()(this,o),(t=r.call(this,e)).chartBodyRef=Object(v.createRef)();var n=t.getDataKeys();return t.state={focusedKeys:[],visibleKeys:n.slice(0,5),width:0},t.prevDataKeys=n.sort(),t.handleTypeToggle=t.handleTypeToggle.bind(f()(t)),t.handleLegendToggle=t.handleLegendToggle.bind(f()(t)),t.handleLegendHover=t.handleLegendHover.bind(f()(t)),t.updateDimensions=t.updateDimensions.bind(f()(t)),t.getVisibleData=jn(t.getVisibleData),t.getOrderedKeys=jn(t.getOrderedKeys),t.setInterval=t.setInterval.bind(f()(t)),t}return u()(o,[{key:"getDataKeys",value:function(){var e=this.props,t=e.data,n=e.filterParam,r=e.mode,o=e.query;if("item-comparison"===r){var a=n?Object(P.f)(o[n]):[];return this.getOrderedKeys([],[],a).map((function(e){return e.key}))}return Aa(t)}},{key:"componentDidUpdate",value:function(){var e=this.props.data;if(e&&e.length){var t=Aa(e).sort();if(!Object(_.isEqual)(t,this.prevDataKeys)){var n=this.getDataKeys();this.prevDataKeys=t,this.setState({visibleKeys:n.slice(0,5)})}}}},{key:"componentDidMount",value:function(){this.updateDimensions(),this.setD3DefaultFormat(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"setD3DefaultFormat",value:function(){var e=this.props.currency,t=e.symbol,n=e.symbolPosition;mn({decimal:e.decimalSeparator,thousands:e.thousandSeparator,grouping:[3],currency:os(t,n)})}},{key:"getOrderedKeys",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.props,o=r.data,a=r.legendTotals,i=r.mode;if(!o||0===o.length)return[];var c=o.reduce((function(e,t){return Object.entries(t).forEach((function(t){var n=tt()(t,2),r=n[0],o=n[1];"date"===r||e[r]||(e[r]=o.label)})),e}),{}),s=Object.entries(c).map((function(n){var r=tt()(n,2),i=r[0],c=r[1];return c=Object(Cn.sanitize)(c,{ALLOWED_TAGS:[]}),{focus:0===e.length||e.includes(i),key:i,label:c,total:a&&void 0!==a[i]?a[i]:o.reduce((function(e,t){return e+t[i].value}),0),visible:t.includes(i)}}));return"item-comparison"===i?s.sort((function(e,t){return t.total-e.total})).filter((function(e){return e.total>0||n.includes(parseInt(e.key,10))})):s}},{key:"handleTypeToggle",value:function(e){if(this.props.chartType!==e){var t=this.props,n=t.path,r=t.query;Object(P.k)({chartType:e},n,r)}}},{key:"handleLegendToggle",value:function(e){if(this.props.interactiveLegend){var t=e.currentTarget.id.split("_").pop(),n=this.state,r=n.focusedKeys,o=n.visibleKeys;o.includes(t)?this.setState({focusedKeys:Object(_.without)(r,t),visibleKeys:Object(_.without)(o,t)}):this.setState({focusedKeys:r.concat([t]),visibleKeys:o.concat([t])})}}},{key:"handleLegendHover",value:function(e){if("mouseleave"===e.type||"blur"===e.type)this.setState({focusedKeys:[]});else if("mouseenter"===e.type||"focus"===e.type){var t=e.currentTarget.id.split("__").pop();this.setState({focusedKeys:[t]})}}},{key:"updateDimensions",value:function(){this.setState({width:this.chartBodyRef.current.offsetWidth})}},{key:"getVisibleData",value:function(e,t){var n=t.filter((function(e){return e.visible}));return e.map((function(e){var t={date:e.date};return n.forEach((function(n){t[n.key]=e[n.key]})),t}))}},{key:"setInterval",value:function(e){var t=this.props,n=t.path,r=t.query;Object(P.k)({interval:e},n,r)}},{key:"renderIntervalSelector",value:function(){var e=this.props,t=e.interval,n=e.allowedIntervals;if(!n||n.length<1)return null;var r={hour:Object(O.__)("By hour","woocommerce-admin"),day:Object(O.__)("By day","woocommerce-admin"),week:Object(O.__)("By week","woocommerce-admin"),month:Object(O.__)("By month","woocommerce-admin"),quarter:Object(O.__)("By quarter","woocommerce-admin"),year:Object(O.__)("By year","woocommerce-admin")};return Object(v.createElement)(w.SelectControl,{className:"woocommerce-chart__interval-select",value:t,options:n.map((function(e){return{value:e,label:r[e]}})),onChange:this.setInterval})}},{key:"getChartHeight",value:function(){var e=this.props,t=e.isViewportLarge;return e.isViewportMobile?180:t?300:220}},{key:"getLegendPosition",value:function(){var e=this.props,t=e.legendPosition,n=e.mode,r=e.isViewportWide;return t||(r&&"time-comparison"===n?"top":r&&"item-comparison"===n?"side":"bottom")}},{key:"render",value:function(){var e=this.state,t=e.focusedKeys,n=e.visibleKeys,r=e.width,o=this.props,a=o.baseValue,i=o.chartType,c=o.data,s=o.dateParser,l=o.emptyMessage,u=o.filterParam,d=o.interactiveLegend,f=o.interval,p=o.isRequesting,h=o.isViewportLarge,m=o.itemsLabel,y=o.mode,b=o.query,g=o.screenReaderFormat,k=o.showHeaderControls,S=o.title,j=o.tooltipLabelFormat,E=o.tooltipValueFormat,C=o.tooltipTitle,D=o.valueType,x=o.xFormat,F=o.x2Format,T=o.yBelow1Format,M=o.yFormat,R=u?Object(P.f)(b[u]):[],I=this.getOrderedKeys(t,n,R),A=p?null:this.getVisibleData(c,I),N=this.getLegendPosition(),L="top"===N?"row":"column",U="side"===N?"row":"column",B=this.getChartHeight(),H=p?null:Object(v.createElement)(rs,{colorScheme:kn,data:I,handleLegendHover:this.handleLegendHover,handleLegendToggle:this.handleLegendToggle,interactive:d,legendDirection:L,legendValueFormat:E,totalLabel:Object(O.sprintf)(m,I.length)}),z=M,V=T;if(!M)switch(D){case"average":z=",.0f";break;case"currency":z="$.3~s",V="$.3~f";break;case"number":z=",.0f"}return Object(v.createElement)("div",{className:"woocommerce-chart"},k&&Object(v.createElement)("div",{className:"woocommerce-chart__header"},Object(v.createElement)(pt,{className:"woocommerce-chart__title"},S),"top"===N&&H,this.renderIntervalSelector(),Object(v.createElement)(w.NavigableMenu,{className:"woocommerce-chart__types",orientation:"horizontal",role:"menubar"},Object(v.createElement)(w.Button,{className:q()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"line"===i}),title:Object(O.__)("Line chart","woocommerce-admin"),"aria-checked":"line"===i,role:"menuitemradio",tabIndex:"line"===i?0:-1,onClick:Object(_.partial)(this.handleTypeToggle,"line")},Object(v.createElement)(bn.a,null)),Object(v.createElement)(w.Button,{className:q()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"bar"===i}),title:Object(O.__)("Bar chart","woocommerce-admin"),"aria-checked":"bar"===i,role:"menuitemradio",tabIndex:"bar"===i?0:-1,onClick:Object(_.partial)(this.handleTypeToggle,"bar")},Object(v.createElement)(vn.a,null)))),Object(v.createElement)(ht,{component:!1},Object(v.createElement)("div",{className:q()("woocommerce-chart__body","woocommerce-chart__body-".concat(U)),ref:this.chartBodyRef},"side"===N&&H,p&&Object(v.createElement)(v.Fragment,null,Object(v.createElement)("span",{className:"screen-reader-text"},Object(O.__)("Your requested data is loading","woocommerce-admin")),Object(v.createElement)(Pn,{height:B})),!p&&r>0&&Object(v.createElement)(ts,{baseValue:a,chartType:i,colorScheme:kn,data:A,dateParser:s,height:B,emptyMessage:l,interval:f,margin:{bottom:50,left:80,right:30,top:0},mode:y,orderedKeys:I,screenReaderFormat:g,tooltipLabelFormat:j,tooltipValueFormat:E,tooltipPosition:h?"over":"below",tooltipTitle:C,valueType:D,width:"row"===U?r-320:r,xFormat:x,x2Format:F,yBelow1Format:V,yFormat:z})),"bottom"===N&&Object(v.createElement)("div",{className:"woocommerce-chart__footer"},H)))}}]),o}(v.Component);as.propTypes={allowedIntervals:S.a.array,baseValue:S.a.number,chartType:S.a.oneOf(["bar","line"]),data:S.a.array.isRequired,dateParser:S.a.string.isRequired,emptyMessage:S.a.string,filterParam:S.a.string,itemsLabel:S.a.string,mode:S.a.oneOf(["item-comparison","time-comparison"]),path:S.a.string,query:S.a.object,interactiveLegend:S.a.bool,interval:S.a.oneOf(["hour","day","week","month","quarter","year"]),intervalData:S.a.object,isRequesting:S.a.bool,legendPosition:S.a.oneOf(["bottom","side","top"]),legendTotals:S.a.object,screenReaderFormat:S.a.oneOfType([S.a.string,S.a.func]),showHeaderControls:S.a.bool,title:S.a.string,tooltipLabelFormat:S.a.oneOfType([S.a.string,S.a.func]),tooltipValueFormat:S.a.oneOfType([S.a.string,S.a.func]),tooltipTitle:S.a.string,valueType:S.a.string,xFormat:S.a.string,x2Format:S.a.string,yBelow1Format:S.a.string,yFormat:S.a.string,currency:S.a.object},as.defaultProps={baseValue:0,chartType:"line",data:[],dateParser:"%Y-%m-%dT%H:%M:%S",interactiveLegend:!0,interval:"day",isRequesting:!1,mode:"time-comparison",screenReaderFormat:"%B %-d, %Y",showHeaderControls:!0,tooltipLabelFormat:"%B %-d, %Y",tooltipValueFormat:",",xFormat:"%d",x2Format:"%b %Y",currency:{symbol:"$",symbolPosition:"left",decimalSeparator:".",thousandSeparator:","}},Object(En.withViewportMatch)({isViewportMobile:"< medium",isViewportLarge:">= large",isViewportWide:">= wide"})(as);var is=n(51),cs=n.n(is),ss=Object(v.createElement)(de.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)(de.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"}));var ls=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.renderContent;return n?Object(v.createElement)("div",{className:"woocommerce-ellipsis-menu"},Object(v.createElement)(w.Dropdown,{contentClassName:"woocommerce-ellipsis-menu__popover",position:"bottom left",renderToggle:function(e){var n=e.onToggle,r=e.isOpen,o=q()("woocommerce-ellipsis-menu__toggle",{"is-opened":r});return Object(v.createElement)(w.Button,{className:o,onClick:n,icon:"ellipsis",title:t,"aria-expanded":r},Object(v.createElement)(ue,{icon:ss}))},renderContent:function(e){return Object(v.createElement)(w.NavigableMenu,{className:"woocommerce-ellipsis-menu__content"},n(e))}})):null}}]),o}(v.Component);ls.propTypes={label:S.a.string.isRequired,renderContent:S.a.func};var us=ls;function ds(e){return function(t,n,r){if(t[n])return t[n].type&&t[n].type===e?void 0:new Error("Invalid ".concat(n," passed to ").concat(r,". Must be ")+"`"+e.name+"`")}}(function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){var e;return s()(this,o),e=r.call(this),cs()("Card",{version:"5.2.0",alternative:"@wordpress/components Card",plugin:"WooCommerce",hint:'Use `import { Card } from "@wordpress/components"`'}),e}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.action,n=e.children,r=e.description,o=e.isInactive,a=e.menu,i=e.title,c=q()("woocommerce-card",this.props.className,{"has-menu":!!a,"has-action":!!t,"is-inactive":!!o});return Object(v.createElement)("div",{className:c},i&&Object(v.createElement)("div",{className:"woocommerce-card__header"},Object(v.createElement)("div",{className:"woocommerce-card__title-wrapper"},Object(v.createElement)(pt,{className:"woocommerce-card__title woocommerce-card__header-item"},i),r&&Object(v.createElement)(pt,{className:"woocommerce-card__description woocommerce-card__header-item"},r)),t&&Object(v.createElement)("div",{className:"woocommerce-card__action woocommerce-card__header-item"},t),a&&Object(v.createElement)("div",{className:"woocommerce-card__menu woocommerce-card__header-item"},a)),Object(v.createElement)(ht,{className:"woocommerce-card__body"},n))}}]),o}(v.Component)).propTypes={action:S.a.node,className:S.a.string,description:S.a.oneOfType([S.a.string,S.a.node]),isInactive:S.a.bool,menu:ds(us),title:S.a.oneOfType([S.a.string,S.a.node])};var fs=function(e){var t=e.count,n=e.label;return n||(n=Object(O.sprintf)(Object(O.__)("Total %d","woocommerce-admin"),t)),Object(v.createElement)("span",{className:"woocommerce-count","aria-label":n},t)};fs.propTypes={count:S.a.number.isRequired,label:S.a.string},fs.defaultProps={label:""};var ps=function(e){var t=e.className,n=e.count,r=e.children,o=e.disabled,a=e.helpText,i=e.onClick;return!o&&n<2?Object(v.createElement)(w.Tooltip,{text:a},Object(v.createElement)("span",{className:t},Object(v.createElement)(w.Button,{className:"woocommerce-compare-button",disabled:!0,isSecondary:!0},r))):Object(v.createElement)(w.Button,{className:q()("woocommerce-compare-button",t),onClick:i,disabled:o,isSecondary:!0},r)};ps.propTypes={className:S.a.string,count:S.a.number.isRequired,children:S.a.node.isRequired,helpText:S.a.string.isRequired,onClick:S.a.func.isRequired,disabled:S.a.bool};var hs=ps;var ms=function(e){h()(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function a(e){var t,n=e.getLabels,o=e.param,i=e.query;return s()(this,a),(t=r.apply(this,arguments)).state={selected:[]},t.clearQuery=t.clearQuery.bind(f()(t)),t.updateQuery=t.updateQuery.bind(f()(t)),t.updateLabels=t.updateLabels.bind(f()(t)),t.onButtonClicked=t.onButtonClicked.bind(f()(t)),i[o]&&n(i[o],i).then(t.updateLabels),t}return u()(a,[{key:"componentDidUpdate",value:function(e,t){var n=e.param,r=e.query,o=t.selected,a=this.props,i=a.getLabels,c=a.param,s=a.query,l=this.state.selected;if(n!==c||o.length>0&&0===l.length)this.clearQuery();else{var u=Object(P.f)(r[c]),d=Object(P.f)(s[c]);Object(_.isEqual)(u.sort(),d.sort())||i(s[c],s).then(this.updateLabels)}}},{key:"clearQuery",value:function(){var e=this.props,t=e.param,n=e.path,r=e.query;this.setState({selected:[]}),Object(P.k)(o()({},t,void 0),n,r)}},{key:"updateLabels",value:function(e){this.setState({selected:e})}},{key:"updateQuery",value:function(){var e=this.props,t=e.param,n=e.path,r=e.query,a=this.state.selected.map((function(e){return e.key}));Object(P.k)(o()({},t,a.join(",")),n,r)}},{key:"onButtonClicked",value:function(e){this.updateQuery(e),Object(_.isFunction)(this.props.onClick)&&this.props.onClick(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.labels,r=t.type,o=t.autocompleter,a=this.state.selected;return Object(v.createElement)(w.Card,{className:"woocommerce-filters__compare"},Object(v.createElement)(w.CardHeader,null,Object(v.createElement)(x,{variant:"subtitle.small"},n.title)),Object(v.createElement)(w.CardBody,null,Object(v.createElement)($e,{autocompleter:o,type:r,selected:a,placeholder:n.placeholder,onChange:function(t){e.setState({selected:t})}})),Object(v.createElement)(w.CardFooter,{justify:"flex-start"},Object(v.createElement)(hs,{count:a.length,helpText:n.helpText,onClick:this.onButtonClicked},n.update),a.length>0&&Object(v.createElement)(w.Button,{isLink:!0,onClick:this.clearQuery},Object(O.__)("Clear all","woocommerce-admin"))))}}]),a}(v.Component);ms.propTypes={getLabels:S.a.func.isRequired,labels:S.a.shape({placeholder:S.a.string,title:S.a.string,update:S.a.string}),param:S.a.string.isRequired,path:S.a.string.isRequired,query:S.a.object,type:S.a.string.isRequired,autocompleter:S.a.object},ms.defaultProps={labels:{},query:{}};var ys=n(89),bs=function(e){var t=e.date,n=e.machineFormat,r=e.screenReaderFormat,o=e.visibleFormat;return Object(v.createElement)("time",{dateTime:Object(ys.format)(n,t)},Object(v.createElement)("span",{"aria-hidden":"true"},Object(ys.format)(o,t)),Object(v.createElement)("span",{className:"screen-reader-text"},Object(ys.format)(r,t)))};bs.propTypes={date:S.a.oneOfType([S.a.string,S.a.object]).isRequired,machineFormat:S.a.string,screenReaderFormat:S.a.string,visibleFormat:S.a.string},bs.defaultProps={machineFormat:"Y-m-d H:i:s",screenReaderFormat:"F j, Y",visibleFormat:"Y-m-d"};var gs=function(e){h()(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function a(){return s()(this,a),r.apply(this,arguments)}return u()(a,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.options,r=e.selected,a=e.onSelect,i=e.name,c=e.legend;return Object(v.createElement)("fieldset",{className:"woocommerce-segmented-selection"},Object(v.createElement)("legend",{className:"screen-reader-text"},c),Object(v.createElement)("div",{className:q()(t,"woocommerce-segmented-selection__container")},n.map((function(e){var t=e.value,n=e.label;if(!t||!n)return null;var c=Object(_.uniqueId)("".concat(t,"_"));return Object(v.createElement)("div",{className:"woocommerce-segmented-selection__item",key:t},Object(v.createElement)("input",{className:"woocommerce-segmented-selection__input",type:"radio",name:i,id:c,checked:r===t,onChange:Object(_.partial)(a,o()({},i,t))}),Object(v.createElement)("label",{htmlFor:c},Object(v.createElement)("span",{className:"woocommerce-segmented-selection__label"},n)))}))))}}]),a}(v.Component);gs.propTypes={className:S.a.string,options:S.a.arrayOf(S.a.shape({value:S.a.string.isRequired,label:S.a.string.isRequired})).isRequired,selected:S.a.string,onSelect:S.a.func.isRequired,name:S.a.string.isRequired,legend:S.a.string.isRequired};var vs=gs;var Os=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.onSelect,n=e.compare;return Object(v.createElement)(vs,{options:ct.g,selected:n,onSelect:t,name:"compare",legend:Object(O.__)("compare to","woocommerce-admin")})}}]),o}(v.Component);Os.propTypes={onSelect:S.a.func.isRequired,compare:S.a.string};var ws=Os,_s=n(511),ks={calendarLabel:Object(O.__)("Calendar","woocommerce-admin"),closeDatePicker:Object(O.__)("Close","woocommerce-admin"),focusStartDate:Object(O.__)("Interact with the calendar and select start and end dates.","woocommerce-admin"),clearDate:Object(O.__)("Clear Date","woocommerce-admin"),clearDates:Object(O.__)("Clear Dates","woocommerce-admin"),jumpToPrevMonth:Object(O.__)("Move backward to switch to the previous month.","woocommerce-admin"),jumpToNextMonth:Object(O.__)("Move forward to switch to the next month.","woocommerce-admin"),enterKey:Object(O.__)("Enter key","woocommerce-admin"),leftArrowRightArrow:Object(O.__)("Right and left arrow keys","woocommerce-admin"),upArrowDownArrow:Object(O.__)("up and down arrow keys","woocommerce-admin"),pageUpPageDown:Object(O.__)("page up and page down keys","woocommerce-admin"),homeEnd:Object(O.__)("Home and end keys","woocommerce-admin"),escape:Object(O.__)("Escape key","woocommerce-admin"),questionMark:Object(O.__)("Question mark","woocommerce-admin"),selectFocusedDate:Object(O.__)("Select the date in focus.","woocommerce-admin"),moveFocusByOneDay:Object(O.__)("Move backward (left) and forward (right) by one day.","woocommerce-admin"),moveFocusByOneWeek:Object(O.__)("Move backward (up) and forward (down) by one week.","woocommerce-admin"),moveFocusByOneMonth:Object(O.__)("Switch months.","woocommerce-admin"),moveFocustoStartAndEndOfWeek:Object(O.__)("Go to the first or last day of a week.","woocommerce-admin"),returnFocusToInput:Object(O.__)("Return to the date input field.","woocommerce-admin"),keyboardNavigationInstructions:Object(O.__)("Press the down arrow key to interact with the calendar and select a date.","woocommerce-admin"),chooseAvailableStartDate:function(e){var t=e.date;return Object(O.sprintf)(Object(O.__)("Select %s as a start date.","woocommerce-admin"),t)},chooseAvailableEndDate:function(e){var t=e.date;return Object(O.sprintf)(Object(O.__)("Select %s as an end date.","woocommerce-admin"),t)},chooseAvailableDate:function(e){return e.date},dateIsUnavailable:function(e){var t=e.date;return Object(O.sprintf)(Object(O.__)("%s is not selectable.","woocommerce-admin"),t)},dateIsSelected:function(e){var t=e.date;return Object(O.sprintf)(Object(O.__)("Selected. %s","woocommerce-admin"),t)}};var Ss=function(e){h()(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function a(e){var t;return s()(this,a),(t=r.call(this,e)).onDatesChange=t.onDatesChange.bind(f()(t)),t.onFocusChange=t.onFocusChange.bind(f()(t)),t.onInputChange=t.onInputChange.bind(f()(t)),t.nodeRef=Object(v.createRef)(),t.keepFocusInside=t.keepFocusInside.bind(f()(t)),t}return u()(a,[{key:"keepFocusInside",value:function(e,t){if(this.nodeRef.current){var n=this.props.losesFocusTo;if("container"!==e||!t.target||!t.target.classList.contains("DayPickerNavigation_button")&&!t.target.classList.contains("CalendarDay")||t.relatedTarget&&(t.relatedTarget.classList.contains("DayPickerNavigation_button")||t.relatedTarget.classList.contains("CalendarDay"))){if("onPrevMonthClick"===e||"onNextMonthClick"===e){var r=this.nodeRef.current.querySelector(".DayPickerNavigation_button");r&&r.focus()}}else{if(t.relatedTarget&&(t.relatedTarget.classList.contains("DayPickerNavigation_button")||t.relatedTarget.classList.contains("CalendarDay")))return;if(t.relatedTarget&&n&&n.contains(t.relatedTarget))return;var o=this.nodeRef.current.querySelector(".DayPicker_focusRegion");o&&o.focus()}}}},{key:"onDatesChange",value:function(e){var t=e.startDate,n=e.endDate,r=this.props,o=r.onUpdate,a=r.shortDateFormat;o({after:t,before:n,afterText:t?t.format(a):"",beforeText:n?n.format(a):"",afterError:null,beforeError:null})}},{key:"onFocusChange",value:function(e){this.props.onUpdate({focusedInput:e||"startDate"})}},{key:"onInputChange",value:function(e,t){var n,r=t.target.value,a=this.props,i=a.after,c=a.before,s=a.shortDateFormat,l=Object(ct.j)(e,r,c,i,s),u=l.date,d=l.error;this.props.onUpdate((n={},o()(n,e,u),o()(n,e+"Text",r),o()(n,e+"Error",r.length>0?d:null),n))}},{key:"setTnitialVisibleMonth",value:function(e,t){return function(){var n=t||lt()();return e?n.clone().subtract(1,"month"):n}}},{key:"render",value:function(){var e=this,t=this.props,n=t.after,r=t.before,o=t.focusedInput,a=t.afterText,i=t.beforeText,c=t.afterError,s=t.beforeError,l=t.shortDateFormat,u=t.isViewportMobile,d=t.isViewportSmall,f=t.isInvalidDate,p=u&&!d;return Object(v.createElement)("div",{className:q()("woocommerce-calendar",{"is-mobile":u})},Object(v.createElement)("div",{className:"woocommerce-calendar__inputs"},Object(v.createElement)(dt,{value:a,onChange:Object(_.partial)(this.onInputChange,"after"),dateFormat:l,label:Object(O.__)("Start Date","woocommerce-admin"),error:c,describedBy:Object(O.sprintf)(Object(O.__)("Date input describing a selected date range's start date in format %s","woocommerce-admin"),l),onFocus:function(){return e.onFocusChange("startDate")}}),Object(v.createElement)("div",{className:"woocommerce-calendar__inputs-to"},Object(O.__)("to","woocommerce-admin")),Object(v.createElement)(dt,{value:i,onChange:Object(_.partial)(this.onInputChange,"before"),dateFormat:l,label:Object(O.__)("End Date","woocommerce-admin"),error:s,describedBy:Object(O.sprintf)(Object(O.__)("Date input describing a selected date range's end date in format %s","woocommerce-admin"),l),onFocus:function(){return e.onFocusChange("endDate")}})),Object(v.createElement)("div",{className:"woocommerce-calendar__react-dates",ref:this.nodeRef,onBlur:Object(_.partial)(this.keepFocusInside,"container"),tabIndex:-1},Object(v.createElement)(_s.DayPickerRangeController,{onNextMonthClick:Object(_.partial)(this.keepFocusInside,"onNextMonthClick"),onPrevMonthClick:Object(_.partial)(this.keepFocusInside,"onPrevMonthClick"),onDatesChange:this.onDatesChange,onFocusChange:this.onFocusChange,focusedInput:o,startDate:n,endDate:r,orientation:"horizontal",numberOfMonths:p?2:1,isOutsideRange:function(e){return f&&f(e.toDate())},minimumNights:0,hideKeyboardShortcutsPanel:!0,noBorder:!0,isRTL:"rtl"===document.documentElement.dir,initialVisibleMonth:this.setTnitialVisibleMonth(p,r),phrases:ks})))}}]),a}(v.Component);Ss.propTypes={after:S.a.object,afterError:S.a.string,afterText:S.a.string,before:S.a.object,beforeError:S.a.string,beforeText:S.a.string,focusedInput:S.a.string,isInvalidDate:S.a.func,onUpdate:S.a.func.isRequired,shortDateFormat:S.a.string.isRequired,losesFocusTo:S.a.instanceOf(Element)};var js=Object(En.withViewportMatch)({isViewportMobile:"< medium",isViewportSmall:"< small"})(Ss);var Es=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.onSelect,n=e.period;return Object(v.createElement)(vs,{options:Object(_.filter)(ct.h,(function(e){return"custom"!==e.value})),selected:n,onSelect:t,name:"period",legend:Object(O.__)("select a preset period","woocommerce-admin")})}}]),o}(v.Component);Es.propTypes={onSelect:S.a.func.isRequired,period:S.a.string};var Cs=Es;var Ds=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){var e;return s()(this,o),(e=r.call(this)).onTabSelect=e.onTabSelect.bind(f()(e)),e.controlsRef=Object(v.createRef)(),e}return u()(o,[{key:"onTabSelect",value:function(e){var t=this.props,n=t.onUpdate,r=t.period;"period"===e&&"custom"===r&&n({period:"today"})}},{key:"isFutureDate",value:function(e){return lt()().isBefore(lt()(e),"day")}},{key:"render",value:function(){var e=this,t=this.props,n=t.period,r=t.compare,o=t.after,a=t.before,i=t.onUpdate,c=t.onClose,s=t.onSelect,l=t.isValidSelection,u=t.resetCustomValues,d=t.focusedInput,f=t.afterText,p=t.beforeText,h=t.afterError,m=t.beforeError,y=t.shortDateFormat;return Object(v.createElement)("div",null,Object(v.createElement)(pt,{className:"screen-reader-text",tabIndex:"0"},Object(O.__)("Select date range and comparison","woocommerce-admin")),Object(v.createElement)(ht,{component:!1},Object(v.createElement)(pt,{className:"woocommerce-filters-date__text"},Object(O.__)("select a date range","woocommerce-admin")),Object(v.createElement)(w.TabPanel,{tabs:[{name:"period",title:Object(O.__)("Presets","woocommerce-admin"),className:"woocommerce-filters-date__tab"},{name:"custom",title:Object(O.__)("Custom","woocommerce-admin"),className:"woocommerce-filters-date__tab"}],className:"woocommerce-filters-date__tabs",activeClass:"is-active",initialTabName:"custom"===n?"custom":"period",onSelect:this.onTabSelect},(function(t){return Object(v.createElement)(v.Fragment,null,"period"===t.name&&Object(v.createElement)(Cs,{onSelect:i,period:n}),"custom"===t.name&&Object(v.createElement)(js,{after:o,before:a,onUpdate:i,isInvalidDate:e.isFutureDate,focusedInput:d,afterText:f,beforeText:p,afterError:h,beforeError:m,shortDateFormat:y,losesFocusTo:e.controlsRef.current}),Object(v.createElement)("div",{className:q()("woocommerce-filters-date__content-controls",{"is-custom":"custom"===t.name}),ref:e.controlsRef},Object(v.createElement)(pt,{className:"woocommerce-filters-date__text"},Object(O.__)("compare to","woocommerce-admin")),Object(v.createElement)(ws,{onSelect:i,compare:r}),Object(v.createElement)("div",{className:"woocommerce-filters-date__button-group"},"custom"===t.name&&Object(v.createElement)(w.Button,{className:"woocommerce-filters-date__button",isSecondary:!0,onClick:u,disabled:!(o||a)},Object(O.__)("Reset","woocommerce-admin")),l(t.name)?Object(v.createElement)(w.Button,{className:"woocommerce-filters-date__button",onClick:s(t.name,c),isPrimary:!0},Object(O.__)("Update","woocommerce-admin")):Object(v.createElement)(w.Button,{className:"woocommerce-filters-date__button",isPrimary:!0,disabled:!0},Object(O.__)("Update","woocommerce-admin")))))}))))}}]),o}(v.Component);Ds.propTypes={period:S.a.string.isRequired,compare:S.a.string.isRequired,onUpdate:S.a.func.isRequired,onClose:S.a.func.isRequired,onSelect:S.a.func.isRequired,resetCustomValues:S.a.func.isRequired,focusedInput:S.a.string,afterText:S.a.string,beforeText:S.a.string,afterError:S.a.string,beforeError:S.a.string,shortDateFormat:S.a.string.isRequired};var Ps=Ds,xs=function(e){var t=e.labels,n=e.isOpen,r=R()(e,["labels","isOpen"]),o=q()("woocommerce-dropdown-button",{"is-open":n,"is-multi-line":t.length>1});return Object(v.createElement)(w.Button,T()({className:o,"aria-expanded":n},r),Object(v.createElement)("div",{className:"woocommerce-dropdown-button__labels"},t.map((function(e,t){return Object(v.createElement)("span",{key:t},Object(ne.decodeEntities)(e))}))))};xs.propTypes={labels:S.a.array.isRequired,isOpen:S.a.bool};var Fs=xs;var Ts=Object(O.__)("MM/DD/YYYY","woocommerce-admin"),Ms=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state=t.getResetState(),t.update=t.update.bind(f()(t)),t.onSelect=t.onSelect.bind(f()(t)),t.isValidSelection=t.isValidSelection.bind(f()(t)),t.resetCustomValues=t.resetCustomValues.bind(f()(t)),t}return u()(o,[{key:"formatDate",value:function(e,t){return e&&e._isAMomentObject&&"function"==typeof e.format?e.format(t):""}},{key:"getResetState",value:function(){var e=this.props.dateQuery,t=e.period,n=e.compare,r=e.before,o=e.after;return{period:t,compare:n,before:r,after:o,focusedInput:"startDate",afterText:this.formatDate(o,Ts),beforeText:this.formatDate(r,Ts),afterError:null,beforeError:null}}},{key:"update",value:function(e){this.setState(e)}},{key:"onSelect",value:function(e,t){var n=this,r=this.props,o=r.isoDateFormat,a=r.onRangeSelect;return function(r){var i=n.state,c=i.period,s=i.compare,l=i.after,u=i.before,d={period:"custom"===e?"custom":c,compare:s};"custom"===e?(d.after=n.formatDate(l,o),d.before=n.formatDate(u,o)):(d.after=void 0,d.before=void 0),a(d),t(r)}}},{key:"getButtonLabel",value:function(){var e=this.props.dateQuery,t=e.primaryDate,n=e.secondaryDate;return["".concat(t.label," (").concat(t.range,")"),"".concat(Object(O.__)("vs.","woocommerce-admin")," ").concat(n.label," (").concat(n.range,")")]}},{key:"isValidSelection",value:function(e){var t=this.state,n=t.compare,r=t.after,o=t.before;return"custom"!==e||n&&r&&o}},{key:"resetCustomValues",value:function(){this.setState({after:null,before:null,focusedInput:"startDate",afterText:"",beforeText:"",afterError:null,beforeError:null})}},{key:"render",value:function(){var e=this,t=this.state,n=t.period,r=t.compare,o=t.after,a=t.before,i=t.focusedInput,c=t.afterText,s=t.beforeText,l=t.afterError,u=t.beforeError,d=this.props.isViewportMobile,f=q()("woocommerce-filters-date__content",{"is-mobile":d});return Object(v.createElement)("div",{className:"woocommerce-filters-filter"},Object(v.createElement)("span",{className:"woocommerce-filters-label"},Object(O.__)("Date Range","woocommerce-admin"),":"),Object(v.createElement)(w.Dropdown,{contentClassName:f,position:"bottom",expandOnMobile:!0,renderToggle:function(t){var n=t.isOpen,r=t.onToggle;return Object(v.createElement)(Fs,{onClick:r,isOpen:n,labels:e.getButtonLabel()})},renderContent:function(t){var d=t.onClose;return Object(v.createElement)(Ps,{period:n,compare:r,after:o,before:a,onUpdate:e.update,onClose:d,onSelect:e.onSelect,isValidSelection:e.isValidSelection,resetCustomValues:e.resetCustomValues,focusedInput:i,afterText:c,beforeText:s,afterError:l,beforeError:u,shortDateFormat:Ts})}}))}}]),o}(v.Component);Ms.propTypes={onRangeSelect:S.a.func.isRequired,dateQuery:S.a.shape({period:S.a.string.isRequired,compare:S.a.string.isRequired,before:S.a.object,after:S.a.object,primaryDate:S.a.shape({label:S.a.string.isRequired,range:S.a.string.isRequired}).isRequired,secondaryDate:S.a.shape({label:S.a.string.isRequired,range:S.a.string.isRequired}).isRequired}).isRequired};var Rs=Object(En.withViewportMatch)({isViewportMobile:"< medium"})(Ms);var Is=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"renderIllustration",value:function(){var e=this.props,t=e.illustrationWidth,n=e.illustrationHeight,r=e.illustration;return Object(v.createElement)("img",{alt:"",src:r,width:t,height:n,className:"woocommerce-empty-content__illustration"})}},{key:"renderActionButtons",value:function(e){var t="secondary"===e?this.props.secondaryActionLabel:this.props.actionLabel,n="secondary"===e?this.props.secondaryActionURL:this.props.actionURL,r="secondary"===e?this.props.secondaryActionCallback:this.props.actionCallback,o="secondary"!==e;return n&&r?Object(v.createElement)(w.Button,{className:"woocommerce-empty-content__action",isPrimary:o,onClick:r,href:n},t):n?Object(v.createElement)(w.Button,{className:"woocommerce-empty-content__action",isPrimary:o,href:n},t):r?Object(v.createElement)(w.Button,{className:"woocommerce-empty-content__action",isPrimary:o,onClick:r},t):null}},{key:"renderActions",value:function(){var e=this.props,t=e.actionLabel,n=e.secondaryActionLabel;return Object(v.createElement)("div",{className:"woocommerce-empty-content__actions"},t&&this.renderActionButtons("primary"),n&&this.renderActionButtons("secondary"))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.title,r=e.message,o=e.illustration;return Object(v.createElement)("div",{className:q()("woocommerce-empty-content",t)},o&&this.renderIllustration(),n?Object(v.createElement)(pt,{className:"woocommerce-empty-content__title"},n):null,r?Object(v.createElement)("p",{className:"woocommerce-empty-content__message"},r):null,this.renderActions())}}]),o}(v.Component);function As(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ns(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:function(){},t=this.state.values,n=this.props.validate(t);this.setState({errors:n},e)}},{key:"setValue",value:function(e,t){var n=this;this.setState((function(n){return{values:Ns(Ns({},n.values),{},o()({},e,t))}}),(function(){n.validate((function(){n.props.onChangeCallback({name:e,value:t},n.state.values,!Object.keys(n.state.errors||{}).length)}))}))}},{key:"setTouched",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.setState((function(n){return{touched:Ns(Ns({},n.touched),{},o()({},e,t))}}))}},{key:"handleChange",value:function(e,t){var n=this.state.values;t.target?"checkbox"===t.target.type?this.setValue(e,!n[e]):this.setValue(e,t.target.value):this.setValue(e,t)}},{key:"handleBlur",value:function(e){this.setTouched(e)}},{key:"handleSubmit",value:(t=G()(J.a.mark((function e(){var t,n;return J.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.state.values,n={},Object.keys(t).map((function(e){return n[e]=!0})),this.setState({touched:n}),e.next=6,this.isValidForm();case 6:if(!e.sent){e.next=8;break}this.props.onSubmitCallback(t);case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getInputProps",value:function(e){var t=this,n=this.state,r=n.errors,o=n.touched,a=n.values;return{value:a[e],checked:Boolean(a[e]),selected:a[e],onChange:function(n){return t.handleChange(e,n)},onBlur:function(){return t.handleBlur(e)},className:o[e]&&r[e]?"has-error":null,help:o[e]?r[e]:null}}},{key:"getStateAndHelpers",value:function(){var e=this.state,t=e.values,n=e.errors;return{values:t,errors:n,touched:e.touched,setTouched:this.setTouched,setValue:this.setValue,handleSubmit:this.handleSubmit,getInputProps:this.getInputProps,isValidForm:!Object.keys(n).length}}},{key:"render",value:function(){var e=this.props.children(this.getStateAndHelpers());return Object(v.cloneElement)(e)}}]),c}(v.Component);Ls.propTypes={children:S.a.any,errors:S.a.object,initialValues:S.a.object.isRequired,onSubmitCallback:S.a.func,onChangeCallback:S.a.func,validate:S.a.func},Ls.defaultProps={errors:{},initialValues:{},onSubmitCallback:function(){},onChangeCallback:function(){},touched:{},validate:function(){}};var Us=Ls,Bs=n(61),Hs=Object(v.createElement)(de.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(v.createElement)(de.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));function qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zs(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=this.props,r=n.path,a=n.query,i=n.config,c=n.onFilterSelect,s=Object(P.h)(a),l=zs(o()({},i.param,(i.defaultValue||"all")===e?void 0:e),t);i.staticParams.forEach((function(e){l[e]=a[e]})),Object(P.k)(l,r,s),c(l)}},{key:"onTagChange",value:function(e,t,n,r){var a=Object(_.last)(r),i=e.value,c=e.settings.param;a?(this.update(i,o()({},c,a.key)),t()):this.update(n.defaultValue||"all"),this.updateSelectedTag([a])}},{key:"renderButton",value:function(e,t,n){var r=this;if(e.component){var o=e.settings,a=o.type,i=o.labels,c=o.autocompleter,s=this.getFilter().value===e.value?this.state.selectedTag:null;return Object(v.createElement)($e,{autocompleter:c,className:"woocommerce-filters-filter__search",type:a,placeholder:i.placeholder,selected:s?[s]:[],onChange:Object(_.partial)(this.onTagChange,e,t,n),inlineTags:!0,staticResults:!0})}var l=Object(_.partial)(this.selectSubFilter,e.value),u=this.getFilter(),d=u.value===e.value||u.path&&Object(_.includes)(u.path,e.value);return Object(v.createElement)(w.Button,{className:"woocommerce-filters-filter__button",onClick:function(n){d?t(n):e.subFilters?l(n):function(n){t(n),r.update(e.value,e.query||{}),r.setState({selectedTag:null})}(n)}},e.label)}},{key:"onContentMount",value:function(e){var t=this.state.nav,n=t.length&&this.getFilter(t[t.length-1])?1:0,r=Bs.focus.tabbable.find(e)[n];setTimeout((function(){r.focus()}),0)}},{key:"render",value:function(){var e=this,t=this.props.config,n=this.state,r=n.nav,o=n.animate,a=this.getVisibleFilters(t.filters,r),i=!!r.length&&this.getFilter(r[r.length-1]),c=this.getFilter();return Object(v.createElement)("div",{className:"woocommerce-filters-filter"},t.label&&Object(v.createElement)("span",{className:"woocommerce-filters-label"},t.label,":"),Object(v.createElement)(w.Dropdown,{contentClassName:"woocommerce-filters-filter__content",position:"bottom",expandOnMobile:!0,headerTitle:Object(O.__)("filter report to show:","woocommerce-admin"),renderToggle:function(t){var n=t.isOpen,r=t.onToggle;return Object(v.createElement)(Fs,{onClick:r,isOpen:n,labels:e.getButtonLabel(c)})},renderContent:function(n){var s=n.onClose;return Object(v.createElement)(Xt,{animationKey:r,animate:o,onExited:e.onContentMount},(function(){return Object(v.createElement)("ul",{className:"woocommerce-filters-filter__content-list"},i&&Object(v.createElement)("li",{className:"woocommerce-filters-filter__content-list-item"},Object(v.createElement)(w.Button,{className:"woocommerce-filters-filter__button",onClick:e.goBack},Object(v.createElement)(ue,{icon:Hs}),i.label)),a.map((function(n){return Object(v.createElement)("li",{key:n.value,className:q()("woocommerce-filters-filter__content-list-item",{"is-selected":c.value===n.value||c.path&&Object(_.includes)(c.path,n.value)})},e.renderButton(n,s,t))})))}))}}))}}]),a}(v.Component);Vs.propTypes={config:S.a.shape({label:S.a.string,staticParams:S.a.array.isRequired,param:S.a.string.isRequired,defaultValue:S.a.string,showFilters:S.a.func.isRequired,filters:S.a.arrayOf(S.a.shape({chartMode:S.a.oneOf(["item-comparison","time-comparison"]),component:S.a.string,label:S.a.string,path:S.a.string,subFilters:S.a.array,value:S.a.string.isRequired}))}).isRequired,path:S.a.string.isRequired,query:S.a.object,onFilterSelect:S.a.func},Vs.defaultProps={query:{},onFilterSelect:function(){}};var Ks=Vs,Ws=n(164),Gs=n(358),Ys=n.n(Gs),$s=n(280),Qs=n.n($s),Js=function(e){var t,n,r,o,a=e.alt,i=e.title,c=e.size,s=e.user,l=e.className,u=q()("woocommerce-gravatar",l,{"is-placeholder":!s}),d=a||s&&(s.display_name||s.name)||"",f="https://www.gravatar.com/avatar/0?s="+c+"&d=mp";return s&&(t=Object(_.isString)(s)?(o=s,"https://www.gravatar.com/avatar/"+Qs()(o)):s.avatar_URLs[96],n=Ys.a.parse(t),(r=Object(Ws.parse)(n.query)).s=c,r.d="mp",n.search=Object(Ws.stringify)(r),f=Ys.a.format(n)),Object(v.createElement)("img",{alt:d,title:i,className:u,src:f,width:c,height:c})};Js.propTypes={user:S.a.oneOfType([S.a.object,S.a.string]),alt:S.a.string,title:S.a.string,size:S.a.number,className:S.a.string},Js.defaultProps={size:60};Object(v.createElement)(de.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(v.createElement)(de.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));function Zs(e){var t=e.href;return e.linkType||(t?"external":null)}function Xs(e){var t=e.item,n=t.before,r=t.title,o=t.after,a=t.content,i=t.onClick,c=t.href,s=t.target,l=t.listItemTag,u="function"==typeof i||c,d=c?L:"div",f={className:"woocommerce-list__item-inner",onClick:"function"==typeof i?i:null,"aria-disabled":u?"false":null,tabIndex:u?"0":null,role:u?"menuitem":null,onKeyDown:function(e){return u?function(e,t){"function"==typeof t&&e.keyCode===X.ENTER&&t()}(e,i):null},target:c?s:null,type:Zs(t),href:c,"data-list-item-tag":l};return Object(v.createElement)(d,f,n&&Object(v.createElement)("div",{className:"woocommerce-list__item-before"},n),Object(v.createElement)("div",{className:"woocommerce-list__item-text"},Object(v.createElement)("span",{className:"woocommerce-list__item-title"},r),a&&Object(v.createElement)("span",{className:"woocommerce-list__item-content"},a)),o&&Object(v.createElement)("div",{className:"woocommerce-list__item-after"},o))}v.Component,Xs.propTypes={item:S.a.shape({after:S.a.node,before:S.a.node,className:S.a.string,content:S.a.oneOfType([S.a.string,S.a.node]),href:S.a.string,onClick:S.a.func,target:S.a.string,title:S.a.oneOfType([S.a.string,S.a.node])}).isRequired};S.a.string,S.a.arrayOf(S.a.shape({after:S.a.node,before:S.a.node,className:S.a.string,content:S.a.oneOfType([S.a.string,S.a.node]),href:S.a.string,onClick:S.a.func,target:S.a.string,title:S.a.oneOfType([S.a.string,S.a.node]),key:S.a.string}));var el=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){var e;return s()(this,o),(e=r.apply(this,arguments)).onClick=e.onClick.bind(f()(e)),e.onFocusFormToggle=e.onFocusFormToggle.bind(f()(e)),e.onKeyDown=e.onKeyDown.bind(f()(e)),e.container=Object(v.createRef)(),e}return u()(o,[{key:"onClick",value:function(e){var t=this.props,n=t.isClickable,r=t.onInvoke;n&&(e.preventDefault(),r())}},{key:"onKeyDown",value:function(e){e.target.isSameNode(e.currentTarget)&&(e.keyCode!==X.ENTER&&e.keyCode!==X.SPACE||(e.preventDefault(),this.props.onInvoke()),e.keyCode===X.UP&&e.preventDefault(),e.keyCode===X.DOWN&&(e.preventDefault(),(e.target.nextSibling||e.target.parentNode.querySelector(".woocommerce-ellipsis-menu__item")).focus()))}},{key:"onFocusFormToggle",value:function(){this.container.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.checked,n=e.children;return e.isCheckbox?Object(v.createElement)("div",{"aria-checked":t,ref:this.container,role:"menuitemcheckbox",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},Object(v.createElement)(w.BaseControl,{className:"components-toggle-control"},Object(v.createElement)(w.FormToggle,{"aria-hidden":"true",checked:t,onChange:this.props.onInvoke,onFocus:this.onFocusFormToggle,onClick:function(e){return e.stopPropagation()},tabIndex:"-1"}),n)):Object(v.createElement)("div",{role:"menuitem",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},n)}}]),o}(v.Component);el.propTypes={checked:S.a.bool,children:S.a.node,isCheckbox:S.a.bool,isClickable:S.a.bool,onInvoke:S.a.func.isRequired},el.defaultProps={isClickable:!1,isCheckbox:!1};var tl=el,nl=function(e){var t=e.children;return Object(v.createElement)("div",{className:"woocommerce-ellipsis-menu__title"},t)};nl.propTypes={children:S.a.node};var rl=nl;S.a.object.isRequired,S.a.string,S.a.object;var ol=Object(v.createElement)(de.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(v.createElement)(de.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var al=[25,50,75,100],il=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state={inputValue:t.props.page},t.previousPage=t.previousPage.bind(f()(t)),t.nextPage=t.nextPage.bind(f()(t)),t.onInputChange=t.onInputChange.bind(f()(t)),t.onInputBlur=t.onInputBlur.bind(f()(t)),t.perPageChange=t.perPageChange.bind(f()(t)),t.selectInputValue=t.selectInputValue.bind(f()(t)),t}return u()(o,[{key:"previousPage",value:function(e){e.stopPropagation();var t=this.props,n=t.page,r=t.onPageChange;n-1<1||r(n-1,"previous")}},{key:"nextPage",value:function(e){e.stopPropagation();var t=this.props,n=t.page,r=t.onPageChange;n+1>this.pageCount||r(n+1,"next")}},{key:"perPageChange",value:function(e){var t=this.props,n=t.onPerPageChange,r=t.onPageChange,o=t.total,a=t.page;n(parseInt(e,10));var i=Math.ceil(o/parseInt(e,10));a>i&&r(i)}},{key:"onInputChange",value:function(e){this.setState({inputValue:e.target.value})}},{key:"onInputBlur",value:function(e){var t=this.props,n=t.onPageChange,r=t.page,o=parseInt(e.target.value,10);o!==r&&Number.isFinite(o)&&o>0&&this.pageCount&&this.pageCount>=o&&n(o,"goto")}},{key:"selectInputValue",value:function(e){e.target.select()}},{key:"renderPageArrows",value:function(){var e=this.props,t=e.page,n=e.showPageArrowsLabel;if(this.pageCount<=1)return null;var r=q()("woocommerce-pagination__link",{"is-active":t>1}),o=q()("woocommerce-pagination__link",{"is-active":t1),onClick:this.previousPage,label:Object(O.__)("Previous Page","woocommerce-admin")},Object(v.createElement)(ue,{icon:Hs})),Object(v.createElement)(w.Button,{className:o,disabled:!(tthis.pageCount,r=q()("woocommerce-pagination__page-picker-input",{"has-error":n}),o=Object(_.uniqueId)("woocommerce-pagination-page-picker-");return Object(v.createElement)("div",{className:"woocommerce-pagination__page-picker"},Object(v.createElement)("label",{htmlFor:o,className:"woocommerce-pagination__page-picker-label"},Object(O.__)("Go to page","woocommerce-admin"),Object(v.createElement)("input",{id:o,className:r,"aria-invalid":n,type:"number",onClick:this.selectInputValue,onChange:this.onInputChange,onBlur:this.onInputBlur,value:t,min:1,max:this.pageCount})))}},{key:"renderPerPagePicker",value:function(){var e=al.map((function(e){return{value:e,label:e}}));return Object(v.createElement)("div",{className:"woocommerce-pagination__per-page-picker"},Object(v.createElement)(w.SelectControl,{label:Object(O.__)("Rows per page","woocommerce-admin"),value:this.props.perPage,onChange:this.perPageChange,options:e}))}},{key:"render",value:function(){var e=this.props,t=e.total,n=e.perPage,r=e.className,o=e.showPagePicker,a=e.showPerPagePicker;this.pageCount=Math.ceil(t/n);var i=q()("woocommerce-pagination",r);return this.pageCount<=1?t>al[0]&&Object(v.createElement)("div",{className:i},this.renderPerPagePicker())||null:Object(v.createElement)("div",{className:i},this.renderPageArrows(),o&&this.renderPagePicker(),a&&this.renderPerPagePicker())}}]),o}(v.Component);il.propTypes={page:S.a.number.isRequired,onPageChange:S.a.func,perPage:S.a.number.isRequired,onPerPageChange:S.a.func,total:S.a.number.isRequired,className:S.a.string,showPagePicker:S.a.bool,showPerPagePicker:S.a.bool,showPageArrowsLabel:S.a.bool},il.defaultProps={onPageChange:_.noop,onPerPageChange:_.noop,showPagePicker:!0,showPerPagePicker:!0,showPageArrowsLabel:!0};var cl=il,sl=n(10),ll=n(359);var ul=function(e){h()(a,e);var t,n,r,o=(n=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g()(n);if(r){var o=g()(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return y()(this,e)});function a(){var e;return s()(this,a),(e=o.apply(this,arguments)).state={hasErrors:!1},e.installAndActivate=e.installAndActivate.bind(f()(e)),e.skipInstaller=e.skipInstaller.bind(f()(e)),e.handleErrors=e.handleErrors.bind(f()(e)),e.handleSuccess=e.handleSuccess.bind(f()(e)),e}return u()(a,[{key:"componentDidMount",value:function(){this.props.autoInstall&&this.installAndActivate()}},{key:"installAndActivate",value:(t=G()(J.a.mark((function e(t){var n,r,o,a,i=this;return J.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.preventDefault(),n=this.props,r=n.installAndActivatePlugins,o=n.isRequesting,a=n.pluginSlugs,!o){e.next=4;break}return e.abrupt("return",!1);case 4:r(a).then((function(e){i.handleSuccess(e.data.activated,e)})).catch((function(e){i.handleErrors(e.errors,e)}));case 5:case"end":return e.stop()}}),e,this)}))),function(_x){return t.apply(this,arguments)})},{key:"handleErrors",value:function(e,t){var n=this.props.onError;this.setState({hasErrors:!0}),n(e,t)}},{key:"handleSuccess",value:function(e,t){(0,this.props.onComplete)(e,t)}},{key:"skipInstaller",value:function(){this.props.onSkip()}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.skipText,r=e.autoInstall,o=e.pluginSlugs,a=e.onAbort,i=e.abortText;return this.state.hasErrors?Object(v.createElement)(v.Fragment,null,Object(v.createElement)(w.Button,{isPrimary:!0,isBusy:t,onClick:this.installAndActivate},Object(O.__)("Retry","woocommerce-admin")),Object(v.createElement)(w.Button,{onClick:this.skipInstaller},Object(O.__)("Continue without installing","woocommerce-admin"))):r?null:0===o.length?Object(v.createElement)(v.Fragment,null,Object(v.createElement)(w.Button,{isPrimary:!0,isBusy:t,onClick:this.skipInstaller},Object(O.__)("Continue","woocommerce-admin"))):Object(v.createElement)(v.Fragment,null,Object(v.createElement)(w.Button,{isBusy:t,isPrimary:!0,onClick:this.installAndActivate},Object(O.__)("Install & enable","woocommerce-admin")),Object(v.createElement)(w.Button,{isTertiary:!0,onClick:this.skipInstaller},n||Object(O.__)("No thanks","woocommerce-admin")),a&&Object(v.createElement)(w.Button,{isTertiary:!0,onClick:a},i||Object(O.__)("Abort","woocommerce-admin")))}}]),a}(v.Component);ul.propTypes={onComplete:S.a.func.isRequired,onError:S.a.func,onSkip:S.a.func,skipText:S.a.string,autoInstall:S.a.bool,pluginSlugs:S.a.arrayOf(S.a.string),onAbort:S.a.func,abortText:S.a.string},ul.defaultProps={autoInstall:!1,onError:function(){},onSkip:function(){},pluginSlugs:["jetpack","woocommerce-services"]},Object(Z.compose)(Object(sl.withSelect)((function(e){var t=e(ll.PLUGINS_STORE_NAME),n=t.getActivePlugins,r=t.getInstalledPlugins,o=t.isPluginsRequesting;return{isRequesting:o("activatePlugins")||o("installPlugins"),activePlugins:n(),installedPlugins:r()}})),Object(sl.withDispatch)((function(e){return{installAndActivatePlugins:e(ll.PLUGINS_STORE_NAME).installAndActivatePlugins}})))(ul);var dl=n(512),fl=n.n(dl);var pl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"stars",value:function(e){for(var t=this.props,n=t.size,r=t.totalStars,o={width:n+"px",height:n+"px"},a=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:e,n=Object(_.groupBy)(e,"parent"),r=Object(_.keyBy)(t,"id"),o=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t.parent)return t.name?[t.name]:[];var n=e(r[t.parent]);return[].concat(i()(n),[t.name])},a=function e(t){return t.map((function(t){var a=n[t.id];return delete n[t.id],gl(gl({},t),{},{breadcrumbs:o(r[t.parent]),children:a&&a.length?e(a):[]})}))},c=a(n[0]||[]);return delete n[0],Object(_.forEach)(n,(function(e){c.push.apply(c,i()(a(e||[])))})),c}var Ol=function(e){var t=e.countLabel,n=e.className,r=e.depth,o=void 0===r?0:r,a=e.controlId,i=void 0===a?"":a,c=e.item,s=e.isSelected,l=e.isSingle,u=e.onSelect,d=e.search,f=void 0===d?"":d,p=R()(e,["countLabel","className","depth","controlId","item","isSelected","isSingle","onSelect","search"]),h=!Object(_.isNil)(t)||!Object(_.isNil)(c.count),m=[n,"woocommerce-search-list__item"];m.push("depth-".concat(o)),l&&m.push("is-radio-button"),h&&m.push("has-count");var y,b=c.breadcrumbs&&c.breadcrumbs.length,g=p.name||"search-list-item-".concat(i),O="".concat(g,"-").concat(c.id);return Object(v.createElement)("label",{htmlFor:O,className:m.join(" ")},l?Object(v.createElement)("input",T()({type:"radio",id:O,name:g,value:c.value,onChange:u(c),checked:s,className:"woocommerce-search-list__item-input"},p)):Object(v.createElement)("input",T()({type:"checkbox",id:O,name:g,value:c.value,onChange:u(c),checked:s,className:"woocommerce-search-list__item-input"},p)),Object(v.createElement)("span",{className:"woocommerce-search-list__item-label"},b?Object(v.createElement)("span",{className:"woocommerce-search-list__item-prefix"},1===(y=c.breadcrumbs).length?Object(_.first)(y):2===y.length?Object(_.first)(y)+" › "+Object(_.last)(y):Object(_.first)(y)+" … "+Object(_.last)(y)):null,Object(v.createElement)("span",{className:"woocommerce-search-list__item-name"},function(e,t){if(!t)return e;var n=new RegExp(Object(_.escapeRegExp)(t),"ig");return e.split(n).map((function(e,n){return 0===n?e:Object(v.createElement)(v.Fragment,{key:n},Object(v.createElement)("strong",null,t),e)}))}(c.name,f))),!!h&&Object(v.createElement)("span",{className:"woocommerce-search-list__item-count"},t||c.count))};Ol.propTypes={className:S.a.string,countLabel:S.a.node,controlId:S.a.node,depth:S.a.number,item:S.a.object,name:S.a.string,isSelected:S.a.bool,isSingle:S.a.bool,onSelect:S.a.func,search:S.a.string};var wl=Ol;function _l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kl(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,r=this.props,o=r.isSingle,a=r.search,i=r.instanceId,c=this.props.renderItem||this.defaultRenderItem;return e?e.map((function(e){return Object(v.createElement)(v.Fragment,{key:e.id},Object(v.createElement)("li",null,c({item:e,isSelected:t.isSelected(e),onSelect:t.onSelect,isSingle:o,search:a,depth:n,controlId:i})),t.renderList(e.children,n+1))})):null}},{key:"renderListSection",value:function(){var e=this.props,t=e.isLoading,n=e.search,r=kl(kl({},Sl),this.props.messages);if(t)return Object(v.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(v.createElement)(w.Spinner,null));var o=this.getFilteredList(this.props.list,n);return o.length?Object(v.createElement)("ul",{className:"woocommerce-search-list__list"},this.renderList(o)):Object(v.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(v.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(v.createElement)(yl.a,{role:"img","aria-hidden":"true",focusable:"false"})),Object(v.createElement)("span",{className:"woocommerce-search-list__not-found-text"},n?Object(O.sprintf)(r.noResults,n):r.noItems))}},{key:"renderSelectedSection",value:function(){var e=this,t=this.props,n=t.isLoading,r=t.isSingle,o=t.selected,a=kl(kl({},Sl),this.props.messages);if(n||r||!o)return null;var i=o.length;return Object(v.createElement)("div",{className:"woocommerce-search-list__selected"},Object(v.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(v.createElement)("strong",null,a.selected(i)),i>0?Object(v.createElement)(w.Button,{isLink:!0,isDestructive:!0,onClick:this.onClear,"aria-label":a.clear},Object(O.__)("Clear all","woocommerce-admin")):null),i>0?Object(v.createElement)("ul",null,o.map((function(t,n){return Object(v.createElement)("li",{key:n},Object(v.createElement)(oe,{label:t.name,id:t.id,remove:e.onRemove}))}))):null)}},{key:"render",value:function(){var e=this.props,t=e.className,n=void 0===t?"":t,r=e.isCompact,o=e.search,a=e.setState,i=kl(kl({},Sl),this.props.messages);return Object(v.createElement)("div",{className:q()("woocommerce-search-list",n,{"is-compact":r})},this.renderSelectedSection(),Object(v.createElement)("div",{className:"woocommerce-search-list__search"},Object(v.createElement)(w.TextControl,{label:i.search,type:"search",value:o,onChange:function(e){return a({search:e})}})),this.renderListSection())}}]),o}(v.Component);jl.propTypes={className:S.a.string,isCompact:S.a.bool,isHierarchical:S.a.bool,isLoading:S.a.bool,isSingle:S.a.bool,list:S.a.arrayOf(S.a.shape({id:S.a.number,name:S.a.string})),messages:S.a.shape({clear:S.a.string,noItems:S.a.string,noResults:S.a.string,search:S.a.string,selected:S.a.func,updated:S.a.string}),onChange:S.a.func.isRequired,onSearch:S.a.func,renderItem:S.a.func,selected:S.a.array.isRequired,search:S.a.string,setState:S.a.func,debouncedSpeak:S.a.func,instanceId:S.a.number};var El=Object(Z.compose)([Object(Z.withState)({search:""}),w.withSpokenMessages,Z.withInstanceId])(jl);(function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.menu,r=e.title,o=q()("woocommerce-section-header",this.props.className);return Object(v.createElement)("div",{className:o},Object(v.createElement)(pt,{className:"woocommerce-section-header__title woocommerce-section-header__header-item"},r),Object(v.createElement)("hr",{role:"presentation"}),t&&Object(v.createElement)("div",{className:"woocommerce-section-header__actions woocommerce-section-header__header-item"},t),n&&Object(v.createElement)("div",{className:"woocommerce-section-header__menu woocommerce-section-header__header-item"},n))}}]),o}(v.Component)).propTypes={className:S.a.string,menu:ds(us),title:S.a.oneOfType([S.a.string,S.a.node]).isRequired};var Cl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).scrollTo=t.scrollTo.bind(f()(t)),t}return u()(o,[{key:"componentDidMount",value:function(){setTimeout(this.scrollTo,250)}},{key:"scrollTo",value:function(){var e=this.props.offset;this.ref.current&&this.ref.current.offsetTop?window.scrollTo(0,this.ref.current.offsetTop+parseInt(e,10)):setTimeout(this.scrollTo,250)}},{key:"render",value:function(){var e=this.props.children;return this.ref=Object(v.createRef)(),Object(v.createElement)("span",{ref:this.ref},e)}}]),o}(v.Component);Cl.propTypes={offset:S.a.string},Cl.defaultProps={offset:"0"};var Dl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props.className,t=q()("woocommerce-spinner",e);return Object(v.createElement)("svg",{className:t,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)("circle",{className:"woocommerce-spinner__circle",fill:"none",strokeWidth:"5",strokeLinecap:"round",cx:"50",cy:"50",r:"30"}))}}]),o}(v.Component);Dl.propTypes={className:S.a.string};var Pl=Dl,xl=function(){return Object(v.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"14",height:"12"},Object(v.createElement)("path",{d:"M6.59631 11.9062L3.46881 8.77875L2.40381 9.83625L6.59631 14.0287L15.5963 5.02875L14.5388 3.97125L6.59631 11.9062Z",fill:"white"})),Object(v.createElement)("g",{mask:"url(#mask0)"},Object(v.createElement)("rect",{width:"18",height:"18",fill:"white"})))};var Fl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"renderCurrentStepContent",value:function(){var e=this.props,t=e.currentStep,n=e.steps.find((function(e){return t===e.key}));return n.content?Object(v.createElement)("div",{className:"woocommerce-stepper_content"},n.content):null}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.currentStep,o=t.steps,a=t.isVertical,i=t.isPending,c=o.findIndex((function(e){return r===e.key})),s=q()("woocommerce-stepper",n,{"is-vertical":a});return Object(v.createElement)("div",{className:s},Object(v.createElement)("div",{className:"woocommerce-stepper__steps"},o.map((function(t,n){var o=t.key,s=t.label,l=t.description,u=t.isComplete,d=t.onClick,f=o===r,p=q()("woocommerce-stepper__step",{"is-active":f,"is-complete":void 0!==u?u:c>n}),h=f&&i?Object(v.createElement)(Pl,null):Object(v.createElement)("div",{className:"woocommerce-stepper__step-icon"},Object(v.createElement)("span",{className:"woocommerce-stepper__step-number"},n+1),Object(v.createElement)(xl,null)),m="function"==typeof d?"button":"div";return Object(v.createElement)(v.Fragment,{key:o},Object(v.createElement)("div",{className:p},Object(v.createElement)(m,{className:"woocommerce-stepper__step-label-wrapper",onClick:"function"==typeof d?function(){return d(o)}:null},h,Object(v.createElement)("div",{className:"woocommerce-stepper__step-text"},Object(v.createElement)("span",{className:"woocommerce-stepper__step-label"},s),l&&Object(v.createElement)("span",{className:"woocommerce-stepper__step-description"},l))),f&&a&&e.renderCurrentStepContent()),!a&&Object(v.createElement)("div",{className:"woocommerce-stepper__step-divider"}))}))),!a&&this.renderCurrentStepContent())}}]),o}(v.Component);function Tl(e){return e<10?"has-".concat(e,"-items"):"has-10-items"}Fl.propTypes={className:S.a.string,currentStep:S.a.string.isRequired,steps:S.a.arrayOf(S.a.shape({content:S.a.node,description:S.a.oneOfType([S.a.string,S.a.array]),isComplete:S.a.bool,key:S.a.string.isRequired,label:S.a.string.isRequired,onClick:S.a.func})).isRequired,isVertical:S.a.bool,isPending:S.a.bool},Fl.defaultProps={isVertical:!1,isPending:!1};var Ml=function(e){var t=e.label,n=e.orientation,r=e.itemCount,a=e.items,i=Object(_.uniqueId)("woocommerce-summary-helptext-"),c=Tl(r),s=q()("woocommerce-summary",o()({},c,"horizontal"===n));return Object(v.createElement)(w.NavigableMenu,{"aria-label":t,"aria-describedby":i,orientation:n,stopNavigationEvents:!0},Object(v.createElement)("p",{id:i,className:"screen-reader-text"},Object(O.__)("List of data points available for filtering. Use arrow keys to cycle through the list. Click a data point for a detailed report.","woocommerce-admin")),Object(v.createElement)("ul",{className:s},a))};Ml.propTypes={label:S.a.string,orientation:S.a.oneOf(["vertical","horizontal"]).isRequired,items:S.a.node.isRequired,itemCount:S.a.number.isRequired};var Rl=Ml,Il=function(e){var t=e.children,n=e.isDropdownBreakpoint,r=e.label,o=t({}),a=v.Children.count(o)||1,i=n?"vertical":"horizontal",c=Object(v.createElement)(Rl,{label:r,orientation:i,itemCount:a,items:o});if(!n||a<2)return c;var s=o.find((function(e){return!!e.props.selected}));return s?Object(v.createElement)(w.Dropdown,{className:"woocommerce-summary",position:"bottom",headerTitle:r,renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(v.cloneElement)(s,{onToggle:n,isOpen:t})},renderContent:function(e){return Object(v.createElement)(Rl,{label:r,orientation:i,itemCount:a,items:t(e)})}}):c};Il.propTypes={children:S.a.func.isRequired,label:S.a.string},Il.defaultProps={label:Object(O.__)("Performance Indicators","woocommerce-admin")},Object(En.withViewportMatch)({isDropdownBreakpoint:"< large"})(Il);var Al=function(e){var t=e.className;return Object(v.createElement)("li",{"data-testid":"summary-placeholder",className:q()("woocommerce-summary__item-container is-placeholder",t)},Object(v.createElement)("div",{className:"woocommerce-summary__item"},Object(v.createElement)("div",{className:"woocommerce-summary__item-label"}),Object(v.createElement)("div",{className:"woocommerce-summary__item-data"},Object(v.createElement)("div",{className:"woocommerce-summary__item-value"}),Object(v.createElement)("div",{className:"woocommerce-summary__item-delta"}))))},Nl=function(e){h()(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function a(){return s()(this,a),r.apply(this,arguments)}return u()(a,[{key:"render",value:function(){var e,t=this.props.isDropdownBreakpoint,n=t?1:this.props.numberOfItems,r=Tl(n),a=q()("woocommerce-summary",(e={},o()(e,r,!t),o()(e,"is-placeholder",!0),e));return Object(v.createElement)("ul",{className:a,"aria-hidden":"true"},Object(_.range)(n).map((function(e){return Object(v.createElement)(Al,{key:e})})))}}]),a}(v.Component);Nl.propTypes={numberOfItems:S.a.number.isRequired},Nl.defaultProps={numberOfRows:5},Object(En.withViewportMatch)({isDropdownBreakpoint:"< large"})(Nl);var Ll=n(514),Ul=n.n(Ll),Bl=function(e){var t,n=e.children,r=e.delta,o=e.href,a=e.hrefType,i=e.isOpen,c=e.label,s=e.onToggle,l=e.prevLabel,u=e.prevValue,d=e.reverseTrend,f=e.selected,p=e.value,h=e.onLinkClickCallback,m=q()("woocommerce-summary__item-container",{"is-dropdown-button":s,"is-dropdown-expanded":i}),y=q()("woocommerce-summary__item",{"is-selected":f,"is-good-trend":d?r<0:r>0,"is-bad-trend":d?r>0:r<0}),b=r>0?Object(O.sprintf)(Object(O.__)("Up %f%% from %s","woocommerce-admin"),r,l):Object(O.sprintf)(Object(O.__)("Down %f%% from %s","woocommerce-admin"),Math.abs(r),l);r||(b=Object(O.sprintf)(Object(O.__)("No change from %s","woocommerce-admin"),l));var g={className:y,"aria-current":f?"page":null};if(s||o){var k=!!s;t=k?w.Button:L,k?(g.onClick=s,g["aria-expanded"]=i):(g.href=o,g.role="menuitem",g.onClick=h,g.type=a)}else t="div";return Object(v.createElement)("li",{className:m},Object(v.createElement)(t,g,Object(v.createElement)("div",{className:"woocommerce-summary__item-label"},Object(v.createElement)(x,{variant:"body.small"},c)),Object(v.createElement)("div",{className:"woocommerce-summary__item-data"},Object(v.createElement)("div",{className:"woocommerce-summary__item-value"},Object(v.createElement)(x,{variant:"title.small"},Object(_.isNil)(p)?Object(O.__)("N/A","woocommerce-admin"):p)),Object(v.createElement)(w.Tooltip,{text:Object(_.isNil)(u)?Object(O.__)("N/A","woocommerce-admin"):"".concat(l," ").concat(u),position:"top center"},Object(v.createElement)("div",{className:"woocommerce-summary__item-delta",role:"presentation","aria-label":b},Object(v.createElement)(x,{variant:"caption"},Object(_.isNil)(r)?Object(O.__)("N/A","woocommerce-admin"):Object(O.sprintf)(Object(O.__)("%f%%","woocommerce-admin"),r))))),s?Object(v.createElement)(Ul.a,{className:"woocommerce-summary__toggle",size:24}):null,n))};Bl.propTypes={delta:S.a.number,href:S.a.string,hrefType:S.a.oneOf(["wp-admin","wc-admin","external"]).isRequired,isOpen:S.a.bool,label:S.a.string.isRequired,onToggle:S.a.func,prevLabel:S.a.string,prevValue:S.a.oneOfType([S.a.number,S.a.string]),reverseTrend:S.a.bool,selected:S.a.bool,value:S.a.oneOfType([S.a.number,S.a.string]),onLinkClickCallback:S.a.func},Bl.defaultProps={href:"",hrefType:"wc-admin",isOpen:!1,prevLabel:Object(O.__)("Previous Period:","woocommerce-admin"),reverseTrend:!1,selected:!1,onLinkClickCallback:_.noop};var Hl=Object(v.createElement)(de.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)(de.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),ql=Object(v.createElement)(de.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)(de.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));var zl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state={tabIndex:null,isScrollableRight:!1,isScrollableLeft:!1},t.container=Object(v.createRef)(),t.sortBy=t.sortBy.bind(f()(t)),t.updateTableShadow=t.updateTableShadow.bind(f()(t)),t}return u()(o,[{key:"componentDidMount",value:function(){var e=this.container.current,t=e.scrollWidth>e.clientWidth;this.setState({tabIndex:t?"0":null}),this.updateTableShadow(),window.addEventListener("resize",this.updateTableShadow)}},{key:"componentDidUpdate",value:function(){this.updateTableShadow()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateTableShadow)}},{key:"sortBy",value:function(e){var t=this,n=this.props,r=n.headers,o=n.query;return function(){var n=o.orderby||Object(_.get)(Object(_.find)(r,{defaultSort:!0}),"key",!1),a=o.order||Object(_.get)(Object(_.find)(r,{key:n}),"defaultOrder","desc"),i="desc";e===n&&(i="desc"===a?"asc":"desc"),t.props.onSort(e,i)}}},{key:"updateTableShadow",value:function(){var e=this.container.current,t=this.state,n=t.isScrollableRight,r=t.isScrollableLeft,o=e.scrollWidth-e.scrollLeft<=e.offsetWidth;o&&n?this.setState({isScrollableRight:!1}):o||this.state.isScrollableRight||this.setState({isScrollableRight:!0});var a=e.scrollLeft<=0;a&&r?this.setState({isScrollableLeft:!1}):a||r||this.setState({isScrollableLeft:!0})}},{key:"render",value:function(){var e=this,t=this.props,n=t.ariaHidden,r=t.caption,o=t.classNames,a=t.headers,i=t.instanceId,c=t.query,s=t.rowHeader,l=t.rows,u=this.state,d=u.isScrollableRight,f=u.isScrollableLeft,p=u.tabIndex,h=q()("woocommerce-table__table",o,{"is-scrollable-right":d,"is-scrollable-left":f}),m=c.orderby||Object(_.get)(Object(_.find)(a,{defaultSort:!0}),"key",!1),y=c.order||Object(_.get)(Object(_.find)(a,{key:m}),"defaultOrder","desc"),b=!!l.length;return Object(v.createElement)("div",{className:h,ref:this.container,tabIndex:p,"aria-hidden":n,"aria-labelledby":"caption-".concat(i),role:"group",onScroll:this.updateTableShadow},Object(v.createElement)("table",null,Object(v.createElement)("caption",{id:"caption-".concat(i),className:"woocommerce-table__caption screen-reader-text"},r,"0"===p&&Object(v.createElement)("small",null,Object(O.__)("(scroll to see more)","woocommerce-admin"))),Object(v.createElement)("tbody",null,Object(v.createElement)("tr",null,a.map((function(t,n){var r=t.cellClassName,o=t.isLeftAligned,a=t.isSortable,c=t.isNumeric,s=t.key,l=t.label,u=t.screenReaderLabel,d="header-".concat(i,"-").concat(n),f={className:q()("woocommerce-table__header",r,{"is-left-aligned":o,"is-sortable":a,"is-sorted":m===s,"is-numeric":c})};a&&(f["aria-sort"]="none",m===s&&(f["aria-sort"]="asc"===y?"ascending":"descending"));var p=m===s&&"asc"!==y?Object(O.sprintf)(Object(O.__)("Sort by %s in ascending order","woocommerce-admin"),u||l):Object(O.sprintf)(Object(O.__)("Sort by %s in descending order","woocommerce-admin"),u||l),h=Object(v.createElement)(v.Fragment,null,Object(v.createElement)("span",{"aria-hidden":Boolean(u)},l),u&&Object(v.createElement)("span",{className:"screen-reader-text"},u));return Object(v.createElement)("th",T()({role:"columnheader",scope:"col",key:n},f),a?Object(v.createElement)(v.Fragment,null,Object(v.createElement)(w.Button,{"aria-describedby":d,onClick:b?e.sortBy(s):_.noop},m===s&&"asc"===y?Object(v.createElement)(ue,{icon:Hl}):Object(v.createElement)(ue,{icon:ql}),h),Object(v.createElement)("span",{className:"screen-reader-text",id:d},p)):h)}))),b?l.map((function(e,t){return Object(v.createElement)("tr",{key:t},e.map((function(e,t){var n=a[t],r=n.cellClassName,o=n.isLeftAligned,i=n.isNumeric,c=s===t,l=c?"th":"td",u=q()("woocommerce-table__item",r,{"is-left-aligned":o,"is-numeric":i,"is-sorted":m===a[t].key});return Object(v.createElement)(l,{scope:c?"row":null,key:t,className:u},function(e){return e.display||null}(e))})))})):Object(v.createElement)("tr",null,Object(v.createElement)("td",{className:"woocommerce-table__empty-item",colSpan:a.length},Object(O.__)("No data to display","woocommerce-admin"))))))}}]),o}(v.Component);zl.propTypes={ariaHidden:S.a.bool,caption:S.a.string.isRequired,className:S.a.string,headers:S.a.arrayOf(S.a.shape({defaultSort:S.a.bool,defaultOrder:S.a.string,isLeftAligned:S.a.bool,isNumeric:S.a.bool,isSortable:S.a.bool,key:S.a.string,label:S.a.node,required:S.a.bool,screenReaderLabel:S.a.string})),onSort:S.a.func,query:S.a.object,rows:S.a.arrayOf(S.a.arrayOf(S.a.shape({display:S.a.node,value:S.a.oneOfType([S.a.string,S.a.number,S.a.bool])}))).isRequired,rowHeader:S.a.oneOfType([S.a.number,S.a.bool])},zl.defaultProps={ariaHidden:!1,headers:[],onSort:_.noop,query:{},rowHeader:0};var Vl=Object(Z.withInstanceId)(zl);var Kl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this,t=this.props,n=t.numberOfRows,r=R()(t,["numberOfRows"]),o=Object(_.range)(n).map((function(){return e.props.headers.map((function(){return{display:Object(v.createElement)("span",{className:"is-placeholder"})}}))}));return Object(v.createElement)(Vl,T()({ariaHidden:!0,classNames:"is-loading",rows:o},r))}}]),o}(v.Component);Kl.propTypes={query:S.a.object,caption:S.a.string.isRequired,headers:S.a.arrayOf(S.a.shape({hiddenByDefault:S.a.bool,defaultSort:S.a.bool,isSortable:S.a.bool,key:S.a.string,label:S.a.node,required:S.a.bool})),numberOfRows:S.a.number},Kl.defaultProps={numberOfRows:5};var Wl=Kl,Gl=function(e){var t=e.data;return Object(v.createElement)("ul",{className:"woocommerce-table__summary"},t.map((function(e,t){var n=e.label,r=e.value;return Object(v.createElement)("li",{className:"woocommerce-table__summary-item",key:t},Object(v.createElement)("span",{className:"woocommerce-table__summary-value"},r),Object(v.createElement)("span",{className:"woocommerce-table__summary-label"},n))})))};Gl.propTypes={data:S.a.array};var Yl=Gl;var $l=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;s()(this,o);var n=(t=r.call(this,e)).getShowCols(e.headers);return t.state={showCols:n},t.onColumnToggle=t.onColumnToggle.bind(f()(t)),t.onPageChange=t.onPageChange.bind(f()(t)),t}return u()(o,[{key:"componentDidUpdate",value:function(e){var t=e.headers,n=e.query,r=this.props,o=r.headers,a=r.onColumnsChange,i=r.query,c=this.state.showCols;if(Object(_.isEqual)(o,t)||this.setState({showCols:this.getShowCols(o)}),i.orderby!==n.orderby&&!c.includes(i.orderby)){var s=c.concat(i.orderby);this.setState({showCols:s}),a(s)}}},{key:"getShowCols",value:function(e){return e.map((function(e){var t=e.key,n=e.visible;return!(void 0!==n&&!n)&&t})).filter(Boolean)}},{key:"getVisibleHeaders",value:function(){var e=this.props.headers,t=this.state.showCols;return e.filter((function(e){var n=e.key;return t.includes(n)}))}},{key:"getVisibleRows",value:function(){var e=this.props,t=e.headers,n=e.rows,r=this.state.showCols;return n.map((function(e){return t.map((function(t,n){var o=t.key;return r.includes(o)&&e[n]})).filter(Boolean)}))}},{key:"onColumnToggle",value:function(e){var t=this,n=this.props,r=n.headers,o=n.query,a=n.onQueryChange,c=n.onColumnsChange;return function(){t.setState((function(t){if(t.showCols.includes(e)){if(o.orderby===e){var n=Object(_.find)(r,{defaultSort:!0})||Object(_.first)(r)||{};a("sort")(n.key,"desc")}var s=Object(_.without)(t.showCols,e);return c(s,e),{showCols:s}}var l=[].concat(i()(t.showCols),[e]);return c(l,e),{showCols:l}}))}}},{key:"onPageChange",value:function(){var e=this.props,t=e.onPageChange,n=e.onQueryChange;t&&t.apply(void 0,arguments),n&&n("paged").apply(void 0,arguments)}},{key:"render",value:function(){var e=this,t=this.props,n=t.actions,r=t.className,o=t.hasSearch,a=t.isLoading,i=t.onQueryChange,c=t.onSort,s=t.query,l=t.rowHeader,u=t.rowsPerPage,d=t.showMenu,f=t.summary,p=t.title,h=t.totalRows,m=this.state.showCols,y=this.props.headers,b=this.getVisibleHeaders(),g=this.getVisibleRows(),_=q()("woocommerce-table",r,{"has-actions":!!n,"has-menu":d,"has-search":o});return Object(v.createElement)(w.Card,{className:_},Object(v.createElement)(w.CardHeader,null,Object(v.createElement)(w.__experimentalText,{variant:"title.small",as:"h2"},p),Object(v.createElement)("div",{className:"woocommerce-table__actions"},n),d&&Object(v.createElement)(us,{label:Object(O.__)("Choose which values to display","woocommerce-admin"),renderContent:function(){return Object(v.createElement)(v.Fragment,null,Object(v.createElement)(rl,null,Object(O.__)("Columns:","woocommerce-admin")),y.map((function(t){var n=t.key,r=t.label;return t.required?null:Object(v.createElement)(tl,{checked:m.includes(n),isCheckbox:!0,isClickable:!0,key:n,onInvoke:e.onColumnToggle(n)},r)})))}})),Object(v.createElement)(w.CardBody,{size:null},a?Object(v.createElement)(v.Fragment,null,Object(v.createElement)("span",{className:"screen-reader-text"},Object(O.__)("Your requested data is loading","woocommerce-admin")),Object(v.createElement)(Wl,{numberOfRows:u,headers:b,rowHeader:l,caption:p,query:s})):Object(v.createElement)(Vl,{rows:g,headers:b,rowHeader:l,caption:p,query:s,onSort:c||i("sort")})),Object(v.createElement)(w.CardFooter,{justify:"center"},Object(v.createElement)(cl,{key:parseInt(s.paged,10)||1,page:parseInt(s.paged,10)||1,perPage:u,total:h,onPageChange:this.onPageChange,onPerPageChange:i("per_page")}),f&&Object(v.createElement)(Yl,{data:f})))}}]),o}(v.Component);$l.propTypes={hasSearch:S.a.bool,headers:S.a.arrayOf(S.a.shape({hiddenByDefault:S.a.bool,defaultSort:S.a.bool,isSortable:S.a.bool,key:S.a.string,label:S.a.oneOfType([S.a.string,S.a.node]),required:S.a.bool})),ids:S.a.arrayOf(S.a.number),isLoading:S.a.bool,onQueryChange:S.a.func,onColumnsChange:S.a.func,onSort:S.a.func,query:S.a.object,rowHeader:S.a.oneOfType([S.a.number,S.a.bool]),rows:S.a.arrayOf(S.a.arrayOf(S.a.shape({display:S.a.node,value:S.a.oneOfType([S.a.string,S.a.number,S.a.bool])}))).isRequired,rowsPerPage:S.a.number.isRequired,showMenu:S.a.bool,summary:S.a.arrayOf(S.a.shape({label:S.a.node,value:S.a.oneOfType([S.a.string,S.a.number])})),title:S.a.string.isRequired,totalRows:S.a.number.isRequired},$l.defaultProps={isLoading:!1,onQueryChange:function(){return function(){}},onColumnsChange:function(){},onSort:void 0,query:{},rowHeader:0,rows:[],showMenu:!0};var Ql=function(e){var t=e.children,n=e.numberOfRows;return Object(v.createElement)("div",{className:"woocommerce-table is-empty",style:{"--number-of-rows":n}},t)};Ql.propTypes={numberOfRows:S.a.number},Ql.defaultProps={numberOfRows:5};var Jl=Object(w.withFocusOutside)(function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state={isFocused:!1},t}return u()(o,[{key:"handleFocusOutside",value:function(){this.setState({isFocused:!1})}},{key:"handleOnClick",value:function(e,t){this.setState({isFocused:!0}),"function"==typeof t&&t(e)}},{key:"render",value:function(){var e=this,t=this.state.isFocused,n=this.props,r=n.className,o=n.onClick,a=R()(n,["className","onClick"]),i=a.label,c=a.value,s=a.disabled,l=""===c,u=t&&!s;return Object(v.createElement)(w.TextControl,T()({className:q()("muriel-component","muriel-input-text",r,{disabled:s,empty:l,active:u,"with-value":!l}),placeholder:i,onClick:function(t){return e.handleOnClick(t,o)},onFocus:function(){return e.setState({isFocused:!0})}},a))}}]),o}(v.Component));Jl.propTypes={className:S.a.string,disabled:S.a.bool,label:S.a.string,onClick:S.a.func,value:S.a.string};var Zl=Jl,Xl=function(e){var t=e.item,n=e.className,r=e.clockFormat,o=q()("woocommerce-timeline-item",n),a=Object(ys.format)(r,t.date);return Object(v.createElement)("li",{className:o},Object(v.createElement)("div",{className:"woocommerce-timeline-item__top-border"}),Object(v.createElement)("div",{className:"woocommerce-timeline-item__title"},Object(v.createElement)("div",{className:"woocommerce-timeline-item__headline"},t.icon,Object(v.createElement)("span",null,t.headline)),Object(v.createElement)("span",{className:"woocommerce-timeline-item__timestamp"},t.hideTimestamp?null:a)),Object(v.createElement)("div",{className:"woocommerce-timeline-item__body"},(t.body||[]).map((function(e,t){return Object(v.createElement)("span",{key:"timeline-item-body-".concat(t)},e)}))))};Xl.propTypes={className:S.a.string,item:S.a.shape({date:S.a.instanceOf(Date).isRequired,icon:S.a.element.isRequired,headline:S.a.oneOfType([S.a.element,S.a.string]).isRequired,body:S.a.arrayOf(S.a.oneOfType([S.a.element,S.a.string])),hideTimestamp:S.a.bool,clockFormat:S.a.string}).isRequired},Xl.defaultProps={className:"",item:{}};var eu=Xl,tu=function(e,t){return e.date.getTime()-t.date.getTime()},nu=function(e,t){return t.date.getTime()-e.date.getTime()},ru=function(e){switch(e){case"asc":return tu;case"desc":default:return nu}},ou=function(e){var t=e.group,n=e.className,r=e.orderBy,o=e.clockFormat,a=q()("woocommerce-timeline-group",n);return Object(v.createElement)("li",{className:a},Object(v.createElement)("p",{className:"woocommerce-timeline-group__title"},t.title),Object(v.createElement)("ul",null,t.items.sort(ru(r)).map((function(e,n){var r=t.title+"-"+n;return Object(v.createElement)(eu,{key:r,item:e,clockFormat:o})}))),Object(v.createElement)("hr",null))};ou.propTypes={className:S.a.string,group:S.a.shape({title:S.a.string,items:S.a.arrayOf(S.a.shape({date:S.a.instanceOf(Date).isRequired,icon:S.a.element.isRequired,headline:S.a.oneOfType([S.a.element,S.a.string]).isRequired,body:S.a.arrayOf(S.a.oneOfType([S.a.element,S.a.string])),hideTimestamp:S.a.bool})).isRequired}).isRequired,orderBy:S.a.oneOf(["asc","desc"]),clockFormat:S.a.string},ou.defaultProps={className:"",group:{title:"",items:[]},orderBy:"desc"};var au=ou;function iu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cu(e){for(var t=1;t=0?(t[r].items.push(n),t):[].concat(i()(t),[{date:n.date,items:[n]}])}}(r),[]).map((function(e){return cu(cu({},e),{},{title:Object(ys.format)(a,e.date)})})).sort(ru(o)).map((function(e){return Object(v.createElement)(au,{key:e.date.getTime().toString(),group:e,orderBy:o,clockFormat:c})})))):Object(v.createElement)("div",{className:s},Object(v.createElement)("p",{className:"timeline_no_events"},Object(O.__)("No data to display","woocommerce-admin")))};su.propTypes={className:S.a.string,items:S.a.arrayOf(S.a.shape({date:S.a.instanceOf(Date).isRequired,icon:S.a.element.isRequired,headline:S.a.oneOfType([S.a.element,S.a.string]).isRequired,body:S.a.arrayOf(S.a.oneOfType([S.a.element,S.a.string])),hideTimestamp:S.a.bool})).isRequired,groupBy:S.a.oneOf(["day","week","month"]),orderBy:S.a.oneOf(["asc","desc"]),dateFormat:S.a.string,clockFormat:S.a.string},su.defaultProps={className:"",items:[],groupBy:"day",orderBy:"desc", +/* translators: PHP date format string used to display dates, see php.net/date. */ +dateFormat:Object(O.__)("F j, Y","woocommerce-admin"), +/* translators: PHP clock format string used to display times, see php.net/date. */ +clockFormat:Object(O.__)("g:ia","woocommerce-admin")},n(45);var lu=function(e){var t=e.items;return Object(v.createElement)(oe,{className:"woocommerce-view-more-list",label:Object(O.sprintf)(Object(O.__)("+%d more","woocommerce-admin"),t.length-1),popoverContents:Object(v.createElement)("ul",{className:"woocommerce-view-more-list__popover"},t.map((function(e,t){return Object(v.createElement)("li",{key:t,className:"woocommerce-view-more-list__popover__item"},e)})))})};lu.propTypes={items:S.a.arrayOf(S.a.node)},lu.defaultProps={items:[]};var uu=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state={isLoading:!0},t.iframeRef=Object(v.createRef)(),t.setLoaded=t.setLoaded.bind(f()(t)),t}return u()(o,[{key:"componentDidMount",value:function(){this.iframeRef.current.addEventListener("load",this.setLoaded)}},{key:"setLoaded",value:function(){this.setState({isLoading:!1}),this.props.onLoad()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.loadingContent,r=e.src,o=e.title,a=this.state.isLoading,i=q()("woocommerce-web-preview",t,{"is-loading":a});return Object(v.createElement)("div",{className:i},a&&n,Object(v.createElement)("div",{className:"woocommerce-web-preview__iframe-wrapper"},Object(v.createElement)("iframe",{ref:this.iframeRef,title:o,src:r})))}}]),o}(v.Component);uu.propTypes={className:S.a.string,loadingContent:S.a.node,onLoad:S.a.func,src:S.a.string.isRequired,title:S.a.string.isRequired},uu.defaultProps={loadingContent:Object(v.createElement)(Pl,null),onLoad:_.noop}},,function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";n.d(t,"e",(function(){return w})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return C})),n.d(t,"d",(function(){return D})),n.d(t,"j",(function(){return P})),n.d(t,"h",(function(){return R})),n.d(t,"f",(function(){return I})),n.d(t,"g",(function(){return A})),n.d(t,"i",(function(){return N})),n.d(t,"k",(function(){return L})),n.d(t,"a",(function(){return U}));var r=n(153),o=n.n(r),a=(n(504),n(0),n(13)),i=n(164),c=n(6),s=n(45),l=n(4),u=n(42);function d(e){return"/"===e.charAt(0)}function f(e,t){for(var n=t,r=n+1,o=e.length;r=0;u--){var p=o[u];"."===p?f(o,u):".."===p?(f(o,u),l++):l&&(f(o,u),l--)}if(!c)for(;l--;l)o.unshift("..");!c||""===o[0]||o[0]&&d(o[0])||o.unshift("");var h=o.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}var h,m=!("undefined"==typeof window||!window.document||!window.document.createElement);function y(e,t){t(window.confirm(e))}function b(){try{return window.history.state||{}}catch(e){return{}}}function g(e){void 0===e&&(e={}),m||function(e,t){if(!e)throw new Error("Invariant failed")}(!1);var t,n,r=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,c=i.forceRefresh,s=void 0!==c&&c,l=i.getUserConfirmation,d=void 0===l?y:l,f=i.keyLength,h=void 0===f?6:f,g=e.basename?function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}("/"===(n=e.basename).charAt(0)?n:"/"+n):"";function v(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname+o.search+o.hash;return g&&(a=function(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}(a,g)),p(a,r,n)}function O(){return Math.random().toString(36).substr(2,h)}var w,_,k=(w=null,_=[],{setPrompt:function(e){return w=e,function(){w===e&&(w=null)}},confirmTransitionTo:function(e,t,n,r){if(null!=w){var o="function"==typeof w?w(e,t):w;"string"==typeof o?"function"==typeof n?n(o,r):r(!0):r(!1!==o)}else r(!0)},appendListener:function(e){var t=!0;function n(){t&&e.apply(void 0,arguments)}return _.push(n),function(){t=!1,_=_.filter((function(e){return e!==n}))}},notifyListeners:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:N(),t=Object(s.applyFilters)("woocommerce_admin_persisted_queries",["period","compare","before","after","interval","type"]);return Object(c.pick)(e,t)};function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(c.uniq)(e.split(",").map((function(e){return parseInt(e,10)})).filter(Boolean))}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N(),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"wc-admin",o=T(T({page:r},n),e);return"/"!==t&&(o.path=t),Object(a.addQueryArgs)("admin.php",o)}function N(){var e=w().location.search;return e.length&&Object(i.parse)(e.substring(1))||{}}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N(),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"wc-admin",o=A(e,t,n,r);w().push(o)}var U=function(e){var t,n,r;return window.wcNavigation&&!window.wcNavigation.historyPatched&&(t=window.history,n=t.pushState,r=t.replaceState,t.pushState=function(e){var r=new CustomEvent("pushstate",{state:e});return window.dispatchEvent(r),n.apply(t,arguments)},t.replaceState=function(e){var n=new CustomEvent("replacestate",{state:e});return window.dispatchEvent(n),r.apply(t,arguments)},window.wcNavigation.historyPatched=!0),window.addEventListener("popstate",e),window.addEventListener("pushstate",e),window.addEventListener("replacestate",e),function(){window.removeEventListener("popstate",e),window.removeEventListener("pushstate",e),window.removeEventListener("replacestate",e)}}},,,,,,,function(e,t,n){"use strict";n.d(t,"f",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"i",(function(){return f})),n.d(t,"d",(function(){return g})),n.d(t,"c",(function(){return O})),n.d(t,"e",(function(){return w})),n.d(t,"b",(function(){return _})),n.d(t,"j",(function(){return k}));var r=n(21),o=n.n(r),a=n(6),i=n(1),c=n(164),s="YYYY-MM-DD",l=[{value:"today",label:Object(i.__)("Today","woocommerce-admin")},{value:"yesterday",label:Object(i.__)("Yesterday","woocommerce-admin")},{value:"week",label:Object(i.__)("Week to Date","woocommerce-admin")},{value:"last_week",label:Object(i.__)("Last Week","woocommerce-admin")},{value:"month",label:Object(i.__)("Month to Date","woocommerce-admin")},{value:"last_month",label:Object(i.__)("Last Month","woocommerce-admin")},{value:"quarter",label:Object(i.__)("Quarter to Date","woocommerce-admin")},{value:"last_quarter",label:Object(i.__)("Last Quarter","woocommerce-admin")},{value:"year",label:Object(i.__)("Year to Date","woocommerce-admin")},{value:"last_year",label:Object(i.__)("Last Year","woocommerce-admin")},{value:"custom",label:Object(i.__)("Custom","woocommerce-admin")}],u=[{value:"previous_period",label:Object(i.__)("Previous Period","woocommerce-admin")},{value:"previous_year",label:Object(i.__)("Previous Year","woocommerce-admin")}],d=function(e,t){if(e=e.format(s),"start"===t)return e+"T00:00:00";if("now"===t)return e+"T"+o()().format("HH:mm:00");if("end"===t)return e+"T23:59:59";throw new Error("appendTimestamp requires second parameter to be either `start`, `now` or `end`")};function f(e,t){if(o.a.isMoment(t))return t.isValid()?t:null;if("string"==typeof t){var n=o()(t,[s,e],!0);return n.isValid()?n:null}throw new Error("toMoment requires a string to be passed as an argument")}function p(e,t){var n=e.year()===t.year(),r=n&&e.month()===t.month(),o=n&&r&&e.isSame(t,"day"),a=Object(i.__)("MMM D, YYYY","woocommerce-admin");if(o)return e.format(a);if(r){var c=e.date();return e.format(a).replace(c,"".concat(c," - ").concat(t.date()))}if(n){var s=Object(i.__)("MMM D","woocommerce-admin");return"".concat(e.format(s)," - ").concat(t.format(a))}return"".concat(e.format(a)," - ").concat(t.format(a))}function h(e,t){var n,r,a=o()().startOf(e).subtract(1,e),i=a.clone().endOf(e);if("previous_period"===t)if("year"===e)r=(n=o()().startOf(e).subtract(2,e)).clone().endOf(e);else{var c=i.diff(a,"days");n=(r=a.clone().subtract(1,"days")).clone().subtract(c,"days")}else n=a.clone().subtract(1,"years"),r=i.clone().subtract(1,"years");return"month"===e&&(r=r.clone().endOf("month")),{primaryStart:a,primaryEnd:i,secondaryStart:n,secondaryEnd:r}}function m(e,t){var n,r,a=o()().startOf(e),i=o()(),c=i.diff(a,"days");return"previous_period"===t?(n=a.clone().subtract(1,e),r=i.clone().subtract(1,e)):r=(n=a.clone().subtract(1,"years")).clone().add(c+1,"days").subtract(1,"seconds"),{primaryStart:a,primaryEnd:i,secondaryStart:n,secondaryEnd:r}}var y=Object(a.memoize)((function(e,t,n,r){switch(e){case"today":return m("day",t);case"yesterday":return h("day",t);case"week":return m("week",t);case"last_week":return h("week",t);case"month":return m("month",t);case"last_month":return h("month",t);case"quarter":return m("quarter",t);case"last_quarter":return h("quarter",t);case"year":return m("year",t);case"last_year":return h("year",t);case"custom":var o=r.diff(n,"days");if("previous_period"===t){var a=n.clone().subtract(1,"days");return{primaryStart:n,primaryEnd:r,secondaryStart:a.clone().subtract(o,"days"),secondaryEnd:a}}return{primaryStart:n,primaryEnd:r,secondaryStart:n.clone().subtract(1,"years"),secondaryEnd:r.clone().subtract(1,"years")}}}),(function(e,t,n,r){return[e,t,n&&n.format(),r&&r.format()].join(":")})),b=Object(a.memoize)((function(e,t,n,r,a){if(e&&t)return{period:e,compare:t,after:n?o()(n):null,before:r?o()(r):null};var i=Object(c.parse)(a.replace(/&/g,"&"));return{period:i.period,compare:i.compare,after:i.after?o()(i.after):null,before:i.before?o()(i.before):null}}),(function(e,t,n,r,o){return[e,t,n,r,o].join(":")})),g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"period=month&compare=previous_year",n=e.period,r=e.compare,o=e.after,a=e.before;return b(n,r,o,a,t)},v=Object(a.memoize)((function(e,t,n,r,o,i){return{primary:{label:Object(a.find)(l,(function(t){return t.value===e})).label,range:p(n,r),after:n,before:r},secondary:{label:Object(a.find)(u,(function(e){return e.value===t})).label,range:p(o,i),after:o,before:i}}}),(function(e,t,n,r,o,a){return[e,t,n&&n.format(),r&&r.format(),o&&o.format(),a&&a.format()].join(":")})),O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"period=month&compare=previous_year",n=g(e,t),r=n.period,o=n.compare,a=n.after,i=n.before,c=y(r,o,a,i),s=c.primaryStart,l=c.primaryEnd,u=c.secondaryStart,d=c.secondaryEnd;return v(r,o,s,l,u,d)};function w(e){var t=function(e){var t,n,r,a,i=[];if("custom"===e.period){var c=O(e).primary,s=(t=c.before,n=c.after,r=o()(t),a=o()(n),r.diff(a,"days"));i=s>=365?["day","week","month","quarter","year"]:s>=90?["day","week","month","quarter"]:s>=28?["day","week","month"]:s>=7?["day","week"]:s>1&&s<7?["day"]:["hour","day"]}else switch(e.period){case"today":case"yesterday":i=["hour","day"];break;case"week":case"last_week":i=["day"];break;case"month":case"last_month":i=["day","week"];break;case"quarter":case"last_quarter":i=["day","week","month"];break;case"year":case"last_year":i=["day","week","month","quarter"];break;default:i=["day"]}return i}(e),n=t[0],r=e.interval||n;return e.interval&&!t.includes(e.interval)&&(r=n),r}var _={invalid:Object(i.__)("Invalid date","woocommerce-admin"),future:Object(i.__)("Select a date in the past","woocommerce-admin"),startAfterEnd:Object(i.__)("Start date must be before end date","woocommerce-admin"),endBeforeStart:Object(i.__)("Start date must be before end date","woocommerce-admin")};function k(e,t,n,r,a){var i=f(a,t);return i?o()().isBefore(i,"day")?{date:null,error:_.future}:"after"===e&&n&&i.isAfter(n,"day")?{date:null,error:_.startAfterEnd}:"before"===e&&r&&i.isBefore(r,"day")?{date:null,error:_.endBeforeStart}:{date:i}:{date:null,error:_.invalid}}},function(e,t,n){var r=n(624),o=n(625),a=n(403),i=n(626);e.exports=function(e){return r(e)||o(e)||a(e)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=c(n(8)),a=c(n(627)),i=c(n(630));function c(e){return e&&e.__esModule?e:{default:e}}var s=void 0;t.default=function(e){var t=e.mixedString,n=e.components,c=e.throwErrors;if(s=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(c)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var l=(0,i.default)(t);try{return function e(t,n){var i,c,l,u,d,f,p,h,m=[],y={};for(f=0;f "+s);if("componentClose"===d.type)throw new Error("Missing opening component token: `"+d.value+"`");if("componentOpen"===d.type){i=n[d.value],l=f;break}m.push(n[d.value])}else m.push(d.value);return i&&(u=function(e,t){var n,r,o=t[e],a=0;for(r=e+1;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return s}));var r=n(6),o=n(515),a=n.n(o),i=n(285);function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=a()(e).toRgb(),r=n.r,o=n.g,i=n.b;return"rgba(".concat(r,", ").concat(o,", ").concat(i,", ").concat(t,")")}function s(e){return Object(r.get)(i.a,e,"#000")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DISPLAY_FORMAT="L",t.ISO_FORMAT="YYYY-MM-DD",t.ISO_MONTH_FORMAT="YYYY-MM",t.START_DATE="startDate",t.END_DATE="endDate",t.HORIZONTAL_ORIENTATION="horizontal",t.VERTICAL_ORIENTATION="vertical",t.VERTICAL_SCROLLABLE="verticalScrollable",t.ICON_BEFORE_POSITION="before",t.ICON_AFTER_POSITION="after",t.INFO_POSITION_TOP="top",t.INFO_POSITION_BOTTOM="bottom",t.INFO_POSITION_BEFORE="before",t.INFO_POSITION_AFTER="after",t.ANCHOR_LEFT="left",t.ANCHOR_RIGHT="right",t.OPEN_DOWN="down",t.OPEN_UP="up",t.DAY_SIZE=39,t.BLOCKED_MODIFIER="blocked",t.WEEKDAYS=[0,1,2,3,4,5,6],t.FANG_WIDTH_PX=20,t.FANG_HEIGHT_PX=10,t.DEFAULT_VERTICAL_SPACING=22,t.MODIFIER_KEY_NAMES=new Set(["Shift","Control","Alt","Meta"])},,function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return h}));n(182);var r=n(8),o=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;tr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102c.charCodeAt(0)&&(c=c.trim()),c=[c],0p)&&(U=(q=q.replace(" ",":")).length),01&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var n=S(e),o=n.length>0?n[0]:"",i=j("%"+o+"%",t),s=i.name,l=i.value,u=!1,d=i.alias;d&&(o=d[0],v(n,g([0,1],d)));for(var f=1,p=!0;f=n.length){var _=c(l,m);l=(p=!!_)&&"get"in _&&!("originalValue"in _.get)?_.get:l[m]}else p=b(l,m),l=l[m];p&&!u&&(h[s]=l)}}return l}},function(e,t,n){"use strict";function r(e,t){return`${e}:${JSON.stringify(t,Object.keys(t).sort())}`}function o(e){const t=e.indexOf(":");return t<0?e:e.substring(0,t)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}))},,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(16),o=n.n(r),a=n(8),i=n(284),c=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=Object(i.a)((function(e){return c.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(70),u=n(154),d=n(152),f=s,p=function(e){return"theme"!==e&&"innerRef"!==e},h=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?f:p};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t({type:"FETCH_WITH_HEADERS",options:e}),c={...r.controls,FETCH_WITH_HEADERS:({options:e})=>a()({...e,parse:!1}).then(e=>Promise.all([e.headers,e.status,e.json()])).then(([e,t,n])=>({headers:e,status:t,data:n}))};t.a=c},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="Interact with the calendar and add the check-in date for your trip.",o="Move backward to switch to the previous month.",a="Move forward to switch to the next month.",i="page up and page down keys",c="Home and end keys",s="Escape key",l="Select the date in focus.",u="Move backward (left) and forward (right) by one day.",d="Move backward (up) and forward (down) by one week.",f="Return to the date input field.",p="Press the down arrow key to interact with the calendar and\n select a date. Press the question mark key to get the keyboard shortcuts for changing dates.",h=function(e){var t=e.date;return"Choose "+String(t)+" as your check-in date. It’s available."},m=function(e){var t=e.date;return"Choose "+String(t)+" as your check-out date. It’s available."},y=function(e){return e.date},b=function(e){var t=e.date;return"Not available. "+String(t)},g=function(e){var t=e.date;return"Selected. "+String(t)};t.default={calendarLabel:"Calendar",closeDatePicker:"Close",focusStartDate:r,clearDate:"Clear Date",clearDates:"Clear Dates",jumpToPrevMonth:o,jumpToNextMonth:a,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:i,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:l,moveFocusByOneDay:u,moveFocusByOneWeek:d,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:f,keyboardNavigationInstructions:p,chooseAvailableStartDate:h,chooseAvailableEndDate:m,dateIsUnavailable:b,dateIsSelected:g},t.DateRangePickerPhrases={calendarLabel:"Calendar",closeDatePicker:"Close",clearDates:"Clear Dates",focusStartDate:r,jumpToPrevMonth:o,jumpToNextMonth:a,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:i,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:l,moveFocusByOneDay:u,moveFocusByOneWeek:d,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:f,keyboardNavigationInstructions:p,chooseAvailableStartDate:h,chooseAvailableEndDate:m,dateIsUnavailable:b,dateIsSelected:g},t.DateRangePickerInputPhrases={focusStartDate:r,clearDates:"Clear Dates",keyboardNavigationInstructions:p},t.SingleDatePickerPhrases={calendarLabel:"Calendar",closeDatePicker:"Close",clearDate:"Clear Date",jumpToPrevMonth:o,jumpToNextMonth:a,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:i,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:l,moveFocusByOneDay:u,moveFocusByOneWeek:d,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:f,keyboardNavigationInstructions:p,chooseAvailableDate:y,dateIsUnavailable:b,dateIsSelected:g},t.SingleDatePickerInputPhrases={clearDate:"Clear Date",keyboardNavigationInstructions:p},t.DayPickerPhrases={calendarLabel:"Calendar",jumpToPrevMonth:o,jumpToNextMonth:a,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:i,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:l,moveFocusByOneDay:u,moveFocusByOneWeek:d,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:f,chooseAvailableStartDate:h,chooseAvailableEndDate:m,chooseAvailableDate:y,dateIsUnavailable:b,dateIsSelected:g},t.DayPickerKeyboardShortcutsPhrases={keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:i,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:l,moveFocusByOneDay:u,moveFocusByOneWeek:d,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:f},t.DayPickerNavigationPhrases={jumpToPrevMonth:o,jumpToNextMonth:a},t.CalendarDayPhrases={chooseAvailableDate:y,dateIsUnavailable:b,dateIsSelected:g}},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce((function(e,t){return(0,r.default)({},e,function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,o.default.oneOfType([o.default.string,o.default.func,o.default.node])))}),{})};var r=a(n(107)),o=a(n(2));function a(e){return e&&e.__esModule?e:{default:e}}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="wc/admin/settings"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withStylesPropTypes=t.css=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t.stylesPropName,c=void 0===n?"styles":n,u=t.themePropName,f=void 0===u?"theme":u,b=t.cssPropName,_=void 0===b?"css":b,k=t.flushBefore,S=void 0!==k&&k,j=t.pureComponent,E=void 0!==j&&j,C=void 0,D=void 0,P=void 0,x=void 0,F=v(E);function T(e){return e===l.DIRECTIONS.LTR?d.default.resolveLTR:d.default.resolveRTL}function M(e){return e===l.DIRECTIONS.LTR?P:x}function R(t,n){var r=M(t),o=t===l.DIRECTIONS.LTR?C:D,a=d.default.get();return o&&r===a||(t===l.DIRECTIONS.RTL?(D=e?d.default.createRTL(e):g,x=a,o=D):(C=e?d.default.createLTR(e):g,P=a,o=C)),o}function I(e,t){return{resolveMethod:T(e),styleDef:R(e)}}return function(e){var t=e.displayName||e.name||"Component",n=function(t){function n(e,t){p(this,n);var r=h(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t)),o=r.context[l.CHANNEL]?r.context[l.CHANNEL].getState():w;return r.state=I(o),r}return m(n,t),o(n,[{key:"componentDidMount",value:function(){var e=this;this.context[l.CHANNEL]&&(this.channelUnsubscribe=this.context[l.CHANNEL].subscribe((function(t){e.setState(I(t))})))}},{key:"componentWillUnmount",value:function(){this.channelUnsubscribe&&this.channelUnsubscribe()}},{key:"render",value:function(){var t;S&&d.default.flush();var n=this.state,o=n.resolveMethod,a=n.styleDef;return i.default.createElement(e,r({},this.props,(y(t={},f,d.default.get()),y(t,c,a()),y(t,_,o),t)))}}]),n}(F);return n.WrappedComponent=e,n.displayName="withStyles("+String(t)+")",n.contextTypes=O,e.propTypes&&(n.propTypes=(0,a.default)({},e.propTypes),delete n.propTypes[c],delete n.propTypes[f],delete n.propTypes[_]),e.defaultProps&&(n.defaultProps=(0,a.default)({},e.defaultProps)),(0,s.default)(n,e)}};var a=f(n(107)),i=f(n(8)),c=f(n(2)),s=f(n(696)),l=n(699),u=f(n(700)),d=f(n(400));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.css=d.default.resolveLTR,t.withStylesPropTypes={styles:c.default.object.isRequired,theme:c.default.object.isRequired,css:c.default.func.isRequired};var b={},g=function(){return b};function v(e){if(e){if(!i.default.PureComponent)throw new ReferenceError("withStyles() pureComponent option requires React 15.3.0 or later");return i.default.PureComponent}return i.default.Component}var O=y({},l.CHANNEL,u.default),w=l.DIRECTIONS.LTR},,,,,,,function(e,t,n){"use strict";var r=n(582);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(229))},,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(257),o=n(282);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="core"},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},o={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},a=n(284),i=/[A-Z]|^ms/g,c=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},u=Object(a.a)((function(e){return s(e)?e:e.replace(i,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(c,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===o[e]||s(e)||"number"!=typeof t||0===t?t:t+"px"};function f(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return p={name:n.name,styles:n.styles,next:p},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)p={name:o.name,styles:o.styles,next:p},o=o.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o2?arguments[2]:{},a=r(t);o&&(a=i.call(a,Object.getOwnPropertySymbols(t)));for(var c=0;c(e[t]=n[t],e),{}):s.map(e=>function(e,t,n){const o=n[e.param];if(!o)return{};if("advanced"===o){const e=Object(c.c)(n,t.filters);if(0===e.length)return{};const o=Object(c.j)(e.map(e=>function(e,t){const n=e.filters[t.key];if("Date"!==Object(r.get)(n,["input","component"]))return t;const{rule:o,value:c}=t,s={after:"start",before:"end"};if(Array.isArray(c)){const[e,n]=c;return Object.assign({},t,{value:[Object(i.a)(a()(e),s.after),Object(i.a)(a()(n),s.before)]})}return Object.assign({},t,{value:Object(i.a)(a()(c),s[o])})}(t,e)),{},t.filters);return{match:n.match||"all",...o}}const s=Object(r.find)(Object(c.b)(e.filters),{value:o});if(!s)return{};if(s.settings&&s.settings.param){const{param:e}=s.settings;return n[e]?{[e]:n[e]}:{}}return{[e.param]:o}}(e,l,n)).reduce((e,t)=>Object.assign(e,t),{})}(e),u=Object(i.c)(t,e.defaultDateRange),d=Object(r.includes)(l,e.endpoint);return{orderby:t.orderby||"date",order:t.order||"desc",after:d?void 0:Object(i.a)(u.primary.after,"start"),before:d?void 0:Object(i.a)(u.primary.before,"end"),page:t.paged||1,per_page:t.per_page||s.d.pageSize,...o,...n}}Object(r.memoize)((e,t,n)=>({isEmpty:!1,isError:!1,isRequesting:!1,data:{totals:t,intervals:n}}),(e,t,n)=>[e,t.length,n.length].join(":"))},,,,,,function(e,t,n){"use strict";var r=n(631),o=n(632),a=n(300);e.exports={formats:a,parse:o,stringify:r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(8);function o(e,t,n){var o=this,a=Object(r.useRef)(null),i=Object(r.useRef)(0),c=Object(r.useRef)(null),s=Object(r.useRef)([]),l=Object(r.useRef)(),u=Object(r.useRef)(),d=Object(r.useRef)(e),f=Object(r.useRef)(!0);d.current=e;var p=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var h=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,y="maxWait"in n,b=y?Math.max(+n.maxWait||0,t):null;return Object(r.useEffect)((function(){return f.current=!0,function(){f.current=!1}}),[]),Object(r.useMemo)((function(){var e=function(e){var t=s.current,n=l.current;return s.current=l.current=null,i.current=e,u.current=d.current.apply(n,t)},n=function(e,t){p&&cancelAnimationFrame(c.current),c.current=p?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!f.current)return!1;var n=e-a.current,r=e-i.current;return!a.current||n>=t||n<0||y&&r>=b},g=function(t){return c.current=null,m&&s.current?e(t):(s.current=l.current=null,u.current)},v=function(){var e=Date.now();if(r(e))return g(e);if(f.current){var o=e-a.current,c=e-i.current,s=t-o,l=y?Math.min(s,b-c):s;n(v,l)}},O=function(){for(var d=[],p=0;p-1?o(n):n}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(131),o=n(418),a=n(156),i=n(419),c=n(427),s=n(673),l=o("wks"),u=r.Symbol,d=s?u:u&&u.withoutSetter||i;e.exports=function(e){return a(l,e)&&(c||"string"==typeof l[e])||(c&&a(u,e)?l[e]=u[e]:l[e]=d("Symbol."+e)),l[e]}},,,,,,,function(e,t,n){"use strict";var r=n(8),o=n.n(r);function a(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),a=o[0],i=o[1]||"";return{beforeDecimal:a,afterDecimal:i,hasNagation:n,addNegation:r}}function g(e,t,n){for(var r="",o=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||o;return r}function v(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function O(e,t,n){return Math.min(Math.max(e,t),n)}function w(e){return Math.max(e.selectionStart,e.selectionEnd)}var _={thousandSeparator:f.oneOfType([f.string,f.oneOf([!0])]),decimalSeparator:f.string,allowedDecimalSeparators:f.arrayOf(f.string),thousandsGroupStyle:f.oneOf(["thousand","lakh","wan"]),decimalScale:f.number,fixedDecimalScale:f.bool,displayType:f.oneOf(["input","text"]),prefix:f.string,suffix:f.string,format:f.oneOfType([f.string,f.func]),removeFormatting:f.func,mask:f.oneOfType([f.string,f.arrayOf(f.string)]),value:f.oneOfType([f.number,f.string]),defaultValue:f.oneOfType([f.number,f.string]),isNumericString:f.bool,customInput:f.elementType,allowNegative:f.bool,allowEmptyFormatting:f.bool,allowLeadingZeros:f.bool,onValueChange:f.func,onKeyDown:f.func,onMouseUp:f.func,onChange:f.func,onFocus:f.func,onBlur:f.func,type:f.oneOf(["text","tel","password"]),isAllowed:f.func,renderText:f.func,getInputRef:f.oneOfType([f.func,f.shape({current:f.any})])},k={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:p,onChange:p,onKeyDown:p,onMouseUp:p,onFocus:p,onBlur:p,isAllowed:function(){return!0}},S=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?l(e):t}(this,c(t).call(this,e));var r=e.defaultValue;n.validateProps();var o=n.formatValueProp(r);return n.state={value:o,numAsString:n.removeFormatting(o)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(l(n)),n.onKeyDown=n.onKeyDown.bind(l(n)),n.onMouseUp=n.onMouseUp.bind(l(n)),n.onFocus=n.onFocus.bind(l(n)),n.onBlur=n.onBlur.bind(l(n)),n}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,a=n.numAsString,i=void 0===a?"":a;if(e!==t){this.validateProps();var c=this.formatNumString(i),s=m(t.value)?c:this.formatValueProp(),l=this.removeFormatting(s),u=parseFloat(l),d=parseFloat(i);(isNaN(u)&&isNaN(d)||u===d)&&c===o&&(null!==r||s===o)||this.updateValue({formattedValue:s,numAsString:l,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),a="-"===e[0];a&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var i=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==i&&(e="".concat(e.substring(0,i),".").concat(e.substring(i+1,e.length).replace(new RegExp(y(r),"g"),""))),a&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,a=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!a||0===o||t||r?"":"|"+y(a)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){v(e,t),setTimeout((function(){e.value===n&&v(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,a=r.suffix,i=r.format;if(""===e)return 0;if(t=O(t,0,e.length),!i){var c="-"===e[0];return O(t,o.length+(c?1:0),e.length-a.length)}if("function"==typeof i)return t;if("#"===i[t]&&h(e[t]))return t;if("#"===i[t-1]&&h(e[t-1]))return t;var s=i.indexOf("#");t=O(t,s,i.lastIndexOf("#")+1);for(var l=i.substring(t,i.length).indexOf("#"),u=t,d=t+(-1===l?0:l);u>s&&("#"!==i[u]||!h(e[u]));)u-=1;return!h(e[d])||"left"===n&&t!==s||t-u0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,a=t.allowEmptyFormatting,i=this.props,c=i.value,s=i.isNumericString,l=!(c=m(c)?e:c)&&0!==c;return l&&a&&(c=""),l&&!a?"":("number"==typeof c&&(c=c.toString(),s=!0),"Infinity"===c&&s&&(c=""),s&&!n&&"number"==typeof r&&(c=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=b(e),a=o.beforeDecimal,i=o.afterDecimal,c=o.hasNagation,s=parseFloat("0.".concat(i||"0")).toFixed(t).split("."),l=a.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),s[0]),u=g(s[1]||"",Math.min(t,i.length),n),d=r?".":"";return"".concat(c?"-":"").concat(l).concat(d).concat(u)}(c,r,o)),s?this.formatNumString(c):this.formatInput(c))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),a=r.test(e);return e=e.replace(/-/g,""),o&&!a&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,a=n.suffix,i=n.decimalScale,c=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e=t.length-a.length||i&&c&&t[e]===s))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;rn&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),g=y.start,v=y.end;if(!o&&g===v&&-1!==u.indexOf(n[h])){var O=0===s?"":d;return n.substr(0,h)+O+n.substr(h+1,n.length)}var w=o?0:i.length,_=t.length-(o?0:c.length);if(n.length>t.length||!n.length||g===v||0===h&&m===t.length||h===w&&m===_)return n;if(this.checkIfFormatGotDeleted(g,v,t)&&(n=t),!o){var k=this.removeFormatting(n),S=b(k,a),j=S.beforeDecimal,E=S.afterDecimal,C=S.addNegation,D=eO;)v--;v=this.correctCaretPosition(c,v,"left")}}else for(;!y.test(c[v])&&vw)&&(e.preventDefault(),this.setPatchedCaretPosition(n,v,c)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,v,c),h(e)}else h(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,a=void 0===o?"":o;if(n===r){var i=this.correctCaretPosition(a,n);i!==n&&this.setPatchedCaretPosition(t,i,a)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,a=n.value,i=void 0===a?"":a,c=t.correctCaretPosition(i,r);c===r||0===r&&o===i.length||t.setPatchedCaretPosition(n,c,i),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,a=r.type,c=r.displayType,s=r.customInput,l=r.renderText,u=r.getInputRef,d=r.format,f=this.state.value,p=(e=this.props,t=_,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),h=i({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(d)?"numeric":void 0},p,{type:a,value:f,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===c)return l?l(f)||null:o.a.createElement("span",i({},p,{ref:u}),f);if(s){var m=s;return o.a.createElement(m,i({},h,{ref:u}))}return o.a.createElement("input",i({},h,{ref:u}))}}])&&a(n.prototype,r),t}(o.a.Component);S.propTypes=_,S.defaultProps=k,t.a=S},,,function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(279);function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="woocommerce-navigation"},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return a(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,void 0):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};for(var n in t)e.setRequestHeader(n,t[n]);return e}function f(e){return void 0===e}function p(){var e={HALF_ODD:function(e){var t=Math.round(e);return u(e)&&s(t)?t-1:t},HALF_EVEN:function(e){var t=Math.round(e);return u(e)?s(t)?t:t-1:t},HALF_UP:function(e){return Math.round(e)},HALF_DOWN:function(e){return u(e)?Math.floor(e):Math.round(e)},HALF_TOWARDS_ZERO:function(e){return u(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e)},HALF_AWAY_FROM_ZERO:function(e){return u(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e)},DOWN:function(e){return Math.floor(e)}};return{add:function(e,t){return e+t},subtract:function(e,t){return e-t},multiply:function(e,t){return l(e)||l(t)?function(e,t){var n=function(e){return Math.pow(10,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e.toString();if(t.indexOf("e-")>0)return parseInt(t.split("e-")[1]);var n=t.split(".")[1];return n?n.length:0}(e))},r=Math.max(n(e),n(t));return Math.round(e*r)*Math.round(t*r)/(r*r)}(e,t):e*t},divide:function(e,t){return e/t},modulo:function(e,t){return e%t},round:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HALF_EVEN";return e[n](t)}}}var h=p();function m(e){var t=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(e);return{getMatches:function(){return null!==t?t.slice(1).filter((function(e){return!f(e)})):[]},getMinimumFractionDigits:function(){var e=function(e){return"."===e};return f(this.getMatches().find(e))?0:this.getMatches()[h.add(this.getMatches().findIndex(e),1)].split("").length},getCurrencyDisplay:function(){return{USD:"code",dollar:"name",$:"symbol"}[this.getMatches().find((function(e){return"USD"===e||"dollar"===e||"$"===e}))]},getStyle:function(){return f(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!f(this.getMatches().find((function(e){return","===e})))}}}function y(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;for(var n in t)e=e.replace("{{".concat(n,"}}"),t[n]);return e};return{getExchangeRate:function(n,o){return(a=e.endpoint,!Boolean(a)||"object"!==r(a)&&"function"!=typeof a||"function"!=typeof a.then?function(n,r){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var o=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){4===o.readyState&&(o.status>=200&&o.status<400?n(JSON.parse(o.responseText)):r(new Error(o.statusText)))},onerror:function(){r(new Error("Network error"))}});o.open("GET",e,!0),d(o,t.headers),o.send()}))}(t(e.endpoint,{from:n,to:r}),{headers:e.headers})}(n,o):e.endpoint).then((function(a){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",o={};return Object.entries(t).forEach((function(t){if("object"===r(t[1])){var a=e(t[1]);Object.entries(a).forEach((function(e){o[t[0]+n+e[0]]=e[1]}))}else o[t[0]]=t[1]})),o}(a)[t(e.propertyPath,{from:n,to:o})]}));var a}}}function b(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Error;if(!e)throw new n(t)}function g(e){b(function(e){return c(e)&&e<=100&&e>=0}(e),"You must provide a numeric value between 0 and 100.",RangeError)}function v(e){b(Number.isInteger(e),"You must provide an integer.",TypeError)}var O=p(),w=Object.assign((function e(t){var n=Object.assign({},{amount:e.defaultAmount,currency:e.defaultCurrency,precision:e.defaultPrecision},t),r=n.amount,o=n.currency,a=n.precision;v(r),v(a);var i=e.globalLocale,c=e.globalFormat,s=e.globalRoundingMode,l=e.globalFormatRoundingMode,u=Object.assign({},e.globalExchangeRatesApi),d=function(t){var n=Object.assign({},Object.assign({},{amount:r,currency:o,precision:a},t),Object.assign({},{locale:this.locale},t));return Object.assign(e({amount:n.amount,currency:n.currency,precision:n.precision}),{locale:n.locale})},p=function(e){b(this.hasSameCurrency(e),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return r},getCurrency:function(){return o},getLocale:function(){return this.locale||i},setLocale:function(e){return d.call(this,{locale:e})},getPrecision:function(){return a},convertPrecision:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;v(e);var n=this.getPrecision(),r=e>n,o=r?O.multiply:O.divide,a=r?[e,n]:[n,e],i=Math.pow(10,O.subtract.apply(O,a));return d.call(this,{amount:O.round(o(this.getAmount(),i),t),precision:e})},add:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return d.call(this,{amount:O.add(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},subtract:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return d.call(this,{amount:O.subtract(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},multiply:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return d.call(this,{amount:O.round(O.multiply(this.getAmount(),e),t)})},divide:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return d.call(this,{amount:O.round(O.divide(this.getAmount(),e),t)})},percentage:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return g(e),this.multiply(O.divide(e,100),t)},allocate:function(e){var t=this;!function(e){b(function(e){return e.length>0&&e.every((function(e){return e>=0}))&&e.some((function(e){return e>0}))}(e),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}(e);for(var n=e.reduce((function(e,t){return O.add(e,t)})),r=this.getAmount(),o=e.map((function(e){var o=Math.floor(O.divide(O.multiply(t.getAmount(),e),n));return r=O.subtract(r,o),d.call(t,{amount:o})})),a=0;r>0;)e[a]>0&&(o[a]=o[a].add(d.call(this,{amount:1})),r=O.subtract(r,1)),a+=1;return o},convert:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.endpoint,o=void 0===r?u.endpoint:r,a=n.propertyPath,i=void 0===a?u.propertyPath||"rates.{{to}}":a,c=n.headers,l=void 0===c?u.headers:c,p=n.roundingMode,h=void 0===p?s:p,m=Object.assign({},{endpoint:o,propertyPath:i,headers:l,roundingMode:h});return y(m).getExchangeRate(this.getCurrency(),e).then((function(n){return b(!f(n),'No rate was found for the destination currency "'.concat(e,'".'),TypeError),d.call(t,{amount:O.round(O.multiply(t.getAmount(),parseFloat(n)),m.roundingMode),currency:e})}))},equalsTo:function(e){return this.hasSameAmount(e)&&this.hasSameCurrency(e)},lessThan:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()n[1].getAmount()},greaterThanOrEqual:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()>=n[1].getAmount()},isZero:function(){return 0===this.getAmount()},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return 0!==O.modulo(this.getAmount(),Math.pow(10,a))},hasCents:function(){return 0!==O.modulo(this.getAmount(),Math.pow(10,a))},hasSameCurrency:function(e){return this.getCurrency()===e.getCurrency()},hasSameAmount:function(t){var n=e.normalizePrecision([this,t]);return n[0].getAmount()===n[1].getAmount()},toFormat:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l,n=m(e);return this.toRoundedUnit(n.getMinimumFractionDigits(),t).toLocaleString(this.getLocale(),{currencyDisplay:n.getCurrencyDisplay(),useGrouping:n.getUseGrouping(),minimumFractionDigits:n.getMinimumFractionDigits(),style:n.getStyle(),currency:this.getCurrency()})},toUnit:function(){return O.divide(this.getAmount(),Math.pow(10,a))},toRoundedUnit:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l,n=Math.pow(10,e);return O.divide(O.round(O.multiply(this.toUnit(),n),t),n)},toObject:function(){return{amount:r,currency:o,precision:a}},toJSON:function(){return this.toObject()}}}),{defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},{globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}},i);t.a=w},function(e,t,n){"use strict";var r=n(42),o=n(48),a=n(0),i=n(5),c=n.n(i),s=n(6),l=n(51),u=n.n(l),d=n(91),f=n(92),p=n(93),h=n(94),m=n(58),y=n(99),b=n(61),g=n(38),v=n(12),O=n(877),w=n(87);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t0?c/2:l)+(l+c/2>window.innerWidth?window.innerWidth-l:c/2)},d=e.left;"right"===r?d=e.right:"middle"!==a&&(d=l);var f=e.right;"left"===r?f=e.left:"middle"!==a&&(f=l);var p,h={popoverLeft:d,contentWidth:d-c>0?c:d},m={popoverLeft:f,contentWidth:f+c>window.innerWidth?window.innerWidth-f:c},y=n,b=null;if(!o)if("center"===n&&u.contentWidth===c)y="center";else if("left"===n&&h.contentWidth===c)y="left";else if("right"===n&&m.contentWidth===c)y="right";else{var g="left"==(y=h.contentWidth>m.contentWidth?"left":"right")?h.contentWidth:m.contentWidth;b=g!==c?g:null}if(p="center"===y?u.popoverLeft:"left"===y?h.popoverLeft:m.popoverLeft,i){var v=i.getBoundingClientRect();p=Math.min(p,v.right-c)}return{xAxis:y,popoverLeft:p,contentWidth:b}}function j(e,t,n,r,o,a,i){var c=t.height;if(o){var s=(Object(b.getScrollContainer)(a)||document.body).getBoundingClientRect().top+c-i;if(e.top<=s)return{yAxis:n,popoverTop:Math.min(e.bottom,s)}}var l=e.top+e.height/2;"bottom"===r?l=e.bottom:"top"===r&&(l=e.top);var u={popoverTop:l,contentHeight:(l-c/2>0?c/2:l)+(l+c/2>window.innerHeight?window.innerHeight-l:c/2)},d={popoverTop:e.top,contentHeight:e.top-10-c>0?c:e.top-10},f={popoverTop:e.bottom,contentHeight:e.bottom+10+c>window.innerHeight?window.innerHeight-10-e.bottom:c},p=n,h=null;if(!o)if("middle"===n&&u.contentHeight===c)p="middle";else if("top"===n&&d.contentHeight===c)p="top";else if("bottom"===n&&f.contentHeight===c)p="bottom";else{var m="top"==(p=d.contentHeight>f.contentHeight?"top":"bottom")?d.contentHeight:f.contentHeight;h=m!==c?m:null}return{yAxis:p,popoverTop:"middle"===p?u.popoverTop:"top"===p?d.popoverTop:f.popoverTop,contentHeight:h}}var E=n(144),C=n(69);var D=Object(a.createContext)({focusHistory:[]}),P=D.Provider,x=D.Consumer;P.displayName="FocusReturnProvider",x.displayName="FocusReturnConsumer",a.Component;var F=Object(v.createHigherOrderComponent)((function e(t){if((r=t)instanceof a.Component||"function"==typeof r){var n=t;return e({})(n)}var r,o=t.onFocusReturn,i=void 0===o?s.stubTrue:o;return function(e){var t=function(t){Object(p.a)(c,t);var n,r,o=(n=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(m.a)(n);if(r){var o=Object(m.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(h.a)(this,e)});function c(){var e;return Object(d.a)(this,c),(e=o.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return Object(f.a)(c,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==i())for(var r,o=[].concat(Object(E.a)(s.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(E.a)(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(a.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(a.createElement)(e,this.props.childProps))}}]),c}(a.Component);return function(e){return Object(a.createElement)(x,null,(function(n){return Object(a.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");var T=Object(v.createHigherOrderComponent)((function(e){return function(t){Object(p.a)(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(m.a)(n);if(r){var o=Object(m.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(h.a)(this,e)});function i(){var e;return Object(d.a)(this,i),(e=o.apply(this,arguments)).focusContainRef=Object(a.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(C.a)(e)),e}return Object(f.a)(i,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===g.TAB){var t=b.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return Object(a.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(a.createElement)(e,this.props))}}]),i}(a.Component)}),"withConstrainedTabbing"),M=n(283);var R=function(e){Object(p.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(m.a)(t);if(n){var o=Object(m.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(h.a)(this,e)});function o(){return Object(d.a)(this,o),r.apply(this,arguments)}return Object(f.a)(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(a.Component),I=Object(M.a)(R);function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(m.a)(e);if(t){var o=Object(m.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(h.a)(this,n)}}var N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,r=e.className,o=void 0===r?"lockscroll":r,i=0,c=0;function s(e){var t=n.scrollingElement||n.body;e&&(c=t.scrollTop);var r=e?"add":"remove";t.classList[r](o),n.documentElement.classList[r](o),e||(t.scrollTop=c)}function l(){0===i&&s(!0),++i}function u(){1===i&&s(!1),--i}return function(e){Object(p.a)(n,e);var t=A(n);function n(){return Object(d.a)(this,n),t.apply(this,arguments)}return Object(f.a)(n,[{key:"componentDidMount",value:function(){l()}},{key:"componentWillUnmount",value:function(){u()}},{key:"render",value:function(){return null}}]),n}(a.Component)}();function L(e){e.stopPropagation()}var U=Object(a.forwardRef)((function(e,t){var n=e.children,i=Object(o.a)(e,["children"]);return Object(a.createElement)("div",Object(r.a)({},i,{ref:t,onMouseDown:L}),n)})),B=n(213);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function ue(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var de=function(e){var t=e.headerTitle,n=e.onClose,i=e.onKeyDown,s=e.children,l=e.className,d=e.noArrow,f=void 0===d||d,p=e.isAlternate,h=e.position,m=void 0===h?"bottom right":h,w=(e.range,e.focusOnMount),_=void 0===w?"firstElement":w,E=e.anchorRef,C=e.shouldAnchorIncludePadding,D=e.anchorRect,P=e.getAnchorRect,x=e.expandOnMobile,F=e.animate,T=void 0===F||F,M=e.onClickOutside,R=e.onFocusOutside,A=e.__unstableSticky,L=e.__unstableSlotName,B=void 0===L?"Popover":L,H=e.__unstableObserveElement,q=e.__unstableBoundaryParent,V=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),K=Object(a.useRef)(null),W=Object(a.useRef)(null),G=Object(a.useRef)(),Y=Object(v.useViewportMatch)("medium","<"),$=Object(a.useState)(),Q=Object(y.a)($,2),J=Q[0],Z=Q[1],X=z(B),ee=x&&Y,ne=Object(v.useResizeObserver)(),re=Object(y.a)(ne,2),oe=re[0],de=re[1];f=ee||f,Object(a.useLayoutEffect)((function(){if(ee)return ue(G.current,"is-without-arrow",f),ue(G.current,"is-alternate",p),se(G.current,"data-x-axis"),se(G.current,"data-y-axis"),le(G.current,"top"),le(G.current,"left"),le(W.current,"maxHeight"),void le(W.current,"maxWidth");var e=function(){if(G.current&&W.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(b.getRectangleFromRange)(r);if(r instanceof window.Element){var a=r.getBoundingClientRect();return o?a:ce(a,r)}var i=r.top,c=r.bottom,s=i.getBoundingClientRect(),l=c.getBoundingClientRect(),u=new window.DOMRect(s.left,s.top,s.width,l.bottom-s.top);return o?u:ce(u,r)}if(e.current){var d=e.current.parentNode,f=d.getBoundingClientRect();return o?f:ce(f,d)}}(K,D,P,E,C);if(e){var t,n,r=G.current,o=r.offsetParent,a=r.ownerDocument,i=0;if(o&&o!==a.body){var c=o.getBoundingClientRect();i=c.top,e=new window.DOMRect(e.left-c.left,e.top-c.top,e.width,e.height)}q&&(t=null===(n=G.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode);var s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,c=n.split(" "),s=Object(y.a)(c,3),l=s[0],u=s[1],d=void 0===u?"center":u,f=s[2],p=j(e,t,l,f,r,o,a),h=S(e,t,d,f,r,p.yAxis,i);return k(k({},h),p)}(e,de.height?de:W.current.getBoundingClientRect(),m,A,G.current,i,t),l=s.popoverTop,u=s.popoverLeft,d=s.xAxis,h=s.yAxis,g=s.contentHeight,v=s.contentWidth;"number"==typeof l&&"number"==typeof u&&(le(G.current,"top",l+"px"),le(G.current,"left",u+"px")),ue(G.current,"is-without-arrow",f||"center"===d&&"middle"===h),ue(G.current,"is-alternate",p),se(G.current,"data-x-axis",d),se(G.current,"data-y-axis",h),le(W.current,"maxHeight","number"==typeof g?g+"px":""),le(W.current,"maxWidth","number"==typeof v?v+"px":""),Z(({left:"right",right:"left"}[d]||"center")+" "+({top:"bottom",bottom:"top"}[h]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),H&&(n=new window.MutationObserver(e)).observe(H,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[ee,D,P,E,C,m,de,A,H,q]),function(e,t){Object(a.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=b.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(_,W);var fe=function(e){e.keyCode===g.ESCAPE&&n&&(e.stopPropagation(),n()),i&&i(e)},pe=Object(a.createElement)(I,{onFocusOutside:function(e){if(R)R(e);else if(M){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),u()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),M(t)}else n&&n()}},Object(a.createElement)(ae,{type:T&&J?"appear":null,options:{origin:J}},(function(e){var o=e.className;return Object(a.createElement)(U,Object(r.a)({className:c()("components-popover",l,o,{"is-expanded":ee,"is-without-arrow":f,"is-alternate":p})},V,{onKeyDown:fe,ref:G}),ee&&Object(a.createElement)(N,null),ee&&Object(a.createElement)("div",{className:"components-popover__header"},Object(a.createElement)("span",{className:"components-popover__header-title"},t),Object(a.createElement)(ge,{className:"components-popover__close",icon:O.a,onClick:n})),Object(a.createElement)("div",{ref:W,className:"components-popover__content",tabIndex:"-1"},Object(a.createElement)("div",{style:{position:"relative"}},oe,s)))})));return _&&(pe=Object(a.createElement)(ie,null,pe)),X.ref&&(pe=Object(a.createElement)(te,{name:B},pe)),E||D?pe:Object(a.createElement)("span",{ref:K},pe)};de.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(a.createElement)(ee,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var fe=de,pe=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(s.isString)(r)&&(t=r),Object(s.isObject)(r)&&(t=r.display,n=r.ariaLabel),Object(a.createElement)("span",{className:o,"aria-label":n},t)):null};var he=function(e){Object(p.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(m.a)(t);if(n){var o=Object(m.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(h.a)(this,e)});function o(){var e;return Object(d.a)(this,o),(e=r.apply(this,arguments)).delayedSetIsOver=Object(s.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return Object(f.a)(o,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===a.Children.count(n)){var r=a.Children.only(n);"function"==typeof r.props[e]&&r.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(s.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,r=e.text,o=e.shortcut;if(1!==a.Children.count(t))return t;var i=a.Children.only(t),c=this.state.isOver;return Object(a.cloneElement)(i,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(a.concatChildren)(i.props.children,c&&Object(a.createElement)(fe,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(a.createElement)(pe,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(a.Component),me=n(288);function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}(be);try{for(I.s();!(R=I.n()).done;)P[R.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){I.e(e)}finally{I.f()}}var A=!F&&(k&&E||j||!!E&&(!C||Object(s.isArray)(C)&&!C.length)&&!1!==k),N=Object(a.createElement)(T,Object(r.a)({},M,P,{className:x,"aria-label":P["aria-label"]||E,ref:t}),w&&Object(a.createElement)(me.a,{icon:w,size:_}),C);return A?Object(a.createElement)(he,{text:E,shortcut:j,position:S},N):N}))},,,function(e,t,n){"use strict";var r=n(295);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){var r=n(230);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(2))&&r.__esModule?r:{default:r},a=n(67);t.default=o.default.oneOf(a.WEEKDAYS)},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n(56),n(217);var r=n(72);function o(e,t){const{_fields:n,page:o,per_page:a,...i}=t;return Object(r.a)("total-"+e,i)}},,,,function(e,t){function n(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function c(e){n(i,o,a,c,s,"next",e)}function s(e){n(i,o,a,c,s,"throw",e)}c(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="wc/admin/reports"},function(e,t,n){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},function(e,t,n){var r=n(170);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(203),o=n(231),a=n(265);e.exports=r?function(e,t,n){return o.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function a(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var i=0;i/g,">\n").replace(/\n\n/g,"\n").replace(/^\n/g,"").replace(/\n$/g,"").split("\n"),y=0,b=[],g=!1,v=0;v=s)n="";else if(y+O.length>=s){if(" "===O[(o=s-y)-1])for(;o&&" "===O[(o-=1)-1];);else a=O.slice(o).indexOf(" "),u||(-1!==a?o+=a:o=n.length);n=O.slice(0,o).join("")+d,f&&(n+=''+p+""),y=s,g=!0}else y+=O.length;else if(l){if(y>=s)if(c=(i=n.match(/[a-zA-Z]+/))?i[0]:"")if(" *{",a,":",r,"px;&:last-child{",a,":0;}}")})," ",(function(e){return e.isReversed?a:""}),""),c=Object(r.a)("div",{target:"eboqfv51",label:"Item"})({name:"13luw5d",styles:"box-sizing:border-box;min-width:0;max-width:100%;"}),s=Object(r.a)(c,{target:"eboqfv52",label:"Block"})({name:"1rr4qq7",styles:"flex:1;"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="wc/admin/options"},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="wc/admin/onboarding"},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="wc/admin/items"},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}function o(){return(o=Object.assign||function(e){for(var t=1;tt||a>e&&i=t&&c>=n?a-e-r:i>t&&cn?i-t+o:0}n(360);var h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&j>=0&&S<=y&&k<=m&&_>=R&&S<=A&&j>=N&&k<=I)return D;var L=getComputedStyle(x),U=parseInt(L.borderLeftWidth,10),B=parseInt(L.borderTopWidth,10),H=parseInt(L.borderRightWidth,10),q=parseInt(L.borderBottomWidth,10),z=0,V=0,K="offsetWidth"in x?x.offsetWidth-x.clientWidth-U-H:0,W="offsetHeight"in x?x.offsetHeight-x.clientHeight-B-q:0;if(l===x)z="start"===o?E:"end"===o?E-y:"nearest"===o?p(g,g+y,y,B,q,g+E,g+E+O,O):E-y/2,V="start"===a?C:"center"===a?C-m/2:"end"===a?C-m:p(b,b+m,m,U,H,b+C,b+C+w,w),z=Math.max(0,z+g),V=Math.max(0,V+b);else{z="start"===o?E-R-B:"end"===o?E-A+q+W:"nearest"===o?p(R,A,T,B,q+W,E,E+O,O):E-(R+T/2)+W/2,V="start"===a?C-N-U:"center"===a?C-(N+M/2)+K/2:"end"===a?C-I+H+K:p(N,I,M,U,H+K,C,C+w,w);var G=x.scrollLeft,Y=x.scrollTop;E+=Y-(z=Math.max(0,Math.min(Y+z,x.scrollHeight-T+W))),C+=G-(V=Math.max(0,Math.min(G+V,x.scrollWidth-M+K)))}D.push({el:x,top:z,left:V})}return D}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function v(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function O(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,a=new Array(o),i=0;i1?n-1:0),o=1;o=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function P(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var a=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:a+1);var i=t+e;i<0?i=o?a:0:i>a&&(i=o?0:a);var c=x(e,i,n,r,o);return-1===c?t>=n?-1:t:c}function x(e,t,n,r,o){var a=r(t);if(!a||!a.hasAttribute("disabled"))return t;if(e>0){for(var i=t+1;i=0;c--)if(!r(c).hasAttribute("disabled"))return c;return o?e>0?x(1,0,n,r,!1):x(-1,n-1,n,r,!1):-1}function F(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(v(t,e,n)||r&&v(t,n.document.activeElement,n))}))}var T=O((function(e){R(e).textContent=""}),500);function M(e,t){var n=R(t);e&&(n.textContent=e,T(t))}function R(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var I=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),A=["refKey","ref"],N=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],L=["onKeyDown","onBlur","onChange","onInput","onChangeText"],U=["refKey","ref"],B=["onMouseMove","onMouseDown","onClick","onPress","index","item"],H=function(){var e=function(e){var t,n;function c(t){var n;(n=e.call(this,t)||this).id=n.props.id||"downshift-"+String(m++),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=E(t),n.internalSetState(o({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=E(t),n.internalSetState(o({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,a,i={},c="function"==typeof e;return!c&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,o({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var s=c?e(t):e;s=n.props.stateReducer(t,s),r=s.hasOwnProperty("selectedItem");var l={},u={};return r&&s.selectedItem!==t.selectedItem&&(a=s.selectedItem),s.type=s.type||0,Object.keys(s).forEach((function(e){t[e]!==s[e]&&(i[e]=s[e]),"type"!==e&&(u[e]=s[e],C(n.props,e)||(l[e]=s[e]))})),c&&s.hasOwnProperty("inputValue")&&n.props.onInputValueChange(s.inputValue,o({},n.getStateAndHelpers(),s)),l}),(function(){y(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==a&&n.props.onChange(a,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var a,i=void 0===e?{}:e,c=i.refKey,s=void 0===c?"ref":c,l=i.ref,u=r(i,A),d=(void 0===t?{}:t).suppressRefError,f=void 0!==d&&d;n.getRootProps.called=!0,n.getRootProps.refKey=s,n.getRootProps.suppressRefError=f;var p=n.getState().isOpen;return o(((a={})[s]=_(l,n.rootRef),a.role="combobox",a["aria-expanded"]=p,a["aria-haspopup"]="listbox",a["aria-owns"]=p?n.menuId:null,a["aria-labelledby"]=n.labelId,a),u)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=P(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=P(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],a=this.getItemNodeFromIndex(r);if(null==o||a&&a.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset(o({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=o({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=o({},n.keyDownHandlers,{Home:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=x(1,0,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}}},End:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=x(-1,r-1,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:8})}}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,a=t.onClick;t.onPress;var i=t.onKeyDown,c=t.onKeyUp,s=t.onBlur,l=r(t,N),u=n.getState().isOpen,d={onClick:w(a,n.buttonHandleClick),onKeyDown:w(i,n.buttonHandleKeyDown),onKeyUp:w(c,n.buttonHandleKeyUp),onBlur:w(s,n.buttonHandleBlur)};return o({type:"button",role:"button","aria-label":u?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l.disabled?{}:d,l)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=D(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(a(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return o({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,a=t.onKeyDown,i=t.onBlur,c=t.onChange,s=t.onInput;t.onChangeText;var l,u=r(t,L),d={},f=n.getState(),p=f.inputValue,h=f.isOpen,m=f.highlightedIndex;return u.disabled||((l={}).onChange=w(c,s,n.inputHandleChange),l.onKeyDown=w(a,n.inputHandleKeyDown),l.onBlur=w(i,n.inputHandleBlur),d=l),o({"aria-autocomplete":"list","aria-activedescendant":h&&"number"==typeof m&&m>=0?n.getItemId(m):null,"aria-controls":h?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},d,u)},n.inputHandleKeyDown=function(e){var t=D(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(a(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var a,i=void 0===e?{}:e,c=i.refKey,s=void 0===c?"ref":c,l=i.ref,u=r(i,U),d=(void 0===t?{}:t).suppressRefError,f=void 0!==d&&d;return n.getMenuProps.called=!0,n.getMenuProps.refKey=s,n.getMenuProps.suppressRefError=f,o(((a={})[s]=_(l,n.menuRef),a.role="listbox",a["aria-labelledby"]=u&&u["aria-label"]?null:n.labelId,a.id=n.menuId,a),u)},n.getItemProps=function(e){var t,a=void 0===e?{}:e,i=a.onMouseMove,c=a.onMouseDown,s=a.onClick;a.onPress;var l=a.index,u=a.item,d=void 0===u?void 0:u,f=r(a,B);void 0===l?(n.items.push(d),l=n.items.indexOf(d)):n.items[l]=d;var p=s,h=((t={onMouseMove:w(i,(function(){l!==n.getState().highlightedIndex&&(n.setHighlightedIndex(l,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:w(c,(function(e){e.preventDefault()}))}).onClick=w(p,(function(){n.selectItemAtIndex(l,{type:9})})),t),m=f.disabled?{onMouseDown:h.onMouseDown}:h;return o({id:n.getItemId(l),role:"option","aria-selected":n.getState().highlightedIndex===l},m,f)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=E(e),n.internalSetState((function(t){var r=t.selectedItem;return o({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=E(e),n.internalSetState((function(t){var r=t.isOpen;return o({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var r=n.getState(),o=r.isOpen,a=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof a&&n.setHighlightedIndex(a,e),y(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=O((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),a=n.props.getA11yStatusMessage(o({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,M(a,n.props.environment.document)}),200);var i=n.props,c=i.defaultHighlightedIndex,s=i.initialHighlightedIndex,l=void 0===s?c:s,u=i.defaultIsOpen,d=i.initialIsOpen,f=void 0===d?u:d,p=i.initialInputValue,h=void 0===p?"":p,b=i.initialSelectedItem,g=void 0===b?null:b,v=n.getState({highlightedIndex:l,isOpen:f,inputValue:h,selectedItem:g});return null!=v.selectedItem&&void 0===n.props.initialInputValue&&(v.inputValue=n.props.itemToString(v.selectedItem)),n.state=v,n}n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var s=c.prototype;return s.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},s.getState=function(e){return void 0===e&&(e=this.state),t=e,n=this.props,Object.keys(t).reduce((function(e,r){return e[r]=C(n,r)?n[r]:t[r],e}),{});var t,n},s.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},s.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},s.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},s.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var a=P(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(a,t)}},s.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,a=this.props.itemToString,i=this.id,c=this.getRootProps,s=this.getToggleButtonProps,l=this.getLabelProps,u=this.getMenuProps,d=this.getInputProps,f=this.getItemProps,p=this.openMenu,h=this.closeMenu,m=this.toggleMenu,y=this.selectItem,b=this.selectItemAtIndex,g=this.selectHighlightedItem,v=this.setHighlightedIndex,O=this.clearSelection,w=this.clearItems;return{getRootProps:c,getToggleButtonProps:s,getLabelProps:l,getMenuProps:u,getInputProps:d,getItemProps:f,reset:this.reset,openMenu:p,closeMenu:h,toggleMenu:m,selectItem:y,selectItemAtIndex:b,selectHighlightedItem:g,setHighlightedIndex:v,clearSelection:O,clearItems:w,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:a,id:i,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},s.componentDidMount=function(){var e=this,t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!F(t.target,[e._rootNode,e._menuNode],e.props.environment)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},a=function(t){var n=F(t.target,[e._rootNode,e._menuNode],e.props.environment,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},i=this.props.environment;i.addEventListener("mousedown",t),i.addEventListener("mouseup",n),i.addEventListener("touchstart",r),i.addEventListener("touchmove",o),i.addEventListener("touchend",a),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),i.removeEventListener("mousedown",t),i.removeEventListener("mouseup",n),i.removeEventListener("touchstart",r),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",a)}},s.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},s.componentDidUpdate=function(e,t){C(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},s.componentWillUnmount=function(){this.cleanup()},s.render=function(){var e=S(this.props.children,b);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=S(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:function(e){return"string"==typeof e.type}(t)?Object(l.cloneElement)(t,this.getRootProps(function(e){return e.props}(t))):void 0:null},c}(l.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:k,itemToString:function(e){return null==e?"":String(e)},onStateChange:b,onInputValueChange:b,onUserAction:b,onChange:b,onSelect:b,onOuterClick:b,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:g},e.stateChangeTypes=I,e}();O((function(e,t){M(e(),t)}),200),"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?l.useLayoutEffect:l.useEffect;var q={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:g,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};s.a.array.isRequired,s.a.func,s.a.func,s.a.func,s.a.bool,s.a.number,s.a.number,s.a.number,s.a.bool,s.a.bool,s.a.bool,s.a.any,s.a.any,s.a.any,s.a.string,s.a.string,s.a.string,s.a.func,s.a.string,s.a.func,s.a.func,s.a.func,s.a.func,s.a.func,s.a.shape({addEventListener:s.a.func,removeEventListener:s.a.func,document:s.a.shape({getElementById:s.a.func,activeElement:s.a.any,body:s.a.any})}),h(h({},q),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}}),s.a.array.isRequired,s.a.func,s.a.func,s.a.func,s.a.bool,s.a.number,s.a.number,s.a.number,s.a.bool,s.a.bool,s.a.bool,s.a.any,s.a.any,s.a.any,s.a.string,s.a.string,s.a.string,s.a.string,s.a.string,s.a.string,s.a.func,s.a.string,s.a.string,s.a.func,s.a.func,s.a.func,s.a.func,s.a.func,s.a.func,s.a.shape({addEventListener:s.a.func,removeEventListener:s.a.func,document:s.a.shape({getElementById:s.a.func,activeElement:s.a.any,body:s.a.any})}),o({},q,{getA11yStatusMessage:k,circularNavigation:!0}),s.a.array,s.a.array,s.a.array,s.a.func,s.a.func,s.a.func,s.a.number,s.a.number,s.a.number,s.a.func,s.a.func,s.a.string,s.a.string,s.a.shape({addEventListener:s.a.func,removeEventListener:s.a.func,document:s.a.shape({getElementById:s.a.func,activeElement:s.a.any,body:s.a.any})})},,,,,,,,,,function(e,t,n){"use strict";var r=n(295),o=n(71),a=o("%Function.prototype.apply%"),i=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(i,a),s=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=c(r,i,arguments);if(s&&l){var n=s(t,"length");n.configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var d=function(){return c(r,a,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(203),o=n(413),a=n(189),i=n(306),c=Object.defineProperty;t.f=r?c:function(e,t,n){if(a(e),t=i(t,!0),a(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(2))&&r.__esModule?r:{default:r},a=n(67);t.default=o.default.oneOf([a.ICON_BEFORE_POSITION,a.ICON_AFTER_POSITION])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(2))&&r.__esModule?r:{default:r},a=n(67);t.default=o.default.oneOf([a.INFO_POSITION_TOP,a.INFO_POSITION_BOTTOM,a.INFO_POSITION_BEFORE,a.INFO_POSITION_AFTER])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return!(!r.default.isMoment(e)||!r.default.isMoment(t)||(0,o.default)(e,t))};var r=a(n(21)),o=a(n(235));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!o.default.isMoment(e)||!o.default.isMoment(t))return!1;var n=e.year(),r=e.month(),a=t.year(),i=t.month(),c=n===a;return c&&r===i?e.date()e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&e%1==0&&e<=9007199254740991}(e.length)&&"[object Array]"==l.call(e)};e.exports=d},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(2))&&r.__esModule?r:{default:r},a=n(96);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t2?n-2:0),a=2;ae.profileItems||{},o=e=>e.tasksStatus||{},a=e=>e.paymentMethods||[],i=(e,t)=>e.errors[t]||!1,c=(e,t)=>e.requesting[t]||!1},,function(e,t,n){"use strict";n.d(t,"a",(function(){return P}));var r={};n.r(r),n.d(r,"getOption",(function(){return s})),n.d(r,"getOptionsRequestingError",(function(){return l})),n.d(r,"isOptionsUpdating",(function(){return u})),n.d(r,"getOptionsUpdatingError",(function(){return d}));var o={};n.r(o),n.d(o,"receiveOptions",(function(){return g})),n.d(o,"setRequestingError",(function(){return v})),n.d(o,"setUpdatingError",(function(){return O})),n.d(o,"setIsUpdating",(function(){return w})),n.d(o,"updateOptions",(function(){return _}));var a={};n.r(a),n.d(a,"getOption",(function(){return D}));var i=n(10),c=n(215);const s=(e,t)=>e[t],l=(e,t)=>e.requestingErrors[t]||!1,u=e=>e.isUpdating||!1,d=e=>e.updatingError||!1;var f=n(30),p="RECEIVE_OPTIONS",h="SET_IS_UPDATING",m="SET_REQUESTING_ERROR",y="SET_UPDATING_ERROR",b=n(33);function g(e){return{type:p,options:e}}function v(e,t){return{type:m,error:e,name:t}}function O(e){return{type:y,error:e}}function w(e){return{type:h,isUpdating:e}}function*_(e){yield w(!0),yield g(e);try{const t=yield Object(f.apiFetch)({path:b.e+"/options",method:"POST",data:e});return yield w(!1),{success:!0,...t}}catch(e){return yield O(e),{success:!1,...e}}}var k=n(11),S=n.n(k);let j=[];const E={},C={...f.controls,BATCH_FETCH:({optionName:e})=>(j.push(e),new Promise(t=>{setTimeout((function(){const n=j.join(",");if(E[n])return E[n].then(n=>{t(n[e])});const r=b.e+"/options?options="+n;E[n]=S()({path:r}),E[n].then(e=>t(e)),setTimeout(()=>{j=[],delete E[n]},1)}),1)}))};function*D(e){try{const n=yield(t=e,{type:"BATCH_FETCH",optionName:t});yield g(n)}catch(t){yield v(t,e)}var t}Object(i.registerStore)(c.a,{reducer:(e={isUpdating:!1,requestingErrors:{}},{type:t,options:n,error:r,isUpdating:o,name:a})=>{switch(t){case p:e={...e,...n};break;case h:e={...e,isUpdating:o};break;case m:e={...e,requestingErrors:{[a]:r}};break;case y:e={...e,error:r,updatingError:r,isUpdating:!1}}return e},actions:o,controls:C,selectors:r,resolvers:a});const P=c.a},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrencyData=void 0;const o=n(0),a=n(20),i=n(1),c=n(652),s=r(n(51));t.default=function(e){let t;function n(e){const n=Object.assign(Object.assign({},{code:"USD",symbol:"$",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2}),e);t={code:n.code.toString(),symbol:n.symbol.toString(),symbolPosition:n.symbolPosition.toString(),decimalSeparator:n.decimalSeparator.toString(),priceFormat:l(n),thousandSeparator:n.thousandSeparator.toString(),precision:parseInt(n.precision,10)}}function r(e){const n=c.numberFormat(t,e);if(""===n)return n;const{priceFormat:r,symbol:o}=t;return i.sprintf(r,o,n)}function l(e){if(e.priceFormat)return function(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(e.priceFormat.toString());switch(e.symbolPosition){case"left":return"%1$s%2$s";case"right":return"%2$s%1$s";case"left_space":return"%1$s %2$s";case"right_space":return"%2$s %1$s"}return"%1$s%2$s"}return n(e),{getCurrencyConfig:()=>Object.assign({},t),getDataForCountry:function(e,t={},n={}){const r=t[e]||{},o=n[r.currency_code];return o?{code:r.currency_code,symbol:a.decodeEntities(o),symbolPosition:r.currency_pos,thousandSeparator:r.thousand_sep,decimalSeparator:r.decimal_sep,precision:r.num_decimals}:{}},setCurrency:n,formatAmount:r,formatCurrency:function(e){return s.default("Currency().formatCurrency",{version:"5.0.0",alternative:"Currency().formatAmount",plugin:"WooCommerce",hint:"`formatAmount` accepts the same arguments as formatCurrency"}),r(e)},getPriceFormat:l,formatDecimal(e){if("number"!=typeof e&&(e=parseFloat(e)),Number.isNaN(e))return 0;const{precision:n}=t;return Math.round(e*Math.pow(10,n))/Math.pow(10,n)},formatDecimalString(e){if("number"!=typeof e&&(e=parseFloat(e)),Number.isNaN(e))return"";const{precision:n}=t;return e.toFixed(n)},render:e=>("number"!=typeof e&&(e=parseFloat(e)),e<0?o.createElement("span",{className:"is-negative"},r(e)):r(e))}},t.getCurrencyData=function(){return s.default("getCurrencyData",{version:"3.1.0",alternative:"CurrencyFactory.getDataForCountry",plugin:"WooCommerce Admin",hint:"Pass in the country, locale data, and symbol info to use getDataForCountry"}),{US:{code:"USD",symbol:"$",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2},EU:{code:"EUR",symbol:"€",symbolPosition:"left",thousandSeparator:".",decimalSeparator:",",precision:2},IN:{code:"INR",symbol:"₹",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2},GB:{code:"GBP",symbol:"£",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2},BR:{code:"BRL",symbol:"R$",symbolPosition:"left",thousandSeparator:".",decimalSeparator:",",precision:2},VN:{code:"VND",symbol:"₫",symbolPosition:"right",thousandSeparator:".",decimalSeparator:",",precision:1},ID:{code:"IDR",symbol:"Rp",symbolPosition:"left",thousandSeparator:".",decimalSeparator:",",precision:0},BD:{code:"BDT",symbol:"৳",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:0},PK:{code:"PKR",symbol:"₨",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2},RU:{code:"RUB",symbol:"₽",symbolPosition:"right",thousandSeparator:" ",decimalSeparator:",",precision:2},TR:{code:"TRY",symbol:"₺",symbolPosition:"left",thousandSeparator:".",decimalSeparator:",",precision:2},MX:{code:"MXN",symbol:"$",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2},CA:{code:"CAD",symbol:"$",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2}}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){var r,o,a,i,c;r=n(741),o=n(463).utf8,a=n(742),i=n(463).bin,(c=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?i.stringToBytes(e):o.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),s=8*e.length,l=1732584193,u=-271733879,d=-1732584194,f=271733878,p=0;p>>24)|4278255360&(n[p]<<24|n[p]>>>8);n[s>>>5]|=128<>>9<<4)]=s;var h=c._ff,m=c._gg,y=c._hh,b=c._ii;for(p=0;p>>0,u=u+v>>>0,d=d+O>>>0,f=f+w>>>0}return r.endian([l,u,d,f])})._ff=function(e,t,n,r,o,a,i){var c=e+(t&n|~t&r)+(o>>>0)+i;return(c<>>32-a)+t},c._gg=function(e,t,n,r,o,a,i){var c=e+(t&r|n&~r)+(o>>>0)+i;return(c<>>32-a)+t},c._hh=function(e,t,n,r,o,a,i){var c=e+(t^n^r)+(o>>>0)+i;return(c<>>32-a)+t},c._ii=function(e,t,n,r,o,a,i){var c=e+(n^(t|~r))+(o>>>0)+i;return(c<>>32-a)+t},c._blocksize=16,c._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(c(e,t));return t&&t.asBytes?n:t&&t.asString?i.bytesToString(n):r.bytesToHex(n)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(257);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";var r=n(42),o=n(91),a=n(92),i=n(69),c=n(93),s=n(94),l=n(58),u=n(0),d=n(6),f=n(12);var p=["button","submit"];t.a=Object(f.createHigherOrderComponent)((function(e){return function(t){Object(c.a)(m,t);var n,f,h=(n=m,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(l.a)(n);if(f){var r=Object(l.a)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return Object(s.a)(this,e)});function m(){var e;return Object(o.a)(this,m),(e=h.apply(this,arguments)).bindNode=e.bindNode.bind(Object(i.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(i.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(i.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(i.a)(e)),e}return Object(a.a)(m,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout((function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()}),0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,n=e.target;Object(d.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(d.includes)(p,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(u.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(u.createElement)(e,Object(r.a)({ref:this.bindNode},this.props)))}}]),m}(u.Component)}),"withFocusOutside")},function(e,t,n){"use strict";t.a=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return g}));var r=n(87),o=n(6),a=n(66);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:1;return isNaN(e)?"".concat(8,"px"):"".concat(8*e,"px")}var f=n(66),p=Object(c.a)("div",{target:"e1puf3u0",label:"Wrapper"})("font-family:",u("default.fontFamily"),";font-size:",u("default.fontSize"),";"),h=Object(c.a)("div",{target:"e1puf3u1",label:"StyledField"})("margin-bottom:",d(1),";.components-panel__row &{margin-bottom:inherit;}"),m=Object(c.a)("label",{target:"e1puf3u2",label:"StyledLabel"})("display:inline-block;margin-bottom:",d(1),";"),y=Object(c.a)("p",{target:"e1puf3u3",label:"StyledHelp"})("margin-top:-",d(1),";font-size:",u("helpText.fontSize"),";font-style:normal;color:",Object(f.a)("mediumGray.text"),";");function b(e){var t=e.id,n=e.label,o=e.hideLabelFromVision,c=e.help,s=e.className,l=e.children;return Object(r.createElement)(p,{className:a()("components-base-control",s)},Object(r.createElement)(h,{className:"components-base-control__field"},n&&t&&(o?Object(r.createElement)(i.a,{as:"label",htmlFor:t},n):Object(r.createElement)(m,{className:"components-base-control__label",htmlFor:t},n)),n&&!t&&(o?Object(r.createElement)(i.a,{as:"label"},n):Object(r.createElement)(b.VisualLabel,null,n)),l),!!c&&Object(r.createElement)(y,{id:t+"__help",className:"components-base-control__help"},c))}b.VisualLabel=function(e){var t=e.className,n=e.children;return t=a()("components-base-control__label",t),Object(r.createElement)("span",{className:t},n)},t.a=b},function(e,t,n){"use strict";var r=n(87),o=n(42),a=n(48),i=n(0),c=n(18),s=function(e){var t=e.icon,n=e.className,r=Object(a.a)(e,["icon","className"]),c=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" ");return Object(i.createElement)("span",Object(o.a)({className:c},r))};function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function f(e){for(var t=function(e){if(null==e)return[];p(e)||(e=Object(e));var t=e.length;t=t&&d(t)&&(a(e)||o(e))&&t||0;for(var n=e.constructor,r=-1,i="function"==typeof n&&n.prototype===e,s=Array(t),l=t>0;++r0?r:n)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(305);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PureCalendarDay=void 0;var r=Object.assign||function(e){for(var t=1;t",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(l),d=["%","/","?",";","#"].concat(u),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=n(738);function v(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),c=-1!==a&&a127?M+="x":M+=T[R];if(!M.match(p)){var A=x.slice(0,C),N=x.slice(C+1),L=T.match(h);L&&(A.push(L[1]),N.unshift(L[2])),N.length&&(v="/"+N.join(".")+v),this.hostname=A.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+U,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!m[_])for(C=0,F=u.length;C0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift())),n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var j=k.slice(-1)[0],E=(n.host||e.host||k.length>1)&&("."===j||".."===j)||""===j,C=0,D=k.length;D>=0;D--)"."===(j=k[D])?k.splice(D,1):".."===j?(k.splice(D,1),C++):C&&(k.splice(D,1),C--);if(!w&&!_)for(;C--;C)k.unshift("..");!w||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),E&&"/"!==k.join("/").substr(-1)&&k.push("");var P,x=""===k[0]||k[0]&&"/"===k[0].charAt(0);return S&&(n.hostname=n.host=x?"":k.length?k.shift():"",(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift())),(w=w||n.host&&k.length)&&!x&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";n(116),n(464),n(496),n(467),n(468);var r=n(497);n.d(t,"PLUGINS_STORE_NAME",(function(){return r.a})),n(95),n(469),n(501),n(470),n(471),n(472),n(473),n(474),n(277),n(325),n(491),n(490),n(498),n(499),n(196),n(492),n(475),n(493),n(158),n(33),n(494),n(495),n(275)},function(e,t,n){"use strict";e.exports=n(792)},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(7)),a=r(n(408)),i=n(8),c=r(i),s=r(n(486)),l=r(n(17)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function f(e,t){return u.und(e)||u.nul(e)?t:e}function p(e){return u.und(e)?[]:u.arr(e)?e:[e]}function h(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=n.length)break;a=n[o++]}else{if((o=n.next()).done)break;a=o.value}for(var i=a,c=!1,s=0;s=p.startTime+l.duration;else if(l.decay)y=h+v/(1-.998)*(1-Math.exp(-(1-.998)*(t-p.startTime))),(u=Math.abs(p.lastPosition-y)<.1)&&(m=y);else{d=void 0!==p.lastTime?p.lastTime:t,v=void 0!==p.lastVelocity?p.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var O=Math.floor(t-d),w=0;wm:y=e);++n);return n-1}(e,a);return function(e,t,n,r,o,a,i,c,s){var l=s?s(e):e;if(ln){if("identity"===c)return l;"clamp"===c&&(l=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:o===1/0?l+=r:l=l*(o-r)+r,l)}(e,a[t],a[t+1],o[t],o[t+1],s,i,c,r.map)}}var B=function(e){function t(n,r,o,a){var i;return(i=e.call(this)||this).calc=void 0,i.payload=n instanceof v&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],i.calc=U(r,o,a),i}s(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=U(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(v),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}s(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new B(this,e,t,n)},t}(g),q=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}s(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new B(this,e,t)},t}(v),z=0,V=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,c=a(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(o({},c,{delay:r,to:i}));else if(i){var s={};Object.entries(i).forEach((function(e){var t,n=e[0],a=e[1],i=o({to:(t={},t[n]=a,t),delay:h(r,n)},c),l=s[i.delay]&&s[i.delay].to;s[i.delay]=o({},s[i.delay],i,{to:o({},l,i.to)})})),this.queue=Object.values(s)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(c),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,a=e.to,i=void 0===a?{}:a;u.obj(r)&&(t.merged=o({},r,t.merged)),u.obj(i)&&(t.merged=o({},t.merged,i))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,i){var c=o.delay,s=a(o,["delay"]),l=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(s.to)||u.fun(s.to);c?setTimeout((function(){n===t.guid&&(d?t.runAsync(s,l):t.diff(s).start(l))}),c):d?t.runAsync(s,l):t.diff(s).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,N.has(this)||N.add(this),A||(A=!0,S(F||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,N.has(this)&&N.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,a(e,["delay"])),i=this.local,c=Promise.resolve(void 0);if(u.arr(r.to))for(var s=function(e){var t=e,a=o({},r,m(r.to[t]));u.arr(a.config)&&(a.config=a.config[t]),c=c.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(a).start(e)}))}))},l=0;l=r.length)return"break";i=r[a++]}else{if((a=r.next()).done)return"break";i=a.value}var n=i.key,c=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(c),e.current.deleted=e.current.deleted.filter(c))},r=e.current.deleted,o=Array.isArray(r),a=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var Q=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof g||(t=y.transform(t)),n.payload=t,n}return s(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function le(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,a=se(o,r,e+1/3),i=se(o,r,e),c=se(o,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*i)<<16|Math.round(255*c)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function fe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function pe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function he(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|fe(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ce.exec(t))?parseInt(n[1],16)>>>0:(n=ae.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|le(de(n[1]),pe(n[2]),pe(n[3])))>>>0:(n=re.exec(t))?(le(de(n[1]),pe(n[2]),pe(n[3]))|fe(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ye=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,be=new RegExp("("+Object.keys(J).join("|")+")","g"),ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ve=["Webkit","Ms","Moz","O"];function Oe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).reduce((function(e,t){return ve.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ge);var we={};M((function(e){return new Q(e)})),P("div"),E((function(e){var t=e.output.map((function(e){return e.replace(ye,he)})).map((function(e){return e.replace(be,he)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return U(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),_(J),w((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,c=a(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=Oe(l,n[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var f in c){var p=s?f:we[f]||(we[f]=f.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(p)&&e.setAttribute(p,c[f])}}),(function(e){return e}));var _e,ke,Se=(_e=function(e){return i.forwardRef((function(t,n){var r=d(),s=i.useRef(!0),l=i.useRef(null),f=i.useRef(null),p=i.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;f.current&&(e=y.fn(f.current,l.current.getAnimatedValue())),f.current&&!1!==e||r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){s.current=!1,l.current&&l.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(f,s,r)})),p(t);var h,m=l.current.getValue(),b=(m.scrollTop,m.scrollLeft,a(m,["scrollTop","scrollLeft"])),g=(h=e,!u.fun(h)||h.prototype instanceof c.Component?function(e){return f.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return c.createElement(e,o({},b,{ref:g}))}))},void 0===(ke=!1)&&(ke=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=ke?t[0].toLowerCase()+t.substring(1):t;return e[n]=_e(n),e}),_e)}),je=Se(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Se,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=L,t.animated=je,t.a=je,t.interpolate=function(e,t,n){return e&&new B(e,t,n)},t.Globals=R,t.useSpring=function(e){var t=u.fun(e),n=K(1,t?e:[e]),r=n[0],o=n[1],a=n[2];return t?[r[0],o,a]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=u.fun(t),a=h(t),c=i.useRef(),s=K(e,(function(e,t){return 0===e&&(c.current=[]),c.current.push(t),o({},a,{config:h(a.config,e),attach:e>0&&function(){return c.current[e-1]}})})),l=s[0],d=s[1],f=s[2],p=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=c.current[r];return o({},e,{config:h(e.config||a.config,t),attach:i&&function(){return i}})}))}}),[e,a.reverse]);return i.useEffect((function(){n.current&&!r&&p(t)})),i.useEffect((function(){n.current=!0}),[]),r?[l,p,f]:l},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),c=Y(r),s=c.lazy,l=void 0!==s&&s,u=(c.unique,c.reset),f=void 0!==u&&u,p=(c.enter,c.leave,c.update,c.onDestroyed),m=(c.keys,c.items,c.onFrame),y=c.onRest,b=c.onStart,g=c.ref,v=a(c,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=d(),w=i.useRef(!1),_=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!w.current&&new Map,forceUpdate:O});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var n=e.first,r=e.prevProps,i=a(e,["first","prevProps"]),c=Y(t),s=c.items,l=c.keys,u=c.initial,d=c.from,f=c.enter,p=c.leave,m=c.update,y=c.trail,b=void 0===y?0:y,g=c.unique,v=c.config,O=c.order,w=void 0===O?["enter","leave","update"]:O,_=Y(r),k=_.keys,S=_.items,j=o({},i.current),E=[].concat(i.deleted),C=Object.keys(j),D=new Set(C),P=new Set(l),x=l.filter((function(e){return!D.has(e)})),F=i.transitions.filter((function(e){return!e.destroyed&&!P.has(e.originalKey)})).map((function(e){return e.originalKey})),T=l.filter((function(e){return D.has(e)})),M=-b;w.length;)switch(w.shift()){case"enter":x.forEach((function(e,t){g&&E.find((function(t){return t.originalKey===e}))&&(E=E.filter((function(t){return t.originalKey!==e})));var r=l.indexOf(e),o=s[r],a=n&&void 0!==u?"initial":"enter";j[e]={slot:a,originalKey:e,key:g?String(e):W++,item:o,trail:M+=b,config:h(v,o,a),from:h(n&&void 0!==u?u||{}:d,o),to:h(f,o)}}));break;case"leave":F.forEach((function(e){var t=k.indexOf(e),n=S[t];E.unshift(o({},j[e],{slot:"leave",destroyed:!0,left:k[Math.max(0,t-1)],right:k[Math.min(k.length,t+1)],trail:M+=b,config:h(v,n,"leave"),to:h(p,n)})),delete j[e]}));break;case"update":T.forEach((function(e){var t=l.indexOf(e),n=s[t];j[e]=o({},j[e],{item:n,slot:"update",trail:M+=b,config:h(v,n,"update"),to:h(m,n)})}))}var R=l.map((function(e){return j[e]}));return E.forEach((function(e){var t,n=e.left,r=(e.right,a(e,["left","right"]));-1!==(t=R.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),R=[].concat(R.slice(0,t),[r],R.slice(t))})),o({},i,{changed:x.length||F.length||T.length,first:n&&0===x.length,transitions:R,current:j,deleted:E,prevProps:t})}(_.current,r),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,a=e.config,i=e.trail,c=e.key,s=e.item;_.current.instances.has(c)||_.current.instances.set(c,new V);var u=_.current.instances.get(c),d=o({},v,{to:r,from:n,config:a,ref:g,onRest:function(n){_.current.mounted&&(e.destroyed&&(g||l||$(_,c),p&&p(s)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(g||l)&&_.current.deleted.length>0&&$(_),y&&y(s,t,n))},onStart:b&&function(){return b(s,t)},onFrame:m&&function(e){return m(s,t,e)},delay:i,reset:f&&"enter"===t});u.update(d),_.current.paused||u.start()})),i.useEffect((function(){return _.current.mounted=w.current=!0,function(){_.current.mounted=w.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:_.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var a=e.current;if(a){var i=a.controllers;if(i.length){var c=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+c})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=K},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(8),o=n(165);function a(e,t){return e===t}function i(e){return"function"==typeof e?function(){return e}:e}function c(e,t,n){var c=n&&n.equalityFn||a,s=function(e){var t=Object(r.useState)(i(e)),n=t[0],o=t[1];return[n,Object(r.useCallback)((function(e){return o(i(e))}),[])]}(e),l=s[0],u=s[1],d=Object(o.a)(Object(r.useCallback)((function(e){return u(e)}),[u]),t,n),f=Object(r.useRef)(e);return c(f.current,e)||(d(e),f.current=e),[l,d]}},,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=Array.prototype.slice,o=n(382),a=Object.keys,i=a?function(e){return a(e)}:n(578),c=Object.keys;i.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return o(e)?c(r.call(e)):c(e)}):Object.keys=i,Object.keys||i},e.exports=i},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(296);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},function(e,t,n){"use strict";var r=n(580),o=n(592),a=n(262),i=n(395),c=n(394),s=n(616);e.exports=function(){var e=s(this),t=c(a(e,"length")),n=1;arguments.length>0&&void 0!==arguments[0]&&(n=i(arguments[0]));var l=r(e,0);return o(l,e,t,0,n),l}},function(e,t,n){"use strict";var r=n(71)("%Object.defineProperty%",!0);if(r)try{r({},"a",{value:1})}catch(e){r=null}var o=n(169)("Object.prototype.propertyIsEnumerable");e.exports=function(e,t,n,a,i,c){if(!r){if(!e(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(i in a&&o(a,i)!==!!c["[[Enumerable]]"])return!1;var s=c["[[Value]]"];return a[i]=s,t(a[i],s)}return r(a,i,n(c)),!0}},function(e,t,n){"use strict";var r=n(297),o=n(130);e.exports=function(e){if(void 0===e)return e;r(o,"Property Descriptor","Desc",e);var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=e["[[Configurable]]"]),t}},function(e,t,n){"use strict";var r=n(188),o=n(297),a=n(130);e.exports=function(e){return void 0!==e&&(o(a,"Property Descriptor","Desc",e),!(!r(e,"[[Value]]")&&!r(e,"[[Writable]]")))}},function(e,t,n){"use strict";var r=n(298);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},function(e,t,n){"use strict";var r=n(188),o=n(71)("%TypeError%"),a=n(130),i=n(390),c=n(588);e.exports=function(e){if("Object"!==a(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=i(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=i(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=i(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!c(n))throw new o("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var s=e.set;if(void 0!==s&&!c(s))throw new o("setter must be a function");t["[[Set]]"]=s}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},function(e,t,n){"use strict";e.exports=function(e){return!!e}},function(e,t,n){"use strict";var r=Number.isNaN||function(e){return e!=e};e.exports=Number.isFinite||function(e){return"number"==typeof e&&!r(e)&&e!==1/0&&e!==-1/0}},function(e,t,n){"use strict";var r=n(71),o=r("%Math%"),a=r("%Number%");e.exports=a.MAX_SAFE_INTEGER||o.pow(2,53)-1},function(e,t,n){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},function(e,t,n){"use strict";var r=n(392),o=n(395);e.exports=function(e){var t=o(e);return t<=0?0:t>r?r:t}},function(e,t,n){"use strict";var r=n(603),o=n(610);e.exports=function(e){var t=o(e);return 0!==t&&(t=r(t)),0===t?0:t}},function(e,t,n){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},function(e,t,n){"use strict";var r=Object.prototype.toString;if(n(383)()){var o=Symbol.prototype.toString,a=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==r.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&a.test(o.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},function(e,t,n){"use strict";e.exports=n(617)},function(e,t,n){"use strict";var r=n(384);e.exports=function(){return Array.prototype.flat||r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=void 0,o=void 0;function a(e,t){var n=t(e(o));return function(){return n}}function i(e){return a(e,r.createLTR||r.create)}function c(){for(var e=arguments.length,t=Array(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],o=0;o=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===r.RFC1738&&(40===u||41===u)?s+=c.charAt(l):u<128?s+=i[u]:u<2048?s+=i[192|u>>6]+i[128|63&u]:u<55296||u>=57344?s+=i[224|u>>12]+i[128|u>>6&63]+i[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&c.charCodeAt(l)),s+=i[240|u>>18]+i[128|u>>12&63]+i[128|u>>6&63]+i[128|63&u])}return s},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(654);e.exports=r},function(e,t,n){var r=n(203),o=n(411),a=n(265),i=n(303),c=n(306),s=n(156),l=n(413),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=i(e),t=c(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return a(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!r.call({1:2},1);t.f=a?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(170),o=n(304),a="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?a.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(203),o=n(170),a=n(414);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(131),o=n(230),a=r.document,i=o(a)&&o(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t,n){var r=n(131),o=n(204),a=n(156),i=n(307),c=n(416),s=n(417),l=s.get,u=s.enforce,d=String(String).split("String");(e.exports=function(e,t,n,c){var s,l=!!c&&!!c.unsafe,f=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||o(n,"name",t),(s=u(n)).source||(s.source=d.join("string"==typeof t?t:""))),e!==r?(l?!p&&e[t]&&(f=!0):delete e[t],f?e[t]=n:o(e,t,n)):f?e[t]=n:i(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||c(this)}))},function(e,t,n){var r=n(308),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r,o,a,i=n(656),c=n(131),s=n(230),l=n(204),u=n(156),d=n(308),f=n(309),p=n(311),h=c.WeakMap;if(i){var m=d.state||(d.state=new h),y=m.get,b=m.has,g=m.set;r=function(e,t){return t.facade=e,g.call(m,e,t),t},o=function(e){return y.call(m,e)||{}},a=function(e){return b.call(m,e)}}else{var v=f("state");p[v]=!0,r=function(e,t){return t.facade=e,l(e,v,t),t},o=function(e){return u(e,v)?e[v]:{}},a=function(e){return u(e,v)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(310),o=n(308);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(156),o=n(303),a=n(660).indexOf,i=n(311);e.exports=function(e,t){var n,c=o(e),s=0,l=[];for(n in c)!r(i,n)&&r(c,n)&&l.push(n);for(;t.length>s;)r(c,n=t[s++])&&(~a(l,n)||l.push(n));return l}},function(e,t,n){var r=n(314),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(420),o=n(315);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(664);e.exports=r},function(e,t,n){"use strict";var r,o,a,i=n(170),c=n(426),s=n(204),l=n(156),u=n(171),d=n(310),f=u("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(o=c(c(a)))!==Object.prototype&&(r=o):p=!0);var h=null==r||i((function(){var e={};return r[f].call(e)!==e}));h&&(r={}),d&&!h||l(r,f)||s(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(e,t,n){var r=n(156),o=n(316),a=n(309),i=n(669),c=a("IE_PROTO"),s=Object.prototype;e.exports=i?Object.getPrototypeOf:function(e){return e=o(e),r(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){var r=n(670),o=n(671),a=n(170);e.exports=!!Object.getOwnPropertySymbols&&!a((function(){return!Symbol.sham&&(r?38===o:o>37&&o<41)}))},function(e,t,n){var r=n(231).f,o=n(156),a=n(171)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(381),o=function(e){return null!=e},a=n(296)(),i=n(169),c=Object,s=i("Array.prototype.push"),l=i("Object.prototype.propertyIsEnumerable"),u=a?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(!o(e))throw new TypeError("target must be an object");var n,i,d,f,p,h,m,y=c(e);for(n=1;n2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e)return 0;var o="width"===t?"Left":"Top",a="width"===t?"Right":"Bottom",i=!n||r?window.getComputedStyle(e):null,c=e.offsetWidth,s=e.offsetHeight,l="width"===t?c:s;return n||(l-=parseFloat(i["padding"+o])+parseFloat(i["padding"+a])+parseFloat(i["border"+o+"Width"])+parseFloat(i["border"+a+"Width"])),r&&(l+=parseFloat(i["margin"+o])+parseFloat(i["margin"+a])),l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=o&&at.clientHeight?t:o(t)}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,n=r(),i=o(e);return t.set(i,i.style.overflowY),i===n?t:a(i,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&(L||A||i!==w)){var W=g||this.today;H=this.deleteModifierFromRange(H,W,W.clone().add(w,"days"),"blocked-minimum-nights"),H=this.deleteModifierFromRange(H,W,W.clone().add(w,"days"),"blocked")}(L||R)&&(0,u.default)(x).forEach((function(e){Object.keys(e).forEach((function(e){var n=(0,l.default)(e),r=!1;(L||F)&&(c(n)?(H=t.addModifier(H,n,"blocked-out-of-range"),r=!0):H=t.deleteModifier(H,n,"blocked-out-of-range")),(L||T)&&(s(n)?(H=t.addModifier(H,n,"blocked-calendar"),r=!0):H=t.deleteModifier(H,n,"blocked-calendar")),H=r?t.addModifier(H,n,"blocked"):t.deleteModifier(H,n,"blocked"),(L||M)&&(H=d(n)?t.addModifier(H,n,"highlighted-calendar"):t.deleteModifier(H,n,"highlighted-calendar"))}))})),i>0&&n&&a===P.END_DATE&&(H=this.addModifierToRange(H,n,n.clone().add(i,"days"),"blocked-minimum-nights"),H=this.addModifierToRange(H,n,n.clone().add(i,"days"),"blocked"));var G=(0,l.default)();if((0,y.default)(this.today,G)||(H=this.deleteModifier(H,this.today,"today"),H=this.addModifier(H,G,"today"),this.today=G),Object.keys(H).length>0&&this.setState({visibleDays:(0,o.default)({},x,H)}),L||f!==j){var Y=I(f,a);this.setState({phrases:(0,o.default)({},f,{chooseAvailableDate:Y})})}}},{key:"onDayClick",value:function(e,t){var n=this.props,r=n.keepOpenOnDateSelect,o=n.minimumNights,a=n.onBlur,i=n.focusedInput,c=n.onFocusChange,s=n.onClose,l=n.onDatesChange,u=n.startDateOffset,d=n.endDateOffset,f=n.disabled;if(t&&t.preventDefault(),!this.isBlocked(e)){var p=this.props,m=p.startDate,y=p.endDate;if(u||d)m=(0,w.default)(u,e),y=(0,w.default)(d,e),r||(c(null),s({startDate:m,endDate:y}));else if(i===P.START_DATE){var v=y&&y.clone().subtract(o,"days"),O=(0,g.default)(v,e)||(0,b.default)(m,y),_=f===P.END_DATE;_&&O||(m=e,O&&(y=null)),_&&!O?(c(null),s({startDate:m,endDate:y})):_||c(P.END_DATE)}else if(i===P.END_DATE){var k=m&&m.clone().add(o,"days");m?(0,h.default)(e,k)?(y=e,r||(c(null),s({startDate:m,endDate:y}))):f!==P.START_DATE&&(m=e,y=null):(y=e,c(P.START_DATE))}l({startDate:m,endDate:y}),a()}}},{key:"onDayMouseEnter",value:function(e){if(!this.isTouchDevice){var t=this.props,n=t.startDate,r=t.endDate,a=t.focusedInput,i=t.minimumNights,c=t.startDateOffset,s=t.endDateOffset,l=this.state,u=l.hoverDate,d=l.visibleDays,f=null;if(a){var p=c||s,h={};if(p){var m=(0,w.default)(c,e),v=(0,w.default)(s,e,(function(e){return e.add(1,"day")}));f={start:m,end:v},this.state.dateOffset&&this.state.dateOffset.start&&this.state.dateOffset.end&&(h=this.deleteModifierFromRange(h,this.state.dateOffset.start,this.state.dateOffset.end,"hovered-offset")),h=this.addModifierToRange(h,m,v,"hovered-offset")}if(!p){if(h=this.deleteModifier(h,u,"hovered"),h=this.addModifier(h,e,"hovered"),n&&!r&&a===P.END_DATE){if((0,b.default)(u,n)){var O=u.clone().add(1,"day");h=this.deleteModifierFromRange(h,n,O,"hovered-span")}if(!this.isBlocked(e)&&(0,b.default)(e,n)){var _=e.clone().add(1,"day");h=this.addModifierToRange(h,n,_,"hovered-span")}}if(!n&&r&&a===P.START_DATE&&((0,g.default)(u,r)&&(h=this.deleteModifierFromRange(h,u,r,"hovered-span")),!this.isBlocked(e)&&(0,g.default)(e,r)&&(h=this.addModifierToRange(h,e,r,"hovered-span"))),n){var k=n.clone().add(1,"day"),S=n.clone().add(i+1,"days");if(h=this.deleteModifierFromRange(h,k,S,"after-hovered-start"),(0,y.default)(e,n)){var j=n.clone().add(1,"day"),E=n.clone().add(i+1,"days");h=this.addModifierToRange(h,j,E,"after-hovered-start")}}}this.setState({hoverDate:e,dateOffset:f,visibleDays:(0,o.default)({},d,h)})}}}},{key:"onDayMouseLeave",value:function(e){var t=this.props,n=t.startDate,r=t.endDate,a=t.minimumNights,i=this.state,c=i.hoverDate,s=i.visibleDays,l=i.dateOffset;if(!this.isTouchDevice&&c){var u={};if(u=this.deleteModifier(u,c,"hovered"),l&&(u=this.deleteModifierFromRange(u,this.state.dateOffset.start,this.state.dateOffset.end,"hovered-offset")),n&&!r&&(0,b.default)(c,n)){var d=c.clone().add(1,"day");u=this.deleteModifierFromRange(u,n,d,"hovered-span")}if(!n&&r&&(0,b.default)(r,c)&&(u=this.deleteModifierFromRange(u,c,r,"hovered-span")),n&&(0,y.default)(e,n)){var f=n.clone().add(1,"day"),p=n.clone().add(a+1,"days");u=this.deleteModifierFromRange(u,f,p,"after-hovered-start")}this.setState({hoverDate:null,visibleDays:(0,o.default)({},s,u)})}}},{key:"onPrevMonthClick",value:function(){var e=this.props,t=e.onPrevMonthClick,n=e.numberOfMonths,r=e.enableOutsideDays,a=this.state,i=a.currentMonth,c=a.visibleDays,s={};Object.keys(c).sort().slice(0,n+1).forEach((function(e){s[e]=c[e]}));var l=i.clone().subtract(2,"months"),u=(0,v.default)(l,1,r,!0),d=i.clone().subtract(1,"month");this.setState({currentMonth:d,visibleDays:(0,o.default)({},s,this.getModifiers(u))},(function(){t(d.clone())}))}},{key:"onNextMonthClick",value:function(){var e=this.props,t=e.onNextMonthClick,n=e.numberOfMonths,r=e.enableOutsideDays,a=this.state,i=a.currentMonth,c=a.visibleDays,s={};Object.keys(c).sort().slice(1).forEach((function(e){s[e]=c[e]}));var l=i.clone().add(n+1,"month"),u=(0,v.default)(l,1,r,!0),d=i.clone().add(1,"month");this.setState({currentMonth:d,visibleDays:(0,o.default)({},s,this.getModifiers(u))},(function(){t(d.clone())}))}},{key:"onMonthChange",value:function(e){var t=this.props,n=t.numberOfMonths,r=t.enableOutsideDays,o=t.orientation===P.VERTICAL_SCROLLABLE,a=(0,v.default)(e,n,r,o);this.setState({currentMonth:e.clone(),visibleDays:this.getModifiers(a)})}},{key:"onYearChange",value:function(e){var t=this.props,n=t.numberOfMonths,r=t.enableOutsideDays,o=t.orientation===P.VERTICAL_SCROLLABLE,a=(0,v.default)(e,n,r,o);this.setState({currentMonth:e.clone(),visibleDays:this.getModifiers(a)})}},{key:"onMultiplyScrollableMonths",value:function(){var e=this.props,t=e.numberOfMonths,n=e.enableOutsideDays,r=this.state,a=r.currentMonth,i=r.visibleDays,c=Object.keys(i).length,s=a.clone().add(c,"month"),l=(0,v.default)(s,t,n,!0);this.setState({visibleDays:(0,o.default)({},i,this.getModifiers(l))})}},{key:"getFirstFocusableDay",value:function(e){var t=this,n=this.props,r=n.startDate,o=n.endDate,a=n.focusedInput,i=n.minimumNights,c=n.numberOfMonths,s=e.clone().startOf("month");if(a===P.START_DATE&&r?s=r.clone():a===P.END_DATE&&!o&&r?s=r.clone().add(i,"days"):a===P.END_DATE&&o&&(s=o.clone()),this.isBlocked(s)){for(var l=[],u=e.clone().add(c-1,"months").endOf("month"),d=s.clone();!(0,b.default)(d,u);)d=d.clone().add(1,"day"),l.push(d);var f=l.filter((function(e){return!t.isBlocked(e)}));f.length>0&&(s=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&i.return&&i.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(f,1)[0])}return s}},{key:"getModifiers",value:function(e){var t=this,n={};return Object.keys(e).forEach((function(r){n[r]={},e[r].forEach((function(e){n[r][(0,_.default)(e)]=t.getModifiersForDay(e)}))})),n}},{key:"getModifiersForDay",value:function(e){var t=this;return new Set(Object.keys(this.modifiers).filter((function(n){return t.modifiers[n](e)})))}},{key:"getStateForNewMonth",value:function(e){var t=this,n=e.initialVisibleMonth,r=e.numberOfMonths,o=e.enableOutsideDays,a=e.orientation,i=e.startDate,c=(n||(i?function(){return i}:function(){return t.today}))(),s=a===P.VERTICAL_SCROLLABLE;return{currentMonth:c,visibleDays:this.getModifiers((0,v.default)(c,r,o,s))}}},{key:"addModifier",value:function(e,t,n){var r=this.props,a=r.numberOfMonths,i=r.enableOutsideDays,c=r.orientation,s=this.state,l=s.currentMonth,u=s.visibleDays,d=l,f=a;if(c===P.VERTICAL_SCROLLABLE?f=Object.keys(u).length:(d=d.clone().subtract(1,"month"),f+=2),!t||!(0,O.default)(t,d,f,i))return e;var p=(0,_.default)(t),h=(0,o.default)({},e);if(i)h=Object.keys(u).filter((function(e){return Object.keys(u[e]).indexOf(p)>-1})).reduce((function(t,r){var a=e[r]||u[r],i=new Set(a[p]);return i.add(n),(0,o.default)({},t,T({},r,(0,o.default)({},a,T({},p,i))))}),h);else{var m=(0,k.default)(t),y=e[m]||u[m],b=new Set(y[p]);b.add(n),h=(0,o.default)({},h,T({},m,(0,o.default)({},y,T({},p,b))))}return h}},{key:"addModifierToRange",value:function(e,t,n,r){for(var o=e,a=t.clone();(0,g.default)(a,n);)o=this.addModifier(o,a,r),a=a.clone().add(1,"day");return o}},{key:"deleteModifier",value:function(e,t,n){var r=this.props,a=r.numberOfMonths,i=r.enableOutsideDays,c=r.orientation,s=this.state,l=s.currentMonth,u=s.visibleDays,d=l,f=a;if(c===P.VERTICAL_SCROLLABLE?f=Object.keys(u).length:(d=d.clone().subtract(1,"month"),f+=2),!t||!(0,O.default)(t,d,f,i))return e;var p=(0,_.default)(t),h=(0,o.default)({},e);if(i)h=Object.keys(u).filter((function(e){return Object.keys(u[e]).indexOf(p)>-1})).reduce((function(t,r){var a=e[r]||u[r],i=new Set(a[p]);return i.delete(n),(0,o.default)({},t,T({},r,(0,o.default)({},a,T({},p,i))))}),h);else{var m=(0,k.default)(t),y=e[m]||u[m],b=new Set(y[p]);b.delete(n),h=(0,o.default)({},h,T({},m,(0,o.default)({},y,T({},p,b))))}return h}},{key:"deleteModifierFromRange",value:function(e,t,n,r){for(var o=e,a=t.clone();(0,g.default)(a,n);)o=this.deleteModifier(o,a,r),a=a.clone().add(1,"day");return o}},{key:"doesNotMeetMinimumNights",value:function(e){var t=this.props,n=t.startDate,r=t.isOutsideRange,o=t.focusedInput,a=t.minimumNights;if(o!==P.END_DATE)return!1;if(n){var i=e.diff(n.clone().startOf("day").hour(12),"days");return i=0}return r((0,l.default)(e).subtract(a,"days"))}},{key:"isDayAfterHoveredStartDate",value:function(e){var t=this.props,n=t.startDate,r=t.endDate,o=t.minimumNights,a=(this.state||{}).hoverDate;return!!n&&!r&&!this.isBlocked(e)&&(0,m.default)(a,e)&&o>0&&(0,y.default)(a,n)}},{key:"isEndDate",value:function(e){var t=this.props.endDate;return(0,y.default)(e,t)}},{key:"isHovered",value:function(e){var t=(this.state||{}).hoverDate;return!!this.props.focusedInput&&(0,y.default)(e,t)}},{key:"isInHoveredSpan",value:function(e){var t=this.props,n=t.startDate,r=t.endDate,o=(this.state||{}).hoverDate,a=!!n&&!r&&(e.isBetween(n,o)||(0,y.default)(o,e)),i=!!r&&!n&&(e.isBetween(o,r)||(0,y.default)(o,e)),c=o&&!this.isBlocked(o);return(a||i)&&c}},{key:"isInSelectedSpan",value:function(e){var t=this.props,n=t.startDate,r=t.endDate;return e.isBetween(n,r)}},{key:"isLastInRange",value:function(e){var t=this.props.endDate;return this.isInSelectedSpan(e)&&(0,m.default)(e,t)}},{key:"isStartDate",value:function(e){var t=this.props.startDate;return(0,y.default)(e,t)}},{key:"isBlocked",value:function(e){var t=this.props,n=t.isDayBlocked,r=t.isOutsideRange;return n(e)||r(e)||this.doesNotMeetMinimumNights(e)}},{key:"isToday",value:function(e){return(0,y.default)(e,this.today)}},{key:"isFirstDayOfWeek",value:function(e){var t=this.props.firstDayOfWeek;return e.day()===(t||l.default.localeData().firstDayOfWeek())}},{key:"isLastDayOfWeek",value:function(e){var t=this.props.firstDayOfWeek;return e.day()===((t||l.default.localeData().firstDayOfWeek())+6)%7}},{key:"render",value:function(){var e=this.props,t=e.numberOfMonths,n=e.orientation,r=e.monthFormat,o=e.renderMonthText,i=e.navPrev,c=e.navNext,s=e.noNavButtons,l=e.onOutsideClick,u=e.withPortal,d=e.enableOutsideDays,f=e.firstDayOfWeek,p=e.hideKeyboardShortcutsPanel,h=e.daySize,m=e.focusedInput,y=e.renderCalendarDay,b=e.renderDayContents,g=e.renderCalendarInfo,v=e.renderMonthElement,O=e.calendarInfoPosition,w=e.onBlur,_=e.isFocused,k=e.showKeyboardShortcuts,S=e.isRTL,j=e.weekDayFormat,E=e.dayAriaLabelFormat,C=e.verticalHeight,D=e.noBorder,P=e.transitionDuration,F=e.verticalBorderSpacing,T=e.horizontalMonthPadding,M=this.state,R=M.currentMonth,I=M.phrases,A=M.visibleDays;return a.default.createElement(x.default,{orientation:n,enableOutsideDays:d,modifiers:A,numberOfMonths:t,onDayClick:this.onDayClick,onDayMouseEnter:this.onDayMouseEnter,onDayMouseLeave:this.onDayMouseLeave,onPrevMonthClick:this.onPrevMonthClick,onNextMonthClick:this.onNextMonthClick,onMonthChange:this.onMonthChange,onYearChange:this.onYearChange,onMultiplyScrollableMonths:this.onMultiplyScrollableMonths,monthFormat:r,renderMonthText:o,withPortal:u,hidden:!m,initialVisibleMonth:function(){return R},daySize:h,onOutsideClick:l,navPrev:i,navNext:c,noNavButtons:s,renderCalendarDay:y,renderDayContents:b,renderCalendarInfo:g,renderMonthElement:v,calendarInfoPosition:O,firstDayOfWeek:f,hideKeyboardShortcutsPanel:p,isFocused:_,getFirstFocusableDay:this.getFirstFocusableDay,onBlur:w,showKeyboardShortcuts:k,phrases:I,isRTL:S,weekDayFormat:j,dayAriaLabelFormat:E,verticalHeight:C,verticalBorderSpacing:F,noBorder:D,transitionDuration:P,horizontalMonthPadding:T})}}]),t}(a.default.Component);t.default=A,A.propTypes=M,A.defaultProps=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!r.default.isMoment(e)||!r.default.isMoment(t))return!1;var n=(0,r.default)(e).add(1,"day");return(0,o.default)(n,t)};var r=a(n(21)),o=a(n(206));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,a){if(!r.default.isMoment(e))return{};for(var i={},c=a?e.clone():e.clone().subtract(1,"month"),s=0;s<(a?t:t+2);s+=1){var l=[],u=c.clone(),d=u.clone().startOf("month").hour(12),f=u.clone().endOf("month").hour(12),p=d.clone();if(n)for(var h=0;h0&&this.setState({visibleDays:(0,o.default)({},k,F)})}},{key:"componentWillUpdate",value:function(){this.today=(0,l.default)()}},{key:"onDayClick",value:function(e,t){if(t&&t.preventDefault(),!this.isBlocked(e)){var n=this.props,r=n.onDateChange,o=n.keepOpenOnDateSelect,a=n.onFocusChange,i=n.onClose;r(e),o||(a({focused:!1}),i({date:e}))}}},{key:"onDayMouseEnter",value:function(e){if(!this.isTouchDevice){var t=this.state,n=t.hoverDate,r=t.visibleDays,a=this.deleteModifier({},n,"hovered");a=this.addModifier(a,e,"hovered"),this.setState({hoverDate:e,visibleDays:(0,o.default)({},r,a)})}}},{key:"onDayMouseLeave",value:function(){var e=this.state,t=e.hoverDate,n=e.visibleDays;if(!this.isTouchDevice&&t){var r=this.deleteModifier({},t,"hovered");this.setState({hoverDate:null,visibleDays:(0,o.default)({},n,r)})}}},{key:"onPrevMonthClick",value:function(){var e=this.props,t=e.onPrevMonthClick,n=e.numberOfMonths,r=e.enableOutsideDays,a=this.state,i=a.currentMonth,c=a.visibleDays,s={};Object.keys(c).sort().slice(0,n+1).forEach((function(e){s[e]=c[e]}));var l=i.clone().subtract(1,"month"),u=(0,y.default)(l,1,r);this.setState({currentMonth:l,visibleDays:(0,o.default)({},s,this.getModifiers(u))},(function(){t(l.clone())}))}},{key:"onNextMonthClick",value:function(){var e=this.props,t=e.onNextMonthClick,n=e.numberOfMonths,r=e.enableOutsideDays,a=this.state,i=a.currentMonth,c=a.visibleDays,s={};Object.keys(c).sort().slice(1).forEach((function(e){s[e]=c[e]}));var l=i.clone().add(n,"month"),u=(0,y.default)(l,1,r),d=i.clone().add(1,"month");this.setState({currentMonth:d,visibleDays:(0,o.default)({},s,this.getModifiers(u))},(function(){t(d.clone())}))}},{key:"onMonthChange",value:function(e){var t=this.props,n=t.numberOfMonths,r=t.enableOutsideDays,o=t.orientation===k.VERTICAL_SCROLLABLE,a=(0,y.default)(e,n,r,o);this.setState({currentMonth:e.clone(),visibleDays:this.getModifiers(a)})}},{key:"onYearChange",value:function(e){var t=this.props,n=t.numberOfMonths,r=t.enableOutsideDays,o=t.orientation===k.VERTICAL_SCROLLABLE,a=(0,y.default)(e,n,r,o);this.setState({currentMonth:e.clone(),visibleDays:this.getModifiers(a)})}},{key:"getFirstFocusableDay",value:function(e){var t=this,n=this.props,r=n.date,o=n.numberOfMonths,a=e.clone().startOf("month");if(r&&(a=r.clone()),this.isBlocked(a)){for(var i=[],c=e.clone().add(o-1,"months").endOf("month"),s=a.clone();!(0,m.default)(s,c);)s=s.clone().add(1,"day"),i.push(s);var l=i.filter((function(e){return!t.isBlocked(e)&&(0,m.default)(e,a)}));if(l.length>0){var u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{!_n&&i.return&&i.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(l,1);a=u[0]}}return a}},{key:"getModifiers",value:function(e){var t=this,n={};return Object.keys(e).forEach((function(r){n[r]={},e[r].forEach((function(e){n[r][(0,g.default)(e)]=t.getModifiersForDay(e)}))})),n}},{key:"getModifiersForDay",value:function(e){var t=this;return new Set(Object.keys(this.modifiers).filter((function(n){return t.modifiers[n](e)})))}},{key:"getStateForNewMonth",value:function(e){var t=this,n=e.initialVisibleMonth,r=e.date,o=e.numberOfMonths,a=e.enableOutsideDays,i=(n||(r?function(){return r}:function(){return t.today}))();return{currentMonth:i,visibleDays:this.getModifiers((0,y.default)(i,o,a))}}},{key:"addModifier",value:function(e,t,n){var r=this.props,a=r.numberOfMonths,i=r.enableOutsideDays,c=r.orientation,s=this.state,l=s.currentMonth,u=s.visibleDays,d=l,f=a;if(c===k.VERTICAL_SCROLLABLE?f=Object.keys(u).length:(d=d.clone().subtract(1,"month"),f+=2),!t||!(0,b.default)(t,d,f,i))return e;var p=(0,g.default)(t),h=(0,o.default)({},e);if(i)h=Object.keys(u).filter((function(e){return Object.keys(u[e]).indexOf(p)>-1})).reduce((function(t,r){var a=e[r]||u[r],i=new Set(a[p]);return i.add(n),(0,o.default)({},t,E({},r,(0,o.default)({},a,E({},p,i))))}),h);else{var m=(0,v.default)(t),y=e[m]||u[m],O=new Set(y[p]);O.add(n),h=(0,o.default)({},h,E({},m,(0,o.default)({},y,E({},p,O))))}return h}},{key:"deleteModifier",value:function(e,t,n){var r=this.props,a=r.numberOfMonths,i=r.enableOutsideDays,c=r.orientation,s=this.state,l=s.currentMonth,u=s.visibleDays,d=l,f=a;if(c===k.VERTICAL_SCROLLABLE?f=Object.keys(u).length:(d=d.clone().subtract(1,"month"),f+=2),!t||!(0,b.default)(t,d,f,i))return e;var p=(0,g.default)(t),h=(0,o.default)({},e);if(i)h=Object.keys(u).filter((function(e){return Object.keys(u[e]).indexOf(p)>-1})).reduce((function(t,r){var a=e[r]||u[r],i=new Set(a[p]);return i.delete(n),(0,o.default)({},t,E({},r,(0,o.default)({},a,E({},p,i))))}),h);else{var m=(0,v.default)(t),y=e[m]||u[m],O=new Set(y[p]);O.delete(n),h=(0,o.default)({},h,E({},m,(0,o.default)({},y,E({},p,O))))}return h}},{key:"isBlocked",value:function(e){var t=this.props,n=t.isDayBlocked,r=t.isOutsideRange;return n(e)||r(e)}},{key:"isHovered",value:function(e){var t=(this.state||{}).hoverDate;return(0,h.default)(e,t)}},{key:"isSelected",value:function(e){var t=this.props.date;return(0,h.default)(e,t)}},{key:"isToday",value:function(e){return(0,h.default)(e,this.today)}},{key:"isFirstDayOfWeek",value:function(e){var t=this.props.firstDayOfWeek;return e.day()===(t||l.default.localeData().firstDayOfWeek())}},{key:"isLastDayOfWeek",value:function(e){var t=this.props.firstDayOfWeek;return e.day()===((t||l.default.localeData().firstDayOfWeek())+6)%7}},{key:"render",value:function(){var e=this.props,t=e.numberOfMonths,n=e.orientation,r=e.monthFormat,o=e.renderMonthText,i=e.navPrev,c=e.navNext,s=e.onOutsideClick,l=e.withPortal,u=e.focused,d=e.enableOutsideDays,f=e.hideKeyboardShortcutsPanel,p=e.daySize,h=e.firstDayOfWeek,m=e.renderCalendarDay,y=e.renderDayContents,b=e.renderCalendarInfo,g=e.renderMonthElement,v=e.calendarInfoPosition,O=e.isFocused,w=e.isRTL,_=e.phrases,k=e.dayAriaLabelFormat,j=e.onBlur,E=e.showKeyboardShortcuts,C=e.weekDayFormat,D=e.verticalHeight,P=e.noBorder,x=e.transitionDuration,F=e.verticalBorderSpacing,T=e.horizontalMonthPadding,M=this.state,R=M.currentMonth,I=M.visibleDays;return a.default.createElement(S.default,{orientation:n,enableOutsideDays:d,modifiers:I,numberOfMonths:t,onDayClick:this.onDayClick,onDayMouseEnter:this.onDayMouseEnter,onDayMouseLeave:this.onDayMouseLeave,onPrevMonthClick:this.onPrevMonthClick,onNextMonthClick:this.onNextMonthClick,onMonthChange:this.onMonthChange,onYearChange:this.onYearChange,monthFormat:r,withPortal:l,hidden:!u,hideKeyboardShortcutsPanel:f,initialVisibleMonth:function(){return R},firstDayOfWeek:h,onOutsideClick:s,navPrev:i,navNext:c,renderMonthText:o,renderCalendarDay:m,renderDayContents:y,renderCalendarInfo:b,renderMonthElement:g,calendarInfoPosition:v,isFocused:O,getFirstFocusableDay:this.getFirstFocusableDay,onBlur:j,phrases:_,daySize:p,isRTL:w,showKeyboardShortcuts:E,weekDayFormat:C,dayAriaLabelFormat:k,verticalHeight:D,noBorder:P,transitionDuration:x,verticalBorderSpacing:F,horizontalMonthPadding:T})}}]),t}(a.default.Component);t.default=P,P.propTypes=C,P.defaultProps=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(2)),o=h(n(157)),a=n(96),i=n(112),c=h(n(118)),s=h(n(232)),l=h(n(443)),u=h(n(444)),d=h(n(210)),f=h(n(190)),p=h(n(233));function h(e){return e&&e.__esModule?e:{default:e}}t.default={date:o.default.momentObj,onDateChange:r.default.func.isRequired,focused:r.default.bool,onFocusChange:r.default.func.isRequired,id:r.default.string.isRequired,placeholder:r.default.string,disabled:r.default.bool,required:r.default.bool,readOnly:r.default.bool,screenReaderInputMessage:r.default.string,showClearDate:r.default.bool,customCloseIcon:r.default.node,showDefaultInputIcon:r.default.bool,inputIconPosition:s.default,customInputIcon:r.default.node,noBorder:r.default.bool,block:r.default.bool,small:r.default.bool,regular:r.default.bool,verticalSpacing:a.nonNegativeInteger,keepFocusOnInput:r.default.bool,renderMonthText:(0,a.mutuallyExclusiveProps)(r.default.func,"renderMonthText","renderMonthElement"),renderMonthElement:(0,a.mutuallyExclusiveProps)(r.default.func,"renderMonthText","renderMonthElement"),orientation:l.default,anchorDirection:u.default,openDirection:d.default,horizontalMargin:r.default.number,withPortal:r.default.bool,withFullScreenPortal:r.default.bool,appendToBody:r.default.bool,disableScroll:r.default.bool,initialVisibleMonth:r.default.func,firstDayOfWeek:f.default,numberOfMonths:r.default.number,keepOpenOnDateSelect:r.default.bool,reopenPickerOnClearDate:r.default.bool,renderCalendarInfo:r.default.func,calendarInfoPosition:p.default,hideKeyboardShortcutsPanel:r.default.bool,daySize:a.nonNegativeInteger,isRTL:r.default.bool,verticalHeight:a.nonNegativeInteger,transitionDuration:a.nonNegativeInteger,horizontalMonthPadding:a.nonNegativeInteger,navPrev:r.default.node,navNext:r.default.node,onPrevMonthClick:r.default.func,onNextMonthClick:r.default.func,onClose:r.default.func,renderCalendarDay:r.default.func,renderDayContents:r.default.func,enableOutsideDays:r.default.bool,isDayBlocked:r.default.func,isOutsideRange:r.default.func,isDayHighlighted:r.default.func,displayFormat:r.default.oneOfType([r.default.string,r.default.func]),monthFormat:r.default.string,weekDayFormat:r.default.string,phrases:r.default.shape((0,c.default)(i.SingleDatePickerPhrases)),dayAriaLabelFormat:r.default.string}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1)for(var n=1;n(e.noteQueries[JSON.stringify(t)]||[]).map(t=>e.notes[t]),(e,t)=>[e.noteQueries[JSON.stringify(t)],e.notes]),h=(e,t)=>e.errors[t]||!1,m=(e,t)=>e.requesting[t]||!1;var y=n(33),b="SET_ERROR",g="SET_NOTE",v="SET_NOTE_IS_UPDATING",O="SET_NOTES",w="SET_NOTES_QUERY",_="SET_IS_REQUESTING";function*k(e,t){yield M("triggerNoteAction",!0);const n=`${y.c}/admin/notes/${e}/action/${t}`;try{const t=yield Object(l.apiFetch)({path:n,method:"POST"});yield C(e,t),yield M("triggerNoteAction",!1)}catch(e){throw yield T("triggerNoteAction",e),yield M("triggerNoteAction",!1),new Error}}function*S(e){yield M("removeNote",!0),yield P(e,!0);try{const t=`${y.c}/admin/notes/delete/${e}`,n=yield Object(l.apiFetch)({path:t,method:"DELETE"});return yield D(e,n),yield M("removeNote",!1),n}catch(t){throw yield T("removeNote",t),yield M("removeNote",!1),yield P(e,!1),new Error}}function*j(){yield M("removeAllNotes",!0);try{const e=y.c+"/admin/notes/delete/all",t=yield Object(l.apiFetch)({path:e,method:"DELETE"});return yield x(t),yield M("removeAllNotes",!1),t}catch(e){throw yield T("removeAllNotes",e),yield M("removeAllNotes",!1),new Error}}function*E(e,t){yield M("batchUpdateNotes",!0);try{const n=y.c+"/admin/notes/update",r=yield Object(l.apiFetch)({path:n,method:"PUT",data:{noteIds:e,...t}});yield x(r),yield M("batchUpdateNotes",!1)}catch(e){throw yield T("updateNote",e),yield M("batchUpdateNotes",!1),new Error}}function*C(e,t){yield M("updateNote",!0),yield P(e,!0);try{const n=`${y.c}/admin/notes/${e}`,r=yield Object(l.apiFetch)({path:n,method:"PUT",data:t});yield D(e,r),yield M("updateNote",!1),yield P(e,!1)}catch(t){throw yield T("updateNote",t),yield M("updateNote",!1),yield P(e,!1),new Error}}function D(e,t){return{type:g,noteId:e,noteFields:t}}function P(e,t){return{type:v,noteId:e,isUpdating:t}}function x(e){return{type:O,notes:e}}function F(e,t){return{type:w,query:e,noteIds:t}}function T(e,t){return{type:b,error:t,selector:e}}function M(e,t){return{type:_,selector:e,isRequesting:t}}var R=n(13);function*I(e={}){const t=Object(R.addQueryArgs)(y.c+"/admin/notes",e);try{const n=yield Object(l.apiFetch)({path:t});yield x(n),yield F(e,n.map(e=>e.id))}catch(e){yield T("getNotes",e)}}Object(s.registerStore)("wc/admin/notes",{reducer:(e={errors:{},noteQueries:{},notes:{},requesting:{}},{error:t,isRequesting:n,isUpdating:r,noteFields:o,noteId:a,noteIds:i,notes:c,query:s,selector:l,type:u})=>{switch(u){case O:e={...e,notes:{...e.notes,...c.reduce((e,t)=>(e[t.id]=t,e),{})}};break;case w:e={...e,noteQueries:{...e.noteQueries,[JSON.stringify(s)]:i}};break;case b:e={...e,errors:{...e.errors,[l]:t}};break;case g:e={...e,notes:{...e.notes,[a]:o}};break;case v:e={...e,notes:{...e.notes,[a]:{...e.notes[a],isUpdating:r}}};break;case _:e={...e,requesting:{...e.requesting,[l]:n}}}return e},actions:o,controls:l.controls,selectors:r,resolvers:a})},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"getReviews",(function(){return c})),n.d(r,"getReviewsTotalCount",(function(){return s})),n.d(r,"getReviewsError",(function(){return l}));var o={};n.r(o),n.d(o,"updateReviews",(function(){return b})),n.d(o,"updateReview",(function(){return g})),n.d(o,"deleteReview",(function(){return v})),n.d(o,"setReviewIsUpdating",(function(){return O})),n.d(o,"setReview",(function(){return w})),n.d(o,"setError",(function(){return _}));var a={};n.r(a),n.d(a,"getReviews",(function(){return S})),n.d(a,"getReviewsTotalCount",(function(){return j}));var i=n(10);const c=(e,t)=>{const n=JSON.stringify(t);return(e.reviews[n]&&e.reviews[n].data||[]).map(t=>e.data[t])},s=(e,t)=>{const n=JSON.stringify(t);return e.reviews[n]&&e.reviews[n].totalCount},l=(e,t)=>{const n=JSON.stringify(t);return e.errors[n]};var u=n(30),d=n(13),f="UPDATE_REVIEWS",p="SET_REVIEW",h="SET_ERROR",m="SET_REVIEW_IS_UPDATING",y=n(33);function b(e,t,n){return{type:f,reviews:t,query:e,totalCount:n}}function*g(e,t,n){yield O(e,!0);try{const r=Object(d.addQueryArgs)(`${y.c}/products/reviews/${e}`,n||{}),o=yield Object(u.apiFetch)({path:r,method:"PUT",data:t});yield w(e,o),yield O(e,!1)}catch(t){throw yield _("updateReview",t),yield O(e,!1),new Error}}function*v(e){yield O(e,!0);try{const t=`${y.c}/products/reviews/${e}`,n=yield Object(u.apiFetch)({path:t,method:"DELETE"});return yield w(e,n),yield O(e,!1),n}catch(t){throw yield _("deleteReview",t),yield O(e,!1),new Error}}function O(e,t){return{type:m,reviewId:e,isUpdating:t}}function w(e,t){return{type:p,reviewId:e,reviewData:t}}function _(e,t){return{type:h,query:e,error:t}}var k=n(109);function*S(e){try{const t=Object(d.addQueryArgs)(y.c+"/products/reviews",e),n=yield Object(k.b)({path:t,method:"GET"}),r=parseInt(n.headers.get("x-wp-total"),10);yield b(e,n.data,r)}catch(t){yield _(e,t)}}function*j(e){yield S(e)}Object(i.registerStore)("wc/admin/reviews",{reducer:(e={reviews:{},errors:{},data:{}},{type:t,query:n,reviews:r,reviewId:o,reviewData:a,totalCount:i,error:c,isUpdating:s})=>{switch(t){case f:const t=[],l=r.reduce((n,r)=>(t.push(r.id),n[r.id]={...e.data[r.id]||{},...r},n),{});return{...e,reviews:{...e.reviews,[JSON.stringify(n)]:{data:t,totalCount:i}},data:{...e.data,...l}};case p:return{...e,data:{...e.data,[o]:a}};case h:return{...e,errors:{...e.errors,[JSON.stringify(n)]:c}};case m:return{...e,data:{...e.data,[o]:{...e.data[o],isUpdating:s}}};default:return e}},actions:o,controls:k.a,selectors:r,resolvers:a})},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"getMenuItems",(function(){return u})),n.d(r,"getFavorites",(function(){return d})),n.d(r,"isNavigationRequesting",(function(){return f})),n.d(r,"getPersistedQuery",(function(){return p}));var o={};n.r(o),n.d(o,"setMenuItems",(function(){return x})),n.d(o,"addMenuItems",(function(){return F})),n.d(o,"getFavoritesFailure",(function(){return T})),n.d(o,"getFavoritesRequest",(function(){return M})),n.d(o,"getFavoritesSuccess",(function(){return R})),n.d(o,"addFavoriteRequest",(function(){return I})),n.d(o,"addFavoriteFailure",(function(){return A})),n.d(o,"addFavoriteSuccess",(function(){return N})),n.d(o,"removeFavoriteRequest",(function(){return L})),n.d(o,"removeFavoriteFailure",(function(){return U})),n.d(o,"removeFavoriteSuccess",(function(){return B})),n.d(o,"onLoad",(function(){return H})),n.d(o,"onHistoryChange",(function(){return q})),n.d(o,"addFavorite",(function(){return z})),n.d(o,"removeFavorite",(function(){return V}));var a={};n.r(a),n.d(a,"getFavorites",(function(){return K}));var i=n(30),c=n(10),s=n(183),l=n(45);const u=e=>Object(l.applyFilters)("woocommerce_navigation_menu_items",e.menuItems),d=e=>e.favorites||[],f=(e,t)=>e.requesting[t]||!1,p=e=>e.persistedQuery||{};var h=n(11),m=n.n(h),y=n(49),b="ADD_MENU_ITEMS",g="SET_MENU_ITEMS",v="ON_HISTORY_CHANGE",O="ADD_FAVORITE_FAILURE",w="ADD_FAVORITE_REQUEST",_="ADD_FAVORITE_SUCCESS",k="GET_FAVORITES_FAILURE",S="GET_FAVORITES_REQUEST",j="GET_FAVORITES_SUCCESS",E="REMOVE_FAVORITE_FAILURE",C="REMOVE_FAVORITE_REQUEST",D="REMOVE_FAVORITE_SUCCESS",P=n(33);function x(e){return{type:g,menuItems:e}}function F(e){return{type:b,menuItems:e}}function T(e){return{type:k,error:e}}function M(e){return{type:S,favorites:e}}function R(e){return{type:j,favorites:e}}function I(e){return{type:w,favorite:e}}function A(e,t){return{type:O,favorite:e,error:t}}function N(e){return{type:_,favorite:e}}function L(e){return{type:C,favorite:e}}function U(e,t){return{type:E,favorite:e,error:t}}function B(e,t){return{type:D,favorite:e,error:t}}function*H(){yield q()}function*q(){const e=Object(y.h)();if(!Object.keys(e).length)return null;yield{type:v,persistedQuery:e}}function*z(e){yield I(e);try{const t=yield m()({path:P.e+"/navigation/favorites/me",method:"POST",data:{item_id:e}});if(t)return yield N(e),t;throw new Error}catch(t){throw yield A(e,t),new Error}}function*V(e){yield L(e);try{const t=yield m()({path:P.e+"/navigation/favorites/me",method:"DELETE",data:{item_id:e}});if(t)return yield B(e),t;throw new Error}catch(t){throw yield U(e,t),new Error}}function*K(){yield M();try{const e=yield Object(i.apiFetch)({path:P.e+"/navigation/favorites/me"});if(e)return void(yield R(e));throw new Error}catch(e){throw yield T(e),new Error}}Object(c.registerStore)(s.a,{reducer:(e={error:null,menuItems:[],favorites:[],requesting:{},persistedQuery:{}},{type:t,error:n,favorite:r,favorites:o,menuItems:a,persistedQuery:i})=>{switch(t){case g:e={...e,menuItems:a};break;case b:e={...e,menuItems:[...e.menuItems,...a]};break;case v:e={...e,persistedQuery:i};break;case k:e={...e,requesting:{...e.requesting,getFavorites:!1}};break;case S:e={...e,requesting:{...e.requesting,getFavorites:!0}};break;case j:e={...e,favorites:o,requesting:{...e.requesting,getFavorites:!1}};break;case O:e={...e,error:n,requesting:{...e.requesting,addFavorite:!1}};break;case w:e={...e,requesting:{...e.requesting,addFavorite:!0}};break;case _:const t=e.favorites.includes(r)?e.favorites:[...e.favorites,r];e={...e,favorites:t,menuItems:e.menuItems.map(e=>e.id===r?{...e,menuId:"favorites"}:e),requesting:{...e.requesting,addFavorite:!1}};break;case E:e={...e,requesting:{...e.requesting,error:n,removeFavorite:!1}};break;case C:e={...e,requesting:{...e.requesting,removeFavorite:!0}};break;case D:const c=e.favorites.filter(e=>e!==r);e={...e,favorites:c,menuItems:e.menuItems.map(e=>e.id===r?{...e,menuId:"plugins"}:e),requesting:{...e.requesting,removeFavorite:!1}}}return e},actions:o,controls:i.controls,resolvers:a,selectors:r}),(async()=>{const{onLoad:e,onHistoryChange:t}=Object(c.dispatch)(s.a);await e(),Object(y.a)(async()=>{setTimeout(async()=>{await t()},0)})})(),s.a},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"getPaymentGatewaysRequest",(function(){return l})),n.d(r,"getPaymentGatewaysSuccess",(function(){return u})),n.d(r,"getPaymentGatewaysError",(function(){return d})),n.d(r,"getPaymentGatewayRequest",(function(){return f})),n.d(r,"getPaymentGatewayError",(function(){return p})),n.d(r,"getPaymentGatewaySuccess",(function(){return h})),n.d(r,"updatePaymentGatewaySuccess",(function(){return m})),n.d(r,"updatePaymentGatewayRequest",(function(){return y})),n.d(r,"updatePaymentGatewayError",(function(){return b})),n.d(r,"updatePaymentGateway",(function(){return g}));var o={};n.r(o),n.d(o,"getPaymentGateways",(function(){return O})),n.d(o,"getPaymentGateway",(function(){return w}));var a={};n.r(a),n.d(a,"getPaymentGateway",(function(){return _})),n.d(a,"getPaymentGateways",(function(){return k})),n.d(a,"getPaymentGatewayError",(function(){return S})),n.d(a,"isPaymentGatewayUpdating",(function(){return j}));var i=n(10),c=n(30);let s;!function(e){e.GET_PAYMENT_GATEWAYS_REQUEST="GET_PAYMENT_GATEWAYS_REQUEST",e.GET_PAYMENT_GATEWAYS_SUCCESS="GET_PAYMENT_GATEWAYS_SUCCESS",e.GET_PAYMENT_GATEWAYS_ERROR="GET_PAYMENT_GATEWAYS_ERROR",e.UPDATE_PAYMENT_GATEWAY_REQUEST="UPDATE_PAYMENT_GATEWAY_REQUEST",e.UPDATE_PAYMENT_GATEWAY_SUCCESS="UPDATE_PAYMENT_GATEWAY_SUCCESS",e.UPDATE_PAYMENT_GATEWAY_ERROR="UPDATE_PAYMENT_GATEWAY_ERROR",e.GET_PAYMENT_GATEWAY_REQUEST="GET_PAYMENT_GATEWAY_REQUEST",e.GET_PAYMENT_GATEWAY_SUCCESS="GET_PAYMENT_GATEWAY_SUCCESS",e.GET_PAYMENT_GATEWAY_ERROR="GET_PAYMENT_GATEWAY_ERROR"}(s||(s={}));function l(){return{type:s.GET_PAYMENT_GATEWAYS_REQUEST}}function u(e){return{type:s.GET_PAYMENT_GATEWAYS_SUCCESS,paymentGateways:e}}function d(e){return{type:s.GET_PAYMENT_GATEWAYS_ERROR,error:e}}function f(){return{type:s.GET_PAYMENT_GATEWAY_REQUEST}}function p(e){return{type:s.GET_PAYMENT_GATEWAY_ERROR,error:e}}function h(e){return{type:s.GET_PAYMENT_GATEWAY_SUCCESS,paymentGateway:e}}function m(e){return{type:s.UPDATE_PAYMENT_GATEWAY_SUCCESS,paymentGateway:e}}function y(){return{type:s.UPDATE_PAYMENT_GATEWAY_REQUEST}}function b(e){return{type:s.UPDATE_PAYMENT_GATEWAY_ERROR,error:e}}function*g(e,t){try{yield y();const n=yield Object(c.apiFetch)({method:"PUT",path:"wc/v3/payment_gateways/"+e,body:JSON.stringify(t)});if(n&&n.id===e)return yield m(n),n}catch(e){throw yield b(e),e}}const v=i.controls&&i.controls.dispatch?i.controls.dispatch:c.dispatch;function*O(){yield l();try{const e=yield Object(c.apiFetch)({path:"wc/v3/payment_gateways"});yield u(e);for(let t=0;te.id===t)}function k(e){return e.paymentGateways}function S(e,t){return e.errors[t]||null}function j(e){return e.isUpdating||!1}Object(i.registerStore)("wc/payment-gateways",{actions:r,selectors:a,resolvers:o,controls:c.controls,reducer:(e={paymentGateways:[],isUpdating:!1,errors:{}},t)=>{if(t&&"type"in t)switch(t.type){case s.GET_PAYMENT_GATEWAYS_REQUEST:case s.GET_PAYMENT_GATEWAY_REQUEST:return e;case s.GET_PAYMENT_GATEWAYS_SUCCESS:return{...e,paymentGateways:t.paymentGateways};case s.GET_PAYMENT_GATEWAYS_ERROR:return{...e,errors:{...e.errors,getPaymentGateways:t.error}};case s.GET_PAYMENT_GATEWAY_ERROR:return{...e,errors:{...e.errors,getPaymentGateway:t.error}};case s.UPDATE_PAYMENT_GATEWAY_REQUEST:return{...e,isUpdating:!0};case s.UPDATE_PAYMENT_GATEWAY_SUCCESS:case s.GET_PAYMENT_GATEWAY_SUCCESS:return function(e,t){const n=e.paymentGateways.findIndex(e=>e.id===t.id);return-1===n?{...e,paymentGateways:[...e.paymentGateways,t],isUpdating:!1}:{...e,paymentGateways:[...e.paymentGateways.slice(0,n),t,...e.paymentGateways.slice(n+1)],isUpdating:!1}}(e,t.paymentGateway);case s.UPDATE_PAYMENT_GATEWAY_ERROR:return{...e,errors:{...e.errors,updatePaymentGateway:t.error},isUpdating:!1}}return e}})},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"isExportRequesting",(function(){return u})),n.d(r,"getExportId",(function(){return d})),n.d(r,"getError",(function(){return f}));var o={};n.r(o),n.d(o,"setExportId",(function(){return g})),n.d(o,"setIsRequesting",(function(){return v})),n.d(o,"setError",(function(){return O})),n.d(o,"startExport",(function(){return w}));var a=n(10),i=n(280),c=n.n(i),s=n(72);const l=e=>c()(Object(s.a)("export",e)),u=(e,t,n)=>Boolean(e.requesting[t]&&e.requesting[t][l(n)]),d=(e,t,n)=>e.exportIds[t]&&e.exportIds[t][l(n)],f=(e,t,n)=>e.errors[t]&&e.errors[t][l(n)];var p=n(109),h="SET_EXPORT_ID",m="SET_ERROR",y="SET_IS_REQUESTING",b=n(33);function g(e,t,n){return{type:h,exportType:e,exportArgs:t,exportId:n}}function v(e,t,n){return{type:y,selector:e,selectorArgs:t,isRequesting:n}}function O(e,t,n){return{type:m,selector:e,selectorArgs:t,error:n}}function*w(e,t){yield v("startExport",{type:e,args:t},!0);try{const n=yield Object(p.b)({path:`${b.c}/reports/${e}/export`,method:"POST",data:{report_args:t,email:!0}});yield v("startExport",{type:e,args:t},!1);const{export_id:r,message:o}=n.data;if(!r)throw new Error(o);return yield g(e,t,r),n.data}catch(n){throw yield O("startExport",{type:e,args:t},n.message),yield v("startExport",{type:e,args:t},!1),n}}Object(a.registerStore)("wc/admin/export",{reducer:(e={errors:{},requesting:{},exportMeta:{},exportIds:{}},{error:t,exportArgs:n,exportId:r,exportType:o,isRequesting:a,selector:i,selectorArgs:c,type:s})=>{switch(s){case y:return{...e,requesting:{...e.requesting,[i]:{...e.requesting[i],[l(c)]:a}}};case h:return{...e,exportMeta:{...e.exportMeta,[r]:{exportType:o,exportArgs:n}},exportIds:{...e.exportIds,[o]:{...e.exportIds[o],[l({type:o,args:n})]:r}}};case m:return{...e,errors:{...e.errors,[i]:{...e.errors[i],[l(c)]:t}}};default:return e}},actions:o,controls:p.a,selectors:r})},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"getImportStarted",(function(){return s})),n.d(r,"getFormSettings",(function(){return l})),n.d(r,"getImportStatus",(function(){return u})),n.d(r,"getImportTotals",(function(){return d})),n.d(r,"getImportError",(function(){return f}));var o={};n.r(o),n.d(o,"setImportStarted",(function(){return O})),n.d(o,"setImportPeriod",(function(){return w})),n.d(o,"setSkipPrevious",(function(){return _})),n.d(o,"setImportStatus",(function(){return k})),n.d(o,"setImportTotals",(function(){return S})),n.d(o,"setImportError",(function(){return j})),n.d(o,"updateImportation",(function(){return E}));var a={};n.r(a),n.d(a,"getImportStatus",(function(){return x})),n.d(a,"getImportTotals",(function(){return F}));var i=n(10),c=n(30);const s=e=>{const{activeImport:t,lastImportStartTimestamp:n}=e;return{activeImport:t,lastImportStartTimestamp:n}||{}},l=e=>{const{period:t,skipPrevious:n}=e;return{period:t,skipPrevious:n}||{}},u=(e,t)=>{const n=JSON.stringify(t);return e.importStatus[n]||{}},d=(e,t)=>{const{importTotals:n,lastImportStartTimestamp:r}=e;return{...n[JSON.stringify(t)],lastImportStartTimestamp:r}||{}},f=(e,t)=>{const n=JSON.stringify(t);return e.errors[n]||!1};var p="SET_IMPORT_DATE",h="SET_IMPORT_ERROR",m="SET_IMPORT_PERIOD",y="SET_IMPORT_STARTED",b="SET_IMPORT_STATUS",g="SET_IMPORT_TOTALS",v="SET_SKIP_IMPORTED";function O(e){return{type:y,activeImport:e}}function w(e,t){return t?{type:p,date:e}:{type:m,date:e}}function _(e){return{type:v,skipPrevious:e}}function k(e,t){return{type:b,importStatus:t,query:e}}function S(e,t){return{type:g,importTotals:t,query:e}}function j(e,t){return{type:h,error:t,query:e}}function*E(e,t=!1){yield O(t);try{return yield Object(c.apiFetch)({path:e,method:"POST"})}catch(t){throw yield j(e,t),t}}var C=n(13),D=n(6),P=n(33);function*x(e){try{const t=Object(C.addQueryArgs)(P.c+"/reports/import/status",Object(D.omit)(e,["timestamp"])),n=yield Object(c.apiFetch)({path:t});yield k(e,n)}catch(t){yield j(e,t)}}function*F(e){try{const t=Object(C.addQueryArgs)(P.c+"/reports/import/totals",e),n=yield Object(c.apiFetch)({path:t});yield S(e,n)}catch(t){yield j(e,t)}}var T=n(1),M=n(21),R=n.n(M);Object(i.registerStore)("wc/admin/import",{reducer:(e={activeImport:!1,importStatus:{},importTotals:{},errors:{},lastImportStartTimestamp:0,period:{date:R()().format(Object(T.__)("MM/DD/YYYY","woocommerce-admin")),label:"all"},skipPrevious:!0},{type:t,query:n,importStatus:r,importTotals:o,activeImport:a,date:i,error:c,skipPrevious:s})=>{switch(t){case y:e={...e,activeImport:a,lastImportStartTimestamp:a?Date.now():e.lastImportStartTimestamp};break;case m:e={...e,period:{...e.period,label:i},activeImport:!1};break;case p:e={...e,period:{date:i,label:"custom"},activeImport:!1};break;case v:e={...e,skipPrevious:s,activeImport:!1};break;case b:e={...e,importStatus:{...e.importStatus,[JSON.stringify(n)]:r},errors:{...e.errors,[JSON.stringify(n)]:!1}};break;case g:e={...e,importTotals:{...e.importTotals,[JSON.stringify(n)]:o}};break;case h:e={...e,errors:{...e.errors,[JSON.stringify(n)]:c}}}return e},actions:o,controls:c.controls,selectors:r,resolvers:a})},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"getSettingsGroupNames",(function(){return u})),n.d(r,"getSettings",(function(){return d})),n.d(r,"getDirtyKeys",(function(){return f})),n.d(r,"getIsDirty",(function(){return p})),n.d(r,"getSettingsForGroup",(function(){return h})),n.d(r,"isUpdateSettingsRequesting",(function(){return m})),n.d(r,"getSetting",(function(){return y})),n.d(r,"getLastSettingsErrorForGroup",(function(){return b})),n.d(r,"getSettingsError",(function(){return g}));var o={};n.r(o),n.d(o,"updateSettingsForGroup",(function(){return D})),n.d(o,"updateErrorForGroup",(function(){return P})),n.d(o,"setIsRequesting",(function(){return x})),n.d(o,"clearIsDirty",(function(){return F})),n.d(o,"updateAndPersistSettingsForGroup",(function(){return T})),n.d(o,"persistSettingsForGroup",(function(){return M})),n.d(o,"clearSettings",(function(){return R}));var a={};n.r(a),n.d(a,"getSettings",(function(){return A})),n.d(a,"getSettingsForGroup",(function(){return N}));var i=n(10),c=n(30),s=n(122),l=n(72);const u=e=>[...new Set(Object.keys(e).map(e=>Object(l.b)(e)))],d=(e,t)=>{const n={},r=e[t]&&e[t].data||[];return 0===r.length||r.forEach(r=>{n[r]=e[Object(l.a)(t,r)].data}),n},f=(e,t)=>e[t].dirty||[],p=(e,t,n=[])=>{const r=f(e,t);return 0!==r.length&&n.some(e=>r.includes(e))},h=(e,t,n)=>{const r=d(e,t);return n.reduce((e,t)=>(e[t]=r[t]||{},e),{})},m=(e,t)=>e[t]&&Boolean(e[t].isRequesting);function y(e,t,n,r=!1,o=(e=>e)){const a=Object(l.a)(t,n);return o(e[a]&&e[a].data||r,r)}const b=(e,t)=>{const n=e[t].data;return 0===n.length?e[t].error:[...n].pop().error},g=(e,t,n)=>n?e[Object(l.a)(t,n)].error||!1:e[t]&&e[t].error||!1;var v=n(1),O=n(6),w=n(33),_="UPDATE_SETTINGS_FOR_GROUP",k="UPDATE_ERROR_FOR_GROUP",S="CLEAR_SETTINGS",j="SET_IS_REQUESTING",E="CLEAR_IS_DIRTY";const C=i.controls&&i.controls.resolveSelect?i.controls.resolveSelect:c.select;function D(e,t,n=new Date){return{type:_,group:e,data:t,time:n}}function P(e,t,n,r=new Date){return{type:k,group:e,data:t,error:n,time:r}}function x(e,t){return{type:j,group:e,isRequesting:t}}function F(e){return{type:E,group:e}}function*T(e,t){yield D(e,t),yield*M(e)}function*M(e){yield x(e,!0);const t=yield C(s.a,"getDirtyKeys",e);if(0===t.length)return void(yield x(e,!1));const n=yield C(s.a,"getSettingsForGroup",e,t),r=`${w.c}/settings/${e}/batch`,o=t.reduce((e,t)=>{const r=Object.keys(n[t]).map(e=>({id:e,value:n[t][e]}));return Object(O.concat)(e,r)},[]);try{const t=yield Object(c.apiFetch)({path:r,method:"POST",data:{update:o}});if(yield x(e,!1),!t)throw new Error(Object(v.__)("There was a problem updating your settings.","woocommerce-admin"));yield F(e)}catch(t){throw yield P(e,null,t),yield x(e,!1),t}}function R(){return{type:S}}const I=i.controls&&i.controls.dispatch?i.controls.dispatch:c.dispatch;function*A(e){yield I(s.a,"setIsRequesting",e,!0);try{const t=w.c+"/settings/"+e;return D(e,{[e]:(yield Object(c.apiFetch)({path:t,method:"GET"})).reduce((e,t)=>(e[t.id]=t.value,e),{})})}catch(t){return P(e,null,t.message)}}function*N(e){return A(e)}const L=(e,{group:t,groupIds:n,data:r,time:o,error:a})=>(n.forEach(n=>{e[Object(l.a)(t,n)]={data:r[n],lastReceived:o,error:a}}),e);Object(i.registerStore)(s.a,{reducer:(e={},{type:t,group:n,data:r,error:o,time:a,isRequesting:i})=>{const c={};switch(t){case j:e={...e,[n]:{...e[n],isRequesting:i}};break;case E:e={...e,[n]:{...e[n],dirty:[]}};break;case _:case k:const t=r?Object.keys(r):[];e=null===r?{...e,[n]:{data:e[n]?e[n].data:[],error:o,lastReceived:a}}:{...e,[n]:{data:e[n]&&e[n].data?[...e[n].data,...t]:t,error:o,lastReceived:a,isRequesting:!1,dirty:e[n]&&e[n].dirty?Object(O.union)(e[n].dirty,t):t},...L(c,{group:n,groupIds:t,data:r,time:a,error:o})};break;case S:e={}}return e},actions:o,controls:c.controls,selectors:r,resolvers:a}),s.a},function(e,t,n){"use strict";n.d(t,"a",(function(){return Z}));var r={};n.r(r),n.d(r,"getActivePlugins",(function(){return l})),n.d(r,"getInstalledPlugins",(function(){return u})),n.d(r,"isPluginsRequesting",(function(){return d})),n.d(r,"getPluginsError",(function(){return f})),n.d(r,"isJetpackConnected",(function(){return p})),n.d(r,"getJetpackConnectUrl",(function(){return h})),n.d(r,"getPluginInstallState",(function(){return m})),n.d(r,"getPaypalOnboardingStatus",(function(){return y})),n.d(r,"getRecommendedPlugins",(function(){return b}));var o={};n.r(o),n.d(o,"formatErrors",(function(){return k})),n.d(o,"updateActivePlugins",(function(){return j})),n.d(o,"updateInstalledPlugins",(function(){return E})),n.d(o,"setIsRequesting",(function(){return C})),n.d(o,"setError",(function(){return D})),n.d(o,"updateIsJetpackConnected",(function(){return P})),n.d(o,"updateJetpackConnectUrl",(function(){return x})),n.d(o,"installPlugins",(function(){return F})),n.d(o,"activatePlugins",(function(){return T})),n.d(o,"installAndActivatePlugins",(function(){return M})),n.d(o,"createErrorNotice",(function(){return R})),n.d(o,"connectToJetpack",(function(){return I})),n.d(o,"installJetpackAndConnect",(function(){return A})),n.d(o,"connectToJetpackWithFailureRedirect",(function(){return N})),n.d(o,"setPaypalOnboardingStatus",(function(){return L})),n.d(o,"setRecommendedPlugins",(function(){return U}));var a={};n.r(a),n.d(a,"getActivePlugins",(function(){return z})),n.d(a,"getInstalledPlugins",(function(){return V})),n.d(a,"isJetpackConnected",(function(){return K})),n.d(a,"getJetpackConnectUrl",(function(){return W})),n.d(a,"getPaypalOnboardingStatus",(function(){return Y})),n.d(a,"getRecommendedPlugins",(function(){return Q}));var i=n(10),c=n(30),s=n(95);const l=e=>e.active||[],u=e=>e.installed||[],d=(e,t)=>e.requesting[t]||!1,f=(e,t)=>e.errors[t]||!1,p=e=>e.jetpackConnection,h=(e,t)=>e.jetpackConnectUrls[t.redirect_url],m=(e,t)=>e.active.includes(t)?"activated":e.installed.includes(t)?"installed":"unavailable",y=e=>e.paypalOnboardingStatus,b=(e,t)=>e.recommended[t];var g=n(1);let v;!function(e){e.UPDATE_ACTIVE_PLUGINS="UPDATE_ACTIVE_PLUGINS",e.UPDATE_INSTALLED_PLUGINS="UPDATE_INSTALLED_PLUGINS",e.SET_IS_REQUESTING="SET_IS_REQUESTING",e.SET_ERROR="SET_ERROR",e.UPDATE_JETPACK_CONNECTION="UPDATE_JETPACK_CONNECTION",e.UPDATE_JETPACK_CONNECT_URL="UPDATE_JETPACK_CONNECT_URL",e.SET_PAYPAL_ONBOARDING_STATUS="SET_PAYPAL_ONBOARDING_STATUS",e.SET_RECOMMENDED_PLUGINS="SET_RECOMMENDED_PLUGINS"}(v||(v={}));var O=n(33);const w=i.controls&&i.controls.dispatch?i.controls.dispatch:c.dispatch,_=i.controls&&i.controls.resolveSelect?i.controls.resolveSelect:c.select;function k(e){return void 0===e.errors?"string"==typeof e?e:e.message:(Object.keys(e.errors).forEach(t=>{e.errors[t]=e.errors[t].map(e=>s.c[t]?e.replace(`\`${t}\``,s.c[t]):e)}),"")}const S=(e,t="install")=>Object(g.sprintf)( +/* translators: %(actionType): install or activate (the plugin). %(pluginName): a plugin slug (e.g. woocommerce-services). %(error): a single error message or in plural a comma separated error message list.*/ +Object(g._n)("Could not %(actionType)s %(pluginName)s plugin, %(error)s","Could not %(actionType)s the following plugins: %(pluginName)s with these Errors: %(error)s",Object.keys(e).length||1,"woocommerce-admin"),{actionType:t,pluginName:Object.keys(e).join(", "),error:Object.values(e).join(", \n")});function j(e,t=!1){return{type:v.UPDATE_ACTIVE_PLUGINS,active:e,replace:t}}function E(e,t=!1){return{type:v.UPDATE_INSTALLED_PLUGINS,installed:e,replace:t}}function C(e,t){return{type:v.SET_IS_REQUESTING,selector:e,isRequesting:t}}function D(e,t){return{type:v.SET_ERROR,selector:e,error:t}}function P(e){return{type:v.UPDATE_JETPACK_CONNECTION,jetpackConnection:e}}function x(e,t){return{type:v.UPDATE_JETPACK_CONNECT_URL,jetpackConnectUrl:t,redirectUrl:e}}function*F(e){yield C("installPlugins",!0);try{const t=yield Object(c.apiFetch)({path:O.e+"/plugins/install",method:"POST",data:{plugins:e.join(",")}});if(t.data.installed.length&&(yield E(t.data.installed)),Object.keys(t.errors.errors).length)throw t.errors.errors;return yield C("installPlugins",!1),t}catch(t){throw 1!==e.length||t[e[0]]||(t={[e[0]]:t.message}),yield D("installPlugins",t),new Error(S(t))}}function*T(e){yield C("activatePlugins",!0);try{const t=yield Object(c.apiFetch)({path:O.e+"/plugins/activate",method:"POST",data:{plugins:e.join(",")}});if(t.data.activated.length&&(yield j(t.data.activated)),Object.keys(t.errors.errors).length)throw t.errors.errors;return yield C("activatePlugins",!1),t}catch(t){throw 1!==e.length||t[e[0]]||(t={[e[0]]:t.message}),yield D("activatePlugins",t),new Error(S(t,"activate"))}}function*M(e){try{return yield w(s.b,"installPlugins",e),yield w(s.b,"activatePlugins",e)}catch(e){throw e}}const R=e=>w("core/notices","createNotice","error",e);function*I(e){const t=yield _(s.b,"getJetpackConnectUrl",{redirect_url:e("admin.php?page=wc-admin")}),n=yield _(s.b,"getPluginsError","getJetpackConnectUrl");if(n)throw new Error(n);return t}function*A(e,t){try{yield w(s.b,"installPlugins",["jetpack"]),yield w(s.b,"activatePlugins",["jetpack"]);const e=yield w(s.b,"connectToJetpack",t);window.location.href=e}catch(t){yield e(t.message)}}function*N(e,t,n){try{const e=yield w(s.b,"connectToJetpack",n);window.location.href=e}catch(n){yield t(n.message),window.location.href=e}}function L(e){return{type:v.SET_PAYPAL_ONBOARDING_STATUS,paypalOnboardingStatus:e}}function U(e,t){return{type:v.SET_RECOMMENDED_PLUGINS,recommendedType:e,plugins:t}}var B=n(13),H=n(277);const q=i.controls&&i.controls.resolveSelect?i.controls.resolveSelect:c.select;function*z(){yield C("getActivePlugins",!0);try{const e=O.e+"/plugins/active",t=yield Object(c.apiFetch)({path:e,method:"GET"});yield j(t.plugins,!0)}catch(e){yield D("getActivePlugins",e)}}function*V(){yield C("getInstalledPlugins",!0);try{const e=O.e+"/plugins/installed",t=yield Object(c.apiFetch)({path:e,method:"GET"});yield E(t.plugins,!0)}catch(e){yield D("getInstalledPlugins",e)}}function*K(){yield C("isJetpackConnected",!0);try{const e=O.a+"/connection",t=yield Object(c.apiFetch)({path:e,method:"GET"});yield P(t.isActive)}catch(e){yield D("isJetpackConnected",e)}yield C("isJetpackConnected",!1)}function*W(e){yield C("getJetpackConnectUrl",!0);try{const t=Object(B.addQueryArgs)(O.e+"/plugins/connect-jetpack",e),n=yield Object(c.apiFetch)({path:t,method:"GET"});yield x(e.redirect_url,n.connectAction)}catch(e){yield D("getJetpackConnectUrl",e)}yield C("getJetpackConnectUrl",!1)}function*G(){const e=yield q(H.a,"getOption","woocommerce-ppcp-settings"),t=e.merchant_email_production&&e.merchant_id_production&&e.client_id_production&&e.client_secret_production;yield L({production:{state:t?"onboarded":"unknown",onboarded:!!t}})}function*Y(){yield C("getPaypalOnboardingStatus",!0);const e=yield q(s.b,"getPluginsError","getPaypalOnboardingStatus");if(e&&e.data&&404===e.data.status)yield G();else try{const e=s.a+"/onboarding/get-status",t=yield Object(c.apiFetch)({path:e,method:"GET"});yield L(t)}catch(e){yield G(),yield D("getPaypalOnboardingStatus",e)}yield C("getPaypalOnboardingStatus",!1)}const $=["payments"];function*Q(e){if(!$.includes(e))return[];yield C("getRecommendedPlugins",!0);try{const t=O.e+"/plugins/recommended-payment-plugins",n=yield Object(c.apiFetch)({path:t,method:"GET"});yield U(e,n)}catch(e){yield D("getRecommendedPlugins",e)}yield C("getRecommendedPlugins",!1)}var J=n(6);Object(i.registerStore)(s.b,{reducer:(e={active:[],installed:[],requesting:{},errors:{},jetpackConnectUrls:{},recommended:{}},t)=>{if(t&&"type"in t)switch(t.type){case v.UPDATE_ACTIVE_PLUGINS:e={...e,active:t.replace?t.active:Object(J.concat)(e.active,t.active),requesting:{...e.requesting,getActivePlugins:!1,activatePlugins:!1},errors:{...e.errors,getActivePlugins:!1,activatePlugins:!1}};break;case v.UPDATE_INSTALLED_PLUGINS:e={...e,installed:t.replace?t.installed:Object(J.concat)(e.installed,t.installed),requesting:{...e.requesting,getInstalledPlugins:!1,installPlugins:!1},errors:{...e.errors,getInstalledPlugins:!1,installPlugin:!1}};break;case v.SET_IS_REQUESTING:e={...e,requesting:{...e.requesting,[t.selector]:t.isRequesting}};break;case v.SET_ERROR:e={...e,requesting:{...e.requesting,[t.selector]:!1},errors:{...e.errors,[t.selector]:t.error}};break;case v.UPDATE_JETPACK_CONNECTION:e={...e,jetpackConnection:t.jetpackConnection};break;case v.UPDATE_JETPACK_CONNECT_URL:e={...e,jetpackConnectUrls:{...e.jetpackConnectUrls,[t.redirectUrl]:t.jetpackConnectUrl}};break;case v.SET_PAYPAL_ONBOARDING_STATUS:e={...e,paypalOnboardingStatus:t.paypalOnboardingStatus};break;case v.SET_RECOMMENDED_PLUGINS:e={...e,recommended:{...e.recommended,[t.recommendedType]:t.plugins}}}return e},actions:o,controls:c.controls,selectors:r,resolvers:a});const Z=s.b},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"getReportItemsError",(function(){return u})),n.d(r,"getReportItems",(function(){return d})),n.d(r,"getReportStats",(function(){return f})),n.d(r,"getReportStatsError",(function(){return p}));var o={};n.r(o),n.d(o,"setReportItemsError",(function(){return g})),n.d(o,"setReportItems",(function(){return v})),n.d(o,"setReportStats",(function(){return O})),n.d(o,"setReportStatsError",(function(){return w}));var a={};n.r(a),n.d(a,"getReportItems",(function(){return j})),n.d(a,"getReportStats",(function(){return E}));var i=n(10),c=n(201),s=n(72);const l={},u=(e,t,n)=>{const r=Object(s.a)(t,n);return e.itemErrors[r]||!1},d=(e,t,n)=>{const r=Object(s.a)(t,n);return e.items[r]||l},f=(e,t,n)=>{const r=Object(s.a)(t,n);return e.stats[r]||l},p=(e,t,n)=>{const r=Object(s.a)(t,n);return e.statErrors[r]||!1};var h="SET_ITEM_ERROR",m="SET_STAT_ERROR",y="SET_REPORT_ITEMS",b="SET_REPORT_STATS";function g(e,t,n){const r=Object(s.a)(e,t);return{type:h,resourceName:r,error:n}}function v(e,t,n){const r=Object(s.a)(e,t);return{type:y,resourceName:r,items:n}}function O(e,t,n){const r=Object(s.a)(e,t);return{type:b,resourceName:r,stats:n}}function w(e,t,n){const r=Object(s.a)(e,t);return{type:m,resourceName:r,error:n}}var _=n(13),k=n(109),S=n(33);function*j(e,t){const n={parse:!1,path:Object(_.addQueryArgs)(`${S.c}/reports/${e}`,t)};try{const r=yield Object(k.b)(n),o=r.data,a=parseInt(r.headers.get("x-wp-total"),10),i=parseInt(r.headers.get("x-wp-totalpages"),10);yield v(e,t,{data:o,totalResults:a,totalPages:i})}catch(n){yield g(e,t,n)}}function*E(e,t){const n={parse:!1,path:Object(_.addQueryArgs)(`${S.c}/reports/${e}/stats`,t)};try{const r=yield Object(k.b)(n),o=r.data,a=parseInt(r.headers.get("x-wp-total"),10),i=parseInt(r.headers.get("x-wp-totalpages"),10);yield O(e,t,{data:o,totalResults:a,totalPages:i})}catch(n){yield w(e,t,n)}}Object(i.registerStore)(c.a,{reducer:(e={itemErrors:{},items:{},statErrors:{},stats:{}},{type:t,items:n,stats:r,error:o,resourceName:a})=>{switch(t){case y:return{...e,items:{...e.items,[a]:n}};case b:return{...e,stats:{...e.stats,[a]:r}};case h:return{...e,itemErrors:{...e.itemErrors,[a]:o}};case m:return{...e,statErrors:{...e.statErrors,[a]:o}};default:return e}},actions:o,controls:k.a,selectors:r,resolvers:a}),c.a},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"getItems",(function(){return u})),n.d(r,"getItemsTotalCount",(function(){return d})),n.d(r,"getItemsError",(function(){return f}));var o={};n.r(o),n.d(o,"setItem",(function(){return O})),n.d(o,"setItems",(function(){return w})),n.d(o,"setItemsTotalCount",(function(){return _})),n.d(o,"setError",(function(){return k})),n.d(o,"updateProductStock",(function(){return S})),n.d(o,"createProductFromTemplate",(function(){return j}));var a={};n.r(a),n.d(a,"getItems",(function(){return D})),n.d(a,"getReviewsTotalCount",(function(){return P})),n.d(a,"getItemsTotalCount",(function(){return x}));var i=n(10),c=n(217),s=n(72),l=n(196);const u=(e,t,n)=>{const r=Object(s.a)(t,n);return(e.items[r]&&e.items[r].data||[]).reduce((n,r)=>(n.set(r,e.data[t][r]),n),new Map)},d=(e,t,n,r=0)=>{const o=Object(l.a)(t,n);return e.items.hasOwnProperty(o)?e.items[o]:r},f=(e,t,n)=>{const r=Object(s.a)(t,n);return e.errors[r]};var p=n(30),h=n(13),m="SET_ITEM",y="SET_ITEMS",b="SET_ITEMS_TOTAL_COUNT",g="SET_ERROR",v=n(33);function O(e,t,n){return{type:m,id:t,item:n,itemType:e}}function w(e,t,n,r){return{type:y,items:n,itemType:e,query:t,totalCount:r}}function _(e,t,n){return{type:b,itemType:e,query:t,totalCount:n}}function k(e,t,n){return{type:g,itemType:e,query:t,error:n}}function*S(e,t){const n={...e,stock_quantity:t},{id:r,parent_id:o,type:a}=n;yield O("products",r,n);let i=v.c;switch(a){case"variation":i+=`/products/${o}/variations/${r}`;break;case"variable":case"simple":default:i+="/products/"+r}try{return yield Object(p.apiFetch)({path:i,method:"PUT",data:n}),!0}catch(t){return yield O("products",r,e),yield k("products",r,t),!1}}function*j(e,t){try{const n=Object(h.addQueryArgs)(v.e+"/onboarding/tasks/create_product_from_template",t||{}),r=yield Object(p.apiFetch)({path:n,method:"POST",data:e});return yield O("products",r.id,r),r}catch(e){throw yield k("createProductFromTemplate",t,e),e}}var E=n(109);function*C(e,t){const n="categories"===e?"products/categories":e,r=Object(h.addQueryArgs)(`${v.c}/${n}`,t),o=-1===t.per_page,a=o?p.apiFetch:E.b,i=yield a({path:r,method:"GET"});if(o)return{items:i,totalCount:i.length};const c=parseInt(i.headers.get("x-wp-total"),10);return{items:i.data,totalCount:c}}function*D(e,t){try{const{items:n,totalCount:r}=yield C(e,t);yield _(e,t,r),yield w(e,t,n)}catch(n){yield k(e,t,n)}}function*P(e,t){yield x(e,t)}function*x(e,t){try{const n={...t,page:1,per_page:1},{totalCount:r}=yield C(e,n);yield _(e,t,r)}catch(n){yield k(e,t,n)}}Object(i.registerStore)(c.a,{reducer:(e={items:{},errors:{},data:{}},{type:t,id:n,itemType:r,query:o,item:a,items:i,totalCount:c,error:u})=>{switch(t){case m:const t=e.data[r]||{};return{...e,data:{...e.data,[r]:{...t,[n]:{...t[n]||{},...a}}}};case y:const d=[],f=i.reduce((e,t)=>(d.push(t.id),e[t.id]=t,e),{}),p=Object(s.a)(r,o);return{...e,items:{...e.items,[p]:{data:d}},data:{...e.data,[r]:{...e.data[r],...f}}};case b:const h=Object(l.a)(r,o);return{...e,items:{...e.items,[h]:c}};case g:return{...e,errors:{...e.errors,[Object(s.a)(r,o)]:u}};default:return e}},actions:o,controls:E.a,selectors:r,resolvers:a}),c.a},function(e,t,n){"use strict";n.r(t),n.d(t,"Portal",(function(){return O})),n.d(t,"PortalWithState",(function(){return k}));var r=n(79),o=n.n(r),a=n(8),i=n.n(a),c=n(2),s=n.n(c),l=!("undefined"==typeof window||!window.document||!window.document.createElement),u=function(){function e(e,t){for(var n=0;n{switch(t){case d:return{...e,profileItems:o?n:{...e.profileItems,...n}};case f:return{...e,tasksStatus:{...e.tasksStatus,...s}};case l:return{...e,errors:{...e.errors,[c]:a}};case u:return{...e,requesting:{...e.requesting,[c]:i}};case p:return{...e,paymentMethods:r};default:return e}},actions:r,controls:i.controls,selectors:s,resolvers:o}),c.a},,function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n1?n-1:0),o=1;o/gm),U=i(/^data-[\-\w.\u00B7-\uFFFF]/),B=i(/^aria-[\-\w]+$/),H=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=i(/^(?:\w+script|data):/i),z=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function K(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:W(),n=function(t){return e(t)};if(n.version="2.2.7",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,i=t.DocumentFragment,c=t.HTMLTemplateElement,s=t.Node,l=t.Element,u=t.NodeFilter,d=t.NamedNodeMap,_=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,Y=t.Text,$=t.Comment,Q=t.DOMParser,J=t.trustedTypes,Z=l.prototype,X=j(Z,"cloneNode"),ee=j(Z,"nextSibling"),te=j(Z,"childNodes"),ne=j(Z,"parentNode");if("function"==typeof c){var re=o.createElement("template");re.content&&re.content.ownerDocument&&(o=re.content.ownerDocument)}var oe=G(J,r),ae=oe&&Ne?oe.createHTML(""):"",ie=o,ce=ie.implementation,se=ie.createNodeIterator,le=ie.getElementsByTagName,ue=ie.createDocumentFragment,de=r.importNode,fe={};try{fe=S(o).documentMode?o.documentMode:{}}catch(e){}var pe={};n.isSupported="function"==typeof ne&&ce&&void 0!==ce.createHTMLDocument&&9!==fe;var he=N,me=L,ye=U,be=B,ge=q,ve=z,Oe=H,we=null,_e=k({},[].concat(K(E),K(C),K(D),K(x),K(T))),ke=null,Se=k({},[].concat(K(M),K(R),K(I),K(A))),je=null,Ee=null,Ce=!0,De=!0,Pe=!1,xe=!1,Fe=!1,Te=!1,Me=!1,Re=!1,Ie=!1,Ae=!0,Ne=!1,Le=!0,Ue=!0,Be=!1,He={},qe=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ze=null,Ve=k({},["audio","video","img","source","image","track"]),Ke=null,We=k({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ge=null,Ye=o.createElement("form"),$e=function(e){Ge&&Ge===e||(e&&"object"===(void 0===e?"undefined":V(e))||(e={}),e=S(e),we="ALLOWED_TAGS"in e?k({},e.ALLOWED_TAGS):_e,ke="ALLOWED_ATTR"in e?k({},e.ALLOWED_ATTR):Se,Ke="ADD_URI_SAFE_ATTR"in e?k(S(We),e.ADD_URI_SAFE_ATTR):We,ze="ADD_DATA_URI_TAGS"in e?k(S(Ve),e.ADD_DATA_URI_TAGS):Ve,je="FORBID_TAGS"in e?k({},e.FORBID_TAGS):{},Ee="FORBID_ATTR"in e?k({},e.FORBID_ATTR):{},He="USE_PROFILES"in e&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,De=!1!==e.ALLOW_DATA_ATTR,Pe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=e.SAFE_FOR_TEMPLATES||!1,Fe=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Ae=!1!==e.RETURN_DOM_IMPORT,Ne=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Le=!1!==e.SANITIZE_DOM,Ue=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,Oe=e.ALLOWED_URI_REGEXP||Oe,xe&&(De=!1),Ie&&(Re=!0),He&&(we=k({},[].concat(K(T))),ke=[],!0===He.html&&(k(we,E),k(ke,M)),!0===He.svg&&(k(we,C),k(ke,R),k(ke,A)),!0===He.svgFilters&&(k(we,D),k(ke,R),k(ke,A)),!0===He.mathMl&&(k(we,x),k(ke,I),k(ke,A))),e.ADD_TAGS&&(we===_e&&(we=S(we)),k(we,e.ADD_TAGS)),e.ADD_ATTR&&(ke===Se&&(ke=S(ke)),k(ke,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&k(Ke,e.ADD_URI_SAFE_ATTR),Ue&&(we["#text"]=!0),Fe&&k(we,["html","head","body"]),we.table&&(k(we,["tbody"]),delete je.tbody),a&&a(e),Ge=e)},Qe=k({},["mi","mo","mn","ms","mtext"]),Je=k({},["foreignobject","desc","title","annotation-xml"]),Ze=k({},C);k(Ze,D),k(Ze,P);var Xe=k({},x);k(Xe,F);var et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml",rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:nt,tagName:"template"});var n=m(e.tagName),r=m(t.tagName);if(e.namespaceURI===tt)return t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===r||Qe[r]):Boolean(Ze[n]);if(e.namespaceURI===et)return t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&Je[r]:Boolean(Xe[n]);if(e.namespaceURI===nt){if(t.namespaceURI===tt&&!Je[r])return!1;if(t.namespaceURI===et&&!Qe[r])return!1;var o=k({},["title","style","font","a","script"]);return!Xe[n]&&(o[n]||!Ze[n])}return!1},ot=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},at=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ke[e])if(Re||Ie)try{ot(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},it=function(e){var t=void 0,n=void 0;if(Me)e=""+e;else{var r=y(e,/^[\r\n\t ]+/);n=r&&r[0]}var a=oe?oe.createHTML(e):e;try{t=(new Q).parseFromString(a,"text/html")}catch(e){}if(!t||!t.documentElement){var i=(t=ce.createHTMLDocument("")).body;i.parentNode.removeChild(i.parentNode.firstElementChild),i.outerHTML=a}return e&&n&&t.body.insertBefore(o.createTextNode(n),t.body.childNodes[0]||null),le.call(t,Fe?"html":"body")[0]},ct=function(e){return se.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},st=function(e){return!(e instanceof Y||e instanceof $||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof _&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},lt=function(e){return"object"===(void 0===s?"undefined":V(s))?e instanceof s:e&&"object"===(void 0===e?"undefined":V(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ut=function(e,t,r){pe[e]&&f(pe[e],(function(e){e.call(n,t,r,Ge)}))},dt=function(e){var t=void 0;if(ut("beforeSanitizeElements",e,null),st(e))return ot(e),!0;if(y(e.nodeName,/[\u0080-\uFFFF]/))return ot(e),!0;var r=m(e.nodeName);if(ut("uponSanitizeElement",e,{tagName:r,allowedTags:we}),!lt(e.firstElementChild)&&(!lt(e.content)||!lt(e.content.firstElementChild))&&O(/<[/\w]/g,e.innerHTML)&&O(/<[/\w]/g,e.textContent))return ot(e),!0;if(!we[r]||je[r]){if(Ue&&!qe[r]){var o=ne(e),a=te(e);if(a&&o)for(var i=a.length-1;i>=0;--i)o.insertBefore(X(a[i],!0),ee(e))}return ot(e),!0}return e instanceof l&&!rt(e)?(ot(e),!0):"noscript"!==r&&"noembed"!==r||!O(/<\/no(script|embed)/i,e.innerHTML)?(xe&&3===e.nodeType&&(t=e.textContent,t=b(t,he," "),t=b(t,me," "),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),ut("afterSanitizeElements",e,null),!1):(ot(e),!0)},ft=function(e,t,n){if(Le&&("id"===t||"name"===t)&&(n in o||n in Ye))return!1;if(De&&O(ye,t));else if(Ce&&O(be,t));else{if(!ke[t]||Ee[t])return!1;if(Ke[t]);else if(O(Oe,b(n,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==g(n,"data:")||!ze[e])if(Pe&&!O(ge,b(n,ve,"")));else if(n)return!1}return!0},pt=function(e){var t=void 0,r=void 0,o=void 0,a=void 0;ut("beforeSanitizeAttributes",e,null);var i=e.attributes;if(i){var c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ke};for(a=i.length;a--;){var s=t=i[a],l=s.name,u=s.namespaceURI;if(r=v(t.value),o=m(l),c.attrName=o,c.attrValue=r,c.keepAttr=!0,c.forceKeepAttr=void 0,ut("uponSanitizeAttribute",e,c),r=c.attrValue,!c.forceKeepAttr&&(at(l,e),c.keepAttr))if(O(/\/>/i,r))at(l,e);else{xe&&(r=b(r,he," "),r=b(r,me," "));var d=e.nodeName.toLowerCase();if(ft(d,o,r))try{u?e.setAttributeNS(u,l,r):e.setAttribute(l,r),p(n.removed)}catch(e){}}}ut("afterSanitizeAttributes",e,null)}},ht=function e(t){var n=void 0,r=ct(t);for(ut("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ut("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof i&&e(n.content),pt(n));ut("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,o){var a=void 0,c=void 0,l=void 0,u=void 0,d=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!lt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported){if("object"===V(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(lt(e))return t.toStaticHTML(e.outerHTML)}return e}if(Te||$e(o),n.removed=[],"string"==typeof e&&(Be=!1),Be);else if(e instanceof s)1===(c=(a=it("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?a=c:a.appendChild(c);else{if(!Re&&!xe&&!Fe&&-1===e.indexOf("<"))return oe&&Ne?oe.createHTML(e):e;if(!(a=it(e)))return Re?null:ae}a&&Me&&ot(a.firstChild);for(var f=ct(Be?e:a);l=f.nextNode();)3===l.nodeType&&l===u||dt(l)||(l.content instanceof i&&ht(l.content),pt(l),u=l);if(u=null,Be)return e;if(Re){if(Ie)for(d=ue.call(a.ownerDocument);a.firstChild;)d.appendChild(a.firstChild);else d=a;return Ae&&(d=de.call(r,d,!0)),d}var p=Fe?a.outerHTML:a.innerHTML;return xe&&(p=b(p,he," "),p=b(p,me," ")),oe&&Ne?oe.createHTML(p):p},n.setConfig=function(e){$e(e),Te=!0},n.clearConfig=function(){Ge=null,Te=!1},n.isValidAttribute=function(e,t,n){Ge||$e({});var r=m(e),o=m(t);return ft(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],h(pe[e],t))},n.removeHook=function(e){pe[e]&&p(pe[e])},n.removeHooks=function(e){pe[e]&&(pe[e]=[])},n.removeAllHooks=function(){pe={}},n}()}()},function(e,t,n){e.exports=n(691)},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=M(e,360),t=M(t,100),n=M(n,100),0===t)r=o=a=n;else{var c=n<.5?n*(1+t):n+t-n*t,s=2*n-c;r=i(s,c,e+1/3),o=i(s,c,e),a=i(s,c,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,d,p),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:l(255,u(c.r,0)),g:l(255,u(c.g,0)),b:l(255,u(c.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=c++}function p(e,t,n){e=M(e,255),t=M(t,255),n=M(n,255);var r,o,a=u(e,t,n),i=l(e,t,n),c=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=c>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(f(r));return a}function P(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],c=1/t;t--;)i.push(f({h:r,s:o,v:a})),a=(a+c)%1;return i}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=p(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[A(s(e).toString(16)),A(s(t).toString(16)),A(s(n).toString(16)),A(L(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*M(this._r,255))+"%",g:s(100*M(this._g,255))+"%",b:s(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*M(this._r,255))+"%, "+s(100*M(this._g,255))+"%, "+s(100*M(this._b,255))+"%)":"rgba("+s(100*M(this._r,255))+"%, "+s(100*M(this._g,255))+"%, "+s(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(F[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+y(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+y(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(O,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(P,arguments)},splitcomplement:function(){return this._applyCombination(C,arguments)},triad:function(){return this._applyCombination(j,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:N(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),a=n/100;return f({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,a,i,c,s=f.readability(e,t);switch(o=!1,(a=n,"AA"!==(i=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(c=(a.size||"small").toLowerCase())&&"large"!==c&&(c="small"),r={level:i,size:c}).level+r.size){case"AAsmall":case"AAAlarge":o=s>=4.5;break;case"AAlarge":o=s>=3;break;case"AAAsmall":o=s>=7}return o},f.mostReadable=function(e,t,n){var r,o,a,i,c=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var l=0;ls&&(s=r,c=f(t[l]));return f.isReadable(e,c,{level:a,size:i})||!o?c:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var x=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},F=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function M(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function R(e){return l(1,u(0,e))}function I(e){return parseInt(e,16)}function A(e){return 1==e.length?"0"+e:""+e}function N(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function U(e){return I(e)/255}var B,H,q,z=(H="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",q="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+q),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+q),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+q),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},,,,,,function(e,t,n){"use strict";(function(e){var r=n(0),o=n(6),a=n(5),i=n.n(a),c=n(62),s=n(1),l=(n(197),n(185));t.a=Object(r.forwardRef)((function(t,n){var a=t.className,u=t.children,d=t.spokenMessage,f=void 0===d?u:d,p=t.politeness,h=void 0===p?"polite":p,m=t.actions,y=void 0===m?[]:m,b=t.onRemove,g=void 0===b?o.noop:b;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(c.speak)(n,t)}),[n,t])}(f,h),Object(r.useEffect)((function(){var e=setTimeout((function(){g()}),1e4);return function(){return clearTimeout(e)}}),[]);var v=i()(a,"components-snackbar");return y&&y.length>1&&(void 0!==e&&e.env,y=[y[0]]),Object(r.createElement)("div",{ref:n,className:v,onClick:g,tabIndex:"0",role:"button",onKeyPress:g,"aria-label":Object(s.__)("Dismiss this notice")},Object(r.createElement)("div",{className:"components-snackbar__content"},u,y.map((function(e,t){var n=e.label,o=e.onClick,a=e.url;return Object(r.createElement)(l.a,{key:t,href:a,isTertiary:!0,onClick:function(e){e.stopPropagation(),o&&o(e)},className:"components-snackbar__action"},n)}))))}))}).call(this,n(480))},function(e,t,n){"use strict";e.exports=n(811)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(571);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){n(573)},function(e,t,n){"use strict";var r;(0,((r=n(574))&&r.__esModule?r:{default:r}).default)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){(0,o.default)(r.default)};var r=a(n(575)),o=a(n(623));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){e.exports=n(576).default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(577)),o=s(n(619)),a=n(620),i=s(n(621)),c=s(n(622));function s(e){return e&&e.__esModule?e:{default:e}}t.default={create:function(e){var t={},n=Object.keys(e),r=(o.default.get(a.GLOBAL_CACHE_KEY)||{}).namespace,c=void 0===r?"":r;return n.forEach((function(e){var n=(0,i.default)(c,e);t[e]=n})),t},resolve:function(e){var t=(0,r.default)(e,1/0),n=(0,c.default)(t),o=n.classNames,a=n.hasInlineStyles,i=n.inlineStyles,s={className:o.map((function(e,t){return String(e)+" "+String(e)+"_"+String(t+1)})).join(" ")};return a&&(s.style=i),s}}},function(e,t,n){"use strict";var r=n(155),o=n(228),a=n(384),i=n(399),c=i(),s=n(618),l=o(c);r(l,{getPolyfill:i,implementation:a,shim:s}),e.exports=l},function(e,t,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,a=Object.prototype.toString,i=n(382),c=Object.prototype.propertyIsEnumerable,s=!c.call({toString:null},"toString"),l=c.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===a.call(e),r=i(e),c=t&&"[object String]"===a.call(e),f=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var h=l&&n;if(c&&e.length>0&&!o.call(e,0))for(var m=0;m0)for(var y=0;y= 0");var n,r=0===t?0:t;if(s(e)&&(n=c(e,"constructor"),a&&"Object"===d(n)&&null===(n=c(n,a))&&(n=void 0)),void 0===n)return o(r);if(!l(n))throw new i("C must be a constructor");return new n(r)}},function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=r&&o&&"function"==typeof o.get?o.get:null,i=r&&Map.prototype.forEach,c="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=c&&s&&"function"==typeof s.get?s.get:null,u=c&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,m=Object.prototype.toString,y=Function.prototype.toString,b=String.prototype.match,g="function"==typeof BigInt?BigInt.prototype.valueOf:null,v=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,w="function"==typeof Symbol&&"object"==typeof Symbol.iterator,_=Object.prototype.propertyIsEnumerable,k=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),S=n(115).custom,j=S&&x(S)?S:null,E="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function C(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function D(e){return String(e).replace(/"/g,""")}function P(e){return!("[object Array]"!==M(e)||E&&"object"==typeof e&&E in e)}function x(e){if(w)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,o){var c=n||{};if(T(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(T(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=!T(c,"customInspect")||c.customInspect;if("boolean"!=typeof s)throw new TypeError('option "customInspect", if provided, must be `true` or `false`');if(T(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,n){if(t.length>n.maxStringLength){var r=t.length-n.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return e(t.slice(0,n.maxStringLength),n)+o}return C(t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,I),"single",n)}(t,c);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var m=void 0===c.depth?5:c.depth;if(void 0===r&&(r=0),r>=m&&m>0&&"object"==typeof t)return P(t)?"[Array]":"[Object]";var v,_=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=Array(e.indent+1).join(" ")}return{base:n,prev:Array(t+1).join(n)}}(c,r);if(void 0===o)o=[];else if(R(o,t)>=0)return"[Circular]";function S(t,n,a){if(n&&(o=o.slice()).push(n),a){var i={depth:c.depth};return T(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),e(t,i,r+1,o)}return e(t,c,r+1,o)}if("function"==typeof t){var F=function(e){if(e.name)return e.name;var t=b.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),H=B(t,S);return"[Function"+(F?": "+F:" (anonymous)")+"]"+(H.length>0?" { "+H.join(", ")+" }":"")}if(x(t)){var q=w?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||w?q:A(q)}if((v=t)&&"object"==typeof v&&("undefined"!=typeof HTMLElement&&v instanceof HTMLElement||"string"==typeof v.nodeName&&"function"==typeof v.getAttribute)){for(var z="<"+String(t.nodeName).toLowerCase(),V=t.attributes||[],K=0;K"}if(P(t)){if(0===t.length)return"[]";var W=B(t,S);return _&&!function(e){for(var t=0;t=0)return!1;return!0}(W)?"["+U(W,_)+"]":"[ "+W.join(", ")+" ]"}if(function(e){return!("[object Error]"!==M(e)||E&&"object"==typeof e&&E in e)}(t)){var G=B(t,S);return 0===G.length?"["+String(t)+"]":"{ ["+String(t)+"] "+G.join(", ")+" }"}if("object"==typeof t&&s){if(j&&"function"==typeof t[j])return t[j]();if("function"==typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!=typeof e)return!1;try{a.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var Y=[];return i.call(t,(function(e,n){Y.push(S(n,t,!0)+" => "+S(e,t))})),L("Map",a.call(t),Y,_)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{a.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var $=[];return u.call(t,(function(e){$.push(S(e,t))})),L("Set",l.call(t),$,_)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return N("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return N("WeakSet");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(e){}return!1}(t))return N("WeakRef");if(function(e){return!("[object Number]"!==M(e)||E&&"object"==typeof e&&E in e)}(t))return A(S(Number(t)));if(function(e){if(!e||"object"!=typeof e||!g)return!1;try{return g.call(e),!0}catch(e){}return!1}(t))return A(S(g.call(t)));if(function(e){return!("[object Boolean]"!==M(e)||E&&"object"==typeof e&&E in e)}(t))return A(h.call(t));if(function(e){return!("[object String]"!==M(e)||E&&"object"==typeof e&&E in e)}(t))return A(S(String(t)));if(!function(e){return!("[object Date]"!==M(e)||E&&"object"==typeof e&&E in e)}(t)&&!function(e){return!("[object RegExp]"!==M(e)||E&&"object"==typeof e&&E in e)}(t)){var Q=B(t,S),J=k?k(t)===Object.prototype:t instanceof Object||t.constructor===Object,Z=t instanceof Object?"":"null prototype",X=!J&&E&&Object(t)===t&&E in t?M(t).slice(8,-1):Z?"Object":"",ee=(J||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(X||Z?"["+[].concat(X||[],Z||[]).join(": ")+"] ":"");return 0===Q.length?ee+"{}":_?ee+"{"+U(Q,_)+"}":ee+"{ "+Q.join(", ")+" }"}return String(t)};var F=Object.prototype.hasOwnProperty||function(e){return e in this};function T(e,t){return F.call(e,t)}function M(e){return m.call(e)}function R(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n5&&(m=arguments[5]);for(var y=p,b=0;b0&&(w=l(O)),w){var _=u(O);y=e(t,O,_,y,h-1)}else{if(y>=o)throw new r("index too large");i(t,d(y),O),y+=1}}b+=1}return y}},function(e,t,n){"use strict";var r=n(71),o=n(169),a=r("%TypeError%"),i=n(263),c=r("%Reflect.apply%",!0)||o("%Function.prototype.apply%");e.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!i(n))throw new a("Assertion failed: optional `argumentsList`, if provided, must be a List");return c(e,t,n)}},function(e,t,n){"use strict";var r=n(71)("%TypeError%"),o=n(595),a=n(202),i=n(130);e.exports=function(e,t,n){if("Object"!==i(e))throw new r("Assertion failed: Type(O) is not Object");if(!a(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var c=o(e,t,n);if(!c)throw new r("unable to create data property");return c}},function(e,t,n){"use strict";var r=n(71)("%TypeError%"),o=n(385),a=n(386),i=n(596),c=n(387),s=n(600),l=n(202),u=n(388),d=n(130);e.exports=function(e,t,n){if("Object"!==d(e))throw new r("Assertion failed: Type(O) is not Object");if(!l(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var f=i(e,t),p=!f||s(e);return!(f&&(!f["[[Writable]]"]||!f["[[Configurable]]"])||!p)&&o(c,u,a,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":n,"[[Writable]]":!0})}},function(e,t,n){"use strict";var r=n(71),o=n(597),a=r("%TypeError%"),i=n(169)("Object.prototype.propertyIsEnumerable"),c=n(188),s=n(263),l=n(202),u=n(598),d=n(389),f=n(130);e.exports=function(e,t){if("Object"!==f(e))throw new a("Assertion failed: O must be an Object");if(!l(t))throw new a("Assertion failed: P must be a Property Key");if(c(e,t)){if(!o){var n=s(e)&&"length"===t,r=u(e)&&"lastIndex"===t;return{"[[Configurable]]":!(n||r),"[[Enumerable]]":i(e,t),"[[Value]]":e[t],"[[Writable]]":!0}}return d(o(e,t))}}},function(e,t,n){"use strict";var r=n(71)("%Object.getOwnPropertyDescriptor%");if(r)try{r([],"length")}catch(e){r=null}e.exports=r},function(e,t,n){"use strict";var r=n(71)("%Symbol.match%",!0),o=n(599),a=n(390);e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(r){var t=e[r];if(void 0!==t)return a(t)}return o(e)}},function(e,t,n){"use strict";var r,o,a,i,c=n(169),s=n(296)()&&!!Symbol.toStringTag;if(s){r=c("Object.prototype.hasOwnProperty"),o=c("RegExp.prototype.exec"),a={};var l=function(){throw a};i={toString:l,valueOf:l},"symbol"==typeof Symbol.toPrimitive&&(i[Symbol.toPrimitive]=l)}var u=c("Object.prototype.toString"),d=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=d(e,"lastIndex");if(!t||!r(t,"value"))return!1;try{o(e,i)}catch(e){return e===a}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},function(e,t,n){"use strict";var r=n(71)("%Object%"),o=n(393),a=r.preventExtensions,i=r.isExtensible;e.exports=a?function(e){return!o(e)&&i(e)}:function(e){return!o(e)}},function(e,t,n){"use strict";var r=n(71)("%TypeError%"),o=n(202),a=n(130);e.exports=function(e,t){if("Object"!==a(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");return t in e}},function(e,t,n){"use strict";var r=n(71)("%TypeError%"),o=n(262),a=n(394),i=n(130);e.exports=function(e){if("Object"!==i(e))throw new r("Assertion failed: `obj` must be an Object");return a(o(e,"length"))}},function(e,t,n){"use strict";var r=n(604),o=n(605),a=n(606),i=n(298),c=n(391),s=n(609);e.exports=function(e){var t=a(e);return i(t)?0:0!==t&&c(t)?s(t)*o(r(t)):t}},function(e,t,n){"use strict";var r=n(71)("%Math.abs%");e.exports=function(e){return r(e)}},function(e,t,n){"use strict";var r=Math.floor;e.exports=function(e){return r(e)}},function(e,t,n){"use strict";var r=n(607);e.exports=function(e){var t=r(e,Number);if("string"!=typeof t)return+t;var n=t.replace(/^[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+|[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+$/g,"");return/^0[ob]|^[+-]0x/.test(n)?NaN:+n}},function(e,t,n){"use strict";e.exports=n(608)},function(e,t,n){"use strict";var r=Object.prototype.toString,o=n(396),a=n(299),i=function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===r.call(e)?String:Number)===String||t===Number){var n,i,c=t===String?["toString","valueOf"]:["valueOf","toString"];for(i=0;i1?i(e,arguments[1]):i(e)}},function(e,t,n){"use strict";e.exports=function(e){return e>=0?1:-1}},function(e,t,n){"use strict";var r=n(71),o=r("%TypeError%"),a=r("%Number%"),i=r("%RegExp%"),c=r("%parseInt%"),s=n(169),l=n(611),u=n(393),d=s("String.prototype.slice"),f=l(/^0b[01]+$/i),p=l(/^0o[0-7]+$/i),h=l(/^[-+]0x[0-9a-f]+$/i),m=l(new i("["+["…","​","￾"].join("")+"]","g")),y=["\t\n\v\f\r   ᠎    ","          \u2028","\u2029\ufeff"].join(""),b=new RegExp("(^["+y+"]+)|(["+y+"]+$)","g"),g=s("String.prototype.replace"),v=n(612);e.exports=function e(t){var n=u(t)?t:v(t,a);if("symbol"==typeof n)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof n)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");if("string"==typeof n){if(f(n))return e(c(d(n,2),2));if(p(n))return e(c(d(n,2),8));if(m(n)||h(n))return NaN;var r=function(e){return g(e,b,"")}(n);if(r!==n)return e(r)}return a(n)}},function(e,t,n){"use strict";var r=n(71)("RegExp.prototype.test"),o=n(228);e.exports=function(e){return o(r,e)}},function(e,t,n){"use strict";var r=n(613);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=n(396),a=n(299),i=n(614),c=n(397),s=function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var n,r,i,c="string"===t?["toString","valueOf"]:["valueOf","toString"];for(i=0;i1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),r&&(Symbol.toPrimitive?t=l(e,Symbol.toPrimitive):c(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(e,n);if(o(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(i(e)||c(e))&&(n="string"),s(e,"default"===n?"number":n)}},function(e,t,n){"use strict";var r=Date.prototype.getDay,o=Object.prototype.toString,a="function"==typeof Symbol&&!!Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(a?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Date]"===o.call(e))}},function(e,t,n){"use strict";var r=n(71),o=r("%String%"),a=r("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new a("Cannot convert a Symbol value to a string");return o(e)}},function(e,t,n){"use strict";var r=n(71)("%Object%"),o=n(398);e.exports=function(e){return o(e),r(e)}},function(e,t,n){"use strict";var r=n(71)("%TypeError%");e.exports=function(e,t){if(null==e)throw new r(t||"Cannot call method on "+e);return e}},function(e,t,n){"use strict";var r=n(155),o=n(399);e.exports=function(){var e=o();return r(Array.prototype,{flat:e},{flat:function(){return Array.prototype.flat!==e}}),e}},function(e,t,n){"use strict";(function(t){var r=n(155),o=n(397),a="__ global cache key __";"function"==typeof Symbol&&o(Symbol("foo"))&&"function"==typeof Symbol.for&&(a=Symbol.for(a));var i=function(){return!0},c=function(){if(!t[a]){var e={};e[a]={};var n={};n[a]=i,r(t,e,n)}return t[a]},s=c(),l=function(e){return o(e)?Symbol.prototype.valueOf.call(e):typeof e+" | "+String(e)},u=function(e){if(!function(e){return null===e||"object"!=typeof e&&"function"!=typeof e}(e))throw new TypeError("key must not be an object")},d={clear:function(){delete t[a],s=c()},delete:function(e){return u(e),delete s[l(e)],!d.has(e)},get:function(e){return u(e),s[l(e)]},has:function(e){return u(e),l(e)in s},set:function(e,t){u(e);var n=l(e),o={};o[n]=t;var a={};return a[n]=i,r(s,o,a),d.has(e)},setIfMissingThenGet:function(e,t){if(d.has(e))return d.get(e);var n=t();return d.set(e,n),n}};e.exports=d}).call(this,n(229))},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.GLOBAL_CACHE_KEY="reactWithStylesInterfaceCSS",t.MAX_SPECIFICITY=20},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(e.length>0?String(e)+"__":"")+String(t)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=[],n=!1,r={},o=0;o0?O.join(",")||null:void 0}];else if(c(u))w=u;else{var k=Object.keys(O);w=d?k.sort(d):k}for(var S=0;S0?g+b:""}},function(e,t,n){"use strict";var r=n(406),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,c=n.depth>0&&/(\[[^[\]]*])/.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var d=0;n.depth>0&&null!==(c=i.exec(a))&&d=0;--a){var i,c=e[a];if("[]"===c&&n.parseArrays)i=[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&c!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[])[u]=o:i[l]=o:i={0:o}}o=i}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,l={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,f=u.split(t.delimiter,d),p=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(y=a(y)?[y]:y),o.call(l,m)?l[m]=r.combine(l[m],y):l[m]=y}return l}(e,n):e,d=n.plainObjects?Object.create(null):{},f=Object.keys(u),p=0;p-1?e[a]:void 0}return i(e,t,r)});e.exports=l},function(e,t,n){var r=n(640),o=n(644),a=n(264),i=n(645),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,s=/^\w*$/,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,u=/\\(\\)?/g;function d(e,t,n){if(null!=e){void 0!==n&&n in h(e)&&(t=[n]);for(var r=0,o=t.length;null!=e&&ro?0:o+t),(n=void 0===n||n>o?o:+n||0)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++rs))return!1;for(;++c-1&&e%1==0&&e<=9007199254740991}(e.length)&&!!n[r.call(e)]}},function(e,t){var n=/^\[object .+?Constructor\]$/,r=Object.prototype,o=Function.prototype.toString,a=r.hasOwnProperty,i=r.toString,c=RegExp("^"+o.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e,t){var r=null==e?void 0:e[t];return function(e){return null!=e&&(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&"[object Function]"==i.call(e)}(e)?c.test(o.call(e)):function(e){return!!e&&"object"==typeof e}(e)&&n.test(e))}(r)?r:void 0}},function(e,t){var n=Object.prototype,r=n.hasOwnProperty,o=n.toString,a=n.propertyIsEnumerable;e.exports=function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?o.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}(e)}(e)&&r.call(e,"callee")&&(!a.call(e,"callee")||"[object Arguments]"==o.call(e))}},function(e,t){function n(e){return e}e.exports=function(e,t,r){if("function"!=typeof e)return n;if(void 0===t)return e;switch(r){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,a){return e.call(t,n,r,o,a)};case 5:return function(n,r,o,a,i){return e.call(t,n,r,o,a,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(301);e.exports=function(e){var t;e=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(t=e)?t:Object(t);for(var n=-1,o=r(e),a=o.length,i=Array(a);++n-1&&n%1==0&&n<=9007199254740991))return r(e,t);for(var a=-1,i=s(e);++a0&&(r="+"),(+(Math.round(+n[0]+"e"+r+(+n[1]+t))+"e-"+t)).toFixed(t)}(o,a).toString():""+Math.round(o)).split("."))[0].length>3&&(s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(s[1]||"").lengthu;)if((c=s[u++])!=c)return!0}else for(;l>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},function(e,t,n){var r=n(314),o=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):a(n,t)}},function(e,t,n){var r=n(170),o=/#|\.prototype\./,a=function(e,t){var n=c[i(e)];return n==l||n!=s&&("function"==typeof t?r(t):!!t)},i=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},function(e,t,n){"use strict";var r=n(203),o=n(170),a=n(423),i=n(422),c=n(411),s=n(316),l=n(412),u=Object.assign,d=Object.defineProperty;e.exports=!u||o((function(){if(r&&1!==u({b:1},u(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||"abcdefghijklmnopqrst"!=a(u({},t)).join("")}))?function(e,t){for(var n=s(e),o=arguments.length,u=1,d=i.f,f=c.f;o>u;)for(var p,h=l(arguments[u++]),m=d?a(h).concat(d(h)):a(h),y=m.length,b=0;y>b;)p=m[b++],r&&!f.call(h,p)||(n[p]=h[p]);return n}:u},function(e,t,n){n(665),n(679);var r=n(313);e.exports=r.Array.from},function(e,t,n){"use strict";var r=n(666).charAt,o=n(417),a=n(667),i=o.set,c=o.getterFor("String Iterator");a(String,"String",(function(e){i(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=c(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(314),o=n(305),a=function(e){return function(t,n){var a,i,c=String(o(t)),s=r(n),l=c.length;return s<0||s>=l?e?"":void 0:(a=c.charCodeAt(s))<55296||a>56319||s+1===l||(i=c.charCodeAt(s+1))<56320||i>57343?e?c.charAt(s):a:e?c.slice(s,s+2):i-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},function(e,t,n){"use strict";var r=n(302),o=n(668),a=n(426),i=n(677),c=n(428),s=n(204),l=n(415),u=n(171),d=n(310),f=n(266),p=n(425),h=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=u("iterator"),b=function(){return this};e.exports=function(e,t,n,u,p,g,v){o(n,t,u);var O,w,_,k=function(e){if(e===p&&D)return D;if(!m&&e in E)return E[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},S=t+" Iterator",j=!1,E=e.prototype,C=E[y]||E["@@iterator"]||p&&E[p],D=!m&&C||k(p),P="Array"==t&&E.entries||C;if(P&&(O=a(P.call(new e)),h!==Object.prototype&&O.next&&(d||a(O)===h||(i?i(O,h):"function"!=typeof O[y]&&s(O,y,b)),c(O,S,!0,!0),d&&(f[S]=b))),"values"==p&&C&&"values"!==C.name&&(j=!0,D=function(){return C.call(this)}),d&&!v||E[y]===D||s(E,y,D),f[t]=D,p)if(w={values:k("values"),keys:g?D:k("keys"),entries:k("entries")},v)for(_ in w)(m||j||!(_ in E))&&l(E,_,w[_]);else r({target:t,proto:!0,forced:m||j},w);return w}},function(e,t,n){"use strict";var r=n(425).IteratorPrototype,o=n(674),a=n(265),i=n(428),c=n(266),s=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=o(r,{next:a(1,n)}),i(e,l,!1,!0),c[l]=s,e}},function(e,t,n){var r=n(170);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(304),o=n(131);e.exports="process"==r(o.process)},function(e,t,n){var r,o,a=n(131),i=n(672),c=a.process,s=c&&c.versions,l=s&&s.v8;l?o=(r=l.split("."))[0]+r[1]:i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){var r=n(312);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(427);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r,o=n(189),a=n(675),i=n(315),c=n(311),s=n(676),l=n(414),u=n(309)("IE_PROTO"),d=function(){},f=function(e){return"