From 983cd7473e12abcf6019c1300ecfd44fc8208466 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?=
Date: Tue, 23 Nov 2021 08:22:17 +0100
Subject: [PATCH] Adding /build directory to release
---
build/active-filters-frontend.asset.php | 1 +
build/active-filters-frontend.js | 13 ++++++
build/active-filters.asset.php | 1 +
build/active-filters.js | 17 +++++++
build/all-products-frontend.asset.php | 1 +
build/all-products-frontend.js | 11 +++++
build/all-products.asset.php | 1 +
build/all-products.js | 29 ++++++++++++
build/all-reviews.asset.php | 1 +
build/all-reviews.js | 7 +++
.../image---a7e2bb9b.js | 3 ++
.../button.js | 1 +
.../add-to-cart-frontend.js | 3 ++
build/atomic-block-components/add-to-cart.js | 3 ++
.../button-frontend.js | 3 ++
build/atomic-block-components/button.js | 3 ++
.../category-list-frontend.js | 1 +
.../atomic-block-components/category-list.js | 1 +
.../atomic-block-components/image-frontend.js | 3 ++
build/atomic-block-components/image.js | 3 ++
.../atomic-block-components/price-frontend.js | 3 ++
build/atomic-block-components/price.js | 3 ++
.../rating-frontend.js | 3 ++
build/atomic-block-components/rating.js | 3 ++
.../sale-badge-frontend.js | 1 +
build/atomic-block-components/sale-badge.js | 1 +
build/atomic-block-components/sku-frontend.js | 1 +
build/atomic-block-components/sku.js | 1 +
.../stock-indicator-frontend.js | 3 ++
.../stock-indicator.js | 3 ++
.../summary-frontend.js | 1 +
build/atomic-block-components/summary.js | 1 +
.../tag-list-frontend.js | 1 +
build/atomic-block-components/tag-list.js | 1 +
.../atomic-block-components/title-frontend.js | 1 +
build/atomic-block-components/title.js | 1 +
build/attribute-filter-frontend.asset.php | 1 +
build/attribute-filter-frontend.js | 27 +++++++++++
build/attribute-filter.asset.php | 1 +
build/attribute-filter.js | 33 ++++++++++++++
build/blocks-checkout.asset.php | 1 +
build/blocks-checkout.js | 5 +++
.../accepted-payment-methods-frontend.js | 1 +
build/cart-blocks/checkout-button-frontend.js | 1 +
build/cart-blocks/empty-cart-frontend.js | 1 +
.../payment-frontend.js | 5 +++
build/cart-blocks/express-payment-frontend.js | 1 +
build/cart-blocks/filled-cart-frontend.js | 1 +
build/cart-blocks/items-frontend.js | 1 +
build/cart-blocks/line-items-frontend.js | 15 +++++++
.../shipping-address-frontend.js | 1 +
build/cart-blocks/order-summary-frontend.js | 23 ++++++++++
build/cart-blocks/totals-frontend.js | 1 +
build/cart-frontend.asset.php | 1 +
build/cart-frontend.js | 5 +++
build/cart.asset.php | 1 +
build/cart.js | 43 ++++++++++++++++++
build/checkout-blocks/actions-frontend.js | 1 +
.../billing-address-frontend.js | 1 +
.../contact-information-frontend.js | 1 +
.../express-payment-frontend.js | 1 +
build/checkout-blocks/fields-frontend.js | 1 +
build/checkout-blocks/order-note-frontend.js | 1 +
.../checkout-blocks/order-summary-frontend.js | 31 +++++++++++++
build/checkout-blocks/payment-frontend.js | 5 +++
.../shipping-address-frontend.js | 1 +
.../shipping-methods-frontend.js | 9 ++++
build/checkout-blocks/terms-frontend.js | 5 +++
build/checkout-blocks/totals-frontend.js | 1 +
build/checkout-frontend.asset.php | 1 +
build/checkout-frontend.js | 5 +++
build/checkout.asset.php | 1 +
build/checkout.js | 45 +++++++++++++++++++
build/featured-category.asset.php | 1 +
build/featured-category.js | 11 +++++
build/featured-product.asset.php | 1 +
build/featured-product.js | 5 +++
build/handpicked-products.asset.php | 1 +
build/handpicked-products.js | 3 ++
build/legacy-template.asset.php | 1 +
build/legacy-template.js | 3 ++
build/mini-cart-component-frontend.asset.php | 1 +
build/mini-cart-component-frontend.js | 23 ++++++++++
build/mini-cart-contents.asset.php | 1 +
build/mini-cart-contents.js | 1 +
build/mini-cart-frontend.asset.php | 1 +
build/mini-cart-frontend.js | 1 +
build/mini-cart.asset.php | 1 +
build/mini-cart.js | 1 +
build/price-filter-frontend.asset.php | 1 +
build/price-filter-frontend.js | 1 +
build/price-filter.asset.php | 1 +
build/price-filter.js | 3 ++
build/price-format.asset.php | 1 +
build/price-format.js | 1 +
build/product-best-sellers.asset.php | 1 +
build/product-best-sellers.js | 11 +++++
build/product-categories.asset.php | 1 +
build/product-categories.js | 1 +
build/product-category.asset.php | 1 +
build/product-category.js | 11 +++++
build/product-new.asset.php | 1 +
build/product-new.js | 11 +++++
build/product-on-sale.asset.php | 1 +
build/product-on-sale.js | 11 +++++
build/product-search.asset.php | 1 +
build/product-search.js | 1 +
build/product-tag.asset.php | 1 +
build/product-tag.js | 5 +++
build/product-top-rated.asset.php | 1 +
build/product-top-rated.js | 11 +++++
build/products-by-attribute.asset.php | 1 +
build/products-by-attribute.js | 11 +++++
build/reviews-by-category.asset.php | 1 +
build/reviews-by-category.js | 17 +++++++
build/reviews-by-product.asset.php | 1 +
build/reviews-by-product.js | 17 +++++++
build/reviews-frontend.asset.php | 1 +
build/reviews-frontend.js | 5 +++
build/single-product-frontend.asset.php | 1 +
build/single-product-frontend.js | 3 ++
build/single-product.asset.php | 1 +
build/single-product.js | 5 +++
build/stock-filter-frontend.asset.php | 1 +
build/stock-filter-frontend.js | 11 +++++
build/stock-filter.asset.php | 1 +
build/stock-filter.js | 13 ++++++
.../billing-ad--c5eb4dcd-frontend.js | 1 +
.../add-to-cart-frontend.js | 1 +
...er-summary--checkout--8a3571de-frontend.js | 1 +
.../order-summary-frontend.js | 1 +
.../order-summary---eb4d2cec-frontend.js | 3 ++
build/wc-blocks-data.asset.php | 1 +
build/wc-blocks-data.js | 1 +
build/wc-blocks-editor-style-rtl.css | 1 +
build/wc-blocks-editor-style.css | 2 +
build/wc-blocks-google-analytics.asset.php | 1 +
build/wc-blocks-google-analytics.js | 1 +
build/wc-blocks-middleware.asset.php | 1 +
build/wc-blocks-middleware.js | 1 +
build/wc-blocks-registry.asset.php | 1 +
build/wc-blocks-registry.js | 1 +
build/wc-blocks-shared-context.asset.php | 1 +
build/wc-blocks-shared-context.js | 1 +
build/wc-blocks-shared-hocs.asset.php | 1 +
build/wc-blocks-shared-hocs.js | 1 +
build/wc-blocks-style-rtl.css | 1 +
build/wc-blocks-style.css | 1 +
build/wc-blocks-vendors-style-rtl.css | 1 +
build/wc-blocks-vendors-style.css | 1 +
build/wc-blocks-vendors.js | 19 ++++++++
build/wc-blocks.asset.php | 1 +
build/wc-blocks.js | 1 +
build/wc-payment-method-bacs.asset.php | 1 +
build/wc-payment-method-bacs.js | 1 +
build/wc-payment-method-cheque.asset.php | 1 +
build/wc-payment-method-cheque.js | 1 +
build/wc-payment-method-cod.asset.php | 1 +
build/wc-payment-method-cod.js | 1 +
build/wc-payment-method-paypal.asset.php | 1 +
build/wc-payment-method-paypal.js | 1 +
build/wc-payment-method-stripe.asset.php | 1 +
build/wc-payment-method-stripe.js | 1 +
build/wc-settings.asset.php | 1 +
build/wc-settings.js | 1 +
165 files changed, 696 insertions(+)
create mode 100644 build/active-filters-frontend.asset.php
create mode 100644 build/active-filters-frontend.js
create mode 100644 build/active-filters.asset.php
create mode 100644 build/active-filters.js
create mode 100644 build/all-products-frontend.asset.php
create mode 100644 build/all-products-frontend.js
create mode 100644 build/all-products.asset.php
create mode 100644 build/all-products.js
create mode 100644 build/all-reviews.asset.php
create mode 100644 build/all-reviews.js
create mode 100644 build/atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b.js
create mode 100644 build/atomic-block-components/add-to-cart--atomic-block-components/button.js
create mode 100644 build/atomic-block-components/add-to-cart-frontend.js
create mode 100644 build/atomic-block-components/add-to-cart.js
create mode 100644 build/atomic-block-components/button-frontend.js
create mode 100644 build/atomic-block-components/button.js
create mode 100644 build/atomic-block-components/category-list-frontend.js
create mode 100644 build/atomic-block-components/category-list.js
create mode 100644 build/atomic-block-components/image-frontend.js
create mode 100644 build/atomic-block-components/image.js
create mode 100644 build/atomic-block-components/price-frontend.js
create mode 100644 build/atomic-block-components/price.js
create mode 100644 build/atomic-block-components/rating-frontend.js
create mode 100644 build/atomic-block-components/rating.js
create mode 100644 build/atomic-block-components/sale-badge-frontend.js
create mode 100644 build/atomic-block-components/sale-badge.js
create mode 100644 build/atomic-block-components/sku-frontend.js
create mode 100644 build/atomic-block-components/sku.js
create mode 100644 build/atomic-block-components/stock-indicator-frontend.js
create mode 100644 build/atomic-block-components/stock-indicator.js
create mode 100644 build/atomic-block-components/summary-frontend.js
create mode 100644 build/atomic-block-components/summary.js
create mode 100644 build/atomic-block-components/tag-list-frontend.js
create mode 100644 build/atomic-block-components/tag-list.js
create mode 100644 build/atomic-block-components/title-frontend.js
create mode 100644 build/atomic-block-components/title.js
create mode 100644 build/attribute-filter-frontend.asset.php
create mode 100644 build/attribute-filter-frontend.js
create mode 100644 build/attribute-filter.asset.php
create mode 100644 build/attribute-filter.js
create mode 100644 build/blocks-checkout.asset.php
create mode 100644 build/blocks-checkout.js
create mode 100644 build/cart-blocks/accepted-payment-methods-frontend.js
create mode 100644 build/cart-blocks/checkout-button-frontend.js
create mode 100644 build/cart-blocks/empty-cart-frontend.js
create mode 100644 build/cart-blocks/express-payment--checkout-blocks/express-payment--checkout-blocks/payment-frontend.js
create mode 100644 build/cart-blocks/express-payment-frontend.js
create mode 100644 build/cart-blocks/filled-cart-frontend.js
create mode 100644 build/cart-blocks/items-frontend.js
create mode 100644 build/cart-blocks/line-items-frontend.js
create mode 100644 build/cart-blocks/order-summary--checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js
create mode 100644 build/cart-blocks/order-summary-frontend.js
create mode 100644 build/cart-blocks/totals-frontend.js
create mode 100644 build/cart-frontend.asset.php
create mode 100644 build/cart-frontend.js
create mode 100644 build/cart.asset.php
create mode 100644 build/cart.js
create mode 100644 build/checkout-blocks/actions-frontend.js
create mode 100644 build/checkout-blocks/billing-address-frontend.js
create mode 100644 build/checkout-blocks/contact-information-frontend.js
create mode 100644 build/checkout-blocks/express-payment-frontend.js
create mode 100644 build/checkout-blocks/fields-frontend.js
create mode 100644 build/checkout-blocks/order-note-frontend.js
create mode 100644 build/checkout-blocks/order-summary-frontend.js
create mode 100644 build/checkout-blocks/payment-frontend.js
create mode 100644 build/checkout-blocks/shipping-address-frontend.js
create mode 100644 build/checkout-blocks/shipping-methods-frontend.js
create mode 100644 build/checkout-blocks/terms-frontend.js
create mode 100644 build/checkout-blocks/totals-frontend.js
create mode 100644 build/checkout-frontend.asset.php
create mode 100644 build/checkout-frontend.js
create mode 100644 build/checkout.asset.php
create mode 100644 build/checkout.js
create mode 100644 build/featured-category.asset.php
create mode 100644 build/featured-category.js
create mode 100644 build/featured-product.asset.php
create mode 100644 build/featured-product.js
create mode 100644 build/handpicked-products.asset.php
create mode 100644 build/handpicked-products.js
create mode 100644 build/legacy-template.asset.php
create mode 100644 build/legacy-template.js
create mode 100644 build/mini-cart-component-frontend.asset.php
create mode 100644 build/mini-cart-component-frontend.js
create mode 100644 build/mini-cart-contents.asset.php
create mode 100644 build/mini-cart-contents.js
create mode 100644 build/mini-cart-frontend.asset.php
create mode 100644 build/mini-cart-frontend.js
create mode 100644 build/mini-cart.asset.php
create mode 100644 build/mini-cart.js
create mode 100644 build/price-filter-frontend.asset.php
create mode 100644 build/price-filter-frontend.js
create mode 100644 build/price-filter.asset.php
create mode 100644 build/price-filter.js
create mode 100644 build/price-format.asset.php
create mode 100644 build/price-format.js
create mode 100644 build/product-best-sellers.asset.php
create mode 100644 build/product-best-sellers.js
create mode 100644 build/product-categories.asset.php
create mode 100644 build/product-categories.js
create mode 100644 build/product-category.asset.php
create mode 100644 build/product-category.js
create mode 100644 build/product-new.asset.php
create mode 100644 build/product-new.js
create mode 100644 build/product-on-sale.asset.php
create mode 100644 build/product-on-sale.js
create mode 100644 build/product-search.asset.php
create mode 100644 build/product-search.js
create mode 100644 build/product-tag.asset.php
create mode 100644 build/product-tag.js
create mode 100644 build/product-top-rated.asset.php
create mode 100644 build/product-top-rated.js
create mode 100644 build/products-by-attribute.asset.php
create mode 100644 build/products-by-attribute.js
create mode 100644 build/reviews-by-category.asset.php
create mode 100644 build/reviews-by-category.js
create mode 100644 build/reviews-by-product.asset.php
create mode 100644 build/reviews-by-product.js
create mode 100644 build/reviews-frontend.asset.php
create mode 100644 build/reviews-frontend.js
create mode 100644 build/single-product-frontend.asset.php
create mode 100644 build/single-product-frontend.js
create mode 100644 build/single-product.asset.php
create mode 100644 build/single-product.js
create mode 100644 build/stock-filter-frontend.asset.php
create mode 100644 build/stock-filter-frontend.js
create mode 100644 build/stock-filter.asset.php
create mode 100644 build/stock-filter.js
create mode 100644 build/vendors--atomic-block-components/add-to-cart--cart-blocks/order-summary--checkout-blocks/billing-ad--c5eb4dcd-frontend.js
create mode 100644 build/vendors--atomic-block-components/add-to-cart-frontend.js
create mode 100644 build/vendors--atomic-block-components/price--cart-blocks/line-items--cart-blocks/order-summary--checkout--8a3571de-frontend.js
create mode 100644 build/vendors--cart-blocks/line-items--checkout-blocks/order-summary-frontend.js
create mode 100644 build/vendors--cart-blocks/order-summary--checkout-blocks/billing-address--checkout-blocks/order-summary---eb4d2cec-frontend.js
create mode 100644 build/wc-blocks-data.asset.php
create mode 100644 build/wc-blocks-data.js
create mode 100644 build/wc-blocks-editor-style-rtl.css
create mode 100644 build/wc-blocks-editor-style.css
create mode 100644 build/wc-blocks-google-analytics.asset.php
create mode 100644 build/wc-blocks-google-analytics.js
create mode 100644 build/wc-blocks-middleware.asset.php
create mode 100644 build/wc-blocks-middleware.js
create mode 100644 build/wc-blocks-registry.asset.php
create mode 100644 build/wc-blocks-registry.js
create mode 100644 build/wc-blocks-shared-context.asset.php
create mode 100644 build/wc-blocks-shared-context.js
create mode 100644 build/wc-blocks-shared-hocs.asset.php
create mode 100644 build/wc-blocks-shared-hocs.js
create mode 100644 build/wc-blocks-style-rtl.css
create mode 100644 build/wc-blocks-style.css
create mode 100644 build/wc-blocks-vendors-style-rtl.css
create mode 100644 build/wc-blocks-vendors-style.css
create mode 100644 build/wc-blocks-vendors.js
create mode 100644 build/wc-blocks.asset.php
create mode 100644 build/wc-blocks.js
create mode 100644 build/wc-payment-method-bacs.asset.php
create mode 100644 build/wc-payment-method-bacs.js
create mode 100644 build/wc-payment-method-cheque.asset.php
create mode 100644 build/wc-payment-method-cheque.js
create mode 100644 build/wc-payment-method-cod.asset.php
create mode 100644 build/wc-payment-method-cod.js
create mode 100644 build/wc-payment-method-paypal.asset.php
create mode 100644 build/wc-payment-method-paypal.js
create mode 100644 build/wc-payment-method-stripe.asset.php
create mode 100644 build/wc-payment-method-stripe.js
create mode 100644 build/wc-settings.asset.php
create mode 100644 build/wc-settings.js
diff --git a/build/active-filters-frontend.asset.php b/build/active-filters-frontend.asset.php
new file mode 100644
index 00000000000..145efa5ddac
--- /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' => '69374b021190d13ff9d0b007747540c0');
\ 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..d87273b0037
--- /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 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=237)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},102:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(9),o=r(11),c=r(0),a=r(45),i=r(83),s=function(e){var t=e.namespace,r=e.resourceName,s=e.resourceValues,u=void 0===s?[]:s,l=e.query,p=void 0===l?{}:l,f=e.shouldSelect,b=void 0===f||f;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var d=Object(c.useRef)({results:[],isLoading:!0}),m=Object(a.a)(p),y=Object(a.a)(u),v=Object(i.a)(),g=Object(o.useSelect)((function(e){if(!b)return null;var o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,m,y],a=o.getCollectionError.apply(o,c);return a&&v(a),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,r,y,m,b]);return null!==g&&(d.current=g),d.current}},104:function(e,t,r){"use strict";r.d(t,"n",(function(){return c})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return i})),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 p})),r.d(t,"j",(function(){return f})),r.d(t,"c",(function(){return b})),r.d(t,"e",(function(){return d})),r.d(t,"g",(function(){return m})),r.d(t,"a",(function(){return y})),r.d(t,"h",(function(){return v})),r.d(t,"b",(function(){return g}));var n,o=r(2),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===(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),b=(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"),m=Object(o.getSetting)("shippingCountries",{}),y=Object(o.getSetting)("allowedCountries",{}),v=Object(o.getSetting)("shippingStates",{}),g=Object(o.getSetting)("allowedStates",{})},11:function(e,t){e.exports=window.wp.data},128:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(26),a=r.n(c),i=r(0),s=["srcElement","size"];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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=a()(e,s);return Object(i.isValidElement)(t)?Object(i.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",c=e.filter((function(e){return e.attribute===r.taxonomy})),a=c.length?c[0]:null;if(a&&a.slug&&Array.isArray(a.slug)&&a.slug.includes(o)){var i=a.slug.filter((function(e){return e!==o})),s=e.filter((function(e){return e.attribute!==r.taxonomy}));i.length>0&&(a.slug=i.sort(),s.push(a)),t(Object(n.sortBy)(s,"attribute"))}},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",a=e.filter((function(e){return e.attribute!==r.taxonomy}));0===o.length?t(a):(a.push({attribute:r.taxonomy,operator:c,slug:o.map((function(e){return e.slug})).sort()}),t(Object(n.sortBy)(a,"attribute")))}},158:function(e,t){},19:function(e,t){e.exports=window.wp.isShallowEqual},2:function(e,t){e.exports=window.wc.wcSettings},20:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t0&&"and"===u&&(o=React.createElement("span",{className:"wc-block-active-filters__list-item-operator"},Object(a.__)("and","woo-gutenberg-products-block"))),v({type:x,name:Object(O.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(_.a)(y,w,r,e)},showLabel:!1,displayStyle:l})}))))};Object(n.b)({selector:".wp-block-woocommerce-active-filters",Block:function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(i.b)("attributes",[]),l=c()(o,2),d=l[0],m=l[1],g=Object(i.b)("stock_status",[]),O=c()(g,2),_=O[0],x=O[1],h=Object(i.b)("min_price"),j=c()(h,2),E=j[0],S=j[1],R=Object(i.b)("max_price"),k=c()(R,2),P=k[0],T=k[1],N=Object(s.getSetting)("stockStatusOptions",[]),M=Object(u.useMemo)((function(){if(_.length>0)return _.map((function(e){return v({type:Object(a.__)("Stock Status","woo-gutenberg-products-block"),name:N[e],removeCallback:function(){var t=_.filter((function(t){return t!==e}));x(t)},displayStyle:t.displayStyle})}))}),[N,_,x,t.displayStyle]),A=Object(u.useMemo)((function(){return Number.isFinite(E)||Number.isFinite(P)?v({type:Object(a.__)("Price","woo-gutenberg-products-block"),name:y(E,P),removeCallback:function(){S(void 0),T(void 0)},displayStyle:t.displayStyle}):null}),[E,P,t.displayStyle,S,T]),C=Object(u.useMemo)((function(){return d.map((function(e){var r=Object(b.b)(e.attribute);return React.createElement(w,{attributeObject:r,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[d,t.displayStyle]);if(!(d.length>0||_.length>0||Number.isFinite(E)||Number.isFinite(P)||n))return null;var B="h".concat(t.headingLevel),L=p()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return React.createElement(React.Fragment,null,!n&&t.heading&&React.createElement(B,{className:"wc-block-active-filters__title"},t.heading),React.createElement("div",{className:"wc-block-active-filters"},React.createElement("ul",{className:L},n?React.createElement(React.Fragment,null,v({type:Object(a.__)("Size","woo-gutenberg-products-block"),name:Object(a.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),v({type:Object(a.__)("Color","woo-gutenberg-products-block"),name:Object(a.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):React.createElement(React.Fragment,null,A,M,C)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){S(void 0),T(void 0),m([]),x([])}},React.createElement(f.a,{label:Object(a.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Clear All Filters","woo-gutenberg-products-block")}))))},getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},26:function(e,t,r){var n=r(73);e.exports=function(e,t){if(null==e)return{};var r,o,c=n(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c},e.exports.default=e.exports,e.exports.__esModule=!0},27: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},29:function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,r(t)}e.exports=r,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.htmlEntities},37:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},38:function(e,t){function r(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},75:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return m}));var n=r(4),o=r.n(n),c=r(9),a=r(11),i=r(0),s=r(19),u=r.n(s),l=r(45),p=r(96),f=r(55),b=function(e){var t=Object(f.a)();e=e||t;var r=Object(a.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(a.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(i.useCallback)((function(t){n(e,t)}),[e,n])]},d=function(e,t,r){var n=Object(f.a)();r=r||n;var o=Object(a.useSelect)((function(n){return n(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),s=Object(a.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(i.useCallback)((function(t){s(r,e,t)}),[r,e,s])]},m=function(e,t){var r=Object(f.a)(),n=b(t=t||r),c=o()(n,2),a=c[0],s=c[1],d=Object(l.a)(a),m=Object(l.a)(e),y=Object(p.a)(m),v=Object(i.useRef)(!1);return Object(i.useEffect)((function(){u()(y,m)||(s(Object.assign({},d,m)),v.current=!0)}),[d,m,y,s]),v.current?[a,s]:[e,s]}},77:function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},78:function(e,t){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,c=[],_n=!0,a=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(c.push(n.value),!t||c.length!==t);_n=!0);}catch(e){a=!0,o=e}finally{try{_n||null==r.return||r.return()}finally{if(a)throw o}}return c}},e.exports.default=e.exports,e.exports.__esModule=!0},79:function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},8:function(e,t,r){e.exports=r(70)()},83:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(4),o=r.n(n),c=r(0),a=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){t((function(){throw e}))}),[])}},9:function(e,t){e.exports=window.wc.wcBlocksData},95:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d}));var n=r(20),o=r.n(n),c=r(5),a=r.n(c),i=r(0),s=r(46);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;t0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,a)})),f({Block:r,containers:i,getProps:n,getErrorBoundaryProps:o}),Array.prototype.forEach.call(s,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,c,a,i;n=(r=l(l({},e),{},{wrapper:t})).Block,o=r.getProps,c=r.getErrorBoundaryProps,a=r.selector,i=r.wrapper.querySelectorAll(a),f({Block:n,containers:i,getProps:o,getErrorBoundaryProps:c})}))}))}},96:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}}});
\ 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..e6e64c005ea
--- /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' => '6ce5bdc55d9f00d78b1b4808bc76fd7e');
\ No newline at end of file
diff --git a/build/active-filters.js b/build/active-filters.js
new file mode 100644
index 00000000000..c6ca21adc96
--- /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 r,a,i=t[0],l=t[1],s=t[2],b=0,p=[];b0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=e.filter((function(e){return e.attribute===n.taxonomy})),a=o.length?o[0]:null;if(a&&a.slug&&Array.isArray(a.slug)&&a.slug.includes(c)){var i=a.slug.filter((function(e){return e!==c})),l=e.filter((function(e){return e.attribute!==n.taxonomy}));i.length>0&&(a.slug=i.sort(),l.push(a)),t(Object(r.sortBy)(l,"attribute"))}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=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",a=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(a):(a.push({attribute:n.taxonomy,operator:o,slug:c.map((function(e){return e.slug})).sort()}),t(Object(r.sortBy)(a,"attribute")))}},25:function(e,t){e.exports=window.wc.wcBlocksData},255:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(21),a=n.n(o),i=n(0),l=(n(2),n(6)),s=n.n(l),u=n(1),b=n(61),p=n(330),f=(n(195),["text","screenReaderText","element","className","radius","children"]),d=function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,o=e.element,l=void 0===o?"li":o,u=e.className,b=void 0===u?"":u,p=e.radius,d=void 0===p?"small":p,m=e.children,v=void 0===m?null:m,O=a()(e,f),h=l,j=s()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+d),g=Boolean(r&&r!==t);return Object(i.createElement)(h,c()({className:j},O),Object(i.createElement)("span",{"aria-hidden":g,className:"wc-block-components-chip__text"},t),g&&Object(i.createElement)("span",{className:"screen-reader-text"},r),v)},m=["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"];t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,o=void 0===r?"":r,l=e.disabled,f=void 0!==l&&l,v=e.onRemove,O=void 0===v?function(){}:v,h=e.removeOnAnyClick,j=void 0!==h&&h,g=e.text,w=e.screenReaderText,y=void 0===w?"":w,_=a()(e,m),E=j?"span":"button";if(!n){var k=y&&"string"==typeof y?y:g;n="string"!=typeof k?
+/* translators: Remove chip. */
+Object(u.__)("Remove","woo-gutenberg-products-block"):Object(u.sprintf)(
+/* translators: %s text of the chip to remove. */
+Object(u.__)('Remove "%s"',"woo-gutenberg-products-block"),k)}var x={"aria-label":n,disabled:f,onClick:O,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||O()}},S=j?x:{},C=j?{"aria-hidden":!0}:x;return Object(i.createElement)(d,c()({},_,S,{className:s()(o,"is-removable"),element:j?"button":_.element,screenReaderText:y,text:g}),Object(i.createElement)(E,c()({className:"wc-block-components-chip__remove"},C),Object(i.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},26:function(e,t){e.exports=window.wp.htmlEntities},27:function(e,t){e.exports=window.wp.primitives},3:function(e,t){e.exports=window.wp.components},330:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(21),a=n.n(o),i=n(0),l=n(27),s=["className","size"],u=Object(i.createElement)((function(e){var t=e.className,n=e.size,r=a()(e,s);return Object(i.createElement)(l.SVG,c()({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=u},36:function(e,t){e.exports=window.wp.isShallowEqual},4:function(e,t){e.exports=window.wc.wcSettings},42:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(0),a=n(6),i=n.n(a);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 s(e){for(var t=1;t0&&"and"===l&&(c=Object(o.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(a.__)("and","woo-gutenberg-products-block"))),S({type:O,name:Object(N.decodeEntities)(r.name||e),prefix:c,removeCallback:function(){Object(P.a)(m,v,n,e)},showLabel:!1,displayStyle:s})}))))},L=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(g.b)("attributes",[]),i=j()(c,2),l=i[0],s=i[1],u=Object(g.b)("stock_status",[]),b=j()(u,2),f=b[0],d=b[1],m=Object(g.b)("min_price"),v=j()(m,2),O=v[0],h=v[1],E=Object(g.b)("max_price"),k=j()(E,2),C=k[0],N=k[1],P=Object(w.getSetting)("stockStatusOptions",[]),L=Object(o.useMemo)((function(){if(f.length>0)return f.map((function(e){return S({type:Object(a.__)("Stock Status","woo-gutenberg-products-block"),name:P[e],removeCallback:function(){var t=f.filter((function(t){return t!==e}));d(t)},displayStyle:t.displayStyle})}))}),[P,f,d,t.displayStyle]),V=Object(o.useMemo)((function(){return Number.isFinite(O)||Number.isFinite(C)?S({type:Object(a.__)("Price","woo-gutenberg-products-block"),name:x(O,C),removeCallback:function(){h(void 0),N(void 0)},displayStyle:t.displayStyle}):null}),[O,C,t.displayStyle,h,N]),H=Object(o.useMemo)((function(){return l.map((function(e){var n=Object(_.b)(e.attribute);return Object(o.createElement)(R,{attributeObject:n,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[l,t.displayStyle]);if(!(l.length>0||f.length>0||Number.isFinite(O)||Number.isFinite(C)||r))return null;var z="h".concat(t.headingLevel),T=p()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(z,{className:"wc-block-active-filters__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-active-filters"},Object(o.createElement)("ul",{className:T},r?Object(o.createElement)(o.Fragment,null,S({type:Object(a.__)("Size","woo-gutenberg-products-block"),name:Object(a.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),S({type:Object(a.__)("Color","woo-gutenberg-products-block"),name:Object(a.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(o.createElement)(o.Fragment,null,V,L,H)),Object(o.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){h(void 0),N(void 0),s([]),d([])}},Object(o.createElement)(y.a,{label:Object(a.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Clear All Filters","woo-gutenberg-products-block")}))))},V=Object(d.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.displayStyle,i=t.heading,l=t.headingLevel;return Object(o.createElement)("div",{className:r},Object(o.createElement)(f.InspectorControls,{key:"inspector"},Object(o.createElement)(d.PanelBody,{title:Object(a.__)("Block Settings","woo-gutenberg-products-block")},Object(o.createElement)(O.a,{label:Object(a.__)("Display Style","woo-gutenberg-products-block"),value:c,options:[{label:Object(a.__)("List","woo-gutenberg-products-block"),value:"list"},{
+/* translators: "Chips" is a tag-like display style for chosen attributes. */
+label:Object(a.__)("Chips","woo-gutenberg-products-block"),value:"chips"}],onChange:function(e){return n({displayStyle:e})}}),Object(o.createElement)("p",null,Object(a.__)("Heading Level","woo-gutenberg-products-block")),Object(o.createElement)(m.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:l,onChange:function(e){return n({headingLevel:e})}}))),Object(o.createElement)(v.a,{className:"wc-block-active-filters__title",headingLevel:l,heading:i,onChange:function(e){return n({heading:e})}}),Object(o.createElement)(d.Disabled,null,Object(o.createElement)(L,{attributes:t,isEditor:!0})))}));Object(i.registerBlockType)("woocommerce/active-filters",{title:Object(a.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(l.a,{srcElement:u}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("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(a.__)("Active filters","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:V,save:function(e){var t=e.attributes,n=t.className,r={"data-display-style":t.displayStyle,"data-heading":t.heading,"data-heading-level":t.headingLevel};return Object(o.createElement)("div",c()({className:p()("is-loading",n)},r),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-active-product-filters__placeholder"}))}})}});
\ 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..3d42afba09b
--- /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' => 'a851443e7deaa54803843921bd3723fa');
\ 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..58a154f1cc5
--- /dev/null
+++ b/build/all-products-frontend.js
@@ -0,0 +1,11 @@
+!function(e){function t(t){for(var r,o,c=t[0],i=t[1],a=0,s=[];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=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c},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){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(56),o=r(63);function c(e){return function(e){if(Array.isArray(e))return Object(n.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){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,r){"use strict";r.d(t,"a",(function(){return k}));var n=r(4),o=r.n(n),c=r(5),i=r.n(c),a=r(6),u=r(0),s=r(9),l=r(11),f=r(32),p=r(101),d=r(151),b=r(36),m=r(107),h=function(e){var t=e.detail;t&&t.preserveCartData||Object(l.dispatch)(s.CART_STORE_KEY).invalidateResolutionForStore()},v=function(){1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},g=function(){Object(u.useEffect)((function(){return function(){if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:function(){}}),0===window.wcBlocksStoreCartListeners.count){var e=Object(m.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(m.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",h),document.body.addEventListener("wc-blocks_removed_from_cart",h),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=function(){e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",h),document.body.removeEventListener("wc-blocks_removed_from_cart",h)}}window.wcBlocksStoreCartListeners.count++}(),v}),[])};function O(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 y(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(b.a)(),r=t.isEditor,n=t.previewData,o=null==n?void 0:n.previewCart,c=e.shouldSelect,i=Object(u.useRef)();g();var f=Object(l.useSelect)((function(e,t){var n=t.dispatch;if(!c)return x;if(r)return{cartCoupons:o.coupons,cartItems:o.items,cartFees:o.fees,cartItemsCount:o.items_count,cartItemsWeight:o.items_weight,cartNeedsPayment:o.needs_payment,cartNeedsShipping:o.needs_shipping,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:o.totals,cartIsLoading:!1,cartErrors:s.EMPTY_CART_ERRORS,billingAddress:j,shippingAddress:w,extensions:s.EMPTY_EXTENSIONS,shippingRates:o.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:o.has_calculated_shipping,paymentRequirements:o.paymentRequirements,receiveCart:"function"==typeof(null==o?void 0:o.receiveCart)?o.receiveCart:function(){}};var i=e(s.CART_STORE_KEY),a=i.getCartData(),u=i.getCartErrors(),l=i.getCartTotals(),f=!i.hasFinishedResolution("getCartData"),p=i.isCustomerDataUpdating(),b=n(s.CART_STORE_KEY).receiveCart,m=_(a.billingAddress),h=a.needsShipping?_(a.shippingAddress):m,v=a.fees.length>0?a.fees.map((function(e){return _(e)})):s.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map((function(e){return y(y({},e),{},{label:e.code})})):s.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:v,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:l,cartIsLoading:f,cartErrors:u,billingAddress:Object(d.a)(m),shippingAddress:Object(d.a)(h),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:b}}),[c]);return i.current&&Object(a.isEqual)(i.current,f)||(i.current=f),i.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),o=(r(11),Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:function(){}})),c=function(){return Object(n.useContext)(o)}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};try{Object(c.doAction)("experimental__woocommerce_blocks-".concat(e),t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(i.useCallback)((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(c.doAction)("experimental__woocommerce_blocks-checkout-".concat(e),s(s({},r),{},{storeCart:t.current}))}catch(e){console.error(e)}}),[])}}},function(e,t){e.exports=window.wp.deprecated},,function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=Object(n.createContext)("page"),c=function(){return Object(n.useContext)(o)};o.Provider},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);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.hooks},function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return m}));var n=r(4),o=r.n(n),c=r(9),i=r(11),a=r(0),u=r(19),s=r.n(u),l=r(45),f=r(96),p=r(55),d=function(e){var t=Object(p.a)();e=e||t;var r=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(a.useCallback)((function(t){n(e,t)}),[e,n])]},b=function(e,t,r){var n=Object(p.a)();r=r||n;var o=Object(i.useSelect)((function(n){return n(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),u=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){u(r,e,t)}),[r,e,u])]},m=function(e,t){var r=Object(p.a)(),n=d(t=t||r),c=o()(n,2),i=c[0],u=c[1],b=Object(l.a)(i),m=Object(l.a)(e),h=Object(f.a)(m),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){s()(h,m)||(u(Object.assign({},b,m)),v.current=!0)}),[b,m,h,u]),v.current?[i,u]:[e,u]}},function(e,t){e.exports=window.wp.warning},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,c=[],_n=!0,i=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(c.push(n.value),!t||c.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==r.return||r.return()}finally{if(i)throw o}}return c}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t,r){"use strict";var n=r(13),o=r(18),c=r(0),i=r(7),a=r.n(i),u=r(6),s=r(53),l=r.n(s),f=r(14),p=r(15),d=r(16),b=r(17),m=r(10),h=r(23),v=r(41),g=r(58),O=r(25),y=r(108),w=r(22);function j(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 E(e){for(var t=1;t0?a/2:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===n?f=e.right:"middle"!==c&&(f=s);var p=e.right;"left"===n?p=e.left:"middle"!==c&&(p=s);var d,b={popoverLeft:f,contentWidth:f-a>0?a:f},m={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},h=r,v=null;if(!o)if("center"===r&&l.contentWidth===a)h="center";else if("left"===r&&b.contentWidth===a)h="left";else if("right"===r&&m.contentWidth===a)h="right";else{var g="left"==(h=b.contentWidth>m.contentWidth?"left":"right")?b.contentWidth:m.contentWidth;v=g!==a?g:null}if(d="center"===h?l.popoverLeft:"left"===h?b.popoverLeft:m.popoverLeft,i){var O=i.getBoundingClientRect();d=Math.min(d,O.right-a)}return{xAxis:h,popoverLeft:d,contentWidth:v}}function x(e,t,r,n,o,c,i){var a=t.height;if(o){var u=(Object(v.getScrollContainer)(c)||document.body).getBoundingClientRect().top+a-i;if(e.top<=u)return{yAxis:r,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===n?s=e.bottom:"top"===n&&(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=r,b=null;if(!o)if("middle"===r&&l.contentHeight===a)d="middle";else if("top"===r&&f.contentHeight===a)d="top";else if("bottom"===r&&p.contentHeight===a)d="bottom";else{var m="top"==(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;b=m!==a?m:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:b}}var k=r(30),R=r(12);var P=Object(c.createContext)({focusHistory:[]}),S=P.Provider,C=P.Consumer;S.displayName="FocusReturnProvider",C.displayName="FocusReturnConsumer",c.Component;var T=Object(O.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?u.stubTrue:o;return function(e){var t=function(t){Object(d.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(m.a)(r);if(n){var o=Object(m.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(b.a)(this,e)});function a(){var e;return Object(f.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(k.a)(u.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(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)(C,null,(function(r){return Object(c.createElement)(t,{childProps:e,focus:r})}))}}}),"withFocusReturn");var N=Object(O.createHigherOrderComponent)((function(e){return function(t){Object(d.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(m.a)(r);if(n){var o=Object(m.a)(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return Object(b.a)(this,e)});function i(){var e;return Object(f.a)(this,i),(e=o.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(R.a)(e)),e}return Object(p.a)(i,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===g.TAB){var t=v.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"),D=r(89);var M=function(e){Object(d.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(m.a)(t);if(r){var o=Object(m.a)(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return Object(b.a)(this,e)});function o(){return Object(f.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),A=Object(D.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 r,n=Object(m.a)(e);if(t){var o=Object(m.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(b.a)(this,r)}}var L=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 u(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 s(){0===i&&u(!0),++i}function l(){1===i&&u(!1),--i}return function(e){Object(d.a)(r,e);var t=B(r);function r(){return Object(f.a)(this,r),t.apply(this,arguments)}return Object(p.a)(r,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),r}(c.Component)}();function F(e){e.stopPropagation()}var I=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:F}),r)})),z=r(48);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 fe=function(e){var t=e.headerTitle,r=e.onClose,i=e.onKeyDown,u=e.children,s=e.className,f=e.noArrow,p=void 0===f||f,d=e.isAlternate,b=e.position,m=void 0===b?"bottom right":b,w=(e.range,e.focusOnMount),j=void 0===w?"firstElement":w,k=e.anchorRef,R=e.shouldAnchorIncludePadding,P=e.anchorRect,S=e.getAnchorRect,C=e.expandOnMobile,T=e.animate,N=void 0===T||T,D=e.onClickOutside,M=e.onFocusOutside,B=e.__unstableSticky,F=e.__unstableSlotName,z=void 0===F?"Popover":F,U=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"]),V=Object(c.useRef)(null),Y=Object(c.useRef)(null),G=Object(c.useRef)(),Q=Object(O.useViewportMatch)("medium","<"),K=Object(c.useState)(),J=Object(h.a)(K,2),X=J[0],$=J[1],Z=W(z),ee=C&&Q,re=Object(O.useResizeObserver)(),ne=Object(h.a)(re,2),oe=ne[0],fe=ne[1];p=ee||p,Object(c.useLayoutEffect)((function(){if(ee)return le(G.current,"is-without-arrow",p),le(G.current,"is-alternate",d),ue(G.current,"data-x-axis"),ue(G.current,"data-y-axis"),se(G.current,"top"),se(G.current,"left"),se(Y.current,"maxHeight"),void se(Y.current,"maxWidth");var e=function(){if(G.current&&Y.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(v.getRectangleFromRange)(n);if(n instanceof window.Element){var c=n.getBoundingClientRect();return o?c:ae(c,n)}var i=n.top,a=n.bottom,u=i.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:ae(l,n)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:ae(p,f)}}(V,P,S,k,R);if(e){var t,r,n=G.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=G.current.closest(".popover-slot"))||void 0===r?void 0:r.parentNode);var u=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(" "),u=Object(h.a)(a,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=x(e,t,s,p,n,o,c),b=_(e,t,f,p,n,d.yAxis,i);return E(E({},b),d)}(e,fe.height?fe:Y.current.getBoundingClientRect(),m,B,G.current,i,t),s=u.popoverTop,l=u.popoverLeft,f=u.xAxis,b=u.yAxis,g=u.contentHeight,O=u.contentWidth;"number"==typeof s&&"number"==typeof l&&(se(G.current,"top",s+"px"),se(G.current,"left",l+"px")),le(G.current,"is-without-arrow",p||"center"===f&&"middle"===b),le(G.current,"is-alternate",d),ue(G.current,"data-x-axis",f),ue(G.current,"data-y-axis",b),se(Y.current,"maxHeight","number"==typeof g?g+"px":""),se(Y.current,"maxWidth","number"==typeof O?O+"px":""),$(({left:"right",right:"left"}[f]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"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,P,S,k,R,m,fe,B,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=v.focus.tabbable.find(t.current)[0];r?r.focus():t.current.focus()}}),0);return function(){return clearTimeout(r)}}),[])}(j,Y);var pe=function(e){e.keyCode===g.ESCAPE&&r&&(e.stopPropagation(),r()),i&&i(e)},de=Object(c.createElement)(A,{onFocusOutside:function(e){if(M)M(e);else if(D){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"}),D(t)}else r&&r()}},Object(c.createElement)(ce,{type:N&&X?"appear":null,options:{origin:X}},(function(e){var o=e.className;return Object(c.createElement)(I,Object(n.a)({className:a()("components-popover",s,o,{"is-expanded":ee,"is-without-arrow":p,"is-alternate":d})},q,{onKeyDown:pe,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)(ge,{className:"components-popover__close",icon:y.a,onClick:r})),Object(c.createElement)("div",{ref:Y,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},oe,u)))})));return j&&(de=Object(c.createElement)(ie,null,de)),Z.ref&&(de=Object(c.createElement)(te,{name:z},de)),k||P?de:Object(c.createElement)("span",{ref:V},de)};fe.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=fe,de=function(e){var t,r,n=e.shortcut,o=e.className;return n?(Object(u.isString)(n)&&(t=n),Object(u.isObject)(n)&&(t=n.display,r=n.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":r},t)):null};var be=function(e){Object(d.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(m.a)(t);if(r){var o=Object(m.a)(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return Object(b.a)(this,e)});function o(){var e;return Object(f.a)(this,o),(e=n.apply(this,arguments)).delayedSetIsOver=Object(u.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(u.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)(de,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(c.Component),me=r(86);function he(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}}}}(ve);try{for(A.s();!(M=A.n()).done;)S[M.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){A.e(e)}finally{A.f()}}var B=!T&&(E&&k||x||!!k&&(!R||Object(u.isArray)(R)&&!R.length)&&!1!==E),L=Object(c.createElement)(N,Object(n.a)({},D,S,{className:C,"aria-label":S["aria-label"]||k,ref:t}),w&&Object(c.createElement)(me.a,{icon:w,size:j}),R);return B?Object(c.createElement)(be,{text:k,shortcut:x,position:_},L):L}))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(4),o=r.n(n),c=r(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){t((function(){throw e}))}),[])}},function(e,t){e.exports=window.wc.wcBlocksSharedContext},,function(e,t,r){"use strict";var n=r(22),o=r(13),c=r(18),i=r(0),a=r(44),u=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 s(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;t2&&void 0!==arguments[2]?arguments[2]:"",n=r&&void 0!==b[r]?b[r]:{};return e.map((function(e){var r=a.defaultAddressFields[e]||{},o=n[e]||{},c=t[e]||{};return f(f(f({key:e},r),o),c)})).sort((function(e,t){return e.index-t.index}))}},function(e,t,r){"use strict";function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";var n=r(13),o=r(14),c=r(15),i=r(12),a=r(16),u=r(17),s=r(10),l=r(0),f=r(6),p=r(25);var d=["button","submit"];t.a=Object(p.createHigherOrderComponent)((function(e){return function(t){Object(a.a)(m,t);var r,p,b=(r=m,p=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(s.a)(r);if(p){var n=Object(s.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(u.a)(this,e)});function m(){var e;return Object(o.a)(this,m),(e=b.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(c.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,r=e.target;Object(f.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(f.includes)(d,e.type)}return!1}(r)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(l.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(l.createElement)(e,Object(n.a)({ref:this.bindNode},this.props)))}}]),m}(l.Component)}),"withFocusOutside")},,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return b}));var n=r(20),o=r.n(n),c=r(5),i=r.n(c),a=r(0),u=r(46);function s(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;t0&&Array.prototype.filter.call(a,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),p({Block:r,containers:a,getProps:n,getErrorBoundaryProps:o}),Array.prototype.forEach.call(u,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,c,i,a;n=(r=l(l({},e),{},{wrapper:t})).Block,o=r.getProps,c=r.getErrorBoundaryProps,i=r.selector,a=r.wrapper.querySelectorAll(i),p({Block:n,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){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 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 r=1;r0&&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]:{};b(e,t,O(O({},r),{},{context:r.context||p})),E("store-notice-create",{status:e,content:t,options:r})}),[b,E,p]),k=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;m(e,t)}),[m,p]),R={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(p)}}),[p]).notices,createNotice:x,removeNotice:k,context:p,setIsSuppressed:j},P=w?null:React.createElement(v,{className:n,notices:R.notices,removeNotice:R.removeNotice,isEditor:_});return React.createElement(y.Provider,{value:R},c&&P,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(4),o=r.n(n),c=function(e){return e.reduce((function(e,t){var r=o()(t,2),n=r[0],c=r[1];return e[n]=c,e}),{})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(9),o=r(11),c=r(0),i=r(45),a=r(83),u=function(e){var t=e.namespace,r=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,f=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(c.useRef)({results:[],isLoading:!0}),m=Object(i.a)(f),h=Object(i.a)(s),v=Object(a.a)(),g=Object(o.useSelect)((function(e){if(!d)return null;var o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,m,h],i=o.getCollectionError.apply(o,c);return i&&v(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,r,h,m,d]);return null!==g&&(b.current=g),b.current}},,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 u})),r.d(t,"i",(function(){return s})),r.d(t,"d",(function(){return l})),r.d(t,"f",(function(){return f})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return d})),r.d(t,"e",(function(){return b})),r.d(t,"g",(function(){return m})),r.d(t,"a",(function(){return h})),r.d(t,"h",(function(){return v})),r.d(t,"b",(function(){return g}));var n,o=r(2),c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=c.pluginUrl+"images/",a=c.pluginUrl+"build/",u=c.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),f=o.STORE_PAGES.privacy.permalink,p=(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),b=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",{}),v=Object(o.getSetting)("shippingStates",{}),g=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 c})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return a}));var n,o=window.CustomEvent||null,c=function(e,t){var r=t.bubbles,n=void 0!==r&&r,c=t.cancelable,i=void 0!==c&&c,a=t.element,u=t.detail,s=void 0===u?{}:u;if(o){a||(a=document.body);var l=new o(e,{bubbles:n,cancelable:i,detail:s});a.dispatchEvent(l)}},i=function(){n&&clearTimeout(n),n=setTimeout((function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})}),50)},a=function(e,t){var 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 function(){};var o=function(){c(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},function(e,t,r){"use strict";var n=r(0),o=r(44),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){"use strict";var n=r(20),o=r.n(n),c=r(0),i=(r(129),function(e){if(e){var t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()}});t.a=function(e){return function(t){var r=Object(c.useRef)(null);return React.createElement(React.Fragment,null,React.createElement("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),React.createElement(e,o()({},t,{scrollToTop:function(e){var t,n;null!==r.current&&(t=r.current,n=(e||{}).focusableSelector,window&&Number.isFinite(window.innerHeight)&&(n?function(e,t){var r,n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){var o=n[0];i(o),null==o||o.focus()}else i(e)}(t,n):i(t)))}})))}}},,,,,function(e,t){e.exports=window.wp.wordcount},,,,,,function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(26),i=r.n(c),a=r(0),u=["srcElement","size"];function s(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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,u);return Object(a.isValidElement)(t)?Object(a.cloneElement)(t,function(e){for(var t=1;t3),d=r&&Boolean(s=i},React.createElement(R.a,{label:"→",screenReaderLabel:Object(E.__)("Next page","woo-gutenberg-products-block")})))});P.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var S=P,C=r(96),T=r(75),N=r(102),D=r(9),M=r(11),A=r(45);function B(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;t0&&(f=e(t,r,l.children,o));var p=c[u];if(!p)return null;var d=r.id||0,b=["layout",u,i,o,d];return React.createElement(g.Suspense,{key:b.join("_"),fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(p,$()({},l,{children:f,product:r})))}))}}(a,t,o,n))})),te=(r(226),["order","orderby","page","per_page"]);function re(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 ne(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},o=n.totalQuery;return!Object(_.isEqual)(t,o)&&Number.isFinite(r)},ce=Object(I.a)((function(e){var t,r=e.attributes,n=e.currentPage,o=e.onPageChange,c=e.onSortChange,i=e.sortValue,a=e.scrollToTop,u=Object(T.b)("attributes",[]),s=v()(u,2),l=s[0],f=s[1],p=Object(T.b)("stock_status",[]),d=v()(p,2),b=d[0],m=d[1],h=Object(T.b)("min_price"),O=v()(h,2),w=O[0],j=O[1],x=Object(T.b)("max_price"),R=v()(x,2),P=R[0],B=R[1],I=Object(T.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,o=n.columns,c=n.rows;return ne(ne({},function(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:r})}({attributes:r,sortValue:i,currentPage:n})),H=v()(I,1)[0],W=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(N.a)(L(L({},t),{},{query:e})),n=r.results,o=r.isLoading,c=function(e,t){var r=t.namespace,n=t.resourceName,o=t.resourceValues,c=void 0===o?[]:o,i=t.query,a=void 0===i?{}:i;if(!r||!n)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var u=Object(A.a)(a),s=Object(A.a)(c),l=Object(M.useSelect)((function(e){var t=e(D.COLLECTIONS_STORE_KEY),o=["x-wp-total",r,n,u,s];return{value:t.getCollectionHeader.apply(t,o),isLoading:t.hasFinishedResolution("getCollectionHeader",o)}}),["x-wp-total",r,n,s,u]),f=l.value,p=l.isLoading;return{value:f,isLoading:void 0===p||p}}(0,L(L({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(c,10),productsLoading:o}}(H),q=W.products,Y=W.totalProducts,Q=W.productsLoading,J=Object(z.useInnerBlockLayoutContext)(),X=J.parentClassName,$=J.parentName,Z=((t=H).order,t.orderby,t.page,t.per_page,y()(t,te)||{}),re=Object(F.a)().dispatchStoreEvent,ce=Object(C.a)({totalQuery:Z,totalProducts:Y},oe);Object(g.useEffect)((function(){re("product-list-render",{products:q,listName:$})}),[q,$,re]),Object(g.useEffect)((function(){Object(_.isEqual)(Z,null==ce?void 0:ce.totalQuery)||(o(1),null!=ce&&ce.totalQuery&&function(e){Number.isFinite(e)&&(0===e?Object(U.speak)(Object(E.__)("No products found","woo-gutenberg-products-block")):Object(U.speak)(Object(E.sprintf)(
+/* translators: %s is an integer higher than 0 (1, 2, 3...) */
+Object(E._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(Y))}),[null==ce?void 0:ce.totalQuery,Y,o,Z]);var ie,ae,ue,se,le,fe=r.contentVisibility,pe=r.columns*r.rows,de=!Number.isFinite(Y)&&Number.isFinite(null==ce?void 0:ce.totalProducts)&&Object(_.isEqual)(Z,null==ce?void 0:ce.totalQuery)?Math.ceil(ce.totalProducts/pe):Math.ceil(Y/pe),be=q.length?q:Array.from({length:pe}),me=0!==q.length||Q,he=l.length>0||b.length>0||Number.isFinite(w)||Number.isFinite(P);return React.createElement("div",{className:(ie=r.columns,ae=r.rows,ue=r.alignButtons,se=r.align,le=void 0!==se?"align"+se:"",k()(X,le,"has-"+ie+"-columns",{"has-multiple-rows":ae>1,"has-aligned-buttons":ue}))},fe.orderBy&&me&&React.createElement(K,{onChange:c,value:i}),!me&&he&&React.createElement(G,{resetCallback:function(){f([]),m([]),j(null),B(null)}}),!me&&!he&&React.createElement(V,null),me&&React.createElement("ul",{className:"".concat(X,"__products")},be.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return React.createElement(ee,{key:e.id||t,attributes:r,product:e})}))),de>1&&React.createElement(S,{currentPage:n,onPageChange:function(e){a({focusableSelector:"a, button"}),o(e)},totalPages:de}))})),ie=function(e){var t=e.attributes,r=Object(g.useState)(1),n=v()(r,2),o=n[0],c=n[1],i=Object(g.useState)(t.orderby),a=v()(i,2),u=a[0],s=a[1];return Object(g.useEffect)((function(){s(t.orderby)}),[t.orderby]),React.createElement(ce,{attributes:t,currentPage:o,onPageChange:function(e){c(e)},onSortChange:function(e){var t=e.target.value;s(t),c(1)},sortValue:u})},ae=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},React.createElement("title",null,"Grid Block Preview"),React.createElement("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),React.createElement("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),React.createElement("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),React.createElement("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),React.createElement("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),React.createElement("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),React.createElement("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),React.createElement("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),React.createElement("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),React.createElement("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),React.createElement("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),React.createElement("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),React.createElement("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}));var ue=function(e){l()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=b()(t);if(r){var o=b()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return p()(this,e)});function o(){return i()(this,o),n.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?ae:React.createElement(z.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},React.createElement(ie,{attributes:t,urlParameterSuffix:r}))}}]),o}(m.Component);Object(o.b)({selector:".wp-block-woocommerce-all-products",Block:function(e){return React.createElement(n.a,{context:"wc/all-products"},React.createElement(ue,e))},getProps:function(e){return{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..affeeeae148
--- /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' => 'f37c0c254c412dc3a63dbbbcedf73a19');
\ No newline at end of file
diff --git a/build/all-products.js b/build/all-products.js
new file mode 100644
index 00000000000..0ae1995ea19
--- /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 n,a,i=t[0],s=t[1],u=t[2],b=0,p=[];b2)return Object(n.registerBlockType)(e,t)},a=function(e,t){if(c.n>1)return Object(n.registerBlockType)(e,t)},i=function(){return c.n>2},s=function(){return c.n>1}},114:function(e,t){},115:function(e,t){e.exports=window.wp.coreData},116:function(e,t){},117: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 a}));var n=function(e){return"number"==typeof e},c=function(e){return"string"==typeof e},o=function(e){return!function(e){return 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.blockEditor},120:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(21),a=r.n(o),i=r(0),s=r(46),u=r(3),l=r(6),b=r.n(l),p=["className","item","isSelected","isLoading","onSelect","disabled"];t.a=function(e){var t=e.className,r=e.item,n=e.isSelected,o=e.isLoading,l=e.onSelect,d=e.disabled,f=a()(e,p);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(s.c,c()({},f,{key:r.id,className:t,isSelected:n,item:r,onSelect:l,isSingle:!0,disabled:d})),n&&o&&Object(i.createElement)("div",{key:"loading",className:b()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(i.createElement)(u.Spinner,null)))}},121:function(e,t,r){"use strict";var n=r(16),c=r.n(n),o=r(17),a=r.n(o),i=r(18),s=r.n(i),u=r(19),l=r.n(u),b=r(9),p=r.n(b),d=r(0),f=r(7),m=r(1),O=r(3);function g(e){var t=e.level,r={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 r.hasOwnProperty(t)?Object(d.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(O.Path,{d:r[t]})):null}var j=function(e){s()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=p()(t);if(r){var c=p()(this).constructor;e=Reflect.construct(n,arguments,c)}else e=n.apply(this,arguments);return l()(this,e)});function o(){return c()(this,o),n.apply(this,arguments)}return a()(o,[{key:"createLevelControl",value:function(e,t,r){var n=e===t;return{icon:Object(d.createElement)(g,{level:e}),title:Object(m.sprintf)(
+/* translators: %s: heading level e.g: "2", "3", "4" */
+Object(m.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:n,onClick:function(){return r(e)}}}},{key:"render",value:function(){var e=this,t=this.props,r=t.isCollapsed,n=void 0===r||r,c=t.minLevel,o=t.maxLevel,a=t.selectedLevel,i=t.onChange;return Object(d.createElement)(O.ToolbarGroup,{isCollapsed:n,icon:Object(d.createElement)(g,{level:a}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),o}(d.Component);t.a=j},126:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(61),a=r(162),i=r(4),s=r(12),u=r(41);t.a=function(e){var t=(Object(u.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(n.createElement)("a",{href:"".concat(i.ADMIN_URL,"post.php?post=").concat(t,"&action=edit"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Edit this product's details","woo-gutenberg-products-block"),Object(n.createElement)(o.a,{srcElement:a.a,size:16}))),Object(n.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}},127:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(8),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return Object(o.useCallback)((function(e){t((function(){throw e}))}),[])}},133:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(8),a=r.n(o),i=r(4),s=r(1),u=r(117);function l(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 b(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"",n=r&&void 0!==f[r]?f[r]:{};return e.map((function(e){var r=i.defaultAddressFields[e]||{},c=n[e]||{},o=t[e]||{};return b(b(b({key:e},r),c),o)})).sort((function(e,t){return e.index-t.index}))}},134:function(e,t,r){"use strict";var n=r(0);r(223),t.a=function(){return Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}},135:function(e,t){e.exports=window.wp.wordcount},136:function(e,t,r){"use strict";var n=r(34),c=r.n(n),o=r(5),a=r.n(o),i=r(10),s=r.n(i),u=r(0),l=r(1),b=r(7),p=(r(2),r(46)),d=r(20),f=r(16),m=r.n(f),O=r(17),g=r.n(O),j=r(18),h=r.n(j),v=r(19),w=r.n(v),y=r(9),E=r.n(y);var _=Object(d.createHigherOrderComponent)((function(e){var t=function(t){h()(o,t);var r,n,c=(r=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,t=E()(r);if(n){var c=E()(this).constructor;e=Reflect.construct(t,arguments,c)}else e=t.apply(this,arguments);return w()(this,e)});function o(){return m()(this,o),c.apply(this,arguments)}return g()(o,[{key:"render",value:function(){var t=this.props.selected,r=null==t;return Object(u.createElement)(e,s()({},this.props,{selected:r?[]:[t]}))}}]),o}(u.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),k=r(272),P=r(29),C=r.n(P),S=r(13),x=r.n(S),N=r(22),D=r.n(N),T=r(36),B=r.n(T),R=r(39),A=r(40);function L(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 I(e){for(var t=1;t0,"is-skip-level":0===o&&0!==t.parent,"is-variable":f>0});if(!t.breadcrumbs.length)return Object(u.createElement)(H.a,s()({},e,{className:F()(m,{"is-selected":i}),isSelected:i,item:t,onSelect:function(){return function(){d(t)()}},isLoading:a||h,countLabel:t.variations.length>0?Object(l.sprintf)(
+/* translators: %1$d is the number of variations of a product product. */
+Object(l.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-".concat(n),"aria-label":Object(l.sprintf)(
+/* translators: %1$s is the product name, %2$d is the number of variations of that product. */
+Object(l._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)}));var O=Object(b.isEmpty)(t.variation)?e:G(G({},e),{},{item:G(G({},e.item),{},{name:t.variation}),"aria-label":"".concat(t.breadcrumbs[0],": ").concat(t.variation)});return Object(u.createElement)(p.c,s()({},O,{className:m,name:"variations-".concat(n)}))}:null),onSearch:d,messages:Q,isHierarchical:!0})};Y.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=_(Object(k.a)(V(Object(d.withInstanceId)(Y))))},137:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.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=o},139:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(6)),o=r.n(c),a=r(42),i=r(20);r(193),t.a=Object(i.withInstanceId)((function(e){var t=e.className,r=e.instanceId,c=e.label,i=e.onChange,s=e.options,u=e.screenReaderLabel,l=e.readOnly,b=e.value,p="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(a.a,{label:c,screenReaderLabel:u,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),Object(n.createElement)("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:i,readOnly:l,value:b},s.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},14:function(e,t){e.exports=window.wp.data},140:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(1),i=r(59),s=r(6),u=r.n(s),l=(r(2),r(50)),b=(r(220),function(e){var t=e.currency,r=e.maxPrice,n=e.minPrice,c=e.priceClassName,s=e.priceStyle;return Object(o.createElement)(o.Fragment,null,Object(o.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)(n),Object(l.formatPrice)(r))),Object(o.createElement)("span",{"aria-hidden":!0},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",c),currency:t,value:n,style:s})," — ",Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",c),currency:t,value:r,style:s})))}),p=function(e){var t=e.currency,r=e.regularPriceClassName,n=e.regularPriceStyle,c=e.regularPrice,s=e.priceClassName,l=e.priceStyle,b=e.price;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:t,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",r),style:n},e)},value:c}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:t,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",s),style:l},e)},value:b}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.format,s=void 0===a?"":a,l=e.maxPrice,d=void 0===l?null:l,f=e.minPrice,m=void 0===f?null:f,O=e.price,g=void 0===O?null:O,j=e.priceClassName,h=e.priceStyle,v=e.regularPrice,w=e.regularPriceClassName,y=e.regularPriceStyle,E=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));s.includes("")||(s="",console.error("Price formats need to include the `` tag."));var _=v&&g!==v,k=Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",j)});return _?k=Object(o.createElement)(p,{currency:n,price:g,priceClassName:j,priceStyle:h,regularPrice:v,regularPriceClassName:w,regularPriceStyle:y}):null!==m&&null!==d?k=Object(o.createElement)(b,{currency:n,maxPrice:d,minPrice:m,priceClassName:j,priceStyle:h}):null!==g&&(k=Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",j),currency:n,value:g,style:h})),Object(o.createElement)("span",{className:E},Object(o.createInterpolateElement)(s,{price:k}))}},142:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return b}));var n,c=r(5),o=r.n(c),a=r(7);function i(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 s(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(a.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e}}},l={},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,r=t.type,c=t.eventType,a=t.id,i=t.callback,u=t.priority,b=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(r){case n.ADD_EVENT_CALLBACK:return b.set(a,{priority:u,callback:i}),s(s({},e),{},o()({},c,b));case n.REMOVE_EVENT_CALLBACK:return b.delete(a),s(s({},e),{},o()({},c,b))}}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(11);function c(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}},148:function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return v}));var n=r(43),c=r.n(n),o=r(5),a=r.n(o),i=r(21),s=r.n(i),u=r(8),l=r.n(u),b=r(0),p=r(7),d=r(36),f=r.n(d);function m(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 O(e){for(var t=1;t0,getValidationErrorId:u};return Object(b.createElement)(j.Provider,{value:w},t)}},149:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(25),c=r(14),o=r(0),a=r(58),i=r(127),s=function(e){var t=e.namespace,r=e.resourceName,s=e.resourceValues,u=void 0===s?[]:s,l=e.query,b=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var f=Object(o.useRef)({results:[],isLoading:!0}),m=Object(a.a)(b),O=Object(a.a)(u),g=Object(i.a)(),j=Object(c.useSelect)((function(e){if(!d)return null;var c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,m,O],a=c.getCollectionError.apply(c,o);return a&&g(a),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,r,O,m,d]);return null!==j&&(f.current=j),f.current}},15:function(e,t){e.exports=window.wp.apiFetch},162:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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=o},172:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),c=Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(n.createElement)("title",null,"Grid Block Preview"),Object(n.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(n.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(n.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(n.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(n.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(n.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(n.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(n.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(n.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(n.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(n.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(n.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(n.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},173:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(21),a=r.n(o),i=r(0),s=r(26),u=r(6),l=r.n(u),b=(r(219),["className","disabled","name","permalink","rel","style","onClick"]);t.a=function(e){var t=e.className,r=void 0===t?"":t,n=e.disabled,o=void 0!==n&&n,u=e.name,p=e.permalink,d=void 0===p?"":p,f=e.rel,m=e.style,O=(e.onClick,a()(e,b)),g=l()("wc-block-components-product-name",r);if(o){var j=O;return Object(i.createElement)("span",c()({className:g},j,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(u)}}))}return Object(i.createElement)("a",c()({className:g,href:d,rel:f},O,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(u)},style:m}))}},174:function(e,t,r){"use strict";r.d(t,"b",(function(){return w})),r.d(t,"a",(function(){return y}));var n=r(5),c=r.n(n),o=r(8),a=r.n(o),i=r(0),s=(r(2),r(14)),u=r(78),l=r(76),b=r(10),p=r.n(b),d=r(6),f=r.n(d),m=r(887),O=(r(221),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""}),g=function(e){var t=e.className,r=e.notices,n=e.removeNotice,c=r.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var o=f()(t,"wc-block-components-notices");return Object(i.createElement)("div",{className:o},c.map((function(e){return Object(i.createElement)(m.a,p()({key:"store-notice-"+e.id},e,{className:f()("wc-block-components-notices__notice",O(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))};function j(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;t0&&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]:{};f(e,t,h(h({},r),{},{context:r.context||p})),E("store-notice-create",{status:e,content:t,options:r})}),[f,E,p]),P=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;m(e,t)}),[m,p]),C={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(p)}}),[p]).notices,createNotice:k,removeNotice:P,context:p,setIsSuppressed:y},S=w?null:Object(i.createElement)(g,{className:n,notices:C.notices,removeNotice:C.removeNotice,isEditor:_});return Object(i.createElement)(v.Provider,{value:C},o&&S,t)}},175:function(e,t,r){"use strict";var n=r(0),c=r(135),o=r(105),a=function(e){var t=e.indexOf("
");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",n=i(e),c=n.split(" ").splice(0,t).join(" ");return Object(o.autop)(s(c,r))},l=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=i(e),a=c.slice(0,t);if(r)return Object(o.autop)(s(a,n));var u=a.match(/([\s]+)/g),l=u?u.length:0,b=c.slice(0,t+l);return Object(o.autop)(s(b,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,s=e.countType,b=void 0===s?"words":s,p=e.className,d=void 0===p?"":p,f=Object(n.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",n=Object(o.autop)(e),i=Object(c.count)(n,r);if(i<=t)return n;var s=a(n),b=Object(c.count)(s,r);return b<=t?s:"words"===r?u(s,t):l(s,t,"characters_including_spaces"===r)}(t,i,b)}),[t,i,b]);return Object(n.createElement)(n.RawHTML,{className:d},f)}},186:function(e,t){},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.compose},211:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(8),c=r.n(n),o=function(e){return e.reduce((function(e,t){var r=c()(t,2),n=r[0],o=r[1];return e[n]=o,e}),{})}},219:function(e,t){},22:function(e,t){e.exports=window.regeneratorRuntime},220:function(e,t){},221:function(e,t){},222:function(e,t){},223:function(e,t){},224:function(e,t){},23:function(e,t){e.exports=window.wp.url},24:function(e,t){e.exports=window.wp.blocks},25:function(e,t){e.exports=window.wc.wcBlocksData},26:function(e,t){e.exports=window.wp.htmlEntities},27:function(e,t){e.exports=window.wp.primitives},272:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(29),a=r.n(o),i=r(8),s=r.n(i),u=r(21),l=r.n(u),b=r(0),p=r(22),d=r.n(p),f=r(37),m=r(39),O=r(201),g=r(40),j=["selected"];t.a=function(e){return function(t){var r=t.selected,n=l()(t,j),o=Object(b.useState)(!0),i=s()(o,2),u=i[0],p=i[1],h=Object(b.useState)(null),v=s()(h,2),w=v[0],y=v[1],E=Object(b.useState)([]),_=s()(E,2),k=_[0],P=_[1],C=f.o.productCount>100,S=function(){var e=a()(d.a.mark((function e(t){var r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(g.a)(t);case 2:r=e.sent,y(r),p(!1);case 5:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}();Object(b.useEffect)((function(){Object(m.h)({selected:r}).then((function(e){P(e),p(!1)})).catch(S)}),[r]);var x=Object(O.a)((function(e){Object(m.h)({selected:r,search:e}).then((function(e){P(e),p(!1)})).catch(S)}),400),N=s()(x,1)[0],D=Object(b.useCallback)((function(e){p(!0),N(e)}),[p,N]);return Object(b.createElement)(e,c()({},n,{selected:r,error:w,products:k,isLoading:u,onSearch:C?D:null}))}}},273:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(6),s=r.n(i),u=r(42),l=r(41),b=r(81);r(540),t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=Object(l.useProductDataContext)().product;if(!i.id||!i.on_sale)return null;var b="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(o.createElement)("div",{className:s()("wc-block-components-product-sale-badge",t,b,c()({},"".concat(n,"__product-onsale"),n))},Object(o.createElement)(u.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},275:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=(r(2),r(148)),o=(r(224),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,i=e.elementId,s=void 0===i?"":i,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r||"string"!=typeof r){var p=l(a)||{};if(!p.message||p.hidden)return null;r=p.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(s)},r))})},28:function(e,t){e.exports=window.moment},3:function(e,t){e.exports=window.wp.components},327:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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:"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},328:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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"}));t.a=o},35:function(e,t){e.exports=window.wp.dataControls},36:function(e,t){e.exports=window.wp.isShallowEqual},365:function(e,t){},366:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(113);function a(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 i(e){for(var t=1;t2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var c=function(){o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},369:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return s}));var n=r(4),c=r(133),o=r(23),a=function(e){var t=e.country,r=void 0===t?"":t,n=e.state,c=void 0===n?"":n,o=e.city,a=void 0===o?"":o,i=e.postcode,s=void 0===i?"":i;return{country:r.trim(),state:c.trim(),city:a.trim(),postcode:s?s.replace(" ","").toUpperCase():""}},i=function(e){var t=e.email,r=void 0===t?"":t;return Object(o.isEmail)(r)?r.trim():""},s=function(e){var t=Object.keys(n.defaultAddressFields),r=Object(c.a)(t,{},e.country),o=Object.assign({},e);return r.forEach((function(t){var r=t.key,n=void 0===r?"":r,c=t.hidden;void 0!==c&&c&&function(e,t){return e in t}(n,e)&&(o[n]="")})),o}},37:function(e,t,r){"use strict";r.d(t,"o",(function(){return o})),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 u})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return b})),r.d(t,"g",(function(){return p})),r.d(t,"k",(function(){return d})),r.d(t,"c",(function(){return f})),r.d(t,"d",(function(){return m})),r.d(t,"h",(function(){return O})),r.d(t,"a",(function(){return g})),r.d(t,"i",(function(){return j})),r.d(t,"b",(function(){return h}));var n,c=r(4),o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=o.pluginUrl+"images/",i=o.pluginUrl+"build/",s=o.buildPhase,u=null===(n=c.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=c.STORE_PAGES.checkout.id,b=c.STORE_PAGES.checkout.permalink,p=c.STORE_PAGES.privacy.permalink,d=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),f=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),m=c.STORE_PAGES.cart.permalink,O=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),g=Object(c.getSetting)("allowedCountries",{}),j=Object(c.getSetting)("shippingStates",{}),h=Object(c.getSetting)("allowedStates",{})},370:function(e,t,r){"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}}},371:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(5),a=r.n(o),i=r(8),s=r.n(i),u=r(0),l=(r(2),r(1)),b=r(6),p=r.n(b),d=r(4),f=r(41),m=r(81),O=r(78),g=r(273);function j(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;t1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},373:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},374:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(6)),o=r.n(c),a=r(8),i=r.n(a),s=r(1),u=r(58),l=r(878),b={status:"pristine",hasError:!1,quantity:1,processingResponse:null,requestParams:{}},p=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"set_has_error":"set_no_error";return{type:t}},d=r(5),f=r.n(d);function m(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 O(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:b,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case"set_pristine":e=b;break;case"set_idle":e=t.status!==g?O(O({},t),{},{status:g}):t;break;case"set_disabled":e="disabled"!==t.status?O(O({},t),{},{status:"disabled"}):t;break;case"set_quantity":e=n!==t.quantity?O(O({},t),{},{quantity:n}):t;break;case"set_request_params":e=O(O({},t),{},{requestParams:O(O({},t.requestParams),o)});break;case"set_processing_response":e=O(O({},t),{},{processingResponse:o});break;case"set_processing":e=!1===(e="processing"!==t.status?O(O({},t),{},{status:"processing",hasError:!1}):t).hasError?e:O(O({},e),{},{hasError:!1});break;case"set_before_processing":e="before_processing"!==t.status?O(O({},t),{},{status:"before_processing",hasError:!1}):t;break;case"set_after_processing":e="after_processing"!==t.status?O(O({},t),{},{status:"after_processing"}):t;break;case"set_has_error":e=t.hasError?t:O(O({},t),{},{hasError:!0}),e="processing"===t.status||"before_processing"===t.status?O(O({},e),{},{status:g}):e;break;case"set_no_error":e=t.hasError?O(O({},t),{},{hasError:!1}):t}return e!==t&&"set_pristine"!==c&&"pristine"===e.status&&(e.status=g),e},h=r(142),v=r(372),w=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(v.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(v.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(v.a)("add_to_cart_before_processing",e)}},y=r(375),E=r(148),_=r(67),k=r(64),P=Object(n.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:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),C=function(){return Object(n.useContext)(P)},S=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(j,b),a=i()(o,2),d=a[0],f=a[1],m=Object(n.useReducer)(h.b,{}),O=i()(m,2),g=O[0],v=O[1],C=Object(u.a)(g),S=Object(_.a)(),x=S.addErrorNotice,N=S.removeNotices,D=Object(E.b)().setValidationErrors,T=Object(k.c)(),B=T.isSuccessResponse,R=T.isErrorResponse,A=T.isFailResponse,L=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:w(v).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:w(v).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:w(v).onAddToCartBeforeProcessing}}),[v]),I=Object(n.useMemo)((function(){return{resetForm:function(){f({type:"set_pristine"})},submitForm:function(){f({type:"set_before_processing"})},setQuantity:function(e){f(function(e){return{type:"set_quantity",quantity:e}}(e))},setHasError:function(e){f(p(e))},setRequestParams:function(e){f(function(e){return{type:"set_request_params",data:e}}(e))},setAfterProcessing:function(e){f({type:"set_processing_response",data:e}),f({type:"set_after_processing"})}}}),[]);Object(n.useEffect)((function(){var e=d.status,t=!r.id||!Object(l.a)(r);"disabled"!==e||t?"disabled"!==e&&t&&f({type:"set_disabled"}):f({type:"set_idle"})}),[d.status,r,f]),Object(n.useEffect)((function(){"before_processing"===d.status&&(N("error"),Object(y.a)(C,"add_to_cart_before_processing",{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&x(t),r&&D(r)})),f({type:"set_idle"})):f({type:"set_processing"})})))}),[d.status,D,x,N,f,C]),Object(n.useEffect)((function(){if("after_processing"===d.status){var e={processingResponse:d.processingResponse},t=function(e){var t=!1;return e.forEach((function(e){var r=e.message,n=e.messageContext;(R(e)||A(e))&&r&&(t=!0,x(r,n?{context:n}:void 0))})),t};if(d.hasError)return void Object(y.b)(C,"add_to_cart_after_processing_with_error",e).then((function(r){if(!t(r)){var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");x(c,{id:"add-to-cart"})}f({type:"set_idle"})}));Object(y.b)(C,"add_to_cart_after_processing_with_success",e).then((function(e){t(e)?f(p(!0)):f({type:"set_idle"})}))}}),[d.status,d.hasError,d.processingResponse,I,x,R,A,B,C]);var V=Object(l.b)(r),z={product:r,productType:r.type||"simple",productIsPurchasable:Object(l.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:V,showFormElements:c&&V,quantity:d.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:d.requestParams,isIdle:"idle"===d.status,isDisabled:"disabled"===d.status,isProcessing:"processing"===d.status,isBeforeProcessing:"before_processing"===d.status,isAfterProcessing:"after_processing"===d.status,hasError:d.hasError,eventRegistration:L,dispatchActions:I};return Object(n.createElement)(P.Provider,{value:z},t)},x=r(15),N=r.n(x),D=r(26),T=r(52);function B(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}var R=function(){var e=C(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,a=e.hasError,u=e.isProcessing,l=e.requestParams,b=Object(E.b)(),p=b.hasValidationErrors,d=b.showAllValidationErrors,m=Object(_.a)(),O=m.addErrorNotice,g=m.removeNotice,j=Object(T.a)().receiveCart,h=Object(n.useState)(!1),v=i()(h,2),w=v[0],y=v[1],k=!a&&u,P=Object(n.useCallback)((function(){return!p||(d(),{type:"error"})}),[p,d]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(P,0);return function(){e()}}),[o,P]);var S=Object(n.useCallback)((function(){y(!0),g("add-to-cart");var e=function(e){for(var t=1;t0?Object(s.sprintf)(
+/* translators: %s number of products in cart. */
+Object(s._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(s.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(M.a,{srcElement:F.a,alt:Object(s.__)("Done","woo-gutenberg-products-block")}))},Y=function(){var e=C(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,u=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,p=e.hasError,d=e.dispatchActions,f=Object(L.useInnerBlockLayoutContext)().parentName,m=Object(H.a)().dispatchStoreEvent,O=Object(q.a)(o.id||0).cartQuantity,g=Object(n.useState)(!1),j=i()(g,2),h=j[0],v=j[1],w=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return p||v(!0),!0}),0);return function(){e()}}),[b,p]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Q,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:O,isDisabled:u,isProcessing:l,isDone:h,onClick:function(){d.submitForm(),m("cart-add-item",{product:o,listName:f})}}):Object(n.createElement)(G,{className:"wc-block-components-product-add-to-cart-button",href:w.url,text:w.text||Object(s.__)("View Product","woo-gutenberg-products-block"),onClick:function(){m("product-view-link",{product:o,listName:f})}})},U=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},W=function(e){var t=e.reason,r=void 0===t?Object(s.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},K=function(){var e=C(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(W,null):t.id&&!t.is_in_stock?Object(n.createElement)(W,{reason:Object(s.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(U,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Y,null))},$=(r(549),r(34)),J=r.n($),X=r(895),Z=r(11),ee=r(275),te={value:"",label:Object(s.__)("Select an option","woo-gutenberg-products-block")},re=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,a=e.value,i=void 0===a?"":a,u=e.onChange,l=void 0===u?function(){}:u,b=e.errorMessage,p=void 0===b?Object(s.__)("Please select a value.","woo-gutenberg-products-block"):b,d=Object(E.b)(),m=d.getValidationError,O=d.setValidationErrors,g=d.clearValidationError,j=t,h=m(j)||{};return Object(Z.useEffect)((function(){i?g(j):O(f()({},j,{message:p,hidden:!0}))}),[i,j,p,g,O]),Object(Z.useEffect)((function(){return function(){g(j)}}),[j,g]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(X.a,{label:Object(D.decodeEntities)(t),value:i||"",options:[te].concat(J()(c)),onChange:l,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),Object(n.createElement)(ee.a,{propertyName:j,elementId:j}))},ne=r(117);function ce(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 oe(e){for(var t=1;t0;return c.forEach((function(c){var a=e[c],i=oe(oe({},r),{},f()({},c,null)),s=o?ae(e,t,i):null,u=null!==s?s.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(D.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n}(o,a,O)}),[O,o,a]);return Object(n.useEffect)((function(){if(!v){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(ne.b)(e))return{};var t=Object.keys(e),r={};return 0===t.length||t.forEach((function(t){var n,c=e[t],o=c.terms.filter((function(e){return e.default}));o.length>0&&(r[c.name]=null===(n=o[0])||void 0===n?void 0:n.slug)})),r}(t);e&&g(se({},e)),w(!0)}}),[O,t,v]),Object(n.useEffect)((function(){Object.values(O).filter((function(e){return""!==e})).length===Object.keys(o).length?p(function(e,t,r){return ae(e,t,r)[0]||0}(o,a,O)):b>0&&p(0)}),[O,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(O).map((function(e){return{attribute:e,value:O[e]}}))})}),[c,b,O]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(re,{key:e,attributeName:e,options:y[e],value:O[e],onChange:function(t){g(se(se({},O),{},f()({},e,t)))}})})))},le=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(I.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(ue,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},be=function(){var e=C(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(W,null):t.id&&!t.is_in_stock?Object(n.createElement)(W,{reason:Object(s.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(le,{product:t,dispatchers:a}),Object(n.createElement)(U,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Y,null))},pe=function(){return Object(n.createElement)(Y,null)},de=r(888),fe=function(){return Object(n.createElement)(de.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},me=function(){return Object(n.createElement)(fe,null)},Oe=function(){var e=C(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(be,null):"grouped"===r?Object(n.createElement)(me,null):"external"===r?Object(n.createElement)(pe,null):"simple"===r||"variation"===r?Object(n.createElement)(K,null):null:Object(n.createElement)(Y,null)};t.a=Object(V.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(L.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(I.isEmpty)(c)});return Object(n.createElement)(A,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(Oe,null)))}))},375:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return f}));var n=r(43),c=r.n(n),o=r(29),a=r.n(o),i=r(22),s=r.n(i),u=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},l=r(64);function b(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return p(e,void 0);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)?p(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}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 o,a=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r100,u={per_page:s?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},b=[Object(o.addQueryArgs)("/wc/store/products",p(p({},u),i))];return s&&r.length&&b.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),b}({selected:r,search:c,queryArgs:void 0===a?{}:a});return Promise.all(u.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return p(p({},e),{},{parent:0})}))})).catch((function(e){throw e}))},f=function(e){return i()({path:"/wc/store/products/".concat(e)})},m=function(){return i()({path:"wc/store/products/attributes"})},O=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},g=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=Object(u.getSetting)("limitTags",!1),a=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:n})];return c&&r.length&&a.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),a}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},j=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products/categories",p({per_page:0},e))})},h=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},v=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},w=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(29),c=r.n(n),o=r(22),a=r.n(o),i=r(1),s=function(){var e=c()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},41:function(e,t){e.exports=window.wc.wcBlocksSharedContext},42:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(6),i=r.n(a);function s(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 u(e){for(var t=1;t0?t:0});t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product,i=b(n);if(!i)return null;var l={width:i/5*100+"%"},p=Object(a.sprintf)(
+/* translators: %f is referring to the average rating value */
+Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),i);return Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-rating",c()({},"".concat(r,"__product-rating"),r))},Object(o.createElement)("div",{className:s()("wc-block-components-product-rating__stars","".concat(r,"__product-rating__stars")),role:"img","aria-label":p},Object(o.createElement)("span",{style:l},p)))}))},478:function(e,t,r){"use strict";r.r(t);var n=r(10),c=r.n(n),o=r(5),a=r.n(o),i=r(0),s=(r(2),r(6)),u=r.n(s),l=r(1),b=r(78),p=r(776),d=r(26),f=r(41),m=r(81),O=(r(543),function(e){var t=e.product,r=t.id,n=t.permalink,o=t.add_to_cart,a=t.has_options,s=t.is_purchasable,f=t.is_in_stock,m=Object(b.a)().dispatchStoreEvent,O=Object(p.a)(r),g=O.cartQuantity,j=O.addingToCart,h=O.addToCart,v=Number.isFinite(g)&&g>0,w=!a&&s&&f,y=Object(d.decodeEntities)((null==o?void 0:o.description)||""),E=v?Object(l.sprintf)(
+/* translators: %s number of products in cart. */
+Object(l._n)("%d in cart","%d in cart",g,"woo-gutenberg-products-block"),g):Object(d.decodeEntities)((null==o?void 0:o.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),_=w?"button":"a",k={};return w?k.onClick=function(){h(),m("cart-add-item",{product:t})}:(k.href=n,k.rel="nofollow",k.onClick=function(){m("product-view-link",{product:t})}),Object(i.createElement)(_,c()({"aria-label":y,className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:v}),disabled:j},k),E)}),g=function(){return Object(i.createElement)("button",{className:u()("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(m.withProductDataContext)((function(e){var t=e.className,r=Object(f.useInnerBlockLayoutContext)().parentClassName,n=Object(f.useProductDataContext)().product;return Object(i.createElement)("div",{className:u()(t,"wp-block-button","wc-block-components-product-button",a()({},"".concat(r,"__product-add-to-cart"),r))},n.id?Object(i.createElement)(O,{product:n}):Object(i.createElement)(g,null))}))},48:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(45));t.a=function(e){var t,r,a,i=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=i).message,a=t.type,r?"general"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},480:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(6)),i=r.n(a),s=r(175),u=r(37),l=r(41),b=r(81);r(544),t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product;if(!n)return Object(o.createElement)("div",{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r))});var a=n.short_description?n.short_description:n.description;return a?Object(o.createElement)(s.a,{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r)),source:a,maxLength:150,countType:u.o.wordCountType||"words"}):null}))},481:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(6)),s=r.n(i),u=r(41),l=r(81);r(545),t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product.sku;return n?Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-sku",c()({},"".concat(r,"__product-sku"),r))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,n)):null}))},482:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=r(6),s=r.n(i),u=r(41),l=r(7),b=r(81);r(546),t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-category-list",c()({},"".concat(r,"__product-category-list"),r))},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"category-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},483:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(6)),s=r.n(i),u=r(41),l=r(7),b=r(81);r(547),t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.tags)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-tag-list",c()({},"".concat(r,"__product-tag-list"),r))},Object(a.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.tags).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"tag-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},484:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(6)),s=r.n(i),u=r(41),l=r(81),b=(r(548),function(e){return Object(a.sprintf)(
+/* translators: %d stock amount (number of items in stock for product) */
+Object(a.__)("%d left in stock","woo-gutenberg-products-block"),e)});t.default=Object(l.withProductDataContext)((function(e){var t,r=e.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,i=Object(u.useProductDataContext)().product;if(!i.id||!i.is_purchasable)return null;var l=!!i.is_in_stock,p=i.low_stock_remaining,d=i.is_on_backorder;return Object(o.createElement)("div",{className:s()(r,"wc-block-components-product-stock-indicator",(t={},c()(t,"".concat(n,"__stock-indicator"),n),c()(t,"wc-block-components-product-stock-indicator--in-stock",l),c()(t,"wc-block-components-product-stock-indicator--out-of-stock",!l),c()(t,"wc-block-components-product-stock-indicator--low-stock",!!p),c()(t,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),t))},p?b(p):function(e,t){return t?Object(a.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(a.__)("In Stock","woo-gutenberg-products-block"):Object(a.__)("Out of Stock","woo-gutenberg-products-block")}(l,d))}))},50:function(e,t){e.exports=window.wc.priceFormat},51:function(e,t){e.exports=window.wp.hooks},52:function(e,t,r){"use strict";r.d(t,"a",(function(){return P}));var n=r(8),c=r.n(n),o=r(5),a=r.n(o),i=r(7),s=r(0),u=r(25),l=r(14),b=r(26),p=r(211),d=r(369),f=r(76),m=r(368),O=function(e){var t=e.detail;t&&t.preserveCartData||Object(l.dispatch)(u.CART_STORE_KEY).invalidateResolutionForStore()},g=function(){1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},j=function(){Object(s.useEffect)((function(){return function(){if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:function(){}}),0===window.wcBlocksStoreCartListeners.count){var e=Object(m.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(m.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",O),document.body.addEventListener("wc-blocks_removed_from_cart",O),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=function(){e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",O),document.body.removeEventListener("wc-blocks_removed_from_cart",O)}}window.wcBlocksStoreCartListeners.count++}(),g}),[])};function h(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 v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(f.b)(),r=t.isEditor,n=t.previewData,c=null==n?void 0:n.previewCart,o=e.shouldSelect,a=Object(s.useRef)();j();var b=Object(l.useSelect)((function(e,t){var n=t.dispatch;if(!o)return k;if(r)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:u.EMPTY_CART_ITEM_ERRORS,cartTotals:c.totals,cartIsLoading:!1,cartErrors:u.EMPTY_CART_ERRORS,billingAddress:y,shippingAddress:w,extensions:u.EMPTY_EXTENSIONS,shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var a=e(u.CART_STORE_KEY),i=a.getCartData(),s=a.getCartErrors(),l=a.getCartTotals(),b=!a.hasFinishedResolution("getCartData"),p=a.isCustomerDataUpdating(),f=n(u.CART_STORE_KEY).receiveCart,m=_(i.billingAddress),O=i.needsShipping?_(i.shippingAddress):m,g=i.fees.length>0?i.fees.map((function(e){return _(e)})):u.EMPTY_CART_FEES;return{cartCoupons:i.coupons.length>0?i.coupons.map((function(e){return v(v({},e),{},{label:e.code})})):u.EMPTY_CART_COUPONS,cartItems:i.items,cartFees:g,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:l,cartIsLoading:b,cartErrors:s,billingAddress:Object(d.a)(m),shippingAddress:Object(d.a)(O),extensions:i.extensions,shippingRates:i.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:f}}),[o]);return a.current&&Object(i.isEqual)(a.current,b)||(a.current=b),a.current}},539:function(e,t){},54:function(e,t){e.exports=window.wc.wcBlocksRegistry},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){},550:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},57:function(e,t){e.exports=window.wp.deprecated},58:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(36),o=r.n(c);function a(e){var t=Object(n.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},59:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(5),a=r.n(o),i=r(21),s=r.n(i),u=r(0),l=r(178),b=r(6),p=r.n(b),d=(r(186),["className","value","currency","onValueChange","displayType"]);function f(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 m(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;i.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),l=Object(o.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,s({},t))}}}),[r]);return s(s(s({notices:t},u),l),{},{setIsSuppressed:c})}},7:function(e,t){e.exports=window.lodash},70:function(e,t){e.exports=window.wp.dom},71:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=Object(n.createContext)("page"),o=function(){return Object(n.useContext)(c)};c.Provider},745:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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:"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=o},752:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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.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(n.createElement)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),Object(n.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=o},76:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(0),c=r(14),o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:function(){}}),a=function(){return Object(n.useContext)(o)},i=function(e){var t=e.children,r=e.currentPostId,a=void 0===r?0:r,i=e.currentView,s=void 0===i?"":i,u=e.previewData,l=void 0===u?{}:u,b=Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),p=Object(n.useCallback)((function(e){return e in l?l[e]:{}}),[l]),d={isEditor:!0,currentPostId:b,currentView:s,previewData:l,getPreviewData:p};return Object(n.createElement)(o.Provider,{value:d},t)}},760:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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:"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=o},761:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),c=r(37),o=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:Object(n.__)("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:c.m+"previews/pennant.jpg",thumbnail:c.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(n.__)("Add to cart","woo-gutenberg-products-block"),description:Object(n.__)("Add to cart","woo-gutenberg-products-block")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},766:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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.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=o},773:function(e,t,r){e.exports=r(846)},774:function(e,t){},775:function(e,t){},776:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(8),c=r.n(n),o=r(0),a=r(14),i=r(25),s=r(26),u=r(52),l=r(67),b=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},p=function(e){var t=Object(a.useDispatch)(i.CART_STORE_KEY).addItemToCart,r=Object(u.a)(),n=r.cartItems,p=r.cartIsLoading,d=Object(l.a)(),f=d.addErrorNotice,m=d.removeNotice,O=Object(o.useState)(!1),g=c()(O,2),j=g[0],h=g[1],v=Object(o.useRef)(b(n,e));return Object(o.useEffect)((function(){var t=b(n,e);t!==v.current&&(v.current=t)}),[n,e]),{cartQuantity:Number.isFinite(v.current)?v.current:0,addingToCart:j,cartIsLoading:p,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return h(!0),t(e,r).then((function(){m("add-to-cart")})).catch((function(e){f(Object(s.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){h(!1)}))}}}},777:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},Object(n.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(n.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(n.createElement)("path",{fill:"currentColor",d:"M12 6H4V4.75h8zM12 9H4V7.75h8zM10 12H4v-1.25h6z"})));t.a=o},778:function(e,t){},779:function(e,t){},78:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(5),c=r.n(n),o=r(51),a=r(0),i=r(52);function s(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 u(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-".concat(e),t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(a.useCallback)((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-checkout-".concat(e),u(u({},r),{},{storeCart:t.current}))}catch(e){console.error(e)}}),[])}}},780:function(e,t){},781:function(e,t){},782:function(e,t){},81:function(e,t){e.exports=window.wc.wcBlocksSharedHocs},82:function(e,t){e.exports=window.ReactDOM},83:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(16),a=r.n(o),i=r(17),s=r.n(i),u=r(13),l=r.n(u),b=r(18),p=r.n(b),d=r(19),f=r.n(d),m=r(9),O=r.n(m),g=r(0),j=r(7),h=r(6),v=r.n(h),w=r(3),y=r(20);r(116);var E=function(e){p()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=O()(t);if(r){var c=O()(this).constructor;e=Reflect.construct(n,arguments,c)}else e=n.apply(this,arguments);return f()(this,e)});function o(){var e;return a()(this,o),(e=n.apply(this,arguments)).onClick=e.onClick.bind(l()(e)),e}return s()(o,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,o=r.checked,a=r.instanceId,i=r.className,s=r.help,u=r.options,l=r.value,b="inspector-toggle-button-control-".concat(a);return s&&(e=Object(j.isFunction)(s)?s(o):s),Object(g.createElement)(w.BaseControl,{id:b,help:e,className:v()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(g.createElement)(w.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((function(e,r){var o={};return l===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(g.createElement)(w.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},o),e.label)}))))}}]),o}(g.Component);t.a=Object(y.withInstanceId)(E)},846:function(e,t,r){"use strict";r.r(t),r.d(t,"blockSettings",(function(){return Ar}));var n=r(5),c=r.n(n),o=r(10),a=r.n(o),i=r(0),s=r(1),u=r(12),l=r(24),b=r(61),p=r(27),d=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.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"})),f=r(113),m=r(6),O=r.n(m),g={category:"woocommerce-product-elements",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#7f54b3"},supports:{html:!1},parent:Object(f.a)()?void 0:["@woocommerce/all-products","@woocommerce/single-product"],save:function(e){var t=e.attributes;return Object(i.createElement)("div",{className:O()("is-loading",t.className)})},deprecated:[{attributes:{},save:function(){return null}}]},j=r(366),h=r(3),v=r(20),w=r(121),y=r(367),E=r(8),_=r.n(E),k=r(136),P=r(21),C=r.n(P),S=(r(775),["className"]),x=function(e){var t=e.className,r=void 0===t?"":t,n=C()(e,S),c=O()("wc-block-text-toolbar-button",r);return Object(i.createElement)(h.Button,a()({className:c},n))},N=r(41),D=(r(774),function(e){return function(t){return function(r){var n=Object(N.useProductDataContext)(),c=r.attributes,o=r.setAttributes,a=c.productId,l=Object(i.useState)(!a),b=_()(l,2),p=b[0],d=b[1];return n.hasContext?Object(i.createElement)(t,r):Object(i.createElement)(i.Fragment,null,p?Object(i.createElement)(h.Placeholder,{icon:e.icon||"",label:e.label||"",className:"wc-atomic-blocks-product"},!!e.description&&Object(i.createElement)("div",null,e.description),Object(i.createElement)("div",{className:"wc-atomic-blocks-product__selection"},Object(i.createElement)(k.a,{selected:a||0,showVariations:!0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o({productId:e[0]?e[0].id:0})}}),Object(i.createElement)(h.Button,{isSecondary:!0,disabled:!a,onClick:function(){d(!1)}},Object(s.__)("Done","woo-gutenberg-products-block")))):Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.ToolbarGroup,null,Object(i.createElement)(x,{onClick:function(){return d(!0)}},Object(s.__)("Switch product…","woo-gutenberg-products-block")))),Object(i.createElement)(t,r)))}}}),T=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(i.createElement)("path",{d:"M17 3H7a2 2 0 00-2 2v16l7-3 7 3V5a2 2 0 00-2-2z"})),B=Object(s.__)("Product Title","woo-gutenberg-products-block"),R=Object(i.createElement)(b.a,{srcElement:T}),A=Object(s.__)("Display the title of a product.","woo-gutenberg-products-block"),L=function(e){var t=e.attributes,r=e.setAttributes,n=Object(u.useBlockProps)(),c=t.headingLevel,o=t.showProductLink,a=t.align;return Object(i.createElement)("div",n,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(w.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:c,onChange:function(e){return r({headingLevel:e})}}),Object(f.b)()&&Object(i.createElement)(u.AlignmentToolbar,{value:a,onChange:function(e){r({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showProductLink:!o})}}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(y.a,t)))},I=Object(f.b)()?Object(v.compose)([D({icon:R,label:B,description:Object(s.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(L):L;function V(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 z(e){for(var t=1;tCustomizer.","woo-gutenberg-products-block"),{a:Object(i.createElement)("a",{href:"".concat(Object(ne.getAdminLink)("customize.php"),"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images"),target:"_blank",rel:"noopener noreferrer"})}),value:c,options:[{label:Object(s.__)("Full Size","woo-gutenberg-products-block"),value:"full-size"},{label:Object(s.__)("Cropped","woo-gutenberg-products-block"),value:"cropped"}],onChange:function(e){return r({imageSizing:e})}}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(ce.a,t)))}));function le(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 be(e){for(var t=1;t0?e(t.innerBlocks):[]})]})):[]};function Ut(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 Wt(e){for(var t=1;t3),m=r&&Boolean(b=a},Object(i.createElement)(tr.a,{label:"→",screenReaderLabel:Object(s.__)("Next page","woo-gutenberg-products-block")})))});rr.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var nr=rr,cr=r(143),or=r(104),ar=r(149),ir=r(25),sr=r(58);function ur(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 lr(e){for(var t=1;t=0&&t<=window.innerHeight||e.scrollIntoView()}}),dr=r(66),fr=r(137),mr=function(){var e=Object(N.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(e,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:fr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(e,"__no-products-title")},Object(s.__)("No products","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(e,"__no-products-description")},Object(s.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},Or=r(766),gr=function(e){var t=e.resetCallback,r=void 0===t?function(){}:t,n=Object(N.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(n,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(n,"__no-products-image"),alt:"",srcElement:Or.a,size:100}),Object(i.createElement)("strong",{className:"".concat(n,"__no-products-title")},Object(s.__)("No products found","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(n,"__no-products-description")},Object(s.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(i.createElement)("button",{onClick:r},Object(s.__)("Reset Search","woo-gutenberg-products-block")))},jr=r(139),hr=(r(780),function(e){var t=e.onChange,r=e.readOnly,n=e.value;return Object(i.createElement)(jr.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",name:"orderby",onChange:t,options:[{key:"menu_order",label:Object(s.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(s.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(s.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(s.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(s.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(s.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(s.__)("Order products by","woo-gutenberg-products-block"),value:n})}),vr=Object(v.withInstanceId)((function(e){var t=e.product,r=e.attributes,n=e.instanceId,c=r.layoutConfig,o=Object(N.useInnerBlockLayoutContext)(),s=o.parentClassName,u=o.parentName,l=0===Object.keys(t).length,b=O()("".concat(s,"__product"),"wc-block-layout",{"is-loading":l});return Object(i.createElement)("li",{className:b,"aria-hidden":l},function e(t,r,n,c){if(n){var o=Object(Lt.a)(t);return n.map((function(n,s){var u=_()(n,2),l=u[0],b=u[1],p=void 0===b?{}:b,d=[];p.children&&p.children.length>0&&(d=e(t,r,p.children,c));var f=o[l];if(!f)return null;var m=r.id||0,O=["layout",l,s,c,m];return Object(i.createElement)(i.Suspense,{key:O.join("_"),fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},Object(i.createElement)(f,a()({},p,{children:d,product:r})))}))}}(u,t,c,n))})),wr=(r(779),["order","orderby","page","per_page"]);function yr(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 Er(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},c=n.totalQuery;return!Object(er.isEqual)(t,c)&&Number.isFinite(r)},Pr=(_r=function(e){var t,r=e.attributes,n=e.currentPage,c=e.onPageChange,o=e.onSortChange,a=e.sortValue,u=e.scrollToTop,l=Object(or.b)("attributes",[]),b=_()(l,2),p=b[0],d=b[1],f=Object(or.b)("stock_status",[]),m=_()(f,2),g=m[0],j=m[1],h=Object(or.b)("min_price"),v=_()(h,2),w=v[0],y=v[1],E=Object(or.b)("max_price"),k=_()(E,2),P=k[0],S=k[1],x=Object(or.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,c=n.columns,o=n.rows;return Er(Er({},function(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:c*o,page:r})}({attributes:r,sortValue:a,currentPage:n})),D=_()(x,1)[0],T=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(ar.a)(lr(lr({},t),{},{query:e})),n=r.results,c=r.isLoading,o=function(e,t){var r=t.namespace,n=t.resourceName,c=t.resourceValues,o=void 0===c?[]:c,a=t.query,i=void 0===a?{}:a;if(!r||!n)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var s=Object(sr.a)(i),u=Object(sr.a)(o),l=Object(Rt.useSelect)((function(e){var t=e(ir.COLLECTIONS_STORE_KEY),c=["x-wp-total",r,n,s,u];return{value:t.getCollectionHeader.apply(t,c),isLoading:t.hasFinishedResolution("getCollectionHeader",c)}}),["x-wp-total",r,n,u,s]),b=l.value,p=l.isLoading;return{value:b,isLoading:void 0===p||p}}(0,lr(lr({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(o,10),productsLoading:c}}(D),B=T.products,R=T.totalProducts,A=T.productsLoading,L=Object(N.useInnerBlockLayoutContext)(),I=L.parentClassName,V=L.parentName,z=((t=D).order,t.orderby,t.page,t.per_page,C()(t,wr)||{}),M=Object(br.a)().dispatchStoreEvent,F=Object(cr.a)({totalQuery:z,totalProducts:R},kr);Object(i.useEffect)((function(){M("product-list-render",{products:B,listName:V})}),[B,V,M]),Object(i.useEffect)((function(){Object(er.isEqual)(z,null==F?void 0:F.totalQuery)||(c(1),null!=F&&F.totalQuery&&function(e){Number.isFinite(e)&&(0===e?Object(dr.speak)(Object(s.__)("No products found","woo-gutenberg-products-block")):Object(dr.speak)(Object(s.sprintf)(
+/* translators: %s is an integer higher than 0 (1, 2, 3...) */
+Object(s._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(R))}),[null==F?void 0:F.totalQuery,R,c,z]);var H,q,G,Q,Y,U=r.contentVisibility,W=r.columns*r.rows,K=!Number.isFinite(R)&&Number.isFinite(null==F?void 0:F.totalProducts)&&Object(er.isEqual)(z,null==F?void 0:F.totalQuery)?Math.ceil(F.totalProducts/W):Math.ceil(R/W),$=B.length?B:Array.from({length:W}),J=0!==B.length||A,X=p.length>0||g.length>0||Number.isFinite(w)||Number.isFinite(P);return Object(i.createElement)("div",{className:(H=r.columns,q=r.rows,G=r.alignButtons,Q=r.align,Y=void 0!==Q?"align"+Q:"",O()(I,Y,"has-"+H+"-columns",{"has-multiple-rows":q>1,"has-aligned-buttons":G}))},U.orderBy&&J&&Object(i.createElement)(hr,{onChange:o,value:a}),!J&&X&&Object(i.createElement)(gr,{resetCallback:function(){d([]),j([]),y(null),S(null)}}),!J&&!X&&Object(i.createElement)(mr,null),J&&Object(i.createElement)("ul",{className:"".concat(I,"__products")},$.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return Object(i.createElement)(vr,{key:e.id||t,attributes:r,product:e})}))),K>1&&Object(i.createElement)(nr,{currentPage:n,onPageChange:function(e){u({focusableSelector:"a, button"}),c(e)},totalPages:K}))},function(e){var t=Object(i.useRef)(null);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:t,"aria-hidden":!0}),Object(i.createElement)(_r,a()({},e,{scrollToTop:function(e){var r,n;null!==t.current&&(r=t.current,n=(e||{}).focusableSelector,window&&Number.isFinite(window.innerHeight)&&(n?function(e,t){var r,n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){var c=n[0];pr(c),null==c||c.focus()}else pr(e)}(r,n):pr(r)))}})))}),Cr=function(e){var t=e.attributes,r=Object(i.useState)(1),n=_()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),s=_()(a,2),u=s[0],l=s[1];return Object(i.useEffect)((function(){l(t.orderby)}),[t.orderby]),Object(i.createElement)(Pr,{attributes:t,currentPage:c,onPageChange:function(e){o(e)},onSortChange:function(e){var t=e.target.value;l(t),o(1)},sortValue:u})},Sr=r(172);var xr=function(e){xt()(c,e);var t,r,n=(t=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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=Bt()(t);if(r){var c=Bt()(this).constructor;e=Reflect.construct(n,arguments,c)}else e=n.apply(this,arguments);return Dt()(this,e)});function c(){return kt()(this,c),n.apply(this,arguments)}return Xt()(c,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?Sr.a:Object(i.createElement)(N.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)(Cr,{attributes:t,urlParameterSuffix:r}))}}]),c}(Zt.Component);r(778);var Nr=function(e){xt()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=Bt()(t);if(r){var c=Bt()(this).constructor;e=Reflect.construct(n,arguments,c)}else e=n.apply(this,arguments);return Dt()(this,e)});function o(){var e;kt()(this,o);for(var t=arguments.length,r=new Array(t),a=0;a 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' => '372ec66f98e560f8f0f2656cb64d02fd');
\ No newline at end of file
diff --git a/build/all-reviews.js b/build/all-reviews.js
new file mode 100644
index 00000000000..8442039d8a2
--- /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 n,a,i=t[0],s=t[1],l=t[2],b=0,d=[];bstore settings.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(i.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!r&&Object(n.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(n.createInterpolateElement)(Object(o.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(i.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},b=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(c.SelectControl,{label:Object(o.__)("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:function(e){return t({orderby:e})}}),Object(n.createElement)(c.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(c.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},137:function(e,t,r){"use strict";var n=r(0),o=r(27),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.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},138:function(e,t){},139:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(6)),c=r.n(o),a=r(42),i=r(20);r(193),t.a=Object(i.withInstanceId)((function(e){var t=e.className,r=e.instanceId,o=e.label,i=e.onChange,s=e.options,l=e.screenReaderLabel,u=e.readOnly,b=e.value,d="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(a.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:i,readOnly:u,value:b},s.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},146:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(37),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(n.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(n.__)("Alice","woo-gutenberg-products-block"),review:"".concat(Object(n.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block"),"
\n"),reviewer_avatar_urls:{48:o.o.defaultAvatar,96:o.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(n.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(n.__)("Bob","woo-gutenberg-products-block"),review:"".concat(Object(n.__)("This product is awesome, I love it!","woo-gutenberg-products-block"),"
\n"),reviewer_avatar_urls:{48:o.o.defaultAvatar,96:o.o.defaultAvatar},rating:null,verified:!1}]}}},15:function(e,t){e.exports=window.wp.apiFetch},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 n=r(10),o=r.n(n),c=r(0),a=r(12),i=(r(192),r(80));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({},a.useBlockProps.save({className:Object(i.a)(t)}),Object(i.b)(t)))}},180:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(7)),a=r(3),i=r(12),s=r(16),l=r.n(s),u=r(17),b=r.n(u),d=r(18),p=r.n(d),w=r(19),m=r.n(w),v=r(9),g=r.n(v),f=r(11),h=r(4),O=r(102),y=r(42),j=(r(240),function(e){var t=e.onClick,r=e.label,o=e.screenReaderLabel;return Object(n.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(n.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(n.createElement)(y.a,{label:r,screenReaderLabel:o})))});j.defaultProps={label:Object(o.__)("Load more","woo-gutenberg-products-block")};var _=j,k=r(139),R=(r(237),function(e){var t=e.onChange,r=e.readOnly,c=e.value;return Object(n.createElement)(k.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(o.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(o.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(o.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(o.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(o.__)("Order reviews by","woo-gutenberg-products-block"),value:c})}),E=r(5),P=r.n(E),S=r(6),C=r.n(S),N=r(13),T=r.n(N),x=r(212),L=r.n(x),A=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=L()(e,{suffix:r,limit:t});return n.html},M=function(e,t,r,n){var o=I(e,t,r);return A(e,o-n.length,n)},I=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=A(e,n.middle),n=D(n,t.clientHeight,r);return n.middle},D=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};var B=function(e){p()(c,e);var t,r,o=(t=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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=g()(t);if(r){var o=g()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return m()(this,e)});function c(e){var t;return l()(this,c),(t=o.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},t.reviewSummary=Object(f.createRef)(),t.reviewContent=Object(f.createRef)(),t.getButton=t.getButton.bind(T()(t)),t.onClick=t.onClick.bind(T()(t)),t}return b()(c,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:M(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,o=t.lessText,c=t.moreText,a=e?o:c;if(a)return Object(n.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},a)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,o=t.summary,c=t.clampEnabled,a=t.isExpanded;return r?!1===c?Object(n.createElement)("div",{className:e},Object(n.createElement)("div",{ref:this.reviewContent},r)):Object(n.createElement)("div",{className:e},(!a||null===c)&&Object(n.createElement)("div",{ref:this.reviewSummary,"aria-hidden":a,dangerouslySetInnerHTML:{__html:o}}),(a||null===c)&&Object(n.createElement)("div",{ref:this.reviewContent,"aria-hidden":!a},r),this.getButton()):null}}]),c}(f.Component);B.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(o.__)("Read more","woo-gutenberg-products-block"),lessText:Object(o.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=B;r(239);var G=function(e){var t=e.attributes,r=e.review,c=void 0===r?{}:r,a=t.imageType,i=t.showReviewDate,s=t.showReviewerName,l=t.showReviewImage,u=t.showReviewRating,b=t.showReviewContent,d=t.showProductName,p=c.rating,w=!Object.keys(c).length>0,m=Number.isFinite(p)&&u;return Object(n.createElement)("li",{className:C()("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":l}),"aria-hidden":w},(d||i||s||l||m)&&Object(n.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},l&&function(e,t,r){var c,a;return r||!e?Object(n.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(n.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(n.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(n.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(n.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(o.__)("Verified buyer","woo-gutenberg-products-block")},Object(o.__)("Verified buyer","woo-gutenberg-products-block")))}(c,a,w),(d||s||m||i)&&Object(n.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},m&&function(e){var t=e.rating,r={width:t/5*100+"%"},c=Object(o.sprintf)(
+/* translators: %f is referring to the average rating value */
+Object(o.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(n.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(n.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":c},Object(n.createElement)("span",{style:r},c)))}(c),d&&function(e){return Object(n.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(n.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(c),s&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(n.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},r)}(c),i&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(n.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(c))),b&&function(e){return Object(n.createElement)(H,{maxLines:10,moreText:Object(o.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(o.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(n.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(c))};function F(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 V(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(Z.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.isMounted&&e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,o=r.error,c=r.loading,a=r.reviews,i=r.totalReviews;return Object(n.createElement)(e,U()({},this.props,{error:o,isLoading:c,reviews:a.slice(0,t),totalReviews:i}))}}]),a}(f.Component);P()(t,"defaultProps",{delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}});var r=e.displayName,o=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(o," )"),t}(function(e){p()(i,e);var t,r,c=(t=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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=g()(t);if(r){var o=g()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return m()(this,e)});function i(){return l()(this,i),c.apply(this,arguments)}return b()(i,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,c=e.isLoading,i=e.noReviewsPlaceholder,s=e.reviews,l=e.totalReviews;if(r)return Object(n.createElement)(O.a,{className:"wc-block-featured-product-error",error:r,isLoading:c});if(0===s.length&&!c)return Object(n.createElement)(i,{attributes:t});var u=Object(h.getSetting)("reviewRatingsEnabled",!0);return Object(n.createElement)(a.Disabled,null,t.showOrderby&&u&&Object(n.createElement)(R,{readOnly:!0,value:t.orderby}),Object(n.createElement)(z,{attributes:t,reviews:s}),t.showLoadMore&&l>s.length&&Object(n.createElement)(_,{screenReaderLabel:Object(o.__)("Load more reviews","woo-gutenberg-products-block")}))}}]),i}(f.Component));t.a=function(e){var t=e.attributes,r=e.icon,s=e.name,l=e.noReviewsPlaceholder,u=t.categoryIds,b=t.productId,d=t.reviewsOnPageLoad,p=t.showProductName,w=t.showReviewDate,m=t.showReviewerName,v=t.showReviewContent,g=t.showReviewImage,f=t.showReviewRating,h=Object(Z.d)(t.orderby),O=h.order,y=h.orderby,j=!(v||f||w||m||g||p),_=Object(i.useBlockProps)({className:Object(Z.a)(t)});return j?Object(n.createElement)(a.Placeholder,{icon:r,label:s},Object(o.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(n.createElement)("div",_,Object(n.createElement)(ee,{attributes:t,categoryIds:u,delayFunction:function(e){return Object(c.debounce)(e,400)},noReviewsPlaceholder:l,orderby:y,order:O,productId:b,reviewsToDisplay:d}))}},192:function(e,t){},193:function(e,t){},20:function(e,t){e.exports=window.wp.compose},22:function(e,t){e.exports=window.regeneratorRuntime},237:function(e,t){},238:function(e,t){},239:function(e,t){},24:function(e,t){e.exports=window.wp.blocks},240:function(e,t){},27:function(e,t){e.exports=window.wp.primitives},3:function(e,t){e.exports=window.wp.components},36:function(e,t){e.exports=window.wp.isShallowEqual},37: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 b})),r.d(t,"g",(function(){return d})),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 v})),r.d(t,"a",(function(){return g})),r.d(t,"i",(function(){return f})),r.d(t,"b",(function(){return h}));var n,o=r(4),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,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=o.STORE_PAGES.checkout.id,b=o.STORE_PAGES.checkout.permalink,d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),w=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),m=o.STORE_PAGES.cart.permalink,v=(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",{}),f=Object(o.getSetting)("shippingStates",{}),h=Object(o.getSetting)("allowedStates",{})},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}));var n=r(29),o=r.n(n),c=r(22),a=r.n(c),i=r(1),s=function(){var e=o()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),l=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},42:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(0),a=r(6),i=r.n(a);function s(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;t2&&void 0!==arguments[2]?arguments[2]:"",n=r&&void 0!==b[r]?b[r]:{};return e.map((function(e){var r=a.defaultAddressFields[e]||{},c=n[e]||{},o=t[e]||{};return l(l(l({key:e},r),c),o)})).sort((function(e,t){return e.index-t.index}))}},211:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(8),c=r.n(n),o=function(e){return e.reduce((function(e,t){var r=c()(t,2),n=r[0],o=r[1];return e[n]=o,e}),{})}},368:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return a}));var n,c=window.CustomEvent||null,o=function(e,t){var r=t.bubbles,n=void 0!==r&&r,o=t.cancelable,i=void 0!==o&&o,a=t.element,s=t.detail,u=void 0===s?{}:s;if(c){a||(a=document.body);var d=new c(e,{bubbles:n,cancelable:i,detail:u});a.dispatchEvent(d)}},i=function(){n&&clearTimeout(n),n=setTimeout((function(){o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})}),50)},a=function(e,t){var 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 function(){};var c=function(){o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},369: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(4),c=r(133),o=r(23),i=function(e){var t=e.country,r=void 0===t?"":t,n=e.state,c=void 0===n?"":n,o=e.city,i=void 0===o?"":o,a=e.postcode,s=void 0===a?"":a;return{country:r.trim(),state:c.trim(),city:i.trim(),postcode:s?s.replace(" ","").toUpperCase():""}},a=function(e){var t=e.email,r=void 0===t?"":t;return Object(o.isEmail)(r)?r.trim():""},s=function(e){var t=Object.keys(n.defaultAddressFields),r=Object(c.a)(t,{},e.country),o=Object.assign({},e);return r.forEach((function(t){var r=t.key,n=void 0===r?"":r,c=t.hidden;void 0!==c&&c&&function(e,t){return e in t}(n,e)&&(o[n]="")})),o}},52:function(e,t,r){"use strict";r.d(t,"a",(function(){return P}));var n=r(8),c=r.n(n),o=r(5),i=r.n(o),a=r(7),s=r(0),u=r(25),d=r(14),l=r(26),p=r(211),f=r(369),b=r(76),v=r(368),O=function(e){var t=e.detail;t&&t.preserveCartData||Object(d.dispatch)(u.CART_STORE_KEY).invalidateResolutionForStore()},_=function(){1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=function(){Object(s.useEffect)((function(){return function(){if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:function(){}}),0===window.wcBlocksStoreCartListeners.count){var e=Object(v.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(v.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",O),document.body.addEventListener("wc-blocks_removed_from_cart",O),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=function(){e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",O),document.body.removeEventListener("wc-blocks_removed_from_cart",O)}}window.wcBlocksStoreCartListeners.count++}(),_}),[])};function g(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 y(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(b.b)(),r=t.isEditor,n=t.previewData,c=null==n?void 0:n.previewCart,o=e.shouldSelect,i=Object(s.useRef)();m();var l=Object(d.useSelect)((function(e,t){var n=t.dispatch;if(!o)return C;if(r)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:u.EMPTY_CART_ITEM_ERRORS,cartTotals:c.totals,cartIsLoading:!1,cartErrors:u.EMPTY_CART_ERRORS,billingAddress:w,shippingAddress:h,extensions:u.EMPTY_EXTENSIONS,shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var i=e(u.CART_STORE_KEY),a=i.getCartData(),s=i.getCartErrors(),d=i.getCartTotals(),l=!i.hasFinishedResolution("getCartData"),p=i.isCustomerDataUpdating(),b=n(u.CART_STORE_KEY).receiveCart,v=E(a.billingAddress),O=a.needsShipping?E(a.shippingAddress):v,_=a.fees.length>0?a.fees.map((function(e){return E(e)})):u.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map((function(e){return y(y({},e),{},{label:e.code})})):u.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:l,cartErrors:s,billingAddress:Object(f.a)(v),shippingAddress:Object(f.a)(O),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:b}}),[o]);return i.current&&Object(a.isEqual)(i.current,l)||(i.current=l),i.current}},76:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return a}));var n=r(0),c=r(14),o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:function(){}}),i=function(){return Object(n.useContext)(o)},a=function(e){var t=e.children,r=e.currentPostId,i=void 0===r?0:r,a=e.currentView,s=void 0===a?"":a,u=e.previewData,d=void 0===u?{}:u,l=Object(c.useSelect)((function(e){return i||e("core/editor").getCurrentPostId()}),[i]),p=Object(n.useCallback)((function(e){return e in d?d[e]:{}}),[d]),f={isEditor:!0,currentPostId:l,currentView:s,previewData:d,getPreviewData:p};return Object(n.createElement)(o.Provider,{value:f},t)}},78:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(5),c=r.n(n),o=r(51),i=r(0),a=r(52);function s(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 u(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-".concat(e),t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(i.useCallback)((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-checkout-".concat(e),u(u({},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..364f98272be
--- /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,n){"use strict";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return y}));var c=n(5),r=n.n(c),o=n(8),i=n.n(o),s=n(0),u=(n(2),n(14)),a=n(78),f=n(76),d=n(10),l=n.n(d),b=n(6),v=n.n(b),O=n(887),p=(n(221),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""}),j=function(e){var t=e.className,n=e.notices,c=e.removeNotice,r=n.filter((function(e){return"snackbar"!==e.type}));if(!r.length)return null;var o=v()(t,"wc-block-components-notices");return Object(s.createElement)("div",{className:o},r.map((function(e){return Object(s.createElement)(O.a,l()({key:"store-notice-"+e.id},e,{className:v()("wc-block-components-notices__notice",p(e)),onRemove:function(){e.isDismissible&&c(e.id)}}),e.content)})))};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function g(e){for(var t=1;t0&&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]:{};v(e,t,g(g({},n),{},{context:n.context||l})),N("store-notice-create",{status:e,content:t,options:n})}),[v,N,l]),S=Object(s.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;O(e,t)}),[O,l]),D={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(l)}}),[l]).notices,createNotice:P,removeNotice:S,context:l,setIsSuppressed:y},k=w?null:Object(s.createElement)(j,{className:c,notices:D.notices,removeNotice:D.removeNotice,isEditor:E});return Object(s.createElement)(h.Provider,{value:D},o&&k,t)}},221:function(e,t){},67:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var c=n(5),r=n.n(c),o=n(0),i=n(174);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function u(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||c(t.id)}))},removeNotice:c}}),[c]),f=Object(o.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,u({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,u({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,u({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,u({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,u({},t))}}}),[n]);return u(u(u({notices:t},a),f),{},{setIsSuppressed:r})}},776:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var c=n(8),r=n.n(c),o=n(0),i=n(14),s=n(25),u=n(26),a=n(52),f=n(67),d=function(e,t){var n=e.find((function(e){return e.id===t}));return n?n.quantity:0},l=function(e){var t=Object(i.useDispatch)(s.CART_STORE_KEY).addItemToCart,n=Object(a.a)(),c=n.cartItems,l=n.cartIsLoading,b=Object(f.a)(),v=b.addErrorNotice,O=b.removeNotice,p=Object(o.useState)(!1),j=r()(p,2),m=j[0],g=j[1],h=Object(o.useRef)(d(c,e));return Object(o.useEffect)((function(){var t=d(c,e);t!==h.current&&(h.current=t)}),[c,e]),{cartQuantity:Number.isFinite(h.current)?h.current:0,addingToCart:m,cartIsLoading:l,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return g(!0),t(e,n).then((function(){O("add-to-cart")})).catch((function(e){v(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){g(!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..ed2b664273a
--- /dev/null
+++ b/build/atomic-block-components/add-to-cart-frontend.js
@@ -0,0 +1,3 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{126:function(e,t,r){"use strict";r(155),t.a=function(){return React.createElement("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}},155:function(e,t){},157:function(e,t,r){"use strict";var n=r(20),c=r.n(n),o=r(26),a=r.n(o),s=r(81),i=r(7),u=r.n(i),l=r(126),f=(r(204),["className","showSpinner","children"]);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,i=a()(e,f),d=u()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return React.createElement(s.a,c()({className:d},i),n&&React.createElement(l.a,null),React.createElement("span",{className:"wc-block-components-button__text"},o))}},171:function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return y}));var n=r(21),c=r.n(n),o=r(5),a=r.n(o),s=r(26),i=r.n(s),u=r(4),l=r.n(u),f=r(0),d=r(6),b=r(19),p=r.n(b);function m(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 v(e){for(var t=1;t0,getValidationErrorId:u};return React.createElement(h.Provider,{value:j},t)}},176:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(99),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},178:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return p}));var n=r(21),c=r.n(n),o=r(35),a=r.n(o),s=r(24),i=r.n(s),u=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},l=r(43);function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return d(e,void 0);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)?d(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}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 o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:1;return g(!0),t(e,r).then((function(){m("add-to-cart")})).catch((function(e){p(Object(i.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){g(!1)}))}}}},338:function(e,t){},339:function(e,t,r){"use strict";var n=r(44),c=React.createElement(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=c},340:function(e,t){},390:function(e,t,r){"use strict";r.r(t);var n=r(154),c=(r(8),r(7)),o=r.n(c),a=r(4),s=r.n(a),i=r(0),u=r(1),l=r(45),f=function(e){return e.is_purchasable||!1},d={status:"pristine",hasError:!1,quantity:1,processingResponse:null,requestParams:{}},b=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"set_has_error":"set_no_error";return{type:t}},p=r(5),m=r.n(p);function v(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 O(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case"set_pristine":e=d;break;case"set_idle":e=t.status!==h?O(O({},t),{},{status:h}):t;break;case"set_disabled":e="disabled"!==t.status?O(O({},t),{},{status:"disabled"}):t;break;case"set_quantity":e=n!==t.quantity?O(O({},t),{},{quantity:n}):t;break;case"set_request_params":e=O(O({},t),{},{requestParams:O(O({},t.requestParams),o)});break;case"set_processing_response":e=O(O({},t),{},{processingResponse:o});break;case"set_processing":e=!1===(e="processing"!==t.status?O(O({},t),{},{status:"processing",hasError:!1}):t).hasError?e:O(O({},e),{},{hasError:!1});break;case"set_before_processing":e="before_processing"!==t.status?O(O({},t),{},{status:"before_processing",hasError:!1}):t;break;case"set_after_processing":e="after_processing"!==t.status?O(O({},t),{},{status:"after_processing"}):t;break;case"set_has_error":e=t.hasError?t:O(O({},t),{},{hasError:!0}),e="processing"===t.status||"before_processing"===t.status?O(O({},e),{},{status:h}):e;break;case"set_no_error":e=t.hasError?O(O({},t),{},{hasError:!1}):t}return e!==t&&"set_pristine"!==c&&"pristine"===e.status&&(e.status=h),e},y=r(99),j=r(176),E=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(j.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(j.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(j.a)("add_to_cart_before_processing",e)}},w=r(178),_=r(171),P=r(51),k=r(43),R=Object(i.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:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),C=function(){return Object(i.useContext)(R)},A=function(e){var t=e.children,r=e.product,n=e.showFormElements,c=Object(i.useReducer)(g,d),o=s()(c,2),a=o[0],p=o[1],m=Object(i.useReducer)(y.b,{}),v=s()(m,2),O=v[0],h=v[1],j=Object(l.a)(O),C=Object(P.a)(),A=C.addErrorNotice,S=C.removeNotices,N=Object(_.b)().setValidationErrors,D=Object(k.c)(),x=D.isSuccessResponse,T=D.isErrorResponse,V=D.isFailResponse,q=Object(i.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:E(h).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:E(h).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:E(h).onAddToCartBeforeProcessing}}),[h]),I=Object(i.useMemo)((function(){return{resetForm:function(){p({type:"set_pristine"})},submitForm:function(){p({type:"set_before_processing"})},setQuantity:function(e){p(function(e){return{type:"set_quantity",quantity:e}}(e))},setHasError:function(e){p(b(e))},setRequestParams:function(e){p(function(e){return{type:"set_request_params",data:e}}(e))},setAfterProcessing:function(e){p({type:"set_processing_response",data:e}),p({type:"set_after_processing"})}}}),[]);Object(i.useEffect)((function(){var e=a.status,t=!r.id||!f(r);"disabled"!==e||t?"disabled"!==e&&t&&p({type:"set_disabled"}):p({type:"set_idle"})}),[a.status,r,p]),Object(i.useEffect)((function(){"before_processing"===a.status&&(S("error"),Object(w.a)(j,"add_to_cart_before_processing",{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&A(t),r&&N(r)})),p({type:"set_idle"})):p({type:"set_processing"})})))}),[a.status,N,A,S,p,j]),Object(i.useEffect)((function(){if("after_processing"===a.status){var e={processingResponse:a.processingResponse},t=function(e){var t=!1;return e.forEach((function(e){var r=e.message,n=e.messageContext;(T(e)||V(e))&&r&&(t=!0,A(r,n?{context:n}:void 0))})),t};if(a.hasError)return void Object(w.b)(j,"add_to_cart_after_processing_with_error",e).then((function(r){if(!t(r)){var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");A(c,{id:"add-to-cart"})}p({type:"set_idle"})}));Object(w.b)(j,"add_to_cart_after_processing_with_success",e).then((function(e){t(e)?p(b(!0)):p({type:"set_idle"})}))}}),[a.status,a.hasError,a.processingResponse,I,A,T,V,x,j]);var F=function(e){return["simple","variable"].includes(e.type||"simple")}(r),B={product:r,productType:r.type||"simple",productIsPurchasable:f(r),productHasOptions:r.has_options||!1,supportsFormElements:F,showFormElements:n&&F,quantity:a.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:a.requestParams,isIdle:"idle"===a.status,isDisabled:"disabled"===a.status,isProcessing:"processing"===a.status,isBeforeProcessing:"before_processing"===a.status,isAfterProcessing:"after_processing"===a.status,hasError:a.hasError,eventRegistration:q,dispatchActions:I};return React.createElement(R.Provider,{value:B},t)},S=r(59),N=r.n(S),D=r(32),x=r(33);function T(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}var V=function(){var e=C(),t=e.dispatchActions,r=e.product,n=e.quantity,c=e.eventRegistration,o=e.hasError,a=e.isProcessing,l=e.requestParams,f=Object(_.b)(),d=f.hasValidationErrors,b=f.showAllValidationErrors,p=Object(P.a)(),v=p.addErrorNotice,O=p.removeNotice,h=Object(x.a)().receiveCart,g=Object(i.useState)(!1),y=s()(g,2),j=y[0],E=y[1],w=!o&&a,k=Object(i.useCallback)((function(){return!d||(b(),{type:"error"})}),[d,b]);Object(i.useEffect)((function(){var e=c.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[c,k]);var R=Object(i.useCallback)((function(){E(!0),O("add-to-cart");var e=function(e){for(var t=1;t0?Object(u.sprintf)(
+/* translators: %s number of products in cart. */
+Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!o&&React.createElement(L.a,{srcElement:M.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},U=function(){var e=C(),t=e.showFormElements,r=e.productIsPurchasable,n=e.productHasOptions,c=e.product,o=e.productType,a=e.isDisabled,l=e.isProcessing,f=e.eventRegistration,d=e.hasError,b=e.dispatchActions,p=Object(I.useInnerBlockLayoutContext)().parentName,m=Object(Q.a)().dispatchStoreEvent,v=Object(W.a)(c.id||0).cartQuantity,O=Object(i.useState)(!1),h=s()(O,2),g=h[0],y=h[1],j=c.add_to_cart||{url:"",text:""};return Object(i.useEffect)((function(){var e=f.onAddToCartAfterProcessingWithSuccess((function(){return d||y(!0),!0}),0);return function(){e()}}),[f,d]),(t||!n&&"simple"===o)&&r?React.createElement(K,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:v,isDisabled:a,isProcessing:l,isDone:g,onClick:function(){b.submitForm(),m("cart-add-item",{product:c,listName:p})}}):React.createElement(H,{className:"wc-block-components-product-add-to-cart-button",href:j.url,text:j.text||Object(u.__)("View Product","woo-gutenberg-products-block"),onClick:function(){m("product-view-link",{product:c,listName:p})}})},Y=function(e){var t=e.disabled,r=e.min,n=e.max,c=e.value,o=e.onChange;return React.createElement("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:c,min:r,max:n,hidden:1===n,disabled:t,onChange:function(e){o(e.target.value)}})},z=function(e){var t=e.reason,r=void 0===t?Object(u.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return React.createElement("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},G=function(){var e=C(),t=e.product,r=e.quantity,n=e.minQuantity,c=e.maxQuantity,o=e.dispatchActions,a=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement(z,null):t.id&&!t.is_in_stock?React.createElement(z,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Y,{value:r,min:n,max:c,disabled:a,onChange:o.setQuantity}),React.createElement(U,null))},J=(r(340),r(42)),X=r.n(J),$=r(391),Z=r(3),ee=r(292),te={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},re=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,c=e.value,a=void 0===c?"":c,s=e.onChange,i=void 0===s?function(){}:s,l=e.errorMessage,f=void 0===l?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):l,d=Object(_.b)(),b=d.getValidationError,p=d.setValidationErrors,v=d.clearValidationError,O=t,h=b(O)||{};return Object(Z.useEffect)((function(){a?v(O):p(m()({},O,{message:f,hidden:!0}))}),[a,O,f,v,p]),Object(Z.useEffect)((function(){return function(){v(O)}}),[O,v]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},React.createElement($.a,{label:Object(D.decodeEntities)(t),value:a||"",options:[te].concat(X()(n)),onChange:i,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),React.createElement(ee.a,{propertyName:O,elementId:O}))},ne=r(66);function ce(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 oe(e){for(var t=1;t0;return c.forEach((function(c){var a=e[c],s=oe(oe({},r),{},m()({},c,null)),i=o?ae(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(D.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n}(c,o,v)}),[v,c,o]);return Object(i.useEffect)((function(){if(!y){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(ne.b)(e))return{};var t=Object.keys(e),r={};return 0===t.length||t.forEach((function(t){var n,c=e[t],o=c.terms.filter((function(e){return e.default}));o.length>0&&(r[c.name]=null===(n=o[0])||void 0===n?void 0:n.slug)})),r}(t);e&&O(ie({},e)),j(!0)}}),[v,t,y]),Object(i.useEffect)((function(){Object.values(v).filter((function(e){return""!==e})).length===Object.keys(c).length?d(function(e,t,r){return ae(e,t,r)[0]||0}(c,o,v)):f>0&&d(0)}),[v,f,c,o]),Object(i.useEffect)((function(){n({id:f,variation:Object.keys(v).map((function(e){return{attribute:e,value:v[e]}}))})}),[n,f,v]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(c).map((function(e){return React.createElement(re,{key:e,attributeName:e,options:E[e],value:v[e],onChange:function(t){O(ie(ie({},v),{},m()({},e,t)))}})})))},le=function(e){var t=e.product,r=e.dispatchers,n=function(e){return e?Object(F.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),c=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(n).length||0===c.length?null:React.createElement(ue,{attributes:n,variationAttributes:c,setRequestParams:r.setRequestParams})},fe=function(){var e=C(),t=e.product,r=e.quantity,n=e.minQuantity,c=e.maxQuantity,o=e.dispatchActions,a=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement(z,null):t.id&&!t.is_in_stock?React.createElement(z,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(le,{product:t,dispatchers:o}),React.createElement(Y,{value:r,min:n,max:c,disabled:a,onChange:o.setQuantity}),React.createElement(U,null))},de=function(){return React.createElement(U,null)},be=r(317),pe=function(){return React.createElement(be.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},me=function(){return React.createElement(pe,null)},ve=function(){var e=C(),t=e.showFormElements,r=e.productType;return t?"variable"===r?React.createElement(fe,null):"grouped"===r?React.createElement(me,null):"external"===r?React.createElement(de,null):"simple"===r||"variation"===r?React.createElement(G,null):null:React.createElement(U,null)},Oe=Object(n.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,n=Object(I.useProductDataContext)().product,c=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(F.isEmpty)(n)});return React.createElement(q,{product:n,showFormElements:r},React.createElement("div",{className:c},React.createElement(ve,null)))}));t.default=Object(n.withFilteredAttributes)({showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}})(Oe)},43: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 f}));var n,c,o=r(66);!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"}(c||(c={}));var a=function(e,t){return Object(o.b)(e)&&"type"in e&&e.type===t},s=function(e){return a(e,n.SUCCESS)},i=function(e){return a(e,n.ERROR)},u=function(e){return a(e,n.FAIL)},l=function(e){return!Object(o.b)(e)||void 0===e.retry||!0===e.retry},f=function(){return{responseTypes:n,noticeContexts:c,shouldRetry:l,isSuccessResponse:s,isErrorResponse:i,isFailResponse:u}}},45:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(19),o=r.n(c);function a(e){var t=Object(n.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},51:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(5),c=r.n(n),o=r(0),a=r(100);function s(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 i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),l=Object(o.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,i({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,i({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,i({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,i({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,i({},t))}}}),[r]);return i(i(i({notices:t},u),l),{},{setIsSuppressed:c})}},99:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return f}));var n,c=r(5),o=r.n(c),a=r(6);function s(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 i(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(a.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e}}},l={},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,r=t.type,c=t.eventType,a=t.id,s=t.callback,u=t.priority,f=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(r){case n.ADD_EVENT_CALLBACK:return f.set(a,{priority:u,callback:s}),i(i({},e),{},o()({},c,f));case n.REMOVE_EVENT_CALLBACK:return f.delete(a),i(i({},e),{},o()({},c,f))}}}}]);
\ 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..0c0f5e7f8d2
--- /dev/null
+++ b/build/atomic-block-components/add-to-cart.js
@@ -0,0 +1,3 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{109:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(21),a=r.n(o),s=r(0),i=r(185),u=r(6),l=r.n(u),b=r(134),f=(r(222),["className","showSpinner","children"]);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,f),d=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(s.createElement)(i.a,c()({className:d},u),n&&Object(s.createElement)(b.a,null),Object(s.createElement)("span",{className:"wc-block-components-button__text"},o))}},134:function(e,t,r){"use strict";var n=r(0);r(223),t.a=function(){return Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}},142:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return b}));var n,c=r(5),o=r.n(c),a=r(7);function s(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 i(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(a.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e}}},l={},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,r=t.type,c=t.eventType,a=t.id,s=t.callback,u=t.priority,b=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(r){case n.ADD_EVENT_CALLBACK:return b.set(a,{priority:u,callback:s}),i(i({},e),{},o()({},c,b));case n.REMOVE_EVENT_CALLBACK:return b.delete(a),i(i({},e),{},o()({},c,b))}}},148:function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return g}));var n=r(43),c=r.n(n),o=r(5),a=r.n(o),s=r(21),i=r.n(s),u=r(8),l=r.n(u),b=r(0),f=r(7),d=r(36),p=r.n(d);function O(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 m(e){for(var t=1;t0,getValidationErrorId:u};return Object(b.createElement)(j.Provider,{value:y},t)}},222:function(e,t){},223:function(e,t){},224:function(e,t){},275:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=(r(2),r(148)),o=(r(224),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,s=e.elementId,i=void 0===s?"":s,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r||"string"!=typeof r){var f=l(a)||{};if(!f.message||f.hidden)return null;r=f.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(i)},r))})},365:function(e,t){},372:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(142),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},373:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},374:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(6)),o=r.n(c),a=r(8),s=r.n(a),i=r(1),u=r(58),l=r(878),b={status:"pristine",hasError:!1,quantity:1,processingResponse:null,requestParams:{}},f=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"set_has_error":"set_no_error";return{type:t}},d=r(5),p=r.n(d);function O(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 m(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:b,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case"set_pristine":e=b;break;case"set_idle":e=t.status!==v?m(m({},t),{},{status:v}):t;break;case"set_disabled":e="disabled"!==t.status?m(m({},t),{},{status:"disabled"}):t;break;case"set_quantity":e=n!==t.quantity?m(m({},t),{},{quantity:n}):t;break;case"set_request_params":e=m(m({},t),{},{requestParams:m(m({},t.requestParams),o)});break;case"set_processing_response":e=m(m({},t),{},{processingResponse:o});break;case"set_processing":e=!1===(e="processing"!==t.status?m(m({},t),{},{status:"processing",hasError:!1}):t).hasError?e:m(m({},e),{},{hasError:!1});break;case"set_before_processing":e="before_processing"!==t.status?m(m({},t),{},{status:"before_processing",hasError:!1}):t;break;case"set_after_processing":e="after_processing"!==t.status?m(m({},t),{},{status:"after_processing"}):t;break;case"set_has_error":e=t.hasError?t:m(m({},t),{},{hasError:!0}),e="processing"===t.status||"before_processing"===t.status?m(m({},e),{},{status:v}):e;break;case"set_no_error":e=t.hasError?m(m({},t),{},{hasError:!1}):t}return e!==t&&"set_pristine"!==c&&"pristine"===e.status&&(e.status=v),e},h=r(142),g=r(372),y=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(g.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(g.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(g.a)("add_to_cart_before_processing",e)}},E=r(375),_=r(148),w=r(67),P=r(64),k=Object(n.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:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),A=function(){return Object(n.useContext)(k)},C=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(j,b),a=s()(o,2),d=a[0],p=a[1],O=Object(n.useReducer)(h.b,{}),m=s()(O,2),v=m[0],g=m[1],A=Object(u.a)(v),C=Object(w.a)(),S=C.addErrorNotice,x=C.removeNotices,D=Object(_.b)().setValidationErrors,N=Object(P.c)(),V=N.isSuccessResponse,R=N.isErrorResponse,T=N.isFailResponse,q=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:y(g).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:y(g).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:y(g).onAddToCartBeforeProcessing}}),[g]),F=Object(n.useMemo)((function(){return{resetForm:function(){p({type:"set_pristine"})},submitForm:function(){p({type:"set_before_processing"})},setQuantity:function(e){p(function(e){return{type:"set_quantity",quantity:e}}(e))},setHasError:function(e){p(f(e))},setRequestParams:function(e){p(function(e){return{type:"set_request_params",data:e}}(e))},setAfterProcessing:function(e){p({type:"set_processing_response",data:e}),p({type:"set_after_processing"})}}}),[]);Object(n.useEffect)((function(){var e=d.status,t=!r.id||!Object(l.a)(r);"disabled"!==e||t?"disabled"!==e&&t&&p({type:"set_disabled"}):p({type:"set_idle"})}),[d.status,r,p]),Object(n.useEffect)((function(){"before_processing"===d.status&&(x("error"),Object(E.a)(A,"add_to_cart_before_processing",{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&S(t),r&&D(r)})),p({type:"set_idle"})):p({type:"set_processing"})})))}),[d.status,D,S,x,p,A]),Object(n.useEffect)((function(){if("after_processing"===d.status){var e={processingResponse:d.processingResponse},t=function(e){var t=!1;return e.forEach((function(e){var r=e.message,n=e.messageContext;(R(e)||T(e))&&r&&(t=!0,S(r,n?{context:n}:void 0))})),t};if(d.hasError)return void Object(E.b)(A,"add_to_cart_after_processing_with_error",e).then((function(r){if(!t(r)){var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");S(c,{id:"add-to-cart"})}p({type:"set_idle"})}));Object(E.b)(A,"add_to_cart_after_processing_with_success",e).then((function(e){t(e)?p(f(!0)):p({type:"set_idle"})}))}}),[d.status,d.hasError,d.processingResponse,F,S,R,T,V,A]);var B=Object(l.b)(r),I={product:r,productType:r.type||"simple",productIsPurchasable:Object(l.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:B,showFormElements:c&&B,quantity:d.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:d.requestParams,isIdle:"idle"===d.status,isDisabled:"disabled"===d.status,isProcessing:"processing"===d.status,isBeforeProcessing:"before_processing"===d.status,isAfterProcessing:"after_processing"===d.status,hasError:d.hasError,eventRegistration:q,dispatchActions:F};return Object(n.createElement)(k.Provider,{value:I},t)},S=r(15),x=r.n(S),D=r(26),N=r(52);function V(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}var R=function(){var e=A(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,a=e.hasError,u=e.isProcessing,l=e.requestParams,b=Object(_.b)(),f=b.hasValidationErrors,d=b.showAllValidationErrors,O=Object(w.a)(),m=O.addErrorNotice,v=O.removeNotice,j=Object(N.a)().receiveCart,h=Object(n.useState)(!1),g=s()(h,2),y=g[0],E=g[1],P=!a&&u,k=Object(n.useCallback)((function(){return!f||(d(),{type:"error"})}),[f,d]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var C=Object(n.useCallback)((function(){E(!0),v("add-to-cart");var e=function(e){for(var t=1;t0?Object(i.sprintf)(
+/* translators: %s number of products in cart. */
+Object(i._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(i.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(L.a,{srcElement:M.a,alt:Object(i.__)("Done","woo-gutenberg-products-block")}))},U=function(){var e=A(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,u=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,f=e.hasError,d=e.dispatchActions,p=Object(q.useInnerBlockLayoutContext)().parentName,O=Object(Q.a)().dispatchStoreEvent,m=Object(W.a)(o.id||0).cartQuantity,v=Object(n.useState)(!1),j=s()(v,2),h=j[0],g=j[1],y=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return f||g(!0),!0}),0);return function(){e()}}),[b,f]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(K,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:m,isDisabled:u,isProcessing:l,isDone:h,onClick:function(){d.submitForm(),O("cart-add-item",{product:o,listName:p})}}):Object(n.createElement)(H,{className:"wc-block-components-product-add-to-cart-button",href:y.url,text:y.text||Object(i.__)("View Product","woo-gutenberg-products-block"),onClick:function(){O("product-view-link",{product:o,listName:p})}})},z=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},G=function(e){var t=e.reason,r=void 0===t?Object(i.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},J=function(){var e=A(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(G,null):t.id&&!t.is_in_stock?Object(n.createElement)(G,{reason:Object(i.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(z,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(U,null))},Y=(r(549),r(34)),X=r.n(Y),$=r(895),Z=r(11),ee=r(275),te={value:"",label:Object(i.__)("Select an option","woo-gutenberg-products-block")},re=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,a=e.value,s=void 0===a?"":a,u=e.onChange,l=void 0===u?function(){}:u,b=e.errorMessage,f=void 0===b?Object(i.__)("Please select a value.","woo-gutenberg-products-block"):b,d=Object(_.b)(),O=d.getValidationError,m=d.setValidationErrors,v=d.clearValidationError,j=t,h=O(j)||{};return Object(Z.useEffect)((function(){s?v(j):m(p()({},j,{message:f,hidden:!0}))}),[s,j,f,v,m]),Object(Z.useEffect)((function(){return function(){v(j)}}),[j,v]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)($.a,{label:Object(D.decodeEntities)(t),value:s||"",options:[te].concat(X()(c)),onChange:l,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),Object(n.createElement)(ee.a,{propertyName:j,elementId:j}))},ne=r(117);function ce(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 oe(e){for(var t=1;t0;return c.forEach((function(c){var a=e[c],s=oe(oe({},r),{},p()({},c,null)),i=o?ae(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(D.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n}(o,a,m)}),[m,o,a]);return Object(n.useEffect)((function(){if(!g){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(ne.b)(e))return{};var t=Object.keys(e),r={};return 0===t.length||t.forEach((function(t){var n,c=e[t],o=c.terms.filter((function(e){return e.default}));o.length>0&&(r[c.name]=null===(n=o[0])||void 0===n?void 0:n.slug)})),r}(t);e&&v(ie({},e)),y(!0)}}),[m,t,g]),Object(n.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(o).length?f(function(e,t,r){return ae(e,t,r)[0]||0}(o,a,m)):b>0&&f(0)}),[m,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[c,b,m]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(re,{key:e,attributeName:e,options:E[e],value:m[e],onChange:function(t){v(ie(ie({},m),{},p()({},e,t)))}})})))},le=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(F.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(ue,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},be=function(){var e=A(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(G,null):t.id&&!t.is_in_stock?Object(n.createElement)(G,{reason:Object(i.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(le,{product:t,dispatchers:a}),Object(n.createElement)(z,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(U,null))},fe=function(){return Object(n.createElement)(U,null)},de=r(888),pe=function(){return Object(n.createElement)(de.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},Oe=function(){return Object(n.createElement)(pe,null)},me=function(){var e=A(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(be,null):"grouped"===r?Object(n.createElement)(Oe,null):"external"===r?Object(n.createElement)(fe,null):"simple"===r||"variation"===r?Object(n.createElement)(J,null):null:Object(n.createElement)(U,null)};t.a=Object(B.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(q.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(F.isEmpty)(c)});return Object(n.createElement)(T,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(me,null)))}))},375:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return p}));var n=r(43),c=r.n(n),o=r(29),a=r.n(o),s=r(22),i=r.n(s),u=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},l=r(64);function b(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return f(e,void 0);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)?f(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}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 o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:1;return _(!0),e(t,n).then((function(){O("add-to-cart")})).catch((function(t){p(Object(u.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){_(!1)}))}}}},375:function(t,e,n){"use strict";n.r(e);var c=n(20),o=n.n(c),r=n(5),a=n.n(r),i=(n(8),n(7)),u=n.n(i),d=n(1),s=n(52),l=n(332),b=n(32),f=n(84),p=n(154),O=(n(331),function(t){var e=t.product,n=e.id,c=e.permalink,r=e.add_to_cart,a=e.has_options,i=e.is_purchasable,f=e.is_in_stock,p=Object(s.a)().dispatchStoreEvent,O=Object(l.a)(n),v=O.cartQuantity,j=O.addingToCart,m=O.addToCart,_=Number.isFinite(v)&&v>0,g=!a&&i&&f,w=Object(b.decodeEntities)((null==r?void 0:r.description)||""),h=_?Object(d.sprintf)(
+/* translators: %s number of products in cart. */
+Object(d._n)("%d in cart","%d in cart",v,"woo-gutenberg-products-block"),v):Object(b.decodeEntities)((null==r?void 0:r.text)||Object(d.__)("Add to cart","woo-gutenberg-products-block")),k=g?"button":"a",N={};return g?N.onClick=function(){m(),p("cart-add-item",{product:e})}:(N.href=c,N.rel="nofollow",N.onClick=function(){p("product-view-link",{product:e})}),React.createElement(k,o()({"aria-label":w,className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:_}),disabled:j},N),h)}),v=function(){return React.createElement("button",{className:u()("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)((function(t){var e=t.className,n=Object(f.useInnerBlockLayoutContext)().parentClassName,c=Object(f.useProductDataContext)().product;return React.createElement("div",{className:u()(e,"wp-block-button","wc-block-components-product-button",a()({},"".concat(n,"__product-add-to-cart"),n))},c.id?React.createElement(O,{product:c}):React.createElement(v,null))}))},51:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var c=n(5),o=n.n(c),r=n(0),a=n(100);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,c)}return n}function u(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:null;i.current.forEach((function(e){null!==t&&e.status!==t||c(e.id)}))},removeNotice:c}}),[c]),s=Object(r.useMemo)((function(){return{addDefaultNotice:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",t,u({},e))},addErrorNotice:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",t,u({},e))},addWarningNotice:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",t,u({},e))},addInfoNotice:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",t,u({},e))},addSuccessNotice:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",t,u({},e))}}}),[n]);return u(u(u({notices:e},d),s),{},{setIsSuppressed:o})}}}]);
\ 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..22e11eaf30c
--- /dev/null
+++ b/build/atomic-block-components/button.js
@@ -0,0 +1,3 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{478:function(t,o,c){"use strict";c.r(o);var e=c(10),n=c.n(e),a=c(5),d=c.n(a),r=c(0),u=(c(2),c(6)),b=c.n(u),i=c(1),l=c(78),s=c(776),p=c(26),_=c(41),k=c(81),w=(c(543),function(t){var o=t.product,c=o.id,e=o.permalink,a=o.add_to_cart,d=o.has_options,u=o.is_purchasable,_=o.is_in_stock,k=Object(l.a)().dispatchStoreEvent,w=Object(s.a)(c),m=w.cartQuantity,j=w.addingToCart,O=w.addToCart,f=Number.isFinite(m)&&m>0,v=!d&&u&&_,C=Object(p.decodeEntities)((null==a?void 0:a.description)||""),E=f?Object(i.sprintf)(
+/* translators: %s number of products in cart. */
+Object(i._n)("%d in cart","%d in cart",m,"woo-gutenberg-products-block"),m):Object(p.decodeEntities)((null==a?void 0:a.text)||Object(i.__)("Add to cart","woo-gutenberg-products-block")),h=v?"button":"a",g={};return v?g.onClick=function(){O(),k("cart-add-item",{product:o})}:(g.href=e,g.rel="nofollow",g.onClick=function(){k("product-view-link",{product:o})}),Object(r.createElement)(h,n()({"aria-label":C,className:b()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:f}),disabled:j},g),E)}),m=function(){return Object(r.createElement)("button",{className:b()("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(k.withProductDataContext)((function(t){var o=t.className,c=Object(_.useInnerBlockLayoutContext)().parentClassName,e=Object(_.useProductDataContext)().product;return Object(r.createElement)("div",{className:b()(o,"wp-block-button","wc-block-components-product-button",d()({},"".concat(c,"__product-add-to-cart"),c))},e.id?Object(r.createElement)(w,{product:e}):Object(r.createElement)(m,null))}))},543: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..db4031366d9
--- /dev/null
+++ b/build/atomic-block-components/category-list-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{335:function(e,t){},378:function(e,t,c){"use strict";c.r(t);var a=c(5),n=c.n(a),o=c(1),r=c(7),s=c.n(r),l=c(84),u=c(6),i=c(154);c(335),t.default=Object(i.withProductDataContext)((function(e){var t=e.className,c=Object(l.useInnerBlockLayoutContext)().parentClassName,a=Object(l.useProductDataContext)().product;return Object(u.isEmpty)(a.categories)?null:React.createElement("div",{className:s()(t,"wc-block-components-product-category-list",n()({},"".concat(c,"__product-category-list"),c))},Object(o.__)("Categories:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(a.categories).map((function(e){var t=e.name,c=e.link,a=e.slug;return React.createElement("li",{key:"category-list-item-".concat(a)},React.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..2b675375615
--- /dev/null
+++ b/build/atomic-block-components/category-list.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{482:function(e,t,c){"use strict";c.r(t);var n=c(5),o=c.n(n),a=c(0),r=c(1),s=c(6),l=c.n(s),u=c(41),i=c(7),b=c(81);c(546),t.default=Object(b.withProductDataContext)((function(e){var t=e.className,c=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(i.isEmpty)(n.categories)?null:Object(a.createElement)("div",{className:l()(t,"wc-block-components-product-category-list",o()({},"".concat(c,"__product-category-list"),c))},Object(r.__)("Categories:","woo-gutenberg-products-block")," ",Object(a.createElement)("ul",null,Object.values(n.categories).map((function(e){var t=e.name,c=e.link,n=e.slug;return Object(a.createElement)("li",{key:"category-list-item-".concat(n)},Object(a.createElement)("a",{href:c},t))}))))}))},546: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..abc11de99b6
--- /dev/null
+++ b/build/atomic-block-components/image-frontend.js
@@ -0,0 +1,3 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11,14],{295:function(e,t){},312:function(e,t,r){"use strict";r.r(t);var c=r(5),n=r.n(c),a=(r(8),r(1)),o=r(7),l=r.n(o),i=r(49),s=r(84),u=r(154);r(295),t.default=Object(u.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(s.useInnerBlockLayoutContext)().parentClassName,o=Object(s.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var u="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:l()("wc-block-components-product-sale-badge",t,u,n()({},"".concat(c,"__product-onsale"),c))},React.createElement(i.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},328:function(e,t){},403:function(e,t,r){"use strict";r.r(t);var c=r(154),n=r(20),a=r.n(n),o=r(5),l=r.n(o),i=r(4),s=r.n(i),u=(r(8),r(0)),p=r(1),d=r(7),b=r.n(d),m=r(2),g=r(84),f=r(52),O=r(312);function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function j(e){for(var t=1;t":n,u=e.maxPrice,d=void 0===u?null:u,b=e.minPrice,f=void 0===b?null:b,y=e.price,g=void 0===y?null:y,v=e.priceClassName,_=e.priceStyle,O=e.regularPrice,P=e.regularPriceClassName,N=e.regularPriceStyle,j=i()(c,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(r),r));l.includes("")||(l="",console.error("Price formats need to include the `` tag."));var w=O&&g!==O,S=React.createElement("span",{className:i()("wc-block-components-product-price__value",v)});return w?S=React.createElement(m,{currency:t,price:g,priceClassName:v,priceStyle:_,regularPrice:O,regularPriceClassName:P,regularPriceStyle:N}):null!==f&&null!==d?S=React.createElement(p,{currency:t,maxPrice:d,minPrice:f,priceClassName:v,priceStyle:_}):null!==g&&(S=React.createElement(o.a,{className:i()("wc-block-components-product-price__value",v),currency:t,value:g,style:_})),React.createElement("span",{className:j},Object(s.createInterpolateElement)(l,{price:S}))}},207:function(e,r){},327:function(e,r,c){"use strict";c.d(r,"a",(function(){return a})),c(219);var t=c(104),a=function(){return t.m>1}},373:function(e,r,c){"use strict";c.r(r);var t=c(5),a=c.n(t),n=(c(8),c(7)),o=c.n(n),l=c(159),i=c(60),u=c(84),s=c(218),p=c(327),m=c(154);r.default=Object(m.withProductDataContext)((function(e){var r,c,t,n,m,d,b,f=e.className,y=e.align,g=e.fontSize,v=e.customFontSize,_=e.saleFontSize,O=e.customSaleFontSize,P=e.color,N=e.customColor,j=e.saleColor,w=e.customSaleColor,S=Object(u.useInnerBlockLayoutContext)().parentClassName,C=Object(u.useProductDataContext)().product,E=o()(f,a()({},"".concat(S,"__product-price"),S));if(!C.id)return React.createElement(l.a,{align:y,className:E});var R=Object(s.getColorClassName)("color",P),x=Object(s.getFontSizeClass)(g),h=Object(s.getColorClassName)("color",j),k=Object(s.getFontSizeClass)(_),z=o()((r={"has-text-color":P||N,"has-font-size":g||v},a()(r,R,R),a()(r,x,x),r)),F=o()((c={"has-text-color":j||w,"has-font-size":_||O},a()(c,h,h),a()(c,k,k),c)),D={color:N,fontSize:v},T={color:w,fontSize:O},V=C.prices,B=Object(i.getCurrencyFromPriceResponse)(V),I=V.price!==V.regular_price,U=I?o()((t={},a()(t,"".concat(S,"__product-price__value"),S),a()(t,F,Object(p.a)()),t)):o()((n={},a()(n,"".concat(S,"__product-price__value"),S),a()(n,z,Object(p.a)()),n)),J=I?T:D;return React.createElement(l.a,{align:y,className:E,currency:B,price:V.price,priceClassName:U,priceStyle:Object(p.a)()?J:{},minPrice:null==V||null===(m=V.price_range)||void 0===m?void 0:m.min_amount,maxPrice:null==V||null===(d=V.price_range)||void 0===d?void 0:d.max_amount,regularPrice:V.regular_price,regularPriceClassName:o()((b={},a()(b,"".concat(S,"__product-price__regular"),S),a()(b,z,Object(p.a)()),b)),regularPriceStyle:Object(p.a)()?D:{}})}))},85:function(e,r,c){"use strict";var t=c(20),a=c.n(t),n=c(5),o=c.n(n),l=c(26),i=c.n(l),u=c(127),s=c(7),p=c.n(s),m=(c(156),["className","value","currency","onValueChange","displayType"]);function d(e,r){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),c.push.apply(c,t)}return c}function b(e){for(var r=1;r":o,u=e.maxPrice,b=void 0===u?null:u,d=e.minPrice,O=void 0===d?null:d,f=e.price,j=void 0===f?null:f,y=e.priceClassName,g=e.priceStyle,v=e.regularPrice,_=e.regularPriceClassName,P=e.regularPriceStyle,N=s()(c,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(r),r));i.includes("")||(i="",console.error("Price formats need to include the `` tag."));var w=v&&j!==v,S=Object(n.createElement)("span",{className:s()("wc-block-components-product-price__value",y)});return w?S=Object(n.createElement)(m,{currency:t,price:j,priceClassName:y,priceStyle:g,regularPrice:v,regularPriceClassName:_,regularPriceStyle:P}):null!==O&&null!==b?S=Object(n.createElement)(p,{currency:t,maxPrice:b,minPrice:O,priceClassName:y,priceStyle:g}):null!==j&&(S=Object(n.createElement)(l.a,{className:s()("wc-block-components-product-price__value",y),currency:t,value:j,style:g})),Object(n.createElement)("span",{className:N},Object(n.createInterpolateElement)(i,{price:S}))}},186:function(e,r){},220:function(e,r){},476:function(e,r,c){"use strict";c.r(r);var t=c(5),a=c.n(t),n=c(0),o=(c(2),c(6)),l=c.n(o),i=c(140),s=c(50),u=c(41),p=c(12),m=c(113),b=c(81);r.default=Object(b.withProductDataContext)((function(e){var r,c,t,o,b,d,O,f=e.className,j=e.align,y=e.fontSize,g=e.customFontSize,v=e.saleFontSize,_=e.customSaleFontSize,P=e.color,N=e.customColor,w=e.saleColor,S=e.customSaleColor,C=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,x=l()(f,a()({},"".concat(C,"__product-price"),C));if(!E.id)return Object(n.createElement)(i.a,{align:j,className:x});var h=Object(p.getColorClassName)("color",P),k=Object(p.getFontSizeClass)(y),z=Object(p.getColorClassName)("color",w),F=Object(p.getFontSizeClass)(v),D=l()((r={"has-text-color":P||N,"has-font-size":y||g},a()(r,h,h),a()(r,k,k),r)),T=l()((c={"has-text-color":w||S,"has-font-size":v||_},a()(c,z,z),a()(c,F,F),c)),V={color:N,fontSize:g},B={color:S,fontSize:_},I=E.prices,U=Object(s.getCurrencyFromPriceResponse)(I),J=I.price!==I.regular_price,M=J?l()((t={},a()(t,"".concat(C,"__product-price__value"),C),a()(t,T,Object(m.b)()),t)):l()((o={},a()(o,"".concat(C,"__product-price__value"),C),a()(o,D,Object(m.b)()),o)),W=J?B:V;return Object(n.createElement)(i.a,{align:j,className:x,currency:U,price:I.price,priceClassName:M,priceStyle:Object(m.b)()?W:{},minPrice:null==I||null===(b=I.price_range)||void 0===b?void 0:b.min_amount,maxPrice:null==I||null===(d=I.price_range)||void 0===d?void 0:d.max_amount,regularPrice:I.regular_price,regularPriceClassName:l()((O={},a()(O,"".concat(C,"__product-price__regular"),C),a()(O,D,Object(m.b)()),O)),regularPriceStyle:Object(m.b)()?V:{}})}))},59:function(e,r,c){"use strict";var t=c(10),a=c.n(t),n=c(5),o=c.n(n),l=c(21),i=c.n(l),s=c(0),u=c(178),p=c(6),m=c.n(p),b=(c(186),["className","value","currency","onValueChange","displayType"]);function d(e,r){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),c.push.apply(c,t)}return c}function O(e){for(var r=1;r0?e:0});e.default=Object(i.withProductDataContext)((function(t){var e=t.className,a=Object(u.useInnerBlockLayoutContext)().parentClassName,c=Object(u.useProductDataContext)().product,o=l(c);if(!o)return null;var i={width:o/5*100+"%"},p=Object(r.sprintf)(
+/* translators: %f is referring to the average rating value */
+Object(r.__)("Rated %f out of 5","woo-gutenberg-products-block"),o);return React.createElement("div",{className:s()(e,"wc-block-components-product-rating",n()({},"".concat(a,"__product-rating"),a))},React.createElement("div",{className:s()("wc-block-components-product-rating__stars","".concat(a,"__product-rating__stars")),role:"img","aria-label":p},React.createElement("span",{style:i},p)))}))}}]);
\ 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..18d1f0466c5
--- /dev/null
+++ b/build/atomic-block-components/rating.js
@@ -0,0 +1,3 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{477:function(t,e,c){"use strict";c.r(e);var a=c(5),n=c.n(a),r=c(0),o=(c(2),c(1)),s=c(6),u=c.n(s),i=c(41),l=c(81),p=(c(542),function(t){var e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0});e.default=Object(l.withProductDataContext)((function(t){var e=t.className,c=Object(i.useInnerBlockLayoutContext)().parentClassName,a=Object(i.useProductDataContext)().product,s=p(a);if(!s)return null;var l={width:s/5*100+"%"},b=Object(o.sprintf)(
+/* translators: %f is referring to the average rating value */
+Object(o.__)("Rated %f out of 5","woo-gutenberg-products-block"),s);return Object(r.createElement)("div",{className:u()(e,"wc-block-components-product-rating",n()({},"".concat(c,"__product-rating"),c))},Object(r.createElement)("div",{className:u()("wc-block-components-product-rating__stars","".concat(c,"__product-rating__stars")),role:"img","aria-label":b},Object(r.createElement)("span",{style:l},b)))}))},542: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..980d7f89deb
--- /dev/null
+++ b/build/atomic-block-components/sale-badge-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{295:function(e,t){},312:function(e,t,r){"use strict";r.r(t);var c=r(5),n=r.n(c),a=(r(8),r(1)),o=r(7),s=r.n(o),l=r(49),u=r(84),p=r(154);r(295),t.default=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(u.useInnerBlockLayoutContext)().parentClassName,o=Object(u.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var p="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:s()("wc-block-components-product-sale-badge",t,p,n()({},"".concat(c,"__product-onsale"),c))},React.createElement(l.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},49:function(e,t,r){"use strict";var c=r(5),n=r.n(c),a=r(0),o=r(7),s=r.n(o);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function u(e){for(var t=1;t");return-1===e?t:t.substr(0,e+4)},u=function(t){return t.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(t,e){return t.replace(/[\s|\.\,]+$/i,"")+e},i=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",c=u(t),r=c.split(" ").splice(0,e).join(" ");return Object(o.autop)(s(r,n))},l=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",r=u(t),a=r.slice(0,e);if(n)return Object(o.autop)(s(a,c));var i=a.match(/([\s]+)/g),l=i?i.length:0,p=r.slice(0,e+l);return Object(o.autop)(s(p,c))};e.a=function(t){var e=t.source,n=t.maxLength,u=void 0===n?15:n,s=t.countType,p=void 0===s?"words":s,d=t.className,m=void 0===d?"":d,v=Object(c.useMemo)((function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",c=Object(o.autop)(t),u=Object(r.count)(c,n);if(u<=e)return c;var s=a(c),p=Object(r.count)(s,n);return p<=e?s:"words"===n?i(s,e):l(s,e,"characters_including_spaces"===n)}(e,u,p)}),[e,u,p]);return React.createElement(c.RawHTML,{className:m},v)}},333:function(t,e){},376:function(t,e,n){"use strict";n.r(e);var c=n(5),r=n.n(c),o=(n(8),n(7)),a=n.n(o),u=n(173),s=n(104),i=n(84),l=n(154);n(333),e.default=Object(l.withProductDataContext)((function(t){var e=t.className,n=Object(i.useInnerBlockLayoutContext)().parentClassName,c=Object(i.useProductDataContext)().product;if(!c)return React.createElement("div",{className:a()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n))});var o=c.short_description?c.short_description:c.description;return o?React.createElement(u.a,{className:a()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n)),source:o,maxLength:150,countType:s.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..2dfbf7901e8
--- /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),r=c(135),o=c(105),a=function(t){var e=t.indexOf("");return-1===e?t:t.substr(0,e+4)},u=function(t){return t.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(t,e){return t.replace(/[\s|\.\,]+$/i,"")+e},i=function(t,e){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",n=u(t),r=n.split(" ").splice(0,e).join(" ");return Object(o.autop)(s(r,c))},l=function(t,e){var c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",r=u(t),a=r.slice(0,e);if(c)return Object(o.autop)(s(a,n));var i=a.match(/([\s]+)/g),l=i?i.length:0,p=r.slice(0,e+l);return Object(o.autop)(s(p,n))};e.a=function(t){var e=t.source,c=t.maxLength,u=void 0===c?15:c,s=t.countType,p=void 0===s?"words":s,d=t.className,m=void 0===d?"":d,v=Object(n.useMemo)((function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",n=Object(o.autop)(t),u=Object(r.count)(n,c);if(u<=e)return n;var s=a(n),p=Object(r.count)(s,c);return p<=e?s:"words"===c?i(s,e):l(s,e,"characters_including_spaces"===c)}(e,u,p)}),[e,u,p]);return Object(n.createElement)(n.RawHTML,{className:m},v)}},480:function(t,e,c){"use strict";c.r(e);var n=c(5),r=c.n(n),o=c(0),a=(c(2),c(6)),u=c.n(a),s=c(175),i=c(37),l=c(41),p=c(81);c(544),e.default=Object(p.withProductDataContext)((function(t){var e=t.className,c=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product;if(!n)return Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-summary",r()({},"".concat(c,"__product-summary"),c))});var a=n.short_description?n.short_description:n.description;return a?Object(o.createElement)(s.a,{className:u()(e,"wc-block-components-product-summary",r()({},"".concat(c,"__product-summary"),c)),source:a,maxLength:150,countType:i.o.wordCountType||"words"}):null}))},544: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..324fb1ef21d
--- /dev/null
+++ b/build/atomic-block-components/tag-list-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[18],{336:function(t,e){},379:function(t,e,c){"use strict";c.r(e);var a=c(5),n=c.n(a),o=c(1),s=(c(8),c(7)),l=c.n(s),u=c(84),r=c(6),i=c(154);c(336),e.default=Object(i.withProductDataContext)((function(t){var e=t.className,c=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;return Object(r.isEmpty)(a.tags)?null:React.createElement("div",{className:l()(e,"wc-block-components-product-tag-list",n()({},"".concat(c,"__product-tag-list"),c))},Object(o.__)("Tags:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(a.tags).map((function(t){var e=t.name,c=t.link,a=t.slug;return React.createElement("li",{key:"tag-list-item-".concat(a)},React.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..626154ee714
--- /dev/null
+++ b/build/atomic-block-components/tag-list.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{483:function(t,e,c){"use strict";c.r(e);var n=c(5),a=c.n(n),o=c(0),s=c(1),l=(c(2),c(6)),u=c.n(l),r=c(41),i=c(7),b=c(81);c(547),e.default=Object(b.withProductDataContext)((function(t){var e=t.className,c=Object(r.useInnerBlockLayoutContext)().parentClassName,n=Object(r.useProductDataContext)().product;return Object(i.isEmpty)(n.tags)?null:Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-tag-list",a()({},"".concat(c,"__product-tag-list"),c))},Object(s.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.tags).map((function(t){var e=t.name,c=t.link,n=t.slug;return Object(o.createElement)("li",{key:"tag-list-item-".concat(n)},Object(o.createElement)("a",{href:c},e))}))))}))},547: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..efd1c4b0dc9
--- /dev/null
+++ b/build/atomic-block-components/title-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[19],{172:function(e,t,n){"use strict";var o=n(20),c=n.n(o),r=n(26),l=n.n(r),a=n(32),i=n(7),s=n.n(i),u=(n(206),["className","disabled","name","permalink","rel","style","onClick"]);t.a=function(e){var t=e.className,n=void 0===t?"":t,o=e.disabled,r=void 0!==o&&o,i=e.name,d=e.permalink,p=void 0===d?"":d,b=e.rel,m=e.style,v=(e.onClick,l()(e,u)),f=s()("wc-block-components-product-name",n);if(r){var y=v;return React.createElement("span",c()({className:f},y,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(i)}}))}return React.createElement("a",c()({className:f,href:p,rel:b},v,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(i)},style:m}))}},206:function(e,t){},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n(219);var o=n(104),c=function(){return o.m>1}},329:function(e,t){},404:function(e,t,n){"use strict";n.r(t);var o=n(154),c=n(5),r=n.n(c),l=n(26),a=n.n(l),i=n(7),s=n.n(i),u=n(84),d=n(218),p=n(327),b=n(172),m=n(52),v=(n(329),["children","headingLevel","elementType"]),f=function(e){var t=e.children,n=e.headingLevel,o=e.elementType,c=void 0===o?"h".concat(n):o,r=a()(e,v);return React.createElement(c,r,t)},y=Object(o.withProductDataContext)((function(e){var t,n,o,c,l,a,i,v=e.className,y=e.headingLevel,O=void 0===y?2:y,g=e.showProductLink,h=void 0===g||g,j=e.align,w=e.textColor,k=e.fontSize,S=e.style,C=Object(u.useInnerBlockLayoutContext)().parentClassName,P=Object(u.useProductDataContext)().product,E=Object(m.a)().dispatchStoreEvent,L=Object(d.getColorClassName)("color",w),z=Object(d.getFontSizeClass)(k),N=s()("wp-block-woocommerce-product-title",(o={"has-text-color":w||(null==S||null===(t=S.color)||void 0===t?void 0:t.text)||(null==S?void 0:S.color)},r()(o,"has-font-size",k||(null==S||null===(n=S.typography)||void 0===n?void 0:n.fontSize)||(null==S?void 0:S.fontSize)),r()(o,L,L),r()(o,z,z),o)),_={fontSize:(null==S?void 0:S.fontSize)||(null==S||null===(c=S.typography)||void 0===c?void 0:c.fontSize),color:(null==S||null===(l=S.color)||void 0===l?void 0:l.text)||(null==S?void 0:S.color)};return P.id?React.createElement(f,{headingLevel:O,className:s()(v,"wc-block-components-product-title",(a={},r()(a,"".concat(C,"__product-title"),C),r()(a,"wc-block-components-product-title--align-".concat(j),j&&Object(p.a)()),a))},React.createElement(b.a,{className:s()(r()({},N,Object(p.a)())),disabled:!h,name:P.name,permalink:P.permalink,rel:h?"nofollow":"",onClick:function(){E("product-view-link",{product:P})},style:Object(p.a)()?_:{}})):React.createElement(f,{headingLevel:O,className:s()(v,"wc-block-components-product-title",(i={},r()(i,"".concat(C,"__product-title"),C),r()(i,"wc-block-components-product-title--align-".concat(j),j&&Object(p.a)()),r()(i,N,Object(p.a)()),i))})}));function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function g(e){for(var t=1;t 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' => '0a2291ba6f971673e6d698a8c221ab11');
\ 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..08e755d97c3
--- /dev/null
+++ b/build/attribute-filter-frontend.js
@@ -0,0 +1,27 @@
+!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=231)}([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,n){var r=n(77),o=n(78),i=n(61),a=n(79);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},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.lodash},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},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){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},,,function(e,t){e.exports=window.wp.htmlEntities},,function(e,t){e.exports=window.wp.a11y},,,function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;ne.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){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return b}));var r=n(4),o=n.n(r),i=n(9),a=n(11),u=n(0),c=n(19),s=n.n(c),l=n(45),p=n(96),d=n(55),f=function(e){var t=Object(d.a)();e=e||t;var n=Object(a.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(a.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(u.useCallback)((function(t){r(e,t)}),[e,r])]},m=function(e,t,n){var r=Object(d.a)();n=n||r;var o=Object(a.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),c=Object(a.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(u.useCallback)((function(t){c(n,e,t)}),[n,e,c])]},b=function(e,t){var n=Object(d.a)(),r=f(t=t||n),i=o()(r,2),a=i[0],c=i[1],m=Object(l.a)(a),b=Object(l.a)(e),g=Object(p.a)(b),h=Object(u.useRef)(!1);return Object(u.useEffect)((function(){s()(g,b)||(c(Object.assign({},m,b)),h.current=!0)}),[m,b,g,c]),h.current?[a,c]:[e,c]}},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],_n=!0,a=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);_n=!0);}catch(e){a=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(a)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,i=Object(r.useRef)(null),a=Object(r.useRef)([]),u=n.leading,c=void 0===n.trailing||n.trailing,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),p=Object(r.useRef)(!1),d=Object(r.useRef)(e);d.current=e;var f=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(i.current),i.current=null,a.current=[],l.current=null,s.current=!1}),[]);Object(r.useEffect)((function(){return p.current=!1,function(){p.current=!0}}),[]);var m=Object(r.useCallback)((function(){for(var e=[],n=0;n0&&Array.prototype.filter.call(u,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,a)})),d({Block:n,containers:u,getProps:r,getErrorBoundaryProps:o}),Array.prototype.forEach.call(c,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,i,a,u;r=(n=l(l({},e),{},{wrapper:t})).Block,o=n.getProps,i=n.getErrorBoundaryProps,a=n.selector,u=n.wrapper.querySelectorAll(a),d({Block:r,containers:u,getProps:o,getErrorBoundaryProps:i})}))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(9),o=n(11),i=n(0),a=n(45),u=n(83),c=function(e){var t=e.namespace,n=e.resourceName,c=e.resourceValues,s=void 0===c?[]:c,l=e.query,p=void 0===l?{}:l,d=e.shouldSelect,f=void 0===d||d;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var m=Object(i.useRef)({results:[],isLoading:!0}),b=Object(a.a)(p),g=Object(a.a)(s),h=Object(u.a)(),v=Object(o.useSelect)((function(e){if(!f)return null;var o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,b,g],a=o.getCollectionError.apply(o,i);return a&&h(a),{results:o.getCollection.apply(o,i),isLoading:!o.hasFinishedResolution("getCollection",i)}}),[t,n,g,b,f]);return null!==v&&(m.current=v),m.current}},,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 u})),n.d(t,"m",(function(){return c})),n.d(t,"i",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return p})),n.d(t,"j",(function(){return d})),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),i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=i.pluginUrl+"images/",u=i.pluginUrl+"build/",c=i.buildPhase,s=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,d=(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",{})},,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),o=n(80);function i(e,t){return e===t}function a(e,t,n){var a=n&&n.equalityFn?n.equalityFn:i,u=Object(r.useState)(e),c=u[0],s=u[1],l=Object(o.a)(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),p=l[0],d=l[1],f=l[2],m=Object(r.useRef)(e);return Object(r.useEffect)((function(){a(m.current,e)||(p(e),m.current=e)}),[e,p,a]),[c,d,f]}},function(e,t,n){"use strict";var r=n(1),o=(n(8),n(7)),i=n.n(o),a=n(49),u=(n(130),function(e){var t=e.className,n=e.disabled,o=e.label,u=void 0===o?Object(r.__)("Go","woo-gutenberg-products-block"):o,c=e.onClick,s=e.screenReaderLabel,l=void 0===s?Object(r.__)("Apply filter","woo-gutenberg-products-block"):s;return React.createElement("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:c},React.createElement(a.a,{label:u,screenReaderLabel:l}))});u.defaultProps={disabled:!1},t.a=u},,,,,,function(e,t){e.exports=window.wp.components},,,function(e,t,n){"use strict";var r=n(5),o=n.n(r),i=n(26),a=n.n(i),u=n(0),c=["srcElement","size"];function s(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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=a()(e,c);return Object(u.isValidElement)(t)?Object(u.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),a=i.length?i[0]:null;if(a&&a.slug&&Array.isArray(a.slug)&&a.slug.includes(o)){var u=a.slug.filter((function(e){return e!==o})),c=e.filter((function(e){return e.attribute!==n.taxonomy}));u.length>0&&(a.slug=u.sort(),c.push(a)),t(Object(r.sortBy)(c,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},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",a=e.filter((function(e){return e.attribute!==n.taxonomy}));0===o.length?t(a):(a.push({attribute:n.taxonomy,operator:i,slug:o.map((function(e){return e.slug})).sort()}),t(Object(r.sortBy)(a,"attribute")))}},function(e,t,n){"use strict";var r=n(42),o=n.n(r),i=n(4),a=n.n(i),u=n(1),c=(n(8),n(0)),s=n(7),l=n.n(s);n(163),t.a=function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,i=e.options,s=void 0===i?[]:i,p=e.checked,d=void 0===p?[]:p,f=e.isLoading,m=void 0!==f&&f,b=e.isDisabled,g=void 0!==b&&b,h=e.limit,v=void 0===h?10:h,y=Object(c.useState)(!1),w=a()(y,2),O=w[0],x=w[1],_=Object(c.useMemo)((function(){return o()(Array(5)).map((function(e,t){return React.createElement("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),j=Object(c.useMemo)((function(){var e=s.length-v;return!O&&React.createElement("li",{key:"show-more",className:"show-more"},React.createElement("button",{onClick:function(){x(!0)},"aria-expanded":!1,"aria-label":Object(u.sprintf)(
+/* translators: %s is referring the remaining count of options */
+Object(u._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(u.sprintf)(
+/* translators: %s number of options to reveal. */
+Object(u._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))}),[s,v,O]),E=Object(c.useMemo)((function(){return O&&React.createElement("li",{key:"show-less",className:"show-less"},React.createElement("button",{onClick:function(){x(!1)},"aria-expanded":!0,"aria-label":Object(u.__)("Show less options","woo-gutenberg-products-block")},Object(u.__)("Show less","woo-gutenberg-products-block")))}),[O]),I=Object(c.useMemo)((function(){var e=s.length>v+5;return React.createElement(React.Fragment,null,s.map((function(t,n){return React.createElement(c.Fragment,{key:t.value},React.createElement("li",e&&!O&&n>=v&&{hidden:!0},React.createElement("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:d.includes(t.value),disabled:g}),React.createElement("label",{htmlFor:t.value},t.label)),e&&n===v-1&&j)})),e&&E)}),[s,r,d,O,v,E,j,g]),S=l()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":m},t);return React.createElement("ul",{className:S},m?_:I)}},,,,,,,,,,,,function(e,t){},,,,function(e,t){},function(e,t){},,,,function(e,t,n){"use strict";e.exports=n(234)},,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n(5),o=n.n(r),i=n(42),a=n.n(i),u=n(21),c=n.n(u),s=n(4),l=n.n(s),p=n(0),d=n(118),f=n(6),m=n(45),b=n(75),g=n(102),h=n(55);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 y(e){for(var t=1;t=0||(o[n]=e[n]);return o}function x(){return(x=Object.assign||function(e){for(var t=1;tt||i>e&&a=t&&u>=n?i-e-r:a>t&&un?a-t+o:0}n(167);var P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&x>=0&&O<=f&&w<=d&&y>=D&&O<=N&&x>=H&&w<=A)return E;var B=getComputedStyle(P),L=parseInt(B.borderLeftWidth,10),V=parseInt(B.borderTopWidth,10),K=parseInt(B.borderRightWidth,10),F=parseInt(B.borderBottomWidth,10),q=0,U=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-L-K:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-F:0;if(s===P)q="start"===o?_:"end"===o?_-f:"nearest"===o?R(b,b+f,f,V,F,b+_,b+_+h,h):_-f/2,U="start"===i?j:"center"===i?j-d/2:"end"===i?j-d:R(m,m+d,d,L,K,m+j,m+j+v,v),q=Math.max(0,q+b),U=Math.max(0,U+m);else{q="start"===o?_-D-V:"end"===o?_-N+F+W:"nearest"===o?R(D,N,M,V,F+W,_,_+h,h):_-(D+M/2)+W/2,U="start"===i?j-H-L:"center"===i?j-(H+T/2)+$/2:"end"===i?j-A+K+$:R(H,A,T,L,K+$,j,j+v,v);var G=P.scrollLeft,Y=P.scrollTop;_+=Y-(q=Math.max(0,Math.min(Y+q,P.scrollHeight-M+W))),j+=G-(U=Math.max(0,Math.min(G+U,P.scrollWidth-T+$)))}E.push({el:P,top:q,left:U})}return E}(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 A(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function N(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 $(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 u=W(e,a,n,r,o);return-1===u?t>=n?-1:t:u}function W(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;u--)if(!r(u).hasAttribute("disabled"))return u;return o?e>0?W(1,0,n,r,!1):W(-1,n-1,n,r,!1):-1}function G(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(A(t,e,n)||r&&A(t,n.document.activeElement,n))}))}var Y=N((function(e){Q(e).textContent=""}),500);function z(e,t){var n=Q(t);e&&(n.textContent=e,Y(t))}function Q(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 X=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}),J=["refKey","ref"],Z=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],ee=["onKeyDown","onBlur","onChange","onInput","onChangeText"],te=["refKey","ref"],ne=["onMouseMove","onMouseDown","onClick","onPress","index","item"],re=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(C++),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=F(t),n.internalSetState(x({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=F(t),n.internalSetState(x({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,x({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var u=a?e(t):e;u=n.props.stateReducer(t,u),r=u.hasOwnProperty("selectedItem");var c={},s={};return r&&u.selectedItem!==t.selectedItem&&(o=u.selectedItem),u.type=u.type||0,Object.keys(u).forEach((function(e){t[e]!==u[e]&&(i[e]=u[e]),"type"!==e&&(s[e]=u[e],q(n.props,e)||(c[e]=u[e]))})),a&&u.hasOwnProperty("inputValue")&&n.props.onInputValueChange(u.inputValue,x({},n.getStateAndHelpers(),u)),c}),(function(){M(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,u=o.ref,c=O(o,J),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;n.getRootProps.called=!0,n.getRootProps.refKey=a,n.getRootProps.suppressRefError=l;var p=n.getState().isOpen;return x(((r={})[a]=B(u,n.rootRef),r.role="combobox",r["aria-expanded"]=p,r["aria-haspopup"]="listbox",r["aria-owns"]=p?n.menuId:null,r["aria-labelledby"]=n.labelId,r),c)},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=$(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=$(-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(x({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=x({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=x({},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=W(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=W(-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,u=O(t,Z),c=n.getState().isOpen,s={onClick:H(r,n.buttonHandleClick),onKeyDown:H(o,n.buttonHandleKeyDown),onKeyUp:H(i,n.buttonHandleKeyUp),onBlur:H(a,n.buttonHandleBlur)};return x({type:"button",role:"button","aria-label":c?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},u.disabled?{}:s,u)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=U(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(_(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 x({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 u,c=O(t,ee),s={},l=n.getState(),p=l.inputValue,d=l.isOpen,f=l.highlightedIndex;return c.disabled||((u={}).onChange=H(i,a,n.inputHandleChange),u.onKeyDown=H(r,n.inputHandleKeyDown),u.onBlur=H(o,n.inputHandleBlur),s=u),x({"aria-autocomplete":"list","aria-activedescendant":d&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":d?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},s,c)},n.inputHandleKeyDown=function(e){var t=U(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(_(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,u=o.ref,c=O(o,te),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;return n.getMenuProps.called=!0,n.getMenuProps.refKey=a,n.getMenuProps.suppressRefError=l,x(((r={})[a]=B(u,n.menuRef),r.role="listbox",r["aria-labelledby"]=c&&c["aria-label"]?null:n.labelId,r.id=n.menuId,r),c)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,a=r.onClick;r.onPress;var u=r.index,c=r.item,s=void 0===c?void 0:c,l=O(r,ne);void 0===u?(n.items.push(s),u=n.items.indexOf(s)):n.items[u]=s;var p=a,d=((t={onMouseMove:H(o,(function(){u!==n.getState().highlightedIndex&&(n.setHighlightedIndex(u,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:H(i,(function(e){e.preventDefault()}))}).onClick=H(p,(function(){n.selectItemAtIndex(u,{type:9})})),t),f=l.disabled?{onMouseDown:d.onMouseDown}:d;return x({id:n.getItemId(u),role:"option","aria-selected":n.getState().highlightedIndex===u},f,l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=F(e),n.internalSetState((function(t){var r=t.selectedItem;return x({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=F(e),n.internalSetState((function(t){var r=t.isOpen;return x({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),M(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=N((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(x({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,z(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,a=void 0===i?o:i,u=r.defaultIsOpen,c=r.initialIsOpen,s=void 0===c?u:c,l=r.initialInputValue,p=void 0===l?"":l,d=r.initialSelectedItem,f=void 0===d?null:d,m=n.getState({highlightedIndex:a,isOpen:s,inputValue:p,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,j(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]=q(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=$(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,u=this.getRootProps,c=this.getToggleButtonProps,s=this.getLabelProps,l=this.getMenuProps,p=this.getInputProps,d=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:u,getToggleButtonProps:c,getLabelProps:s,getMenuProps:l,getInputProps:p,getItemProps:d,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,!G(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=G(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){q(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=V(this.props.children,T);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=V(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:function(e){return"string"==typeof e.type}(t)?Object(E.cloneElement)(t,this.getRootProps(function(e){return e.props}(t))):void 0:null},r}(E.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:L,itemToString:function(e){return null==e?"":String(e)},onStateChange:T,onInputValueChange:T,onUserAction:T,onChange:T,onSelect:T,onOuterClick:T,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:D},e.stateChangeTypes=X,e}();N((function(e,t){z(e(),t)}),200),"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?E.useLayoutEffect:E.useEffect;var oe={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:D,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};v.a.array.isRequired,v.a.func,v.a.func,v.a.func,v.a.bool,v.a.number,v.a.number,v.a.number,v.a.bool,v.a.bool,v.a.bool,v.a.any,v.a.any,v.a.any,v.a.string,v.a.string,v.a.string,v.a.func,v.a.string,v.a.func,v.a.func,v.a.func,v.a.func,v.a.func,v.a.shape({addEventListener:v.a.func,removeEventListener:v.a.func,document:v.a.shape({getElementById:v.a.func,activeElement:v.a.any,body:v.a.any})}),P(P({},oe),{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.":""}}),v.a.array.isRequired,v.a.func,v.a.func,v.a.func,v.a.bool,v.a.number,v.a.number,v.a.number,v.a.bool,v.a.bool,v.a.bool,v.a.any,v.a.any,v.a.any,v.a.string,v.a.string,v.a.string,v.a.string,v.a.string,v.a.string,v.a.func,v.a.string,v.a.string,v.a.func,v.a.func,v.a.func,v.a.func,v.a.func,v.a.func,v.a.shape({addEventListener:v.a.func,removeEventListener:v.a.func,document:v.a.shape({getElementById:v.a.func,activeElement:v.a.any,body:v.a.any})}),x({},oe,{getA11yStatusMessage:L,circularNavigation:!0}),v.a.array,v.a.array,v.a.array,v.a.func,v.a.func,v.a.func,v.a.number,v.a.number,v.a.number,v.a.func,v.a.func,v.a.string,v.a.string,v.a.shape({addEventListener:v.a.func,removeEventListener:v.a.func,document:v.a.shape({getElementById:v.a.func,activeElement:v.a.any,body:v.a.any})});var ie=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,o=e.isDisabled,i=e.onFocus,a=e.onRemoveItem,u=e.placeholder,c=e.tabIndex,s=e.value;return React.createElement("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:o,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&a(t[t.length-1])},placeholder:u,tabIndex:c}))},ae=function(e){var t=e.children,n=e.onClick;return React.createElement("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},ue=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,o=e.highlightedIndex,i=e.options;return React.createElement("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),i.map((function(e,r){var i=t.includes(e.value);return React.createElement("li",n({key:e.value,className:w()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":i,"is-highlighted":o===r}),index:r,item:e.value,"aria-label":i?Object(c.sprintf)(
+/* translators: %s is referring to the filter option being removed. */
+Object(c.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)})))},ce=n(220),se=function(e){var t=e.onRemoveItem,n=e.option;return React.createElement(ce.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:function(){t(n.value)},ariaLabel:Object(c.sprintf)(
+/* translators: %s is referring to the filter option being removed. */
+Object(c.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},le=n(128),pe=n(215),de=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,o=Object(b.useRef)(null);return Object(b.useEffect)((function(){o.current.focus()}),[o]),React.createElement("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},React.createElement("button",{ref:o,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(c.sprintf)(
+/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */
+Object(c.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),React.createElement("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(c.sprintf)(
+/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */
+Object(c.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},React.createElement(le.a,{srcElement:pe.a,size:16})))};function fe(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 me(e){for(var t=1;t0,"is-open":d})},React.createElement("label",o({className:"screen-reader-text"}),u),React.createElement(ae,{isOpen:d,onClick:function(){return O.current.focus()}},i.map((function(e){var t=y.find((function(t){return t.value===e})),n=function(e){h(e),O.current.focus()};return m?React.createElement(se,{key:e,onRemoveItem:n,option:t}):React.createElement(de,{key:e,onClick:function(){return O.current.focus()},onRemoveItem:n,option:t})})),React.createElement(ie,{checked:i,getInputProps:t,inputRef:O,isDisabled:l,onFocus:f,onRemoveItem:function(e){h(e),O.current.focus()},placeholder:i.length>0&&m?null:Object(c.sprintf)(
+/* translators: %s attribute name. */
+Object(c.__)("Any %s","woo-gutenberg-products-block"),n),tabIndex:!m&&i.length>0?"-1":"0",value:p})),d&&!l&&React.createElement(ue,{checked:i,getItemProps:r,getMenuProps:a,highlightedIndex:s,options:y.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},ge=n(93),he=n(119),ve=n(19),ye=n.n(ve),we=n(32),Oe=n(125),xe=n(144),_e=n(145),je=[{value:"preview-1",name:"Blue",label:React.createElement(ge.a,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:React.createElement(ge.a,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:React.createElement(ge.a,{name:"Red",count:2})}],Ee={id:0,name:"preview",taxonomy:"preview",label:"Preview"};function Ie(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 Se(e){for(var t=1;t0}),P=R.results,C=R.isLoading,M="dropdown"!==t.displayStyle&&"and"===t.queryType,T=Object(m.a)({queryAttribute:{taxonomy:null==o?void 0:o.taxonomy,queryType:t.queryType},queryState:Se(Se({},j),{},{attributes:M?j.attributes:null})}),D=T.results,A=T.isLoading,N=Object(b.useCallback)((function(e){return D.attribute_counts?D.attribute_counts.find((function(t){return t.term===e})):null}),[D]);Object(b.useEffect)((function(){if(!C&&!A){var e=P.map((function(e){var n,r=N(e.id);if(!(r||h.includes(e.slug)||(n=e.slug,null!=j&&j.attributes&&j.attributes.some((function(e){var t=e.attribute,r=e.slug,i=void 0===r?[]:r;return t===o.taxonomy&&i.includes(n)})))))return null;var i=r?r.count:0;return{value:e.slug,name:Object(we.decodeEntities)(e.name),label:React.createElement(ge.a,{name:Object(we.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);x(e)}}),[null==o?void 0:o.taxonomy,P,C,t.showCounts,A,N,h,j.attributes]);var H=Object(b.useMemo)((function(){return S.filter((function(e){return e.attribute===(null==o?void 0:o.taxonomy)})).flatMap((function(e){return e.slug}))}),[S,null==o?void 0:o.taxonomy]),B=Object(l.a)(H),L=Object(p.a)(B);Object(b.useEffect)((function(){ye()(L,B)||ye()(h,B)||(v(B),t.showFilterButton||K(B))}),[h,B,L,K,t.showFilterButton]);var V=Object(b.useCallback)((function(e){return P.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[P]),K=Object(b.useCallback)((function(e){r||Object(_e.b)(S,k,o,V(e),"or"===t.queryType?"in":"and")}),[r,S,k,o,V,t.queryType]),F="dropdown"!==t.displayStyle||"or"===t.queryType,q=Object(b.useCallback)((function(e){var n,r=function(e){return O.find((function(t){return t.value===e})).name},o=function(e){var t=e.filterAdded,n=e.filterRemoved,o=t?r(t):null,i=n?r(n):null;o&&i?Object(s.speak)(Object(c.sprintf)(
+/* translators: %1$s and %2$s are attribute terms (for example: 'red', 'blue', 'large'...). */
+Object(c.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),o,i)):o?Object(s.speak)(Object(c.sprintf)(
+/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */
+Object(c.__)("%s filter added.","woo-gutenberg-products-block"),o)):i&&Object(s.speak)(Object(c.sprintf)(
+/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */
+Object(c.__)("%s filter removed.","woo-gutenberg-products-block"),i))},i=h.includes(e);F?(n=h.filter((function(t){return t!==e})),i?o({filterRemoved:e}):(n.push(e),n.sort(),o({filterAdded:e}))):(n=i?[]:[e],o({filterAdded:i?null:e,filterRemoved:1===h.length?h[0]:null})),v(n),t.showFilterButton||K(n)}),[h,O,F,K,t.showFilterButton]);if(!o)return r?React.createElement(Oe.Notice,{status:"warning",isDismissible:!1},React.createElement("p",null,Object(c.__)("Please select an attribute to use this filter!","woo-gutenberg-products-block"))):null;if(0===O.length&&!C)return r?React.createElement(Oe.Notice,{status:"warning",isDismissible:!1},React.createElement("p",null,Object(c.__)("The selected attribute does not have any term assigned to products.","woo-gutenberg-products-block"))):null;var U="h".concat(t.headingLevel),$=!t.isPreview&&C,W=!t.isPreview&&A;return React.createElement(React.Fragment,null,!r&&t.heading&&O.length>0&&React.createElement(U,{className:"wc-block-attribute-filter__title"},t.heading),React.createElement("div",{className:"wc-block-attribute-filter style-".concat(t.displayStyle)},"dropdown"===t.displayStyle?React.createElement(be,{attributeLabel:o.label,checked:h,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:$,multiple:F,onChange:q,options:O}):React.createElement(g.a,{className:"wc-block-attribute-filter-list",options:O,checked:h,onChange:q,isLoading:$,isDisabled:W}),t.showFilterButton&&React.createElement(he.a,{className:"wc-block-attribute-filter__button",disabled:$||W,onClick:function(){return K(h)}})))},getProps:function(e){return{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}}}})}]);
\ 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..d81f712c50c
--- /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' => 'b821e441a0ed0857d1be7e5a1a832a58');
\ No newline at end of file
diff --git a/build/attribute-filter.js b/build/attribute-filter.js
new file mode 100644
index 00000000000..2a0a5238e8c
--- /dev/null
+++ b/build/attribute-filter.js
@@ -0,0 +1,33 @@
+this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var r,a,l=t[0],i=t[1],u=t[2],b=0,d=[];b0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=e.filter((function(e){return e.attribute===n.taxonomy})),a=o.length?o[0]:null;if(a&&a.slug&&Array.isArray(a.slug)&&a.slug.includes(c)){var l=a.slug.filter((function(e){return e!==c})),i=e.filter((function(e){return e.attribute!==n.taxonomy}));l.length>0&&(a.slug=l.sort(),i.push(a)),t(Object(r.sortBy)(i,"attribute"))}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=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",a=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(a):(a.push({attribute:n.taxonomy,operator:o,slug:c.map((function(e){return e.slug})).sort()}),t(Object(r.sortBy)(a,"attribute")))}},247:function(e,t,n){"use strict";var r=n(34),c=n.n(r),o=n(8),a=n.n(o),l=n(0),i=n(1),u=(n(2),n(6)),s=n.n(u);n(331),t.a=function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,o=e.options,u=void 0===o?[]:o,b=e.checked,d=void 0===b?[]:b,p=e.isLoading,f=void 0!==p&&p,m=e.isDisabled,O=void 0!==m&&m,v=e.limit,w=void 0===v?10:v,g=Object(l.useState)(!1),j=a()(g,2),h=j[0],y=j[1],_=Object(l.useMemo)((function(){return c()(Array(5)).map((function(e,t){return Object(l.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),k=Object(l.useMemo)((function(){var e=u.length-w;return!h&&Object(l.createElement)("li",{key:"show-more",className:"show-more"},Object(l.createElement)("button",{onClick:function(){y(!0)},"aria-expanded":!1,"aria-label":Object(i.sprintf)(
+/* translators: %s is referring the remaining count of options */
+Object(i._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(i.sprintf)(
+/* translators: %s number of options to reveal. */
+Object(i._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))}),[u,w,h]),E=Object(l.useMemo)((function(){return h&&Object(l.createElement)("li",{key:"show-less",className:"show-less"},Object(l.createElement)("button",{onClick:function(){y(!1)},"aria-expanded":!0,"aria-label":Object(i.__)("Show less options","woo-gutenberg-products-block")},Object(i.__)("Show less","woo-gutenberg-products-block")))}),[h]),x=Object(l.useMemo)((function(){var e=u.length>w+5;return Object(l.createElement)(l.Fragment,null,u.map((function(t,n){return Object(l.createElement)(l.Fragment,{key:t.value},Object(l.createElement)("li",e&&!h&&n>=w&&{hidden:!0},Object(l.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:d.includes(t.value),disabled:O}),Object(l.createElement)("label",{htmlFor:t.value},t.label)),e&&n===w-1&&k)})),e&&E)}),[u,r,d,h,w,E,k,O]),P=s()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":f},t);return Object(l.createElement)("ul",{className:P},f?_:x)}},25:function(e,t){e.exports=window.wc.wcBlocksData},255:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(21),a=n.n(o),l=n(0),i=(n(2),n(6)),u=n.n(i),s=n(1),b=n(61),d=n(330),p=(n(195),["text","screenReaderText","element","className","radius","children"]),f=function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,o=e.element,i=void 0===o?"li":o,s=e.className,b=void 0===s?"":s,d=e.radius,f=void 0===d?"small":d,m=e.children,O=void 0===m?null:m,v=a()(e,p),w=i,g=u()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+f),j=Boolean(r&&r!==t);return Object(l.createElement)(w,c()({className:g},v),Object(l.createElement)("span",{"aria-hidden":j,className:"wc-block-components-chip__text"},t),j&&Object(l.createElement)("span",{className:"screen-reader-text"},r),O)},m=["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"];t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,o=void 0===r?"":r,i=e.disabled,p=void 0!==i&&i,O=e.onRemove,v=void 0===O?function(){}:O,w=e.removeOnAnyClick,g=void 0!==w&&w,j=e.text,h=e.screenReaderText,y=void 0===h?"":h,_=a()(e,m),k=g?"span":"button";if(!n){var E=y&&"string"==typeof y?y:j;n="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)}var x={"aria-label":n,disabled:p,onClick:v,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||v()}},P=g?x:{},C=g?{"aria-hidden":!0}:x;return Object(l.createElement)(f,c()({},_,P,{className:u()(o,"is-removable"),element:g?"button":_.element,screenReaderText:y,text:j}),Object(l.createElement)(k,c()({className:"wc-block-components-chip__remove"},C),Object(l.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:d.a,size:16})))}},26:function(e,t){e.exports=window.wp.htmlEntities},27:function(e,t){e.exports=window.wp.primitives},28:function(e,t){e.exports=window.moment},3:function(e,t){e.exports=window.wp.components},329:function(e,t){},330:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(21),a=n.n(o),l=n(0),i=n(27),u=["className","size"],s=Object(l.createElement)((function(e){var t=e.className,n=e.size,r=a()(e,u);return Object(l.createElement)(i.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),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=s},331:function(e,t){},35:function(e,t){e.exports=window.wp.dataControls},36:function(e,t){e.exports=window.wp.isShallowEqual},4:function(e,t){e.exports=window.wc.wcSettings},42:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(0),a=n(6),l=n.n(a);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 u(e){for(var t=1;t0&&l(t[t.length-1])},placeholder:i,tabIndex:u}))},B=function(e){var t=e.children,n=e.onClick;return Object(o.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},D=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,c=e.highlightedIndex,l=e.options;return Object(o.createElement)("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),l.map((function(e,r){var l=t.includes(e.value);return Object(o.createElement)("li",n({key:e.value,className:b()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":l,"is-highlighted":c===r}),index:r,item:e.value,"aria-label":l?Object(a.sprintf)(
+/* translators: %s is referring to the filter option being removed. */
+Object(a.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)})))},I=n(255),V=function(e){var t=e.onRemoveItem,n=e.option;return Object(o.createElement)(I.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:function(){t(n.value)},ariaLabel:Object(a.sprintf)(
+/* translators: %s is referring to the filter option being removed. */
+Object(a.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},F=n(330),M=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,c=Object(o.useRef)(null);return Object(o.useEffect)((function(){c.current.focus()}),[c]),Object(o.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(o.createElement)("button",{ref:c,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(a.sprintf)(
+/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */
+Object(a.__)("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:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(a.sprintf)(
+/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */
+Object(a.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},Object(o.createElement)(i.a,{srcElement:F.a,size:16})))};function A(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;t0,"is-open":f})},Object(o.createElement)("label",c({className:"screen-reader-text"}),u),Object(o.createElement)(B,{isOpen:f,onClick:function(){return h.current.focus()}},l.map((function(e){var t=j.find((function(t){return t.value===e})),n=function(e){w(e),h.current.focus()};return O?Object(o.createElement)(V,{key:e,onRemoveItem:n,option:t}):Object(o.createElement)(M,{key:e,onClick:function(){return h.current.focus()},onRemoveItem:n,option:t})})),Object(o.createElement)(T,{checked:l,getInputProps:t,inputRef:h,isDisabled:d,onFocus:m,onRemoveItem:function(e){w(e),h.current.focus()},placeholder:l.length>0&&O?null:Object(a.sprintf)(
+/* translators: %s attribute name. */
+Object(a.__)("Any %s","woo-gutenberg-products-block"),n),tabIndex:!O&&l.length>0?"-1":"0",value:p})),f&&!d&&Object(o.createElement)(D,{checked:l,getItemProps:r,getMenuProps:i,highlightedIndex:s,options:j.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},q=n(129),G=n(179),Y=n(36),K=n.n(Y),Q=n(26),U=n(245),W=n(246),J=[{value:"preview-1",name:"Blue",label:Object(o.createElement)(q.a,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(o.createElement)(q.a,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(o.createElement)(q.a,{name:"Red",count:2})}],$={id:0,name:"preview",taxonomy:"preview",label:"Preview"};function X(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 Z(e){for(var t=1;t0}),k=_.results,L=_.isLoading,T="dropdown"!==t.displayStyle&&"and"===t.queryType,B=Object(N.a)({queryAttribute:{taxonomy:null==c?void 0:c.taxonomy,queryType:t.queryType},queryState:Z(Z({},w),{},{attributes:T?w.attributes:null})}),D=B.results,I=B.isLoading,V=Object(o.useCallback)((function(e){return D.attribute_counts?D.attribute_counts.find((function(t){return t.term===e})):null}),[D]);Object(o.useEffect)((function(){if(!L&&!I){var e=k.map((function(e){var n,r=V(e.id);if(!(r||u.includes(e.slug)||(n=e.slug,null!=w&&w.attributes&&w.attributes.some((function(e){var t=e.attribute,r=e.slug,o=void 0===r?[]:r;return t===c.taxonomy&&o.includes(n)})))))return null;var a=r?r.count:0;return{value:e.slug,name:Object(Q.decodeEntities)(e.name),label:Object(o.createElement)(q.a,{name:Object(Q.decodeEntities)(e.name),count:t.showCounts?a:null})}})).filter(Boolean);O(e)}}),[null==c?void 0:c.taxonomy,k,L,t.showCounts,I,V,u,w.attributes]);var F=Object(o.useMemo)((function(){return h.filter((function(e){return e.attribute===(null==c?void 0:c.taxonomy)})).flatMap((function(e){return e.slug}))}),[h,null==c?void 0:c.taxonomy]),M=Object(x.a)(F),A=Object(P.a)(M);Object(o.useEffect)((function(){K()(A,M)||K()(u,M)||(s(M),t.showFilterButton||Y(M))}),[u,M,A,Y,t.showFilterButton]);var H=Object(o.useCallback)((function(e){return k.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[k]),Y=Object(o.useCallback)((function(e){r||Object(W.b)(h,y,c,H(e),"or"===t.queryType?"in":"and")}),[r,h,y,c,H,t.queryType]),X="dropdown"!==t.displayStyle||"or"===t.queryType,ee=Object(o.useCallback)((function(e){var n,r=function(e){return f.find((function(t){return t.value===e})).name},c=function(e){var t=e.filterAdded,n=e.filterRemoved,c=t?r(t):null,o=n?r(n):null;c&&o?Object(E.speak)(Object(a.sprintf)(
+/* translators: %1$s and %2$s are attribute terms (for example: 'red', 'blue', 'large'...). */
+Object(a.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),c,o)):c?Object(E.speak)(Object(a.sprintf)(
+/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */
+Object(a.__)("%s filter added.","woo-gutenberg-products-block"),c)):o&&Object(E.speak)(Object(a.sprintf)(
+/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */
+Object(a.__)("%s filter removed.","woo-gutenberg-products-block"),o))},o=u.includes(e);X?(n=u.filter((function(t){return t!==e})),o?c({filterRemoved:e}):(n.push(e),n.sort(),c({filterAdded:e}))):(n=o?[]:[e],c({filterAdded:o?null:e,filterRemoved:1===u.length?u[0]:null})),s(n),t.showFilterButton||Y(n)}),[u,f,X,Y,t.showFilterButton]);if(!c)return r?Object(o.createElement)(m.Notice,{status:"warning",isDismissible:!1},Object(o.createElement)("p",null,Object(a.__)("Please select an attribute to use this filter!","woo-gutenberg-products-block"))):null;if(0===f.length&&!L)return r?Object(o.createElement)(m.Notice,{status:"warning",isDismissible:!1},Object(o.createElement)("p",null,Object(a.__)("The selected attribute does not have any term assigned to products.","woo-gutenberg-products-block"))):null;var te="h".concat(t.headingLevel),ne=!t.isPreview&&L,re=!t.isPreview&&I;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&f.length>0&&Object(o.createElement)(te,{className:"wc-block-attribute-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-attribute-filter style-".concat(t.displayStyle)},"dropdown"===t.displayStyle?Object(o.createElement)(z,{attributeLabel:c.label,checked:u,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:ne,multiple:X,onChange:ee,options:f}):Object(o.createElement)(R.a,{className:"wc-block-attribute-filter-list",options:f,checked:u,onChange:ee,isLoading:ne,isDisabled:re}),t.showFilterButton&&Object(o.createElement)(G.a,{className:"wc-block-attribute-filter__button",disabled:ne||re,onClick:function(){return Y(u)}})))},te=(n(788),Object(g.getSetting)("attributes",[])),ne=Object(m.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=e.debouncedSpeak,c=t.attributeId,l=t.className,s=t.displayStyle,b=t.heading,d=t.headingLevel,_=t.isPreview,k=t.queryType,E=t.showCounts,x=t.showFilterButton,P=Object(o.useState)(!c&&!_),C=p()(P,2),S=C[0],N=C[1],R=function(e){if(e&&e.length){var t=e[0].id,r=te.find((function(e){return e.attribute_id===t.toString()}));if(r&&c!==t){var o=r.attribute_label;n({attributeId:t,heading:Object(a.sprintf)(
+/* translators: %s attribute name. */
+Object(a.__)("Filter by %s","woo-gutenberg-products-block"),o)})}}},L=function(e){var t=e.isCompact,n={clear:Object(a.__)("Clear selected attribute","woo-gutenberg-products-block"),list:Object(a.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(a.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(a.__)("Search for a product attribute:","woo-gutenberg-products-block"),selected:function(e){return Object(a.sprintf)(
+/* translators: %d is the number of attributes selected. */
+Object(a._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e)},updated:Object(a.__)("Product attribute search results updated.","woo-gutenberg-products-block")},r=Object(w.sortBy)(Object(w.toArray)(Object(w.mapValues)(te,(function(e){return{id:parseInt(e.attribute_id,10),name:e.attribute_label}}))),"name");return Object(o.createElement)(v.b,{className:"woocommerce-product-attributes",list:r,selected:r.filter((function(e){return e.id===c})),onChange:R,messages:n,isSingle:!0,isCompact:t})};return 0===Object.keys(te).length?Object(o.createElement)(m.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(i.a,{srcElement:u.a}),label:Object(a.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(a.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(o.createElement)("p",null,Object(a.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woo-gutenberg-products-block")),Object(o.createElement)(m.Button,{className:"wc-block-attribute-filter__add-attribute-button",isSecondary:!0,href:Object(g.getAdminLink)("edit.php?post_type=product&page=product_attributes")},Object(a.__)("Add new attribute","woo-gutenberg-products-block")+" ",Object(o.createElement)(i.a,{srcElement:O.a})),Object(o.createElement)(m.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(a.__)("Learn more","woo-gutenberg-products-block"))):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(f.BlockControls,null,Object(o.createElement)(m.ToolbarGroup,{controls:[{icon:"edit",title:Object(a.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return N(!S)},isActive:S}]})),Object(o.createElement)(f.InspectorControls,{key:"inspector"},Object(o.createElement)(m.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(m.ToggleControl,{label:Object(a.__)("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:function(){return n({showCounts:!E})}}),Object(o.createElement)("p",null,Object(a.__)("Heading Level","woo-gutenberg-products-block")),Object(o.createElement)(j.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:d,onChange:function(e){return n({headingLevel:e})}})),Object(o.createElement)(m.PanelBody,{title:Object(a.__)("Block Settings","woo-gutenberg-products-block")},Object(o.createElement)(y.a,{label:Object(a.__)("Query Type","woo-gutenberg-products-block"),help:"and"===k?Object(a.__)("Products that have all of the selected attributes will be shown.","woo-gutenberg-products-block"):Object(a.__)("Products that have any of the selected attributes will be shown.","woo-gutenberg-products-block"),value:k,options:[{label:Object(a.__)("And","woo-gutenberg-products-block"),value:"and"},{label:Object(a.__)("Or","woo-gutenberg-products-block"),value:"or"}],onChange:function(e){return n({queryType:e})}}),Object(o.createElement)(y.a,{label:Object(a.__)("Display Style","woo-gutenberg-products-block"),value:s,options:[{label:Object(a.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(a.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:function(e){return n({displayStyle:e})}}),Object(o.createElement)(m.ToggleControl,{label:Object(a.__)("Filter button","woo-gutenberg-products-block"),help:x?Object(a.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(a.__)("Products will update as options are selected.","woo-gutenberg-products-block"),checked:x,onChange:function(e){return n({showFilterButton:e})}})),Object(o.createElement)(m.PanelBody,{title:Object(a.__)("Filter Products by Attribute","woo-gutenberg-products-block"),initialOpen:!1},L({isCompact:!0}))),S?Object(o.createElement)(m.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(i.a,{srcElement:u.a}),label:Object(a.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(a.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(o.createElement)("div",{className:"wc-block-attribute-filter__selection"},L({isCompact:!1}),Object(o.createElement)(m.Button,{isPrimary:!0,onClick:function(){N(!1),r(Object(a.__)("Showing Filter Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(a.__)("Done","woo-gutenberg-products-block")))):Object(o.createElement)("div",{className:l},Object(o.createElement)(h.a,{className:"wc-block-attribute-filter__title",headingLevel:d,heading:b,onChange:function(e){return n({heading:e})}}),Object(o.createElement)(m.Disabled,null,Object(o.createElement)(ee,{attributes:t,isEditor:!0}))))}));Object(l.registerBlockType)("woocommerce/attribute-filter",{title:Object(a.__)("Filter Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(i.a,{srcElement:u.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("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(a.__)("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:ne,save:function(e){var t=e.attributes,n=t.className,r=t.showCounts,a=t.queryType,l=t.attributeId,i=t.heading,u=t.headingLevel,s=t.displayStyle,d=t.showFilterButton,p={"data-attribute-id":l,"data-show-counts":r,"data-query-type":a,"data-heading":i,"data-heading-level":u};return"list"!==s&&(p["data-display-style"]=s),d&&(p["data-show-filter-button"]=d),Object(o.createElement)("div",c()({className:b()("is-loading",n)},p),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"}))}})},85:function(e,t){e.exports=window.wp.viewport},90:function(e,t){e.exports=window.wp.date}});
\ 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..5b24a1a2c36
--- /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' => 'c08696f713ac2f409d9bd31f36c3735a');
\ No newline at end of file
diff --git a/build/blocks-checkout.js b/build/blocks-checkout.js
new file mode 100644
index 00000000000..928e73d09ac
--- /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=162)}([function(e,t){e.exports=window.wp.element},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.i18n},,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;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],_n=!0,c=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);_n=!0);}catch(e){c=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(c)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n1)for(var n=1;n=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){},function(e,t){},function(e,t){},function(e,t){function n(t,r){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,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t),n.d(t,"TotalsItem",(function(){return V})),n.d(t,"Subtotal",(function(){return H})),n.d(t,"TotalsTaxes",(function(){return z})),n.d(t,"TotalsFees",(function(){return K})),n.d(t,"TotalsWrapper",(function(){return $})),n.d(t,"ExperimentalOrderMeta",(function(){return it})),n.d(t,"ExperimentalDiscountsMeta",(function(){return st})),n.d(t,"ExperimentalOrderShippingPackages",(function(){return dt})),n.d(t,"Panel",(function(){return wt})),n.d(t,"Button",(function(){return ln})),n.d(t,"Label",(function(){return dn})),n.d(t,"CheckboxControl",(function(){return hn})),n.d(t,"mustContain",(function(){return bn})),n.d(t,"extensionCartUpdate",(function(){return yn})),n.d(t,"hasValidFills",(function(){return et})),n.d(t,"useSlot",(function(){return Qe})),n.d(t,"createSlotFill",(function(){return tt})),n.d(t,"__experimentalRegisterCheckoutFilters",(function(){return En})),n.d(t,"__experimentalApplyCheckoutFilter",(function(){return kn})),n.d(t,"hasInnerBlocks",(function(){return Cn})),n.d(t,"getRegisteredBlocks",(function(){return Fn})),n.d(t,"registerCheckoutBlock",(function(){return Dn})),n.d(t,"innerBlockAreas",(function(){return jn})),n.d(t,"SlotFillProvider",(function(){return Ce}));var r=n(0),o=n(5),i=n.n(o),c=n(13),a=n.n(c),u=n(1),s=n.n(u),l=n(20),f=n.n(l),p=n(17),d=n.n(p);function m(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 P(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function _(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 C(e,t,n){return Math.min(Math.max(e,t),n)}function F(e){return Math.max(e.selectionStart,e.selectionEnd)}var T={thousandSeparator:w.oneOfType([w.string,w.oneOf([!0])]),decimalSeparator:w.string,allowedDecimalSeparators:w.arrayOf(w.string),thousandsGroupStyle:w.oneOf(["thousand","lakh","wan"]),decimalScale:w.number,fixedDecimalScale:w.bool,displayType:w.oneOf(["input","text"]),prefix:w.string,suffix:w.string,format:w.oneOfType([w.string,w.func]),removeFormatting:w.func,mask:w.oneOfType([w.string,w.arrayOf(w.string)]),value:w.oneOfType([w.number,w.string]),defaultValue:w.oneOfType([w.number,w.string]),isNumericString:w.bool,customInput:w.elementType,allowNegative:w.bool,allowEmptyFormatting:w.bool,allowLeadingZeros:w.bool,onValueChange:w.func,onKeyDown:w.func,onMouseUp:w.func,onChange:w.func,onFocus:w.func,onBlur:w.func,type:w.oneOf(["text","tel","password"]),isAllowed:w.func,renderText:w.func,getInputRef:w.oneOfType([w.func,w.shape({current:w.any})])},N={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:j,onChange:j,onKeyDown:j,onMouseUp:j,onFocus:j,onBlur:j,isAllowed:function(){return!0}},D=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=b(t).call(this,e))||"object"!=typeof r&&"function"!=typeof r?g(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(g(n)),n.onKeyDown=n.onKeyDown.bind(g(n)),n.onMouseUp=n.onMouseUp.bind(g(n)),n.onFocus=n.onFocus.bind(g(n)),n.onBlur=n.onBlur.bind(g(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&&v(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=S(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(E(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?"":"|"+E(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,t),setTimeout((function(){e.value===n&&_(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=C(t,0,e.length),!c){var a="-"===e[0];return C(t,o.length+(a?1:0),e.length-i.length)}if("function"==typeof c)return t;if("#"===c[t]&&x(e[t]))return t;if("#"===c[t-1]&&x(e[t-1]))return t;var u=c.indexOf("#");t=C(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]||!x(e[l]));)l-=1;return!x(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=S(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=k(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=P(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 j=this.removeFormatting(n),x=k(j,i),S=x.beforeDecimal,E=x.afterDecimal,P=x.addNegation,_=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,s=r.format,l=this.state.value,f=(e=this.props,t=T,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),p=h({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(s)?"numeric":void 0},f,{type:o,value:l,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===i)return a?a(l)||null:d.a.createElement("span",h({},f,{ref:u}),l);if(c){var m=c;return d.a.createElement(m,h({},p,{ref:u}))}return d.a.createElement("input",h({},p,{ref:u}))}}])&&m(n.prototype,r),t}(d.a.Component);D.propTypes=T,D.defaultProps=N;var R=D,I=(n(154),["className","value","currency","onValueChange","displayType"]);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 A(e){for(var t=1;t0?Object(r.createElement)("div",{className:i()("wc-block-components-totals-taxes",o)},u.map((function(e,n){var o=e.name,i=e.rate,a=e.price,u="".concat(o).concat(c?" ".concat(i):"");return Object(r.createElement)(V,{key:"tax-line-".concat(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)(V,{className:i()("wc-block-components-totals-taxes",o),currency:t,label:Object(U.__)("Taxes","woo-gutenberg-products-block"),value:parseInt(a,10),description:null}))}),K=function(e){var t=e.currency,n=e.cartFees,o=e.className;return Object(r.createElement)(r.Fragment,null,n.map((function(e,n){var c=e.id,a=e.name,u=e.totals,s=parseInt(u.total,10);if(!s)return null;var l=parseInt(u.total_tax,10);return Object(r.createElement)(V,{key:c||"".concat(n,"-").concat(a),className:i()("wc-block-components-totals-fees",o),currency:t,label:a||Object(U.__)("Fee","woo-gutenberg-products-block"),value:Object(W.getSetting)("displayCartPricesIncludingTax",!1)?s+l:s})})))},$=(n(156),function(e){var t=e.children,n=e.slotWrapper,o=void 0!==n&&n;return p.Children.count(t)?Object(r.createElement)("div",{className:"wc-block-components-totals-wrapper".concat(o?" slot-wrapper":"")},t):null}),G=n(9),q=n.n(G),Y=n(11);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 J=n(28);function Q(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 X(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 re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0};Qe=ee;var tt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Le(e),o=n.Fill,i=n.Slot,c=function(e){var n=e.children;return Object(r.createElement)(o,null,(function(e){return r.Children.map(n,(function(n){return Object(r.createElement)(Xe,{renderError:W.CURRENT_USER_IS_ADMIN?t:function(){return null}},Object(r.cloneElement)(n,e))}))}))},u=function(e){return Object(r.createElement)(i,a()({},e,{bubblesVirtually:!0}))};return{Fill:c,Slot:u}},nt=tt("__experimentalOrderMeta"),rt=nt.Fill,ot=nt.Slot;rt.Slot=function(e){var t=e.className,n=e.extensions,o=e.cart,c=Qe("__experimentalOrderMeta").fills;return et(c)&&Object(r.createElement)($,{slotWrapper:!0},Object(r.createElement)(ot,{className:i()(t,"wc-block-components-order-meta"),fillProps:{extensions:n,cart:o}}))};var it=rt,ct=tt("__experimentalDiscountsMeta"),at=ct.Fill,ut=ct.Slot;at.Slot=function(e){var t=e.className,n=e.extensions,o=e.cart,c=Qe("__experimentalDiscountsMeta").fills;return et(c)&&Object(r.createElement)($,{slotWrapper:!0},Object(r.createElement)(ut,{className:i()(t,"wc-block-components-discounts-meta"),fillProps:{extensions:n,cart:o}}))};var st=at,lt=tt("__experimentalOrderShippingPackages"),ft=lt.Fill,pt=lt.Slot;ft.Slot=function(e){var t=e.className,n=e.collapsible,o=e.noResultsMessage,c=e.renderOption,a=e.extensions,u=e.cart,s=e.components,l=Qe("__experimentalOrderShippingPackages").fills.length>1;return Object(r.createElement)(pt,{className:i()("wc-block-components-shipping-rates-control",t),fillProps:{collapsible:n,collapse:l,showItems:l,noResultsMessage:o,renderOption:c,extensions:a,cart:u,components:s}})};var dt=ft,mt=n(12),ht=n.n(mt),bt=["srcElement","size"];function vt(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 gt=function(e){var t=e.srcElement,n=e.size,o=void 0===n?24:n,i=f()(e,bt);return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,function(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 Ct(e,t,n,r,o,i,c){var a=t.height;if(o){var u=(Object(jt.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 Ft=Object(r.createContext)({focusHistory:[]}),Tt=Ft.Provider,Nt=Ft.Consumer;Tt.displayName="FocusReturnProvider",Nt.displayName="FocusReturnConsumer",r.Component;var Dt=Object(St.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?me.stubTrue:i;return function(e){var t=function(t){le(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=ae(n);if(o){var r=ae(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return de(this,e)});function a(){var e;return re(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 ie(a,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==c())for(var r,o=[].concat(ge(me.without.apply(void 0,[this.props.focus.focusHistory].concat(ge(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)(Nt,null,(function(n){return Object(r.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");var Rt=Object(St.createHigherOrderComponent)((function(e){return function(t){le(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=ae(n);if(o){var r=ae(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return de(this,e)});function c(){var e;return re(this,c),(e=i.apply(this,arguments)).focusContainRef=Object(r.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(ce(e)),e}return ie(c,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===xt.TAB){var t=jt.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 It=["button","submit"];var Mt=Object(St.createHigherOrderComponent)((function(e){return function(t){le(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=ae(n);if(o){var r=ae(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return de(this,e)});function c(){var e;return re(this,c),(e=i.apply(this,arguments)).bindNode=e.bindNode.bind(ce(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(ce(e)),e.queueBlurCheck=e.queueBlurCheck.bind(ce(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(ce(e)),e}return ie(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(me.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(me.includes)(It,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,te({ref:this.bindNode},this.props)))}}]),c}(r.Component)}),"withFocusOutside")(function(e){le(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=ae(t);if(n){var o=ae(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return de(this,e)});function o(){return re(this,o),r.apply(this,arguments)}return ie(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(r.Component));function At(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=ae(e);if(t){var o=ae(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return de(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){le(n,e);var t=At(n);function n(){return re(this,n),t.apply(this,arguments)}return ie(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(r.Component)}();function Lt(e){e.stopPropagation()}var Vt=Object(r.forwardRef)((function(e,t){var n=e.children,o=ne(e,["children"]);return Object(r.createElement)("div",te({},o,{ref:t,onMouseDown:Lt}),n)}));function Ut(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 Wt(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function Yt(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var Zt=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,x=e.onFocusOutside,S=e.__unstableSticky,E=e.__unstableSlotName,k=void 0===E?"Popover":E,P=e.__unstableObserveElement,_=e.__unstableBoundaryParent,C=ne(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),F=Object(r.useRef)(null),T=Object(r.useRef)(null),N=Object(r.useRef)(),D=Object(St.useViewportMatch)("medium","<"),R=ve(Object(r.useState)(),2),I=R[0],M=R[1],A=ee(k),B=y&&D,L=ve(Object(St.useResizeObserver)(),2),V=L[0],U=L[1];s=B||s,Object(r.useLayoutEffect)((function(){if(B)return Yt(N.current,"is-without-arrow",s),Yt(N.current,"is-alternate",l),Gt(N.current,"data-x-axis"),Gt(N.current,"data-y-axis"),qt(N.current,"top"),qt(N.current,"left"),qt(T.current,"maxHeight"),void qt(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(jt.getRectangleFromRange)(r);if(r instanceof window.Element){var i=r.getBoundingClientRect();return o?i:$t(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:$t(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:$t(p,f)}}(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)}_&&(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=ve(a,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=Ct(e,t,s,p,r,o,i),m=_t(e,t,f,p,r,d.yAxis,c);return Pt(Pt({},m),d)}(e,U.height?U:T.current.getBoundingClientRect(),p,S,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&&(qt(N.current,"top",f+"px"),qt(N.current,"left",d+"px")),Yt(N.current,"is-without-arrow",s||"center"===m&&"middle"===y),Yt(N.current,"is-alternate",l),Gt(N.current,"data-x-axis",m),Gt(N.current,"data-y-axis",y),qt(T.current,"maxHeight","number"==typeof O?O+"px":""),qt(T.current,"maxWidth","number"==typeof w?w+"px":""),M(({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,S,P,_]),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=jt.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(m,T);var W=function(e){e.keyCode===xt.ESCAPE&&n&&(e.stopPropagation(),n()),o&&o(e)},H=Object(r.createElement)(Mt,{onFocusOutside:function(e){if(x)x(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}}),q()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),j(t)}else n&&n()}},Object(r.createElement)(zt,{type:w&&I?"appear":null,options:{origin:I}},(function(e){var o=e.className;return Object(r.createElement)(Vt,te({className:i()("components-popover",a,o,{"is-expanded":B,"is-without-arrow":s,"is-alternate":l})},C,{onKeyDown:W,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)(an,{className:"components-popover__close",icon:Et,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&&(H=Object(r.createElement)(Kt,null,H)),A.ref&&(H=Object(r.createElement)(Be,{name:k},H)),h||v?H:Object(r.createElement)("span",{ref:F},H)};Zt.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(r.createElement)(Ae,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var Jt=Zt,Qt=function(e){var t,n,o=e.shortcut,i=e.className;return o?(Object(me.isString)(o)&&(t=o),Object(me.isObject)(o)&&(t=o.display,n=o.ariaLabel),Object(r.createElement)("span",{className:i,"aria-label":n},t)):null};var Xt=function(e){le(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=ae(t);if(n){var o=ae(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return de(this,e)});function i(){var e;return re(this,i),(e=o.apply(this,arguments)).delayedSetIsOver=Object(me.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return ie(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(me.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)(Jt,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,Object(r.createElement)(Qt,{className:"components-tooltip__shortcut",shortcut:i})))})}}]),i}(r.Component),en=function(e){var t=e.icon,n=e.className,o=ne(e,["icon","className"]),i=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" ");return Object(r.createElement)("span",te({className:i},o))};function tn(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 nn(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}}}}(cn);try{for(T.s();!(F=T.n()).done;)E[F.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){T.e(e)}finally{T.f()}}var N=!P&&(y&&j||w||!!j&&(!x||Object(me.isArray)(x)&&!x.length)&&!1!==y),D=Object(r.createElement)(_,te({},C,E,{className:k,"aria-label":E["aria-label"]||j,ref:t}),v&&Object(r.createElement)(rn,{icon:v,size:g}),x);return N?Object(r.createElement)(Xt,{text:j,shortcut:w,position:O},D):D})),un=(n(160),function(){return Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}),sn=(n(159),["className","showSpinner","children"]),ln=function(e){var t=e.className,n=e.showSpinner,o=void 0!==n&&n,c=e.children,u=f()(e,sn),s=i()("wc-block-components-button",t,{"wc-block-components-button--loading":o});return Object(r.createElement)(an,a()({className:s},u),o&&Object(r.createElement)(un,null),Object(r.createElement)("span",{className:"wc-block-components-button__text"},c))};function fn(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 pn(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],e=Object(c.b)(),n=e.paymentMethods,r=e.expressPaymentMethods,s=e.paymentMethodsInitialized,o=e.expressPaymentMethodsInitialized,i=Object(a.a)(n),l=Object(a.a)(r);return{paymentMethods:t?l:i,isInitialized:t?o:s}},s=function(){return r(!1)},o=function(){return r(!0)}},407:function(t,e,n){"use strict";n.r(e);var a=n(175),c=n(263),r=function(t){return Object.values(t).reduce((function(t,e){return null!==e.icons&&(t=t.concat(e.icons)),t}),[])};e.default=function(t){var e=t.className,n=Object(c.b)().paymentMethods;return React.createElement(a.a,{className:e,icons:r(n)})}}}]);
\ 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..d45d7e23d0f
--- /dev/null
+++ b/build/cart-blocks/checkout-button-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[23],{157:function(e,t,n){"use strict";var c=n(20),o=n.n(c),a=n(26),r=n.n(a),i=n(81),s=n(7),u=n.n(s),l=n(126),b=(n(204),["className","showSpinner","children"]);t.a=function(e){var t=e.className,n=e.showSpinner,c=void 0!==n&&n,a=e.children,s=r()(e,b),f=u()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return React.createElement(i.a,o()({className:f},s),c&&React.createElement(l.a,null),React.createElement("span",{className:"wc-block-components-button__text"},a))}},204:function(e,t){},354:function(e,t,n){"use strict";(function(e){var c=n(4),o=n.n(c),a=n(1),r=n(7),i=n.n(r),s=n(0),u=n(157),l=n(104),b=n(54),f=n(387),d=n(2);n(356),t.a=function(t){var n=t.checkoutPageId,c=t.className,r=Object(d.getSetting)("page-"+n,!1),m=Object(b.b)().isCalculating,v=Object(f.a)(),w=o()(v,2),p=w[0],h=w[1],k=Object(s.useState)(!1),E=o()(k,2),g=E[0],_=E[1];Object(s.useEffect)((function(){if("function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener){var t=function(){_(!1)};return e.addEventListener("pageshow",t),function(){e.removeEventListener("pageshow",t)}}}),[]);var j=React.createElement(u.a,{className:"wc-block-cart__submit-button",href:r||l.d,disabled:m,onClick:function(){return _(!0)},showSpinner:g},Object(a.__)("Proceed to Checkout","woo-gutenberg-products-block"));return React.createElement("div",{className:i()("wc-block-cart__submit",c)},p,React.createElement("div",{className:"wc-block-cart__submit-container"},j),"below"===h&&React.createElement("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},j))}}).call(this,n(355))},355: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},356:function(e,t){},387:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var c=n(4),o=n.n(c),a=n(0),r={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},i=function(){var e=Object(a.useState)(""),t=o()(e,2),n=t[0],c=t[1],i=Object(a.useRef)(null),s=Object(a.useRef)(new IntersectionObserver((function(e){e[0].isIntersecting?c("visible"):c(e[0].boundingClientRect.top>0?"below":"above")}),{threshold:1}));return Object(a.useLayoutEffect)((function(){var e=i.current,t=s.current;return e&&t.observe(e),function(){t.unobserve(e)}}),[]),[React.createElement("div",{"aria-hidden":!0,ref:i,style:r}),n]}},406:function(e,t,n){"use strict";n.r(t);var c=n(154),o=n(354);t.default=Object(c.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..5b0562c2217
--- /dev/null
+++ b/build/cart-blocks/empty-cart-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[24],{343:function(e,c){},382:function(e,c,t){"use strict";t.r(c);var n=t(33),o=t(0),a=t(107);t(343),c.default=function(e){var c=e.children,t=e.className,r=Object(n.a)(),s=r.cartItems,l=r.cartIsLoading;return Object(o.useEffect)((function(){Object(a.a)("wc-blocks_render_blocks_frontend",{element:document.body.querySelector(".wp-block-woocommerce-cart")})}),[]),l||0!==s.length?null:React.createElement("div",{className:t},c)}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/express-payment--checkout-blocks/express-payment--checkout-blocks/payment-frontend.js b/build/cart-blocks/express-payment--checkout-blocks/express-payment--checkout-blocks/payment-frontend.js
new file mode 100644
index 00000000000..d27c3ac7736
--- /dev/null
+++ b/build/cart-blocks/express-payment--checkout-blocks/express-payment--checkout-blocks/payment-frontend.js
@@ -0,0 +1,5 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{121:function(e,t,n){},175:function(e,t,n){"use strict";var r=n(20),o=n.n(r),c=n(5),a=n.n(c),s=n(7),i=n.n(s),l=function(e){return"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--".concat(e)},p=function(e){var t=e.id,n=e.src,r=void 0===n?null:n,o=e.alt,c=void 0===o?"":o;return r?React.createElement("img",{className:l(t),src:r,alt:c}):null},u=n(104),d=[{id:"alipay",alt:"Alipay",src:u.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.l+"payment-methods/wechat.svg"}],h=n(21),m=n.n(h),b=n(66);function g(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 f(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=Object(o.b)(),n=t.paymentMethods,c=t.expressPaymentMethods,a=t.paymentMethodsInitialized,s=t.expressPaymentMethodsInitialized,i=Object(r.a)(n),l=Object(r.a)(c);return{paymentMethods:e?l:i,isInitialized:e?s:a}},a=function(){return c(!1)},s=function(){return c(!0)}},281:function(e,t){},292:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n(8);var r=n(171),o=(n(281),function(e){var t=e.errorMessage,n=void 0===t?"":t,o=e.propertyName,c=void 0===o?"":o,a=e.elementId,s=void 0===a?"":a,i=Object(r.b)(),l=i.getValidationError,p=i.getValidationErrorId;if(!n||"string"!=typeof n){var u=l(c)||{};if(!u.message||u.hidden)return null;n=u.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:p(s)},n))})},307:function(e,t,n){"use strict";var r=n(37),o=n.n(r),c=n(38),a=n.n(c),s=n(27),i=n.n(s),l=n(39),p=n.n(l),u=n(40),d=n.n(u),h=n(29),m=n.n(h),b=n(5),g=n.n(b),f=n(1),v=n(3),y=(n(8),n(2)),O=n(121);var j=function(e){p()(c,e);var t,n,r=(t=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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=m()(t);if(n){var o=m()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return d()(this,e)});function c(){var e;o()(this,c);for(var t=arguments.length,n=new Array(t),a=0;a0&&void 0!==arguments[0]?arguments[0]:null;c.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeSnackbarNotice:r}}),[r]),s=Object(p.useMemo)((function(){return{addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(e,t)}}}),[n]);return h(h(h({notices:t},a),s),{},{setIsSuppressed:o})}().addSnackbarNotice,f=Object(m.b)().setValidationErrors;return function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";O()("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"}),z(e)}),[z]);return{activePaymentMethod:y,billing:{billingData:Y,cartTotal:re.current,currency:Object(o.getCurrencyFromPriceResponse)(X),cartTotalItems:ne.current,displayPricesIncludingTax:Object(v.getSetting)("displayCartPricesIncludingTax",!1),appliedCoupons:Z,customerId:h},checkoutStatus:{isCalculating:t,isComplete:n,isIdle:a,isProcessing:s},components:{ValidationInputError:w.a,PaymentMethodIcons:f.a,PaymentMethodLabel:g,LoadingMask:j.a},emitResponse:{noticeContexts:ee,responseTypes:te},eventRegistration:{onCheckoutBeforeProcessing:i,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:p,onCheckoutAfterProcessingWithError:u,onShippingRateSuccess:W,onShippingRateFail:F,onShippingRateSelectSuccess:G,onShippingRateSelectFail:J,onPaymentProcessing:x},onSubmit:d,paymentStatus:b,setExpressPaymentError:oe,shippingData:{shippingRates:A,shippingRatesLoading:H,selectedRates:N,setSelectedRates:B,isSelectingRate:L,shippingAddress:q,setShippingAddress:Q,needsShipping:U},shippingStatus:{shippingErrorStatus:D,shippingErrorTypes:T},shouldSavePayment:I}}}}]);
\ 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..0f44dfa0a0a
--- /dev/null
+++ b/build/cart-blocks/express-payment-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[25],{128:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(26),a=n.n(o),s=n(0),i=["srcElement","size"];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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,o=a()(e,i);return Object(s.isValidElement)(t)?Object(s.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";O()("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?P(e):r("")}),[r,P]),k=Object.entries(f),R=k.length>0?k.map((function(t){var n=a()(t,2),r=n[0],c=n[1],o=e?c.edit:c.content;return Object(u.isValidElement)(o)?React.createElement("li",{key:r,id:"express-payment-method-".concat(r)},Object(u.cloneElement)(o,y(y({},j),{},{onClick:v(r),onClose:w,onError:P,setExpressPaymentError:h}))):null})):React.createElement("li",{key:"noneRegistered"},Object(s.__)("No registered Payment Methods","woo-gutenberg-products-block"));return React.createElement(d.a,{isEditor:e},React.createElement("ul",{className:"wc-block-components-express-payment__event-buttons"},R))}},405:function(e,t,n){"use strict";n.r(t);var r=n(33),c=n(7),o=n.n(c),a=n(1),s=n(263),i=n(43),l=n(54),u=n(164),b=n(100),p=n(170),m=n(306),O=(n(305),function(){var e=Object(s.a)(),t=e.paymentMethods,n=e.isInitialized,r=Object(i.c)().noticeContexts,c=Object(l.b)(),o=c.isCalculating,O=c.isProcessing,d=c.isAfterProcessing,j=c.isBeforeProcessing,y=c.isComplete,f=c.hasError,E=Object(u.b)().currentStatus;if(!n||n&&0===Object.keys(t).length)return null;var g=O||d||j||y&&!f;return React.createElement(React.Fragment,null,React.createElement(p.a,{isLoading:o||g||E.isDoingExpressPayment},React.createElement("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},React.createElement("div",{className:"wc-block-components-express-payment__content"},React.createElement(b.a,{context:r.EXPRESS_PAYMENTS},React.createElement(m.a,null))))),React.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=function(e){var t=e.className;return Object(r.a)().cartNeedsPayment?React.createElement("div",{className:o()("wc-block-cart__payment-options",t)},React.createElement(O,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..aed2c26778a
--- /dev/null
+++ b/build/cart-blocks/filled-cart-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[26],{216:function(e,t){},261:function(e,t,a){"use strict";a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return m}));var s=a(4),i=a.n(s),n=(a(8),a(0)),c=a(25),r=a(7),o=a.n(r),l=Object(n.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),u=function(){return Object(n.useContext)(l)},m=function(e){var t=e.children,a=e.className,s=void 0===a?"":a,n=function(){var e=Object(c.useResizeObserver)(),t=i()(e,2),a=t[0],s=t[1].width,n="";return s>700?n="is-large":s>520?n="is-medium":s>400?n="is-small":s&&(n="is-mobile"),[a,n]}(),r=i()(n,2),u=r[0],m=r[1],d={hasContainerWidth:""!==m,containerClassName:m,isMobile:"is-mobile"===m,isSmall:"is-small"===m,isMedium:"is-medium"===m,isLarge:"is-large"===m};return React.createElement(l.Provider,{value:d},React.createElement("div",{className:o()(s,m)},u,t))}},270:function(e,t,a){"use strict";var s=a(7),i=a.n(s),n=(a(8),a(261));a(216),t.a=function(e){var t=e.children,a=e.className;return React.createElement(n.a,{className:i()("wc-block-components-sidebar-layout",a)},t)}},381:function(e,t,a){"use strict";a.r(t);var s=a(7),i=a.n(s),n=a(270),c=a(33),r=a(51),o=a(0),l=a(32),u=a(182);t.default=function(e){var t=e.children,a=e.className,s=Object(c.a)(),m=s.cartItems,d=s.cartIsLoading,b=s.cartItemErrors,f=Object(u.b)().hasDarkControls,h=Object(r.a)().addErrorNotice;return Object(o.useEffect)((function(){b.forEach((function(e){h(Object(l.decodeEntities)(e.message),{isDismissible:!0,id:e.code})}))}),[h,b]),d||m.length>=1?React.createElement(n.a,{className:i()("wc-block-cart",a,{"has-dark-controls":f})},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..113fea102b9
--- /dev/null
+++ b/build/cart-blocks/items-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[27],{344:function(c,e,a){"use strict";var n=a(3),t=a(7),r=a.n(t),s=Object(n.forwardRef)((function(c,e){var a=c.children,n=c.className,t=void 0===n?"":n;return React.createElement("div",{ref:e,className:r()("wc-block-components-main",t)},a)}));e.a=s},383:function(c,e,a){"use strict";a.r(e);var n=a(344),t=a(7),r=a.n(t);e.default=function(c){var e=c.children,a=c.className;return React.createElement(n.a,{className:r()("wc-block-cart__main",a)},e)}}}]);
\ 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..35d6464a0c3
--- /dev/null
+++ b/build/cart-blocks/line-items-frontend.js
@@ -0,0 +1,15 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[28],{124:function(e,t,c){"use strict";var a=c(7),r=c.n(a);c(211),t.a=function(e){var t=e.children,c=e.className;return React.createElement("div",{className:r()("wc-block-components-product-badge",c)},t)}},156:function(e,t){},159:function(e,t,c){"use strict";var a=c(5),r=c.n(a),n=c(1),i=c(85),o=c(7),l=c.n(o),u=(c(8),c(60)),s=c(0),m=(c(207),function(e){var t=e.currency,c=e.maxPrice,a=e.minPrice,r=e.priceClassName,o=e.priceStyle;return React.createElement(React.Fragment,null,React.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(u.formatPrice)(a),Object(u.formatPrice)(c))),React.createElement("span",{"aria-hidden":!0},React.createElement(i.a,{className:l()("wc-block-components-product-price__value",r),currency:t,value:a,style:o})," — ",React.createElement(i.a,{className:l()("wc-block-components-product-price__value",r),currency:t,value:c,style:o})))}),d=function(e){var t=e.currency,c=e.regularPriceClassName,a=e.regularPriceStyle,r=e.regularPrice,o=e.priceClassName,u=e.priceStyle,s=e.price;return React.createElement(React.Fragment,null,React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(i.a,{currency:t,renderText:function(e){return React.createElement("del",{className:l()("wc-block-components-product-price__regular",c),style:a},e)},value:r}),React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(i.a,{currency:t,renderText:function(e){return React.createElement("ins",{className:l()("wc-block-components-product-price__value","is-discounted",o),style:u},e)},value:s}))};t.a=function(e){var t=e.align,c=e.className,a=e.currency,n=e.format,o=void 0===n?"":n,u=e.maxPrice,p=void 0===u?null:u,b=e.minPrice,f=void 0===b?null:b,v=e.price,_=void 0===v?null:v,y=e.priceClassName,g=e.priceStyle,k=e.regularPrice,O=e.regularPriceClassName,E=e.regularPriceStyle,j=l()(c,"price","wc-block-components-product-price",r()({},"wc-block-components-product-price--align-".concat(t),t));o.includes("")||(o="",console.error("Price formats need to include the `` tag."));var R=k&&_!==k,w=React.createElement("span",{className:l()("wc-block-components-product-price__value",y)});return R?w=React.createElement(d,{currency:a,price:_,priceClassName:y,priceStyle:g,regularPrice:k,regularPriceClassName:O,regularPriceStyle:E}):null!==f&&null!==p?w=React.createElement(m,{currency:a,maxPrice:p,minPrice:f,priceClassName:y,priceStyle:g}):null!==_&&(w=React.createElement(i.a,{className:l()("wc-block-components-product-price__value",y),currency:a,value:_,style:g})),React.createElement("span",{className:j},Object(s.createInterpolateElement)(o,{price:w}))}},172:function(e,t,c){"use strict";var a=c(20),r=c.n(a),n=c(26),i=c.n(n),o=c(32),l=c(7),u=c.n(l),s=(c(206),["className","disabled","name","permalink","rel","style","onClick"]);t.a=function(e){var t=e.className,c=void 0===t?"":t,a=e.disabled,n=void 0!==a&&a,l=e.name,m=e.permalink,d=void 0===m?"":m,p=e.rel,b=e.style,f=(e.onClick,i()(e,s)),v=u()("wc-block-components-product-name",c);if(n){var _=f;return React.createElement("span",r()({className:v},_,{dangerouslySetInnerHTML:{__html:Object(o.decodeEntities)(l)}}))}return React.createElement("a",r()({className:v,href:d,rel:p},f,{dangerouslySetInnerHTML:{__html:Object(o.decodeEntities)(l)},style:b}))}},173:function(e,t,c){"use strict";var a=c(0),r=c(122),n=c(106),i=function(e){var t=e.indexOf("");return-1===t?e:e.substr(0,t+4)},o=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},l=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",a=o(e),r=a.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(r,c))},s=function(e,t){var c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",r=o(e),i=r.slice(0,t);if(c)return Object(n.autop)(l(i,a));var u=i.match(/([\s]+)/g),s=u?u.length:0,m=r.slice(0,t+s);return Object(n.autop)(l(m,a))};t.a=function(e){var t=e.source,c=e.maxLength,o=void 0===c?15:c,l=e.countType,m=void 0===l?"words":l,d=e.className,p=void 0===d?"":d,b=Object(a.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",a=Object(n.autop)(e),o=Object(r.count)(a,c);if(o<=t)return a;var l=i(a),m=Object(r.count)(l,c);return m<=t?l:"words"===c?u(l,t):s(l,t,"characters_including_spaces"===c)}(t,o,m)}),[t,o,m]);return React.createElement(a.RawHTML,{className:p},b)}},177:function(e,t,c){"use strict";var a=c(42),r=c.n(a),n=c(7),i=c.n(n),o=c(1),l=c(0),u=c(26),s=c.n(u),m=c(34),d=c(21),p=c.n(d),b=c(58),f=(c(217),function(e){var t=e.className,c=e.quantity,a=void 0===c?1:c,r=e.minimum,n=void 0===r?1:r,u=e.maximum,s=e.onChange,d=void 0===s?function(){}:s,f=e.itemName,v=void 0===f?"":f,_=e.disabled,y=i()("wc-block-components-quantity-selector",t),g=void 0!==u,k=a>n,O=!g||a":a;if(!c||c<=0)return null;r.includes("")||(r="",console.error("Price formats need to include the `` tag."));var n=Object(o.sprintf)(
+/* translators: %s will be replaced by the discount amount */
+Object(o.__)("Save %s","woo-gutenberg-products-block"),r);return React.createElement(D.a,{className:"wc-block-components-sale-badge"},Object(l.createInterpolateElement)(n,{price:React.createElement(S.a,{currency:t,value:c})}))},A=c(269),T=c(60),F=c(28),L=c(153),M=c(2),U=["receiveCart"],V=function(e,t){return e.convertPrecision(t.minorUnit).getAmount()},Q=function(e){return Object(F.mustContain)(e,"")},$=Object(l.forwardRef)((function(e,t){var c=e.lineItem,a=e.onRemove,r=void 0===a?function(){}:a,n=e.tabIndex,u=void 0===n?null:n,d=c.name,p=void 0===d?"":d,b=c.catalog_visibility,y=void 0===b?"visible":b,S=c.short_description,D=void 0===S?"":S,$=c.description,H=void 0===$?"":$,B=c.low_stock_remaining,K=void 0===B?null:B,W=c.show_backorder_badge,J=void 0!==W&&W,Y=c.quantity_limit,z=void 0===Y?99:Y,G=c.permalink,X=void 0===G?"":G,Z=c.images,ee=void 0===Z?[]:Z,te=c.variation,ce=void 0===te?[]:te,ae=c.item_data,re=void 0===ae?[]:ae,ne=c.prices,ie=void 0===ne?{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"}}:ne,oe=c.totals,le=void 0===oe?{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"}:oe,ue=c.extensions,se=function(e){var t={key:"",quantity:1};(function(e){return Object(w.b)(e)&&Object(w.d)(e,"key")&&Object(w.d)(e,"quantity")&&Object(w.c)(e.key)&&Object(w.a)(e.quantity)})(e)&&(t.key=e.key,t.quantity=e.quantity);var c=t.key,a=void 0===c?"":c,r=t.quantity,n=void 0===r?1:r,i=Object(N.a)().cartErrors,o=Object(h.b)().dispatchActions,u=Object(l.useState)(n),s=g()(u,2),m=s[0],d=s[1],p=Object(E.a)(m,400),b=g()(p,1)[0],f=Object(j.a)(b),v=Object(k.useDispatch)(O.CART_STORE_KEY),_=v.removeItemFromCart,y=v.changeCartItemQuantity,C=Object(k.useSelect)((function(e){if(!a)return{quantity:!1,delete:!1};var t=e(O.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(a),delete:t.isItemPendingDelete(a)}}),[a]),P=Object(l.useCallback)((function(){return a?_(a).then((function(){return Object(R.c)(),!0})):Promise.resolve(!1)}),[a,_]);return Object(l.useEffect)((function(){a&&Object(w.a)(f)&&Number.isFinite(f)&&f!==b&&y(a,b)}),[a,y,b,f]),Object(l.useEffect)((function(){return C.delete?o.incrementCalculating():o.decrementCalculating(),function(){C.delete&&o.decrementCalculating()}}),[o,C.delete]),Object(l.useEffect)((function(){return C.quantity||b!==m?o.incrementCalculating():o.decrementCalculating(),function(){(C.quantity||b!==m)&&o.decrementCalculating()}}),[o,C.quantity,b,m]),{isPendingDelete:C.delete,quantity:m,setItemQuantity:d,removeItem:P,cartItemQuantityErrors:i}}(c),me=se.quantity,de=se.setItemQuantity,pe=se.removeItem,be=se.isPendingDelete,fe=Object(C.a)().dispatchStoreEvent,ve=Object(N.a)(),_e=(ve.receiveCart,s()(ve,U)),ye=Object(l.useMemo)((function(){return{context:"cart",cartItem:c,cart:_e}}),[c,_e]),ge=Object(T.getCurrencyFromPriceResponse)(ie),ke=Object(F.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:p,extensions:ue,arg:ye}),Oe=Object(L.a)({amount:parseInt(ie.raw_prices.regular_price,10),precision:ie.raw_prices.precision}),Ee=Object(L.a)({amount:parseInt(ie.raw_prices.price,10),precision:ie.raw_prices.precision}),je=Oe.subtract(Ee),Re=je.multiply(me),we=Object(T.getCurrencyFromPriceResponse)(le),Ne=parseInt(le.line_subtotal,10);Object(M.getSetting)("displayCartPricesIncludingTax",!1)&&(Ne+=parseInt(le.line_subtotal_tax,10));var he=Object(L.a)({amount:Ne,precision:we.minorUnit}),Ce=ee.length?ee[0]:{},Pe="hidden"===y||"search"===y,xe=Object(F.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:ue,arg:ye}),Ie=Object(F.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:ue,arg:ye,validation:Q}),Se=Object(F.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:ue,arg:ye,validation:Q}),De=Object(F.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"",extensions:ue,arg:ye,validation:Q});return React.createElement("tr",{className:i()("wc-block-cart-items__row",xe,{"is-disabled":be}),ref:t,tabIndex:u},React.createElement("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(w.d)(Ce,"alt")||!Ce.alt},Pe?React.createElement(P.a,{image:Ce,fallbackAlt:ke}):React.createElement("a",{href:X,tabIndex:-1},React.createElement(P.a,{image:Ce,fallbackAlt:ke}))),React.createElement("td",{className:"wc-block-cart-item__product"},React.createElement(_.a,{disabled:be||Pe,name:ke,permalink:X}),J?React.createElement(x.a,null):!!K&&React.createElement(I.a,{lowStockRemaining:K}),React.createElement("div",{className:"wc-block-cart-item__prices"},React.createElement(v.a,{currency:ge,regularPrice:V(Oe,ge),price:V(Ee,ge),format:Se})),React.createElement(q,{currency:ge,saleAmount:V(je,ge),format:De}),React.createElement(A.a,{shortDescription:D,fullDescription:H,itemData:re,variation:ce}),React.createElement("div",{className:"wc-block-cart-item__quantity"},React.createElement(f,{disabled:be,quantity:me,maximum:z,onChange:function(e){de(e),fe("cart-set-item-quantity",{product:c,quantity:e})},itemName:ke}),React.createElement("button",{className:"wc-block-cart-item__remove-link",onClick:function(){r(),pe(),fe("cart-remove-item",{product:c,quantity:me}),Object(m.speak)(Object(o.sprintf)(
+/* translators: %s refers to the item name in the cart. */
+Object(o.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),ke))},disabled:be},Object(o.__)("Remove item","woo-gutenberg-products-block")))),React.createElement("td",{className:"wc-block-cart-item__total"},React.createElement("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},React.createElement(v.a,{currency:we,format:Ie,price:he.getAmount()}),me>1&&React.createElement(q,{currency:ge,saleAmount:V(Re,ge),format:De}))))})),H=r()(Array(3)).map((function(_x,e){return React.createElement($,{lineItem:{},key:e})})),B=function(e){var t={};return e.forEach((function(e){var c=e.key;t[c]=Object(l.createRef)()})),t};t.a=function(e){var t=e.lineItems,c=void 0===t?[]:t,a=e.isLoading,r=void 0!==a&&a,n=e.className,u=Object(l.useRef)(null),s=Object(l.useRef)(B(c));Object(l.useEffect)((function(){s.current=B(c)}),[c]);var m=function(e){return function(){null!=s&&s.current&&e&&s.current[e].current instanceof HTMLElement?s.current[e].current.focus():u.current instanceof HTMLElement&&u.current.focus()}},d=r?H:c.map((function(e,t){var a=c.length>t+1?c[t+1].key:null;return React.createElement($,{key:e.key,lineItem:e,onRemove:m(a),ref:s.current[e.key],tabIndex:-1})}));return React.createElement("table",{className:i()("wc-block-cart-items",n),ref:u,tabIndex:-1},React.createElement("thead",null,React.createElement("tr",{className:"wc-block-cart-items__header"},React.createElement("th",{className:"wc-block-cart-items__header-image"},React.createElement("span",null,Object(o.__)("Product","woo-gutenberg-products-block"))),React.createElement("th",{className:"wc-block-cart-items__header-product"},React.createElement("span",null,Object(o.__)("Details","woo-gutenberg-products-block"))),React.createElement("th",{className:"wc-block-cart-items__header-total"},React.createElement("span",null,Object(o.__)("Total","woo-gutenberg-products-block"))))),React.createElement("tbody",null,d))}},206:function(e,t){},207:function(e,t){},210:function(e,t){},211:function(e,t){},212:function(e,t){},213:function(e,t){},217:function(e,t){},266:function(e,t,c){"use strict";var a=c(20),r=c.n(a),n=c(32),i=c(2);c(210),t.a=function(e){var t=e.image,c=void 0===t?{}:t,a=e.fallbackAlt,o=void 0===a?"":a,l=c.thumbnail?{src:c.thumbnail,alt:Object(n.decodeEntities)(c.alt)||o||"Product Image"}:{src:i.PLACEHOLDER_IMG_SRC,alt:""};return React.createElement("img",r()({className:"wc-block-components-product-image"},l,{alt:l.alt}))}},267:function(e,t,c){"use strict";var a=c(1),r=c(124);t.a=function(){return React.createElement(r.a,{className:"wc-block-components-product-backorder-badge"},Object(a.__)("Available on backorder","woo-gutenberg-products-block"))}},268:function(e,t,c){"use strict";var a=c(1),r=c(124);t.a=function(e){var t=e.lowStockRemaining;return t?React.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}},269:function(e,t,c){"use strict";var a=c(6),r=c(32),n=(c(213),function(e){var t=e.details,c=void 0===t?[]:t;return Array.isArray(c)?0===(c=c.filter((function(e){return!e.hidden}))).length?null:React.createElement("ul",{className:"wc-block-components-product-details"},c.map((function(e){var t=e.name?"wc-block-components-product-details__".concat(Object(a.kebabCase)(e.name)):"";return React.createElement("li",{key:e.name+(e.display||e.value),className:t},e.name&&React.createElement(React.Fragment,null,React.createElement("span",{className:"wc-block-components-product-details__name"},Object(r.decodeEntities)(e.name),":")," "),React.createElement("span",{className:"wc-block-components-product-details__value"},Object(r.decodeEntities)(e.display||e.value)))}))):null}),i=c(173),o=c(104),l=function(e){var t=e.className,c=e.shortDescription,a=void 0===c?"":c,r=e.fullDescription,n=a||(void 0===r?"":r);return n?React.createElement(i.a,{className:t,source:n,maxLength:15,countType:o.n.wordCountType||"words"}):null};c(212),t.a=function(e){var t=e.shortDescription,c=void 0===t?"":t,a=e.fullDescription,r=void 0===a?"":a,i=e.itemData,o=void 0===i?[]:i,u=e.variation,s=void 0===u?[]:u;return React.createElement("div",{className:"wc-block-components-product-metadata"},React.createElement(l,{className:"wc-block-components-product-metadata__description",shortDescription:c,fullDescription:r}),React.createElement(n,{details:o}),React.createElement(n,{details:s.map((function(e){var t=e.attribute;return{name:void 0===t?"":t,value:e.value}}))}))}},384:function(e,t,c){"use strict";c.r(t);var a=c(33),r=c(177);t.default=function(e){var t=e.className,c=Object(a.a)(),n=c.cartItems,i=c.cartIsLoading;return React.createElement(r.a,{className:t,lineItems:n,isLoading:i})}},85:function(e,t,c){"use strict";var a=c(20),r=c.n(a),n=c(5),i=c.n(n),o=c(26),l=c.n(o),u=c(127),s=c(7),m=c.n(s),d=(c(156),["className","value","currency","onValueChange","displayType"]);function p(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,a)}return c}function b(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0],t=_.current||null;if(t){t.value=t.value.trim();var r=t.checkValidity();r?U(W):B(c()({},W,{message:t.validationMessage||Object(d.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}))}}),[U,W,B]);Object(p.useEffect)((function(){var e;L&&(y&&(null===(e=_.current)||void 0===e||e.focus()),q(!1))}),[y,L,q]),Object(p.useEffect)((function(){L&&(b&&H(),q(!1))}),[L,q,b,H]),Object(p.useEffect)((function(){S&&H()}),[S,H]),Object(p.useEffect)((function(){return function(){U(W)}}),[U,W]);var J=D(W)||{};Object(O.c)(N)&&""!==N&&(J.message=N);var A=J.message&&!J.hidden,G=w&&A&&F(W)?F(W):o;return React.createElement(C,n()({className:f()(t,{"has-error":A}),"aria-invalid":!0===A,id:z,onBlur:function(){H(!1)},feedback:w&&React.createElement(v.a,{errorMessage:N,propertyName:W}),ref:_,onChange:function(e){x(W),j(e)},ariaDescribedBy:G},P))}))},370:function(e,t,r){"use strict";var a=r(5),n=r.n(a),o=r(322),c=r(20),i=r.n(c),l=r(104),s=r(0),u=r(1),d=r(32),p=r(7),b=r.n(p),f=r(25),m=r(397),g=r(171),v=r(292),h=r(66),O=(r(302),Object(f.withInstanceId)((function(e){var t=e.id,r=e.className,a=e.label,o=e.onChange,c=e.options,i=e.value,l=e.required,d=void 0!==l&&l,p=e.errorMessage,f=void 0===p?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):p,O=e.errorId,y=e.instanceId,j=void 0===y?"0":y,E=e.autoComplete,C=void 0===E?"off":E,k=Object(g.b)(),w=k.getValidationError,R=k.setValidationErrors,N=k.clearValidationError,P=Object(s.useRef)(null),I=t||"control-"+j,M=O||I,L=w(M)||{message:"",hidden:!1};return Object(s.useEffect)((function(){return!d||i?N(M):R(n()({},M,{message:f,hidden:!0})),function(){N(M)}}),[N,i,M,f,d,R]),React.createElement("div",{id:I,className:b()("wc-block-components-combobox",r,{"is-active":i,"has-error":L.message&&!L.hidden}),ref:P},React.createElement(m.a,{className:"wc-block-components-combobox-control",label:a,onChange:o,onFilterValueChange:function(e){if(e.length){var t=Object(h.b)(P.current)?P.current.ownerDocument.activeElement:void 0;if(t&&Object(h.b)(P.current)&&P.current.contains(t))return;var r=e.toLocaleUpperCase(),a=c.find((function(e){return e.label.toLocaleUpperCase().startsWith(r)||e.value.toLocaleUpperCase()===r}));a&&o(a.value)}},options:c,value:i||"",allowReset:!1,autoComplete:C,"aria-invalid":L.message&&!L.hidden}),React.createElement(v.a,{propertyName:M}))}))),y=(r(301),function(e){var t=e.className,r=e.countries,a=e.id,n=e.label,o=e.onChange,c=e.value,i=void 0===c?"":c,l=e.autoComplete,p=void 0===l?"off":l,f=e.required,m=void 0!==f&&f,g=e.errorId,v=e.errorMessage,h=void 0===v?Object(u.__)("Please select a country.","woo-gutenberg-products-block"):v,y=Object(s.useMemo)((function(){return Object.keys(r).map((function(e){return{value:e,label:Object(d.decodeEntities)(r[e])}}))}),[r]);return React.createElement("div",{className:b()(t,"wc-block-components-country-input")},React.createElement(O,{id:a,label:n,onChange:o,options:y,value:i,errorId:g,errorMessage:h,required:m,autoComplete:p}),"off"!==p&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:p,value:i,onChange:function(e){var t=e.target.value.toLocaleUpperCase(),r=y.find((function(e){return 2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t}));o(r?r.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),j=function(e){return React.createElement(y,i()({countries:l.g},e))},E=function(e){return React.createElement(y,i()({countries:l.a},e))},C=(r(303),function(e,t){var r=t.find((function(t){return t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase()}));return r?r.value:""}),k=function(e){var t=e.className,r=e.id,a=e.states,n=e.country,c=e.label,i=e.onChange,l=e.autoComplete,p=void 0===l?"off":l,f=e.value,m=void 0===f?"":f,g=e.required,v=void 0!==g&&g,h=a[n],y=Object(s.useMemo)((function(){return h?Object.keys(h).map((function(e){return{value:e,label:Object(d.decodeEntities)(h[e])}})):[]}),[h]),j=Object(s.useCallback)((function(e){i(y.length>0?C(e,y):e)}),[i,y]),E=Object(s.useRef)(m);return Object(s.useEffect)((function(){E.current!==m&&(E.current=m)}),[m]),Object(s.useEffect)((function(){if(y.length>0&&E.current){var e=C(E.current,y);e!==E.current&&j(e)}}),[y,j]),y.length>0?React.createElement(React.Fragment,null,React.createElement(O,{className:b()(t,"wc-block-components-state-input"),id:r,label:c,onChange:j,options:y,value:m,errorMessage:Object(u.__)("Please select a state.","woo-gutenberg-products-block"),required:v,autoComplete:p}),"off"!==p&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:p,value:m,onChange:function(e){return j(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):React.createElement(o.a,{className:t,id:r,label:c,onChange:j,autoComplete:p,value:m,required:v})},w=function(e){return React.createElement(k,i()({states:l.h},e))},R=function(e){return React.createElement(k,i()({states:l.b},e))},N=r(45),P=r(2),I=r(87);function M(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 L(e){for(var t=1;t1)return React.createElement(E.a,{className:t,onChange:function(e){c(e)},selected:s,options:a.map(r)});var i=r(a[0]),l=i.label,p=i.secondaryLabel,u=i.description,d=i.secondaryDescription;return React.createElement(y.a,{label:l,secondaryLabel:p,description:u,secondaryDescription:d})},I=(n(289),function(e){var t=e.packageId,n=e.className,c=e.noResultsMessage,a=e.renderOption,s=e.packageData,i=e.collapsible,p=void 0!==i&&i,u=e.collapse,d=void 0!==u&&u,b=e.showItems,h=void 0!==b&&b,O=function(e,t){var n=Object(j.a)().dispatchCheckoutEvent,c=Object(_.a)(),a=c.selectShippingRate,o=c.isSelectingRate,s=Object(r.useState)((function(){return w(t)})),i=v()(s,2),l=i[0],p=i[1],u=Object(r.useRef)(t);return Object(r.useEffect)((function(){R()(u.current,t)||(u.current=t,p(w(t)))}),[t]),{selectShippingRate:Object(r.useCallback)((function(t){p(t),a(t,e),n("set-selected-shipping-rate",{shippingRateId:t})}),[e,a,n]),selectedShippingRate:l,isSelectingRate:o}}(t,s.shipping_rates),E=O.selectShippingRate,y=O.selectedShippingRate,k=React.createElement(React.Fragment,null,(h||p)&&React.createElement("div",{className:"wc-block-components-shipping-rates-control__package-title"},s.name),h&&React.createElement("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(s.items).map((function(e){var t=Object(g.decodeEntities)(e.name),n=e.quantity;return React.createElement("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},React.createElement(f.a,{label:n>1?"".concat(t," × ").concat(n):"".concat(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)",n,"woo-gutenberg-products-block"),t,n)}))})))),C=React.createElement(x,{className:n,noResultsMessage:c,rates:s.shipping_rates,onSelectRate:E,selected:y,renderOption:a});return p?React.createElement(l.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!d,title:k},C):React.createElement("div",{className:m()("wc-block-components-shipping-rates-control__package",n)},k,C)}),P=["package_id"],T=["extensions","receiveCart"],L=function(e){var t=e.packages,n=e.collapse,c=e.showItems,o=e.collapsible,r=e.noResultsMessage,s=e.renderOption;return t.length?React.createElement(React.Fragment,null,t.map((function(e){var t=e.package_id,i=a()(e,P);return React.createElement(I,{key:t,packageId:t,packageData:i,collapsible:o,collapse:n,showItems:c,noResultsMessage:r,renderOption:s})}))):null};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,c=e.className,b=e.collapsible,m=void 0!==b&&b,g=e.noResultsMessage,f=e.renderOption;Object(r.useEffect)((function(){if(!n){var e=Object(p.a)(t),c=Object(p.b)(t);1===e?Object(s.speak)(Object(o.sprintf)(
+/* translators: %d number of shipping options found. */
+Object(o._n)("%d shipping option was found.","%d shipping options were found.",c,"woo-gutenberg-products-block"),c)):Object(s.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",c,"woo-gutenberg-products-block"),c))}}),[n,t]);var h=Object(u.a)(),v=h.extensions,O=(h.receiveCart,{className:c,collapsible:m,noResultsMessage:g,renderOption:f,extensions:v,cart:a()(h,T),components:{ShippingRatesControlPackage:I}}),R=Object(d.a)().isEditor;return React.createElement(i.a,{isLoading:n,screenReaderLabel:Object(o.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},R?React.createElement(L,{packages:t,noResultsMessage:g,renderOption:f}):React.createElement(React.Fragment,null,React.createElement(l.ExperimentalOrderShippingPackages.Slot,O),React.createElement(l.ExperimentalOrderShippingPackages,null,React.createElement(L,{packages:t,noResultsMessage:g,renderOption:f}))))}},298:function(e,t){},299:function(e,t){},300:function(e,t){},304:function(e,t){},310:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var c=n(5),a=n.n(c),o=n(1),r=n(11),s=n(9),i=n(32),l=n(33),p=n(0),u=n(258);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function b(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;o.current.forEach((function(t){null!==e&&t.status!==e||c(t.id)}))},removeSnackbarNotice:c}}),[c]),s=Object(p.useMemo)((function(){return{addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(e,t)}}}),[n]);return b(b(b({notices:t},r),s),{},{setIsSuppressed:a})}().addSnackbarNotice,h=Object(m.b)().setValidationErrors;return function(e){for(var t=1;t in taxes","woo-gutenberg-products-block"),{TaxAmount:React.createElement(s.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:h})}))})}},371:function(e,t,n){"use strict";var c=n(20),a=n.n(c),o=n(4),r=n.n(o),s=n(7),i=n.n(s),l=n(1),p=n(0),u=n(33),d=n(28),b=n(2),m=n(32),g=function(e){var t=e.selectedShippingRates;return React.createElement("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(l.__)("via","woo-gutenberg-products-block")," ",Object(m.decodeEntities)(t.join(", ")))},f=n(152),h=n(293),v=function(e){var t=e.hasRates,n=e.shippingRates,c=e.shippingRatesLoading,a=t?Object(l.__)("Shipping options","woo-gutenberg-products-block"):Object(l.__)("Choose a shipping option","woo-gutenberg-products-block");return React.createElement("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},React.createElement("legend",{className:"screen-reader-text"},a),React.createElement(h.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:React.createElement(f.a,{isDismissible:!1,className:i()("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}))},O=n(65),R=n(157),_=n(19),j=n.n(_),w=n(171),E=(n(288),n(370)),y=function(e){var t=e.address,n=e.onUpdate,c=e.addressFields,a=Object(p.useState)(t),o=r()(a,2),s=o[0],i=o[1],u=Object(w.b)(),d=u.hasValidationErrors,b=u.showAllValidationErrors;return React.createElement("form",{className:"wc-block-components-shipping-calculator-address"},React.createElement(E.a,{fields:c,onChange:i,values:s}),React.createElement(R.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:j()(s,t),onClick:function(e){if(e.preventDefault(),b(),!d)return n(s)},type:"submit"},Object(l.__)("Update","woo-gutenberg-products-block")))},k=function(e){var t=e.onUpdate,n=void 0===t?function(){}:t,c=e.addressFields,a=void 0===c?["country","state","city","postcode"]:c,o=Object(O.b)(),r=o.shippingAddress,s=o.setShippingAddress;return React.createElement("div",{className:"wc-block-components-shipping-calculator"},React.createElement(y,{address:r,addressFields:a,onUpdate:function(e){s(e),n(e)}}))},C=n(21),S=n.n(C),N=function(e){var t=e.address;if(0===Object.values(t).length)return null;var n=Object(b.getSetting)("shippingCountries",{}),c=Object(b.getSetting)("shippingStates",{}),a="string"==typeof n[t.country]?Object(m.decodeEntities)(n[t.country]):"",o="object"===S()(c[t.country])&&"string"==typeof c[t.country][t.state]?Object(m.decodeEntities)(c[t.country][t.state]):t.state,r=[];r.push(t.postcode.toUpperCase()),r.push(t.city),r.push(o),r.push(a);var s=r.filter(Boolean).join(", ");return s?React.createElement("span",{className:"wc-block-components-shipping-address"},Object(l.sprintf)(
+/* translators: %s location. */
+Object(l.__)("Shipping to %s","woo-gutenberg-products-block"),s)+" "):null},x=(n(300),function(e){var t=e.label,n=void 0===t?Object(l.__)("Calculate","woo-gutenberg-products-block"):t,c=e.isShippingCalculatorOpen,a=e.setIsShippingCalculatorOpen;return React.createElement("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){a(!c)},"aria-expanded":c},n)}),I=function(e){var t=e.showCalculator,n=e.isShippingCalculatorOpen,c=e.setIsShippingCalculatorOpen,a=e.shippingAddress;return React.createElement(React.Fragment,null,React.createElement(N,{address:a}),t&&React.createElement(x,{label:Object(l.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c}))},P=function(e){var t=e.showCalculator,n=e.isShippingCalculatorOpen,c=e.setIsShippingCalculatorOpen;return t?React.createElement(x,{isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c}):React.createElement("em",null,Object(l.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=function(e){var t=e.currency,n=e.values,c=e.showCalculator,o=void 0===c||c,s=e.showRateSelector,m=void 0===s||s,f=e.className,h=Object(p.useState)(!1),O=r()(h,2),R=O[0],_=O[1],j=Object(u.a)(),w=j.shippingAddress,E=j.cartHasCalculatedShipping,y=j.shippingRates,C=j.shippingRatesLoading,S=Object(b.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(n.total_shipping,10)+parseInt(n.total_shipping_tax,10):parseInt(n.total_shipping,10),N=y.some((function(e){return e.shipping_rates.length}))||S,x={isShippingCalculatorOpen:R,setIsShippingCalculatorOpen:_},T=y.flatMap((function(e){return e.shipping_rates.filter((function(e){return e.selected})).flatMap((function(e){return e.name}))}));return React.createElement("div",{className:i()("wc-block-components-totals-shipping",f)},React.createElement(d.TotalsItem,{label:Object(l.__)("Shipping","woo-gutenberg-products-block"),value:E?S:React.createElement(P,a()({showCalculator:o},x)),description:React.createElement(React.Fragment,null,E&&React.createElement(React.Fragment,null,React.createElement(g,{selectedShippingRates:T}),React.createElement(I,a()({shippingAddress:w,showCalculator:o},x)))),currency:t}),o&&R&&React.createElement(k,{onUpdate:function(){_(!1)}}),m&&E&&React.createElement(v,{hasRates:N,shippingRates:y,shippingRatesLoading:C}))}},398:function(e,t,n){"use strict";n.r(t);var c=n(154),a=n(26),o=n.n(a),r=n(1),s=n(347),i=n(348),l=n(371),p=n(352),u=n(28),d=n(60),b=n(33),m=n(310),g=n(2),f=n(276),h=["extensions","receiveCart"],v={isShippingCalculatorEnabled:{type:"boolean",default:Object(g.getSetting)("isShippingCalculatorEnabled",!0)},showRateAfterTaxName:{type:"boolean",default:Object(g.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{move:!0,remove:!0}}};t.default=Object(c.withFilteredAttributes)(v)((function(e){var t=e.className,n=e.showRateAfterTaxName,c=void 0!==n&&n,a=e.isShippingCalculatorEnabled,v=void 0===a||a,O=Object(b.a)(),R=O.cartFees,_=O.cartTotals,j=O.cartNeedsShipping,w=Object(m.a)(),E=w.applyCoupon,y=w.removeCoupon,k=w.isApplyingCoupon,C=w.isRemovingCoupon,S=w.appliedCoupons,N=Object(d.getCurrencyFromPriceResponse)(_),x=Object(b.a)(),I=x.extensions,P=(x.receiveCart,o()(x,h)),T={extensions:I,cart:P},L={extensions:I,cart:P};return React.createElement("div",{className:t},React.createElement(f.a,{headingLevel:"2",className:"wc-block-cart__totals-title"},Object(r.__)("Cart totals","woo-gutenberg-products-block")),React.createElement(u.TotalsWrapper,null,React.createElement(u.Subtotal,{currency:N,values:_}),React.createElement(u.TotalsFees,{currency:N,cartFees:R}),React.createElement(s.a,{cartCoupons:S,currency:N,isRemovingCoupon:C,removeCoupon:y,values:_})),Object(g.getSetting)("couponsEnabled",!0)&&React.createElement(u.TotalsWrapper,null,React.createElement(i.a,{onSubmit:E,isLoading:k})),React.createElement(u.ExperimentalDiscountsMeta.Slot,L),j&&React.createElement(u.TotalsWrapper,null,React.createElement(l.a,{showCalculator:v,showRateSelector:!0,values:_,currency:N})),!Object(g.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(_.total_tax,10)>0&&React.createElement(u.TotalsWrapper,null,React.createElement(u.TotalsTaxes,{showRateAfterTaxName:c,currency:N,values:_})),React.createElement(u.TotalsWrapper,null,React.createElement(p.a,{currency:N,values:_})),React.createElement(u.ExperimentalOrderMeta.Slot,T))}))},85:function(e,t,n){"use strict";var c=n(20),a=n.n(c),o=n(5),r=n.n(o),s=n(26),i=n.n(s),l=n(127),p=n(7),u=n.n(p),d=(n(156),["className","value","currency","onValueChange","displayType"]);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function m(e){for(var t=1;t 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' => 'cf79e10188386e7ca75ecce8f4f3a98e');
\ No newline at end of file
diff --git a/build/cart-frontend.js b/build/cart-frontend.js
new file mode 100644
index 00000000000..597de64eb9a
--- /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=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},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){e.exports=window.wc.blocksCheckout},function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(56),o=r(63);function i(e){return function(e){if(Array.isArray(e))return Object(n.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){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var n=r(4),o=r.n(n),i=r(5),c=r.n(i),a=r(6),s=r(0),u=r(9),l=r(11),f=r(32),p=r(101),d=r(151),m=r(36),h=r(107),b=function(e){var t=e.detail;t&&t.preserveCartData||Object(l.dispatch)(u.CART_STORE_KEY).invalidateResolutionForStore()},v=function(){1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},g=function(){Object(s.useEffect)((function(){return function(){if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:function(){}}),0===window.wcBlocksStoreCartListeners.count){var e=Object(h.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(h.b)("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=function(){e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",b),document.body.removeEventListener("wc-blocks_removed_from_cart",b)}}window.wcBlocksStoreCartListeners.count++}(),v}),[])};function y(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 O(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(m.a)(),r=t.isEditor,n=t.previewData,o=null==n?void 0:n.previewCart,i=e.shouldSelect,c=Object(s.useRef)();g();var f=Object(l.useSelect)((function(e,t){var n=t.dispatch;if(!i)return k;if(r)return{cartCoupons:o.coupons,cartItems:o.items,cartFees:o.fees,cartItemsCount:o.items_count,cartItemsWeight:o.items_weight,cartNeedsPayment:o.needs_payment,cartNeedsShipping:o.needs_shipping,cartItemErrors:u.EMPTY_CART_ITEM_ERRORS,cartTotals:o.totals,cartIsLoading:!1,cartErrors:u.EMPTY_CART_ERRORS,billingAddress:j,shippingAddress:E,extensions:u.EMPTY_EXTENSIONS,shippingRates:o.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:o.has_calculated_shipping,paymentRequirements:o.paymentRequirements,receiveCart:"function"==typeof(null==o?void 0:o.receiveCart)?o.receiveCart:function(){}};var c=e(u.CART_STORE_KEY),a=c.getCartData(),s=c.getCartErrors(),l=c.getCartTotals(),f=!c.hasFinishedResolution("getCartData"),p=c.isCustomerDataUpdating(),m=n(u.CART_STORE_KEY).receiveCart,h=w(a.billingAddress),b=a.needsShipping?w(a.shippingAddress):h,v=a.fees.length>0?a.fees.map((function(e){return w(e)})):u.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map((function(e){return O(O({},e),{},{label:e.code})})):u.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:v,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:l,cartIsLoading:f,cartErrors:s,billingAddress:Object(d.a)(h),shippingAddress:Object(d.a)(b),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}}),[i]);return c.current&&Object(a.isEqual)(c.current,f)||(c.current=f),c.current}},function(e,t){e.exports=window.wp.a11y},function(e,t){function r(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)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var c=e.apply(t,n);function a(e){r(c,o,i,a,s,"next",e)}function s(e){r(c,o,i,a,s,"throw",e)}a(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=(r(11),Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:function(){}})),i=function(){return Object(n.useContext)(o)}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),l=Object(i.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,s({},t))}}}),[r]);return s(s(s({notices:t},u),l),{},{setIsSuppressed:o})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(5),o=r.n(n),i=r(74),c=r(0),a=r(33);function s(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 u(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};try{Object(i.doAction)("experimental__woocommerce_blocks-".concat(e),t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(c.useCallback)((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(i.doAction)("experimental__woocommerce_blocks-checkout-".concat(e),u(u({},r),{},{storeCart:t.current}))}catch(e){console.error(e)}}),[])}}},function(e,t){e.exports=window.wp.deprecated},function(e,t,r){"use strict";r.d(t,"b",(function(){return I})),r.d(t,"a",(function(){return F}));var n,o=r(4),i=r.n(o),c=r(0),a=r(1),s=r(96),u=r(53),l=r.n(u),f=r(66);!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"}(n||(n={}));var p,d=function(){return{type:n.SET_IDLE}},m=function(e){return{type:n.SET_REDIRECT_URL,redirectUrl:e}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:n.SET_COMPLETE,data:e}},b=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?n.SET_HAS_ERROR:n.SET_NO_ERROR}},v=r(5),g=r.n(v),y=r(2);function O(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(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(p||(p={}));var E=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0,r=t.redirectUrl,o=t.type,i=t.customerId,c=t.orderId,a=t.orderNotes,s=t.extensionData,u=t.shouldCreateAccount,l=t.data,f=e;switch(o){case n.SET_PRISTINE:f=j;break;case n.SET_IDLE:f=e.status!==p.IDLE?w(w({},e),{},{status:p.IDLE}):e;break;case n.SET_REDIRECT_URL:f=void 0!==r&&r!==e.redirectUrl?w(w({},e),{},{redirectUrl:r}):e;break;case n.SET_PROCESSING_RESPONSE:f=w(w({},e),{},{processingResponse:l});break;case n.SET_COMPLETE:f=e.status!==p.COMPLETE?w(w({},e),{},{status:p.COMPLETE,redirectUrl:void 0!==l&&"string"==typeof l.redirectUrl&&l.redirectUrl?l.redirectUrl:e.redirectUrl}):e;break;case n.SET_PROCESSING:f=!1===(f=e.status!==p.PROCESSING?w(w({},e),{},{status:p.PROCESSING,hasError:!1}):e).hasError?f:w(w({},f),{},{hasError:!1});break;case n.SET_BEFORE_PROCESSING:f=e.status!==p.BEFORE_PROCESSING?w(w({},e),{},{status:p.BEFORE_PROCESSING,hasError:!1}):e;break;case n.SET_AFTER_PROCESSING:f=e.status!==p.AFTER_PROCESSING?w(w({},e),{},{status:p.AFTER_PROCESSING}):e;break;case n.SET_HAS_ERROR:f=e.hasError?e:w(w({},e),{},{hasError:!0}),f=e.status===p.PROCESSING||e.status===p.BEFORE_PROCESSING?w(w({},f),{},{status:p.IDLE}):f;break;case n.SET_NO_ERROR:f=e.hasError?w(w({},e),{},{hasError:!1}):e;break;case n.INCREMENT_CALCULATING:f=w(w({},e),{},{calculatingCount:e.calculatingCount+1});break;case n.DECREMENT_CALCULATING:f=w(w({},e),{},{calculatingCount:Math.max(0,e.calculatingCount-1)});break;case n.SET_CUSTOMER_ID:f=void 0!==i?w(w({},e),{},{customerId:i}):e;break;case n.SET_ORDER_ID:f=void 0!==c?w(w({},e),{},{orderId:c}):e;break;case n.SET_SHOULD_CREATE_ACCOUNT:void 0!==u&&u!==e.shouldCreateAccount&&(f=w(w({},e),{},{shouldCreateAccount:u}));break;case n.SET_ORDER_NOTES:void 0!==a&&e.orderNotes!==a&&(f=w(w({},e),{},{orderNotes:a}));break;case n.SET_EXTENSION_DATA:void 0!==s&&e.extensionData!==s&&(f=w(w({},e),{},{extensionData:s}))}return f!==e&&o!==n.SET_PRISTINE&&f.status===p.PRISTINE&&(f.status=p.IDLE),f},_=r(32),P=r(99),R=r(176),x=r(178),C=r(171),T=r(51),A=r(52),M=r(11),N=r(43),D=Object(c.createContext)({dispatchActions:{resetCheckout:function(){},setRedirectUrl:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},incrementCalculating:function(){},decrementCalculating:function(){},setCustomerId:function(e){},setOrderId:function(e){},setOrderNotes:function(e){},setExtensionData:function(e){}},onSubmit:function(){},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:function(){return function(){}},onCheckoutAfterProcessingWithError:function(){return function(){}},onCheckoutBeforeProcessing:function(){return function(){}},onCheckoutValidationBeforeProcessing:function(){return function(){}},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:function(e){},extensionData:{}}),I=function(){return Object(c.useContext)(D)},F=function(e){var t=e.children,r=e.redirectUrl,o=e.isCart,u=void 0!==o&&o;j.redirectUrl=r;var v,g=Object(c.useReducer)(k,j),y=i()(g,2),O=y[0],E=y[1],S=Object(C.b)().setValidationErrors,w=Object(T.a)(),I=w.addErrorNotice,F=w.removeNotices,L=Object(A.a)().dispatchCheckoutEvent,B=O.calculatingCount>0,V=Object(N.c)(),U=V.isSuccessResponse,H=V.isErrorResponse,G=V.isFailResponse,z=V.shouldRetry,q=(v=Object(N.c)().noticeContexts,{checkoutNotices:Object(M.useSelect)((function(e){return e("core/notices").getNotices("wc/checkout")}),[]),expressPaymentNotices:Object(M.useSelect)((function(e){return e("core/notices").getNotices(v.EXPRESS_PAYMENTS)}),[v.EXPRESS_PAYMENTS]),paymentNotices:Object(M.useSelect)((function(e){return e("core/notices").getNotices(v.PAYMENTS)}),[v.PAYMENTS])}),W=q.checkoutNotices,Y=q.paymentNotices,X=q.expressPaymentNotices,K=Object(c.useReducer)(P.b,{}),$=i()(K,2),J=$[0],Q=$[1],Z=Object(c.useRef)(J),ee=function(e){return Object(c.useMemo)((function(){return{onCheckoutAfterProcessingWithSuccess:Object(R.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(R.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(R.a)("checkout_validation_before_processing",e)}}),[e])}(Q),te=ee.onCheckoutAfterProcessingWithSuccess,re=ee.onCheckoutAfterProcessingWithError,ne=ee.onCheckoutValidationBeforeProcessing;Object(c.useEffect)((function(){Z.current=J}),[J]);var oe=Object(c.useMemo)((function(){return function(){return l()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),ne.apply(void 0,arguments)}}),[ne]),ie=Object(c.useMemo)((function(){return{resetCheckout:function(){E({type:n.SET_PRISTINE})},setRedirectUrl:function(e){E(m(e))},setHasError:function(e){E(b(e))},incrementCalculating:function(){E({type:n.INCREMENT_CALCULATING})},decrementCalculating:function(){E({type:n.DECREMENT_CALCULATING})},setCustomerId:function(e){var t;E((t=e,{type:n.SET_CUSTOMER_ID,customerId:t}))},setOrderId:function(e){E(function(e){return{type:n.SET_ORDER_ID,orderId:e}}(e))},setOrderNotes:function(e){E(function(e){return{type:n.SET_ORDER_NOTES,orderNotes:e}}(e))},setExtensionData:function(e){E(function(e){return{type:n.SET_EXTENSION_DATA,extensionData:e}}(e))},setAfterProcessing:function(e){var t,r=function(e){var 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((function(e){var r=e.key,n=e.value;t.paymentDetails[r]=Object(_.decodeEntities)(n)}))),"message"in e&&(t.message=Object(_.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t}(e);r.redirectUrl&&E(m(r.redirectUrl)),E((t=r,{type:n.SET_PROCESSING_RESPONSE,data:t})),E({type:n.SET_AFTER_PROCESSING})}}}),[]);Object(c.useEffect)((function(){O.status===p.BEFORE_PROCESSING&&(F("error"),Object(x.a)(Z.current,"checkout_validation_before_processing",{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;I(t),S(r)})),E(d()),E(b())):E({type:n.SET_PROCESSING})})))}),[O.status,S,I,F,E]);var ce=Object(s.a)(O.status),ae=Object(s.a)(O.hasError);Object(c.useEffect)((function(){if((O.status!==ce||O.hasError!==ae)&&O.status===p.AFTER_PROCESSING){var e={redirectUrl:O.redirectUrl,orderId:O.orderId,customerId:O.customerId,orderNotes:O.orderNotes,processingResponse:O.processingResponse};O.hasError?Object(x.b)(Z.current,"checkout_after_processing_with_error",e).then((function(t){var r=function(e){var t=null;return e.forEach((function(e){if((H(e)||G(e))&&e.message){var r=e.messageContext?{context:e.messageContext}:void 0;t=e,I(e.message,r)}})),t}(t);if(null!==r)z(r)?E(d()):E(h(r));else{if(!(W.some((function(e){return"error"===e.status}))||X.some((function(e){return"error"===e.status}))||Y.some((function(e){return"error"===e.status})))){var n,o=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");I(o,{id:"checkout"})}E(d())}})):Object(x.b)(Z.current,"checkout_after_processing_with_success",e).then((function(e){var t=null,r=null;if(e.forEach((function(e){U(e)&&(t=e),(H(e)||G(e))&&(r=e)})),t&&!r)E(h(t));else if(Object(f.b)(r)){if(r.message){var n=r.messageContext?{context:r.messageContext}:void 0;I(r.message,n)}z(r)?E(b(!0)):E(h(r))}else E(h())}))}}),[O.status,O.hasError,O.redirectUrl,O.orderId,O.customerId,O.orderNotes,O.processingResponse,ce,ae,ie,I,H,G,U,z,W,X,Y]);var se={onSubmit:Object(c.useCallback)((function(){L("submit"),E({type:n.SET_BEFORE_PROCESSING})}),[L]),isComplete:O.status===p.COMPLETE,isIdle:O.status===p.IDLE,isCalculating:B,isProcessing:O.status===p.PROCESSING,isBeforeProcessing:O.status===p.BEFORE_PROCESSING,isAfterProcessing:O.status===p.AFTER_PROCESSING,hasError:O.hasError,redirectUrl:O.redirectUrl,onCheckoutBeforeProcessing:oe,onCheckoutValidationBeforeProcessing:ne,onCheckoutAfterProcessingWithSuccess:te,onCheckoutAfterProcessingWithError:re,dispatchActions:ie,isCart:u,orderId:O.orderId,hasOrder:!!O.orderId,customerId:O.customerId,orderNotes:O.orderNotes,shouldCreateAccount:O.shouldCreateAccount,setShouldCreateAccount:function(e){return E((t=e,{type:n.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:O.extensionData};return React.createElement(D.Provider,{value:se},t)}},,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);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&T.some((function(e){return!(!e.code||!Object.values(d).includes(e.code))}))?L({type:_}):L({type:k})}),[T]);var W=Object(a.useMemo)((function(){return{isPristine:F===k,isValid:F===k,hasInvalidAddress:F===_,hasError:F===P||F===_}}),[F]);Object(a.useEffect)((function(){C||0!==x.length&&!W.hasError||Object(y.a)(G.current,"shipping_rates_fail",{hasInvalidAddress:W.hasInvalidAddress,hasError:W.hasError})}),[x,C,W.hasError,W.hasInvalidAddress]),Object(a.useEffect)((function(){!C&&x.length>0&&!W.hasError&&Object(y.a)(G.current,"shipping_rates_success",x)}),[x,C,W.hasError]),Object(a.useEffect)((function(){N||(W.hasError?Object(y.a)(G.current,"shipping_rate_select_fail",{hasError:W.hasError,hasInvalidAddress:W.hasInvalidAddress}):Object(y.a)(G.current,"shipping_rate_select_success",q.current))}),[N,W.hasError,W.hasInvalidAddress]);var Y=function(e){for(var t=1;t=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.warning},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],_n=!0,c=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);_n=!0);}catch(e){c=!0,o=e}finally{try{_n||null==r.return||r.return()}finally{if(c)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){void 0===r&&(r={});var o=r.maxWait,i=Object(n.useRef)(null),c=Object(n.useRef)([]),a=r.leading,s=void 0===r.trailing||r.trailing,u=Object(n.useRef)(!1),l=Object(n.useRef)(null),f=Object(n.useRef)(!1),p=Object(n.useRef)(e);p.current=e;var d=Object(n.useCallback)((function(){clearTimeout(l.current),clearTimeout(i.current),i.current=null,c.current=[],l.current=null,u.current=!1}),[]);Object(n.useEffect)((function(){return f.current=!1,function(){f.current=!0}}),[]);var m=Object(n.useCallback)((function(){for(var e=[],r=0;r0?a/2:u)+(u+a/2>window.innerWidth?window.innerWidth-u:a/2)},f=e.left;"right"===n?f=e.right:"middle"!==i&&(f=u);var p=e.right;"left"===n?p=e.left:"middle"!==i&&(p=u);var d,m={popoverLeft:f,contentWidth:f-a>0?a:f},h={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},b=r,v=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 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 k(e,t,r,n,o,i,c){var a=t.height;if(o){var s=(Object(v.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)},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=r,m=null;if(!o)if("middle"===r&&l.contentHeight===a)d="middle";else if("top"===r&&f.contentHeight===a)d="top";else if("bottom"===r&&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 _=r(30),P=r(12);var R=Object(i.createContext)({focusHistory:[]}),x=R.Provider,C=R.Consumer;x.displayName="FocusReturnProvider",C.displayName="FocusReturnConsumer",i.Component;var T=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(d.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(f.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!==c())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(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)(C,null,(function(r){return Object(i.createElement)(t,{childProps:e,focus:r})}))}}}),"withFocusReturn");var A=Object(y.createHigherOrderComponent)((function(e){return function(t){Object(d.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(f.a)(this,c),(e=o.apply(this,arguments)).focusContainRef=Object(i.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(P.a)(e)),e}return Object(p.a)(c,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===g.TAB){var t=v.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(89);var N=function(e){Object(d.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(f.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}(i.Component),D=Object(M.a)(N);function I(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(d.a)(r,e);var t=I(r);function r(){return Object(f.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}(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(48);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 fe=function(e){var t=e.headerTitle,r=e.onClose,c=e.onKeyDown,s=e.children,u=e.className,f=e.noArrow,p=void 0===f||f,d=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,P=e.shouldAnchorIncludePadding,R=e.anchorRect,x=e.getAnchorRect,C=e.expandOnMobile,T=e.animate,A=void 0===T||T,M=e.onClickOutside,N=e.onFocusOutside,I=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=C&&X,re=Object(y.useResizeObserver)(),ne=Object(b.a)(re,2),oe=ne[0],fe=ne[1];p=ee||p,Object(i.useLayoutEffect)((function(){if(ee)return le(Y.current,"is-without-arrow",p),le(Y.current,"is-alternate",d),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(v.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 f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:ae(p,f)}}(q,R,x,_,P);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],f=void 0===l?"center":l,p=s[2],d=k(e,t,u,p,n,o,i),m=w(e,t,f,p,n,d.yAxis,c);return S(S({},m),d)}(e,fe.height?fe:W.current.getBoundingClientRect(),h,I,Y.current,c,t),u=s.popoverTop,l=s.popoverLeft,f=s.xAxis,m=s.yAxis,g=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"===f&&"middle"===m),le(Y.current,"is-alternate",d),se(Y.current,"data-x-axis",f),se(Y.current,"data-y-axis",m),ue(W.current,"maxHeight","number"==typeof g?g+"px":""),ue(W.current,"maxWidth","number"==typeof y?y+"px":""),Q(({left:"right",right:"left"}[f]||"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,x,_,P,h,fe,I,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=v.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===g.ESCAPE&&r&&(e.stopPropagation(),r()),c&&c(e)},de=Object(i.createElement)(D,{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":p,"is-alternate":d})},z,{onKeyDown:pe,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)(ge,{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 j&&(de=Object(i.createElement)(ce,null,de)),Z.ref&&(de=Object(i.createElement)(te,{name:V},de)),_||R?de:Object(i.createElement)("span",{ref:q},de)};fe.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 pe=fe,de=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(d.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(f.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===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)(pe,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(i.createElement)(de,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(i.Component),he=r(86);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}}}}(ve);try{for(D.s();!(N=D.n()).done;)x[N.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){D.e(e)}finally{D.f()}}var I=!T&&(S&&_||k||!!_&&(!P||Object(s.isArray)(P)&&!P.length)&&!1!==S),F=Object(i.createElement)(A,Object(n.a)({},M,x,{className:C,"aria-label":x["aria-label"]||_,ref:t}),E&&Object(i.createElement)(he.a,{icon:E,size:j}),P);return I?Object(i.createElement)(me,{text:_,shortcut:k,position:w},F):F}))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(4),o=r.n(n),i=r(0),c=function(){var e=Object(i.useState)(),t=o()(e,2)[1];return Object(i.useCallback)((function(e){t((function(){throw e}))}),[])}},,,function(e,t,r){"use strict";var n=r(22),o=r(13),i=r(18),c=r(0),a=r(44),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;t2&&void 0!==arguments[2]?arguments[2]:"",n=r&&void 0!==m[r]?m[r]:{};return e.map((function(e){var r=a.defaultAddressFields[e]||{},o=n[e]||{},i=t[e]||{};return f(f(f({key:e},r),o),i)})).sort((function(e,t){return e.index-t.index}))}},function(e,t,r){"use strict";function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";var n=r(13),o=r(14),i=r(15),c=r(12),a=r(16),s=r(17),u=r(10),l=r(0),f=r(6),p=r(25);var d=["button","submit"];t.a=Object(p.createHigherOrderComponent)((function(e){return function(t){Object(a.a)(h,t);var r,p,m=(r=h,p=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(u.a)(r);if(p){var n=Object(u.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(s.a)(this,e)});function h(){var e;return Object(o.a)(this,h),(e=m.apply(this,arguments)).bindNode=e.bindNode.bind(Object(c.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(c.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(c.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(c.a)(e)),e}return Object(i.a)(h,[{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,r=e.target;Object(f.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(f.includes)(d,e.type)}return!1}(r)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(l.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(l.createElement)(e,Object(n.a)({ref:this.bindNode},this.props)))}}]),h}(l.Component)}),"withFocusOutside")},function(e,t,r){var n=r(62);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return m}));var n=r(20),o=r.n(n),i=r(5),c=r.n(i),a=r(0),s=r(46);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;t0&&Array.prototype.filter.call(a,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:r,containers:a,getProps:n,getErrorBoundaryProps:o}),Array.prototype.forEach.call(s,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,i,c,a;n=(r=l(l({},e),{},{wrapper:t})).Block,o=r.getProps,i=r.getErrorBoundaryProps,c=r.selector,a=r.wrapper.querySelectorAll(c),p({Block:n,containers:a,getProps:o,getErrorBoundaryProps:i})}))}))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){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,f=-1;function p(){l&&s&&(l=!1,s.length?u=s.concat(u):f=-1,u.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=u.length;t;){for(s=u,u=[];++f1)for(var r=1;r2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(c.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e}}},l={},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,r=t.type,o=t.eventType,c=t.id,a=t.callback,u=t.priority,f=e.hasOwnProperty(o)?new Map(e[o]):new Map;switch(r){case n.ADD_EVENT_CALLBACK:return f.set(c,{priority:u,callback:a}),s(s({},e),{},i()({},o,f));case n.REMOVE_EVENT_CALLBACK:return f.delete(c),s(s({},e),{},i()({},o,f))}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return E})),r.d(t,"a",(function(){return j}));var n=r(5),o=r.n(n),i=r(4),c=r.n(i),a=(r(8),r(0)),s=r(11),u=r(52),l=r(36),f=r(20),p=r.n(f),d=r(7),m=r.n(d),h=r(152),b=(r(105),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""}),v=function(e){var t=e.className,r=e.notices,n=e.removeNotice,o=r.filter((function(e){return"snackbar"!==e.type}));if(!o.length)return null;var i=m()(t,"wc-block-components-notices");return React.createElement("div",{className:i},o.map((function(e){return React.createElement(h.a,p()({key:"store-notice-"+e.id},e,{className:m()("wc-block-components-notices__notice",b(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))};function g(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 y(e){for(var t=1;t0&&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]:{};m(e,t,y(y({},r),{},{context:r.context||p})),S("store-notice-create",{status:e,content:t,options:r})}),[m,S,p]),_=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;h(e,t)}),[h,p]),P={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(p)}}),[p]).notices,createNotice:k,removeNotice:_,context:p,setIsSuppressed:j},R=E?null:React.createElement(v,{className:n,notices:P.notices,removeNotice:P.removeNotice,isEditor:w});return React.createElement(O.Provider,{value:P},i&&R,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(4),o=r.n(n),i=function(e){return e.reduce((function(e,t){var r=o()(t,2),n=r[0],i=r[1];return e[n]=i,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 f})),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 h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return v})),r.d(t,"b",(function(){return g}));var n,o=r(2),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),f=o.STORE_PAGES.privacy.permalink,p=(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"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),v=Object(o.getSetting)("shippingStates",{}),g=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 i})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return a}));var n,o=window.CustomEvent||null,i=function(e,t){var r=t.bubbles,n=void 0!==r&&r,i=t.cancelable,c=void 0!==i&&i,a=t.element,s=t.detail,u=void 0===s?{}:s;if(o){a||(a=document.body);var l=new o(e,{bubbles:n,cancelable:c,detail:u});a.dispatchEvent(l)}},c=function(){n&&clearTimeout(n),n=setTimeout((function(){i("wc_fragment_refresh",{bubbles:!0,cancelable:!0})}),50)},a=function(e,t){var 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 function(){};var o=function(){i(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},function(e,t,r){"use strict";var n=r(0),o=r(44),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(132),o=r(113),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 f={};for(t in e)n=e[t],s(t)?f[t]=n:(r=t.toLowerCase(),u.call(c,r)?f[(l=c[r]).propertyName]=!!(l.hasBooleanValue||l.hasOverloadedBooleanValue&&!n)||n:u.call(a,t)?f[(l=a[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(f[t]=n));return i(e.style,f),f}},function(e,t,r){var n=r(3),o=r(136).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(142).CASE_SENSITIVE_TAG_NAMES,i={},c=0,a=o.length;c=0&&t<=window.innerHeight||e.scrollIntoView()}});t.a=function(e){return function(t){var r=Object(i.useRef)(null);return React.createElement(React.Fragment,null,React.createElement("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),React.createElement(e,o()({},t,{scrollToTop:function(e){var t,n;null!==r.current&&(t=r.current,n=(e||{}).focusableSelector,window&&Number.isFinite(window.innerHeight)&&(n?function(e,t){var r,n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){var o=n[0];c(o),null==o||o.focus()}else c(e)}(t,n):c(t)))}})))}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(3),o=r(80);function i(e,t){return e===t}function c(e,t,r){var c=r&&r.equalityFn?r.equalityFn:i,a=Object(n.useState)(e),s=a[0],u=a[1],l=Object(o.a)(Object(n.useCallback)((function(e){return u(e)}),[]),t,r),f=l[0],p=l[1],d=l[2],m=Object(n.useRef)(e);return Object(n.useEffect)((function(){c(m.current,e)||(f(e),m.current=e)}),[e,f,c]),[s,p,d]}},,function(e,t,r){var n=r(131),o=r(112),i=r(140),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(20)),i=n(r(73)),c=r(3),a=n(c),s=n(r(160)),u=n(r(27)),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 f(){var e=c.useState(!1)[1];return c.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return l.und(e)||l.nul(e)?t:e}function d(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=d.startTime+u.duration;else if(u.decay)b=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-b)<.1)&&(h=b);else{f=void 0!==d.lastTime?d.lastTime:t,y=void 0!==d.lastVelocity?d.lastVelocity:u.initialVelocity,t>f+64&&(f=t);for(var O=Math.floor(t-f),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}(g),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()},f=l.arr(s.to)||l.fun(s.to);a?setTimeout((function(){r===t.guid&&(f?t.runAsync(s,u):t.diff(s).start(u))}),a):f?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),I||(I=!0,w(T||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 g||(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 fe(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 de(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|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=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(fe(r[1]),de(r[2]),de(r[3])))>>>0:(r=ne.exec(t))?(ue(fe(r[1]),de(r[2]),de(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,ve=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},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).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}),ge);var Ee={};M((function(e){return new $(e)})),x("div"),_((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ve,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+")"}))}})),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,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("--"),f=Oe(u,r[u],l);"float"===u&&(u="cssFloat"),l?e.style.setProperty(u,f):e.style[u]=f}for(var p in a){var d=s?p:Ee[p]||(Ee[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(d)&&e.setAttribute(d,a[p])}}),(function(e){return e}));var je,Se,we=(je=function(e){return c.forwardRef((function(t,r){var n=f(),s=c.useRef(!0),u=c.useRef(null),p=c.useRef(null),d=c.useCallback((function(e){var t=u.current;u.current=new D(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,u.current.getAnimatedValue())),p.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(p,s,n)})),d(t);var m,h=u.current.getValue(),v=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),g=(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({},v,{ref:g}))}))},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 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],f=s[1],p=s[2],d=c.useMemo((function(){return function(e){return f((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&&d(t)})),c.useEffect((function(){r.current=!0}),[]),n?[u,d,p]: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),p=void 0!==l&&l,d=(a.enter,a.leave,a.update,a.onDestroyed),h=(a.keys,a.items,a.onFrame),b=a.onRest,v=a.onStart,g=a.ref,y=i(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),E=c.useRef(!1),j=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(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,c=i(e,["first","prevProps"]),a=X(t),s=a.items,u=a.keys,l=a.initial,f=a.from,p=a.enter,d=a.leave,h=a.update,b=a.trail,v=void 0===b?0:b,g=a.unique,y=a.config,O=a.order,E=void 0===O?["enter","leave","update"]:O,j=X(n),S=j.keys,w=j.items,k=o({},c.current),_=[].concat(c.deleted),P=Object.keys(k),R=new Set(P),x=new Set(u),C=u.filter((function(e){return!R.has(e)})),T=c.transitions.filter((function(e){return!e.destroyed&&!x.has(e.originalKey)})).map((function(e){return e.originalKey})),A=u.filter((function(e){return R.has(e)})),M=-v;E.length;)switch(E.shift()){case"enter":C.forEach((function(e,t){g&&_.find((function(t){return t.originalKey===e}))&&(_=_.filter((function(t){return t.originalKey!==e})));var n=u.indexOf(e),o=s[n],i=r&&void 0!==l?"initial":"enter";k[e]={slot:i,originalKey:e,key:g?String(e):W++,item:o,trail:M+=v,config:m(y,o,i),from:m(r&&void 0!==l?l||{}:f,o),to:m(p,o)}}));break;case"leave":T.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:M+=v,config:m(y,r,"leave"),to:m(d,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:M+=v,config:m(y,r,"update"),to:m(h,r)})}))}var N=u.map((function(e){return k[e]}));return _.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:C.length||T.length||A.length,first:r&&0===C.length,transitions:N,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,i=e.config,c=e.trail,a=e.key,s=e.item;j.current.instances.has(a)||j.current.instances.set(a,new z);var l=j.current.instances.get(a),f=o({},y,{to:n,from:r,config:i,ref:g,onRest:function(r){j.current.mounted&&(e.destroyed&&(g||u||K(j,a),d&&d(s)),!Array.from(j.current.instances).some((function(e){return!e[1].idle}))&&(g||u)&&j.current.deleted.length>0&&K(j),b&&b(s,t,r))},onStart:v&&function(){return v(s,t)},onFrame:h&&function(e){return h(s,t,e)},delay:c,reset:p&&"enter"===t});l.update(f),j.current.paused||l.start()})),c.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=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";r(155),t.a=function(){return React.createElement("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}},,,function(e,t){},,function(e,t,r){var n=r(3),o=r(112),i=r(113),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,f=(r=r||{}).library||n,p=f.cloneElement,d=f.createElement,m=f.isValidElement,h=[],b="function"==typeof r.replace,v=r.trim,g=0,y=t.length;g1&&(s=p(s,{key:s.key||g})),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=g),h.push(d(i.name,u,l))}else v?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(133),o=r(134),i=r(135),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 f(e,t){return(e&t)===t}function p(e,t,r){var n,o,i,p=e.Properties,d=e.DOMAttributeNames;for(o in p)n=d[o]||(r?o:o.toLowerCase()),i=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:f(i,c),hasBooleanValue:f(i,a),hasNumericValue:f(i,s),hasPositiveNumericValue:f(i,u),hasOverloadedBooleanValue:f(i,l)}}var d={};p(n,d);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:d,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(137)),i=r(139);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(138);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(114),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`")},f=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,d=s?"text/xml":"text/html";l=f=function(e,t){return t&&(e="<"+t+">"+e+""+t+">"),s&&(e=e.replace(a,"<$1$2$3/>")),p.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(f)return f(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=f(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(6),i=r(7),c=r.n(i),a=r(34),s=r(1),u=(r(76),r(81));t.a=Object(n.forwardRef)((function(t,r){var i=t.className,l=t.children,f=t.spokenMessage,p=void 0===f?l:f,d=t.politeness,m=void 0===d?"polite":d,h=t.actions,b=void 0===h?[]:h,v=t.onRemove,g=void 0===v?o.noop:v;!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(){g()}),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:g,tabIndex:"0",role:"button",onKeyPress:g,"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(98))},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(87),i=r(68),c=function(e){var t=e.country,r=void 0===t?"":t,n=e.state,o=void 0===n?"":n,i=e.city,c=void 0===i?"":i,a=e.postcode,s=void 0===a?"":a;return{country:r.trim(),state:o.trim(),city:c.trim(),postcode:s?s.replace(" ","").toUpperCase():""}},a=function(e){var t=e.email,r=void 0===t?"":t;return Object(i.isEmail)(r)?r.trim():""},s=function(e){var t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),i=Object.assign({},e);return r.forEach((function(t){var r=t.key,n=void 0===r?"":r,o=t.hidden;void 0!==o&&o&&function(e,t){return e in t}(n,e)&&(i[n]="")})),i}},function(e,t,r){"use strict";var n=r(0),o=r(6),i=r(7),c=r.n(i),a=r(1),s=r(34),u=r(108),l=r(81);t.a=function(e){var t=e.className,r=e.status,i=void 0===r?"info":r,f=e.children,p=e.spokenMessage,d=void 0===p?f:p,m=e.onRemove,h=void 0===m?o.noop:m,b=e.isDismissible,v=void 0===b||b,g=e.actions,y=void 0===g?[]:g,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,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])}(d,E);var S=c()(t,"components-notice","is-"+i,{"is-dismissible":v});return j&&(f=Object(n.createElement)(n.RawHTML,null,f)),Object(n.createElement)("div",{className:S},Object(n.createElement)("div",{className:"components-notice__content"},f,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,f=e.url;return Object(n.createElement)(l.a,{key:t,href:f,isPrimary:i,isSecondary:!s&&!f,isLink:!s&&!!f,onClick:f?void 0:u,className:c()("components-notice__action",r)},o)}))),v&&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(67);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,r){"use strict";r.d(t,"b",(function(){return Z})),r.d(t,"a",(function(){return ee}));var n,o,i=r(42),c=r.n(i),a=r(4),s=r.n(a),u=r(0);!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={}));var l={currentStatus:n.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},f={setPaymentStatus:function(){return{pristine:function(){},started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(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:function(){},activeSavedToken:"",setActiveSavedToken:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){return function(){return function(){}}},setExpressPaymentError:function(){},isExpressPaymentMethodActive:!1,setShouldSavePayment:function(){},shouldSavePayment:!1},p=r(5),d=r.n(p),m=r(21),h=r.n(m);function b(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 v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,r=t.type,i=t.paymentMethodData,c=t.shouldSavePaymentMethod,a=void 0!==c&&c,s=t.errorMessage,u=void 0===s?"":s,f=t.paymentMethods,p=void 0===f?{}:f;switch(r){case n.STARTED:return v(v({},e),{},{currentStatus:n.STARTED,paymentMethodData:i||e.paymentMethodData,hasSavedToken:g(i||e.paymentMethodData)});case n.ERROR:return e.currentStatus!==n.ERROR?v(v({},e),{},{currentStatus:n.ERROR,errorMessage:u||e.errorMessage}):e;case n.FAILED:return e.currentStatus!==n.FAILED?v(v({},e),{},{currentStatus:n.FAILED,paymentMethodData:i||e.paymentMethodData,errorMessage:u||e.errorMessage}):e;case n.SUCCESS:return e.currentStatus!==n.SUCCESS?v(v({},e),{},{currentStatus:n.SUCCESS,paymentMethodData:i||e.paymentMethodData,hasSavedToken:g(i||e.paymentMethodData)}):e;case n.PROCESSING:return e.currentStatus!==n.PROCESSING?v(v({},e),{},{currentStatus:n.PROCESSING,errorMessage:""}):e;case n.COMPLETE:return e.currentStatus!==n.COMPLETE?v(v({},e),{},{currentStatus:n.COMPLETE}):e;case n.PRISTINE:return v(v({},l),{},{currentStatus:n.PRISTINE,paymentMethods:v({},e.paymentMethods),expressPaymentMethods:v({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case o.SET_REGISTERED_PAYMENT_METHODS:return v(v({},e),{},{paymentMethods:p});case o.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return v(v({},e),{},{expressPaymentMethods:p});case o.SET_SHOULD_SAVE_PAYMENT_METHOD:return v(v({},e),{},{shouldSavePaymentMethod:a})}},O=r(35),E=r.n(O),j=r(24),S=r.n(j),w=r(1),k=r(31),_=r(45),P=r(2),R=r(80),x=r(36),C=r(65),T=r(57),A=r(33),M=r(51),N=r(43);function D(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 I(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:void 0;r&&re(r),te(V({errorMessage:e||"",paymentMethodData:t||{}}))},success:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;t&&re(t),void 0!==h()(r)&&null!=r&&r.address&&ne(r.address),te(U({paymentMethodData:e}))}}}),[te,re,ne])}),se=ae.dispatchActions,ue=ae.setPaymentStatus,le=function(e){var t=Object(k.getPaymentMethods)(),r=Object(N.c)().noticeContexts,n=new Set([].concat(c()(Object(P.getSetting)("paymentGatewaySortOrder",[])),c()(Object.keys(t))));return F(e,t,Array.from(n),r.PAYMENTS)}(se.setRegisteredPaymentMethods),fe=function(e){var t=Object(k.getExpressPaymentMethods)(),r=Object(N.c)().noticeContexts;return F(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)}(se.setRegisteredExpressPaymentMethods),pe=function(){var e=Object(W.a)().dispatchCheckoutEvent,t=Object(u.useState)(""),r=s()(t,2),n=r[0],o=r[1],i=Object(u.useState)(""),c=s()(i,2),a=c[0],l=c[1];return Object(u.useEffect)((function(){e("set-active-payment-method",{activePaymentMethod:n})}),[e,n]),{activePaymentMethod:n,activeSavedToken:a,setActivePaymentMethod:o,setActiveSavedToken:l}}(),de=pe.activePaymentMethod,me=pe.activeSavedToken,he=pe.setActivePaymentMethod,be=pe.setActiveSavedToken,ve=Object(u.useMemo)((function(){return m?b("previewSavedPaymentMethods"):le?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};var t=Object(P.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach((function(r){var o=t[r].filter((function(t){var r,n=t.method.gateway;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)}));o.length&&(n[r]=o)})),n}(ce.paymentMethods):{}}),[m,b,le,ce.paymentMethods]),ge=Object(u.useCallback)((function(e){e?O(e,{id:"wc-express-payment-error",context:R.EXPRESS_PAYMENTS}):E("wc-express-payment-error",R.EXPRESS_PAYMENTS)}),[O,R.EXPRESS_PAYMENTS,E]),ye=Object.keys(ce.expressPaymentMethods).includes(de),Oe=Object(u.useMemo)((function(){return{isPristine:ce.currentStatus===n.PRISTINE,isStarted:ce.currentStatus===n.STARTED,isProcessing:ce.currentStatus===n.PROCESSING,isFinished:[n.ERROR,n.FAILED,n.SUCCESS].includes(ce.currentStatus),hasError:ce.currentStatus===n.ERROR,hasFailed:ce.currentStatus===n.FAILED,isSuccessful:ce.currentStatus===n.SUCCESS,isDoingExpressPayment:ce.currentStatus!==n.PRISTINE&&ye}}),[ce.currentStatus,ye]);Object(u.useEffect)((function(){var e=Object.keys(ce.paymentMethods),t=[].concat(c()(e),c()(Object.keys(ce.expressPaymentMethods)));le&&e.length&&he((function(e){return e&&t.includes(e)?e:(ue().pristine(),Object.keys(ce.paymentMethods)[0])}))}),[le,ce.paymentMethods,ce.expressPaymentMethods,he,ue]),Object(u.useEffect)((function(){!i||p||f||Oe.isFinished||ue().processing()}),[i,p,f,Oe.isFinished,ue]),Object(u.useEffect)((function(){a&&!Oe.isSuccessful&&ue().pristine()}),[a,Oe.isSuccessful,ue]),Object(u.useEffect)((function(){p&&Oe.isSuccessful&&!ce.hasSavedToken&&ue().pristine()}),[p,Oe.isSuccessful,ce.hasSavedToken,ue]),Object(u.useEffect)((function(){Oe.isProcessing&&(E("wc-payment-error",R.PAYMENTS),Object($.b)(ee.current,"payment_processing",{}).then((function(e){var t,r,n,o,i,c,a,s;if(e.forEach((function(e){S(e)&&(t=e),(w(e)||_(e))&&(r=e)})),t&&!r)ue().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&&_(r)){var u,l,f,p,d,m;r.message&&r.message.length&&O(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||R.PAYMENTS}),ue().failed(null===(u=r)||void 0===u?void 0:u.message,null===(l=r)||void 0===l||null===(f=l.meta)||void 0===f?void 0:f.paymentMethodData,null===(p=r)||void 0===p||null===(d=p.meta)||void 0===d?void 0:d.billingData)}else if(r){var h,b;r.message&&r.message.length&&O(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=r)||void 0===b?void 0:b.messageContext)||R.PAYMENTS}),ue().error(r.message),v(null===(h=r)||void 0===h?void 0:h.validationErrors)}else ue().success()})))}),[Oe.isProcessing,v,ue,E,R.PAYMENTS,S,_,w,O]);var Ee={setPaymentStatus:ue,currentStatus:Oe,paymentStatuses:n,paymentMethodData:ce.paymentMethodData,errorMessage:ce.errorMessage,activePaymentMethod:de,setActivePaymentMethod:he,activeSavedToken:me,setActiveSavedToken:be,onPaymentProcessing:Z,customerPaymentMethods:ve,paymentMethods:ce.paymentMethods,expressPaymentMethods:ce.expressPaymentMethods,paymentMethodsInitialized:le,expressPaymentMethodsInitialized:fe,setExpressPaymentError:ge,isExpressPaymentMethodActive:ye,shouldSavePayment:ce.shouldSavePaymentMethod,setShouldSavePayment:se.setShouldSavePayment};return React.createElement(Q.Provider,{value:Ee},r)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return A}));var n=r(148),o=r(2),i=r(46),c=r(164),a=r(65),s=r(57),u=r(54),l=r(35),f=r.n(l),p=r(5),d=r.n(p),m=r(4),h=r.n(m),b=r(24),v=r.n(b),g=r(1),y=r(59),O=r.n(y),E=r(0),j=r(151),S=r(116),w=function(e,t,r){var n=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),o="wc-".concat(r,"-new-payment-method");return n.push({key:o,value:t}),n},k=function(e,t){O.a.setNonce&&"function"==typeof O.a.setNonce&&O.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))},_=r(171),P=r(33),R=r(51);function x(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 C(e){for(var t=1;t0,getValidationErrorId:u};return React.createElement(g.Provider,{value:E},t)}},,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(99),o=function(e,t){return function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,i=n.a.addEventCallback(e,r,o);return t(i),function(){t(n.a.removeEventCallback(e,i.id))}}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return m}));var n=r(21),o=r.n(n),i=r(35),c=r.n(i),a=r(24),s=r.n(a),u=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},l=r(43);function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return p(e,void 0);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)?p(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=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=r.call(e)},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}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o.reduce((function(e,t){return e[t.content]=!0,e}),{}):S,c=Object(j.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:i}),a=o.filter((function(e){return!0===c[e.content]})),s=b()(t,"wc-block-components-notices__snackbar");return React.createElement(E,{notices:a,className:s,onRemove:n})},k=r(52),_=r(36);function P(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 R(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i("default",e,R(R({},t),{},{type:"snackbar",context:t.context||n})),m("store-notice-create",{status:"default",content:e,options:t})}),[i,m,n]),v=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;u(e,t)}),[u,n]),g={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(n)}}),[n]).notices,createSnackbarNotice:b,removeSnackbarNotice:v,context:n,setIsSuppressed:d},y=p?null:React.createElement(w,{notices:g.notices,removeNotice:g.removeSnackbarNotice,isEditor:h});return React.createElement(x.Provider,{value:g},t,y)}}]);
\ No newline at end of file
diff --git a/build/cart.asset.php b/build/cart.asset.php
new file mode 100644
index 00000000000..a0d0d653af3
--- /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' => '23adf0fe9f6ccd425af1f6f8d4be965b');
\ No newline at end of file
diff --git a/build/cart.js b/build/cart.js
new file mode 100644
index 00000000000..f301723873c
--- /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 n,a,i=t[0],s=t[1],u=t[2],p=0,d=[];p0&&x.some((function(e){return!(!e.code||!Object.values(b).includes(e.code))}))?B({type:S}):B({type:k})}),[x]);var q=Object(i.useMemo)((function(){return{isPristine:L===k,isValid:L===k,hasInvalidAddress:L===S,hasError:L===C||L===S}}),[L]);Object(i.useEffect)((function(){M||0!==N.length&&!q.hasError||Object(j.a)(G.current,"shipping_rates_fail",{hasInvalidAddress:q.hasInvalidAddress,hasError:q.hasError})}),[N,M,q.hasError,q.hasInvalidAddress]),Object(i.useEffect)((function(){!M&&N.length>0&&!q.hasError&&Object(j.a)(G.current,"shipping_rates_success",N)}),[N,M,q.hasError]),Object(i.useEffect)((function(){T||(q.hasError?Object(j.a)(G.current,"shipping_rate_select_fail",{hasError:q.hasError,hasInvalidAddress:q.hasInvalidAddress}):Object(j.a)(G.current,"shipping_rate_select_success",Y.current))}),[T,q.hasError,q.hasInvalidAddress]);var W=function(e){for(var t=1;t2)return Object(n.registerBlockType)(e,t)},a=function(e,t){if(c.n>1)return Object(n.registerBlockType)(e,t)},i=function(){return c.n>2},s=function(){return c.n>1}},117: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 a}));var n=function(e){return"number"==typeof e},c=function(e){return"string"==typeof e},o=function(e){return!function(e){return 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.blockEditor},127:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(8),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return Object(o.useCallback)((function(e){t((function(){throw e}))}),[])}},133:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(8),a=r.n(o),i=r(4),s=r(1),u=r(117);function l(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 p(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"",n=r&&void 0!==m[r]?m[r]:{};return e.map((function(e){var r=i.defaultAddressFields[e]||{},c=n[e]||{},o=t[e]||{};return p(p(p({key:e},r),c),o)})).sort((function(e,t){return e.index-t.index}))}},134:function(e,t,r){"use strict";var n=r(0);r(223),t.a=function(){return Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}},135:function(e,t){e.exports=window.wp.wordcount},14:function(e,t){e.exports=window.wp.data},140:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(1),i=r(59),s=r(6),u=r.n(s),l=(r(2),r(50)),p=(r(220),function(e){var t=e.currency,r=e.maxPrice,n=e.minPrice,c=e.priceClassName,s=e.priceStyle;return Object(o.createElement)(o.Fragment,null,Object(o.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)(n),Object(l.formatPrice)(r))),Object(o.createElement)("span",{"aria-hidden":!0},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",c),currency:t,value:n,style:s})," — ",Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",c),currency:t,value:r,style:s})))}),d=function(e){var t=e.currency,r=e.regularPriceClassName,n=e.regularPriceStyle,c=e.regularPrice,s=e.priceClassName,l=e.priceStyle,p=e.price;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:t,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",r),style:n},e)},value:c}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:t,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",s),style:l},e)},value:p}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.format,s=void 0===a?"":a,l=e.maxPrice,b=void 0===l?null:l,m=e.minPrice,f=void 0===m?null:m,O=e.price,g=void 0===O?null:O,h=e.priceClassName,j=e.priceStyle,v=e.regularPrice,y=e.regularPriceClassName,E=e.regularPriceStyle,_=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));s.includes("")||(s="",console.error("Price formats need to include the `` tag."));var w=v&&g!==v,k=Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",h)});return w?k=Object(o.createElement)(d,{currency:n,price:g,priceClassName:h,priceStyle:j,regularPrice:v,regularPriceClassName:y,regularPriceStyle:E}):null!==f&&null!==b?k=Object(o.createElement)(p,{currency:n,maxPrice:b,minPrice:f,priceClassName:h,priceStyle:j}):null!==g&&(k=Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",h),currency:n,value:g,style:j})),Object(o.createElement)("span",{className:_},Object(o.createInterpolateElement)(s,{price:k}))}},142:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return p}));var n,c=r(5),o=r.n(c),a=r(7);function i(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 s(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(a.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e}}},l={},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,r=t.type,c=t.eventType,a=t.id,i=t.callback,u=t.priority,p=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(r){case n.ADD_EVENT_CALLBACK:return p.set(a,{priority:u,callback:i}),s(s({},e),{},o()({},c,p));case n.REMOVE_EVENT_CALLBACK:return p.delete(a),s(s({},e),{},o()({},c,p))}}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(11);function c(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}},144:function(e,t,r){"use strict";var n=r(0),c=r(6),o=r.n(c);r(334),t.a=function(e){var t=e.children,r=e.className;return Object(n.createElement)("div",{className:o()("wc-block-components-product-badge",r)},t)}},148:function(e,t,r){"use strict";r.d(t,"b",(function(){return j})),r.d(t,"a",(function(){return v}));var n=r(43),c=r.n(n),o=r(5),a=r.n(o),i=r(21),s=r.n(i),u=r(8),l=r.n(u),p=r(0),d=r(7),b=r(36),m=r.n(b);function f(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 O(e){for(var t=1;t0,getValidationErrorId:u};return Object(p.createElement)(h.Provider,{value:y},t)}},15:function(e,t){e.exports=window.wp.apiFetch},150:function(e,t,r){"use strict";var n=r(16),c=r.n(n),o=r(17),a=r.n(o),i=r(13),s=r.n(i),u=r(18),l=r.n(u),p=r(19),d=r.n(p),b=r(9),m=r.n(b),f=r(5),O=r.n(f),g=r(0),h=(r(2),r(11)),j=r(1),v=r(37),y=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.m,"/block-error.svg"):t,n=e.header,c=void 0===n?Object(j.__)("Oops!","woo-gutenberg-products-block"):n,o=e.text,a=void 0===o?Object(j.__)("There was an error loading the content.","woo-gutenberg-products-block"):o,i=e.errorMessage,s=e.errorMessagePrefix,u=void 0===s?Object(j.__)("Error:","woo-gutenberg-products-block"):s,l=e.button;return Object(g.createElement)("div",{className:"wc-block-error wc-block-components-error"},r&&Object(g.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),Object(g.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(g.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),a&&Object(g.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},a),i&&Object(g.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},u?u+" ":"",i),l&&Object(g.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};r(244);var E=function(e){l()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=m()(t);if(r){var c=m()(this).constructor;e=Reflect.construct(n,arguments,c)}else e=n.apply(this,arguments);return d()(this,e)});function o(){var e;c()(this,o);for(var t=arguments.length,r=new Array(t),a=0;a0&&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]:{};m(e,t,j(j({},r),{},{context:r.context||d})),_("store-notice-create",{status:e,content:t,options:r})}),[m,_,d]),S=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;f(e,t)}),[f,d]),C={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(d)}}),[d]).notices,createNotice:k,removeNotice:S,context:d,setIsSuppressed:E},P=y?null:Object(i.createElement)(g,{className:n,notices:C.notices,removeNotice:C.removeNotice,isEditor:w});return Object(i.createElement)(v.Provider,{value:C},o&&P,t)}},175:function(e,t,r){"use strict";var n=r(0),c=r(135),o=r(105),a=function(e){var t=e.indexOf("");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",n=i(e),c=n.split(" ").splice(0,t).join(" ");return Object(o.autop)(s(c,r))},l=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=i(e),a=c.slice(0,t);if(r)return Object(o.autop)(s(a,n));var u=a.match(/([\s]+)/g),l=u?u.length:0,p=c.slice(0,t+l);return Object(o.autop)(s(p,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,s=e.countType,p=void 0===s?"words":s,d=e.className,b=void 0===d?"":d,m=Object(n.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",n=Object(o.autop)(e),i=Object(c.count)(n,r);if(i<=t)return n;var s=a(n),p=Object(c.count)(s,r);return p<=t?s:"words"===r?u(s,t):l(s,t,"characters_including_spaces"===r)}(t,i,p)}),[t,i,p]);return Object(n.createElement)(n.RawHTML,{className:b},m)}},186:function(e,t){},195:function(e,t){},197:function(e,t){e.exports=window.wp.warning},198:function(e,t,r){"use strict";var n=r(0),c=r(6),o=r.n(c),a=r(20),i=r(161);r(346),t.a=Object(a.withInstanceId)((function(e){var t=e.className,r=e.instanceId,c=e.id,a=e.selected,s=e.onChange,u=e.options,l=void 0===u?[]:u,p=c||r;return l.length&&Object(n.createElement)("div",{className:o()("wc-block-components-radio-control",t)},l.map((function(e){return Object(n.createElement)(i.a,{key:"".concat(p,"-").concat(e.value),name:"radio-control-".concat(p),checked:e.value===a,option:e,onChange:function(t){s(t),"function"==typeof e.onChange&&e.onChange(t)}})})))}))},199:function(e,t,r){"use strict";var n=r(16),c=r.n(n),o=r(17),a=r.n(o),i=r(13),s=r.n(i),u=r(18),l=r.n(u),p=r(19),d=r.n(p),b=r(9),m=r.n(b),f=r(5),O=r.n(f),g=r(0),h=r(1),j=r(11),v=(r(2),r(4)),y=r(49);var E=function(e){l()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=m()(t);if(r){var c=m()(this).constructor;e=Reflect.construct(n,arguments,c)}else e=n.apply(this,arguments);return d()(this,e)});function o(){var e;c()(this,o);for(var t=arguments.length,r=new Array(t),a=0;a0&&void 0!==arguments[0]?arguments[0]:"";m()("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):n("")}),[n,_]),k=Object.entries(h),S=k.length>0?k.map((function(t){var r=a()(t,2),n=r[0],c=r[1],o=e?c.edit:c.content;return Object(i.isValidElement)(o)?Object(i.createElement)("li",{key:n,id:"express-payment-method-".concat(n)},Object(i.cloneElement)(o,g(g({},O),{},{onClick:y(n),onClose:E,onError:_,setExpressPaymentError:w}))):null})):Object(i.createElement)("li",{key:"noneRegistered"},Object(s.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(i.createElement)(f.a,{isEditor:e},Object(i.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},S))}},249:function(e,t,r){"use strict";var n=r(34),c=r.n(n),o=r(0),a=r(1),i=r(3),s=r(14),u=r(39);t.a=function(e){var t=e.setPageId,r=e.pageId,n=e.labels,l=Object(s.useSelect)((function(e){return e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100})}),[])||null;return l?Object(o.createElement)(i.PanelBody,{title:n.title},Object(o.createElement)(i.SelectControl,{label:Object(a.__)("Link to","woo-gutenberg-products-block"),value:r,options:[{label:n.default,value:0}].concat(c()(l.map((function(e){return{label:Object(u.a)(e,l),value:parseInt(e.id,10)}})))),onChange:function(e){return t(parseInt(e,10))}})):null}},25:function(e,t){e.exports=window.wc.wcBlocksData},250:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),c=r(1),o=(r(2),r(61)),a=r(280),i=r(162),s=(r(351),function(e){var t=e.text,r=e.url,s=void 0===r?"https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565":r;return Object(n.createElement)("div",{className:"wc-block-feedback-prompt"},Object(n.createElement)(o.a,{srcElement:a.a}),Object(n.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(c.__)("Feedback?","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(n.createElement)("a",{href:s,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(c.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(n.createElement)(o.a,{srcElement:i.a,size:16})))}),u=function(){return Object(n.createElement)(s,{text:Object(c.__)("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"})}},251:function(e,t){e.exports=window.wp.plugins},252:function(e,t,r){"use strict";var n=r(21),c=r.n(n),o=r(0),a=r(1),i=r(66),s=r(99),u=r(30),l=r(812),p=r(52),d=r(76),b=r(6),m=r.n(b),f=r(26),O=r(42),g=r(8),h=r.n(g),j=r(36),v=r.n(j),y=r(164),E=r(78),_=function(e){var t;return null===(t=e.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id},w=r(198),k=r(160),S=r(50),C=r(59),P=r(4),N=function(e){var t=Object(P.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(f.decodeEntities)(e.name),value:e.rate_id,description:Object(o.createElement)(o.Fragment,null,Number.isFinite(t)&&Object(o.createElement)(C.a,{currency:Object(S.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(f.decodeEntities)(e.delivery_time))}},M=function(e){var t=e.className,r=e.noResultsMessage,n=e.onSelectRate,c=e.rates,a=e.renderOption,i=void 0===a?N:a,s=e.selected;if(0===c.length)return r;if(c.length>1)return Object(o.createElement)(w.a,{className:t,onChange:function(e){n(e)},selected:s,options:c.map(i)});var u=i(c[0]),l=u.label,p=u.secondaryLabel,d=u.description,b=u.secondaryDescription;return Object(o.createElement)(k.a,{label:l,secondaryLabel:p,description:d,secondaryDescription:b})},x=(r(345),function(e){var t=e.packageId,r=e.className,n=e.noResultsMessage,c=e.renderOption,i=e.packageData,s=e.collapsible,l=void 0!==s&&s,p=e.collapse,d=void 0!==p&&p,b=e.showItems,g=void 0!==b&&b,j=function(e,t){var r=Object(E.a)().dispatchCheckoutEvent,n=Object(y.a)(),c=n.selectShippingRate,a=n.isSelectingRate,i=Object(o.useState)((function(){return _(t)})),s=h()(i,2),u=s[0],l=s[1],p=Object(o.useRef)(t);return Object(o.useEffect)((function(){v()(p.current,t)||(p.current=t,l(_(t)))}),[t]),{selectShippingRate:Object(o.useCallback)((function(t){l(t),c(t,e),r("set-selected-shipping-rate",{shippingRateId:t})}),[e,c,r]),selectedShippingRate:u,isSelectingRate:a}}(t,i.shipping_rates),w=j.selectShippingRate,k=j.selectedShippingRate,S=Object(o.createElement)(o.Fragment,null,(g||l)&&Object(o.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},i.name),g&&Object(o.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(i.items).map((function(e){var t=Object(f.decodeEntities)(e.name),r=e.quantity;return Object(o.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(o.createElement)(O.a,{label:r>1?"".concat(t," × ").concat(r):"".concat(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)",r,"woo-gutenberg-products-block"),t,r)}))})))),C=Object(o.createElement)(M,{className:r,noResultsMessage:n,rates:i.shipping_rates,onSelectRate:w,selected:k,renderOption:c});return l?Object(o.createElement)(u.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!d,title:S},C):Object(o.createElement)("div",{className:m()("wc-block-components-shipping-rates-control__package",r)},S,C)}),I=["package_id"],R=["extensions","receiveCart"],T=function(e){var t=e.packages,r=e.collapse,n=e.showItems,a=e.collapsible,i=e.noResultsMessage,s=e.renderOption;return t.length?Object(o.createElement)(o.Fragment,null,t.map((function(e){var t=e.package_id,u=c()(e,I);return Object(o.createElement)(x,{key:t,packageId:t,packageData:u,collapsible:a,collapse:r,showItems:n,noResultsMessage:i,renderOption:s})}))):null};t.a=function(e){var t=e.shippingRates,r=e.shippingRatesLoading,n=e.className,b=e.collapsible,m=void 0!==b&&b,f=e.noResultsMessage,O=e.renderOption;Object(o.useEffect)((function(){if(!r){var e=Object(l.a)(t),n=Object(l.b)(t);1===e?Object(i.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(i.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))}}),[r,t]);var g=Object(p.a)(),h=g.extensions,j=(g.receiveCart,{className:n,collapsible:m,noResultsMessage:f,renderOption:O,extensions:h,cart:c()(g,R),components:{ShippingRatesControlPackage:x}}),v=Object(d.b)().isEditor;return Object(o.createElement)(s.a,{isLoading:r,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},v?Object(o.createElement)(T,{packages:t,noResultsMessage:f,renderOption:O}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(u.ExperimentalOrderShippingPackages.Slot,j),Object(o.createElement)(u.ExperimentalOrderShippingPackages,null,Object(o.createElement)(T,{packages:t,noResultsMessage:f,renderOption:O}))))}},253:function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var n=r(5),c=r.n(n),o=r(1),a=r(14),i=r(25),s=r(26),u=r(52),l=r(0);r(8),r(2),r(897),r(6),r(30),r(78),r(76);var p=Object(l.createContext)({notices:[],createSnackbarNotice:function(e,t){},removeSnackbarNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"});function d(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 b(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;o.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeSnackbarNotice:n}}),[n]),i=Object(l.useMemo)((function(){return{addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(e,t)}}}),[r]);return b(b(b({notices:t},a),i),{},{setIsSuppressed:c})}().addSnackbarNotice,g=Object(m.b)().setValidationErrors;return function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=Object(c.b)(),r=t.paymentMethods,o=t.expressPaymentMethods,a=t.paymentMethodsInitialized,i=t.expressPaymentMethodsInitialized,s=Object(n.a)(r),u=Object(n.a)(o);return{paymentMethods:e?u:s,isInitialized:e?i:a}},a=function(){return o(!1)},i=function(){return o(!0)}},259:function(e,t,r){"use strict";r.d(t,"b",(function(){return J})),r.d(t,"a",(function(){return ee}));var n,c,o=r(34),a=r.n(o),i=r(8),s=r.n(i),u=r(0);!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"}(c||(c={}));var l={currentStatus:n.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},p={setPaymentStatus:function(){return{pristine:function(){},started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(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:function(){},activeSavedToken:"",setActiveSavedToken:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){return function(){return function(){}}},setExpressPaymentError:function(){},isExpressPaymentMethodActive:!1,setShouldSavePayment:function(){},shouldSavePayment:!1},d=r(5),b=r.n(d),m=r(43),f=r.n(m);function O(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 g(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,r=t.type,o=t.paymentMethodData,a=t.shouldSavePaymentMethod,i=void 0!==a&&a,s=t.errorMessage,u=void 0===s?"":s,p=t.paymentMethods,d=void 0===p?{}:p;switch(r){case n.STARTED:return g(g({},e),{},{currentStatus:n.STARTED,paymentMethodData:o||e.paymentMethodData,hasSavedToken:h(o||e.paymentMethodData)});case n.ERROR:return e.currentStatus!==n.ERROR?g(g({},e),{},{currentStatus:n.ERROR,errorMessage:u||e.errorMessage}):e;case n.FAILED:return e.currentStatus!==n.FAILED?g(g({},e),{},{currentStatus:n.FAILED,paymentMethodData:o||e.paymentMethodData,errorMessage:u||e.errorMessage}):e;case n.SUCCESS:return e.currentStatus!==n.SUCCESS?g(g({},e),{},{currentStatus:n.SUCCESS,paymentMethodData:o||e.paymentMethodData,hasSavedToken:h(o||e.paymentMethodData)}):e;case n.PROCESSING:return e.currentStatus!==n.PROCESSING?g(g({},e),{},{currentStatus:n.PROCESSING,errorMessage:""}):e;case n.COMPLETE:return e.currentStatus!==n.COMPLETE?g(g({},e),{},{currentStatus:n.COMPLETE}):e;case n.PRISTINE:return g(g({},l),{},{currentStatus:n.PRISTINE,paymentMethods:g({},e.paymentMethods),expressPaymentMethods:g({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case c.SET_REGISTERED_PAYMENT_METHODS:return g(g({},e),{},{paymentMethods:d});case c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return g(g({},e),{},{expressPaymentMethods:d});case c.SET_SHOULD_SAVE_PAYMENT_METHOD:return g(g({},e),{},{shouldSavePaymentMethod:i})}},v=r(29),y=r.n(v),E=r(22),_=r.n(E),w=r(1),k=r(54),S=r(58),C=r(4),P=r(201),N=r(76),M=r(100),x=r(84),I=r(52),R=r(67),T=r(64);function D(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 A(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:void 0;r&&re(r),te(V({errorMessage:e||"",paymentMethodData:t||{}}))},success:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;t&&re(t),void 0!==f()(r)&&null!=r&&r.address&&ne(r.address),te(U({paymentMethodData:e}))}}}),[te,re,ne])}),se=ie.dispatchActions,ue=ie.setPaymentStatus,le=function(e){var t=Object(k.getPaymentMethods)(),r=Object(T.c)().noticeContexts,n=new Set([].concat(a()(Object(C.getSetting)("paymentGatewaySortOrder",[])),a()(Object.keys(t))));return L(e,t,Array.from(n),r.PAYMENTS)}(se.setRegisteredPaymentMethods),pe=function(e){var t=Object(k.getExpressPaymentMethods)(),r=Object(T.c)().noticeContexts;return L(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)}(se.setRegisteredExpressPaymentMethods),de=function(){var e=Object(q.a)().dispatchCheckoutEvent,t=Object(u.useState)(""),r=s()(t,2),n=r[0],c=r[1],o=Object(u.useState)(""),a=s()(o,2),i=a[0],l=a[1];return Object(u.useEffect)((function(){e("set-active-payment-method",{activePaymentMethod:n})}),[e,n]),{activePaymentMethod:n,activeSavedToken:i,setActivePaymentMethod:c,setActiveSavedToken:l}}(),be=de.activePaymentMethod,me=de.activeSavedToken,fe=de.setActivePaymentMethod,Oe=de.setActiveSavedToken,ge=Object(u.useMemo)((function(){return m?O("previewSavedPaymentMethods"):le?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};var t=Object(C.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach((function(r){var c=t[r].filter((function(t){var r,n=t.method.gateway;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)}));c.length&&(n[r]=c)})),n}(ae.paymentMethods):{}}),[m,O,le,ae.paymentMethods]),he=Object(u.useCallback)((function(e){e?v(e,{id:"wc-express-payment-error",context:P.EXPRESS_PAYMENTS}):y("wc-express-payment-error",P.EXPRESS_PAYMENTS)}),[v,P.EXPRESS_PAYMENTS,y]),je=Object.keys(ae.expressPaymentMethods).includes(be),ve=Object(u.useMemo)((function(){return{isPristine:ae.currentStatus===n.PRISTINE,isStarted:ae.currentStatus===n.STARTED,isProcessing:ae.currentStatus===n.PROCESSING,isFinished:[n.ERROR,n.FAILED,n.SUCCESS].includes(ae.currentStatus),hasError:ae.currentStatus===n.ERROR,hasFailed:ae.currentStatus===n.FAILED,isSuccessful:ae.currentStatus===n.SUCCESS,isDoingExpressPayment:ae.currentStatus!==n.PRISTINE&&je}}),[ae.currentStatus,je]);Object(u.useEffect)((function(){var e=Object.keys(ae.paymentMethods),t=[].concat(a()(e),a()(Object.keys(ae.expressPaymentMethods)));le&&e.length&&fe((function(e){return e&&t.includes(e)?e:(ue().pristine(),Object.keys(ae.paymentMethods)[0])}))}),[le,ae.paymentMethods,ae.expressPaymentMethods,fe,ue]),Object(u.useEffect)((function(){!o||d||p||ve.isFinished||ue().processing()}),[o,d,p,ve.isFinished,ue]),Object(u.useEffect)((function(){i&&!ve.isSuccessful&&ue().pristine()}),[i,ve.isSuccessful,ue]),Object(u.useEffect)((function(){d&&ve.isSuccessful&&!ae.hasSavedToken&&ue().pristine()}),[d,ve.isSuccessful,ae.hasSavedToken,ue]),Object(u.useEffect)((function(){ve.isProcessing&&(y("wc-payment-error",P.PAYMENTS),Object(K.b)(ee.current,"payment_processing",{}).then((function(e){var t,r,n,c,o,a,i,s;if(e.forEach((function(e){_(e)&&(t=e),(w(e)||S(e))&&(r=e)})),t&&!r)ue().success(null===(n=t)||void 0===n||null===(c=n.meta)||void 0===c?void 0:c.paymentMethodData,null===(o=t)||void 0===o||null===(a=o.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(r&&S(r)){var u,l,p,d,b,m;r.message&&r.message.length&&v(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||P.PAYMENTS}),ue().failed(null===(u=r)||void 0===u?void 0:u.message,null===(l=r)||void 0===l||null===(p=l.meta)||void 0===p?void 0:p.paymentMethodData,null===(d=r)||void 0===d||null===(b=d.meta)||void 0===b?void 0:b.billingData)}else if(r){var f,O;r.message&&r.message.length&&v(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(O=r)||void 0===O?void 0:O.messageContext)||P.PAYMENTS}),ue().error(r.message),g(null===(f=r)||void 0===f?void 0:f.validationErrors)}else ue().success()})))}),[ve.isProcessing,g,ue,y,P.PAYMENTS,_,S,w,v]);var ye={setPaymentStatus:ue,currentStatus:ve,paymentStatuses:n,paymentMethodData:ae.paymentMethodData,errorMessage:ae.errorMessage,activePaymentMethod:be,setActivePaymentMethod:fe,activeSavedToken:me,setActiveSavedToken:Oe,onPaymentProcessing:J,customerPaymentMethods:ge,paymentMethods:ae.paymentMethods,expressPaymentMethods:ae.expressPaymentMethods,paymentMethodsInitialized:le,expressPaymentMethodsInitialized:pe,setExpressPaymentError:he,isExpressPaymentMethodActive:je,shouldSavePayment:ae.shouldSavePaymentMethod,setShouldSavePayment:se.setShouldSavePayment};return Object(u.createElement)(Z.Provider,{value:ye},r)}},26:function(e,t){e.exports=window.wp.htmlEntities},27:function(e,t){e.exports=window.wp.primitives},275:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=(r(2),r(148)),o=(r(224),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,i=e.elementId,s=void 0===i?"":i,u=Object(c.b)(),l=u.getValidationError,p=u.getValidationErrorId;if(!r||"string"!=typeof r){var d=l(a)||{};if(!d.message||d.hidden)return null;r=d.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:p(s)},r))})},280:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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.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.wp.components},30:function(e,t){e.exports=window.wc.blocksCheckout},327:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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:"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},328:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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"}));t.a=o},330:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(21),a=r.n(o),i=r(0),s=r(27),u=["className","size"],l=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,u);return Object(i.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),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=l},332:function(e,t){},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){},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){},350:function(e,t){},351:function(e,t){},352:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(0),a=r(26),i=r(4);r(333),t.a=function(e){var t=e.image,r=void 0===t?{}:t,n=e.fallbackAlt,s=void 0===n?"":n,u=r.thumbnail?{src:r.thumbnail,alt:Object(a.decodeEntities)(r.alt)||s||"Product Image"}:{src:i.PLACEHOLDER_IMG_SRC,alt:""};return Object(o.createElement)("img",c()({className:"wc-block-components-product-image"},u,{alt:u.alt}))}},353:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(144);t.a=function(){return Object(n.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(c.__)("Available on backorder","woo-gutenberg-products-block"))}},354:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(144);t.a=function(e){var t=e.lowStockRemaining;return t?Object(n.createElement)(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(c.sprintf)(
+/* translators: %d stock amount (number of items in stock for product) */
+Object(c.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},355:function(e,t,r){"use strict";r.d(t,"a",(function(){return I}));var n=r(0),c=r(251),o=r(4),a=r(150),i=r(259),s=r(100),u=r(84),l=r(77),p=r(29),d=r.n(p),b=r(5),m=r.n(b),f=r(8),O=r.n(f),g=r(22),h=r.n(g),j=r(1),v=r(15),y=r.n(v),E=r(369),_=r(40),w=function(e,t,r){var n=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),c="wc-".concat(r,"-new-payment-method");return n.push({key:c,value:t}),n},k=function(e,t){y.a.setNonce&&"function"==typeof y.a.setNonce&&y.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))},S=r(148),C=r(52),P=r(67);function N(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 M(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";v()("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"}),I(e)}),[I]);return{activePaymentMethod:j,billing:{billingData:Q,cartTotal:ne.current,currency:Object(c.getCurrencyFromPriceResponse)(X),cartTotalItems:re.current,displayPricesIncludingTax:Object(h.getSetting)("displayCartPricesIncludingTax",!1),appliedCoupons:Z,customerId:b},checkoutStatus:{isCalculating:t,isComplete:r,isIdle:a,isProcessing:i},components:{ValidationInputError:E.a,PaymentMethodIcons:g.a,PaymentMethodLabel:O,LoadingMask:y.a},emitResponse:{noticeContexts:ee,responseTypes:te},eventRegistration:{onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:u,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:p,onShippingRateSuccess:F,onShippingRateFail:G,onShippingRateSelectSuccess:H,onShippingRateSelectFail:Y,onPaymentProcessing:x},onSubmit:d,paymentStatus:f,setExpressPaymentError:ce,shippingData:{shippingRates:L,shippingRatesLoading:B,selectedRates:z,setSelectedRates:V,isSelectingRate:U,shippingAddress:$,setShippingAddress:K,needsShipping:q},shippingStatus:{shippingErrorStatus:D,shippingErrorTypes:A},shouldSavePayment:R}}},362:function(e,t,r){"use strict";r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return p}));var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(20)),i=r(6),s=r.n(i),u=Object(o.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=function(){return Object(o.useContext)(u)},p=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,i=function(){var e=Object(a.useResizeObserver)(),t=c()(e,2),r=t[0],n=t[1].width,o="";return n>700?o="is-large":n>520?o="is-medium":n>400?o="is-small":n&&(o="is-mobile"),[r,o]}(),l=c()(i,2),p=l[0],d=l[1],b={hasContainerWidth:""!==d,containerClassName:d,isMobile:"is-mobile"===d,isSmall:"is-small"===d,isMedium:"is-medium"===d,isLarge:"is-large"===d};return Object(o.createElement)(u.Provider,{value:b},Object(o.createElement)("div",{className:s()(n,d)},p,t))}},363:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(5),a=r.n(o),i=r(8),s=r.n(i),u=r(21),l=r.n(u),p=r(0),d=r(1),b=r(11),m=r(6),f=r.n(m),O=r(148),g=r(77),h=r(275),j=r(20),v=r(117),y=r(42),E=(r(242),["className","id","type","ariaLabel","ariaDescribedBy","label","screenReaderLabel","disabled","help","autoCapitalize","autoComplete","value","onChange","required","onBlur","feedback"]),_=Object(b.forwardRef)((function(e,t){var r=e.className,n=e.id,o=e.type,a=void 0===o?"text":o,i=e.ariaLabel,u=e.ariaDescribedBy,d=e.label,b=e.screenReaderLabel,m=e.disabled,O=e.help,g=e.autoCapitalize,h=void 0===g?"off":g,j=e.autoComplete,v=void 0===j?"off":j,_=e.value,w=void 0===_?"":_,k=e.onChange,S=e.required,C=void 0!==S&&S,P=e.onBlur,N=void 0===P?function(){}:P,M=e.feedback,x=l()(e,E),I=Object(p.useState)(!1),R=s()(I,2),T=R[0],D=R[1];return Object(p.createElement)("div",{className:f()("wc-block-components-text-input",r,{"is-active":T||w})},Object(p.createElement)("input",c()({type:a,id:n,value:w,ref:t,autoCapitalize:h,autoComplete:v,onChange:function(e){k(e.target.value)},onFocus:function(){return D(!0)},onBlur:function(e){N(e.target.value),D(!1)},"aria-label":i||d,disabled:m,"aria-describedby":O&&!u?n+"__help":u,required:C},x)),Object(p.createElement)(y.a,{label:d,screenReaderLabel:b||d,wrapperElement:"label",wrapperProps:{htmlFor:n},htmlFor:n}),!!O&&Object(p.createElement)("p",{id:n+"__help",className:"wc-block-components-text-input__help"},O),M)})),w=["className","instanceId","id","ariaDescribedBy","errorId","validateOnMount","focusOnMount","onChange","showError","errorMessage"];t.a=Object(j.withInstanceId)((function(e){var t=e.className,r=e.instanceId,n=e.id,o=e.ariaDescribedBy,i=e.errorId,u=e.validateOnMount,m=void 0===u||u,j=e.focusOnMount,y=void 0!==j&&j,E=e.onChange,k=e.showError,S=void 0===k||k,C=e.errorMessage,P=void 0===C?"":C,N=l()(e,w),M=Object(b.useState)(!0),x=s()(M,2),I=x[0],R=x[1],T=Object(b.useRef)(null),D=Object(O.b)(),A=D.getValidationError,L=D.hideValidationError,B=D.setValidationErrors,z=D.clearValidationError,V=D.getValidationErrorId,U=Object(g.b)().isBeforeProcessing,F=void 0!==n?n:"textinput-"+r,G=void 0!==i?i:F,H=Object(b.useCallback)((function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=T.current||null;if(t){t.value=t.value.trim();var r=t.checkValidity();r?z(G):B(a()({},G,{message:t.validationMessage||Object(d.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}))}}),[z,G,B]);Object(b.useEffect)((function(){var e;I&&(y&&(null===(e=T.current)||void 0===e||e.focus()),R(!1))}),[y,I,R]),Object(b.useEffect)((function(){I&&(m&&H(),R(!1))}),[I,R,m,H]),Object(b.useEffect)((function(){U&&H()}),[U,H]),Object(b.useEffect)((function(){return function(){z(G)}}),[z,G]);var Y=A(G)||{};Object(v.c)(P)&&""!==P&&(Y.message=P);var q=Y.message&&!Y.hidden,W=S&&q&&V(G)?V(G):o;return Object(p.createElement)(_,c()({className:f()(t,{"has-error":q}),"aria-invalid":!0===q,id:F,onBlur:function(){H(!1)},feedback:S&&Object(p.createElement)(h.a,{errorMessage:P,propertyName:G}),ref:T,onChange:function(e){L(G),E(e)},ariaDescribedBy:W},N))}))},368:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n,c=window.CustomEvent||null,o=function(e,t){var r=t.bubbles,n=void 0!==r&&r,o=t.cancelable,a=void 0!==o&&o,i=t.element,s=t.detail,u=void 0===s?{}:s;if(c){i||(i=document.body);var l=new c(e,{bubbles:n,cancelable:a,detail:u});i.dispatchEvent(l)}},a=function(){n&&clearTimeout(n),n=setTimeout((function(){o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})}),50)},i=function(e,t){var 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 function(){};var c=function(){o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},369:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return s}));var n=r(4),c=r(133),o=r(23),a=function(e){var t=e.country,r=void 0===t?"":t,n=e.state,c=void 0===n?"":n,o=e.city,a=void 0===o?"":o,i=e.postcode,s=void 0===i?"":i;return{country:r.trim(),state:c.trim(),city:a.trim(),postcode:s?s.replace(" ","").toUpperCase():""}},i=function(e){var t=e.email,r=void 0===t?"":t;return Object(o.isEmail)(r)?r.trim():""},s=function(e){var t=Object.keys(n.defaultAddressFields),r=Object(c.a)(t,{},e.country),o=Object.assign({},e);return r.forEach((function(t){var r=t.key,n=void 0===r?"":r,c=t.hidden;void 0!==c&&c&&function(e,t){return e in t}(n,e)&&(o[n]="")})),o}},37:function(e,t,r){"use strict";r.d(t,"o",(function(){return o})),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 u})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return p})),r.d(t,"g",(function(){return d})),r.d(t,"k",(function(){return b})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return f})),r.d(t,"h",(function(){return O})),r.d(t,"a",(function(){return g})),r.d(t,"i",(function(){return h})),r.d(t,"b",(function(){return j}));var n,c=r(4),o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=o.pluginUrl+"images/",i=o.pluginUrl+"build/",s=o.buildPhase,u=null===(n=c.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=c.STORE_PAGES.checkout.id,p=c.STORE_PAGES.checkout.permalink,d=c.STORE_PAGES.privacy.permalink,b=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),m=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),f=c.STORE_PAGES.cart.permalink,O=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),g=Object(c.getSetting)("allowedCountries",{}),h=Object(c.getSetting)("shippingStates",{}),j=Object(c.getSetting)("allowedStates",{})},372:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(142),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},375:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return m}));var n=r(43),c=r.n(n),o=r(29),a=r.n(o),i=r(22),s=r.n(i),u=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},l=r(64);function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return d(e,void 0);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)?d(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}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 o,a=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r100,u={per_page:s?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},p=[Object(o.addQueryArgs)("/wc/store/products",d(d({},u),i))];return s&&r.length&&p.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),p}({selected:r,search:c,queryArgs:void 0===a?{}:a});return Promise.all(u.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return d(d({},e),{},{parent:0})}))})).catch((function(e){throw e}))},m=function(e){return i()({path:"/wc/store/products/".concat(e)})},f=function(){return i()({path:"wc/store/products/attributes"})},O=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},g=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=Object(u.getSetting)("limitTags",!1),a=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:n})];return c&&r.length&&a.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),a}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},h=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products/categories",d({per_page:0},e))})},j=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},v=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},y=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(29),c=r.n(n),o=r(22),a=r.n(o),i=r(1),s=function(){var e=c()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},42:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(6),i=r.n(a);function s(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 u(e){for(var t=1;tall checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(o.createElement)("em",null)})),Object(o.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(o.createInterpolateElement)(Object(i.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(o.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.hooks},515: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}')},516: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}')},517: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}')},518: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}')},519: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}')},52:function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(8),c=r.n(n),o=r(5),a=r.n(o),i=r(7),s=r(0),u=r(25),l=r(14),p=r(26),d=r(211),b=r(369),m=r(76),f=r(368),O=function(e){var t=e.detail;t&&t.preserveCartData||Object(l.dispatch)(u.CART_STORE_KEY).invalidateResolutionForStore()},g=function(){1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},h=function(){Object(s.useEffect)((function(){return function(){if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:function(){}}),0===window.wcBlocksStoreCartListeners.count){var e=Object(f.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(f.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",O),document.body.addEventListener("wc-blocks_removed_from_cart",O),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=function(){e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",O),document.body.removeEventListener("wc-blocks_removed_from_cart",O)}}window.wcBlocksStoreCartListeners.count++}(),g}),[])};function j(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 v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(m.b)(),r=t.isEditor,n=t.previewData,c=null==n?void 0:n.previewCart,o=e.shouldSelect,a=Object(s.useRef)();h();var p=Object(l.useSelect)((function(e,t){var n=t.dispatch;if(!o)return k;if(r)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:u.EMPTY_CART_ITEM_ERRORS,cartTotals:c.totals,cartIsLoading:!1,cartErrors:u.EMPTY_CART_ERRORS,billingAddress:E,shippingAddress:y,extensions:u.EMPTY_EXTENSIONS,shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var a=e(u.CART_STORE_KEY),i=a.getCartData(),s=a.getCartErrors(),l=a.getCartTotals(),p=!a.hasFinishedResolution("getCartData"),d=a.isCustomerDataUpdating(),m=n(u.CART_STORE_KEY).receiveCart,f=w(i.billingAddress),O=i.needsShipping?w(i.shippingAddress):f,g=i.fees.length>0?i.fees.map((function(e){return w(e)})):u.EMPTY_CART_FEES;return{cartCoupons:i.coupons.length>0?i.coupons.map((function(e){return v(v({},e),{},{label:e.code})})):u.EMPTY_CART_COUPONS,cartItems:i.items,cartFees:g,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:l,cartIsLoading:p,cartErrors:s,billingAddress:Object(b.a)(f),shippingAddress:Object(b.a)(O),extensions:i.extensions,shippingRates:i.shippingRates,shippingRatesLoading:d,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:m}}),[o]);return a.current&&Object(i.isEqual)(a.current,p)||(a.current=p),a.current}},522: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}')},523: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}')},524:function(e,t,r){"use strict";(function(e){var n=r(8),c=r.n(n),o=r(0),a=r(1),i=r(6),s=r.n(i),u=r(109),l=r(37),p=r(77),d=r(877),b=r(4);r(816),t.a=function(t){var r=t.checkoutPageId,n=t.className,i=Object(b.getSetting)("page-"+r,!1),m=Object(p.b)().isCalculating,f=Object(d.a)(),O=c()(f,2),g=O[0],h=O[1],j=Object(o.useState)(!1),v=c()(j,2),y=v[0],E=v[1];Object(o.useEffect)((function(){if("function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener){var t=function(){E(!1)};return e.addEventListener("pageshow",t),function(){e.removeEventListener("pageshow",t)}}}),[]);var _=Object(o.createElement)(u.a,{className:"wc-block-cart__submit-button",href:i||l.f,disabled:m,onClick:function(){return E(!0)},showSpinner:y},Object(a.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(o.createElement)("div",{className:s()("wc-block-cart__submit",n)},g,Object(o.createElement)("div",{className:"wc-block-cart__submit-container"},_),"below"===h&&Object(o.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},_))}}).call(this,r(229))},525: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}')},526: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}')},54:function(e,t){e.exports=window.wc.wcBlocksRegistry},57:function(e,t){e.exports=window.wp.deprecated},58:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(36),o=r.n(c);function a(e){var t=Object(n.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},59:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(5),a=r.n(o),i=r(21),s=r.n(i),u=r(0),l=r(178),p=r(6),d=r.n(p),b=(r(186),["className","value","currency","onValueChange","displayType"]);function m(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 f(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;i.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),l=Object(o.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,s({},t))}}}),[r]);return s(s(s({notices:t},u),l),{},{setIsSuppressed:c})}},7:function(e,t){e.exports=window.lodash},70:function(e,t){e.exports=window.wp.dom},76:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(0),c=r(14),o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:function(){}}),a=function(){return Object(n.useContext)(o)},i=function(e){var t=e.children,r=e.currentPostId,a=void 0===r?0:r,i=e.currentView,s=void 0===i?"":i,u=e.previewData,l=void 0===u?{}:u,p=Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),d=Object(n.useCallback)((function(e){return e in l?l[e]:{}}),[l]),b={isEditor:!0,currentPostId:p,currentView:s,previewData:l,getPreviewData:d};return Object(n.createElement)(o.Provider,{value:b},t)}},77:function(e,t,r){"use strict";r.d(t,"b",(function(){return A})),r.d(t,"a",(function(){return L}));var n,c=r(8),o=r.n(c),a=r(0),i=r(1),s=r(143),u=r(57),l=r.n(u),p=r(117);!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"}(n||(n={}));var d,b=function(){return{type:n.SET_IDLE}},m=function(e){return{type:n.SET_REDIRECT_URL,redirectUrl:e}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:n.SET_COMPLETE,data:e}},O=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?n.SET_HAS_ERROR:n.SET_NO_ERROR}},g=r(5),h=r.n(g),j=r(4);function v(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(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(d||(d={}));var y=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0,r=t.redirectUrl,c=t.type,o=t.customerId,a=t.orderId,i=t.orderNotes,s=t.extensionData,u=t.shouldCreateAccount,l=t.data,p=e;switch(c){case n.SET_PRISTINE:p=E;break;case n.SET_IDLE:p=e.status!==d.IDLE?w(w({},e),{},{status:d.IDLE}):e;break;case n.SET_REDIRECT_URL:p=void 0!==r&&r!==e.redirectUrl?w(w({},e),{},{redirectUrl:r}):e;break;case n.SET_PROCESSING_RESPONSE:p=w(w({},e),{},{processingResponse:l});break;case n.SET_COMPLETE:p=e.status!==d.COMPLETE?w(w({},e),{},{status:d.COMPLETE,redirectUrl:void 0!==l&&"string"==typeof l.redirectUrl&&l.redirectUrl?l.redirectUrl:e.redirectUrl}):e;break;case n.SET_PROCESSING:p=!1===(p=e.status!==d.PROCESSING?w(w({},e),{},{status:d.PROCESSING,hasError:!1}):e).hasError?p:w(w({},p),{},{hasError:!1});break;case n.SET_BEFORE_PROCESSING:p=e.status!==d.BEFORE_PROCESSING?w(w({},e),{},{status:d.BEFORE_PROCESSING,hasError:!1}):e;break;case n.SET_AFTER_PROCESSING:p=e.status!==d.AFTER_PROCESSING?w(w({},e),{},{status:d.AFTER_PROCESSING}):e;break;case n.SET_HAS_ERROR:p=e.hasError?e:w(w({},e),{},{hasError:!0}),p=e.status===d.PROCESSING||e.status===d.BEFORE_PROCESSING?w(w({},p),{},{status:d.IDLE}):p;break;case n.SET_NO_ERROR:p=e.hasError?w(w({},e),{},{hasError:!1}):e;break;case n.INCREMENT_CALCULATING:p=w(w({},e),{},{calculatingCount:e.calculatingCount+1});break;case n.DECREMENT_CALCULATING:p=w(w({},e),{},{calculatingCount:Math.max(0,e.calculatingCount-1)});break;case n.SET_CUSTOMER_ID:p=void 0!==o?w(w({},e),{},{customerId:o}):e;break;case n.SET_ORDER_ID:p=void 0!==a?w(w({},e),{},{orderId:a}):e;break;case n.SET_SHOULD_CREATE_ACCOUNT:void 0!==u&&u!==e.shouldCreateAccount&&(p=w(w({},e),{},{shouldCreateAccount:u}));break;case n.SET_ORDER_NOTES:void 0!==i&&e.orderNotes!==i&&(p=w(w({},e),{},{orderNotes:i}));break;case n.SET_EXTENSION_DATA:void 0!==s&&e.extensionData!==s&&(p=w(w({},e),{},{extensionData:s}))}return p!==e&&c!==n.SET_PRISTINE&&p.status===d.PRISTINE&&(p.status=d.IDLE),p},S=r(26),C=r(142),P=r(372),N=r(375),M=r(148),x=r(67),I=r(78),R=r(14),T=r(64),D=Object(a.createContext)({dispatchActions:{resetCheckout:function(){},setRedirectUrl:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},incrementCalculating:function(){},decrementCalculating:function(){},setCustomerId:function(e){},setOrderId:function(e){},setOrderNotes:function(e){},setExtensionData:function(e){}},onSubmit:function(){},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:function(){return function(){}},onCheckoutAfterProcessingWithError:function(){return function(){}},onCheckoutBeforeProcessing:function(){return function(){}},onCheckoutValidationBeforeProcessing:function(){return function(){}},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:function(e){},extensionData:{}}),A=function(){return Object(a.useContext)(D)},L=function(e){var t=e.children,r=e.redirectUrl,c=e.isCart,u=void 0!==c&&c;E.redirectUrl=r;var g,h=Object(a.useReducer)(k,E),j=o()(h,2),v=j[0],y=j[1],_=Object(M.b)().setValidationErrors,w=Object(x.a)(),A=w.addErrorNotice,L=w.removeNotices,B=Object(I.a)().dispatchCheckoutEvent,z=v.calculatingCount>0,V=Object(T.c)(),U=V.isSuccessResponse,F=V.isErrorResponse,G=V.isFailResponse,H=V.shouldRetry,Y=(g=Object(T.c)().noticeContexts,{checkoutNotices:Object(R.useSelect)((function(e){return e("core/notices").getNotices("wc/checkout")}),[]),expressPaymentNotices:Object(R.useSelect)((function(e){return e("core/notices").getNotices(g.EXPRESS_PAYMENTS)}),[g.EXPRESS_PAYMENTS]),paymentNotices:Object(R.useSelect)((function(e){return e("core/notices").getNotices(g.PAYMENTS)}),[g.PAYMENTS])}),q=Y.checkoutNotices,W=Y.paymentNotices,Q=Y.expressPaymentNotices,$=Object(a.useReducer)(C.b,{}),K=o()($,2),X=K[0],Z=K[1],J=Object(a.useRef)(X),ee=function(e){return Object(a.useMemo)((function(){return{onCheckoutAfterProcessingWithSuccess:Object(P.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(P.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(P.a)("checkout_validation_before_processing",e)}}),[e])}(Z),te=ee.onCheckoutAfterProcessingWithSuccess,re=ee.onCheckoutAfterProcessingWithError,ne=ee.onCheckoutValidationBeforeProcessing;Object(a.useEffect)((function(){J.current=X}),[X]);var ce=Object(a.useMemo)((function(){return function(){return l()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),ne.apply(void 0,arguments)}}),[ne]),oe=Object(a.useMemo)((function(){return{resetCheckout:function(){y({type:n.SET_PRISTINE})},setRedirectUrl:function(e){y(m(e))},setHasError:function(e){y(O(e))},incrementCalculating:function(){y({type:n.INCREMENT_CALCULATING})},decrementCalculating:function(){y({type:n.DECREMENT_CALCULATING})},setCustomerId:function(e){var t;y((t=e,{type:n.SET_CUSTOMER_ID,customerId:t}))},setOrderId:function(e){y(function(e){return{type:n.SET_ORDER_ID,orderId:e}}(e))},setOrderNotes:function(e){y(function(e){return{type:n.SET_ORDER_NOTES,orderNotes:e}}(e))},setExtensionData:function(e){y(function(e){return{type:n.SET_EXTENSION_DATA,extensionData:e}}(e))},setAfterProcessing:function(e){var t,r=function(e){var 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((function(e){var r=e.key,n=e.value;t.paymentDetails[r]=Object(S.decodeEntities)(n)}))),"message"in e&&(t.message=Object(S.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t}(e);r.redirectUrl&&y(m(r.redirectUrl)),y((t=r,{type:n.SET_PROCESSING_RESPONSE,data:t})),y({type:n.SET_AFTER_PROCESSING})}}}),[]);Object(a.useEffect)((function(){v.status===d.BEFORE_PROCESSING&&(L("error"),Object(N.a)(J.current,"checkout_validation_before_processing",{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;A(t),_(r)})),y(b()),y(O())):y({type:n.SET_PROCESSING})})))}),[v.status,_,A,L,y]);var ae=Object(s.a)(v.status),ie=Object(s.a)(v.hasError);Object(a.useEffect)((function(){if((v.status!==ae||v.hasError!==ie)&&v.status===d.AFTER_PROCESSING){var e={redirectUrl:v.redirectUrl,orderId:v.orderId,customerId:v.customerId,orderNotes:v.orderNotes,processingResponse:v.processingResponse};v.hasError?Object(N.b)(J.current,"checkout_after_processing_with_error",e).then((function(t){var r=function(e){var t=null;return e.forEach((function(e){if((F(e)||G(e))&&e.message){var r=e.messageContext?{context:e.messageContext}:void 0;t=e,A(e.message,r)}})),t}(t);if(null!==r)H(r)?y(b()):y(f(r));else{if(!(q.some((function(e){return"error"===e.status}))||Q.some((function(e){return"error"===e.status}))||W.some((function(e){return"error"===e.status})))){var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");A(c,{id:"checkout"})}y(b())}})):Object(N.b)(J.current,"checkout_after_processing_with_success",e).then((function(e){var t=null,r=null;if(e.forEach((function(e){U(e)&&(t=e),(F(e)||G(e))&&(r=e)})),t&&!r)y(f(t));else if(Object(p.b)(r)){if(r.message){var n=r.messageContext?{context:r.messageContext}:void 0;A(r.message,n)}H(r)?y(O(!0)):y(f(r))}else y(f())}))}}),[v.status,v.hasError,v.redirectUrl,v.orderId,v.customerId,v.orderNotes,v.processingResponse,ae,ie,oe,A,F,G,U,H,q,Q,W]);var se={onSubmit:Object(a.useCallback)((function(){B("submit"),y({type:n.SET_BEFORE_PROCESSING})}),[B]),isComplete:v.status===d.COMPLETE,isIdle:v.status===d.IDLE,isCalculating:z,isProcessing:v.status===d.PROCESSING,isBeforeProcessing:v.status===d.BEFORE_PROCESSING,isAfterProcessing:v.status===d.AFTER_PROCESSING,hasError:v.hasError,redirectUrl:v.redirectUrl,onCheckoutBeforeProcessing:ce,onCheckoutValidationBeforeProcessing:ne,onCheckoutAfterProcessingWithSuccess:te,onCheckoutAfterProcessingWithError:re,dispatchActions:oe,isCart:u,orderId:v.orderId,hasOrder:!!v.orderId,customerId:v.customerId,orderNotes:v.orderNotes,shouldCreateAccount:v.shouldCreateAccount,setShouldCreateAccount:function(e){return y((t=e,{type:n.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:v.extensionData};return Object(a.createElement)(D.Provider,{value:se},t)}},78:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(5),c=r.n(n),o=r(51),a=r(0),i=r(52);function s(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 u(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-".concat(e),t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(a.useCallback)((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-checkout-".concat(e),u(u({},r),{},{storeCart:t.current}))}catch(e){console.error(e)}}),[])}}},797:function(e,t,r){e.exports=r(847)},798:function(e,t){},799:function(e,t){},800:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(34),c=r.n(n),o=r(24),a=["core/paragraph","core/image","core/separator"],i=function(e){return[].concat(c()(Object(o.getBlockTypes)().filter((function(t){return((null==t?void 0:t.parent)||[]).includes(e)})).map((function(e){return e.name}))),a)}},801:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(8),c=r.n(n),o=r(0),a=r(14),i=r(24),s=r(7),u=function(e){var t=e.clientId,r=e.registeredBlocks,n=e.defaultTemplate,u=void 0===n?[]:n,l=Object(o.useRef)(r),p=Object(o.useRef)(u),d=Object(a.useDispatch)("core/block-editor"),b=d.insertBlock,m=d.replaceInnerBlocks,f=Object(a.useSelect)((function(e){return{innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:l.current.map((function(e){return Object(i.getBlockType)(e)}))}}),[t,l.current]),O=f.innerBlocks,g=f.registeredBlockTypes,h=Object(o.useCallback)((function(e,r){var n=Object(i.createBlock)(e.name);b(n,r,t,!1)}),[t,b]),j=Object(o.useMemo)((function(){return g.filter((function(e){return e&&(c=e.attributes,Boolean((null===(t=c.lock)||void 0===t?void 0:t.remove)||(null===(r=c.lock)||void 0===r||null===(n=r.default)||void 0===n?void 0:n.remove)));var t,r,n,c}))}),[g]);Object(o.useLayoutEffect)((function(){if(t){if(0===O.length&&p.current.length>0){var e=Object(i.synchronizeBlocksWithTemplate)(O,p.current);if(!Object(s.isEqual)(e,O))return void m(t,e)}j.forEach((function(e){if(!O.find((function(t){return t.name===e.name}))){var t=p.current.findIndex((function(t){return c()(t,1)[0]===e.name}));switch(t){case-1:h(e,O.length);break;case 0:h(e,0);break;default:var r=p.current[t-1],n=O.findIndex((function(e){return e.name===r[0]}));h(e,-1===n?t:n+1)}}}))}}),[t,O,j,m,h])}},802:function(e,t,r){"use strict";var n=r(0),c=r(6),o=r.n(c),a=(r(2),r(362));r(332),t.a=function(e){var t=e.children,r=e.className;return Object(n.createElement)(a.a,{className:o()("wc-block-components-sidebar-layout",r)},t)}},803:function(e,t,r){"use strict";var n=r(0),c=r(11),o=r(6),a=r.n(o),i=Object(c.forwardRef)((function(e,t){var r=e.children,c=e.className,o=void 0===c?"":c;return Object(n.createElement)("div",{ref:t,className:a()("wc-block-components-main",o)},r)}));t.a=i},804:function(e,t){},805:function(e,t){},806:function(e,t,r){"use strict";var n=r(0),c=r(11),o=r(6),a=r.n(o),i=Object(c.forwardRef)((function(e,t){var r=e.children,c=e.className,o=void 0===c?"":c;return Object(n.createElement)("div",{ref:t,className:a()("wc-block-components-sidebar",o)},r)}));t.a=i},807:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(n.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(n.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(n.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},808:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(99),a=r(255),i=(r(2),r(30)),s=r(4),u=(r(338),{context:"summary"});t.a=function(e){var t=e.cartCoupons,r=void 0===t?[]:t,l=e.currency,p=e.isRemovingCoupon,d=e.removeCoupon,b=e.values,m=b.total_discount,f=b.total_discount_tax,O=parseInt(m,10);if(!O&&0===r.length)return null;var g=parseInt(f,10),h=Object(s.getSetting)("displayCartPricesIncludingTax",!1)?O+g:O,j=Object(i.__experimentalApplyCheckoutFilter)({arg:u,filterName:"coupons",defaultValue:r});return Object(n.createElement)(i.TotalsItem,{className:"wc-block-components-totals-discount",currency:l,description:0!==j.length&&Object(n.createElement)(o.a,{screenReaderLabel:Object(c.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:p,showSpinner:!1},Object(n.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map((function(e){return Object(n.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(c.sprintf)(
+/* translators: %s Coupon code. */
+Object(c.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:p,onRemove:function(){d(e.code)},radius:"large",ariaLabel:Object(c.sprintf)(
+/* translators: %s is a coupon code. */
+Object(c.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})})))),label:h?Object(c.__)("Discount","woo-gutenberg-products-block"):Object(c.__)("Coupons","woo-gutenberg-products-block"),value:h?-1*h:"-"})}},809:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=r(1),i=r(109),s=r(363),u=r(42),l=r(99),p=(r(2),r(20)),d=r(148),b=r(275),m=r(30);r(340),t.a=Object(p.withInstanceId)((function(e){var t=e.instanceId,r=e.isLoading,n=void 0!==r&&r,p=e.initialOpen,f=void 0!==p&&p,O=e.onSubmit,g=void 0===O?function(){}:O,h=Object(o.useState)(""),j=c()(h,2),v=j[0],y=j[1],E=Object(o.useRef)(!1),_=Object(d.b)(),w=_.getValidationError,k=_.getValidationErrorId,S=w("coupon");Object(o.useEffect)((function(){E.current!==n&&(n||!v||S||y(""),E.current=n)}),[n,v,S]);var C="wc-block-components-totals-coupon__input-".concat(t);return Object(o.createElement)(m.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:f,title:Object(o.createElement)(u.a,{label:Object(a.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:C})},Object(o.createElement)(l.a,{screenReaderLabel:Object(a.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:n,showSpinner:!1},Object(o.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(o.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(o.createElement)(s.a,{id:C,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(a.__)("Enter code","woo-gutenberg-products-block"),value:v,ariaDescribedBy:k(C),onChange:function(e){y(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),Object(o.createElement)(i.a,{className:"wc-block-components-totals-coupon__button",disabled:n||!v,showSpinner:n,onClick:function(e){e.preventDefault(),g(v)},type:"submit"},Object(a.__)("Apply","woo-gutenberg-products-block"))),Object(o.createElement)(b.a,{propertyName:"coupon",elementId:C}))))}))},812:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.length},c=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},813:function(e,t,r){"use strict";var n=r(21),c=r.n(n),o=r(0),a=r(1),i=r(59),s=(r(2),r(30)),u=r(52),l=r(4),p=(r(347),["receiveCart"]);t.a=function(e){var t=e.currency,r=e.values,n=Object(l.getSetting)("taxesEnabled",!0)&&Object(l.getSetting)("displayCartPricesIncludingTax",!1),d=r.total_price,b=r.total_tax,m=Object(u.a)(),f=(m.receiveCart,c()(m,p)),O=Object(s.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(a.__)("Total","woo-gutenberg-products-block"),extensions:f.extensions,arg:{cart:f}}),g=parseInt(b,10);return Object(o.createElement)(s.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:O,value:parseInt(d,10),description:n&&0!==g&&Object(o.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(o.createInterpolateElement)(Object(a.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(o.createElement)(i.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},814:function(e,t,r){"use strict";var n=r(0),c=r(27),o=Object(n.createElement)(c.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=o},815:function(e,t){},816:function(e,t){},817:function(e,t){},818:function(e,t){},819:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return g}));var n=r(5),c=r.n(n),o=r(12),a=r(70),i=r(14),s=r(0),u=r(44),l=r(51),p=r(24);function d(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 b(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},f=function(){Object(l.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||Object(i.subscribe)((function(){var e,t,r,n,c=Object(i.select)(o.store);if(c){var a=c.getSelectedBlock();a&&(m("wc-lock-selected-block--remove",!(null==a||null===(e=a.attributes)||void 0===e||null===(t=e.lock)||void 0===t||!t.remove)),m("wc-lock-selected-block--move",!(null==a||null===(r=a.attributes)||void 0===r||null===(n=r.lock)||void 0===n||!n.move)))}}))},O=function(e){var t=e.ref,r=Object(l.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),n=t.current;return Object(s.useEffect)((function(){if(n&&!r)return n.addEventListener("keydown",e,{capture:!0,passive:!1}),function(){n.removeEventListener("keydown",e,{capture:!0})};function e(e){var t=e.keyCode,r=e.target;if(r instanceof HTMLElement&&(t===u.BACKSPACE||t===u.DELETE)&&!Object(a.isTextField)(r)){var n=r;void 0!==n.dataset.block&&function(e){var t,r,n,c,a;if(!e)return!1;var s=(0,Object(i.select)(o.store).getBlock)(e);if("boolean"==typeof(null==s||null===(t=s.attributes)||void 0===t||null===(r=t.lock)||void 0===r?void 0:r.remove))return s.attributes.lock.remove;var u,l,d,b=Object(p.getBlockType)(s.name);return"boolean"==typeof(null==b||null===(n=b.attributes)||void 0===n||null===(c=n.lock)||void 0===c||null===(a=c.default)||void 0===a?void 0:a.remove)&&(null==b||null===(u=b.attributes)||void 0===u||null===(l=u.lock)||void 0===l||null===(d=l.default)||void 0===d?void 0:d.remove)}(n.dataset.block)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}}}),[n,r])},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(s.useRef)(),r=Object(o.useBlockProps)(b({ref:t},e));return O({ref:t}),r}},84:function(e,t,r){"use strict";r.d(t,"b",(function(){return _})),r.d(t,"a",(function(){return w}));var n=r(8),c=r.n(n),o=r(0),a=r(4),i=r(5),s=r.n(i),u=r(14),l=r(25),p=r(364),d=r(36),b=r.n(d),m=r(369),f=r(40),O=r(52),g=r(67);function h(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 j(e){for(var t=1;tpage settings in WooCommerce.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(v.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(b.PanelBody,{title:Object(c.__)("Style","woo-gutenberg-products-block")},Object(n.createElement)(b.ToggleControl,{label:Object(c.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(c.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:o,onChange:function(){return r({hasDarkControls:!o})}})),Object(n.createElement)(d.a,null))},B=(r(798),{isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(v.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(v.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}}),z=r(10),V=r.n(z),U=r(30),F=r(802),G=r(800),H=(r(799),r(515));Object(l.d)(H,{icon:{src:Object(n.createElement)(s.a,{srcElement:_}),foreground:"#7f54b3"},edit:function(e){var t=e.clientId,r=Object(i.useBlockProps)(),c=Object(g.b)().currentView,o=Object(n.useContext)(D).hasDarkControls,s=Object(G.a)(U.innerBlockAreas.FILLED_CART),u=[["woocommerce/cart-items-block",{},[]],["woocommerce/cart-totals-block",{},[]]];return Object(T.a)({clientId:t,registeredBlocks:s,defaultTemplate:u}),Object(n.createElement)("div",V()({},r,{hidden:"woocommerce/filled-cart-block"!==c}),Object(n.createElement)(F.a,{className:a()("wc-block-cart",{"has-dark-controls":o})},Object(n.createElement)(i.InnerBlocks,{allowedBlocks:s,template:u,templateLock:"insert"})))},save:function(){return Object(n.createElement)("div",i.useBlockProps.save(),Object(n.createElement)(i.InnerBlocks.Content,null))}});var Y=r(889),q=r(890),W=r(803),Q=r(516);Object(l.d)(Q,{icon:{src:Object(n.createElement)(Y.a,{icon:q.a}),foreground:"#7f54b3"},edit:function(e){var t=e.clientId,r=Object(i.useBlockProps)({className:"wc-block-cart__main"}),c=Object(G.a)(U.innerBlockAreas.CART_ITEMS),o=[["woocommerce/cart-line-items-block",{},[]]];return Object(T.a)({clientId:t,registeredBlocks:c,defaultTemplate:o}),Object(n.createElement)(W.a,r,Object(n.createElement)(i.InnerBlocks,{allowedBlocks:c,template:o,templateLock:!1,renderAppender:i.InnerBlocks.ButtonBlockAppender}))},save:function(){return Object(n.createElement)("div",i.useBlockProps.save(),Object(n.createElement)(i.InnerBlocks.Content,null))}});var $=r(52),K=r(34),X=r.n(K),Z=r(21),J=r.n(Z),ee=r(66),te=r(43),re=r.n(te),ne=r(44),ce=(r(804),function(e){var t=e.className,r=e.quantity,o=void 0===r?1:r,i=e.minimum,s=void 0===i?1:i,u=e.maximum,l=e.onChange,p=void 0===l?function(){}:l,d=e.itemName,b=void 0===d?"":d,m=e.disabled,f=a()("wc-block-components-quantity-selector",t),O=void 0!==u,g=o>s,h=!O||o":o;if(!r||r<=0)return null;a.includes("")||(a="",console.error("Price formats need to include the `` tag."));var i=Object(c.sprintf)(
+/* translators: %s will be replaced by the discount amount */
+Object(c.__)("Save %s","woo-gutenberg-products-block"),a);return Object(n.createElement)(he.a,{className:"wc-block-components-sale-badge"},Object(n.createInterpolateElement)(i,{price:Object(n.createElement)(ge.a,{currency:t,value:r})}))},ve=r(356),ye=r(50),Ee=r(184),_e=["receiveCart"],we=function(e,t){return e.convertPrecision(t.minorUnit).getAmount()},ke=function(e){return Object(U.mustContain)(e,"")},Se=Object(n.forwardRef)((function(e,t){var r=e.lineItem,o=e.onRemove,i=void 0===o?function(){}:o,s=e.tabIndex,u=void 0===s?null:s,l=r.name,p=void 0===l?"":l,d=r.catalog_visibility,b=void 0===d?"visible":d,m=r.short_description,f=void 0===m?"":m,O=r.description,g=void 0===O?"":O,h=r.low_stock_remaining,j=void 0===h?null:h,y=r.show_backorder_badge,E=void 0!==y&&y,_=r.quantity_limit,w=void 0===_?99:_,k=r.permalink,S=void 0===k?"":k,C=r.images,P=void 0===C?[]:C,x=r.variation,I=void 0===x?[]:x,R=r.item_data,T=void 0===R?[]:R,D=r.prices,A=void 0===D?{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"}}:D,L=r.totals,B=void 0===L?{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"}:L,z=r.extensions,V=function(e){var t={key:"",quantity:1};(function(e){return Object(pe.b)(e)&&Object(pe.d)(e,"key")&&Object(pe.d)(e,"quantity")&&Object(pe.c)(e.key)&&Object(pe.a)(e.quantity)})(e)&&(t.key=e.key,t.quantity=e.quantity);var r=t.key,c=void 0===r?"":r,o=t.quantity,a=void 0===o?1:o,i=Object($.a)().cartErrors,s=Object(de.b)().dispatchActions,u=Object(n.useState)(a),l=N()(u,2),p=l[0],d=l[1],b=Object(se.a)(p,400),m=N()(b,1)[0],f=Object(ue.a)(m),O=Object(M.useDispatch)(ie.CART_STORE_KEY),g=O.removeItemFromCart,h=O.changeCartItemQuantity,j=Object(M.useSelect)((function(e){if(!c)return{quantity:!1,delete:!1};var t=e(ie.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(c),delete:t.isItemPendingDelete(c)}}),[c]),v=Object(n.useCallback)((function(){return c?g(c).then((function(){return Object(le.b)(),!0})):Promise.resolve(!1)}),[c,g]);return Object(n.useEffect)((function(){c&&Object(pe.a)(f)&&Number.isFinite(f)&&f!==m&&h(c,m)}),[c,h,m,f]),Object(n.useEffect)((function(){return j.delete?s.incrementCalculating():s.decrementCalculating(),function(){j.delete&&s.decrementCalculating()}}),[s,j.delete]),Object(n.useEffect)((function(){return j.quantity||m!==p?s.incrementCalculating():s.decrementCalculating(),function(){(j.quantity||m!==p)&&s.decrementCalculating()}}),[s,j.quantity,m,p]),{isPendingDelete:j.delete,quantity:p,setItemQuantity:d,removeItem:v,cartItemQuantityErrors:i}}(r),F=V.quantity,G=V.setItemQuantity,H=V.removeItem,Y=V.isPendingDelete,q=Object(be.a)().dispatchStoreEvent,W=Object($.a)(),Q=(W.receiveCart,J()(W,_e)),K=Object(n.useMemo)((function(){return{context:"cart",cartItem:r,cart:Q}}),[r,Q]),X=Object(ye.getCurrencyFromPriceResponse)(A),Z=Object(U.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:p,extensions:z,arg:K}),te=Object(Ee.a)({amount:parseInt(A.raw_prices.regular_price,10),precision:A.raw_prices.precision}),re=Object(Ee.a)({amount:parseInt(A.raw_prices.price,10),precision:A.raw_prices.precision}),ne=te.subtract(re),ge=ne.multiply(F),he=Object(ye.getCurrencyFromPriceResponse)(B),Se=parseInt(B.line_subtotal,10);Object(v.getSetting)("displayCartPricesIncludingTax",!1)&&(Se+=parseInt(B.line_subtotal_tax,10));var Ce=Object(Ee.a)({amount:Se,precision:he.minorUnit}),Pe=P.length?P[0]:{},Ne="hidden"===b||"search"===b,Me=Object(U.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:z,arg:K}),xe=Object(U.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:z,arg:K,validation:ke}),Ie=Object(U.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:z,arg:K,validation:ke}),Re=Object(U.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"",extensions:z,arg:K,validation:ke});return Object(n.createElement)("tr",{className:a()("wc-block-cart-items__row",Me,{"is-disabled":Y}),ref:t,tabIndex:u},Object(n.createElement)("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(pe.d)(Pe,"alt")||!Pe.alt},Ne?Object(n.createElement)(me.a,{image:Pe,fallbackAlt:Z}):Object(n.createElement)("a",{href:S,tabIndex:-1},Object(n.createElement)(me.a,{image:Pe,fallbackAlt:Z}))),Object(n.createElement)("td",{className:"wc-block-cart-item__product"},Object(n.createElement)(ae.a,{disabled:Y||Ne,name:Z,permalink:S}),E?Object(n.createElement)(fe.a,null):!!j&&Object(n.createElement)(Oe.a,{lowStockRemaining:j}),Object(n.createElement)("div",{className:"wc-block-cart-item__prices"},Object(n.createElement)(oe.a,{currency:X,regularPrice:we(te,X),price:we(re,X),format:Ie})),Object(n.createElement)(je,{currency:X,saleAmount:we(ne,X),format:Re}),Object(n.createElement)(ve.a,{shortDescription:f,fullDescription:g,itemData:T,variation:I}),Object(n.createElement)("div",{className:"wc-block-cart-item__quantity"},Object(n.createElement)(ce,{disabled:Y,quantity:F,maximum:w,onChange:function(e){G(e),q("cart-set-item-quantity",{product:r,quantity:e})},itemName:Z}),Object(n.createElement)("button",{className:"wc-block-cart-item__remove-link",onClick:function(){i(),H(),q("cart-remove-item",{product:r,quantity:F}),Object(ee.speak)(Object(c.sprintf)(
+/* translators: %s refers to the item name in the cart. */
+Object(c.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),Z))},disabled:Y},Object(c.__)("Remove item","woo-gutenberg-products-block")))),Object(n.createElement)("td",{className:"wc-block-cart-item__total"},Object(n.createElement)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},Object(n.createElement)(oe.a,{currency:he,format:xe,price:Ce.getAmount()}),F>1&&Object(n.createElement)(je,{currency:X,saleAmount:we(ge,X),format:Re}))))})),Ce=X()(Array(3)).map((function(_x,e){return Object(n.createElement)(Se,{lineItem:{},key:e})})),Pe=function(e){var t={};return e.forEach((function(e){var r=e.key;t[r]=Object(n.createRef)()})),t},Ne=function(e){var t=e.lineItems,r=void 0===t?[]:t,o=e.isLoading,i=void 0!==o&&o,s=e.className,u=Object(n.useRef)(null),l=Object(n.useRef)(Pe(r));Object(n.useEffect)((function(){l.current=Pe(r)}),[r]);var p=function(e){return function(){null!=l&&l.current&&e&&l.current[e].current instanceof HTMLElement?l.current[e].current.focus():u.current instanceof HTMLElement&&u.current.focus()}},d=i?Ce:r.map((function(e,t){var c=r.length>t+1?r[t+1].key:null;return Object(n.createElement)(Se,{key:e.key,lineItem:e,onRemove:p(c),ref:l.current[e.key],tabIndex:-1})}));return Object(n.createElement)("table",{className:a()("wc-block-cart-items",s),ref:u,tabIndex:-1},Object(n.createElement)("thead",null,Object(n.createElement)("tr",{className:"wc-block-cart-items__header"},Object(n.createElement)("th",{className:"wc-block-cart-items__header-image"},Object(n.createElement)("span",null,Object(c.__)("Product","woo-gutenberg-products-block"))),Object(n.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(n.createElement)("span",null,Object(c.__)("Details","woo-gutenberg-products-block"))),Object(n.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(n.createElement)("span",null,Object(c.__)("Total","woo-gutenberg-products-block"))))),Object(n.createElement)("tbody",null,d))},Me=function(e){var t=e.className,r=Object($.a)(),c=r.cartItems,o=r.cartIsLoading;return Object(n.createElement)(Ne,{className:t,lineItems:c,isLoading:o})},xe=r(517);Object(l.d)(xe,{icon:{src:Object(n.createElement)(Y.a,{icon:q.a}),foreground:"#7f54b3"},edit:function(e){var t=e.attributes.className,r=Object(i.useBlockProps)();return Object(n.createElement)("div",r,Object(n.createElement)(b.Disabled,null,Object(n.createElement)(Me,{className:t})))},save:function(){return Object(n.createElement)("div",i.useBlockProps.save())}});var Ie=r(806),Re=(r(805),r(518));Object(l.d)(Re,{icon:{src:Object(n.createElement)(Y.a,{icon:q.a}),foreground:"#7f54b3"},edit:function(e){var t=e.clientId,r=Object(i.useBlockProps)({className:"wc-block-cart__sidebar"}),c=Object(G.a)(U.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(T.a)({clientId:t,registeredBlocks:c,defaultTemplate:o}),Object(n.createElement)(Ie.a,r,Object(n.createElement)(i.InnerBlocks,{allowedBlocks:c,template:o,templateLock:!1,renderAppender:i.InnerBlocks.ButtonBlockAppender}))},save:function(){return Object(n.createElement)("div",i.useBlockProps.save(),Object(n.createElement)(i.InnerBlocks.Content,null))}});var Te=r(807),De=r(808),Ae=r(809),Le=r(853),Be=r(813),ze=r(253),Ve=r(163),Ue=["extensions","receiveCart"],Fe=function(e){var t=e.className,r=e.showRateAfterTaxName,o=void 0!==r&&r,a=e.isShippingCalculatorEnabled,i=void 0===a||a,s=Object($.a)(),u=s.cartFees,l=s.cartTotals,p=s.cartNeedsShipping,d=Object(ze.a)(),b=d.applyCoupon,m=d.removeCoupon,f=d.isApplyingCoupon,O=d.isRemovingCoupon,g=d.appliedCoupons,h=Object(ye.getCurrencyFromPriceResponse)(l),j=Object($.a)(),y=j.extensions,E=(j.receiveCart,J()(j,Ue)),_={extensions:y,cart:E},w={extensions:y,cart:E};return Object(n.createElement)("div",{className:t},Object(n.createElement)(Ve.a,{headingLevel:"2",className:"wc-block-cart__totals-title"},Object(c.__)("Cart totals","woo-gutenberg-products-block")),Object(n.createElement)(U.TotalsWrapper,null,Object(n.createElement)(U.Subtotal,{currency:h,values:l}),Object(n.createElement)(U.TotalsFees,{currency:h,cartFees:u}),Object(n.createElement)(De.a,{cartCoupons:g,currency:h,isRemovingCoupon:O,removeCoupon:m,values:l})),Object(v.getSetting)("couponsEnabled",!0)&&Object(n.createElement)(U.TotalsWrapper,null,Object(n.createElement)(Ae.a,{onSubmit:b,isLoading:f})),Object(n.createElement)(U.ExperimentalDiscountsMeta.Slot,w),p&&Object(n.createElement)(U.TotalsWrapper,null,Object(n.createElement)(Le.a,{showCalculator:i,showRateSelector:!0,values:l,currency:h})),!Object(v.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(l.total_tax,10)>0&&Object(n.createElement)(U.TotalsWrapper,null,Object(n.createElement)(U.TotalsTaxes,{showRateAfterTaxName:o,currency:h,values:l})),Object(n.createElement)(U.TotalsWrapper,null,Object(n.createElement)(Be.a,{currency:h,values:l})),Object(n.createElement)(U.ExperimentalOrderMeta.Slot,_))},Ge={isShippingCalculatorEnabled:{type:"boolean",default:Object(v.getSetting)("isShippingCalculatorEnabled",!0)},showRateAfterTaxName:{type:"boolean",default:Object(v.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{move:!0,remove:!0}}},He=r(519);Object(l.d)(He,{icon:{src:Object(n.createElement)(s.a,{srcElement:Te.a}),foreground:"#7f54b3"},attributes:Ge,edit:function(e){var t=e.attributes,r=e.setAttributes,o=t.showRateAfterTaxName,a=t.isShippingCalculatorEnabled,s=t.className,u=Object(i.useBlockProps)(),l=Object(v.getSetting)("taxesEnabled"),p=Object(v.getSetting)("displayItemizedTaxes",!1),d=Object(v.getSetting)("displayCartPricesIncludingTax",!1);return Object(n.createElement)("div",u,Object(n.createElement)(i.InspectorControls,null,Object(v.getSetting)("shippingEnabled",!0)&&Object(n.createElement)(b.PanelBody,{title:Object(c.__)("Shipping rates","woo-gutenberg-products-block")},Object(n.createElement)(b.ToggleControl,{label:Object(c.__)("Shipping calculator","woo-gutenberg-products-block"),help:Object(c.__)("Allow customers to estimate shipping by entering their address.","woo-gutenberg-products-block"),checked:a,onChange:function(){return r({isShippingCalculatorEnabled:!a})}})),l&&p&&!d&&Object(n.createElement)(b.PanelBody,{title:Object(c.__)("Taxes","woo-gutenberg-products-block")},Object(n.createElement)(b.ToggleControl,{label:Object(c.__)("Show rate after tax name","woo-gutenberg-products-block"),help:Object(c.__)("Show the percentage rate alongside each tax line in the summary.","woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showRateAfterTaxName:!o})}}))),Object(n.createElement)(b.Disabled,null,Object(n.createElement)(Fe,{className:s,showRateAfterTaxName:o,isShippingCalculatorEnabled:a})))},save:function(){return Object(n.createElement)("div",i.useBlockProps.save())}});var Ye=r(814),qe=r(888),We=r(185),Qe=r(257),$e=r(64),Ke=r(259),Xe=r(174),Ze=r(99),Je=r(248),et=(r(348),function(){var e=Object(Qe.a)(),t=e.paymentMethods,r=e.isInitialized,o=Object($e.c)().noticeContexts,a=Object(de.b)(),i=a.isCalculating,s=a.isProcessing,u=a.isAfterProcessing,l=a.isBeforeProcessing,p=a.isComplete,d=a.hasError,b=Object(Ke.b)().currentStatus;if(!r||r&&0===Object.keys(t).length)return null;var m=s||u||l||p&&!d;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ze.a,{isLoading:i||m||b.isDoingExpressPayment},Object(n.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},Object(n.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(n.createElement)(Xe.a,{context:o.EXPRESS_PAYMENTS},Object(n.createElement)(Je.a,null))))),Object(n.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(c.__)("Or","woo-gutenberg-products-block")))}),tt=function(e){var t=e.className;return Object($.a)().cartNeedsPayment?Object(n.createElement)("div",{className:a()("wc-block-cart__payment-options",t)},Object(n.createElement)(et,null)):null},rt=(r(815),function(){return Object(n.createElement)(qe.a,{icon:Object(n.createElement)(s.a,{srcElement:Ye.a}),label:Object(c.__)("Express Checkout","woo-gutenberg-products-block"),className:"wp-block-woocommerce-checkout-express-payment-block-placeholder"},Object(n.createElement)("span",{className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__description"},Object(c.__)("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(n.createElement)(We.a,{isPrimary:!0,href:"".concat(v.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(c.__)("Configure Payment Methods","woo-gutenberg-products-block")))}),nt=r(522);Object(l.d)(nt,{icon:{src:Object(n.createElement)(s.a,{srcElement:Ye.a}),foreground:"#7f54b3"},edit:function(e){var t=e.attributes,r=Object(Qe.a)(),c=r.paymentMethods,o=r.isInitialized,s=Object.keys(c).length>0,u=Object(i.useBlockProps)({className:a()({"wp-block-woocommerce-cart-express-payment-block--has-express-payment-methods":s})}),l=t.className;return o?Object(n.createElement)("div",u,s?Object(n.createElement)(tt,{className:l}):Object(n.createElement)(rt,null)):null},save:function(){return Object(n.createElement)("div",i.useBlockProps.save())}});var ct=r(891),ot=r(249),at=r(524),it=r(523);Object(l.d)(it,{icon:{src:Object(n.createElement)(Y.a,{icon:ct.a}),foreground:"#7f54b3"},attributes:{checkoutPageId:{type:"number",default:0},lock:{type:"object",default:{move:!0,remove:!0}}},edit:function(e){var t=e.attributes,r=e.setAttributes,o=Object(i.useBlockProps)(),a=t.checkoutPageId,s=void 0===a?0:a,u=t.className,l=Object(n.useRef)(s).current,p=Object(M.useSelect)((function(e){return l||e("core/editor").getCurrentPostId()}),[l]);return Object(n.createElement)("div",o,Object(n.createElement)(i.InspectorControls,null,!(p===f.c&&0===l)&&Object(n.createElement)(ot.a,{pageId:s,setPageId:function(e){return r({checkoutPageId:e})},labels:{title:Object(c.__)("Proceed to Checkout button","woo-gutenberg-products-block"),default:Object(c.__)("WooCommerce Checkout Page","woo-gutenberg-products-block")}})),Object(n.createElement)(b.Disabled,null,Object(n.createElement)(at.a,{checkoutPageId:s,className:u})))},save:function(){return Object(n.createElement)("div",i.useBlockProps.save())}}),r(817);var st=f.j?["core/paragraph",{align:"center",content:Object(c.sprintf)(
+/* translators: %s is the link to the store product directory. */
+Object(c.__)('Browse store.',"woo-gutenberg-products-block"),f.j),dropCap:!1}]:null,ut=[["core/image",{align:"center",url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAzOCAzOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5IDBDOC41MDQwMyAwIDAgOC41MDQwMyAwIDE5QzAgMjkuNDk2IDguNTA0MDMgMzggMTkgMzhDMjkuNDk2IDM4IDM4IDI5LjQ5NiAzOCAxOUMzOCA4LjUwNDAzIDI5LjQ5NiAwIDE5IDBaTTI1LjEyOSAxMi44NzFDMjYuNDg1MSAxMi44NzEgMjcuNTgwNiAxMy45NjY1IDI3LjU4MDYgMTUuMzIyNkMyNy41ODA2IDE2LjY3ODYgMjYuNDg1MSAxNy43NzQyIDI1LjEyOSAxNy43NzQyQzIzLjc3MyAxNy43NzQyIDIyLjY3NzQgMTYuNjc4NiAyMi42Nzc0IDE1LjMyMjZDMjIuNjc3NCAxMy45NjY1IDIzLjc3MyAxMi44NzEgMjUuMTI5IDEyLjg3MVpNMTEuNjQ1MiAzMS4yNTgxQzkuNjE0OTIgMzEuMjU4MSA3Ljk2Nzc0IDI5LjY0OTIgNy45Njc3NCAyNy42NTczQzcuOTY3NzQgMjYuMTI1IDEwLjE1MTIgMjMuMDI5OCAxMS4xNTQ4IDIxLjY5NjhDMTEuNCAyMS4zNjczIDExLjg5MDMgMjEuMzY3MyAxMi4xMzU1IDIxLjY5NjhDMTMuMTM5MSAyMy4wMjk4IDE1LjMyMjYgMjYuMTI1IDE1LjMyMjYgMjcuNjU3M0MxNS4zMjI2IDI5LjY0OTIgMTMuNjc1NCAzMS4yNTgxIDExLjY0NTIgMzEuMjU4MVpNMTIuODcxIDE3Ljc3NDJDMTEuNTE0OSAxNy43NzQyIDEwLjQxOTQgMTYuNjc4NiAxMC40MTk0IDE1LjMyMjZDMTAuNDE5NCAxMy45NjY1IDExLjUxNDkgMTIuODcxIDEyLjg3MSAxMi44NzFDMTQuMjI3IDEyLjg3MSAxNS4zMjI2IDEzLjk2NjUgMTUuMzIyNiAxNS4zMjI2QzE1LjMyMjYgMTYuNjc4NiAxNC4yMjcgMTcuNzc0MiAxMi44NzEgMTcuNzc0MlpNMjUuOTEwNSAyOS41ODc5QzI0LjE5NDQgMjcuNTM0NyAyMS42NzM4IDI2LjM1NDggMTkgMjYuMzU0OEMxNy4zNzU4IDI2LjM1NDggMTcuMzc1OCAyMy45MDMyIDE5IDIzLjkwMzJDMjIuNDAxNiAyMy45MDMyIDI1LjYxMTcgMjUuNDA0OCAyNy43ODc1IDI4LjAyNUMyOC44NDQ4IDI5LjI4MTUgMjYuOTI5NCAzMC44MjE0IDI1LjkxMDUgMjkuNTg3OVoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=",sizeSlug:"small"}],["core/heading",{textAlign:"center",content:Object(c.__)("Your cart is currently empty!","woo-gutenberg-products-block"),level:2,className:"wc-block-cart__empty-cart__title"}],st,["core/separator",{className:"is-style-dots"}],["core/heading",{textAlign:"center",content:Object(c.__)("New in store","woo-gutenberg-products-block"),level:2}],["woocommerce/product-new",{columns:3,rows:1}]].filter(Boolean),lt=r(525);Object(l.d)(lt,{icon:{src:Object(n.createElement)(s.a,{srcElement:w}),foreground:"#7f54b3"},edit:function(e){var t=e.clientId,r=Object(i.useBlockProps)(),c=Object(g.b)().currentView,o=Object(G.a)(U.innerBlockAreas.EMPTY_CART);return Object(T.a)({clientId:t,registeredBlocks:o,defaultTemplate:ut}),Object(n.createElement)("div",V()({},r,{hidden:"woocommerce/empty-cart-block"!==c}),Object(n.createElement)(i.InnerBlocks,{template:ut,templateLock:!1,renderAppender:i.InnerBlocks.ButtonBlockAppender}))},save:function(){return Object(n.createElement)("div",i.useBlockProps.save(),Object(n.createElement)(i.InnerBlocks.Content,null))}});var pt=r(254),dt=function(e){return Object.values(e).reduce((function(e,t){return null!==t.icons&&(e=e.concat(t.icons)),e}),[])},bt=function(e){var t=e.className,r=Object(Qe.b)().paymentMethods;return Object(n.createElement)(pt.a,{className:t,icons:dt(r)})},mt=r(526);Object(l.d)(mt,{icon:{src:Object(n.createElement)(s.a,{srcElement:Ye.a}),foreground:"#874FB9"},edit:function(e){var t=e.attributes.className,r=Object(i.useBlockProps)();return Object(n.createElement)("div",r,Object(n.createElement)(bt,{className:t}))},save:function(){return Object(n.createElement)("div",i.useBlockProps.save())}});var ft={title:Object(c.__)("Cart","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(s.a,{srcElement:u.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Shopping cart.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1,__experimentalExposeControlsToChildren:!0},example:{attributes:{isPreview:!0}},attributes:B,edit:function(e){var t=e.className,r=e.attributes,o=e.setAttributes,u=e.clientId,l=r.hasDarkControls,p=function(e,t){var r=t[0],o=Object(n.useState)(r),a=N()(o,2),u=a[0],l=a[1],p=Object(M.useDispatch)("core/block-editor").selectBlock,d=Object(M.select)(i.store).getBlock,m=Object(n.createElement)(b.ToolbarGroup,null,Object(n.createElement)(b.ToolbarDropdownMenu,{label:Object(c.__)("Switch view","woo-gutenberg-products-block"),text:u.label,icon:Object(n.createElement)(s.a,{srcElement:x,style:{marginRight:"8px"}}),controls:t.map((function(t){return R(R({},t),{},{title:Object(n.createElement)("span",null,t.label),isActive:t.view===u.view,onClick:function(){var r;l(t),p((null===(r=d(e).innerBlocks.find((function(e){return e.name===t.view})))||void 0===r?void 0:r.clientId)||e)}})}))}));return{currentView:u.view,component:m}}(u,[{view:"woocommerce/filled-cart-block",label:Object(c.__)("Filled Cart","woo-gutenberg-products-block"),icon:Object(n.createElement)(s.a,{srcElement:_})},{view:"woocommerce/empty-cart-block",label:Object(c.__)("Empty Cart","woo-gutenberg-products-block"),icon:Object(n.createElement)(s.a,{srcElement:w})}]),d=p.currentView,f=p.component,h=[["woocommerce/filled-cart-block",{},[]],["woocommerce/empty-cart-block",{},[]]],v=Object(k.b)({className:a()(t,"wp-block-woocommerce-cart",{"is-editor-preview":r.isPreview})});return Object(T.a)({clientId:u,registeredBlocks:A,defaultTemplate:h}),Object(n.createElement)("div",v,Object(n.createElement)(O.a,{header:Object(c.__)("Cart Block Error","woo-gutenberg-products-block"),text:Object(c.__)("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(c.__)("Error message:","woo-gutenberg-products-block")},Object(n.createElement)(g.a,{currentView:d,previewData:{previewCart:y.a}},Object(n.createElement)(L,{attributes:r,setAttributes:o}),Object(n.createElement)(i.BlockControls,{__experimentalShareWithChildBlocks:!0},f),Object(n.createElement)(D.Provider,{value:{hasDarkControls:l}},Object(n.createElement)(j,null,Object(n.createElement)(i.InnerBlocks,{allowedBlocks:A,template:h,templateLock:!1}))))),Object(n.createElement)(m.a,{blockName:"cart"}))},save:function(){return Object(n.createElement)("div",i.useBlockProps.save({className:"is-loading"}),Object(n.createElement)(i.InnerBlocks.Content,null))},deprecated:[{attributes:B,save:function(e){var t=e.attributes;return Object(n.createElement)("div",{className:a()("is-loading",t.className)},Object(n.createElement)(i.InnerBlocks.Content,null))},migrate:function(e,t){var r=e.isShippingCalculatorEnabled,n=e.showRateAfterTaxName,c=e.checkoutPageId,o=e.align;return[e,[Object(p.createBlock)("woocommerce/filled-cart-block",{align:o},[Object(p.createBlock)("woocommerce/cart-items-block"),Object(p.createBlock)("woocommerce/cart-totals-block",{},[Object(p.createBlock)("woocommerce/cart-order-summary-block",{isShippingCalculatorEnabled:r,showRateAfterTaxName:n}),Object(p.createBlock)("woocommerce/cart-express-payment-block"),Object(p.createBlock)("woocommerce/proceed-to-checkout-block",{checkoutPageId:c}),Object(p.createBlock)("woocommerce/cart-accepted-payment-methods-block")])]),Object(p.createBlock)("woocommerce/empty-cart-block",{align:o},t)]]},isEligible:function(e,t){return!t.find((function(e){return"woocommerce/filled-cart-block"===e.name}))}}]};Object(l.d)("woocommerce/cart",ft)},850:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(363),i=r(10),s=r.n(i),u=r(37),l=r(1),p=r(26),d=r(6),b=r.n(d),m=r(20),f=r(896),O=r(148),g=r(275),h=r(117),j=(r(343),Object(m.withInstanceId)((function(e){var t=e.id,r=e.className,n=e.label,a=e.onChange,i=e.options,s=e.value,u=e.required,p=void 0!==u&&u,d=e.errorMessage,m=void 0===d?Object(l.__)("Please select a value.","woo-gutenberg-products-block"):d,j=e.errorId,v=e.instanceId,y=void 0===v?"0":v,E=e.autoComplete,_=void 0===E?"off":E,w=Object(O.b)(),k=w.getValidationError,S=w.setValidationErrors,C=w.clearValidationError,P=Object(o.useRef)(null),N=t||"control-"+y,M=j||N,x=k(M)||{message:"",hidden:!1};return Object(o.useEffect)((function(){return!p||s?C(M):S(c()({},M,{message:m,hidden:!0})),function(){C(M)}}),[C,s,M,m,p,S]),Object(o.createElement)("div",{id:N,className:b()("wc-block-components-combobox",r,{"is-active":s,"has-error":x.message&&!x.hidden}),ref:P},Object(o.createElement)(f.a,{className:"wc-block-components-combobox-control",label:n,onChange:a,onFilterValueChange:function(e){if(e.length){var t=Object(h.b)(P.current)?P.current.ownerDocument.activeElement:void 0;if(t&&Object(h.b)(P.current)&&P.current.contains(t))return;var r=e.toLocaleUpperCase(),n=i.find((function(e){return e.label.toLocaleUpperCase().startsWith(r)||e.value.toLocaleUpperCase()===r}));n&&a(n.value)}},options:i,value:s||"",allowReset:!1,autoComplete:_,"aria-invalid":x.message&&!x.hidden}),Object(o.createElement)(g.a,{propertyName:M}))}))),v=(r(342),function(e){var t=e.className,r=e.countries,n=e.id,c=e.label,a=e.onChange,i=e.value,s=void 0===i?"":i,u=e.autoComplete,d=void 0===u?"off":u,m=e.required,f=void 0!==m&&m,O=e.errorId,g=e.errorMessage,h=void 0===g?Object(l.__)("Please select a country.","woo-gutenberg-products-block"):g,v=Object(o.useMemo)((function(){return Object.keys(r).map((function(e){return{value:e,label:Object(p.decodeEntities)(r[e])}}))}),[r]);return Object(o.createElement)("div",{className:b()(t,"wc-block-components-country-input")},Object(o.createElement)(j,{id:n,label:c,onChange:a,options:v,value:s,errorId:O,errorMessage:h,required:f,autoComplete:d}),"off"!==d&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:d,value:s,onChange:function(e){var t=e.target.value.toLocaleUpperCase(),r=v.find((function(e){return 2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t}));a(r?r.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),y=function(e){return Object(o.createElement)(v,s()({countries:u.h},e))},E=function(e){return Object(o.createElement)(v,s()({countries:u.a},e))},_=(r(344),function(e,t){var r=t.find((function(t){return t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase()}));return r?r.value:""}),w=function(e){var t=e.className,r=e.id,n=e.states,c=e.country,i=e.label,s=e.onChange,u=e.autoComplete,d=void 0===u?"off":u,m=e.value,f=void 0===m?"":m,O=e.required,g=void 0!==O&&O,h=n[c],v=Object(o.useMemo)((function(){return h?Object.keys(h).map((function(e){return{value:e,label:Object(p.decodeEntities)(h[e])}})):[]}),[h]),y=Object(o.useCallback)((function(e){s(v.length>0?_(e,v):e)}),[s,v]),E=Object(o.useRef)(f);return Object(o.useEffect)((function(){E.current!==f&&(E.current=f)}),[f]),Object(o.useEffect)((function(){if(v.length>0&&E.current){var e=_(E.current,v);e!==E.current&&y(e)}}),[v,y]),v.length>0?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(j,{className:b()(t,"wc-block-components-state-input"),id:r,label:i,onChange:y,options:v,value:f,errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:g,autoComplete:d}),"off"!==d&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:d,value:f,onChange:function(e){return y(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(o.createElement)(a.a,{className:t,id:r,label:i,onChange:y,autoComplete:d,value:f,required:g})},k=function(e){return Object(o.createElement)(w,s()({states:u.i},e))},S=function(e){return Object(o.createElement)(w,s()({states:u.b},e))},C=r(58),P=r(4),N=r(133);function M(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 x(e){for(var t=1;t0?"below":"above")}),{threshold:1}));return Object(o.useLayoutEffect)((function(){var e=i.current,t=s.current;return e&&t.observe(e),function(){t.unobserve(e)}}),[]),[Object(o.createElement)("div",{"aria-hidden":!0,ref:i,style:a}),r]}},99:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(6)),a=r.n(o),i=(r(339),r(134));t.a=function(e){var t=e.children,r=e.className,o=e.screenReaderLabel,s=e.showSpinner,u=void 0!==s&&s,l=e.isLoading,p=void 0===l||l;return Object(n.createElement)("div",{className:a()(r,{"wc-block-components-loading-mask":p})},p&&u&&Object(n.createElement)(i.a,null),Object(n.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":p}),"aria-hidden":p},t),p&&Object(n.createElement)("span",{className:"screen-reader-text"},o||Object(c.__)("Loading…","woo-gutenberg-products-block")))}}});
\ 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..82e692e2998
--- /dev/null
+++ b/build/checkout-blocks/actions-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[32],{126:function(e,t,n){"use strict";n(155),t.a=function(){return React.createElement("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}},155:function(e,t){},157:function(e,t,n){"use strict";var c=n(20),a=n.n(c),o=n(26),r=n.n(o),i=n(81),s=n(7),l=n.n(s),u=n(126),m=(n(204),["className","showSpinner","children"]);t.a=function(e){var t=e.className,n=e.showSpinner,c=void 0!==n&&n,o=e.children,s=r()(e,m),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return React.createElement(i.a,a()({className:b},s),c&&React.createElement(u.a,null),React.createElement("span",{className:"wc-block-components-button__text"},o))}},204:function(e,t){},263:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var c=n(45),a=n(164),o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(a.b)(),n=t.paymentMethods,o=t.expressPaymentMethods,r=t.paymentMethodsInitialized,i=t.expressPaymentMethodsInitialized,s=Object(c.a)(n),l=Object(c.a)(o);return{paymentMethods:e?l:s,isInitialized:e?i:r}},r=function(){return o(!1)},i=function(){return o(!0)}},339:function(e,t,n){"use strict";var c=n(44),a=React.createElement(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=a},365:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var c=n(1),a=n(54),o=n(164),r=n(263),i=function(){var e=Object(a.b)(),t=e.onSubmit,n=e.isCalculating,i=e.isBeforeProcessing,s=e.isProcessing,l=e.isAfterProcessing,u=e.isComplete,m=e.hasError,b=Object(r.b)().paymentMethods,d=void 0===b?{}:b,p=Object(o.b)(),w=p.activePaymentMethod,f=p.currentStatus,h=d[w]||{},g=s||l||i,v=u&&!m;return{submitButtonText:(null==h?void 0:h.placeOrderButtonLabel)||Object(c.__)("Place Order","woo-gutenberg-products-block"),onSubmit:t,isCalculating:n,isDisabled:s||f.isDoingExpressPayment,waitingForProcessing:g,waitingForRedirect:v}}},366:function(e,t){},367:function(e,t){},393:function(e,t,n){"use strict";n.r(t);var c=n(154),a=n(7),o=n.n(a),r=n(2),i=n(1),s=n(104),l=n(128),u=n(44),m=React.createElement(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},React.createElement("path",{d:"M20 11H7.8l5.6-5.6L12 4l-8 8 8 8 1.4-1.4L7.8 13H20v-2z"})),b=(n(367),function(e){var t=e.link;return React.createElement("a",{href:t||s.c,className:"wc-block-components-checkout-return-to-cart-button"},React.createElement(l.a,{srcElement:m}),Object(i.__)("Return to Cart","woo-gutenberg-products-block"))}),d=n(365),p=n(339),w=n(157),f=function(){var e=Object(d.a)(),t=e.submitButtonText,n=e.onSubmit,c=e.isCalculating,a=e.isDisabled,o=e.waitingForProcessing,r=e.waitingForRedirect;return React.createElement(w.a,{className:"wc-block-components-checkout-place-order-button",onClick:n,disabled:c||a||o||r,showSpinner:o},r?React.createElement(l.a,{srcElement:p.a,alt:Object(i.__)("Done","woo-gutenberg-products-block")}):t)},h=(n(366),function(e){var t=e.cartPageId,n=e.showReturnToCart,c=e.className;return React.createElement("div",{className:o()("wc-block-checkout__actions",c)},n&&React.createElement(b,{link:Object(r.getSetting)("page-"+t,!1)}),React.createElement(f,null))});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}}})(h)}}]);
\ 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..c33d2d9b2eb
--- /dev/null
+++ b/build/checkout-blocks/billing-address-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[33],{276:function(e,t,n){"use strict";var c=n(20),i=n.n(c),r=n(26),o=n.n(r),s=n(7),a=n.n(s),l=(n(8),n(277),["children","className","headingLevel"]);t.a=function(e){var t=e.children,n=e.className,c=e.headingLevel,r=o()(e,l),s=a()("wc-block-components-title",n),u="h".concat(c);return React.createElement(u,i()({className:s},r),t)}},277:function(e,t){},280:function(e,t){},282:function(e,t,n){"use strict";var c=n(1);t.a=function(e){var t=e.defaultTitle,n=void 0===t?Object(c.__)("Step","woo-gutenberg-products-block"):t,i=e.defaultDescription,r=void 0===i?Object(c.__)("Step description text.","woo-gutenberg-products-block"):i,o=e.defaultShowStepNumber;return{title:{type:"string",default:n},description:{type:"string",default:r},showStepNumber:{type:"boolean",default:void 0===o||o}}}},290:function(e,t,n){"use strict";var c=n(7),i=n.n(c),r=(n(8),n(276)),o=(n(280),function(e){var t=e.title,n=e.stepHeadingContent;return React.createElement("div",{className:"wc-block-components-checkout-step__heading"},React.createElement(r.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!n&&React.createElement("span",{className:"wc-block-components-checkout-step__heading-content"},n))});t.a=function(e){var t=e.id,n=e.className,c=e.title,r=e.legend,s=e.description,a=e.children,l=e.disabled,u=void 0!==l&&l,d=e.showStepNumber,b=void 0===d||d,p=e.stepHeadingContent,f=void 0===p?function(){}:p,h=r||c?"fieldset":"div";return React.createElement(h,{className:i()(n,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":b,"wc-block-components-checkout-step--disabled":u}),id:t,disabled:u},!(!r&&!c)&&React.createElement("legend",{className:"screen-reader-text"},r||c),!!c&&React.createElement(o,{title:c,stepHeadingContent:f()}),React.createElement("div",{className:"wc-block-components-checkout-step__container"},!!s&&React.createElement("p",{className:"wc-block-components-checkout-step__description"},s),React.createElement("div",{className:"wc-block-components-checkout-step__content"},a)))}},308:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var c=n(5),i=n.n(c),r=n(26),o=n.n(r),s=n(2),a=n(0),l=n(65),u=n(57),d=["email"];function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}var p=function(){var e=Object(l.b)().needsShipping,t=Object(u.b)(),n=t.billingData,c=t.setBillingData,r=t.shippingAddress,p=t.setShippingAddress,f=t.shippingAsBilling,h=t.setShippingAsBilling,m=Object(a.useRef)(f),g=Object(a.useRef)(n),O=Object(a.useCallback)((function(e){p(e),f&&c(e)}),[f,p,c]),v=Object(a.useCallback)((function(t){c(t),e||p(t)}),[e,p,c]);Object(a.useEffect)((function(){if(m.current!==f){if(f)g.current=n,c(r);else{var e=g.current,t=(e.email,o()(e,d));c(function(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0],t=A.current||null;if(t){t.value=t.value.trim();var n=t.checkValidity();n?M(z):x(o()({},z,{message:t.validationMessage||Object(d.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}))}}),[M,z,x]);Object(b.useEffect)((function(){var e;D&&(j&&(null===(e=A.current)||void 0===e||e.focus()),B(!1))}),[j,D,B]),Object(b.useEffect)((function(){D&&(p&&W(),B(!1))}),[D,B,p,W]),Object(b.useEffect)((function(){q&&W()}),[q,W]),Object(b.useEffect)((function(){return function(){M(z)}}),[M,z]);var J=I(z)||{};Object(v.c)(C)&&""!==C&&(J.message=C);var T=J.message&&!J.hidden,G=R&&T&&V(z)?V(z):a;return React.createElement(E,r()({className:f()(t,{"has-error":T}),"aria-invalid":!0===T,id:H,onBlur:function(){W(!1)},feedback:R&&React.createElement(h.a,{errorMessage:C,propertyName:z}),ref:A,onChange:function(e){L(z),w(e)},ariaDescribedBy:G},N))}))},396:function(e,t,n){"use strict";n.r(t);var c=n(7),r=n.n(c),a=n(154),o=n(290),i=n(54),l=n(1),s=n(322),u=n(308),d=n(52),b=n(2),p=n(28),f=function(e){var t=e.allowCreateAccount,n=Object(i.b)(),c=n.customerId,r=n.shouldCreateAccount,a=n.setShouldCreateAccount,o=Object(u.a)(),f=o.billingFields,m=o.setEmail,g=Object(d.a)().dispatchCheckoutEvent,h=!c&&t&&Object(b.getSetting)("checkoutAllowsGuest",!1)&&Object(b.getSetting)("checkoutAllowsSignup",!1)&&React.createElement(p.CheckboxControl,{className:"wc-block-checkout__create-account",label:Object(l.__)("Create an account?","woo-gutenberg-products-block"),checked:r,onChange:function(e){return a(e)}});return React.createElement(React.Fragment,null,React.createElement(s.a,{id:"email",type:"email",label:Object(l.__)("Email address","woo-gutenberg-products-block"),value:f.email,autoComplete:"email",onChange:function(e){m(e),g("set-email-address")},required:!0}),h)},m=n(5),g=n.n(m),h=n(282);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";d()("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):c("")}),[c,y]),R=Object.entries(k),_=R.length>0?R.map((function(t){var n=o()(t,2),c=n[0],r=n[1],a=e?r.edit:r.content;return Object(u.isValidElement)(a)?React.createElement("li",{key:c,id:"express-payment-method-".concat(c)},Object(u.cloneElement)(a,g(g({},O),{},{onClick:j(c),onClose:v,onError:y,setExpressPaymentError:w}))):null})):React.createElement("li",{key:"noneRegistered"},Object(s.__)("No registered Payment Methods","woo-gutenberg-products-block"));return React.createElement(E.a,{isEditor:e},React.createElement("ul",{className:"wc-block-components-express-payment__event-buttons"},_))}},408:function(e,t,n){"use strict";n.r(t);var c=n(33),r=n(1),a=n(263),o=n(43),s=n(54),l=n(164),i=n(36),u=n(100),m=n(276),p=n(170),b=n(2),d=n(306),E=(n(305),function(){var e=Object(s.b)(),t=e.isCalculating,n=e.isProcessing,c=e.isAfterProcessing,E=e.isBeforeProcessing,O=e.isComplete,g=e.hasError,k=Object(l.b)().currentStatus,f=Object(a.a)(),h=f.paymentMethods,j=f.isInitialized,v=Object(i.a)().isEditor,y=Object(o.c)().noticeContexts;if(!j||j&&0===Object.keys(h).length)return v||b.CURRENT_USER_IS_ADMIN?React.createElement(u.a,{context:y.EXPRESS_PAYMENTS}):null;var w=n||c||E||O&&!g;return React.createElement(React.Fragment,null,React.createElement(p.a,{isLoading:t||w||k.isDoingExpressPayment},React.createElement("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},React.createElement("div",{className:"wc-block-components-express-payment__title-container"},React.createElement(m.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(r.__)("Express checkout","woo-gutenberg-products-block"))),React.createElement("div",{className:"wc-block-components-express-payment__content"},React.createElement(u.a,{context:y.EXPRESS_PAYMENTS},React.createElement("p",null,Object(r.__)("In a hurry? Use one of our express checkout options:","woo-gutenberg-products-block")),React.createElement(d.a,null))))),React.createElement("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(r.__)("Or continue below","woo-gutenberg-products-block")))});t.default=function(e){var t=e.className;return Object(c.a)().cartNeedsPayment?React.createElement("div",{className:t},React.createElement(E,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..701b8b5d392
--- /dev/null
+++ b/build/checkout-blocks/fields-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[36],{344:function(c,e,n){"use strict";var a=n(3),o=n(7),t=n.n(o),r=Object(a.forwardRef)((function(c,e){var n=c.children,a=c.className,o=void 0===a?"":a;return React.createElement("div",{ref:e,className:t()("wc-block-components-main",o)},n)}));e.a=r},357:function(c,e){},388:function(c,e,n){"use strict";n.r(e);var a=n(7),o=n.n(a),t=n(344);n(357),e.default=function(c){var e=c.children,n=c.className;return React.createElement(t.a,{className:o()("wc-block-checkout__main",n)},React.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..10d23d32b2a
--- /dev/null
+++ b/build/checkout-blocks/order-note-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[37],{276:function(e,t,c){"use strict";var n=c(20),a=c.n(n),o=c(26),s=c.n(o),l=c(7),r=c.n(l),d=(c(8),c(277),["children","className","headingLevel"]);t.a=function(e){var t=e.children,c=e.className,n=e.headingLevel,o=s()(e,d),l=r()("wc-block-components-title",c),i="h".concat(n);return React.createElement(i,a()({className:l},o),t)}},277:function(e,t){},280:function(e,t){},290:function(e,t,c){"use strict";var n=c(7),a=c.n(n),o=(c(8),c(276)),s=(c(280),function(e){var t=e.title,c=e.stepHeadingContent;return React.createElement("div",{className:"wc-block-components-checkout-step__heading"},React.createElement(o.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&React.createElement("span",{className:"wc-block-components-checkout-step__heading-content"},c))});t.a=function(e){var t=e.id,c=e.className,n=e.title,o=e.legend,l=e.description,r=e.children,d=e.disabled,i=void 0!==d&&d,u=e.showStepNumber,p=void 0===u||u,b=e.stepHeadingContent,m=void 0===b?function(){}:b,h=o||n?"fieldset":"div";return React.createElement(h,{className:a()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":p,"wc-block-components-checkout-step--disabled":i}),id:t,disabled:i},!(!o&&!n)&&React.createElement("legend",{className:"screen-reader-text"},o||n),!!n&&React.createElement(s,{title:n,stepHeadingContent:m()}),React.createElement("div",{className:"wc-block-components-checkout-step__container"},!!l&&React.createElement("p",{className:"wc-block-components-checkout-step__description"},l),React.createElement("div",{className:"wc-block-components-checkout-step__content"},r)))}},362:function(e,t){},363:function(e,t){},401:function(e,t,c){"use strict";c.r(t);var n=c(7),a=c.n(n),o=c(1),s=c(290),l=c(65),r=c(54),d=c(4),i=c.n(d),u=c(0),p=c(28),b=c(8),m=c.n(b),h=(c(363),function(e){var t=e.className,c=void 0===t?"":t,n=e.disabled,o=void 0!==n&&n,s=e.onTextChange,l=e.placeholder,r=e.value,d=void 0===r?"":r;return React.createElement("textarea",{className:a()("wc-block-components-textarea",c),disabled:o,onChange:function(e){s(e.target.value)},placeholder:l,rows:2,value:d})});c(362),h.propTypes={onTextChange:m.a.func.isRequired,disabled:m.a.bool,placeholder:m.a.string,value:m.a.string};var k=function(e){var t=e.disabled,c=e.onChange,n=e.placeholder,a=e.value,s=Object(u.useState)(!1),l=i()(s,2),r=l[0],d=l[1],b=Object(u.useState)(""),m=i()(b,2),k=m[0],v=m[1];return React.createElement("div",{className:"wc-block-checkout__add-note"},React.createElement(p.CheckboxControl,{disabled:t,label:Object(o.__)("Add a note to your order","woo-gutenberg-products-block"),checked:r,onChange:function(e){d(e),e?a!==k&&c(k):(c(""),v(a))}}),r&&React.createElement(h,{disabled:t,onTextChange:c,placeholder:n,value:a}))};t.default=function(e){var t=e.className,c=Object(l.b)().needsShipping,n=Object(r.b)(),d=n.isProcessing,i=n.orderNotes,u=n.dispatchActions.setOrderNotes;return React.createElement(s.a,{id:"order-notes",showStepNumber:!1,className:a()("wc-block-checkout__order-notes",t),disabled:d},React.createElement(k,{disabled:d,onChange:u,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: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..9ea49cd5380
--- /dev/null
+++ b/build/checkout-blocks/order-summary-frontend.js
@@ -0,0 +1,31 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[38,4],{124:function(e,t,n){"use strict";var a=n(7),c=n.n(a);n(211),t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:c()("wc-block-components-product-badge",n)},t)}},126:function(e,t,n){"use strict";n(155),t.a=function(){return React.createElement("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}},155:function(e,t){},156:function(e,t){},157:function(e,t,n){"use strict";var a=n(20),c=n.n(a),r=n(26),o=n.n(r),i=n(81),s=n(7),l=n.n(s),u=n(126),p=(n(204),["className","showSpinner","children"]);t.a=function(e){var t=e.className,n=e.showSpinner,a=void 0!==n&&n,r=e.children,s=o()(e,p),d=l()("wc-block-components-button",t,{"wc-block-components-button--loading":a});return React.createElement(i.a,c()({className:d},s),a&&React.createElement(u.a,null),React.createElement("span",{className:"wc-block-components-button__text"},r))}},158:function(e,t){},159:function(e,t,n){"use strict";var a=n(5),c=n.n(a),r=n(1),o=n(85),i=n(7),s=n.n(i),l=(n(8),n(60)),u=n(0),p=(n(207),function(e){var t=e.currency,n=e.maxPrice,a=e.minPrice,c=e.priceClassName,i=e.priceStyle;return React.createElement(React.Fragment,null,React.createElement("span",{className:"screen-reader-text"},Object(r.sprintf)(
+/* translators: %1$s min price, %2$s max price */
+Object(r.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(l.formatPrice)(a),Object(l.formatPrice)(n))),React.createElement("span",{"aria-hidden":!0},React.createElement(o.a,{className:s()("wc-block-components-product-price__value",c),currency:t,value:a,style:i})," — ",React.createElement(o.a,{className:s()("wc-block-components-product-price__value",c),currency:t,value:n,style:i})))}),d=function(e){var t=e.currency,n=e.regularPriceClassName,a=e.regularPriceStyle,c=e.regularPrice,i=e.priceClassName,l=e.priceStyle,u=e.price;return React.createElement(React.Fragment,null,React.createElement("span",{className:"screen-reader-text"},Object(r.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("del",{className:s()("wc-block-components-product-price__regular",n),style:a},e)},value:c}),React.createElement("span",{className:"screen-reader-text"},Object(r.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("ins",{className:s()("wc-block-components-product-price__value","is-discounted",i),style:l},e)},value:u}))};t.a=function(e){var t=e.align,n=e.className,a=e.currency,r=e.format,i=void 0===r?"":r,l=e.maxPrice,m=void 0===l?null:l,b=e.minPrice,g=void 0===b?null:b,f=e.price,v=void 0===f?null:f,h=e.priceClassName,O=e.priceStyle,R=e.regularPrice,E=e.regularPriceClassName,_=e.regularPriceStyle,y=s()(n,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));i.includes("")||(i="",console.error("Price formats need to include the `` tag."));var j=R&&v!==R,k=React.createElement("span",{className:s()("wc-block-components-product-price__value",h)});return j?k=React.createElement(d,{currency:a,price:v,priceClassName:h,priceStyle:O,regularPrice:R,regularPriceClassName:E,regularPriceStyle:_}):null!==g&&null!==m?k=React.createElement(p,{currency:a,maxPrice:m,minPrice:g,priceClassName:h,priceStyle:O}):null!==v&&(k=React.createElement(o.a,{className:s()("wc-block-components-product-price__value",h),currency:a,value:v,style:O})),React.createElement("span",{className:y},Object(u.createInterpolateElement)(i,{price:k}))}},170:function(e,t,n){"use strict";var a=n(1),c=(n(8),n(7)),r=n.n(c),o=(n(205),n(126));t.a=function(e){var t=e.children,n=e.className,c=e.screenReaderLabel,i=e.showSpinner,s=void 0!==i&&i,l=e.isLoading,u=void 0===l||l;return React.createElement("div",{className:r()(n,{"wc-block-components-loading-mask":u})},u&&s&&React.createElement(o.a,null),React.createElement("div",{className:r()({"wc-block-components-loading-mask__children":u}),"aria-hidden":u},t),u&&React.createElement("span",{className:"screen-reader-text"},c||Object(a.__)("Loading…","woo-gutenberg-products-block")))}},172:function(e,t,n){"use strict";var a=n(20),c=n.n(a),r=n(26),o=n.n(r),i=n(32),s=n(7),l=n.n(s),u=(n(206),["className","disabled","name","permalink","rel","style","onClick"]);t.a=function(e){var t=e.className,n=void 0===t?"":t,a=e.disabled,r=void 0!==a&&a,s=e.name,p=e.permalink,d=void 0===p?"":p,m=e.rel,b=e.style,g=(e.onClick,o()(e,u)),f=l()("wc-block-components-product-name",n);if(r){var v=g;return React.createElement("span",c()({className:f},v,{dangerouslySetInnerHTML:{__html:Object(i.decodeEntities)(s)}}))}return React.createElement("a",c()({className:f,href:d,rel:m},g,{dangerouslySetInnerHTML:{__html:Object(i.decodeEntities)(s)},style:b}))}},173:function(e,t,n){"use strict";var a=n(0),c=n(122),r=n(106),o=function(e){var t=e.indexOf("");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",a=i(e),c=a.split(" ").splice(0,t).join(" ");return Object(r.autop)(s(c,n))},u=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=i(e),o=c.slice(0,t);if(n)return Object(r.autop)(s(o,a));var l=o.match(/([\s]+)/g),u=l?l.length:0,p=c.slice(0,t+u);return Object(r.autop)(s(p,a))};t.a=function(e){var t=e.source,n=e.maxLength,i=void 0===n?15:n,s=e.countType,p=void 0===s?"words":s,d=e.className,m=void 0===d?"":d,b=Object(a.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",a=Object(r.autop)(e),i=Object(c.count)(a,n);if(i<=t)return a;var s=o(a),p=Object(c.count)(s,n);return p<=t?s:"words"===n?l(s,t):u(s,t,"characters_including_spaces"===n)}(t,i,p)}),[t,i,p]);return React.createElement(a.RawHTML,{className:m},b)}},204:function(e,t){},205:function(e,t){},206:function(e,t){},207:function(e,t){},210:function(e,t){},211:function(e,t){},212:function(e,t){},213:function(e,t){},215:function(e,t,n){"use strict";var a=n(20),c=n.n(a),r=n(26),o=n.n(r),i=n(44),s=["className","size"],l=function(e){var t=e.className,n=e.size,a=o()(e,s);return React.createElement(i.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},a),React.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"}))},u=React.createElement(l,null);t.a=u},220:function(e,t,n){"use strict";var a=n(20),c=n.n(a),r=n(26),o=n.n(r),i=(n(8),n(7)),s=n.n(i),l=n(1),u=n(128),p=n(215),d=(n(158),["text","screenReaderText","element","className","radius","children"]),m=function(e){var t=e.text,n=e.screenReaderText,a=void 0===n?"":n,r=e.element,i=void 0===r?"li":r,l=e.className,u=void 0===l?"":l,p=e.radius,m=void 0===p?"small":p,b=e.children,g=void 0===b?null:b,f=o()(e,d),v=i,h=s()(u,"wc-block-components-chip","wc-block-components-chip--radius-"+m),O=Boolean(a&&a!==t);return React.createElement(v,c()({className:h},f),React.createElement("span",{"aria-hidden":O,className:"wc-block-components-chip__text"},t),O&&React.createElement("span",{className:"screen-reader-text"},a),g)},b=["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"];t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,a=e.className,r=void 0===a?"":a,i=e.disabled,d=void 0!==i&&i,g=e.onRemove,f=void 0===g?function(){}:g,v=e.removeOnAnyClick,h=void 0!==v&&v,O=e.text,R=e.screenReaderText,E=void 0===R?"":R,_=o()(e,b),y=h?"span":"button";if(!n){var j=E&&"string"==typeof E?E:O;n="string"!=typeof j?
+/* 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"),j)}var k={"aria-label":n,disabled:d,onClick:f,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||f()}},w=h?k:{},C=h?{"aria-hidden":!0}:k;return React.createElement(m,c()({},_,w,{className:s()(r,"is-removable"),element:h?"button":_.element,screenReaderText:E,text:O}),React.createElement(y,c()({className:"wc-block-components-chip__remove"},C),React.createElement(u.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},266:function(e,t,n){"use strict";var a=n(20),c=n.n(a),r=n(32),o=n(2);n(210),t.a=function(e){var t=e.image,n=void 0===t?{}:t,a=e.fallbackAlt,i=void 0===a?"":a,s=n.thumbnail?{src:n.thumbnail,alt:Object(r.decodeEntities)(n.alt)||i||"Product Image"}:{src:o.PLACEHOLDER_IMG_SRC,alt:""};return React.createElement("img",c()({className:"wc-block-components-product-image"},s,{alt:s.alt}))}},267:function(e,t,n){"use strict";var a=n(1),c=n(124);t.a=function(){return React.createElement(c.a,{className:"wc-block-components-product-backorder-badge"},Object(a.__)("Available on backorder","woo-gutenberg-products-block"))}},268:function(e,t,n){"use strict";var a=n(1),c=n(124);t.a=function(e){var t=e.lowStockRemaining;return t?React.createElement(c.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}},269:function(e,t,n){"use strict";var a=n(6),c=n(32),r=(n(213),function(e){var t=e.details,n=void 0===t?[]:t;return Array.isArray(n)?0===(n=n.filter((function(e){return!e.hidden}))).length?null:React.createElement("ul",{className:"wc-block-components-product-details"},n.map((function(e){var t=e.name?"wc-block-components-product-details__".concat(Object(a.kebabCase)(e.name)):"";return React.createElement("li",{key:e.name+(e.display||e.value),className:t},e.name&&React.createElement(React.Fragment,null,React.createElement("span",{className:"wc-block-components-product-details__name"},Object(c.decodeEntities)(e.name),":")," "),React.createElement("span",{className:"wc-block-components-product-details__value"},Object(c.decodeEntities)(e.display||e.value)))}))):null}),o=n(173),i=n(104),s=function(e){var t=e.className,n=e.shortDescription,a=void 0===n?"":n,c=e.fullDescription,r=a||(void 0===c?"":c);return r?React.createElement(o.a,{className:t,source:r,maxLength:15,countType:i.n.wordCountType||"words"}):null};n(212),t.a=function(e){var t=e.shortDescription,n=void 0===t?"":t,a=e.fullDescription,c=void 0===a?"":a,o=e.itemData,i=void 0===o?[]:o,l=e.variation,u=void 0===l?[]:l;return React.createElement("div",{className:"wc-block-components-product-metadata"},React.createElement(s,{className:"wc-block-components-product-metadata__description",shortDescription:n,fullDescription:c}),React.createElement(r,{details:i}),React.createElement(r,{details:u.map((function(e){var t=e.attribute;return{name:void 0===t?"":t,value:e.value}}))}))}},278:function(e,t,n){"use strict";t.a=function(e){var t=e.label,n=e.secondaryLabel,a=e.description,c=e.secondaryDescription,r=e.id;return React.createElement("div",{className:"wc-block-components-radio-control__option-layout"},React.createElement("div",{className:"wc-block-components-radio-control__label-group"},t&&React.createElement("span",{id:r&&"".concat(r,"__label"),className:"wc-block-components-radio-control__label"},t),n&&React.createElement("span",{id:r&&"".concat(r,"__secondary-label"),className:"wc-block-components-radio-control__secondary-label"},n)),React.createElement("div",{className:"wc-block-components-radio-control__description-group"},a&&React.createElement("span",{id:r&&"".concat(r,"__description"),className:"wc-block-components-radio-control__description"},a),c&&React.createElement("span",{id:r&&"".concat(r,"__secondary-description"),className:"wc-block-components-radio-control__secondary-description"},c)))}},279:function(e,t,n){"use strict";var a=n(5),c=n.n(a),r=n(7),o=n.n(r),i=n(278);t.a=function(e){var t,n=e.checked,a=e.name,r=e.onChange,s=e.option,l=s.value,u=s.label,p=s.description,d=s.secondaryLabel,m=s.secondaryDescription;return React.createElement("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":n}),htmlFor:"".concat(a,"-").concat(l)},React.createElement("input",{id:"".concat(a,"-").concat(l),className:"wc-block-components-radio-control__input",type:"radio",name:a,value:l,onChange:function(e){return r(e.target.value)},checked:n,"aria-describedby":o()((t={},c()(t,"".concat(a,"-").concat(l,"__label"),u),c()(t,"".concat(a,"-").concat(l,"__secondary-label"),d),c()(t,"".concat(a,"-").concat(l,"__description"),p),c()(t,"".concat(a,"-").concat(l,"__secondary-description"),m),t))}),React.createElement(i.a,{id:"".concat(a,"-").concat(l),label:u,secondaryLabel:d,description:p,secondaryDescription:m}))}},281:function(e,t){},284:function(e,t){},285:function(e,t,n){"use strict";var a=n(7),c=n.n(a),r=n(25),o=n(279);n(286),t.a=Object(r.withInstanceId)((function(e){var t=e.className,n=e.instanceId,a=e.id,r=e.selected,i=e.onChange,s=e.options,l=void 0===s?[]:s,u=a||n;return l.length&&React.createElement("div",{className:c()("wc-block-components-radio-control",t)},l.map((function(e){return React.createElement(o.a,{key:"".concat(u,"-").concat(e.value),name:"radio-control-".concat(u),checked:e.value===r,option:e,onChange:function(t){i(t),"function"==typeof e.onChange&&e.onChange(t)}})})))}))},286:function(e,t){},288:function(e,t){},289:function(e,t){},292:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n(8);var a=n(171),c=(n(281),function(e){var t=e.errorMessage,n=void 0===t?"":t,c=e.propertyName,r=void 0===c?"":c,o=e.elementId,i=void 0===o?"":o,s=Object(a.b)(),l=s.getValidationError,u=s.getValidationErrorId;if(!n||"string"!=typeof n){var p=l(r)||{};if(!p.message||p.hidden)return null;n=p.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:u(i)},n))})},293:function(e,t,n){"use strict";var a=n(26),c=n.n(a),r=n(1),o=n(0),i=n(34),s=n(170),l=n(28),u=n(319),p=n(33),d=n(36),m=n(7),b=n.n(m),g=n(32),f=n(49),v=n(4),h=n.n(v),O=n(19),R=n.n(O),E=n(115),_=n(52),y=function(e){var t;return null===(t=e.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id},j=n(285),k=n(278),w=n(60),C=n(85),N=n(2),S=function(e){var t=Object(N.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(g.decodeEntities)(e.name),value:e.rate_id,description:React.createElement(React.Fragment,null,Number.isFinite(t)&&React.createElement(C.a,{currency:Object(w.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(g.decodeEntities)(e.delivery_time))}},x=function(e){var t=e.className,n=e.noResultsMessage,a=e.onSelectRate,c=e.rates,r=e.renderOption,o=void 0===r?S:r,i=e.selected;if(0===c.length)return n;if(c.length>1)return React.createElement(j.a,{className:t,onChange:function(e){a(e)},selected:i,options:c.map(o)});var s=o(c[0]),l=s.label,u=s.secondaryLabel,p=s.description,d=s.secondaryDescription;return React.createElement(k.a,{label:l,secondaryLabel:u,description:p,secondaryDescription:d})},P=(n(289),function(e){var t=e.packageId,n=e.className,a=e.noResultsMessage,c=e.renderOption,i=e.packageData,s=e.collapsible,u=void 0!==s&&s,p=e.collapse,d=void 0!==p&&p,m=e.showItems,v=void 0!==m&&m,O=function(e,t){var n=Object(_.a)().dispatchCheckoutEvent,a=Object(E.a)(),c=a.selectShippingRate,r=a.isSelectingRate,i=Object(o.useState)((function(){return y(t)})),s=h()(i,2),l=s[0],u=s[1],p=Object(o.useRef)(t);return Object(o.useEffect)((function(){R()(p.current,t)||(p.current=t,u(y(t)))}),[t]),{selectShippingRate:Object(o.useCallback)((function(t){u(t),c(t,e),n("set-selected-shipping-rate",{shippingRateId:t})}),[e,c,n]),selectedShippingRate:l,isSelectingRate:r}}(t,i.shipping_rates),j=O.selectShippingRate,k=O.selectedShippingRate,w=React.createElement(React.Fragment,null,(v||u)&&React.createElement("div",{className:"wc-block-components-shipping-rates-control__package-title"},i.name),v&&React.createElement("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(i.items).map((function(e){var t=Object(g.decodeEntities)(e.name),n=e.quantity;return React.createElement("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},React.createElement(f.a,{label:n>1?"".concat(t," × ").concat(n):"".concat(t),screenReaderLabel:Object(r.sprintf)(
+/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
+Object(r._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))})))),C=React.createElement(x,{className:n,noResultsMessage:a,rates:i.shipping_rates,onSelectRate:j,selected:k,renderOption:c});return u?React.createElement(l.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!d,title:w},C):React.createElement("div",{className:b()("wc-block-components-shipping-rates-control__package",n)},w,C)}),I=["package_id"],L=["extensions","receiveCart"],D=function(e){var t=e.packages,n=e.collapse,a=e.showItems,r=e.collapsible,o=e.noResultsMessage,i=e.renderOption;return t.length?React.createElement(React.Fragment,null,t.map((function(e){var t=e.package_id,s=c()(e,I);return React.createElement(P,{key:t,packageId:t,packageData:s,collapsible:r,collapse:n,showItems:a,noResultsMessage:o,renderOption:i})}))):null};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,a=e.className,m=e.collapsible,b=void 0!==m&&m,g=e.noResultsMessage,f=e.renderOption;Object(o.useEffect)((function(){if(!n){var e=Object(u.a)(t),a=Object(u.b)(t);1===e?Object(i.speak)(Object(r.sprintf)(
+/* translators: %d number of shipping options found. */
+Object(r._n)("%d shipping option was found.","%d shipping options were found.",a,"woo-gutenberg-products-block"),a)):Object(i.speak)(Object(r.sprintf)(
+/* translators: %d number of shipping packages packages. */
+Object(r._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(r.sprintf)(
+/* translators: %d number of shipping options available. */
+Object(r._n)("%d shipping option was found","%d shipping options were found",a,"woo-gutenberg-products-block"),a))}}),[n,t]);var v=Object(p.a)(),h=v.extensions,O=(v.receiveCart,{className:a,collapsible:b,noResultsMessage:g,renderOption:f,extensions:h,cart:c()(v,L),components:{ShippingRatesControlPackage:P}}),R=Object(d.a)().isEditor;return React.createElement(s.a,{isLoading:n,screenReaderLabel:Object(r.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},R?React.createElement(D,{packages:t,noResultsMessage:g,renderOption:f}):React.createElement(React.Fragment,null,React.createElement(l.ExperimentalOrderShippingPackages.Slot,O),React.createElement(l.ExperimentalOrderShippingPackages,null,React.createElement(D,{packages:t,noResultsMessage:g,renderOption:f}))))}},298:function(e,t){},299:function(e,t){},300:function(e,t){},301:function(e,t){},302:function(e,t){},303:function(e,t){},304:function(e,t){},310:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var a=n(5),c=n.n(a),r=n(1),o=n(11),i=n(9),s=n(32),l=n(33),u=n(0),p=n(258);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function m(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;r.current.forEach((function(t){null!==e&&t.status!==e||a(t.id)}))},removeSnackbarNotice:a}}),[a]),i=Object(u.useMemo)((function(){return{addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(e,t)}}}),[n]);return m(m(m({notices:t},o),i),{},{setIsSuppressed:c})}().addSnackbarNotice,v=Object(b.b)().setValidationErrors;return function(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0],t=L.current||null;if(t){t.value=t.value.trim();var n=t.checkValidity();n?A(B):F(o()({},B,{message:t.validationMessage||Object(p.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}))}}),[A,B,F]);Object(d.useEffect)((function(){var e;P&&(R&&(null===(e=L.current)||void 0===e||e.focus()),I(!1))}),[R,P,I]),Object(d.useEffect)((function(){P&&(m&&$(),I(!1))}),[P,I,m,$]),Object(d.useEffect)((function(){U&&$()}),[U,$]),Object(d.useEffect)((function(){return function(){A(B)}}),[A,B]);var z=M(B)||{};Object(O.c)(C)&&""!==C&&(z.message=C);var W=z.message&&!z.hidden,H=k&&W&&V(B)?V(B):r;return React.createElement(y,c()({className:b()(t,{"has-error":W}),"aria-invalid":!0===W,id:q,onBlur:function(){$(!1)},feedback:k&&React.createElement(v.a,{errorMessage:C,propertyName:B}),ref:L,onChange:function(e){T(B),E(e)},ariaDescribedBy:H},N))}))},347:function(e,t,n){"use strict";var a=n(1),c=n(170),r=n(220),o=(n(8),n(28)),i=n(2),s=(n(298),{context:"summary"});t.a=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,l=e.currency,u=e.isRemovingCoupon,p=e.removeCoupon,d=e.values,m=d.total_discount,b=d.total_discount_tax,g=parseInt(m,10);if(!g&&0===n.length)return null;var f=parseInt(b,10),v=Object(i.getSetting)("displayCartPricesIncludingTax",!1)?g+f:g,h=Object(o.__experimentalApplyCheckoutFilter)({arg:s,filterName:"coupons",defaultValue:n});return React.createElement(o.TotalsItem,{className:"wc-block-components-totals-discount",currency:l,description:0!==h.length&&React.createElement(c.a,{screenReaderLabel:Object(a.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},React.createElement("ul",{className:"wc-block-components-totals-discount__coupon-list"},h.map((function(e){return React.createElement(r.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:u,onRemove:function(){p(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:v?Object(a.__)("Discount","woo-gutenberg-products-block"):Object(a.__)("Coupons","woo-gutenberg-products-block"),value:v?-1*v:"-"})}},348:function(e,t,n){"use strict";var a=n(4),c=n.n(a),r=n(1),o=n(0),i=n(157),s=n(322),l=n(49),u=n(170),p=(n(8),n(25)),d=n(171),m=n(292),b=n(28);n(299),t.a=Object(p.withInstanceId)((function(e){var t=e.instanceId,n=e.isLoading,a=void 0!==n&&n,p=e.initialOpen,g=void 0!==p&&p,f=e.onSubmit,v=void 0===f?function(){}:f,h=Object(o.useState)(""),O=c()(h,2),R=O[0],E=O[1],_=Object(o.useRef)(!1),y=Object(d.b)(),j=y.getValidationError,k=y.getValidationErrorId,w=j("coupon");Object(o.useEffect)((function(){_.current!==a&&(a||!R||w||E(""),_.current=a)}),[a,R,w]);var C="wc-block-components-totals-coupon__input-".concat(t);return React.createElement(b.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:g,title:React.createElement(l.a,{label:Object(r.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(r.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:C})},React.createElement(u.a,{screenReaderLabel:Object(r.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:a,showSpinner:!1},React.createElement("div",{className:"wc-block-components-totals-coupon__content"},React.createElement("form",{className:"wc-block-components-totals-coupon__form"},React.createElement(s.a,{id:C,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(r.__)("Enter code","woo-gutenberg-products-block"),value:R,ariaDescribedBy:k(C),onChange:function(e){E(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),React.createElement(i.a,{className:"wc-block-components-totals-coupon__button",disabled:a||!R,showSpinner:a,onClick:function(e){e.preventDefault(),v(R)},type:"submit"},Object(r.__)("Apply","woo-gutenberg-products-block"))),React.createElement(m.a,{propertyName:"coupon",elementId:C}))))}))},352:function(e,t,n){"use strict";var a=n(26),c=n.n(a),r=n(1),o=n(0),i=n(85),s=(n(8),n(28)),l=n(33),u=n(2),p=(n(304),["receiveCart"]);t.a=function(e){var t=e.currency,n=e.values,a=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),d=n.total_price,m=n.total_tax,b=Object(l.a)(),g=(b.receiveCart,c()(b,p)),f=Object(s.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(r.__)("Total","woo-gutenberg-products-block"),extensions:g.extensions,arg:{cart:g}}),v=parseInt(m,10);return React.createElement(s.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:f,value:parseInt(d,10),description:a&&0!==v&&React.createElement("p",{className:"wc-block-components-totals-footer-item-tax"},Object(o.createInterpolateElement)(Object(r.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:React.createElement(i.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:v})}))})}},369:function(e,t){},370:function(e,t,n){"use strict";var a=n(5),c=n.n(a),r=n(322),o=n(20),i=n.n(o),s=n(104),l=n(0),u=n(1),p=n(32),d=n(7),m=n.n(d),b=n(25),g=n(397),f=n(171),v=n(292),h=n(66),O=(n(302),Object(b.withInstanceId)((function(e){var t=e.id,n=e.className,a=e.label,r=e.onChange,o=e.options,i=e.value,s=e.required,p=void 0!==s&&s,d=e.errorMessage,b=void 0===d?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):d,O=e.errorId,R=e.instanceId,E=void 0===R?"0":R,_=e.autoComplete,y=void 0===_?"off":_,j=Object(f.b)(),k=j.getValidationError,w=j.setValidationErrors,C=j.clearValidationError,N=Object(l.useRef)(null),S=t||"control-"+E,x=O||S,P=k(x)||{message:"",hidden:!1};return Object(l.useEffect)((function(){return!p||i?C(x):w(c()({},x,{message:b,hidden:!0})),function(){C(x)}}),[C,i,x,b,p,w]),React.createElement("div",{id:S,className:m()("wc-block-components-combobox",n,{"is-active":i,"has-error":P.message&&!P.hidden}),ref:N},React.createElement(g.a,{className:"wc-block-components-combobox-control",label:a,onChange:r,onFilterValueChange:function(e){if(e.length){var t=Object(h.b)(N.current)?N.current.ownerDocument.activeElement:void 0;if(t&&Object(h.b)(N.current)&&N.current.contains(t))return;var n=e.toLocaleUpperCase(),a=o.find((function(e){return e.label.toLocaleUpperCase().startsWith(n)||e.value.toLocaleUpperCase()===n}));a&&r(a.value)}},options:o,value:i||"",allowReset:!1,autoComplete:y,"aria-invalid":P.message&&!P.hidden}),React.createElement(v.a,{propertyName:x}))}))),R=(n(301),function(e){var t=e.className,n=e.countries,a=e.id,c=e.label,r=e.onChange,o=e.value,i=void 0===o?"":o,s=e.autoComplete,d=void 0===s?"off":s,b=e.required,g=void 0!==b&&b,f=e.errorId,v=e.errorMessage,h=void 0===v?Object(u.__)("Please select a country.","woo-gutenberg-products-block"):v,R=Object(l.useMemo)((function(){return Object.keys(n).map((function(e){return{value:e,label:Object(p.decodeEntities)(n[e])}}))}),[n]);return React.createElement("div",{className:m()(t,"wc-block-components-country-input")},React.createElement(O,{id:a,label:c,onChange:r,options:R,value:i,errorId:f,errorMessage:h,required:g,autoComplete:d}),"off"!==d&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:d,value:i,onChange:function(e){var t=e.target.value.toLocaleUpperCase(),n=R.find((function(e){return 2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t}));r(n?n.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),E=function(e){return React.createElement(R,i()({countries:s.g},e))},_=function(e){return React.createElement(R,i()({countries:s.a},e))},y=(n(303),function(e,t){var n=t.find((function(t){return t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase()}));return n?n.value:""}),j=function(e){var t=e.className,n=e.id,a=e.states,c=e.country,o=e.label,i=e.onChange,s=e.autoComplete,d=void 0===s?"off":s,b=e.value,g=void 0===b?"":b,f=e.required,v=void 0!==f&&f,h=a[c],R=Object(l.useMemo)((function(){return h?Object.keys(h).map((function(e){return{value:e,label:Object(p.decodeEntities)(h[e])}})):[]}),[h]),E=Object(l.useCallback)((function(e){i(R.length>0?y(e,R):e)}),[i,R]),_=Object(l.useRef)(g);return Object(l.useEffect)((function(){_.current!==g&&(_.current=g)}),[g]),Object(l.useEffect)((function(){if(R.length>0&&_.current){var e=y(_.current,R);e!==_.current&&E(e)}}),[R,E]),R.length>0?React.createElement(React.Fragment,null,React.createElement(O,{className:m()(t,"wc-block-components-state-input"),id:n,label:o,onChange:E,options:R,value:g,errorMessage:Object(u.__)("Please select a state.","woo-gutenberg-products-block"),required:v,autoComplete:d}),"off"!==d&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:d,value:g,onChange:function(e){return E(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):React.createElement(r.a,{className:t,id:n,label:o,onChange:E,autoComplete:d,value:g,required:v})},k=function(e){return React.createElement(j,i()({states:s.h},e))},w=function(e){return React.createElement(j,i()({states:s.b},e))},C=n(45),N=n(2),S=n(87);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function P(e){for(var t=1;t")},j=function(e){var t=e.cartItem,n=t.images,a=t.low_stock_remaining,o=t.show_backorder_badge,s=t.name,j=t.permalink,k=t.prices,w=t.quantity,C=t.short_description,N=t.description,S=t.item_data,x=t.variation,P=t.totals,I=t.extensions,L=Object(v.a)(),D=(L.receiveCart,c()(L,_)),M=Object(f.useMemo)((function(){return{context:"summary",cartItem:t,cart:D}}),[t,D]),T=Object(m.getCurrencyFromPriceResponse)(k),F=Object(i.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:s,extensions:I,arg:M}),A=Object(b.a)({amount:parseInt(k.raw_prices.regular_price,10),precision:parseInt(k.raw_prices.precision,10)}).convertPrecision(T.minorUnit).getAmount(),V=Object(b.a)({amount:parseInt(k.raw_prices.price,10),precision:parseInt(k.raw_prices.precision,10)}).convertPrecision(T.minorUnit).getAmount(),U=Object(m.getCurrencyFromPriceResponse)(P),q=parseInt(P.line_subtotal,10);Object(g.getSetting)("displayCartPricesIncludingTax",!1)&&(q+=parseInt(P.line_subtotal_tax,10));var B=Object(b.a)({amount:q,precision:U.minorUnit}).getAmount(),$=Object(i.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:I,arg:M,validation:y}),z=Object(i.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:I,arg:M,validation:y}),W=Object(i.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:I,arg:M});return React.createElement("div",{className:l()("wc-block-components-order-summary-item",W)},React.createElement("div",{className:"wc-block-components-order-summary-item__image"},React.createElement("div",{className:"wc-block-components-order-summary-item__quantity"},React.createElement(u.a,{label:w,screenReaderLabel:Object(r.sprintf)(
+/* translators: %d number of products of the same type in the cart */
+Object(r._n)("%d item","%d items",w,"woo-gutenberg-products-block"),w)})),React.createElement(O.a,{image:n.length?n[0]:{},fallbackAlt:F})),React.createElement("div",{className:"wc-block-components-order-summary-item__description"},React.createElement(d.a,{disabled:!0,name:F,permalink:j}),React.createElement(p.a,{currency:T,price:V,regularPrice:A,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:$}),o?React.createElement(h.a,null):!!a&&React.createElement(R.a,{lowStockRemaining:a}),React.createElement(E.a,{shortDescription:C,fullDescription:N,itemData:S,variation:x})),React.createElement("span",{className:"screen-reader-text"},Object(r.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(r._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(m.formatPrice)(B,U))),React.createElement("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},React.createElement(p.a,{currency:U,format:z,price:B})))},k=(n(369),function(e){var t=e.cartItems,n=void 0===t?[]:t,a=Object(o.b)(),c=a.isLarge;return a.hasContainerWidth?React.createElement(i.Panel,{className:"wc-block-components-order-summary",initialOpen:c,hasBorder:!1,title:React.createElement("span",{className:"wc-block-components-order-summary__button-text"},Object(r.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},React.createElement("div",{className:"wc-block-components-order-summary__content"},n.map((function(e){return React.createElement(j,{key:e.key,cartItem:e})})))):null}),w=n(347),C=n(348),N=n(371),S=n(352),x=n(65),P=n(310),I=["extensions","receiveCart"];t.default=function(e){var t=e.showRateAfterTaxName,n=void 0!==t&&t,a=e.className,r=Object(v.a)(),o=r.cartItems,s=r.cartTotals,l=r.cartCoupons,u=r.cartFees,p=Object(P.a)(),d=p.applyCoupon,b=p.removeCoupon,f=p.isApplyingCoupon,h=p.isRemovingCoupon,O=Object(x.b)().needsShipping,R=Object(m.getCurrencyFromPriceResponse)(s),E=Object(v.a)(),_=E.extensions,y=(E.receiveCart,{extensions:_,cart:c()(E,I)});return React.createElement("div",{className:a},React.createElement(i.TotalsWrapper,null,React.createElement(k,{cartItems:o})),React.createElement(i.TotalsWrapper,null,React.createElement(i.Subtotal,{currency:R,values:s}),React.createElement(i.TotalsFees,{currency:R,cartFees:u}),React.createElement(w.a,{cartCoupons:l,currency:R,isRemovingCoupon:h,removeCoupon:b,values:s})),Object(g.getSetting)("couponsEnabled",!0)&&React.createElement(i.TotalsWrapper,null,React.createElement(C.a,{onSubmit:d,initialOpen:!1,isLoading:f})),O&&React.createElement(i.TotalsWrapper,null,React.createElement(N.a,{showCalculator:!1,showRateSelector:!1,values:s,currency:R})),React.createElement(i.ExperimentalDiscountsMeta.Slot,y),!Object(g.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(s.total_tax,10)>0&&React.createElement(i.TotalsWrapper,null,React.createElement(i.TotalsTaxes,{currency:R,showRateAfterTaxName:n,values:s})),React.createElement(i.TotalsWrapper,null,React.createElement(S.a,{currency:R,values:s})),React.createElement(i.ExperimentalOrderMeta.Slot,y))}},49:function(e,t,n){"use strict";var a=n(5),c=n.n(a),r=n(0),o=n(7),i=n.n(o);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=320,"is-medium":w>=160&&w<320,"is-small":w<160});var k=l()("components-placeholder",p,t),j=l()("components-placeholder__fieldset",{"is-column-layout":v});return Object(r.createElement)("div",Object(n.a)({},f,{className:k}),g,b,h&&Object(r.createElement)("div",{className:"components-placeholder__preview"},h),Object(r.createElement)("div",{className:"components-placeholder__label"},Object(r.createElement)(d.a,{icon:c}),m),!!u&&Object(r.createElement)("div",{className:"components-placeholder__instructions"},u),Object(r.createElement)("div",{className:j},s))}},361:function(e,t){},392:function(e,t,c){"use strict";c.r(t);var n=c(7),o=c.n(n),a=c(33),r=c(43),s=c(154),l=c(290),i=c(54),d=c(100),m=c(263),u=c(1),p=c(49),b=c(164),h=c(317),v=c(81),f=c(152),y=c(128),O=c(386),g=c(2),w=c(36),k=(c(361),function(){return React.createElement(h.a,{icon:React.createElement(y.a,{srcElement:O.a}),label:Object(u.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},React.createElement("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(u.__)("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")),React.createElement(v.a,{isSecondary:!0,href:"".concat(g.ADMIN_URL,"admin.php?page=wc-settings&tab=checkout"),target:"_blank",rel:"noopener noreferrer"},Object(u.__)("Configure Payment Methods","woo-gutenberg-products-block")))}),j=function(){return React.createElement(f.a,{isDismissible:!1,className:o()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(u.__)("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"))},_=function(){return Object(w.a)().isEditor?React.createElement(k,null):React.createElement(j,null)},E=c(5),R=c.n(E),N=c(26),P=c.n(N),S=c(394),C=c(51),D=c(0),M=c(21),T=c.n(M),x=c(25),L=c(279),I=Object(x.withInstanceId)((function(e){var t=e.className,c=e.instanceId,n=e.id,a=e.selected,r=e.onChange,s=e.options,l=void 0===s?[]:s,i=n||c;return l.length&&React.createElement("div",{className:o()("wc-block-components-radio-control",t)},l.map((function(e){var t="object"===T()(e)&&"content"in e,c=e.value===a;return React.createElement("div",{className:"wc-block-components-radio-control-accordion-option",key:e.value},React.createElement(L.a,{name:"radio-control-".concat(i),checked:c,option:e,onChange:function(t){r(t),"function"==typeof e.onChange&&e.onChange(t)}}),t&&c&&React.createElement("div",{className:o()("wc-block-components-radio-control-accordion-content",{"wc-block-components-radio-control-accordion-content-hide":!c})},e.content))})))})),A=c(28),F=(c(8),c(307)),Y=function(e){var t=e.children,c=e.showSaveOption,n=Object(w.a)().isEditor,o=Object(b.b)(),a=o.shouldSavePayment,r=o.setShouldSavePayment,s=Object(i.b)().customerId;return React.createElement(F.a,{isEditor:n},t,s>0&&c&&React.createElement(A.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:Object(u.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:a,onChange:function(){return r(!a)}}))},B=["activePaymentMethod"];function H(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,n)}return c}function $(e){for(var t=1;t0?React.createElement(React.Fragment,null,React.createElement(J.a,{id:"wc-payment-method-saved-tokens",selected:s,onChange:v,options:h.current}),f):null},G=function(){var e=Object(m.b)(),t=e.isInitialized,c=e.paymentMethods,n=Object(b.b)().customerPaymentMethods;return t&&0===Object.keys(c).length?React.createElement(_,null):React.createElement(React.Fragment,null,React.createElement(q,null),Object.keys(n).length>0&&React.createElement(p.a,{label:Object(u.__)("Use another payment method.","woo-gutenberg-products-block"),screenReaderLabel:Object(u.__)("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"]}}),React.createElement(z,null))},K=function(){var e=Object(r.c)().noticeContexts;return React.createElement(d.a,{context:e.PAYMENTS},React.createElement(G,null))},Q=c(282);function V(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,n)}return c}function X(e){for(var t=1;t1)return React.createElement(k.a,{className:t,onChange:function(e){c(e)},selected:i,options:a.map(o)});var s=o(a[0]),l=s.label,p=s.secondaryLabel,u=s.description,d=s.secondaryDescription;return React.createElement(y.a,{label:l,secondaryLabel:p,description:u,secondaryDescription:d})},D=(n(289),function(e){var t=e.packageId,n=e.className,c=e.noResultsMessage,a=e.renderOption,i=e.packageData,s=e.collapsible,p=void 0!==s&&s,u=e.collapse,d=void 0!==u&&u,b=e.showItems,h=void 0!==b&&b,v=function(e,t){var n=Object(_.a)().dispatchCheckoutEvent,c=Object(j.a)(),a=c.selectShippingRate,r=c.isSelectingRate,i=Object(o.useState)((function(){return R(t)})),s=O()(i,2),l=s[0],p=s[1],u=Object(o.useRef)(t);return Object(o.useEffect)((function(){w()(u.current,t)||(u.current=t,p(R(t)))}),[t]),{selectShippingRate:Object(o.useCallback)((function(t){p(t),a(t,e),n("set-selected-shipping-rate",{shippingRateId:t})}),[e,a,n]),selectedShippingRate:l,isSelectingRate:r}}(t,i.shipping_rates),k=v.selectShippingRate,y=v.selectedShippingRate,E=React.createElement(React.Fragment,null,(h||p)&&React.createElement("div",{className:"wc-block-components-shipping-rates-control__package-title"},i.name),h&&React.createElement("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(i.items).map((function(e){var t=Object(g.decodeEntities)(e.name),n=e.quantity;return React.createElement("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},React.createElement(f.a,{label:n>1?"".concat(t," × ").concat(n):"".concat(t),screenReaderLabel:Object(r.sprintf)(
+/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
+Object(r._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))})))),N=React.createElement(C,{className:n,noResultsMessage:c,rates:i.shipping_rates,onSelectRate:k,selected:y,renderOption:a});return p?React.createElement(l.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!d,title:E},N):React.createElement("div",{className:m()("wc-block-components-shipping-rates-control__package",n)},E,N)}),F=["package_id"],L=["extensions","receiveCart"],x=function(e){var t=e.packages,n=e.collapse,c=e.showItems,r=e.collapsible,o=e.noResultsMessage,i=e.renderOption;return t.length?React.createElement(React.Fragment,null,t.map((function(e){var t=e.package_id,s=a()(e,F);return React.createElement(D,{key:t,packageId:t,packageData:s,collapsible:r,collapse:n,showItems:c,noResultsMessage:o,renderOption:i})}))):null};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,c=e.className,b=e.collapsible,m=void 0!==b&&b,g=e.noResultsMessage,f=e.renderOption;Object(o.useEffect)((function(){if(!n){var e=Object(p.a)(t),c=Object(p.b)(t);1===e?Object(i.speak)(Object(r.sprintf)(
+/* translators: %d number of shipping options found. */
+Object(r._n)("%d shipping option was found.","%d shipping options were found.",c,"woo-gutenberg-products-block"),c)):Object(i.speak)(Object(r.sprintf)(
+/* translators: %d number of shipping packages packages. */
+Object(r._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(r.sprintf)(
+/* translators: %d number of shipping options available. */
+Object(r._n)("%d shipping option was found","%d shipping options were found",c,"woo-gutenberg-products-block"),c))}}),[n,t]);var h=Object(u.a)(),O=h.extensions,v=(h.receiveCart,{className:c,collapsible:m,noResultsMessage:g,renderOption:f,extensions:O,cart:a()(h,L),components:{ShippingRatesControlPackage:D}}),w=Object(d.a)().isEditor;return React.createElement(s.a,{isLoading:n,screenReaderLabel:Object(r.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},w?React.createElement(x,{packages:t,noResultsMessage:g,renderOption:f}):React.createElement(React.Fragment,null,React.createElement(l.ExperimentalOrderShippingPackages.Slot,v),React.createElement(l.ExperimentalOrderShippingPackages,null,React.createElement(x,{packages:t,noResultsMessage:g,renderOption:f}))))}},308:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var c=n(5),a=n.n(c),r=n(26),o=n.n(r),i=n(2),s=n(0),l=n(65),p=n(57),u=["email"];function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}var b=function(){var e=Object(l.b)().needsShipping,t=Object(p.b)(),n=t.billingData,c=t.setBillingData,r=t.shippingAddress,b=t.setShippingAddress,m=t.shippingAsBilling,g=t.setShippingAsBilling,f=Object(s.useRef)(m),h=Object(s.useRef)(n),O=Object(s.useCallback)((function(e){b(e),m&&c(e)}),[m,b,c]),v=Object(s.useCallback)((function(t){c(t),e||b(t)}),[e,b,c]);Object(s.useEffect)((function(){if(f.current!==m){if(m)h.current=n,c(r);else{var e=h.current,t=(e.email,o()(e,u));c(function(e){for(var t=1;t=320,"is-medium":j>=160&&j<320,"is-small":j<160});var _=s()("components-placeholder",b,t),R=s()("components-placeholder__fieldset",{"is-column-layout":f});return Object(o.createElement)("div",Object(c.a)({},h,{className:_}),w,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}),u),!!d&&Object(o.createElement)("div",{className:"components-placeholder__instructions"},d),Object(o.createElement)("div",{className:R},i))}},319:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a}));var c=function(e){return e.length},a=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},359:function(e,t){},360:function(e,t){},395:function(e,t,n){"use strict";n.r(t);var c=n(7),a=n.n(c),r=n(154),o=n(290),i=n(54),s=n(308),l=n(1),p=n(293),u=n(319),d=n(60),b=n(85),m=n(36),g=n(65),f=n(32),h=n(152),O=n(2),v=n(317),w=n(81),j=n(128),_=n(44),R=React.createElement(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 13"},React.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"})),k=(n(360),function(){return React.createElement(v.a,{icon:React.createElement(j.a,{srcElement:R}),label:Object(l.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},React.createElement("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(l.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woo-gutenberg-products-block")),React.createElement(w.a,{isSecondary:!0,href:"".concat(O.ADMIN_URL,"admin.php?page=wc-settings&tab=shipping"),target:"_blank",rel:"noopener noreferrer"},Object(l.__)("Configure Shipping Options","woo-gutenberg-products-block")))}),y=(n(359),function(e){var t=Object(O.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(f.decodeEntities)(e.name),value:e.rate_id,description:Object(f.decodeEntities)(e.description),secondaryLabel:React.createElement(b.a,{currency:Object(d.getCurrencyFromPriceResponse)(e),value:t}),secondaryDescription:Object(f.decodeEntities)(e.delivery_time)}}),E=function(){var e=Object(m.a)().isEditor,t=Object(g.b)(),n=t.shippingRates,c=t.shippingRatesLoading,r=t.needsShipping,o=t.hasCalculatedShipping;if(!r)return null;var i=Object(u.a)(n);return e||o||i?React.createElement(React.Fragment,null,e&&!i?React.createElement(k,null):React.createElement(p.a,{noResultsMessage:React.createElement(h.a,{isDismissible:!1,className:a()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(l.__)("There are no shipping options available. Please check your shipping address.","woo-gutenberg-products-block")),renderOption:y,shippingRates:n,shippingRatesLoading:c})):React.createElement("p",null,Object(l.__)("Shipping options will be displayed here after entering your full shipping address.","woo-gutenberg-products-block"))},N=n(5),S=n.n(N),P=n(282);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function D(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=Object(o.b)(),n=t.paymentMethods,r=t.expressPaymentMethods,a=t.paymentMethodsInitialized,i=t.expressPaymentMethodsInitialized,s=Object(c.a)(n),u=Object(c.a)(r);return{paymentMethods:e?u:s,isInitialized:e?i:a}},a=function(){return r(!1)},i=function(){return r(!0)}},364:function(e,t){},365:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var c=n(1),o=n(54),r=n(164),a=n(263),i=function(){var e=Object(o.b)(),t=e.onSubmit,n=e.isCalculating,i=e.isBeforeProcessing,s=e.isProcessing,u=e.isAfterProcessing,d=e.isComplete,b=e.hasError,l=Object(a.b)().paymentMethods,g=void 0===l?{}:l,m=Object(r.b)(),p=m.activePaymentMethod,h=m.currentStatus,f=g[p]||{},_=s||u||i,j=d&&!b;return{submitButtonText:(null==f?void 0:f.placeOrderButtonLabel)||Object(c.__)("Place Order","woo-gutenberg-products-block"),onSubmit:t,isCalculating:n,isDisabled:s||h.isDoingExpressPayment,waitingForProcessing:_,waitingForRedirect:j}}},409:function(e,t,n){"use strict";n.r(t);var c=n(5),o=n.n(c),r=n(4),a=n.n(r),i=n(1),s=n(7),u=n.n(s),d=n(0),b=n(28),l=n(365),g=n(25),m=n(104),p=m.j?'').concat(Object(i.__)("Terms and Conditions","woo-gutenberg-products-block"),""):Object(i.__)("Terms and Conditions","woo-gutenberg-products-block"),h=m.f?'').concat(Object(i.__)("Privacy Policy","woo-gutenberg-products-block"),""):Object(i.__)("Privacy Policy","woo-gutenberg-products-block"),f=Object(i.sprintf)(
+/* translators: %1$s terms page link, %2$s privacy page link. */
+Object(i.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woo-gutenberg-products-block"),p,h),_=Object(i.sprintf)(
+/* translators: %1$s terms page link, %2$s privacy page link. */
+Object(i.__)("You must accept our %1$s and %2$s to continue with your purchase.","woo-gutenberg-products-block"),p,h);n(364),t.default=Object(g.withInstanceId)((function(e){var t=e.text,n=e.checkbox,c=e.instanceId,r=e.validation,s=e.className,g=Object(d.useState)(!1),m=a()(g,2),p=m[0],h=m[1],j=Object(l.a)().isDisabled,O="terms-and-conditions-"+c,w=r.getValidationError,k=r.setValidationErrors,y=r.clearValidationError,v=w(O)||{},P=v.message&&!v.hidden;return Object(d.useEffect)((function(){if(n)return p?y(O):k(o()({},O,{message:Object(i.__)("Please read and accept the terms and conditions.","woo-gutenberg-products-block"),hidden:!0})),function(){y(O)}}),[n,p,O,y,k]),React.createElement("div",{className:u()("wc-block-checkout__terms",{"wc-block-checkout__terms--disabled":j},s)},n?React.createElement(React.Fragment,null,React.createElement(b.CheckboxControl,{id:"terms-and-conditions",checked:p,onChange:function(){return h((function(e){return!e}))},hasError:P,disabled:j},React.createElement("span",{dangerouslySetInnerHTML:{__html:t||_}}))):React.createElement("span",{dangerouslySetInnerHTML:{__html:t||f}}))}))}}]);
\ 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..4045c934580
--- /dev/null
+++ b/build/checkout-blocks/totals-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[43],{346:function(c,e,a){"use strict";var n=a(3),t=a(7),r=a.n(t),s=Object(n.forwardRef)((function(c,e){var a=c.children,n=c.className,t=void 0===n?"":n;return React.createElement("div",{ref:e,className:r()("wc-block-components-sidebar",t)},a)}));e.a=s},368:function(c,e){},389:function(c,e,a){"use strict";a.r(e);var n=a(7),t=a.n(n),r=a(346);a(368),e.default=function(c){var e=c.children,a=c.className;return React.createElement(r.a,{className:t()("wc-block-checkout__sidebar",a)},e)}}}]);
\ 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..83c00c84e94
--- /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' => '45f9ab838b05f33ba81266388ad89b29');
\ No newline at end of file
diff --git a/build/checkout-frontend.js b/build/checkout-frontend.js
new file mode 100644
index 00000000000..e0b5afd93fe
--- /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=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c},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){e.exports=window.wc.blocksCheckout},function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(56),o=r(63);function c(e){return function(e){if(Array.isArray(e))return Object(n.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){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var n=r(4),o=r.n(n),c=r(5),i=r.n(c),a=r(6),s=r(0),u=r(9),l=r(11),f=r(32),p=r(101),d=r(151),m=r(36),h=r(107),b=function(e){var t=e.detail;t&&t.preserveCartData||Object(l.dispatch)(u.CART_STORE_KEY).invalidateResolutionForStore()},v=function(){1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},g=function(){Object(s.useEffect)((function(){return function(){if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:function(){}}),0===window.wcBlocksStoreCartListeners.count){var e=Object(h.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(h.b)("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=function(){e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",b),document.body.removeEventListener("wc-blocks_removed_from_cart",b)}}window.wcBlocksStoreCartListeners.count++}(),v}),[])};function y(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 O(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(m.a)(),r=t.isEditor,n=t.previewData,o=null==n?void 0:n.previewCart,c=e.shouldSelect,i=Object(s.useRef)();g();var f=Object(l.useSelect)((function(e,t){var n=t.dispatch;if(!c)return k;if(r)return{cartCoupons:o.coupons,cartItems:o.items,cartFees:o.fees,cartItemsCount:o.items_count,cartItemsWeight:o.items_weight,cartNeedsPayment:o.needs_payment,cartNeedsShipping:o.needs_shipping,cartItemErrors:u.EMPTY_CART_ITEM_ERRORS,cartTotals:o.totals,cartIsLoading:!1,cartErrors:u.EMPTY_CART_ERRORS,billingAddress:j,shippingAddress:E,extensions:u.EMPTY_EXTENSIONS,shippingRates:o.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:o.has_calculated_shipping,paymentRequirements:o.paymentRequirements,receiveCart:"function"==typeof(null==o?void 0:o.receiveCart)?o.receiveCart:function(){}};var i=e(u.CART_STORE_KEY),a=i.getCartData(),s=i.getCartErrors(),l=i.getCartTotals(),f=!i.hasFinishedResolution("getCartData"),p=i.isCustomerDataUpdating(),m=n(u.CART_STORE_KEY).receiveCart,h=S(a.billingAddress),b=a.needsShipping?S(a.shippingAddress):h,v=a.fees.length>0?a.fees.map((function(e){return S(e)})):u.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map((function(e){return O(O({},e),{},{label:e.code})})):u.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:v,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:l,cartIsLoading:f,cartErrors:s,billingAddress:Object(d.a)(h),shippingAddress:Object(d.a)(b),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}}),[c]);return i.current&&Object(a.isEqual)(i.current,f)||(i.current=f),i.current}},function(e,t){e.exports=window.wp.a11y},function(e,t){function r(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)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var i=e.apply(t,n);function a(e){r(i,o,c,a,s,"next",e)}function s(e){r(i,o,c,a,s,"throw",e)}a(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=(r(11),Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:function(){}})),c=function(){return Object(n.useContext)(o)}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),l=Object(c.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,s({},t))}}}),[r]);return s(s(s({notices:t},u),l),{},{setIsSuppressed:o})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(5),o=r.n(n),c=r(74),i=r(0),a=r(33);function s(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 u(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};try{Object(c.doAction)("experimental__woocommerce_blocks-".concat(e),t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(i.useCallback)((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(c.doAction)("experimental__woocommerce_blocks-checkout-".concat(e),u(u({},r),{},{storeCart:t.current}))}catch(e){console.error(e)}}),[])}}},function(e,t){e.exports=window.wp.deprecated},function(e,t,r){"use strict";r.d(t,"b",(function(){return I})),r.d(t,"a",(function(){return F}));var n,o=r(4),c=r.n(o),i=r(0),a=r(1),s=r(96),u=r(53),l=r.n(u),f=r(66);!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"}(n||(n={}));var p,d=function(){return{type:n.SET_IDLE}},m=function(e){return{type:n.SET_REDIRECT_URL,redirectUrl:e}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:n.SET_COMPLETE,data:e}},b=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?n.SET_HAS_ERROR:n.SET_NO_ERROR}},v=r(5),g=r.n(v),y=r(2);function O(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(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(p||(p={}));var E=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0,r=t.redirectUrl,o=t.type,c=t.customerId,i=t.orderId,a=t.orderNotes,s=t.extensionData,u=t.shouldCreateAccount,l=t.data,f=e;switch(o){case n.SET_PRISTINE:f=j;break;case n.SET_IDLE:f=e.status!==p.IDLE?S(S({},e),{},{status:p.IDLE}):e;break;case n.SET_REDIRECT_URL:f=void 0!==r&&r!==e.redirectUrl?S(S({},e),{},{redirectUrl:r}):e;break;case n.SET_PROCESSING_RESPONSE:f=S(S({},e),{},{processingResponse:l});break;case n.SET_COMPLETE:f=e.status!==p.COMPLETE?S(S({},e),{},{status:p.COMPLETE,redirectUrl:void 0!==l&&"string"==typeof l.redirectUrl&&l.redirectUrl?l.redirectUrl:e.redirectUrl}):e;break;case n.SET_PROCESSING:f=!1===(f=e.status!==p.PROCESSING?S(S({},e),{},{status:p.PROCESSING,hasError:!1}):e).hasError?f:S(S({},f),{},{hasError:!1});break;case n.SET_BEFORE_PROCESSING:f=e.status!==p.BEFORE_PROCESSING?S(S({},e),{},{status:p.BEFORE_PROCESSING,hasError:!1}):e;break;case n.SET_AFTER_PROCESSING:f=e.status!==p.AFTER_PROCESSING?S(S({},e),{},{status:p.AFTER_PROCESSING}):e;break;case n.SET_HAS_ERROR:f=e.hasError?e:S(S({},e),{},{hasError:!0}),f=e.status===p.PROCESSING||e.status===p.BEFORE_PROCESSING?S(S({},f),{},{status:p.IDLE}):f;break;case n.SET_NO_ERROR:f=e.hasError?S(S({},e),{},{hasError:!1}):e;break;case n.INCREMENT_CALCULATING:f=S(S({},e),{},{calculatingCount:e.calculatingCount+1});break;case n.DECREMENT_CALCULATING:f=S(S({},e),{},{calculatingCount:Math.max(0,e.calculatingCount-1)});break;case n.SET_CUSTOMER_ID:f=void 0!==c?S(S({},e),{},{customerId:c}):e;break;case n.SET_ORDER_ID:f=void 0!==i?S(S({},e),{},{orderId:i}):e;break;case n.SET_SHOULD_CREATE_ACCOUNT:void 0!==u&&u!==e.shouldCreateAccount&&(f=S(S({},e),{},{shouldCreateAccount:u}));break;case n.SET_ORDER_NOTES:void 0!==a&&e.orderNotes!==a&&(f=S(S({},e),{},{orderNotes:a}));break;case n.SET_EXTENSION_DATA:void 0!==s&&e.extensionData!==s&&(f=S(S({},e),{},{extensionData:s}))}return f!==e&&o!==n.SET_PRISTINE&&f.status===p.PRISTINE&&(f.status=p.IDLE),f},_=r(32),P=r(99),R=r(176),x=r(178),C=r(171),T=r(51),A=r(52),M=r(11),N=r(43),D=Object(i.createContext)({dispatchActions:{resetCheckout:function(){},setRedirectUrl:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},incrementCalculating:function(){},decrementCalculating:function(){},setCustomerId:function(e){},setOrderId:function(e){},setOrderNotes:function(e){},setExtensionData:function(e){}},onSubmit:function(){},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:function(){return function(){}},onCheckoutAfterProcessingWithError:function(){return function(){}},onCheckoutBeforeProcessing:function(){return function(){}},onCheckoutValidationBeforeProcessing:function(){return function(){}},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:function(e){},extensionData:{}}),I=function(){return Object(i.useContext)(D)},F=function(e){var t=e.children,r=e.redirectUrl,o=e.isCart,u=void 0!==o&&o;j.redirectUrl=r;var v,g=Object(i.useReducer)(k,j),y=c()(g,2),O=y[0],E=y[1],w=Object(C.b)().setValidationErrors,S=Object(T.a)(),I=S.addErrorNotice,F=S.removeNotices,L=Object(A.a)().dispatchCheckoutEvent,V=O.calculatingCount>0,B=Object(N.c)(),U=B.isSuccessResponse,H=B.isErrorResponse,z=B.isFailResponse,G=B.shouldRetry,q=(v=Object(N.c)().noticeContexts,{checkoutNotices:Object(M.useSelect)((function(e){return e("core/notices").getNotices("wc/checkout")}),[]),expressPaymentNotices:Object(M.useSelect)((function(e){return e("core/notices").getNotices(v.EXPRESS_PAYMENTS)}),[v.EXPRESS_PAYMENTS]),paymentNotices:Object(M.useSelect)((function(e){return e("core/notices").getNotices(v.PAYMENTS)}),[v.PAYMENTS])}),W=q.checkoutNotices,Y=q.paymentNotices,X=q.expressPaymentNotices,K=Object(i.useReducer)(P.b,{}),J=c()(K,2),$=J[0],Q=J[1],Z=Object(i.useRef)($),ee=function(e){return Object(i.useMemo)((function(){return{onCheckoutAfterProcessingWithSuccess:Object(R.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(R.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(R.a)("checkout_validation_before_processing",e)}}),[e])}(Q),te=ee.onCheckoutAfterProcessingWithSuccess,re=ee.onCheckoutAfterProcessingWithError,ne=ee.onCheckoutValidationBeforeProcessing;Object(i.useEffect)((function(){Z.current=$}),[$]);var oe=Object(i.useMemo)((function(){return function(){return l()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),ne.apply(void 0,arguments)}}),[ne]),ce=Object(i.useMemo)((function(){return{resetCheckout:function(){E({type:n.SET_PRISTINE})},setRedirectUrl:function(e){E(m(e))},setHasError:function(e){E(b(e))},incrementCalculating:function(){E({type:n.INCREMENT_CALCULATING})},decrementCalculating:function(){E({type:n.DECREMENT_CALCULATING})},setCustomerId:function(e){var t;E((t=e,{type:n.SET_CUSTOMER_ID,customerId:t}))},setOrderId:function(e){E(function(e){return{type:n.SET_ORDER_ID,orderId:e}}(e))},setOrderNotes:function(e){E(function(e){return{type:n.SET_ORDER_NOTES,orderNotes:e}}(e))},setExtensionData:function(e){E(function(e){return{type:n.SET_EXTENSION_DATA,extensionData:e}}(e))},setAfterProcessing:function(e){var t,r=function(e){var 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((function(e){var r=e.key,n=e.value;t.paymentDetails[r]=Object(_.decodeEntities)(n)}))),"message"in e&&(t.message=Object(_.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t}(e);r.redirectUrl&&E(m(r.redirectUrl)),E((t=r,{type:n.SET_PROCESSING_RESPONSE,data:t})),E({type:n.SET_AFTER_PROCESSING})}}}),[]);Object(i.useEffect)((function(){O.status===p.BEFORE_PROCESSING&&(F("error"),Object(x.a)(Z.current,"checkout_validation_before_processing",{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;I(t),w(r)})),E(d()),E(b())):E({type:n.SET_PROCESSING})})))}),[O.status,w,I,F,E]);var ie=Object(s.a)(O.status),ae=Object(s.a)(O.hasError);Object(i.useEffect)((function(){if((O.status!==ie||O.hasError!==ae)&&O.status===p.AFTER_PROCESSING){var e={redirectUrl:O.redirectUrl,orderId:O.orderId,customerId:O.customerId,orderNotes:O.orderNotes,processingResponse:O.processingResponse};O.hasError?Object(x.b)(Z.current,"checkout_after_processing_with_error",e).then((function(t){var r=function(e){var t=null;return e.forEach((function(e){if((H(e)||z(e))&&e.message){var r=e.messageContext?{context:e.messageContext}:void 0;t=e,I(e.message,r)}})),t}(t);if(null!==r)G(r)?E(d()):E(h(r));else{if(!(W.some((function(e){return"error"===e.status}))||X.some((function(e){return"error"===e.status}))||Y.some((function(e){return"error"===e.status})))){var n,o=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");I(o,{id:"checkout"})}E(d())}})):Object(x.b)(Z.current,"checkout_after_processing_with_success",e).then((function(e){var t=null,r=null;if(e.forEach((function(e){U(e)&&(t=e),(H(e)||z(e))&&(r=e)})),t&&!r)E(h(t));else if(Object(f.b)(r)){if(r.message){var n=r.messageContext?{context:r.messageContext}:void 0;I(r.message,n)}G(r)?E(b(!0)):E(h(r))}else E(h())}))}}),[O.status,O.hasError,O.redirectUrl,O.orderId,O.customerId,O.orderNotes,O.processingResponse,ie,ae,ce,I,H,z,U,G,W,X,Y]);var se={onSubmit:Object(i.useCallback)((function(){L("submit"),E({type:n.SET_BEFORE_PROCESSING})}),[L]),isComplete:O.status===p.COMPLETE,isIdle:O.status===p.IDLE,isCalculating:V,isProcessing:O.status===p.PROCESSING,isBeforeProcessing:O.status===p.BEFORE_PROCESSING,isAfterProcessing:O.status===p.AFTER_PROCESSING,hasError:O.hasError,redirectUrl:O.redirectUrl,onCheckoutBeforeProcessing:oe,onCheckoutValidationBeforeProcessing:ne,onCheckoutAfterProcessingWithSuccess:te,onCheckoutAfterProcessingWithError:re,dispatchActions:ce,isCart:u,orderId:O.orderId,hasOrder:!!O.orderId,customerId:O.customerId,orderNotes:O.orderNotes,shouldCreateAccount:O.shouldCreateAccount,setShouldCreateAccount:function(e){return E((t=e,{type:n.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:O.extensionData};return React.createElement(D.Provider,{value:se},t)}},,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);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&T.some((function(e){return!(!e.code||!Object.values(d).includes(e.code))}))?L({type:_}):L({type:k})}),[T]);var W=Object(a.useMemo)((function(){return{isPristine:F===k,isValid:F===k,hasInvalidAddress:F===_,hasError:F===P||F===_}}),[F]);Object(a.useEffect)((function(){C||0!==x.length&&!W.hasError||Object(y.a)(z.current,"shipping_rates_fail",{hasInvalidAddress:W.hasInvalidAddress,hasError:W.hasError})}),[x,C,W.hasError,W.hasInvalidAddress]),Object(a.useEffect)((function(){!C&&x.length>0&&!W.hasError&&Object(y.a)(z.current,"shipping_rates_success",x)}),[x,C,W.hasError]),Object(a.useEffect)((function(){N||(W.hasError?Object(y.a)(z.current,"shipping_rate_select_fail",{hasError:W.hasError,hasInvalidAddress:W.hasInvalidAddress}):Object(y.a)(z.current,"shipping_rate_select_success",q.current))}),[N,W.hasError,W.hasInvalidAddress]);var Y=function(e){for(var t=1;t=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.warning},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,c=[],_n=!0,i=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(c.push(n.value),!t||c.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==r.return||r.return()}finally{if(i)throw o}}return c}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){void 0===r&&(r={});var o=r.maxWait,c=Object(n.useRef)(null),i=Object(n.useRef)([]),a=r.leading,s=void 0===r.trailing||r.trailing,u=Object(n.useRef)(!1),l=Object(n.useRef)(null),f=Object(n.useRef)(!1),p=Object(n.useRef)(e);p.current=e;var d=Object(n.useCallback)((function(){clearTimeout(l.current),clearTimeout(c.current),c.current=null,i.current=[],l.current=null,u.current=!1}),[]);Object(n.useEffect)((function(){return f.current=!1,function(){f.current=!0}}),[]);var m=Object(n.useCallback)((function(){for(var e=[],r=0;r0?a/2:u)+(u+a/2>window.innerWidth?window.innerWidth-u:a/2)},f=e.left;"right"===n?f=e.right:"middle"!==c&&(f=u);var p=e.right;"left"===n?p=e.left:"middle"!==c&&(p=u);var d,m={popoverLeft:f,contentWidth:f-a>0?a:f},h={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},b=r,v=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 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,i){var y=i.getBoundingClientRect();d=Math.min(d,y.right-a)}return{xAxis:b,popoverLeft:d,contentWidth:v}}function k(e,t,r,n,o,c,i){var a=t.height;if(o){var s=(Object(v.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)},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=r,m=null;if(!o)if("middle"===r&&l.contentHeight===a)d="middle";else if("top"===r&&f.contentHeight===a)d="top";else if("bottom"===r&&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 _=r(30),P=r(12);var R=Object(c.createContext)({focusHistory:[]}),x=R.Provider,C=R.Consumer;x.displayName="FocusReturnProvider",C.displayName="FocusReturnConsumer",c.Component;var T=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(d.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(f.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)(C,null,(function(r){return Object(c.createElement)(t,{childProps:e,focus:r})}))}}}),"withFocusReturn");var A=Object(y.createHigherOrderComponent)((function(e){return function(t){Object(d.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(f.a)(this,i),(e=o.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(P.a)(e)),e}return Object(p.a)(i,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===g.TAB){var t=v.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"),M=r(89);var N=function(e){Object(d.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(f.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),D=Object(M.a)(N);function I(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(d.a)(r,e);var t=I(r);function r(){return Object(f.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(48);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 fe=function(e){var t=e.headerTitle,r=e.onClose,i=e.onKeyDown,s=e.children,u=e.className,f=e.noArrow,p=void 0===f||f,d=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,P=e.shouldAnchorIncludePadding,R=e.anchorRect,x=e.getAnchorRect,C=e.expandOnMobile,T=e.animate,A=void 0===T||T,M=e.onClickOutside,N=e.onFocusOutside,I=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)(),X=Object(y.useViewportMatch)("medium","<"),K=Object(c.useState)(),J=Object(b.a)(K,2),$=J[0],Q=J[1],Z=z(B),ee=C&&X,re=Object(y.useResizeObserver)(),ne=Object(b.a)(re,2),oe=ne[0],fe=ne[1];p=ee||p,Object(c.useLayoutEffect)((function(){if(ee)return le(Y.current,"is-without-arrow",p),le(Y.current,"is-alternate",d),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(v.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 f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:ae(p,f)}}(q,R,x,_,P);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],f=void 0===l?"center":l,p=s[2],d=k(e,t,u,p,n,o,c),m=S(e,t,f,p,n,d.yAxis,i);return w(w({},m),d)}(e,fe.height?fe:W.current.getBoundingClientRect(),h,I,Y.current,i,t),u=s.popoverTop,l=s.popoverLeft,f=s.xAxis,m=s.yAxis,g=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"===f&&"middle"===m),le(Y.current,"is-alternate",d),se(Y.current,"data-x-axis",f),se(Y.current,"data-y-axis",m),ue(W.current,"maxHeight","number"==typeof g?g+"px":""),ue(W.current,"maxWidth","number"==typeof y?y+"px":""),Q(({left:"right",right:"left"}[f]||"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,x,_,P,h,fe,I,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=v.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===g.ESCAPE&&r&&(e.stopPropagation(),r()),i&&i(e)},de=Object(c.createElement)(D,{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(c.createElement)(ce,{type:A&&$?"appear":null,options:{origin:$}},(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":d})},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)(ge,{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&&(de=Object(c.createElement)(ie,null,de)),Z.ref&&(de=Object(c.createElement)(te,{name:B},de)),_||R?de:Object(c.createElement)("span",{ref:q},de)};fe.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=fe,de=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(d.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(f.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)(de,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(c.Component),he=r(86);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}}}}(ve);try{for(D.s();!(N=D.n()).done;)x[N.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){D.e(e)}finally{D.f()}}var I=!T&&(w&&_||k||!!_&&(!P||Object(s.isArray)(P)&&!P.length)&&!1!==w),F=Object(c.createElement)(A,Object(n.a)({},M,x,{className:C,"aria-label":x["aria-label"]||_,ref:t}),E&&Object(c.createElement)(he.a,{icon:E,size:j}),P);return I?Object(c.createElement)(me,{text:_,shortcut:k,position:S},F):F}))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(4),o=r.n(n),c=r(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){t((function(){throw e}))}),[])}},,,function(e,t,r){"use strict";var n=r(22),o=r(13),c=r(18),i=r(0),a=r(44),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;t2&&void 0!==arguments[2]?arguments[2]:"",n=r&&void 0!==m[r]?m[r]:{};return e.map((function(e){var r=a.defaultAddressFields[e]||{},o=n[e]||{},c=t[e]||{};return f(f(f({key:e},r),o),c)})).sort((function(e,t){return e.index-t.index}))}},function(e,t,r){"use strict";function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";var n=r(13),o=r(14),c=r(15),i=r(12),a=r(16),s=r(17),u=r(10),l=r(0),f=r(6),p=r(25);var d=["button","submit"];t.a=Object(p.createHigherOrderComponent)((function(e){return function(t){Object(a.a)(h,t);var r,p,m=(r=h,p=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(u.a)(r);if(p){var n=Object(u.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(s.a)(this,e)});function h(){var e;return Object(o.a)(this,h),(e=m.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(c.a)(h,[{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,r=e.target;Object(f.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(f.includes)(d,e.type)}return!1}(r)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(l.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(l.createElement)(e,Object(n.a)({ref:this.bindNode},this.props)))}}]),h}(l.Component)}),"withFocusOutside")},function(e,t,r){var n=r(62);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return m}));var n=r(20),o=r.n(n),c=r(5),i=r.n(c),a=r(0),s=r(46);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;t0&&Array.prototype.filter.call(a,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),p({Block:r,containers:a,getProps:n,getErrorBoundaryProps:o}),Array.prototype.forEach.call(s,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,c,i,a;n=(r=l(l({},e),{},{wrapper:t})).Block,o=r.getProps,c=r.getErrorBoundaryProps,i=r.selector,a=r.wrapper.querySelectorAll(i),p({Block:n,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){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,f=-1;function p(){l&&s&&(l=!1,s.length?u=s.concat(u):f=-1,u.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=u.length;t;){for(s=u,u=[];++f1)for(var r=1;r2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(i.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e}}},l={},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,r=t.type,o=t.eventType,i=t.id,a=t.callback,u=t.priority,f=e.hasOwnProperty(o)?new Map(e[o]):new Map;switch(r){case n.ADD_EVENT_CALLBACK:return f.set(i,{priority:u,callback:a}),s(s({},e),{},c()({},o,f));case n.REMOVE_EVENT_CALLBACK:return f.delete(i),s(s({},e),{},c()({},o,f))}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return E})),r.d(t,"a",(function(){return j}));var n=r(5),o=r.n(n),c=r(4),i=r.n(c),a=(r(8),r(0)),s=r(11),u=r(52),l=r(36),f=r(20),p=r.n(f),d=r(7),m=r.n(d),h=r(152),b=(r(105),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""}),v=function(e){var t=e.className,r=e.notices,n=e.removeNotice,o=r.filter((function(e){return"snackbar"!==e.type}));if(!o.length)return null;var c=m()(t,"wc-block-components-notices");return React.createElement("div",{className:c},o.map((function(e){return React.createElement(h.a,p()({key:"store-notice-"+e.id},e,{className:m()("wc-block-components-notices__notice",b(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))};function g(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 y(e){for(var t=1;t0&&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]:{};m(e,t,y(y({},r),{},{context:r.context||p})),w("store-notice-create",{status:e,content:t,options:r})}),[m,w,p]),_=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;h(e,t)}),[h,p]),P={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(p)}}),[p]).notices,createNotice:k,removeNotice:_,context:p,setIsSuppressed:j},R=E?null:React.createElement(v,{className:n,notices:P.notices,removeNotice:P.removeNotice,isEditor:S});return React.createElement(O.Provider,{value:P},c&&R,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(4),o=r.n(n),c=function(e){return e.reduce((function(e,t){var r=o()(t,2),n=r[0],c=r[1];return e[n]=c,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 f})),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 h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return v})),r.d(t,"b",(function(){return g}));var n,o=r(2),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),f=o.STORE_PAGES.privacy.permalink,p=(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"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),v=Object(o.getSetting)("shippingStates",{}),g=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 c})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return a}));var n,o=window.CustomEvent||null,c=function(e,t){var r=t.bubbles,n=void 0!==r&&r,c=t.cancelable,i=void 0!==c&&c,a=t.element,s=t.detail,u=void 0===s?{}:s;if(o){a||(a=document.body);var l=new o(e,{bubbles:n,cancelable:i,detail:u});a.dispatchEvent(l)}},i=function(){n&&clearTimeout(n),n=setTimeout((function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})}),50)},a=function(e,t){var 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 function(){};var o=function(){c(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},function(e,t,r){"use strict";var n=r(0),o=r(44),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(132),o=r(113),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 f={};for(t in e)n=e[t],s(t)?f[t]=n:(r=t.toLowerCase(),u.call(i,r)?f[(l=i[r]).propertyName]=!!(l.hasBooleanValue||l.hasOverloadedBooleanValue&&!n)||n:u.call(a,t)?f[(l=a[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(f[t]=n));return c(e.style,f),f}},function(e,t,r){var n=r(3),o=r(136).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(142).CASE_SENSITIVE_TAG_NAMES,c={},i=0,a=o.length;i=0&&t<=window.innerHeight||e.scrollIntoView()}});t.a=function(e){return function(t){var r=Object(c.useRef)(null);return React.createElement(React.Fragment,null,React.createElement("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),React.createElement(e,o()({},t,{scrollToTop:function(e){var t,n;null!==r.current&&(t=r.current,n=(e||{}).focusableSelector,window&&Number.isFinite(window.innerHeight)&&(n?function(e,t){var r,n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){var o=n[0];i(o),null==o||o.focus()}else i(e)}(t,n):i(t)))}})))}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(3),o=r(80);function c(e,t){return e===t}function i(e,t,r){var i=r&&r.equalityFn?r.equalityFn:c,a=Object(n.useState)(e),s=a[0],u=a[1],l=Object(o.a)(Object(n.useCallback)((function(e){return u(e)}),[]),t,r),f=l[0],p=l[1],d=l[2],m=Object(n.useRef)(e);return Object(n.useEffect)((function(){i(m.current,e)||(f(e),m.current=e)}),[e,f,i]),[s,p,d]}},,function(e,t,r){var n=r(131),o=r(112),c=r(140),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(20)),c=n(r(73)),i=r(3),a=n(i),s=n(r(160)),u=n(r(27)),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 f(){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 d(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=d.startTime+u.duration;else if(u.decay)b=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-b)<.1)&&(h=b);else{f=void 0!==d.lastTime?d.lastTime:t,y=void 0!==d.lastVelocity?d.lastVelocity:u.initialVelocity,t>f+64&&(f=t);for(var O=Math.floor(t-f),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}(g),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()},f=l.arr(s.to)||l.fun(s.to);a?setTimeout((function(){r===t.guid&&(f?t.runAsync(s,u):t.diff(s).start(u))}),a):f?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),I||(I=!0,S(T||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 J=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof g||(t=b.transform(t)),r.payload=t,r}return s(t,e),t}(O),$={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 fe(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 de(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:$.hasOwnProperty(t)?$[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(fe(r[1]),de(r[2]),de(r[3])))>>>0:(r=ne.exec(t))?(ue(fe(r[1]),de(r[2]),de(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,ve=new RegExp("("+Object.keys($).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},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).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}),ge);var Ee={};M((function(e){return new J(e)})),x("div"),_((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ve,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($),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("--"),f=Oe(u,r[u],l);"float"===u&&(u="cssFloat"),l?e.style.setProperty(u,f):e.style[u]=f}for(var p in a){var d=s?p:Ee[p]||(Ee[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(d)&&e.setAttribute(d,a[p])}}),(function(e){return e}));var je,we,Se=(je=function(e){return i.forwardRef((function(t,r){var n=f(),s=i.useRef(!0),u=i.useRef(null),p=i.useRef(null),d=i.useCallback((function(e){var t=u.current;u.current=new D(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)})),d(t);var m,h=u.current.getValue(),v=(h.scrollTop,h.scrollLeft,c(h,["scrollTop","scrollLeft"])),g=(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({},v,{ref:g}))}))},void 0===(we=!1)&&(we=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=we?t[0].toLowerCase()+t.substring(1):t;return e[r]=je(r),e}),je)}),ke=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=ke,t.a=ke,t.interpolate=function(e,t,r){return e&&new B(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],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],f=s[1],p=s[2],d=i.useMemo((function(){return function(e){return f((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&&d(t)})),i.useEffect((function(){r.current=!0}),[]),n?[u,d,p]: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),p=void 0!==l&&l,d=(a.enter,a.leave,a.update,a.onDestroyed),h=(a.keys,a.items,a.onFrame),b=a.onRest,v=a.onStart,g=a.ref,y=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),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=X(t),s=a.items,u=a.keys,l=a.initial,f=a.from,p=a.enter,d=a.leave,h=a.update,b=a.trail,v=void 0===b?0:b,g=a.unique,y=a.config,O=a.order,E=void 0===O?["enter","leave","update"]:O,j=X(n),w=j.keys,S=j.items,k=o({},i.current),_=[].concat(i.deleted),P=Object.keys(k),R=new Set(P),x=new Set(u),C=u.filter((function(e){return!R.has(e)})),T=i.transitions.filter((function(e){return!e.destroyed&&!x.has(e.originalKey)})).map((function(e){return e.originalKey})),A=u.filter((function(e){return R.has(e)})),M=-v;E.length;)switch(E.shift()){case"enter":C.forEach((function(e,t){g&&_.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:g?String(e):W++,item:o,trail:M+=v,config:m(y,o,c),from:m(r&&void 0!==l?l||{}:f,o),to:m(p,o)}}));break;case"leave":T.forEach((function(e){var t=w.indexOf(e),r=S[t];_.unshift(o({},k[e],{slot:"leave",destroyed:!0,left:w[Math.max(0,t-1)],right:w[Math.min(w.length,t+1)],trail:M+=v,config:m(y,r,"leave"),to:m(d,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:M+=v,config:m(y,r,"update"),to:m(h,r)})}))}var N=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=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({},i,{changed:C.length||T.length||A.length,first:r&&0===C.length,transitions:N,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),f=o({},y,{to:n,from:r,config:c,ref:g,onRest:function(r){j.current.mounted&&(e.destroyed&&(g||u||K(j,a),d&&d(s)),!Array.from(j.current.instances).some((function(e){return!e[1].idle}))&&(g||u)&&j.current.deleted.length>0&&K(j),b&&b(s,t,r))},onStart:v&&function(){return v(s,t)},onFrame:h&&function(e){return h(s,t,e)},delay:i,reset:p&&"enter"===t});l.update(f),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(5),o=r.n(n),c=r(26),i=r.n(c),a=r(0),s=["srcElement","size"];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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,s);return Object(a.isValidElement)(t)?Object(a.cloneElement)(t,function(e){for(var t=1;t1&&(s=p(s,{key:s.key||g})),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=g),h.push(d(c.name,u,l))}else v?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(133),o=r(134),c=r(135),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 f(e,t){return(e&t)===t}function p(e,t,r){var n,o,c,p=e.Properties,d=e.DOMAttributeNames;for(o in p)n=d[o]||(r?o:o.toLowerCase()),c=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:f(c,i),hasBooleanValue:f(c,a),hasNumericValue:f(c,s),hasPositiveNumericValue:f(c,u),hasOverloadedBooleanValue:f(c,l)}}var d={};p(n,d);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:d,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(137)),c=r(139);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(138);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(114),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`")},f=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,d=s?"text/xml":"text/html";l=f=function(e,t){return t&&(e="<"+t+">"+e+""+t+">"),s&&(e=e.replace(a,"<$1$2$3/>")),p.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(f)return f(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=f(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(6),c=r(7),i=r.n(c),a=r(34),s=r(1),u=(r(76),r(81));t.a=Object(n.forwardRef)((function(t,r){var c=t.className,l=t.children,f=t.spokenMessage,p=void 0===f?l:f,d=t.politeness,m=void 0===d?"polite":d,h=t.actions,b=void 0===h?[]:h,v=t.onRemove,g=void 0===v?o.noop:v;!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(){g()}),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:g,tabIndex:"0",role:"button",onKeyPress:g,"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(98))},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(87),c=r(68),i=function(e){var t=e.country,r=void 0===t?"":t,n=e.state,o=void 0===n?"":n,c=e.city,i=void 0===c?"":c,a=e.postcode,s=void 0===a?"":a;return{country:r.trim(),state:o.trim(),city:i.trim(),postcode:s?s.replace(" ","").toUpperCase():""}},a=function(e){var t=e.email,r=void 0===t?"":t;return Object(c.isEmail)(r)?r.trim():""},s=function(e){var t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),c=Object.assign({},e);return r.forEach((function(t){var r=t.key,n=void 0===r?"":r,o=t.hidden;void 0!==o&&o&&function(e,t){return e in t}(n,e)&&(c[n]="")})),c}},function(e,t,r){"use strict";var n=r(0),o=r(6),c=r(7),i=r.n(c),a=r(1),s=r(34),u=r(108),l=r(81);t.a=function(e){var t=e.className,r=e.status,c=void 0===r?"info":r,f=e.children,p=e.spokenMessage,d=void 0===p?f:p,m=e.onRemove,h=void 0===m?o.noop:m,b=e.isDismissible,v=void 0===b||b,g=e.actions,y=void 0===g?[]:g,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])}(d,E);var w=i()(t,"components-notice","is-"+c,{"is-dismissible":v});return j&&(f=Object(n.createElement)(n.RawHTML,null,f)),Object(n.createElement)("div",{className:w},Object(n.createElement)("div",{className:"components-notice__content"},f,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,f=e.url;return Object(n.createElement)(l.a,{key:t,href:f,isPrimary:c,isSecondary:!s&&!f,isLink:!s&&!!f,onClick:f?void 0:u,className:i()("components-notice__action",r)},o)}))),v&&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(67);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,r){"use strict";r.d(t,"b",(function(){return Z})),r.d(t,"a",(function(){return ee}));var n,o,c=r(42),i=r.n(c),a=r(4),s=r.n(a),u=r(0);!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={}));var l={currentStatus:n.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},f={setPaymentStatus:function(){return{pristine:function(){},started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(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:function(){},activeSavedToken:"",setActiveSavedToken:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){return function(){return function(){}}},setExpressPaymentError:function(){},isExpressPaymentMethodActive:!1,setShouldSavePayment:function(){},shouldSavePayment:!1},p=r(5),d=r.n(p),m=r(21),h=r.n(m);function b(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 v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,r=t.type,c=t.paymentMethodData,i=t.shouldSavePaymentMethod,a=void 0!==i&&i,s=t.errorMessage,u=void 0===s?"":s,f=t.paymentMethods,p=void 0===f?{}:f;switch(r){case n.STARTED:return v(v({},e),{},{currentStatus:n.STARTED,paymentMethodData:c||e.paymentMethodData,hasSavedToken:g(c||e.paymentMethodData)});case n.ERROR:return e.currentStatus!==n.ERROR?v(v({},e),{},{currentStatus:n.ERROR,errorMessage:u||e.errorMessage}):e;case n.FAILED:return e.currentStatus!==n.FAILED?v(v({},e),{},{currentStatus:n.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:u||e.errorMessage}):e;case n.SUCCESS:return e.currentStatus!==n.SUCCESS?v(v({},e),{},{currentStatus:n.SUCCESS,paymentMethodData:c||e.paymentMethodData,hasSavedToken:g(c||e.paymentMethodData)}):e;case n.PROCESSING:return e.currentStatus!==n.PROCESSING?v(v({},e),{},{currentStatus:n.PROCESSING,errorMessage:""}):e;case n.COMPLETE:return e.currentStatus!==n.COMPLETE?v(v({},e),{},{currentStatus:n.COMPLETE}):e;case n.PRISTINE:return v(v({},l),{},{currentStatus:n.PRISTINE,paymentMethods:v({},e.paymentMethods),expressPaymentMethods:v({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case o.SET_REGISTERED_PAYMENT_METHODS:return v(v({},e),{},{paymentMethods:p});case o.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return v(v({},e),{},{expressPaymentMethods:p});case o.SET_SHOULD_SAVE_PAYMENT_METHOD:return v(v({},e),{},{shouldSavePaymentMethod:a})}},O=r(35),E=r.n(O),j=r(24),w=r.n(j),S=r(1),k=r(31),_=r(45),P=r(2),R=r(80),x=r(36),C=r(65),T=r(57),A=r(33),M=r(51),N=r(43);function D(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 I(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:void 0;r&&re(r),te(B({errorMessage:e||"",paymentMethodData:t||{}}))},success:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;t&&re(t),void 0!==h()(r)&&null!=r&&r.address&&ne(r.address),te(U({paymentMethodData:e}))}}}),[te,re,ne])}),se=ae.dispatchActions,ue=ae.setPaymentStatus,le=function(e){var t=Object(k.getPaymentMethods)(),r=Object(N.c)().noticeContexts,n=new Set([].concat(i()(Object(P.getSetting)("paymentGatewaySortOrder",[])),i()(Object.keys(t))));return F(e,t,Array.from(n),r.PAYMENTS)}(se.setRegisteredPaymentMethods),fe=function(e){var t=Object(k.getExpressPaymentMethods)(),r=Object(N.c)().noticeContexts;return F(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)}(se.setRegisteredExpressPaymentMethods),pe=function(){var e=Object(W.a)().dispatchCheckoutEvent,t=Object(u.useState)(""),r=s()(t,2),n=r[0],o=r[1],c=Object(u.useState)(""),i=s()(c,2),a=i[0],l=i[1];return Object(u.useEffect)((function(){e("set-active-payment-method",{activePaymentMethod:n})}),[e,n]),{activePaymentMethod:n,activeSavedToken:a,setActivePaymentMethod:o,setActiveSavedToken:l}}(),de=pe.activePaymentMethod,me=pe.activeSavedToken,he=pe.setActivePaymentMethod,be=pe.setActiveSavedToken,ve=Object(u.useMemo)((function(){return m?b("previewSavedPaymentMethods"):le?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};var t=Object(P.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach((function(r){var o=t[r].filter((function(t){var r,n=t.method.gateway;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)}));o.length&&(n[r]=o)})),n}(ie.paymentMethods):{}}),[m,b,le,ie.paymentMethods]),ge=Object(u.useCallback)((function(e){e?O(e,{id:"wc-express-payment-error",context:R.EXPRESS_PAYMENTS}):E("wc-express-payment-error",R.EXPRESS_PAYMENTS)}),[O,R.EXPRESS_PAYMENTS,E]),ye=Object.keys(ie.expressPaymentMethods).includes(de),Oe=Object(u.useMemo)((function(){return{isPristine:ie.currentStatus===n.PRISTINE,isStarted:ie.currentStatus===n.STARTED,isProcessing:ie.currentStatus===n.PROCESSING,isFinished:[n.ERROR,n.FAILED,n.SUCCESS].includes(ie.currentStatus),hasError:ie.currentStatus===n.ERROR,hasFailed:ie.currentStatus===n.FAILED,isSuccessful:ie.currentStatus===n.SUCCESS,isDoingExpressPayment:ie.currentStatus!==n.PRISTINE&&ye}}),[ie.currentStatus,ye]);Object(u.useEffect)((function(){var e=Object.keys(ie.paymentMethods),t=[].concat(i()(e),i()(Object.keys(ie.expressPaymentMethods)));le&&e.length&&he((function(e){return e&&t.includes(e)?e:(ue().pristine(),Object.keys(ie.paymentMethods)[0])}))}),[le,ie.paymentMethods,ie.expressPaymentMethods,he,ue]),Object(u.useEffect)((function(){!c||p||f||Oe.isFinished||ue().processing()}),[c,p,f,Oe.isFinished,ue]),Object(u.useEffect)((function(){a&&!Oe.isSuccessful&&ue().pristine()}),[a,Oe.isSuccessful,ue]),Object(u.useEffect)((function(){p&&Oe.isSuccessful&&!ie.hasSavedToken&&ue().pristine()}),[p,Oe.isSuccessful,ie.hasSavedToken,ue]),Object(u.useEffect)((function(){Oe.isProcessing&&(E("wc-payment-error",R.PAYMENTS),Object(J.b)(ee.current,"payment_processing",{}).then((function(e){var t,r,n,o,c,i,a,s;if(e.forEach((function(e){w(e)&&(t=e),(S(e)||_(e))&&(r=e)})),t&&!r)ue().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&&_(r)){var u,l,f,p,d,m;r.message&&r.message.length&&O(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||R.PAYMENTS}),ue().failed(null===(u=r)||void 0===u?void 0:u.message,null===(l=r)||void 0===l||null===(f=l.meta)||void 0===f?void 0:f.paymentMethodData,null===(p=r)||void 0===p||null===(d=p.meta)||void 0===d?void 0:d.billingData)}else if(r){var h,b;r.message&&r.message.length&&O(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=r)||void 0===b?void 0:b.messageContext)||R.PAYMENTS}),ue().error(r.message),v(null===(h=r)||void 0===h?void 0:h.validationErrors)}else ue().success()})))}),[Oe.isProcessing,v,ue,E,R.PAYMENTS,w,_,S,O]);var Ee={setPaymentStatus:ue,currentStatus:Oe,paymentStatuses:n,paymentMethodData:ie.paymentMethodData,errorMessage:ie.errorMessage,activePaymentMethod:de,setActivePaymentMethod:he,activeSavedToken:me,setActiveSavedToken:be,onPaymentProcessing:Z,customerPaymentMethods:ve,paymentMethods:ie.paymentMethods,expressPaymentMethods:ie.expressPaymentMethods,paymentMethodsInitialized:le,expressPaymentMethodsInitialized:fe,setExpressPaymentError:ge,isExpressPaymentMethodActive:ye,shouldSavePayment:ie.shouldSavePaymentMethod,setShouldSavePayment:se.setShouldSavePayment};return React.createElement(Q.Provider,{value:Ee},r)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return A}));var n=r(148),o=r(2),c=r(46),i=r(164),a=r(65),s=r(57),u=r(54),l=r(35),f=r.n(l),p=r(5),d=r.n(p),m=r(4),h=r.n(m),b=r(24),v=r.n(b),g=r(1),y=r(59),O=r.n(y),E=r(0),j=r(151),w=r(116),S=function(e,t,r){var n=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),o="wc-".concat(r,"-new-payment-method");return n.push({key:o,value:t}),n},k=function(e,t){O.a.setNonce&&"function"==typeof O.a.setNonce&&O.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))},_=r(171),P=r(33),R=r(51);function x(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 C(e){for(var t=1;t0,getValidationErrorId:u};return React.createElement(g.Provider,{value:E},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),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:function(){return null},accountControls:function(){return null}}),function(){return Object(n.useContext)(o)})},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(99),o=function(e,t){return function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=n.a.addEventCallback(e,r,o);return t(c),function(){t(n.a.removeEventCallback(e,c.id))}}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return m}));var n=r(21),o=r.n(n),c=r(35),i=r.n(c),a=r(24),s=r.n(a),u=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},l=r(43);function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return p(e,void 0);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)?p(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=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=r.call(e)},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}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rTry reloading the page. If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:React.createElement("button",{className:"wc-block-link-button",onClick:oe})}),showErrorMessage:z.CURRENT_USER_IS_ADMIN},React.createElement(B.a,{context:"wc/checkout"},React.createElement(L.a,{context:"wc/checkout"},React.createElement(v.a,null,React.createElement(E.SlotFillProvider,null,React.createElement(V.a,null,React.createElement(H.a,{className:I()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},React.createElement(ie,{attributes:t},r),React.createElement(ae,{scrollToTop:n}))))))))})),ue={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(z.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(z.getSetting)("displayCartPricesIncludingTax",!1)}},le=["extensions","receiveCart"];Object(y.a)({Block:se,blockName:"woocommerce/checkout",selector:".wp-block-woocommerce-checkout",getProps:function(e){return{attributes:Object(i.a)(ue,e instanceof HTMLElement?e.dataset:{})}},blockMap:Object(g.getRegisteredBlockComponents)("woocommerce/checkout"),blockWrapper:function(e){var t,r,n,i,s,l,d,h=e.children,g=Object(a.a)(),y=g.extensions,O=(g.receiveCart,o()(g,le)),E=function(){var e=Object(p.b)(),t=e.dispatchActions,r=e.extensionData,n=Object(c.useRef)(r);Object(c.useEffect)((function(){f()(r,n.current)||(n.current=r)}),[r]);var o=Object(c.useCallback)((function(e,r,o){var c=n.current[e]||{};t.setExtensionData(m(m({},n.current),{},u()({},e,m(m({},c),{},u()({},r,o)))))}),[t]);return{extensionData:n.current,setExtensionData:o}}(),j=(r=(t=Object(v.b)()).hasValidationErrors,n=t.getValidationError,i=t.clearValidationError,s=t.hideValidationError,l=t.setValidationErrors,d="extensions-errors",{hasValidationErrors:r,getValidationError:Object(c.useCallback)((function(e){return n("".concat(d,"-").concat(e))}),[n]),clearValidationError:Object(c.useCallback)((function(e){return i("".concat(d,"-").concat(e))}),[i]),hideValidationError:Object(c.useCallback)((function(e){return s("".concat(d,"-").concat(e))}),[s]),setValidationErrors:Object(c.useCallback)((function(e){return l(Object.fromEntries(Object.entries(e).map((function(e){var t=b()(e,2),r=t[0],n=t[1];return["".concat(d,"-").concat(r),n]}))))}),[l])});return c.Children.map(h,(function(e){if(Object(c.isValidElement)(e)){var t={extensions:y,cart:O,checkoutExtensionData:E,validation:j};return Object(c.cloneElement)(e,t)}return e}))}})},,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return C})),r.d(t,"a",(function(){return T}));var n=r(5),o=r.n(n),c=r(4),i=r.n(c),a=(r(8),r(0)),s=r(11),u=r(13),l=r(24),f=r.n(l);function p(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 d(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var c=e.apply(t,r);function i(e){p(c,n,o,i,a,"next",e)}function a(e){p(c,n,o,i,a,"throw",e)}i(void 0)}))}}var m=r(23),h=r(7),b=r.n(h),v=r(6),g=r(123),y=r(25),O=r(147),E=function(e){var t=e.notices,r=e.className,n=e.children,o=e.onRemove,c=void 0===o?v.noop:o,i=Object(y.useReducedMotion)(),s=Object(a.useState)((function(){return new WeakMap})),l=Object(m.a)(s,1)[0],p=Object(g.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=d(f.a.mark((function t(r){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r({opacity:1,height:l.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=d(f.a.mark((function e(t){return f.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:i});r=b()("components-snackbar-list",r);var h=function(e){return function(){return c(e.id)}};return Object(a.createElement)("div",{className:r},n,p.map((function(e){var t=e.item,r=e.key,n=e.props;return Object(a.createElement)(g.animated.div,{key:r,style:n},Object(a.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&l.set(t,e)}},Object(a.createElement)(O.a,Object(u.a)({},Object(v.omit)(t,["content"]),{onRemove:h(t)}),t.content)))})))},j=r(28),w={},S=function(e){var t=e.className,r=e.notices,n=e.removeNotice;if(e.isEditor)return null;var o=r.filter((function(e){return"snackbar"===e.type})),c=o.length>0?o.reduce((function(e,t){return e[t.content]=!0,e}),{}):w,i=Object(j.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:c}),a=o.filter((function(e){return!0===i[e.content]})),s=b()(t,"wc-block-components-notices__snackbar");return React.createElement(E,{notices:a,className:s,onRemove:n})},k=r(52),_=r(36);function P(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 R(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c("default",e,R(R({},t),{},{type:"snackbar",context:t.context||n})),m("store-notice-create",{status:"default",content:e,options:t})}),[c,m,n]),v=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;u(e,t)}),[u,n]),g={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(n)}}),[n]).notices,createSnackbarNotice:b,removeSnackbarNotice:v,context:n,setIsSuppressed:d},y=p?null:React.createElement(S,{notices:g.notices,removeNotice:g.removeSnackbarNotice,isEditor:h});return React.createElement(x.Provider,{value:g},t,y)}},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return f}));var n=r(4),o=r.n(n),c=(r(8),r(0)),i=r(25),a=r(7),s=r.n(a),u=Object(c.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=function(){return Object(c.useContext)(u)},f=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,c=function(){var e=Object(i.useResizeObserver)(),t=o()(e,2),r=t[0],n=t[1].width,c="";return n>700?c="is-large":n>520?c="is-medium":n>400?c="is-small":n&&(c="is-mobile"),[r,c]}(),a=o()(c,2),l=a[0],f=a[1],p={hasContainerWidth:""!==f,containerClassName:f,isMobile:"is-mobile"===f,isSmall:"is-small"===f,isMedium:"is-medium"===f,isLarge:"is-large"===f};return React.createElement(u.Provider,{value:p},React.createElement("div",{className:s()(n,f)},l,t))}},,,,,,,,,function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=(r(8),r(261));r(216),t.a=function(e){var t=e.children,r=e.className;return React.createElement(c.a,{className:o()("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..62a65ef746f
--- /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' => 'deea0254fd5dbafeea2b6528d62cc4c3');
\ No newline at end of file
diff --git a/build/checkout.js b/build/checkout.js
new file mode 100644
index 00000000000..47578aabb1f
--- /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,a,s=t[0],i=t[1],l=t[2],p=0,d=[];p0&&x.some((function(e){return!(!e.code||!Object.values(b).includes(e.code))}))?L({type:S}):L({type:k})}),[x]);var Y=Object(s.useMemo)((function(){return{isPristine:B===k,isValid:B===k,hasInvalidAddress:B===S,hasError:B===C||B===S}}),[B]);Object(s.useEffect)((function(){R||0!==N.length&&!Y.hasError||Object(j.a)(H.current,"shipping_rates_fail",{hasInvalidAddress:Y.hasInvalidAddress,hasError:Y.hasError})}),[N,R,Y.hasError,Y.hasInvalidAddress]),Object(s.useEffect)((function(){!R&&N.length>0&&!Y.hasError&&Object(j.a)(H.current,"shipping_rates_success",N)}),[N,R,Y.hasError]),Object(s.useEffect)((function(){I||(Y.hasError?Object(j.a)(H.current,"shipping_rate_select_fail",{hasError:Y.hasError,hasInvalidAddress:Y.hasInvalidAddress}):Object(j.a)(H.current,"shipping_rate_select_success",q.current))}),[I,Y.hasError,Y.hasInvalidAddress]);var W=function(e){for(var t=1;t2)return Object(r.registerBlockType)(e,t)},a=function(e,t){if(c.n>1)return Object(r.registerBlockType)(e,t)},s=function(){return c.n>2},i=function(){return c.n>1}},117: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 a}));var r=function(e){return"number"==typeof e},c=function(e){return"string"==typeof e},o=function(e){return!function(e){return 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.blockEditor},127:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(8),c=n.n(r),o=n(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return Object(o.useCallback)((function(e){t((function(){throw e}))}),[])}},133:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(8),a=n.n(o),s=n(4),i=n(1),l=n(117);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 p(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"",r=n&&void 0!==m[n]?m[n]:{};return e.map((function(e){var n=s.defaultAddressFields[e]||{},c=r[e]||{},o=t[e]||{};return p(p(p({key:e},n),c),o)})).sort((function(e,t){return e.index-t.index}))}},134:function(e,t,n){"use strict";var r=n(0);n(223),t.a=function(){return Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}},135:function(e,t){e.exports=window.wp.wordcount},14:function(e,t){e.exports=window.wp.data},140:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(0),a=n(1),s=n(59),i=n(6),l=n.n(i),u=(n(2),n(50)),p=(n(220),function(e){var t=e.currency,n=e.maxPrice,r=e.minPrice,c=e.priceClassName,i=e.priceStyle;return Object(o.createElement)(o.Fragment,null,Object(o.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(u.formatPrice)(r),Object(u.formatPrice)(n))),Object(o.createElement)("span",{"aria-hidden":!0},Object(o.createElement)(s.a,{className:l()("wc-block-components-product-price__value",c),currency:t,value:r,style:i})," — ",Object(o.createElement)(s.a,{className:l()("wc-block-components-product-price__value",c),currency:t,value:n,style:i})))}),d=function(e){var t=e.currency,n=e.regularPriceClassName,r=e.regularPriceStyle,c=e.regularPrice,i=e.priceClassName,u=e.priceStyle,p=e.price;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(s.a,{currency:t,renderText:function(e){return Object(o.createElement)("del",{className:l()("wc-block-components-product-price__regular",n),style:r},e)},value:c}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(s.a,{currency:t,renderText:function(e){return Object(o.createElement)("ins",{className:l()("wc-block-components-product-price__value","is-discounted",i),style:u},e)},value:p}))};t.a=function(e){var t=e.align,n=e.className,r=e.currency,a=e.format,i=void 0===a?"":a,u=e.maxPrice,b=void 0===u?null:u,m=e.minPrice,f=void 0===m?null:m,O=e.price,g=void 0===O?null:O,h=e.priceClassName,j=e.priceStyle,v=e.regularPrice,y=e.regularPriceClassName,E=e.regularPriceStyle,_=l()(n,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));i.includes("")||(i="",console.error("Price formats need to include the `` tag."));var w=v&&g!==v,k=Object(o.createElement)("span",{className:l()("wc-block-components-product-price__value",h)});return w?k=Object(o.createElement)(d,{currency:r,price:g,priceClassName:h,priceStyle:j,regularPrice:v,regularPriceClassName:y,regularPriceStyle:E}):null!==f&&null!==b?k=Object(o.createElement)(p,{currency:r,maxPrice:b,minPrice:f,priceClassName:h,priceStyle:j}):null!==g&&(k=Object(o.createElement)(s.a,{className:l()("wc-block-components-product-price__value",h),currency:r,value:g,style:j})),Object(o.createElement)("span",{className:_},Object(o.createInterpolateElement)(i,{price:k}))}},142:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return p}));var r,c=n(5),o=n.n(c),a=n(7);function s(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 i(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(a.uniqueId)(),type:r.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:n}},removeEventCallback:function(e,t){return{id:t,type:r.REMOVE_EVENT_CALLBACK,eventType:e}}},u={},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments.length>1?arguments[1]:void 0,n=t.type,c=t.eventType,a=t.id,s=t.callback,l=t.priority,p=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(n){case r.ADD_EVENT_CALLBACK:return p.set(a,{priority:l,callback:s}),i(i({},e),{},o()({},c,p));case r.REMOVE_EVENT_CALLBACK:return p.delete(a),i(i({},e),{},o()({},c,p))}}},143:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(11);function c(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},144:function(e,t,n){"use strict";var r=n(0),c=n(6),o=n.n(c);n(334),t.a=function(e){var t=e.children,n=e.className;return Object(r.createElement)("div",{className:o()("wc-block-components-product-badge",n)},t)}},148:function(e,t,n){"use strict";n.d(t,"b",(function(){return j})),n.d(t,"a",(function(){return v}));var r=n(43),c=n.n(r),o=n(5),a=n.n(o),s=n(21),i=n.n(s),l=n(8),u=n.n(l),p=n(0),d=n(7),b=n(36),m=n.n(b);function f(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 O(e){for(var t=1;t0,getValidationErrorId:l};return Object(p.createElement)(h.Provider,{value:y},t)}},15:function(e,t){e.exports=window.wp.apiFetch},150:function(e,t,n){"use strict";var r=n(16),c=n.n(r),o=n(17),a=n.n(o),s=n(13),i=n.n(s),l=n(18),u=n.n(l),p=n(19),d=n.n(p),b=n(9),m=n.n(b),f=n(5),O=n.n(f),g=n(0),h=(n(2),n(11)),j=n(1),v=n(37),y=function(e){var t=e.imageUrl,n=void 0===t?"".concat(v.m,"/block-error.svg"):t,r=e.header,c=void 0===r?Object(j.__)("Oops!","woo-gutenberg-products-block"):r,o=e.text,a=void 0===o?Object(j.__)("There was an error loading the content.","woo-gutenberg-products-block"):o,s=e.errorMessage,i=e.errorMessagePrefix,l=void 0===i?Object(j.__)("Error:","woo-gutenberg-products-block"):i,u=e.button;return Object(g.createElement)("div",{className:"wc-block-error wc-block-components-error"},n&&Object(g.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),Object(g.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(g.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),a&&Object(g.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},a),s&&Object(g.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},l?l+" ":"",s),u&&Object(g.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},u)))};n(244);var E=function(e){u()(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=m()(t);if(n){var c=m()(this).constructor;e=Reflect.construct(r,arguments,c)}else e=r.apply(this,arguments);return d()(this,e)});function o(){var e;c()(this,o);for(var t=arguments.length,n=new Array(t),a=0;a0&&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]:{};m(e,t,j(j({},n),{},{context:n.context||d})),_("store-notice-create",{status:e,content:t,options:n})}),[m,_,d]),S=Object(s.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;f(e,t)}),[f,d]),C={notices:Object(i.useSelect)((function(e){return{notices:e("core/notices").getNotices(d)}}),[d]).notices,createNotice:k,removeNotice:S,context:d,setIsSuppressed:E},P=y?null:Object(s.createElement)(g,{className:r,notices:C.notices,removeNotice:C.removeNotice,isEditor:w});return Object(s.createElement)(v.Provider,{value:C},o&&P,t)}},175:function(e,t,n){"use strict";var r=n(0),c=n(135),o=n(105),a=function(e){var t=e.indexOf("");return-1===t?e:e.substr(0,t+4)},s=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},i=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",r=s(e),c=r.split(" ").splice(0,t).join(" ");return Object(o.autop)(i(c,n))},u=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=s(e),a=c.slice(0,t);if(n)return Object(o.autop)(i(a,r));var l=a.match(/([\s]+)/g),u=l?l.length:0,p=c.slice(0,t+u);return Object(o.autop)(i(p,r))};t.a=function(e){var t=e.source,n=e.maxLength,s=void 0===n?15:n,i=e.countType,p=void 0===i?"words":i,d=e.className,b=void 0===d?"":d,m=Object(r.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",r=Object(o.autop)(e),s=Object(c.count)(r,n);if(s<=t)return r;var i=a(r),p=Object(c.count)(i,n);return p<=t?i:"words"===n?l(i,t):u(i,t,"characters_including_spaces"===n)}(t,s,p)}),[t,s,p]);return Object(r.createElement)(r.RawHTML,{className:b},m)}},186:function(e,t){},195:function(e,t){},197:function(e,t){e.exports=window.wp.warning},198:function(e,t,n){"use strict";var r=n(0),c=n(6),o=n.n(c),a=n(20),s=n(161);n(346),t.a=Object(a.withInstanceId)((function(e){var t=e.className,n=e.instanceId,c=e.id,a=e.selected,i=e.onChange,l=e.options,u=void 0===l?[]:l,p=c||n;return u.length&&Object(r.createElement)("div",{className:o()("wc-block-components-radio-control",t)},u.map((function(e){return Object(r.createElement)(s.a,{key:"".concat(p,"-").concat(e.value),name:"radio-control-".concat(p),checked:e.value===a,option:e,onChange:function(t){i(t),"function"==typeof e.onChange&&e.onChange(t)}})})))}))},199:function(e,t,n){"use strict";var r=n(16),c=n.n(r),o=n(17),a=n.n(o),s=n(13),i=n.n(s),l=n(18),u=n.n(l),p=n(19),d=n.n(p),b=n(9),m=n.n(b),f=n(5),O=n.n(f),g=n(0),h=n(1),j=n(11),v=(n(2),n(4)),y=n(49);var E=function(e){u()(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=m()(t);if(n){var c=m()(this).constructor;e=Reflect.construct(r,arguments,c)}else e=r.apply(this,arguments);return d()(this,e)});function o(){var e;c()(this,o);for(var t=arguments.length,n=new Array(t),a=0;a0&&void 0!==arguments[0]?arguments[0]:"";m()("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):r("")}),[r,_]),k=Object.entries(h),S=k.length>0?k.map((function(t){var n=a()(t,2),r=n[0],c=n[1],o=e?c.edit:c.content;return Object(s.isValidElement)(o)?Object(s.createElement)("li",{key:r,id:"express-payment-method-".concat(r)},Object(s.cloneElement)(o,g(g({},O),{},{onClick:y(r),onClose:E,onError:_,setExpressPaymentError:w}))):null})):Object(s.createElement)("li",{key:"noneRegistered"},Object(i.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(s.createElement)(f.a,{isEditor:e},Object(s.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},S))}},249:function(e,t,n){"use strict";var r=n(34),c=n.n(r),o=n(0),a=n(1),s=n(3),i=n(14),l=n(39);t.a=function(e){var t=e.setPageId,n=e.pageId,r=e.labels,u=Object(i.useSelect)((function(e){return e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100})}),[])||null;return u?Object(o.createElement)(s.PanelBody,{title:r.title},Object(o.createElement)(s.SelectControl,{label:Object(a.__)("Link to","woo-gutenberg-products-block"),value:n,options:[{label:r.default,value:0}].concat(c()(u.map((function(e){return{label:Object(l.a)(e,u),value:parseInt(e.id,10)}})))),onChange:function(e){return t(parseInt(e,10))}})):null}},25:function(e,t){e.exports=window.wc.wcBlocksData},250:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),c=n(1),o=(n(2),n(61)),a=n(280),s=n(162),i=(n(351),function(e){var t=e.text,n=e.url,i=void 0===n?"https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565":n;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(c.__)("Feedback?","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(r.createElement)("a",{href:i,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(c.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(r.createElement)(o.a,{srcElement:s.a,size:16})))}),l=function(){return Object(r.createElement)(i,{text:Object(c.__)("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"})}},251:function(e,t){e.exports=window.wp.plugins},252:function(e,t,n){"use strict";var r=n(21),c=n.n(r),o=n(0),a=n(1),s=n(66),i=n(99),l=n(30),u=n(812),p=n(52),d=n(76),b=n(6),m=n.n(b),f=n(26),O=n(42),g=n(8),h=n.n(g),j=n(36),v=n.n(j),y=n(164),E=n(78),_=function(e){var t;return null===(t=e.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id},w=n(198),k=n(160),S=n(50),C=n(59),P=n(4),N=function(e){var t=Object(P.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(f.decodeEntities)(e.name),value:e.rate_id,description:Object(o.createElement)(o.Fragment,null,Number.isFinite(t)&&Object(o.createElement)(C.a,{currency:Object(S.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(f.decodeEntities)(e.delivery_time))}},R=function(e){var t=e.className,n=e.noResultsMessage,r=e.onSelectRate,c=e.rates,a=e.renderOption,s=void 0===a?N:a,i=e.selected;if(0===c.length)return n;if(c.length>1)return Object(o.createElement)(w.a,{className:t,onChange:function(e){r(e)},selected:i,options:c.map(s)});var l=s(c[0]),u=l.label,p=l.secondaryLabel,d=l.description,b=l.secondaryDescription;return Object(o.createElement)(k.a,{label:u,secondaryLabel:p,description:d,secondaryDescription:b})},x=(n(345),function(e){var t=e.packageId,n=e.className,r=e.noResultsMessage,c=e.renderOption,s=e.packageData,i=e.collapsible,u=void 0!==i&&i,p=e.collapse,d=void 0!==p&&p,b=e.showItems,g=void 0!==b&&b,j=function(e,t){var n=Object(E.a)().dispatchCheckoutEvent,r=Object(y.a)(),c=r.selectShippingRate,a=r.isSelectingRate,s=Object(o.useState)((function(){return _(t)})),i=h()(s,2),l=i[0],u=i[1],p=Object(o.useRef)(t);return Object(o.useEffect)((function(){v()(p.current,t)||(p.current=t,u(_(t)))}),[t]),{selectShippingRate:Object(o.useCallback)((function(t){u(t),c(t,e),n("set-selected-shipping-rate",{shippingRateId:t})}),[e,c,n]),selectedShippingRate:l,isSelectingRate:a}}(t,s.shipping_rates),w=j.selectShippingRate,k=j.selectedShippingRate,S=Object(o.createElement)(o.Fragment,null,(g||u)&&Object(o.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},s.name),g&&Object(o.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(s.items).map((function(e){var t=Object(f.decodeEntities)(e.name),n=e.quantity;return Object(o.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(o.createElement)(O.a,{label:n>1?"".concat(t," × ").concat(n):"".concat(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)}))})))),C=Object(o.createElement)(R,{className:n,noResultsMessage:r,rates:s.shipping_rates,onSelectRate:w,selected:k,renderOption:c});return u?Object(o.createElement)(l.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!d,title:S},C):Object(o.createElement)("div",{className:m()("wc-block-components-shipping-rates-control__package",n)},S,C)}),T=["package_id"],A=["extensions","receiveCart"],I=function(e){var t=e.packages,n=e.collapse,r=e.showItems,a=e.collapsible,s=e.noResultsMessage,i=e.renderOption;return t.length?Object(o.createElement)(o.Fragment,null,t.map((function(e){var t=e.package_id,l=c()(e,T);return Object(o.createElement)(x,{key:t,packageId:t,packageData:l,collapsible:a,collapse:n,showItems:r,noResultsMessage:s,renderOption:i})}))):null};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,r=e.className,b=e.collapsible,m=void 0!==b&&b,f=e.noResultsMessage,O=e.renderOption;Object(o.useEffect)((function(){if(!n){var e=Object(u.a)(t),r=Object(u.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.",r,"woo-gutenberg-products-block"),r)):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",r,"woo-gutenberg-products-block"),r))}}),[n,t]);var g=Object(p.a)(),h=g.extensions,j=(g.receiveCart,{className:r,collapsible:m,noResultsMessage:f,renderOption:O,extensions:h,cart:c()(g,A),components:{ShippingRatesControlPackage:x}}),v=Object(d.b)().isEditor;return Object(o.createElement)(i.a,{isLoading:n,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},v?Object(o.createElement)(I,{packages:t,noResultsMessage:f,renderOption:O}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(l.ExperimentalOrderShippingPackages.Slot,j),Object(o.createElement)(l.ExperimentalOrderShippingPackages,null,Object(o.createElement)(I,{packages:t,noResultsMessage:f,renderOption:O}))))}},253:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(5),c=n.n(r),o=n(1),a=n(14),s=n(25),i=n(26),l=n(52),u=n(0);n(8),n(2),n(897),n(6),n(30),n(78),n(76);var p=Object(u.createContext)({notices:[],createSnackbarNotice:function(e,t){},removeSnackbarNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"});function d(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 b(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;o.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeSnackbarNotice:r}}),[r]),s=Object(u.useMemo)((function(){return{addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(e,t)}}}),[n]);return b(b(b({notices:t},a),s),{},{setIsSuppressed:c})}().addSnackbarNotice,g=Object(m.b)().setValidationErrors;return function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=Object(c.b)(),n=t.paymentMethods,o=t.expressPaymentMethods,a=t.paymentMethodsInitialized,s=t.expressPaymentMethodsInitialized,i=Object(r.a)(n),l=Object(r.a)(o);return{paymentMethods:e?l:i,isInitialized:e?s:a}},a=function(){return o(!1)},s=function(){return o(!0)}},259:function(e,t,n){"use strict";n.d(t,"b",(function(){return Z})),n.d(t,"a",(function(){return ee}));var r,c,o=n(34),a=n.n(o),s=n(8),i=n.n(s),l=n(0);!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(r||(r={})),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={}));var u={currentStatus:r.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},p={setPaymentStatus:function(){return{pristine:function(){},started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(e,t){}}},currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:r,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:function(){},activeSavedToken:"",setActiveSavedToken:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){return function(){return function(){}}},setExpressPaymentError:function(){},isExpressPaymentMethodActive:!1,setShouldSavePayment:function(){},shouldSavePayment:!1},d=n(5),b=n.n(d),m=n(43),f=n.n(m);function O(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;t0&&void 0!==arguments[0]?arguments[0]:u,t=arguments.length>1?arguments[1]:void 0,n=t.type,o=t.paymentMethodData,a=t.shouldSavePaymentMethod,s=void 0!==a&&a,i=t.errorMessage,l=void 0===i?"":i,p=t.paymentMethods,d=void 0===p?{}:p;switch(n){case r.STARTED:return g(g({},e),{},{currentStatus:r.STARTED,paymentMethodData:o||e.paymentMethodData,hasSavedToken:h(o||e.paymentMethodData)});case r.ERROR:return e.currentStatus!==r.ERROR?g(g({},e),{},{currentStatus:r.ERROR,errorMessage:l||e.errorMessage}):e;case r.FAILED:return e.currentStatus!==r.FAILED?g(g({},e),{},{currentStatus:r.FAILED,paymentMethodData:o||e.paymentMethodData,errorMessage:l||e.errorMessage}):e;case r.SUCCESS:return e.currentStatus!==r.SUCCESS?g(g({},e),{},{currentStatus:r.SUCCESS,paymentMethodData:o||e.paymentMethodData,hasSavedToken:h(o||e.paymentMethodData)}):e;case r.PROCESSING:return e.currentStatus!==r.PROCESSING?g(g({},e),{},{currentStatus:r.PROCESSING,errorMessage:""}):e;case r.COMPLETE:return e.currentStatus!==r.COMPLETE?g(g({},e),{},{currentStatus:r.COMPLETE}):e;case r.PRISTINE:return g(g({},u),{},{currentStatus:r.PRISTINE,paymentMethods:g({},e.paymentMethods),expressPaymentMethods:g({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case c.SET_REGISTERED_PAYMENT_METHODS:return g(g({},e),{},{paymentMethods:d});case c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return g(g({},e),{},{expressPaymentMethods:d});case c.SET_SHOULD_SAVE_PAYMENT_METHOD:return g(g({},e),{},{shouldSavePaymentMethod:s})}},v=n(29),y=n.n(v),E=n(22),_=n.n(E),w=n(1),k=n(54),S=n(58),C=n(4),P=n(201),N=n(76),R=n(100),x=n(84),T=n(52),A=n(67),I=n(64);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 D(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:void 0;n&&ne(n),te(V({errorMessage:e||"",paymentMethodData:t||{}}))},success:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;t&&ne(t),void 0!==f()(n)&&null!=n&&n.address&&re(n.address),te(U({paymentMethodData:e}))}}}),[te,ne,re])}),ie=se.dispatchActions,le=se.setPaymentStatus,ue=function(e){var t=Object(k.getPaymentMethods)(),n=Object(I.c)().noticeContexts,r=new Set([].concat(a()(Object(C.getSetting)("paymentGatewaySortOrder",[])),a()(Object.keys(t))));return B(e,t,Array.from(r),n.PAYMENTS)}(ie.setRegisteredPaymentMethods),pe=function(e){var t=Object(k.getExpressPaymentMethods)(),n=Object(I.c)().noticeContexts;return B(e,t,Object.keys(t),n.EXPRESS_PAYMENTS)}(ie.setRegisteredExpressPaymentMethods),de=function(){var e=Object(Y.a)().dispatchCheckoutEvent,t=Object(l.useState)(""),n=i()(t,2),r=n[0],c=n[1],o=Object(l.useState)(""),a=i()(o,2),s=a[0],u=a[1];return Object(l.useEffect)((function(){e("set-active-payment-method",{activePaymentMethod:r})}),[e,r]),{activePaymentMethod:r,activeSavedToken:s,setActivePaymentMethod:c,setActiveSavedToken:u}}(),be=de.activePaymentMethod,me=de.activeSavedToken,fe=de.setActivePaymentMethod,Oe=de.setActiveSavedToken,ge=Object(l.useMemo)((function(){return m?O("previewSavedPaymentMethods"):ue?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};var t=Object(C.getSetting)("customerPaymentMethods",{}),n=Object.keys(t),r={};return n.forEach((function(n){var c=t[n].filter((function(t){var n,r=t.method.gateway;return r in e&&(null===(n=e[r].supports)||void 0===n?void 0:n.showSavedCards)}));c.length&&(r[n]=c)})),r}(ae.paymentMethods):{}}),[m,O,ue,ae.paymentMethods]),he=Object(l.useCallback)((function(e){e?v(e,{id:"wc-express-payment-error",context:P.EXPRESS_PAYMENTS}):y("wc-express-payment-error",P.EXPRESS_PAYMENTS)}),[v,P.EXPRESS_PAYMENTS,y]),je=Object.keys(ae.expressPaymentMethods).includes(be),ve=Object(l.useMemo)((function(){return{isPristine:ae.currentStatus===r.PRISTINE,isStarted:ae.currentStatus===r.STARTED,isProcessing:ae.currentStatus===r.PROCESSING,isFinished:[r.ERROR,r.FAILED,r.SUCCESS].includes(ae.currentStatus),hasError:ae.currentStatus===r.ERROR,hasFailed:ae.currentStatus===r.FAILED,isSuccessful:ae.currentStatus===r.SUCCESS,isDoingExpressPayment:ae.currentStatus!==r.PRISTINE&&je}}),[ae.currentStatus,je]);Object(l.useEffect)((function(){var e=Object.keys(ae.paymentMethods),t=[].concat(a()(e),a()(Object.keys(ae.expressPaymentMethods)));ue&&e.length&&fe((function(e){return e&&t.includes(e)?e:(le().pristine(),Object.keys(ae.paymentMethods)[0])}))}),[ue,ae.paymentMethods,ae.expressPaymentMethods,fe,le]),Object(l.useEffect)((function(){!o||d||p||ve.isFinished||le().processing()}),[o,d,p,ve.isFinished,le]),Object(l.useEffect)((function(){s&&!ve.isSuccessful&&le().pristine()}),[s,ve.isSuccessful,le]),Object(l.useEffect)((function(){d&&ve.isSuccessful&&!ae.hasSavedToken&&le().pristine()}),[d,ve.isSuccessful,ae.hasSavedToken,le]),Object(l.useEffect)((function(){ve.isProcessing&&(y("wc-payment-error",P.PAYMENTS),Object(X.b)(ee.current,"payment_processing",{}).then((function(e){var t,n,r,c,o,a,s,i;if(e.forEach((function(e){_(e)&&(t=e),(w(e)||S(e))&&(n=e)})),t&&!n)le().success(null===(r=t)||void 0===r||null===(c=r.meta)||void 0===c?void 0:c.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(n&&S(n)){var l,u,p,d,b,m;n.message&&n.message.length&&v(n.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=n)||void 0===m?void 0:m.messageContext)||P.PAYMENTS}),le().failed(null===(l=n)||void 0===l?void 0:l.message,null===(u=n)||void 0===u||null===(p=u.meta)||void 0===p?void 0:p.paymentMethodData,null===(d=n)||void 0===d||null===(b=d.meta)||void 0===b?void 0:b.billingData)}else if(n){var f,O;n.message&&n.message.length&&v(n.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(O=n)||void 0===O?void 0:O.messageContext)||P.PAYMENTS}),le().error(n.message),g(null===(f=n)||void 0===f?void 0:f.validationErrors)}else le().success()})))}),[ve.isProcessing,g,le,y,P.PAYMENTS,_,S,w,v]);var ye={setPaymentStatus:le,currentStatus:ve,paymentStatuses:r,paymentMethodData:ae.paymentMethodData,errorMessage:ae.errorMessage,activePaymentMethod:be,setActivePaymentMethod:fe,activeSavedToken:me,setActiveSavedToken:Oe,onPaymentProcessing:Z,customerPaymentMethods:ge,paymentMethods:ae.paymentMethods,expressPaymentMethods:ae.expressPaymentMethods,paymentMethodsInitialized:ue,expressPaymentMethodsInitialized:pe,setExpressPaymentError:he,isExpressPaymentMethodActive:je,shouldSavePayment:ae.shouldSavePaymentMethod,setShouldSavePayment:ie.setShouldSavePayment};return Object(l.createElement)(Q.Provider,{value:ye},n)}},26:function(e,t){e.exports=window.wp.htmlEntities},27:function(e,t){e.exports=window.wp.primitives},275:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=(n(2),n(148)),o=(n(224),function(e){var t=e.errorMessage,n=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,s=e.elementId,i=void 0===s?"":s,l=Object(c.b)(),u=l.getValidationError,p=l.getValidationErrorId;if(!n||"string"!=typeof n){var d=u(a)||{};if(!d.message||d.hidden)return null;n=d.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:p(i)},n))})},280:function(e,t,n){"use strict";var r=n(0),c=n(27),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:"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.wp.components},30:function(e,t){e.exports=window.wc.blocksCheckout},327:function(e,t,n){"use strict";var r=n(0),c=n(27),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:"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},330:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(21),a=n.n(o),s=n(0),i=n(27),l=["className","size"],u=Object(s.createElement)((function(e){var t=e.className,n=e.size,r=a()(e,l);return Object(s.createElement)(i.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(s.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=u},332:function(e,t){},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){},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){},350:function(e,t){},351:function(e,t){},352:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(0),a=n(26),s=n(4);n(333),t.a=function(e){var t=e.image,n=void 0===t?{}:t,r=e.fallbackAlt,i=void 0===r?"":r,l=n.thumbnail?{src:n.thumbnail,alt:Object(a.decodeEntities)(n.alt)||i||"Product Image"}:{src:s.PLACEHOLDER_IMG_SRC,alt:""};return Object(o.createElement)("img",c()({className:"wc-block-components-product-image"},l,{alt:l.alt}))}},353:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(144);t.a=function(){return Object(r.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(c.__)("Available on backorder","woo-gutenberg-products-block"))}},354:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(144);t.a=function(e){var t=e.lowStockRemaining;return t?Object(r.createElement)(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(c.sprintf)(
+/* translators: %d stock amount (number of items in stock for product) */
+Object(c.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},355:function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(0),c=n(251),o=n(4),a=n(150),s=n(259),i=n(100),l=n(84),u=n(77),p=n(29),d=n.n(p),b=n(5),m=n.n(b),f=n(8),O=n.n(f),g=n(22),h=n.n(g),j=n(1),v=n(15),y=n.n(v),E=n(369),_=n(40),w=function(e,t,n){var r=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),c="wc-".concat(n,"-new-payment-method");return r.push({key:c,value:t}),r},k=function(e,t){y.a.setNonce&&"function"==typeof y.a.setNonce&&y.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))},S=n(148),C=n(52),P=n(67);function N(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 R(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";v()("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"}),T(e)}),[T]);return{activePaymentMethod:j,billing:{billingData:$,cartTotal:re.current,currency:Object(c.getCurrencyFromPriceResponse)(J),cartTotalItems:ne.current,displayPricesIncludingTax:Object(h.getSetting)("displayCartPricesIncludingTax",!1),appliedCoupons:Q,customerId:b},checkoutStatus:{isCalculating:t,isComplete:n,isIdle:a,isProcessing:s},components:{ValidationInputError:E.a,PaymentMethodIcons:g.a,PaymentMethodLabel:O,LoadingMask:y.a},emitResponse:{noticeContexts:ee,responseTypes:te},eventRegistration:{onCheckoutBeforeProcessing:i,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:u,onCheckoutAfterProcessingWithError:p,onShippingRateSuccess:z,onShippingRateFail:H,onShippingRateSelectSuccess:G,onShippingRateSelectFail:q,onPaymentProcessing:x},onSubmit:d,paymentStatus:f,setExpressPaymentError:ce,shippingData:{shippingRates:B,shippingRatesLoading:L,selectedRates:F,setSelectedRates:V,isSelectingRate:U,shippingAddress:K,setShippingAddress:X,needsShipping:Y},shippingStatus:{shippingErrorStatus:M,shippingErrorTypes:D},shouldSavePayment:A}}},362:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return p}));var r=n(8),c=n.n(r),o=n(0),a=(n(2),n(20)),s=n(6),i=n.n(s),l=Object(o.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),u=function(){return Object(o.useContext)(l)},p=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,s=function(){var e=Object(a.useResizeObserver)(),t=c()(e,2),n=t[0],r=t[1].width,o="";return r>700?o="is-large":r>520?o="is-medium":r>400?o="is-small":r&&(o="is-mobile"),[n,o]}(),u=c()(s,2),p=u[0],d=u[1],b={hasContainerWidth:""!==d,containerClassName:d,isMobile:"is-mobile"===d,isSmall:"is-small"===d,isMedium:"is-medium"===d,isLarge:"is-large"===d};return Object(o.createElement)(l.Provider,{value:b},Object(o.createElement)("div",{className:i()(r,d)},p,t))}},363:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(5),a=n.n(o),s=n(8),i=n.n(s),l=n(21),u=n.n(l),p=n(0),d=n(1),b=n(11),m=n(6),f=n.n(m),O=n(148),g=n(77),h=n(275),j=n(20),v=n(117),y=n(42),E=(n(242),["className","id","type","ariaLabel","ariaDescribedBy","label","screenReaderLabel","disabled","help","autoCapitalize","autoComplete","value","onChange","required","onBlur","feedback"]),_=Object(b.forwardRef)((function(e,t){var n=e.className,r=e.id,o=e.type,a=void 0===o?"text":o,s=e.ariaLabel,l=e.ariaDescribedBy,d=e.label,b=e.screenReaderLabel,m=e.disabled,O=e.help,g=e.autoCapitalize,h=void 0===g?"off":g,j=e.autoComplete,v=void 0===j?"off":j,_=e.value,w=void 0===_?"":_,k=e.onChange,S=e.required,C=void 0!==S&&S,P=e.onBlur,N=void 0===P?function(){}:P,R=e.feedback,x=u()(e,E),T=Object(p.useState)(!1),A=i()(T,2),I=A[0],M=A[1];return Object(p.createElement)("div",{className:f()("wc-block-components-text-input",n,{"is-active":I||w})},Object(p.createElement)("input",c()({type:a,id:r,value:w,ref:t,autoCapitalize:h,autoComplete:v,onChange:function(e){k(e.target.value)},onFocus:function(){return M(!0)},onBlur:function(e){N(e.target.value),M(!1)},"aria-label":s||d,disabled:m,"aria-describedby":O&&!l?r+"__help":l,required:C},x)),Object(p.createElement)(y.a,{label:d,screenReaderLabel:b||d,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!O&&Object(p.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},O),R)})),w=["className","instanceId","id","ariaDescribedBy","errorId","validateOnMount","focusOnMount","onChange","showError","errorMessage"];t.a=Object(j.withInstanceId)((function(e){var t=e.className,n=e.instanceId,r=e.id,o=e.ariaDescribedBy,s=e.errorId,l=e.validateOnMount,m=void 0===l||l,j=e.focusOnMount,y=void 0!==j&&j,E=e.onChange,k=e.showError,S=void 0===k||k,C=e.errorMessage,P=void 0===C?"":C,N=u()(e,w),R=Object(b.useState)(!0),x=i()(R,2),T=x[0],A=x[1],I=Object(b.useRef)(null),M=Object(O.b)(),D=M.getValidationError,B=M.hideValidationError,L=M.setValidationErrors,F=M.clearValidationError,V=M.getValidationErrorId,U=Object(g.b)().isBeforeProcessing,z=void 0!==r?r:"textinput-"+n,H=void 0!==s?s:z,G=Object(b.useCallback)((function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=I.current||null;if(t){t.value=t.value.trim();var n=t.checkValidity();n?F(H):L(a()({},H,{message:t.validationMessage||Object(d.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}))}}),[F,H,L]);Object(b.useEffect)((function(){var e;T&&(y&&(null===(e=I.current)||void 0===e||e.focus()),A(!1))}),[y,T,A]),Object(b.useEffect)((function(){T&&(m&&G(),A(!1))}),[T,A,m,G]),Object(b.useEffect)((function(){U&&G()}),[U,G]),Object(b.useEffect)((function(){return function(){F(H)}}),[F,H]);var q=D(H)||{};Object(v.c)(P)&&""!==P&&(q.message=P);var Y=q.message&&!q.hidden,W=S&&Y&&V(H)?V(H):o;return Object(p.createElement)(_,c()({className:f()(t,{"has-error":Y}),"aria-invalid":!0===Y,id:z,onBlur:function(){G(!1)},feedback:S&&Object(p.createElement)(h.a,{errorMessage:P,propertyName:H}),ref:I,onChange:function(e){B(H),E(e)},ariaDescribedBy:W},N))}))},368:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r,c=window.CustomEvent||null,o=function(e,t){var n=t.bubbles,r=void 0!==n&&n,o=t.cancelable,a=void 0!==o&&o,s=t.element,i=t.detail,l=void 0===i?{}:i;if(c){s||(s=document.body);var u=new c(e,{bubbles:r,cancelable:a,detail:l});s.dispatchEvent(u)}},a=function(){r&&clearTimeout(r),r=setTimeout((function(){o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})}),50)},s=function(e,t){var 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 function(){};var c=function(){o(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},369:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return i}));var r=n(4),c=n(133),o=n(23),a=function(e){var t=e.country,n=void 0===t?"":t,r=e.state,c=void 0===r?"":r,o=e.city,a=void 0===o?"":o,s=e.postcode,i=void 0===s?"":s;return{country:n.trim(),state:c.trim(),city:a.trim(),postcode:i?i.replace(" ","").toUpperCase():""}},s=function(e){var t=e.email,n=void 0===t?"":t;return Object(o.isEmail)(n)?n.trim():""},i=function(e){var t=Object.keys(r.defaultAddressFields),n=Object(c.a)(t,{},e.country),o=Object.assign({},e);return n.forEach((function(t){var n=t.key,r=void 0===n?"":n,c=t.hidden;void 0!==c&&c&&function(e,t){return e in t}(r,e)&&(o[r]="")})),o}},37:function(e,t,n){"use strict";n.d(t,"o",(function(){return o})),n.d(t,"m",(function(){return a})),n.d(t,"l",(function(){return s})),n.d(t,"n",(function(){return i})),n.d(t,"j",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return d})),n.d(t,"k",(function(){return b})),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 j}));var r,c=n(4),o=Object(c.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=c.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=c.STORE_PAGES.checkout.id,p=c.STORE_PAGES.checkout.permalink,d=c.STORE_PAGES.privacy.permalink,b=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),m=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),f=c.STORE_PAGES.cart.permalink,O=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),g=Object(c.getSetting)("allowedCountries",{}),h=Object(c.getSetting)("shippingStates",{}),j=Object(c.getSetting)("allowedStates",{})},372:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(142),c=function(e,t){return function(n){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=r.a.addEventCallback(e,n,c);return t(o),function(){t(r.a.removeEventCallback(e,o.id))}}}},375:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return m}));var r=n(43),c=n.n(r),o=n(29),a=n.n(o),s=n(22),i=n.n(s),l=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},u=n(64);function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(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)?d(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,c=function(){};return{s:c,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:c}}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 o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n100,l={per_page:i?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},p=[Object(o.addQueryArgs)("/wc/store/products",d(d({},l),s))];return i&&n.length&&p.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:n,per_page:0})),p}({selected:n,search:c,queryArgs:void 0===a?{}:a});return Promise.all(l.map((function(e){return s()({path:e})}))).then((function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id").map((function(e){return d(d({},e),{},{parent:0})}))})).catch((function(e){throw e}))},m=function(e){return s()({path:"/wc/store/products/".concat(e)})},f=function(){return s()({path:"wc/store/products/attributes"})},O=function(e){return s()({path:"wc/store/products/attributes/".concat(e,"/terms")})},g=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,c=Object(l.getSetting)("limitTags",!1),a=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:r})];return c&&n.length&&a.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:n})),a}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map((function(e){return s()({path:e})}))).then((function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")}))},h=function(e){return s()({path:Object(o.addQueryArgs)("wc/store/products/categories",d({per_page:0},e))})},j=function(e){return s()({path:"wc/store/products/categories/".concat(e)})},v=function(e){return s()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},y=function(e,t){if(!e.title.raw)return e.slug;var n=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(n?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return l}));var r=n(29),c=n.n(r),o=n(22),a=n.n(o),s=n(1),i=function(){var e=c()(a.a.mark((function e(t){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return n=e.sent,e.abrupt("return",{message:n.message,type:n.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),l=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},42:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(0),a=n(6),s=n.n(a);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 l(e){for(var t=1;tall checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(o.createElement)("em",null)})),Object(o.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(o.createInterpolateElement)(Object(s.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(o.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.hooks},52:function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(8),c=n.n(r),o=n(5),a=n.n(o),s=n(7),i=n(0),l=n(25),u=n(14),p=n(26),d=n(211),b=n(369),m=n(76),f=n(368),O=function(e){var t=e.detail;t&&t.preserveCartData||Object(u.dispatch)(l.CART_STORE_KEY).invalidateResolutionForStore()},g=function(){1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},h=function(){Object(i.useEffect)((function(){return function(){if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:function(){}}),0===window.wcBlocksStoreCartListeners.count){var e=Object(f.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(f.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",O),document.body.addEventListener("wc-blocks_removed_from_cart",O),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=function(){e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",O),document.body.removeEventListener("wc-blocks_removed_from_cart",O)}}window.wcBlocksStoreCartListeners.count++}(),g}),[])};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 v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(m.b)(),n=t.isEditor,r=t.previewData,c=null==r?void 0:r.previewCart,o=e.shouldSelect,a=Object(i.useRef)();h();var p=Object(u.useSelect)((function(e,t){var r=t.dispatch;if(!o)return k;if(n)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:l.EMPTY_CART_ITEM_ERRORS,cartTotals:c.totals,cartIsLoading:!1,cartErrors:l.EMPTY_CART_ERRORS,billingAddress:E,shippingAddress:y,extensions:l.EMPTY_EXTENSIONS,shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var a=e(l.CART_STORE_KEY),s=a.getCartData(),i=a.getCartErrors(),u=a.getCartTotals(),p=!a.hasFinishedResolution("getCartData"),d=a.isCustomerDataUpdating(),m=r(l.CART_STORE_KEY).receiveCart,f=w(s.billingAddress),O=s.needsShipping?w(s.shippingAddress):f,g=s.fees.length>0?s.fees.map((function(e){return w(e)})):l.EMPTY_CART_FEES;return{cartCoupons:s.coupons.length>0?s.coupons.map((function(e){return v(v({},e),{},{label:e.code})})):l.EMPTY_CART_COUPONS,cartItems:s.items,cartFees:g,cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors,cartTotals:u,cartIsLoading:p,cartErrors:i,billingAddress:Object(b.a)(f),shippingAddress:Object(b.a)(O),extensions:s.extensions,shippingRates:s.shippingRates,shippingRatesLoading:d,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements,receiveCart:m}}),[o]);return a.current&&Object(s.isEqual)(a.current,p)||(a.current=p),a.current}},527: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}')},528: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}')},529: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}')},530: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}')},531: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}')},532: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}')},533: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}')},534: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}')},535: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}')},536: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}')},537: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}')},538: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}')},54:function(e,t){e.exports=window.wc.wcBlocksRegistry},550:function(e,t,n){"use strict";var r=n(0),c=n(27),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 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=o},57:function(e,t){e.exports=window.wp.deprecated},58:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),c=n(36),o=n.n(c);function a(e){var t=Object(r.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},59:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(5),a=n.n(o),s=n(21),i=n.n(s),l=n(0),u=n(178),p=n(6),d=n.n(p),b=(n(186),["className","value","currency","onValueChange","displayType"]);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 f(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),u=Object(o.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,i({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,i({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,i({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,i({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,i({},t))}}}),[n]);return i(i(i({notices:t},l),u),{},{setIsSuppressed:c})}},7:function(e,t){e.exports=window.lodash},70:function(e,t){e.exports=window.wp.dom},76:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(0),c=n(14),o=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:function(){}}),a=function(){return Object(r.useContext)(o)},s=function(e){var t=e.children,n=e.currentPostId,a=void 0===n?0:n,s=e.currentView,i=void 0===s?"":s,l=e.previewData,u=void 0===l?{}:l,p=Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),d=Object(r.useCallback)((function(e){return e in u?u[e]:{}}),[u]),b={isEditor:!0,currentPostId:p,currentView:i,previewData:u,getPreviewData:d};return Object(r.createElement)(o.Provider,{value:b},t)}},77:function(e,t,n){"use strict";n.d(t,"b",(function(){return D})),n.d(t,"a",(function(){return B}));var r,c=n(8),o=n.n(c),a=n(0),s=n(1),i=n(143),l=n(57),u=n.n(l),p=n(117);!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"}(r||(r={}));var d,b=function(){return{type:r.SET_IDLE}},m=function(e){return{type:r.SET_REDIRECT_URL,redirectUrl:e}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:r.SET_COMPLETE,data:e}},O=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?r.SET_HAS_ERROR:r.SET_NO_ERROR}},g=n(5),h=n.n(g),j=n(4);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(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(d||(d={}));var y=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0,n=t.redirectUrl,c=t.type,o=t.customerId,a=t.orderId,s=t.orderNotes,i=t.extensionData,l=t.shouldCreateAccount,u=t.data,p=e;switch(c){case r.SET_PRISTINE:p=E;break;case r.SET_IDLE:p=e.status!==d.IDLE?w(w({},e),{},{status:d.IDLE}):e;break;case r.SET_REDIRECT_URL:p=void 0!==n&&n!==e.redirectUrl?w(w({},e),{},{redirectUrl:n}):e;break;case r.SET_PROCESSING_RESPONSE:p=w(w({},e),{},{processingResponse:u});break;case r.SET_COMPLETE:p=e.status!==d.COMPLETE?w(w({},e),{},{status:d.COMPLETE,redirectUrl:void 0!==u&&"string"==typeof u.redirectUrl&&u.redirectUrl?u.redirectUrl:e.redirectUrl}):e;break;case r.SET_PROCESSING:p=!1===(p=e.status!==d.PROCESSING?w(w({},e),{},{status:d.PROCESSING,hasError:!1}):e).hasError?p:w(w({},p),{},{hasError:!1});break;case r.SET_BEFORE_PROCESSING:p=e.status!==d.BEFORE_PROCESSING?w(w({},e),{},{status:d.BEFORE_PROCESSING,hasError:!1}):e;break;case r.SET_AFTER_PROCESSING:p=e.status!==d.AFTER_PROCESSING?w(w({},e),{},{status:d.AFTER_PROCESSING}):e;break;case r.SET_HAS_ERROR:p=e.hasError?e:w(w({},e),{},{hasError:!0}),p=e.status===d.PROCESSING||e.status===d.BEFORE_PROCESSING?w(w({},p),{},{status:d.IDLE}):p;break;case r.SET_NO_ERROR:p=e.hasError?w(w({},e),{},{hasError:!1}):e;break;case r.INCREMENT_CALCULATING:p=w(w({},e),{},{calculatingCount:e.calculatingCount+1});break;case r.DECREMENT_CALCULATING:p=w(w({},e),{},{calculatingCount:Math.max(0,e.calculatingCount-1)});break;case r.SET_CUSTOMER_ID:p=void 0!==o?w(w({},e),{},{customerId:o}):e;break;case r.SET_ORDER_ID:p=void 0!==a?w(w({},e),{},{orderId:a}):e;break;case r.SET_SHOULD_CREATE_ACCOUNT:void 0!==l&&l!==e.shouldCreateAccount&&(p=w(w({},e),{},{shouldCreateAccount:l}));break;case r.SET_ORDER_NOTES:void 0!==s&&e.orderNotes!==s&&(p=w(w({},e),{},{orderNotes:s}));break;case r.SET_EXTENSION_DATA:void 0!==i&&e.extensionData!==i&&(p=w(w({},e),{},{extensionData:i}))}return p!==e&&c!==r.SET_PRISTINE&&p.status===d.PRISTINE&&(p.status=d.IDLE),p},S=n(26),C=n(142),P=n(372),N=n(375),R=n(148),x=n(67),T=n(78),A=n(14),I=n(64),M=Object(a.createContext)({dispatchActions:{resetCheckout:function(){},setRedirectUrl:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},incrementCalculating:function(){},decrementCalculating:function(){},setCustomerId:function(e){},setOrderId:function(e){},setOrderNotes:function(e){},setExtensionData:function(e){}},onSubmit:function(){},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:function(){return function(){}},onCheckoutAfterProcessingWithError:function(){return function(){}},onCheckoutBeforeProcessing:function(){return function(){}},onCheckoutValidationBeforeProcessing:function(){return function(){}},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:function(e){},extensionData:{}}),D=function(){return Object(a.useContext)(M)},B=function(e){var t=e.children,n=e.redirectUrl,c=e.isCart,l=void 0!==c&&c;E.redirectUrl=n;var g,h=Object(a.useReducer)(k,E),j=o()(h,2),v=j[0],y=j[1],_=Object(R.b)().setValidationErrors,w=Object(x.a)(),D=w.addErrorNotice,B=w.removeNotices,L=Object(T.a)().dispatchCheckoutEvent,F=v.calculatingCount>0,V=Object(I.c)(),U=V.isSuccessResponse,z=V.isErrorResponse,H=V.isFailResponse,G=V.shouldRetry,q=(g=Object(I.c)().noticeContexts,{checkoutNotices:Object(A.useSelect)((function(e){return e("core/notices").getNotices("wc/checkout")}),[]),expressPaymentNotices:Object(A.useSelect)((function(e){return e("core/notices").getNotices(g.EXPRESS_PAYMENTS)}),[g.EXPRESS_PAYMENTS]),paymentNotices:Object(A.useSelect)((function(e){return e("core/notices").getNotices(g.PAYMENTS)}),[g.PAYMENTS])}),Y=q.checkoutNotices,W=q.paymentNotices,$=q.expressPaymentNotices,K=Object(a.useReducer)(C.b,{}),X=o()(K,2),J=X[0],Q=X[1],Z=Object(a.useRef)(J),ee=function(e){return Object(a.useMemo)((function(){return{onCheckoutAfterProcessingWithSuccess:Object(P.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(P.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(P.a)("checkout_validation_before_processing",e)}}),[e])}(Q),te=ee.onCheckoutAfterProcessingWithSuccess,ne=ee.onCheckoutAfterProcessingWithError,re=ee.onCheckoutValidationBeforeProcessing;Object(a.useEffect)((function(){Z.current=J}),[J]);var ce=Object(a.useMemo)((function(){return function(){return u()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),re.apply(void 0,arguments)}}),[re]),oe=Object(a.useMemo)((function(){return{resetCheckout:function(){y({type:r.SET_PRISTINE})},setRedirectUrl:function(e){y(m(e))},setHasError:function(e){y(O(e))},incrementCalculating:function(){y({type:r.INCREMENT_CALCULATING})},decrementCalculating:function(){y({type:r.DECREMENT_CALCULATING})},setCustomerId:function(e){var t;y((t=e,{type:r.SET_CUSTOMER_ID,customerId:t}))},setOrderId:function(e){y(function(e){return{type:r.SET_ORDER_ID,orderId:e}}(e))},setOrderNotes:function(e){y(function(e){return{type:r.SET_ORDER_NOTES,orderNotes:e}}(e))},setExtensionData:function(e){y(function(e){return{type:r.SET_EXTENSION_DATA,extensionData:e}}(e))},setAfterProcessing:function(e){var t,n=function(e){var 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((function(e){var n=e.key,r=e.value;t.paymentDetails[n]=Object(S.decodeEntities)(r)}))),"message"in e&&(t.message=Object(S.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t}(e);n.redirectUrl&&y(m(n.redirectUrl)),y((t=n,{type:r.SET_PROCESSING_RESPONSE,data:t})),y({type:r.SET_AFTER_PROCESSING})}}}),[]);Object(a.useEffect)((function(){v.status===d.BEFORE_PROCESSING&&(B("error"),Object(N.a)(Z.current,"checkout_validation_before_processing",{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,n=e.validationErrors;D(t),_(n)})),y(b()),y(O())):y({type:r.SET_PROCESSING})})))}),[v.status,_,D,B,y]);var ae=Object(i.a)(v.status),se=Object(i.a)(v.hasError);Object(a.useEffect)((function(){if((v.status!==ae||v.hasError!==se)&&v.status===d.AFTER_PROCESSING){var e={redirectUrl:v.redirectUrl,orderId:v.orderId,customerId:v.customerId,orderNotes:v.orderNotes,processingResponse:v.processingResponse};v.hasError?Object(N.b)(Z.current,"checkout_after_processing_with_error",e).then((function(t){var n=function(e){var t=null;return e.forEach((function(e){if((z(e)||H(e))&&e.message){var n=e.messageContext?{context:e.messageContext}:void 0;t=e,D(e.message,n)}})),t}(t);if(null!==n)G(n)?y(b()):y(f(n));else{if(!(Y.some((function(e){return"error"===e.status}))||$.some((function(e){return"error"===e.status}))||W.some((function(e){return"error"===e.status})))){var r,c=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");D(c,{id:"checkout"})}y(b())}})):Object(N.b)(Z.current,"checkout_after_processing_with_success",e).then((function(e){var t=null,n=null;if(e.forEach((function(e){U(e)&&(t=e),(z(e)||H(e))&&(n=e)})),t&&!n)y(f(t));else if(Object(p.b)(n)){if(n.message){var r=n.messageContext?{context:n.messageContext}:void 0;D(n.message,r)}G(n)?y(O(!0)):y(f(n))}else y(f())}))}}),[v.status,v.hasError,v.redirectUrl,v.orderId,v.customerId,v.orderNotes,v.processingResponse,ae,se,oe,D,z,H,U,G,Y,$,W]);var ie={onSubmit:Object(a.useCallback)((function(){L("submit"),y({type:r.SET_BEFORE_PROCESSING})}),[L]),isComplete:v.status===d.COMPLETE,isIdle:v.status===d.IDLE,isCalculating:F,isProcessing:v.status===d.PROCESSING,isBeforeProcessing:v.status===d.BEFORE_PROCESSING,isAfterProcessing:v.status===d.AFTER_PROCESSING,hasError:v.hasError,redirectUrl:v.redirectUrl,onCheckoutBeforeProcessing:ce,onCheckoutValidationBeforeProcessing:re,onCheckoutAfterProcessingWithSuccess:te,onCheckoutAfterProcessingWithError:ne,dispatchActions:oe,isCart:l,orderId:v.orderId,hasOrder:!!v.orderId,customerId:v.customerId,orderNotes:v.orderNotes,shouldCreateAccount:v.shouldCreateAccount,setShouldCreateAccount:function(e){return y((t=e,{type:r.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:v.extensionData};return Object(a.createElement)(M.Provider,{value:ie},t)}},777:function(e,t,n){"use strict";var r=n(0),c=n(27),o=Object(r.createElement)(c.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=o},78:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),c=n.n(r),o=n(51),a=n(0),s=n(52);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 l(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-".concat(e),t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(a.useCallback)((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-checkout-".concat(e),l(l({},n),{},{storeCart:t.current}))}catch(e){console.error(e)}}),[])}}},800:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(34),c=n.n(r),o=n(24),a=["core/paragraph","core/image","core/separator"],s=function(e){return[].concat(c()(Object(o.getBlockTypes)().filter((function(t){return((null==t?void 0:t.parent)||[]).includes(e)})).map((function(e){return e.name}))),a)}},801:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(8),c=n.n(r),o=n(0),a=n(14),s=n(24),i=n(7),l=function(e){var t=e.clientId,n=e.registeredBlocks,r=e.defaultTemplate,l=void 0===r?[]:r,u=Object(o.useRef)(n),p=Object(o.useRef)(l),d=Object(a.useDispatch)("core/block-editor"),b=d.insertBlock,m=d.replaceInnerBlocks,f=Object(a.useSelect)((function(e){return{innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:u.current.map((function(e){return Object(s.getBlockType)(e)}))}}),[t,u.current]),O=f.innerBlocks,g=f.registeredBlockTypes,h=Object(o.useCallback)((function(e,n){var r=Object(s.createBlock)(e.name);b(r,n,t,!1)}),[t,b]),j=Object(o.useMemo)((function(){return g.filter((function(e){return e&&(c=e.attributes,Boolean((null===(t=c.lock)||void 0===t?void 0:t.remove)||(null===(n=c.lock)||void 0===n||null===(r=n.default)||void 0===r?void 0:r.remove)));var t,n,r,c}))}),[g]);Object(o.useLayoutEffect)((function(){if(t){if(0===O.length&&p.current.length>0){var e=Object(s.synchronizeBlocksWithTemplate)(O,p.current);if(!Object(i.isEqual)(e,O))return void m(t,e)}j.forEach((function(e){if(!O.find((function(t){return t.name===e.name}))){var t=p.current.findIndex((function(t){return c()(t,1)[0]===e.name}));switch(t){case-1:h(e,O.length);break;case 0:h(e,0);break;default:var n=p.current[t-1],r=O.findIndex((function(e){return e.name===n[0]}));h(e,-1===r?t:r+1)}}}))}}),[t,O,j,m,h])}},802:function(e,t,n){"use strict";var r=n(0),c=n(6),o=n.n(c),a=(n(2),n(362));n(332),t.a=function(e){var t=e.children,n=e.className;return Object(r.createElement)(a.a,{className:o()("wc-block-components-sidebar-layout",n)},t)}},803:function(e,t,n){"use strict";var r=n(0),c=n(11),o=n(6),a=n.n(o),s=Object(c.forwardRef)((function(e,t){var n=e.children,c=e.className,o=void 0===c?"":c;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-main",o)},n)}));t.a=s},806:function(e,t,n){"use strict";var r=n(0),c=n(11),o=n(6),a=n.n(o),s=Object(c.forwardRef)((function(e,t){var n=e.children,c=e.className,o=void 0===c?"":c;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-sidebar",o)},n)}));t.a=s},807:function(e,t,n){"use strict";var r=n(0),c=n(27),o=Object(r.createElement)(c.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},808:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(99),a=n(255),s=(n(2),n(30)),i=n(4),l=(n(338),{context:"summary"});t.a=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,u=e.currency,p=e.isRemovingCoupon,d=e.removeCoupon,b=e.values,m=b.total_discount,f=b.total_discount_tax,O=parseInt(m,10);if(!O&&0===n.length)return null;var g=parseInt(f,10),h=Object(i.getSetting)("displayCartPricesIncludingTax",!1)?O+g:O,j=Object(s.__experimentalApplyCheckoutFilter)({arg:l,filterName:"coupons",defaultValue:n});return Object(r.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:u,description:0!==j.length&&Object(r.createElement)(o.a,{screenReaderLabel:Object(c.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:p,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map((function(e){return Object(r.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(c.sprintf)(
+/* translators: %s Coupon code. */
+Object(c.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:p,onRemove:function(){d(e.code)},radius:"large",ariaLabel:Object(c.sprintf)(
+/* translators: %s is a coupon code. */
+Object(c.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})})))),label:h?Object(c.__)("Discount","woo-gutenberg-products-block"):Object(c.__)("Coupons","woo-gutenberg-products-block"),value:h?-1*h:"-"})}},809:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),a=n(1),s=n(109),i=n(363),l=n(42),u=n(99),p=(n(2),n(20)),d=n(148),b=n(275),m=n(30);n(340),t.a=Object(p.withInstanceId)((function(e){var t=e.instanceId,n=e.isLoading,r=void 0!==n&&n,p=e.initialOpen,f=void 0!==p&&p,O=e.onSubmit,g=void 0===O?function(){}:O,h=Object(o.useState)(""),j=c()(h,2),v=j[0],y=j[1],E=Object(o.useRef)(!1),_=Object(d.b)(),w=_.getValidationError,k=_.getValidationErrorId,S=w("coupon");Object(o.useEffect)((function(){E.current!==r&&(r||!v||S||y(""),E.current=r)}),[r,v,S]);var C="wc-block-components-totals-coupon__input-".concat(t);return Object(o.createElement)(m.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:f,title:Object(o.createElement)(l.a,{label:Object(a.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:C})},Object(o.createElement)(u.a,{screenReaderLabel:Object(a.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:r,showSpinner:!1},Object(o.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(o.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(o.createElement)(i.a,{id:C,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(a.__)("Enter code","woo-gutenberg-products-block"),value:v,ariaDescribedBy:k(C),onChange:function(e){y(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),Object(o.createElement)(s.a,{className:"wc-block-components-totals-coupon__button",disabled:r||!v,showSpinner:r,onClick:function(e){e.preventDefault(),g(v)},type:"submit"},Object(a.__)("Apply","woo-gutenberg-products-block"))),Object(o.createElement)(b.a,{propertyName:"coupon",elementId:C}))))}))},812:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return c}));var r=function(e){return e.length},c=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},813:function(e,t,n){"use strict";var r=n(21),c=n.n(r),o=n(0),a=n(1),s=n(59),i=(n(2),n(30)),l=n(52),u=n(4),p=(n(347),["receiveCart"]);t.a=function(e){var t=e.currency,n=e.values,r=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),d=n.total_price,b=n.total_tax,m=Object(l.a)(),f=(m.receiveCart,c()(m,p)),O=Object(i.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(a.__)("Total","woo-gutenberg-products-block"),extensions:f.extensions,arg:{cart:f}}),g=parseInt(b,10);return Object(o.createElement)(i.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:O,value:parseInt(d,10),description:r&&0!==g&&Object(o.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(o.createInterpolateElement)(Object(a.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(o.createElement)(s.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},814:function(e,t,n){"use strict";var r=n(0),c=n(27),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",{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},819:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return g}));var r=n(5),c=n.n(r),o=n(12),a=n(70),s=n(14),i=n(0),l=n(44),u=n(51),p=n(24);function d(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 b(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},f=function(){Object(u.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||Object(s.subscribe)((function(){var e,t,n,r,c=Object(s.select)(o.store);if(c){var a=c.getSelectedBlock();a&&(m("wc-lock-selected-block--remove",!(null==a||null===(e=a.attributes)||void 0===e||null===(t=e.lock)||void 0===t||!t.remove)),m("wc-lock-selected-block--move",!(null==a||null===(n=a.attributes)||void 0===n||null===(r=n.lock)||void 0===r||!r.move)))}}))},O=function(e){var t=e.ref,n=Object(u.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),r=t.current;return Object(i.useEffect)((function(){if(r&&!n)return r.addEventListener("keydown",e,{capture:!0,passive:!1}),function(){r.removeEventListener("keydown",e,{capture:!0})};function e(e){var t=e.keyCode,n=e.target;if(n instanceof HTMLElement&&(t===l.BACKSPACE||t===l.DELETE)&&!Object(a.isTextField)(n)){var r=n;void 0!==r.dataset.block&&function(e){var t,n,r,c,a;if(!e)return!1;var i=(0,Object(s.select)(o.store).getBlock)(e);if("boolean"==typeof(null==i||null===(t=i.attributes)||void 0===t||null===(n=t.lock)||void 0===n?void 0:n.remove))return i.attributes.lock.remove;var l,u,d,b=Object(p.getBlockType)(i.name);return"boolean"==typeof(null==b||null===(r=b.attributes)||void 0===r||null===(c=r.lock)||void 0===c||null===(a=c.default)||void 0===a?void 0:a.remove)&&(null==b||null===(l=b.attributes)||void 0===l||null===(u=l.lock)||void 0===u||null===(d=u.default)||void 0===d?void 0:d.remove)}(r.dataset.block)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}}}),[r,n])},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(i.useRef)(),n=Object(o.useBlockProps)(b({ref:t},e));return O({ref:t}),n}},820:function(e,t,n){e.exports=n(845)},821:function(e,t){},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){},84:function(e,t,n){"use strict";n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return w}));var r=n(8),c=n.n(r),o=n(0),a=n(4),s=n(5),i=n.n(s),l=n(14),u=n(25),p=n(364),d=n(36),b=n.n(d),m=n(369),f=n(40),O=n(52),g=n(67);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 j(e){for(var t=1;tpage settings in WooCommerce.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:Object(y.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(h.PanelBody,{title:Object(c.__)("Style","woo-gutenberg-products-block")},Object(r.createElement)(h.ToggleControl,{label:Object(c.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(c.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:o,onChange:function(){return n({hasDarkControls:!o})}})),Object(r.createElement)(j.a,null))},R={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(y.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(y.getSetting)("displayCartPricesIncludingTax",!1)}},x=n(889),T=n(890),A=n(803),I=n(30),M=n(800),D=n(801),B=(n(821),n(527));Object(u.d)(B,{icon:{src:Object(r.createElement)(x.a,{icon:T.a}),foreground:"#7f54b3"},edit:function(e){var t=e.clientId,n=e.attributes,c=Object(d.useBlockProps)({className:a()("wc-block-checkout__main",null==n?void 0:n.className)}),o=Object(M.a)(I.innerBlockAreas.CHECKOUT_FIELDS),s=C().addressFieldControls,i=[["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:o,defaultTemplate:i}),Object(r.createElement)(A.a,c,Object(r.createElement)(s,null),Object(r.createElement)("form",{className:"wc-block-components-form wc-block-checkout__form"},Object(r.createElement)(d.InnerBlocks,{allowedBlocks:o,templateLock:!1,template:i,renderAppender:d.InnerBlocks.ButtonBlockAppender})))},save:function(){return Object(r.createElement)("div",d.useBlockProps.save(),Object(r.createElement)(d.InnerBlocks.Content,null))}});var L=n(806),F=(n(822),n(528));Object(u.d)(F,{icon:{src:Object(r.createElement)(x.a,{icon:T.a}),foreground:"#7f54b3"},edit:function(e){var t=e.clientId,n=e.attributes,c=Object(d.useBlockProps)({className:a()("wc-block-checkout__sidebar",null==n?void 0:n.className)}),o=S().showRateAfterTaxName,s=Object(M.a)(I.innerBlockAreas.CHECKOUT_TOTALS),i=[["woocommerce/checkout-order-summary-block",{showRateAfterTaxName:o},[]]];return Object(D.a)({clientId:t,registeredBlocks:s,defaultTemplate:i}),Object(r.createElement)(L.a,c,Object(r.createElement)(d.InnerBlocks,{allowedBlocks:s,templateLock:!1,template:i,renderAppender:d.InnerBlocks.ButtonBlockAppender}))},save:function(){return Object(r.createElement)("div",d.useBlockProps.save(),Object(r.createElement)(d.InnerBlocks.Content,null))}});var V=Object(r.createElement)(i.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=n(163),z=function(e){var t=e.children,n=e.stepHeadingContent;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),!!n&&Object(r.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},n))},H=function(e){var t=e.attributes,n=e.setAttributes,o=e.className,s=void 0===o?"":o,i=e.children,l=t.title,u=void 0===l?"":l,p=t.description,b=void 0===p?"":p,m=t.showStepNumber,f=void 0===m||m,O=Object(d.useBlockProps)({className:a()("wc-block-components-checkout-step",s,{"wc-block-components-checkout-step--with-step-number":f})});return Object(r.createElement)("div",O,Object(r.createElement)(d.InspectorControls,null,Object(r.createElement)(h.PanelBody,{title:Object(c.__)("Form Step Options","woo-gutenberg-products-block")},Object(r.createElement)(h.ToggleControl,{label:Object(c.__)("Show step number","woo-gutenberg-products-block"),checked:f,onChange:function(){return n({showStepNumber:!f})}}))),Object(r.createElement)(z,null,Object(r.createElement)(d.PlainText,{className:"",value:u,onChange:function(e){return n({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)(d.PlainText,{className:b?"":"wc-block-components-checkout-step__description-placeholder",value:b,placeholder:Object(c.__)("Optional text for this form step.","woo-gutenberg-products-block"),onChange:function(e){return n({description:e})}})),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))},G=(n(823),function(e){var t=e.block,n=Object(d.useBlockProps)()["data-block"],c=Object(M.a)(t);return Object(D.a)({clientId:n,registeredBlocks:c}),Object(r.createElement)("div",{className:"wc-block-checkout__additional_fields"},Object(r.createElement)(d.InnerBlocks,{allowedBlocks:c}))}),q=function(){return Object(r.createElement)(d.InnerBlocks.Content,null)},Y=n(892),W=n(850),$=n(5),K=n.n($),X=n(21),J=n.n(X),Q=n(100),Z=n(84),ee=["email"];function te(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 ne=function(){var e=Object(Q.b)().needsShipping,t=Object(Z.b)(),n=t.billingData,c=t.setBillingData,o=t.shippingAddress,a=t.setShippingAddress,s=t.shippingAsBilling,i=t.setShippingAsBilling,l=Object(r.useRef)(s),u=Object(r.useRef)(n),p=Object(r.useCallback)((function(e){a(e),s&&c(e)}),[s,a,c]),d=Object(r.useCallback)((function(t){c(t),e||a(t)}),[e,a,c]);Object(r.useEffect)((function(){if(l.current!==s){if(s)u.current=n,c(o);else{var e=u.current,t=(e.email,J()(e,ee));c(function(e){for(var t=1;t').concat(Object(c.__)("Terms and Conditions","woo-gutenberg-products-block"),""):Object(c.__)("Terms and Conditions","woo-gutenberg-products-block")),fe=v.g?'').concat(Object(c.__)("Privacy Policy","woo-gutenberg-products-block"),""):Object(c.__)("Privacy Policy","woo-gutenberg-products-block"),Oe=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"),me,fe),ge=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"),me,fe),he=n(530);Object(u.d)(he,{icon:{src:Object(r.createElement)(s.a,{srcElement:de}),foreground:"#7f54b3"},edit:function(e){var t=e.attributes,n=t.checkbox,o=t.text,a=e.setAttributes,s=Object(d.useBlockProps)(),i=o||(n?ge:Oe);return Object(r.createElement)("div",s,Object(r.createElement)(d.InspectorControls,null,Object(r.createElement)(h.PanelBody,{title:Object(c.__)("Display options","woo-gutenberg-products-block")},Object(r.createElement)(h.ToggleControl,{label:Object(c.__)("Require checkbox","woo-gutenberg-products-block"),checked:n,onChange:function(){return a({checkbox:!n})}}))),Object(r.createElement)("div",{className:"wc-block-checkout__terms"},n?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(I.CheckboxControl,{id:"terms-condition",checked:!1}),Object(r.createElement)(d.RichText,{value:i,onChange:function(e){return a({text:e})}})):Object(r.createElement)(d.RichText,{tagName:"span",value:i,onChange:function(e){return a({text:e})}})),(!v.k||!v.g)&&Object(r.createElement)(h.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:[!v.k&&{className:"wc-block-checkout__terms_notice-button",label:Object(r.createElement)(r.Fragment,null,Object(c.__)("Setup a Terms and Conditions page","woo-gutenberg-products-block"),Object(r.createElement)(x.a,{icon:be.a,size:16,className:"wc-block-checkout__terms_notice-button__icon"})),onClick:function(){return window.open("".concat(y.ADMIN_URL,"admin.php?page=wc-settings&tab=advanced"),"_blank")}},!v.g&&{className:"wc-block-checkout__terms_notice-button",label:Object(r.createElement)(r.Fragment,null,Object(c.__)("Setup a Privacy Policy page","woo-gutenberg-products-block"),Object(r.createElement)(x.a,{size:16,icon:be.a,className:"wc-block-checkout__terms_notice-button__icon"})),onClick:function(){return window.open("".concat(y.ADMIN_URL,"options-privacy.php"),"_blank")}}].filter(Boolean)},Object(r.createElement)("p",null,Object(c.__)("You don't seem to have a Terms and Conditions and/or a Privacy Policy pages setup.","woo-gutenberg-products-block"))),v.k&&v.g&&!(i.includes(v.k)&&i.includes(v.g))&&Object(r.createElement)(h.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:Oe!==o?[{label:Object(c.__)("Restore default text","woo-gutenberg-products-block"),onClick:function(){return a({text:""})}}]:[]},Object(r.createElement)("p",null,Object(c.__)("Ensure you add links to your policy pages in this section.","woo-gutenberg-products-block"))))},save:function(){return Object(r.createElement)("div",d.useBlockProps.save())}});var je=Object(r.createElement)(i.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"}))),ve=n(77),ye=function(e){var t=e.allowCreateAccount,n=Object(ve.b)(),o=n.customerId,a=n.shouldCreateAccount,s=n.setShouldCreateAccount,i=ne(),l=i.billingFields,u=i.setEmail,p=Object(re.a)().dispatchCheckoutEvent,d=!o&&t&&Object(y.getSetting)("checkoutAllowsGuest",!1)&&Object(y.getSetting)("checkoutAllowsSignup",!1)&&Object(r.createElement)(I.CheckboxControl,{className:"wc-block-checkout__create-account",label:Object(c.__)("Create an account?","woo-gutenberg-products-block"),checked:a,onChange:function(e){return s(e)}});return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(ce.a,{id:"email",type:"email",label:Object(c.__)("Email address","woo-gutenberg-products-block"),value:l.email,autoComplete:"email",onChange:function(e){u(e),p("set-email-address")},required:!0}),d)};function Ee(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;t")},mt=function(e){var t=e.cartItem,n=t.images,o=t.low_stock_remaining,s=t.show_backorder_badge,i=t.name,l=t.permalink,u=t.prices,p=t.quantity,d=t.short_description,b=t.description,m=t.item_data,f=t.variation,O=t.totals,g=t.extensions,h=Object(st.a)(),j=(h.receiveCart,J()(h,dt)),v=Object(r.useMemo)((function(){return{context:"summary",cartItem:t,cart:j}}),[t,j]),E=Object(ot.getCurrencyFromPriceResponse)(u),_=Object(I.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:i,extensions:g,arg:v}),w=Object(at.a)({amount:parseInt(u.raw_prices.regular_price,10),precision:parseInt(u.raw_prices.precision,10)}).convertPrecision(E.minorUnit).getAmount(),k=Object(at.a)({amount:parseInt(u.raw_prices.price,10),precision:parseInt(u.raw_prices.precision,10)}).convertPrecision(E.minorUnit).getAmount(),S=Object(ot.getCurrencyFromPriceResponse)(O),C=parseInt(O.line_subtotal,10);Object(y.getSetting)("displayCartPricesIncludingTax",!1)&&(C+=parseInt(O.line_subtotal_tax,10));var P=Object(at.a)({amount:C,precision:S.minorUnit}).getAmount(),N=Object(I.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:g,arg:v,validation:bt}),R=Object(I.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:g,arg:v,validation:bt}),x=Object(I.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:g,arg:v});return Object(r.createElement)("div",{className:a()("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)(nt.a,{label:p,screenReaderLabel:Object(c.sprintf)(
+/* translators: %d number of products of the same type in the cart */
+Object(c._n)("%d item","%d items",p,"woo-gutenberg-products-block"),p)})),Object(r.createElement)(lt.a,{image:n.length?n[0]:{},fallbackAlt:_})),Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__description"},Object(r.createElement)(ct.a,{disabled:!0,name:_,permalink:l}),Object(r.createElement)(rt.a,{currency:E,price:k,regularPrice:w,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:N}),s?Object(r.createElement)(it.a,null):!!o&&Object(r.createElement)(ut.a,{lowStockRemaining:o}),Object(r.createElement)(pt.a,{shortDescription:d,fullDescription:b,itemData:m,variation:f})),Object(r.createElement)("span",{className:"screen-reader-text"},Object(c.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(c._n)("Total price for %1$d %2$s item: %3$s","Total price for %1$d %2$s items: %3$s",p,"woo-gutenberg-products-block"),p,_,Object(ot.formatPrice)(P,S))),Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},Object(r.createElement)(rt.a,{currency:S,format:R,price:P})))},ft=(n(831),function(e){var t=e.cartItems,n=void 0===t?[]:t,o=Object(tt.b)(),a=o.isLarge;return o.hasContainerWidth?Object(r.createElement)(I.Panel,{className:"wc-block-components-order-summary",initialOpen:a,hasBorder:!1,title:Object(r.createElement)("span",{className:"wc-block-components-order-summary__button-text"},Object(c.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},Object(r.createElement)("div",{className:"wc-block-components-order-summary__content"},n.map((function(e){return Object(r.createElement)(mt,{key:e.key,cartItem:e})})))):null}),Ot=n(808),gt=n(809),ht=n(853),jt=n(813),vt=n(253),yt=["extensions","receiveCart"],Et=function(e){var t=e.showRateAfterTaxName,n=void 0!==t&&t,c=e.className,o=Object(st.a)(),a=o.cartItems,s=o.cartTotals,i=o.cartCoupons,l=o.cartFees,u=Object(vt.a)(),p=u.applyCoupon,d=u.removeCoupon,b=u.isApplyingCoupon,m=u.isRemovingCoupon,f=Object(Q.b)().needsShipping,O=Object(ot.getCurrencyFromPriceResponse)(s),g=Object(st.a)(),h=g.extensions,j=(g.receiveCart,{extensions:h,cart:J()(g,yt)});return Object(r.createElement)("div",{className:c},Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(ft,{cartItems:a})),Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(I.Subtotal,{currency:O,values:s}),Object(r.createElement)(I.TotalsFees,{currency:O,cartFees:l}),Object(r.createElement)(Ot.a,{cartCoupons:i,currency:O,isRemovingCoupon:m,removeCoupon:d,values:s})),Object(y.getSetting)("couponsEnabled",!0)&&Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(gt.a,{onSubmit:p,initialOpen:!1,isLoading:b})),f&&Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(ht.a,{showCalculator:!1,showRateSelector:!1,values:s,currency:O})),Object(r.createElement)(I.ExperimentalDiscountsMeta.Slot,j),!Object(y.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(s.total_tax,10)>0&&Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(I.TotalsTaxes,{currency:O,showRateAfterTaxName:n,values:s})),Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(jt.a,{currency:O,values:s})),Object(r.createElement)(I.ExperimentalOrderMeta.Slot,j))},_t={showRateAfterTaxName:{type:"boolean",default:Object(y.getSetting)("displayCartPricesIncludingTax",!1)},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},wt=n(535);Object(u.d)(wt,{icon:{src:Object(r.createElement)(s.a,{srcElement:et.a}),foreground:"#7f54b3"},attributes:_t,edit:function(e){var t=e.attributes,n=e.setAttributes,o=Object(d.useBlockProps)(),a=Object(y.getSetting)("taxesEnabled"),s=Object(y.getSetting)("displayItemizedTaxes",!1),i=Object(y.getSetting)("displayCartPricesIncludingTax",!1);return Object(r.createElement)("div",o,Object(r.createElement)(d.InspectorControls,null,a&&s&&!i&&Object(r.createElement)(h.PanelBody,{title:Object(c.__)("Taxes","woo-gutenberg-products-block")},Object(r.createElement)(h.ToggleControl,{label:Object(c.__)("Show rate after tax name","woo-gutenberg-products-block"),help:Object(c.__)("Show the percentage rate alongside each tax line in the summary.","woo-gutenberg-products-block"),checked:t.showRateAfterTaxName,onChange:function(){return n({showRateAfterTaxName:!t.showRateAfterTaxName})}}))),Object(r.createElement)(h.Disabled,null,Object(r.createElement)(Et,{showRateAfterTaxName:t.showRateAfterTaxName})))},save:function(){return Object(r.createElement)("div",d.useBlockProps.save())}});var kt=n(814),St=(n(832),function(e){var t=e.href,n=e.title,o=e.description;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"},n),o&&Object(r.createElement)("span",{className:"wc-block-editor-components-external-link-card__description"},o)),Object(r.createElement)(h.VisuallyHidden,{as:"span"},
+/* translators: accessibility text */
+Object(c.__)("(opens in a new tab)","woo-gutenberg-products-block")),Object(r.createElement)(x.a,{icon:be.a,className:"wc-block-editor-components-external-link-card__icon"}))}),Ct=n(174),Pt=n(64),Nt=n(888),Rt=n(185),xt=n(887),Tt=(n(833),function(){return Object(r.createElement)(Nt.a,{icon:Object(r.createElement)(s.a,{srcElement:kt.a}),label:Object(c.__)("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(c.__)("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)(Rt.a,{isSecondary:!0,href:"".concat(y.ADMIN_URL,"admin.php?page=wc-settings&tab=checkout"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Configure Payment Methods","woo-gutenberg-products-block")))}),At=function(){return Object(r.createElement)(xt.a,{isDismissible:!1,className:a()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(c.__)("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"))},It=function(){return Object(m.b)().isEditor?Object(r.createElement)(Tt,null):Object(r.createElement)(At,null)},Mt=n(361),Dt=n(67),Bt=n(43),Lt=n.n(Bt),Ft=n(20),Vt=n(161),Ut=Object(Ft.withInstanceId)((function(e){var t=e.className,n=e.instanceId,c=e.id,o=e.selected,s=e.onChange,i=e.options,l=void 0===i?[]:i,u=c||n;return l.length&&Object(r.createElement)("div",{className:a()("wc-block-components-radio-control",t)},l.map((function(e){var t="object"===Lt()(e)&&"content"in e,n=e.value===o;return Object(r.createElement)("div",{className:"wc-block-components-radio-control-accordion-option",key:e.value},Object(r.createElement)(Vt.a,{name:"radio-control-".concat(u),checked:n,option:e,onChange:function(t){s(t),"function"==typeof e.onChange&&e.onChange(t)}}),t&&n&&Object(r.createElement)("div",{className:a()("wc-block-components-radio-control-accordion-content",{"wc-block-components-radio-control-accordion-content-hide":!n})},e.content))})))})),zt=n(199),Ht=function(e){var t=e.children,n=e.showSaveOption,o=Object(m.b)().isEditor,a=Object(De.b)(),s=a.shouldSavePayment,i=a.setShouldSavePayment,l=Object(ve.b)().customerId;return Object(r.createElement)(zt.a,{isEditor:o},t,l>0&&n&&Object(r.createElement)(I.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:Object(c.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:s,onChange:function(){return i(!s)}}))},Gt=["activePaymentMethod"];function qt(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 Yt(e){for(var t=1;t0?Object(r.createElement)(r.Fragment,null,Object(r.createElement)($t.a,{id:"wc-payment-method-saved-tokens",selected:l,onChange:f,options:m.current}),O):null},Qt=function(){var e=Object(Be.b)(),t=e.isInitialized,n=e.paymentMethods,o=Object(De.b)().customerPaymentMethods;return t&&0===Object.keys(n).length?Object(r.createElement)(It,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Jt,null),Object.keys(o).length>0&&Object(r.createElement)(nt.a,{label:Object(c.__)("Use another payment method.","woo-gutenberg-products-block"),screenReaderLabel:Object(c.__)("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)(Wt,null))},Zt=function(){var e=Object(Pt.c)().noticeContexts;return Object(r.createElement)(Ct.a,{context:e.PAYMENTS},Object(r.createElement)(Qt,null))};function en(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 tn(e){for(var t=1;t0&&Object(r.createElement)(h.PanelBody,{title:Object(c.__)("Methods","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(c.__)("You currently have the following payment integrations active.","woo-gutenberg-products-block")),o.map((function(e){return Object(r.createElement)(St,{key:e.id,href:"".concat(y.ADMIN_URL,"admin.php?page=wc-settings&tab=checkout§ion=").concat(e.id),title:e.title,description:e.description})})),Object(r.createElement)(h.ExternalLink,{href:"".concat(y.ADMIN_URL,"admin.php?page=wc-settings&tab=checkout")},Object(c.__)("Manage payment methods","woo-gutenberg-products-block")))),Object(r.createElement)(h.Disabled,null,Object(r.createElement)(Zt,null)),Object(r.createElement)(G,{block:I.innerBlockAreas.PAYMENT_METHODS}))},save:function(){return Object(r.createElement)("div",d.useBlockProps.save(),Object(r.createElement)(q,null))}});var cn=n(99),on=n(248),an=(n(348),function(){var e=Object(ve.b)(),t=e.isCalculating,n=e.isProcessing,o=e.isAfterProcessing,a=e.isBeforeProcessing,s=e.isComplete,i=e.hasError,l=Object(De.b)().currentStatus,u=Object(Be.a)(),p=u.paymentMethods,d=u.isInitialized,b=Object(m.b)().isEditor,f=Object(Pt.c)().noticeContexts;if(!d||d&&0===Object.keys(p).length)return b||y.CURRENT_USER_IS_ADMIN?Object(r.createElement)(Ct.a,{context:f.EXPRESS_PAYMENTS}):null;var O=n||o||a||s&&!i;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(cn.a,{isLoading:t||O||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(c.__)("Express checkout","woo-gutenberg-products-block"))),Object(r.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(r.createElement)(Ct.a,{context:f.EXPRESS_PAYMENTS},Object(r.createElement)("p",null,Object(c.__)("In a hurry? Use one of our express checkout options:","woo-gutenberg-products-block")),Object(r.createElement)(on.a,null))))),Object(r.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(c.__)("Or continue below","woo-gutenberg-products-block")))}),sn=function(e){var t=e.className;return Object(st.a)().cartNeedsPayment?Object(r.createElement)("div",{className:t},Object(r.createElement)(an,null)):null},ln=(n(834),function(){return Object(r.createElement)(Nt.a,{icon:Object(r.createElement)(s.a,{srcElement:kt.a}),label:Object(c.__)("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(c.__)("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)(Rt.a,{isPrimary:!0,href:"".concat(y.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(c.__)("Configure Payment Methods","woo-gutenberg-products-block")))}),un=n(537);Object(u.d)(un,{icon:{src:Object(r.createElement)(s.a,{srcElement:kt.a}),foreground:"#7f54b3"},edit:function(e){var t=e.attributes,n=Object(Be.a)(),c=n.paymentMethods,o=n.isInitialized,s=Object.keys(c).length>0,i=Object(d.useBlockProps)({className:a()({"wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods":s},null==t?void 0:t.className),attributes:t});return o?Object(r.createElement)("div",i,s?Object(r.createElement)(sn,null):Object(r.createElement)(ln,null)):null},save:function(){return Object(r.createElement)("div",d.useBlockProps.save())}});var pn=Object(r.createElement)(i.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"})),dn=n(252),bn=n(812),mn=n(59),fn=n(26),On=(n(836),function(){return Object(r.createElement)(Nt.a,{icon:Object(r.createElement)(s.a,{srcElement:pn}),label:Object(c.__)("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(c.__)("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)(Rt.a,{isSecondary:!0,href:"".concat(y.ADMIN_URL,"admin.php?page=wc-settings&tab=shipping"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Configure Shipping Options","woo-gutenberg-products-block")))}),gn=(n(835),function(e){var t=Object(y.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(fn.decodeEntities)(e.name),value:e.rate_id,description:Object(fn.decodeEntities)(e.description),secondaryLabel:Object(r.createElement)(mn.a,{currency:Object(ot.getCurrencyFromPriceResponse)(e),value:t}),secondaryDescription:Object(fn.decodeEntities)(e.delivery_time)}}),hn=function(){var e=Object(m.b)().isEditor,t=Object(Q.b)(),n=t.shippingRates,o=t.shippingRatesLoading,s=t.needsShipping,i=t.hasCalculatedShipping;if(!s)return null;var l=Object(bn.a)(n);return e||i||l?Object(r.createElement)(r.Fragment,null,e&&!l?Object(r.createElement)(On,null):Object(r.createElement)(dn.a,{noResultsMessage:Object(r.createElement)(xt.a,{isDismissible:!1,className:a()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(c.__)("There are no shipping options available. Please check your shipping address.","woo-gutenberg-products-block")),renderOption:gn,shippingRates:n,shippingRatesLoading:o})):Object(r.createElement)("p",null,Object(c.__)("Shipping options will be displayed here after entering your full shipping address.","woo-gutenberg-products-block"))};function jn(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 vn(e){for(var t=1;t0&&Object(r.createElement)(h.PanelBody,{title:Object(c.__)("Methods","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(c.__)("You currently have the following shipping integrations active.","woo-gutenberg-products-block")),o.map((function(e){return Object(r.createElement)(St,{key:e.id,href:"".concat(y.ADMIN_URL,"admin.php?page=wc-settings&tab=shipping§ion=").concat(e.id),title:e.title,description:e.description})})),Object(r.createElement)(h.ExternalLink,{href:"".concat(y.ADMIN_URL,"admin.php?page=wc-settings&tab=shipping")},Object(c.__)("Manage shipping methods","woo-gutenberg-products-block"))),s.length&&Object(r.createElement)(h.PanelBody,{title:Object(c.__)("Zones","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(c.__)("You currently have the following shipping zones active.","woo-gutenberg-products-block")),s.map((function(e){return Object(r.createElement)(St,{key:e.id,href:"".concat(y.ADMIN_URL,"admin.php?page=wc-settings&tab=shipping&zone_id=").concat(e.id),title:e.title,description:e.description})})),Object(r.createElement)(h.ExternalLink,{href:"".concat(y.ADMIN_URL,"admin.php?page=wc-settings&tab=shipping")},Object(c.__)("Manage shipping zones","woo-gutenberg-products-block")))),Object(r.createElement)(h.Disabled,null,Object(r.createElement)(hn,null)),Object(r.createElement)(G,{block:I.innerBlockAreas.SHIPPING_METHODS}))},save:function(){return Object(r.createElement)("div",d.useBlockProps.save(),Object(r.createElement)(q,null))}});var wn={title:Object(c.__)("Checkout","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(s.a,{srcElement:l}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("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:function(e){var t=e.attributes,n=e.setAttributes,o=t.allowCreateAccount,s=t.showCompanyField,i=t.requireCompanyField,l=t.showApartmentField,u=t.showPhoneField,p=t.requirePhoneField,j=t.showOrderNotes,v=t.showPolicyLinks,y=t.showReturnToCart,S=t.showRateAfterTaxName,C=t.cartPageId,R=function(e){var r={};r[e]=!t[e],n(r)},x=Object(_.b)();return Object(r.createElement)("div",x,Object(r.createElement)(m.a,{previewData:{previewCart:O.a,previewSavedPaymentMethods:g}},Object(r.createElement)(N,{attributes:t,setAttributes:n}),Object(r.createElement)(f.a,null,Object(r.createElement)(b.a,{className:a()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(r.createElement)(k.Provider,{value:{addressFieldControls:function(){return Object(r.createElement)(d.InspectorControls,null,Object(r.createElement)(h.PanelBody,{title:Object(c.__)("Address Fields","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(c.__)("Show or hide fields in the checkout address forms.","woo-gutenberg-products-block")),Object(r.createElement)(h.ToggleControl,{label:Object(c.__)("Company","woo-gutenberg-products-block"),checked:s,onChange:function(){return R("showCompanyField")}}),s&&Object(r.createElement)(h.CheckboxControl,{label:Object(c.__)("Require company name?","woo-gutenberg-products-block"),checked:i,onChange:function(){return R("requireCompanyField")},className:"components-base-control--nested"}),Object(r.createElement)(h.ToggleControl,{label:Object(c.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),checked:l,onChange:function(){return R("showApartmentField")}}),Object(r.createElement)(h.ToggleControl,{label:Object(c.__)("Phone","woo-gutenberg-products-block"),checked:u,onChange:function(){return R("showPhoneField")}}),u&&Object(r.createElement)(h.CheckboxControl,{label:Object(c.__)("Require phone number?","woo-gutenberg-products-block"),checked:p,onChange:function(){return R("requirePhoneField")},className:"components-base-control--nested"})))},accountControls:function(){return Object(r.createElement)(d.InspectorControls,null,Object(r.createElement)(h.PanelBody,{title:Object(c.__)("Account options","woo-gutenberg-products-block")},Object(r.createElement)(h.ToggleControl,{label:Object(c.__)("Allow shoppers to sign up for a user account during checkout","woo-gutenberg-products-block"),checked:o,onChange:function(){return n({allowCreateAccount:!o})}})))}}},Object(r.createElement)(w.Provider,{value:{allowCreateAccount:o,showCompanyField:s,requireCompanyField:i,showApartmentField:l,showPhoneField:u,requirePhoneField:p,showOrderNotes:j,showPolicyLinks:v,showReturnToCart:y,cartPageId:C,showRateAfterTaxName:S}},Object(r.createElement)(d.InnerBlocks,{allowedBlocks:P,template:[["woocommerce/checkout-fields-block",{},[]],["woocommerce/checkout-totals-block",{},[]]],templateLock:"insert"})))))),Object(r.createElement)(E.a,{blockName:"checkout"}))},save:function(){return Object(r.createElement)("div",d.useBlockProps.save({className:"wc-block-checkout is-loading"}),Object(r.createElement)(d.InnerBlocks.Content,null))},deprecated:[{attributes:R,save:function(e){var t=e.attributes;return Object(r.createElement)("div",{className:a()("is-loading",t.className)})},migrate:function(e){var t=e.showOrderNotes,n=e.showPolicyLinks,r=e.showReturnToCart,c=e.cartPageId;return[e,[Object(p.createBlock)("woocommerce/checkout-fields-block",{},[Object(p.createBlock)("woocommerce/checkout-express-payment-block",{},[]),Object(p.createBlock)("woocommerce/checkout-contact-information-block",{},[]),Object(p.createBlock)("woocommerce/checkout-shipping-address-block",{},[]),Object(p.createBlock)("woocommerce/checkout-billing-address-block",{},[]),Object(p.createBlock)("woocommerce/checkout-shipping-methods-block",{},[]),Object(p.createBlock)("woocommerce/checkout-payment-block",{},[]),!!t&&Object(p.createBlock)("woocommerce/checkout-order-note-block",{},[]),!!n&&Object(p.createBlock)("woocommerce/checkout-terms-block",{},[]),Object(p.createBlock)("woocommerce/checkout-actions-block",{showReturnToCart:r,cartPageId:c},[])].filter(Boolean)),Object(p.createBlock)("woocommerce/checkout-totals-block",{})]]},isEligible:function(e,t){return!t.some((function(e){return"woocommerce/checkout-fields-block"===e.name}))}}]};Object(u.d)("woocommerce/checkout",wn)},850:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(0),a=n(363),s=n(10),i=n.n(s),l=n(37),u=n(1),p=n(26),d=n(6),b=n.n(d),m=n(20),f=n(896),O=n(148),g=n(275),h=n(117),j=(n(343),Object(m.withInstanceId)((function(e){var t=e.id,n=e.className,r=e.label,a=e.onChange,s=e.options,i=e.value,l=e.required,p=void 0!==l&&l,d=e.errorMessage,m=void 0===d?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):d,j=e.errorId,v=e.instanceId,y=void 0===v?"0":v,E=e.autoComplete,_=void 0===E?"off":E,w=Object(O.b)(),k=w.getValidationError,S=w.setValidationErrors,C=w.clearValidationError,P=Object(o.useRef)(null),N=t||"control-"+y,R=j||N,x=k(R)||{message:"",hidden:!1};return Object(o.useEffect)((function(){return!p||i?C(R):S(c()({},R,{message:m,hidden:!0})),function(){C(R)}}),[C,i,R,m,p,S]),Object(o.createElement)("div",{id:N,className:b()("wc-block-components-combobox",n,{"is-active":i,"has-error":x.message&&!x.hidden}),ref:P},Object(o.createElement)(f.a,{className:"wc-block-components-combobox-control",label:r,onChange:a,onFilterValueChange:function(e){if(e.length){var t=Object(h.b)(P.current)?P.current.ownerDocument.activeElement:void 0;if(t&&Object(h.b)(P.current)&&P.current.contains(t))return;var n=e.toLocaleUpperCase(),r=s.find((function(e){return e.label.toLocaleUpperCase().startsWith(n)||e.value.toLocaleUpperCase()===n}));r&&a(r.value)}},options:s,value:i||"",allowReset:!1,autoComplete:_,"aria-invalid":x.message&&!x.hidden}),Object(o.createElement)(g.a,{propertyName:R}))}))),v=(n(342),function(e){var t=e.className,n=e.countries,r=e.id,c=e.label,a=e.onChange,s=e.value,i=void 0===s?"":s,l=e.autoComplete,d=void 0===l?"off":l,m=e.required,f=void 0!==m&&m,O=e.errorId,g=e.errorMessage,h=void 0===g?Object(u.__)("Please select a country.","woo-gutenberg-products-block"):g,v=Object(o.useMemo)((function(){return Object.keys(n).map((function(e){return{value:e,label:Object(p.decodeEntities)(n[e])}}))}),[n]);return Object(o.createElement)("div",{className:b()(t,"wc-block-components-country-input")},Object(o.createElement)(j,{id:r,label:c,onChange:a,options:v,value:i,errorId:O,errorMessage:h,required:f,autoComplete:d}),"off"!==d&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:d,value:i,onChange:function(e){var t=e.target.value.toLocaleUpperCase(),n=v.find((function(e){return 2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t}));a(n?n.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),y=function(e){return Object(o.createElement)(v,i()({countries:l.h},e))},E=function(e){return Object(o.createElement)(v,i()({countries:l.a},e))},_=(n(344),function(e,t){var n=t.find((function(t){return t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase()}));return n?n.value:""}),w=function(e){var t=e.className,n=e.id,r=e.states,c=e.country,s=e.label,i=e.onChange,l=e.autoComplete,d=void 0===l?"off":l,m=e.value,f=void 0===m?"":m,O=e.required,g=void 0!==O&&O,h=r[c],v=Object(o.useMemo)((function(){return h?Object.keys(h).map((function(e){return{value:e,label:Object(p.decodeEntities)(h[e])}})):[]}),[h]),y=Object(o.useCallback)((function(e){i(v.length>0?_(e,v):e)}),[i,v]),E=Object(o.useRef)(f);return Object(o.useEffect)((function(){E.current!==f&&(E.current=f)}),[f]),Object(o.useEffect)((function(){if(v.length>0&&E.current){var e=_(E.current,v);e!==E.current&&y(e)}}),[v,y]),v.length>0?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(j,{className:b()(t,"wc-block-components-state-input"),id:n,label:s,onChange:y,options:v,value:f,errorMessage:Object(u.__)("Please select a state.","woo-gutenberg-products-block"),required:g,autoComplete:d}),"off"!==d&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:d,value:f,onChange:function(e){return y(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(o.createElement)(a.a,{className:t,id:n,label:s,onChange:y,autoComplete:d,value:f,required:g})},k=function(e){return Object(o.createElement)(w,i()({states:l.i},e))},S=function(e){return Object(o.createElement)(w,i()({states:l.b},e))},C=n(58),P=n(4),N=n(133);function R(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 x(e){for(var t=1;t 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' => '42a6a94d0e9ad886daa469a5976ec8a6');
\ No newline at end of file
diff --git a/build/featured-category.js b/build/featured-category.js
new file mode 100644
index 00000000000..491e25a8406
--- /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 n,a,i=t[0],u=t[1],l=t[2],d=0,p=[];d100,l={per_page:u?100:0,catalog_visibility:"any",search:o,orderby:"title",order:"asc"},d=[Object(c.addQueryArgs)("/wc/store/products",p(p({},l),i))];return u&&r.length&&d.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),d}({selected:r,search:o,queryArgs:void 0===a?{}:a});return Promise.all(l.map((function(e){return i()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id").map((function(e){return p(p({},e),{},{parent:0})}))})).catch((function(e){throw e}))},b=function(e){return i()({path:"/wc/store/products/".concat(e)})},f=function(){return i()({path:"wc/store/products/attributes"})},m=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},w=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=Object(l.getSetting)("limitTags",!1),a=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:n})];return o&&r.length&&a.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:r})),a}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id")}))},h=function(e){return i()({path:Object(c.addQueryArgs)("wc/store/products/categories",p({per_page:0},e))})},O=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},y=function(e){return i()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},j=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return l}));var n=r(29),o=r.n(n),c=r(22),a=r.n(c),i=r(1),u=function(){var e=o()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),l=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},44:function(e,t){e.exports=window.wp.keycodes},45:function(e,t){e.exports=window.wp.escapeHtml},48:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(45));t.a=function(e){var t,r,a,i=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=i).message,a=t.type,r?"general"===a?Object(n.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):"api"===a?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):r:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},51:function(e,t){e.exports=window.wp.hooks},57:function(e,t){e.exports=window.wp.deprecated},61:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(21),a=r.n(c),i=r(0),u=["srcElement","size"];function l(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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=a()(e,u);return Object(i.isValidElement)(t)?Object(i.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;m({categoryId:t,mediaId:0,mediaSrc:""}),E()},isSingle:!0}),Object(n.createElement)(C.Button,{isPrimary:!0,onClick:function(){m({editMode:!1}),k(Object(o.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block")))):Object(n.createElement)(n.Fragment,null,(d=b.contentAlign,p=b.mediaSrc,g=b.mediaId||function(e){return e&&Object(I.isObject)(e.image)?e.image.id:0}(y),Object(n.createElement)(c.BlockControls,null,Object(n.createElement)(c.AlignmentToolbar,{value:d,onChange:function(e){m({contentAlign:e})}}),Object(n.createElement)(c.MediaReplaceFlow,{mediaId:g,mediaURL:p,accept:"image/*",onSelect:function(e){m({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"]}),Object(n.createElement)(C.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit selected category","woo-gutenberg-products-block"),onClick:function(){return m({editMode:!S})},isActive:S}]}))),(t=b.mediaSrc||D(y),a=void 0===(r=b.focalPoint)?{x:.5,y:.5}:r,l="function"==typeof C.FocalPointPicker,Object(n.createElement)(c.InspectorControls,{key:"inspector"},Object(n.createElement)(C.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(C.ToggleControl,{label:Object(o.__)("Show description","woo-gutenberg-products-block"),checked:b.showDesc,onChange:function(){return m({showDesc:!b.showDesc})}})),Object(n.createElement)(c.PanelColorSettings,{title:Object(o.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:j.color,onChange:v,label:Object(o.__)("Overlay Color","woo-gutenberg-products-block")}]},!!t&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(C.RangeControl,{label:Object(o.__)("Background Opacity","woo-gutenberg-products-block"),value:b.dimRatio,onChange:function(e){return m({dimRatio:e})},min:0,max:100,step:10}),l&&Object(n.createElement)(C.FocalPointPicker,{label:Object(o.__)("Focal Point Picker","woo-gutenberg-products-block"),url:t,value:a,onChange:function(e){return m({focalPoint:e})}}))))),y?function(){var e,t,r,a=b.className,u=b.contentAlign,l=b.dimRatio,s=b.focalPoint,d=b.height,p=b.showDesc,g=x()("wc-block-featured-category",{"is-selected":f&&"preview"!==b.productId,"is-loading":!y&&O,"is-not-found":!y&&!O,"has-background-dim":0!==l},0===(e=l)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==u&&"has-".concat(u,"-content"),a),w=b.mediaSrc||D(y),h=y&&(t=w)?{backgroundImage:"url(".concat(t,")")}:{};if(j.color&&(h.backgroundColor=j.color),s){var v=100*s.x,k=100*s.y;h.backgroundPosition="".concat(v,"% ").concat(k,"%")}return Object(n.createElement)(C.ResizableBox,{className:g,size:{height:d},minHeight:Object(i.getSetting)("min_height",500),enable:{bottom:!0},onResizeStop:function(e,t,r){m({height:parseInt(r.style.height,10)})},style:h},Object(n.createElement)("div",{className:"wc-block-featured-category__wrapper"},Object(n.createElement)("h2",{className:"wc-block-featured-category__title",dangerouslySetInnerHTML:{__html:y.name}}),p&&Object(n.createElement)("div",{className:"wc-block-featured-category__description",dangerouslySetInnerHTML:{__html:y.description}}),Object(n.createElement)("div",{className:"wc-block-featured-category__link"},(r=x()("wp-block-button__link","is-style-fill"),"preview"===b.categoryId?Object(n.createElement)("div",{className:"wp-block-button aligncenter",style:{width:"100%"}},Object(n.createElement)(c.RichText.Content,{tagName:"a",className:r,href:y.permalink,title:b.linkText,style:{backgroundColor:"vivid-green-cyan",borderRadius:"5px"},value:b.linkText,target:y.permalink})):Object(n.createElement)(c.InnerBlocks,{template:[["core/button",{text:Object(o.__)("Shop now","woo-gutenberg-products-block"),url:y.permalink,align:"center"}]],templateLock:"all"})))))}():Object(n.createElement)(C.Placeholder,{className:"wc-block-featured-category",icon:Object(n.createElement)(u.a,{srcElement:s}),label:Object(o.__)("Featured Category","woo-gutenberg-products-block")},O?Object(n.createElement)(C.Spinner,null):Object(o.__)("No product category is selected.","woo-gutenberg-products-block")))})),Q=r(37),q=[{id:1,name:Object(o.__)("Clothing","woo-gutenberg-products-block"),slug:"clothing",parent:0,count:10,description:"".concat(Object(o.__)("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:Q.m+"previews/collection.jpg",name:"",alt:""},permalink:"#"}],W={attributes:{contentAlign:"center",dimRatio:50,editMode:!1,height:Object(i.getSetting)("default_height",500),mediaSrc:"",showDesc:!0,categoryId:"preview",previewCategory:q[0]}};Object(a.registerBlockType)("woocommerce/featured-category",{title:Object(o.__)("Featured Category","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(u.a,{srcElement:s}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:W,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(o.__)("Shop now","woo-gutenberg-products-block")},categoryId:{type:"number"},showDesc:{type:"boolean",default:!0},previewCategory:{type:"object",default:null}},edit:function(e){return Object(n.createElement)($,e)},save:function(){return Object(n.createElement)(c.InnerBlocks.Content,null)}})},90:function(e,t){e.exports=window.wp.date},91:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(0),a=r(1),i=(r(2),r(46)),u=r(3),l=r(29),s=r.n(l),d=r(16),p=r.n(d),g=r(17),b=r.n(g),f=r(13),m=r.n(f),w=r(18),h=r.n(w),O=r(19),y=r.n(O),j=r(9),v=r.n(j),k=r(22),_=r.n(k),E=r(20),S=r(39),C=r(40);var P=Object(E.createHigherOrderComponent)((function(e){return function(t){h()(i,t);var r,n,a=(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v()(r);if(n){var o=v()(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return y()(this,e)});function i(){var e;return p()(this,i),(e=a.apply(this,arguments)).state={error:null,loading:!1,categories:[]},e.loadCategories=e.loadCategories.bind(m()(e)),e}return b()(i,[{key:"componentDidMount",value:function(){this.loadCategories()}},{key:"loadCategories",value:function(){var e=this;this.setState({loading:!0}),Object(S.c)().then((function(t){e.setState({categories:t,loading:!1,error:null})})).catch(function(){var t=s()(_.a.mark((function t(r){var n;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(C.a)(r);case 2:n=t.sent,e.setState({categories:[],loading:!1,error:n});case 4:case"end":return t.stop()}}),t)})));return function(_x){return t.apply(this,arguments)}}())}},{key:"render",value:function(){var t=this.state,r=t.error,n=t.loading,a=t.categories;return Object(c.createElement)(e,o()({},this.props,{error:r,isLoading:n,categories:a}))}}]),i}(c.Component)}),"withCategories"),x=r(48),R=r(6),A=r.n(R),T=(r(125),function(e){var t=e.categories,r=e.error,n=e.isLoading,l=e.onChange,s=e.onOperatorChange,d=e.operator,p=e.selected,g=e.isCompact,b=e.isSingle,f=e.showReviewCount,m={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:function(e){return 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)(x.a,{error:r}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.b,{className:"woocommerce-product-categories",list:t,isLoading:n,selected:p.map((function(e){return t.find((function(t){return t.id===e}))})).filter(Boolean),onChange:l,renderItem:function(e){var t=e.item,r=e.search,n=e.depth,u=void 0===n?0:n,l=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name,s=f?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),d=f?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,o()({className:A()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===u&&0!==t.parent})},e,{countLabel:d,"aria-label":s}))},messages:m,isCompact:g,isHierarchical:!0,isSingle:b}),!!s&&Object(c.createElement)("div",{hidden:p.length<2},Object(c.createElement)(u.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:s,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"}]})))});T.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=P(T)}});
\ 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..5becb58af65
--- /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' => 'c27f659881abd8e26bffc7949fea1d71');
\ No newline at end of file
diff --git a/build/featured-product.js b/build/featured-product.js
new file mode 100644
index 00000000000..309d3714b49
--- /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 n,i,a=t[0],u=t[1],s=t[2],d=0,p=[];d0,"is-skip-level":0===c&&0!==t.parent,"is-variable":b>0});if(!t.breadcrumbs.length)return Object(s.createElement)(F.a,u()({},e,{className:G()(g,{"is-selected":a}),isSelected:a,item:t,onSelect:function(){return function(){f(t)()}},isLoading:i||O,countLabel:t.variations.length>0?Object(l.sprintf)(
+/* translators: %1$d is the number of variations of a product product. */
+Object(l.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-".concat(n),"aria-label":Object(l.sprintf)(
+/* translators: %1$s is the product name, %2$d is the number of variations of that product. */
+Object(l._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)}));var m=Object(d.isEmpty)(t.variation)?e:z(z({},e),{},{item:z(z({},e.item),{},{name:t.variation}),"aria-label":"".concat(t.breadcrumbs[0],": ").concat(t.variation)});return Object(s.createElement)(p.c,u()({},m,{className:g,name:"variations-".concat(n)}))}:null),onSearch:f,messages:q,isHierarchical:!0})};Q.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=_(Object(P.a)(N(Object(f.withInstanceId)(Q))))},137:function(e,t,r){"use strict";var n=r(0),o=r(27),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.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},138:function(e,t){},14:function(e,t){e.exports=window.wp.data},15:function(e,t){e.exports=window.wp.apiFetch},191:function(e,t){},20:function(e,t){e.exports=window.wp.compose},22:function(e,t){e.exports=window.regeneratorRuntime},23:function(e,t){e.exports=window.wp.url},24:function(e,t){e.exports=window.wp.blocks},26:function(e,t){e.exports=window.wp.htmlEntities},27:function(e,t){e.exports=window.wp.primitives},272:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(29),i=r.n(c),a=r(8),u=r.n(a),s=r(21),l=r.n(s),d=r(0),p=r(22),f=r.n(p),b=r(37),g=r(39),m=r(201),h=r(40),w=["selected"];t.a=function(e){return function(t){var r=t.selected,n=l()(t,w),c=Object(d.useState)(!0),a=u()(c,2),s=a[0],p=a[1],O=Object(d.useState)(null),v=u()(O,2),j=v[0],y=v[1],k=Object(d.useState)([]),_=u()(k,2),P=_[0],S=_[1],E=b.o.productCount>100,x=function(){var e=i()(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(h.a)(t);case 2:r=e.sent,y(r),p(!1);case 5:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}();Object(d.useEffect)((function(){Object(g.h)({selected:r}).then((function(e){S(e),p(!1)})).catch(x)}),[r]);var C=Object(m.a)((function(e){Object(g.h)({selected:r,search:e}).then((function(e){S(e),p(!1)})).catch(x)}),400),R=u()(C,1)[0],A=Object(d.useCallback)((function(e){p(!0),R(e)}),[p,R]);return Object(d.createElement)(e,o()({},n,{selected:r,error:j,products:P,isLoading:s,onSearch:E?A:null}))}}},28:function(e,t){e.exports=window.moment},3:function(e,t){e.exports=window.wp.components},35:function(e,t){e.exports=window.wp.dataControls},36:function(e,t){e.exports=window.wp.isShallowEqual},37:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return i})),r.d(t,"l",(function(){return a})),r.d(t,"n",(function(){return u})),r.d(t,"j",(function(){return s})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return p})),r.d(t,"k",(function(){return f})),r.d(t,"c",(function(){return b})),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 w})),r.d(t,"b",(function(){return O}));var n,o=r(4),c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=c.pluginUrl+"images/",a=c.pluginUrl+"build/",u=c.buildPhase,s=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=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),g=o.STORE_PAGES.cart.permalink,m=(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",{}),w=Object(o.getSetting)("shippingStates",{}),O=Object(o.getSetting)("allowedStates",{})},39:function(e,t,r){"use strict";r.d(t,"h",(function(){return f})),r.d(t,"e",(function(){return b})),r.d(t,"b",(function(){return g})),r.d(t,"i",(function(){return m})),r.d(t,"f",(function(){return h})),r.d(t,"c",(function(){return w})),r.d(t,"d",(function(){return O})),r.d(t,"g",(function(){return v})),r.d(t,"a",(function(){return j}));var n=r(5),o=r.n(n),c=r(23),i=r(15),a=r.n(i),u=r(7),s=r(4),l=r(37);function d(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 p(e){for(var t=1;t100,s={per_page:u?100:0,catalog_visibility:"any",search:o,orderby:"title",order:"asc"},d=[Object(c.addQueryArgs)("/wc/store/products",p(p({},s),a))];return u&&r.length&&d.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),d}({selected:r,search:o,queryArgs:void 0===i?{}:i});return Promise.all(s.map((function(e){return a()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id").map((function(e){return p(p({},e),{},{parent:0})}))})).catch((function(e){throw e}))},b=function(e){return a()({path:"/wc/store/products/".concat(e)})},g=function(){return a()({path:"wc/store/products/attributes"})},m=function(e){return a()({path:"wc/store/products/attributes/".concat(e,"/terms")})},h=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=Object(s.getSetting)("limitTags",!1),i=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:n})];return o&&r.length&&i.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return a()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id")}))},w=function(e){return a()({path:Object(c.addQueryArgs)("wc/store/products/categories",p({per_page:0},e))})},O=function(e){return a()({path:"wc/store/products/categories/".concat(e)})},v=function(e){return a()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},j=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return s}));var n=r(29),o=r.n(n),c=r(22),i=r.n(c),a=r(1),u=function(){var e=o()(i.a.mark((function e(t){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),s=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},44:function(e,t){e.exports=window.wp.keycodes},45:function(e,t){e.exports=window.wp.escapeHtml},475:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(29),i=r.n(c),a=r(16),u=r.n(a),s=r(17),l=r.n(s),d=r(13),p=r.n(d),f=r(18),b=r.n(f),g=r(19),m=r.n(g),h=r(9),w=r.n(h),O=r(5),v=r.n(O),j=r(0),y=r(22),k=r.n(y),_=r(20),P=r(39),S=r(40);var E=Object(_.createHigherOrderComponent)((function(e){return function(t){b()(a,t);var r,n,c=(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w()(r);if(n){var o=w()(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return m()(this,e)});function a(){var e;u()(this,a);for(var t=arguments.length,r=new Array(t),n=0;n$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(n.__)("Add to cart","woo-gutenberg-products-block"),description:Object(n.__)("Add to cart","woo-gutenberg-products-block")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},82:function(e,t){e.exports=window.ReactDOM},85:function(e,t){e.exports=window.wp.viewport},857:function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(1),c=r(12),i=r(24),a=r(4),u=r(61),s=r(760),l=(r(758),r(759),r(761)),d={attributes:{contentAlign:"center",dimRatio:50,editMode:!1,height:Object(a.getSetting)("default_height",500),mediaSrc:"",showDesc:!0,productId:"preview",previewProduct:l.a[0]}},p=r(10),f=r.n(p),b=r(16),g=r.n(b),m=r(17),h=r.n(m),w=r(13),O=r.n(w),v=r(18),j=r.n(v),y=r(19),k=r.n(y),_=r(9),P=r.n(_),S=r(5),E=r.n(S),x=r(14),C=r(3),R=r(6),A=r.n(R),I=r(20),D=r(7),T=(r(2),r(136)),B=r(102),L=r(475);function M(e){return e&&e.images&&e.images.length&&e.images[0].src||""}function N(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 U(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;O({productId:t,mediaId:0,mediaSrc:""}),y()}}),Object(n.createElement)(C.Button,{isPrimary:!0,onClick:function(){O({editMode:!1}),p(Object(o.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block"))))):Object(n.createElement)(n.Fragment,null,k(),(t=d.mediaSrc||M(w),i=void 0===(r=d.focalPoint)?{x:.5,y:.5}:r,l="function"==typeof C.FocalPointPicker,Object(n.createElement)(c.InspectorControls,{key:"inspector"},Object(n.createElement)(C.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(C.ToggleControl,{label:Object(o.__)("Show description","woo-gutenberg-products-block"),checked:d.showDesc,onChange:function(){return O({showDesc:!d.showDesc})}}),Object(n.createElement)(C.ToggleControl,{label:Object(o.__)("Show price","woo-gutenberg-products-block"),checked:d.showPrice,onChange:function(){return O({showPrice:!d.showPrice})}})),Object(n.createElement)(c.PanelColorSettings,{title:Object(o.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:h.color,onChange:v,label:Object(o.__)("Overlay Color","woo-gutenberg-products-block")}]},!!t&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(C.RangeControl,{label:Object(o.__)("Background Opacity","woo-gutenberg-products-block"),value:d.dimRatio,onChange:function(e){return O({dimRatio:e})},min:0,max:100,step:10}),l&&Object(n.createElement)(C.FocalPointPicker,{label:Object(o.__)("Focal Point Picker","woo-gutenberg-products-block"),url:t,value:i,onChange:function(e){return O({focalPoint:e})}}))))),w?function(){var e,t,r,i=d.className,u=d.contentAlign,s=d.dimRatio,l=d.focalPoint,p=d.height,f=d.showDesc,b=d.showPrice,v=A()("wc-block-featured-product",{"is-selected":m&&"preview"!==d.productId,"is-loading":!w&&g,"is-not-found":!w&&!g,"has-background-dim":0!==s},0===(e=s)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==u&&"has-".concat(u,"-content"),i),j=(t=d.mediaSrc||w,Object(D.isObject)(t)&&(t=M(t)),t?{backgroundImage:"url(".concat(t,")")}:{});if(h.color&&(j.backgroundColor=h.color),l){var y=100*l.x,k=100*l.y;j.backgroundPosition="".concat(y,"% ").concat(k,"%")}return Object(n.createElement)(C.ResizableBox,{className:v,size:{height:p},minHeight:Object(a.getSetting)("min_height",500),enable:{bottom:!0},onResizeStop:function(e,t,r){O({height:parseInt(r.style.height,10)})},style:j},Object(n.createElement)("div",{className:"wc-block-featured-product__wrapper"},Object(n.createElement)("h2",{className:"wc-block-featured-product__title",dangerouslySetInnerHTML:{__html:w.name}}),!Object(D.isEmpty)(w.variation)&&Object(n.createElement)("h3",{className:"wc-block-featured-product__variation",dangerouslySetInnerHTML:{__html:w.variation}}),f&&Object(n.createElement)("div",{className:"wc-block-featured-product__description",dangerouslySetInnerHTML:{__html:w.short_description}}),b&&Object(n.createElement)("div",{className:"wc-block-featured-product__price",dangerouslySetInnerHTML:{__html:w.price_html}}),Object(n.createElement)("div",{className:"wc-block-featured-product__link"},(r=A()("wp-block-button__link","is-style-fill"),"preview"===d.productId?Object(n.createElement)("div",{className:"wp-block-button aligncenter",style:{width:"100%"}},Object(n.createElement)(c.RichText.Content,{tagName:"a",className:r,href:w.permalink,title:d.linkText,style:{backgroundColor:"vivid-green-cyan",borderRadius:"5px"},value:d.linkText,target:w.permalink})):Object(n.createElement)(c.InnerBlocks,{template:[["core/button",{text:Object(o.__)("Shop now","woo-gutenberg-products-block"),url:w.permalink,align:"center"}]],templateLock:"all"})))))}():Object(n.createElement)(C.Placeholder,{className:"wc-block-featured-product",icon:Object(n.createElement)(u.a,{srcElement:s.a}),label:Object(o.__)("Featured Product","woo-gutenberg-products-block")},g?Object(n.createElement)(C.Spinner,null):Object(o.__)("No product is selected.","woo-gutenberg-products-block")))}));Object(i.registerBlockType)("woocommerce/featured-product",{title:Object(o.__)("Featured Product","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(u.a,{srcElement:s.a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("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(a.getSetting)("default_height",500)},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(o.__)("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:function(e){return Object(n.createElement)(V,e)},save:function(){return Object(n.createElement)(c.InnerBlocks.Content,null)}})},90:function(e,t){e.exports=window.wp.date}});
\ 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..0c4c4e018fd
--- /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' => '5b4355d105f7ac17880430a63f09c6c9');
\ No newline at end of file
diff --git a/build/handpicked-products.js b/build/handpicked-products.js
new file mode 100644
index 00000000000..bb3a8f5e1d3
--- /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 n,i,l=t[0],u=t[1],a=t[2],d=0,b=[];d100,S=function(){var e=i()(p.a.mark((function e(t){var r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(w.a)(t);case 2:r=e.sent,y(r),b(!1);case 5:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}();Object(d.useEffect)((function(){Object(f.h)({selected:r}).then((function(e){k(e),b(!1)})).catch(S)}),[r]);var C=Object(h.a)((function(e){Object(f.h)({selected:r,search:e}).then((function(e){k(e),b(!1)})).catch(S)}),400),A=u()(C,1)[0],T=Object(d.useCallback)((function(e){b(!0),A(e)}),[b,A]);return Object(d.createElement)(e,c()({},n,{selected:r,error:m,products:_,isLoading:a,onSearch:P?T:null}))}}},28:function(e,t){e.exports=window.moment},3:function(e,t){e.exports=window.wp.components},35:function(e,t){e.exports=window.wp.dataControls},37:function(e,t,r){"use strict";r.d(t,"o",(function(){return o})),r.d(t,"m",(function(){return i})),r.d(t,"l",(function(){return l})),r.d(t,"n",(function(){return u})),r.d(t,"j",(function(){return a})),r.d(t,"e",(function(){return s})),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 f})),r.d(t,"h",(function(){return h})),r.d(t,"a",(function(){return w})),r.d(t,"i",(function(){return E})),r.d(t,"b",(function(){return O}));var n,c=r(4),o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=o.pluginUrl+"images/",l=o.pluginUrl+"build/",u=o.buildPhase,a=null===(n=c.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,s=c.STORE_PAGES.checkout.id,d=c.STORE_PAGES.checkout.permalink,b=c.STORE_PAGES.privacy.permalink,p=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),g=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),f=c.STORE_PAGES.cart.permalink,h=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),w=Object(c.getSetting)("allowedCountries",{}),E=Object(c.getSetting)("shippingStates",{}),O=Object(c.getSetting)("allowedStates",{})},39:function(e,t,r){"use strict";r.d(t,"h",(function(){return p})),r.d(t,"e",(function(){return g})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return h})),r.d(t,"f",(function(){return w})),r.d(t,"c",(function(){return E})),r.d(t,"d",(function(){return O})),r.d(t,"g",(function(){return j})),r.d(t,"a",(function(){return m}));var n=r(5),c=r.n(n),o=r(23),i=r(15),l=r.n(i),u=r(7),a=r(4),s=r(37);function d(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 b(e){for(var t=1;t100,a={per_page:u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},d=[Object(o.addQueryArgs)("/wc/store/products",b(b({},a),l))];return u&&r.length&&d.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),d}({selected:r,search:c,queryArgs:void 0===i?{}:i});return Promise.all(a.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id").map((function(e){return b(b({},e),{},{parent:0})}))})).catch((function(e){throw e}))},g=function(e){return l()({path:"/wc/store/products/".concat(e)})},f=function(){return l()({path:"wc/store/products/attributes"})},h=function(e){return l()({path:"wc/store/products/attributes/".concat(e,"/terms")})},w=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=Object(a.getSetting)("limitTags",!1),i=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:n})];return c&&r.length&&i.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id")}))},E=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products/categories",b({per_page:0},e))})},O=function(e){return l()({path:"wc/store/products/categories/".concat(e)})},j=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},m=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return a}));var n=r(29),c=r.n(n),o=r(22),i=r.n(o),l=r(1),u=function(){var e=c()(i.a.mark((function e(t){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),a=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(l.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},44:function(e,t){e.exports=window.wp.keycodes},45:function(e,t){e.exports=window.wp.escapeHtml},48:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(45));t.a=function(e){var t,r,i,l=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=l).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},51:function(e,t){e.exports=window.wp.hooks},57:function(e,t){e.exports=window.wp.deprecated},570:function(e,t,r){e.exports=r(858)},571:function(e,t){},61:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(21),i=r.n(o),l=r(0),u=["srcElement","size"];function a(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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=i()(e,u);return Object(l.isValidElement)(t)?Object(l.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));r({products:t})},isCompact:!0})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,r=e.debouncedSpeak,o=e.setAttributes;return Object(n.createElement)(v.Placeholder,{icon:Object(n.createElement)(l.a,{srcElement:a}),label:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-handpicked-products"},Object(c.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(n.createElement)(R,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));o({products:t})}}),Object(n.createElement)(v.Button,{isPrimary:!0,onClick:function(){o({editMode:!1}),r(Object(c.__)("Showing Hand-picked Products block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.name,o=e.setAttributes,i=t.editMode;return t.isPreview?M.a:Object(n.createElement)(n.Fragment,null,Object(n.createElement)(j.BlockControls,null,Object(n.createElement)(v.ToolbarGroup,{controls:[{icon:"edit",title:Object(c.__)("Edit selected products","woo-gutenberg-products-block"),onClick:function(){return o({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(n.createElement)(v.Disabled,null,Object(n.createElement)(y.a,{block:r,attributes:t})))}}]),u}(n.Component),H=Object(v.withSpokenMessages)(G);Object(o.registerBlockType)("woocommerce/handpicked-products",{title:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(l.a,{srcElement:a}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(c.__)("Handpicked Products","woo-gutenberg-products-block"),Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("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(i.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:function(e){return Object(n.createElement)(H,e)},save:function(){return null}})},86:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),i=r(1),l=(r(2),r(3));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 a(e){for(var t=1;t array('wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '1998107277247ab1150a6ebda3c30bf9');
\ No newline at end of file
diff --git a/build/legacy-template.js b/build/legacy-template.js
new file mode 100644
index 00000000000..b30f03ecc3d
--- /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],d=0,s=[];d 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' => '5366cd0f5820050943ec46338467e8ef');
\ 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..310fd3a2755
--- /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=254)}([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,n){var r=n(77),o=n(78),c=n(61),i=n(79);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},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.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=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c},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){e.exports=window.wc.blocksCheckout},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(56),o=n(63);function c(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){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,n){"use strict";n.d(t,"a",(function(){return P}));var r=n(4),o=n.n(r),c=n(5),i=n.n(c),a=n(6),s=n(0),u=n(9),l=n(11),f=n(32),p=n(101),d=n(151),m=n(36),b=n(107),h=function(e){var t=e.detail;t&&t.preserveCartData||Object(l.dispatch)(u.CART_STORE_KEY).invalidateResolutionForStore()},v=function(){1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},g=function(){Object(s.useEffect)((function(){return function(){if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:function(){}}),0===window.wcBlocksStoreCartListeners.count){var e=Object(b.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(b.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",h),document.body.addEventListener("wc-blocks_removed_from_cart",h),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=function(){e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",h),document.body.removeEventListener("wc-blocks_removed_from_cart",h)}}window.wcBlocksStoreCartListeners.count++}(),v}),[])};function y(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 O(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(m.a)(),n=t.isEditor,r=t.previewData,o=null==r?void 0:r.previewCart,c=e.shouldSelect,i=Object(s.useRef)();g();var f=Object(l.useSelect)((function(e,t){var r=t.dispatch;if(!c)return w;if(n)return{cartCoupons:o.coupons,cartItems:o.items,cartFees:o.fees,cartItemsCount:o.items_count,cartItemsWeight:o.items_weight,cartNeedsPayment:o.needs_payment,cartNeedsShipping:o.needs_shipping,cartItemErrors:u.EMPTY_CART_ITEM_ERRORS,cartTotals:o.totals,cartIsLoading:!1,cartErrors:u.EMPTY_CART_ERRORS,billingAddress:j,shippingAddress:E,extensions:u.EMPTY_EXTENSIONS,shippingRates:o.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:o.has_calculated_shipping,paymentRequirements:o.paymentRequirements,receiveCart:"function"==typeof(null==o?void 0:o.receiveCart)?o.receiveCart:function(){}};var i=e(u.CART_STORE_KEY),a=i.getCartData(),s=i.getCartErrors(),l=i.getCartTotals(),f=!i.hasFinishedResolution("getCartData"),p=i.isCustomerDataUpdating(),m=r(u.CART_STORE_KEY).receiveCart,b=S(a.billingAddress),h=a.needsShipping?S(a.shippingAddress):b,v=a.fees.length>0?a.fees.map((function(e){return S(e)})):u.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map((function(e){return O(O({},e),{},{label:e.code})})):u.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:v,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:l,cartIsLoading:f,cartErrors:s,billingAddress:Object(d.a)(b),shippingAddress:Object(d.a)(h),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}}),[c]);return i.current&&Object(a.isEqual)(i.current,f)||(i.current=f),i.current}},function(e,t){e.exports=window.wp.a11y},function(e,t){function n(e,t,n,r,o,c,i){try{var a=e[c](i),s=a.value}catch(e){return void n(e)}a.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,c){var i=e.apply(t,r);function a(e){n(i,o,c,a,s,"next",e)}function s(e){n(i,o,c,a,s,"throw",e)}a(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=(n(11),Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:function(){}})),c=function(){return Object(r.useContext)(o)}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),l=Object(c.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,s({},t))}}}),[n]);return s(s(s({notices:t},u),l),{},{setIsSuppressed:o})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(5),o=n.n(r),c=n(74),i=n(0),a=n(33);function s(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;t1&&void 0!==arguments[1]?arguments[1]:{};try{Object(c.doAction)("experimental__woocommerce_blocks-".concat(e),t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(i.useCallback)((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(c.doAction)("experimental__woocommerce_blocks-checkout-".concat(e),u(u({},n),{},{storeCart:t.current}))}catch(e){console.error(e)}}),[])}}},function(e,t){e.exports=window.wp.deprecated},function(e,t,n){"use strict";n.d(t,"b",(function(){return I})),n.d(t,"a",(function(){return F}));var r,o=n(4),c=n.n(o),i=n(0),a=n(1),s=n(96),u=n(53),l=n.n(u),f=n(66);!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"}(r||(r={}));var p,d=function(){return{type:r.SET_IDLE}},m=function(e){return{type:r.SET_REDIRECT_URL,redirectUrl:e}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:r.SET_COMPLETE,data:e}},h=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?r.SET_HAS_ERROR:r.SET_NO_ERROR}},v=n(5),g=n.n(v),y=n(2);function O(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.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(p||(p={}));var E=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0,n=t.redirectUrl,o=t.type,c=t.customerId,i=t.orderId,a=t.orderNotes,s=t.extensionData,u=t.shouldCreateAccount,l=t.data,f=e;switch(o){case r.SET_PRISTINE:f=j;break;case r.SET_IDLE:f=e.status!==p.IDLE?S(S({},e),{},{status:p.IDLE}):e;break;case r.SET_REDIRECT_URL:f=void 0!==n&&n!==e.redirectUrl?S(S({},e),{},{redirectUrl:n}):e;break;case r.SET_PROCESSING_RESPONSE:f=S(S({},e),{},{processingResponse:l});break;case r.SET_COMPLETE:f=e.status!==p.COMPLETE?S(S({},e),{},{status:p.COMPLETE,redirectUrl:void 0!==l&&"string"==typeof l.redirectUrl&&l.redirectUrl?l.redirectUrl:e.redirectUrl}):e;break;case r.SET_PROCESSING:f=!1===(f=e.status!==p.PROCESSING?S(S({},e),{},{status:p.PROCESSING,hasError:!1}):e).hasError?f:S(S({},f),{},{hasError:!1});break;case r.SET_BEFORE_PROCESSING:f=e.status!==p.BEFORE_PROCESSING?S(S({},e),{},{status:p.BEFORE_PROCESSING,hasError:!1}):e;break;case r.SET_AFTER_PROCESSING:f=e.status!==p.AFTER_PROCESSING?S(S({},e),{},{status:p.AFTER_PROCESSING}):e;break;case r.SET_HAS_ERROR:f=e.hasError?e:S(S({},e),{},{hasError:!0}),f=e.status===p.PROCESSING||e.status===p.BEFORE_PROCESSING?S(S({},f),{},{status:p.IDLE}):f;break;case r.SET_NO_ERROR:f=e.hasError?S(S({},e),{},{hasError:!1}):e;break;case r.INCREMENT_CALCULATING:f=S(S({},e),{},{calculatingCount:e.calculatingCount+1});break;case r.DECREMENT_CALCULATING:f=S(S({},e),{},{calculatingCount:Math.max(0,e.calculatingCount-1)});break;case r.SET_CUSTOMER_ID:f=void 0!==c?S(S({},e),{},{customerId:c}):e;break;case r.SET_ORDER_ID:f=void 0!==i?S(S({},e),{},{orderId:i}):e;break;case r.SET_SHOULD_CREATE_ACCOUNT:void 0!==u&&u!==e.shouldCreateAccount&&(f=S(S({},e),{},{shouldCreateAccount:u}));break;case r.SET_ORDER_NOTES:void 0!==a&&e.orderNotes!==a&&(f=S(S({},e),{},{orderNotes:a}));break;case r.SET_EXTENSION_DATA:void 0!==s&&e.extensionData!==s&&(f=S(S({},e),{},{extensionData:s}))}return f!==e&&o!==r.SET_PRISTINE&&f.status===p.PRISTINE&&(f.status=p.IDLE),f},P=n(32),R=n(99),k=n(176),C=n(178),x=n(171),T=n(51),N=n(52),A=n(11),D=n(43),M=Object(i.createContext)({dispatchActions:{resetCheckout:function(){},setRedirectUrl:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},incrementCalculating:function(){},decrementCalculating:function(){},setCustomerId:function(e){},setOrderId:function(e){},setOrderNotes:function(e){},setExtensionData:function(e){}},onSubmit:function(){},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:function(){return function(){}},onCheckoutAfterProcessingWithError:function(){return function(){}},onCheckoutBeforeProcessing:function(){return function(){}},onCheckoutValidationBeforeProcessing:function(){return function(){}},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:function(e){},extensionData:{}}),I=function(){return Object(i.useContext)(M)},F=function(e){var t=e.children,n=e.redirectUrl,o=e.isCart,u=void 0!==o&&o;j.redirectUrl=n;var v,g=Object(i.useReducer)(w,j),y=c()(g,2),O=y[0],E=y[1],_=Object(x.b)().setValidationErrors,S=Object(T.a)(),I=S.addErrorNotice,F=S.removeNotices,L=Object(N.a)().dispatchCheckoutEvent,B=O.calculatingCount>0,U=Object(D.c)(),V=U.isSuccessResponse,H=U.isErrorResponse,G=U.isFailResponse,q=U.shouldRetry,Y=(v=Object(D.c)().noticeContexts,{checkoutNotices:Object(A.useSelect)((function(e){return e("core/notices").getNotices("wc/checkout")}),[]),expressPaymentNotices:Object(A.useSelect)((function(e){return e("core/notices").getNotices(v.EXPRESS_PAYMENTS)}),[v.EXPRESS_PAYMENTS]),paymentNotices:Object(A.useSelect)((function(e){return e("core/notices").getNotices(v.PAYMENTS)}),[v.PAYMENTS])}),W=Y.checkoutNotices,z=Y.paymentNotices,K=Y.expressPaymentNotices,$=Object(i.useReducer)(R.b,{}),X=c()($,2),Q=X[0],Z=X[1],J=Object(i.useRef)(Q),ee=function(e){return Object(i.useMemo)((function(){return{onCheckoutAfterProcessingWithSuccess:Object(k.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(k.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(k.a)("checkout_validation_before_processing",e)}}),[e])}(Z),te=ee.onCheckoutAfterProcessingWithSuccess,ne=ee.onCheckoutAfterProcessingWithError,re=ee.onCheckoutValidationBeforeProcessing;Object(i.useEffect)((function(){J.current=Q}),[Q]);var oe=Object(i.useMemo)((function(){return function(){return l()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),re.apply(void 0,arguments)}}),[re]),ce=Object(i.useMemo)((function(){return{resetCheckout:function(){E({type:r.SET_PRISTINE})},setRedirectUrl:function(e){E(m(e))},setHasError:function(e){E(h(e))},incrementCalculating:function(){E({type:r.INCREMENT_CALCULATING})},decrementCalculating:function(){E({type:r.DECREMENT_CALCULATING})},setCustomerId:function(e){var t;E((t=e,{type:r.SET_CUSTOMER_ID,customerId:t}))},setOrderId:function(e){E(function(e){return{type:r.SET_ORDER_ID,orderId:e}}(e))},setOrderNotes:function(e){E(function(e){return{type:r.SET_ORDER_NOTES,orderNotes:e}}(e))},setExtensionData:function(e){E(function(e){return{type:r.SET_EXTENSION_DATA,extensionData:e}}(e))},setAfterProcessing:function(e){var t,n=function(e){var 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((function(e){var n=e.key,r=e.value;t.paymentDetails[n]=Object(P.decodeEntities)(r)}))),"message"in e&&(t.message=Object(P.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t}(e);n.redirectUrl&&E(m(n.redirectUrl)),E((t=n,{type:r.SET_PROCESSING_RESPONSE,data:t})),E({type:r.SET_AFTER_PROCESSING})}}}),[]);Object(i.useEffect)((function(){O.status===p.BEFORE_PROCESSING&&(F("error"),Object(C.a)(J.current,"checkout_validation_before_processing",{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,n=e.validationErrors;I(t),_(n)})),E(d()),E(h())):E({type:r.SET_PROCESSING})})))}),[O.status,_,I,F,E]);var ie=Object(s.a)(O.status),ae=Object(s.a)(O.hasError);Object(i.useEffect)((function(){if((O.status!==ie||O.hasError!==ae)&&O.status===p.AFTER_PROCESSING){var e={redirectUrl:O.redirectUrl,orderId:O.orderId,customerId:O.customerId,orderNotes:O.orderNotes,processingResponse:O.processingResponse};O.hasError?Object(C.b)(J.current,"checkout_after_processing_with_error",e).then((function(t){var n=function(e){var t=null;return e.forEach((function(e){if((H(e)||G(e))&&e.message){var n=e.messageContext?{context:e.messageContext}:void 0;t=e,I(e.message,n)}})),t}(t);if(null!==n)q(n)?E(d()):E(b(n));else{if(!(W.some((function(e){return"error"===e.status}))||K.some((function(e){return"error"===e.status}))||z.some((function(e){return"error"===e.status})))){var r,o=(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");I(o,{id:"checkout"})}E(d())}})):Object(C.b)(J.current,"checkout_after_processing_with_success",e).then((function(e){var t=null,n=null;if(e.forEach((function(e){V(e)&&(t=e),(H(e)||G(e))&&(n=e)})),t&&!n)E(b(t));else if(Object(f.b)(n)){if(n.message){var r=n.messageContext?{context:n.messageContext}:void 0;I(n.message,r)}q(n)?E(h(!0)):E(b(n))}else E(b())}))}}),[O.status,O.hasError,O.redirectUrl,O.orderId,O.customerId,O.orderNotes,O.processingResponse,ie,ae,ce,I,H,G,V,q,W,K,z]);var se={onSubmit:Object(i.useCallback)((function(){L("submit"),E({type:r.SET_BEFORE_PROCESSING})}),[L]),isComplete:O.status===p.COMPLETE,isIdle:O.status===p.IDLE,isCalculating:B,isProcessing:O.status===p.PROCESSING,isBeforeProcessing:O.status===p.BEFORE_PROCESSING,isAfterProcessing:O.status===p.AFTER_PROCESSING,hasError:O.hasError,redirectUrl:O.redirectUrl,onCheckoutBeforeProcessing:oe,onCheckoutValidationBeforeProcessing:re,onCheckoutAfterProcessingWithSuccess:te,onCheckoutAfterProcessingWithError:ne,dispatchActions:ce,isCart:u,orderId:O.orderId,hasOrder:!!O.orderId,customerId:O.customerId,orderNotes:O.orderNotes,shouldCreateAccount:O.shouldCreateAccount,setShouldCreateAccount:function(e){return E((t=e,{type:r.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:O.extensionData};return React.createElement(M.Provider,{value:se},t)}},,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);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&T.some((function(e){return!(!e.code||!Object.values(d).includes(e.code))}))?L({type:P}):L({type:w})}),[T]);var W=Object(a.useMemo)((function(){return{isPristine:F===w,isValid:F===w,hasInvalidAddress:F===P,hasError:F===R||F===P}}),[F]);Object(a.useEffect)((function(){x||0!==C.length&&!W.hasError||Object(y.a)(G.current,"shipping_rates_fail",{hasInvalidAddress:W.hasInvalidAddress,hasError:W.hasError})}),[C,x,W.hasError,W.hasInvalidAddress]),Object(a.useEffect)((function(){!x&&C.length>0&&!W.hasError&&Object(y.a)(G.current,"shipping_rates_success",C)}),[C,x,W.hasError]),Object(a.useEffect)((function(){D||(W.hasError?Object(y.a)(G.current,"shipping_rate_select_fail",{hasError:W.hasError,hasInvalidAddress:W.hasInvalidAddress}):Object(y.a)(G.current,"shipping_rate_select_success",Y.current))}),[D,W.hasError,W.hasInvalidAddress]);var z=function(e){for(var t=1;t=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.warning},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,c=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(c.push(r.value),!t||c.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(i)throw o}}return c}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,c=Object(r.useRef)(null),i=Object(r.useRef)([]),a=n.leading,s=void 0===n.trailing||n.trailing,u=Object(r.useRef)(!1),l=Object(r.useRef)(null),f=Object(r.useRef)(!1),p=Object(r.useRef)(e);p.current=e;var d=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(c.current),c.current=null,i.current=[],l.current=null,u.current=!1}),[]);Object(r.useEffect)((function(){return f.current=!1,function(){f.current=!0}}),[]);var m=Object(r.useCallback)((function(){for(var e=[],n=0;n0?a/2:u)+(u+a/2>window.innerWidth?window.innerWidth-u:a/2)},f=e.left;"right"===r?f=e.right:"middle"!==c&&(f=u);var p=e.right;"left"===r?p=e.left:"middle"!==c&&(p=u);var d,m={popoverLeft:f,contentWidth:f-a>0?a:f},b={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},h=n,v=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 g="left"==(h=m.contentWidth>b.contentWidth?"left":"right")?m.contentWidth:b.contentWidth;v=g!==a?g: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:v}}function w(e,t,n,r,o,c,i){var a=t.height;if(o){var s=(Object(v.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)},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 b="top"==(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;m=b!==a?b:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:m}}var P=n(30),R=n(12);var k=Object(c.createContext)({focusHistory:[]}),C=k.Provider,x=k.Consumer;C.displayName="FocusReturnProvider",x.displayName="FocusReturnConsumer",c.Component;var T=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(f.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(P.a)(s.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(P.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)(x,null,(function(n){return Object(c.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");var N=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(f.a)(this,i),(e=o.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(R.a)(e)),e}return Object(p.a)(i,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===g.TAB){var t=v.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(89);var D=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(f.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),M=Object(A.a)(D);function I(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,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=I(n);function n(){return Object(f.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,i=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({},i,{ref:t,onMouseDown:L}),n)})),U=n(48);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 fe=function(e){var t=e.headerTitle,n=e.onClose,i=e.onKeyDown,s=e.children,u=e.className,f=e.noArrow,p=void 0===f||f,d=e.isAlternate,m=e.position,b=void 0===m?"bottom right":m,E=(e.range,e.focusOnMount),j=void 0===E?"firstElement":E,P=e.anchorRef,R=e.shouldAnchorIncludePadding,k=e.anchorRect,C=e.getAnchorRect,x=e.expandOnMobile,T=e.animate,N=void 0===T||T,A=e.onClickOutside,D=e.onFocusOutside,I=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"]),Y=Object(c.useRef)(null),W=Object(c.useRef)(null),z=Object(c.useRef)(),K=Object(y.useViewportMatch)("medium","<"),$=Object(c.useState)(),X=Object(h.a)($,2),Q=X[0],Z=X[1],J=G(U),ee=x&&K,ne=Object(y.useResizeObserver)(),re=Object(h.a)(ne,2),oe=re[0],fe=re[1];p=ee||p,Object(c.useLayoutEffect)((function(){if(ee)return le(z.current,"is-without-arrow",p),le(z.current,"is-alternate",d),se(z.current,"data-x-axis"),se(z.current,"data-y-axis"),ue(z.current,"top"),ue(z.current,"left"),ue(W.current,"maxHeight"),void ue(W.current,"maxWidth");var e=function(){if(z.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(v.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 f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:ae(p,f)}}(Y,k,C,P,R);if(e){var t,n,r=z.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=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,i=arguments.length>6?arguments[6]:void 0,a=n.split(" "),s=Object(h.a)(a,3),u=s[0],l=s[1],f=void 0===l?"center":l,p=s[2],d=w(e,t,u,p,r,o,c),m=S(e,t,f,p,r,d.yAxis,i);return _(_({},m),d)}(e,fe.height?fe:W.current.getBoundingClientRect(),b,I,z.current,i,t),u=s.popoverTop,l=s.popoverLeft,f=s.xAxis,m=s.yAxis,g=s.contentHeight,y=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"===f&&"middle"===m),le(z.current,"is-alternate",d),se(z.current,"data-x-axis",f),se(z.current,"data-y-axis",m),ue(W.current,"maxHeight","number"==typeof g?g+"px":""),ue(W.current,"maxWidth","number"==typeof y?y+"px":""),Z(({left:"right",right:"left"}[f]||"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,k,C,P,R,b,fe,I,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=v.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(j,W);var pe=function(e){e.keyCode===g.ESCAPE&&n&&(e.stopPropagation(),n()),i&&i(e)},de=Object(c.createElement)(M,{onFocusOutside:function(e){if(D)D(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}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),A(t)}else n&&n()}},Object(c.createElement)(ce,{type:N&&Q?"appear":null,options:{origin:Q}},(function(e){var o=e.className;return Object(c.createElement)(B,Object(r.a)({className:a()("components-popover",u,o,{"is-expanded":ee,"is-without-arrow":p,"is-alternate":d})},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)(ge,{className:"components-popover__close",icon:O.a,onClick:n})),Object(c.createElement)("div",{ref:W,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:U},de)),P||k?de:Object(c.createElement)("span",{ref:Y},de)};fe.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=fe,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(f.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)(de,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(c.Component),be=n(86);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}}}}(ve);try{for(M.s();!(D=M.n()).done;)C[D.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){M.e(e)}finally{M.f()}}var I=!T&&(_&&P||w||!!P&&(!R||Object(s.isArray)(R)&&!R.length)&&!1!==_),F=Object(c.createElement)(N,Object(r.a)({},A,C,{className:x,"aria-label":C["aria-label"]||P,ref:t}),E&&Object(c.createElement)(be.a,{icon:E,size:j}),R);return I?Object(c.createElement)(me,{text:P,shortcut:w,position:S},F):F}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(4),o=n.n(r),c=n(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){t((function(){throw e}))}),[])}},,function(e,t,n){"use strict";var r=n(20),o=n.n(r),c=n(5),i=n.n(c),a=n(26),s=n.n(a),u=n(127),l=n(7),f=n.n(l),p=(n(156),["className","value","currency","onValueChange","displayType"]);function d(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 m(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"",r=n&&void 0!==m[n]?m[n]:{};return e.map((function(e){var n=a.defaultAddressFields[e]||{},o=r[e]||{},c=t[e]||{};return f(f(f({key:e},n),o),c)})).sort((function(e,t){return e.index-t.index}))}},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){"use strict";var r=n(13),o=n(14),c=n(15),i=n(12),a=n(16),s=n(17),u=n(10),l=n(0),f=n(6),p=n(25);var d=["button","submit"];t.a=Object(p.createHigherOrderComponent)((function(e){return function(t){Object(a.a)(b,t);var n,p,m=(n=b,p=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(u.a)(n);if(p){var r=Object(u.a)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return Object(s.a)(this,e)});function b(){var e;return Object(o.a)(this,b),(e=m.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(c.a)(b,[{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(f.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(f.includes)(d,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(l.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(l.createElement)(e,Object(r.a)({ref:this.bindNode},this.props)))}}]),b}(l.Component)}),"withFocusOutside")},function(e,t,n){var r=n(62);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m}));var r=n(20),o=n.n(r),c=n(5),i=n.n(c),a=n(0),s=n(46);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;t0&&Array.prototype.filter.call(a,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),p({Block:n,containers:a,getProps:r,getErrorBoundaryProps:o}),Array.prototype.forEach.call(s,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,c,i,a;r=(n=l(l({},e),{},{wrapper:t})).Block,o=n.getProps,c=n.getErrorBoundaryProps,i=n.selector,a=n.wrapper.querySelectorAll(i),p({Block:r,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){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,u=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?u=s.concat(u):f=-1,u.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=u.length;t;){for(s=u,u=[];++f1)for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(i.uniqueId)(),type:r.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:n}},removeEventCallback:function(e,t){return{id:t,type:r.REMOVE_EVENT_CALLBACK,eventType:e}}},l={},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,n=t.type,o=t.eventType,i=t.id,a=t.callback,u=t.priority,f=e.hasOwnProperty(o)?new Map(e[o]):new Map;switch(n){case r.ADD_EVENT_CALLBACK:return f.set(i,{priority:u,callback:a}),s(s({},e),{},c()({},o,f));case r.REMOVE_EVENT_CALLBACK:return f.delete(i),s(s({},e),{},c()({},o,f))}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return E})),n.d(t,"a",(function(){return j}));var r=n(5),o=n.n(r),c=n(4),i=n.n(c),a=(n(8),n(0)),s=n(11),u=n(52),l=n(36),f=n(20),p=n.n(f),d=n(7),m=n.n(d),b=n(152),h=(n(105),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""}),v=function(e){var t=e.className,n=e.notices,r=e.removeNotice,o=n.filter((function(e){return"snackbar"!==e.type}));if(!o.length)return null;var c=m()(t,"wc-block-components-notices");return React.createElement("div",{className:c},o.map((function(e){return React.createElement(b.a,p()({key:"store-notice-"+e.id},e,{className:m()("wc-block-components-notices__notice",h(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))};function g(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;t0&&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]:{};m(e,t,y(y({},n),{},{context:n.context||p})),_("store-notice-create",{status:e,content:t,options:n})}),[m,_,p]),P=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;b(e,t)}),[b,p]),R={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(p)}}),[p]).notices,createNotice:w,removeNotice:P,context:p,setIsSuppressed:j},k=E?null:React.createElement(v,{className:r,notices:R.notices,removeNotice:R.removeNotice,isEditor:S});return React.createElement(O.Provider,{value:R},c&&k,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(4),o=n.n(r),c=function(e){return e.reduce((function(e,t){var n=o()(t,2),r=n[0],c=n[1];return e[r]=c,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 f})),n.d(t,"j",(function(){return p})),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 v})),n.d(t,"b",(function(){return g}));var r,o=n(2),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),f=o.STORE_PAGES.privacy.permalink,p=(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",{}),v=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 c})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a}));var r,o=window.CustomEvent||null,c=function(e,t){var n=t.bubbles,r=void 0!==n&&n,c=t.cancelable,i=void 0!==c&&c,a=t.element,s=t.detail,u=void 0===s?{}:s;if(o){a||(a=document.body);var l=new o(e,{bubbles:r,cancelable:i,detail:u});a.dispatchEvent(l)}},i=function(){r&&clearTimeout(r),r=setTimeout((function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})}),50)},a=function(e,t){var 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 function(){};var o=function(){c(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},function(e,t,n){"use strict";var r=n(0),o=n(44),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 a}));var r=n(11),o=n(0),c=n(9),i=n(83),a=function(){var e=Object(i.a)(),t=Object(r.useDispatch)(c.CART_STORE_KEY).selectShippingRate;return{selectShippingRate:Object(o.useCallback)((function(n,r){t(n,r).catch((function(t){e(t)}))}),[e,t]),isSelectingRate:Object(r.useSelect)((function(e){return e(c.CART_STORE_KEY).isShippingRateBeingSelected()}),[])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(35),o=n.n(r),c=n(24),i=n.n(c),a=n(1),s=function(){var e=o()(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return n=e.sent,e.abrupt("return",{message:n.message,type:n.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(a.__)("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(80);function c(e,t){return e===t}function i(e,t,n){var i=n&&n.equalityFn?n.equalityFn:c,a=Object(r.useState)(e),s=a[0],u=a[1],l=Object(o.a)(Object(r.useCallback)((function(e){return u(e)}),[]),t,n),f=l[0],p=l[1],d=l[2],m=Object(r.useRef)(e);return Object(r.useEffect)((function(){i(m.current,e)||(f(e),m.current=e)}),[e,f,i]),[s,p,d]}},,,,function(e,t){e.exports=window.wp.wordcount},,function(e,t,n){"use strict";var r=n(7),o=n.n(r);n(211),t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-product-badge",n)},t)}},function(e,t){e.exports=window.wp.components},function(e,t,n){"use strict";n(155),t.a=function(){return React.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],i=o[1]||"";return{beforeDecimal:c,afterDecimal:i,hasNagation:n,addNegation:r}}function g(e,t,n){for(var r="",o=n?"0":"",c=0;c<=t-1;c++)r+=e[c]||o;return r}function y(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 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:d,onChange:d,onKeyDown:d,onMouseUp:d,onFocus:d,onBlur:d,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=a(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,i=void 0===c?"":c;if(e!==t){this.validateProps();var a=this.formatNumString(i),s=b(t.value)?a:this.formatValueProp(),u=this.removeFormatting(s),l=parseFloat(u),f=parseFloat(i);(isNaN(l)&&isNaN(f)||l===f)&&a===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 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(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){y(e,t),setTimeout((function(){e.value===n&&y(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,c=r.suffix,i=r.format;if(""===e)return 0;if(t=O(t,0,e.length),!i){var a="-"===e[0];return O(t,o.length+(a?1:0),e.length-c.length)}if("function"==typeof i)return t;if("#"===i[t]&&m(e[t]))return t;if("#"===i[t-1]&&m(e[t-1]))return t;var s=i.indexOf("#");t=O(t,s,i.lastIndexOf("#")+1);for(var u=i.substring(t,i.length).indexOf("#"),l=t,f=t+(-1===u?0:u);l>s&&("#"!==i[l]||!m(e[l]));)l-=1;return!m(e[f])||"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,i=this.props,a=i.value,s=i.isNumericString,u=!(a=b(a)?e:a)&&0!==a;return u&&c&&(a=""),u&&!c?"":("number"==typeof a&&(a=a.toString(),s=!0),"Infinity"===a&&s&&(a=""),s&&!n&&"number"==typeof r&&(a=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=v(e),c=o.beforeDecimal,i=o.afterDecimal,a=o.hasNagation,s=parseFloat("0.".concat(i||"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=g(s[1]||"",Math.min(t,i.length),n),f=r?".":"";return"".concat(a?"-":"").concat(u).concat(f).concat(l)}(a,r,o)),s?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),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,i=n.decimalScale,a=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e=t.length-c.length||i&&a&&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=h.start,y=h.end;if(!o&&g===y&&-1!==l.indexOf(n[m])){var O=0===s?"":f;return n.substr(0,m)+O+n.substr(m+1,n.length)}var E=o?0:i.length,j=t.length-(o?0:a.length);if(n.length>t.length||!n.length||g===y||0===m&&b===t.length||m===E&&b===j)return n;if(this.checkIfFormatGotDeleted(g,y,t)&&(n=t),!o){var _=this.removeFormatting(n),S=v(_,c),w=S.beforeDecimal,P=S.afterDecimal,R=S.addNegation,k=eO;)y--;y=this.correctCaretPosition(a,y,"left")}}else for(;!h.test(a[y])&&yE)&&(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,c=void 0===o?"":o;if(n===r){var i=this.correctCaretPosition(c,n);i!==n&&this.setPatchedCaretPosition(t,i,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,i=void 0===c?"":c,a=t.correctCaretPosition(i,r);a===r||0===r&&o===i.length||t.setPatchedCaretPosition(n,a,i),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,c=r.type,a=r.displayType,s=r.customInput,u=r.renderText,l=r.getInputRef,f=r.format,p=this.state.value,d=(e=this.props,t=j,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),m=i({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(f)?"numeric":void 0},d,{type:c,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===a)return u?u(p)||null:o.a.createElement("span",i({},d,{ref:l}),p);if(s){var b=s;return o.a.createElement(b,i({},m,{ref:l}))}return o.a.createElement("input",i({},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(5),o=n.n(r),c=n(26),i=n.n(c),a=n(0),s=["srcElement","size"];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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,c=i()(e,s);return Object(a.isValidElement)(t)?Object(a.cloneElement)(t,function(e){for(var t=1;te.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 d(){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=d();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),f(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 v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Error;if(!e)throw new n(t)}function g(e){v(function(e){return a(e)&&e<=100&&e>=0}(e),"You must provide a numeric value between 0 and 100.",RangeError)}function y(e){v(Number.isInteger(e),"You must provide an integer.",TypeError)}var O=d(),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;y(r),y(c);var i=e.globalLocale,a=e.globalFormat,s=e.globalRoundingMode,u=e.globalFormatRoundingMode,l=Object.assign({},e.globalExchangeRatesApi),f=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})},d=function(e){v(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 f.call(this,{locale:e})},getPrecision:function(){return c},convertPrecision:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;y(e);var n=this.getPrecision(),r=e>n,o=r?O.multiply:O.divide,c=r?[e,n]:[n,e],i=Math.pow(10,O.subtract.apply(O,c));return f.call(this,{amount:O.round(o(this.getAmount(),i),t),precision:e})},add:function(t){d.call(this,t);var n=e.normalizePrecision([this,t]);return f.call(this,{amount:O.add(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},subtract:function(t){d.call(this,t);var n=e.normalizePrecision([this,t]);return f.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 f.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 f.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){v(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),f.call(t,{amount:o})})),c=0;r>0;)e[c]>0&&(o[c]=o[c].add(f.call(this,{amount:1})),r=O.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,i=void 0===c?l.propertyPath||"rates.{{to}}":c,a=n.headers,u=void 0===a?l.headers:a,d=n.roundingMode,m=void 0===d?s:d,b=Object.assign({},{endpoint:o,propertyPath:i,headers:u,roundingMode:m});return h(b).getExchangeRate(this.getCurrency(),e).then((function(n){return v(!p(n),'No rate was found for the destination currency "'.concat(e,'".'),TypeError),f.call(t,{amount:O.round(O.multiply(t.getAmount(),parseFloat(n)),b.roundingMode),currency:e})}))},equalsTo:function(e){return this.hasSameAmount(e)&&this.hasSameCurrency(e)},lessThan:function(t){d.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()n[1].getAmount()},greaterThanOrEqual:function(t){d.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,c))},hasCents:function(){return 0!==O.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]:a,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 O.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 O.divide(O.round(O.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}},i);t.a=E},,function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(20),o=n.n(r),c=n(26),i=n.n(c),a=n(81),s=n(7),u=n.n(s),l=n(126),f=(n(204),["className","showSpinner","children"]);t.a=function(e){var t=e.className,n=e.showSpinner,r=void 0!==n&&n,c=e.children,s=i()(e,f),p=u()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return React.createElement(a.a,o()({className:p},s),r&&React.createElement(l.a,null),React.createElement("span",{className:"wc-block-components-button__text"},c))}},,function(e,t,n){"use strict";var r=n(5),o=n.n(r),c=n(1),i=n(85),a=n(7),s=n.n(a),u=(n(8),n(60)),l=n(0),f=(n(207),function(e){var t=e.currency,n=e.maxPrice,r=e.minPrice,o=e.priceClassName,a=e.priceStyle;return React.createElement(React.Fragment,null,React.createElement("span",{className:"screen-reader-text"},Object(c.sprintf)(
+/* translators: %1$s min price, %2$s max price */
+Object(c.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(u.formatPrice)(r),Object(u.formatPrice)(n))),React.createElement("span",{"aria-hidden":!0},React.createElement(i.a,{className:s()("wc-block-components-product-price__value",o),currency:t,value:r,style:a})," — ",React.createElement(i.a,{className:s()("wc-block-components-product-price__value",o),currency:t,value:n,style:a})))}),p=function(e){var t=e.currency,n=e.regularPriceClassName,r=e.regularPriceStyle,o=e.regularPrice,a=e.priceClassName,u=e.priceStyle,l=e.price;return React.createElement(React.Fragment,null,React.createElement("span",{className:"screen-reader-text"},Object(c.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(i.a,{currency:t,renderText:function(e){return React.createElement("del",{className:s()("wc-block-components-product-price__regular",n),style:r},e)},value:o}),React.createElement("span",{className:"screen-reader-text"},Object(c.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(i.a,{currency:t,renderText:function(e){return React.createElement("ins",{className:s()("wc-block-components-product-price__value","is-discounted",a),style:u},e)},value:l}))};t.a=function(e){var t=e.align,n=e.className,r=e.currency,c=e.format,a=void 0===c?"":c,u=e.maxPrice,d=void 0===u?null:u,m=e.minPrice,b=void 0===m?null:m,h=e.price,v=void 0===h?null:h,g=e.priceClassName,y=e.priceStyle,O=e.regularPrice,E=e.regularPriceClassName,j=e.regularPriceStyle,_=s()(n,"price","wc-block-components-product-price",o()({},"wc-block-components-product-price--align-".concat(t),t));a.includes("")||(a="",console.error("Price formats need to include the `` tag."));var S=O&&v!==O,w=React.createElement("span",{className:s()("wc-block-components-product-price__value",g)});return S?w=React.createElement(p,{currency:r,price:v,priceClassName:g,priceStyle:y,regularPrice:O,regularPriceClassName:E,regularPriceStyle:j}):null!==b&&null!==d?w=React.createElement(f,{currency:r,maxPrice:d,minPrice:b,priceClassName:g,priceStyle:y}):null!==v&&(w=React.createElement(i.a,{className:s()("wc-block-components-product-price__value",g),currency:r,value:v,style:y})),React.createElement("span",{className:_},Object(l.createInterpolateElement)(a,{price:w}))}},,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return J})),n.d(t,"a",(function(){return ee}));var r,o,c=n(42),i=n.n(c),a=n(4),s=n.n(a),u=n(0);!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(r||(r={})),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={}));var l={currentStatus:r.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},f={setPaymentStatus:function(){return{pristine:function(){},started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(e,t){}}},currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:r,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:function(){},activeSavedToken:"",setActiveSavedToken:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){return function(){return function(){}}},setExpressPaymentError:function(){},isExpressPaymentMethodActive:!1,setShouldSavePayment:function(){},shouldSavePayment:!1},p=n(5),d=n.n(p),m=n(21),b=n.n(m);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 v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0,n=t.type,c=t.paymentMethodData,i=t.shouldSavePaymentMethod,a=void 0!==i&&i,s=t.errorMessage,u=void 0===s?"":s,f=t.paymentMethods,p=void 0===f?{}:f;switch(n){case r.STARTED:return v(v({},e),{},{currentStatus:r.STARTED,paymentMethodData:c||e.paymentMethodData,hasSavedToken:g(c||e.paymentMethodData)});case r.ERROR:return e.currentStatus!==r.ERROR?v(v({},e),{},{currentStatus:r.ERROR,errorMessage:u||e.errorMessage}):e;case r.FAILED:return e.currentStatus!==r.FAILED?v(v({},e),{},{currentStatus:r.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:u||e.errorMessage}):e;case r.SUCCESS:return e.currentStatus!==r.SUCCESS?v(v({},e),{},{currentStatus:r.SUCCESS,paymentMethodData:c||e.paymentMethodData,hasSavedToken:g(c||e.paymentMethodData)}):e;case r.PROCESSING:return e.currentStatus!==r.PROCESSING?v(v({},e),{},{currentStatus:r.PROCESSING,errorMessage:""}):e;case r.COMPLETE:return e.currentStatus!==r.COMPLETE?v(v({},e),{},{currentStatus:r.COMPLETE}):e;case r.PRISTINE:return v(v({},l),{},{currentStatus:r.PRISTINE,paymentMethods:v({},e.paymentMethods),expressPaymentMethods:v({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case o.SET_REGISTERED_PAYMENT_METHODS:return v(v({},e),{},{paymentMethods:p});case o.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return v(v({},e),{},{expressPaymentMethods:p});case o.SET_SHOULD_SAVE_PAYMENT_METHOD:return v(v({},e),{},{shouldSavePaymentMethod:a})}},O=n(35),E=n.n(O),j=n(24),_=n.n(j),S=n(1),w=n(31),P=n(45),R=n(2),k=n(80),C=n(36),x=n(65),T=n(57),N=n(33),A=n(51),D=n(43);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 I(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:void 0;n&&ne(n),te(U({errorMessage:e||"",paymentMethodData:t||{}}))},success:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;t&&ne(t),void 0!==b()(n)&&null!=n&&n.address&&re(n.address),te(V({paymentMethodData:e}))}}}),[te,ne,re])}),se=ae.dispatchActions,ue=ae.setPaymentStatus,le=function(e){var t=Object(w.getPaymentMethods)(),n=Object(D.c)().noticeContexts,r=new Set([].concat(i()(Object(R.getSetting)("paymentGatewaySortOrder",[])),i()(Object.keys(t))));return F(e,t,Array.from(r),n.PAYMENTS)}(se.setRegisteredPaymentMethods),fe=function(e){var t=Object(w.getExpressPaymentMethods)(),n=Object(D.c)().noticeContexts;return F(e,t,Object.keys(t),n.EXPRESS_PAYMENTS)}(se.setRegisteredExpressPaymentMethods),pe=function(){var e=Object(W.a)().dispatchCheckoutEvent,t=Object(u.useState)(""),n=s()(t,2),r=n[0],o=n[1],c=Object(u.useState)(""),i=s()(c,2),a=i[0],l=i[1];return Object(u.useEffect)((function(){e("set-active-payment-method",{activePaymentMethod:r})}),[e,r]),{activePaymentMethod:r,activeSavedToken:a,setActivePaymentMethod:o,setActiveSavedToken:l}}(),de=pe.activePaymentMethod,me=pe.activeSavedToken,be=pe.setActivePaymentMethod,he=pe.setActiveSavedToken,ve=Object(u.useMemo)((function(){return m?h("previewSavedPaymentMethods"):le?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};var t=Object(R.getSetting)("customerPaymentMethods",{}),n=Object.keys(t),r={};return n.forEach((function(n){var o=t[n].filter((function(t){var n,r=t.method.gateway;return r in e&&(null===(n=e[r].supports)||void 0===n?void 0:n.showSavedCards)}));o.length&&(r[n]=o)})),r}(ie.paymentMethods):{}}),[m,h,le,ie.paymentMethods]),ge=Object(u.useCallback)((function(e){e?O(e,{id:"wc-express-payment-error",context:k.EXPRESS_PAYMENTS}):E("wc-express-payment-error",k.EXPRESS_PAYMENTS)}),[O,k.EXPRESS_PAYMENTS,E]),ye=Object.keys(ie.expressPaymentMethods).includes(de),Oe=Object(u.useMemo)((function(){return{isPristine:ie.currentStatus===r.PRISTINE,isStarted:ie.currentStatus===r.STARTED,isProcessing:ie.currentStatus===r.PROCESSING,isFinished:[r.ERROR,r.FAILED,r.SUCCESS].includes(ie.currentStatus),hasError:ie.currentStatus===r.ERROR,hasFailed:ie.currentStatus===r.FAILED,isSuccessful:ie.currentStatus===r.SUCCESS,isDoingExpressPayment:ie.currentStatus!==r.PRISTINE&&ye}}),[ie.currentStatus,ye]);Object(u.useEffect)((function(){var e=Object.keys(ie.paymentMethods),t=[].concat(i()(e),i()(Object.keys(ie.expressPaymentMethods)));le&&e.length&&be((function(e){return e&&t.includes(e)?e:(ue().pristine(),Object.keys(ie.paymentMethods)[0])}))}),[le,ie.paymentMethods,ie.expressPaymentMethods,be,ue]),Object(u.useEffect)((function(){!c||p||f||Oe.isFinished||ue().processing()}),[c,p,f,Oe.isFinished,ue]),Object(u.useEffect)((function(){a&&!Oe.isSuccessful&&ue().pristine()}),[a,Oe.isSuccessful,ue]),Object(u.useEffect)((function(){p&&Oe.isSuccessful&&!ie.hasSavedToken&&ue().pristine()}),[p,Oe.isSuccessful,ie.hasSavedToken,ue]),Object(u.useEffect)((function(){Oe.isProcessing&&(E("wc-payment-error",k.PAYMENTS),Object(X.b)(ee.current,"payment_processing",{}).then((function(e){var t,n,r,o,c,i,a,s;if(e.forEach((function(e){_(e)&&(t=e),(S(e)||P(e))&&(n=e)})),t&&!n)ue().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===(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(n&&P(n)){var u,l,f,p,d,m;n.message&&n.message.length&&O(n.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=n)||void 0===m?void 0:m.messageContext)||k.PAYMENTS}),ue().failed(null===(u=n)||void 0===u?void 0:u.message,null===(l=n)||void 0===l||null===(f=l.meta)||void 0===f?void 0:f.paymentMethodData,null===(p=n)||void 0===p||null===(d=p.meta)||void 0===d?void 0:d.billingData)}else if(n){var b,h;n.message&&n.message.length&&O(n.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(h=n)||void 0===h?void 0:h.messageContext)||k.PAYMENTS}),ue().error(n.message),v(null===(b=n)||void 0===b?void 0:b.validationErrors)}else ue().success()})))}),[Oe.isProcessing,v,ue,E,k.PAYMENTS,_,P,S,O]);var Ee={setPaymentStatus:ue,currentStatus:Oe,paymentStatuses:r,paymentMethodData:ie.paymentMethodData,errorMessage:ie.errorMessage,activePaymentMethod:de,setActivePaymentMethod:be,activeSavedToken:me,setActiveSavedToken:he,onPaymentProcessing:J,customerPaymentMethods:ve,paymentMethods:ie.paymentMethods,expressPaymentMethods:ie.expressPaymentMethods,paymentMethodsInitialized:le,expressPaymentMethodsInitialized:fe,setExpressPaymentError:ge,isExpressPaymentMethodActive:ye,shouldSavePayment:ie.shouldSavePaymentMethod,setShouldSavePayment:se.setShouldSavePayment};return React.createElement(Z.Provider,{value:Ee},n)}},,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return O}));var r=n(21),o=n.n(r),c=n(5),i=n.n(c),a=n(26),s=n.n(a),u=n(4),l=n.n(u),f=n(0),p=n(6),d=n(19),m=n.n(d);function b(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;t0,getValidationErrorId:u};return React.createElement(g.Provider,{value:E},t)}},function(e,t,n){"use strict";var r=n(20),o=n.n(r),c=n(26),i=n.n(c),a=n(32),s=n(7),u=n.n(s),l=(n(206),["className","disabled","name","permalink","rel","style","onClick"]);t.a=function(e){var t=e.className,n=void 0===t?"":t,r=e.disabled,c=void 0!==r&&r,s=e.name,f=e.permalink,p=void 0===f?"":f,d=e.rel,m=e.style,b=(e.onClick,i()(e,l)),h=u()("wc-block-components-product-name",n);if(c){var v=b;return React.createElement("span",o()({className:h},v,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(s)}}))}return React.createElement("a",o()({className:h,href:p,rel:d},b,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(s)},style:m}))}},function(e,t,n){"use strict";var r=n(0),o=n(122),c=n(106),i=function(e){var t=e.indexOf("");return-1===t?e:e.substr(0,t+4)},a=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",r=a(e),o=r.split(" ").splice(0,t).join(" ");return Object(c.autop)(s(o,n))},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",o=a(e),i=o.slice(0,t);if(n)return Object(c.autop)(s(i,r));var u=i.match(/([\s]+)/g),l=u?u.length:0,f=o.slice(0,t+l);return Object(c.autop)(s(f,r))};t.a=function(e){var t=e.source,n=e.maxLength,a=void 0===n?15:n,s=e.countType,f=void 0===s?"words":s,p=e.className,d=void 0===p?"":p,m=Object(r.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",r=Object(c.autop)(e),a=Object(o.count)(r,n);if(a<=t)return r;var s=i(r),f=Object(o.count)(s,n);return f<=t?s:"words"===n?u(s,t):l(s,t,"characters_including_spaces"===n)}(t,a,f)}),[t,a,f]);return React.createElement(r.RawHTML,{className:d},m)}},,function(e,t,n){"use strict";var r=n(20),o=n.n(r),c=n(5),i=n.n(c),a=n(7),s=n.n(a),u=function(e){return"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--".concat(e)},l=function(e){var t=e.id,n=e.src,r=void 0===n?null:n,o=e.alt,c=void 0===o?"":o;return r?React.createElement("img",{className:u(t),src:r,alt:c}):null},f=n(104),p=[{id:"alipay",alt:"Alipay",src:f.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:f.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:f.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:f.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:f.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:f.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:f.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:f.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:f.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:f.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:f.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:f.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:f.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:f.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:f.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:f.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:f.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:f.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:f.l+"payment-methods/wechat.svg"}],d=n(21),m=n.n(d),b=n(66);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 v(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:10,c=r.a.addEventCallback(e,n,o);return t(c),function(){t(r.a.removeEventCallback(e,c.id))}}}},function(e,t,n){"use strict";var r=n(42),o=n.n(r),c=n(7),i=n.n(c),a=n(1),s=n(0),u=n(26),l=n.n(u),f=n(34),p=n(21),d=n.n(p),m=n(58),b=(n(217),function(e){var t=e.className,n=e.quantity,r=void 0===n?1:n,o=e.minimum,c=void 0===o?1:o,u=e.maximum,l=e.onChange,p=void 0===l?function(){}:l,b=e.itemName,h=void 0===b?"":b,v=e.disabled,g=i()("wc-block-components-quantity-selector",t),y=void 0!==u,O=r>c,E=!y||r":r;if(!n||n<=0)return null;o.includes("")||(o="",console.error("Price formats need to include the `` tag."));var c=Object(a.sprintf)(
+/* translators: %s will be replaced by the discount amount */
+Object(a.__)("Save %s","woo-gutenberg-products-block"),o);return React.createElement(A.a,{className:"wc-block-components-sale-badge"},Object(s.createInterpolateElement)(c,{price:React.createElement(N.a,{currency:t,value:n})}))},M=n(269),I=n(60),F=n(28),L=n(153),B=n(2),U=["receiveCart"],V=function(e,t){return e.convertPrecision(t.minorUnit).getAmount()},H=function(e){return Object(F.mustContain)(e,"")},G=Object(s.forwardRef)((function(e,t){var n=e.lineItem,r=e.onRemove,o=void 0===r?function(){}:r,c=e.tabIndex,u=void 0===c?null:c,p=n.name,d=void 0===p?"":p,m=n.catalog_visibility,g=void 0===m?"visible":m,N=n.short_description,A=void 0===N?"":N,G=n.description,q=void 0===G?"":G,Y=n.low_stock_remaining,W=void 0===Y?null:Y,z=n.show_backorder_badge,K=void 0!==z&&z,$=n.quantity_limit,X=void 0===$?99:$,Q=n.permalink,Z=void 0===Q?"":Q,J=n.images,ee=void 0===J?[]:J,te=n.variation,ne=void 0===te?[]:te,re=n.item_data,oe=void 0===re?[]:re,ce=n.prices,ie=void 0===ce?{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"}}:ce,ae=n.totals,se=void 0===ae?{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"}:ae,ue=n.extensions,le=function(e){var t={key:"",quantity:1};(function(e){return Object(w.b)(e)&&Object(w.d)(e,"key")&&Object(w.d)(e,"quantity")&&Object(w.c)(e.key)&&Object(w.a)(e.quantity)})(e)&&(t.key=e.key,t.quantity=e.quantity);var n=t.key,r=void 0===n?"":n,o=t.quantity,c=void 0===o?1:o,i=Object(P.a)().cartErrors,a=Object(R.b)().dispatchActions,u=Object(s.useState)(c),l=y()(u,2),f=l[0],p=l[1],d=Object(j.a)(f,400),m=y()(d,1)[0],b=Object(_.a)(m),h=Object(O.useDispatch)(E.CART_STORE_KEY),v=h.removeItemFromCart,g=h.changeCartItemQuantity,k=Object(O.useSelect)((function(e){if(!r)return{quantity:!1,delete:!1};var t=e(E.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(r),delete:t.isItemPendingDelete(r)}}),[r]),C=Object(s.useCallback)((function(){return r?v(r).then((function(){return Object(S.c)(),!0})):Promise.resolve(!1)}),[r,v]);return Object(s.useEffect)((function(){r&&Object(w.a)(b)&&Number.isFinite(b)&&b!==m&&g(r,m)}),[r,g,m,b]),Object(s.useEffect)((function(){return k.delete?a.incrementCalculating():a.decrementCalculating(),function(){k.delete&&a.decrementCalculating()}}),[a,k.delete]),Object(s.useEffect)((function(){return k.quantity||m!==f?a.incrementCalculating():a.decrementCalculating(),function(){(k.quantity||m!==f)&&a.decrementCalculating()}}),[a,k.quantity,m,f]),{isPendingDelete:k.delete,quantity:f,setItemQuantity:p,removeItem:C,cartItemQuantityErrors:i}}(n),fe=le.quantity,pe=le.setItemQuantity,de=le.removeItem,me=le.isPendingDelete,be=Object(k.a)().dispatchStoreEvent,he=Object(P.a)(),ve=(he.receiveCart,l()(he,U)),ge=Object(s.useMemo)((function(){return{context:"cart",cartItem:n,cart:ve}}),[n,ve]),ye=Object(I.getCurrencyFromPriceResponse)(ie),Oe=Object(F.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:d,extensions:ue,arg:ge}),Ee=Object(L.a)({amount:parseInt(ie.raw_prices.regular_price,10),precision:ie.raw_prices.precision}),je=Object(L.a)({amount:parseInt(ie.raw_prices.price,10),precision:ie.raw_prices.precision}),_e=Ee.subtract(je),Se=_e.multiply(fe),we=Object(I.getCurrencyFromPriceResponse)(se),Pe=parseInt(se.line_subtotal,10);Object(B.getSetting)("displayCartPricesIncludingTax",!1)&&(Pe+=parseInt(se.line_subtotal_tax,10));var Re=Object(L.a)({amount:Pe,precision:we.minorUnit}),ke=ee.length?ee[0]:{},Ce="hidden"===g||"search"===g,xe=Object(F.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:ue,arg:ge}),Te=Object(F.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:ue,arg:ge,validation:H}),Ne=Object(F.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:ue,arg:ge,validation:H}),Ae=Object(F.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"",extensions:ue,arg:ge,validation:H});return React.createElement("tr",{className:i()("wc-block-cart-items__row",xe,{"is-disabled":me}),ref:t,tabIndex:u},React.createElement("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(w.d)(ke,"alt")||!ke.alt},Ce?React.createElement(C.a,{image:ke,fallbackAlt:Oe}):React.createElement("a",{href:Z,tabIndex:-1},React.createElement(C.a,{image:ke,fallbackAlt:Oe}))),React.createElement("td",{className:"wc-block-cart-item__product"},React.createElement(v.a,{disabled:me||Ce,name:Oe,permalink:Z}),K?React.createElement(x.a,null):!!W&&React.createElement(T.a,{lowStockRemaining:W}),React.createElement("div",{className:"wc-block-cart-item__prices"},React.createElement(h.a,{currency:ye,regularPrice:V(Ee,ye),price:V(je,ye),format:Ne})),React.createElement(D,{currency:ye,saleAmount:V(_e,ye),format:Ae}),React.createElement(M.a,{shortDescription:A,fullDescription:q,itemData:oe,variation:ne}),React.createElement("div",{className:"wc-block-cart-item__quantity"},React.createElement(b,{disabled:me,quantity:fe,maximum:X,onChange:function(e){pe(e),be("cart-set-item-quantity",{product:n,quantity:e})},itemName:Oe}),React.createElement("button",{className:"wc-block-cart-item__remove-link",onClick:function(){o(),de(),be("cart-remove-item",{product:n,quantity:fe}),Object(f.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"),Oe))},disabled:me},Object(a.__)("Remove item","woo-gutenberg-products-block")))),React.createElement("td",{className:"wc-block-cart-item__total"},React.createElement("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},React.createElement(h.a,{currency:we,format:Te,price:Re.getAmount()}),fe>1&&React.createElement(D,{currency:ye,saleAmount:V(Se,ye),format:Ae}))))})),q=o()(Array(3)).map((function(_x,e){return React.createElement(G,{lineItem:{},key:e})})),Y=function(e){var t={};return e.forEach((function(e){var n=e.key;t[n]=Object(s.createRef)()})),t};t.a=function(e){var t=e.lineItems,n=void 0===t?[]:t,r=e.isLoading,o=void 0!==r&&r,c=e.className,u=Object(s.useRef)(null),l=Object(s.useRef)(Y(n));Object(s.useEffect)((function(){l.current=Y(n)}),[n]);var f=function(e){return function(){null!=l&&l.current&&e&&l.current[e].current instanceof HTMLElement?l.current[e].current.focus():u.current instanceof HTMLElement&&u.current.focus()}},p=o?q:n.map((function(e,t){var r=n.length>t+1?n[t+1].key:null;return React.createElement(G,{key:e.key,lineItem:e,onRemove:f(r),ref:l.current[e.key],tabIndex:-1})}));return React.createElement("table",{className:i()("wc-block-cart-items",c),ref:u,tabIndex:-1},React.createElement("thead",null,React.createElement("tr",{className:"wc-block-cart-items__header"},React.createElement("th",{className:"wc-block-cart-items__header-image"},React.createElement("span",null,Object(a.__)("Product","woo-gutenberg-products-block"))),React.createElement("th",{className:"wc-block-cart-items__header-product"},React.createElement("span",null,Object(a.__)("Details","woo-gutenberg-products-block"))),React.createElement("th",{className:"wc-block-cart-items__header-total"},React.createElement("span",null,Object(a.__)("Total","woo-gutenberg-products-block"))))),React.createElement("tbody",null,p))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m}));var r=n(21),o=n.n(r),c=n(35),i=n.n(c),a=n(24),s=n.n(a),u=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},l=n(43);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return p(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)?p(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=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=n.call(e)},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}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]&&arguments[0],t=Object(o.b)(),n=t.paymentMethods,c=t.expressPaymentMethods,i=t.paymentMethodsInitialized,a=t.expressPaymentMethodsInitialized,s=Object(r.a)(n),u=Object(r.a)(c);return{paymentMethods:e?u:s,isInitialized:e?a:i}},i=function(){return c(!1)},a=function(){return c(!0)}},,,function(e,t,n){"use strict";var r=n(20),o=n.n(r),c=n(32),i=n(2);n(210),t.a=function(e){var t=e.image,n=void 0===t?{}:t,r=e.fallbackAlt,a=void 0===r?"":r,s=n.thumbnail?{src:n.thumbnail,alt:Object(c.decodeEntities)(n.alt)||a||"Product Image"}:{src:i.PLACEHOLDER_IMG_SRC,alt:""};return React.createElement("img",o()({className:"wc-block-components-product-image"},s,{alt:s.alt}))}},function(e,t,n){"use strict";var r=n(1),o=n(124);t.a=function(){return React.createElement(o.a,{className:"wc-block-components-product-backorder-badge"},Object(r.__)("Available on backorder","woo-gutenberg-products-block"))}},function(e,t,n){"use strict";var r=n(1),o=n(124);t.a=function(e){var t=e.lowStockRemaining;return t?React.createElement(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(r.sprintf)(
+/* translators: %d stock amount (number of items in stock for product) */
+Object(r.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,n){"use strict";var r=n(6),o=n(32),c=(n(213),function(e){var t=e.details,n=void 0===t?[]:t;return Array.isArray(n)?0===(n=n.filter((function(e){return!e.hidden}))).length?null:React.createElement("ul",{className:"wc-block-components-product-details"},n.map((function(e){var t=e.name?"wc-block-components-product-details__".concat(Object(r.kebabCase)(e.name)):"";return React.createElement("li",{key:e.name+(e.display||e.value),className:t},e.name&&React.createElement(React.Fragment,null,React.createElement("span",{className:"wc-block-components-product-details__name"},Object(o.decodeEntities)(e.name),":")," "),React.createElement("span",{className:"wc-block-components-product-details__value"},Object(o.decodeEntities)(e.display||e.value)))}))):null}),i=n(173),a=n(104),s=function(e){var t=e.className,n=e.shortDescription,r=void 0===n?"":n,o=e.fullDescription,c=r||(void 0===o?"":o);return c?React.createElement(i.a,{className:t,source:c,maxLength:15,countType:a.n.wordCountType||"words"}):null};n(212),t.a=function(e){var t=e.shortDescription,n=void 0===t?"":t,r=e.fullDescription,o=void 0===r?"":r,i=e.itemData,a=void 0===i?[]:i,u=e.variation,l=void 0===u?[]:u;return React.createElement("div",{className:"wc-block-components-product-metadata"},React.createElement(s,{className:"wc-block-components-product-metadata__description",shortDescription:n,fullDescription:o}),React.createElement(c,{details:a}),React.createElement(c,{details:l.map((function(e){var t=e.attribute;return{name:void 0===t?"":t,value:e.value}}))}))}}]);
\ 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..548264a1b4e
--- /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' => '6722dc31af0ece955953ad58cce01a4e');
\ 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..a27e8867246
--- /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){function e(e){for(var r,i,u=e[0],l=e[1],s=e[2],p=0,f=[];p2)return Object(r.registerBlockType)(t,e)},i=function(t,e){if(o.n>1)return Object(r.registerBlockType)(t,e)},u=function(){return o.n>2},l=function(){return o.n>1}},12:function(t,e){t.exports=window.wp.blockEditor},24:function(t,e){t.exports=window.wp.blocks},27:function(t,e){t.exports=window.wp.primitives},328:function(t,e,n){"use strict";var r=n(0),o=n(27),c=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=c},37:function(t,e,n){"use strict";n.d(e,"o",(function(){return c})),n.d(e,"m",(function(){return i})),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 p})),n.d(e,"g",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"c",(function(){return b})),n.d(e,"d",(function(){return w})),n.d(e,"h",(function(){return O})),n.d(e,"a",(function(){return g})),n.d(e,"i",(function(){return m})),n.d(e,"b",(function(){return h}));var r,o=n(4),c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=c.pluginUrl+"images/",u=c.pluginUrl+"build/",l=c.buildPhase,s=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,a=o.STORE_PAGES.checkout.id,p=o.STORE_PAGES.checkout.permalink,f=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),w=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",{})),g=Object(o.getSetting)("allowedCountries",{}),m=Object(o.getSetting)("shippingStates",{}),h=Object(o.getSetting)("allowedStates",{})},4:function(t,e){t.exports=window.wc.wcSettings},61:function(t,e,n){"use strict";var r=n(5),o=n.n(r),c=n(21),i=n.n(c),u=n(0),l=["srcElement","size"];function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}e.a=function(t){var e=t.srcElement,n=t.size,r=void 0===n?24:n,c=i()(t,l);return Object(u.isValidElement)(e)?Object(u.cloneElement)(e,function(t){for(var e=1;e array('wc-settings', 'wp-polyfill'), 'version' => '2a0fc5f88361959da3fb37bfea9b7867');
\ 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..734680de2b9
--- /dev/null
+++ b/build/mini-cart-frontend.js
@@ -0,0 +1 @@
+!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=245)}({107:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a}));var r,o=window.CustomEvent||null,c=function(e,t){var n=t.bubbles,r=void 0!==n&&n,c=t.cancelable,i=void 0!==c&&c,a=t.element,u=t.detail,d=void 0===u?{}:u;if(o){a||(a=document.body);var s=new o(e,{bubbles:r,cancelable:i,detail:d});a.dispatchEvent(s)}},i=function(){r&&clearTimeout(r),r=setTimeout((function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})}),50)},a=function(e,t){var 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 function(){};var o=function(){c(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},2:function(e,t){e.exports=window.wc.wcSettings},24:function(e,t){e.exports=window.regeneratorRuntime},245:function(e,t,n){e.exports=n(260)},260:function(e,t,n){"use strict";n.r(t);var r=n(35),o=n.n(r),c=n(5),i=n.n(c),a=n(24),u=n.n(a),d=n(2),s=function(e){var t=e.handle,n=e.src,r=e.version;if(0===document.querySelectorAll("#".concat(t,"-js, #").concat(t,"-js-prefetch")).length){var o=document.createElement("link");o.href=r?"".concat(n,"?ver=").concat(r):n,o.rel="preload",o.as="script",o.id="".concat(t,"-js-prefetch"),document.head.appendChild(o)}},f=n(66),l=function(e){return document.querySelectorAll("script#".concat(e)).length>0},b=function(e){if(Object(f.c)(e.id)&&!l(e.id)){var t=document.createElement("script");for(var n in e)if(e.hasOwnProperty(n)){var r=n;if("onload"!==r&&"onerror"!==r){var o=e[r];Object(f.c)(o)&&(t[r]=o)}}"function"==typeof e.onload&&(t.onload=e.onload),"function"==typeof e.onerror&&(t.onerror=e.onerror),document.body.appendChild(t)}},v=function(e){var t=e.handle,n=e.src,r=e.version,o=e.after,c=e.before,i=e.translations;return new Promise((function(e,a){l("".concat(t,"-js"))&&e(),i&&b({id:"".concat(t,"-js-translations"),innerHTML:i}),c&&b({id:"".concat(t,"-js-before"),innerHTML:c}),b({id:"".concat(t,"-js"),onerror:a,onload:function(){o&&b({id:"".concat(t,"-js-after"),innerHTML:o}),e()},src:r?"".concat(n,"?ver=").concat(r):n})}))},p=n(107);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 _(e){for(var t=1;t array('wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '3b1a7867031755bc27d82794dd227572');
\ No newline at end of file
diff --git a/build/mini-cart.js b/build/mini-cart.js
new file mode 100644
index 00000000000..ccf5d836670
--- /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,i,l=t[0],a=t[1],u=t[2],b=0,d=[];b2)return Object(r.registerBlockType)(e,t)},i=function(e,t){if(c.n>1)return Object(r.registerBlockType)(e,t)},l=function(){return c.n>2},a=function(){return c.n>1}},12:function(e,t){e.exports=window.wp.blockEditor},24:function(e,t){e.exports=window.wp.blocks},27:function(e,t){e.exports=window.wp.primitives},3:function(e,t){e.exports=window.wp.components},328:function(e,t,n){"use strict";var r=n(0),c=n(27),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},37: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 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 O})),n.d(t,"a",(function(){return w})),n.d(t,"i",(function(){return g})),n.d(t,"b",(function(){return j}));var r,c=n(4),o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=o.pluginUrl+"images/",l=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,O=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),w=Object(c.getSetting)("allowedCountries",{}),g=Object(c.getSetting)("shippingStates",{}),j=Object(c.getSetting)("allowedStates",{})},4:function(e,t){e.exports=window.wc.wcSettings},50:function(e,t){e.exports=window.wc.priceFormat},501:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(8),c=n.n(r),o=n(0),i=n(3),l=n(1),a=n(4),u=n(34),s=n.n(u),b=[],d=n(10),m=n.n(d),p=function(e){return Object(o.createElement)("div",m()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(o.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{filter:"url(#filter0_ddd)"},Object(o.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(o.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(o.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(o.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(o.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(o.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(o.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(o.createElement)("defs",null,Object(o.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(o.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(o.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(o.createElement)("feOffset",{dy:"1"}),Object(o.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(o.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(o.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(o.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(o.createElement)("feOffset",{dy:"1"}),Object(o.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(o.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(o.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(o.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(o.createElement)("feOffset",{dy:"2"}),Object(o.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(o.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(o.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(o.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))))};function f(e){var t=function(e){var t=function(e,t){var n=Object(o.useState)((function(){var n=window.localStorage.getItem(e);if(n)try{return JSON.parse(n)}catch(t){console.error("Value for key '".concat(e,"' could not be retrieved from localStorage because it can't be parsed."))}return t})),r=c()(n,2),i=r[0],l=r[1];return Object(o.useEffect)((function(){try{window.localStorage.setItem(e,JSON.stringify(i))}catch(t){console.error("Value for key '".concat(e,"' could not be saved in localStorage because it can't be converted into a string."))}}),[e,i]),[i,l]}("wc-blocks_dismissed_compatibility_notices",b),n=c()(t,2),r=n[0],i=n[1],l=Object(o.useState)(!1),a=c()(l,2),u=a[0],d=a[1],m=r.includes(e);return Object(o.useEffect)((function(){d(!m)}),[m]),[u,function(){var t=new Set(r);t.add(e),i(s()(t))}]}(e.blockName),n=c()(t,2),r=n[0],u=n[1];return Object(a.isWpVersion)("5.4","<=")||!r?null:Object(o.createElement)(i.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(l.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:function(){return u()},finishButtonText:Object(l.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(o.createElement)(p,null),content:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(l.__)("Compatibility notice","woo-gutenberg-products-block")),Object(o.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(o.createInterpolateElement)(Object(l.__)("This block may not be compatible with all checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(o.createElement)("em",null)})),Object(o.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(o.createInterpolateElement)(Object(l.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},61:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(21),i=n.n(o),l=n(0),a=["srcElement","size"];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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,o=i()(e,a);return Object(l.isValidElement)(t)?Object(l.cloneElement)(t,function(e){for(var t=1;t 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' => '8665d7479c93ff581db7ddd3bc866708');
\ 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..bcd27809c6d
--- /dev/null
+++ b/build/price-filter-frontend.js
@@ -0,0 +1 @@
+!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=229)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},102:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(9),o=r(11),a=r(0),i=r(45),c=r(83),u=function(e){var t=e.namespace,r=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,p=void 0===l?{}:l,f=e.shouldSelect,d=void 0===f||f;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var m=Object(a.useRef)({results:[],isLoading:!0}),b=Object(i.a)(p),g=Object(i.a)(s),h=Object(c.a)(),v=Object(o.useSelect)((function(e){if(!d)return null;var o=e(n.COLLECTIONS_STORE_KEY),a=[t,r,b,g],i=o.getCollectionError.apply(o,a);return i&&h(i),{results:o.getCollection.apply(o,a),isLoading:!o.hasFinishedResolution("getCollection",a)}}),[t,r,g,b,d]);return null!==v&&(m.current=v),m.current}},104: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 d})),r.d(t,"e",(function(){return m})),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),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),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",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},11:function(e,t){e.exports=window.wp.data},118:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(3),o=r(80);function a(e,t){return e===t}function i(e,t,r){var i=r&&r.equalityFn?r.equalityFn:a,c=Object(n.useState)(e),u=c[0],s=c[1],l=Object(o.a)(Object(n.useCallback)((function(e){return s(e)}),[]),t,r),p=l[0],f=l[1],d=l[2],m=Object(n.useRef)(e);return Object(n.useEffect)((function(){i(m.current,e)||(p(e),m.current=e)}),[e,p,i]),[u,f,d]}},119:function(e,t,r){"use strict";var n=r(1),o=(r(8),r(7)),a=r.n(o),i=r(49),c=(r(130),function(e){var t=e.className,r=e.disabled,o=e.label,c=void 0===o?Object(n.__)("Go","woo-gutenberg-products-block"):o,u=e.onClick,s=e.screenReaderLabel,l=void 0===s?Object(n.__)("Apply filter","woo-gutenberg-products-block"):s;return React.createElement("button",{type:"submit",className:a()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:r,onClick:u},React.createElement(i.a,{label:c,screenReaderLabel:l}))});c.defaultProps={disabled:!1},t.a=c},127: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 x(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})])},w={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:d,onChange:d,onKeyDown:d,onMouseUp:d,onFocus:d,onBlur:d,isAllowed:function(){return!0}},j=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]&&m(e[t]))return t;if("#"===i[t-1]&&m(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]||!m(e[l]));)l-=1;return!m(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[m])){var O=0===u?"":p;return r.substr(0,m)+O+r.substr(m+1,r.length)}var x=o?0:i.length,_=t.length-(o?0:c.length);if(r.length>t.length||!r.length||v===y||0===m&&b===t.length||m===x&&b===_)return r;if(this.checkIfFormatGotDeleted(v,y,t)&&(r=t),!o){var w=this.removeFormatting(r),j=h(w,a),S=j.beforeDecimal,k=j.afterDecimal,E=j.addNegation,P=eO;)y--;y=this.correctCaretPosition(c,y,"left")}}else for(;!g.test(c[y])&&yx)&&(e.preventDefault(),this.setPatchedCaretPosition(r,y,c)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,y,c),m(e)}else m(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,d=(e=this.props,t=_,r={},Object.keys(e).forEach((function(n){t[n]||(r[n]=e[n])})),r),m=i({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(p)?"numeric":void 0},d,{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({},d,{ref:l}),f);if(u){var b=u;return o.a.createElement(b,i({},m,{ref:l}))}return o.a.createElement("input",i({},m,{ref:l}))}}])&&a(r.prototype,n),t}(o.a.Component);j.propTypes=_,j.defaultProps=w,t.a=j},130:function(e,t){},156:function(e,t){},179:function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r(5),o=r.n(n),a=r(42),i=r.n(a),c=r(21),u=r.n(c),s=r(4),l=r.n(s),p=r(0),f=r(118),d=r(6),m=r(45),b=r(75),g=r(102),h=r(55);function v(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 y(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]}),g=r(119),h=function(e){var t=e.minPrice,r=e.maxPrice,n=e.minConstraint,o=e.maxConstraint,i=e.onChange,c=void 0===i?function(){}:i,u=e.step,p=e.currency,h=e.showInputFields,v=void 0===h||h,y=e.showFilterButton,O=void 0!==y&&y,x=e.isLoading,_=void 0!==x&&x,w=e.onSubmit,j=void 0===w?function(){}:w,S=Object(s.useRef)(),k=Object(s.useRef)(),E=u||10*Math.pow(10,p.minorUnit),P=Object(s.useState)(t),R=a()(P,2),N=R[0],T=R[1],C=Object(s.useState)(r),F=a()(C,2),M=F[0],A=F[1];Object(s.useEffect)((function(){T(t)}),[t]),Object(s.useEffect)((function(){A(r)}),[r]);var D=Object(s.useMemo)((function(){return isFinite(n)&&isFinite(o)}),[n,o]),I=Object(s.useMemo)((function(){return isFinite(t)&&isFinite(r)&&D?{"--low":Math.round((t-n)/(o-n)*100)-.5+"%","--high":Math.round((r-n)/(o-n)*100)+.5+"%"}:{"--low":"0%","--high":"100%"}}),[t,r,n,o,D]),B=Object(s.useCallback)((function(e){if(!_&&D){var t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=S.current.offsetWidth,a=S.current.value,i=k.current.offsetWidth,c=k.current.value,u=n*(a/o),s=i*(c/o);Math.abs(r-u)>Math.abs(r-s)?(S.current.style.zIndex=20,k.current.style.zIndex=21):(S.current.style.zIndex=21,k.current.style.zIndex=20)}}),[_,o,D]),U=Object(s.useCallback)((function(e){var a=e.target.classList.contains("wc-block-price-filter__range-input--min"),i=e.target.value,u=a?[Math.round(i/E)*E,r]:[t,Math.round(i/E)*E],s=b(u,n,o,E,a);c([parseInt(s[0],10),parseInt(s[1],10)])}),[c,t,r,n,o,E]),V=Object(s.useCallback)((function(e){if(!(e.relatedTarget&&e.relatedTarget.classList&&e.relatedTarget.classList.contains("wc-block-price-filter__amount"))){var t=e.target.classList.contains("wc-block-price-filter__amount--min"),r=b([N,M],null,null,E,t);c([parseInt(r[0],10),parseInt(r[1],10)])}}),[c,E,N,M]),L=f()("wc-block-price-filter","wc-block-components-price-slider",v&&"wc-block-price-filter--has-input-fields",v&&"wc-block-components-price-slider--has-input-fields",O&&"wc-block-price-filter--has-filter-button",O&&"wc-block-components-price-slider--has-filter-button",_&&"is-loading",!D&&"is-disabled"),q=Object(m.b)(S.current)?S.current.ownerDocument.activeElement:void 0,G=q&&q===S.current?E:1,K=q&&q===k.current?E:1,W=N/Math.pow(10,p.minorUnit),Y=M/Math.pow(10,p.minorUnit);return React.createElement("div",{className:L},React.createElement("div",{className:"wc-block-price-filter__range-input-wrapper wc-block-components-price-slider__range-input-wrapper",onMouseMove:B,onFocus:B},D&&React.createElement("div",{"aria-hidden":v},React.createElement("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:I}),React.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(l.__)("Filter products by minimum price","woo-gutenberg-products-block"),"aria-valuetext":W,value:Number.isFinite(t)?t:n,onChange:U,step:G,min:n,max:o,ref:S,disabled:_,tabIndex:v?"-1":"0"}),React.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(l.__)("Filter products by maximum price","woo-gutenberg-products-block"),"aria-valuetext":Y,value:Number.isFinite(r)?r:o,onChange:U,step:K,min:n,max:o,ref:k,disabled:_,tabIndex:v?"-1":"0"}))),React.createElement("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},v&&React.createElement(React.Fragment,null,React.createElement(d.a,{currency:p,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(l.__)("Filter products by minimum price","woo-gutenberg-products-block"),onValueChange:function(e){e!==N&&T(e)},onBlur:V,disabled:_||!D,value:N}),React.createElement(d.a,{currency:p,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(l.__)("Filter products by maximum price","woo-gutenberg-products-block"),onValueChange:function(e){e!==M&&A(e)},onBlur:V,disabled:_||!D,value:M})),!v&&!_&&Number.isFinite(t)&&Number.isFinite(r)&&React.createElement("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text"},Object(l.__)("Price","woo-gutenberg-products-block"),": ",React.createElement(d.a,{currency:p,value:t})," – ",React.createElement(d.a,{currency:p,value:r})),O&&React.createElement(g.a,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",disabled:_||!D,onClick:j,screenReaderLabel:Object(l.__)("Apply price filter","woo-gutenberg-products-block")})))},v=r(80),y=r(60),O=function(e,t,r){var n,o=10*Math.pow(10,t);"ROUND_UP"===r?n=isNaN(e)?null:Math.ceil(parseFloat(e,10)/o)*o:"ROUND_DOWN"===r&&(n=isNaN(e)?null:Math.floor(parseFloat(e,10)/o)*o);var a=Object(i.a)(n,Number.isFinite);return Number.isFinite(n)?n:a};Object(n.b)({selector:".wp-block-woocommerce-price-filter",Block:function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(c.b)("min_price",null),l=a()(o,2),p=l[0],f=l[1],d=Object(c.b)("max_price",null),m=a()(d,2),b=m[0],g=m[1],x=Object(c.a)(),_=a()(x,1)[0],w=Object(u.a)({queryPrices:!0,queryState:_}),j=w.results,S=w.isLoading,k=Object(s.useState)(),E=a()(k,2),P=E[0],R=E[1],N=Object(s.useState)(),T=a()(N,2),C=T[0],F=T[1],M=Object(y.getCurrencyFromPriceResponse)(j.price_range),A=function(e){var t=e.maxPrice,r=e.minorUnit;return{minConstraint:O(e.minPrice,r,"ROUND_DOWN"),maxConstraint:O(t,r,"ROUND_UP")}}({minPrice:j.price_range?j.price_range.min_price:void 0,maxPrice:j.price_range?j.price_range.max_price:void 0,minorUnit:M.minorUnit}),D=A.minConstraint,I=A.maxConstraint,B=Object(s.useCallback)((function(e,t){f(e===D?void 0:e),g(t===I?void 0:t)}),[D,I,f,g]),U=Object(v.a)(B,500),V=a()(U,1)[0],L=Object(s.useCallback)((function(e){e[0]!==P&&R(e[0]),e[1]!==C&&F(e[1])}),[P,C,R,F]);Object(s.useEffect)((function(){t.showFilterButton||V(P,C)}),[P,C,t.showFilterButton,V]);var q=Object(i.a)(p),G=Object(i.a)(b),K=Object(i.a)(D),W=Object(i.a)(I);if(Object(s.useEffect)((function(){(!Number.isFinite(P)||p!==q&&p!==P||D!==K&&D!==P)&&R(Number.isFinite(p)?p:D),(!Number.isFinite(C)||b!==G&&b!==C||I!==W&&I!==C)&&F(Number.isFinite(b)?b:I)}),[P,C,p,b,D,I,K,W,q,G]),!S&&(null===D||null===I||D===I))return null;var Y="h".concat(t.headingLevel);return React.createElement(React.Fragment,null,!n&&t.heading&&React.createElement(Y,{className:"wc-block-price-filter__title"},t.heading),React.createElement("div",{className:"wc-block-price-slider"},React.createElement(h,{minConstraint:D,maxConstraint:I,minPrice:P,maxPrice:C,currency:M,showInputFields:t.showInputFields,showFilterButton:t.showFilterButton,onChange:L,onSubmit:function(){return B(P,C)},isLoading:S})))},getProps:function(e){return{attributes:{showInputFields:"true"===e.dataset.showinputfields,showFilterButton:"true"===e.dataset.showfilterbutton}}}})},26:function(e,t,r){var n=r(73);e.exports=function(e,t){if(null==e)return{};var r,o,a=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a},e.exports.default=e.exports,e.exports.__esModule=!0},27: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},29:function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},3:function(e,t){e.exports=window.React},37:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},38:function(e,t){function r(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},75:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return b}));var n=r(4),o=r.n(n),a=r(9),i=r(11),c=r(0),u=r(19),s=r.n(u),l=r(45),p=r(96),f=r(55),d=function(e){var t=Object(f.a)();e=e||t;var r=Object(i.useSelect)((function(t){return t(a.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(i.useDispatch)(a.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(c.useCallback)((function(t){n(e,t)}),[e,n])]},m=function(e,t,r){var n=Object(f.a)();r=r||n;var o=Object(i.useSelect)((function(n){return n(a.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),u=Object(i.useDispatch)(a.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(c.useCallback)((function(t){u(r,e,t)}),[r,e,u])]},b=function(e,t){var r=Object(f.a)(),n=d(t=t||r),a=o()(n,2),i=a[0],u=a[1],m=Object(l.a)(i),b=Object(l.a)(e),g=Object(p.a)(b),h=Object(c.useRef)(!1);return Object(c.useEffect)((function(){s()(g,b)||(u(Object.assign({},m,b)),h.current=!0)}),[m,b,g,u]),h.current?[i,u]:[e,u]}},77:function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},78:function(e,t){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],_n=!0,i=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==r.return||r.return()}finally{if(i)throw o}}return a}},e.exports.default=e.exports,e.exports.__esModule=!0},79:function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},8:function(e,t,r){e.exports=r(70)()},80:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){void 0===r&&(r={});var o=r.maxWait,a=Object(n.useRef)(null),i=Object(n.useRef)([]),c=r.leading,u=void 0===r.trailing||r.trailing,s=Object(n.useRef)(!1),l=Object(n.useRef)(null),p=Object(n.useRef)(!1),f=Object(n.useRef)(e);f.current=e;var d=Object(n.useCallback)((function(){clearTimeout(l.current),clearTimeout(a.current),a.current=null,i.current=[],l.current=null,s.current=!1}),[]);Object(n.useEffect)((function(){return p.current=!1,function(){p.current=!0}}),[]);var m=Object(n.useCallback)((function(){for(var e=[],r=0;r0&&Array.prototype.filter.call(c,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),f({Block:r,containers:c,getProps:n,getErrorBoundaryProps:o}),Array.prototype.forEach.call(u,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,a,i,c;n=(r=l(l({},e),{},{wrapper:t})).Block,o=r.getProps,a=r.getErrorBoundaryProps,i=r.selector,c=r.wrapper.querySelectorAll(i),f({Block:n,containers:c,getProps:o,getErrorBoundaryProps:a})}))}))}},96:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}}});
\ 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..e1899bb4272
--- /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' => 'c935664025508b4780ab53e76cadc56b');
\ No newline at end of file
diff --git a/build/price-filter.js b/build/price-filter.js
new file mode 100644
index 00000000000..5891a36bd7b
--- /dev/null
+++ b/build/price-filter.js
@@ -0,0 +1,3 @@
+this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["price-filter"]=function(e){function t(t){for(var r,i,a=t[0],u=t[1],l=t[2],b=0,p=[];b3&&void 0!==arguments[3]?arguments[3]:1,c=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||r),Number.isFinite(t)&&t>o&&(o=t),Number.isFinite(n)&&n<=o&&(o=n-r),Number.isFinite(t)&&t>=i&&(i=t+r),Number.isFinite(n)&&n=i&&(o=i-r),c&&i<=o&&(i=o+r),[o,i]}),S=n(179),C=function(e){var t=e.minPrice,n=e.maxPrice,r=e.minConstraint,c=e.maxConstraint,a=e.onChange,u=void 0===a?function(){}:a,s=e.step,b=e.currency,p=e.showInputFields,d=void 0===p||p,f=e.showFilterButton,m=void 0!==f&&f,O=e.isLoading,v=void 0!==O&&O,h=e.onSubmit,g=void 0===h?function(){}:h,j=Object(o.useRef)(),_=Object(o.useRef)(),y=s||10*Math.pow(10,b.minorUnit),k=Object(o.useState)(t),C=w()(k,2),N=C[0],F=C[1],R=Object(o.useState)(n),T=w()(R,2),V=T[0],L=T[1];Object(o.useEffect)((function(){F(t)}),[t]),Object(o.useEffect)((function(){L(n)}),[n]);var M=Object(o.useMemo)((function(){return isFinite(r)&&isFinite(c)}),[r,c]),B=Object(o.useMemo)((function(){return isFinite(t)&&isFinite(n)&&M?{"--low":Math.round((t-r)/(c-r)*100)-.5+"%","--high":Math.round((n-r)/(c-r)*100)+.5+"%"}:{"--low":"0%","--high":"100%"}}),[t,n,r,c,M]),D=Object(o.useCallback)((function(e){if(!v&&M){var t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=j.current.offsetWidth,o=j.current.value,i=_.current.offsetWidth,a=_.current.value,u=r*(o/c),l=i*(a/c);Math.abs(n-u)>Math.abs(n-l)?(j.current.style.zIndex=20,_.current.style.zIndex=21):(j.current.style.zIndex=21,_.current.style.zIndex=20)}}),[v,c,M]),H=Object(o.useCallback)((function(e){var o=e.target.classList.contains("wc-block-price-filter__range-input--min"),i=e.target.value,a=o?[Math.round(i/y)*y,n]:[t,Math.round(i/y)*y],l=P(a,r,c,y,o);u([parseInt(l[0],10),parseInt(l[1],10)])}),[u,t,n,r,c,y]),I=Object(o.useCallback)((function(e){if(!(e.relatedTarget&&e.relatedTarget.classList&&e.relatedTarget.classList.contains("wc-block-price-filter__amount"))){var t=e.target.classList.contains("wc-block-price-filter__amount--min"),n=P([N,V],null,null,y,t);u([parseInt(n[0],10),parseInt(n[1],10)])}}),[u,y,N,V]),z=l()("wc-block-price-filter","wc-block-components-price-slider",d&&"wc-block-price-filter--has-input-fields",d&&"wc-block-components-price-slider--has-input-fields",m&&"wc-block-price-filter--has-filter-button",m&&"wc-block-components-price-slider--has-filter-button",v&&"is-loading",!M&&"is-disabled"),A=Object(x.b)(j.current)?j.current.ownerDocument.activeElement:void 0,U=A&&A===j.current?y:1,G=A&&A===_.current?y:1,q=N/Math.pow(10,b.minorUnit),Y=V/Math.pow(10,b.minorUnit);return Object(o.createElement)("div",{className:z},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-wrapper wc-block-components-price-slider__range-input-wrapper",onMouseMove:D,onFocus:D},M&&Object(o.createElement)("div",{"aria-hidden":d},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:B}),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":q,value:Number.isFinite(t)?t:r,onChange:H,step:U,min:r,max:c,ref:j,disabled:v,tabIndex:d?"-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":Y,value:Number.isFinite(n)?n:c,onChange:H,step:G,min:r,max:c,ref:_,disabled:v,tabIndex:d?"-1":"0"}))),Object(o.createElement)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},d&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(E.a,{currency:b,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:function(e){e!==N&&F(e)},onBlur:I,disabled:v||!M,value:N}),Object(o.createElement)(E.a,{currency:b,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:function(e){e!==V&&L(e)},onBlur:I,disabled:v||!M,value:V})),!d&&!v&&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)(E.a,{currency:b,value:t})," – ",Object(o.createElement)(E.a,{currency:b,value:n})),m&&Object(o.createElement)(S.a,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",disabled:v||!M,onClick:g,screenReaderLabel:Object(i.__)("Apply price filter","woo-gutenberg-products-block")})))},N=n(201),F=n(50),R=function(e,t,n){var r,c=10*Math.pow(10,t);"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);var o=Object(_.a)(r,Number.isFinite);return Number.isFinite(r)?r:o},T=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(y.b)("min_price",null),i=w()(c,2),a=i[0],u=i[1],l=Object(y.b)("max_price",null),s=w()(l,2),b=s[0],p=s[1],d=Object(y.a)(),f=w()(d,1)[0],m=Object(k.a)({queryPrices:!0,queryState:f}),O=m.results,v=m.isLoading,h=Object(o.useState)(),g=w()(h,2),j=g[0],E=g[1],x=Object(o.useState)(),P=w()(x,2),S=P[0],T=P[1],V=Object(F.getCurrencyFromPriceResponse)(O.price_range),L=function(e){var t=e.maxPrice,n=e.minorUnit;return{minConstraint:R(e.minPrice,n,"ROUND_DOWN"),maxConstraint:R(t,n,"ROUND_UP")}}({minPrice:O.price_range?O.price_range.min_price:void 0,maxPrice:O.price_range?O.price_range.max_price:void 0,minorUnit:V.minorUnit}),M=L.minConstraint,B=L.maxConstraint,D=Object(o.useCallback)((function(e,t){u(e===M?void 0:e),p(t===B?void 0:t)}),[M,B,u,p]),H=Object(N.a)(D,500),I=w()(H,1)[0],z=Object(o.useCallback)((function(e){e[0]!==j&&E(e[0]),e[1]!==S&&T(e[1])}),[j,S,E,T]);Object(o.useEffect)((function(){t.showFilterButton||I(j,S)}),[j,S,t.showFilterButton,I]);var A=Object(_.a)(a),U=Object(_.a)(b),G=Object(_.a)(M),q=Object(_.a)(B);if(Object(o.useEffect)((function(){(!Number.isFinite(j)||a!==A&&a!==j||M!==G&&M!==j)&&E(Number.isFinite(a)?a:M),(!Number.isFinite(S)||b!==U&&b!==S||B!==q&&B!==S)&&T(Number.isFinite(b)?b:B)}),[j,S,a,b,M,B,G,q,A,U]),!v&&(null===M||null===B||M===B))return null;var Y="h".concat(t.headingLevel);return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(Y,{className:"wc-block-price-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-price-slider"},Object(o.createElement)(C,{minConstraint:M,maxConstraint:B,minPrice:j,maxPrice:S,currency:V,showInputFields:t.showInputFields,showFilterButton:t.showFilterButton,onChange:z,onSubmit:function(){return D(j,S)},isLoading:v})))};n(784),Object(a.registerBlockType)("woocommerce/price-filter",{title:Object(i.__)("Filter Products by Price","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(s.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){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.heading,a=t.headingLevel,u=t.showInputFields,l=t.showFilterButton;return Object(o.createElement)(o.Fragment,null,0===m.o.productCount?Object(o.createElement)(d.Placeholder,{className:"wc-block-price-slider",icon:Object(o.createElement)(s.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(f.getAdminLink)("post-new.php?post_type=product")},Object(i.__)("Add new product","woo-gutenberg-products-block")+" ",Object(o.createElement)(s.a,{srcElement:g.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:r},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:u?"editable":"text",options:[{label:Object(i.__)("Editable","woo-gutenberg-products-block"),value:"editable"},{label:Object(i.__)("Text","woo-gutenberg-products-block"),value:"text"}],onChange:function(e){return n({showInputFields:"editable"===e})}}),Object(o.createElement)(d.ToggleControl,{label:Object(i.__)("Filter button","woo-gutenberg-products-block"),help:l?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:l,onChange:function(){return n({showFilterButton:!l})}}),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:a,onChange:function(e){return n({headingLevel:e})}}))),Object(o.createElement)(v.a,{className:"wc-block-price-filter__title",headingLevel:a,heading:c,onChange:function(e){return n({heading:e})}}),Object(o.createElement)(d.Disabled,null,Object(o.createElement)(T,{attributes:t,isEditor:!0}))))},save:function(e){var t=e.attributes,n=t.className,r={"data-showinputfields":t.showInputFields,"data-showfilterbutton":t.showFilterButton,"data-heading":t.heading,"data-heading-level":t.headingLevel};return Object(o.createElement)("div",c()({className:l()("is-loading",n)},r),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}))}})}});
\ 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..d8adc138b79
--- /dev/null
+++ b/build/price-format.asset.php
@@ -0,0 +1 @@
+ array('wc-settings', 'wp-polyfill'), 'version' => '9947ff8ddc3c4cb67934bdf440eb5fbb');
\ No newline at end of file
diff --git a/build/price-format.js b/build/price-format.js
new file mode 100644
index 00000000000..15c5bd2df23
--- /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=168)}({1:function(e,r){e.exports=function(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e},e.exports.default=e.exports,e.exports.__esModule=!0},168:function(e,r,t){"use strict";t.r(r),t.d(r,"getCurrencyFromPriceResponse",(function(){return p})),t.d(r,"getCurrency",(function(){return l})),t.d(r,"formatPrice",(function(){return y}));var n=t(1),o=t.n(n),c=t(6);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function u(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:{};return u(u({},s),e)},y=function(e,r){if(""===e||void 0===e)return"";var t="number"==typeof e?e:parseInt(e,10);if(!Number.isFinite(t))return"";var n,o=l(r),c=o.minorUnit,i=o.prefix,u=o.suffix,a=o.decimalSeparator,f=o.thousandSeparator,s={beforeDecimal:(n=(t/Math.pow(10,c)).toString().split("."))[0],afterDecimal:n[1]||""},p=s.beforeDecimal,y=s.afterDecimal,d="".concat(i).concat(function(e,r){return e.replace(/\B(?=(\d{3})+(?!\d))/g,r)}(p,f)).concat(y?"".concat(a).concat(y):"").concat(u),b=document.createElement("textarea");return b.innerHTML=d,b.value}},6: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..4b55dfc8d4d
--- /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' => '62463845723422a526c011ecbcff1b33');
\ 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..38094505b6a
--- /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 n,i,l=t[0],u=t[1],a=t[2],b=0,d=[];b100,a={per_page:u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},b=[Object(o.addQueryArgs)("/wc/store/products",d(d({},a),l))];return u&&r.length&&b.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),b}({selected:r,search:c,queryArgs:void 0===i?{}:i});return Promise.all(a.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id").map((function(e){return d(d({},e),{},{parent:0})}))})).catch((function(e){throw e}))},g=function(e){return l()({path:"/wc/store/products/".concat(e)})},f=function(){return l()({path:"wc/store/products/attributes"})},h=function(e){return l()({path:"wc/store/products/attributes/".concat(e,"/terms")})},w=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=Object(a.getSetting)("limitTags",!1),i=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:n})];return c&&r.length&&i.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id")}))},O=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products/categories",d({per_page:0},e))})},E=function(e){return l()({path:"wc/store/products/categories/".concat(e)})},m=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},j=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return a}));var n=r(29),c=r.n(n),o=r(22),i=r.n(o),l=r(1),u=function(){var e=c()(i.a.mark((function e(t){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),a=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(l.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},44:function(e,t){e.exports=window.wp.keycodes},45:function(e,t){e.exports=window.wp.escapeHtml},48:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(45));t.a=function(e){var t,r,i,l=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=l).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},51:function(e,t){e.exports=window.wp.hooks},57:function(e,t){e.exports=window.wp.deprecated},61:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(21),i=r.n(o),l=r(0),u=["srcElement","size"];function a(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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=i()(e,u);return Object(l.isValidElement)(t)?Object(l.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));r({categories:t})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.name;return t.isPreview?C.a:Object(o.createElement)("div",{className:"wc-block-product-best-sellers"},this.getInspectorControls(),Object(o.createElement)(y.Disabled,null,Object(o.createElement)(_.a,{block:r,attributes:t})))}}]),c}(o.Component),T=r(103);function B(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}Object(b.registerBlockType)("woocommerce/product-best-sellers",{title:Object(i.__)("Best Selling Products","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(u.a,{srcElement:s}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("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:function(e){for(var t=1;t0,"is-skip-level":0===u&&0!==t.parent})},e,{countLabel:b,"aria-label":s}))},messages:h,isCompact:p,isHierarchical:!0,isSingle:g}),!!s&&Object(o.createElement)("div",{hidden:d.length<2},Object(o.createElement)(u.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:b,onChange:s,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"}]})))});T.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=S(T)}});
\ 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..fd577634199
--- /dev/null
+++ b/build/product-categories.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render'), 'version' => '5468622408d91adbb12de53a1eec415f');
\ No newline at end of file
diff --git a/build/product-categories.js b/build/product-categories.js
new file mode 100644
index 00000000000..c499dd7da7d
--- /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,p=[];b 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' => 'f5fd1ed879ebeffc9fca98eba8d915f7');
\ No newline at end of file
diff --git a/build/product-category.js b/build/product-category.js
new file mode 100644
index 00000000000..8f77e56528f
--- /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 n,i,a=t[0],l=t[1],u=t[2],b=0,d=[];b100,u={per_page:l?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},b=[Object(o.addQueryArgs)("/wc/store/products",d(d({},u),a))];return l&&r.length&&b.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),b}({selected:r,search:c,queryArgs:void 0===i?{}:i});return Promise.all(u.map((function(e){return a()({path:e})}))).then((function(e){return Object(l.uniqBy)(Object(l.flatten)(e),"id").map((function(e){return d(d({},e),{},{parent:0})}))})).catch((function(e){throw e}))},g=function(e){return a()({path:"/wc/store/products/".concat(e)})},f=function(){return a()({path:"wc/store/products/attributes"})},h=function(e){return a()({path:"wc/store/products/attributes/".concat(e,"/terms")})},w=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=Object(u.getSetting)("limitTags",!1),i=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:n})];return c&&r.length&&i.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return a()({path:e})}))).then((function(e){return Object(l.uniqBy)(Object(l.flatten)(e),"id")}))},O=function(e){return a()({path:Object(o.addQueryArgs)("wc/store/products/categories",d({per_page:0},e))})},E=function(e){return a()({path:"wc/store/products/categories/".concat(e)})},m=function(e){return a()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},j=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return u}));var n=r(29),c=r.n(n),o=r(22),i=r.n(o),a=r(1),l=function(){var e=c()(i.a.mark((function e(t){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},44:function(e,t){e.exports=window.wp.keycodes},45:function(e,t){e.exports=window.wp.escapeHtml},48:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(45));t.a=function(e){var t,r,i,a=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=a).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},51:function(e,t){e.exports=window.wp.hooks},57:function(e,t){e.exports=window.wp.deprecated},61:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(21),i=r.n(o),a=r(0),l=["srcElement","size"];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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=i()(e,l);return Object(a.isValidElement)(t)?Object(a.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],r=t.map((function(e){return e.id})),c={categories:r};n(c),e.setChangedAttributes(c)},operator:l,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any",r={catOperator:t};n(r),e.setChangedAttributes(r)},isCompact:!0})),Object(o.createElement)(k.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(C.a,{columns:a,rows:b,alignButtons:d,setAttributes:n,minColumns:Object(T.getSetting)("min_columns",1),maxColumns:Object(T.getSetting)("max_columns",6),minRows:Object(T.getSetting)("min_rows",1),maxRows:Object(T.getSetting)("max_rows",6)})),Object(o.createElement)(k.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(P.a,{settings:u,onChange:function(e){return n({contentVisibility:e})}})),Object(o.createElement)(k.PanelBody,{title:Object(i.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(A.a,{setAttributes:n,value:s})))}},{key:"renderEditMode",value:function(){var e=this,t=this.props,r=t.attributes,n=t.debouncedSpeak,c=this.state.changedAttributes,a=D(D({},r),c);return Object(o.createElement)(k.Placeholder,{icon:Object(o.createElement)(u.a,{srcElement:s.a}),label:Object(i.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(i.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-products-category__selection"},Object(o.createElement)(S.a,{selected:a.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=t.map((function(e){return e.id}));e.setChangedAttributes({categories:r})},operator:a.catOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({catOperator:t})}}),Object(o.createElement)(k.Button,{isPrimary:!0,onClick:function(){e.save(),n(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Done","woo-gutenberg-products-block")),Object(o.createElement)(k.Button,{className:"wc-block-products-category__cancel-button",isTertiary:!0,onClick:function(){e.stopEditing(),n(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var e=this.props,t=e.attributes,r=e.name,n=t.categories.length;return Object(o.createElement)(k.Disabled,null,n?Object(o.createElement)(x.a,{block:r,attributes:t,EmptyResponsePlaceholder:M}):Object(i.__)("Select at least one category to display its products.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this,t=this.state.isEditing;return this.props.attributes.isPreview?R.a:Object(o.createElement)(o.Fragment,null,Object(o.createElement)(v.BlockControls,null,Object(o.createElement)(k.ToolbarGroup,{controls:[{icon:"edit",title:Object(i.__)("Edit selected categories","woo-gutenberg-products-block"),onClick:function(){return t?e.stopEditing():e.startEditing()},isActive:t}]})),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode())}}]),a}(o.Component),G=Object(k.withSpokenMessages)(N),V=r(103);function L(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;t0,"is-skip-level":0===l&&0!==t.parent})},e,{countLabel:b,"aria-label":s}))},messages:h,isCompact:p,isHierarchical:!0,isSingle:g}),!!s&&Object(o.createElement)("div",{hidden:d.length<2},Object(o.createElement)(l.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:b,onChange:s,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"}]})))});T.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=C(T)}});
\ 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..1c72efabc4f
--- /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' => 'f86b1567d88586ed8bd572a413e065b9');
\ No newline at end of file
diff --git a/build/product-new.js b/build/product-new.js
new file mode 100644
index 00000000000..4c51ca58b5a
--- /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 n,i,l=t[0],u=t[1],a=t[2],b=0,d=[];b100,a={per_page:u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},b=[Object(o.addQueryArgs)("/wc/store/products",d(d({},a),l))];return u&&r.length&&b.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),b}({selected:r,search:c,queryArgs:void 0===i?{}:i});return Promise.all(a.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id").map((function(e){return d(d({},e),{},{parent:0})}))})).catch((function(e){throw e}))},g=function(e){return l()({path:"/wc/store/products/".concat(e)})},f=function(){return l()({path:"wc/store/products/attributes"})},h=function(e){return l()({path:"wc/store/products/attributes/".concat(e,"/terms")})},w=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=Object(a.getSetting)("limitTags",!1),i=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:n})];return c&&r.length&&i.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id")}))},O=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products/categories",d({per_page:0},e))})},E=function(e){return l()({path:"wc/store/products/categories/".concat(e)})},m=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},j=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return a}));var n=r(29),c=r.n(n),o=r(22),i=r.n(o),l=r(1),u=function(){var e=c()(i.a.mark((function e(t){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),a=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(l.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},44:function(e,t){e.exports=window.wp.keycodes},45:function(e,t){e.exports=window.wp.escapeHtml},48:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(45));t.a=function(e){var t,r,i,l=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=l).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},51:function(e,t){e.exports=window.wp.hooks},57:function(e,t){e.exports=window.wp.deprecated},61:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(21),i=r.n(o),l=r(0),u=["srcElement","size"];function a(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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=i()(e,u);return Object(l.isValidElement)(t)?Object(l.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));r({categories:t})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.name;return t.isPreview?C.a:Object(o.createElement)(o.Fragment,null,this.getInspectorControls(),Object(o.createElement)(y.Disabled,null,Object(o.createElement)(_.a,{block:r,attributes:t})))}}]),c}(o.Component),T=r(103);function B(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}Object(l.registerBlockType)("woocommerce/product-new",{title:Object(i.__)("Newest Products","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(a.a,{srcElement:b}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of your newest products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:function(e){for(var t=1;t0,"is-skip-level":0===u&&0!==t.parent})},e,{countLabel:b,"aria-label":s}))},messages:h,isCompact:p,isHierarchical:!0,isSingle:g}),!!s&&Object(o.createElement)("div",{hidden:d.length<2},Object(o.createElement)(u.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:b,onChange:s,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"}]})))});T.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=S(T)}});
\ 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..b50baf01e19
--- /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' => 'e695097976101e70745d581300ab946e');
\ 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..b1b21ad716a
--- /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 n,i,l=t[0],u=t[1],a=t[2],b=0,d=[];b100,a={per_page:u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},b=[Object(o.addQueryArgs)("/wc/store/products",d(d({},a),l))];return u&&r.length&&b.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),b}({selected:r,search:c,queryArgs:void 0===i?{}:i});return Promise.all(a.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id").map((function(e){return d(d({},e),{},{parent:0})}))})).catch((function(e){throw e}))},g=function(e){return l()({path:"/wc/store/products/".concat(e)})},f=function(){return l()({path:"wc/store/products/attributes"})},h=function(e){return l()({path:"wc/store/products/attributes/".concat(e,"/terms")})},w=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=Object(a.getSetting)("limitTags",!1),i=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:n})];return c&&r.length&&i.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id")}))},O=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products/categories",d({per_page:0},e))})},E=function(e){return l()({path:"wc/store/products/categories/".concat(e)})},m=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},j=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return a}));var n=r(29),c=r.n(n),o=r(22),i=r.n(o),l=r(1),u=function(){var e=c()(i.a.mark((function e(t){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),a=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(l.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},44:function(e,t){e.exports=window.wp.keycodes},45:function(e,t){e.exports=window.wp.escapeHtml},48:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(45));t.a=function(e){var t,r,i,l=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=l).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},51:function(e,t){e.exports=window.wp.hooks},57:function(e,t){e.exports=window.wp.deprecated},61:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(21),i=r.n(o),l=r(0),u=["srcElement","size"];function a(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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=i()(e,u);return Object(l.isValidElement)(t)?Object(l.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));r({categories:t})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.name;return t.isPreview?C.a:Object(o.createElement)(o.Fragment,null,this.getInspectorControls(),Object(o.createElement)(j.Disabled,null,Object(o.createElement)(x.a,{block:r,attributes:t,EmptyResponsePlaceholder:A})))}}]),c}(o.Component),B=(r(751),r(103));function D(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 G(e){for(var t=1;t0,"is-skip-level":0===u&&0!==t.parent})},e,{countLabel:b,"aria-label":s}))},messages:h,isCompact:p,isHierarchical:!0,isSingle:g}),!!s&&Object(o.createElement)("div",{hidden:d.length<2},Object(o.createElement)(u.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:b,onChange:s,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"}]})))});T.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=S(T)}});
\ 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..2a3a57f8a5e
--- /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' => '955aa1d6356c5d4a4b7bcfbda7c91a67');
\ No newline at end of file
diff --git a/build/product-search.js b/build/product-search.js
new file mode 100644
index 00000000000..9de02febe4d
--- /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,l,a=t[0],s=t[1],i=t[2],b=0,p=[];b 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' => '4cade26f91f7316baf31a40a4173d3f4');
\ No newline at end of file
diff --git a/build/product-tag.js b/build/product-tag.js
new file mode 100644
index 00000000000..c1ef30e97ee
--- /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 n,i,l=t[0],a=t[1],u=t[2],b=0,d=[];b100,u={per_page:a?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},b=[Object(o.addQueryArgs)("/wc/store/products",d(d({},u),l))];return a&&r.length&&b.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),b}({selected:r,search:c,queryArgs:void 0===i?{}:i});return Promise.all(u.map((function(e){return l()({path:e})}))).then((function(e){return Object(a.uniqBy)(Object(a.flatten)(e),"id").map((function(e){return d(d({},e),{},{parent:0})}))})).catch((function(e){throw e}))},p=function(e){return l()({path:"/wc/store/products/".concat(e)})},h=function(){return l()({path:"wc/store/products/attributes"})},f=function(e){return l()({path:"wc/store/products/attributes/".concat(e,"/terms")})},w=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=Object(u.getSetting)("limitTags",!1),i=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:n})];return c&&r.length&&i.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return l()({path:e})}))).then((function(e){return Object(a.uniqBy)(Object(a.flatten)(e),"id")}))},E=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products/categories",d({per_page:0},e))})},O=function(e){return l()({path:"wc/store/products/categories/".concat(e)})},m=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},j=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},44:function(e,t){e.exports=window.wp.keycodes},51:function(e,t){e.exports=window.wp.hooks},57:function(e,t){e.exports=window.wp.deprecated},61:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(21),i=r.n(o),l=r(0),a=["srcElement","size"];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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=i()(e,a);return Object(l.isValidElement)(t)?Object(l.cloneElement)(t,function(e){for(var t=1;t0,"is-skip-level":0===i&&0!==t.parent})},e,{"aria-label":Object(c.sprintf)(
+/* translators: %1$d is the count of products, %2$s is the name of the tag. */
+Object(c._n)("%1$d product tagged as %2$s","%1$d products tagged as %2$s",t.count,"woo-gutenberg-products-block"),t.count,l)}))}},{key:"render",value:function(){var e=this.state,t=e.list,r=e.loading,o=this.props,l=o.isCompact,a=o.onChange,u=o.onOperatorChange,s=o.operator,b=o.selected,d={clear:Object(c.__)("Clear all product tags","woo-gutenberg-products-block"),list:Object(c.__)("Product Tags","woo-gutenberg-products-block"),noItems:Object(c.__)("Your store doesn't have any product tags.","woo-gutenberg-products-block"),search:Object(c.__)("Search for product tags","woo-gutenberg-products-block"),selected:function(e){return Object(c.sprintf)(
+/* translators: %d is the count of selected tags. */
+Object(c._n)("%d tag selected","%d tags selected",e,"woo-gutenberg-products-block"),e)},updated:Object(c.__)("Tag search results updated.","woo-gutenberg-products-block")},g=Object(i.getSetting)("limitTags",!1);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(B.b,{className:"woocommerce-product-tags",list:t,isLoading:r,selected:b.map((function(e){return t.find((function(t){return t.id===e}))})).filter(Boolean),onChange:a,onSearch:g?this.debouncedOnSearch:null,renderItem:this.renderItem,messages:d,isCompact:l,isHierarchical:!0}),!!u&&Object(n.createElement)("div",{hidden:b.length<2},Object(n.createElement)(P.SelectControl,{className:"woocommerce-product-tags__operator",label:Object(c.__)("Display products matching","woo-gutenberg-products-block"),help:Object(c.__)("Pick at least two tags to use this setting.","woo-gutenberg-products-block"),value:s,onChange:u,options:[{label:Object(c.__)("Any selected tags","woo-gutenberg-products-block"),value:"any"},{label:Object(c.__)("All selected tags","woo-gutenberg-products-block"),value:"all"}]})))}}]),l}(n.Component);M.defaultProps={isCompact:!1,operator:"any"};var I=M,V=r(119),H=r(172);function L(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 Q(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));r({tags:t})},operator:a,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({tagOperator:e})},isCompact:!0})),Object(n.createElement)(P.PanelBody,{title:Object(c.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(C.a,{columns:l,rows:b,alignButtons:d,setAttributes:r,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(n.createElement)(P.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(S.a,{settings:u,onChange:function(e){return r({contentVisibility:e})}})),Object(n.createElement)(P.PanelBody,{title:Object(c.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(V.a,{setAttributes:r,value:s})))}},{key:"renderEditMode",value:function(){var e=this,t=this.props,r=t.attributes,o=t.debouncedSpeak,i=this.state.changedAttributes,a=Q(Q({},r),i);return Object(n.createElement)(P.Placeholder,{icon:Object(n.createElement)(l.a,{srcElement:u,className:"block-editor-block-icon"}),label:Object(c.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(c.__)("Display a grid of products from your selected tags.","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-product-tag__selection"},Object(n.createElement)(I,{selected:a.tags,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=t.map((function(e){return e.id}));e.setChangedAttributes({tags:r})},operator:a.tagOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({tagOperator:t})}}),Object(n.createElement)(P.Button,{isPrimary:!0,onClick:function(){e.save(),o(Object(c.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block")),Object(n.createElement)(P.Button,{className:"wc-block-product-tag__cancel-button",isTertiary:!0,onClick:function(){e.stopEditing(),o(Object(c.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var e=this.props,t=e.attributes,r=e.name,o=t.tags.length;return Object(n.createElement)(P.Disabled,null,o?Object(n.createElement)(k.a,{block:r,attributes:t}):Object(n.createElement)(P.Placeholder,{icon:Object(n.createElement)(l.a,{icon:u,className:"block-editor-block-icon"}),label:Object(c.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(c.__)("This block displays products from selected tags. Select at least one tag to display its products.","woo-gutenberg-products-block")))}},{key:"render",value:function(){var e=this,t=this.state.isEditing;return this.props.attributes.isPreview?H.a:Object(i.getSetting)("hasTags",!0)?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(_.BlockControls,null,Object(n.createElement)(P.ToolbarGroup,{controls:[{icon:"edit",title:Object(c.__)("Edit selected tags","woo-gutenberg-products-block"),onClick:function(){return t?e.stopEditing():e.startEditing()},isActive:t}]})),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode()):Object(n.createElement)(P.Placeholder,{icon:Object(n.createElement)(l.a,{icon:u,className:"block-editor-block-icon"}),label:Object(c.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(c.__)("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"))}}]),a}(n.Component),z=Object(P.withSpokenMessages)(q);Object(o.registerBlockType)("woocommerce/product-tag",{title:Object(c.__)("Products by Tag","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(l.a,{srcElement:u}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("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:function(e){return Object(n.createElement)(z,e)},save:function(){return null}})},87:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(7),i=(r(2),r(3));t.a=function(e){var t=e.columns,r=e.rows,l=e.setAttributes,a=e.alignButtons,u=e.minColumns,s=void 0===u?1:u,b=e.maxColumns,d=void 0===b?6:b,g=e.minRows,p=void 0===g?1:g,h=e.maxRows,f=void 0===h?6:h;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(o.clamp)(e,s,d);l({columns:Number.isNaN(t)?"":t})},min:s,max:d}),Object(n.createElement)(i.RangeControl,{label:Object(c.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:function(e){var t=Object(o.clamp)(e,p,f);l({rows:Number.isNaN(t)?"":t})},min:p,max:f}),Object(n.createElement)(i.ToggleControl,{label:Object(c.__)("Align Last Block","woo-gutenberg-products-block"),help:a?Object(c.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(c.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return l({alignButtons:!a})}}))}},90:function(e,t){e.exports=window.wp.date}});
\ 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..095add7a906
--- /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' => 'bc2d5e0eb584d447d5ab8116ff848dcb');
\ 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..14e416480cf
--- /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 n,i,l=t[0],u=t[1],a=t[2],b=0,d=[];b100,a={per_page:u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},b=[Object(o.addQueryArgs)("/wc/store/products",d(d({},a),l))];return u&&r.length&&b.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),b}({selected:r,search:c,queryArgs:void 0===i?{}:i});return Promise.all(a.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id").map((function(e){return d(d({},e),{},{parent:0})}))})).catch((function(e){throw e}))},g=function(e){return l()({path:"/wc/store/products/".concat(e)})},f=function(){return l()({path:"wc/store/products/attributes"})},h=function(e){return l()({path:"wc/store/products/attributes/".concat(e,"/terms")})},w=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=Object(a.getSetting)("limitTags",!1),i=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:n})];return c&&r.length&&i.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id")}))},O=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products/categories",d({per_page:0},e))})},E=function(e){return l()({path:"wc/store/products/categories/".concat(e)})},m=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},j=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return a}));var n=r(29),c=r.n(n),o=r(22),i=r.n(o),l=r(1),u=function(){var e=c()(i.a.mark((function e(t){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),a=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(l.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},44:function(e,t){e.exports=window.wp.keycodes},45:function(e,t){e.exports=window.wp.escapeHtml},48:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(45));t.a=function(e){var t,r,i,l=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=l).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},51:function(e,t){e.exports=window.wp.hooks},57:function(e,t){e.exports=window.wp.deprecated},61:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(21),i=r.n(o),l=r(0),u=["srcElement","size"];function a(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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=i()(e,u);return Object(l.isValidElement)(t)?Object(l.cloneElement)(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));r({categories:t})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.name,r=e.attributes;return r.isPreview?C.a:Object(o.createElement)(o.Fragment,null,this.getInspectorControls(),Object(o.createElement)(y.Disabled,null,Object(o.createElement)(_.a,{block:t,attributes:r})))}}]),c}(o.Component),T=r(103);function B(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}Object(l.registerBlockType)("woocommerce/product-top-rated",{title:Object(i.__)("Top Rated Products","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(u.a,{srcElement:s}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of your top rated products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:function(e){for(var t=1;t0,"is-skip-level":0===u&&0!==t.parent})},e,{countLabel:b,"aria-label":s}))},messages:h,isCompact:p,isHierarchical:!0,isSingle:g}),!!s&&Object(o.createElement)("div",{hidden:d.length<2},Object(o.createElement)(u.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:b,onChange:s,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"}]})))});T.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=S(T)}});
\ 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..fbcc504089d
--- /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' => 'd8ebc749ff72f2ee3e0d34e41ba975dd');
\ 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..392a7a6c753
--- /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 n,i,l=t[0],u=t[1],a=t[2],b=0,d=[];b100,a={per_page:u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},b=[Object(o.addQueryArgs)("/wc/store/products",d(d({},a),l))];return u&&r.length&&b.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),b}({selected:r,search:c,queryArgs:void 0===i?{}:i});return Promise.all(a.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id").map((function(e){return d(d({},e),{},{parent:0})}))})).catch((function(e){throw e}))},g=function(e){return l()({path:"/wc/store/products/".concat(e)})},f=function(){return l()({path:"wc/store/products/attributes"})},h=function(e){return l()({path:"wc/store/products/attributes/".concat(e,"/terms")})},O=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=Object(a.getSetting)("limitTags",!1),i=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:n})];return c&&r.length&&i.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return l()({path:e})}))).then((function(e){return Object(u.uniqBy)(Object(u.flatten)(e),"id")}))},w=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products/categories",d({per_page:0},e))})},m=function(e){return l()({path:"wc/store/products/categories/".concat(e)})},E=function(e){return l()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},j=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return a}));var n=r(29),c=r.n(n),o=r(22),i=r.n(o),l=r(1),u=function(){var e=c()(i.a.mark((function e(t){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),a=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(l.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},44:function(e,t){e.exports=window.wp.keycodes},45:function(e,t){e.exports=window.wp.escapeHtml},48:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(45));t.a=function(e){var t,r,i,l=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=l).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},51:function(e,t){e.exports=window.wp.hooks},57:function(e,t){e.exports=window.wp.deprecated},61:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(21),i=r.n(o),l=r(0),u=["srcElement","size"];function a(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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=i()(e,u);return Object(l.isValidElement)(t)?Object(l.cloneElement)(t,function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"id";return Array.isArray(t)?t.find((function(t){return t[r]===e})):null},q=r(48),H=r(6),U=r.n(H),W=r(120),J=(r(756),function(e){var t=e.attributes,r=e.error,o=e.expandedAttribute,i=e.onChange,l=e.onExpandAttribute,u=e.onOperatorChange,a=e.instanceId,s=e.isCompact,b=e.isLoading,d=e.operator,p=e.selected,g=e.termsAreLoading,f=e.termsList[o]||[],h=[].concat(P()(t),P()(f)),O={clear:Object(c.__)("Clear all product attributes","woo-gutenberg-products-block"),list:Object(c.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(c.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(c.__)("Search for product attributes","woo-gutenberg-products-block"),selected:function(e){return Object(c.sprintf)(
+/* translators: %d is the count of attributes selected. */
+Object(c._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e)},updated:Object(c.__)("Product attribute search results updated.","woo-gutenberg-products-block")};return r?Object(n.createElement)(q.a,{error:r}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(A.b,{className:"woocommerce-product-attributes",list:h,isLoading:b,selected:p.map((function(e){var t=e.id;return h.find((function(e){return e.id===t}))})).filter(Boolean),onChange:i,renderItem:function(e){var t=e.item,r=e.search,u=e.depth,s=void 0===u?0:u,b=["woocommerce-product-attributes__item","woocommerce-search-list__item",{"is-searching":r.length>0,"is-skip-level":0===s&&0!==t.parent}];if(!t.breadcrumbs.length){var d=o===t.id;return Object(n.createElement)(W.a,C()({},e,{className:U.a.apply(void 0,b.concat([{"is-selected":d}])),isSelected:d,item:t,isLoading:g,disabled:"0"===t.count,onSelect:function(e){var t=e.id;return function(){i([]),l(t)}},name:"attributes-".concat(a),countLabel:Object(c.sprintf)(
+/* translators: %d is the count of terms. */
+Object(c._n)("%d term","%d terms",t.count,"woo-gutenberg-products-block"),t.count),"aria-label":Object(c.sprintf)(
+/* translators: %1$s is the item name, %2$d is the count of terms for the item. */
+Object(c._n)("%1$s, has %2$d term","%1$s, has %2$d terms",t.count,"woo-gutenberg-products-block"),t.name,t.count)}))}var p="".concat(t.breadcrumbs[0],": ").concat(t.name);return Object(n.createElement)(A.c,C()({},e,{name:"terms-".concat(a),className:U.a.apply(void 0,b.concat(["has-count"])),countLabel:Object(c.sprintf)(
+/* translators: %d is the count of products. */
+Object(c._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count),"aria-label":Object(c.sprintf)(
+/* translators: %1$s is the attribute name, %2$d is the count of products for that attribute. */
+Object(c._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),p,t.count)}))},messages:O,isCompact:s,isHierarchical:!0}),!!u&&Object(n.createElement)("div",{hidden:p.length<2},Object(n.createElement)(v.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(c.__)("Display products matching","woo-gutenberg-products-block"),help:Object(c.__)("Pick at least two attributes to use this setting.","woo-gutenberg-products-block"),value:d,onChange:u,options:[{label:Object(c.__)("Any selected attributes","woo-gutenberg-products-block"),value:"any"},{label:Object(c.__)("All selected attributes","woo-gutenberg-products-block"),value:"all"}]})))});J.defaultProps={isCompact:!1,operator:"any"};var Y,K=(Y=Object(R.withInstanceId)(J),function(e){var t=e.selected,r=void 0===t?[]:t,c=r.length?r[0].attr_slug:null,o=Object(n.useState)(null),i=N()(o,2),l=i[0],u=i[1],a=Object(n.useState)(0),s=N()(a,2),b=s[0],d=s[1],p=Object(n.useState)({}),g=N()(p,2),f=g[0],h=g[1],O=Object(n.useState)(!0),w=N()(O,2),m=w[0],E=w[1],j=Object(n.useState)(!1),y=N()(j,2),v=y[0],_=y[1],x=Object(n.useState)(null),k=N()(x,2),P=k[0],S=k[1];return Object(n.useEffect)((function(){null===l&&Object($.b)().then((function(e){if(e=e.map((function(e){return V(V({},e),{},{parent:0})})),u(e),c){var t=Q(c,e,"taxonomy");t&&d(t.id)}})).catch(function(){var e=B()(I.a.mark((function e(t){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=S,e.next=3,Object(z.a)(t);case 3:e.t1=e.sent,(0,e.t0)(e.t1);case 5:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}()).finally((function(){E(!1)}))}),[l,c]),Object(n.useEffect)((function(){var e=Q(b,l);e&&(_(!0),Object($.i)(b).then((function(t){t=t.map((function(t){return V(V({},t),{},{parent:b,attr_slug:e.taxonomy})})),h((function(e){return V(V({},e),{},L()({},b,t))}))})).catch(function(){var e=B()(I.a.mark((function e(t){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=S,e.next=3,Object(z.a)(t);case 3:e.t1=e.sent,(0,e.t0)(e.t1);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).finally((function(){_(!1)})))}),[b,l]),Object(n.createElement)(Y,C()({},e,{attributes:l||[],error:P,expandedAttribute:b,onExpandAttribute:d,isLoading:m,termsAreLoading:v,termsList:f}))}),X=r(119),Z=r(172);var ee=function(e){f()(u,e);var t,r,i=(t=u,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,n=m()(t);if(r){var c=m()(this).constructor;e=Reflect.construct(n,arguments,c)}else e=n.apply(this,arguments);return O()(this,e)});function u(){return b()(this,u),i.apply(this,arguments)}return p()(u,[{key:"getInspectorControls",value:function(){var e=this.props.setAttributes,t=this.props.attributes,r=t.attributes,o=t.attrOperator,i=t.columns,l=t.contentVisibility,u=t.orderby,s=t.rows,b=t.alignButtons;return Object(n.createElement)(E.InspectorControls,{key:"inspector"},Object(n.createElement)(v.PanelBody,{title:Object(c.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(x.a,{columns:i,rows:s,alignButtons:b,setAttributes:e,minColumns:Object(a.getSetting)("min_columns",1),maxColumns:Object(a.getSetting)("max_columns",6),minRows:Object(a.getSetting)("min_rows",1),maxRows:Object(a.getSetting)("max_rows",6)})),Object(n.createElement)(v.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(_.a,{settings:l,onChange:function(t){return e({contentVisibility:t})}})),Object(n.createElement)(v.PanelBody,{title:Object(c.__)("Filter by Product Attribute","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(K,{selected:r,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=t.map((function(e){return{id:e.id,attr_slug:e.attr_slug}}));e({attributes:r})},operator:o,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e({attrOperator:t})},isCompact:!0})),Object(n.createElement)(v.PanelBody,{title:Object(c.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(X.a,{setAttributes:e,value:u})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.debouncedSpeak,r=e.setAttributes,i=this.props.attributes;return Object(n.createElement)(v.Placeholder,{icon:Object(n.createElement)(o.a,{srcElement:l}),label:Object(c.__)("Products by Attribute","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-by-attribute"},Object(c.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-products-by-attribute__selection"},Object(n.createElement)(K,{selected:i.attributes,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return{id:e.id,attr_slug:e.attr_slug}}));r({attributes:t})},operator:i.attrOperator,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({attrOperator:e})}}),Object(n.createElement)(v.Button,{isPrimary:!0,onClick:function(){r({editMode:!1}),t(Object(c.__)("Showing Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.name,o=e.setAttributes,i=t.editMode;return t.isPreview?Z.a:Object(n.createElement)(n.Fragment,null,Object(n.createElement)(E.BlockControls,null,Object(n.createElement)(v.ToolbarGroup,{controls:[{icon:"edit",title:Object(c.__)("Edit selected attribute","woo-gutenberg-products-block"),onClick:function(){return o({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(n.createElement)(v.Disabled,null,Object(n.createElement)(y.a,{block:r,attributes:t})))}}]),u}(n.Component),te=Object(v.withSpokenMessages)(ee);Object(u.registerBlockType)("woocommerce/products-by-attribute",{title:Object(c.__)("Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(o.a,{srcElement:l}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("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(a.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(a.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:function(e){return Object(n.createElement)(te,e)},save:function(){return null}})},86:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),i=r(1),l=(r(2),r(3));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 a(e){for(var t=1;t 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' => '17b0f8e012265e61affe79ac0d4ff508');
\ 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..d6ec95da901
--- /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 n,a,i=t[0],s=t[1],l=t[2],d=0,b=[];dstore settings.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(i.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!r&&Object(n.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(n.createInterpolateElement)(Object(o.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(i.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(c.SelectControl,{label:Object(o.__)("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:function(e){return t({orderby:e})}}),Object(n.createElement)(c.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(c.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},137:function(e,t,r){"use strict";var n=r(0),o=r(27),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.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},138:function(e,t){},139:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(6)),c=r.n(o),a=r(42),i=r(20);r(193),t.a=Object(i.withInstanceId)((function(e){var t=e.className,r=e.instanceId,o=e.label,i=e.onChange,s=e.options,l=e.screenReaderLabel,u=e.readOnly,d=e.value,b="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(a.a,{label:o,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(n.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:i,readOnly:u,value:d},s.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},14:function(e,t){e.exports=window.wp.data},146:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(37),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(n.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(n.__)("Alice","woo-gutenberg-products-block"),review:"".concat(Object(n.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block"),"
\n"),reviewer_avatar_urls:{48:o.o.defaultAvatar,96:o.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(n.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(n.__)("Bob","woo-gutenberg-products-block"),review:"".concat(Object(n.__)("This product is awesome, I love it!","woo-gutenberg-products-block"),"
\n"),reviewer_avatar_urls:{48:o.o.defaultAvatar,96:o.o.defaultAvatar},rating:null,verified:!1}]}}},15:function(e,t){e.exports=window.wp.apiFetch},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 n=r(10),o=r.n(n),c=r(0),a=r(12),i=(r(192),r(80));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({},a.useBlockProps.save({className:Object(i.a)(t)}),Object(i.b)(t)))}},180:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(7)),a=r(3),i=r(12),s=r(16),l=r.n(s),u=r(17),d=r.n(u),b=r(18),p=r.n(b),w=r(19),g=r.n(w),f=r(9),m=r.n(f),v=r(11),h=r(4),O=r(102),y=r(42),j=(r(240),function(e){var t=e.onClick,r=e.label,o=e.screenReaderLabel;return Object(n.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(n.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(n.createElement)(y.a,{label:r,screenReaderLabel:o})))});j.defaultProps={label:Object(o.__)("Load more","woo-gutenberg-products-block")};var _=j,k=r(139),E=(r(237),function(e){var t=e.onChange,r=e.readOnly,c=e.value;return Object(n.createElement)(k.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(o.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(o.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(o.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(o.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(o.__)("Order reviews by","woo-gutenberg-products-block"),value:c})}),R=r(5),P=r.n(R),C=r(6),S=r.n(C),x=r(13),N=r.n(x),T=r(212),L=r.n(T),A=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=L()(e,{suffix:r,limit:t});return n.html},I=function(e,t,r,n){var o=D(e,t,r);return A(e,o-n.length,n)},D=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=A(e,n.middle),n=M(n,t.clientHeight,r);return n.middle},M=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};var B=function(e){p()(c,e);var t,r,o=(t=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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=m()(t);if(r){var o=m()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return g()(this,e)});function c(e){var t;return l()(this,c),(t=o.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},t.reviewSummary=Object(v.createRef)(),t.reviewContent=Object(v.createRef)(),t.getButton=t.getButton.bind(N()(t)),t.onClick=t.onClick.bind(N()(t)),t}return d()(c,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:I(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,o=t.lessText,c=t.moreText,a=e?o:c;if(a)return Object(n.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},a)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,o=t.summary,c=t.clampEnabled,a=t.isExpanded;return r?!1===c?Object(n.createElement)("div",{className:e},Object(n.createElement)("div",{ref:this.reviewContent},r)):Object(n.createElement)("div",{className:e},(!a||null===c)&&Object(n.createElement)("div",{ref:this.reviewSummary,"aria-hidden":a,dangerouslySetInnerHTML:{__html:o}}),(a||null===c)&&Object(n.createElement)("div",{ref:this.reviewContent,"aria-hidden":!a},r),this.getButton()):null}}]),c}(v.Component);B.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(o.__)("Read more","woo-gutenberg-products-block"),lessText:Object(o.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=B;r(239);var G=function(e){var t=e.attributes,r=e.review,c=void 0===r?{}:r,a=t.imageType,i=t.showReviewDate,s=t.showReviewerName,l=t.showReviewImage,u=t.showReviewRating,d=t.showReviewContent,b=t.showProductName,p=c.rating,w=!Object.keys(c).length>0,g=Number.isFinite(p)&&u;return Object(n.createElement)("li",{className:S()("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":l}),"aria-hidden":w},(b||i||s||l||g)&&Object(n.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},l&&function(e,t,r){var c,a;return r||!e?Object(n.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(n.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(n.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(n.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(n.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(o.__)("Verified buyer","woo-gutenberg-products-block")},Object(o.__)("Verified buyer","woo-gutenberg-products-block")))}(c,a,w),(b||s||g||i)&&Object(n.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},g&&function(e){var t=e.rating,r={width:t/5*100+"%"},c=Object(o.sprintf)(
+/* translators: %f is referring to the average rating value */
+Object(o.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(n.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(n.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":c},Object(n.createElement)("span",{style:r},c)))}(c),b&&function(e){return Object(n.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(n.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(c),s&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(n.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},r)}(c),i&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(n.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(c))),d&&function(e){return Object(n.createElement)(H,{maxLines:10,moreText:Object(o.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(o.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(n.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(c))};function F(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 V(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(X.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.isMounted&&e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,o=r.error,c=r.loading,a=r.reviews,i=r.totalReviews;return Object(n.createElement)(e,W()({},this.props,{error:o,isLoading:c,reviews:a.slice(0,t),totalReviews:i}))}}]),a}(v.Component);P()(t,"defaultProps",{delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}});var r=e.displayName,o=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(o," )"),t}(function(e){p()(i,e);var t,r,c=(t=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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=m()(t);if(r){var o=m()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return g()(this,e)});function i(){return l()(this,i),c.apply(this,arguments)}return d()(i,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,c=e.isLoading,i=e.noReviewsPlaceholder,s=e.reviews,l=e.totalReviews;if(r)return Object(n.createElement)(O.a,{className:"wc-block-featured-product-error",error:r,isLoading:c});if(0===s.length&&!c)return Object(n.createElement)(i,{attributes:t});var u=Object(h.getSetting)("reviewRatingsEnabled",!0);return Object(n.createElement)(a.Disabled,null,t.showOrderby&&u&&Object(n.createElement)(E,{readOnly:!0,value:t.orderby}),Object(n.createElement)(z,{attributes:t,reviews:s}),t.showLoadMore&&l>s.length&&Object(n.createElement)(_,{screenReaderLabel:Object(o.__)("Load more reviews","woo-gutenberg-products-block")}))}}]),i}(v.Component));t.a=function(e){var t=e.attributes,r=e.icon,s=e.name,l=e.noReviewsPlaceholder,u=t.categoryIds,d=t.productId,b=t.reviewsOnPageLoad,p=t.showProductName,w=t.showReviewDate,g=t.showReviewerName,f=t.showReviewContent,m=t.showReviewImage,v=t.showReviewRating,h=Object(X.d)(t.orderby),O=h.order,y=h.orderby,j=!(f||v||w||g||m||p),_=Object(i.useBlockProps)({className:Object(X.a)(t)});return j?Object(n.createElement)(a.Placeholder,{icon:r,label:s},Object(o.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(n.createElement)("div",_,Object(n.createElement)(ee,{attributes:t,categoryIds:u,delayFunction:function(e){return Object(c.debounce)(e,400)},noReviewsPlaceholder:l,orderby:y,order:O,productId:d,reviewsToDisplay:b}))}},192:function(e,t){},193:function(e,t){},20:function(e,t){e.exports=window.wp.compose},22:function(e,t){e.exports=window.regeneratorRuntime},23:function(e,t){e.exports=window.wp.url},237:function(e,t){},238:function(e,t){},239:function(e,t){},24:function(e,t){e.exports=window.wp.blocks},240:function(e,t){},26:function(e,t){e.exports=window.wp.htmlEntities},27:function(e,t){e.exports=window.wp.primitives},28:function(e,t){e.exports=window.moment},3:function(e,t){e.exports=window.wp.components},35:function(e,t){e.exports=window.wp.dataControls},36:function(e,t){e.exports=window.wp.isShallowEqual},37: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 b})),r.d(t,"k",(function(){return p})),r.d(t,"c",(function(){return w})),r.d(t,"d",(function(){return g})),r.d(t,"h",(function(){return f})),r.d(t,"a",(function(){return m})),r.d(t,"i",(function(){return v})),r.d(t,"b",(function(){return h}));var n,o=r(4),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,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.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),w=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),g=o.STORE_PAGES.cart.permalink,f=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),m=Object(o.getSetting)("allowedCountries",{}),v=Object(o.getSetting)("shippingStates",{}),h=Object(o.getSetting)("allowedStates",{})},39:function(e,t,r){"use strict";r.d(t,"h",(function(){return p})),r.d(t,"e",(function(){return w})),r.d(t,"b",(function(){return g})),r.d(t,"i",(function(){return f})),r.d(t,"f",(function(){return m})),r.d(t,"c",(function(){return v})),r.d(t,"d",(function(){return h})),r.d(t,"g",(function(){return O})),r.d(t,"a",(function(){return y}));var n=r(5),o=r.n(n),c=r(23),a=r(15),i=r.n(a),s=r(7),l=r(4),u=r(37);function d(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 b(e){for(var t=1;t100,l={per_page:s?100:0,catalog_visibility:"any",search:o,orderby:"title",order:"asc"},d=[Object(c.addQueryArgs)("/wc/store/products",b(b({},l),i))];return s&&r.length&&d.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),d}({selected:r,search:o,queryArgs:void 0===a?{}:a});return Promise.all(l.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return b(b({},e),{},{parent:0})}))})).catch((function(e){throw e}))},w=function(e){return i()({path:"/wc/store/products/".concat(e)})},g=function(){return i()({path:"wc/store/products/attributes"})},f=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},m=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=Object(l.getSetting)("limitTags",!1),a=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:n})];return o&&r.length&&a.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:r})),a}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},v=function(e){return i()({path:Object(c.addQueryArgs)("wc/store/products/categories",b({per_page:0},e))})},h=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},O=function(e){return i()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},y=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}));var n=r(29),o=r.n(n),c=r(22),a=r.n(c),i=r(1),s=function(){var e=o()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),l=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},42:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(0),a=r(6),i=r.n(a);function s(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;t0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));n({categoryIds:t})},showReviewCount:!0}),Object(c.createElement)(b.Button,{isPrimary:!0,onClick:function(){n({editMode:!1}),r(Object(a.__)("Showing Reviews by Category block preview.","woo-gutenberg-products-block"))}},Object(a.__)("Done","woo-gutenberg-products-block"))));var i=Object(a.__)("Edit selected categories","woo-gutenberg-products-block");return Object(c.createElement)(c.Fragment,null,Object(f.a)(o,n,i),Object(c.createElement)(d.InspectorControls,{key:"inspector"},Object(c.createElement)(b.PanelBody,{title:Object(a.__)("Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(p.a,{selected:t.categoryIds,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));n({categoryIds:t})},isCompact:!0,showReviewCount:!0})),Object(c.createElement)(b.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(b.ToggleControl,{label:Object(a.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return n({showProductName:!t.showProductName})}}),Object(f.b)(t,n)),Object(c.createElement)(b.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block")},Object(f.c)(t,n))),Object(c.createElement)(w.a,{attributes:t,icon:Object(c.createElement)(s.a,{srcElement:u,className:"block-editor-block-icon"}),name:Object(a.__)("Reviews by Category","woo-gutenberg-products-block"),noReviewsPlaceholder:g}))})),v=r(176),h=r(177),O=r(146);function y(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 j(e){for(var t=1;t0,"is-skip-level":0===s&&0!==t.parent})},e,{countLabel:d,"aria-label":u}))},messages:f,isCompact:p,isHierarchical:!0,isSingle:w}),!!u&&Object(c.createElement)("div",{hidden:b.length<2},Object(c.createElement)(s.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"}]})))});T.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=C(T)}});
\ 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..ee5a4117450
--- /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' => '3826112c7fa3670a03be864c090a85de');
\ 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..c2e8b3136ef
--- /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 n,i,a=t[0],s=t[1],u=t[2],d=0,p=[];dstore settings.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(a.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!r&&Object(n.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(n.createInterpolateElement)(Object(o.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(a.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(c.SelectControl,{label:Object(o.__)("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:function(e){return t({orderby:e})}}),Object(n.createElement)(c.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(c.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(c.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},136:function(e,t,r){"use strict";var n=r(34),o=r.n(n),c=r(5),i=r.n(c),a=r(10),s=r.n(a),u=r(0),l=r(1),d=r(7),p=(r(2),r(46)),b=r(20),w=r(16),f=r.n(w),v=r(17),m=r.n(v),g=r(18),h=r.n(g),O=r(19),y=r.n(O),j=r(9),_=r.n(j);var k=Object(b.createHigherOrderComponent)((function(e){var t=function(t){h()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_()(r);if(n){var o=_()(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return y()(this,e)});function c(){return f()(this,c),o.apply(this,arguments)}return m()(c,[{key:"render",value:function(){var t=this.props.selected,r=null==t;return Object(u.createElement)(e,s()({},this.props,{selected:r?[]:[t]}))}}]),c}(u.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),E=r(272),R=r(29),P=r.n(R),S=r(13),C=r.n(S),x=r(22),L=r.n(x),N=r(36),I=r.n(N),T=r(39),D=r(40);function A(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 M(e){for(var t=1;t0,"is-skip-level":0===c&&0!==t.parent,"is-variable":w>0});if(!t.breadcrumbs.length)return Object(u.createElement)(F.a,s()({},e,{className:G()(f,{"is-selected":a}),isSelected:a,item:t,onSelect:function(){return function(){b(t)()}},isLoading:i||h,countLabel:t.variations.length>0?Object(l.sprintf)(
+/* translators: %1$d is the number of variations of a product product. */
+Object(l.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-".concat(n),"aria-label":Object(l.sprintf)(
+/* translators: %1$s is the product name, %2$d is the number of variations of that product. */
+Object(l._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)}));var v=Object(d.isEmpty)(t.variation)?e:$($({},e),{},{item:$($({},e.item),{},{name:t.variation}),"aria-label":"".concat(t.breadcrumbs[0],": ").concat(t.variation)});return Object(u.createElement)(p.c,s()({},v,{className:f,name:"variations-".concat(n)}))}:null),onSearch:b,messages:U,isHierarchical:!0})};q.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=k(Object(E.a)(B(Object(b.withInstanceId)(q))))},137:function(e,t,r){"use strict";var n=r(0),o=r(27),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.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},138:function(e,t){},139:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(6)),c=r.n(o),i=r(42),a=r(20);r(193),t.a=Object(a.withInstanceId)((function(e){var t=e.className,r=e.instanceId,o=e.label,a=e.onChange,s=e.options,u=e.screenReaderLabel,l=e.readOnly,d=e.value,p="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(i.a,{label:o,screenReaderLabel:u,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),Object(n.createElement)("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:a,readOnly:l,value:d},s.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},14:function(e,t){e.exports=window.wp.data},146:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(37),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(n.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(n.__)("Alice","woo-gutenberg-products-block"),review:"".concat(Object(n.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block"),"
\n"),reviewer_avatar_urls:{48:o.o.defaultAvatar,96:o.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(n.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(n.__)("Bob","woo-gutenberg-products-block"),review:"".concat(Object(n.__)("This product is awesome, I love it!","woo-gutenberg-products-block"),"
\n"),reviewer_avatar_urls:{48:o.o.defaultAvatar,96:o.o.defaultAvatar},rating:null,verified:!1}]}}},15:function(e,t){e.exports=window.wp.apiFetch},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 n=r(10),o=r.n(n),c=r(0),i=r(12),a=(r(192),r(80));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({},i.useBlockProps.save({className:Object(a.a)(t)}),Object(a.b)(t)))}},180:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(7)),i=r(3),a=r(12),s=r(16),u=r.n(s),l=r(17),d=r.n(l),p=r(18),b=r.n(p),w=r(19),f=r.n(w),v=r(9),m=r.n(v),g=r(11),h=r(4),O=r(102),y=r(42),j=(r(240),function(e){var t=e.onClick,r=e.label,o=e.screenReaderLabel;return Object(n.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(n.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(n.createElement)(y.a,{label:r,screenReaderLabel:o})))});j.defaultProps={label:Object(o.__)("Load more","woo-gutenberg-products-block")};var _=j,k=r(139),E=(r(237),function(e){var t=e.onChange,r=e.readOnly,c=e.value;return Object(n.createElement)(k.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(o.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(o.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(o.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(o.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(o.__)("Order reviews by","woo-gutenberg-products-block"),value:c})}),R=r(5),P=r.n(R),S=r(6),C=r.n(S),x=r(13),L=r.n(x),N=r(212),I=r.n(N),T=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=I()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=A(e,t,r);return T(e,o-n.length,n)},A=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=T(e,n.middle),n=M(n,t.clientHeight,r);return n.middle},M=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};var B=function(e){b()(c,e);var t,r,o=(t=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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=m()(t);if(r){var o=m()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return f()(this,e)});function c(e){var t;return u()(this,c),(t=o.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},t.reviewSummary=Object(g.createRef)(),t.reviewContent=Object(g.createRef)(),t.getButton=t.getButton.bind(L()(t)),t.onClick=t.onClick.bind(L()(t)),t}return d()(c,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:D(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,o=t.lessText,c=t.moreText,i=e?o:c;if(i)return Object(n.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},i)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,o=t.summary,c=t.clampEnabled,i=t.isExpanded;return r?!1===c?Object(n.createElement)("div",{className:e},Object(n.createElement)("div",{ref:this.reviewContent},r)):Object(n.createElement)("div",{className:e},(!i||null===c)&&Object(n.createElement)("div",{ref:this.reviewSummary,"aria-hidden":i,dangerouslySetInnerHTML:{__html:o}}),(i||null===c)&&Object(n.createElement)("div",{ref:this.reviewContent,"aria-hidden":!i},r),this.getButton()):null}}]),c}(g.Component);B.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(o.__)("Read more","woo-gutenberg-products-block"),lessText:Object(o.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=B;r(239);var V=function(e){var t=e.attributes,r=e.review,c=void 0===r?{}:r,i=t.imageType,a=t.showReviewDate,s=t.showReviewerName,u=t.showReviewImage,l=t.showReviewRating,d=t.showReviewContent,p=t.showProductName,b=c.rating,w=!Object.keys(c).length>0,f=Number.isFinite(b)&&l;return Object(n.createElement)("li",{className:C()("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":u}),"aria-hidden":w},(p||a||s||u||f)&&Object(n.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},u&&function(e,t,r){var c,i;return r||!e?Object(n.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(n.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(n.createElement)("img",{"aria-hidden":"true",alt:(null===(c=e.product_image)||void 0===c?void 0:c.alt)||"",src:(null===(i=e.product_image)||void 0===i?void 0:i.thumbnail)||""}):Object(n.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(n.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(o.__)("Verified buyer","woo-gutenberg-products-block")},Object(o.__)("Verified buyer","woo-gutenberg-products-block")))}(c,i,w),(p||s||f||a)&&Object(n.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},f&&function(e){var t=e.rating,r={width:t/5*100+"%"},c=Object(o.sprintf)(
+/* translators: %f is referring to the average rating value */
+Object(o.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(n.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(n.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":c},Object(n.createElement)("span",{style:r},c)))}(c),p&&function(e){return Object(n.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(n.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(c),s&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(n.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},r)}(c),a&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(n.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(c))),d&&function(e){return Object(n.createElement)(H,{maxLines:10,moreText:Object(o.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(o.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(n.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(c))};function G(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 F(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(X.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.isMounted&&e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,o=r.error,c=r.loading,i=r.reviews,a=r.totalReviews;return Object(n.createElement)(e,U()({},this.props,{error:o,isLoading:c,reviews:i.slice(0,t),totalReviews:a}))}}]),i}(g.Component);P()(t,"defaultProps",{delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}});var r=e.displayName,o=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(o," )"),t}(function(e){b()(a,e);var t,r,c=(t=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,n=m()(t);if(r){var o=m()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return f()(this,e)});function a(){return u()(this,a),c.apply(this,arguments)}return d()(a,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,c=e.isLoading,a=e.noReviewsPlaceholder,s=e.reviews,u=e.totalReviews;if(r)return Object(n.createElement)(O.a,{className:"wc-block-featured-product-error",error:r,isLoading:c});if(0===s.length&&!c)return Object(n.createElement)(a,{attributes:t});var l=Object(h.getSetting)("reviewRatingsEnabled",!0);return Object(n.createElement)(i.Disabled,null,t.showOrderby&&l&&Object(n.createElement)(E,{readOnly:!0,value:t.orderby}),Object(n.createElement)(z,{attributes:t,reviews:s}),t.showLoadMore&&u>s.length&&Object(n.createElement)(_,{screenReaderLabel:Object(o.__)("Load more reviews","woo-gutenberg-products-block")}))}}]),a}(g.Component));t.a=function(e){var t=e.attributes,r=e.icon,s=e.name,u=e.noReviewsPlaceholder,l=t.categoryIds,d=t.productId,p=t.reviewsOnPageLoad,b=t.showProductName,w=t.showReviewDate,f=t.showReviewerName,v=t.showReviewContent,m=t.showReviewImage,g=t.showReviewRating,h=Object(X.d)(t.orderby),O=h.order,y=h.orderby,j=!(v||g||w||f||m||b),_=Object(a.useBlockProps)({className:Object(X.a)(t)});return j?Object(n.createElement)(i.Placeholder,{icon:r,label:s},Object(o.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(n.createElement)("div",_,Object(n.createElement)(ee,{attributes:t,categoryIds:l,delayFunction:function(e){return Object(c.debounce)(e,400)},noReviewsPlaceholder:u,orderby:y,order:O,productId:d,reviewsToDisplay:p}))}},191:function(e,t){},192:function(e,t){},193:function(e,t){},20:function(e,t){e.exports=window.wp.compose},22:function(e,t){e.exports=window.regeneratorRuntime},23:function(e,t){e.exports=window.wp.url},237:function(e,t){},238:function(e,t){},239:function(e,t){},24:function(e,t){e.exports=window.wp.blocks},240:function(e,t){},26:function(e,t){e.exports=window.wp.htmlEntities},27:function(e,t){e.exports=window.wp.primitives},272:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(29),i=r.n(c),a=r(8),s=r.n(a),u=r(21),l=r.n(u),d=r(0),p=r(22),b=r.n(p),w=r(37),f=r(39),v=r(201),m=r(40),g=["selected"];t.a=function(e){return function(t){var r=t.selected,n=l()(t,g),c=Object(d.useState)(!0),a=s()(c,2),u=a[0],p=a[1],h=Object(d.useState)(null),O=s()(h,2),y=O[0],j=O[1],_=Object(d.useState)([]),k=s()(_,2),E=k[0],R=k[1],P=w.o.productCount>100,S=function(){var e=i()(b.a.mark((function e(t){var r;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(m.a)(t);case 2:r=e.sent,j(r),p(!1);case 5:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}();Object(d.useEffect)((function(){Object(f.h)({selected:r}).then((function(e){R(e),p(!1)})).catch(S)}),[r]);var C=Object(v.a)((function(e){Object(f.h)({selected:r,search:e}).then((function(e){R(e),p(!1)})).catch(S)}),400),x=s()(C,1)[0],L=Object(d.useCallback)((function(e){p(!0),x(e)}),[p,x]);return Object(d.createElement)(e,o()({},n,{selected:r,error:y,products:E,isLoading:u,onSearch:P?L:null}))}}},28:function(e,t){e.exports=window.moment},280:function(e,t,r){"use strict";var n=r(0),o=r(27),c=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:"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.wp.components},35:function(e,t){e.exports=window.wp.dataControls},36:function(e,t){e.exports=window.wp.isShallowEqual},37:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return i})),r.d(t,"l",(function(){return a})),r.d(t,"n",(function(){return s})),r.d(t,"j",(function(){return u})),r.d(t,"e",(function(){return l})),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 w})),r.d(t,"d",(function(){return f})),r.d(t,"h",(function(){return v})),r.d(t,"a",(function(){return m})),r.d(t,"i",(function(){return g})),r.d(t,"b",(function(){return h}));var n,o=r(4),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,d=o.STORE_PAGES.checkout.permalink,p=o.STORE_PAGES.privacy.permalink,b=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),w=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),f=o.STORE_PAGES.cart.permalink,v=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),m=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),h=Object(o.getSetting)("allowedStates",{})},39:function(e,t,r){"use strict";r.d(t,"h",(function(){return b})),r.d(t,"e",(function(){return w})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return v})),r.d(t,"f",(function(){return m})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return h})),r.d(t,"g",(function(){return O})),r.d(t,"a",(function(){return y}));var n=r(5),o=r.n(n),c=r(23),i=r(15),a=r.n(i),s=r(7),u=r(4),l=r(37);function d(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 p(e){for(var t=1;t100,u={per_page:s?100:0,catalog_visibility:"any",search:o,orderby:"title",order:"asc"},d=[Object(c.addQueryArgs)("/wc/store/products",p(p({},u),a))];return s&&r.length&&d.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),d}({selected:r,search:o,queryArgs:void 0===i?{}:i});return Promise.all(u.map((function(e){return a()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return p(p({},e),{},{parent:0})}))})).catch((function(e){throw e}))},w=function(e){return a()({path:"/wc/store/products/".concat(e)})},f=function(){return a()({path:"wc/store/products/attributes"})},v=function(e){return a()({path:"wc/store/products/attributes/".concat(e,"/terms")})},m=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=Object(u.getSetting)("limitTags",!1),i=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:n})];return o&&r.length&&i.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return a()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},g=function(e){return a()({path:Object(c.addQueryArgs)("wc/store/products/categories",p({per_page:0},e))})},h=function(e){return a()({path:"wc/store/products/categories/".concat(e)})},O=function(e){return a()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},y=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wc.wcSettings},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(29),o=r.n(n),c=r(22),i=r.n(c),a=r(1),s=function(){var e=o()(i.a.mark((function e(t){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},42:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(0),i=r(6),a=r.n(i);function s(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 u(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;n({productId:t})},queryArgs:{orderby:"comment_count",order:"desc"},renderItem:a}),Object(c.createElement)(b.Button,{isPrimary:!0,onClick:function(){n({editMode:!1}),r(Object(i.__)("Showing Reviews by Product block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Done","woo-gutenberg-products-block"))));var l=Object(i.__)("Edit selected product","woo-gutenberg-products-block");return Object(c.createElement)(c.Fragment,null,Object(O.a)(o,n,l),Object(c.createElement)(p.InspectorControls,{key:"inspector"},Object(c.createElement)(b.PanelBody,{title:Object(i.__)("Product","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(f.a,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;n({productId:t})},renderItem:a,isCompact:!0})),Object(c.createElement)(b.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(O.b)(t,n)),Object(c.createElement)(b.PanelBody,{title:Object(i.__)("List Settings","woo-gutenberg-products-block")},Object(O.c)(t,n))),Object(c.createElement)(v.a,{attributes:t,icon:Object(c.createElement)(s.a,{icon:u.a,className:"block-editor-block-icon"}),name:Object(i.__)("Reviews by Product","woo-gutenberg-products-block"),noReviewsPlaceholder:h}))})),j=r(176),_=r(177),k=r(146);function E(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 R(e){for(var t=1;t array('react', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '5ae852bd227af5b6b0211ef9ce22f4c7');
\ No newline at end of file
diff --git a/build/reviews-frontend.js b/build/reviews-frontend.js
new file mode 100644
index 00000000000..e8bc5281f13
--- /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=252)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},104: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 s})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return p})),r.d(t,"j",(function(){return d})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return v})),r.d(t,"g",(function(){return w})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return m})),r.d(t,"b",(function(){return g}));var n,o=r(2),a=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=a.pluginUrl+"images/",c=a.pluginUrl+"build/",s=a.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),p=o.STORE_PAGES.privacy.permalink,d=(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),v=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),w=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),m=Object(o.getSetting)("shippingStates",{}),g=Object(o.getSetting)("allowedStates",{})},116:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}));var n=r(35),o=r.n(n),a=r(24),i=r.n(a),c=r(1),s=function(){var e=o()(i.a.mark((function e(t){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),l=function(e){if(e.data&&"rest_invalid_param"===e.code){var 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")}},143:function(e,t,r){"use strict";r(8);var n=r(7),o=r.n(n),a=r(49),i=r(25);r(161),t.a=Object(i.withInstanceId)((function(e){var t=e.className,r=e.instanceId,n=e.label,i=e.onChange,c=e.options,s=e.screenReaderLabel,l=e.readOnly,u=e.value,p="wc-block-components-sort-select__select-".concat(r);return React.createElement("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},React.createElement(a.a,{label:n,screenReaderLabel:s,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),React.createElement("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:i,readOnly:l,value:u},c.map((function(e){return React.createElement("option",{key:e.key,value:e.key},e.label)}))))}))},161:function(e,t){},184: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"),b=0,m=[],g=!1,h=0;h=s)r="";else if(b+y.length>=s){if(" "===y[(o=s-b)-1])for(;o&&" "===y[(o-=1)-1];);else a=y.slice(o).indexOf(" "),u||(-1!==a?o+=a:o=r.length);r=y.slice(0,o).join("")+p,d&&(r+=''+f+""),b=s,g=!0}else b+=y.length;else if(l){if(b>=s)if(c=(i=r.match(/[a-zA-Z]+/))?i[0]:"")if(""!==r.substring(0,2))m.push(c),r="";else{for(;m[m.length-1]!==c&&m.length;)m.pop();m.length&&(r=""),m.pop()}else r=""}else r="";w[h]=r}return{html:w.join("\n").replace(/\n/g,""),more:g}})},19:function(e,t){e.exports=window.wp.isShallowEqual},2:function(e,t){e.exports=window.wc.wcSettings},20:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"...",n=N()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=B(e,t,r);return L(e,o-n.length,n)},B=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=L(e,n.middle),n=I(n,t.clientHeight,r);return n.middle},I=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};var G=function(e){p()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=w()(t);if(r){var o=w()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return f()(this,e)});function o(e){var t;return a()(this,o),(t=n.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},t.reviewSummary=Object(g.createRef)(),t.reviewContent=Object(g.createRef)(),t.getButton=t.getButton.bind(l()(t)),t.onClick=t.onClick.bind(l()(t)),t}return c()(o,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:D(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,a=e?n:o;if(a)return h.a.createElement("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},a)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,a=t.isExpanded;return r?!1===o?h.a.createElement("div",{className:e},h.a.createElement("div",{ref:this.reviewContent},r)):h.a.createElement("div",{className:e},(!a||null===o)&&h.a.createElement("div",{ref:this.reviewSummary,"aria-hidden":a,dangerouslySetInnerHTML:{__html:n}}),(a||null===o)&&h.a.createElement("div",{ref:this.reviewContent,"aria-hidden":!a},r),this.getButton()):null}}]),o}(g.Component);G.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(b.__)("Read more","woo-gutenberg-products-block"),lessText:Object(b.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=G;r(223);var U=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,a=t.showReviewDate,i=t.showReviewerName,c=t.showReviewImage,s=t.showReviewRating,l=t.showReviewContent,u=t.showProductName,p=n.rating,d=!Object.keys(n).length>0,f=Number.isFinite(p)&&s;return React.createElement("li",{className:O()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":d,"wc-block-components-review-list-item__item--has-image":c}),"aria-hidden":d},(u||a||i||c||f)&&React.createElement("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},c&&function(e,t,r){var n,o;return r||!e?React.createElement("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):React.createElement("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?React.createElement("img",{"aria-hidden":"true",alt:(null===(n=e.product_image)||void 0===n?void 0:n.alt)||"",src:(null===(o=e.product_image)||void 0===o?void 0:o.thumbnail)||""}):React.createElement("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&React.createElement("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(b.__)("Verified buyer","woo-gutenberg-products-block")},Object(b.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||i||f||a)&&React.createElement("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},f&&function(e){var t=e.rating,r={width:t/5*100+"%"},n=Object(b.sprintf)(
+/* translators: %f is referring to the average rating value */
+Object(b.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return React.createElement("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},React.createElement("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":n},React.createElement("span",{style:r},n)))}(n),u&&function(e){return React.createElement("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},React.createElement("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(n),i&&function(e){var t=e.reviewer,r=void 0===t?"":t;return React.createElement("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},r)}(n),a&&function(e){var t=e.date_created,r=e.formatted_date_created;return React.createElement("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(n))),l&&function(e){return React.createElement(H,{maxLines:10,moreText:Object(b.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(b.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},React.createElement("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};function F(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 W(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),x(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.isMounted&&e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,a=r.reviews,i=r.totalReviews;return React.createElement(e,z()({},this.props,{error:n,isLoading:o,reviews:a.slice(0,t),totalReviews:i}))}}]),i}(g.Component);A()(t,"defaultProps",{delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}});var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}((function(e){var t=e.attributes,r=e.onAppendReviews,n=e.onChangeOrderby,o=e.reviews,a=e.sortSelectValue,i=e.totalReviews;if(0===o.length)return null;var c=Object(k.getSetting)("reviewRatingsEnabled",!0);return React.createElement(React.Fragment,null,"false"!==t.showOrderby&&c&&React.createElement(T,{value:a,onChange:n}),React.createElement(q,{attributes:t,reviews:o}),"false"!==t.showLoadMore&&i>o.length&&React.createElement(P,{onClick:r,screenReaderLabel:Object(b.__)("Load more reviews","woo-gutenberg-products-block")}))}));var te=function(e){p()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=w()(t);if(r){var o=w()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return f()(this,e)});function o(){var e;a()(this,o);var t=(e=n.apply(this,arguments)).props.attributes;return e.state={orderby:t.orderby,reviewsToDisplay:parseInt(t.reviewsOnPageLoad,10)},e.onAppendReviews=e.onAppendReviews.bind(l()(e)),e.onChangeOrderby=e.onChangeOrderby.bind(l()(e)),e}return c()(o,[{key:"onAppendReviews",value:function(){var e=this.props.attributes,t=this.state.reviewsToDisplay;this.setState({reviewsToDisplay:t+parseInt(e.reviewsOnLoadMore,10)})}},{key:"onChangeOrderby",value:function(e){var t=this.props.attributes;this.setState({orderby:e.target.value,reviewsToDisplay:parseInt(t.reviewsOnPageLoad,10)})}},{key:"onReviewsAppended",value:function(e){var t=e.newReviews;Object(m.speak)(Object(b.sprintf)(
+/* translators: %d is the count of reviews loaded. */
+Object(b._n)("%d review loaded.","%d reviews loaded.",t.length,"woo-gutenberg-products-block"),t.length))}},{key:"onReviewsReplaced",value:function(){Object(m.speak)(Object(b.__)("Reviews list updated.","woo-gutenberg-products-block"))}},{key:"onReviewsLoadError",value:function(){Object(m.speak)(Object(b.__)("There was an error loading the reviews.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props.attributes,t=e.categoryIds,r=e.productId,n=this.state.reviewsToDisplay,o=function(e){if(Object(k.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),a=o.order,i=o.orderby;return React.createElement(ee,{attributes:e,categoryIds:t,onAppendReviews:this.onAppendReviews,onChangeOrderby:this.onChangeOrderby,onReviewsAppended:this.onReviewsAppended,onReviewsLoadError:this.onReviewsLoadError,onReviewsReplaced:this.onReviewsReplaced,order:a,orderby:i,productId:r,reviewsToDisplay:n,sortSelectValue:this.state.orderby})}}]),o}(g.Component);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:te,getProps:function(e){return{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=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},29:function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},3:function(e,t){e.exports=window.React},34:function(e,t){e.exports=window.wp.a11y},35:function(e,t){function r(e,t,r,n,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void r(e)}c.done?t(s):Promise.resolve(s).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=e.apply(t,n);function c(e){r(i,o,a,c,s,"next",e)}function s(e){r(i,o,a,c,s,"throw",e)}c(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},37:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},38:function(e,t){function r(e,t){for(var r=0;r0&&Array.prototype.filter.call(c,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),d({Block:r,containers:c,getProps:n,getErrorBoundaryProps:o}),Array.prototype.forEach.call(s,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,a,i,c;n=(r=u(u({},e),{},{wrapper:t})).Block,o=r.getProps,a=r.getErrorBoundaryProps,i=r.selector,c=r.wrapper.querySelectorAll(i),d({Block:n,containers:c,getProps:o,getErrorBoundaryProps:a})}))}))}}});
\ 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..843f410f0c9
--- /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' => '859c32820352c2e7156ccb43f6913bb4');
\ 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..26cfe4bf6b5
--- /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,s=[];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=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c},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){e.exports=window.wc.blocksCheckout},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(56),o=n(63);function c(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){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(4),o=n.n(r),c=n(5),i=n.n(c),a=n(6),u=n(0),s=n(9),l=n(11),f=n(32),p=n(101),d=n(151),m=n(36),b=n(107),h=function(e){var t=e.detail;t&&t.preserveCartData||Object(l.dispatch)(s.CART_STORE_KEY).invalidateResolutionForStore()},v=function(){1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},g=function(){Object(u.useEffect)((function(){return function(){if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:function(){}}),0===window.wcBlocksStoreCartListeners.count){var e=Object(b.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(b.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",h),document.body.addEventListener("wc-blocks_removed_from_cart",h),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=function(){e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",h),document.body.removeEventListener("wc-blocks_removed_from_cart",h)}}window.wcBlocksStoreCartListeners.count++}(),v}),[])};function y(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 O(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(m.a)(),n=t.isEditor,r=t.previewData,o=null==r?void 0:r.previewCart,c=e.shouldSelect,i=Object(u.useRef)();g();var f=Object(l.useSelect)((function(e,t){var r=t.dispatch;if(!c)return x;if(n)return{cartCoupons:o.coupons,cartItems:o.items,cartFees:o.fees,cartItemsCount:o.items_count,cartItemsWeight:o.items_weight,cartNeedsPayment:o.needs_payment,cartNeedsShipping:o.needs_shipping,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:o.totals,cartIsLoading:!1,cartErrors:s.EMPTY_CART_ERRORS,billingAddress:j,shippingAddress:w,extensions:s.EMPTY_EXTENSIONS,shippingRates:o.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:o.has_calculated_shipping,paymentRequirements:o.paymentRequirements,receiveCart:"function"==typeof(null==o?void 0:o.receiveCart)?o.receiveCart:function(){}};var i=e(s.CART_STORE_KEY),a=i.getCartData(),u=i.getCartErrors(),l=i.getCartTotals(),f=!i.hasFinishedResolution("getCartData"),p=i.isCustomerDataUpdating(),m=r(s.CART_STORE_KEY).receiveCart,b=E(a.billingAddress),h=a.needsShipping?E(a.shippingAddress):b,v=a.fees.length>0?a.fees.map((function(e){return E(e)})):s.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map((function(e){return O(O({},e),{},{label:e.code})})):s.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:v,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:l,cartIsLoading:f,cartErrors:u,billingAddress:Object(d.a)(b),shippingAddress:Object(d.a)(h),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}}),[c]);return i.current&&Object(a.isEqual)(i.current,f)||(i.current=f),i.current}},function(e,t){e.exports=window.wp.a11y},function(e,t){function n(e,t,n,r,o,c,i){try{var a=e[c](i),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var i=e.apply(t,r);function a(e){n(i,o,c,a,u,"next",e)}function u(e){n(i,o,c,a,u,"throw",e)}a(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=(n(11),Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:function(){}})),c=function(){return Object(r.useContext)(o)}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};try{Object(c.doAction)("experimental__woocommerce_blocks-".concat(e),t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(i.useCallback)((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(c.doAction)("experimental__woocommerce_blocks-checkout-".concat(e),s(s({},n),{},{storeCart:t.current}))}catch(e){console.error(e)}}),[])}}},function(e,t){e.exports=window.wp.deprecated},,,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);ne.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){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.warning},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,c=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(c.push(r.value),!t||c.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(i)throw o}}return c}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t,n){"use strict";var r=n(13),o=n(18),c=n(0),i=n(7),a=n.n(i),u=n(6),s=n(53),l=n.n(s),f=n(14),p=n(15),d=n(16),m=n(17),b=n(10),h=n(23),v=n(41),g=n(58),y=n(25),O=n(108),w=n(22);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:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===r?f=e.right:"middle"!==c&&(f=s);var p=e.right;"left"===r?p=e.left:"middle"!==c&&(p=s);var d,m={popoverLeft:f,contentWidth:f-a>0?a:f},b={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},h=n,v=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 g="left"==(h=m.contentWidth>b.contentWidth?"left":"right")?m.contentWidth:b.contentWidth;v=g!==a?g: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:v}}function x(e,t,n,r,o,c,i){var a=t.height;if(o){var u=(Object(v.getScrollContainer)(c)||document.body).getBoundingClientRect().top+a-i;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 b="top"==(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;m=b!==a?b:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:m}}var _=n(30),S=n(12);var P=Object(c.createContext)({focusHistory:[]}),C=P.Provider,R=P.Consumer;C.displayName="FocusReturnProvider",R.displayName="FocusReturnConsumer",c.Component;var T=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?u.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(f.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(_.a)(u.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(_.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 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(f.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=v.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"),M=n(89);var N=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(f.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),D=Object(M.a)(N);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 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,i=0,a=0;function u(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 s(){0===i&&u(!0),++i}function l(){1===i&&u(!1),--i}return function(e){Object(d.a)(n,e);var t=B(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(p.a)(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(c.Component)}();function I(e){e.stopPropagation()}var L=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:I}),n)})),U=n(48);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 z(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 fe=function(e){var t=e.headerTitle,n=e.onClose,i=e.onKeyDown,u=e.children,s=e.className,f=e.noArrow,p=void 0===f||f,d=e.isAlternate,m=e.position,b=void 0===m?"bottom right":m,w=(e.range,e.focusOnMount),j=void 0===w?"firstElement":w,_=e.anchorRef,S=e.shouldAnchorIncludePadding,P=e.anchorRect,C=e.getAnchorRect,R=e.expandOnMobile,T=e.animate,A=void 0===T||T,M=e.onClickOutside,N=e.onFocusOutside,B=e.__unstableSticky,I=e.__unstableSlotName,U=void 0===I?"Popover":I,H=e.__unstableObserveElement,z=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)(),X=Object(y.useViewportMatch)("medium","<"),K=Object(c.useState)(),$=Object(h.a)(K,2),Z=$[0],Q=$[1],J=V(U),ee=R&&X,ne=Object(y.useResizeObserver)(),re=Object(h.a)(ne,2),oe=re[0],fe=re[1];p=ee||p,Object(c.useLayoutEffect)((function(){if(ee)return le(G.current,"is-without-arrow",p),le(G.current,"is-alternate",d),ue(G.current,"data-x-axis"),ue(G.current,"data-y-axis"),se(G.current,"top"),se(G.current,"left"),se(Y.current,"maxHeight"),void se(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(v.getRectangleFromRange)(r);if(r instanceof window.Element){var c=r.getBoundingClientRect();return o?c:ae(c,r)}var i=r.top,a=r.bottom,u=i.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:ae(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:ae(p,f)}}(q,P,C,_,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)}z&&(t=null===(n=G.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,c=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=n.split(" "),u=Object(h.a)(a,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=x(e,t,s,p,r,o,c),m=E(e,t,f,p,r,d.yAxis,i);return k(k({},m),d)}(e,fe.height?fe:Y.current.getBoundingClientRect(),b,B,G.current,i,t),s=u.popoverTop,l=u.popoverLeft,f=u.xAxis,m=u.yAxis,g=u.contentHeight,y=u.contentWidth;"number"==typeof s&&"number"==typeof l&&(se(G.current,"top",s+"px"),se(G.current,"left",l+"px")),le(G.current,"is-without-arrow",p||"center"===f&&"middle"===m),le(G.current,"is-alternate",d),ue(G.current,"data-x-axis",f),ue(G.current,"data-y-axis",m),se(Y.current,"maxHeight","number"==typeof g?g+"px":""),se(Y.current,"maxWidth","number"==typeof y?y+"px":""),Q(({left:"right",right:"left"}[f]||"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),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,P,C,_,S,b,fe,B,H,z]),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=v.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===g.ESCAPE&&n&&(e.stopPropagation(),n()),i&&i(e)},de=Object(c.createElement)(D,{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 n&&n()}},Object(c.createElement)(ce,{type:A&&Z?"appear":null,options:{origin:Z}},(function(e){var o=e.className;return Object(c.createElement)(L,Object(r.a)({className:a()("components-popover",s,o,{"is-expanded":ee,"is-without-arrow":p,"is-alternate":d})},W,{onKeyDown:pe,ref:G}),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)(ge,{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,u)))})));return j&&(de=Object(c.createElement)(ie,null,de)),J.ref&&(de=Object(c.createElement)(te,{name:U},de)),_||P?de:Object(c.createElement)("span",{ref:q},de)};fe.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=fe,de=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(u.isString)(r)&&(t=r),Object(u.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(f.a)(this,o),(e=r.apply(this,arguments)).delayedSetIsOver=Object(u.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(u.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)(de,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),o}(c.Component),be=n(86);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}}}}(ve);try{for(D.s();!(N=D.n()).done;)C[N.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){D.e(e)}finally{D.f()}}var B=!T&&(k&&_||x||!!_&&(!S||Object(u.isArray)(S)&&!S.length)&&!1!==k),F=Object(c.createElement)(A,Object(r.a)({},M,C,{className:R,"aria-label":C["aria-label"]||_,ref:t}),w&&Object(c.createElement)(be.a,{icon:w,size:j}),S);return B?Object(c.createElement)(me,{text:_,shortcut:x,position:E},F):F}))},,,function(e,t){e.exports=window.wc.wcBlocksSharedContext},,function(e,t,n){"use strict";var r=n(22),o=n(13),c=n(18),i=n(0),a=n(44),u=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 s(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;t2&&void 0!==arguments[2]?arguments[2]:"",r=n&&void 0!==m[n]?m[n]:{};return e.map((function(e){var n=a.defaultAddressFields[e]||{},o=r[e]||{},c=t[e]||{};return f(f(f({key:e},n),o),c)})).sort((function(e,t){return e.index-t.index}))}},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){"use strict";var r=n(13),o=n(14),c=n(15),i=n(12),a=n(16),u=n(17),s=n(10),l=n(0),f=n(6),p=n(25);var d=["button","submit"];t.a=Object(p.createHigherOrderComponent)((function(e){return function(t){Object(a.a)(b,t);var n,p,m=(n=b,p=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(s.a)(n);if(p){var r=Object(s.a)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return Object(u.a)(this,e)});function b(){var e;return Object(o.a)(this,b),(e=m.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(c.a)(b,[{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(f.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(f.includes)(d,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(l.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(l.createElement)(e,Object(r.a)({ref:this.bindNode},this.props)))}}]),b}(l.Component)}),"withFocusOutside")},function(e,t,n){var r=n(62);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m}));var r=n(20),o=n.n(r),c=n(5),i=n.n(c),a=n(0),u=n(46);function s(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;t0&&Array.prototype.filter.call(a,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),p({Block:n,containers:a,getProps:r,getErrorBoundaryProps:o}),Array.prototype.forEach.call(u,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,c,i,a;r=(n=l(l({},e),{},{wrapper:t})).Block,o=n.getProps,c=n.getErrorBoundaryProps,i=n.selector,a=n.wrapper.querySelectorAll(i),p({Block:r,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},,,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 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