WooCommerce Gutenberg Products Block - Version 3.7.0

Version Description

  • 2020-10-29 =

Enhancements

  • Allow shoppers to sign-up for an account from the Checkout block. (3331)
  • Standardise & refactor colors scss to align with Gutenberg colors and WooCommerce brand. (3300)

Bug Fixes

  • Fix PHP 8 error when argument is not invocable in AssetsDataRegistry::Add_data. (3315)
  • Improve layout of Cart block line item quantity selector & price on smaller screens. (3299)
  • Correctly process orders with $0 total (e.g. via coupon) in Checkout block. (3298)
  • Respect Enable Taxes setting for checkout block taxes display. (3291)
  • Fix 3D secure payment errors. (3272)
  • Show current selected attributes when re-edit Products by Attribute block. (3185)
Download this release

Release Info

Developer automattic
Plugin Icon 128x128 WooCommerce Gutenberg Products Block
Version 3.7.0
Comparing to
See all releases

Code changes from version 3.6.0 to 3.7.0

Files changed (97) hide show
  1. assets/css/abstracts/_breakpoints.scss +2 -0
  2. assets/css/abstracts/_colors.scss +15 -48
  3. assets/css/abstracts/_mixins.scss +13 -3
  4. assets/css/abstracts/_variables.scss +10 -18
  5. assets/css/editor.scss +1 -1
  6. assets/js/atomic/blocks/product-elements/add-to-cart/product-types/variable/variation-attributes/style.scss +2 -2
  7. assets/js/atomic/blocks/product-elements/shared/editor.scss +1 -1
  8. assets/js/atomic/blocks/product-elements/stock-indicator/style.scss +3 -3
  9. assets/js/base/components/button/style.scss +2 -2
  10. assets/js/base/components/cart-checkout/address-form/index.js +2 -1
  11. assets/js/base/components/cart-checkout/policies/style.scss +1 -1
  12. assets/js/base/components/cart-checkout/totals/totals-footer-item/index.js +7 -2
  13. assets/js/base/components/checkbox-list/index.js +2 -1
  14. assets/js/base/components/chip/style.scss +4 -4
  15. assets/js/base/components/country-input/stories/index.js +1 -1
  16. assets/js/base/components/dropdown-selector/style.scss +4 -4
  17. assets/js/base/components/payment-methods/no-payment-methods/style.scss +1 -1
  18. assets/js/base/components/payment-methods/style.scss +4 -4
  19. assets/js/base/components/price-slider/constrain-range-slider-values.js +2 -2
  20. assets/js/base/components/price-slider/index.js +9 -10
  21. assets/js/base/components/price-slider/style.scss +178 -181
  22. assets/js/base/components/product-list/index.js +27 -21
  23. assets/js/base/components/quantity-selector/style.scss +8 -8
  24. assets/js/base/components/select/style.scss +4 -4
  25. assets/js/base/components/select/validated.js +10 -7
  26. assets/js/base/components/text-input/style.scss +4 -4
  27. assets/js/base/components/text-input/validated.js +35 -22
  28. assets/js/base/components/validation/style.scss +1 -1
  29. assets/js/base/context/cart-checkout/checkout-state/index.js +50 -12
  30. assets/js/base/hooks/cart/use-store-cart-item-quantity.js +27 -13
  31. assets/js/base/hooks/checkout/index.js +1 -0
  32. assets/js/base/hooks/checkout/use-checkout-notices.js +53 -0
  33. assets/js/base/hooks/use-previous.js +1 -1
  34. assets/js/base/hooks/use-query-state.js +28 -10
  35. assets/js/blocks/active-filters/block.js +8 -2
  36. assets/js/blocks/attribute-filter/block.js +36 -31
  37. assets/js/blocks/attribute-filter/edit.js +25 -28
  38. assets/js/blocks/cart-checkout/cart/checkout-button/style.scss +1 -1
  39. assets/js/blocks/cart-checkout/cart/full-cart/index.js +1 -1
  40. assets/js/blocks/cart-checkout/cart/full-cart/style.scss +7 -3
  41. assets/js/blocks/cart-checkout/cart/test/block.js +1 -7
  42. assets/js/blocks/cart-checkout/checkout/block.js +9 -3
  43. assets/js/blocks/cart-checkout/checkout/edit.js +10 -5
  44. assets/js/blocks/cart-checkout/checkout/form/address-step.js +1 -0
  45. assets/js/blocks/cart-checkout/checkout/form/contact-fields-step.js +2 -7
  46. assets/js/blocks/cart-checkout/checkout/form/index.js +1 -0
  47. assets/js/blocks/cart-checkout/checkout/form/no-shipping-placeholder/style.scss +1 -1
  48. assets/js/blocks/featured-category/style.scss +1 -1
  49. assets/js/blocks/featured-product/style.scss +1 -1
  50. assets/js/blocks/price-filter/block.js +59 -19
  51. assets/js/blocks/price-filter/use-price-constraints.js +3 -2
  52. assets/js/blocks/product-categories/style.scss +7 -7
  53. assets/js/blocks/product-search/style.scss +7 -7
  54. assets/js/blocks/products/editor.scss +2 -2
  55. assets/js/blocks/single-product/edit/editor.scss +1 -1
  56. assets/js/editor-components/feedback-prompt/style.scss +1 -1
  57. assets/js/editor-components/product-attribute-term-control/style.scss +2 -2
  58. assets/js/editor-components/product-control/style.scss +2 -2
  59. assets/js/editor-components/text-toolbar-button/style.scss +1 -1
  60. assets/js/editor-components/view-switcher/editor.scss +1 -1
  61. assets/js/hocs/with-attributes.js +42 -41
  62. assets/js/icons/library/radio-unselected.js +1 -1
  63. assets/js/payment-method-extensions/payment-methods/stripe/credit-card/use-checkout-subscriptions.js +1 -0
  64. assets/js/payment-method-extensions/payment-methods/stripe/credit-card/use-element-options.js +3 -3
  65. assets/js/payment-method-extensions/payment-methods/stripe/credit-card/use-payment-intents.js +47 -14
  66. assets/js/settings/shared/index.js +23 -2
  67. assets/js/type-defs/hooks.js +12 -0
  68. build/active-filters-frontend.asset.php +1 -1
  69. build/active-filters-frontend.js +2 -2
  70. build/active-filters.asset.php +1 -1
  71. build/active-filters.js +1 -1
  72. build/all-products-frontend.asset.php +1 -1
  73. build/all-products-frontend.js +2 -2
  74. build/all-products.asset.php +1 -1
  75. build/all-products.js +1 -1
  76. build/all-reviews.asset.php +1 -1
  77. build/all-reviews.js +1 -1
  78. build/atomic-block-components/add-to-cart-frontend.js +1 -1
  79. build/atomic-block-components/add-to-cart.js +1 -1
  80. build/atomic-block-components/add-to-cart~atomic-block-components/button.js +1 -1
  81. build/atomic-block-components/button-frontend.js +1 -1
  82. build/atomic-block-components/button.js +1 -1
  83. build/atomic-block-components/category-list.js +1 -1
  84. build/atomic-block-components/image-frontend.js +1 -1
  85. build/atomic-block-components/image.js +1 -1
  86. build/atomic-block-components/price-frontend.js +1 -1
  87. build/atomic-block-components/price.js +1 -1
  88. build/atomic-block-components/rating.js +1 -1
  89. build/atomic-block-components/sale-badge-frontend.js +1 -1
  90. build/atomic-block-components/sale-badge.js +1 -1
  91. build/atomic-block-components/sku.js +1 -1
  92. build/atomic-block-components/stock-indicator.js +1 -1
  93. build/atomic-block-components/summary-frontend.js +1 -1
  94. build/atomic-block-components/summary.js +1 -1
  95. build/atomic-block-components/tag-list.js +1 -1
  96. build/atomic-block-components/title-frontend.js +1 -1
  97. build/atomic-block-components/title.js +0 -1
assets/css/abstracts/_breakpoints.scss CHANGED
@@ -8,6 +8,8 @@
8
  // See https://github.com/WordPress/gutenberg/tree/master/packages/viewport#usage
9
  $breakpoints: 480px, 600px, 782px, 960px, 1280px, 1440px;
10
 
 
 
11
  @mixin breakpoint( $sizes... ) {
12
  @each $size in $sizes {
13
  @if type-of( $size ) == string {
8
  // See https://github.com/WordPress/gutenberg/tree/master/packages/viewport#usage
9
  $breakpoints: 480px, 600px, 782px, 960px, 1280px, 1440px;
10
 
11
+ // @todo refactor breakpoints so they use the mixins from Gutenberg
12
+ // https://github.com/WordPress/gutenberg/blob/master/packages/base-styles/_mixins.scss
13
  @mixin breakpoint( $sizes... ) {
14
  @each $size in $sizes {
15
  @if type-of( $size ) == string {
assets/css/abstracts/_colors.scss CHANGED
@@ -1,54 +1,22 @@
1
- // Greys
2
- $core-grey-light-100: #f8f9f9;
3
- $core-grey-light-200: #f3f4f5;
4
- $core-grey-light-300: #edeff0;
5
- $core-grey-light-400: #e8eaeb;
6
- $core-grey-light-500: #e2e4e7;
7
- $core-grey-light-600: #d7dade;
8
- $core-grey-light-700: #ccd0d4;
9
- $core-grey-light-800: #b5bcc2;
10
- $core-grey-light-900: #a2aab2;
11
- $core-grey-dark-100: #86909b;
12
- $core-grey-dark-200: #78848f;
13
- $core-grey-dark-300: #6c7781; // This & below have 4.5+ contrast against white
14
- $core-grey-dark-400: #606a73;
15
- $core-grey-dark-500: #555d66;
16
- $core-grey-dark-600: #40464d;
17
- $core-grey-dark-700: #32373c;
18
- $core-grey-dark-800: #23282d;
19
- $core-grey-dark-900: #191e23;
20
-
21
- $gray-text: $core-grey-dark-500;
22
-
23
- // WooCommerce Purples
24
- $woocommerce-100: #ffd7ff;
25
- $woocommerce-200: #e2a5d7;
26
- $woocommerce-300: #c88bbd;
27
- $woocommerce-400: #af72a4;
28
- $woocommerce-500: #95588a;
29
- $woocommerce-600: #7c3f71;
30
- $woocommerce-700: #622557;
31
- $woocommerce-800: #490c3e;
32
- $woocommerce-900: #2f0024;
33
- $woocommerce: $woocommerce-500;
34
-
35
- $wp-admin-background: #f1f1f1;
36
- $black: #24292d; // same as wp-admin sidebar
37
 
 
 
 
 
 
 
 
 
 
 
38
  $white: #fff;
39
 
40
  // Bright colors
41
- $valid-green: #4ab866;
42
- $notice-yellow: #ffb900;
43
- $error-red: #d94f4f;
44
- $box-shadow-blue: #5b9dd9;
45
- $core-orange: #ca4a1f;
46
-
47
- $gray-10: #c3c4c7;
48
- $gray-20: #a7aaad;
49
- $gray-50: #646970;
50
- $gray-60: #50575e;
51
- $gray-80: #2c3338;
52
 
53
  $input-border-gray: #8d96a0;
54
  $input-border-dark: rgba(255, 255, 255, 0.4);
@@ -61,4 +29,3 @@ $input-background-dark: rgba(0, 0, 0, 0.1);
61
  $select-dropdown-dark: #1e1e1e;
62
  $select-dropdown-light: #fff;
63
  $select-item-dark: rgba(0, 0, 0, 0.4);
64
-
1
+ @import "node_modules/@wordpress/base-styles/colors";
2
+ @import "node_modules/@automattic/color-studio/dist/color-variables";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ // @todo remove when `@woocommerce/base-styles` is updated.
5
+ // Greys
6
+ $black: #000; // Use only when you truly need pure black. For UI, use $gray-900.
7
+ $gray-100: #f0f0f0; // Used for light gray backgrounds.
8
+ $gray-200: #e0e0e0; // Used sparingly for light borders.
9
+ $gray-300: #ddd; // Used for most borders.
10
+ $gray-400: #ccc;
11
+ $gray-600: #949494; // Meets 3:1 UI or large text contrast against white.
12
+ $gray-700: #757575; // Meets 4.6:1 text contrast against white.
13
+ $gray-900: #1e1e1e;
14
  $white: #fff;
15
 
16
  // Bright colors
17
+ $no-stock-color: $alert-red;
18
+ $low-stock-color: $alert-yellow;
19
+ $in-stock-color: $alert-green;
 
 
 
 
 
 
 
 
20
 
21
  $input-border-gray: #8d96a0;
22
  $input-border-dark: rgba(255, 255, 255, 0.4);
29
  $select-dropdown-dark: #1e1e1e;
30
  $select-dropdown-light: #fff;
31
  $select-item-dark: rgba(0, 0, 0, 0.4);
 
assets/css/abstracts/_mixins.scss CHANGED
@@ -26,9 +26,9 @@ $fontSizes: (
26
  // Adds animation to placeholder section
27
  @mixin placeholder() {
28
  animation: loading-fade 1.2s ease-in-out infinite;
29
- background-color: $core-grey-light-500 !important;
30
- border-color: $core-grey-light-500 !important;
31
- color: $core-grey-light-500 !important;
32
  box-shadow: none;
33
  pointer-events: none;
34
 
@@ -147,3 +147,13 @@ $fontSizes: (
147
  @function em($size, $base: 16px) {
148
  @return $size / $base * 1em;
149
  }
 
 
 
 
 
 
 
 
 
 
26
  // Adds animation to placeholder section
27
  @mixin placeholder() {
28
  animation: loading-fade 1.2s ease-in-out infinite;
29
+ background-color: $gray-200 !important;
30
+ border-color: $gray-200 !important;
31
+ color: $gray-200 !important;
32
  box-shadow: none;
33
  pointer-events: none;
34
 
147
  @function em($size, $base: 16px) {
148
  @return $size / $base * 1em;
149
  }
150
+
151
+ // Encodes hex colors so they can be used in URL content.
152
+ @function encode-color($color) {
153
+ @if type-of($color) != "color" or str-index(#{$color}, "#") != 1 {
154
+ @return $color;
155
+ }
156
+
157
+ $hex: str-slice(ie-hex-str($color), 4);
158
+ @return "%23" + unquote("#{$hex}");
159
+ }
assets/css/abstracts/_variables.scss CHANGED
@@ -1,22 +1,14 @@
1
- $gap-largest: 40px;
2
- $gap-larger: 36px;
3
- $gap-large: 24px;
4
- $gap: 16px;
5
- $gap-small: 12px;
6
- $gap-smaller: 8px;
7
- $gap-smallest: 4px;
8
-
9
- // Variables pulled from Gutenberg.
10
- // Editor Widths
11
- $sidebar-width: 280px;
12
- $content-width: 610px; // For the visual width, subtract 30px (2 * $block-padding + 2px borders). This comes to 580px, which is optimized for 70 characters.
13
 
14
- // Blocks
15
- $block-padding: 14px; // Space between block footprint and focus boundaries. These are drawn outside the block footprint, and do not affect the size.
16
- $block-spacing: 4px; // Vertical space between blocks.
17
- $block-side-ui-width: 28px; // Width of the movers/drag handle UI.
18
- $block-side-ui-clearance: 2px; // Space between movers/drag handle UI, and block.
19
- $block-container-side-padding: $block-side-ui-width + $block-padding + 2 * $block-side-ui-clearance; // Total space left and right of the block footprint.
 
 
 
20
 
21
  // Cart block
22
  $cart-image-width: 5rem;
1
+ @import "node_modules/@wordpress/base-styles/variables";
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ // @todo replace with $grid-unit values when `@woocommerce/base-styles` is updated.
4
+ // see: https://github.com/WordPress/gutenberg/blob/master/packages/base-styles/_variables.scss#L23-L36
5
+ $gap-largest: 40px; // $grid-unit-50
6
+ $gap-larger: 36px;
7
+ $gap-large: 24px; // $grid-unit-30
8
+ $gap: 16px; // $grid-unit-20
9
+ $gap-small: 12px; // $grid-unit-15
10
+ $gap-smaller: 8px; // $grid-unit-10
11
+ $gap-smallest: 4px; // $grid-unit-05
12
 
13
  // Cart block
14
  $cart-image-width: 5rem;
assets/css/editor.scss CHANGED
@@ -49,7 +49,7 @@
49
 
50
  // Adds border to placeholder lists, so they can be distinguished from the white background.
51
  .components-placeholder .woocommerce-search-list__list {
52
- border: 1px solid $core-grey-light-500;
53
  }
54
 
55
  // Work-around to make the SearchList component work fine with the last versions of @wordpress/components.
49
 
50
  // Adds border to placeholder lists, so they can be distinguished from the white background.
51
  .components-placeholder .woocommerce-search-list__list {
52
+ border: 1px solid $gray-200;
53
  }
54
 
55
  // Work-around to make the SearchList component work fine with the last versions of @wordpress/components.
assets/js/atomic/blocks/product-elements/add-to-cart/product-types/variable/variation-attributes/style.scss CHANGED
@@ -23,9 +23,9 @@
23
  margin-bottom: $gap-large;
24
 
25
  select {
26
- border-color: $error-red;
27
  &:focus {
28
- outline-color: $error-red;
29
  }
30
  }
31
  }
23
  margin-bottom: $gap-large;
24
 
25
  select {
26
+ border-color: $alert-red;
27
  &:focus {
28
+ outline-color: $alert-red;
29
  }
30
  }
31
  }
assets/js/atomic/blocks/product-elements/shared/editor.scss CHANGED
@@ -3,7 +3,7 @@
3
  }
4
  .wc-atomic-blocks-product__edit-card {
5
  padding: 16px;
6
- border-top: 1px solid #e2e4e7;
7
 
8
  .wc-atomic-blocks-product__edit-card-title {
9
  margin: 0 0 $gap;
3
  }
4
  .wc-atomic-blocks-product__edit-card {
5
  padding: 16px;
6
+ border-top: 1px solid $gray-200;
7
 
8
  .wc-atomic-blocks-product__edit-card-title {
9
  margin: 0 0 $gap;
assets/js/atomic/blocks/product-elements/stock-indicator/style.scss CHANGED
@@ -5,13 +5,13 @@
5
  @include font-size(small);
6
 
7
  &--in-stock {
8
- color: $valid-green;
9
  }
10
  &--out-of-stock {
11
- color: $error-red;
12
  }
13
  &--low-stock,
14
  &--available-on-backorder {
15
- color: $notice-yellow;
16
  }
17
  }
5
  @include font-size(small);
6
 
7
  &--in-stock {
8
+ color: $in-stock-color;
9
  }
10
  &--out-of-stock {
11
+ color: $no-stock-color;
12
  }
13
  &--low-stock,
14
  &--available-on-backorder {
15
+ color: $low-stock-color;
16
  }
17
  }
assets/js/base/components/button/style.scss CHANGED
@@ -1,7 +1,7 @@
1
  .wc-block-components-button:not(.is-link) {
2
  @include reset-typography();
3
  align-items: center;
4
- background-color: $black;
5
  color: $white;
6
  display: inline-flex;
7
  font-weight: bold;
@@ -18,7 +18,7 @@
18
  &:hover,
19
  &:focus,
20
  &:active {
21
- background-color: $black;
22
  color: $white;
23
  }
24
 
1
  .wc-block-components-button:not(.is-link) {
2
  @include reset-typography();
3
  align-items: center;
4
+ background-color: $gray-900;
5
  color: $white;
6
  display: inline-flex;
7
  font-weight: bold;
18
  &:hover,
19
  &:focus,
20
  &:active {
21
+ background-color: $gray-900;
22
  color: $white;
23
  }
24
 
assets/js/base/components/cart-checkout/address-form/index.js CHANGED
@@ -100,7 +100,8 @@ const AddressForm = ( {
100
  }
101
  }, [
102
  values,
103
- countryValidationError,
 
104
  setValidationErrors,
105
  clearValidationError,
106
  type,
100
  }
101
  }, [
102
  values,
103
+ countryValidationError.message,
104
+ countryValidationError.hidden,
105
  setValidationErrors,
106
  clearValidationError,
107
  type,
assets/js/base/components/cart-checkout/policies/style.scss CHANGED
@@ -14,7 +14,7 @@
14
  margin: 0;
15
 
16
  &:not(:first-child) {
17
- border-left: 1px solid $gray-10;
18
  }
19
 
20
  > a {
14
  margin: 0;
15
 
16
  &:not(:first-child) {
17
+ border-left: 1px solid $gray-400;
18
  }
19
 
20
  > a {
assets/js/base/components/cart-checkout/totals/totals-footer-item/index.js CHANGED
@@ -2,7 +2,10 @@
2
  * External dependencies
3
  */
4
  import { __ } from '@wordpress/i18n';
5
- import { DISPLAY_CART_PRICES_INCLUDING_TAX } from '@woocommerce/block-settings';
 
 
 
6
  import { createInterpolateElement } from 'wordpress-element';
7
  import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
8
  import PropTypes from 'prop-types';
@@ -13,6 +16,8 @@ import PropTypes from 'prop-types';
13
  import TotalsItem from '../totals-item';
14
  import './style.scss';
15
 
 
 
16
  const TotalsFooterItem = ( { currency, values } ) => {
17
  const { total_price: totalPrice, total_tax: totalTax } = values;
18
 
@@ -23,7 +28,7 @@ const TotalsFooterItem = ( { currency, values } ) => {
23
  label={ __( 'Total', 'woo-gutenberg-products-block' ) }
24
  value={ parseInt( totalPrice, 10 ) }
25
  description={
26
- DISPLAY_CART_PRICES_INCLUDING_TAX && (
27
  <p className="wc-block-components-totals-footer-item-tax">
28
  { createInterpolateElement(
29
  __(
2
  * External dependencies
3
  */
4
  import { __ } from '@wordpress/i18n';
5
+ import {
6
+ TAXES_ENABLED,
7
+ DISPLAY_CART_PRICES_INCLUDING_TAX,
8
+ } from '@woocommerce/block-settings';
9
  import { createInterpolateElement } from 'wordpress-element';
10
  import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
11
  import PropTypes from 'prop-types';
16
  import TotalsItem from '../totals-item';
17
  import './style.scss';
18
 
19
+ const SHOW_TAXES = TAXES_ENABLED && DISPLAY_CART_PRICES_INCLUDING_TAX;
20
+
21
  const TotalsFooterItem = ( { currency, values } ) => {
22
  const { total_price: totalPrice, total_tax: totalTax } = values;
23
 
28
  label={ __( 'Total', 'woo-gutenberg-products-block' ) }
29
  value={ parseInt( totalPrice, 10 ) }
30
  description={
31
+ SHOW_TAXES && (
32
  <p className="wc-block-components-totals-footer-item-tax">
33
  { createInterpolateElement(
34
  __(
assets/js/base/components/checkbox-list/index.js CHANGED
@@ -16,7 +16,7 @@ import './style.scss';
16
  *
17
  * @param {Object} props Incoming props for the component.
18
  * @param {string} props.className CSS class used.
19
- * @param {function():any} props.onChange Function called when inputs change.
20
  * @param {Array} props.options Options for list.
21
  * @param {Array} props.checked Which items are checked.
22
  * @param {boolean} props.isLoading If loading or not.
@@ -142,6 +142,7 @@ const CheckboxList = ( {
142
  );
143
  }, [
144
  options,
 
145
  checked,
146
  showExpanded,
147
  limit,
16
  *
17
  * @param {Object} props Incoming props for the component.
18
  * @param {string} props.className CSS class used.
19
+ * @param {function(string):any} props.onChange Function called when inputs change.
20
  * @param {Array} props.options Options for list.
21
  * @param {Array} props.checked Which items are checked.
22
  * @param {boolean} props.isLoading If loading or not.
142
  );
143
  }, [
144
  options,
145
+ onChange,
146
  checked,
147
  showExpanded,
148
  limit,
assets/js/base/components/chip/style.scss CHANGED
@@ -14,8 +14,8 @@
14
  &:hover,
15
  &:focus,
16
  &:active {
17
- background: $core-grey-light-500;
18
- color: $core-grey-dark-800;
19
  }
20
 
21
  &.wc-block-components-chip--radius-small {
@@ -55,11 +55,11 @@ button.wc-block-components-chip:hover > .wc-block-components-chip__remove,
55
  button.wc-block-components-chip:focus > .wc-block-components-chip__remove,
56
  .wc-block-components-chip__remove:hover,
57
  .wc-block-components-chip__remove:focus {
58
- fill: #d94f4f;
59
  }
60
 
61
  button.wc-block-components-chip:disabled > .wc-block-components-chip__remove,
62
  .wc-block-components-chip__remove:disabled {
63
- fill: $core-grey-dark-100;
64
  cursor: not-allowed;
65
  }
14
  &:hover,
15
  &:focus,
16
  &:active {
17
+ background: $gray-200;
18
+ color: $gray-900;
19
  }
20
 
21
  &.wc-block-components-chip--radius-small {
55
  button.wc-block-components-chip:focus > .wc-block-components-chip__remove,
56
  .wc-block-components-chip__remove:hover,
57
  .wc-block-components-chip__remove:focus {
58
+ fill: $alert-red;
59
  }
60
 
61
  button.wc-block-components-chip:disabled > .wc-block-components-chip__remove,
62
  .wc-block-components-chip__remove:disabled {
63
+ fill: $gray-600;
64
  cursor: not-allowed;
65
  }
assets/js/base/components/country-input/stories/index.js CHANGED
@@ -27,7 +27,7 @@ const StoryComponent = ( { label, errorMessage } ) => {
27
  } = useValidationContext();
28
  useEffect( () => {
29
  setValidationErrors( { country: errorMessage } );
30
- }, [ errorMessage ] );
31
  const updateCountry = ( country ) => {
32
  clearValidationError( 'country' );
33
  selectCountry( country );
27
  } = useValidationContext();
28
  useEffect( () => {
29
  setValidationErrors( { country: errorMessage } );
30
+ }, [ errorMessage, setValidationErrors ] );
31
  const updateCountry = ( country ) => {
32
  clearValidationError( 'country' );
33
  selectCountry( country );
assets/js/base/components/dropdown-selector/style.scss CHANGED
@@ -20,7 +20,7 @@ $dropdown-selector-line-height: 18/14;
20
  padding: 2px $gap-smaller;
21
 
22
  .is-disabled & {
23
- background-color: $core-grey-light-500;
24
  }
25
 
26
  .is-multiple.has-checked > & {
@@ -102,7 +102,7 @@ $dropdown-selector-line-height: 18/14;
102
  .wc-block-components-dropdown-selector__selected-value {
103
  @include font-size(small);
104
  align-items: center;
105
- color: $core-grey-dark-600;
106
  display: inline-flex;
107
  margin: em($gap-small/4) 0;
108
  padding: em($gap-smallest * 0.75) 0 em($gap-smallest * 0.75);
@@ -155,14 +155,14 @@ $dropdown-selector-line-height: 18/14;
155
 
156
  .wc-block-components-dropdown-selector__list-item {
157
  @include font-size(small);
158
- color: $core-grey-dark-600;
159
  cursor: default;
160
  list-style: none;
161
  margin: 0;
162
  padding: 0 $gap-smallest;
163
 
164
  &.is-selected {
165
- background-color: $core-grey-light-600;
166
  }
167
 
168
  &:hover,
20
  padding: 2px $gap-smaller;
21
 
22
  .is-disabled & {
23
+ background-color: $gray-200;
24
  }
25
 
26
  .is-multiple.has-checked > & {
102
  .wc-block-components-dropdown-selector__selected-value {
103
  @include font-size(small);
104
  align-items: center;
105
+ color: $gray-700;
106
  display: inline-flex;
107
  margin: em($gap-small/4) 0;
108
  padding: em($gap-smallest * 0.75) 0 em($gap-smallest * 0.75);
155
 
156
  .wc-block-components-dropdown-selector__list-item {
157
  @include font-size(small);
158
+ color: $gray-700;
159
  cursor: default;
160
  list-style: none;
161
  margin: 0;
162
  padding: 0 $gap-smallest;
163
 
164
  &.is-selected {
165
+ background-color: $gray-300;
166
  }
167
 
168
  &:hover,
assets/js/base/components/payment-methods/no-payment-methods/style.scss CHANGED
@@ -9,7 +9,7 @@
9
  display: block;
10
 
11
  .components-button {
12
- background-color: $black;
13
  color: $white;
14
  }
15
 
9
  display: block;
10
 
11
  .components-button {
12
+ background-color: $gray-900;
13
  color: $white;
14
  }
15
 
assets/js/base/components/payment-methods/style.scss CHANGED
@@ -67,7 +67,7 @@
67
  left: 0;
68
  top: 0;
69
  transform-origin: top left;
70
- color: $gray-50;
71
  transition: transform 200ms ease;
72
  margin: 0 0 0 #{$gap + 1px};
73
  overflow: hidden;
@@ -109,14 +109,14 @@
109
  }
110
 
111
  .wc-block-gateway-input.has-error {
112
- border-color: $error-red;
113
  &:focus {
114
- outline-color: $error-red;
115
  }
116
  }
117
 
118
  .wc-block-gateway-input.has-error + label {
119
- color: $error-red;
120
  }
121
  }
122
 
67
  left: 0;
68
  top: 0;
69
  transform-origin: top left;
70
+ color: $gray-700;
71
  transition: transform 200ms ease;
72
  margin: 0 0 0 #{$gap + 1px};
73
  overflow: hidden;
109
  }
110
 
111
  .wc-block-gateway-input.has-error {
112
+ border-color: $alert-red;
113
  &:focus {
114
+ outline-color: $alert-red;
115
  }
116
  }
117
 
118
  .wc-block-gateway-input.has-error + label {
119
+ color: $alert-red;
120
  }
121
  }
122
 
assets/js/base/components/price-slider/constrain-range-slider-values.js CHANGED
@@ -2,8 +2,8 @@
2
  * Validate a min and max value for a range slider against defined constraints (min, max, step).
3
  *
4
  * @param {Array} values Array containing min and max values.
5
- * @param {number} min Min allowed value for the sliders.
6
- * @param {number} max Max allowed value for the sliders.
7
  * @param {number} step Step value for the sliders.
8
  * @param {boolean} isMin Whether we're currently interacting with the min range slider or not, so we update the correct values.
9
  * @return {Array} Validated and updated min/max values that fit within the range slider constraints.
2
  * Validate a min and max value for a range slider against defined constraints (min, max, step).
3
  *
4
  * @param {Array} values Array containing min and max values.
5
+ * @param {number|null} min Min allowed value for the sliders.
6
+ * @param {number|null} max Max allowed value for the sliders.
7
  * @param {number} step Step value for the sliders.
8
  * @param {boolean} isMin Whether we're currently interacting with the min range slider or not, so we update the correct values.
9
  * @return {Array} Validated and updated min/max values that fit within the range slider constraints.
assets/js/base/components/price-slider/index.js CHANGED
@@ -112,7 +112,6 @@ const PriceSlider = ( {
112
  minConstraint,
113
  maxConstraint,
114
  hasValidConstraints,
115
- stepValue,
116
  ] );
117
 
118
  /**
@@ -186,7 +185,14 @@ const PriceSlider = ( {
186
  parseInt( values[ 1 ], 10 ),
187
  ] );
188
  },
189
- [ minPrice, maxPrice, minConstraint, maxConstraint, stepValue ]
 
 
 
 
 
 
 
190
  );
191
 
192
  /**
@@ -221,14 +227,7 @@ const PriceSlider = ( {
221
  parseInt( values[ 1 ], 10 ),
222
  ] );
223
  },
224
- [
225
- minConstraint,
226
- maxConstraint,
227
- stepValue,
228
- minPriceInput,
229
- maxPriceInput,
230
- currency,
231
- ]
232
  );
233
 
234
  const classes = classnames(
112
  minConstraint,
113
  maxConstraint,
114
  hasValidConstraints,
 
115
  ] );
116
 
117
  /**
185
  parseInt( values[ 1 ], 10 ),
186
  ] );
187
  },
188
+ [
189
+ onChange,
190
+ minPrice,
191
+ maxPrice,
192
+ minConstraint,
193
+ maxConstraint,
194
+ stepValue,
195
+ ]
196
  );
197
 
198
  /**
227
  parseInt( values[ 1 ], 10 ),
228
  ] );
229
  },
230
+ [ onChange, stepValue, minPriceInput, maxPriceInput ]
 
 
 
 
 
 
 
231
  );
232
 
233
  const classes = classnames(
assets/js/base/components/price-slider/style.scss CHANGED
@@ -11,7 +11,7 @@
11
  cursor: pointer;
12
  z-index: 20;
13
  pointer-events: auto;
14
- background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='52' height='42'%3E%3Cdefs%3E%3Cpath id='a' d='M23.3176 7.9423l-8.4163-6.1432C13.1953.5706 11.2618-.0997 9.2146.0121h-.1137C4.2103.347.1159 4.368.0022 9.2827-.1115 14.644 4.2102 19 9.6696 19h.1137c1.8197 0 3.6395-.6702 5.118-1.787l8.4163-6.255c.9099-.8935.9099-2.2338 0-3.0157z'/%3E%3Cpath id='b' d='M23.3176 7.9423l-8.4163-6.1432C13.1953.5706 11.2618-.0997 9.2146.0121h-.1137C4.2103.347.1159 4.368.0022 9.2827-.1115 14.644 4.2102 19 9.6696 19h.1137c1.8197 0 3.6395-.6702 5.118-1.787l8.4163-6.255c.9099-.8935.9099-2.2338 0-3.0157z'/%3E%3C/defs%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath fill='%23FFF' fill-rule='nonzero' stroke='%2395588A' d='M24.3176 8.9423l-8.4163-6.1432c-1.706-1.2285-3.6395-1.8988-5.6867-1.787h-.1137c-4.8906.335-8.985 4.356-9.0987 9.2706C.8885 15.644 5.2102 20 10.6696 20h.1137c1.8197 0 3.6395-.6702 5.118-1.787l8.4163-6.255c.9099-.8935.9099-2.2338 0-3.0157z'/%3E%3Cpath stroke='%23B8B8B8' d='M9 6v9m3-9v9'/%3E%3Cg fill-rule='nonzero' transform='translate(1 22)'%3E%3Cuse fill='%23F8F3F7' stroke='%23FFF' stroke-opacity='.75' stroke-width='3' xlink:href='%23a'/%3E%3Cuse stroke='%2395588A' xlink:href='%23a'/%3E%3C/g%3E%3Cpath stroke='%2395588A' d='M9 27v9m3-9v9'/%3E%3Cg%3E%3Cpath fill='%23FFF' fill-rule='nonzero' stroke='%2395588A' d='M27.6824 8.9423l8.4163-6.1432c1.706-1.2285 3.6395-1.8988 5.6867-1.787h.1137c4.8906.335 8.985 4.356 9.0987 9.2706C51.1115 15.644 46.7898 20 41.3304 20h-.1137c-1.8197 0-3.6395-.6702-5.118-1.787l-8.4163-6.255c-.9099-.8935-.9099-2.2338 0-3.0157z'/%3E%3Cpath stroke='%23B8B8B8' d='M43 6v9m-3-9v9'/%3E%3C/g%3E%3Cg%3E%3Cg fill-rule='nonzero' transform='matrix(-1 0 0 1 51 22)'%3E%3Cuse fill='%23F8F3F7' stroke='%23FFF' stroke-opacity='.75' stroke-width='3' xlink:href='%23b'/%3E%3Cuse stroke='%2395588A' xlink:href='%23b'/%3E%3C/g%3E%3Cpath stroke='%2395588A' d='M43 27v9m-3-9v9'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
15
  transition: transform .2s ease-in-out;
16
  -webkit-appearance: none;
17
  -moz-appearance: none;
@@ -49,46 +49,6 @@
49
  .wc-block-components-price-slider {
50
  margin-bottom: $gap-large;
51
 
52
- .wc-block-components-price-slider__range-input-wrapper {
53
- @include reset;
54
- height: 9px;
55
- clear: both;
56
- position: relative;
57
- box-shadow: 0 0 0 1px inset rgba(0, 0, 0, 0.1);
58
- background: #e1e1e1;
59
- margin: 15px 0;
60
-
61
- .wc-block-components-price-slider__range-input-progress {
62
- height: 9px;
63
- width: 100%;
64
- position: absolute;
65
- left: 0;
66
- top: 0;
67
- --track-background: linear-gradient(to right, transparent var(--low), var(--range-color) 0, var(--range-color) var(--high), transparent 0) no-repeat 0 100% / 100% 100%;
68
- --range-color: #a8739d;
69
- /*rtl:ignore*/
70
- background: var(--track-background);
71
- }
72
- }
73
-
74
- .wc-block-components-price-slider__controls {
75
- display: flex;
76
-
77
- .wc-block-components-price-slider__amount {
78
- margin: 0;
79
- border-radius: 4px;
80
- width: auto;
81
- max-width: 100px;
82
- min-width: 0;
83
-
84
- &.wc-block-components-price-slider__amount--min {
85
- margin-right: 10px;
86
- }
87
- &.wc-block-components-price-slider__amount--max {
88
- margin-left: auto;
89
- }
90
- }
91
- }
92
  &.wc-block-components-price-slider--has-filter-button {
93
  .wc-block-components-price-slider__controls {
94
  justify-content: flex-end;
@@ -99,184 +59,221 @@
99
  }
100
  }
101
  }
102
- .wc-block-components-price-slider__range-input {
103
- @include reset;
104
- width: 100%;
105
- height: 0;
106
- display: block;
107
- position: relative;
108
- pointer-events: none;
109
- outline: none !important;
110
 
111
- &::-webkit-slider-runnable-track {
112
- @include track;
113
- }
114
- &::-webkit-slider-thumb {
115
- @include thumb;
116
- margin: -6px 0 0 0;
 
117
  }
118
- &::-webkit-slider-progress {
119
- @include reset;
 
 
 
 
 
120
  }
 
 
121
 
122
- &::-moz-focus-outer {
123
- border: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  }
125
- &::-moz-range-track {
126
- @include track;
127
  }
128
- &::-moz-range-progress {
129
- @include reset;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  }
131
  &::-moz-range-thumb {
132
- @include thumb;
133
  }
134
-
135
  &::-ms-thumb {
136
- @include thumb;
137
- }
138
-
139
- &:focus {
140
- &::-webkit-slider-thumb {
141
- @include thumbFocus;
142
- }
143
- &::-moz-range-thumb {
144
- @include thumbFocus;
145
- }
146
- &::-ms-thumb {
147
- @include thumbFocus;
148
- }
149
  }
 
150
 
151
- &.wc-block-components-price-slider__range-input--min {
152
- z-index: 21;
153
 
154
- &::-webkit-slider-thumb {
155
- margin-left: -2px;
156
- background-position-x: left;
157
- }
158
- &::-moz-range-thumb {
159
- background-position-x: left;
160
- transform: translate(-2px, 4px);
161
- }
162
- &::-ms-thumb {
163
- background-position-x: left;
164
- }
165
  }
166
-
167
- &.wc-block-components-price-slider__range-input--max {
168
- z-index: 20;
169
-
170
- &::-webkit-slider-thumb {
171
- background-position-x: right;
172
- margin-left: 2px;
173
- }
174
- &::-moz-range-thumb {
175
- background-position-x: right;
176
- transform: translate(2px, 4px);
177
- }
178
- &::-ms-thumb {
179
- background-position-x: right;
180
- }
181
  }
182
- }
183
-
184
- &.is-loading,
185
- &.is-disabled {
186
- .wc-block-components-price-slider__range-input-wrapper,
187
- .wc-block-components-price-slider__amount,
188
- .wc-block-components-price-slider__button {
189
- @include placeholder();
190
- box-shadow: none;
191
  }
192
  }
193
 
194
- &.is-disabled:not(.is-loading) {
195
- .wc-block-components-price-slider__range-input-wrapper,
196
- .wc-block-components-price-slider__amount,
197
- .wc-block-components-price-slider__button {
198
- animation: none;
 
 
 
 
 
 
 
 
199
  }
200
  }
201
  }
202
 
203
  .rtl {
204
- .wc-block-components-price-slider .wc-block-components-price-slider__range-input-wrapper .wc-block-components-price-slider__range-input-progress {
205
  --track-background: linear-gradient(to left, transparent var(--low), var(--range-color) 0, var(--range-color) var(--high), transparent 0) no-repeat 0 100% / 100% 100%;
206
- --range-color: #a8739d;
207
  background: var(--track-background);
208
  }
209
  }
210
 
211
  @mixin ie {
212
- .wc-block-components-price-slider {
213
- .wc-block-components-price-slider__range-input-wrapper {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  background: transparent;
215
- box-shadow: none;
216
- height: 24px;
217
 
218
- .wc-block-components-price-slider__range-input-progress {
219
- background: #a8739d;
220
- box-shadow: 0 0 0 1px inset #95588a;
221
- width: 100%;
222
- top: 7px;
223
- }
224
  }
225
- .wc-block-components-price-slider__range-input {
226
- height: 24px;
 
 
 
 
 
 
 
 
 
 
227
  pointer-events: auto;
228
- position: absolute;
229
- left: 0;
230
- top: 0;
231
-
232
- &::-ms-track {
233
- /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
234
- background: transparent;
235
-
236
- /*leave room for the larger thumb to overflow with a transparent border */
237
- border-color: transparent;
238
- border-width: 7px 0;
239
-
240
- /*remove default tick marks*/
241
- color: transparent;
242
- }
243
- &::-ms-fill-lower {
244
- background: #e1e1e1;
245
- box-shadow: 0 0 0 1px inset #b8b8b8;
246
- }
247
- &::-ms-fill-upper {
248
- background: transparent;
249
- }
250
- &::-ms-tooltip {
251
- display: none;
252
- }
253
- &::-ms-thumb {
254
- transform: translate(1px, 0);
255
- pointer-events: auto;
256
- }
257
  }
258
- .wc-block-components-price-slider__range-input--max {
259
- &::-ms-fill-upper {
260
- background: #e1e1e1;
261
- box-shadow: 0 0 0 1px inset #b8b8b8;
262
- }
263
- &::-ms-fill-lower {
264
- background: transparent;
265
- }
266
  }
 
267
 
268
- &.is-loading,
269
- &.is-disabled {
270
- .wc-block-components-price-slider__range-input-wrapper {
271
- @include placeholder();
272
- box-shadow: none;
273
- }
274
  }
 
275
 
276
- &.is-disabled:not(.is-loading) {
277
- .wc-block-components-price-slider__range-input-wrapper {
278
- animation: none;
279
- }
280
  }
281
  }
282
  }
11
  cursor: pointer;
12
  z-index: 20;
13
  pointer-events: auto;
14
+ background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='52' height='42'%3E%3Cdefs%3E%3Cpath id='a' d='M23.3176 7.9423l-8.4163-6.1432C13.1953.5706 11.2618-.0997 9.2146.0121h-.1137C4.2103.347.1159 4.368.0022 9.2827-.1115 14.644 4.2102 19 9.6696 19h.1137c1.8197 0 3.6395-.6702 5.118-1.787l8.4163-6.255c.9099-.8935.9099-2.2338 0-3.0157z'/%3E%3Cpath id='b' d='M23.3176 7.9423l-8.4163-6.1432C13.1953.5706 11.2618-.0997 9.2146.0121h-.1137C4.2103.347.1159 4.368.0022 9.2827-.1115 14.644 4.2102 19 9.6696 19h.1137c1.8197 0 3.6395-.6702 5.118-1.787l8.4163-6.255c.9099-.8935.9099-2.2338 0-3.0157z'/%3E%3C/defs%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath fill='%23FFF' fill-rule='nonzero' stroke='#{encode-color($gray-700)}' d='M24.3176 8.9423l-8.4163-6.1432c-1.706-1.2285-3.6395-1.8988-5.6867-1.787h-.1137c-4.8906.335-8.985 4.356-9.0987 9.2706C.8885 15.644 5.2102 20 10.6696 20h.1137c1.8197 0 3.6395-.6702 5.118-1.787l8.4163-6.255c.9099-.8935.9099-2.2338 0-3.0157z'/%3E%3Cpath stroke='%23B8B8B8' d='M9 6v9m3-9v9'/%3E%3Cg fill-rule='nonzero' transform='translate(1 22)'%3E%3Cuse fill='%23F8F3F7' stroke='%23FFF' stroke-opacity='.75' stroke-width='3' xlink:href='%23a'/%3E%3Cuse stroke='#{encode-color($gray-700)}' xlink:href='%23a'/%3E%3C/g%3E%3Cpath stroke='#{encode-color($gray-700)}' d='M9 27v9m3-9v9'/%3E%3Cg%3E%3Cpath fill='%23FFF' fill-rule='nonzero' stroke='#{encode-color($gray-700)}' d='M27.6824 8.9423l8.4163-6.1432c1.706-1.2285 3.6395-1.8988 5.6867-1.787h.1137c4.8906.335 8.985 4.356 9.0987 9.2706C51.1115 15.644 46.7898 20 41.3304 20h-.1137c-1.8197 0-3.6395-.6702-5.118-1.787l-8.4163-6.255c-.9099-.8935-.9099-2.2338 0-3.0157z'/%3E%3Cpath stroke='%23B8B8B8' d='M43 6v9m-3-9v9'/%3E%3C/g%3E%3Cg%3E%3Cg fill-rule='nonzero' transform='matrix(-1 0 0 1 51 22)'%3E%3Cuse fill='%23F8F3F7' stroke='%23FFF' stroke-opacity='.75' stroke-width='3' xlink:href='%23b'/%3E%3Cuse stroke='#{encode-color($gray-700)}' xlink:href='%23b'/%3E%3C/g%3E%3Cpath stroke='#{encode-color($gray-700)}' d='M43 27v9m-3-9v9'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
15
  transition: transform .2s ease-in-out;
16
  -webkit-appearance: none;
17
  -moz-appearance: none;
49
  .wc-block-components-price-slider {
50
  margin-bottom: $gap-large;
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  &.wc-block-components-price-slider--has-filter-button {
53
  .wc-block-components-price-slider__controls {
54
  justify-content: flex-end;
59
  }
60
  }
61
  }
 
 
 
 
 
 
 
 
62
 
63
+ &.is-loading,
64
+ &.is-disabled {
65
+ .wc-block-components-price-slider__range-input-wrapper,
66
+ .wc-block-components-price-slider__amount,
67
+ .wc-block-components-price-slider__button {
68
+ @include placeholder();
69
+ box-shadow: none;
70
  }
71
+ }
72
+
73
+ &.is-disabled:not(.is-loading) {
74
+ .wc-block-components-price-slider__range-input-wrapper,
75
+ .wc-block-components-price-slider__amount,
76
+ .wc-block-components-price-slider__button {
77
+ animation: none;
78
  }
79
+ }
80
+ }
81
 
82
+ .wc-block-components-price-slider__range-input-wrapper {
83
+ @include reset;
84
+ height: 9px;
85
+ clear: both;
86
+ position: relative;
87
+ box-shadow: 0 0 0 1px inset rgba(0, 0, 0, 0.1);
88
+ background: #e1e1e1;
89
+ margin: 15px 0;
90
+ }
91
+
92
+ .wc-block-components-price-slider__range-input-progress {
93
+ height: 9px;
94
+ width: 100%;
95
+ position: absolute;
96
+ left: 0;
97
+ top: 0;
98
+ --track-background: linear-gradient(to right, transparent var(--low), var(--range-color) 0, var(--range-color) var(--high), transparent 0) no-repeat 0 100% / 100% 100%;
99
+ --range-color: #{$studio-woocommerce-purple-30};
100
+ /*rtl:ignore*/
101
+ background: var(--track-background);
102
+ }
103
+
104
+ .wc-block-components-price-slider__controls {
105
+ display: flex;
106
+
107
+ .wc-block-components-price-slider__amount {
108
+ margin: 0;
109
+ border-radius: 4px;
110
+ width: auto;
111
+ max-width: 100px;
112
+ min-width: 0;
113
+
114
+ &.wc-block-components-price-slider__amount--min {
115
+ margin-right: 10px;
116
  }
117
+ &.wc-block-components-price-slider__amount--max {
118
+ margin-left: auto;
119
  }
120
+ }
121
+ }
122
+ .wc-block-components-price-slider__range-input {
123
+ @include reset;
124
+ width: 100%;
125
+ height: 0;
126
+ display: block;
127
+ position: relative;
128
+ pointer-events: none;
129
+ outline: none !important;
130
+
131
+ &::-webkit-slider-runnable-track {
132
+ @include track;
133
+ }
134
+ &::-webkit-slider-thumb {
135
+ @include thumb;
136
+ margin: -6px 0 0 0;
137
+ }
138
+ &::-webkit-slider-progress {
139
+ @include reset;
140
+ }
141
+
142
+ &::-moz-focus-outer {
143
+ border: 0;
144
+ }
145
+ &::-moz-range-track {
146
+ @include track;
147
+ }
148
+ &::-moz-range-progress {
149
+ @include reset;
150
+ }
151
+ &::-moz-range-thumb {
152
+ @include thumb;
153
+ }
154
+
155
+ &::-ms-thumb {
156
+ @include thumb;
157
+ }
158
+
159
+ &:focus {
160
+ &::-webkit-slider-thumb {
161
+ @include thumbFocus;
162
  }
163
  &::-moz-range-thumb {
164
+ @include thumbFocus;
165
  }
 
166
  &::-ms-thumb {
167
+ @include thumbFocus;
 
 
 
 
 
 
 
 
 
 
 
 
168
  }
169
+ }
170
 
171
+ &.wc-block-components-price-slider__range-input--min {
172
+ z-index: 21;
173
 
174
+ &::-webkit-slider-thumb {
175
+ margin-left: -2px;
176
+ background-position-x: left;
 
 
 
 
 
 
 
 
177
  }
178
+ &::-moz-range-thumb {
179
+ background-position-x: left;
180
+ transform: translate(-2px, 4px);
 
 
 
 
 
 
 
 
 
 
 
 
181
  }
182
+ &::-ms-thumb {
183
+ background-position-x: left;
 
 
 
 
 
 
 
184
  }
185
  }
186
 
187
+ &.wc-block-components-price-slider__range-input--max {
188
+ z-index: 20;
189
+
190
+ &::-webkit-slider-thumb {
191
+ background-position-x: right;
192
+ margin-left: 2px;
193
+ }
194
+ &::-moz-range-thumb {
195
+ background-position-x: right;
196
+ transform: translate(2px, 4px);
197
+ }
198
+ &::-ms-thumb {
199
+ background-position-x: right;
200
  }
201
  }
202
  }
203
 
204
  .rtl {
205
+ .wc-block-components-price-slider__range-input-progress {
206
  --track-background: linear-gradient(to left, transparent var(--low), var(--range-color) 0, var(--range-color) var(--high), transparent 0) no-repeat 0 100% / 100% 100%;
207
+ --range-color: #{$studio-woocommerce-purple-30};
208
  background: var(--track-background);
209
  }
210
  }
211
 
212
  @mixin ie {
213
+ .wc-block-components-price-slider__range-input-wrapper {
214
+ background: transparent;
215
+ box-shadow: none;
216
+ height: 24px;
217
+ }
218
+ .wc-block-components-price-slider__range-input-progress {
219
+ background: #{$studio-woocommerce-purple-30};
220
+ width: 100%;
221
+ top: 7px;
222
+ }
223
+ .wc-block-components-price-slider__range-input {
224
+ height: 24px;
225
+ pointer-events: auto;
226
+ position: absolute;
227
+ left: 0;
228
+ top: 0;
229
+
230
+ &::-ms-track {
231
+ /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
232
  background: transparent;
 
 
233
 
234
+ /*leave room for the larger thumb to overflow with a transparent border */
235
+ border-color: transparent;
236
+ border-width: 7px 0;
237
+
238
+ /*remove default tick marks*/
239
+ color: transparent;
240
  }
241
+ &::-ms-fill-lower {
242
+ background: #e1e1e1;
243
+ box-shadow: 0 0 0 1px inset #b8b8b8;
244
+ }
245
+ &::-ms-fill-upper {
246
+ background: transparent;
247
+ }
248
+ &::-ms-tooltip {
249
+ display: none;
250
+ }
251
+ &::-ms-thumb {
252
+ transform: translate(1px, 0);
253
  pointer-events: auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  }
255
+ }
256
+ .wc-block-components-price-slider__range-input--max {
257
+ &::-ms-fill-upper {
258
+ background: #e1e1e1;
259
+ box-shadow: 0 0 0 1px inset #b8b8b8;
260
+ }
261
+ &::-ms-fill-lower {
262
+ background: transparent;
263
  }
264
+ }
265
 
266
+ &.is-loading,
267
+ &.is-disabled {
268
+ .wc-block-components-price-slider__range-input-wrapper {
269
+ @include placeholder();
270
+ box-shadow: none;
 
271
  }
272
+ }
273
 
274
+ &.is-disabled:not(.is-loading) {
275
+ .wc-block-components-price-slider__range-input-wrapper {
276
+ animation: none;
 
277
  }
278
  }
279
  }
assets/js/base/components/product-list/index.js CHANGED
@@ -70,7 +70,7 @@ const generateQuery = ( { sortValue, currentPage, attributes } ) => {
70
  const extractPaginationAndSortAttributes = ( query ) => {
71
  /* eslint-disable-next-line no-unused-vars, camelcase */
72
  const { order, orderby, page, per_page, ...totalQuery } = query;
73
- return totalQuery;
74
  };
75
 
76
  const announceLoadingCompletion = ( totalProducts ) => {
@@ -96,6 +96,11 @@ const announceLoadingCompletion = ( totalProducts ) => {
96
  }
97
  };
98
 
 
 
 
 
 
99
  const ProductList = ( {
100
  attributes,
101
  currentPage,
@@ -129,28 +134,27 @@ const ProductList = ( {
129
  // the total number of products is a finite number.
130
  const previousQueryTotals = usePrevious(
131
  { totalQuery, totalProducts },
132
- (
133
- { totalQuery: nextQuery, totalProducts: nextProducts },
134
- { totalQuery: currentQuery } = {}
135
- ) =>
136
- ! isEqual( nextQuery, currentQuery ) &&
137
- Number.isFinite( nextProducts )
138
  );
139
- const isPreviousTotalQueryEqual =
140
- typeof previousQueryTotals === 'object' &&
141
- isEqual( totalQuery, previousQueryTotals.totalQuery );
142
  useEffect( () => {
143
- // If query state (excluding pagination/sorting attributes) changed,
144
- // reset pagination to the first page.
145
- if ( ! isPreviousTotalQueryEqual ) {
146
- onPageChange( 1 );
147
-
148
- // Make sure there was a previous query, so we don't announce it on page load.
149
- if ( previousQueryTotals ) {
150
- announceLoadingCompletion( totalProducts );
151
- }
152
  }
153
- }, [ queryState ] );
 
 
 
 
 
154
 
155
  const onPaginationChange = ( newPage ) => {
156
  scrollToTop( { focusableSelector: 'a, button' } );
@@ -175,7 +179,9 @@ const ProductList = ( {
175
  const { contentVisibility } = attributes;
176
  const perPage = attributes.columns * attributes.rows;
177
  const totalPages =
178
- ! Number.isFinite( totalProducts ) && isPreviousTotalQueryEqual
 
 
179
  ? Math.ceil( previousQueryTotals.totalProducts / perPage )
180
  : Math.ceil( totalProducts / perPage );
181
  const listProducts = products.length
70
  const extractPaginationAndSortAttributes = ( query ) => {
71
  /* eslint-disable-next-line no-unused-vars, camelcase */
72
  const { order, orderby, page, per_page, ...totalQuery } = query;
73
+ return totalQuery || {};
74
  };
75
 
76
  const announceLoadingCompletion = ( totalProducts ) => {
96
  }
97
  };
98
 
99
+ const areQueryTotalsDifferent = (
100
+ { totalQuery: nextQuery, totalProducts: nextProducts },
101
+ { totalQuery: currentQuery } = {}
102
+ ) => ! isEqual( nextQuery, currentQuery ) && Number.isFinite( nextProducts );
103
+
104
  const ProductList = ( {
105
  attributes,
106
  currentPage,
134
  // the total number of products is a finite number.
135
  const previousQueryTotals = usePrevious(
136
  { totalQuery, totalProducts },
137
+ areQueryTotalsDifferent
 
 
 
 
 
138
  );
139
+
140
+ // If query state (excluding pagination/sorting attributes) changed,
141
+ // reset pagination to the first page.
142
  useEffect( () => {
143
+ if ( isEqual( totalQuery, previousQueryTotals?.totalQuery ) ) {
144
+ return;
145
+ }
146
+ onPageChange( 1 );
147
+
148
+ // Make sure there was a previous query, so we don't announce it on page load.
149
+ if ( previousQueryTotals?.totalQuery ) {
150
+ announceLoadingCompletion( totalProducts );
 
151
  }
152
+ }, [
153
+ previousQueryTotals?.totalQuery,
154
+ totalProducts,
155
+ onPageChange,
156
+ totalQuery,
157
+ ] );
158
 
159
  const onPaginationChange = ( newPage ) => {
160
  scrollToTop( { focusableSelector: 'a, button' } );
179
  const { contentVisibility } = attributes;
180
  const perPage = attributes.columns * attributes.rows;
181
  const totalPages =
182
+ ! Number.isFinite( totalProducts ) &&
183
+ Number.isFinite( previousQueryTotals?.totalProducts ) &&
184
+ isEqual( totalQuery, previousQueryTotals?.totalQuery )
185
  ? Math.ceil( previousQueryTotals.totalProducts / perPage )
186
  : Math.ceil( totalProducts / perPage );
187
  const listProducts = products.length
assets/js/base/components/quantity-selector/style.scss CHANGED
@@ -6,14 +6,14 @@
6
  box-shadow: none;
7
 
8
  &:focus {
9
- outline: 2px solid $core-grey-light-600;
10
  }
11
  }
12
 
13
  .wc-block-components-quantity-selector {
14
  display: flex;
15
  min-width: 100px;
16
- border: 1px solid $core-grey-light-600;
17
  background: #fff;
18
  border-radius: 4px;
19
  // needed so that buttons fill the container.
@@ -42,11 +42,11 @@
42
  -moz-appearance: textfield;
43
 
44
  &:focus {
45
- background: $core-grey-light-200;
46
- outline: 1px solid $core-grey-light-600;
47
  }
48
  &:disabled {
49
- color: $core-grey-dark-100;
50
  }
51
 
52
  .has-dark-controls & {
@@ -71,17 +71,17 @@
71
  @include font-size(regular);
72
  min-width: 30px;
73
  cursor: pointer;
74
- color: $core-grey-dark-700;
75
  font-style: normal;
76
  text-align: center;
77
 
78
  &:hover,
79
  &:focus {
80
  @include reset-button;
81
- color: $core-grey-dark-900;
82
  }
83
  &:disabled {
84
- color: $core-grey-dark-100;
85
  cursor: default;
86
  @include reset-button;
87
  }
6
  box-shadow: none;
7
 
8
  &:focus {
9
+ outline: 2px solid $gray-300;
10
  }
11
  }
12
 
13
  .wc-block-components-quantity-selector {
14
  display: flex;
15
  min-width: 100px;
16
+ border: 1px solid $gray-300;
17
  background: #fff;
18
  border-radius: 4px;
19
  // needed so that buttons fill the container.
42
  -moz-appearance: textfield;
43
 
44
  &:focus {
45
+ background: $gray-100;
46
+ outline: 1px solid $gray-300;
47
  }
48
  &:disabled {
49
+ color: $gray-600;
50
  }
51
 
52
  .has-dark-controls & {
71
  @include font-size(regular);
72
  min-width: 30px;
73
  cursor: pointer;
74
+ color: $gray-900;
75
  font-style: normal;
76
  text-align: center;
77
 
78
  &:hover,
79
  &:focus {
80
  @include reset-button;
81
+ color: $gray-900;
82
  }
83
  &:disabled {
84
+ color: $gray-600;
85
  cursor: default;
86
  @include reset-button;
87
  }
assets/js/base/components/select/style.scss CHANGED
@@ -10,7 +10,7 @@
10
  transform: translateY(0.75em);
11
  transform-origin: top left;
12
  transition: all 200ms ease;
13
- color: $gray-50;
14
  z-index: 1;
15
  margin: 0 0 0 #{$gap + 1px};
16
  overflow: hidden;
@@ -36,17 +36,17 @@
36
  &:hover,
37
  &:focus,
38
  &:active {
39
- border-color: $error-red;
40
  }
41
  &:focus {
42
- outline: 1px dotted $error-red;
43
  outline-offset: 2px;
44
  }
45
  }
46
  }
47
 
48
  &.has-error label {
49
- color: $error-red;
50
  }
51
 
52
  .components-custom-select-control__button {
10
  transform: translateY(0.75em);
11
  transform-origin: top left;
12
  transition: all 200ms ease;
13
+ color: $gray-700;
14
  z-index: 1;
15
  margin: 0 0 0 #{$gap + 1px};
16
  overflow: hidden;
36
  &:hover,
37
  &:focus,
38
  &:active {
39
+ border-color: $alert-red;
40
  }
41
  &:focus {
42
+ outline: 1px dotted $alert-red;
43
  outline-offset: 2px;
44
  }
45
  }
46
  }
47
 
48
  &.has-error label {
49
+ color: $alert-red;
50
  }
51
 
52
  .components-custom-select-control__button {
assets/js/base/components/select/validated.js CHANGED
@@ -41,7 +41,7 @@ const ValidatedSelect = ( {
41
  clearValidationError,
42
  } = useValidationContext();
43
 
44
- const validateSelect = () => {
45
  if ( ! required || currentValue ) {
46
  clearValidationError( errorId );
47
  } else {
@@ -52,18 +52,21 @@ const ValidatedSelect = ( {
52
  },
53
  } );
54
  }
55
- };
56
-
57
- useEffect( () => {
58
- validateSelect();
59
- }, [ currentValue ] );
 
 
 
60
 
61
  // Remove validation errors when unmounted.
62
  useEffect( () => {
63
  return () => {
64
  clearValidationError( errorId );
65
  };
66
- }, [ errorId ] );
67
 
68
  const error = getValidationError( errorId ) || {};
69
 
41
  clearValidationError,
42
  } = useValidationContext();
43
 
44
+ useEffect( () => {
45
  if ( ! required || currentValue ) {
46
  clearValidationError( errorId );
47
  } else {
52
  },
53
  } );
54
  }
55
+ }, [
56
+ clearValidationError,
57
+ currentValue,
58
+ errorId,
59
+ errorMessage,
60
+ required,
61
+ setValidationErrors,
62
+ ] );
63
 
64
  // Remove validation errors when unmounted.
65
  useEffect( () => {
66
  return () => {
67
  clearValidationError( errorId );
68
  };
69
+ }, [ clearValidationError, errorId ] );
70
 
71
  const error = getValidationError( errorId ) || {};
72
 
assets/js/base/components/text-input/style.scss CHANGED
@@ -12,7 +12,7 @@
12
  top: 0;
13
  transform-origin: top left;
14
  line-height: 1.375; // =22px when font-size is 16px.
15
- color: $gray-50;
16
  transition: transform 200ms ease;
17
  margin: 0 0 0 #{$gap + 1px};
18
  overflow: hidden;
@@ -76,16 +76,16 @@
76
  &:hover,
77
  &:focus,
78
  &:active {
79
- border-color: $error-red;
80
  }
81
  &:focus {
82
- outline: 1px dotted $error-red;
83
  outline-offset: 2px;
84
  }
85
  }
86
 
87
  &.has-error label {
88
- color: $error-red;
89
  }
90
 
91
  &:only-child {
12
  top: 0;
13
  transform-origin: top left;
14
  line-height: 1.375; // =22px when font-size is 16px.
15
+ color: $gray-700;
16
  transition: transform 200ms ease;
17
  margin: 0 0 0 #{$gap + 1px};
18
  overflow: hidden;
76
  &:hover,
77
  &:focus,
78
  &:active {
79
+ border-color: $alert-red;
80
  }
81
  &:focus {
82
+ outline: 1px dotted $alert-red;
83
  outline-offset: 2px;
84
  }
85
  }
86
 
87
  &.has-error label {
88
+ color: $alert-red;
89
  }
90
 
91
  &:only-child {
assets/js/base/components/text-input/validated.js CHANGED
@@ -2,7 +2,7 @@
2
  * External dependencies
3
  */
4
  import { __ } from '@wordpress/i18n';
5
- import { useRef, useEffect } from 'react';
6
  import PropTypes from 'prop-types';
7
  import classnames from 'classnames';
8
  import { useValidationContext } from '@woocommerce/base-context';
@@ -27,6 +27,7 @@ const ValidatedTextInput = ( {
27
  showError = true,
28
  ...rest
29
  } ) => {
 
30
  const inputRef = useRef();
31
  const {
32
  getValidationError,
@@ -39,39 +40,51 @@ const ValidatedTextInput = ( {
39
  const textInputId = id || 'textinput-' + instanceId;
40
  errorId = errorId || textInputId;
41
 
42
- const validateInput = ( errorsHidden = true ) => {
43
- if ( inputRef.current.checkValidity() ) {
44
- clearValidationError( errorId );
45
- } else {
46
- setValidationErrors( {
47
- [ errorId ]: {
48
- message:
49
- inputRef.current.validationMessage ||
50
- __( 'Invalid value.', 'woo-gutenberg-products-block' ),
51
- hidden: errorsHidden,
52
- },
53
- } );
54
- }
55
- };
 
 
 
 
 
 
56
 
57
  useEffect( () => {
58
- if ( focusOnMount ) {
59
- inputRef.current.focus();
 
 
 
60
  }
61
- }, [ focusOnMount ] );
62
 
63
  useEffect( () => {
64
- if ( validateOnMount ) {
65
- validateInput();
 
 
 
66
  }
67
- }, [ validateOnMount ] );
68
 
69
  // Remove validation errors when unmounted.
70
  useEffect( () => {
71
  return () => {
72
  clearValidationError( errorId );
73
  };
74
- }, [ errorId ] );
75
 
76
  const errorMessage = getValidationError( errorId ) || {};
77
  const hasError = errorMessage.message && ! errorMessage.hidden;
2
  * External dependencies
3
  */
4
  import { __ } from '@wordpress/i18n';
5
+ import { useCallback, useRef, useEffect, useState } from 'react';
6
  import PropTypes from 'prop-types';
7
  import classnames from 'classnames';
8
  import { useValidationContext } from '@woocommerce/base-context';
27
  showError = true,
28
  ...rest
29
  } ) => {
30
+ const [ isPristine, setIsPristine ] = useState( true );
31
  const inputRef = useRef();
32
  const {
33
  getValidationError,
40
  const textInputId = id || 'textinput-' + instanceId;
41
  errorId = errorId || textInputId;
42
 
43
+ const validateInput = useCallback(
44
+ ( errorsHidden = true ) => {
45
+ if ( inputRef.current.checkValidity() ) {
46
+ clearValidationError( errorId );
47
+ } else {
48
+ setValidationErrors( {
49
+ [ errorId ]: {
50
+ message:
51
+ inputRef.current.validationMessage ||
52
+ __(
53
+ 'Invalid value.',
54
+ 'woo-gutenberg-products-block'
55
+ ),
56
+ hidden: errorsHidden,
57
+ },
58
+ } );
59
+ }
60
+ },
61
+ [ clearValidationError, errorId, setValidationErrors ]
62
+ );
63
 
64
  useEffect( () => {
65
+ if ( isPristine ) {
66
+ if ( focusOnMount ) {
67
+ inputRef.current.focus();
68
+ }
69
+ setIsPristine( false );
70
  }
71
+ }, [ focusOnMount, isPristine, setIsPristine ] );
72
 
73
  useEffect( () => {
74
+ if ( isPristine ) {
75
+ if ( validateOnMount ) {
76
+ validateInput();
77
+ }
78
+ setIsPristine( false );
79
  }
80
+ }, [ isPristine, setIsPristine, validateOnMount, validateInput ] );
81
 
82
  // Remove validation errors when unmounted.
83
  useEffect( () => {
84
  return () => {
85
  clearValidationError( errorId );
86
  };
87
+ }, [ clearValidationError, errorId ] );
88
 
89
  const errorMessage = getValidationError( errorId ) || {};
90
  const hasError = errorMessage.message && ! errorMessage.hidden;
assets/js/base/components/validation/style.scss CHANGED
@@ -1,6 +1,6 @@
1
  .wc-block-components-validation-error {
2
  @include font-size(smaller);
3
- color: $error-red;
4
  max-width: 100%;
5
  position: absolute;
6
  top: calc(100% - 1px);
1
  .wc-block-components-validation-error {
2
  @include font-size(smaller);
3
+ color: $alert-red;
4
  max-width: 100%;
5
  position: absolute;
6
  top: calc(100% - 1px);
assets/js/base/context/cart-checkout/checkout-state/index.js CHANGED
@@ -11,7 +11,12 @@ import {
11
  useCallback,
12
  } from '@wordpress/element';
13
  import { __ } from '@wordpress/i18n';
14
- import { useStoreNotices, useEmitResponse } from '@woocommerce/base-hooks';
 
 
 
 
 
15
 
16
  /**
17
  * Internal dependencies
@@ -103,6 +108,11 @@ export const CheckoutStateProvider = ( {
103
  isFailResponse,
104
  shouldRetry,
105
  } = useEmitResponse();
 
 
 
 
 
106
 
107
  // set observers on ref so it's always current.
108
  useEffect( () => {
@@ -210,7 +220,16 @@ export const CheckoutStateProvider = ( {
210
  dispatch,
211
  ] );
212
 
 
 
 
213
  useEffect( () => {
 
 
 
 
 
 
214
  if ( checkoutState.status === STATUS.AFTER_PROCESSING ) {
215
  const data = {
216
  redirectUrl: checkoutState.redirectUrl,
@@ -244,17 +263,30 @@ export const CheckoutStateProvider = ( {
244
  dispatch( actions.setIdle() );
245
  }
246
  } else {
247
- // no error handling in place by anything so let's fall
248
- // back to default
249
- const message =
250
- data.processingResponse?.message ||
251
- __(
252
- 'Something went wrong. Please contact us to get assistance.',
253
- 'woo-gutenberg-products-block'
 
 
254
  );
255
- addErrorNotice( message, {
256
- id: 'checkout',
257
- } );
 
 
 
 
 
 
 
 
 
 
 
258
  dispatch( actions.setIdle() );
259
  }
260
  } );
@@ -280,7 +312,7 @@ export const CheckoutStateProvider = ( {
280
  dispatch( actions.setComplete( response ) );
281
  } else {
282
  // this will set an error which will end up
283
- // triggering the onCheckoutAfterProcessingWithErrors emitter.
284
  // and then setting checkout to IDLE state.
285
  dispatch( actions.setHasError( true ) );
286
  }
@@ -300,11 +332,17 @@ export const CheckoutStateProvider = ( {
300
  checkoutState.customerId,
301
  checkoutState.customerNote,
302
  checkoutState.processingResponse,
 
 
303
  dispatchActions,
304
  addErrorNotice,
305
  isErrorResponse,
306
  isFailResponse,
307
  isSuccessResponse,
 
 
 
 
308
  ] );
309
 
310
  const onSubmit = useCallback( () => {
11
  useCallback,
12
  } from '@wordpress/element';
13
  import { __ } from '@wordpress/i18n';
14
+ import {
15
+ useCheckoutNotices,
16
+ useStoreNotices,
17
+ useEmitResponse,
18
+ usePrevious,
19
+ } from '@woocommerce/base-hooks';
20
 
21
  /**
22
  * Internal dependencies
108
  isFailResponse,
109
  shouldRetry,
110
  } = useEmitResponse();
111
+ const {
112
+ checkoutNotices,
113
+ paymentNotices,
114
+ expressPaymentNotices,
115
+ } = useCheckoutNotices();
116
 
117
  // set observers on ref so it's always current.
118
  useEffect( () => {
220
  dispatch,
221
  ] );
222
 
223
+ const previousStatus = usePrevious( checkoutState.status );
224
+ const previousHasError = usePrevious( checkoutState.hasError );
225
+
226
  useEffect( () => {
227
+ if (
228
+ checkoutState.status === previousStatus &&
229
+ checkoutState.hasError === previousHasError
230
+ ) {
231
+ return;
232
+ }
233
  if ( checkoutState.status === STATUS.AFTER_PROCESSING ) {
234
  const data = {
235
  redirectUrl: checkoutState.redirectUrl,
263
  dispatch( actions.setIdle() );
264
  }
265
  } else {
266
+ const hasErrorNotices =
267
+ checkoutNotices.some(
268
+ ( notice ) => notice.status === 'error'
269
+ ) ||
270
+ expressPaymentNotices.some(
271
+ ( notice ) => notice.status === 'error'
272
+ ) ||
273
+ paymentNotices.some(
274
+ ( notice ) => notice.status === 'error'
275
  );
276
+ if ( ! hasErrorNotices ) {
277
+ // no error handling in place by anything so let's fall
278
+ // back to default
279
+ const message =
280
+ data.processingResponse?.message ||
281
+ __(
282
+ 'Something went wrong. Please contact us to get assistance.',
283
+ 'woo-gutenberg-products-block'
284
+ );
285
+ addErrorNotice( message, {
286
+ id: 'checkout',
287
+ } );
288
+ }
289
+
290
  dispatch( actions.setIdle() );
291
  }
292
  } );
312
  dispatch( actions.setComplete( response ) );
313
  } else {
314
  // this will set an error which will end up
315
+ // triggering the onCheckoutAfterProcessingWithError emitter.
316
  // and then setting checkout to IDLE state.
317
  dispatch( actions.setHasError( true ) );
318
  }
332
  checkoutState.customerId,
333
  checkoutState.customerNote,
334
  checkoutState.processingResponse,
335
+ previousStatus,
336
+ previousHasError,
337
  dispatchActions,
338
  addErrorNotice,
339
  isErrorResponse,
340
  isFailResponse,
341
  isSuccessResponse,
342
+ shouldRetry,
343
+ checkoutNotices,
344
+ expressPaymentNotices,
345
+ paymentNotices,
346
  ] );
347
 
348
  const onSubmit = useCallback( () => {
assets/js/base/hooks/cart/use-store-cart-item-quantity.js CHANGED
@@ -55,6 +55,7 @@ export const useStoreCartItemQuantity = ( cartItem ) => {
55
  },
56
  [ cartItemKey ]
57
  );
 
58
 
59
  const isPendingDelete = useSelect(
60
  ( select ) => {
@@ -67,6 +68,7 @@ export const useStoreCartItemQuantity = ( cartItem ) => {
67
  },
68
  [ cartItemKey ]
69
  );
 
70
 
71
  const removeItem = () => {
72
  return cartItemKey
@@ -78,34 +80,46 @@ export const useStoreCartItemQuantity = ( cartItem ) => {
78
 
79
  // Observe debounced quantity value, fire action to update server on change.
80
  useEffect( () => {
81
- // Don't run it if quantity didn't change but it was set for the first time.
82
- if ( cartItemKey && Number.isFinite( previousDebouncedQuantity ) ) {
 
 
 
83
  changeCartItemQuantity( cartItemKey, debouncedQuantity ).then(
84
  triggerFragmentRefresh
85
  );
86
  }
87
- }, [ debouncedQuantity, cartItemKey ] );
 
 
 
 
 
88
 
89
  useEffect( () => {
90
- if ( isPendingQuantity ) {
91
- dispatchActions.incrementCalculating();
92
- } else {
93
- dispatchActions.decrementCalculating();
 
 
94
  }
95
- }, [ isPendingQuantity ] );
96
 
97
  useEffect( () => {
98
- if ( isPendingDelete ) {
99
- dispatchActions.incrementCalculating();
100
- } else if ( ! isPendingDelete && cartErrors.length ) {
101
- dispatchActions.decrementCalculating();
 
 
102
  }
103
  return () => {
104
  if ( isPendingDelete ) {
105
  dispatchActions.decrementCalculating();
106
  }
107
  };
108
- }, [ isPendingDelete ] );
109
 
110
  return {
111
  isPendingDelete,
55
  },
56
  [ cartItemKey ]
57
  );
58
+ const previousIsPendingQuantity = usePrevious( isPendingQuantity );
59
 
60
  const isPendingDelete = useSelect(
61
  ( select ) => {
68
  },
69
  [ cartItemKey ]
70
  );
71
+ const previousIsPendingDelete = usePrevious( isPendingDelete );
72
 
73
  const removeItem = () => {
74
  return cartItemKey
80
 
81
  // Observe debounced quantity value, fire action to update server on change.
82
  useEffect( () => {
83
+ if (
84
+ cartItemKey &&
85
+ Number.isFinite( previousDebouncedQuantity ) &&
86
+ previousDebouncedQuantity !== debouncedQuantity
87
+ ) {
88
  changeCartItemQuantity( cartItemKey, debouncedQuantity ).then(
89
  triggerFragmentRefresh
90
  );
91
  }
92
+ }, [
93
+ cartItemKey,
94
+ changeCartItemQuantity,
95
+ debouncedQuantity,
96
+ previousDebouncedQuantity,
97
+ ] );
98
 
99
  useEffect( () => {
100
+ if ( previousIsPendingQuantity !== isPendingQuantity ) {
101
+ if ( isPendingQuantity ) {
102
+ dispatchActions.incrementCalculating();
103
+ } else {
104
+ dispatchActions.decrementCalculating();
105
+ }
106
  }
107
+ }, [ dispatchActions, isPendingQuantity, previousIsPendingQuantity ] );
108
 
109
  useEffect( () => {
110
+ if ( previousIsPendingDelete !== isPendingDelete ) {
111
+ if ( isPendingDelete ) {
112
+ dispatchActions.incrementCalculating();
113
+ } else {
114
+ dispatchActions.decrementCalculating();
115
+ }
116
  }
117
  return () => {
118
  if ( isPendingDelete ) {
119
  dispatchActions.decrementCalculating();
120
  }
121
  };
122
+ }, [ dispatchActions, isPendingDelete, previousIsPendingDelete ] );
123
 
124
  return {
125
  isPendingDelete,
assets/js/base/hooks/checkout/index.js CHANGED
@@ -1,4 +1,5 @@
1
  export * from './use-checkout-redirect-url';
2
  export * from './use-checkout-address';
 
3
  export * from './use-checkout-submit';
4
  export * from './use-emit-response';
1
  export * from './use-checkout-redirect-url';
2
  export * from './use-checkout-address';
3
+ export * from './use-checkout-notices';
4
  export * from './use-checkout-submit';
5
  export * from './use-emit-response';
assets/js/base/hooks/checkout/use-checkout-notices.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { useEmitResponse } from '@woocommerce/base-hooks';
5
+ import { useSelect } from '@wordpress/data';
6
+
7
+ /**
8
+ * @typedef {import('@woocommerce/type-defs/contexts').StoreNoticeObject} StoreNoticeObject
9
+ * @typedef {import('@woocommerce/type-defs/hooks').CheckoutNotices} CheckoutNotices
10
+ */
11
+
12
+ /**
13
+ * A hook that returns all notices visible in the Checkout block.
14
+ *
15
+ * @return {CheckoutNotices} Notices from the checkout form or payment methods.
16
+ */
17
+ export const useCheckoutNotices = () => {
18
+ const { noticeContexts } = useEmitResponse();
19
+
20
+ /**
21
+ * @type {StoreNoticeObject[]}
22
+ */
23
+ const checkoutNotices = useSelect(
24
+ ( select ) => select( 'core/notices' ).getNotices( 'wc/checkout' ),
25
+ []
26
+ );
27
+
28
+ /**
29
+ * @type {StoreNoticeObject[]}
30
+ */
31
+ const expressPaymentNotices = useSelect(
32
+ ( select ) =>
33
+ select( 'core/notices' ).getNotices(
34
+ noticeContexts.EXPRESS_PAYMENTS
35
+ ),
36
+ [ noticeContexts.EXPRESS_PAYMENTS ]
37
+ );
38
+
39
+ /**
40
+ * @type {StoreNoticeObject[]}
41
+ */
42
+ const paymentNotices = useSelect(
43
+ ( select ) =>
44
+ select( 'core/notices' ).getNotices( noticeContexts.PAYMENTS ),
45
+ [ noticeContexts.PAYMENTS ]
46
+ );
47
+
48
+ return {
49
+ checkoutNotices,
50
+ expressPaymentNotices,
51
+ paymentNotices,
52
+ };
53
+ };
assets/js/base/hooks/use-previous.js CHANGED
@@ -20,7 +20,7 @@ export const usePrevious = ( value, validation ) => {
20
  ) {
21
  ref.current = value;
22
  }
23
- }, [ value, ref.current ] );
24
 
25
  return ref.current;
26
  };
20
  ) {
21
  ref.current = value;
22
  }
23
+ }, [ value, validation ] );
24
 
25
  return ref.current;
26
  };
assets/js/base/hooks/use-query-state.js CHANGED
@@ -5,6 +5,8 @@ import { QUERY_STATE_STORE_KEY as storeKey } from '@woocommerce/block-data';
5
  import { useSelect, useDispatch } from '@wordpress/data';
6
  import { useRef, useEffect, useCallback } from '@wordpress/element';
7
  import { useQueryStateContext } from '@woocommerce/base-context';
 
 
8
  import { assign } from 'lodash';
9
 
10
  /**
@@ -43,7 +45,7 @@ export const useQueryStateByContext = ( context ) => {
43
  ( value ) => {
44
  setValueForQueryContext( context, value );
45
  },
46
- [ context ]
47
  );
48
 
49
  return [ queryState, setQueryState ];
@@ -56,11 +58,11 @@ export const useQueryStateByContext = ( context ) => {
56
  * "Query State" is a wp.data store that keeps track of an arbitrary object of
57
  * query keys and their values.
58
  *
59
- * @param {*} queryKey The specific query key to retrieve the value for.
60
- * @param {*} defaultValue Default value if query does not exist.
61
- * @param {string} [context] What context to retrieve the query state for. If
62
- * not provided will attempt to use what is provided
63
- * by query state context.
64
  *
65
  * @return {*} Whatever value is set at the query state index using the
66
  * provided context and query key.
@@ -81,7 +83,7 @@ export const useQueryStateByKey = ( queryKey, defaultValue, context ) => {
81
  ( value ) => {
82
  setQueryValue( context, queryKey, value );
83
  },
84
- [ context, queryKey ]
85
  );
86
 
87
  return [ queryValue, setQueryValueByKey ];
@@ -117,15 +119,31 @@ export const useSynchronizedQueryState = ( synchronizedQuery, context ) => {
117
  const queryStateContext = useQueryStateContext();
118
  context = context || queryStateContext;
119
  const [ queryState, setQueryState ] = useQueryStateByContext( context );
 
120
  const currentSynchronizedQuery = useShallowEqual( synchronizedQuery );
 
121
  // used to ensure we allow initial synchronization to occur before
122
  // returning non-synced state.
123
  const isInitialized = useRef( false );
124
  // update queryState anytime incoming synchronizedQuery changes
125
  useEffect( () => {
126
- setQueryState( assign( {}, queryState, currentSynchronizedQuery ) );
127
- isInitialized.current = true;
128
- }, [ currentSynchronizedQuery ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  return isInitialized.current
130
  ? [ queryState, setQueryState ]
131
  : [ synchronizedQuery, setQueryState ];
5
  import { useSelect, useDispatch } from '@wordpress/data';
6
  import { useRef, useEffect, useCallback } from '@wordpress/element';
7
  import { useQueryStateContext } from '@woocommerce/base-context';
8
+ import { usePrevious } from '@woocommerce/base-hooks';
9
+ import isShallowEqual from '@wordpress/is-shallow-equal';
10
  import { assign } from 'lodash';
11
 
12
  /**
45
  ( value ) => {
46
  setValueForQueryContext( context, value );
47
  },
48
+ [ context, setValueForQueryContext ]
49
  );
50
 
51
  return [ queryState, setQueryState ];
58
  * "Query State" is a wp.data store that keeps track of an arbitrary object of
59
  * query keys and their values.
60
  *
61
+ * @param {*} queryKey The specific query key to retrieve the value for.
62
+ * @param {*} [defaultValue] Default value if query does not exist.
63
+ * @param {string} [context] What context to retrieve the query state for. If
64
+ * not provided will attempt to use what is provided
65
+ * by query state context.
66
  *
67
  * @return {*} Whatever value is set at the query state index using the
68
  * provided context and query key.
83
  ( value ) => {
84
  setQueryValue( context, queryKey, value );
85
  },
86
+ [ context, queryKey, setQueryValue ]
87
  );
88
 
89
  return [ queryValue, setQueryValueByKey ];
119
  const queryStateContext = useQueryStateContext();
120
  context = context || queryStateContext;
121
  const [ queryState, setQueryState ] = useQueryStateByContext( context );
122
+ const currentQueryState = useShallowEqual( queryState );
123
  const currentSynchronizedQuery = useShallowEqual( synchronizedQuery );
124
+ const previousSynchronizedQuery = usePrevious( currentSynchronizedQuery );
125
  // used to ensure we allow initial synchronization to occur before
126
  // returning non-synced state.
127
  const isInitialized = useRef( false );
128
  // update queryState anytime incoming synchronizedQuery changes
129
  useEffect( () => {
130
+ if (
131
+ ! isShallowEqual(
132
+ previousSynchronizedQuery,
133
+ currentSynchronizedQuery
134
+ )
135
+ ) {
136
+ setQueryState(
137
+ assign( {}, currentQueryState, currentSynchronizedQuery )
138
+ );
139
+ isInitialized.current = true;
140
+ }
141
+ }, [
142
+ currentQueryState,
143
+ currentSynchronizedQuery,
144
+ previousSynchronizedQuery,
145
+ setQueryState,
146
+ ] );
147
  return isInitialized.current
148
  ? [ queryState, setQueryState ]
149
  : [ synchronizedQuery, setQueryState ];
assets/js/blocks/active-filters/block.js CHANGED
@@ -47,7 +47,13 @@ const ActiveFiltersBlock = ( {
47
  },
48
  displayStyle: blockAttributes.displayStyle,
49
  } );
50
- }, [ minPrice, maxPrice, formatPriceRange ] );
 
 
 
 
 
 
51
 
52
  const activeAttributeFilters = useMemo( () => {
53
  return productAttributes.map( ( attribute ) => {
@@ -64,7 +70,7 @@ const ActiveFiltersBlock = ( {
64
  />
65
  );
66
  } );
67
- }, [ productAttributes ] );
68
 
69
  const hasFilters = () => {
70
  return (
47
  },
48
  displayStyle: blockAttributes.displayStyle,
49
  } );
50
+ }, [
51
+ minPrice,
52
+ maxPrice,
53
+ blockAttributes.displayStyle,
54
+ setMinPrice,
55
+ setMaxPrice,
56
+ ] );
57
 
58
  const activeAttributeFilters = useMemo( () => {
59
  return productAttributes.map( ( attribute ) => {
70
  />
71
  );
72
  } );
73
+ }, [ productAttributes, blockAttributes.displayStyle ] );
74
 
75
  const hasFilters = () => {
76
  return (
assets/js/blocks/attribute-filter/block.js CHANGED
@@ -8,6 +8,7 @@ import {
8
  useQueryStateByKey,
9
  useQueryStateByContext,
10
  useCollectionData,
 
11
  useShallowEqual,
12
  } from '@woocommerce/base-hooks';
13
  import {
@@ -113,7 +114,7 @@ const AttributeFilterBlock = ( {
113
  * @param {string} termSlug The term of the slug to check.
114
  */
115
  const isTermInQueryState = ( termSlug ) => {
116
- if ( ! queryState || ! queryState.attributes ) {
117
  return false;
118
  }
119
  return queryState.attributes.some(
@@ -168,16 +169,11 @@ const AttributeFilterBlock = ( {
168
  ] );
169
 
170
  // Track checked STATE changes - if state changes, update the query.
171
- useEffect(
172
- () => {
173
- if ( ! blockAttributes.showFilterButton ) {
174
- onSubmit();
175
- }
176
- },
177
- // There is no need to add blockAttributes.showFilterButton as a dependency.
178
- // It will only change in the editor and there we don't need to call onSubmit in any case.
179
- [ checked, onSubmit ]
180
- );
181
 
182
  const checkedQuery = useMemo( () => {
183
  return productAttributesQuery
@@ -188,17 +184,16 @@ const AttributeFilterBlock = ( {
188
  }, [ productAttributesQuery, attributeObject.taxonomy ] );
189
 
190
  const currentCheckedQuery = useShallowEqual( checkedQuery );
191
-
192
  // Track ATTRIBUTES QUERY changes so the block reflects current filters.
193
- useEffect(
194
- () => {
195
- if ( ! isShallowEqual( checked, checkedQuery ) ) {
196
- setChecked( checkedQuery );
197
- }
198
- },
199
- // We only want to apply this effect when the query changes, so we are intentionally leaving `checked` out of the dependencies.
200
- [ currentCheckedQuery ]
201
- );
202
 
203
  /**
204
  * Returns an array of term objects that have been chosen via the checkboxes.
@@ -215,19 +210,29 @@ const AttributeFilterBlock = ( {
215
  [ attributeTerms ]
216
  );
217
 
218
- const onSubmit = () => {
219
- if ( isEditor ) {
220
- return;
221
- }
 
222
 
223
- updateAttributeFilter(
 
 
 
 
 
 
 
 
 
224
  productAttributesQuery,
225
  setProductAttributesQuery,
226
  attributeObject,
227
- getSelectedTerms( checked ),
228
- blockAttributes.queryType === 'or' ? 'in' : 'and'
229
- );
230
- };
231
 
232
  const multiple =
233
  blockAttributes.displayStyle !== 'dropdown' ||
@@ -357,7 +362,7 @@ const AttributeFilterBlock = ( {
357
  <FilterSubmitButton
358
  className="wc-block-attribute-filter__button"
359
  disabled={ isLoading || isDisabled }
360
- onClick={ onSubmit }
361
  />
362
  ) }
363
  </div>
8
  useQueryStateByKey,
9
  useQueryStateByContext,
10
  useCollectionData,
11
+ usePrevious,
12
  useShallowEqual,
13
  } from '@woocommerce/base-hooks';
14
  import {
114
  * @param {string} termSlug The term of the slug to check.
115
  */
116
  const isTermInQueryState = ( termSlug ) => {
117
+ if ( ! queryState?.attributes ) {
118
  return false;
119
  }
120
  return queryState.attributes.some(
169
  ] );
170
 
171
  // Track checked STATE changes - if state changes, update the query.
172
+ useEffect( () => {
173
+ if ( ! blockAttributes.showFilterButton ) {
174
+ onSubmit( checked );
175
+ }
176
+ }, [ blockAttributes.showFilterButton, checked, onSubmit ] );
 
 
 
 
 
177
 
178
  const checkedQuery = useMemo( () => {
179
  return productAttributesQuery
184
  }, [ productAttributesQuery, attributeObject.taxonomy ] );
185
 
186
  const currentCheckedQuery = useShallowEqual( checkedQuery );
187
+ const previousCheckedQuery = usePrevious( currentCheckedQuery );
188
  // Track ATTRIBUTES QUERY changes so the block reflects current filters.
189
+ useEffect( () => {
190
+ if (
191
+ ! isShallowEqual( previousCheckedQuery, currentCheckedQuery ) && // checked query changed
192
+ ! isShallowEqual( checked, currentCheckedQuery ) // checked query doesn't match the UI
193
+ ) {
194
+ setChecked( currentCheckedQuery );
195
+ }
196
+ }, [ checked, currentCheckedQuery, previousCheckedQuery ] );
 
197
 
198
  /**
199
  * Returns an array of term objects that have been chosen via the checkboxes.
210
  [ attributeTerms ]
211
  );
212
 
213
+ const onSubmit = useCallback(
214
+ ( isChecked ) => {
215
+ if ( isEditor ) {
216
+ return;
217
+ }
218
 
219
+ updateAttributeFilter(
220
+ productAttributesQuery,
221
+ setProductAttributesQuery,
222
+ attributeObject,
223
+ getSelectedTerms( isChecked ),
224
+ blockAttributes.queryType === 'or' ? 'in' : 'and'
225
+ );
226
+ },
227
+ [
228
+ isEditor,
229
  productAttributesQuery,
230
  setProductAttributesQuery,
231
  attributeObject,
232
+ getSelectedTerms,
233
+ blockAttributes.queryType,
234
+ ]
235
+ );
236
 
237
  const multiple =
238
  blockAttributes.displayStyle !== 'dropdown' ||
362
  <FilterSubmitButton
363
  className="wc-block-attribute-filter__button"
364
  disabled={ isLoading || isDisabled }
365
+ onClick={ () => onSubmit( checked ) }
366
  />
367
  ) }
368
  </div>
assets/js/blocks/attribute-filter/edit.js CHANGED
@@ -2,7 +2,7 @@
2
  * External dependencies
3
  */
4
  import { __, sprintf, _n } from '@wordpress/i18n';
5
- import { Fragment, useState, useCallback } from '@wordpress/element';
6
  import { InspectorControls, BlockControls } from '@wordpress/block-editor';
7
  import {
8
  Placeholder,
@@ -258,7 +258,7 @@ const Edit = ( { attributes, setAttributes, debouncedSpeak } ) => {
258
  </Placeholder>
259
  );
260
 
261
- const onDone = useCallback( () => {
262
  setIsEditing( false );
263
  debouncedSpeak(
264
  __(
@@ -266,37 +266,34 @@ const Edit = ( { attributes, setAttributes, debouncedSpeak } ) => {
266
  'woo-gutenberg-products-block'
267
  )
268
  );
269
- }, [] );
270
 
271
- const onChange = useCallback(
272
- ( selected ) => {
273
- if ( ! selected || ! selected.length ) {
274
- return;
275
- }
276
 
277
- const selectedId = selected[ 0 ].id;
278
- const productAttribute = find( ATTRIBUTES, [
279
- 'attribute_id',
280
- selectedId.toString(),
281
- ] );
282
 
283
- if ( ! productAttribute || attributeId === selectedId ) {
284
- return;
285
- }
286
 
287
- const attributeName = productAttribute.attribute_label;
288
 
289
- setAttributes( {
290
- attributeId: selectedId,
291
- heading: sprintf(
292
- // Translators: %s attribute name.
293
- __( 'Filter by %s', 'woo-gutenberg-products-block' ),
294
- attributeName
295
- ),
296
- } );
297
- },
298
- [ attributeId ]
299
- );
300
 
301
  const renderAttributeControl = () => {
302
  const messages = {
2
  * External dependencies
3
  */
4
  import { __, sprintf, _n } from '@wordpress/i18n';
5
+ import { Fragment, useState } from '@wordpress/element';
6
  import { InspectorControls, BlockControls } from '@wordpress/block-editor';
7
  import {
8
  Placeholder,
258
  </Placeholder>
259
  );
260
 
261
+ const onDone = () => {
262
  setIsEditing( false );
263
  debouncedSpeak(
264
  __(
266
  'woo-gutenberg-products-block'
267
  )
268
  );
269
+ };
270
 
271
+ const onChange = ( selected ) => {
272
+ if ( ! selected || ! selected.length ) {
273
+ return;
274
+ }
 
275
 
276
+ const selectedId = selected[ 0 ].id;
277
+ const productAttribute = find( ATTRIBUTES, [
278
+ 'attribute_id',
279
+ selectedId.toString(),
280
+ ] );
281
 
282
+ if ( ! productAttribute || attributeId === selectedId ) {
283
+ return;
284
+ }
285
 
286
+ const attributeName = productAttribute.attribute_label;
287
 
288
+ setAttributes( {
289
+ attributeId: selectedId,
290
+ heading: sprintf(
291
+ // Translators: %s attribute name.
292
+ __( 'Filter by %s', 'woo-gutenberg-products-block' ),
293
+ attributeName
294
+ ),
295
+ } );
296
+ };
 
 
297
 
298
  const renderAttributeControl = () => {
299
  const messages = {
assets/js/blocks/cart-checkout/cart/checkout-button/style.scss CHANGED
@@ -43,7 +43,7 @@
43
 
44
  &::before {
45
  box-shadow: 0 -10px 20px 10px currentColor;
46
- color: transparentize($core-grey-light-700, 0.5);
47
  content: "";
48
  height: 100%;
49
  left: 0;
43
 
44
  &::before {
45
  box-shadow: 0 -10px 20px 10px currentColor;
46
+ color: transparentize($gray-400, 0.5);
47
  content: "";
48
  height: 100%;
49
  left: 0;
assets/js/blocks/cart-checkout/cart/full-cart/index.js CHANGED
@@ -85,7 +85,7 @@ const Cart = ( { attributes } ) => {
85
  id: error.code,
86
  } );
87
  } );
88
- }, [ cartItemErrors ] );
89
 
90
  const totalsCurrency = getCurrencyFromPriceResponse( cartTotals );
91
 
85
  id: error.code,
86
  } );
87
  } );
88
+ }, [ addErrorNotice, cartItemErrors ] );
89
 
90
  const totalsCurrency = getCurrencyFromPriceResponse( cartTotals );
91
 
assets/js/blocks/cart-checkout/cart/full-cart/style.scss CHANGED
@@ -195,10 +195,12 @@ table.wc-block-cart-items {
195
  padding-bottom: $gap;
196
  }
197
  .wc-block-cart-item__quantity {
198
- grid-column-start: 2;
199
  grid-row-start: 2;
200
  vertical-align: bottom;
201
  padding-right: $gap;
 
 
202
 
203
  .wc-block-cart-item__remove-link {
204
  display: none;
@@ -208,9 +210,11 @@ table.wc-block-cart-items {
208
  }
209
  }
210
  .wc-block-cart-item__total {
211
- grid-column-start: 3;
212
  grid-row-start: 2;
213
- align-self: center;
 
 
214
 
215
  .wc-block-components-formatted-money-amount {
216
  display: inline-block;
195
  padding-bottom: $gap;
196
  }
197
  .wc-block-cart-item__quantity {
198
+ grid-column-start: 1;
199
  grid-row-start: 2;
200
  vertical-align: bottom;
201
  padding-right: $gap;
202
+ align-self: end;
203
+ padding-top: $gap;
204
 
205
  .wc-block-cart-item__remove-link {
206
  display: none;
210
  }
211
  }
212
  .wc-block-cart-item__total {
213
+ grid-column: 2 / span 2;
214
  grid-row-start: 2;
215
+ align-self: end;
216
+ justify-self: end;
217
+ padding-bottom: 0.375em;
218
 
219
  .wc-block-components-formatted-money-amount {
220
  display: inline-block;
assets/js/blocks/cart-checkout/cart/test/block.js CHANGED
@@ -40,13 +40,7 @@ describe( 'Testing cart', () => {
40
  screen.getByText( /Proceed to Checkout/i )
41
  ).toBeInTheDocument();
42
 
43
- /**
44
- * @todo Investigate extra POST request on initial cart render.
45
- *
46
- * We have an unfixed bug in our test in which the full cart triggers a POST
47
- * request to `wc/store/cart/update-item` causing the fetch to be called twice.
48
- */
49
- expect( fetchMock ).toHaveBeenCalledTimes( 2 );
50
  } );
51
  it( 'renders empty cart if there are no items in the cart', async () => {
52
  fetchMock.mockResponse( ( req ) => {
40
  screen.getByText( /Proceed to Checkout/i )
41
  ).toBeInTheDocument();
42
 
43
+ expect( fetchMock ).toHaveBeenCalledTimes( 1 );
 
 
 
 
 
 
44
  } );
45
  it( 'renders empty cart if there are no items in the cart', async () => {
46
  fetchMock.mockResponse( ( req ) => {
assets/js/blocks/cart-checkout/checkout/block.js CHANGED
@@ -22,9 +22,9 @@ import {
22
  SidebarLayout,
23
  Main,
24
  } from '@woocommerce/base-components/sidebar-layout';
25
- import { getSetting } from '@woocommerce/settings';
26
  import withScrollToTop from '@woocommerce/base-hocs/with-scroll-to-top';
27
  import { CHECKOUT_ALLOWS_GUEST } from '@woocommerce/block-settings';
 
28
 
29
  /**
30
  * Internal dependencies
@@ -81,6 +81,12 @@ const Checkout = ( { attributes, scrollToTop } ) => {
81
  checkoutHasError &&
82
  ( hasValidationErrors || hasNoticesOfType( 'default' ) );
83
 
 
 
 
 
 
 
84
  useEffect( () => {
85
  if ( hasErrorsToDisplay ) {
86
  showAllValidationErrors();
@@ -96,7 +102,7 @@ const Checkout = ( { attributes, scrollToTop } ) => {
96
  ! isEditor &&
97
  ! customerId &&
98
  ! CHECKOUT_ALLOWS_GUEST &&
99
- ! attributes.allowCreateAccount
100
  ) {
101
  return (
102
  <>
@@ -128,7 +134,7 @@ const Checkout = ( { attributes, scrollToTop } ) => {
128
  showPhoneField={ attributes.showPhoneField }
129
  requireCompanyField={ attributes.requireCompanyField }
130
  requirePhoneField={ attributes.requirePhoneField }
131
- allowCreateAccount={ attributes.allowCreateAccount }
132
  />
133
  <div className="wc-block-checkout__actions">
134
  { attributes.showReturnToCart && (
22
  SidebarLayout,
23
  Main,
24
  } from '@woocommerce/base-components/sidebar-layout';
 
25
  import withScrollToTop from '@woocommerce/base-hocs/with-scroll-to-top';
26
  import { CHECKOUT_ALLOWS_GUEST } from '@woocommerce/block-settings';
27
+ import { compareWithWooVersion, getSetting } from '@woocommerce/settings';
28
 
29
  /**
30
  * Internal dependencies
81
  checkoutHasError &&
82
  ( hasValidationErrors || hasNoticesOfType( 'default' ) );
83
 
84
+ // Checkout signup is feature gated to WooCommerce 4.7 and newer;
85
+ // uses updated my-account/lost-password screen from 4.7+ for
86
+ // setting initial password.
87
+ const allowCreateAccount =
88
+ attributes.allowCreateAccount && compareWithWooVersion( '4.7.0', '<=' );
89
+
90
  useEffect( () => {
91
  if ( hasErrorsToDisplay ) {
92
  showAllValidationErrors();
102
  ! isEditor &&
103
  ! customerId &&
104
  ! CHECKOUT_ALLOWS_GUEST &&
105
+ ! allowCreateAccount
106
  ) {
107
  return (
108
  <>
134
  showPhoneField={ attributes.showPhoneField }
135
  requireCompanyField={ attributes.requireCompanyField }
136
  requirePhoneField={ attributes.requirePhoneField }
137
+ allowCreateAccount={ allowCreateAccount }
138
  />
139
  <div className="wc-block-checkout__actions">
140
  { attributes.showReturnToCart && (
assets/js/blocks/cart-checkout/checkout/edit.js CHANGED
@@ -17,9 +17,8 @@ import {
17
  PRIVACY_URL,
18
  TERMS_URL,
19
  CHECKOUT_PAGE_ID,
20
- isExperimentalBuild,
21
  } from '@woocommerce/block-settings';
22
- import { getAdminLink } from '@woocommerce/settings';
23
  import { createInterpolateElement } from 'wordpress-element';
24
  import { useRef } from '@wordpress/element';
25
  import {
@@ -55,6 +54,12 @@ const BlockSettings = ( { attributes, setAttributes } ) => {
55
  } = attributes;
56
  const { currentPostId } = useEditorContext();
57
  const { current: savedCartPageId } = useRef( cartPageId );
 
 
 
 
 
 
58
  return (
59
  <InspectorControls>
60
  { currentPostId !== CHECKOUT_PAGE_ID && (
@@ -156,7 +161,7 @@ const BlockSettings = ( { attributes, setAttributes } ) => {
156
  />
157
  ) }
158
  </PanelBody>
159
- { isExperimentalBuild() && (
160
  <PanelBody
161
  title={ __(
162
  'Account options',
@@ -165,7 +170,7 @@ const BlockSettings = ( { attributes, setAttributes } ) => {
165
  >
166
  <ToggleControl
167
  label={ __(
168
- 'Allow shopper to sign up for a user account during checkout',
169
  'woo-gutenberg-products-block'
170
  ) }
171
  checked={ allowCreateAccount }
@@ -188,7 +193,7 @@ const BlockSettings = ( { attributes, setAttributes } ) => {
188
  </p>
189
  <ToggleControl
190
  label={ __(
191
- 'Allow customers to optionally add order notes',
192
  'woo-gutenberg-products-block'
193
  ) }
194
  checked={ showOrderNotes }
17
  PRIVACY_URL,
18
  TERMS_URL,
19
  CHECKOUT_PAGE_ID,
 
20
  } from '@woocommerce/block-settings';
21
+ import { compareWithWooVersion, getAdminLink } from '@woocommerce/settings';
22
  import { createInterpolateElement } from 'wordpress-element';
23
  import { useRef } from '@wordpress/element';
24
  import {
54
  } = attributes;
55
  const { currentPostId } = useEditorContext();
56
  const { current: savedCartPageId } = useRef( cartPageId );
57
+ // Checkout signup is feature gated to WooCommerce 4.7 and newer;
58
+ // uses updated my-account/lost-password screen from 4.7+ for
59
+ // setting initial password.
60
+ // Also implicitly gated to feature plugin, because Checkout
61
+ // block is gated to plugin
62
+ const showCreateAccountOption = compareWithWooVersion( '4.7.0', '<=' );
63
  return (
64
  <InspectorControls>
65
  { currentPostId !== CHECKOUT_PAGE_ID && (
161
  />
162
  ) }
163
  </PanelBody>
164
+ { showCreateAccountOption && (
165
  <PanelBody
166
  title={ __(
167
  'Account options',
170
  >
171
  <ToggleControl
172
  label={ __(
173
+ 'Allow shoppers to sign up for a user account during checkout',
174
  'woo-gutenberg-products-block'
175
  ) }
176
  checked={ allowCreateAccount }
193
  </p>
194
  <ToggleControl
195
  label={ __(
196
+ 'Allow shoppers to optionally add order notes',
197
  'woo-gutenberg-products-block'
198
  ) }
199
  checked={ showOrderNotes }
assets/js/blocks/cart-checkout/checkout/form/address-step.js CHANGED
@@ -93,6 +93,7 @@ AddressStep.propTypes = {
93
  showApartmentField: PropTypes.bool.isRequired,
94
  showCompanyField: PropTypes.bool.isRequired,
95
  showPhoneField: PropTypes.bool.isRequired,
 
96
  };
97
 
98
  export default AddressStep;
93
  showApartmentField: PropTypes.bool.isRequired,
94
  showCompanyField: PropTypes.bool.isRequired,
95
  showPhoneField: PropTypes.bool.isRequired,
96
+ allowCreateAccount: PropTypes.bool.isRequired,
97
  };
98
 
99
  export default AddressStep;
assets/js/blocks/cart-checkout/checkout/form/contact-fields-step.js CHANGED
@@ -5,10 +5,7 @@ import { __ } from '@wordpress/i18n';
5
  import { FormStep } from '@woocommerce/base-components/cart-checkout';
6
  import { DebouncedValidatedTextInput } from '@woocommerce/base-components/text-input';
7
  import { useCheckoutContext } from '@woocommerce/base-context';
8
- import {
9
- CHECKOUT_ALLOWS_GUEST,
10
- isExperimentalBuild,
11
- } from '@woocommerce/block-settings';
12
  import CheckboxControl from '@woocommerce/base-components/checkbox-control';
13
 
14
  /**
@@ -27,11 +24,9 @@ const ContactFieldsStep = ( {
27
  setShouldCreateAccount,
28
  } = useCheckoutContext();
29
 
30
- // "Create Account" checkbox is gated to dev builds only.
31
  const createAccountUI = ! customerId &&
32
  allowCreateAccount &&
33
- CHECKOUT_ALLOWS_GUEST &&
34
- isExperimentalBuild() && (
35
  <CheckboxControl
36
  className="wc-block-checkout__create-account"
37
  label={ __(
5
  import { FormStep } from '@woocommerce/base-components/cart-checkout';
6
  import { DebouncedValidatedTextInput } from '@woocommerce/base-components/text-input';
7
  import { useCheckoutContext } from '@woocommerce/base-context';
8
+ import { CHECKOUT_ALLOWS_GUEST } from '@woocommerce/block-settings';
 
 
 
9
  import CheckboxControl from '@woocommerce/base-components/checkbox-control';
10
 
11
  /**
24
  setShouldCreateAccount,
25
  } = useCheckoutContext();
26
 
 
27
  const createAccountUI = ! customerId &&
28
  allowCreateAccount &&
29
+ CHECKOUT_ALLOWS_GUEST && (
 
30
  <CheckboxControl
31
  className="wc-block-checkout__create-account"
32
  label={ __(
assets/js/blocks/cart-checkout/checkout/form/index.js CHANGED
@@ -49,6 +49,7 @@ CheckoutForm.propTypes = {
49
  showCompanyField: PropTypes.bool.isRequired,
50
  showOrderNotes: PropTypes.bool.isRequired,
51
  showPhoneField: PropTypes.bool.isRequired,
 
52
  };
53
 
54
  export default CheckoutForm;
49
  showCompanyField: PropTypes.bool.isRequired,
50
  showOrderNotes: PropTypes.bool.isRequired,
51
  showPhoneField: PropTypes.bool.isRequired,
52
+ allowCreateAccount: PropTypes.bool.isRequired,
53
  };
54
 
55
  export default CheckoutForm;
assets/js/blocks/cart-checkout/checkout/form/no-shipping-placeholder/style.scss CHANGED
@@ -9,7 +9,7 @@
9
  display: block;
10
 
11
  .components-button {
12
- background-color: $black;
13
  color: $white;
14
  }
15
 
9
  display: block;
10
 
11
  .components-button {
12
+ background-color: $gray-900;
13
  color: $white;
14
  }
15
 
assets/js/blocks/featured-category/style.scss CHANGED
@@ -1,6 +1,6 @@
1
  .wc-block-featured-category {
2
  position: relative;
3
- background-color: $black;
4
  background-size: cover;
5
  background-position: center center;
6
  width: 100%;
1
  .wc-block-featured-category {
2
  position: relative;
3
+ background-color: $gray-900;
4
  background-size: cover;
5
  background-position: center center;
6
  width: 100%;
assets/js/blocks/featured-product/style.scss CHANGED
@@ -1,6 +1,6 @@
1
  .wc-block-featured-product {
2
  position: relative;
3
- background-color: $black;
4
  background-size: cover;
5
  background-position: center center;
6
  width: 100%;
1
  .wc-block-featured-product {
2
  position: relative;
3
+ background-color: $gray-900;
4
  background-size: cover;
5
  background-position: center center;
6
  width: 100%;
assets/js/blocks/price-filter/block.js CHANGED
@@ -5,6 +5,7 @@ import {
5
  useQueryStateByKey,
6
  useQueryStateByContext,
7
  useCollectionData,
 
8
  } from '@woocommerce/base-hooks';
9
  import { Fragment, useCallback, useState, useEffect } from '@wordpress/element';
10
  import PriceSlider from '@woocommerce/base-components/price-slider';
@@ -26,10 +27,12 @@ import usePriceConstraints from './use-price-constraints.js';
26
  */
27
  const PriceFilterBlock = ( { attributes, isEditor = false } ) => {
28
  const [ minPriceQuery, setMinPriceQuery ] = useQueryStateByKey(
29
- 'min_price'
 
30
  );
31
  const [ maxPriceQuery, setMaxPriceQuery ] = useQueryStateByKey(
32
- 'max_price'
 
33
  );
34
  const [ queryState ] = useQueryStateByContext();
35
  const { results, isLoading } = useCollectionData( {
@@ -52,16 +55,21 @@ const PriceFilterBlock = ( { attributes, isEditor = false } ) => {
52
  minorUnit: currency.minorUnit,
53
  } );
54
 
55
- // Updates the query after a short delay.
56
- const [ debouncedUpdateQuery ] = useDebouncedCallback( () => {
57
- onSubmit();
58
- }, 500 );
59
-
60
  // Updates the query based on slider values.
61
- const onSubmit = useCallback( () => {
62
- setMinPriceQuery( minPrice === minConstraint ? undefined : minPrice );
63
- setMaxPriceQuery( maxPrice === maxConstraint ? undefined : maxPrice );
64
- }, [ minPrice, maxPrice, minConstraint, maxConstraint ] );
 
 
 
 
 
 
 
 
 
 
65
 
66
  // Callback when slider or input fields are changed.
67
  const onChange = useCallback(
@@ -73,29 +81,61 @@ const PriceFilterBlock = ( { attributes, isEditor = false } ) => {
73
  setMaxPrice( prices[ 1 ] );
74
  }
75
  },
76
- [ minConstraint, maxConstraint, minPrice, maxPrice ]
77
  );
78
 
79
  // Track price STATE changes - if state changes, update the query.
80
  useEffect( () => {
81
  if ( ! attributes.showFilterButton ) {
82
- debouncedUpdateQuery();
83
  }
84
- }, [ minPrice, maxPrice, attributes.showFilterButton ] );
 
 
 
 
 
85
 
86
- // Track PRICE QUERY changes so the slider reflects current filters.
 
 
 
 
87
  useEffect( () => {
88
- if ( minPriceQuery !== minPrice ) {
 
 
 
 
 
 
89
  setMinPrice(
90
  Number.isFinite( minPriceQuery ) ? minPriceQuery : minConstraint
91
  );
92
  }
93
- if ( maxPriceQuery !== maxPrice ) {
 
 
 
 
 
 
94
  setMaxPrice(
95
  Number.isFinite( maxPriceQuery ) ? maxPriceQuery : maxConstraint
96
  );
97
  }
98
- }, [ minPriceQuery, maxPriceQuery, minConstraint, maxConstraint ] );
 
 
 
 
 
 
 
 
 
 
 
99
 
100
  if (
101
  ! isLoading &&
@@ -123,7 +163,7 @@ const PriceFilterBlock = ( { attributes, isEditor = false } ) => {
123
  showInputFields={ attributes.showInputFields }
124
  showFilterButton={ attributes.showFilterButton }
125
  onChange={ onChange }
126
- onSubmit={ onSubmit }
127
  isLoading={ isLoading }
128
  />
129
  </div>
5
  useQueryStateByKey,
6
  useQueryStateByContext,
7
  useCollectionData,
8
+ usePrevious,
9
  } from '@woocommerce/base-hooks';
10
  import { Fragment, useCallback, useState, useEffect } from '@wordpress/element';
11
  import PriceSlider from '@woocommerce/base-components/price-slider';
27
  */
28
  const PriceFilterBlock = ( { attributes, isEditor = false } ) => {
29
  const [ minPriceQuery, setMinPriceQuery ] = useQueryStateByKey(
30
+ 'min_price',
31
+ null
32
  );
33
  const [ maxPriceQuery, setMaxPriceQuery ] = useQueryStateByKey(
34
+ 'max_price',
35
+ null
36
  );
37
  const [ queryState ] = useQueryStateByContext();
38
  const { results, isLoading } = useCollectionData( {
55
  minorUnit: currency.minorUnit,
56
  } );
57
 
 
 
 
 
 
58
  // Updates the query based on slider values.
59
+ const onSubmit = useCallback(
60
+ ( newMinPrice, newMaxPrice ) => {
61
+ setMinPriceQuery(
62
+ newMinPrice === minConstraint ? undefined : newMinPrice
63
+ );
64
+ setMaxPriceQuery(
65
+ newMaxPrice === maxConstraint ? undefined : newMaxPrice
66
+ );
67
+ },
68
+ [ minConstraint, maxConstraint, setMinPriceQuery, setMaxPriceQuery ]
69
+ );
70
+
71
+ // Updates the query after a short delay.
72
+ const [ debouncedUpdateQuery ] = useDebouncedCallback( onSubmit, 500 );
73
 
74
  // Callback when slider or input fields are changed.
75
  const onChange = useCallback(
81
  setMaxPrice( prices[ 1 ] );
82
  }
83
  },
84
+ [ minPrice, maxPrice, setMinPrice, setMaxPrice ]
85
  );
86
 
87
  // Track price STATE changes - if state changes, update the query.
88
  useEffect( () => {
89
  if ( ! attributes.showFilterButton ) {
90
+ debouncedUpdateQuery( minPrice, maxPrice );
91
  }
92
+ }, [
93
+ minPrice,
94
+ maxPrice,
95
+ attributes.showFilterButton,
96
+ debouncedUpdateQuery,
97
+ ] );
98
 
99
+ // Track price query/price constraint changes so the slider reflects current filters.
100
+ const previousMinPriceQuery = usePrevious( minPriceQuery );
101
+ const previousMaxPriceQuery = usePrevious( maxPriceQuery );
102
+ const previousMinConstraint = usePrevious( minConstraint );
103
+ const previousMaxConstraint = usePrevious( maxConstraint );
104
  useEffect( () => {
105
+ if (
106
+ ! Number.isFinite( minPrice ) ||
107
+ ( minPriceQuery !== previousMinPriceQuery && // minPrice from query changed
108
+ minPriceQuery !== minPrice ) || // minPrice from query doesn't match the UI min price
109
+ ( minConstraint !== previousMinConstraint && // minPrice from query changed
110
+ minConstraint !== minPrice ) // minPrice from query doesn't match the UI min price
111
+ ) {
112
  setMinPrice(
113
  Number.isFinite( minPriceQuery ) ? minPriceQuery : minConstraint
114
  );
115
  }
116
+ if (
117
+ ! Number.isFinite( maxPrice ) ||
118
+ ( maxPriceQuery !== previousMaxPriceQuery && // maxPrice from query changed
119
+ maxPriceQuery !== maxPrice ) || // maxPrice from query doesn't match the UI max price
120
+ ( maxConstraint !== previousMaxConstraint && // maxPrice from query changed
121
+ maxConstraint !== maxPrice ) // maxPrice from query doesn't match the UI max price
122
+ ) {
123
  setMaxPrice(
124
  Number.isFinite( maxPriceQuery ) ? maxPriceQuery : maxConstraint
125
  );
126
  }
127
+ }, [
128
+ minPrice,
129
+ maxPrice,
130
+ minPriceQuery,
131
+ maxPriceQuery,
132
+ minConstraint,
133
+ maxConstraint,
134
+ previousMinConstraint,
135
+ previousMaxConstraint,
136
+ previousMinPriceQuery,
137
+ previousMaxPriceQuery,
138
+ ] );
139
 
140
  if (
141
  ! isLoading &&
163
  showInputFields={ attributes.showInputFields }
164
  showFilterButton={ attributes.showFilterButton }
165
  onChange={ onChange }
166
+ onSubmit={ () => onSubmit( minPrice, maxPrice ) }
167
  isLoading={ isLoading }
168
  />
169
  </div>
assets/js/blocks/price-filter/use-price-constraints.js CHANGED
@@ -28,8 +28,9 @@ export const usePriceConstraint = ( price, minorUnit, direction ) => {
28
  : Math.floor( parseFloat( price, 10 ) / step ) * step;
29
  }
30
 
31
- const previousConstraint = usePrevious( currentConstraint, ( val ) =>
32
- Number.isFinite( val )
 
33
  );
34
  return Number.isFinite( currentConstraint )
35
  ? currentConstraint
28
  : Math.floor( parseFloat( price, 10 ) / step ) * step;
29
  }
30
 
31
+ const previousConstraint = usePrevious(
32
+ currentConstraint,
33
+ Number.isFinite
34
  );
35
  return Number.isFinite( currentConstraint )
36
  ? currentConstraint
assets/js/blocks/product-categories/style.scss CHANGED
@@ -68,7 +68,7 @@
68
  cursor: pointer;
69
  background: none;
70
  padding: 0 0.5em;
71
- color: #555d66;
72
  position: relative;
73
  overflow: hidden;
74
  border-radius: 0.25em;
@@ -89,21 +89,21 @@
89
  }
90
  &:focus:enabled {
91
  background-color: #fff;
92
- color: #191e23;
93
- box-shadow: inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff;
94
  outline: 2px solid transparent;
95
  outline-offset: -2px;
96
  }
97
  &:not(:disabled):not([aria-disabled="true"]):hover {
98
  background-color: #fff;
99
- color: #191e23;
100
- box-shadow: inset 0 0 0 1px #e2e4e7, inset 0 0 0 2px #fff, 0 1px 1px rgba(25, 30, 35, 0.2);
101
  }
102
  &:not(:disabled):not([aria-disabled="true"]):active {
103
  outline: none;
104
  background-color: #fff;
105
- color: #191e23;
106
- box-shadow: inset 0 0 0 1px #ccd0d4, inset 0 0 0 2px #fff;
107
  }
108
  &[aria-disabled="true"]:focus,
109
  &:disabled:focus {
68
  cursor: pointer;
69
  background: none;
70
  padding: 0 0.5em;
71
+ color: $gray-700;
72
  position: relative;
73
  overflow: hidden;
74
  border-radius: 0.25em;
89
  }
90
  &:focus:enabled {
91
  background-color: #fff;
92
+ color: $gray-900;
93
+ box-shadow: inset 0 0 0 1px $gray-400, inset 0 0 0 2px #fff;
94
  outline: 2px solid transparent;
95
  outline-offset: -2px;
96
  }
97
  &:not(:disabled):not([aria-disabled="true"]):hover {
98
  background-color: #fff;
99
+ color: $gray-900;
100
+ box-shadow: inset 0 0 0 1px $gray-200, inset 0 0 0 2px #fff, 0 1px 1px rgba(25, 30, 35, 0.2);
101
  }
102
  &:not(:disabled):not([aria-disabled="true"]):active {
103
  outline: none;
104
  background-color: #fff;
105
+ color: $gray-900;
106
+ box-shadow: inset 0 0 0 1px $gray-400, inset 0 0 0 2px #fff;
107
  }
108
  &[aria-disabled="true"]:focus,
109
  &:disabled:focus {
assets/js/blocks/product-search/style.scss CHANGED
@@ -16,7 +16,7 @@
16
  cursor: pointer;
17
  background: none;
18
  padding: 0 0.5em;
19
- color: #555d66;
20
  position: relative;
21
  overflow: hidden;
22
  border-radius: 0.25em;
@@ -37,21 +37,21 @@
37
  }
38
  &:focus:enabled {
39
  background-color: #fff;
40
- color: #191e23;
41
- box-shadow: inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff;
42
  outline: 2px solid transparent;
43
  outline-offset: -2px;
44
  }
45
  &:not(:disabled):not([aria-disabled="true"]):hover {
46
  background-color: #fff;
47
- color: #191e23;
48
- box-shadow: inset 0 0 0 1px #e2e4e7, inset 0 0 0 2px #fff, 0 1px 1px rgba(25, 30, 35, 0.2);
49
  }
50
  &:not(:disabled):not([aria-disabled="true"]):active {
51
  outline: none;
52
  background-color: #fff;
53
- color: #191e23;
54
- box-shadow: inset 0 0 0 1px #ccd0d4, inset 0 0 0 2px #fff;
55
  }
56
  &[aria-disabled="true"]:focus,
57
  &:disabled:focus {
16
  cursor: pointer;
17
  background: none;
18
  padding: 0 0.5em;
19
+ color: $gray-700;
20
  position: relative;
21
  overflow: hidden;
22
  border-radius: 0.25em;
37
  }
38
  &:focus:enabled {
39
  background-color: #fff;
40
+ color: $gray-900;
41
+ box-shadow: inset 0 0 0 1px $gray-700, inset 0 0 0 2px #fff;
42
  outline: 2px solid transparent;
43
  outline-offset: -2px;
44
  }
45
  &:not(:disabled):not([aria-disabled="true"]):hover {
46
  background-color: #fff;
47
+ color: $gray-900;
48
+ box-shadow: inset 0 0 0 1px $gray-200, inset 0 0 0 2px #fff, 0 1px 1px rgba(25, 30, 35, 0.2);
49
  }
50
  &:not(:disabled):not([aria-disabled="true"]):active {
51
  outline: none;
52
  background-color: #fff;
53
+ color: $gray-900;
54
+ box-shadow: inset 0 0 0 1px $gray-900, inset 0 0 0 2px #fff;
55
  }
56
  &[aria-disabled="true"]:focus,
57
  &:disabled:focus {
assets/js/blocks/products/editor.scss CHANGED
@@ -37,7 +37,7 @@
37
  overflow: hidden;
38
  }
39
  .wc-block-all-products-grid-item-template {
40
- border-top: 1px solid #e2e4e7;
41
  margin-top: 20px;
42
  width: 100%;
43
  overflow: hidden;
@@ -96,7 +96,7 @@
96
  &::before,
97
  &::after {
98
  content: "";
99
- background: #e2e4e7;
100
  display: block;
101
  position: absolute;
102
  width: 100%;
37
  overflow: hidden;
38
  }
39
  .wc-block-all-products-grid-item-template {
40
+ border-top: 1px solid $gray-200;
41
  margin-top: 20px;
42
  width: 100%;
43
  overflow: hidden;
96
  &::before,
97
  &::after {
98
  content: "";
99
+ background: $gray-200;
100
  display: block;
101
  position: absolute;
102
  width: 100%;
assets/js/blocks/single-product/edit/editor.scss CHANGED
@@ -10,7 +10,7 @@
10
  }
11
  .wc-block-single-product__edit-card {
12
  padding: 16px;
13
- border-top: 1px solid #e2e4e7;
14
 
15
  .wc-block-single-product__edit-card-title {
16
  margin: 0 0 $gap;
10
  }
11
  .wc-block-single-product__edit-card {
12
  padding: 16px;
13
+ border-top: 1px solid $gray-200;
14
 
15
  .wc-block-single-product__edit-card-title {
16
  margin: 0 0 $gap;
assets/js/editor-components/feedback-prompt/style.scss CHANGED
@@ -1,6 +1,6 @@
1
  .wc-block-feedback-prompt {
2
  background-color: #f7f7f7;
3
- border-top: 1px solid #e2e4e7;
4
  margin: 0 -16px 0;
5
  padding: $gap-large;
6
  text-align: center;
1
  .wc-block-feedback-prompt {
2
  background-color: #f7f7f7;
3
+ border-top: 1px solid $gray-200;
4
  margin: 0 -16px 0;
5
  padding: $gap-large;
6
  text-align: center;
assets/js/editor-components/product-attribute-term-control/style.scss CHANGED
@@ -49,14 +49,14 @@
49
  content: "";
50
  height: $gap-large;
51
  width: $gap-large;
52
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="{$core-grey-dark-300}" /></svg>');
53
  background-repeat: no-repeat;
54
  background-position: center right;
55
  background-size: contain;
56
  }
57
 
58
  &.depth-0[aria-expanded="true"]::after {
59
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="{$core-grey-dark-300}" /></svg>');
60
  }
61
 
62
  &[disabled].depth-0::after {
49
  content: "";
50
  height: $gap-large;
51
  width: $gap-large;
52
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="#{encode-color($gray-700)}" /></svg>');
53
  background-repeat: no-repeat;
54
  background-position: center right;
55
  background-size: contain;
56
  }
57
 
58
  &.depth-0[aria-expanded="true"]::after {
59
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="#{encode-color($gray-700)}" /></svg>');
60
  }
61
 
62
  &[disabled].depth-0::after {
assets/js/editor-components/product-control/style.scss CHANGED
@@ -33,13 +33,13 @@
33
  content: "";
34
  height: $gap-large;
35
  width: $gap-large;
36
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="{$core-grey-dark-300}" /></svg>');
37
  background-repeat: no-repeat;
38
  background-position: center right;
39
  background-size: contain;
40
  }
41
 
42
  &.depth-0.is-variable[aria-expanded="true"]::after {
43
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="{$core-grey-dark-300}" /></svg>');
44
  }
45
  }
33
  content: "";
34
  height: $gap-large;
35
  width: $gap-large;
36
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="#{encode-color($gray-700)}" /></svg>');
37
  background-repeat: no-repeat;
38
  background-position: center right;
39
  background-size: contain;
40
  }
41
 
42
  &.depth-0.is-variable[aria-expanded="true"]::after {
43
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="#{encode-color($gray-700)}" /></svg>');
44
  }
45
  }
assets/js/editor-components/text-toolbar-button/style.scss CHANGED
@@ -3,7 +3,7 @@
3
 
4
  &.is-toggled,
5
  &.is-toggled:focus {
6
- background: $core-grey-dark-500;
7
  color: $white;
8
  }
9
  }
3
 
4
  &.is-toggled,
5
  &.is-toggled:focus {
6
+ background: $gray-700;
7
  color: $white;
8
  }
9
  }
assets/js/editor-components/view-switcher/editor.scss CHANGED
@@ -4,7 +4,7 @@
4
  box-shadow: 0 0 0 13px #f0f2f3;
5
  margin: 0 0 27px;
6
  visibility: hidden;
7
- color: #555d66;
8
  }
9
  .has-child-selected,
10
  .is-selected {
4
  box-shadow: 0 0 0 13px #f0f2f3;
5
  margin: 0 0 27px;
6
  visibility: hidden;
7
+ color: $gray-700;
8
  }
9
  .has-child-selected,
10
  .is-selected {
assets/js/hocs/with-attributes.js CHANGED
@@ -3,7 +3,6 @@
3
  */
4
  import { useState, useEffect } from '@wordpress/element';
5
  import { getAttributes, getTerms } from '@woocommerce/editor-components/utils';
6
- import { find } from 'lodash';
7
 
8
  /**
9
  * Internal dependencies
@@ -14,12 +13,12 @@ import { formatError } from '../base/utils/errors.js';
14
  * Get attribute data (name, taxonomy etc) from server data.
15
  *
16
  * @param {number} attributeId Attribute ID to look for.
17
- * @param {Array} attributeList List of attributes.
18
  * @param {string} matchField Field to match on. e.g. id or slug.
19
  */
20
  const getAttributeData = ( attributeId, attributeList, matchField = 'id' ) => {
21
- return attributeList
22
- ? find( attributeList, [ matchField, attributeId ] )
23
  : null;
24
  };
25
 
@@ -30,8 +29,9 @@ const getAttributeData = ( attributeId, attributeList, matchField = 'id' ) => {
30
  */
31
  const withAttributes = ( OriginalComponent ) => {
32
  return ( props ) => {
33
- const { selected } = props;
34
- const [ attributes, setAttributes ] = useState( [] );
 
35
  const [ expandedAttribute, setExpandedAttribute ] = useState( 0 );
36
  const [ termsList, setTermsList ] = useState( {} );
37
  const [ loading, setLoading ] = useState( true );
@@ -39,43 +39,44 @@ const withAttributes = ( OriginalComponent ) => {
39
  const [ error, setError ] = useState( null );
40
 
41
  useEffect( () => {
42
- getAttributes()
43
- .then( ( newAttributes ) => {
44
- newAttributes = newAttributes.map( ( attribute ) => ( {
45
- ...attribute,
46
- parent: 0,
47
- } ) );
48
-
49
- setAttributes( newAttributes );
50
 
51
- if ( selected.length > 0 ) {
52
- const selectedAttributeFromTerm = attributes
53
- ? getAttributeData(
54
- selected[ 0 ].attr_slug,
55
- newAttributes,
56
- 'slug'
57
- )
58
- : null;
59
 
60
- if ( selectedAttributeFromTerm ) {
61
- setExpandedAttribute(
62
- selectedAttributeFromTerm.id
 
 
63
  );
 
 
 
 
 
 
64
  }
65
- }
66
- } )
67
- .catch( async ( e ) => {
68
- setError( await formatError( e ) );
69
- } )
70
- .finally( () => {
71
- setLoading( false );
72
- } );
73
- }, [] );
74
 
75
  useEffect( () => {
76
- const attributeData = attributes
77
- ? getAttributeData( expandedAttribute, attributes )
78
- : null;
 
79
 
80
  if ( ! attributeData ) {
81
  return;
@@ -91,10 +92,10 @@ const withAttributes = ( OriginalComponent ) => {
91
  attr_slug: attributeData.taxonomy,
92
  } ) );
93
 
94
- setTermsList( {
95
- ...termsList,
96
  [ expandedAttribute ]: newTerms,
97
- } );
98
  } )
99
  .catch( async ( e ) => {
100
  setError( await formatError( e ) );
@@ -107,7 +108,7 @@ const withAttributes = ( OriginalComponent ) => {
107
  return (
108
  <OriginalComponent
109
  { ...props }
110
- attributes={ attributes }
111
  error={ error }
112
  expandedAttribute={ expandedAttribute }
113
  onExpandAttribute={ setExpandedAttribute }
3
  */
4
  import { useState, useEffect } from '@wordpress/element';
5
  import { getAttributes, getTerms } from '@woocommerce/editor-components/utils';
 
6
 
7
  /**
8
  * Internal dependencies
13
  * Get attribute data (name, taxonomy etc) from server data.
14
  *
15
  * @param {number} attributeId Attribute ID to look for.
16
+ * @param {Array|null} attributeList List of attributes.
17
  * @param {string} matchField Field to match on. e.g. id or slug.
18
  */
19
  const getAttributeData = ( attributeId, attributeList, matchField = 'id' ) => {
20
+ return Array.isArray( attributeList )
21
+ ? attributeList.find( ( attr ) => attr[ matchField ] === attributeId )
22
  : null;
23
  };
24
 
29
  */
30
  const withAttributes = ( OriginalComponent ) => {
31
  return ( props ) => {
32
+ const { selected = [] } = props;
33
+ const selectedSlug = selected.length ? selected[ 0 ].attr_slug : null;
34
+ const [ attributes, setAttributes ] = useState( null );
35
  const [ expandedAttribute, setExpandedAttribute ] = useState( 0 );
36
  const [ termsList, setTermsList ] = useState( {} );
37
  const [ loading, setLoading ] = useState( true );
39
  const [ error, setError ] = useState( null );
40
 
41
  useEffect( () => {
42
+ if ( attributes === null ) {
43
+ getAttributes()
44
+ .then( ( newAttributes ) => {
45
+ newAttributes = newAttributes.map( ( attribute ) => ( {
46
+ ...attribute,
47
+ parent: 0,
48
+ } ) );
 
49
 
50
+ setAttributes( newAttributes );
 
 
 
 
 
 
 
51
 
52
+ if ( selectedSlug ) {
53
+ const selectedAttributeFromTerm = getAttributeData(
54
+ selectedSlug,
55
+ newAttributes,
56
+ 'taxonomy'
57
  );
58
+
59
+ if ( selectedAttributeFromTerm ) {
60
+ setExpandedAttribute(
61
+ selectedAttributeFromTerm.id
62
+ );
63
+ }
64
  }
65
+ } )
66
+ .catch( async ( e ) => {
67
+ setError( await formatError( e ) );
68
+ } )
69
+ .finally( () => {
70
+ setLoading( false );
71
+ } );
72
+ }
73
+ }, [ attributes, selectedSlug ] );
74
 
75
  useEffect( () => {
76
+ const attributeData = getAttributeData(
77
+ expandedAttribute,
78
+ attributes
79
+ );
80
 
81
  if ( ! attributeData ) {
82
  return;
92
  attr_slug: attributeData.taxonomy,
93
  } ) );
94
 
95
+ setTermsList( ( previousTermsList ) => ( {
96
+ ...previousTermsList,
97
  [ expandedAttribute ]: newTerms,
98
+ } ) );
99
  } )
100
  .catch( async ( e ) => {
101
  setError( await formatError( e ) );
108
  return (
109
  <OriginalComponent
110
  { ...props }
111
+ attributes={ attributes || [] }
112
  error={ error }
113
  expandedAttribute={ expandedAttribute }
114
  onExpandAttribute={ setExpandedAttribute }
assets/js/icons/library/radio-unselected.js CHANGED
@@ -6,7 +6,7 @@ import { SVG } from 'wordpress-components';
6
  const radioUnselected = (
7
  <SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
8
  <path
9
- fill="#6C7781"
10
  d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
11
  />
12
  </SVG>
6
  const radioUnselected = (
7
  <SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
8
  <path
9
+ fill="#757575"
10
  d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
11
  />
12
  </SVG>
assets/js/payment-method-extensions/payment-methods/stripe/credit-card/use-checkout-subscriptions.js CHANGED
@@ -56,6 +56,7 @@ export const useCheckoutSubscriptions = (
56
  usePaymentIntents(
57
  stripe,
58
  onCheckoutAfterProcessingWithSuccess,
 
59
  emitResponse
60
  );
61
  usePaymentProcessing(
56
  usePaymentIntents(
57
  stripe,
58
  onCheckoutAfterProcessingWithSuccess,
59
+ setSourceId,
60
  emitResponse
61
  );
62
  usePaymentProcessing(
assets/js/payment-method-extensions/payment-methods/stripe/credit-card/use-element-options.js CHANGED
@@ -86,11 +86,11 @@ export const useElementOptions = ( overloadedOptions ) => {
86
  ? { showIcon: isActive }
87
  : {};
88
  return {
89
- ...options,
90
  style: {
91
- ...options.style,
92
  base: {
93
- ...options.style.base,
94
  '::placeholder': {
95
  color,
96
  },
86
  ? { showIcon: isActive }
87
  : {};
88
  return {
89
+ ...prevOptions,
90
  style: {
91
+ ...prevOptions.style,
92
  base: {
93
+ ...prevOptions.style.base,
94
  '::placeholder': {
95
  color,
96
  },
assets/js/payment-method-extensions/payment-methods/stripe/credit-card/use-payment-intents.js CHANGED
@@ -11,14 +11,22 @@ import { useEffect } from '@wordpress/element';
11
  /**
12
  * Opens the modal for PaymentIntent authorizations.
13
  *
14
- * @param {Stripe} stripe The stripe object.
15
- * @param {Object} paymentDetails The payment details from the server after checkout
16
- * processing.
17
- * @param {EmitResponseProps} emitResponse Various helpers for usage with observer response
18
- * objects.
 
 
19
  */
20
- const openIntentModal = ( stripe, paymentDetails, emitResponse ) => {
21
- const checkoutResponse = { type: emitResponse.responseTypes.SUCCESS };
 
 
 
 
 
 
22
  if (
23
  ! paymentDetails.setup_intent &&
24
  ! paymentDetails.payment_intent_secret
@@ -49,23 +57,48 @@ const openIntentModal = ( stripe, paymentDetails, emitResponse ) => {
49
  return checkoutResponse;
50
  } )
51
  .catch( function ( error ) {
52
- checkoutResponse.type = emitResponse.responseTypes.ERROR;
53
  checkoutResponse.message = error.message;
54
  checkoutResponse.retry = true;
55
- checkoutResponse.messageContext =
56
- emitResponse.noticeContexts.PAYMENTS;
57
  // Reports back to the server.
58
  window.fetch( verificationUrl + '&is_ajax' );
59
  return checkoutResponse;
60
  } );
61
  };
62
 
63
- export const usePaymentIntents = ( stripe, subscriber, emitResponse ) => {
 
 
 
 
 
64
  useEffect( () => {
65
- const unsubscribe = subscriber( ( { processingResponse } ) => {
66
  const paymentDetails = processingResponse.paymentDetails || {};
67
- return openIntentModal( stripe, paymentDetails, emitResponse );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  } );
69
  return () => unsubscribe();
70
- }, [ subscriber, stripe ] );
 
 
 
 
 
 
 
71
  };
11
  /**
12
  * Opens the modal for PaymentIntent authorizations.
13
  *
14
+ * @param {Object} params Params object.
15
+ * @param {Stripe} params.stripe The stripe object.
16
+ * @param {Object} params.paymentDetails The payment details from the
17
+ * server after checkout processing.
18
+ * @param {string} params.errorContext Context where errors will be added.
19
+ * @param {string} params.errorType Type of error responses.
20
+ * @param {string} params.successType Type of success responses.
21
  */
22
+ const openIntentModal = ( {
23
+ stripe,
24
+ paymentDetails,
25
+ errorContext,
26
+ errorType,
27
+ successType,
28
+ } ) => {
29
+ const checkoutResponse = { type: successType };
30
  if (
31
  ! paymentDetails.setup_intent &&
32
  ! paymentDetails.payment_intent_secret
57
  return checkoutResponse;
58
  } )
59
  .catch( function ( error ) {
60
+ checkoutResponse.type = errorType;
61
  checkoutResponse.message = error.message;
62
  checkoutResponse.retry = true;
63
+ checkoutResponse.messageContext = errorContext;
 
64
  // Reports back to the server.
65
  window.fetch( verificationUrl + '&is_ajax' );
66
  return checkoutResponse;
67
  } );
68
  };
69
 
70
+ export const usePaymentIntents = (
71
+ stripe,
72
+ subscriber,
73
+ setSourceId,
74
+ emitResponse
75
+ ) => {
76
  useEffect( () => {
77
+ const unsubscribe = subscriber( async ( { processingResponse } ) => {
78
  const paymentDetails = processingResponse.paymentDetails || {};
79
+ const response = await openIntentModal( {
80
+ stripe,
81
+ paymentDetails,
82
+ errorContext: emitResponse.noticeContexts.PAYMENTS,
83
+ errorType: emitResponse.responseTypes.ERROR,
84
+ successType: emitResponse.responseTypes.SUCCESS,
85
+ } );
86
+ if (
87
+ response.type === emitResponse.responseTypes.ERROR &&
88
+ response.retry
89
+ ) {
90
+ setSourceId( '0' );
91
+ }
92
+
93
+ return response;
94
  } );
95
  return () => unsubscribe();
96
+ }, [
97
+ subscriber,
98
+ emitResponse.noticeContexts.PAYMENTS,
99
+ emitResponse.responseTypes.ERROR,
100
+ emitResponse.responseTypes.SUCCESS,
101
+ setSourceId,
102
+ stripe,
103
+ ] );
104
  };
assets/js/settings/shared/index.js CHANGED
@@ -23,10 +23,15 @@ export { setSetting } from './set-setting';
23
  * to `rc`.
24
  *
25
  * @param {string} version Version to compare.
 
26
  * @param {string} operator Comparison operator.
27
  */
28
- export const compareWithWpVersion = ( version, operator ) => {
29
- let replacement = getSetting( 'wpVersion', '' ).replace(
 
 
 
 
30
  /-[a-zA-Z0-9]*[\-]*/,
31
  '.0-rc.'
32
  );
@@ -36,6 +41,22 @@ export const compareWithWpVersion = ( version, operator ) => {
36
  return compareVersions.compare( version, replacement, operator );
37
  };
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  export { compareVersions, getSetting };
40
 
41
  /**
23
  * to `rc`.
24
  *
25
  * @param {string} version Version to compare.
26
+ * @param {string} setting Setting name (e.g. wpVersion or wcVersion).
27
  * @param {string} operator Comparison operator.
28
  */
29
+ const compareVersionSettingIgnorePrerelease = (
30
+ version,
31
+ setting,
32
+ operator
33
+ ) => {
34
+ let replacement = getSetting( setting, '' ).replace(
35
  /-[a-zA-Z0-9]*[\-]*/,
36
  '.0-rc.'
37
  );
41
  return compareVersions.compare( version, replacement, operator );
42
  };
43
 
44
+ export const compareWithWpVersion = ( version, operator ) => {
45
+ return compareVersionSettingIgnorePrerelease(
46
+ version,
47
+ 'wpVersion',
48
+ operator
49
+ );
50
+ };
51
+
52
+ export const compareWithWooVersion = ( version, operator ) => {
53
+ return compareVersionSettingIgnorePrerelease(
54
+ version,
55
+ 'wcVersion',
56
+ operator
57
+ );
58
+ };
59
+
60
  export { compareVersions, getSetting };
61
 
62
  /**
assets/js/type-defs/hooks.js CHANGED
@@ -1,6 +1,7 @@
1
  /**
2
  * @typedef {import('./cart').CartData} CartData
3
  * @typedef {import('./cart').CartShippingAddress} CartShippingAddress
 
4
  */
5
 
6
  /**
@@ -75,6 +76,17 @@
75
  * the cart.
76
  */
77
 
 
 
 
 
 
 
 
 
 
 
 
78
  /**
79
  * @typedef {Object} EmitResponseTypes
80
  *
1
  /**
2
  * @typedef {import('./cart').CartData} CartData
3
  * @typedef {import('./cart').CartShippingAddress} CartShippingAddress
4
+ * @typedef {import('./contexts').StoreNoticeObject} StoreNoticeObject
5
  */
6
 
7
  /**
76
  * the cart.
77
  */
78
 
79
+ /**
80
+ * @typedef {Object} CheckoutNotices
81
+ *
82
+ * @property {StoreNoticeObject[]} checkoutNotices Array of notices in the
83
+ * checkout context.
84
+ * @property {StoreNoticeObject[]} expressPaymentNotices Array of notices in the
85
+ * express payment context.
86
+ * @property {StoreNoticeObject[]} paymentNotices Array of notices in the
87
+ * payment context.
88
+ */
89
+
90
  /**
91
  * @typedef {Object} EmitResponseTypes
92
  *
build/active-filters-frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'c929777a4dfa5faca8fe731949a82382');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '963fe3ad0e114e2b058b0e2d6cd3c383');
build/active-filters-frontend.js CHANGED
@@ -1,6 +1,6 @@
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=217)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},107:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(11),o=r.n(n),c=r(6),i=r.n(c),a=r(0),u=r(45);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,r=e.containers,n=e.getProps,c=void 0===n?function(){}:n,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==r.length&&Array.prototype.forEach.call(r,(function(e,r){var n=c(e,r),i=s(e,r),f=l(l({},e.dataset),n.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},n,{attributes:f})))),e)}))},b=function(e){var t=e.Block,r=e.getProps,n=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&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,c)})),p({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})},d=function(e){var t=document.body.querySelectorAll(f.join(","));b(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,c,i,a;r=l(l({},e),{},{wrapper:t}),n=r.Block,o=r.getProps,c=r.getErrorBoundaryProps,i=r.selector,a=r.wrapper.querySelectorAll(i),p({Block:n,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},11:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},110:function(e,t){},113:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(15),o=r(13),c=r(0),i=r(85),a=r(37),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,b=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 d=Object(c.useRef)({results:[],isLoading:!0}),g=Object(a.a)(f),m=Object(a.a)(s),y=Object(i.a)(),O=Object(o.useSelect)((function(e){if(!b)return null;var o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,g,m],i=o.getCollectionError.apply(o,c);return i&&y(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,r,m,g,b]);return null!==O&&(d.current=O),d.current}},125:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(50),u=function(e){var t=e.className,r=e.size,n=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),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"}))},s=React.createElement(u,null);t.a=s},126:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=r(14),i=r.n(c),a=r(3);r(4);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,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},128:function(e,t,r){"use strict";var n=r(0),o=r(2),c=r(15),i=r(13);t.a=function(e){return function(t){var r;return r=Object(n.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(r.current){var n=e(c.SCHEMA_STORE_KEY),o=n.isResolving,i=n.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(r.current).forEach((function(e){var t=r.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},13:function(e,t){!function(){e.exports=this.wp.data}()},14:function(e,t,r){var n=r(56);e.exports=function(e,t){if(null==e)return{};var r,o,c=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},141:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i}));var n=r(8),o=n.c.reduce((function(e,t){var r,n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;return n.id&&e.push(n),e}),[]),c=function(e){if(e)return o.find((function(t){return t.id===e}))},i=function(e){if(e)return o.find((function(t){return t.taxonomy===e}))}},142:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(7),o=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=e.filter((function(e){return e.attribute===r.taxonomy})),i=c.length?c[0]:null;if(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(o)){var a=i.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==r.taxonomy}));a.length>0&&(i.slug=a.sort(),u.push(i)),t(Object(n.sortBy)(u,"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",i=e.filter((function(e){return e.attribute!==r.taxonomy}));0===o.length?t(i):(i.push({attribute:r.taxonomy,operator:c,slug:Object(n.map)(o,"slug").sort()}),t(Object(n.sortBy)(i,"attribute")))}},146:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=(r(4),r(5)),u=r.n(a),s=r(1),l=r(126),f=r(125),p=(r(110),function(e){var t=e.text,r=e.screenReaderText,n=void 0===r?"":r,c=e.element,a=void 0===c?"li":c,s=e.className,l=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,b=e.children,d=void 0===b?null:b,g=i()(e,["text","screenReaderText","element","className","radius","children"]),m=a,y=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),O=Boolean(n&&n!==t);return React.createElement(m,o()({className:y},g),React.createElement("span",{"aria-hidden":O,className:"wc-block-components-chip__text"},t),O&&React.createElement("span",{className:"screen-reader-text"},n),d)});t.a=function(e){var t=e.ariaLabel,r=void 0===t?"":t,n=e.className,c=void 0===n?"":n,a=e.disabled,b=void 0!==a&&a,d=e.onRemove,g=void 0===d?function(){}:d,m=e.removeOnAnyClick,y=void 0!==m&&m,O=e.text,v=e.screenReaderText,h=void 0===v?"":v,j=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=y?"span":"button";if(!r){var w=h&&"string"==typeof h?h:O;r="string"!=typeof w?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),w)}var E={"aria-label":r,disabled:b,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},S=y?E:{},R=y?{"aria-hidden":!0}:E;return React.createElement(p,o()({},j,S,{className:u()(c,"is-removable"),element:y?"button":j.element,screenReaderText:h,text:O}),React.createElement(_,o()({className:"wc-block-components-chip__remove"},R),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},15:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},152:function(e,t,r){"use strict";r.d(t,"c",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"a",(function(){return g}));var n=r(6),o=r.n(n),c=r(24),i=r.n(c),a=r(2);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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l,f,p={code:a.CURRENCY.code,symbol:a.CURRENCY.symbol,thousandSeparator:a.CURRENCY.thousandSeparator,decimalSeparator:a.CURRENCY.decimalSeparator,minorUnit:a.CURRENCY.precision,prefix:(l=a.CURRENCY.symbol,f=a.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[f]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(a.CURRENCY.symbol,a.CURRENCY.symbolPosition)},b=function(e){if(!e||"object"!==i()(e))return p;var t=e.currency_code,r=e.currency_symbol,n=e.currency_thousand_separator,o=e.currency_decimal_separator,c=e.currency_minor_unit,a=e.currency_prefix,u=e.currency_suffix;return{code:t||"USD",symbol:r||"$",thousandSeparator:"string"==typeof n?n:",",decimalSeparator:"string"==typeof o?o:".",minorUnit:Number.isFinite(c)?c:2,prefix:"string"==typeof a?a:"$",suffix:"string"==typeof u?u:""}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},p),e)},g=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=d(t),o=r/Math.pow(10,n.minorUnit),c=n.prefix+o+n.suffix,i=document.createElement("textarea");return i.innerHTML=c,i.value}},17:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},18: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}},19:function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},2:function(e,t){!function(){e.exports=this.wc.wcSettings}()},217:function(e,t,r){e.exports=r(273)},218:function(e,t){},22:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(40);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){Object(n.a)(e,t,r[t])}))}return e}},24:function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},273:function(e,t,r){"use strict";r.r(t);var n=r(128),o=r(107),c=r(9),i=r.n(c),a=r(1),u=r(98),s=r(0),l=r(5),f=r.n(l),p=(r(4),r(33)),b=(r(218),r(141)),d=r(152),g=r(146),m=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(a.sprintf)(Object(a.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(d.a)(e),Object(d.a)(t)):Number.isFinite(e)?Object(a.sprintf)(Object(a.__)("From %s","woo-gutenberg-products-block"),Object(d.a)(e)):Object(a.sprintf)(Object(a.__)("Up to %s","woo-gutenberg-products-block"),Object(d.a)(t))},y=function(e){var t=e.type,r=e.name,n=e.prefix,o=e.removeCallback,c=void 0===o?function(){}:o,i=e.showLabel,u=void 0===i||i,s=e.displayStyle,l=n?React.createElement(React.Fragment,null,n," ",r):r,f=Object(a.sprintf)(Object(a.__)("Remove %s filter","woo-gutenberg-products-block"),r);return React.createElement("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},u&&React.createElement("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?React.createElement(g.a,{element:"span",text:l,onRemove:c,radius:"large",ariaLabel:f}):React.createElement("span",{className:"wc-block-active-filters__list-item-name"},l,React.createElement("button",{className:"wc-block-active-filters__list-item-remove",onClick:c},f)))},O=r(113),v=r(17),h=r(142),j=function(e){var t=e.attributeObject,r=void 0===t?{}:t,n=e.slugs,o=void 0===n?[]:n,c=e.operator,s=void 0===c?"in":c,l=e.displayStyle,f=Object(O.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[r.id]}),p=f.results,b=f.isLoading,d=Object(u.b)("attributes",[]),g=i()(d,2),m=g[0],j=g[1];if(b)return null;var _=r.label;return React.createElement("li",null,React.createElement("span",{className:"wc-block-active-filters__list-item-type"},_,":"),React.createElement("ul",null,o.map((function(e,t){var n=p.find((function(t){return t.slug===e}));if(!n)return null;var o="";return t>0&&"and"===s&&(o=React.createElement("span",{className:"wc-block-active-filters__list-item-operator"},Object(a.__)("and","woo-gutenberg-products-block"))),y({type:_,name:Object(v.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(h.a)(m,j,r,e)},showLabel:!1,displayStyle:l})}))))},_=function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(u.b)("attributes",[]),c=i()(o,2),l=c[0],d=c[1],g=Object(u.b)("min_price"),O=i()(g,2),v=O[0],h=O[1],_=Object(u.b)("max_price"),w=i()(_,2),E=w[0],S=w[1],R=Object(s.useMemo)((function(){return Number.isFinite(v)||Number.isFinite(E)?y({type:Object(a.__)("Price","woo-gutenberg-products-block"),name:m(v,E),removeCallback:function(){h(void 0),S(void 0)},displayStyle:t.displayStyle}):null}),[v,E,m]),x=Object(s.useMemo)((function(){return l.map((function(e){var r=Object(b.b)(e.attribute);return React.createElement(j,{attributeObject:r,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[l]);if(!(l.length>0||Number.isFinite(v)||Number.isFinite(E)||n))return null;var k="h".concat(t.headingLevel),P=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return React.createElement(s.Fragment,null,!n&&t.heading&&React.createElement(k,null,t.heading),React.createElement("div",{className:"wc-block-active-filters"},React.createElement("ul",{className:P},n?React.createElement(s.Fragment,null,y({type:Object(a.__)("Size","woo-gutenberg-products-block"),name:Object(a.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),y({type:Object(a.__)("Color","woo-gutenberg-products-block"),name:Object(a.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):React.createElement(s.Fragment,null,R,x)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){h(void 0),S(void 0),d([])}},React.createElement(p.a,{label:Object(a.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Clear All Filters","woo-gutenberg-products-block")}))))};Object(o.a)({selector:".wp-block-woocommerce-active-filters",Block:Object(n.a)(_),getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},29:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},3:function(e,t){!function(){e.exports=this.React}()},30:function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},31:function(e,t,r){var n=r(60);e.exports=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&&n(e,t)}},32:function(e,t,r){var n=r(24),o=r(18);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},33:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=(r(4),r(3)),i=r(5),a=r.n(i);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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=r,f=null!=n;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,n)):(t=o||c.Fragment,l&&f&&r!==n?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,u,r))}},36:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},37:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(36),c=r.n(o),i=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},39:function(e,t){!function(){e.exports=this.wp.blocks}()},4:function(e,t,r){e.exports=r(61)()},40:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},45:function(e,t,r){"use strict";var n=r(29),o=r.n(n),c=r(30),i=r.n(c),a=r(18),u=r.n(a),s=r(31),l=r.n(s),f=r(32),p=r.n(f),b=r(19),d=r.n(b),g=r(6),m=r.n(g),y=(r(4),r(3)),O=r(1),v=r(8),h=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.E,"img/block-error.svg"):t,n=e.header,o=void 0===n?Object(O.__)("Oops!","woo-gutenberg-products-block"):n,c=e.text,i=void 0===c?Object(O.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(O.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},r&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};r(63);function j(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=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p()(this,r)}}var _=function(e){l()(r,e);var t=j(r);function r(){var e;o()(this,r);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.header,r=e.imageUrl,n=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=this.state,a=i.errorMessage;return i.hasError?React.createElement(h,{errorMessage:n?a:null,header:t,imageUrl:r,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(y.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(y.Component);_.defaultProps={showErrorMessage:!0};t.a=_},5:function(e,t,r){var n;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===c)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},50:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(22),o=r(7),c=r(0),i=function(e){var t=Object(n.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(c.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},54:function(e,t,r){var n=r(55);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},55:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},56:function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},59: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},6:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},60:function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},61:function(e,t,r){"use strict";var n=r(62);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,c,i){if(i!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return r.PropTypes=r,r}},62:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},63:function(e,t){},7:function(e,t){!function(){e.exports=this.lodash}()},71:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},72:function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw c}}return r}}},73: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.")}},8:function(e,t,r){"use strict";r.d(t,"j",(function(){return o})),r.d(t,"w",(function(){return c})),r.d(t,"A",(function(){return i})),r.d(t,"t",(function(){return a})),r.d(t,"n",(function(){return u})),r.d(t,"q",(function(){return s})),r.d(t,"i",(function(){return l})),r.d(t,"B",(function(){return f})),r.d(t,"l",(function(){return p})),r.d(t,"m",(function(){return b})),r.d(t,"k",(function(){return d})),r.d(t,"c",(function(){return g})),r.d(t,"o",(function(){return m})),r.d(t,"p",(function(){return y})),r.d(t,"E",(function(){return v})),r.d(t,"F",(function(){return h})),r.d(t,"x",(function(){return j})),r.d(t,"a",(function(){return _})),r.d(t,"y",(function(){return w})),r.d(t,"b",(function(){return E})),r.d(t,"s",(function(){return S})),r.d(t,"g",(function(){return R})),r.d(t,"z",(function(){return P})),r.d(t,"h",(function(){return C})),r.d(t,"v",(function(){return N})),r.d(t,"u",(function(){return T})),r.d(t,"D",(function(){return A})),r.d(t,"C",(function(){return D})),r.d(t,"d",(function(){return U})),r.d(t,"e",(function(){return L})),r.d(t,"f",(function(){return B})),r.d(t,"r",(function(){return F})),r.d(t,"G",(function(){return M})),r.d(t,"H",(function(){return Y}));var n=r(2),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=(Object(n.getSetting)("max_columns",6),Object(n.getSetting)("min_columns",1),Object(n.getSetting)("default_columns",3),Object(n.getSetting)("max_rows",6),Object(n.getSetting)("min_rows",1),Object(n.getSetting)("default_rows",3),Object(n.getSetting)("min_height",500),Object(n.getSetting)("default_height",500),Object(n.getSetting)("placeholderImgSrc","")),u=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),s=Object(n.getSetting)("limitTags"),l=(Object(n.getSetting)("hasProducts",!0),Object(n.getSetting)("hasTags",!0),Object(n.getSetting)("homeUrl",""),Object(n.getSetting)("couponsEnabled",!0)),f=(Object(n.getSetting)("shippingEnabled",!0),Object(n.getSetting)("taxesEnabled",!0)),p=Object(n.getSetting)("displayItemizedTaxes",!1),b=Object(n.getSetting)("hasDarkEditorStyleSupport",!1),d=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),g=(Object(n.getSetting)("productCount",0),Object(n.getSetting)("attributes",[])),m=Object(n.getSetting)("isShippingCalculatorEnabled",!0),y=Object(n.getSetting)("isShippingCostHidden",!1),O=Object(n.getSetting)("woocommerceBlocksPhase",1),v=Object(n.getSetting)("wcBlocksAssetUrl",""),h=Object(n.getSetting)("wcBlocksBuildUrl",""),j=Object(n.getSetting)("shippingCountries",{}),_=Object(n.getSetting)("allowedCountries",{}),w=Object(n.getSetting)("shippingStates",{}),E=Object(n.getSetting)("allowedStates",{}),S=(Object(n.getSetting)("shippingMethodsExist",!1),Object(n.getSetting)("paymentGatewaySortOrder",[])),R=Object(n.getSetting)("checkoutShowLoginReminder",!0),x={id:0,title:"",permalink:""},k=Object(n.getSetting)("storePages",{shop:x,cart:x,checkout:x,privacy:x,terms:x}),P=k.shop.permalink,C=(k.checkout.id,k.checkout.permalink),N=k.privacy.permalink,T=k.privacy.title,A=k.terms.permalink,D=k.terms.title,U=(k.cart.id,k.cart.permalink),L=Object(n.getSetting)("checkoutAllowsGuest",!1),B=Object(n.getSetting)("checkoutAllowsSignup",!1),F=Object(n.getSetting)("loginUrl","/wp-login.php"),M=(r(39),function(){return O>2}),Y=function(){return O>1}},85:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(9),o=r.n(n),c=r(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},9:function(e,t,r){var n=r(71),o=r(72),c=r(54),i=r(73);e.exports=function(e,t){return n(e)||o(e,t)||c(e,t)||i()}},98:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return b}));var n=r(9),o=r.n(n),c=r(15),i=r(13),a=r(0),u=r(59),s=r(7),l=r(37),f=function(e){var t=Object(u.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])]},p=function(e,t,r){var n=Object(u.a)();r=r||n;var o=Object(i.useSelect)((function(n){return n(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(r,e,t)}),[r,e])]},b=function(e,t){var r=Object(u.a)(),n=f(t=t||r),c=o()(n,2),i=c[0],p=c[1],b=Object(l.a)(e),d=Object(a.useRef)(!1);return Object(a.useEffect)((function(){p(Object(s.assign)({},i,b)),d.current=!0}),[b]),d.current?[i,p]:[e,p]}}});
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=217)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,r){var n=r(71),o=r(72),c=r(54),i=r(73);e.exports=function(e,t){return n(e)||o(e,t)||c(e,t)||i()}},108:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(11),o=r.n(n),c=r(6),i=r.n(c),a=r(0),u=r(45);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,r=e.containers,n=e.getProps,c=void 0===n?function(){}:n,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==r.length&&Array.prototype.forEach.call(r,(function(e,r){var n=c(e,r),i=s(e,r),f=l(l({},e.dataset),n.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},n,{attributes:f})))),e)}))},b=function(e){var t=e.Block,r=e.getProps,n=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&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,c)})),p({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})},d=function(e){var t=document.body.querySelectorAll(f.join(","));b(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,c,i,a;r=l(l({},e),{},{wrapper:t}),n=r.Block,o=r.getProps,c=r.getErrorBoundaryProps,i=r.selector,a=r.wrapper.querySelectorAll(i),p({Block:n,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},11:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},111:function(e,t){},114:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(15),o=r(12),c=r(0),i=r(85),a=r(36),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,b=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 d=Object(c.useRef)({results:[],isLoading:!0}),g=Object(a.a)(f),m=Object(a.a)(s),y=Object(i.a)(),O=Object(o.useSelect)((function(e){if(!b)return null;var o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,g,m],i=o.getCollectionError.apply(o,c);return i&&y(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,r,m,g,b]);return null!==O&&(d.current=O),d.current}},12:function(e,t){!function(){e.exports=this.wp.data}()},126:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(50),u=function(e){var t=e.className,r=e.size,n=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),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"}))},s=React.createElement(u,null);t.a=s},127:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=r(14),i=r.n(c),a=r(2);r(4);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,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},129:function(e,t,r){"use strict";var n=r(0),o=r(3),c=r(15),i=r(12);t.a=function(e){return function(t){var r;return r=Object(n.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(r.current){var n=e(c.SCHEMA_STORE_KEY),o=n.isResolving,i=n.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(r.current).forEach((function(e){var t=r.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},14:function(e,t,r){var n=r(56);e.exports=function(e,t){if(null==e)return{};var r,o,c=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},142:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i}));var n=r(8),o=n.c.reduce((function(e,t){var r,n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;return n.id&&e.push(n),e}),[]),c=function(e){if(e)return o.find((function(t){return t.id===e}))},i=function(e){if(e)return o.find((function(t){return t.taxonomy===e}))}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(7),o=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=e.filter((function(e){return e.attribute===r.taxonomy})),i=c.length?c[0]:null;if(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(o)){var a=i.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==r.taxonomy}));a.length>0&&(i.slug=a.sort(),u.push(i)),t(Object(n.sortBy)(u,"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",i=e.filter((function(e){return e.attribute!==r.taxonomy}));0===o.length?t(i):(i.push({attribute:r.taxonomy,operator:c,slug:Object(n.map)(o,"slug").sort()}),t(Object(n.sortBy)(i,"attribute")))}},147:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=(r(4),r(5)),u=r.n(a),s=r(1),l=r(127),f=r(126),p=(r(111),function(e){var t=e.text,r=e.screenReaderText,n=void 0===r?"":r,c=e.element,a=void 0===c?"li":c,s=e.className,l=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,b=e.children,d=void 0===b?null:b,g=i()(e,["text","screenReaderText","element","className","radius","children"]),m=a,y=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),O=Boolean(n&&n!==t);return React.createElement(m,o()({className:y},g),React.createElement("span",{"aria-hidden":O,className:"wc-block-components-chip__text"},t),O&&React.createElement("span",{className:"screen-reader-text"},n),d)});t.a=function(e){var t=e.ariaLabel,r=void 0===t?"":t,n=e.className,c=void 0===n?"":n,a=e.disabled,b=void 0!==a&&a,d=e.onRemove,g=void 0===d?function(){}:d,m=e.removeOnAnyClick,y=void 0!==m&&m,O=e.text,v=e.screenReaderText,j=void 0===v?"":v,h=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=y?"span":"button";if(!r){var w=j&&"string"==typeof j?j:O;r="string"!=typeof w?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),w)}var E={"aria-label":r,disabled:b,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},S=y?E:{},R=y?{"aria-hidden":!0}:E;return React.createElement(p,o()({},h,S,{className:u()(c,"is-removable"),element:y?"button":h.element,screenReaderText:j,text:O}),React.createElement(_,o()({className:"wc-block-components-chip__remove"},R),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},15:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},153:function(e,t,r){"use strict";r.d(t,"c",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"a",(function(){return g}));var n=r(6),o=r.n(n),c=r(25),i=r.n(c),a=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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l,f,p={code:a.CURRENCY.code,symbol:a.CURRENCY.symbol,thousandSeparator:a.CURRENCY.thousandSeparator,decimalSeparator:a.CURRENCY.decimalSeparator,minorUnit:a.CURRENCY.precision,prefix:(l=a.CURRENCY.symbol,f=a.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[f]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(a.CURRENCY.symbol,a.CURRENCY.symbolPosition)},b=function(e){if(!e||"object"!==i()(e))return p;var t=e.currency_code,r=e.currency_symbol,n=e.currency_thousand_separator,o=e.currency_decimal_separator,c=e.currency_minor_unit,a=e.currency_prefix,u=e.currency_suffix;return{code:t||"USD",symbol:r||"$",thousandSeparator:"string"==typeof n?n:",",decimalSeparator:"string"==typeof o?o:".",minorUnit:Number.isFinite(c)?c:2,prefix:"string"==typeof a?a:"$",suffix:"string"==typeof u?u:""}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},p),e)},g=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=d(t),o=r/Math.pow(10,n.minorUnit),c=n.prefix+o+n.suffix,i=document.createElement("textarea");return i.innerHTML=c,i.value}},17:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},18: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}},2:function(e,t){!function(){e.exports=this.React}()},20:function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},217:function(e,t,r){e.exports=r(273)},218:function(e,t){},22:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(40);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){Object(n.a)(e,t,r[t])}))}return e}},25:function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},27:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},273:function(e,t,r){"use strict";r.r(t);var n=r(129),o=r(108),c=r(10),i=r.n(c),a=r(1),u=r(99),s=r(0),l=r(5),f=r.n(l),p=(r(4),r(34)),b=(r(218),r(142)),d=r(153),g=r(147),m=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(a.sprintf)(Object(a.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(d.a)(e),Object(d.a)(t)):Number.isFinite(e)?Object(a.sprintf)(Object(a.__)("From %s","woo-gutenberg-products-block"),Object(d.a)(e)):Object(a.sprintf)(Object(a.__)("Up to %s","woo-gutenberg-products-block"),Object(d.a)(t))},y=function(e){var t=e.type,r=e.name,n=e.prefix,o=e.removeCallback,c=void 0===o?function(){}:o,i=e.showLabel,u=void 0===i||i,s=e.displayStyle,l=n?React.createElement(React.Fragment,null,n," ",r):r,f=Object(a.sprintf)(Object(a.__)("Remove %s filter","woo-gutenberg-products-block"),r);return React.createElement("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},u&&React.createElement("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?React.createElement(g.a,{element:"span",text:l,onRemove:c,radius:"large",ariaLabel:f}):React.createElement("span",{className:"wc-block-active-filters__list-item-name"},l,React.createElement("button",{className:"wc-block-active-filters__list-item-remove",onClick:c},f)))},O=r(114),v=r(17),j=r(143),h=function(e){var t=e.attributeObject,r=void 0===t?{}:t,n=e.slugs,o=void 0===n?[]:n,c=e.operator,s=void 0===c?"in":c,l=e.displayStyle,f=Object(O.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[r.id]}),p=f.results,b=f.isLoading,d=Object(u.b)("attributes",[]),g=i()(d,2),m=g[0],h=g[1];if(b)return null;var _=r.label;return React.createElement("li",null,React.createElement("span",{className:"wc-block-active-filters__list-item-type"},_,":"),React.createElement("ul",null,o.map((function(e,t){var n=p.find((function(t){return t.slug===e}));if(!n)return null;var o="";return t>0&&"and"===s&&(o=React.createElement("span",{className:"wc-block-active-filters__list-item-operator"},Object(a.__)("and","woo-gutenberg-products-block"))),y({type:_,name:Object(v.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(j.a)(m,h,r,e)},showLabel:!1,displayStyle:l})}))))},_=function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(u.b)("attributes",[]),c=i()(o,2),l=c[0],d=c[1],g=Object(u.b)("min_price"),O=i()(g,2),v=O[0],j=O[1],_=Object(u.b)("max_price"),w=i()(_,2),E=w[0],S=w[1],R=Object(s.useMemo)((function(){return Number.isFinite(v)||Number.isFinite(E)?y({type:Object(a.__)("Price","woo-gutenberg-products-block"),name:m(v,E),removeCallback:function(){j(void 0),S(void 0)},displayStyle:t.displayStyle}):null}),[v,E,t.displayStyle,j,S]),x=Object(s.useMemo)((function(){return l.map((function(e){var r=Object(b.b)(e.attribute);return React.createElement(h,{attributeObject:r,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[l,t.displayStyle]);if(!(l.length>0||Number.isFinite(v)||Number.isFinite(E)||n))return null;var k="h".concat(t.headingLevel),P=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return React.createElement(s.Fragment,null,!n&&t.heading&&React.createElement(k,null,t.heading),React.createElement("div",{className:"wc-block-active-filters"},React.createElement("ul",{className:P},n?React.createElement(s.Fragment,null,y({type:Object(a.__)("Size","woo-gutenberg-products-block"),name:Object(a.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),y({type:Object(a.__)("Color","woo-gutenberg-products-block"),name:Object(a.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):React.createElement(s.Fragment,null,R,x)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){j(void 0),S(void 0),d([])}},React.createElement(p.a,{label:Object(a.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Clear All Filters","woo-gutenberg-products-block")}))))};Object(o.a)({selector:".wp-block-woocommerce-active-filters",Block:Object(n.a)(_),getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},30:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},31:function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},32:function(e,t,r){var n=r(60);e.exports=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&&n(e,t)}},33:function(e,t,r){var n=r(25),o=r(18);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},34:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=(r(4),r(2)),i=r(5),a=r.n(i);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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=r,f=null!=n;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,n)):(t=o||c.Fragment,l&&f&&r!==n?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,u,r))}},36:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(27),c=r.n(o),i=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},39:function(e,t){!function(){e.exports=this.wp.blocks}()},4:function(e,t,r){e.exports=r(61)()},40:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},45:function(e,t,r){"use strict";var n=r(30),o=r.n(n),c=r(31),i=r.n(c),a=r(18),u=r.n(a),s=r(32),l=r.n(s),f=r(33),p=r.n(f),b=r(20),d=r.n(b),g=r(6),m=r.n(g),y=(r(4),r(2)),O=r(1),v=r(8),j=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.E,"img/block-error.svg"):t,n=e.header,o=void 0===n?Object(O.__)("Oops!","woo-gutenberg-products-block"):n,c=e.text,i=void 0===c?Object(O.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(O.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},r&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};r(63);function h(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=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p()(this,r)}}var _=function(e){l()(r,e);var t=h(r);function r(){var e;o()(this,r);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.header,r=e.imageUrl,n=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=this.state,a=i.errorMessage;return i.hasError?React.createElement(j,{errorMessage:n?a:null,header:t,imageUrl:r,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(y.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(y.Component);_.defaultProps={showErrorMessage:!0};t.a=_},5:function(e,t,r){var n;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===c)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},50:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(22),o=r(7),c=r(0),i=function(e){var t=Object(n.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(c.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},54:function(e,t,r){var n=r(55);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},55:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},56:function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},59: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},6:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},60:function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},61:function(e,t,r){"use strict";var n=r(62);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,c,i){if(i!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return r.PropTypes=r,r}},62:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},63:function(e,t){},7:function(e,t){!function(){e.exports=this.lodash}()},71:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},72:function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw c}}return r}}},73: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.")}},8:function(e,t,r){"use strict";r.d(t,"j",(function(){return o})),r.d(t,"w",(function(){return c})),r.d(t,"A",(function(){return i})),r.d(t,"t",(function(){return a})),r.d(t,"n",(function(){return u})),r.d(t,"q",(function(){return s})),r.d(t,"i",(function(){return l})),r.d(t,"B",(function(){return f})),r.d(t,"l",(function(){return p})),r.d(t,"m",(function(){return b})),r.d(t,"k",(function(){return d})),r.d(t,"c",(function(){return g})),r.d(t,"o",(function(){return m})),r.d(t,"p",(function(){return y})),r.d(t,"E",(function(){return v})),r.d(t,"F",(function(){return j})),r.d(t,"x",(function(){return h})),r.d(t,"a",(function(){return _})),r.d(t,"y",(function(){return w})),r.d(t,"b",(function(){return E})),r.d(t,"s",(function(){return S})),r.d(t,"g",(function(){return R})),r.d(t,"z",(function(){return P})),r.d(t,"h",(function(){return C})),r.d(t,"v",(function(){return N})),r.d(t,"u",(function(){return T})),r.d(t,"D",(function(){return A})),r.d(t,"C",(function(){return D})),r.d(t,"d",(function(){return U})),r.d(t,"e",(function(){return L})),r.d(t,"f",(function(){return B})),r.d(t,"r",(function(){return F})),r.d(t,"G",(function(){return M}));var n=r(3),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=(Object(n.getSetting)("max_columns",6),Object(n.getSetting)("min_columns",1),Object(n.getSetting)("default_columns",3),Object(n.getSetting)("max_rows",6),Object(n.getSetting)("min_rows",1),Object(n.getSetting)("default_rows",3),Object(n.getSetting)("min_height",500),Object(n.getSetting)("default_height",500),Object(n.getSetting)("placeholderImgSrc","")),u=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),s=Object(n.getSetting)("limitTags"),l=(Object(n.getSetting)("hasProducts",!0),Object(n.getSetting)("hasTags",!0),Object(n.getSetting)("homeUrl",""),Object(n.getSetting)("couponsEnabled",!0)),f=(Object(n.getSetting)("shippingEnabled",!0),Object(n.getSetting)("taxesEnabled",!0)),p=Object(n.getSetting)("displayItemizedTaxes",!1),b=Object(n.getSetting)("hasDarkEditorStyleSupport",!1),d=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),g=(Object(n.getSetting)("productCount",0),Object(n.getSetting)("attributes",[])),m=Object(n.getSetting)("isShippingCalculatorEnabled",!0),y=Object(n.getSetting)("isShippingCostHidden",!1),O=Object(n.getSetting)("woocommerceBlocksPhase",1),v=Object(n.getSetting)("wcBlocksAssetUrl",""),j=Object(n.getSetting)("wcBlocksBuildUrl",""),h=Object(n.getSetting)("shippingCountries",{}),_=Object(n.getSetting)("allowedCountries",{}),w=Object(n.getSetting)("shippingStates",{}),E=Object(n.getSetting)("allowedStates",{}),S=(Object(n.getSetting)("shippingMethodsExist",!1),Object(n.getSetting)("paymentGatewaySortOrder",[])),R=Object(n.getSetting)("checkoutShowLoginReminder",!0),x={id:0,title:"",permalink:""},k=Object(n.getSetting)("storePages",{shop:x,cart:x,checkout:x,privacy:x,terms:x}),P=k.shop.permalink,C=(k.checkout.id,k.checkout.permalink),N=k.privacy.permalink,T=k.privacy.title,A=k.terms.permalink,D=k.terms.title,U=(k.cart.id,k.cart.permalink),L=Object(n.getSetting)("checkoutAllowsGuest",!1),B=Object(n.getSetting)("checkoutAllowsSignup",!1),F=Object(n.getSetting)("loginUrl","/wp-login.php"),M=(r(39),function(){return O>1})},85:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(10),o=r.n(n),c=r(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},96:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(2),o=function(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}},99:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return g})),r.d(t,"c",(function(){return m}));var n=r(10),o=r.n(n),c=r(15),i=r(12),a=r(0),u=r(59),s=r(96),l=r(27),f=r.n(l),p=r(7),b=r(36),d=function(e){var t=Object(u.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])]},g=function(e,t,r){var n=Object(u.a)();r=r||n;var o=Object(i.useSelect)((function(n){return n(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(r,e,t)}),[r,e,s])]},m=function(e,t){var r=Object(u.a)(),n=d(t=t||r),c=o()(n,2),i=c[0],l=c[1],g=Object(b.a)(i),m=Object(b.a)(e),y=Object(s.a)(m),O=Object(a.useRef)(!1);return Object(a.useEffect)((function(){f()(y,m)||(l(Object(p.assign)({},g,m)),O.current=!0)}),[g,m,y,l]),O.current?[i,l]:[e,l]}}});
build/active-filters.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', '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'), 'version' => '5f89cbbdb25655c770b9c0205d86daf8');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', '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'), 'version' => '920b701865c0d16ec1b2d1628326b96c');
build/active-filters.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["active-filters"]=function(e){function t(t){for(var r,o,a=t[0],u=t[1],l=t[2],b=0,f=[];b<a.length;b++)o=a[b],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&f.push(c[o][0]),c[o]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(t);f.length;)f.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,a=1;a<n.length;a++){var u=n[a];0!==c[u]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},c={4:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var s=u;return i.push([858,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},102:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=Object(r.createContext)("page"),i=function(){return Object(r.useContext)(c)};c.Provider},122:function(e,t){},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},152:function(e,t,n){"use strict";var r=n(21),c=n.n(r),i=n(24),o=n.n(i),a=n(22),u=n.n(a),l=n(23),s=n.n(l),b=n(12),f=n.n(b),p=n(0),d=n(6),g=n(1),m=n(4);function v(e){var t=e.level,n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(p.createElement)(m.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(m.Path,{d:n[t]})):null}function O(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=f()(e);if(t){var c=f()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var h=function(e){u()(n,e);var t=O(n);function n(){return c()(this,n),t.apply(this,arguments)}return o()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(p.createElement)(v,{level:e}),title:Object(g.sprintf)(Object(g.__)("Heading %d"),e),isActive:r,onClick:function(){return n(e)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.isCollapsed,r=void 0===n||n,c=t.minLevel,i=t.maxLevel,o=t.selectedLevel,a=t.onChange;return Object(p.createElement)(m.Toolbar,{isCollapsed:r,icon:Object(p.createElement)(v,{level:o}),controls:Object(d.range)(c,i).map((function(t){return e.createLevelControl(t,o,a)}))})}}]),n}(p.Component);t.a=h},155:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(11),c=n.n(r),i=n(0),o=function(){var e=Object(i.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},17:function(e,t){!function(){e.exports=this.wp.blocks}()},171:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return p}));var r=n(11),c=n.n(r),i=n(41),o=n(36),a=n(0),u=n(102),l=n(6),s=n(60),b=function(e){var t=Object(u.a)();e=e||t;var n=Object(o.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e])]},f=function(e,t,n){var r=Object(u.a)();n=n||r;var c=Object(o.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(a.useCallback)((function(t){l(n,e,t)}),[n,e])]},p=function(e,t){var n=Object(u.a)(),r=b(t=t||n),i=c()(r,2),o=i[0],f=i[1],p=Object(s.a)(e),d=Object(a.useRef)(!1);return Object(a.useEffect)((function(){f(Object(l.assign)({},o,p)),d.current=!0}),[p]),d.current?[o,f]:[e,f]}},185:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(14)),i=n(7),o=n.n(i);n(260);t.a=function(e){var t=e.className,n=e.headingLevel,i=e.onChange,a=e.heading,u="h".concat(n);return Object(r.createElement)(u,null,Object(r.createElement)(c.PlainText,{className:o()("wc-block-editor-components-title",t),value:a,onChange:i}))}},202:function(e,t){},206:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(41),c=n(36),i=n(0),o=n(155),a=n(60),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,l=void 0===u?[]:u,s=e.query,b=void 0===s?{}:s,f=e.shouldSelect,p=void 0===f||f;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var d=Object(i.useRef)({results:[],isLoading:!0}),g=Object(a.a)(b),m=Object(a.a)(l),v=Object(o.a)(),O=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],o=c.getCollectionError.apply(c,i);return o&&v(o),{results:c.getCollection.apply(c,i),isLoading:!c.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,p]);return null!==O&&(d.current=O),d.current}},25:function(e,t){!function(){e.exports=this.wp.compose}()},258:function(e,t,n){"use strict";n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return g}));var r=n(8),c=n.n(r),i=n(56),o=n.n(i),a=n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s,b,f={code:a.CURRENCY.code,symbol:a.CURRENCY.symbol,thousandSeparator:a.CURRENCY.thousandSeparator,decimalSeparator:a.CURRENCY.decimalSeparator,minorUnit:a.CURRENCY.precision,prefix:(s=a.CURRENCY.symbol,b=a.CURRENCY.symbolPosition,{left:s,left_space:" "+s,right:"",right_space:""}[b]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(a.CURRENCY.symbol,a.CURRENCY.symbolPosition)},p=function(e){if(!e||"object"!==o()(e))return f;var t=e.currency_code,n=e.currency_symbol,r=e.currency_thousand_separator,c=e.currency_decimal_separator,i=e.currency_minor_unit,a=e.currency_prefix,u=e.currency_suffix;return{code:t||"USD",symbol:n||"$",thousandSeparator:"string"==typeof r?r:",",decimalSeparator:"string"==typeof c?c:".",minorUnit:Number.isFinite(i)?i:2,prefix:"string"==typeof a?a:"$",suffix:"string"==typeof u?u:""}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(l({},f),e)},g=function(e,t){if(""===e||void 0===e)return"";var n=parseInt(e,10);if(!Number.isFinite(n))return"";var r=d(t),c=n/Math.pow(10,r.minorUnit),i=r.prefix+c+r.suffix,o=document.createElement("textarea");return o.innerHTML=i,o.value}},260:function(e,t){},270:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(5),c=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),i=function(e){if(e)return c.find((function(t){return t.id===e}))},o=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},271:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i}));var r=n(6),c=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]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),o=i.length?i[0]:null;if(o&&o.slug&&Array.isArray(o.slug)&&o.slug.includes(c)){var a=o.slug.filter((function(e){return e!==c})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(o.slug=a.sort(),u.push(o)),t(Object(r.sortBy)(u,"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,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",o=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(o):(o.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(o,"attribute")))}},276:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(27),o=n.n(i),a=n(0),u=(n(2),n(7)),l=n.n(u),s=n(1),b=n(61),f=n(283),p=(n(202),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,u=void 0===i?"li":i,s=e.className,b=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,d=e.children,g=void 0===d?null:d,m=o()(e,["text","screenReaderText","element","className","radius","children"]),v=u,O=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+p),h=Boolean(r&&r!==t);return Object(a.createElement)(v,c()({className:O},m),Object(a.createElement)("span",{"aria-hidden":h,className:"wc-block-components-chip__text"},t),h&&Object(a.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,u=e.disabled,d=void 0!==u&&u,g=e.onRemove,m=void 0===g?function(){}:g,v=e.removeOnAnyClick,O=void 0!==v&&v,h=e.text,j=e.screenReaderText,y=void 0===j?"":j,w=o()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=O?"span":"button";if(!n){var E=y&&"string"==typeof y?y:h;n="string"!=typeof E?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),E)}var S={"aria-label":n,disabled:d,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},k=O?S:{},x=O?{"aria-hidden":!0}:S;return Object(a.createElement)(p,c()({},w,k,{className:l()(i,"is-removable"),element:O?"button":w.element,screenReaderText:y,text:h}),Object(a.createElement)(_,c()({className:"wc-block-components-chip__remove"},x),Object(a.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},283:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(27),o=n.n(i),a=n(0),u=n(58),l=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(u.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.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},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},33:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},36:function(e,t){!function(){e.exports=this.wp.data}()},4:function(e,t){!function(){e.exports=this.wp.components}()},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},46:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},48:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(0),o=(n(2),n(9)),a=n(7),u=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;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=n,f=null!=r;return!b&&f?(t=c||"span",l=s(s({},l),{},{className:u()(l.className,"screen-reader-text")}),Object(i.createElement)(t,l,r)):(t=c||o.Fragment,b&&f&&n!==r?Object(i.createElement)(t,l,Object(i.createElement)("span",{"aria-hidden":"true"},n),Object(i.createElement)("span",{className:"screen-reader-text"},r)):Object(i.createElement)(t,l,n))}},5:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"K",(function(){return i})),n.d(t,"Q",(function(){return o})),n.d(t,"A",(function(){return a})),n.d(t,"C",(function(){return u})),n.d(t,"m",(function(){return l})),n.d(t,"B",(function(){return s})),n.d(t,"E",(function(){return b})),n.d(t,"o",(function(){return f})),n.d(t,"D",(function(){return p})),n.d(t,"n",(function(){return d})),n.d(t,"G",(function(){return g})),n.d(t,"v",(function(){return m})),n.d(t,"y",(function(){return v})),n.d(t,"s",(function(){return O})),n.d(t,"t",(function(){return h})),n.d(t,"u",(function(){return j})),n.d(t,"k",(function(){return y})),n.d(t,"M",(function(){return w})),n.d(t,"R",(function(){return _})),n.d(t,"q",(function(){return E})),n.d(t,"r",(function(){return S})),n.d(t,"p",(function(){return k})),n.d(t,"J",(function(){return x})),n.d(t,"c",(function(){return C})),n.d(t,"w",(function(){return R})),n.d(t,"x",(function(){return N})),n.d(t,"U",(function(){return L})),n.d(t,"V",(function(){return T})),n.d(t,"L",(function(){return H})),n.d(t,"a",(function(){return z})),n.d(t,"O",(function(){return D})),n.d(t,"b",(function(){return V})),n.d(t,"N",(function(){return B})),n.d(t,"F",(function(){return F})),n.d(t,"i",(function(){return U})),n.d(t,"P",(function(){return Y})),n.d(t,"h",(function(){return I})),n.d(t,"j",(function(){return Q})),n.d(t,"I",(function(){return K})),n.d(t,"H",(function(){return G})),n.d(t,"T",(function(){return W})),n.d(t,"S",(function(){return $})),n.d(t,"d",(function(){return q})),n.d(t,"e",(function(){return J})),n.d(t,"f",(function(){return X})),n.d(t,"g",(function(){return Z})),n.d(t,"z",(function(){return ee})),n.d(t,"Y",(function(){return ne})),n.d(t,"Z",(function(){return re})),n.d(t,"W",(function(){return ce})),n.d(t,"X",(function(){return ie}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),o=Object(r.getSetting)("showAvatars",!0),a=Object(r.getSetting)("max_columns",6),u=Object(r.getSetting)("min_columns",1),l=Object(r.getSetting)("default_columns",3),s=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),f=Object(r.getSetting)("default_rows",3),p=Object(r.getSetting)("min_height",500),d=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),m=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),v=Object(r.getSetting)("limitTags"),O=Object(r.getSetting)("hasProducts",!0),h=Object(r.getSetting)("hasTags",!0),j=Object(r.getSetting)("homeUrl",""),y=Object(r.getSetting)("couponsEnabled",!0),w=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),E=Object(r.getSetting)("displayItemizedTaxes",!1),S=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),k=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),x=Object(r.getSetting)("productCount",0),C=Object(r.getSetting)("attributes",[]),R=Object(r.getSetting)("isShippingCalculatorEnabled",!0),N=Object(r.getSetting)("isShippingCostHidden",!1),P=Object(r.getSetting)("woocommerceBlocksPhase",1),L=Object(r.getSetting)("wcBlocksAssetUrl",""),T=Object(r.getSetting)("wcBlocksBuildUrl",""),H=Object(r.getSetting)("shippingCountries",{}),z=Object(r.getSetting)("allowedCountries",{}),D=Object(r.getSetting)("shippingStates",{}),V=Object(r.getSetting)("allowedStates",{}),B=Object(r.getSetting)("shippingMethodsExist",!1),F=Object(r.getSetting)("paymentGatewaySortOrder",[]),U=Object(r.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},A=Object(r.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),Y=A.shop.permalink,I=A.checkout.id,Q=A.checkout.permalink,K=A.privacy.permalink,G=A.privacy.title,W=A.terms.permalink,$=A.terms.title,q=A.cart.id,J=A.cart.permalink,X=Object(r.getSetting)("checkoutAllowsGuest",!1),Z=Object(r.getSetting)("checkoutAllowsSignup",!1),ee=Object(r.getSetting)("loginUrl","/wp-login.php"),te=n(17),ne=function(e,t){if(P>2)return Object(te.registerBlockType)(e,t)},re=function(e,t){if(P>1)return Object(te.registerBlockType)(e,t)},ce=function(){return P>2},ie=function(){return P>1}},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(46),i=n.n(c),o=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},61:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(27),o=n.n(i),a=n(9);n(2);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,i=o()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},74:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(21),o=n.n(i),a=n(24),u=n.n(a),l=n(19),s=n.n(l),b=n(22),f=n.n(b),p=n(23),d=n.n(p),g=n(12),m=n.n(g),v=n(0),O=n(6),h=n(7),j=n.n(h),y=n(4),w=n(25);n(122);function _(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=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return d()(this,n)}}var E=function(e){f()(n,e);var t=_(n);function n(){var e;return o()(this,n),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return u()(n,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.label,i=n.checked,o=n.instanceId,a=n.className,u=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(o);return u&&(e=Object(O.isFunction)(u)?u(i):u),Object(v.createElement)(y.BaseControl,{id:b,help:e,className:j()("components-toggle-button-control",a)},Object(v.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(v.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var i={};return s===e.value?(i.isPrimary=!0,i["aria-pressed"]=!0):(i.isDefault=!0,i["aria-pressed"]=!1),Object(v.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},i),e.label)}))))}}]),n}(v.Component);t.a=Object(w.withInstanceId)(E)},858:function(e,t,n){e.exports=n(907)},859:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()},907:function(e,t,n){"use strict";n.r(t);var r=n(10),c=n.n(r),i=n(0),o=n(1),a=n(17),u=n(61),l=n(58),s=Object(i.createElement)(l.a,{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 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zm0-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})),b=n(7),f=n.n(b),p=n(14),d=n(4),g=n(152),m=n(185),v=n(74),O=n(11),h=n.n(O),j=n(171),y=(n(2),n(48)),w=(n(859),n(270)),_=n(258),E=n(276),S=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)(Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(_.a)(e),Object(_.a)(t)):Number.isFinite(e)?Object(o.sprintf)(Object(o.__)("From %s","woo-gutenberg-products-block"),Object(_.a)(e)):Object(o.sprintf)(Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(_.a)(t))},k=function(e){var t=e.type,n=e.name,r=e.prefix,c=e.removeCallback,a=void 0===c?function(){}:c,u=e.showLabel,l=void 0===u||u,s=e.displayStyle,b=r?Object(i.createElement)(i.Fragment,null,r," ",n):n,f=Object(o.sprintf)(Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),n);return Object(i.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+n},l&&Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?Object(i.createElement)(E.a,{element:"span",text:b,onRemove:a,radius:"large",ariaLabel:f}):Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-name"},b,Object(i.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:a},f)))},x=n(206),C=n(33),R=n(271),N=function(e){var t=e.attributeObject,n=void 0===t?{}:t,r=e.slugs,c=void 0===r?[]:r,a=e.operator,u=void 0===a?"in":a,l=e.displayStyle,s=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[n.id]}),b=s.results,f=s.isLoading,p=Object(j.b)("attributes",[]),d=h()(p,2),g=d[0],m=d[1];if(f)return null;var v=n.label;return Object(i.createElement)("li",null,Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},v,":"),Object(i.createElement)("ul",null,c.map((function(e,t){var r=b.find((function(t){return t.slug===e}));if(!r)return null;var c="";return t>0&&"and"===u&&(c=Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),k({type:v,name:Object(C.decodeEntities)(r.name||e),prefix:c,removeCallback:function(){Object(R.a)(g,m,n,e)},showLabel:!1,displayStyle:l})}))))},P=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(j.b)("attributes",[]),a=h()(c,2),u=a[0],l=a[1],s=Object(j.b)("min_price"),b=h()(s,2),p=b[0],d=b[1],g=Object(j.b)("max_price"),m=h()(g,2),v=m[0],O=m[1],_=Object(i.useMemo)((function(){return Number.isFinite(p)||Number.isFinite(v)?k({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:S(p,v),removeCallback:function(){d(void 0),O(void 0)},displayStyle:t.displayStyle}):null}),[p,v,S]),E=Object(i.useMemo)((function(){return u.map((function(e){var n=Object(w.b)(e.attribute);return Object(i.createElement)(N,{attributeObject:n,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[u]);if(!(u.length>0||Number.isFinite(p)||Number.isFinite(v)||r))return null;var x="h".concat(t.headingLevel),C=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(i.createElement)(i.Fragment,null,!r&&t.heading&&Object(i.createElement)(x,null,t.heading),Object(i.createElement)("div",{className:"wc-block-active-filters"},Object(i.createElement)("ul",{className:C},r?Object(i.createElement)(i.Fragment,null,k({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),k({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(i.createElement)(i.Fragment,null,_,E)),Object(i.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){d(void 0),O(void 0),l([])}},Object(i.createElement)(y.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},L=Object(d.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.displayStyle,a=t.heading,u=t.headingLevel;return Object(i.createElement)("div",{className:r},Object(i.createElement)(p.InspectorControls,{key:"inspector"},Object(i.createElement)(d.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(i.createElement)(v.a,{label:Object(o.__)("Display Style","woo-gutenberg-products-block"),value:c,options:[{label:Object(o.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(o.__)("Chips","woo-gutenberg-products-block"),value:"chips"}],onChange:function(e){return n({displayStyle:e})}}),Object(i.createElement)("p",null,Object(o.__)("Heading Level","woo-gutenberg-products-block")),Object(i.createElement)(g.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:u,onChange:function(e){return n({headingLevel:e})}}))),Object(i.createElement)(m.a,{headingLevel:u,heading:a,onChange:function(e){return n({heading:e})}}),Object(i.createElement)(d.Disabled,null,Object(i.createElement)(P,{attributes:t,isEditor:!0})))}));Object(a.registerBlockType)("woocommerce/active-filters",{title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(u.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Show the currently active product filters. Works in combination with the All Products and filters blocks.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{attributes:{}},attributes:{displayStyle:{type:"string",default:"list"},heading:{type:"string",default:Object(o.__)("Active filters","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:L,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(i.createElement)("div",c()({className:f()("is-loading",n)},r),Object(i.createElement)("span",{"aria-hidden":!0,className:"wc-block-active-product-filters__placeholder"}))}})}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["active-filters"]=function(e){function t(t){for(var r,o,a=t[0],u=t[1],l=t[2],b=0,f=[];b<a.length;b++)o=a[b],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&f.push(c[o][0]),c[o]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(t);f.length;)f.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,a=1;a<n.length;a++){var u=n[a];0!==c[u]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},c={4:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var s=u;return i.push([858,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},102:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=Object(r.createContext)("page"),i=function(){return Object(r.useContext)(c)};c.Provider},122:function(e,t){},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},152:function(e,t,n){"use strict";var r=n(22),c=n.n(r),i=n(25),o=n.n(i),a=n(23),u=n.n(a),l=n(24),s=n.n(l),b=n(12),f=n.n(b),p=n(0),d=n(6),g=n(1),m=n(4);function O(e){var t=e.level,n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(p.createElement)(m.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(m.Path,{d:n[t]})):null}function v(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=f()(e);if(t){var c=f()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var h=function(e){u()(n,e);var t=v(n);function n(){return c()(this,n),t.apply(this,arguments)}return o()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(p.createElement)(O,{level:e}),title:Object(g.sprintf)(Object(g.__)("Heading %d"),e),isActive:r,onClick:function(){return n(e)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.isCollapsed,r=void 0===n||n,c=t.minLevel,i=t.maxLevel,o=t.selectedLevel,a=t.onChange;return Object(p.createElement)(m.Toolbar,{isCollapsed:r,icon:Object(p.createElement)(O,{level:o}),controls:Object(d.range)(c,i).map((function(t){return e.createLevelControl(t,o,a)}))})}}]),n}(p.Component);t.a=h},155:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(11),c=n.n(r),i=n(0),o=function(){var e=Object(i.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},168:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(9),c=function(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}},17:function(e,t){!function(){e.exports=this.wp.blocks}()},172:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return m}));var r=n(11),c=n.n(r),i=n(41),o=n(36),a=n(0),u=n(102),l=n(168),s=n(43),b=n.n(s),f=n(6),p=n(58),d=function(e){var t=Object(u.a)();e=e||t;var n=Object(o.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},g=function(e,t,n){var r=Object(u.a)();n=n||r;var c=Object(o.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(a.useCallback)((function(t){l(n,e,t)}),[n,e,l])]},m=function(e,t){var n=Object(u.a)(),r=d(t=t||n),i=c()(r,2),o=i[0],s=i[1],g=Object(p.a)(o),m=Object(p.a)(e),O=Object(l.a)(m),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){b()(O,m)||(s(Object(f.assign)({},g,m)),v.current=!0)}),[g,m,O,s]),v.current?[o,s]:[e,s]}},186:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(14)),i=n(7),o=n.n(i);n(261);t.a=function(e){var t=e.className,n=e.headingLevel,i=e.onChange,a=e.heading,u="h".concat(n);return Object(r.createElement)(u,null,Object(r.createElement)(c.PlainText,{className:o()("wc-block-editor-components-title",t),value:a,onChange:i}))}},203:function(e,t){},207:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(41),c=n(36),i=n(0),o=n(155),a=n(58),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,l=void 0===u?[]:u,s=e.query,b=void 0===s?{}:s,f=e.shouldSelect,p=void 0===f||f;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var d=Object(i.useRef)({results:[],isLoading:!0}),g=Object(a.a)(b),m=Object(a.a)(l),O=Object(o.a)(),v=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],o=c.getCollectionError.apply(c,i);return o&&O(o),{results:c.getCollection.apply(c,i),isLoading:!c.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,p]);return null!==v&&(d.current=v),d.current}},259:function(e,t,n){"use strict";n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return g}));var r=n(8),c=n.n(r),i=n(60),o=n.n(i),a=n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s,b,f={code:a.CURRENCY.code,symbol:a.CURRENCY.symbol,thousandSeparator:a.CURRENCY.thousandSeparator,decimalSeparator:a.CURRENCY.decimalSeparator,minorUnit:a.CURRENCY.precision,prefix:(s=a.CURRENCY.symbol,b=a.CURRENCY.symbolPosition,{left:s,left_space:" "+s,right:"",right_space:""}[b]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(a.CURRENCY.symbol,a.CURRENCY.symbolPosition)},p=function(e){if(!e||"object"!==o()(e))return f;var t=e.currency_code,n=e.currency_symbol,r=e.currency_thousand_separator,c=e.currency_decimal_separator,i=e.currency_minor_unit,a=e.currency_prefix,u=e.currency_suffix;return{code:t||"USD",symbol:n||"$",thousandSeparator:"string"==typeof r?r:",",decimalSeparator:"string"==typeof c?c:".",minorUnit:Number.isFinite(i)?i:2,prefix:"string"==typeof a?a:"$",suffix:"string"==typeof u?u:""}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(l({},f),e)},g=function(e,t){if(""===e||void 0===e)return"";var n=parseInt(e,10);if(!Number.isFinite(n))return"";var r=d(t),c=n/Math.pow(10,r.minorUnit),i=r.prefix+c+r.suffix,o=document.createElement("textarea");return o.innerHTML=i,o.value}},26:function(e,t){!function(){e.exports=this.wp.compose}()},261:function(e,t){},271:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(5),c=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),i=function(e){if(e)return c.find((function(t){return t.id===e}))},o=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},272:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i}));var r=n(6),c=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]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),o=i.length?i[0]:null;if(o&&o.slug&&Array.isArray(o.slug)&&o.slug.includes(c)){var a=o.slug.filter((function(e){return e!==c})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(o.slug=a.sort(),u.push(o)),t(Object(r.sortBy)(u,"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,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",o=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(o):(o.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(o,"attribute")))}},277:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(27),o=n.n(i),a=n(0),u=(n(2),n(7)),l=n.n(u),s=n(1),b=n(61),f=n(284),p=(n(203),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,u=void 0===i?"li":i,s=e.className,b=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,d=e.children,g=void 0===d?null:d,m=o()(e,["text","screenReaderText","element","className","radius","children"]),O=u,v=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+p),h=Boolean(r&&r!==t);return Object(a.createElement)(O,c()({className:v},m),Object(a.createElement)("span",{"aria-hidden":h,className:"wc-block-components-chip__text"},t),h&&Object(a.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,u=e.disabled,d=void 0!==u&&u,g=e.onRemove,m=void 0===g?function(){}:g,O=e.removeOnAnyClick,v=void 0!==O&&O,h=e.text,j=e.screenReaderText,y=void 0===j?"":j,w=o()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=v?"span":"button";if(!n){var E=y&&"string"==typeof y?y:h;n="string"!=typeof E?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),E)}var S={"aria-label":n,disabled:d,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},k=v?S:{},x=v?{"aria-hidden":!0}:S;return Object(a.createElement)(p,c()({},w,k,{className:l()(i,"is-removable"),element:v?"button":w.element,screenReaderText:y,text:h}),Object(a.createElement)(_,c()({className:"wc-block-components-chip__remove"},x),Object(a.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},284:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(27),o=n.n(i),a=n(0),u=n(57),l=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(u.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.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},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},33:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},36:function(e,t){!function(){e.exports=this.wp.data}()},4:function(e,t){!function(){e.exports=this.wp.components}()},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},43:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},48:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(0),o=(n(2),n(9)),a=n(7),u=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;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=n,f=null!=r;return!b&&f?(t=c||"span",l=s(s({},l),{},{className:u()(l.className,"screen-reader-text")}),Object(i.createElement)(t,l,r)):(t=c||o.Fragment,b&&f&&n!==r?Object(i.createElement)(t,l,Object(i.createElement)("span",{"aria-hidden":"true"},n),Object(i.createElement)("span",{className:"screen-reader-text"},r)):Object(i.createElement)(t,l,n))}},5:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"K",(function(){return i})),n.d(t,"Q",(function(){return o})),n.d(t,"A",(function(){return a})),n.d(t,"C",(function(){return u})),n.d(t,"m",(function(){return l})),n.d(t,"B",(function(){return s})),n.d(t,"E",(function(){return b})),n.d(t,"o",(function(){return f})),n.d(t,"D",(function(){return p})),n.d(t,"n",(function(){return d})),n.d(t,"G",(function(){return g})),n.d(t,"v",(function(){return m})),n.d(t,"y",(function(){return O})),n.d(t,"s",(function(){return v})),n.d(t,"t",(function(){return h})),n.d(t,"u",(function(){return j})),n.d(t,"k",(function(){return y})),n.d(t,"M",(function(){return w})),n.d(t,"R",(function(){return _})),n.d(t,"q",(function(){return E})),n.d(t,"r",(function(){return S})),n.d(t,"p",(function(){return k})),n.d(t,"J",(function(){return x})),n.d(t,"c",(function(){return C})),n.d(t,"w",(function(){return R})),n.d(t,"x",(function(){return N})),n.d(t,"U",(function(){return L})),n.d(t,"V",(function(){return T})),n.d(t,"L",(function(){return H})),n.d(t,"a",(function(){return z})),n.d(t,"O",(function(){return D})),n.d(t,"b",(function(){return V})),n.d(t,"N",(function(){return B})),n.d(t,"F",(function(){return F})),n.d(t,"i",(function(){return U})),n.d(t,"P",(function(){return Y})),n.d(t,"h",(function(){return I})),n.d(t,"j",(function(){return Q})),n.d(t,"I",(function(){return K})),n.d(t,"H",(function(){return G})),n.d(t,"T",(function(){return W})),n.d(t,"S",(function(){return $})),n.d(t,"d",(function(){return q})),n.d(t,"e",(function(){return J})),n.d(t,"f",(function(){return X})),n.d(t,"g",(function(){return Z})),n.d(t,"z",(function(){return ee})),n.d(t,"Y",(function(){return ne})),n.d(t,"Z",(function(){return re})),n.d(t,"W",(function(){return ce})),n.d(t,"X",(function(){return ie}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),o=Object(r.getSetting)("showAvatars",!0),a=Object(r.getSetting)("max_columns",6),u=Object(r.getSetting)("min_columns",1),l=Object(r.getSetting)("default_columns",3),s=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),f=Object(r.getSetting)("default_rows",3),p=Object(r.getSetting)("min_height",500),d=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),m=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),O=Object(r.getSetting)("limitTags"),v=Object(r.getSetting)("hasProducts",!0),h=Object(r.getSetting)("hasTags",!0),j=Object(r.getSetting)("homeUrl",""),y=Object(r.getSetting)("couponsEnabled",!0),w=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),E=Object(r.getSetting)("displayItemizedTaxes",!1),S=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),k=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),x=Object(r.getSetting)("productCount",0),C=Object(r.getSetting)("attributes",[]),R=Object(r.getSetting)("isShippingCalculatorEnabled",!0),N=Object(r.getSetting)("isShippingCostHidden",!1),P=Object(r.getSetting)("woocommerceBlocksPhase",1),L=Object(r.getSetting)("wcBlocksAssetUrl",""),T=Object(r.getSetting)("wcBlocksBuildUrl",""),H=Object(r.getSetting)("shippingCountries",{}),z=Object(r.getSetting)("allowedCountries",{}),D=Object(r.getSetting)("shippingStates",{}),V=Object(r.getSetting)("allowedStates",{}),B=Object(r.getSetting)("shippingMethodsExist",!1),F=Object(r.getSetting)("paymentGatewaySortOrder",[]),U=Object(r.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},A=Object(r.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),Y=A.shop.permalink,I=A.checkout.id,Q=A.checkout.permalink,K=A.privacy.permalink,G=A.privacy.title,W=A.terms.permalink,$=A.terms.title,q=A.cart.id,J=A.cart.permalink,X=Object(r.getSetting)("checkoutAllowsGuest",!1),Z=Object(r.getSetting)("checkoutAllowsSignup",!1),ee=Object(r.getSetting)("loginUrl","/wp-login.php"),te=n(17),ne=function(e,t){if(P>2)return Object(te.registerBlockType)(e,t)},re=function(e,t){if(P>1)return Object(te.registerBlockType)(e,t)},ce=function(){return P>2},ie=function(){return P>1}},58:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(43),i=n.n(c),o=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},6:function(e,t){!function(){e.exports=this.lodash}()},61:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(27),o=n.n(i),a=n(9);n(2);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,i=o()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},74:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(22),o=n.n(i),a=n(25),u=n.n(a),l=n(19),s=n.n(l),b=n(23),f=n.n(b),p=n(24),d=n.n(p),g=n(12),m=n.n(g),O=n(0),v=n(6),h=n(7),j=n.n(h),y=n(4),w=n(26);n(122);function _(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=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return d()(this,n)}}var E=function(e){f()(n,e);var t=_(n);function n(){var e;return o()(this,n),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return u()(n,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.label,i=n.checked,o=n.instanceId,a=n.className,u=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(o);return u&&(e=Object(v.isFunction)(u)?u(i):u),Object(O.createElement)(y.BaseControl,{id:b,help:e,className:j()("components-toggle-button-control",a)},Object(O.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(O.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var i={};return s===e.value?(i.isPrimary=!0,i["aria-pressed"]=!0):(i.isDefault=!0,i["aria-pressed"]=!1),Object(O.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},i),e.label)}))))}}]),n}(O.Component);t.a=Object(w.withInstanceId)(E)},858:function(e,t,n){e.exports=n(907)},859:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()},907:function(e,t,n){"use strict";n.r(t);var r=n(10),c=n.n(r),i=n(0),o=n(1),a=n(17),u=n(61),l=n(57),s=Object(i.createElement)(l.a,{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 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zm0-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})),b=n(7),f=n.n(b),p=n(14),d=n(4),g=n(152),m=n(186),O=n(74),v=n(11),h=n.n(v),j=n(172),y=(n(2),n(48)),w=(n(859),n(271)),_=n(259),E=n(277),S=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)(Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(_.a)(e),Object(_.a)(t)):Number.isFinite(e)?Object(o.sprintf)(Object(o.__)("From %s","woo-gutenberg-products-block"),Object(_.a)(e)):Object(o.sprintf)(Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(_.a)(t))},k=function(e){var t=e.type,n=e.name,r=e.prefix,c=e.removeCallback,a=void 0===c?function(){}:c,u=e.showLabel,l=void 0===u||u,s=e.displayStyle,b=r?Object(i.createElement)(i.Fragment,null,r," ",n):n,f=Object(o.sprintf)(Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),n);return Object(i.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+n},l&&Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?Object(i.createElement)(E.a,{element:"span",text:b,onRemove:a,radius:"large",ariaLabel:f}):Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-name"},b,Object(i.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:a},f)))},x=n(207),C=n(33),R=n(272),N=function(e){var t=e.attributeObject,n=void 0===t?{}:t,r=e.slugs,c=void 0===r?[]:r,a=e.operator,u=void 0===a?"in":a,l=e.displayStyle,s=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[n.id]}),b=s.results,f=s.isLoading,p=Object(j.b)("attributes",[]),d=h()(p,2),g=d[0],m=d[1];if(f)return null;var O=n.label;return Object(i.createElement)("li",null,Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},O,":"),Object(i.createElement)("ul",null,c.map((function(e,t){var r=b.find((function(t){return t.slug===e}));if(!r)return null;var c="";return t>0&&"and"===u&&(c=Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),k({type:O,name:Object(C.decodeEntities)(r.name||e),prefix:c,removeCallback:function(){Object(R.a)(g,m,n,e)},showLabel:!1,displayStyle:l})}))))},P=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(j.b)("attributes",[]),a=h()(c,2),u=a[0],l=a[1],s=Object(j.b)("min_price"),b=h()(s,2),p=b[0],d=b[1],g=Object(j.b)("max_price"),m=h()(g,2),O=m[0],v=m[1],_=Object(i.useMemo)((function(){return Number.isFinite(p)||Number.isFinite(O)?k({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:S(p,O),removeCallback:function(){d(void 0),v(void 0)},displayStyle:t.displayStyle}):null}),[p,O,t.displayStyle,d,v]),E=Object(i.useMemo)((function(){return u.map((function(e){var n=Object(w.b)(e.attribute);return Object(i.createElement)(N,{attributeObject:n,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[u,t.displayStyle]);if(!(u.length>0||Number.isFinite(p)||Number.isFinite(O)||r))return null;var x="h".concat(t.headingLevel),C=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(i.createElement)(i.Fragment,null,!r&&t.heading&&Object(i.createElement)(x,null,t.heading),Object(i.createElement)("div",{className:"wc-block-active-filters"},Object(i.createElement)("ul",{className:C},r?Object(i.createElement)(i.Fragment,null,k({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),k({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(i.createElement)(i.Fragment,null,_,E)),Object(i.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){d(void 0),v(void 0),l([])}},Object(i.createElement)(y.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},L=Object(d.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.displayStyle,a=t.heading,u=t.headingLevel;return Object(i.createElement)("div",{className:r},Object(i.createElement)(p.InspectorControls,{key:"inspector"},Object(i.createElement)(d.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(i.createElement)(O.a,{label:Object(o.__)("Display Style","woo-gutenberg-products-block"),value:c,options:[{label:Object(o.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(o.__)("Chips","woo-gutenberg-products-block"),value:"chips"}],onChange:function(e){return n({displayStyle:e})}}),Object(i.createElement)("p",null,Object(o.__)("Heading Level","woo-gutenberg-products-block")),Object(i.createElement)(g.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:u,onChange:function(e){return n({headingLevel:e})}}))),Object(i.createElement)(m.a,{headingLevel:u,heading:a,onChange:function(e){return n({heading:e})}}),Object(i.createElement)(d.Disabled,null,Object(i.createElement)(P,{attributes:t,isEditor:!0})))}));Object(a.registerBlockType)("woocommerce/active-filters",{title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(u.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Show the currently active product filters. Works in combination with the All Products and filters blocks.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{attributes:{}},attributes:{displayStyle:{type:"string",default:"list"},heading:{type:"string",default:Object(o.__)("Active filters","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:L,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(i.createElement)("div",c()({className:f()("is-loading",n)},r),Object(i.createElement)("span",{"aria-hidden":!0,className:"wc-block-active-product-filters__placeholder"}))}})}});
build/all-products-frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', '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-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '010c33ae87c18c6b2c23122773b2c261');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', '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-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '027202f3d97cf22a352ed02987d6f6d0');
build/all-products-frontend.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(e){function t(t){for(var n,o,c=t[0],i=t[1],a=0,s=[];a<c.length;a++)o=c[a],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&s.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(u&&u(t);s.length;)s.shift()()}var n={},r={1:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.src=function(e){return o.p+""+({2:"atomic-block-components/add-to-cart",3:"atomic-block-components/button",4:"atomic-block-components/category-list",5:"atomic-block-components/image",6:"atomic-block-components/price",7:"atomic-block-components/rating",8:"atomic-block-components/sale-badge",9:"atomic-block-components/sku",10:"atomic-block-components/stock-indicator",11:"atomic-block-components/summary",12:"atomic-block-components/tag-list",13:"atomic-block-components/title",20:"vendors~atomic-block-components/price"}[e]||e)+"-frontend.js"}(e);var u=new Error;i=function(t){a.onerror=a.onload=null,clearTimeout(s);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",u.name="ChunkLoadError",u.type=o,u.request=c,n[1](u)}r[e]=void 0}};var s=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var a=0;a<c.length;a++)t(c[a]);var u=i;o(o.s=206)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(61)()},function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},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}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"w",(function(){return c})),n.d(t,"A",(function(){return i})),n.d(t,"t",(function(){return a})),n.d(t,"n",(function(){return u})),n.d(t,"q",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"B",(function(){return f})),n.d(t,"l",(function(){return p})),n.d(t,"m",(function(){return d})),n.d(t,"k",(function(){return m})),n.d(t,"c",(function(){return b})),n.d(t,"o",(function(){return h})),n.d(t,"p",(function(){return g})),n.d(t,"E",(function(){return y})),n.d(t,"F",(function(){return O})),n.d(t,"x",(function(){return j})),n.d(t,"a",(function(){return w})),n.d(t,"y",(function(){return k})),n.d(t,"b",(function(){return E})),n.d(t,"s",(function(){return S})),n.d(t,"g",(function(){return _})),n.d(t,"z",(function(){return P})),n.d(t,"h",(function(){return C})),n.d(t,"v",(function(){return N})),n.d(t,"u",(function(){return T})),n.d(t,"D",(function(){return A})),n.d(t,"C",(function(){return F})),n.d(t,"d",(function(){return M})),n.d(t,"e",(function(){return I})),n.d(t,"f",(function(){return B})),n.d(t,"r",(function(){return D})),n.d(t,"G",(function(){return L})),n.d(t,"H",(function(){return V}));var r=n(2),o=Object(r.getSetting)("currentUserIsAdmin",!1),c=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),f=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),p=Object(r.getSetting)("displayItemizedTaxes",!1),d=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),m=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),h=Object(r.getSetting)("isShippingCalculatorEnabled",!0),g=Object(r.getSetting)("isShippingCostHidden",!1),v=Object(r.getSetting)("woocommerceBlocksPhase",1),y=Object(r.getSetting)("wcBlocksAssetUrl",""),O=Object(r.getSetting)("wcBlocksBuildUrl",""),j=Object(r.getSetting)("shippingCountries",{}),w=Object(r.getSetting)("allowedCountries",{}),k=Object(r.getSetting)("shippingStates",{}),E=Object(r.getSetting)("allowedStates",{}),S=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),_=Object(r.getSetting)("checkoutShowLoginReminder",!0),x={id:0,title:"",permalink:""},R=Object(r.getSetting)("storePages",{shop:x,cart:x,checkout:x,privacy:x,terms:x}),P=R.shop.permalink,C=(R.checkout.id,R.checkout.permalink),N=R.privacy.permalink,T=R.privacy.title,A=R.terms.permalink,F=R.terms.title,M=(R.cart.id,R.cart.permalink),I=Object(r.getSetting)("checkoutAllowsGuest",!1),B=Object(r.getSetting)("checkoutAllowsSignup",!1),D=Object(r.getSetting)("loginUrl","/wp-login.php"),L=(n(39),function(){return v>2}),V=function(){return v>1}},function(e,t,n){var r=n(71),o=n(72),c=n(54),i=n(73);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||i()}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){var r=n(56);e.exports=function(e,t){if(null==e)return{};var n,o,c=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},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}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(40);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){Object(r.a)(e,t,n[t])}))}return e}},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(53);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(28);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(60);e.exports=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&&r(e,t)}},function(e,t,n){var r=n(24),o=n(18);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=(n(4),n(3)),i=n(5),a=n.n(i);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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=n,f=null!=r;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||c.Fragment,l&&f&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(46);var o=n(53);function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))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){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(36),c=n.n(o),i=function(e){var t=Object(r.useRef)();return c()(e,t.current)||(t.current=e),t.current}},,function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},,,,function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";var r=n(29),o=n.n(r),c=n(30),i=n.n(c),a=n(18),u=n.n(a),s=n(31),l=n.n(s),f=n(32),p=n.n(f),d=n(19),m=n.n(d),b=n(6),h=n.n(b),g=(n(4),n(3)),v=n(1),y=n(8),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.E,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,c=e.text,i=void 0===c?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(63);function j(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=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var w=function(e){l()(n,e);var t=j(n);function n(){var e;o()(this,n);for(var r=arguments.length,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),h()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=this.state,a=i.errorMessage;return i.hasError?React.createElement(O,{errorMessage:r?a:null,header:t,imageUrl:n,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(g.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(g.Component);w.defaultProps={showErrorMessage:!0};t.a=w},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.dom}()},,function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(22),o=n(7),c=n(0),i=function(e){var t=Object(r.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(c.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(46);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){var r=n(55);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=Object(r.createContext)("page"),c=function(){return Object(r.useContext)(o)};o.Provider},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(62);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},,function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(11)),c=r(n(56)),i=n(3),a=r(i),u=r(n(109)),s=r(n(18)),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 n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!l.und(n)||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,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return l.fun(e)?e.apply(void 0,n):e}function b(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(l.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return l.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var h,g,v=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.removeChild(s(t))}))},t}return u(t,e),t}(v),O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.removeChild(s(t))}))},t}u(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof v)&&(t[n]=r instanceof v?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(v);function j(e,t){h={fn:e,transform:t}}function w(e){g=e}var k,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},S=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function _(e){k=e}var x,R=function(){return Date.now()};function P(e){x=e}var C,N,T=function(e){return e.current};function A(e){C=e}var F=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return g},injectColorNames:w,get requestFrame(){return E},get cancelFrame(){return S},injectFrame:function(e,t){E=e,S=t},get interpolation(){return k},injectStringInterpolator:_,get now(){return R},injectNow:function(e){R=e},get defaultElement(){return x},injectDefaultElement:P,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return C},injectCreateAnimatedStyle:A,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),M=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:C(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),I=!1,B=new Set,D=function e(){if(!I)return!1;var t=R(),n=B,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,u=0;u<i.configs.length;u++){for(var s=i.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var m=s.fromValues[p],b=s.toValues[p],h=d.lastPosition,g=b instanceof v,y=Array.isArray(s.initialVelocity)?s.initialVelocity[p]:s.initialVelocity;if(g&&(b=b.getValue()),s.immediate)d.setValue(b),d.done=!0;else if("string"!=typeof m&&"string"!=typeof b){if(void 0!==s.duration)h=m+s.easing((t-d.startTime)/s.duration)*(b-m),l=t>=d.startTime+s.duration;else if(s.decay)h=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-h)<.1)&&(b=h);else{f=void 0!==d.lastTime?d.lastTime:t,y=void 0!==d.lastVelocity?d.lastVelocity:s.initialVelocity,t>f+64&&(f=t);for(var O=Math.floor(t-f),j=0;j<O;++j){h+=1*(y+=1*((-s.tension*(h-b)+-s.friction*y)/s.mass)/1e3)/1e3}var w=!(!s.clamp||0===s.tension)&&(m<b?h>b:h<b),k=Math.abs(y)<=s.precision,S=0===s.tension||Math.abs(b-h)<=s.precision;l=w||k&&S,d.lastVelocity=y,d.lastTime=t}g&&!s.toValues[p].done&&(l=!1),l?(d.value!==b&&(h=b),d.done=!0):a=!0,d.setValue(h),d.lastPosition=h}else d.setValue(b),d.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(B.delete(i),i.stop(!0))}return B.size?N?N():E(e):I=!1,I};function L(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return L({range:e,output:t,extrapolate:n});if(k&&"string"==typeof e.output[0])return k(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,u){var s=u?u(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,c[t],c[t+1],o[t],o[t+1],u,i,a,r.map)}}var V=function(e){function t(n,r,o,c){var i;return(i=e.call(this)||this).calc=void 0,i.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],i.calc=L(r,o,c),i}u(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=L(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var z=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}u(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new V(this,e,t,n)},t}(v),q=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new z(e)})),n}u(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(y),H=0,W=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=H++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=b(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(l.arr(i)||l.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var u={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:m(r,n)},a),s=u[i.delay]&&u[i.delay].to;u[i.delay]=o({},u[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,u=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},f=l.arr(u.to)||l.fun(u.to);a?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),a):f?n.runAsync(u,s):n.diff(u).start(s)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,B.has(t)||B.add(t),I||(I=!0,E(N||D));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,B.has(t)&&B.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,c=o({},r,b(r.to[t]));l.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,p=0;a=a.then((function(){return r.to((function(e){var t=o({},r,b(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,i===n.guid)return f=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return f}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,u=n.config,s=void 0===u?{}:u,f=n.reverse,b=n.attach,h=n.reset,v=n.immediate;if(f){var y=[a,c];c=y[0],a=y[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var O=b&&b(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},u=l.num(i),f=l.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!g[i],b=l.arr(i),y=!u&&!b&&!f,j=l.und(c[r])?i:c[r],w=u||b||f?i:1,E=m(s,r);O&&(w=O.animations[r].parent);var S,_=a.parent,x=a.interpolation,P=d(O?w.getPayload():w),C=i;y&&(C=k({range:[0,1],output:[i,i]})(1));var N,T=x&&x.getValue(),A=!l.und(_)&&a.animatedValues.some((function(e){return!e.done})),F=!l.equ(C,T),M=!l.equ(C,a.previous),I=!l.equ(E,a.config);if(h||M&&F||I){var B;if(u||f)_=x=a.parent||new z(j);else if(b)_=x=a.parent||new q(j);else if(y){var D=a.interpolation&&a.interpolation.calc(a.parent.value);D=void 0===D||h?j:D,a.parent?(_=a.parent).setValue(0,!1):_=new z(0);var L={output:[D,i]};a.interpolation?(x=a.interpolation,a.interpolation.updateConfig(L)):x=_.interpolate(L)}return P=d(O?w.getPayload():w),S=d(_.getPayload()),h&&!y&&_.setValue(j,!1),t.hasChanged=!0,S.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=A?e.lastVelocity:void 0,e.lastTime=A?e.lastTime:void 0,e.startTime=R(),e.done=!1,e.animatedStyles.clear()})),m(v,r)&&_.setValue(y?w:i,!1),o({},e,((B={})[r]=o({},a,{name:r,parent:_,interpolation:x,animatedValues:S,toValues:P,previous:C,config:E,fromValues:d(_.getValue()),immediate:m(v,r),initialVelocity:p(E.velocity,0),clamp:p(E.clamp,!1),precision:p(E.precision,.01),tension:p(E.tension,170),friction:p(E.friction,26),mass:p(E.mass,1),duration:E.duration,easing:p(E.easing,(function(e){return e})),decay:E.decay}),B))}return F?e:(y&&(_.setValue(1,!1),x.updateConfig({output:[C,C]})),_.done=!0,t.hasChanged=!0,o({},e,((N={})[r]=o({},e[r],{previous:C}),N)))}),this.animations),this.hasChanged)for(var j in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[j]=this.animations[j].interpolation,this.values[j]=this.animations[j].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),U=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=l.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new W,i=o?m(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],u=c[1];r.current=a;i.useImperativeHandle(u,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),u||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var f=r.current.map((function(e){return e.getValues()}));return o?[f,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:f},K=0,Q=function(e,t){return("function"==typeof t?e.map(t):d(t)).map(String)},Y=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:Q(t,r)},i)};function G(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var $=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=h.transform(t)),n.payload=t,n}return u(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+X(Z,Z,Z)),te=new RegExp("rgba"+X(Z,Z,Z,Z)),ne=new RegExp("hsl"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function ue(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ue(o,r,e+1/3),i=ue(o,r,e),a=ue(o,r,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,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|pe(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(fe(n[1]),de(n[2]),de(n[3])))>>>0:(n=re.exec(t))?(se(fe(n[1]),de(n[2]),de(n[3]))|pe(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var be=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,he=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}ve=Object.keys(ve).reduce((function(e,t){return ye.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ve);var je={};A((function(e){return new $(e)})),P("div"),_((function(e){var t=e.output.map((function(e){return e.replace(he,me)})).map((function(e){return e.replace(ge,me)})),n=t[0].match(be).map((function(){return[]}));t.forEach((function(e){e.match(be).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(be).map((function(t,r){return L(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(be,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),w(J),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),u="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var l=0===s.indexOf("--"),f=Oe(s,n[s],l);"float"===s&&(s="cssFloat"),l?e.style.setProperty(s,f):e.style[s]=f}for(var p in a){var d=u?p:je[p]||(je[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 we,ke,Ee=(we=function(e){return i.forwardRef((function(t,n){var r=f(),u=i.useRef(!0),s=i.useRef(null),p=i.useRef(null),d=i.useCallback((function(e){var t=s.current;s.current=new M(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(p,u,r)})),d(t);var m,b=s.current.getValue(),g=(b.scrollTop,b.scrollLeft,c(b,["scrollTop","scrollLeft"])),v=(m=e,!l.fun(m)||m.prototype instanceof a.Component?function(e){return p.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return a.createElement(e,o({},g,{ref:v}))}))},void 0===(ke=!1)&&(ke=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=ke?t[0].toLowerCase()+t.substring(1):t;return e[n]=we(n),e}),we)}),Se=Ee(["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=Ee,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=D,t.animated=Se,t.a=Se,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=F,t.useSpring=function(e){var t=l.fun(e),n=U(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=l.fun(t),c=m(t),a=i.useRef(),u=U(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]}})})),s=u[0],f=u[1],p=u[2],d=i.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:m(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&d(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,d,p]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=Y(r),u=a.lazy,s=void 0!==u&&u,l=(a.unique,a.reset),p=void 0!==l&&l,d=(a.enter,a.leave,a.update,a.onDestroyed),b=(a.keys,a.items,a.onFrame),h=a.onRest,g=a.onStart,v=a.ref,y=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=i.useRef(!1),w=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(w.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(w.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(w.current.instances).map((function(e){return e[1]}))}}})),w.current=function(e,t){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=Y(t),u=a.items,s=a.keys,l=a.initial,f=a.from,p=a.enter,d=a.leave,b=a.update,h=a.trail,g=void 0===h?0:h,v=a.unique,y=a.config,O=a.order,j=void 0===O?["enter","leave","update"]:O,w=Y(r),k=w.keys,E=w.items,S=o({},i.current),_=[].concat(i.deleted),x=Object.keys(S),R=new Set(x),P=new Set(s),C=s.filter((function(e){return!R.has(e)})),N=i.transitions.filter((function(e){return!e.destroyed&&!P.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return R.has(e)})),A=-g;for(;j.length;){switch(j.shift()){case"enter":C.forEach((function(e,t){v&&_.find((function(t){return t.originalKey===e}))&&(_=_.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],c=n&&void 0!==l?"initial":"enter";S[e]={slot:c,originalKey:e,key:v?String(e):K++,item:o,trail:A+=g,config:m(y,o,c),from:m(n&&void 0!==l?l||{}:f,o),to:m(p,o)}}));break;case"leave":N.forEach((function(e){var t=k.indexOf(e),n=E[t];_.unshift(o({},S[e],{slot:"leave",destroyed:!0,left:k[Math.max(0,t-1)],right:k[Math.min(k.length,t+1)],trail:A+=g,config:m(y,n,"leave"),to:m(d,n)})),delete S[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=u[t];S[e]=o({},S[e],{item:n,slot:"update",trail:A+=g,config:m(y,n,"update"),to:m(b,n)})}))}}var F=s.map((function(e){return S[e]}));return _.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=F.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),F=[].concat(F.slice(0,t),[r],F.slice(t))})),o({},i,{changed:C.length||N.length||T.length,first:n&&0===C.length,transitions:F,current:S,deleted:_,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,u=e.item;w.current.instances.has(a)||w.current.instances.set(a,new W);var l=w.current.instances.get(a),f=o({},y,{to:r,from:n,config:c,ref:v,onRest:function(n){w.current.mounted&&(e.destroyed&&(v||s||G(w,a),d&&d(u)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(v||s)&&w.current.deleted.length>0&&G(w),h&&h(u,t,n))},onStart:g&&function(){return g(u,t)},onFrame:b&&function(e){return b(u,t,e)},delay:i,reset:p&&"enter"===t});l.update(f),w.current.paused||l.start()})),i.useEffect((function(){return w.current.mounted=j.current=!0,function(){w.current.mounted=j.current=!1,Array.from(w.current.instances).map((function(e){return e[1].destroy()})),w.current.instances.clear()}}),[]),w.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:w.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];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,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=U},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(50),u=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,c=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},c),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},s=React.createElement(u,null),l=n(125),f=n(0);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=s;break;case"no-alt":t=l.a}return t?Object(f.cloneElement)(t,{size:e.size||20,className:e.className}):null}},function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}},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.")}},,function(e,t,n){"use strict";var r=n(22),o=n(10),c=n(27),i=n(0),a=n(68),u=n(50);t.a=function(e){var t=e.icon,n=void 0===t?null:t,s=e.size,l=Object(c.a)(e,["icon","size"]),f=s||20;if("string"==typeof n)return Object(i.createElement)(a.a,Object(o.a)({icon:n,size:f},l));if(n&&a.a===n.type)return Object(i.cloneElement)(n,Object(r.a)({size:f},l));var p=s||24;if("function"==typeof n)return n.prototype instanceof i.Component?Object(i.createElement)(n,Object(r.a)({size:p},l)):n(Object(r.a)({size:p},l));if(n&&("svg"===n.type||n.type===u.a)){var d=Object(r.a)({width:p,height:p},n.props,l);return Object(i.createElement)(u.a,d)}return Object(i.isValidElement)(n)?Object(i.cloneElement)(n,Object(r.a)({size:p},l)):n}},function(e,t,n){"use strict";var r=n(22),o=n(27),c=n(5),i=n.n(c),a=n(0);t.a=Object(a.forwardRef)((function(e,t){var n=e.href,c=e.target,u=e.isPrimary,s=e.isLarge,l=e.isSmall,f=e.isTertiary,p=e.isToggled,d=e.isBusy,m=e.isDefault,b=e.isLink,h=e.isDestructive,g=e.className,v=e.disabled,y=Object(o.a)(e,["href","target","isPrimary","isLarge","isSmall","isTertiary","isToggled","isBusy","isDefault","isLink","isDestructive","className","disabled"]),O=i()("components-button",g,{"is-button":m||u||s||l,"is-default":m||!u&&(s||l),"is-primary":u,"is-large":s,"is-small":l,"is-tertiary":f,"is-toggled":p,"is-busy":d,"is-link":b,"is-destructive":h}),j=void 0===n||v?"button":"a",w="a"===j?{href:n,target:c}:{type:"button",disabled:v};return Object(a.createElement)(j,Object(r.a)({},w,y,{className:O,ref:t}))}))},,,function(e,t){!function(){e.exports=this.wp.autop}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),o=n.n(r),c=n(88),i=n(0);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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=Object(c.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,a=e.setIsSuppressed,s=Object(i.useRef)(t);Object(i.useEffect)((function(){s.current=t}),[t]);var l=Object(i.useMemo)((function(){return{hasNoticesOfType:function(e){return s.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),f=Object(i.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))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(e,t)}}}),[n,o]);return u(u(u({notices:t},l),f),{},{setIsSuppressed:a})}},,function(e,t){!function(){e.exports=this.wp.deprecated}()},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(9),o=n.n(r),c=n(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},,,function(e,t,n){"use strict";n.d(t,"b",(function(){return N})),n.d(t,"a",(function(){return T}));var r=n(6),o=n.n(r),c=n(9),i=n.n(c),a=(n(4),n(0)),u=n(13),s=n(138),l=n(10),f=n(23),p=n.n(f);function d(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)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function i(e){d(c,r,o,i,a,"next",e)}function a(e){d(c,r,o,i,a,"throw",e)}i(void 0)}))}}var b=n(25),h=n(5),g=n.n(h),v=n(7),y=n(67),O=n(26),j=n(1),w=n(76);var k=Object(a.forwardRef)((function(e,t){var n=e.className,r=e.children,o=e.actions,c=void 0===o?[]:o,i=e.onRemove,u=void 0===i?v.noop:i;Object(a.useEffect)((function(){var e=setTimeout((function(){u()}),1e4);return function(){return clearTimeout(e)}}),[]);var s=g()(n,"components-snackbar");return c&&c.length>1&&(console.warn("Snackbar can only have 1 action, use Notice if your message require many messages"),c=[c[0]]),Object(a.createElement)("div",{ref:t,className:s,onClick:u,tabIndex:"0",role:"button",onKeyPress:u,label:Object(j.__)("Dismiss this notice")},Object(a.createElement)("div",{className:"components-snackbar__content"},r,c.map((function(e,t){var n=e.label,r=e.onClick,o=e.url;return Object(a.createElement)(w.a,{key:t,href:o,isTertiary:!0,onClick:function(e){e.stopPropagation(),r&&r(e)},className:"components-snackbar__action"},n)}))))}));var E=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,c=void 0===o?v.noop:o,i=Object(O.useReducedMotion)(),u=Object(a.useState)((function(){return new WeakMap})),s=Object(b.a)(u,1)[0],f=Object(y.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=m(p.a.mark((function t(n){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:s.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=m(p.a.mark((function e(t){return p.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});n=g()("components-snackbar-list",n);var d=function(e){return function(){return c(e.id)}};return Object(a.createElement)("div",{className:n},r,f.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(a.createElement)(y.animated.div,{key:n,style:r},Object(a.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(a.createElement)(k,Object(l.a)({},Object(v.omit)(t,["content"]),{onRemove:d(t)}),t.content)))})))},S=n(80),_=n(117),x=function(){var e=Object(_.a)().isEditor,t=Object(S.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var o=n.filter((function(e){return"snackbar"===e.type}));return React.createElement(E,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};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 P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),N=function(){return Object(a.useContext)(C)},T=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.createNoticeContainer,c=void 0===o||o,l=e.context,f=void 0===l?"wc/core":l,p=Object(u.useDispatch)("core/notices"),d=p.createNotice,m=p.removeNotice,b=Object(a.useState)(!1),h=i()(b,2),g=h[0],v=h[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(e,t,P(P({},n),{},{context:n.context||f}))}),[d,f]),O=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;m(e,t)}),[m,f]),j=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,P(P({},t),{},{type:"snackbar"}))}),[y]),w={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(f)}}),[f]).notices,createNotice:y,createSnackbarNotice:j,removeNotice:O,context:f,setIsSuppressed:v},k=g?null:React.createElement(s.a,{className:r,notices:w.notices}),E=g?null:React.createElement(x,null);return React.createElement(C.Provider,{value:w},c&&k,t,E)}},,,,,,,function(e,t){!function(){e.exports=this.wp.wordcount}()},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return d}));var r=n(9),o=n.n(r),c=n(15),i=n(13),a=n(0),u=n(59),s=n(7),l=n(37),f=function(e){var t=Object(u.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e])]},p=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(i.useSelect)((function(r){return r(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e])]},d=function(e,t){var n=Object(u.a)(),r=f(t=t||n),c=o()(r,2),i=c[0],p=c[1],d=Object(l.a)(e),m=Object(a.useRef)(!1);return Object(a.useEffect)((function(){p(Object(s.assign)({},i,d)),m.current=!0}),[d]),m.current?[i,p]:[e,p]}},function(e,t,n){"use strict";var r=n(10),o=n(0),c=n(7);var i=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(c.upperFirst)(Object(c.camelCase)(t)),"(").concat(i,")"),r}},a=new WeakMap;function u(e,t){return Object(o.useMemo)((function(){var n=function(e){var t=a.get(e)||0;return a.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}t.a=i((function(e){return function(t){var n=u(e);return Object(o.createElement)(e,Object(r.a)({},t,{instanceId:n}))}}),"withInstanceId")},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(29),i=n.n(c),a=n(30),u=n.n(a),s=n(18),l=n.n(s),f=n(31),p=n.n(f),d=n(32),m=n.n(d),b=n(19),h=n.n(b),g=n(6),v=n.n(g),y=n(3);n(127);function O(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=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=O(r);function r(){var e;return i()(this,r),e=n.call(this),v()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),v()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),v()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(y.createRef)(),e}return u()(r,[{key:"render",value:function(){return React.createElement(y.Fragment,null,React.createElement("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),React.createElement(e,o()({},this.props,{scrollToTop:this.scrollToTop})))}}]),r}(y.Component);return t.displayName="withScrollToTop",t}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(11),o=n.n(r),c=n(6),i=n.n(c),a=n(0),u=n(45);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;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,n=e.containers,r=e.getProps,c=void 0===r?function(){}:r,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=c(e,n),i=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:f})))),e)}))},d=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&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,c)})),p({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})},m=function(e){var t=document.body.querySelectorAll(f.join(","));d(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,c,i,a;n=l(l({},e),{},{wrapper:t}),r=n.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){},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(13),c=n(0),i=n(85),a=n(37),u=function(e){var t=e.namespace,n=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||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var m=Object(c.useRef)({results:[],isLoading:!0}),b=Object(a.a)(f),h=Object(a.a)(s),g=Object(i.a)(),v=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),c=[t,n,b,h],i=o.getCollectionError.apply(o,c);return i&&g(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,n,h,b,d]);return null!==v&&(m.current=v),m.current}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=(n(13),Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}})),c=function(){return Object(r.useContext)(o)}},function(e,t,n){"use strict";var r=n(0),o=n(7),c=n(5),i=n.n(c),a=n(1),u=n(76),s=n(10),l=n(27);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}var m=n(65),b=n(12);function h(e,t){return!t||"object"!==Object(m.a)(t)&&"function"!=typeof t?Object(b.a)(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(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)}var O=n(25),j=n(47),w=n(49),k=n(82),E=n.n(k),S=n(26),_=n(22),x=function(){return"rtl"===document.documentElement.dir};function R(e,t,n,r){var o=t.width;"left"===n&&x()?n="right":"right"===n&&x()&&(n="left");var c,i=Math.round(e.left+e.width/2),a={popoverLeft:i,contentWidth:(i-o/2>0?o/2:i)+(i+o/2>window.innerWidth?window.innerWidth-i:o/2)},u="middle"===r?e.left:i,s={popoverLeft:u,contentWidth:u-o>0?o:u},l="middle"===r?e.right:i,f={popoverLeft:l,contentWidth:l+o>window.innerWidth?window.innerWidth-l:o},p=null;if("center"===n&&a.contentWidth===o)c="center";else if("left"===n&&s.contentWidth===o)c="left";else if("right"===n&&f.contentWidth===o)c="right";else{var d="left"===(c=s.contentWidth>f.contentWidth?"left":"right")?s.contentWidth:f.contentWidth;p=d!==o?d:null}return{xAxis:c,popoverLeft:"center"===c?a.popoverLeft:"left"===c?s.popoverLeft:f.popoverLeft,contentWidth:p}}function P(e,t,n){var r,o=t.height,c=e.top+e.height/2,i={popoverTop:c,contentHeight:(c-o/2>0?o/2:c)+(c+o/2>window.innerHeight?window.innerHeight-c:o/2)},a={popoverTop:e.top,contentHeight:e.top-10-o>0?o:e.top-10},u={popoverTop:e.bottom,contentHeight:e.bottom+10+o>window.innerHeight?window.innerHeight-10-e.bottom:o},s=null;if("middle"===n&&i.contentHeight===o)r="middle";else if("top"===n&&a.contentHeight===o)r="top";else if("bottom"===n&&u.contentHeight===o)r="bottom";else{var l="top"===(r=a.contentHeight>u.contentHeight?"top":"bottom")?a.contentHeight:u.contentHeight;s=l!==o?l:null}return{yAxis:r,popoverTop:"middle"===r?i.popoverTop:"top"===r?a.popoverTop:u.popoverTop,contentHeight:s}}var C=n(35),N=Object(r.createContext)({focusHistory:[]}),T=N.Provider,A=N.Consumer;T.displayName="FocusReturnProvider",A.displayName="FocusReturnConsumer";r.Component;var F=Object(S.createHigherOrderComponent)((function e(t){if((c=t)instanceof r.Component||"function"==typeof c){var n=t;return e({})(n)}var c,i=t.onFocusReturn,a=void 0===i?o.stubTrue:i;return function(e){var t=function(t){function n(){var e;return f(this,n),(e=h(this,g(n).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 y(n,t),d(n,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==a())for(var r,c=[].concat(Object(C.a)(o.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(C.a)(n)))),[e]);r=c.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))}}]),n}(r.Component);return function(e){return Object(r.createElement)(A,null,(function(n){return Object(r.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn"),M=Object(S.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return f(this,n),(e=h(this,g(n).apply(this,arguments))).focusContainRef=Object(r.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(b.a)(e)),e}return y(n,t),d(n,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===w.TAB){var t=j.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))}}]),n}(r.Component)}),"withConstrainedTabbing"),I=["button","submit"];var B=Object(S.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return f(this,n),(e=h(this,g(n).apply(this,arguments))).bindNode=e.bindNode.bind(Object(b.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(b.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(b.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(b.a)(e)),e}return y(n,t),d(n,[{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(o.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(o.includes)(I,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,Object(s.a)({ref:this.bindNode},this.props)))}}]),n}(r.Component)}),"withFocusOutside")(function(e){function t(){return f(this,t),h(this,g(t).apply(this,arguments))}return y(t,e),d(t,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),t}(r.Component));var D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,o=e.className,c=void 0===o?"lockscroll":o,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](c),n.documentElement.classList[r](c),e||(t.scrollTop=a)}function s(){0===i&&u(!0),++i}function l(){1===i&&u(!1),--i}return function(e){function t(){return f(this,t),h(this,g(t).apply(this,arguments))}return y(t,e),d(t,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),t}(r.Component)}();function L(e){e.stopPropagation()}var V=Object(r.forwardRef)((function(e,t){var n=e.children,o=Object(l.a)(e,["children"]);return Object(r.createElement)("div",Object(s.a)({},o,{ref:t,onMouseDown:L}),n)})),z=Object(r.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),q=z.Provider,H=z.Consumer,W=(r.Component,0);function U(e){var t=e.name,n=e.children,c=e.registerFill,i=e.unregisterFill,a=function(e){var t=Object(r.useContext)(z),n=t.getSlot,o=t.subscribe,c=Object(r.useState)(n(e)),i=Object(O.a)(c,2),a=i[0],u=i[1];return Object(r.useEffect)((function(){return u(n(e)),o((function(){u(n(e))}))}),[e]),a}(t),u=Object(r.useRef)({name:t,children:n});return u.current.occurrence||(u.current.occurrence=++W),Object(r.useLayoutEffect)((function(){return c(t,u.current),function(){return i(t,u.current)}}),[]),Object(r.useLayoutEffect)((function(){u.current.children=n,a&&!a.props.bubblesVirtually&&a.forceUpdate()}),[n]),Object(r.useLayoutEffect)((function(){t!==u.current.name&&(i(u.current.name,u.current),u.current.name=t,c(t,u.current))}),[t]),a&&a.node&&a.props.bubblesVirtually?(Object(o.isFunction)(n)&&(n=n(a.props.fillProps)),Object(r.createPortal)(n,a.node)):null}var K=function(e){return Object(r.createElement)(H,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(r.createElement)(U,Object(s.a)({},e,{registerFill:n,unregisterFill:o}))}))},Q=function(e){function t(){var e;return f(this,t),(e=h(this,g(t).apply(this,arguments))).bindNode=e.bindNode.bind(Object(b.a)(e)),e}return y(t,e),d(t,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){(0,this.props.unregisterSlot)(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.name,r=t.unregisterSlot,o=t.registerSlot;e.name!==n&&(r(e.name),o(n,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,c=e.bubblesVirtually,i=void 0!==c&&c,a=e.fillProps,u=void 0===a?{}:a,s=e.getFills,l=e.className;if(i)return Object(r.createElement)("div",{ref:this.bindNode,className:l});var f=Object(o.map)(s(n,this),(function(e){var t=e.occurrence,n=Object(o.isFunction)(e.children)?e.children(u):e.children;return r.Children.map(n,(function(e,n){if(!e||Object(o.isString)(e))return e;var c="".concat(t,"---").concat(e.key||n);return Object(r.cloneElement)(e,{key:c})}))})).filter(Object(o.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(o.isFunction)(t)?t(f):f)}}]),t}(r.Component),Y=function(e){return Object(r.createElement)(H,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,c=t.getFills;return Object(r.createElement)(Q,Object(s.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:c}))}))},G=n(40);var $=function(e){var t=e.type,n=e.options,r=void 0===n?{}:n,o=e.children;if("appear"===t){var c,a=r.origin,u=(void 0===a?"top":a).split(" "),s=Object(O.a)(u,2),l=s[0],f=s[1],p=void 0===f?"center":f;return o({className:i()("components-animate__appear",(c={},Object(G.a)(c,"is-from-"+p,"center"!==p),Object(G.a)(c,"is-from-"+l,"middle"!==l),c))})}if("slide-in"===t){var d=r.origin,m=void 0===d?"left":d;return o({className:i()("components-animate__slide-in","is-from-"+m)})}return o("loading"===t?{className:i()("components-animate__loading")}:{})},J=M(F((function(e){return e.children})));function Z(e,t){var n=window.getComputedStyle(t),r=n.paddingTop,o=n.paddingBottom,c=n.paddingLeft,i=n.paddingRight,a=r?parseInt(r,10):0,u=o?parseInt(o,10):0,s=c?parseInt(c,10):0,l=i?parseInt(i,10):0;return{x:e.left+s,y:e.top+a,width:e.width-s-l,height:e.height-a-u,left:e.left+s,right:e.right-l,top:e.top+a,bottom:e.bottom-u}}function X(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function te(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var ne=function(e){var t=e.headerTitle,n=e.onClose,o=e.onKeyDown,c=e.children,a=e.className,u=e.noArrow,f=void 0!==u&&u,p=e.position,d=void 0===p?"top":p,m=(e.range,e.focusOnMount),b=void 0===m?"firstElement":m,h=e.anchorRef,g=e.shouldAnchorIncludePadding,v=e.anchorVerticalBuffer,y=e.anchorHorizontalBuffer,k=e.anchorRect,x=e.getAnchorRect,C=e.expandOnMobile,N=e.animate,T=void 0===N||N,A=e.onClickOutside,F=e.onFocusOutside,M=Object(l.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorVerticalBuffer","anchorHorizontalBuffer","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside"]),I=Object(r.useRef)(null),L=Object(r.useRef)(null),z=Object(r.useRef)(),q=Object(r.useRef)(),W=Object(S.useViewportMatch)("medium","<"),U=Object(r.useState)(),Q=Object(O.a)(U,2),Y=Q[0],G=Q[1],ne=C&&W;f=ne||f,Object(r.useEffect)((function(){var e=z.current,t=L.current;if(ne)return te(e,"is-without-arrow",f),X(e,"data-x-axis"),X(e,"data-y-axis"),ee(e,"top"),ee(e,"left"),ee(t,"maxHeight"),void ee(t,"maxWidth");var n=function(){var n=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)return;if(r instanceof window.Range)return Object(j.getRectangleFromRange)(r);var c=r.getBoundingClientRect();return o?c:Z(c,r)}if(e.current){var i=e.current.parentNode,a=i.getBoundingClientRect();return o?a:Z(a,i)}}(I,k,x,h,g);if(n){n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{x:e.left-n,y:e.top-t,width:e.width+2*n,height:e.height+2*t,left:e.left-n,right:e.right+n,top:e.top-t,bottom:e.bottom+t}}(n,v,y),q.current||(q.current=t.getBoundingClientRect());var r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=n.split(" "),o=Object(O.a)(r,2),c=o[0],i=o[1],a=void 0===i?"center":i,u=P(e,t,c),s=R(e,t,a,u.yAxis);return Object(_.a)({},s,u)}(n,q.current,d),o=r.popoverTop,c=r.popoverLeft,i=r.xAxis,a=r.yAxis,u=r.contentHeight,s=r.contentWidth;te(e,"is-without-arrow",f||"center"===i&&"middle"===a),X(e,"data-x-axis",i),X(e,"data-y-axis",a),ee(e,"top","number"==typeof o?o+"px":""),ee(e,"left","number"==typeof c?c+"px":""),ee(t,"maxHeight","number"==typeof u?u+"px":""),ee(t,"maxWidth","number"==typeof s?s+"px":"");G(({left:"right",right:"left"}[i]||"center")+" "+({top:"bottom",bottom:"top"}[a]||"middle"))}},r=window.setTimeout(n),o=window.setInterval(n,500);return window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),function(){window.clearTimeout(r),window.clearInterval(o),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0)}}),[ne,k,x,h,g,v,y,d]),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=j.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(b,L);var re=function(e){e.keyCode===w.ESCAPE&&n&&(e.stopPropagation(),n()),o&&o(e)};var oe=Object(r.createElement)(B,{onFocusOutside:function(e){if(F)F(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}}),E()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),A(t)}else n&&n()}},Object(r.createElement)($,{type:T&&Y?"appear":null,options:{origin:Y}},(function(e){var o=e.className;return Object(r.createElement)(V,Object(s.a)({className:i()("components-popover",a,o,{"is-expanded":ne,"is-without-arrow":f})},M,{onKeyDown:re,ref:z}),ne&&Object(r.createElement)("div",{className:"components-popover__header"},Object(r.createElement)("span",{className:"components-popover__header-title"},t),Object(r.createElement)(ae,{className:"components-popover__close",icon:"no-alt",onClick:n})),Object(r.createElement)("div",{ref:L,className:"components-popover__content",tabIndex:"-1"},c))})));return b&&(oe=Object(r.createElement)(J,null,oe)),Object(r.createElement)(H,null,(function(e){var t=e.getSlot;return t&&t("Popover")&&(oe=Object(r.createElement)(K,{name:"Popover"},oe)),Object(r.createElement)("span",{ref:I},oe,W&&C&&Object(r.createElement)(D,null))}))};ne.Slot=function(){return Object(r.createElement)(Y,{bubblesVirtually:!0,name:"Popover"})};var re=ne;var oe=function(e){var t,n,c=e.shortcut,i=e.className;return c?(Object(o.isString)(c)&&(t=c),Object(o.isObject)(c)&&(t=c.display,n=c.ariaLabel),Object(r.createElement)("span",{className:i,"aria-label":n},t)):null},ce=function(e){function t(){var e;return f(this,t),(e=h(this,g(t).apply(this,arguments))).delayedSetIsOver=Object(o.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return y(t,e),d(t,[{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 c=Object(o.includes)(["focus","mouseenter"],r.type);c!==n.state.isOver&&(t?n.delayedSetIsOver(c):n.setState({isOver:c}))}}}},{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,c=e.shortcut;if(1!==r.Children.count(t))return t;var i=r.Children.only(t),a=this.state.isOver;return Object(r.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(r.concatChildren)(i.props.children,a&&Object(r.createElement)(re,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1},o,Object(r.createElement)(oe,{className:"components-tooltip__shortcut",shortcut:c})))})}}]),t}(r.Component),ie=n(75);var ae=Object(r.forwardRef)((function(e,t){var n=e.icon,c=e.children,a=e.label,f=e.className,p=e.tooltip,d=e.shortcut,m=e.labelPosition,b=e.size,h=Object(l.a)(e,["icon","children","label","className","tooltip","shortcut","labelPosition","size"]),g=i()("components-icon-button",f,{"has-text":c}),v=p||a,y=!h.disabled&&(p||d||!!a&&(!c||Object(o.isArray)(c)&&!c.length)&&!1!==p),O=Object(r.createElement)(u.a,Object(s.a)({"aria-label":a},h,{className:g,ref:t}),Object(r.createElement)(ie.a,{icon:n,size:b}),c);return y&&(O=Object(r.createElement)(ce,{text:v,shortcut:d,position:m},O)),O}));t.a=function(e){var t=e.className,n=e.status,c=e.children,s=e.onRemove,l=void 0===s?o.noop:s,f=e.isDismissible,p=void 0===f||f,d=e.actions,m=void 0===d?[]:d,b=e.__unstableHTML,h=i()(t,"components-notice","is-"+n,{"is-dismissible":p});return b&&(c=Object(r.createElement)(r.RawHTML,null,c)),Object(r.createElement)("div",{className:h},Object(r.createElement)("div",{className:"components-notice__content"},c,m.map((function(e,t){var n=e.className,o=e.label,c=e.noDefaultClasses,a=void 0!==c&&c,s=e.onClick,l=e.url;return Object(r.createElement)(u.a,{key:t,href:l,isDefault:!a&&!l,isLink:!a&&!!l,onClick:l?void 0:s,className:i()("components-notice__action",n)},o)}))),p&&Object(r.createElement)(ae,{className:"components-notice__dismiss",icon:"no-alt",label:Object(a.__)("Dismiss this notice"),onClick:l,tooltip:!1}))}},,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(50),u=function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),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"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(14),i=n.n(c),a=n(3);n(4);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,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},c))}},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(2),c=n(15),i=n(13);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(n.current){var r=e(c.SCHEMA_STORE_KEY),o=r.isResolving,i=r.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,,function(e,t,n){"use strict";n(4);var r=n(5),o=n.n(r),c=n(33),i=n(99);n(155);t.a=Object(i.a)((function(e){var t=e.className,n=e.instanceId,r=e.defaultValue,i=e.label,a=e.onChange,u=e.options,s=e.screenReaderLabel,l=e.readOnly,f=e.value,p="wc-block-components-sort-select__select-".concat(n);return React.createElement("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},React.createElement(c.a,{label:i,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",defaultValue:r,onChange:a,readOnly:l,value:f},u.map((function(e){return React.createElement("option",{key:e.key,value:e.key},e.label)}))))}))},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(4),n(5)),i=n.n(c),a=n(118),u=n(88),s=(n(108),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,c=n.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var l=i()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(a.a,o()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",s(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(34),o=n(0),c=n(8);n.p=c.F,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)((function(){return Promise.all([n.e(20),n.e(6)]).then(n.bind(null,297))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)((function(){return n.e(5).then(n.bind(null,307))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)((function(){return n.e(13).then(n.bind(null,306))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)((function(){return n.e(7).then(n.bind(null,298))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)((function(){return n.e(3).then(n.bind(null,299))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)((function(){return n.e(11).then(n.bind(null,300))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)((function(){return n.e(8).then(n.bind(null,284))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)((function(){return n.e(9).then(n.bind(null,301))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)((function(){return n.e(4).then(n.bind(null,302))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)((function(){return n.e(12).then(n.bind(null,303))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)((function(){return n.e(10).then(n.bind(null,304))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)((function(){return n.e(2).then(n.bind(null,305))}))});var i=function(e){return Object(r.getRegisteredBlockComponents)(e)}},,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),o=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,n.current]),n.current}},,,,,,,function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},,,,,,,,,,,,,function(e,t,n){e.exports=n(265)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(128),o=n(88),c=n(107),i=n(29),a=n.n(i),u=n(30),s=n.n(u),l=n(31),f=n.n(l),p=n(32),d=n.n(p),m=n(19),b=n.n(m),h=n(3),g=(n(4),n(9)),v=n.n(g),y=n(0),O=n(24),j=n.n(O),w=n(14),k=n.n(w),E=n(6),S=n.n(E),_=n(1),x=n(7),R=n(5),P=n.n(R),C=n(33),N=(n(209),function(e){var t=e.currentPage,n=e.displayFirstAndLastPages,r=e.displayNextAndPreviousArrows,o=e.pagesToDisplay,c=e.onPageChange,i=e.totalPages,a=function(e,t,n){if(n<=2)return{minIndex:null,maxIndex:null};var r=e-1,o=Math.max(Math.floor(t-r/2),2),c=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(c-t))),2),maxIndex:c}}(o,t,i),u=a.minIndex,s=a.maxIndex,l=n&&Boolean(1!==u),f=n&&Boolean(s!==i),p=n&&Boolean(u>3),d=n&&Boolean(s<i-2);l&&3===u&&(u-=1),f&&s===i-2&&(s+=1);var m=[];if(u&&s)for(var b=u;b<=s;b++)m.push(b);return React.createElement("div",{className:"wc-block-pagination wc-block-components-pagination"},React.createElement(C.a,{screenReaderLabel:Object(_.__)("Navigate to another page","woo-gutenberg-products-block")}),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t-1)},title:Object(_.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},React.createElement(C.a,{label:"<",screenReaderLabel:Object(_.__)("Previous page","woo-gutenberg-products-block")})),l&&React.createElement("button",{className:P()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return c(1)},disabled:1===t},React.createElement(C.a,{label:1,screenReaderLabel:Object(_.sprintf)(Object(_.__)("Page %d","woo-gutenberg-products-block"),1)})),p&&React.createElement("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(_.__)("…","woo-gutenberg-products-block")),m.map((function(e){return React.createElement("button",{key:e,className:P()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return c(e)},disabled:t===e},React.createElement(C.a,{label:e,screenReaderLabel:Object(_.sprintf)(Object(_.__)("Page %d","woo-gutenberg-products-block"),e)}))})),d&&React.createElement("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(_.__)("…","woo-gutenberg-products-block")),f&&React.createElement("button",{className:P()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===i,"wc-block-components-pagination__page--active":t===i}),onClick:function(){return c(i)},disabled:t===i},React.createElement(C.a,{label:i,screenReaderLabel:Object(_.sprintf)(Object(_.__)("Page %d","woo-gutenberg-products-block"),i)})),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t+1)},title:Object(_.__)("Next page","woo-gutenberg-products-block"),disabled:t>=i},React.createElement(C.a,{label:">",screenReaderLabel:Object(_.__)("Next page","woo-gutenberg-products-block")})))});N.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var T=N,A=n(136),F=(n(208),function(e){var t=e.defaultValue,n=e.onChange,r=e.readOnly,o=e.value;return React.createElement(A.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:n,options:[{key:"menu_order",label:Object(_.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(_.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(_.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(_.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(_.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(_.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(_.__)("Order products by","woo-gutenberg-products-block"),value:o})}),M=n(69),I=n(99),B=n(11),D=n.n(B),L=n(145),V=Object(I.a)((function(e){var t=e.product,n=e.attributes,r=e.instanceId,o=n.layoutConfig,c=Object(M.useInnerBlockLayoutContext)(),i=c.parentClassName,a=c.parentName,u=0===Object.keys(t).length,s=P()("".concat(i,"__product"),"wc-block-layout",{"is-loading":u});return React.createElement("li",{className:s,"aria-hidden":u},function e(t,n,r,o){if(r){var c=Object(L.a)(t);return r.map((function(r,i){var a=v()(r,2),u=a[0],s=a[1],l=void 0===s?{}:s,f=[];l.children&&l.children.length>0&&(f=e(t,n,l.children,o));var p=c[u];if(!p)return null;var d=n.id||0,m=["layout",u,i,o,d];return React.createElement(y.Suspense,{key:m.join("_"),fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(p,D()({},l,{children:f,product:n})))}))}}(a,t,o,r))})),z=n(98),q=n(113),H=n(15),W=n(13),U=n(37);function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){S()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(e){var t={namespace:"/wc/store",resourceName:"products"},n=Object(q.a)(Q(Q({},t),{},{query:e})),r=n.results,o=n.isLoading,c=function(e,t){var n=t.namespace,r=t.resourceName,o=t.resourceValues,c=void 0===o?[]:o,i=t.query,a=void 0===i?{}:i;if(!n||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var u=Object(U.a)(a),s=Object(U.a)(c),l=Object(W.useSelect)((function(t){var o=t(H.COLLECTIONS_STORE_KEY),c=[e,n,r,u,s];return{value:o.getCollectionHeader.apply(o,c),isLoading:o.hasFinishedResolution("getCollectionHeader",c)}}),[e,n,r,s,u]),f=l.value,p=l.isLoading;return{value:f,isLoading:void 0===p||p}}("x-wp-total",Q(Q({},t),{},{query:e})).value;return{products:r,totalProducts:parseInt(c,10),productsLoading:o}},G=n(184),$=n(101),J=n(44),Z=(n(207),n(126)),X=n(50),ee=React.createElement(X.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.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"})),te=function(){var e=Object(M.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(e,"__no-products")},React.createElement(Z.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:ee,size:100}),React.createElement("strong",{className:"".concat(e,"__no-products-title")},Object(_.__)("No products","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(e,"__no-products-description")},Object(_.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},ne=React.createElement(X.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.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"})),re=function(e){var t=e.resetCallback,n=void 0===t?function(){}:t,r=Object(M.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(r,"__no-products")},React.createElement(Z.a,{className:"".concat(r,"__no-products-image"),alt:"",srcElement:ne,size:100}),React.createElement("strong",{className:"".concat(r,"__no-products-title")},Object(_.__)("No products found","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(r,"__no-products-description")},Object(_.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),React.createElement("button",{onClick:n},Object(_.__)("Reset Search","woo-gutenberg-products-block")))};function oe(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 ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){S()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ie=Object($.a)((function(e){var t=e.attributes,n=e.currentPage,r=e.onPageChange,o=e.onSortChange,c=e.sortValue,i=e.scrollToTop,a=Object(z.c)(function(e){var t=e.sortValue,n=e.currentPage,r=e.attributes,o=r.columns,c=r.rows;return ce(ce({},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:n})}({attributes:t,sortValue:c,currentPage:n})),u=v()(a,1)[0],s=Y(u),l=s.products,f=s.totalProducts,p=s.productsLoading,d=Object(M.useInnerBlockLayoutContext)().parentClassName,m=function(e){e.order,e.orderby,e.page,e.per_page;return k()(e,["order","orderby","page","per_page"])}(u),b=Object(z.b)("attributes",[]),h=v()(b,2),g=h[0],O=h[1],w=Object(z.b)("min_price"),E=v()(w,2),S=E[0],R=E[1],C=Object(z.b)("max_price"),N=v()(C,2),A=N[0],I=N[1],B=Object(G.a)({totalQuery:m,totalProducts:f},(function(e){var t=e.totalQuery,n=e.totalProducts,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.totalQuery;return!Object(x.isEqual)(t,o)&&Number.isFinite(n)})),D="object"===j()(B)&&Object(x.isEqual)(m,B.totalQuery);Object(y.useEffect)((function(){D||(r(1),B&&function(e){Number.isFinite(e)&&(0===e?Object(J.speak)(Object(_.__)("No products found","woo-gutenberg-products-block")):Object(J.speak)(Object(_.sprintf)(Object(_._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(f))}),[u]);var L,q,H,W,U,K=t.contentVisibility,Q=t.columns*t.rows,$=!Number.isFinite(f)&&D?Math.ceil(B.totalProducts/Q):Math.ceil(f/Q),Z=l.length?l:Array.from({length:Q}),X=0!==l.length||p,ee=g.length>0||Number.isFinite(S)||Number.isFinite(A);return React.createElement("div",{className:(L=t.columns,q=t.rows,H=t.alignButtons,W=t.align,U=void 0!==W?"align"+W:"",P()(d,U,"has-"+L+"-columns",{"has-multiple-rows":q>1,"has-aligned-buttons":H}))},K.orderBy&&X&&React.createElement(F,{onChange:o,value:c}),!X&&ee&&React.createElement(re,{resetCallback:function(){O([]),R(null),I(null)}}),!X&&!ee&&React.createElement(te,null),X&&React.createElement("ul",{className:"".concat(d,"__products")},Z.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return React.createElement(V,{key:e.id||n,attributes:t,product:e})}))),$>1&&React.createElement(T,{currentPage:n,onPageChange:function(e){i({focusableSelector:"a, button"}),r(e)},totalPages:$}))})),ae=function(e){var t=e.attributes,n=Object(y.useState)(1),r=v()(n,2),o=r[0],c=r[1],i=Object(y.useState)(t.orderby),a=v()(i,2),u=a[0],s=a[1];Object(y.useEffect)((function(){s(t.orderby)}),[t.orderby]);return React.createElement(ie,{attributes:t,currentPage:o,onPageChange:function(e){c(e)},onSortChange:function(e){var t=e.target.value;s(t),c(1)},sortValue:u})},ue=n(8),se=React.createElement("img",{src:ue.E+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}});function le(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=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}var fe=function(e){f()(n,e);var t=le(n);function n(){return a()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.urlParameterSuffix;return t.isPreview?se:React.createElement(M.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},React.createElement(ae,{attributes:t,urlParameterSuffix:n}))}}]),n}(h.Component);Object(c.a)({selector:".wp-block-woocommerce-all-products",Block:Object(r.a)((function(e){return React.createElement(o.a,{context:"wc/all-products"},React.createElement(fe,e))})),getProps:function(e){return{attributes:JSON.parse(e.dataset.attributes)}}})}]);
1
+ !function(e){function t(t){for(var n,o,c=t[0],i=t[1],a=0,s=[];a<c.length;a++)o=c[a],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&s.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(u&&u(t);s.length;)s.shift()()}var n={},r={1:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.src=function(e){return o.p+""+({2:"atomic-block-components/add-to-cart",3:"atomic-block-components/button",4:"atomic-block-components/category-list",5:"atomic-block-components/image",6:"atomic-block-components/price",7:"atomic-block-components/rating",8:"atomic-block-components/sale-badge",9:"atomic-block-components/sku",10:"atomic-block-components/stock-indicator",11:"atomic-block-components/summary",12:"atomic-block-components/tag-list",13:"atomic-block-components/title",20:"vendors~atomic-block-components/price"}[e]||e)+"-frontend.js"}(e);var u=new Error;i=function(t){a.onerror=a.onload=null,clearTimeout(s);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",u.name="ChunkLoadError",u.type=o,u.request=c,n[1](u)}r[e]=void 0}};var s=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var a=0;a<c.length;a++)t(c[a]);var u=i;o(o.s=206)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},function(e,t,n){e.exports=n(61)()},function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},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}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"w",(function(){return c})),n.d(t,"A",(function(){return i})),n.d(t,"t",(function(){return a})),n.d(t,"n",(function(){return u})),n.d(t,"q",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"B",(function(){return f})),n.d(t,"l",(function(){return p})),n.d(t,"m",(function(){return d})),n.d(t,"k",(function(){return m})),n.d(t,"c",(function(){return b})),n.d(t,"o",(function(){return h})),n.d(t,"p",(function(){return g})),n.d(t,"E",(function(){return y})),n.d(t,"F",(function(){return O})),n.d(t,"x",(function(){return j})),n.d(t,"a",(function(){return w})),n.d(t,"y",(function(){return k})),n.d(t,"b",(function(){return E})),n.d(t,"s",(function(){return S})),n.d(t,"g",(function(){return _})),n.d(t,"z",(function(){return P})),n.d(t,"h",(function(){return C})),n.d(t,"v",(function(){return N})),n.d(t,"u",(function(){return T})),n.d(t,"D",(function(){return A})),n.d(t,"C",(function(){return F})),n.d(t,"d",(function(){return M})),n.d(t,"e",(function(){return I})),n.d(t,"f",(function(){return B})),n.d(t,"r",(function(){return D})),n.d(t,"G",(function(){return L}));var r=n(3),o=Object(r.getSetting)("currentUserIsAdmin",!1),c=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),f=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),p=Object(r.getSetting)("displayItemizedTaxes",!1),d=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),m=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),h=Object(r.getSetting)("isShippingCalculatorEnabled",!0),g=Object(r.getSetting)("isShippingCostHidden",!1),v=Object(r.getSetting)("woocommerceBlocksPhase",1),y=Object(r.getSetting)("wcBlocksAssetUrl",""),O=Object(r.getSetting)("wcBlocksBuildUrl",""),j=Object(r.getSetting)("shippingCountries",{}),w=Object(r.getSetting)("allowedCountries",{}),k=Object(r.getSetting)("shippingStates",{}),E=Object(r.getSetting)("allowedStates",{}),S=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),_=Object(r.getSetting)("checkoutShowLoginReminder",!0),x={id:0,title:"",permalink:""},R=Object(r.getSetting)("storePages",{shop:x,cart:x,checkout:x,privacy:x,terms:x}),P=R.shop.permalink,C=(R.checkout.id,R.checkout.permalink),N=R.privacy.permalink,T=R.privacy.title,A=R.terms.permalink,F=R.terms.title,M=(R.cart.id,R.cart.permalink),I=Object(r.getSetting)("checkoutAllowsGuest",!1),B=Object(r.getSetting)("checkoutAllowsSignup",!1),D=Object(r.getSetting)("loginUrl","/wp-login.php"),L=(n(39),function(){return v>1})},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(71),o=n(72),c=n(54),i=n(73);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||i()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(56);e.exports=function(e,t){if(null==e)return{};var n,o,c=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},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}},,function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(40);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){Object(r.a)(e,t,n[t])}))}return e}},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(53);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(26);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(60);e.exports=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&&r(e,t)}},function(e,t,n){var r=n(25),o=n(18);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=(n(4),n(2)),i=n(5),a=n.n(i);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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=n,f=null!=r;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||c.Fragment,l&&f&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(27),c=n.n(o),i=function(e){var t=Object(r.useRef)();return c()(e,t.current)||(t.current=e),t.current}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(46);var o=n(53);function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))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){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},,,,function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";var r=n(30),o=n.n(r),c=n(31),i=n.n(c),a=n(18),u=n.n(a),s=n(32),l=n.n(s),f=n(33),p=n.n(f),d=n(20),m=n.n(d),b=n(6),h=n.n(b),g=(n(4),n(2)),v=n(1),y=n(8),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.E,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,c=e.text,i=void 0===c?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(63);function j(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=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var w=function(e){l()(n,e);var t=j(n);function n(){var e;o()(this,n);for(var r=arguments.length,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),h()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=this.state,a=i.errorMessage;return i.hasError?React.createElement(O,{errorMessage:r?a:null,header:t,imageUrl:n,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(g.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(g.Component);w.defaultProps={showErrorMessage:!0};t.a=w},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.dom}()},,function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(22),o=n(7),c=n(0),i=function(e){var t=Object(r.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(c.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(46);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){var r=n(55);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=Object(r.createContext)("page"),c=function(){return Object(r.useContext)(o)};o.Provider},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(62);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},,function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(11)),c=r(n(56)),i=n(2),a=r(i),u=r(n(110)),s=r(n(18)),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 n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!l.und(n)||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,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return l.fun(e)?e.apply(void 0,n):e}function b(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(l.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return l.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var h,g,v=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.removeChild(s(t))}))},t}return u(t,e),t}(v),O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.removeChild(s(t))}))},t}u(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof v)&&(t[n]=r instanceof v?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(v);function j(e,t){h={fn:e,transform:t}}function w(e){g=e}var k,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},S=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function _(e){k=e}var x,R=function(){return Date.now()};function P(e){x=e}var C,N,T=function(e){return e.current};function A(e){C=e}var F=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return g},injectColorNames:w,get requestFrame(){return E},get cancelFrame(){return S},injectFrame:function(e,t){E=e,S=t},get interpolation(){return k},injectStringInterpolator:_,get now(){return R},injectNow:function(e){R=e},get defaultElement(){return x},injectDefaultElement:P,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return C},injectCreateAnimatedStyle:A,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),M=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:C(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),I=!1,B=new Set,D=function e(){if(!I)return!1;var t=R(),n=B,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,u=0;u<i.configs.length;u++){for(var s=i.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var m=s.fromValues[p],b=s.toValues[p],h=d.lastPosition,g=b instanceof v,y=Array.isArray(s.initialVelocity)?s.initialVelocity[p]:s.initialVelocity;if(g&&(b=b.getValue()),s.immediate)d.setValue(b),d.done=!0;else if("string"!=typeof m&&"string"!=typeof b){if(void 0!==s.duration)h=m+s.easing((t-d.startTime)/s.duration)*(b-m),l=t>=d.startTime+s.duration;else if(s.decay)h=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-h)<.1)&&(b=h);else{f=void 0!==d.lastTime?d.lastTime:t,y=void 0!==d.lastVelocity?d.lastVelocity:s.initialVelocity,t>f+64&&(f=t);for(var O=Math.floor(t-f),j=0;j<O;++j){h+=1*(y+=1*((-s.tension*(h-b)+-s.friction*y)/s.mass)/1e3)/1e3}var w=!(!s.clamp||0===s.tension)&&(m<b?h>b:h<b),k=Math.abs(y)<=s.precision,S=0===s.tension||Math.abs(b-h)<=s.precision;l=w||k&&S,d.lastVelocity=y,d.lastTime=t}g&&!s.toValues[p].done&&(l=!1),l?(d.value!==b&&(h=b),d.done=!0):a=!0,d.setValue(h),d.lastPosition=h}else d.setValue(b),d.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(B.delete(i),i.stop(!0))}return B.size?N?N():E(e):I=!1,I};function L(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return L({range:e,output:t,extrapolate:n});if(k&&"string"==typeof e.output[0])return k(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,u){var s=u?u(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,c[t],c[t+1],o[t],o[t+1],u,i,a,r.map)}}var V=function(e){function t(n,r,o,c){var i;return(i=e.call(this)||this).calc=void 0,i.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],i.calc=L(r,o,c),i}u(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=L(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var z=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}u(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new V(this,e,t,n)},t}(v),q=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new z(e)})),n}u(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(y),H=0,W=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=H++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=b(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(l.arr(i)||l.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var u={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:m(r,n)},a),s=u[i.delay]&&u[i.delay].to;u[i.delay]=o({},u[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,u=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},f=l.arr(u.to)||l.fun(u.to);a?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),a):f?n.runAsync(u,s):n.diff(u).start(s)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,B.has(t)||B.add(t),I||(I=!0,E(N||D));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,B.has(t)&&B.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,c=o({},r,b(r.to[t]));l.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,p=0;a=a.then((function(){return r.to((function(e){var t=o({},r,b(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,i===n.guid)return f=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return f}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,u=n.config,s=void 0===u?{}:u,f=n.reverse,b=n.attach,h=n.reset,v=n.immediate;if(f){var y=[a,c];c=y[0],a=y[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var O=b&&b(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},u=l.num(i),f=l.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!g[i],b=l.arr(i),y=!u&&!b&&!f,j=l.und(c[r])?i:c[r],w=u||b||f?i:1,E=m(s,r);O&&(w=O.animations[r].parent);var S,_=a.parent,x=a.interpolation,P=d(O?w.getPayload():w),C=i;y&&(C=k({range:[0,1],output:[i,i]})(1));var N,T=x&&x.getValue(),A=!l.und(_)&&a.animatedValues.some((function(e){return!e.done})),F=!l.equ(C,T),M=!l.equ(C,a.previous),I=!l.equ(E,a.config);if(h||M&&F||I){var B;if(u||f)_=x=a.parent||new z(j);else if(b)_=x=a.parent||new q(j);else if(y){var D=a.interpolation&&a.interpolation.calc(a.parent.value);D=void 0===D||h?j:D,a.parent?(_=a.parent).setValue(0,!1):_=new z(0);var L={output:[D,i]};a.interpolation?(x=a.interpolation,a.interpolation.updateConfig(L)):x=_.interpolate(L)}return P=d(O?w.getPayload():w),S=d(_.getPayload()),h&&!y&&_.setValue(j,!1),t.hasChanged=!0,S.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=A?e.lastVelocity:void 0,e.lastTime=A?e.lastTime:void 0,e.startTime=R(),e.done=!1,e.animatedStyles.clear()})),m(v,r)&&_.setValue(y?w:i,!1),o({},e,((B={})[r]=o({},a,{name:r,parent:_,interpolation:x,animatedValues:S,toValues:P,previous:C,config:E,fromValues:d(_.getValue()),immediate:m(v,r),initialVelocity:p(E.velocity,0),clamp:p(E.clamp,!1),precision:p(E.precision,.01),tension:p(E.tension,170),friction:p(E.friction,26),mass:p(E.mass,1),duration:E.duration,easing:p(E.easing,(function(e){return e})),decay:E.decay}),B))}return F?e:(y&&(_.setValue(1,!1),x.updateConfig({output:[C,C]})),_.done=!0,t.hasChanged=!0,o({},e,((N={})[r]=o({},e[r],{previous:C}),N)))}),this.animations),this.hasChanged)for(var j in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[j]=this.animations[j].interpolation,this.values[j]=this.animations[j].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),U=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=l.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new W,i=o?m(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],u=c[1];r.current=a;i.useImperativeHandle(u,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),u||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var f=r.current.map((function(e){return e.getValues()}));return o?[f,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:f},K=0,Q=function(e,t){return("function"==typeof t?e.map(t):d(t)).map(String)},Y=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:Q(t,r)},i)};function G(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var $=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=h.transform(t)),n.payload=t,n}return u(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+X(Z,Z,Z)),te=new RegExp("rgba"+X(Z,Z,Z,Z)),ne=new RegExp("hsl"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function ue(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ue(o,r,e+1/3),i=ue(o,r,e),a=ue(o,r,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,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|pe(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(fe(n[1]),de(n[2]),de(n[3])))>>>0:(n=re.exec(t))?(se(fe(n[1]),de(n[2]),de(n[3]))|pe(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var be=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,he=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}ve=Object.keys(ve).reduce((function(e,t){return ye.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ve);var je={};A((function(e){return new $(e)})),P("div"),_((function(e){var t=e.output.map((function(e){return e.replace(he,me)})).map((function(e){return e.replace(ge,me)})),n=t[0].match(be).map((function(){return[]}));t.forEach((function(e){e.match(be).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(be).map((function(t,r){return L(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(be,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),w(J),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),u="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var l=0===s.indexOf("--"),f=Oe(s,n[s],l);"float"===s&&(s="cssFloat"),l?e.style.setProperty(s,f):e.style[s]=f}for(var p in a){var d=u?p:je[p]||(je[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 we,ke,Ee=(we=function(e){return i.forwardRef((function(t,n){var r=f(),u=i.useRef(!0),s=i.useRef(null),p=i.useRef(null),d=i.useCallback((function(e){var t=s.current;s.current=new M(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(p,u,r)})),d(t);var m,b=s.current.getValue(),g=(b.scrollTop,b.scrollLeft,c(b,["scrollTop","scrollLeft"])),v=(m=e,!l.fun(m)||m.prototype instanceof a.Component?function(e){return p.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return a.createElement(e,o({},g,{ref:v}))}))},void 0===(ke=!1)&&(ke=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=ke?t[0].toLowerCase()+t.substring(1):t;return e[n]=we(n),e}),we)}),Se=Ee(["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=Ee,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=D,t.animated=Se,t.a=Se,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=F,t.useSpring=function(e){var t=l.fun(e),n=U(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=l.fun(t),c=m(t),a=i.useRef(),u=U(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]}})})),s=u[0],f=u[1],p=u[2],d=i.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:m(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&d(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,d,p]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=Y(r),u=a.lazy,s=void 0!==u&&u,l=(a.unique,a.reset),p=void 0!==l&&l,d=(a.enter,a.leave,a.update,a.onDestroyed),b=(a.keys,a.items,a.onFrame),h=a.onRest,g=a.onStart,v=a.ref,y=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=i.useRef(!1),w=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(w.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(w.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(w.current.instances).map((function(e){return e[1]}))}}})),w.current=function(e,t){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=Y(t),u=a.items,s=a.keys,l=a.initial,f=a.from,p=a.enter,d=a.leave,b=a.update,h=a.trail,g=void 0===h?0:h,v=a.unique,y=a.config,O=a.order,j=void 0===O?["enter","leave","update"]:O,w=Y(r),k=w.keys,E=w.items,S=o({},i.current),_=[].concat(i.deleted),x=Object.keys(S),R=new Set(x),P=new Set(s),C=s.filter((function(e){return!R.has(e)})),N=i.transitions.filter((function(e){return!e.destroyed&&!P.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return R.has(e)})),A=-g;for(;j.length;){switch(j.shift()){case"enter":C.forEach((function(e,t){v&&_.find((function(t){return t.originalKey===e}))&&(_=_.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],c=n&&void 0!==l?"initial":"enter";S[e]={slot:c,originalKey:e,key:v?String(e):K++,item:o,trail:A+=g,config:m(y,o,c),from:m(n&&void 0!==l?l||{}:f,o),to:m(p,o)}}));break;case"leave":N.forEach((function(e){var t=k.indexOf(e),n=E[t];_.unshift(o({},S[e],{slot:"leave",destroyed:!0,left:k[Math.max(0,t-1)],right:k[Math.min(k.length,t+1)],trail:A+=g,config:m(y,n,"leave"),to:m(d,n)})),delete S[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=u[t];S[e]=o({},S[e],{item:n,slot:"update",trail:A+=g,config:m(y,n,"update"),to:m(b,n)})}))}}var F=s.map((function(e){return S[e]}));return _.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=F.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),F=[].concat(F.slice(0,t),[r],F.slice(t))})),o({},i,{changed:C.length||N.length||T.length,first:n&&0===C.length,transitions:F,current:S,deleted:_,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,u=e.item;w.current.instances.has(a)||w.current.instances.set(a,new W);var l=w.current.instances.get(a),f=o({},y,{to:r,from:n,config:c,ref:v,onRest:function(n){w.current.mounted&&(e.destroyed&&(v||s||G(w,a),d&&d(u)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(v||s)&&w.current.deleted.length>0&&G(w),h&&h(u,t,n))},onStart:g&&function(){return g(u,t)},onFrame:b&&function(e){return b(u,t,e)},delay:i,reset:p&&"enter"===t});l.update(f),w.current.paused||l.start()})),i.useEffect((function(){return w.current.mounted=j.current=!0,function(){w.current.mounted=j.current=!1,Array.from(w.current.instances).map((function(e){return e[1].destroy()})),w.current.instances.clear()}}),[]),w.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:w.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];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,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=U},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(50),u=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,c=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},c),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},s=React.createElement(u,null),l=n(126),f=n(0);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=s;break;case"no-alt":t=l.a}return t?Object(f.cloneElement)(t,{size:e.size||20,className:e.className}):null}},function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}},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.")}},,function(e,t,n){"use strict";var r=n(22),o=n(9),c=n(29),i=n(0),a=n(68),u=n(50);t.a=function(e){var t=e.icon,n=void 0===t?null:t,s=e.size,l=Object(c.a)(e,["icon","size"]),f=s||20;if("string"==typeof n)return Object(i.createElement)(a.a,Object(o.a)({icon:n,size:f},l));if(n&&a.a===n.type)return Object(i.cloneElement)(n,Object(r.a)({size:f},l));var p=s||24;if("function"==typeof n)return n.prototype instanceof i.Component?Object(i.createElement)(n,Object(r.a)({size:p},l)):n(Object(r.a)({size:p},l));if(n&&("svg"===n.type||n.type===u.a)){var d=Object(r.a)({width:p,height:p},n.props,l);return Object(i.createElement)(u.a,d)}return Object(i.isValidElement)(n)?Object(i.cloneElement)(n,Object(r.a)({size:p},l)):n}},function(e,t,n){"use strict";var r=n(22),o=n(29),c=n(5),i=n.n(c),a=n(0);t.a=Object(a.forwardRef)((function(e,t){var n=e.href,c=e.target,u=e.isPrimary,s=e.isLarge,l=e.isSmall,f=e.isTertiary,p=e.isToggled,d=e.isBusy,m=e.isDefault,b=e.isLink,h=e.isDestructive,g=e.className,v=e.disabled,y=Object(o.a)(e,["href","target","isPrimary","isLarge","isSmall","isTertiary","isToggled","isBusy","isDefault","isLink","isDestructive","className","disabled"]),O=i()("components-button",g,{"is-button":m||u||s||l,"is-default":m||!u&&(s||l),"is-primary":u,"is-large":s,"is-small":l,"is-tertiary":f,"is-toggled":p,"is-busy":d,"is-link":b,"is-destructive":h}),j=void 0===n||v?"button":"a",w="a"===j?{href:n,target:c}:{type:"button",disabled:v};return Object(a.createElement)(j,Object(r.a)({},w,y,{className:O,ref:t}))}))},,,function(e,t){!function(){e.exports=this.wp.autop}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),o=n.n(r),c=n(88),i=n(0);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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=Object(c.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,a=e.setIsSuppressed,s=Object(i.useRef)(t);Object(i.useEffect)((function(){s.current=t}),[t]);var l=Object(i.useMemo)((function(){return{hasNoticesOfType:function(e){return s.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),f=Object(i.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))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(e,t)}}}),[n,o]);return u(u(u({notices:t},l),f),{},{setIsSuppressed:a})}},,function(e,t){!function(){e.exports=this.wp.deprecated}()},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),o=n.n(r),c=n(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},,,function(e,t,n){"use strict";n.d(t,"b",(function(){return N})),n.d(t,"a",(function(){return T}));var r=n(6),o=n.n(r),c=n(10),i=n.n(c),a=(n(4),n(0)),u=n(12),s=n(139),l=n(9),f=n(23),p=n.n(f);function d(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)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function i(e){d(c,r,o,i,a,"next",e)}function a(e){d(c,r,o,i,a,"throw",e)}i(void 0)}))}}var b=n(24),h=n(5),g=n.n(h),v=n(7),y=n(67),O=n(28),j=n(1),w=n(76);var k=Object(a.forwardRef)((function(e,t){var n=e.className,r=e.children,o=e.actions,c=void 0===o?[]:o,i=e.onRemove,u=void 0===i?v.noop:i;Object(a.useEffect)((function(){var e=setTimeout((function(){u()}),1e4);return function(){return clearTimeout(e)}}),[]);var s=g()(n,"components-snackbar");return c&&c.length>1&&(console.warn("Snackbar can only have 1 action, use Notice if your message require many messages"),c=[c[0]]),Object(a.createElement)("div",{ref:t,className:s,onClick:u,tabIndex:"0",role:"button",onKeyPress:u,label:Object(j.__)("Dismiss this notice")},Object(a.createElement)("div",{className:"components-snackbar__content"},r,c.map((function(e,t){var n=e.label,r=e.onClick,o=e.url;return Object(a.createElement)(w.a,{key:t,href:o,isTertiary:!0,onClick:function(e){e.stopPropagation(),r&&r(e)},className:"components-snackbar__action"},n)}))))}));var E=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,c=void 0===o?v.noop:o,i=Object(O.useReducedMotion)(),u=Object(a.useState)((function(){return new WeakMap})),s=Object(b.a)(u,1)[0],f=Object(y.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=m(p.a.mark((function t(n){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:s.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=m(p.a.mark((function e(t){return p.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});n=g()("components-snackbar-list",n);var d=function(e){return function(){return c(e.id)}};return Object(a.createElement)("div",{className:n},r,f.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(a.createElement)(y.animated.div,{key:n,style:r},Object(a.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(a.createElement)(k,Object(l.a)({},Object(v.omit)(t,["content"]),{onRemove:d(t)}),t.content)))})))},S=n(80),_=n(118),x=function(){var e=Object(_.a)().isEditor,t=Object(S.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var o=n.filter((function(e){return"snackbar"===e.type}));return React.createElement(E,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};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 P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),N=function(){return Object(a.useContext)(C)},T=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.createNoticeContainer,c=void 0===o||o,l=e.context,f=void 0===l?"wc/core":l,p=Object(u.useDispatch)("core/notices"),d=p.createNotice,m=p.removeNotice,b=Object(a.useState)(!1),h=i()(b,2),g=h[0],v=h[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(e,t,P(P({},n),{},{context:n.context||f}))}),[d,f]),O=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;m(e,t)}),[m,f]),j=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,P(P({},t),{},{type:"snackbar"}))}),[y]),w={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(f)}}),[f]).notices,createNotice:y,createSnackbarNotice:j,removeNotice:O,context:f,setIsSuppressed:v},k=g?null:React.createElement(s.a,{className:r,notices:w.notices}),E=g?null:React.createElement(x,null);return React.createElement(C.Provider,{value:w},c&&k,t,E)}},,,,,,,function(e,t){!function(){e.exports=this.wp.wordcount}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),o=function(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 m})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return h}));var r=n(10),o=n.n(r),c=n(15),i=n(12),a=n(0),u=n(59),s=n(96),l=n(27),f=n.n(l),p=n(7),d=n(36),m=function(e){var t=Object(u.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},b=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(i.useSelect)((function(r){return r(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e,s])]},h=function(e,t){var n=Object(u.a)(),r=m(t=t||n),c=o()(r,2),i=c[0],l=c[1],b=Object(d.a)(i),h=Object(d.a)(e),g=Object(s.a)(h),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){f()(g,h)||(l(Object(p.assign)({},b,h)),v.current=!0)}),[b,h,g,l]),v.current?[i,l]:[e,l]}},function(e,t,n){"use strict";var r=n(9),o=n(0),c=n(7);var i=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(c.upperFirst)(Object(c.camelCase)(t)),"(").concat(i,")"),r}},a=new WeakMap;function u(e,t){return Object(o.useMemo)((function(){var n=function(e){var t=a.get(e)||0;return a.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}t.a=i((function(e){return function(t){var n=u(e);return Object(o.createElement)(e,Object(r.a)({},t,{instanceId:n}))}}),"withInstanceId")},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(30),i=n.n(c),a=n(31),u=n.n(a),s=n(18),l=n.n(s),f=n(32),p=n.n(f),d=n(33),m=n.n(d),b=n(20),h=n.n(b),g=n(6),v=n.n(g),y=n(2);n(128);function O(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=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=O(r);function r(){var e;return i()(this,r),e=n.call(this),v()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),v()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),v()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(y.createRef)(),e}return u()(r,[{key:"render",value:function(){return React.createElement(y.Fragment,null,React.createElement("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),React.createElement(e,o()({},this.props,{scrollToTop:this.scrollToTop})))}}]),r}(y.Component);return t.displayName="withScrollToTop",t}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(11),o=n.n(r),c=n(6),i=n.n(c),a=n(0),u=n(45);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;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,n=e.containers,r=e.getProps,c=void 0===r?function(){}:r,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=c(e,n),i=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:f})))),e)}))},d=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&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,c)})),p({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})},m=function(e){var t=document.body.querySelectorAll(f.join(","));d(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,c,i,a;n=l(l({},e),{},{wrapper:t}),r=n.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){},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(12),c=n(0),i=n(85),a=n(36),u=function(e){var t=e.namespace,n=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||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var m=Object(c.useRef)({results:[],isLoading:!0}),b=Object(a.a)(f),h=Object(a.a)(s),g=Object(i.a)(),v=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),c=[t,n,b,h],i=o.getCollectionError.apply(o,c);return i&&g(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,n,h,b,d]);return null!==v&&(m.current=v),m.current}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=(n(12),Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}})),c=function(){return Object(r.useContext)(o)}},function(e,t,n){"use strict";var r=n(0),o=n(7),c=n(5),i=n.n(c),a=n(1),u=n(76),s=n(9),l=n(29);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}var m=n(65),b=n(13);function h(e,t){return!t||"object"!==Object(m.a)(t)&&"function"!=typeof t?Object(b.a)(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(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)}var O=n(24),j=n(47),w=n(49),k=n(82),E=n.n(k),S=n(28),_=n(22),x=function(){return"rtl"===document.documentElement.dir};function R(e,t,n,r){var o=t.width;"left"===n&&x()?n="right":"right"===n&&x()&&(n="left");var c,i=Math.round(e.left+e.width/2),a={popoverLeft:i,contentWidth:(i-o/2>0?o/2:i)+(i+o/2>window.innerWidth?window.innerWidth-i:o/2)},u="middle"===r?e.left:i,s={popoverLeft:u,contentWidth:u-o>0?o:u},l="middle"===r?e.right:i,f={popoverLeft:l,contentWidth:l+o>window.innerWidth?window.innerWidth-l:o},p=null;if("center"===n&&a.contentWidth===o)c="center";else if("left"===n&&s.contentWidth===o)c="left";else if("right"===n&&f.contentWidth===o)c="right";else{var d="left"===(c=s.contentWidth>f.contentWidth?"left":"right")?s.contentWidth:f.contentWidth;p=d!==o?d:null}return{xAxis:c,popoverLeft:"center"===c?a.popoverLeft:"left"===c?s.popoverLeft:f.popoverLeft,contentWidth:p}}function P(e,t,n){var r,o=t.height,c=e.top+e.height/2,i={popoverTop:c,contentHeight:(c-o/2>0?o/2:c)+(c+o/2>window.innerHeight?window.innerHeight-c:o/2)},a={popoverTop:e.top,contentHeight:e.top-10-o>0?o:e.top-10},u={popoverTop:e.bottom,contentHeight:e.bottom+10+o>window.innerHeight?window.innerHeight-10-e.bottom:o},s=null;if("middle"===n&&i.contentHeight===o)r="middle";else if("top"===n&&a.contentHeight===o)r="top";else if("bottom"===n&&u.contentHeight===o)r="bottom";else{var l="top"===(r=a.contentHeight>u.contentHeight?"top":"bottom")?a.contentHeight:u.contentHeight;s=l!==o?l:null}return{yAxis:r,popoverTop:"middle"===r?i.popoverTop:"top"===r?a.popoverTop:u.popoverTop,contentHeight:s}}var C=n(37),N=Object(r.createContext)({focusHistory:[]}),T=N.Provider,A=N.Consumer;T.displayName="FocusReturnProvider",A.displayName="FocusReturnConsumer";r.Component;var F=Object(S.createHigherOrderComponent)((function e(t){if((c=t)instanceof r.Component||"function"==typeof c){var n=t;return e({})(n)}var c,i=t.onFocusReturn,a=void 0===i?o.stubTrue:i;return function(e){var t=function(t){function n(){var e;return f(this,n),(e=h(this,g(n).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 y(n,t),d(n,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==a())for(var r,c=[].concat(Object(C.a)(o.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(C.a)(n)))),[e]);r=c.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))}}]),n}(r.Component);return function(e){return Object(r.createElement)(A,null,(function(n){return Object(r.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn"),M=Object(S.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return f(this,n),(e=h(this,g(n).apply(this,arguments))).focusContainRef=Object(r.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(b.a)(e)),e}return y(n,t),d(n,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===w.TAB){var t=j.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))}}]),n}(r.Component)}),"withConstrainedTabbing"),I=["button","submit"];var B=Object(S.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return f(this,n),(e=h(this,g(n).apply(this,arguments))).bindNode=e.bindNode.bind(Object(b.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(b.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(b.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(b.a)(e)),e}return y(n,t),d(n,[{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(o.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(o.includes)(I,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,Object(s.a)({ref:this.bindNode},this.props)))}}]),n}(r.Component)}),"withFocusOutside")(function(e){function t(){return f(this,t),h(this,g(t).apply(this,arguments))}return y(t,e),d(t,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),t}(r.Component));var D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,o=e.className,c=void 0===o?"lockscroll":o,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](c),n.documentElement.classList[r](c),e||(t.scrollTop=a)}function s(){0===i&&u(!0),++i}function l(){1===i&&u(!1),--i}return function(e){function t(){return f(this,t),h(this,g(t).apply(this,arguments))}return y(t,e),d(t,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),t}(r.Component)}();function L(e){e.stopPropagation()}var V=Object(r.forwardRef)((function(e,t){var n=e.children,o=Object(l.a)(e,["children"]);return Object(r.createElement)("div",Object(s.a)({},o,{ref:t,onMouseDown:L}),n)})),z=Object(r.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),q=z.Provider,H=z.Consumer,W=(r.Component,0);function U(e){var t=e.name,n=e.children,c=e.registerFill,i=e.unregisterFill,a=function(e){var t=Object(r.useContext)(z),n=t.getSlot,o=t.subscribe,c=Object(r.useState)(n(e)),i=Object(O.a)(c,2),a=i[0],u=i[1];return Object(r.useEffect)((function(){return u(n(e)),o((function(){u(n(e))}))}),[e]),a}(t),u=Object(r.useRef)({name:t,children:n});return u.current.occurrence||(u.current.occurrence=++W),Object(r.useLayoutEffect)((function(){return c(t,u.current),function(){return i(t,u.current)}}),[]),Object(r.useLayoutEffect)((function(){u.current.children=n,a&&!a.props.bubblesVirtually&&a.forceUpdate()}),[n]),Object(r.useLayoutEffect)((function(){t!==u.current.name&&(i(u.current.name,u.current),u.current.name=t,c(t,u.current))}),[t]),a&&a.node&&a.props.bubblesVirtually?(Object(o.isFunction)(n)&&(n=n(a.props.fillProps)),Object(r.createPortal)(n,a.node)):null}var K=function(e){return Object(r.createElement)(H,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(r.createElement)(U,Object(s.a)({},e,{registerFill:n,unregisterFill:o}))}))},Q=function(e){function t(){var e;return f(this,t),(e=h(this,g(t).apply(this,arguments))).bindNode=e.bindNode.bind(Object(b.a)(e)),e}return y(t,e),d(t,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){(0,this.props.unregisterSlot)(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.name,r=t.unregisterSlot,o=t.registerSlot;e.name!==n&&(r(e.name),o(n,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,c=e.bubblesVirtually,i=void 0!==c&&c,a=e.fillProps,u=void 0===a?{}:a,s=e.getFills,l=e.className;if(i)return Object(r.createElement)("div",{ref:this.bindNode,className:l});var f=Object(o.map)(s(n,this),(function(e){var t=e.occurrence,n=Object(o.isFunction)(e.children)?e.children(u):e.children;return r.Children.map(n,(function(e,n){if(!e||Object(o.isString)(e))return e;var c="".concat(t,"---").concat(e.key||n);return Object(r.cloneElement)(e,{key:c})}))})).filter(Object(o.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(o.isFunction)(t)?t(f):f)}}]),t}(r.Component),Y=function(e){return Object(r.createElement)(H,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,c=t.getFills;return Object(r.createElement)(Q,Object(s.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:c}))}))},G=n(40);var $=function(e){var t=e.type,n=e.options,r=void 0===n?{}:n,o=e.children;if("appear"===t){var c,a=r.origin,u=(void 0===a?"top":a).split(" "),s=Object(O.a)(u,2),l=s[0],f=s[1],p=void 0===f?"center":f;return o({className:i()("components-animate__appear",(c={},Object(G.a)(c,"is-from-"+p,"center"!==p),Object(G.a)(c,"is-from-"+l,"middle"!==l),c))})}if("slide-in"===t){var d=r.origin,m=void 0===d?"left":d;return o({className:i()("components-animate__slide-in","is-from-"+m)})}return o("loading"===t?{className:i()("components-animate__loading")}:{})},J=M(F((function(e){return e.children})));function Z(e,t){var n=window.getComputedStyle(t),r=n.paddingTop,o=n.paddingBottom,c=n.paddingLeft,i=n.paddingRight,a=r?parseInt(r,10):0,u=o?parseInt(o,10):0,s=c?parseInt(c,10):0,l=i?parseInt(i,10):0;return{x:e.left+s,y:e.top+a,width:e.width-s-l,height:e.height-a-u,left:e.left+s,right:e.right-l,top:e.top+a,bottom:e.bottom-u}}function X(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function te(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var ne=function(e){var t=e.headerTitle,n=e.onClose,o=e.onKeyDown,c=e.children,a=e.className,u=e.noArrow,f=void 0!==u&&u,p=e.position,d=void 0===p?"top":p,m=(e.range,e.focusOnMount),b=void 0===m?"firstElement":m,h=e.anchorRef,g=e.shouldAnchorIncludePadding,v=e.anchorVerticalBuffer,y=e.anchorHorizontalBuffer,k=e.anchorRect,x=e.getAnchorRect,C=e.expandOnMobile,N=e.animate,T=void 0===N||N,A=e.onClickOutside,F=e.onFocusOutside,M=Object(l.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorVerticalBuffer","anchorHorizontalBuffer","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside"]),I=Object(r.useRef)(null),L=Object(r.useRef)(null),z=Object(r.useRef)(),q=Object(r.useRef)(),W=Object(S.useViewportMatch)("medium","<"),U=Object(r.useState)(),Q=Object(O.a)(U,2),Y=Q[0],G=Q[1],ne=C&&W;f=ne||f,Object(r.useEffect)((function(){var e=z.current,t=L.current;if(ne)return te(e,"is-without-arrow",f),X(e,"data-x-axis"),X(e,"data-y-axis"),ee(e,"top"),ee(e,"left"),ee(t,"maxHeight"),void ee(t,"maxWidth");var n=function(){var n=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)return;if(r instanceof window.Range)return Object(j.getRectangleFromRange)(r);var c=r.getBoundingClientRect();return o?c:Z(c,r)}if(e.current){var i=e.current.parentNode,a=i.getBoundingClientRect();return o?a:Z(a,i)}}(I,k,x,h,g);if(n){n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{x:e.left-n,y:e.top-t,width:e.width+2*n,height:e.height+2*t,left:e.left-n,right:e.right+n,top:e.top-t,bottom:e.bottom+t}}(n,v,y),q.current||(q.current=t.getBoundingClientRect());var r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=n.split(" "),o=Object(O.a)(r,2),c=o[0],i=o[1],a=void 0===i?"center":i,u=P(e,t,c),s=R(e,t,a,u.yAxis);return Object(_.a)({},s,u)}(n,q.current,d),o=r.popoverTop,c=r.popoverLeft,i=r.xAxis,a=r.yAxis,u=r.contentHeight,s=r.contentWidth;te(e,"is-without-arrow",f||"center"===i&&"middle"===a),X(e,"data-x-axis",i),X(e,"data-y-axis",a),ee(e,"top","number"==typeof o?o+"px":""),ee(e,"left","number"==typeof c?c+"px":""),ee(t,"maxHeight","number"==typeof u?u+"px":""),ee(t,"maxWidth","number"==typeof s?s+"px":"");G(({left:"right",right:"left"}[i]||"center")+" "+({top:"bottom",bottom:"top"}[a]||"middle"))}},r=window.setTimeout(n),o=window.setInterval(n,500);return window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),function(){window.clearTimeout(r),window.clearInterval(o),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0)}}),[ne,k,x,h,g,v,y,d]),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=j.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(b,L);var re=function(e){e.keyCode===w.ESCAPE&&n&&(e.stopPropagation(),n()),o&&o(e)};var oe=Object(r.createElement)(B,{onFocusOutside:function(e){if(F)F(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}}),E()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),A(t)}else n&&n()}},Object(r.createElement)($,{type:T&&Y?"appear":null,options:{origin:Y}},(function(e){var o=e.className;return Object(r.createElement)(V,Object(s.a)({className:i()("components-popover",a,o,{"is-expanded":ne,"is-without-arrow":f})},M,{onKeyDown:re,ref:z}),ne&&Object(r.createElement)("div",{className:"components-popover__header"},Object(r.createElement)("span",{className:"components-popover__header-title"},t),Object(r.createElement)(ae,{className:"components-popover__close",icon:"no-alt",onClick:n})),Object(r.createElement)("div",{ref:L,className:"components-popover__content",tabIndex:"-1"},c))})));return b&&(oe=Object(r.createElement)(J,null,oe)),Object(r.createElement)(H,null,(function(e){var t=e.getSlot;return t&&t("Popover")&&(oe=Object(r.createElement)(K,{name:"Popover"},oe)),Object(r.createElement)("span",{ref:I},oe,W&&C&&Object(r.createElement)(D,null))}))};ne.Slot=function(){return Object(r.createElement)(Y,{bubblesVirtually:!0,name:"Popover"})};var re=ne;var oe=function(e){var t,n,c=e.shortcut,i=e.className;return c?(Object(o.isString)(c)&&(t=c),Object(o.isObject)(c)&&(t=c.display,n=c.ariaLabel),Object(r.createElement)("span",{className:i,"aria-label":n},t)):null},ce=function(e){function t(){var e;return f(this,t),(e=h(this,g(t).apply(this,arguments))).delayedSetIsOver=Object(o.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return y(t,e),d(t,[{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 c=Object(o.includes)(["focus","mouseenter"],r.type);c!==n.state.isOver&&(t?n.delayedSetIsOver(c):n.setState({isOver:c}))}}}},{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,c=e.shortcut;if(1!==r.Children.count(t))return t;var i=r.Children.only(t),a=this.state.isOver;return Object(r.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(r.concatChildren)(i.props.children,a&&Object(r.createElement)(re,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1},o,Object(r.createElement)(oe,{className:"components-tooltip__shortcut",shortcut:c})))})}}]),t}(r.Component),ie=n(75);var ae=Object(r.forwardRef)((function(e,t){var n=e.icon,c=e.children,a=e.label,f=e.className,p=e.tooltip,d=e.shortcut,m=e.labelPosition,b=e.size,h=Object(l.a)(e,["icon","children","label","className","tooltip","shortcut","labelPosition","size"]),g=i()("components-icon-button",f,{"has-text":c}),v=p||a,y=!h.disabled&&(p||d||!!a&&(!c||Object(o.isArray)(c)&&!c.length)&&!1!==p),O=Object(r.createElement)(u.a,Object(s.a)({"aria-label":a},h,{className:g,ref:t}),Object(r.createElement)(ie.a,{icon:n,size:b}),c);return y&&(O=Object(r.createElement)(ce,{text:v,shortcut:d,position:m},O)),O}));t.a=function(e){var t=e.className,n=e.status,c=e.children,s=e.onRemove,l=void 0===s?o.noop:s,f=e.isDismissible,p=void 0===f||f,d=e.actions,m=void 0===d?[]:d,b=e.__unstableHTML,h=i()(t,"components-notice","is-"+n,{"is-dismissible":p});return b&&(c=Object(r.createElement)(r.RawHTML,null,c)),Object(r.createElement)("div",{className:h},Object(r.createElement)("div",{className:"components-notice__content"},c,m.map((function(e,t){var n=e.className,o=e.label,c=e.noDefaultClasses,a=void 0!==c&&c,s=e.onClick,l=e.url;return Object(r.createElement)(u.a,{key:t,href:l,isDefault:!a&&!l,isLink:!a&&!!l,onClick:l?void 0:s,className:i()("components-notice__action",n)},o)}))),p&&Object(r.createElement)(ae,{className:"components-notice__dismiss",icon:"no-alt",label:Object(a.__)("Dismiss this notice"),onClick:l,tooltip:!1}))}},,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(50),u=function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),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"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(14),i=n.n(c),a=n(2);n(4);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,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},c))}},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(3),c=n(15),i=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(n.current){var r=e(c.SCHEMA_STORE_KEY),o=r.isResolving,i=r.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,,function(e,t,n){"use strict";n(4);var r=n(5),o=n.n(r),c=n(34),i=n(100);n(156);t.a=Object(i.a)((function(e){var t=e.className,n=e.instanceId,r=e.defaultValue,i=e.label,a=e.onChange,u=e.options,s=e.screenReaderLabel,l=e.readOnly,f=e.value,p="wc-block-components-sort-select__select-".concat(n);return React.createElement("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},React.createElement(c.a,{label:i,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",defaultValue:r,onChange:a,readOnly:l,value:f},u.map((function(e){return React.createElement("option",{key:e.key,value:e.key},e.label)}))))}))},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(4),n(5)),i=n.n(c),a=n(119),u=n(88),s=(n(109),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,c=n.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var l=i()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(a.a,o()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",s(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(35),o=n(0),c=n(8);n.p=c.F,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)((function(){return Promise.all([n.e(20),n.e(6)]).then(n.bind(null,297))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)((function(){return n.e(5).then(n.bind(null,307))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)((function(){return n.e(13).then(n.bind(null,306))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)((function(){return n.e(7).then(n.bind(null,298))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)((function(){return n.e(3).then(n.bind(null,299))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)((function(){return n.e(11).then(n.bind(null,300))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)((function(){return n.e(8).then(n.bind(null,284))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)((function(){return n.e(9).then(n.bind(null,301))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)((function(){return n.e(4).then(n.bind(null,302))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)((function(){return n.e(12).then(n.bind(null,303))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)((function(){return n.e(10).then(n.bind(null,304))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)((function(){return n.e(2).then(n.bind(null,305))}))});var i=function(e){return Object(r.getRegisteredBlockComponents)(e)}},,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},,,,,,,,,,,,,function(e,t,n){e.exports=n(265)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(129),o=n(88),c=n(108),i=n(30),a=n.n(i),u=n(31),s=n.n(u),l=n(32),f=n.n(l),p=n(33),d=n.n(p),m=n(20),b=n.n(m),h=n(2),g=(n(4),n(10)),v=n.n(g),y=n(0),O=n(14),j=n.n(O),w=n(6),k=n.n(w),E=n(1),S=n(7),_=n(5),x=n.n(_),R=n(34),P=(n(209),function(e){var t=e.currentPage,n=e.displayFirstAndLastPages,r=e.displayNextAndPreviousArrows,o=e.pagesToDisplay,c=e.onPageChange,i=e.totalPages,a=function(e,t,n){if(n<=2)return{minIndex:null,maxIndex:null};var r=e-1,o=Math.max(Math.floor(t-r/2),2),c=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(c-t))),2),maxIndex:c}}(o,t,i),u=a.minIndex,s=a.maxIndex,l=n&&Boolean(1!==u),f=n&&Boolean(s!==i),p=n&&Boolean(u>3),d=n&&Boolean(s<i-2);l&&3===u&&(u-=1),f&&s===i-2&&(s+=1);var m=[];if(u&&s)for(var b=u;b<=s;b++)m.push(b);return React.createElement("div",{className:"wc-block-pagination wc-block-components-pagination"},React.createElement(R.a,{screenReaderLabel:Object(E.__)("Navigate to another page","woo-gutenberg-products-block")}),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t-1)},title:Object(E.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},React.createElement(R.a,{label:"<",screenReaderLabel:Object(E.__)("Previous page","woo-gutenberg-products-block")})),l&&React.createElement("button",{className:x()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return c(1)},disabled:1===t},React.createElement(R.a,{label:1,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),1)})),p&&React.createElement("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(E.__)("…","woo-gutenberg-products-block")),m.map((function(e){return React.createElement("button",{key:e,className:x()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return c(e)},disabled:t===e},React.createElement(R.a,{label:e,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),e)}))})),d&&React.createElement("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(E.__)("…","woo-gutenberg-products-block")),f&&React.createElement("button",{className:x()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===i,"wc-block-components-pagination__page--active":t===i}),onClick:function(){return c(i)},disabled:t===i},React.createElement(R.a,{label:i,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),i)})),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t+1)},title:Object(E.__)("Next page","woo-gutenberg-products-block"),disabled:t>=i},React.createElement(R.a,{label:">",screenReaderLabel:Object(E.__)("Next page","woo-gutenberg-products-block")})))});P.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var C=P,N=n(137),T=(n(208),function(e){var t=e.defaultValue,n=e.onChange,r=e.readOnly,o=e.value;return React.createElement(N.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:n,options:[{key:"menu_order",label:Object(E.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(E.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(E.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(E.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(E.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(E.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(E.__)("Order products by","woo-gutenberg-products-block"),value:o})}),A=n(69),F=n(100),M=n(11),I=n.n(M),B=n(146),D=Object(F.a)((function(e){var t=e.product,n=e.attributes,r=e.instanceId,o=n.layoutConfig,c=Object(A.useInnerBlockLayoutContext)(),i=c.parentClassName,a=c.parentName,u=0===Object.keys(t).length,s=x()("".concat(i,"__product"),"wc-block-layout",{"is-loading":u});return React.createElement("li",{className:s,"aria-hidden":u},function e(t,n,r,o){if(r){var c=Object(B.a)(t);return r.map((function(r,i){var a=v()(r,2),u=a[0],s=a[1],l=void 0===s?{}:s,f=[];l.children&&l.children.length>0&&(f=e(t,n,l.children,o));var p=c[u];if(!p)return null;var d=n.id||0,m=["layout",u,i,o,d];return React.createElement(y.Suspense,{key:m.join("_"),fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(p,I()({},l,{children:f,product:n})))}))}}(a,t,o,r))})),L=n(99),V=n(114),z=n(15),q=n(12),H=n(36);function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K=function(e){var t={namespace:"/wc/store",resourceName:"products"},n=Object(V.a)(U(U({},t),{},{query:e})),r=n.results,o=n.isLoading,c=function(e,t){var n=t.namespace,r=t.resourceName,o=t.resourceValues,c=void 0===o?[]:o,i=t.query,a=void 0===i?{}:i;if(!n||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var u=Object(H.a)(a),s=Object(H.a)(c),l=Object(q.useSelect)((function(t){var o=t(z.COLLECTIONS_STORE_KEY),c=[e,n,r,u,s];return{value:o.getCollectionHeader.apply(o,c),isLoading:o.hasFinishedResolution("getCollectionHeader",c)}}),[e,n,r,s,u]),f=l.value,p=l.isLoading;return{value:f,isLoading:void 0===p||p}}("x-wp-total",U(U({},t),{},{query:e})).value;return{products:r,totalProducts:parseInt(c,10),productsLoading:o}},Q=n(96),Y=n(102),G=n(44),$=(n(207),n(127)),J=n(50),Z=React.createElement(J.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.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"})),X=function(){var e=Object(A.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(e,"__no-products")},React.createElement($.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:Z,size:100}),React.createElement("strong",{className:"".concat(e,"__no-products-title")},Object(E.__)("No products","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(e,"__no-products-description")},Object(E.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},ee=React.createElement(J.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.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"})),te=function(e){var t=e.resetCallback,n=void 0===t?function(){}:t,r=Object(A.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(r,"__no-products")},React.createElement($.a,{className:"".concat(r,"__no-products-image"),alt:"",srcElement:ee,size:100}),React.createElement("strong",{className:"".concat(r,"__no-products-title")},Object(E.__)("No products found","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(r,"__no-products-description")},Object(E.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),React.createElement("button",{onClick:n},Object(E.__)("Reset Search","woo-gutenberg-products-block")))};function ne(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 re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe=function(e){var t=e.totalQuery,n=e.totalProducts,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.totalQuery;return!Object(S.isEqual)(t,o)&&Number.isFinite(n)},ce=Object(Y.a)((function(e){var t=e.attributes,n=e.currentPage,r=e.onPageChange,o=e.onSortChange,c=e.sortValue,i=e.scrollToTop,a=Object(L.c)(function(e){var t=e.sortValue,n=e.currentPage,r=e.attributes,o=r.columns,c=r.rows;return re(re({},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:n})}({attributes:t,sortValue:c,currentPage:n})),u=v()(a,1)[0],s=K(u),l=s.products,f=s.totalProducts,p=s.productsLoading,d=Object(A.useInnerBlockLayoutContext)().parentClassName,m=function(e){e.order,e.orderby,e.page,e.per_page;return j()(e,["order","orderby","page","per_page"])||{}}(u),b=Object(L.b)("attributes",[]),h=v()(b,2),g=h[0],O=h[1],w=Object(L.b)("min_price"),k=v()(w,2),_=k[0],R=k[1],P=Object(L.b)("max_price"),N=v()(P,2),F=N[0],M=N[1],I=Object(Q.a)({totalQuery:m,totalProducts:f},oe);Object(y.useEffect)((function(){Object(S.isEqual)(m,null==I?void 0:I.totalQuery)||(r(1),(null==I?void 0:I.totalQuery)&&function(e){Number.isFinite(e)&&(0===e?Object(G.speak)(Object(E.__)("No products found","woo-gutenberg-products-block")):Object(G.speak)(Object(E.sprintf)(Object(E._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(f))}),[null==I?void 0:I.totalQuery,f,r,m]);var B,V,z,q,H,W=t.contentVisibility,U=t.columns*t.rows,Y=!Number.isFinite(f)&&Number.isFinite(null==I?void 0:I.totalProducts)&&Object(S.isEqual)(m,null==I?void 0:I.totalQuery)?Math.ceil(I.totalProducts/U):Math.ceil(f/U),$=l.length?l:Array.from({length:U}),J=0!==l.length||p,Z=g.length>0||Number.isFinite(_)||Number.isFinite(F);return React.createElement("div",{className:(B=t.columns,V=t.rows,z=t.alignButtons,q=t.align,H=void 0!==q?"align"+q:"",x()(d,H,"has-"+B+"-columns",{"has-multiple-rows":V>1,"has-aligned-buttons":z}))},W.orderBy&&J&&React.createElement(T,{onChange:o,value:c}),!J&&Z&&React.createElement(te,{resetCallback:function(){O([]),R(null),M(null)}}),!J&&!Z&&React.createElement(X,null),J&&React.createElement("ul",{className:"".concat(d,"__products")},$.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return React.createElement(D,{key:e.id||n,attributes:t,product:e})}))),Y>1&&React.createElement(C,{currentPage:n,onPageChange:function(e){i({focusableSelector:"a, button"}),r(e)},totalPages:Y}))})),ie=function(e){var t=e.attributes,n=Object(y.useState)(1),r=v()(n,2),o=r[0],c=r[1],i=Object(y.useState)(t.orderby),a=v()(i,2),u=a[0],s=a[1];Object(y.useEffect)((function(){s(t.orderby)}),[t.orderby]);return 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=n(8),ue=React.createElement("img",{src:ae.E+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}});function se(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=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}var le=function(e){f()(n,e);var t=se(n);function n(){return a()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.urlParameterSuffix;return t.isPreview?ue:React.createElement(A.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},React.createElement(ie,{attributes:t,urlParameterSuffix:n}))}}]),n}(h.Component);Object(c.a)({selector:".wp-block-woocommerce-all-products",Block:Object(r.a)((function(e){return React.createElement(o.a,{context:"wc/all-products"},React.createElement(le,e))})),getProps:function(e){return{attributes:JSON.parse(e.dataset.attributes)}}})}]);
build/all-products.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', '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-url', 'wp-viewport', 'wp-wordcount'), 'version' => '70bf694d9609f18075af81550bf1df46');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', '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-url', 'wp-viewport', 'wp-wordcount'), 'version' => '49a9295e7b15d85319464c7d447a310c');
build/all-products.js CHANGED
@@ -1 +1 @@
1
- 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=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&p.push(c[a][0]),c[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);p.length;)p.shift()();return o.push.apply(o,u||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,i=1;i<r.length;i++){var s=r[i];0!==c[s]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={5:0,2:0,3:0,8:0,9:0,11:0,12:0,13:0,14:0,15:0,16:0},o=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=n);var o,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({1:"atomic-block-components/add-to-cart~atomic-block-components/image~atomic-block-components/title",2:"atomic-block-components/add-to-cart~atomic-block-components/button",3:"atomic-block-components/sale-badge",7:"atomic-block-components/add-to-cart",8:"atomic-block-components/button",9:"atomic-block-components/category-list",10:"atomic-block-components/image",11:"atomic-block-components/price",12:"atomic-block-components/rating",13:"atomic-block-components/sku",14:"atomic-block-components/stock-indicator",15:"atomic-block-components/summary",16:"atomic-block-components/tag-list",17:"atomic-block-components/title"}[e]||e)+".js"}(e);var s=new Error;o=function(t){i.onerror=i.onload=null,clearTimeout(u);var r=c[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",s.name="ChunkLoadError",s.type=n,s.request=o,r[1](s)}c[e]=void 0}};var u=setTimeout((function(){o({type:"timeout",target:i})}),12e4);i.onerror=i.onload=o,document.head.appendChild(i)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=s;return o.push([839,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},102: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},108:function(e,t){},109:function(e,t){},110:function(e,t){},111:function(e,t){},112:function(e,t){},113:function(e,t){},114:function(e,t){},115:function(e,t){},116:function(e,t){},117:function(e,t){},118:function(e,t){},119:function(e,t){},120:function(e,t){},121:function(e,t){},122:function(e,t){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},134:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(41),c=r(36),o=r(211),a=r(33),i=r(6),s={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(o.b)(),r=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},b=e.shouldSelect,p=Object(c.useSelect)((function(e,t){var c=t.dispatch;if(!b)return s;if(r)return{cartCoupons:l.coupons,cartItems:l.items,cartItemsCount:l.items_count,cartItemsWeight:l.items_weight,cartNeedsPayment:l.needs_payment,cartNeedsShipping:l.needs_shipping,cartItemErrors:[],cartTotals:l.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:l.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==l?void 0:l.receiveCart)?l.receiveCart:function(){}};var o=e(n.CART_STORE_KEY),u=o.getCartData(),p=o.getCartErrors(),d=o.getCartTotals(),f=!o.hasFinishedResolution("getCartData"),m=o.areShippingRatesLoading(),O=c(n.CART_STORE_KEY).receiveCart,g=Object(i.mapValues)(u.shippingAddress,(function(e){return Object(a.decodeEntities)(e)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:d,cartIsLoading:f,cartErrors:p,shippingAddress:g,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!g.country,receiveCart:O}}),[b]);return p}},135:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(61),a=r(167),i=r(3),s=r(14),u=r(44);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}},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},140:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(8),c=r.n(n),o=r(190),a=r(0);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,r=e.createNotice,n=e.removeNotice,c=e.createSnackbarNotice,i=e.setIsSuppressed,u=Object(a.useRef)(t);Object(a.useEffect)((function(){u.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),b=Object(a.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))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[r,c]);return s(s(s({notices:t},l),b),{},{setIsSuppressed:i})}},142:function(e,t){!function(){e.exports=this.wp.wordcount}()},143:function(e,t,r){"use strict";var n=r(51),c=r.n(n),o=r(10),a=r.n(o),i=r(0),s=r(1),u=r(6),l=(r(2),r(50)),b=r(4),p=r(7),d=r.n(p),f=r(21),m=r.n(f),O=r(24),g=r.n(O),j=r(22),v=r.n(j),h=r(23),y=r.n(h),w=r(12),E=r.n(w),_=r(25);function k(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=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var P=Object(_.createHigherOrderComponent)((function(e){var t=function(t){v()(n,t);var r=k(n);function n(){return m()(this,n),r.apply(this,arguments)}return g()(n,[{key:"render",value:function(){var t=this.props.selected;return Object(i.createElement)(e,a()({},this.props,{selected:Object(u.isNil)(t)?[]:[t]}))}}]),n}(i.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),C=r(301),S=r(15),N=r.n(S),x=r(37),D=r.n(x),B=r(19),z=r.n(B),R=r(8),T=r.n(R),I=r(46),L=r.n(I),A=r(40),V=r(43);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){T()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(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=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var q=Object(_.createHigherOrderComponent)((function(e){var t=function(t){v()(n,t);var r=H(n);function n(){var e;m()(this,n);for(var t=arguments.length,c=new Array(t),o=0;o<t;o++)c[o]=arguments[o];return e=r.call.apply(r,[this].concat(c)),T()(z()(e),"state",{error:null,loading:!1,variations:{}}),T()(z()(e),"loadVariations",(function(){var t=e.props.products,r=e.state,n=r.loading,c=r.variations;if(!n){var o=e.getExpandedProduct();if(o&&!c[o]){var a=t.find((function(e){return e.id===o}));a.variations&&0!==a.variations.length?(e.setState({loading:!0}),Object(A.g)(o).then((function(t){var r=t.map((function(e){return M(M({},e),{},{parent:o})}));e.setState({variations:M(M({},e.state.variations),{},T()({},o,r)),loading:!1,error:null})})).catch(function(){var t=D()(N.a.mark((function t(r){var n;return N.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(V.a)(r);case 2:n=t.sent,e.setState({variations:M(M({},e.state.variations),{},T()({},o,null)),loading:!1,error:n});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())):e.setState({variations:M(M({},e.state.variations),{},T()({},o,null)),loading:!1,error:null})}}})),e}return g()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.selected,r=e.showVariations;t&&r&&this.loadVariations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isLoading,n=t.selected;t.showVariations&&(!L()(e.selected,n)||e.isLoading&&!r)&&this.loadVariations()}},{key:"isProductId",value:function(e){return this.props.products.some((function(t){return t.id===e}))}},{key:"findParentProduct",value:function(e){return this.props.products.filter((function(t){return t.variations&&t.variations.find((function(t){return t.id===e}))}))[0].id}},{key:"getExpandedProduct",value:function(){var e=this.props,t=e.isLoading,r=e.selected;if(!e.showVariations)return null;var n=r&&r.length?r[0]:null;return n?this.prevSelectedItem=n:this.prevSelectedItem&&(t||this.isProductId(this.prevSelectedItem)||(n=this.prevSelectedItem)),!t&&n?this.isProductId(n)?n:this.findParentProduct(n):null}},{key:"render",value:function(){var t=this.props,r=t.error,n=t.isLoading,c=this.state,o=c.error,s=c.loading,u=c.variations;return Object(i.createElement)(e,a()({},this.props,{error:o||r,expandedProduct:this.getExpandedProduct(),isLoading:n,variations:u,variationsLoading:s}))}}]),n}(i.Component);return T()(t,"defaultProps",{selected:[],showVariations:!1}),t}),"withProductVariations"),U=r(61),Q=r(58),Y=Object(i.createElement)(Q.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),W=Object(i.createElement)(Q.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),X=r(49);r(199);function G(e,t){if(!t)return e;var r=new RegExp(Object(u.escapeRegExp)(t),"ig");return e.replace(r,"<strong>$&</strong>")}var K=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(i.createElement)(U.a,{srcElement:Y}):Object(i.createElement)(U.a,{srcElement:W})},$={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},J=function(e){var t=e.expandedProduct,r=e.error,n=e.isLoading,o=e.onChange,p=e.onSearch,f=e.products,m=e.renderItem,O=e.selected,g=e.showVariations,j=e.variations,v=e.variationsLoading,h=function(e){var r=e.item,n=e.search,c=e.depth,o=void 0===c?0:c,p=e.isSelected,f=e.onSelect,m=r.variations&&Array.isArray(r.variations)?r.variations.length:0,O=d()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(o),{"is-searching":n.length>0,"is-skip-level":0===o&&0!==r.parent,"is-variable":m>0}),g=Object.assign({},e);delete g.isSingle;var j={role:"menuitemradio"};return r.breadcrumbs.length&&(j["aria-label"]="".concat(r.breadcrumbs[0],": ").concat(r.name)),m&&(j["aria-expanded"]=r.id===t),r.breadcrumbs.length?(Object(u.isEmpty)(r.variation)||(r.name=r.variation),Object(i.createElement)(l.b,a()({className:O},e,j))):[Object(i.createElement)(b.MenuItem,a()({key:"product-".concat(r.id),isSelected:p},g,j,{className:O,onClick:function(){f(r)()}}),Object(i.createElement)("span",{className:"woocommerce-search-list__item-state"},K(p)),Object(i.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(i.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:G(r.name,n)}})),m?Object(i.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(s.sprintf)(Object(s._n)("%d variation","%d variations",m,"woo-gutenberg-products-block"),m)):null),t===r.id&&m>0&&v&&Object(i.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(i.createElement)(b.Spinner,null))]};if(r)return Object(i.createElement)(X.a,{error:r});var y=j&&j[t]?j[t]:[],w=[].concat(c()(f),c()(y));return Object(i.createElement)(l.a,{className:"woocommerce-products",list:w,isLoading:n,isSingle:!0,selected:w.filter((function(e){var t=e.id;return O.includes(t)})),onChange:o,renderItem:m||(g?h:null),onSearch:p,messages:$,isHierarchical:!0})};J.defaultProps={expandedProduct:null,selected:[],showVariations:!1};t.a=P(Object(C.a)(q(J)))},144:function(e,t,r){"use strict";var n=r(0),c=r(58),o=Object(n.createElement)(c.a,{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},149:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(48),i=r(192);r(201);t.a=Object(i.a)((function(e){var t=e.className,r=e.instanceId,c=e.defaultValue,i=e.label,s=e.onChange,u=e.options,l=e.screenReaderLabel,b=e.readOnly,p=e.value,d="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:i,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",defaultValue:c,onChange:s,readOnly:b,value:p},u.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},15:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},150:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(8),c=r.n(n),o=r(6);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:s,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case s:return b.set(o,{priority:l,callback:a}),i(i({},e),{},c()({},n,b));case u:return b.delete(o),i(i({},e),{},c()({},n,b))}return e}},152:function(e,t,r){"use strict";var n=r(21),c=r.n(n),o=r(24),a=r.n(o),i=r(22),s=r.n(i),u=r(23),l=r.n(u),b=r(12),p=r.n(b),d=r(0),f=r(6),m=r(1),O=r(4);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}function j(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=p()(e);if(t){var c=p()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return l()(this,r)}}var v=function(e){s()(r,e);var t=j(r);function r(){return c()(this,r),t.apply(this,arguments)}return a()(r,[{key:"createLevelControl",value:function(e,t,r){var n=e===t;return{icon:Object(d.createElement)(g,{level:e}),title:Object(m.sprintf)(Object(m.__)("Heading %d"),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.Toolbar,{isCollapsed:n,icon:Object(d.createElement)(g,{level:a}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),r}(d.Component);t.a=v},155:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(11),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},164:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=r(1),i=r(55),s=r(7),u=r.n(s),l=(r(2),r(236),function(e){var t=e.className,r=e.currency,n=e.maxPrice,c=e.minPrice,a=e.priceClassName,s=e.priceStyle;return Object(o.createElement)("span",{className:t},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:c,style:s})," — ",Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:n,style:s}))}),b=function(e){var t=e.className,r=e.currency,n=e.regularPriceClassName,c=e.regularPriceStyle,s=e.regularPrice,l=e.priceClassName,b=e.priceStyle,p=e.price;return Object(o.createElement)("span",{className:t},Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",n),style:c},e)},value:s}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",l),style:b},e)},value:p}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.maxPrice,s=void 0===a?null:a,p=e.minPrice,d=void 0===p?null:p,f=e.price,m=void 0===f?null:f,O=e.priceClassName,g=e.priceStyle,j=e.regularPrice,v=e.regularPriceClassName,h=e.regularPriceStyle,y=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));return j&&m!==j?Object(o.createElement)(b,{className:y,currency:n,price:m,priceClassName:O,priceStyle:g,regularPrice:j,regularPriceClassName:v,regularPriceStyle:h}):null!==d&&null!==s?Object(o.createElement)(l,{className:y,currency:n,maxPrice:s,minPrice:d,priceClassName:O,priceStyle:g}):null!==m?Object(o.createElement)("span",{className:y},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",O),currency:n,value:m,style:g})):Object(o.createElement)("span",{className:y},Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",O)}))}},167:function(e,t,r){"use strict";var n=r(0),c=r(58),o=Object(n.createElement)(c.a,{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},17:function(e,t){!function(){e.exports=this.wp.blocks}()},171:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return d}));var n=r(11),c=r.n(n),o=r(41),a=r(36),i=r(0),s=r(102),u=r(6),l=r(60),b=function(e){var t=Object(s.a)();e=e||t;var r=Object(a.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(i.useCallback)((function(t){n(e,t)}),[e])]},p=function(e,t,r){var n=Object(s.a)();r=r||n;var c=Object(a.useSelect)((function(n){return n(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),u=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(i.useCallback)((function(t){u(r,e,t)}),[r,e])]},d=function(e,t){var r=Object(s.a)(),n=b(t=t||r),o=c()(n,2),a=o[0],p=o[1],d=Object(l.a)(e),f=Object(i.useRef)(!1);return Object(i.useEffect)((function(){p(Object(u.assign)({},a,d)),f.current=!0}),[d]),f.current?[a,p]:[e,p]}},175:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(5),o=Object(n.createElement)("img",{src:c.U+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},176:function(e,t,r){"use strict";var n=r(0),c=r(142),o=r(95),a=function(e){var t=e.indexOf("</p>");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]:"&hellip;",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]:"&hellip;",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)}},18:function(e,t){!function(){e.exports=this.wp.url}()},184:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(21),a=r.n(o),i=r(24),s=r.n(i),u=r(19),l=r.n(u),b=r(22),p=r.n(b),d=r(23),f=r.n(d),m=r(12),O=r.n(m),g=r(8),j=r.n(g),v=r(0),h=r(9);r(259);function y(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=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}t.a=function(e){var t=function(t){p()(n,t);var r=y(n);function n(){var e;return a()(this,n),e=r.call(this),j()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),j()(l()(e),"moveFocusToTop",(function(t){var r=e.scrollPointRef.current.parentElement.querySelectorAll(t);r.length&&r[0].focus()})),j()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(h.createRef)(),e}return s()(n,[{key:"render",value:function(){return Object(v.createElement)(h.Fragment,null,Object(v.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(v.createElement)(e,c()({},this.props,{scrollToTop:this.scrollToTop})))}}]),n}(h.Component);return t.displayName="withScrollToTop",t}},190:function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return j}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=(r(2),r(36)),u=r(302),l=r(944),b=r(140),p=r(211),d=function(){var e=Object(p.b)().isEditor,t=Object(b.a)(),r=t.notices,n=t.removeNotice;if(e)return null;var c=r.filter((function(e){return"snackbar"===e.type}));return Object(i.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove: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 m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(i.useContext)(O)},j=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,c=e.createNoticeContainer,o=void 0===c||c,l=e.context,b=void 0===l?"wc/core":l,p=Object(s.useDispatch)("core/notices"),f=p.createNotice,g=p.removeNotice,j=Object(i.useState)(!1),v=a()(j,2),h=v[0],y=v[1],w=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(e,t,m(m({},r),{},{context:r.context||b}))}),[f,b]),E=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;g(e,t)}),[g,b]),_=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w("default",e,m(m({},t),{},{type:"snackbar"}))}),[w]),k={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(b)}}),[b]).notices,createNotice:w,createSnackbarNotice:_,removeNotice:E,context:b,setIsSuppressed:y},P=h?null:Object(i.createElement)(u.a,{className:n,notices:k.notices}),C=h?null:Object(i.createElement)(d,null);return Object(i.createElement)(O.Provider,{value:k},o&&P,t,C)}},193:function(e,t){},199:function(e,t){},201:function(e,t){},206:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(41),c=r(36),o=r(0),a=r(155),i=r(60),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(i.a)(b),O=Object(i.a)(u),g=Object(a.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}},211: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(36),o=Object(n.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),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.previewData,s=void 0===i?{}:i,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:s};return Object(n.createElement)(o.Provider,{value:u},t)}},232:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(86),o=(r(2),r(239),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){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))})},236:function(e,t){},237:function(e,t){},238:function(e,t){},239:function(e,t){},25:function(e,t){!function(){e.exports=this.wp.compose}()},258:function(e,t,r){"use strict";r.d(t,"c",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return m}));var n=r(8),c=r.n(n),o=r(56),a=r.n(o),i=r(3);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l,b,p={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(l=i.CURRENCY.symbol,b=i.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[b]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},d=function(e){if(!e||"object"!==a()(e))return p;var t=e.currency_code,r=e.currency_symbol,n=e.currency_thousand_separator,c=e.currency_decimal_separator,o=e.currency_minor_unit,i=e.currency_prefix,s=e.currency_suffix;return{code:t||"USD",symbol:r||"$",thousandSeparator:"string"==typeof n?n:",",decimalSeparator:"string"==typeof c?c:".",minorUnit:Number.isFinite(o)?o:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof s?s:""}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(u({},p),e)},m=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=f(t),c=r/Math.pow(10,n.minorUnit),o=n.prefix+c+n.suffix,a=document.createElement("textarea");return a.innerHTML=o,a.value}},259:function(e,t){},266:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),s=r.n(i),u=r(48),l=r(44),b=r(73);r(553);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")}))}))},267:function(e,t){!function(){e.exports=this.wp.deprecated}()},268:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(58),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=void 0===r?20:r,o=a()(e,["className","size"]);return Object(i.createElement)(s.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},o),Object(i.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=r(283);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null}},283:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(58),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]);return Object(i.createElement)(s.a,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=u},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},301:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(15),a=r.n(o),i=r(37),s=r.n(i),u=r(21),l=r.n(u),b=r(24),p=r.n(b),d=r(19),f=r.n(d),m=r(22),O=r.n(m),g=r(23),j=r.n(g),v=r(12),h=r.n(v),y=r(0),w=r(6),E=r(25),_=(r(2),r(5)),k=r(40),P=r(43);function C(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=h()(e);if(t){var c=h()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return j()(this,r)}}var S=Object(E.createHigherOrderComponent)((function(e){var t=function(t){O()(o,t);var r,n=C(o);function o(){var e;return l()(this,o),(e=n.apply(this,arguments)).state={list:[],loading:!0},e.setError=e.setError.bind(f()(e)),e.debouncedOnSearch=Object(w.debounce)(e.onSearch.bind(f()(e)),400),e}return p()(o,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(k.h)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch(this.setError)}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,r=this.props.selected;Object(k.h)({selected:r,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch(this.setError)}},{key:"setError",value:(r=s()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(P.a)(t);case 2:r=e.sent,this.setState({list:[],loading:!1,error:r});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,r=this.state,n=r.error,o=r.list,a=r.loading;return Object(y.createElement)(e,c()({},this.props,{error:n,products:o,isLoading:a,onSearch:_.v?function(e){t.setState({loading:!0}),t.debouncedOnSearch(e)}:null}))}}]),o}(y.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");t.a=S},302:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(389),u=r(190),l=(r(237),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,r=e.notices,n=Object(u.b)().removeNotice,a=r.filter((function(e){return"snackbar"!==e.type}));if(!a.length)return null;var b=i()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:b},a.map((function(e){return Object(o.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))}},33:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},35:function(e,t){!function(){e.exports=this.moment}()},36:function(e,t){!function(){e.exports=this.wp.data}()},361:function(e,t,r){"use strict";var n=r(0),c=r(58),o=Object(n.createElement)(c.a,{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},390:function(e,t){},391:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(5);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(o.X)()&&(s=i(i({},s),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=s},392:function(e,t,r){"use strict";t.a={productLink:{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}}},393:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=(r(2),r(7)),u=r.n(s),l=r(5),b=r(44),p=r(73),d=r(6),f=r(266);r(554);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var g=function(){return Object(i.createElement)("img",{src:l.G,alt:"",width:500,height:500})},j=function(e){var t=e.image,r=e.onLoad,n=e.loaded,c=e.showFullSize,o=t||{},a=o.thumbnail,s=o.src,u=o.srcset,l=o.sizes,b={alt:o.alt,onLoad:r,hidden:!n,src:a};return c&&(b=O(O({},b),{},{src:s,srcSet:u,sizes:l})),Object(i.createElement)(i.Fragment,null,Object(i.createElement)("img",b),!n&&Object(i.createElement)(g,null))};t.a=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,o=e.productLink,s=void 0===o||o,l=e.showSaleBadge,p=e.saleBadgeAlign,m=void 0===p?"right":p,O=Object(b.useInnerBlockLayoutContext)().parentClassName,v=Object(b.useProductDataContext)().product,h=Object(i.useState)(!1),y=a()(h,2),w=y[0],E=y[1];if(!v.id)return Object(i.createElement)("div",{className:u()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",c()({},"".concat(O,"__product-image"),O))},Object(i.createElement)(g,null));var _=Object(d.isEmpty)(v.images)?null:v.images[0];return Object(i.createElement)("div",{className:u()(t,"wc-block-components-product-image",c()({},"".concat(O,"__product-image"),O))},s?Object(i.createElement)("a",{href:v.permalink,rel:"nofollow"},!!l&&Object(i.createElement)(f.default,{align:m,product:v}),Object(i.createElement)(j,{image:_,onLoad:function(){return E(!0)},loaded:w,showFullSize:"cropped"!==n})):Object(i.createElement)(i.Fragment,null,!!l&&Object(i.createElement)(f.default,{align:m,product:v}),Object(i.createElement)(j,{image:_,onLoad:function(){return E(!0)},loaded:w,showFullSize:"cropped"!==n})))}))},394:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},i=function(e){return n(e,c.ERROR)},s=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:s}}},395:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(150),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))}}}},396:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return d}));var n=r(15),c=r.n(n),o=r(56),a=r.n(o),i=r(37),s=r.n(i);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(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=e[Symbol.iterator]()},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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=[],s=u(o),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(n));case 10:d=e.sent,"object"===a()(d)&&i.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),s.e(e.t1);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=u(o),e.prev=2,i.s();case 4:if((s=i.n()).done){e.next=23;break}return l=s.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),i.e(e.t1);case 28:return e.prev=28,i.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},397:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},398:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(86),i=r(11),s=r.n(i),u=r(1),l=r(60),b=r(140),p=r(394),d=r(929),f="pristine",m="idle",O="disabled",g="processing",j="before_processing",v="after_processing",h={status:f,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},y="set_pristine",w="set_idle",E="set_disabled",_="set_processing",k="set_before_processing",P="set_after_processing",C="set_processing_response",S="set_has_error",N="set_no_error",x="set_quantity",D="set_request_params",B=y,z=w,R=E,T=_,I=k,L=P,A=C,V=S,F=N,M=x,H=D,q=function(){return{type:B}},U=function(){return{type:z}},Q=function(){return{type:R}},Y=function(){return{type:T}},W=function(){return{type:I}},X=function(){return{type:L}},G=function(e){return{type:A,data:e}},K=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?V:F;return{type:t}},$=function(e){return{type:M,quantity:e}},J=function(e){return{type:H,data:e}},Z=r(8),ee=r.n(Z);function te(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 re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=y,ce=w,oe=E,ae=_,ie=k,se=P,ue=C,le=S,be=N,pe=x,de=D,fe=f,me=m,Oe=O,ge=g,je=j,ve=v,he=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case ne:e=h;break;case ce:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case oe:e=t.status!==Oe?re(re({},t),{},{status:Oe}):t;break;case pe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case de:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),o)});break;case ue:e=re(re({},t),{},{processingResponse:o});break;case ae:e=!1===(e=t.status!==ge?re(re({},t),{},{status:ge,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case ie:e=t.status!==je?re(re({},t),{},{status:je,hasError:!1}):t;break;case se:e=t.status!==ve?re(re({},t),{},{status:ve}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===ge||t.status===je?re(re({},e),{},{status:me}):e;break;case be:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&c!==ne&&e.status===fe&&(e.status=me),e},ye=r(150),we=r(395),Ee="add_to_cart_before_processing",_e="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",Pe=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(we.a)(_e,e),onAddToCartProcessingWithError:Object(we.a)(ke,e),onAddToCartBeforeProcessing:Object(we.a)(Ee,e)}},Ce=r(396),Se=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){}}}),Ne=function(){return Object(n.useContext)(Se)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(he,h),i=s()(o,2),f=i[0],y=i[1],w=Object(n.useReducer)(ye.b,{}),E=s()(w,2),_=E[0],k=E[1],P=Object(l.a)(_),C=Object(b.a)(),S=C.addErrorNotice,N=C.removeNotices,x=Object(a.b)().setValidationErrors,D=Object(p.a)(),B=D.isSuccessResponse,z=D.isErrorResponse,R=D.isFailResponse,T=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Pe(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Pe(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Pe(k).onAddToCartBeforeProcessing}}),[k]),I=Object(n.useMemo)((function(){return{resetForm:function(){y(q())},submitForm:function(){y(W())},setQuantity:function(e){y($(e))},setHasError:function(e){y(K(e))},setRequestParams:function(e){y(J(e))},setAfterProcessing:function(e){y(G(e)),y(X())}}}),[]);Object(n.useEffect)((function(){var e=f.status,t=!r.id||!Object(d.a)(r);e!==O||t?e!==O&&t&&y(Q()):y(U())}),[f.status,r,y]),Object(n.useEffect)((function(){f.status===j&&(N("error"),Object(Ce.a)(P,Ee,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&S(t),r&&x(r)})),y(U())):y(Y())})))}),[f.status,x,S,N,y,P]),Object(n.useEffect)((function(){if(f.status===v){var e={processingResponse:f.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;S(e.message,t)}};if(f.hasError)return void Object(Ce.b)(P,ke,e).then((function(r){if(z(r)||R(r))t(r);else{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");S(c,{id:"add-to-cart"})}y(U())}));Object(Ce.b)(P,_e,e).then((function(e){z(e)||R(e)?(t(e),y(K(!0))):y(U())}))}}),[f.status,f.hasError,f.processingResponse,I,S,z,R,B,P]);var L=Object(d.b)(r),A={product:r,productType:r.type||"simple",productIsPurchasable:Object(d.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:L,showFormElements:c&&L,quantity:f.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:f.requestParams,isIdle:f.status===m,isDisabled:f.status===O,isProcessing:f.status===g,isBeforeProcessing:f.status===j,isAfterProcessing:f.status===v,hasError:f.hasError,eventRegistration:T,dispatchActions:I};return Object(n.createElement)(Se.Provider,{value:A},t)},De=r(13),Be=r.n(De),ze=r(134),Re=r(33),Te=r(536);function Ie(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 Le=function(){var e=Ne(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,i=e.hasError,l=e.isProcessing,p=e.requestParams,d=Object(a.b)(),f=d.hasValidationErrors,m=d.showAllValidationErrors,O=Object(b.a)(),g=O.addErrorNotice,j=O.removeNotice,v=Object(ze.a)().receiveCart,h=Object(n.useState)(!1),y=s()(h,2),w=y[0],E=y[1],_=!i&&l,k=Object(n.useCallback)((function(){return!f||(m(),{type:"error"})}),[f,m]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var P=Object(n.useCallback)((function(){E(!0),j("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},p);Be()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Be.a.setNonce(e.headers),e.json().then((function(r){e.ok?v(r):(r.body&&r.body.message?g(Object(Re.decodeEntities)(r.body.message),{id:"add-to-cart"}):g(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),E(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&v(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,g,j,v,t,c,p]);return Object(n.useEffect)((function(){_&&!w&&P()}),[_,P,w]),null},Ae=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(a.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Le,null)))},Ve=r(44),Fe=r(6),Me=r(73),He=(r(390),r(99)),qe=r(61),Ue=r(563),Qe=r(842),Ye=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(He.a,{className:t,href:r,rel:"nofollow"},c)},We=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,i=e.onClick;return Object(n.createElement)(He.a,{className:t,disabled:o,showSpinner:c,onClick:i},a&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(qe.a,{srcElement:Ue.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},Xe=function(){var e=Ne(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,i=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,p=e.hasError,d=e.dispatchActions,f=Object(Qe.a)(o.id||0).cartQuantity,m=Object(n.useState)(!1),O=s()(m,2),g=O[0],j=O[1],v=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return p||j(!0),!0}),0);return function(){e()}}),[b,p]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(We,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:f,isDisabled:i,isProcessing:l,isDone:g,onClick:function(){return d.submitForm()}}):Object(n.createElement)(Ye,{className:"wc-block-components-product-add-to-cart-button",href:v.url,text:v.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=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)}})},Ke=function(e){var t=e.reason,r=void 0===t?Object(u.__)("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)},$e=function(){var e=Ne(),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)(Ke,null):t.id&&!t.is_in_stock?Object(n.createElement)(Ke,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Xe,null))},Je=(r(562),r(51)),Ze=r.n(Je),et=r(4),tt=r(9),rt=r(232),nt={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,i=e.value,s=void 0===i?"":i,l=e.onChange,b=void 0===l?function(){}:l,p=e.errorMessage,d=void 0===p?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):p,f=Object(a.b)(),m=f.getValidationError,O=f.setValidationErrors,g=f.clearValidationError,j=t,v=m(j)||{};return Object(tt.useEffect)((function(){s?g(j):O(ee()({},j,{message:d,hidden:!0}))}),[s,j,d,g,O]),Object(tt.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)(et.SelectControl,{label:Object(Re.decodeEntities)(t),value:s||"",options:[nt].concat(Ze()(c)),onChange:b,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":v.message&&!v.hidden})}),Object(n.createElement)(rt.a,{propertyName:j,elementId:j}))};function ot(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 at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},st=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],i=at(at({},r),{},ee()({},c,null)),s=o?it(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(Re.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};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 lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(l.a)(t),a=Object(l.a)(r),i=Object(n.useState)(0),u=s()(i,2),b=u[0],p=u[1],d=Object(n.useState)({}),f=s()(d,2),m=f[0],O=f[1],g=Object(n.useMemo)((function(){return st(o,a,m)}),[m,o,a]);return Object(n.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(o).length?p(function(e,t,r){return it(e,t,r)[0]||0}(o,a,m)):b>0&&p(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)(ct,{key:e,attributeName:e,options:g[e],value:m[e],onChange:function(t){O(lt(lt({},m),{},ee()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Fe.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)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Ne(),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)(Ke,null):t.id&&!t.is_in_stock?Object(n.createElement)(Ke,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(pt,{product:t,dispatchers:a}),Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Xe,null))},ft=function(){return Object(n.createElement)(Xe,null)},mt=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},Ot=function(){return Object(n.createElement)(mt,null)},gt=function(){var e=Ne(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(Ot,null):"external"===r?Object(n.createElement)(ft,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Xe,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Ve.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Fe.isEmpty)(c)});return Object(n.createElement)(Ae,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(gt,null)))}))},399:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(33),u=r(44),l=r(14),b=r(5),p=function(e){var t=e.color,r=e.fontSize;return Object(b.X)()?{color:t,fontSize:r}:{}},d=r(73);r(552),t.a=Object(d.withProductDataContext)((function(e){var t,r,n,a=e.className,d=e.headingLevel,f=void 0===d?2:d,m=e.productLink,O=void 0===m||m,g=e.align,j=e.color,v=e.customColor,h=e.fontSize,y=e.customFontSize,w=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,_="h".concat(f),k=Object(l.getColorClassName)("color",j),P=Object(l.getFontSizeClass)(h),C=i()((t={"has-text-color":j||v,"has-font-size":h||y},c()(t,k,k),c()(t,P,P),t));if(!E.id)return Object(o.createElement)(_,{className:i()(a,"wc-block-components-product-title",(n={},c()(n,"".concat(w,"__product-title"),w),c()(n,"wc-block-components-product-title--align-".concat(g),g&&Object(b.X)()),c()(n,C,Object(b.X)()),n)),style:p({color:v,fontSize:y})});var S=Object(s.decodeEntities)(E.name);return Object(o.createElement)(_,{className:i()(a,"wc-block-components-product-title",(r={},c()(r,"".concat(w,"__product-title"),w),c()(r,"wc-block-components-product-title--align-".concat(g),g&&Object(b.X)()),r))},O?Object(o.createElement)("a",{href:E.permalink,rel:"nofollow",className:i()(c()({},C,Object(b.X)())),style:p({color:v,fontSize:y})},S):Object(o.createElement)("span",{className:i()(c()({},C,Object(b.X)())),style:p({color:v,fontSize:y})},S))}))},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t,r){"use strict";r.d(t,"h",(function(){return p})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"f",(function(){return O})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return j})),r.d(t,"g",(function(){return v})),r.d(t,"a",(function(){return h}));var n=r(8),c=r.n(n),o=r(18),a=r(13),i=r.n(a),s=r(6),u=r(5);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,l=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,i=void 0===a?[]:a,s={per_page:u.v?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",b(b({},s),i))];return u.v&&r.length&&l.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r})),l}({selected:r,search:c,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}))},d=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")})},O=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:u.y?100:0,orderby:u.y?"count":"name",order:u.y?"desc":"asc",search:n})];return u.y&&r.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),c}({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")}))},g=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products/categories",b({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})})},h=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))}},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},43:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(15),c=r.n(n),o=r(37),a=r.n(o),i=function(){var e=a()(c.a.mark((function e(t){var r;return c.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(t){return e.apply(this,arguments)}}()},44:function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},46:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},47:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},48:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r(7),s=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,b=null!=r,p=null!=n;return!b&&p?(t=c||"span",u=l(l({},u),{},{className:s()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,n)):(t=c||a.Fragment,b&&p&&r!==n?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,u,r))}},49:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(47));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")))}},5:function(e,t,r){"use strict";r.d(t,"l",(function(){return c})),r.d(t,"K",(function(){return o})),r.d(t,"Q",(function(){return a})),r.d(t,"A",(function(){return i})),r.d(t,"C",(function(){return s})),r.d(t,"m",(function(){return u})),r.d(t,"B",(function(){return l})),r.d(t,"E",(function(){return b})),r.d(t,"o",(function(){return p})),r.d(t,"D",(function(){return d})),r.d(t,"n",(function(){return f})),r.d(t,"G",(function(){return m})),r.d(t,"v",(function(){return O})),r.d(t,"y",(function(){return g})),r.d(t,"s",(function(){return j})),r.d(t,"t",(function(){return v})),r.d(t,"u",(function(){return h})),r.d(t,"k",(function(){return y})),r.d(t,"M",(function(){return w})),r.d(t,"R",(function(){return E})),r.d(t,"q",(function(){return _})),r.d(t,"r",(function(){return k})),r.d(t,"p",(function(){return P})),r.d(t,"J",(function(){return C})),r.d(t,"c",(function(){return S})),r.d(t,"w",(function(){return N})),r.d(t,"x",(function(){return x})),r.d(t,"U",(function(){return B})),r.d(t,"V",(function(){return z})),r.d(t,"L",(function(){return R})),r.d(t,"a",(function(){return T})),r.d(t,"O",(function(){return I})),r.d(t,"b",(function(){return L})),r.d(t,"N",(function(){return A})),r.d(t,"F",(function(){return V})),r.d(t,"i",(function(){return F})),r.d(t,"P",(function(){return q})),r.d(t,"h",(function(){return U})),r.d(t,"j",(function(){return Q})),r.d(t,"I",(function(){return Y})),r.d(t,"H",(function(){return W})),r.d(t,"T",(function(){return X})),r.d(t,"S",(function(){return G})),r.d(t,"d",(function(){return K})),r.d(t,"e",(function(){return $})),r.d(t,"f",(function(){return J})),r.d(t,"g",(function(){return Z})),r.d(t,"z",(function(){return ee})),r.d(t,"Y",(function(){return re})),r.d(t,"Z",(function(){return ne})),r.d(t,"W",(function(){return ce})),r.d(t,"X",(function(){return oe}));var n=r(3),c=Object(n.getSetting)("currentUserIsAdmin",!1),o=Object(n.getSetting)("reviewRatingsEnabled",!0),a=Object(n.getSetting)("showAvatars",!0),i=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),u=Object(n.getSetting)("default_columns",3),l=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),p=Object(n.getSetting)("default_rows",3),d=Object(n.getSetting)("min_height",500),f=Object(n.getSetting)("default_height",500),m=Object(n.getSetting)("placeholderImgSrc",""),O=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),g=Object(n.getSetting)("limitTags"),j=Object(n.getSetting)("hasProducts",!0),v=Object(n.getSetting)("hasTags",!0),h=Object(n.getSetting)("homeUrl",""),y=Object(n.getSetting)("couponsEnabled",!0),w=Object(n.getSetting)("shippingEnabled",!0),E=Object(n.getSetting)("taxesEnabled",!0),_=Object(n.getSetting)("displayItemizedTaxes",!1),k=Object(n.getSetting)("hasDarkEditorStyleSupport",!1),P=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),C=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),N=Object(n.getSetting)("isShippingCalculatorEnabled",!0),x=Object(n.getSetting)("isShippingCostHidden",!1),D=Object(n.getSetting)("woocommerceBlocksPhase",1),B=Object(n.getSetting)("wcBlocksAssetUrl",""),z=Object(n.getSetting)("wcBlocksBuildUrl",""),R=Object(n.getSetting)("shippingCountries",{}),T=Object(n.getSetting)("allowedCountries",{}),I=Object(n.getSetting)("shippingStates",{}),L=Object(n.getSetting)("allowedStates",{}),A=Object(n.getSetting)("shippingMethodsExist",!1),V=Object(n.getSetting)("paymentGatewaySortOrder",[]),F=Object(n.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},H=Object(n.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),q=H.shop.permalink,U=H.checkout.id,Q=H.checkout.permalink,Y=H.privacy.permalink,W=H.privacy.title,X=H.terms.permalink,G=H.terms.title,K=H.cart.id,$=H.cart.permalink,J=Object(n.getSetting)("checkoutAllowsGuest",!1),Z=Object(n.getSetting)("checkoutAllowsSignup",!1),ee=Object(n.getSetting)("loginUrl","/wp-login.php"),te=r(17),re=function(e,t){if(D>2)return Object(te.registerBlockType)(e,t)},ne=function(e,t){if(D>1)return Object(te.registerBlockType)(e,t)},ce=function(){return D>2},oe=function(){return D>1}},533:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(164),u=r(258),l=r(44),b=r(14),p=r(5),d=r(73);t.default=Object(d.withProductDataContext)((function(e){var t,r,n,a,d,f,m,O=e.className,g=e.align,j=e.fontSize,v=e.customFontSize,h=e.saleFontSize,y=e.customSaleFontSize,w=e.color,E=e.customColor,_=e.saleColor,k=e.customSaleColor,P=Object(l.useInnerBlockLayoutContext)().parentClassName,C=Object(l.useProductDataContext)().product,S=i()(O,c()({},"".concat(P,"__product-price"),P));if(!C.id)return Object(o.createElement)(s.a,{align:g,className:S});var N=Object(b.getColorClassName)("color",w),x=Object(b.getFontSizeClass)(j),D=Object(b.getColorClassName)("color",_),B=Object(b.getFontSizeClass)(h),z=i()((t={"has-text-color":w||E,"has-font-size":j||v},c()(t,N,N),c()(t,x,x),t)),R=i()((r={"has-text-color":_||k,"has-font-size":h||y},c()(r,D,D),c()(r,B,B),r)),T={color:E,fontSize:v},I={color:k,fontSize:y},L=C.prices,A=Object(u.c)(L),V=L.price!==L.regular_price,F=V?i()((n={},c()(n,"".concat(P,"__product-price__value"),P),c()(n,R,Object(p.X)()),n)):i()((a={},c()(a,"".concat(P,"__product-price__value"),P),c()(a,z,Object(p.X)()),a)),M=V?I:T;return Object(o.createElement)(s.a,{align:g,className:S,currency:A,price:L.price,priceClassName:F,priceStyle:Object(p.X)()?M:{},minPrice:null==L||null===(d=L.price_range)||void 0===d?void 0:d.min_amount,maxPrice:null==L||null===(f=L.price_range)||void 0===f?void 0:f.max_amount,regularPrice:L.regular_price,regularPriceClassName:i()((m={},c()(m,"".concat(P,"__product-price__regular"),P),c()(m,z,Object(p.X)()),m)),regularPriceStyle:Object(p.X)()?T:{}})}))},534:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),s=r.n(i),u=r(44),l=r(73),b=(r(555),function(e){var t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?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)(Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),i);return Object(o.createElement)("div",{className:s()(t,"star-rating","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)))}))},535:function(e,t,r){"use strict";r.r(t);var n=r(10),c=r.n(n),o=r(8),a=r.n(o),i=r(0),s=(r(2),r(7)),u=r.n(s),l=r(1),b=r(842),p=r(33),d=r(536),f=r(44),m=r(73),O=(r(556),function(e){var t=e.product,r=Object(i.useRef)(!0),n=t.id,o=t.permalink,a=t.add_to_cart,s=t.has_options,f=t.is_purchasable,m=t.is_in_stock,O=Object(b.a)(n),g=O.cartQuantity,j=O.addingToCart,v=O.addToCart;Object(i.useEffect)((function(){r.current?r.current=!1:Object(d.c)()}),[g]);var h=Number.isFinite(g)&&g>0,y=!s&&f&&m,w=Object(p.decodeEntities)((null==a?void 0:a.description)||""),E=h?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",g,"woo-gutenberg-products-block"),g):Object(p.decodeEntities)((null==a?void 0:a.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),_=y?"button":"a",k={};return y?k.onClick=function(){v()}:(k.href=o,k.rel="nofollow"),Object(i.createElement)(_,c()({"aria-label":w,className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:h}),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))}))},536:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return a}));var n=window.Event||null,c=function(e,t){var r=t.bubbles,c=void 0!==r&&r,o=t.cancelable,a=void 0!==o&&o,i=t.element;if(i||(i=document.body),"function"==typeof n){var s=new n(e,{bubbles:c,cancelable:a});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,a),i.dispatchEvent(u)}},o=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},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)}}},537:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(176),u=r(3),l=r(44),b=r(73);r(557);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;if(!a)return null;var b=Object(u.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r)),source:a,maxLength:150,countType:b})}))},538:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(73);r(558);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}))},539:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(6),b=r(73);r(559);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))}))))}))},54:function(e,t){!function(){e.exports=this.wp.keycodes}()},540:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(6),b=r(73);r(560);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))}))))}))},541:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(73),b=(r(561),function(e){return Object(a.sprintf)(Object(a.__)("%d left in stock","woo-gutenberg-products-block"),e)}),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")};t.default=Object(l.withProductDataContext)((function(e){var t,r=e.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;if(!a.id||!a.is_purchasable)return null;var i=!!a.is_in_stock,l=a.low_stock_remaining,d=a.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",i),c()(t,"wc-block-components-product-stock-indicator--out-of-stock",!i),c()(t,"wc-block-components-product-stock-indicator--low-stock",!!l),c()(t,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),t))},l?b(l):p(i,d))}))},542:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(9),c=function(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,r.current]),r.current}},55:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(8),a=r.n(o),i=r(27),s=r.n(i),u=r(0),l=r(183),b=r(7),p=r.n(b);r(193);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 f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.className,r=e.value,n=e.currency,o=e.onValueChange,a=s()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var i=r/Math.pow(10,n.minorUnit);if(!Number.isFinite(i))return null;var b=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),d=f(f(f({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(n)),{},{value:void 0,currency:void 0,onValueChange:void 0}),m=o?function(e){var t=e.value*Math.pow(10,n.minorUnit);o(t)}:function(){};return Object(u.createElement)(l.a,c()({className:b},d,{value:i,onValueChange:m}))}},552:function(e,t){},553:function(e,t){},554:function(e,t){},555:function(e,t){},556:function(e,t){},557:function(e,t){},558:function(e,t){},559:function(e,t){},560:function(e,t){},561:function(e,t){},562:function(e,t){},563:function(e,t,r){"use strict";var n=r(0),c=r(58),o=Object(n.createElement)(c.a,{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){!function(){e.exports=this.wc.wcBlocksRegistry}()},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},61:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(27),a=r.n(o),i=r(9);r(2);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,o=a()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},o))}},73:function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},74:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(21),a=r.n(o),i=r(24),s=r.n(i),u=r(19),l=r.n(u),b=r(22),p=r.n(b),d=r(23),f=r.n(d),m=r(12),O=r.n(m),g=r(0),j=r(6),v=r(7),h=r.n(v),y=r(4),w=r(25);r(122);function E(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=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}var _=function(e){p()(r,e);var t=E(r);function r(){var e;return a()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(l()(e)),e}return s()(r,[{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)(y.BaseControl,{id:b,help:e,className:h()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(g.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((function(e,r){var o={};return l===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(g.createElement)(y.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)}))))}}]),r}(g.Component);t.a=Object(w.withInstanceId)(_)},75:function(e,t){!function(){e.exports=this.wp.hooks}()},77:function(e,t){!function(){e.exports=this.ReactDOM}()},78:function(e,t){!function(){e.exports=this.wp.dom}()},81:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(6),a=(r(2),r(4)),i=r(5);t.a=function(e){var t=e.columns,r=e.rows,s=e.setAttributes,u=e.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(o.clamp)(e,i.C,i.A);s({columns:Object(o.isNaN)(t)?"":t})},min:i.C,max:i.A}),Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:function(e){var t=Object(o.clamp)(e,i.E,i.B);s({rows:Object(o.isNaN)(t)?"":t})},min:i.E,max:i.B}),Object(n.createElement)(a.ToggleControl,{label:Object(c.__)("Align Last Block","woo-gutenberg-products-block"),help:u?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:u,onChange:function(){return s({alignButtons:!u})}}))}},811:function(e,t,r){"use strict";var n=r(0),c=r(58),o=Object(n.createElement)(c.a,{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},818:function(e,t,r){"use strict";var n=r(0),c=r(58),o=Object(n.createElement)(c.a,{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},826:function(e,t,r){"use strict";var n=r(0),c=r(58),o=Object(n.createElement)(c.a,{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},827:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),c=r(5),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:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>7.99</span>',images:[{id:1,src:c.U+"img/pennant.jpg",thumbnail:c.U+"img/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}]},83:function(e,t){!function(){e.exports=this.wp.viewport}()},832:function(e,t,r){"use strict";var n=r(0),c=r(58),o=Object(n.createElement)(c.a,{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},839:function(e,t,r){e.exports=r(899)},840:function(e,t){},841:function(e,t){},842:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(11),c=r.n(n),o=r(0),a=r(36),i=r(134),s=r(41),u=r(33),l=r(140),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)(s.CART_STORE_KEY).addItemToCart,r=Object(i.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],v=g[1],h=Object(o.useRef)(b(n,e));return Object(o.useEffect)((function(){var t=b(n,e);t!==h.current&&(h.current=t)}),[n,e]),{cartQuantity:Number.isFinite(h.current)?h.current:0,addingToCart:j,cartIsLoading:p,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){f(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},844:function(e,t,r){"use strict";var n=r(0),c=r(58),o=Object(n.createElement)(c.a,{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},845:function(e,t){},846:function(e,t){},847:function(e,t){},848:function(e,t){},86:function(e,t,r){"use strict";r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return m}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(6),u=r(46),l=r.n(u);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 p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=Object(i.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),f=function(){return Object(i.useContext)(d)},m=function(e){var t=e.children,r=Object(i.useState)({}),n=a()(r,2),o=n[0],u=n[1],b=Object(i.useCallback)((function(e){return o[e]}),[o]),f=Object(i.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),m=Object(i.useCallback)((function(e){u((function(t){return t[e]?Object(s.omit)(t,[e]):t}))}),[]),O=Object(i.useCallback)((function(){u({})}),[]),g=Object(i.useCallback)((function(e){e&&u((function(t){return e=Object(s.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:p(p({},t),e)}))}),[]),j=Object(i.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=p(p({},r[e]),t);return l()(r[e],n)?r:p(p({},r),{},c()({},e,n))}))}),[]),v={getValidationError:b,setValidationErrors:g,clearValidationError:m,clearAllValidationErrors:O,hideValidationError:Object(i.useCallback)((function(e){j(e,{hidden:!0})}),[j]),showValidationError:Object(i.useCallback)((function(e){j(e,{hidden:!1})}),[j]),showAllValidationErrors:Object(i.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=p(p({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:p(p({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:f};return Object(i.createElement)(d.Provider,{value:v},t)}},87:function(e,t){!function(){e.exports=this.wp.a11y}()},899:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(10),a=r.n(o),i=r(0),s=r(1),u=r(14),l=r(17),b=r(61),p=r(58),d=Object(i.createElement)(p.a,{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(5),m=r(7),O=r.n(m),g=function(e){var t=e.attributes;return Object(i.createElement)("div",{className:O()("is-loading",t.className)})},j={category:"woocommerce-product-elements",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},supports:{html:!1},parent:Object(f.W)()?null:["@woocommerce/all-products","@woocommerce/single-product"],save:g,deprecated:[{save:function(){}}]},v=r(391),h=r(4),y=r(25),w=r(152),E=r(399),_=r(11),k=r.n(_),P=r(143),C=r(27),S=r.n(C);r(841);var N=function(e){var t=e.className,r=void 0===t?"":t,n=S()(e,["className"]),c=O()("wc-block-text-toolbar-button",r);return Object(i.createElement)(h.Button,a()({className:c},n))},x=r(44),D=(r(840),function(e){return function(t){return function(r){var n=Object(x.useProductDataContext)(),c=r.attributes,o=r.setAttributes,a=c.productId,l=Object(i.useState)(!a),b=k()(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)(P.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,{isDefault:!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.Toolbar,null,Object(i.createElement)(N,{onClick:function(){return d(!0)}},Object(s.__)("Switch product…","woo-gutenberg-products-block")))),Object(i.createElement)(t,r)))}}}),B=Object(i.createElement)(p.a,{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"})),z=Object(s.__)("Product Title","woo-gutenberg-products-block"),R=Object(i.createElement)(b.a,{srcElement:B}),T=Object(s.__)("Display the title of a product.","woo-gutenberg-products-block"),I=function(e){var t=e.color,r=e.fontSize,n=e.setFontSize,c=e.setColor,o=e.attributes,a=e.setAttributes,l=o.headingLevel,b=o.productLink,p=o.align;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(w.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:l,onChange:function(e){return a({headingLevel:e})}}),Object(f.X)()&&Object(i.createElement)(u.AlignmentToolbar,{value:p,onChange:function(e){a({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:b,onChange:function(){return a({productLink:!b})}})),Object(f.X)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Text settings","woo-gutenberg-products-block")},Object(i.createElement)(u.FontSizePicker,{value:r.size,onChange:n})),Object(i.createElement)(u.PanelColorSettings,{title:Object(s.__)("Color settings","woo-gutenberg-products-block"),colorSettings:[{value:t.color,onChange:c,label:Object(s.__)("Text color","woo-gutenberg-products-block")}]}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(E.a,o)))},L=Object(f.X)()?Object(y.compose)([Object(u.withFontSizes)("fontSize"),Object(u.withColors)("color",{textColor:"color"}),D({icon:R,label:z,description:Object(s.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(I):I;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 V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var F={title:z,description:T,icon:{src:R,foreground:"#874FB9"},attributes:v.a,edit:L};Object(l.registerBlockType)("woocommerce/product-title",V(V({},j),F));var M=r(533),H=r(361),q=Object(s.__)("Product Price","woo-gutenberg-products-block"),U=Object(i.createElement)(b.a,{srcElement:H.a}),Q=Object(s.__)("Display the price of a product.","woo-gutenberg-products-block"),Y=function(e){var t=e.fontSize,r=e.setFontSize,n=e.color,c=e.setColor,o=e.colorLabel;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.FontSizePicker,{value:t.size,onChange:r}),Object(i.createElement)(h.BaseControl,{label:o},Object(i.createElement)(u.ColorPalette,{value:n.color,onChange:c,label:Object(s.__)("Color")})))},W=function(e){var t=e.fontSize,r=e.saleFontSize,n=e.setFontSize,c=e.setSaleFontSize,o=e.color,a=e.saleColor,l=e.setColor,b=e.setSaleColor,p=e.attributes,d=e.setAttributes,m=p.align;return Object(i.createElement)(i.Fragment,null,Object(f.X)()&&Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(u.AlignmentToolbar,{value:m,onChange:function(e){d({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(f.X)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Price","woo-gutenberg-products-block")},Object(i.createElement)(Y,{color:o,setColor:l,fontSize:t,setFontSize:n,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Sale price","woo-gutenberg-products-block")},Object(i.createElement)(Y,{color:a,setColor:b,fontSize:r,setFontSize:c,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})))),Object(i.createElement)(M.default,p))},X=Object(f.X)()?Object(y.compose)([Object(u.withFontSizes)("fontSize"),Object(u.withFontSizes)("saleFontSize"),Object(u.withFontSizes)("originalFontSize"),Object(u.withColors)("color",{textColor:"color"}),Object(u.withColors)("saleColor",{textColor:"saleColor"}),Object(u.withColors)("originalColor",{textColor:"originalColor"}),D({icon:U,label:q,description:Object(s.__)("Choose a product to display its price.","woo-gutenberg-products-block")})])(W):W;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 K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $={productId:{type:"number",default:0}};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 Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(f.X)()&&($=K(K({},$),{},{align:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},saleFontSize:{type:"string"},customSaleFontSize:{type:"number"},color:{type:"string"},saleColor:{type:"string"},customColor:{type:"string"},customSaleColor:{type:"string"}}));var ee={title:q,description:Q,icon:{src:U,foreground:"#874FB9"},attributes:$,edit:X};Object(l.registerBlockType)("woocommerce/product-price",Z(Z({},j),ee));var te=r(392),re=r(191),ne=r(74),ce=r(3),oe=r(393),ae=Object(i.createElement)(p.a,{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:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"})),ie=Object(s.__)("Product Image","woo-gutenberg-products-block"),se=Object(i.createElement)(b.a,{srcElement:ae}),ue=Object(s.__)("Display the main product image","woo-gutenberg-products-block"),le=D({icon:se,label:ie,description:Object(s.__)("Choose a product to display its image.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=t.productLink,c=t.imageSizing,o=t.showSaleBadge,a=t.saleBadgeAlign;return Object(i.createElement)(i.Fragment,null,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:n,onChange:function(){return r({productLink:!n})}}),Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(s.__)('Overlay a "sale" badge if the product is on-sale.',"woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showSaleBadge:!o})}}),o&&Object(i.createElement)(ne.a,{label:Object(s.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:a,options:[{label:Object(s.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(s.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(s.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:function(e){return r({saleBadgeAlign:e})}}),Object(i.createElement)(ne.a,{label:Object(s.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(re.a)(Object(s.__)("Product image cropping can be modified in the <a>Customizer</a>.","woo-gutenberg-products-block"),{a:Object(i.createElement)("a",{href:"".concat(Object(ce.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)(oe.a,t)))}));function be(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 pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var de={title:ie,description:ue,icon:{src:se,foreground:"#874FB9"},attributes:te.a,edit:le};Object(l.registerBlockType)("woocommerce/product-image",pe(pe({},j),de));var fe={productId:{type:"number",default:0}},me=r(534),Oe=r(826),ge=Object(s.__)("Product Rating","woo-gutenberg-products-block"),je=Object(i.createElement)(b.a,{srcElement:Oe.a});function ve(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 he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye={title:ge,description:Object(s.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:je,foreground:"#874FB9"},attributes:fe,edit:D({icon:je,label:ge,description:Object(s.__)("Choose a product to display its rating.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(me.default,t)}))};Object(l.registerBlockType)("woocommerce/product-rating",he(he({},j),ye));var we={productId:{type:"number",default:0}},Ee=r(535),_e=r(844),ke=Object(s.__)("Add to Cart Button","woo-gutenberg-products-block"),Pe=Object(i.createElement)(b.a,{srcElement:_e.a});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 Se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne={title:ke,description:Object(s.__)("Display a call to action button which either adds the product to the cart, or links to the product page.","woo-gutenberg-products-block"),icon:{src:Pe,foreground:"#874FB9"},attributes:we,edit:D({icon:Pe,label:ke,description:Object(s.__)("Choose a product to display its add to cart button.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Ee.default,t))}))};Object(l.registerBlockType)("woocommerce/product-button",Se(Se({},j),Ne));var xe={productId:{type:"number",default:0}},De=r(537),Be=Object(i.createElement)(p.a,{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:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),ze=Object(s.__)("Product Summary","woo-gutenberg-products-block"),Re=Object(i.createElement)(b.a,{srcElement:Be});function Te(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 Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Le={title:ze,description:Object(s.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:Re,foreground:"#874FB9"},attributes:xe,edit:D({icon:Re,label:ze,description:Object(s.__)("Choose a product to display its short description.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(De.default,t)}))};Object(l.registerBlockType)("woocommerce/product-summary",Ie(Ie({},j),Le));var Ae={productId:{type:"number",default:0}},Ve=r(266),Fe=r(818),Me=Object(s.__)("On-Sale Badge","woo-gutenberg-products-block"),He=Object(i.createElement)(b.a,{srcElement:Fe.a});function qe(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 Ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Qe={title:Me,description:Object(s.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:He,foreground:"#874FB9"},supports:{html:!1},attributes:Ae,edit:D({icon:He,label:Me,description:Object(s.__)("Choose a product to display its sale-badge.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(Ve.default,t)}))};Object(l.registerBlockType)("woocommerce/product-sale-badge",Ue(Ue({},j),Qe));var Ye={productId:{type:"number",default:0}},We=r(135),Xe=r(538),Ge=Object(i.createElement)(p.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{d:"M2 6h2v12H2V6m3 0h1v12H5V6m2 0h3v12H7V6m4 0h1v12h-1V6m3 0h2v12h-2V6m3 0h3v12h-3V6m4 0h1v12h-1V6z"})),Ke=Object(s.__)("Product SKU","woo-gutenberg-products-block"),$e=Object(i.createElement)(b.a,{srcElement:Ge});function Je(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 Ze(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var et={title:Ke,description:Object(s.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:$e,foreground:"#874FB9"},attributes:Ye,edit:D({icon:$e,label:Ke,description:Object(s.__)("Choose a product to display its SKU.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(Xe.default,t))}))};Object(f.Y)("woocommerce/product-sku",Ze(Ze({},j),et));var tt={productId:{type:"number",default:0}},rt=r(539),nt=r(811),ct=Object(s.__)("Product Category List","woo-gutenberg-products-block"),ot=Object(i.createElement)(b.a,{srcElement:nt.a});function at(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 it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st={title:ct,description:Object(s.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block"),icon:{src:ot,foreground:"#874FB9"},attributes:tt,edit:D({icon:ot,label:ct,description:Object(s.__)("Choose a product to display its categories.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(rt.default,t)))}))};Object(f.Y)("woocommerce/product-category-list",it(it({},j),st));var ut={productId:{type:"number",default:0}},lt=r(540),bt=Object(s.__)("Product Tag List","woo-gutenberg-products-block"),pt=Object(i.createElement)(b.a,{srcElement:Fe.a});function dt(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 ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mt={title:bt,description:Object(s.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:pt,foreground:"#874FB9"},attributes:ut,edit:D({icon:pt,label:bt,description:Object(s.__)("Choose a product to display its tags.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(lt.default,t)))}))};Object(f.Y)("woocommerce/product-tag-list",ft(ft({},j),mt));var Ot={productId:{type:"number",default:0}},gt=r(541),jt=Object(i.createElement)(p.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("g",{fillRule:"evenodd"},Object(i.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(i.createElement)("path",{fillRule:"nonzero",d:"M20.5 5.2l-1.4-1.7C19 3.3 18.5 3 18 3H6c-.5 0-.9.2-1.2.5L3.5 5.3A2 2 0 003 6.5V19c0 1.1.9 2 2 2h14a2 2 0 002-2V6.5c0-.5-.2-1-.5-1.3zM6.2 5h11.6l.8 1H5.4l.8-1zM5 19V8h14v11H5z"}))),vt=Object(s.__)("Product Stock Indicator","woo-gutenberg-products-block"),ht=Object(i.createElement)(b.a,{srcElement:jt});function yt(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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Et={title:vt,description:Object(s.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:ht,foreground:"#874FB9"},attributes:Ot,edit:D({icon:ht,label:vt,description:Object(s.__)("Choose a product to display its stock.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(gt.default,t))}))};Object(f.Y)("woocommerce/product-stock-indicator",wt(wt({},j),Et));var _t=r(929),kt=(r(390),r(398)),Pt=Object(s.__)("Add to Cart","woo-gutenberg-products-block"),Ct=Object(i.createElement)(b.a,{srcElement:_e.a});function St(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 Nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?St(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):St(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xt={title:Pt,description:Object(s.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:Ct,foreground:"#874FB9"},edit:D({icon:Ct,label:Pt,description:Object(s.__)("Choose a product to display its add to cart form.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=Object(x.useProductDataContext)().product,c=t.className,o=t.showFormElements;return Object(i.createElement)("div",{className:O()(c,"wc-block-components-product-add-to-cart")},Object(i.createElement)(We.a,{productId:n.id}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block")},Object(_t.b)(n)?Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Display form elements","woo-gutenberg-products-block"),help:Object(s.__)("Depending on product type, allow customers to select a quantity, variations etc.","woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showFormElements:!o})}}):Object(i.createElement)(h.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(s.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.","woo-gutenberg-products-block")))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(kt.a,t)))})),attributes:r(397).a};Object(f.Y)("woocommerce/product-add-to-cart",Nt(Nt({},j),xt));var Dt=r(21),Bt=r.n(Dt),zt=r(19),Rt=r.n(zt),Tt=r(22),It=r.n(Tt),Lt=r(23),At=r.n(Lt),Vt=r(12),Ft=r.n(Vt),Mt=r(36),Ht=(r(2),r(81)),qt=r(927),Ut=r(827),Qt=r(167),Yt=function(e,t){var r=t.className,n=t.contentVisibility;return O()(e,r,{"has-image":n&&n.image,"has-title":n&&n.title,"has-rating":n&&n.rating,"has-price":n&&n.price,"has-button":n&&n.button})},Wt=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(i.createElement)("p",null,Object(s.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-products__add-product-button",isDefault:!0,isLarge:!0,href:ce.ADMIN_URL+"post-new.php?post_type=product"},Object(s.__)("Add new product","woo-gutenberg-products-block")+" ",Object(i.createElement)(b.a,{srcElement:Qt.a})),Object(i.createElement)(h.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(s.__)("Learn more","woo-gutenberg-products-block")))},Xt=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(s.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))};function Gt(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 Kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $t=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],Jt=function e(t){return t&&0!==t.length?t.map((function(t){return[t.name,Kt(Kt({},t.attributes),{},{product:void 0,children:t.innerBlocks.length>0?e(t.innerBlocks):[]})]})):[]};r(845);function Zt(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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tr=function(e,t){var r=e.contentVisibility;return Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:r.orderBy,onChange:function(){return t({contentVisibility:er(er({},r),{},{orderBy:!r.orderBy})})}})},rr=function(e,t){return Object(i.createElement)(h.SelectControl,{label:Object(s.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(s.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(s.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(s.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(s.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(s.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(s.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:function(e){return t({orderby:e})}})},nr=r(24),cr=r.n(nr),or=r(9),ar=r(56),ir=r.n(ar),sr=r(6),ur=r(48),lr=(r(848),function(e){var t=e.currentPage,r=e.displayFirstAndLastPages,n=e.displayNextAndPreviousArrows,c=e.pagesToDisplay,o=e.onPageChange,a=e.totalPages,u=function(e,t,r){if(r<=2)return{minIndex:null,maxIndex:null};var n=e-1,c=Math.max(Math.floor(t-n/2),2),o=Math.min(Math.ceil(t+(n-(t-c))),r-1);return{minIndex:Math.max(Math.floor(t-(n-(o-t))),2),maxIndex:o}}(c,t,a),l=u.minIndex,b=u.maxIndex,p=r&&Boolean(1!==l),d=r&&Boolean(b!==a),f=r&&Boolean(l>3),m=r&&Boolean(b<a-2);p&&3===l&&(l-=1),d&&b===a-2&&(b+=1);var g=[];if(l&&b)for(var j=l;j<=b;j++)g.push(j);return Object(i.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(i.createElement)(ur.a,{screenReaderLabel:Object(s.__)("Navigate to another page","woo-gutenberg-products-block")}),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t-1)},title:Object(s.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(i.createElement)(ur.a,{label:"<",screenReaderLabel:Object(s.__)("Previous page","woo-gutenberg-products-block")})),p&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return o(1)},disabled:1===t},Object(i.createElement)(ur.a,{label:1,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),1)})),f&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),g.map((function(e){return Object(i.createElement)("button",{key:e,className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return o(e)},disabled:t===e},Object(i.createElement)(ur.a,{label:e,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),e)}))})),m&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),d&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===a,"wc-block-components-pagination__page--active":t===a}),onClick:function(){return o(a)},disabled:t===a},Object(i.createElement)(ur.a,{label:a,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),a)})),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t+1)},title:Object(s.__)("Next page","woo-gutenberg-products-block"),disabled:t>=a},Object(i.createElement)(ur.a,{label:">",screenReaderLabel:Object(s.__)("Next page","woo-gutenberg-products-block")})))});lr.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var br=lr,pr=r(149),dr=(r(847),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,c=e.value;return Object(i.createElement)(pr.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:r,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:n,screenReaderLabel:Object(s.__)("Order products by","woo-gutenberg-products-block"),value:c})}),fr=r(192),mr=Object(fr.a)((function(e){var t=e.product,r=e.attributes,n=e.instanceId,c=r.layoutConfig,o=Object(x.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(qt.a)(t);return n.map((function(n,s){var u=k()(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))})),Or=r(171),gr=r(206),jr=r(41),vr=r(60);function hr(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 yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wr=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(gr.a)(yr(yr({},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(vr.a)(i),u=Object(vr.a)(o),l=Object(Mt.useSelect)((function(t){var c=t(jr.COLLECTIONS_STORE_KEY),o=[e,r,n,s,u];return{value:c.getCollectionHeader.apply(c,o),isLoading:c.hasFinishedResolution("getCollectionHeader",o)}}),[e,r,n,u,s]),b=l.value,p=l.isLoading;return{value:b,isLoading:void 0===p||p}}("x-wp-total",yr(yr({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(o,10),productsLoading:c}},Er=r(542),_r=r(184),kr=r(87),Pr=(r(846),r(144)),Cr=function(){var e=Object(x.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:Pr.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")))},Sr=r(832),Nr=function(e){var t=e.resetCallback,r=void 0===t?function(){}:t,n=Object(x.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:Sr.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")))};function xr(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 Dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Br=Object(_r.a)((function(e){var t=e.attributes,r=e.currentPage,n=e.onPageChange,c=e.onSortChange,o=e.sortValue,a=e.scrollToTop,u=Object(Or.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,c=n.columns,o=n.rows;return Dr(Dr({},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:t,sortValue:o,currentPage:r})),l=k()(u,1)[0],b=wr(l),p=b.products,d=b.totalProducts,f=b.productsLoading,m=Object(x.useInnerBlockLayoutContext)().parentClassName,g=function(e){e.order,e.orderby,e.page,e.per_page;return S()(e,["order","orderby","page","per_page"])}(l),j=Object(Or.b)("attributes",[]),v=k()(j,2),h=v[0],y=v[1],w=Object(Or.b)("min_price"),E=k()(w,2),_=E[0],P=E[1],C=Object(Or.b)("max_price"),N=k()(C,2),D=N[0],B=N[1],z=Object(Er.a)({totalQuery:g,totalProducts:d},(function(e){var t=e.totalQuery,r=e.totalProducts,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=n.totalQuery;return!Object(sr.isEqual)(t,c)&&Number.isFinite(r)})),R="object"===ir()(z)&&Object(sr.isEqual)(g,z.totalQuery);Object(i.useEffect)((function(){R||(n(1),z&&function(e){Number.isFinite(e)&&(0===e?Object(kr.speak)(Object(s.__)("No products found","woo-gutenberg-products-block")):Object(kr.speak)(Object(s.sprintf)(Object(s._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(d))}),[l]);var T,I,L,A,V,F=t.contentVisibility,M=t.columns*t.rows,H=!Number.isFinite(d)&&R?Math.ceil(z.totalProducts/M):Math.ceil(d/M),q=p.length?p:Array.from({length:M}),U=0!==p.length||f,Q=h.length>0||Number.isFinite(_)||Number.isFinite(D);return Object(i.createElement)("div",{className:(T=t.columns,I=t.rows,L=t.alignButtons,A=t.align,V=void 0!==A?"align"+A:"",O()(m,V,"has-"+T+"-columns",{"has-multiple-rows":I>1,"has-aligned-buttons":L}))},F.orderBy&&U&&Object(i.createElement)(dr,{onChange:c,value:o}),!U&&Q&&Object(i.createElement)(Nr,{resetCallback:function(){y([]),P(null),B(null)}}),!U&&!Q&&Object(i.createElement)(Cr,null),U&&Object(i.createElement)("ul",{className:"".concat(m,"__products")},q.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return Object(i.createElement)(mr,{key:e.id||r,attributes:t,product:e})}))),H>1&&Object(i.createElement)(br,{currentPage:r,onPageChange:function(e){a({focusableSelector:"a, button"}),n(e)},totalPages:H}))})),zr=function(e){var t=e.attributes,r=Object(i.useState)(1),n=k()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),s=k()(a,2),u=s[0],l=s[1];Object(i.useEffect)((function(){l(t.orderby)}),[t.orderby]);return Object(i.createElement)(Br,{attributes:t,currentPage:c,onPageChange:function(e){o(e)},onSortChange:function(e){var t=e.target.value;l(t),o(1)},sortValue:u})},Rr=r(175);function Tr(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=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return At()(this,r)}}var Ir=function(e){It()(r,e);var t=Tr(r);function r(){return Bt()(this,r),t.apply(this,arguments)}return cr()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?Rr.a:Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)(zr,{attributes:t,urlParameterSuffix:r}))}}]),r}(or.Component);function Lr(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=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return At()(this,r)}}var Ar=function(e){It()(r,e);var t=Lr(r);function r(){var e;Bt()(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),c()(Rt()(e),"state",{isEditing:!1,innerBlocks:[]}),c()(Rt()(e),"blockMap",Object(qt.a)("woocommerce/all-products")),c()(Rt()(e),"componentDidMount",(function(){var t=e.props.block;e.setState({innerBlocks:t.innerBlocks})})),c()(Rt()(e),"getTitle",(function(){return Object(s.__)("All Products","woo-gutenberg-products-block")})),c()(Rt()(e),"getIcon",(function(){return Object(i.createElement)(b.a,{srcElement:d})})),c()(Rt()(e),"togglePreview",(function(){var t=e.props.debouncedSpeak;e.setState({isEditing:!e.state.isEditing}),e.state.isEditing||t(Object(s.__)("Showing All Products block preview.","woo-gutenberg-products-block"))})),c()(Rt()(e),"getInspectorControls",(function(){var t=e.props,r=t.attributes,n=t.setAttributes,c=r.columns,o=r.rows,a=r.alignButtons;return Object(i.createElement)(u.InspectorControls,{key:"inspector"},Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(i.createElement)(Ht.a,{columns:c,rows:o,alignButtons:a,setAttributes:n})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content Settings","woo-gutenberg-products-block")},tr(r,n),rr(r,n)))})),c()(Rt()(e),"getBlockControls",(function(){var t=e.state.isEditing;return Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.Toolbar,{controls:[{icon:"edit",title:Object(s.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return e.togglePreview()},isActive:t}]}))})),c()(Rt()(e),"renderEditMode",(function(){var t={template:e.props.attributes.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(e.blockMap)};return 0!==e.props.attributes.layoutConfig.length&&(t.renderAppender=!1),Object(i.createElement)(h.Placeholder,{icon:e.getIcon(),label:e.getTitle()},Object(s.__)("Display all products from your store as a grid.","woo-gutenberg-products-block"),Object(i.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(i.createElement)(h.Tip,null,Object(s.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.","woo-gutenberg-products-block")),Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(i.createElement)("ul",{className:"wc-block-grid__products"},Object(i.createElement)("li",{className:"wc-block-grid__product"},Object(i.createElement)(x.ProductDataContextProvider,{product:Ut.a[0]},Object(i.createElement)(u.InnerBlocks,t)))))),Object(i.createElement)("div",{className:"wc-block-all-products__actions"},Object(i.createElement)(h.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,isLarge:!0,onClick:function(){var t=e.props,r=t.block;(0,t.setAttributes)({layoutConfig:Jt(r.innerBlocks)}),e.setState({innerBlocks:r.innerBlocks}),e.togglePreview()}},Object(s.__)("Done","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-all-products__cancel-button",isTertiary:!0,onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=e.state.innerBlocks;n(r.clientId,c,!1),e.togglePreview()}},Object(s.__)("Cancel","woo-gutenberg-products-block")),Object(i.createElement)(h.IconButton,{className:"wc-block-all-products__reset-button",icon:Object(i.createElement)(b.a,{srcElement:d}),label:Object(s.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=[];$t.map((function(e){var t=k()(e,2),r=t[0],n=t[1];return c.push(Object(l.createBlock)(r,n)),!0})),n(r.clientId,c,!1),e.setState({innerBlocks:r.innerBlocks})}},Object(s.__)("Reset Layout","woo-gutenberg-products-block")))))})),c()(Rt()(e),"renderViewMode",(function(){var t=e.props.attributes,r=t.layoutConfig,n=r&&0!==r.length,c=e.getTitle(),o=e.getIcon();return n?Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Ir,{attributes:t})):Xt(c,o)})),c()(Rt()(e),"render",(function(){var t=e.props.attributes,r=e.state.isEditing,n=e.getTitle(),c=e.getIcon();return f.s?Object(i.createElement)("div",{className:Yt("wc-block-all-products",t)},e.getBlockControls(),e.getInspectorControls(),r?e.renderEditMode():e.renderViewMode()):Wt(n,c)})),e}return r}(i.Component),Vr=Object(y.compose)(h.withSpokenMessages,Object(Mt.withSelect)((function(e,t){var r=t.clientId;return{block:(0,e("core/block-editor").getBlock)(r)}})),Object(Mt.withDispatch)((function(e){return{replaceInnerBlocks:e("core/block-editor").replaceInnerBlocks}})))(Ar),Fr={columns:f.m,rows:f.o,alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:$t,isPreview:!1};function Mr(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 Hr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var qr={title:Object(s.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display products from your store in a grid layout.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:Fr,edit:function(e){return Object(i.createElement)(Vr,e)},save:function(e){var t=e.attributes,r={};Object.keys(t).sort().forEach((function(e){r[e]=t[e]}));var n={"data-attributes":JSON.stringify(r)};return Object(i.createElement)("div",a()({className:Yt("wc-block-all-products",t)},n),Object(i.createElement)(u.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",Hr(Hr({},qr),{},{deprecated:[{attributes:Object.assign({},qr.attributes,{rows:{type:"number",default:1}}),save:function(e){var t=e.attributes,r={"data-attributes":JSON.stringify(t)};return Object(i.createElement)("div",a()({className:Yt("wc-block-all-products",t)},r),Object(i.createElement)(u.InnerBlocks.Content,null))}}]}))},9:function(e,t){!function(){e.exports=this.React}()},927:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(57),c=r(0),o=r(5);r.p=o.V,Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(11)]).then(r.bind(null,533))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(3),r.e(10)]).then(r.bind(null,947))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(17)]).then(r.bind(null,948))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(c.lazy)((function(){return r.e(12).then(r.bind(null,534))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(2),r.e(8)]).then(r.bind(null,535))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(c.lazy)((function(){return r.e(15).then(r.bind(null,537))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(c.lazy)((function(){return r.e(3).then(r.bind(null,266))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(c.lazy)((function(){return r.e(13).then(r.bind(null,538))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(c.lazy)((function(){return r.e(9).then(r.bind(null,539))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(c.lazy)((function(){return r.e(16).then(r.bind(null,540))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(c.lazy)((function(){return r.e(14).then(r.bind(null,541))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(2),r.e(7)]).then(r.bind(null,949))}))});var a=function(e){return Object(n.getRegisteredBlockComponents)(e)}},929: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.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},94:function(e,t){!function(){e.exports=this.wp.date}()},95:function(e,t){!function(){e.exports=this.wp.autop}()},99:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(279),u=(r(2),r(7)),l=r.n(u);r(238);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(i.createElement)(s.a,c()({className:b},u),n&&Object(i.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(i.createElement)("span",{className:"wc-block-components-button__text"},o))}}});
1
+ 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=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&p.push(c[a][0]),c[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);p.length;)p.shift()();return o.push.apply(o,u||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,i=1;i<r.length;i++){var s=r[i];0!==c[s]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={5:0,2:0,3:0,8:0,9:0,11:0,12:0,13:0,14:0,15:0,16:0},o=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=n);var o,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({1:"atomic-block-components/add-to-cart~atomic-block-components/image~atomic-block-components/title",2:"atomic-block-components/add-to-cart~atomic-block-components/button",3:"atomic-block-components/sale-badge",7:"atomic-block-components/add-to-cart",8:"atomic-block-components/button",9:"atomic-block-components/category-list",10:"atomic-block-components/image",11:"atomic-block-components/price",12:"atomic-block-components/rating",13:"atomic-block-components/sku",14:"atomic-block-components/stock-indicator",15:"atomic-block-components/summary",16:"atomic-block-components/tag-list",17:"atomic-block-components/title"}[e]||e)+".js"}(e);var s=new Error;o=function(t){i.onerror=i.onload=null,clearTimeout(u);var r=c[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",s.name="ChunkLoadError",s.type=n,s.request=o,r[1](s)}c[e]=void 0}};var u=setTimeout((function(){o({type:"timeout",target:i})}),12e4);i.onerror=i.onload=o,document.head.appendChild(i)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=s;return o.push([839,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},102: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},108:function(e,t){},109:function(e,t){},110:function(e,t){},111:function(e,t){},112:function(e,t){},113:function(e,t){},114:function(e,t){},115:function(e,t){},116:function(e,t){},117:function(e,t){},118:function(e,t){},119:function(e,t){},120:function(e,t){},121:function(e,t){},122:function(e,t){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},134:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(41),c=r(36),o=r(212),a=r(33),i=r(6),s={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(o.b)(),r=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},b=e.shouldSelect,p=Object(c.useSelect)((function(e,t){var c=t.dispatch;if(!b)return s;if(r)return{cartCoupons:l.coupons,cartItems:l.items,cartItemsCount:l.items_count,cartItemsWeight:l.items_weight,cartNeedsPayment:l.needs_payment,cartNeedsShipping:l.needs_shipping,cartItemErrors:[],cartTotals:l.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:l.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==l?void 0:l.receiveCart)?l.receiveCart:function(){}};var o=e(n.CART_STORE_KEY),u=o.getCartData(),p=o.getCartErrors(),d=o.getCartTotals(),f=!o.hasFinishedResolution("getCartData"),m=o.areShippingRatesLoading(),O=c(n.CART_STORE_KEY).receiveCart,g=Object(i.mapValues)(u.shippingAddress,(function(e){return Object(a.decodeEntities)(e)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:d,cartIsLoading:f,cartErrors:p,shippingAddress:g,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!g.country,receiveCart:O}}),[b]);return p}},135:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(61),a=r(167),i=r(3),s=r(14),u=r(45);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}},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},140:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(8),c=r.n(n),o=r(191),a=r(0);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,r=e.createNotice,n=e.removeNotice,c=e.createSnackbarNotice,i=e.setIsSuppressed,u=Object(a.useRef)(t);Object(a.useEffect)((function(){u.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),b=Object(a.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))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[r,c]);return s(s(s({notices:t},l),b),{},{setIsSuppressed:i})}},142:function(e,t){!function(){e.exports=this.wp.wordcount}()},143:function(e,t,r){"use strict";var n=r(51),c=r.n(n),o=r(10),a=r.n(o),i=r(0),s=r(1),u=r(6),l=(r(2),r(50)),b=r(4),p=r(7),d=r.n(p),f=r(22),m=r.n(f),O=r(25),g=r.n(O),j=r(23),v=r.n(j),h=r(24),y=r.n(h),w=r(12),E=r.n(w),_=r(26);function k(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=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var P=Object(_.createHigherOrderComponent)((function(e){var t=function(t){v()(n,t);var r=k(n);function n(){return m()(this,n),r.apply(this,arguments)}return g()(n,[{key:"render",value:function(){var t=this.props.selected;return Object(i.createElement)(e,a()({},this.props,{selected:Object(u.isNil)(t)?[]:[t]}))}}]),n}(i.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),C=r(302),S=r(15),N=r.n(S),x=r(37),D=r.n(x),B=r(19),z=r.n(B),R=r(8),T=r.n(R),I=r(43),L=r.n(I),A=r(40),V=r(44);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){T()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(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=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var q=Object(_.createHigherOrderComponent)((function(e){var t=function(t){v()(n,t);var r=H(n);function n(){var e;m()(this,n);for(var t=arguments.length,c=new Array(t),o=0;o<t;o++)c[o]=arguments[o];return e=r.call.apply(r,[this].concat(c)),T()(z()(e),"state",{error:null,loading:!1,variations:{}}),T()(z()(e),"loadVariations",(function(){var t=e.props.products,r=e.state,n=r.loading,c=r.variations;if(!n){var o=e.getExpandedProduct();if(o&&!c[o]){var a=t.find((function(e){return e.id===o}));a.variations&&0!==a.variations.length?(e.setState({loading:!0}),Object(A.g)(o).then((function(t){var r=t.map((function(e){return M(M({},e),{},{parent:o})}));e.setState({variations:M(M({},e.state.variations),{},T()({},o,r)),loading:!1,error:null})})).catch(function(){var t=D()(N.a.mark((function t(r){var n;return N.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(V.a)(r);case 2:n=t.sent,e.setState({variations:M(M({},e.state.variations),{},T()({},o,null)),loading:!1,error:n});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())):e.setState({variations:M(M({},e.state.variations),{},T()({},o,null)),loading:!1,error:null})}}})),e}return g()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.selected,r=e.showVariations;t&&r&&this.loadVariations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isLoading,n=t.selected;t.showVariations&&(!L()(e.selected,n)||e.isLoading&&!r)&&this.loadVariations()}},{key:"isProductId",value:function(e){return this.props.products.some((function(t){return t.id===e}))}},{key:"findParentProduct",value:function(e){return this.props.products.filter((function(t){return t.variations&&t.variations.find((function(t){return t.id===e}))}))[0].id}},{key:"getExpandedProduct",value:function(){var e=this.props,t=e.isLoading,r=e.selected;if(!e.showVariations)return null;var n=r&&r.length?r[0]:null;return n?this.prevSelectedItem=n:this.prevSelectedItem&&(t||this.isProductId(this.prevSelectedItem)||(n=this.prevSelectedItem)),!t&&n?this.isProductId(n)?n:this.findParentProduct(n):null}},{key:"render",value:function(){var t=this.props,r=t.error,n=t.isLoading,c=this.state,o=c.error,s=c.loading,u=c.variations;return Object(i.createElement)(e,a()({},this.props,{error:o||r,expandedProduct:this.getExpandedProduct(),isLoading:n,variations:u,variationsLoading:s}))}}]),n}(i.Component);return T()(t,"defaultProps",{selected:[],showVariations:!1}),t}),"withProductVariations"),U=r(61),Q=r(57),Y=Object(i.createElement)(Q.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),W=Object(i.createElement)(Q.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#757575",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),X=r(49);r(200);function G(e,t){if(!t)return e;var r=new RegExp(Object(u.escapeRegExp)(t),"ig");return e.replace(r,"<strong>$&</strong>")}var K=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(i.createElement)(U.a,{srcElement:Y}):Object(i.createElement)(U.a,{srcElement:W})},$={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},J=function(e){var t=e.expandedProduct,r=e.error,n=e.isLoading,o=e.onChange,p=e.onSearch,f=e.products,m=e.renderItem,O=e.selected,g=e.showVariations,j=e.variations,v=e.variationsLoading,h=function(e){var r=e.item,n=e.search,c=e.depth,o=void 0===c?0:c,p=e.isSelected,f=e.onSelect,m=r.variations&&Array.isArray(r.variations)?r.variations.length:0,O=d()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(o),{"is-searching":n.length>0,"is-skip-level":0===o&&0!==r.parent,"is-variable":m>0}),g=Object.assign({},e);delete g.isSingle;var j={role:"menuitemradio"};return r.breadcrumbs.length&&(j["aria-label"]="".concat(r.breadcrumbs[0],": ").concat(r.name)),m&&(j["aria-expanded"]=r.id===t),r.breadcrumbs.length?(Object(u.isEmpty)(r.variation)||(r.name=r.variation),Object(i.createElement)(l.b,a()({className:O},e,j))):[Object(i.createElement)(b.MenuItem,a()({key:"product-".concat(r.id),isSelected:p},g,j,{className:O,onClick:function(){f(r)()}}),Object(i.createElement)("span",{className:"woocommerce-search-list__item-state"},K(p)),Object(i.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(i.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:G(r.name,n)}})),m?Object(i.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(s.sprintf)(Object(s._n)("%d variation","%d variations",m,"woo-gutenberg-products-block"),m)):null),t===r.id&&m>0&&v&&Object(i.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(i.createElement)(b.Spinner,null))]};if(r)return Object(i.createElement)(X.a,{error:r});var y=j&&j[t]?j[t]:[],w=[].concat(c()(f),c()(y));return Object(i.createElement)(l.a,{className:"woocommerce-products",list:w,isLoading:n,isSingle:!0,selected:w.filter((function(e){var t=e.id;return O.includes(t)})),onChange:o,renderItem:m||(g?h:null),onSearch:p,messages:$,isHierarchical:!0})};J.defaultProps={expandedProduct:null,selected:[],showVariations:!1};t.a=P(Object(C.a)(q(J)))},144:function(e,t,r){"use strict";var n=r(0),c=r(57),o=Object(n.createElement)(c.a,{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},149:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(48),i=r(193);r(202);t.a=Object(i.a)((function(e){var t=e.className,r=e.instanceId,c=e.defaultValue,i=e.label,s=e.onChange,u=e.options,l=e.screenReaderLabel,b=e.readOnly,p=e.value,d="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:i,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",defaultValue:c,onChange:s,readOnly:b,value:p},u.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},15:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},150:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(8),c=r.n(n),o=r(6);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:s,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case s:return b.set(o,{priority:l,callback:a}),i(i({},e),{},c()({},n,b));case u:return b.delete(o),i(i({},e),{},c()({},n,b))}return e}},152:function(e,t,r){"use strict";var n=r(22),c=r.n(n),o=r(25),a=r.n(o),i=r(23),s=r.n(i),u=r(24),l=r.n(u),b=r(12),p=r.n(b),d=r(0),f=r(6),m=r(1),O=r(4);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}function j(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=p()(e);if(t){var c=p()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return l()(this,r)}}var v=function(e){s()(r,e);var t=j(r);function r(){return c()(this,r),t.apply(this,arguments)}return a()(r,[{key:"createLevelControl",value:function(e,t,r){var n=e===t;return{icon:Object(d.createElement)(g,{level:e}),title:Object(m.sprintf)(Object(m.__)("Heading %d"),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.Toolbar,{isCollapsed:n,icon:Object(d.createElement)(g,{level:a}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),r}(d.Component);t.a=v},155:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(11),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},164:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=r(1),i=r(55),s=r(7),u=r.n(s),l=(r(2),r(237),function(e){var t=e.className,r=e.currency,n=e.maxPrice,c=e.minPrice,a=e.priceClassName,s=e.priceStyle;return Object(o.createElement)("span",{className:t},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:c,style:s})," — ",Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:n,style:s}))}),b=function(e){var t=e.className,r=e.currency,n=e.regularPriceClassName,c=e.regularPriceStyle,s=e.regularPrice,l=e.priceClassName,b=e.priceStyle,p=e.price;return Object(o.createElement)("span",{className:t},Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",n),style:c},e)},value:s}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",l),style:b},e)},value:p}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.maxPrice,s=void 0===a?null:a,p=e.minPrice,d=void 0===p?null:p,f=e.price,m=void 0===f?null:f,O=e.priceClassName,g=e.priceStyle,j=e.regularPrice,v=e.regularPriceClassName,h=e.regularPriceStyle,y=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));return j&&m!==j?Object(o.createElement)(b,{className:y,currency:n,price:m,priceClassName:O,priceStyle:g,regularPrice:j,regularPriceClassName:v,regularPriceStyle:h}):null!==d&&null!==s?Object(o.createElement)(l,{className:y,currency:n,maxPrice:s,minPrice:d,priceClassName:O,priceStyle:g}):null!==m?Object(o.createElement)("span",{className:y},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",O),currency:n,value:m,style:g})):Object(o.createElement)("span",{className:y},Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",O)}))}},167:function(e,t,r){"use strict";var n=r(0),c=r(57),o=Object(n.createElement)(c.a,{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},168:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(9),c=function(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}},17:function(e,t){!function(){e.exports=this.wp.blocks}()},172:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return O}));var n=r(11),c=r.n(n),o=r(41),a=r(36),i=r(0),s=r(102),u=r(168),l=r(43),b=r.n(l),p=r(6),d=r(58),f=function(e){var t=Object(s.a)();e=e||t;var r=Object(a.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(i.useCallback)((function(t){n(e,t)}),[e,n])]},m=function(e,t,r){var n=Object(s.a)();r=r||n;var c=Object(a.useSelect)((function(n){return n(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),u=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(i.useCallback)((function(t){u(r,e,t)}),[r,e,u])]},O=function(e,t){var r=Object(s.a)(),n=f(t=t||r),o=c()(n,2),a=o[0],l=o[1],m=Object(d.a)(a),O=Object(d.a)(e),g=Object(u.a)(O),j=Object(i.useRef)(!1);return Object(i.useEffect)((function(){b()(g,O)||(l(Object(p.assign)({},m,O)),j.current=!0)}),[m,O,g,l]),j.current?[a,l]:[e,l]}},176:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(5),o=Object(n.createElement)("img",{src:c.U+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},177:function(e,t,r){"use strict";var n=r(0),c=r(142),o=r(95),a=function(e){var t=e.indexOf("</p>");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]:"&hellip;",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]:"&hellip;",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)}},18:function(e,t){!function(){e.exports=this.wp.url}()},185:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(22),a=r.n(o),i=r(25),s=r.n(i),u=r(19),l=r.n(u),b=r(23),p=r.n(b),d=r(24),f=r.n(d),m=r(12),O=r.n(m),g=r(8),j=r.n(g),v=r(0),h=r(9);r(260);function y(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=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}t.a=function(e){var t=function(t){p()(n,t);var r=y(n);function n(){var e;return a()(this,n),e=r.call(this),j()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),j()(l()(e),"moveFocusToTop",(function(t){var r=e.scrollPointRef.current.parentElement.querySelectorAll(t);r.length&&r[0].focus()})),j()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(h.createRef)(),e}return s()(n,[{key:"render",value:function(){return Object(v.createElement)(h.Fragment,null,Object(v.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(v.createElement)(e,c()({},this.props,{scrollToTop:this.scrollToTop})))}}]),n}(h.Component);return t.displayName="withScrollToTop",t}},191:function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return j}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=(r(2),r(36)),u=r(303),l=r(944),b=r(140),p=r(212),d=function(){var e=Object(p.b)().isEditor,t=Object(b.a)(),r=t.notices,n=t.removeNotice;if(e)return null;var c=r.filter((function(e){return"snackbar"===e.type}));return Object(i.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove: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 m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(i.useContext)(O)},j=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,c=e.createNoticeContainer,o=void 0===c||c,l=e.context,b=void 0===l?"wc/core":l,p=Object(s.useDispatch)("core/notices"),f=p.createNotice,g=p.removeNotice,j=Object(i.useState)(!1),v=a()(j,2),h=v[0],y=v[1],w=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(e,t,m(m({},r),{},{context:r.context||b}))}),[f,b]),E=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;g(e,t)}),[g,b]),_=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w("default",e,m(m({},t),{},{type:"snackbar"}))}),[w]),k={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(b)}}),[b]).notices,createNotice:w,createSnackbarNotice:_,removeNotice:E,context:b,setIsSuppressed:y},P=h?null:Object(i.createElement)(u.a,{className:n,notices:k.notices}),C=h?null:Object(i.createElement)(d,null);return Object(i.createElement)(O.Provider,{value:k},o&&P,t,C)}},194:function(e,t){},200:function(e,t){},202:function(e,t){},207:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(41),c=r(36),o=r(0),a=r(155),i=r(58),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(i.a)(b),O=Object(i.a)(u),g=Object(a.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}},212: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(36),o=Object(n.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),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.previewData,s=void 0===i?{}:i,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:s};return Object(n.createElement)(o.Provider,{value:u},t)}},233:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(86),o=(r(2),r(240),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){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))})},237:function(e,t){},238:function(e,t){},239:function(e,t){},240:function(e,t){},259:function(e,t,r){"use strict";r.d(t,"c",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return m}));var n=r(8),c=r.n(n),o=r(60),a=r.n(o),i=r(3);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l,b,p={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(l=i.CURRENCY.symbol,b=i.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[b]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},d=function(e){if(!e||"object"!==a()(e))return p;var t=e.currency_code,r=e.currency_symbol,n=e.currency_thousand_separator,c=e.currency_decimal_separator,o=e.currency_minor_unit,i=e.currency_prefix,s=e.currency_suffix;return{code:t||"USD",symbol:r||"$",thousandSeparator:"string"==typeof n?n:",",decimalSeparator:"string"==typeof c?c:".",minorUnit:Number.isFinite(o)?o:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof s?s:""}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(u({},p),e)},m=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=f(t),c=r/Math.pow(10,n.minorUnit),o=n.prefix+c+n.suffix,a=document.createElement("textarea");return a.innerHTML=o,a.value}},26:function(e,t){!function(){e.exports=this.wp.compose}()},260:function(e,t){},267:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),s=r.n(i),u=r(48),l=r(45),b=r(73);r(553);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")}))}))},268:function(e,t){!function(){e.exports=this.wp.deprecated}()},269:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(57),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=void 0===r?20:r,o=a()(e,["className","size"]);return Object(i.createElement)(s.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},o),Object(i.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=r(284);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null}},284:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(57),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]);return Object(i.createElement)(s.a,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=u},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},302:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(15),a=r.n(o),i=r(37),s=r.n(i),u=r(22),l=r.n(u),b=r(25),p=r.n(b),d=r(19),f=r.n(d),m=r(23),O=r.n(m),g=r(24),j=r.n(g),v=r(12),h=r.n(v),y=r(0),w=r(6),E=r(26),_=(r(2),r(5)),k=r(40),P=r(44);function C(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=h()(e);if(t){var c=h()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return j()(this,r)}}var S=Object(E.createHigherOrderComponent)((function(e){var t=function(t){O()(o,t);var r,n=C(o);function o(){var e;return l()(this,o),(e=n.apply(this,arguments)).state={list:[],loading:!0},e.setError=e.setError.bind(f()(e)),e.debouncedOnSearch=Object(w.debounce)(e.onSearch.bind(f()(e)),400),e}return p()(o,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(k.h)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch(this.setError)}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,r=this.props.selected;Object(k.h)({selected:r,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch(this.setError)}},{key:"setError",value:(r=s()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(P.a)(t);case 2:r=e.sent,this.setState({list:[],loading:!1,error:r});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,r=this.state,n=r.error,o=r.list,a=r.loading;return Object(y.createElement)(e,c()({},this.props,{error:n,products:o,isLoading:a,onSearch:_.v?function(e){t.setState({loading:!0}),t.debouncedOnSearch(e)}:null}))}}]),o}(y.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");t.a=S},303:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(390),u=r(191),l=(r(238),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,r=e.notices,n=Object(u.b)().removeNotice,a=r.filter((function(e){return"snackbar"!==e.type}));if(!a.length)return null;var b=i()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:b},a.map((function(e){return Object(o.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))}},33:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},35:function(e,t){!function(){e.exports=this.moment}()},36:function(e,t){!function(){e.exports=this.wp.data}()},362:function(e,t,r){"use strict";var n=r(0),c=r(57),o=Object(n.createElement)(c.a,{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},391:function(e,t){},392:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(5);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(o.X)()&&(s=i(i({},s),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=s},393:function(e,t,r){"use strict";t.a={productLink:{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}}},394:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=(r(2),r(7)),u=r.n(s),l=r(5),b=r(45),p=r(73),d=r(6),f=r(267);r(554);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var g=function(){return Object(i.createElement)("img",{src:l.G,alt:"",width:500,height:500})},j=function(e){var t=e.image,r=e.onLoad,n=e.loaded,c=e.showFullSize,o=t||{},a=o.thumbnail,s=o.src,u=o.srcset,l=o.sizes,b={alt:o.alt,onLoad:r,hidden:!n,src:a};return c&&(b=O(O({},b),{},{src:s,srcSet:u,sizes:l})),Object(i.createElement)(i.Fragment,null,Object(i.createElement)("img",b),!n&&Object(i.createElement)(g,null))};t.a=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,o=e.productLink,s=void 0===o||o,l=e.showSaleBadge,p=e.saleBadgeAlign,m=void 0===p?"right":p,O=Object(b.useInnerBlockLayoutContext)().parentClassName,v=Object(b.useProductDataContext)().product,h=Object(i.useState)(!1),y=a()(h,2),w=y[0],E=y[1];if(!v.id)return Object(i.createElement)("div",{className:u()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",c()({},"".concat(O,"__product-image"),O))},Object(i.createElement)(g,null));var _=Object(d.isEmpty)(v.images)?null:v.images[0];return Object(i.createElement)("div",{className:u()(t,"wc-block-components-product-image",c()({},"".concat(O,"__product-image"),O))},s?Object(i.createElement)("a",{href:v.permalink,rel:"nofollow"},!!l&&Object(i.createElement)(f.default,{align:m,product:v}),Object(i.createElement)(j,{image:_,onLoad:function(){return E(!0)},loaded:w,showFullSize:"cropped"!==n})):Object(i.createElement)(i.Fragment,null,!!l&&Object(i.createElement)(f.default,{align:m,product:v}),Object(i.createElement)(j,{image:_,onLoad:function(){return E(!0)},loaded:w,showFullSize:"cropped"!==n})))}))},395:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},i=function(e){return n(e,c.ERROR)},s=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:s}}},396:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(150),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))}}}},397:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return d}));var n=r(15),c=r.n(n),o=r(60),a=r.n(o),i=r(37),s=r.n(i);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(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=e[Symbol.iterator]()},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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=[],s=u(o),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(n));case 10:d=e.sent,"object"===a()(d)&&i.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),s.e(e.t1);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=u(o),e.prev=2,i.s();case 4:if((s=i.n()).done){e.next=23;break}return l=s.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),i.e(e.t1);case 28:return e.prev=28,i.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},398:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},399:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(86),i=r(11),s=r.n(i),u=r(1),l=r(58),b=r(140),p=r(395),d=r(929),f="pristine",m="idle",O="disabled",g="processing",j="before_processing",v="after_processing",h={status:f,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},y="set_pristine",w="set_idle",E="set_disabled",_="set_processing",k="set_before_processing",P="set_after_processing",C="set_processing_response",S="set_has_error",N="set_no_error",x="set_quantity",D="set_request_params",B=y,z=w,R=E,T=_,I=k,L=P,A=C,V=S,F=N,M=x,H=D,q=function(){return{type:B}},U=function(){return{type:z}},Q=function(){return{type:R}},Y=function(){return{type:T}},W=function(){return{type:I}},X=function(){return{type:L}},G=function(e){return{type:A,data:e}},K=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?V:F;return{type:t}},$=function(e){return{type:M,quantity:e}},J=function(e){return{type:H,data:e}},Z=r(8),ee=r.n(Z);function te(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 re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=y,ce=w,oe=E,ae=_,ie=k,se=P,ue=C,le=S,be=N,pe=x,de=D,fe=f,me=m,Oe=O,ge=g,je=j,ve=v,he=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case ne:e=h;break;case ce:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case oe:e=t.status!==Oe?re(re({},t),{},{status:Oe}):t;break;case pe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case de:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),o)});break;case ue:e=re(re({},t),{},{processingResponse:o});break;case ae:e=!1===(e=t.status!==ge?re(re({},t),{},{status:ge,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case ie:e=t.status!==je?re(re({},t),{},{status:je,hasError:!1}):t;break;case se:e=t.status!==ve?re(re({},t),{},{status:ve}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===ge||t.status===je?re(re({},e),{},{status:me}):e;break;case be:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&c!==ne&&e.status===fe&&(e.status=me),e},ye=r(150),we=r(396),Ee="add_to_cart_before_processing",_e="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",Pe=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(we.a)(_e,e),onAddToCartProcessingWithError:Object(we.a)(ke,e),onAddToCartBeforeProcessing:Object(we.a)(Ee,e)}},Ce=r(397),Se=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){}}}),Ne=function(){return Object(n.useContext)(Se)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(he,h),i=s()(o,2),f=i[0],y=i[1],w=Object(n.useReducer)(ye.b,{}),E=s()(w,2),_=E[0],k=E[1],P=Object(l.a)(_),C=Object(b.a)(),S=C.addErrorNotice,N=C.removeNotices,x=Object(a.b)().setValidationErrors,D=Object(p.a)(),B=D.isSuccessResponse,z=D.isErrorResponse,R=D.isFailResponse,T=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Pe(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Pe(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Pe(k).onAddToCartBeforeProcessing}}),[k]),I=Object(n.useMemo)((function(){return{resetForm:function(){y(q())},submitForm:function(){y(W())},setQuantity:function(e){y($(e))},setHasError:function(e){y(K(e))},setRequestParams:function(e){y(J(e))},setAfterProcessing:function(e){y(G(e)),y(X())}}}),[]);Object(n.useEffect)((function(){var e=f.status,t=!r.id||!Object(d.a)(r);e!==O||t?e!==O&&t&&y(Q()):y(U())}),[f.status,r,y]),Object(n.useEffect)((function(){f.status===j&&(N("error"),Object(Ce.a)(P,Ee,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&S(t),r&&x(r)})),y(U())):y(Y())})))}),[f.status,x,S,N,y,P]),Object(n.useEffect)((function(){if(f.status===v){var e={processingResponse:f.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;S(e.message,t)}};if(f.hasError)return void Object(Ce.b)(P,ke,e).then((function(r){if(z(r)||R(r))t(r);else{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");S(c,{id:"add-to-cart"})}y(U())}));Object(Ce.b)(P,_e,e).then((function(e){z(e)||R(e)?(t(e),y(K(!0))):y(U())}))}}),[f.status,f.hasError,f.processingResponse,I,S,z,R,B,P]);var L=Object(d.b)(r),A={product:r,productType:r.type||"simple",productIsPurchasable:Object(d.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:L,showFormElements:c&&L,quantity:f.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:f.requestParams,isIdle:f.status===m,isDisabled:f.status===O,isProcessing:f.status===g,isBeforeProcessing:f.status===j,isAfterProcessing:f.status===v,hasError:f.hasError,eventRegistration:T,dispatchActions:I};return Object(n.createElement)(Se.Provider,{value:A},t)},De=r(13),Be=r.n(De),ze=r(134),Re=r(33),Te=r(537);function Ie(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 Le=function(){var e=Ne(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,i=e.hasError,l=e.isProcessing,p=e.requestParams,d=Object(a.b)(),f=d.hasValidationErrors,m=d.showAllValidationErrors,O=Object(b.a)(),g=O.addErrorNotice,j=O.removeNotice,v=Object(ze.a)().receiveCart,h=Object(n.useState)(!1),y=s()(h,2),w=y[0],E=y[1],_=!i&&l,k=Object(n.useCallback)((function(){return!f||(m(),{type:"error"})}),[f,m]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var P=Object(n.useCallback)((function(){E(!0),j("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},p);Be()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Be.a.setNonce(e.headers),e.json().then((function(r){e.ok?v(r):(r.body&&r.body.message?g(Object(Re.decodeEntities)(r.body.message),{id:"add-to-cart"}):g(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),E(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&v(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,g,j,v,t,c,p]);return Object(n.useEffect)((function(){_&&!w&&P()}),[_,P,w]),null},Ae=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(a.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Le,null)))},Ve=r(45),Fe=r(6),Me=r(73),He=(r(391),r(99)),qe=r(61),Ue=r(563),Qe=r(842),Ye=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(He.a,{className:t,href:r,rel:"nofollow"},c)},We=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,i=e.onClick;return Object(n.createElement)(He.a,{className:t,disabled:o,showSpinner:c,onClick:i},a&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(qe.a,{srcElement:Ue.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},Xe=function(){var e=Ne(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,i=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,p=e.hasError,d=e.dispatchActions,f=Object(Qe.a)(o.id||0).cartQuantity,m=Object(n.useState)(!1),O=s()(m,2),g=O[0],j=O[1],v=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return p||j(!0),!0}),0);return function(){e()}}),[b,p]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(We,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:f,isDisabled:i,isProcessing:l,isDone:g,onClick:function(){return d.submitForm()}}):Object(n.createElement)(Ye,{className:"wc-block-components-product-add-to-cart-button",href:v.url,text:v.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=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)}})},Ke=function(e){var t=e.reason,r=void 0===t?Object(u.__)("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)},$e=function(){var e=Ne(),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)(Ke,null):t.id&&!t.is_in_stock?Object(n.createElement)(Ke,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Xe,null))},Je=(r(562),r(51)),Ze=r.n(Je),et=r(4),tt=r(9),rt=r(233),nt={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,i=e.value,s=void 0===i?"":i,l=e.onChange,b=void 0===l?function(){}:l,p=e.errorMessage,d=void 0===p?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):p,f=Object(a.b)(),m=f.getValidationError,O=f.setValidationErrors,g=f.clearValidationError,j=t,v=m(j)||{};return Object(tt.useEffect)((function(){s?g(j):O(ee()({},j,{message:d,hidden:!0}))}),[s,j,d,g,O]),Object(tt.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)(et.SelectControl,{label:Object(Re.decodeEntities)(t),value:s||"",options:[nt].concat(Ze()(c)),onChange:b,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":v.message&&!v.hidden})}),Object(n.createElement)(rt.a,{propertyName:j,elementId:j}))};function ot(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 at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},st=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],i=at(at({},r),{},ee()({},c,null)),s=o?it(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(Re.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};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 lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(l.a)(t),a=Object(l.a)(r),i=Object(n.useState)(0),u=s()(i,2),b=u[0],p=u[1],d=Object(n.useState)({}),f=s()(d,2),m=f[0],O=f[1],g=Object(n.useMemo)((function(){return st(o,a,m)}),[m,o,a]);return Object(n.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(o).length?p(function(e,t,r){return it(e,t,r)[0]||0}(o,a,m)):b>0&&p(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)(ct,{key:e,attributeName:e,options:g[e],value:m[e],onChange:function(t){O(lt(lt({},m),{},ee()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Fe.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)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Ne(),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)(Ke,null):t.id&&!t.is_in_stock?Object(n.createElement)(Ke,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(pt,{product:t,dispatchers:a}),Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Xe,null))},ft=function(){return Object(n.createElement)(Xe,null)},mt=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},Ot=function(){return Object(n.createElement)(mt,null)},gt=function(){var e=Ne(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(Ot,null):"external"===r?Object(n.createElement)(ft,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Xe,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Ve.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Fe.isEmpty)(c)});return Object(n.createElement)(Ae,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(gt,null)))}))},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t,r){"use strict";r.d(t,"h",(function(){return p})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"f",(function(){return O})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return j})),r.d(t,"g",(function(){return v})),r.d(t,"a",(function(){return h}));var n=r(8),c=r.n(n),o=r(18),a=r(13),i=r.n(a),s=r(6),u=r(5);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,l=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,i=void 0===a?[]:a,s={per_page:u.v?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",b(b({},s),i))];return u.v&&r.length&&l.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r})),l}({selected:r,search:c,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}))},d=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")})},O=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:u.y?100:0,orderby:u.y?"count":"name",order:u.y?"desc":"asc",search:n})];return u.y&&r.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),c}({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")}))},g=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products/categories",b({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})})},h=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))}},400:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(33),u=r(45),l=r(14),b=r(5),p=function(e){var t=e.color,r=e.fontSize;return Object(b.X)()?{color:t,fontSize:r}:{}},d=r(73);r(552),t.a=Object(d.withProductDataContext)((function(e){var t,r,n,a=e.className,d=e.headingLevel,f=void 0===d?2:d,m=e.productLink,O=void 0===m||m,g=e.align,j=e.color,v=e.customColor,h=e.fontSize,y=e.customFontSize,w=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,_="h".concat(f),k=Object(l.getColorClassName)("color",j),P=Object(l.getFontSizeClass)(h),C=i()((t={"has-text-color":j||v,"has-font-size":h||y},c()(t,k,k),c()(t,P,P),t));if(!E.id)return Object(o.createElement)(_,{className:i()(a,"wc-block-components-product-title",(n={},c()(n,"".concat(w,"__product-title"),w),c()(n,"wc-block-components-product-title--align-".concat(g),g&&Object(b.X)()),c()(n,C,Object(b.X)()),n)),style:p({color:v,fontSize:y})});var S=Object(s.decodeEntities)(E.name);return Object(o.createElement)(_,{className:i()(a,"wc-block-components-product-title",(r={},c()(r,"".concat(w,"__product-title"),w),c()(r,"wc-block-components-product-title--align-".concat(g),g&&Object(b.X)()),r))},O?Object(o.createElement)("a",{href:E.permalink,rel:"nofollow",className:i()(c()({},C,Object(b.X)())),style:p({color:v,fontSize:y})},S):Object(o.createElement)("span",{className:i()(c()({},C,Object(b.X)())),style:p({color:v,fontSize:y})},S))}))},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},43:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},44:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(15),c=r.n(n),o=r(37),a=r.n(o),i=function(){var e=a()(c.a.mark((function e(t){var r;return c.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(t){return e.apply(this,arguments)}}()},45:function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},47:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},48:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r(7),s=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,b=null!=r,p=null!=n;return!b&&p?(t=c||"span",u=l(l({},u),{},{className:s()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,n)):(t=c||a.Fragment,b&&p&&r!==n?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,u,r))}},49:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(47));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")))}},5:function(e,t,r){"use strict";r.d(t,"l",(function(){return c})),r.d(t,"K",(function(){return o})),r.d(t,"Q",(function(){return a})),r.d(t,"A",(function(){return i})),r.d(t,"C",(function(){return s})),r.d(t,"m",(function(){return u})),r.d(t,"B",(function(){return l})),r.d(t,"E",(function(){return b})),r.d(t,"o",(function(){return p})),r.d(t,"D",(function(){return d})),r.d(t,"n",(function(){return f})),r.d(t,"G",(function(){return m})),r.d(t,"v",(function(){return O})),r.d(t,"y",(function(){return g})),r.d(t,"s",(function(){return j})),r.d(t,"t",(function(){return v})),r.d(t,"u",(function(){return h})),r.d(t,"k",(function(){return y})),r.d(t,"M",(function(){return w})),r.d(t,"R",(function(){return E})),r.d(t,"q",(function(){return _})),r.d(t,"r",(function(){return k})),r.d(t,"p",(function(){return P})),r.d(t,"J",(function(){return C})),r.d(t,"c",(function(){return S})),r.d(t,"w",(function(){return N})),r.d(t,"x",(function(){return x})),r.d(t,"U",(function(){return B})),r.d(t,"V",(function(){return z})),r.d(t,"L",(function(){return R})),r.d(t,"a",(function(){return T})),r.d(t,"O",(function(){return I})),r.d(t,"b",(function(){return L})),r.d(t,"N",(function(){return A})),r.d(t,"F",(function(){return V})),r.d(t,"i",(function(){return F})),r.d(t,"P",(function(){return q})),r.d(t,"h",(function(){return U})),r.d(t,"j",(function(){return Q})),r.d(t,"I",(function(){return Y})),r.d(t,"H",(function(){return W})),r.d(t,"T",(function(){return X})),r.d(t,"S",(function(){return G})),r.d(t,"d",(function(){return K})),r.d(t,"e",(function(){return $})),r.d(t,"f",(function(){return J})),r.d(t,"g",(function(){return Z})),r.d(t,"z",(function(){return ee})),r.d(t,"Y",(function(){return re})),r.d(t,"Z",(function(){return ne})),r.d(t,"W",(function(){return ce})),r.d(t,"X",(function(){return oe}));var n=r(3),c=Object(n.getSetting)("currentUserIsAdmin",!1),o=Object(n.getSetting)("reviewRatingsEnabled",!0),a=Object(n.getSetting)("showAvatars",!0),i=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),u=Object(n.getSetting)("default_columns",3),l=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),p=Object(n.getSetting)("default_rows",3),d=Object(n.getSetting)("min_height",500),f=Object(n.getSetting)("default_height",500),m=Object(n.getSetting)("placeholderImgSrc",""),O=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),g=Object(n.getSetting)("limitTags"),j=Object(n.getSetting)("hasProducts",!0),v=Object(n.getSetting)("hasTags",!0),h=Object(n.getSetting)("homeUrl",""),y=Object(n.getSetting)("couponsEnabled",!0),w=Object(n.getSetting)("shippingEnabled",!0),E=Object(n.getSetting)("taxesEnabled",!0),_=Object(n.getSetting)("displayItemizedTaxes",!1),k=Object(n.getSetting)("hasDarkEditorStyleSupport",!1),P=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),C=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),N=Object(n.getSetting)("isShippingCalculatorEnabled",!0),x=Object(n.getSetting)("isShippingCostHidden",!1),D=Object(n.getSetting)("woocommerceBlocksPhase",1),B=Object(n.getSetting)("wcBlocksAssetUrl",""),z=Object(n.getSetting)("wcBlocksBuildUrl",""),R=Object(n.getSetting)("shippingCountries",{}),T=Object(n.getSetting)("allowedCountries",{}),I=Object(n.getSetting)("shippingStates",{}),L=Object(n.getSetting)("allowedStates",{}),A=Object(n.getSetting)("shippingMethodsExist",!1),V=Object(n.getSetting)("paymentGatewaySortOrder",[]),F=Object(n.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},H=Object(n.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),q=H.shop.permalink,U=H.checkout.id,Q=H.checkout.permalink,Y=H.privacy.permalink,W=H.privacy.title,X=H.terms.permalink,G=H.terms.title,K=H.cart.id,$=H.cart.permalink,J=Object(n.getSetting)("checkoutAllowsGuest",!1),Z=Object(n.getSetting)("checkoutAllowsSignup",!1),ee=Object(n.getSetting)("loginUrl","/wp-login.php"),te=r(17),re=function(e,t){if(D>2)return Object(te.registerBlockType)(e,t)},ne=function(e,t){if(D>1)return Object(te.registerBlockType)(e,t)},ce=function(){return D>2},oe=function(){return D>1}},534:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(164),u=r(259),l=r(45),b=r(14),p=r(5),d=r(73);t.default=Object(d.withProductDataContext)((function(e){var t,r,n,a,d,f,m,O=e.className,g=e.align,j=e.fontSize,v=e.customFontSize,h=e.saleFontSize,y=e.customSaleFontSize,w=e.color,E=e.customColor,_=e.saleColor,k=e.customSaleColor,P=Object(l.useInnerBlockLayoutContext)().parentClassName,C=Object(l.useProductDataContext)().product,S=i()(O,c()({},"".concat(P,"__product-price"),P));if(!C.id)return Object(o.createElement)(s.a,{align:g,className:S});var N=Object(b.getColorClassName)("color",w),x=Object(b.getFontSizeClass)(j),D=Object(b.getColorClassName)("color",_),B=Object(b.getFontSizeClass)(h),z=i()((t={"has-text-color":w||E,"has-font-size":j||v},c()(t,N,N),c()(t,x,x),t)),R=i()((r={"has-text-color":_||k,"has-font-size":h||y},c()(r,D,D),c()(r,B,B),r)),T={color:E,fontSize:v},I={color:k,fontSize:y},L=C.prices,A=Object(u.c)(L),V=L.price!==L.regular_price,F=V?i()((n={},c()(n,"".concat(P,"__product-price__value"),P),c()(n,R,Object(p.X)()),n)):i()((a={},c()(a,"".concat(P,"__product-price__value"),P),c()(a,z,Object(p.X)()),a)),M=V?I:T;return Object(o.createElement)(s.a,{align:g,className:S,currency:A,price:L.price,priceClassName:F,priceStyle:Object(p.X)()?M:{},minPrice:null==L||null===(d=L.price_range)||void 0===d?void 0:d.min_amount,maxPrice:null==L||null===(f=L.price_range)||void 0===f?void 0:f.max_amount,regularPrice:L.regular_price,regularPriceClassName:i()((m={},c()(m,"".concat(P,"__product-price__regular"),P),c()(m,z,Object(p.X)()),m)),regularPriceStyle:Object(p.X)()?T:{}})}))},535:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),s=r.n(i),u=r(45),l=r(73),b=(r(555),function(e){var t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?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)(Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),i);return Object(o.createElement)("div",{className:s()(t,"star-rating","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)))}))},536:function(e,t,r){"use strict";r.r(t);var n=r(10),c=r.n(n),o=r(8),a=r.n(o),i=r(0),s=(r(2),r(7)),u=r.n(s),l=r(1),b=r(842),p=r(33),d=r(537),f=r(45),m=r(73),O=(r(556),function(e){var t=e.product,r=Object(i.useRef)(!0),n=t.id,o=t.permalink,a=t.add_to_cart,s=t.has_options,f=t.is_purchasable,m=t.is_in_stock,O=Object(b.a)(n),g=O.cartQuantity,j=O.addingToCart,v=O.addToCart;Object(i.useEffect)((function(){r.current?r.current=!1:Object(d.c)()}),[g]);var h=Number.isFinite(g)&&g>0,y=!s&&f&&m,w=Object(p.decodeEntities)((null==a?void 0:a.description)||""),E=h?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",g,"woo-gutenberg-products-block"),g):Object(p.decodeEntities)((null==a?void 0:a.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),_=y?"button":"a",k={};return y?k.onClick=function(){v()}:(k.href=o,k.rel="nofollow"),Object(i.createElement)(_,c()({"aria-label":w,className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:h}),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))}))},537:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return a}));var n=window.Event||null,c=function(e,t){var r=t.bubbles,c=void 0!==r&&r,o=t.cancelable,a=void 0!==o&&o,i=t.element;if(i||(i=document.body),"function"==typeof n){var s=new n(e,{bubbles:c,cancelable:a});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,a),i.dispatchEvent(u)}},o=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},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)}}},538:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(177),u=r(3),l=r(45),b=r(73);r(557);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;if(!a)return null;var b=Object(u.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r)),source:a,maxLength:150,countType:b})}))},539:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(45),l=r(73);r(558);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}))},54:function(e,t){!function(){e.exports=this.wp.keycodes}()},540:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(45),l=r(6),b=r(73);r(559);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))}))))}))},541:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(45),l=r(6),b=r(73);r(560);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))}))))}))},542:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(45),l=r(73),b=(r(561),function(e){return Object(a.sprintf)(Object(a.__)("%d left in stock","woo-gutenberg-products-block"),e)}),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")};t.default=Object(l.withProductDataContext)((function(e){var t,r=e.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;if(!a.id||!a.is_purchasable)return null;var i=!!a.is_in_stock,l=a.low_stock_remaining,d=a.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",i),c()(t,"wc-block-components-product-stock-indicator--out-of-stock",!i),c()(t,"wc-block-components-product-stock-indicator--low-stock",!!l),c()(t,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),t))},l?b(l):p(i,d))}))},55:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(8),a=r.n(o),i=r(27),s=r.n(i),u=r(0),l=r(184),b=r(7),p=r.n(b);r(194);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 f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.className,r=e.value,n=e.currency,o=e.onValueChange,a=s()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var i=r/Math.pow(10,n.minorUnit);if(!Number.isFinite(i))return null;var b=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),d=f(f(f({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(n)),{},{value:void 0,currency:void 0,onValueChange:void 0}),m=o?function(e){var t=e.value*Math.pow(10,n.minorUnit);o(t)}:function(){};return Object(u.createElement)(l.a,c()({className:b},d,{value:i,onValueChange:m}))}},552:function(e,t){},553:function(e,t){},554:function(e,t){},555:function(e,t){},556:function(e,t){},557:function(e,t){},558:function(e,t){},559:function(e,t){},56:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},560:function(e,t){},561:function(e,t){},562:function(e,t){},563:function(e,t,r){"use strict";var n=r(0),c=r(57),o=Object(n.createElement)(c.a,{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},58:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(43),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},6:function(e,t){!function(){e.exports=this.lodash}()},61:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(27),a=r.n(o),i=r(9);r(2);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,o=a()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},o))}},73:function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},74:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(22),a=r.n(o),i=r(25),s=r.n(i),u=r(19),l=r.n(u),b=r(23),p=r.n(b),d=r(24),f=r.n(d),m=r(12),O=r.n(m),g=r(0),j=r(6),v=r(7),h=r.n(v),y=r(4),w=r(26);r(122);function E(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=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}var _=function(e){p()(r,e);var t=E(r);function r(){var e;return a()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(l()(e)),e}return s()(r,[{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)(y.BaseControl,{id:b,help:e,className:h()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(g.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((function(e,r){var o={};return l===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(g.createElement)(y.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)}))))}}]),r}(g.Component);t.a=Object(w.withInstanceId)(_)},75:function(e,t){!function(){e.exports=this.wp.hooks}()},77:function(e,t){!function(){e.exports=this.ReactDOM}()},78:function(e,t){!function(){e.exports=this.wp.dom}()},81:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(6),a=(r(2),r(4)),i=r(5);t.a=function(e){var t=e.columns,r=e.rows,s=e.setAttributes,u=e.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(o.clamp)(e,i.C,i.A);s({columns:Object(o.isNaN)(t)?"":t})},min:i.C,max:i.A}),Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:function(e){var t=Object(o.clamp)(e,i.E,i.B);s({rows:Object(o.isNaN)(t)?"":t})},min:i.E,max:i.B}),Object(n.createElement)(a.ToggleControl,{label:Object(c.__)("Align Last Block","woo-gutenberg-products-block"),help:u?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:u,onChange:function(){return s({alignButtons:!u})}}))}},811:function(e,t,r){"use strict";var n=r(0),c=r(57),o=Object(n.createElement)(c.a,{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},818:function(e,t,r){"use strict";var n=r(0),c=r(57),o=Object(n.createElement)(c.a,{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},826:function(e,t,r){"use strict";var n=r(0),c=r(57),o=Object(n.createElement)(c.a,{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},827:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),c=r(5),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:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>7.99</span>',images:[{id:1,src:c.U+"img/pennant.jpg",thumbnail:c.U+"img/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}]},83:function(e,t){!function(){e.exports=this.wp.viewport}()},832:function(e,t,r){"use strict";var n=r(0),c=r(57),o=Object(n.createElement)(c.a,{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},839:function(e,t,r){e.exports=r(899)},840:function(e,t){},841:function(e,t){},842:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(11),c=r.n(n),o=r(0),a=r(36),i=r(134),s=r(41),u=r(33),l=r(140),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)(s.CART_STORE_KEY).addItemToCart,r=Object(i.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],v=g[1],h=Object(o.useRef)(b(n,e));return Object(o.useEffect)((function(){var t=b(n,e);t!==h.current&&(h.current=t)}),[n,e]),{cartQuantity:Number.isFinite(h.current)?h.current:0,addingToCart:j,cartIsLoading:p,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){f(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},844:function(e,t,r){"use strict";var n=r(0),c=r(57),o=Object(n.createElement)(c.a,{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},845:function(e,t){},846:function(e,t){},847:function(e,t){},848:function(e,t){},86:function(e,t,r){"use strict";r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return m}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(6),u=r(43),l=r.n(u);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 p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=Object(i.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),f=function(){return Object(i.useContext)(d)},m=function(e){var t=e.children,r=Object(i.useState)({}),n=a()(r,2),o=n[0],u=n[1],b=Object(i.useCallback)((function(e){return o[e]}),[o]),f=Object(i.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),m=Object(i.useCallback)((function(e){u((function(t){return t[e]?Object(s.omit)(t,[e]):t}))}),[]),O=Object(i.useCallback)((function(){u({})}),[]),g=Object(i.useCallback)((function(e){e&&u((function(t){return e=Object(s.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:p(p({},t),e)}))}),[]),j=Object(i.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=p(p({},r[e]),t);return l()(r[e],n)?r:p(p({},r),{},c()({},e,n))}))}),[]),v={getValidationError:b,setValidationErrors:g,clearValidationError:m,clearAllValidationErrors:O,hideValidationError:Object(i.useCallback)((function(e){j(e,{hidden:!0})}),[j]),showValidationError:Object(i.useCallback)((function(e){j(e,{hidden:!1})}),[j]),showAllValidationErrors:Object(i.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=p(p({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:p(p({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:f};return Object(i.createElement)(d.Provider,{value:v},t)}},87:function(e,t){!function(){e.exports=this.wp.a11y}()},899:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(10),a=r.n(o),i=r(0),s=r(1),u=r(14),l=r(17),b=r(61),p=r(57),d=Object(i.createElement)(p.a,{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(5),m=r(7),O=r.n(m),g=function(e){var t=e.attributes;return Object(i.createElement)("div",{className:O()("is-loading",t.className)})},j={category:"woocommerce-product-elements",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},supports:{html:!1},parent:Object(f.W)()?null:["@woocommerce/all-products","@woocommerce/single-product"],save:g,deprecated:[{save:function(){}}]},v=r(392),h=r(4),y=r(26),w=r(152),E=r(400),_=r(11),k=r.n(_),P=r(143),C=r(27),S=r.n(C);r(841);var N=function(e){var t=e.className,r=void 0===t?"":t,n=S()(e,["className"]),c=O()("wc-block-text-toolbar-button",r);return Object(i.createElement)(h.Button,a()({className:c},n))},x=r(45),D=(r(840),function(e){return function(t){return function(r){var n=Object(x.useProductDataContext)(),c=r.attributes,o=r.setAttributes,a=c.productId,l=Object(i.useState)(!a),b=k()(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)(P.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,{isDefault:!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.Toolbar,null,Object(i.createElement)(N,{onClick:function(){return d(!0)}},Object(s.__)("Switch product…","woo-gutenberg-products-block")))),Object(i.createElement)(t,r)))}}}),B=Object(i.createElement)(p.a,{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"})),z=Object(s.__)("Product Title","woo-gutenberg-products-block"),R=Object(i.createElement)(b.a,{srcElement:B}),T=Object(s.__)("Display the title of a product.","woo-gutenberg-products-block"),I=function(e){var t=e.color,r=e.fontSize,n=e.setFontSize,c=e.setColor,o=e.attributes,a=e.setAttributes,l=o.headingLevel,b=o.productLink,p=o.align;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(w.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:l,onChange:function(e){return a({headingLevel:e})}}),Object(f.X)()&&Object(i.createElement)(u.AlignmentToolbar,{value:p,onChange:function(e){a({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:b,onChange:function(){return a({productLink:!b})}})),Object(f.X)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Text settings","woo-gutenberg-products-block")},Object(i.createElement)(u.FontSizePicker,{value:r.size,onChange:n})),Object(i.createElement)(u.PanelColorSettings,{title:Object(s.__)("Color settings","woo-gutenberg-products-block"),colorSettings:[{value:t.color,onChange:c,label:Object(s.__)("Text color","woo-gutenberg-products-block")}]}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(E.a,o)))},L=Object(f.X)()?Object(y.compose)([Object(u.withFontSizes)("fontSize"),Object(u.withColors)("color",{textColor:"color"}),D({icon:R,label:z,description:Object(s.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(I):I;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 V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var F={title:z,description:T,icon:{src:R,foreground:"#874FB9"},attributes:v.a,edit:L};Object(l.registerBlockType)("woocommerce/product-title",V(V({},j),F));var M=r(534),H=r(362),q=Object(s.__)("Product Price","woo-gutenberg-products-block"),U=Object(i.createElement)(b.a,{srcElement:H.a}),Q=Object(s.__)("Display the price of a product.","woo-gutenberg-products-block"),Y=function(e){var t=e.fontSize,r=e.setFontSize,n=e.color,c=e.setColor,o=e.colorLabel;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.FontSizePicker,{value:t.size,onChange:r}),Object(i.createElement)(h.BaseControl,{label:o},Object(i.createElement)(u.ColorPalette,{value:n.color,onChange:c,label:Object(s.__)("Color")})))},W=function(e){var t=e.fontSize,r=e.saleFontSize,n=e.setFontSize,c=e.setSaleFontSize,o=e.color,a=e.saleColor,l=e.setColor,b=e.setSaleColor,p=e.attributes,d=e.setAttributes,m=p.align;return Object(i.createElement)(i.Fragment,null,Object(f.X)()&&Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(u.AlignmentToolbar,{value:m,onChange:function(e){d({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(f.X)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Price","woo-gutenberg-products-block")},Object(i.createElement)(Y,{color:o,setColor:l,fontSize:t,setFontSize:n,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Sale price","woo-gutenberg-products-block")},Object(i.createElement)(Y,{color:a,setColor:b,fontSize:r,setFontSize:c,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})))),Object(i.createElement)(M.default,p))},X=Object(f.X)()?Object(y.compose)([Object(u.withFontSizes)("fontSize"),Object(u.withFontSizes)("saleFontSize"),Object(u.withFontSizes)("originalFontSize"),Object(u.withColors)("color",{textColor:"color"}),Object(u.withColors)("saleColor",{textColor:"saleColor"}),Object(u.withColors)("originalColor",{textColor:"originalColor"}),D({icon:U,label:q,description:Object(s.__)("Choose a product to display its price.","woo-gutenberg-products-block")})])(W):W;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 K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $={productId:{type:"number",default:0}};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 Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(f.X)()&&($=K(K({},$),{},{align:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},saleFontSize:{type:"string"},customSaleFontSize:{type:"number"},color:{type:"string"},saleColor:{type:"string"},customColor:{type:"string"},customSaleColor:{type:"string"}}));var ee={title:q,description:Q,icon:{src:U,foreground:"#874FB9"},attributes:$,edit:X};Object(l.registerBlockType)("woocommerce/product-price",Z(Z({},j),ee));var te=r(393),re=r(192),ne=r(74),ce=r(3),oe=r(394),ae=Object(i.createElement)(p.a,{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:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"})),ie=Object(s.__)("Product Image","woo-gutenberg-products-block"),se=Object(i.createElement)(b.a,{srcElement:ae}),ue=Object(s.__)("Display the main product image","woo-gutenberg-products-block"),le=D({icon:se,label:ie,description:Object(s.__)("Choose a product to display its image.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=t.productLink,c=t.imageSizing,o=t.showSaleBadge,a=t.saleBadgeAlign;return Object(i.createElement)(i.Fragment,null,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:n,onChange:function(){return r({productLink:!n})}}),Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(s.__)('Overlay a "sale" badge if the product is on-sale.',"woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showSaleBadge:!o})}}),o&&Object(i.createElement)(ne.a,{label:Object(s.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:a,options:[{label:Object(s.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(s.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(s.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:function(e){return r({saleBadgeAlign:e})}}),Object(i.createElement)(ne.a,{label:Object(s.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(re.a)(Object(s.__)("Product image cropping can be modified in the <a>Customizer</a>.","woo-gutenberg-products-block"),{a:Object(i.createElement)("a",{href:"".concat(Object(ce.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)(oe.a,t)))}));function be(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 pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var de={title:ie,description:ue,icon:{src:se,foreground:"#874FB9"},attributes:te.a,edit:le};Object(l.registerBlockType)("woocommerce/product-image",pe(pe({},j),de));var fe={productId:{type:"number",default:0}},me=r(535),Oe=r(826),ge=Object(s.__)("Product Rating","woo-gutenberg-products-block"),je=Object(i.createElement)(b.a,{srcElement:Oe.a});function ve(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 he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye={title:ge,description:Object(s.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:je,foreground:"#874FB9"},attributes:fe,edit:D({icon:je,label:ge,description:Object(s.__)("Choose a product to display its rating.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(me.default,t)}))};Object(l.registerBlockType)("woocommerce/product-rating",he(he({},j),ye));var we={productId:{type:"number",default:0}},Ee=r(536),_e=r(844),ke=Object(s.__)("Add to Cart Button","woo-gutenberg-products-block"),Pe=Object(i.createElement)(b.a,{srcElement:_e.a});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 Se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne={title:ke,description:Object(s.__)("Display a call to action button which either adds the product to the cart, or links to the product page.","woo-gutenberg-products-block"),icon:{src:Pe,foreground:"#874FB9"},attributes:we,edit:D({icon:Pe,label:ke,description:Object(s.__)("Choose a product to display its add to cart button.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Ee.default,t))}))};Object(l.registerBlockType)("woocommerce/product-button",Se(Se({},j),Ne));var xe={productId:{type:"number",default:0}},De=r(538),Be=Object(i.createElement)(p.a,{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:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),ze=Object(s.__)("Product Summary","woo-gutenberg-products-block"),Re=Object(i.createElement)(b.a,{srcElement:Be});function Te(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 Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Le={title:ze,description:Object(s.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:Re,foreground:"#874FB9"},attributes:xe,edit:D({icon:Re,label:ze,description:Object(s.__)("Choose a product to display its short description.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(De.default,t)}))};Object(l.registerBlockType)("woocommerce/product-summary",Ie(Ie({},j),Le));var Ae={productId:{type:"number",default:0}},Ve=r(267),Fe=r(818),Me=Object(s.__)("On-Sale Badge","woo-gutenberg-products-block"),He=Object(i.createElement)(b.a,{srcElement:Fe.a});function qe(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 Ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Qe={title:Me,description:Object(s.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:He,foreground:"#874FB9"},supports:{html:!1},attributes:Ae,edit:D({icon:He,label:Me,description:Object(s.__)("Choose a product to display its sale-badge.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(Ve.default,t)}))};Object(l.registerBlockType)("woocommerce/product-sale-badge",Ue(Ue({},j),Qe));var Ye={productId:{type:"number",default:0}},We=r(135),Xe=r(539),Ge=Object(i.createElement)(p.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{d:"M2 6h2v12H2V6m3 0h1v12H5V6m2 0h3v12H7V6m4 0h1v12h-1V6m3 0h2v12h-2V6m3 0h3v12h-3V6m4 0h1v12h-1V6z"})),Ke=Object(s.__)("Product SKU","woo-gutenberg-products-block"),$e=Object(i.createElement)(b.a,{srcElement:Ge});function Je(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 Ze(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var et={title:Ke,description:Object(s.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:$e,foreground:"#874FB9"},attributes:Ye,edit:D({icon:$e,label:Ke,description:Object(s.__)("Choose a product to display its SKU.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(Xe.default,t))}))};Object(f.Y)("woocommerce/product-sku",Ze(Ze({},j),et));var tt={productId:{type:"number",default:0}},rt=r(540),nt=r(811),ct=Object(s.__)("Product Category List","woo-gutenberg-products-block"),ot=Object(i.createElement)(b.a,{srcElement:nt.a});function at(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 it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st={title:ct,description:Object(s.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block"),icon:{src:ot,foreground:"#874FB9"},attributes:tt,edit:D({icon:ot,label:ct,description:Object(s.__)("Choose a product to display its categories.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(rt.default,t)))}))};Object(f.Y)("woocommerce/product-category-list",it(it({},j),st));var ut={productId:{type:"number",default:0}},lt=r(541),bt=Object(s.__)("Product Tag List","woo-gutenberg-products-block"),pt=Object(i.createElement)(b.a,{srcElement:Fe.a});function dt(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 ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mt={title:bt,description:Object(s.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:pt,foreground:"#874FB9"},attributes:ut,edit:D({icon:pt,label:bt,description:Object(s.__)("Choose a product to display its tags.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(lt.default,t)))}))};Object(f.Y)("woocommerce/product-tag-list",ft(ft({},j),mt));var Ot={productId:{type:"number",default:0}},gt=r(542),jt=Object(i.createElement)(p.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("g",{fillRule:"evenodd"},Object(i.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(i.createElement)("path",{fillRule:"nonzero",d:"M20.5 5.2l-1.4-1.7C19 3.3 18.5 3 18 3H6c-.5 0-.9.2-1.2.5L3.5 5.3A2 2 0 003 6.5V19c0 1.1.9 2 2 2h14a2 2 0 002-2V6.5c0-.5-.2-1-.5-1.3zM6.2 5h11.6l.8 1H5.4l.8-1zM5 19V8h14v11H5z"}))),vt=Object(s.__)("Product Stock Indicator","woo-gutenberg-products-block"),ht=Object(i.createElement)(b.a,{srcElement:jt});function yt(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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Et={title:vt,description:Object(s.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:ht,foreground:"#874FB9"},attributes:Ot,edit:D({icon:ht,label:vt,description:Object(s.__)("Choose a product to display its stock.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(gt.default,t))}))};Object(f.Y)("woocommerce/product-stock-indicator",wt(wt({},j),Et));var _t=r(929),kt=(r(391),r(399)),Pt=Object(s.__)("Add to Cart","woo-gutenberg-products-block"),Ct=Object(i.createElement)(b.a,{srcElement:_e.a});function St(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 Nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?St(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):St(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xt={title:Pt,description:Object(s.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:Ct,foreground:"#874FB9"},edit:D({icon:Ct,label:Pt,description:Object(s.__)("Choose a product to display its add to cart form.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=Object(x.useProductDataContext)().product,c=t.className,o=t.showFormElements;return Object(i.createElement)("div",{className:O()(c,"wc-block-components-product-add-to-cart")},Object(i.createElement)(We.a,{productId:n.id}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block")},Object(_t.b)(n)?Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Display form elements","woo-gutenberg-products-block"),help:Object(s.__)("Depending on product type, allow customers to select a quantity, variations etc.","woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showFormElements:!o})}}):Object(i.createElement)(h.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(s.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.","woo-gutenberg-products-block")))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(kt.a,t)))})),attributes:r(398).a};Object(f.Y)("woocommerce/product-add-to-cart",Nt(Nt({},j),xt));var Dt=r(22),Bt=r.n(Dt),zt=r(19),Rt=r.n(zt),Tt=r(23),It=r.n(Tt),Lt=r(24),At=r.n(Lt),Vt=r(12),Ft=r.n(Vt),Mt=r(36),Ht=(r(2),r(81)),qt=r(927),Ut=r(827),Qt=r(167),Yt=function(e,t){var r=t.className,n=t.contentVisibility;return O()(e,r,{"has-image":n&&n.image,"has-title":n&&n.title,"has-rating":n&&n.rating,"has-price":n&&n.price,"has-button":n&&n.button})},Wt=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(i.createElement)("p",null,Object(s.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-products__add-product-button",isDefault:!0,isLarge:!0,href:ce.ADMIN_URL+"post-new.php?post_type=product"},Object(s.__)("Add new product","woo-gutenberg-products-block")+" ",Object(i.createElement)(b.a,{srcElement:Qt.a})),Object(i.createElement)(h.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(s.__)("Learn more","woo-gutenberg-products-block")))},Xt=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(s.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))};function Gt(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 Kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $t=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],Jt=function e(t){return t&&0!==t.length?t.map((function(t){return[t.name,Kt(Kt({},t.attributes),{},{product:void 0,children:t.innerBlocks.length>0?e(t.innerBlocks):[]})]})):[]};r(845);function Zt(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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tr=function(e,t){var r=e.contentVisibility;return Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:r.orderBy,onChange:function(){return t({contentVisibility:er(er({},r),{},{orderBy:!r.orderBy})})}})},rr=function(e,t){return Object(i.createElement)(h.SelectControl,{label:Object(s.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(s.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(s.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(s.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(s.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(s.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(s.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:function(e){return t({orderby:e})}})},nr=r(25),cr=r.n(nr),or=r(9),ar=r(6),ir=r(48),sr=(r(848),function(e){var t=e.currentPage,r=e.displayFirstAndLastPages,n=e.displayNextAndPreviousArrows,c=e.pagesToDisplay,o=e.onPageChange,a=e.totalPages,u=function(e,t,r){if(r<=2)return{minIndex:null,maxIndex:null};var n=e-1,c=Math.max(Math.floor(t-n/2),2),o=Math.min(Math.ceil(t+(n-(t-c))),r-1);return{minIndex:Math.max(Math.floor(t-(n-(o-t))),2),maxIndex:o}}(c,t,a),l=u.minIndex,b=u.maxIndex,p=r&&Boolean(1!==l),d=r&&Boolean(b!==a),f=r&&Boolean(l>3),m=r&&Boolean(b<a-2);p&&3===l&&(l-=1),d&&b===a-2&&(b+=1);var g=[];if(l&&b)for(var j=l;j<=b;j++)g.push(j);return Object(i.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(i.createElement)(ir.a,{screenReaderLabel:Object(s.__)("Navigate to another page","woo-gutenberg-products-block")}),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t-1)},title:Object(s.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(i.createElement)(ir.a,{label:"<",screenReaderLabel:Object(s.__)("Previous page","woo-gutenberg-products-block")})),p&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return o(1)},disabled:1===t},Object(i.createElement)(ir.a,{label:1,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),1)})),f&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),g.map((function(e){return Object(i.createElement)("button",{key:e,className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return o(e)},disabled:t===e},Object(i.createElement)(ir.a,{label:e,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),e)}))})),m&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),d&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===a,"wc-block-components-pagination__page--active":t===a}),onClick:function(){return o(a)},disabled:t===a},Object(i.createElement)(ir.a,{label:a,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),a)})),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t+1)},title:Object(s.__)("Next page","woo-gutenberg-products-block"),disabled:t>=a},Object(i.createElement)(ir.a,{label:">",screenReaderLabel:Object(s.__)("Next page","woo-gutenberg-products-block")})))});sr.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var ur=sr,lr=r(149),br=(r(847),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,c=e.value;return Object(i.createElement)(lr.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:r,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:n,screenReaderLabel:Object(s.__)("Order products by","woo-gutenberg-products-block"),value:c})}),pr=r(193),dr=Object(pr.a)((function(e){var t=e.product,r=e.attributes,n=e.instanceId,c=r.layoutConfig,o=Object(x.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(qt.a)(t);return n.map((function(n,s){var u=k()(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))})),fr=r(172),mr=r(207),Or=r(41),gr=r(58);function jr(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 vr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var hr=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(mr.a)(vr(vr({},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(gr.a)(i),u=Object(gr.a)(o),l=Object(Mt.useSelect)((function(t){var c=t(Or.COLLECTIONS_STORE_KEY),o=[e,r,n,s,u];return{value:c.getCollectionHeader.apply(c,o),isLoading:c.hasFinishedResolution("getCollectionHeader",o)}}),[e,r,n,u,s]),b=l.value,p=l.isLoading;return{value:b,isLoading:void 0===p||p}}("x-wp-total",vr(vr({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(o,10),productsLoading:c}},yr=r(168),wr=r(185),Er=r(87),_r=(r(846),r(144)),kr=function(){var e=Object(x.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:_r.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")))},Pr=r(832),Cr=function(e){var t=e.resetCallback,r=void 0===t?function(){}:t,n=Object(x.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:Pr.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")))};function Sr(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 Nr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xr=function(e){var t=e.totalQuery,r=e.totalProducts,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=n.totalQuery;return!Object(ar.isEqual)(t,c)&&Number.isFinite(r)},Dr=Object(wr.a)((function(e){var t=e.attributes,r=e.currentPage,n=e.onPageChange,c=e.onSortChange,o=e.sortValue,a=e.scrollToTop,u=Object(fr.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,c=n.columns,o=n.rows;return Nr(Nr({},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:t,sortValue:o,currentPage:r})),l=k()(u,1)[0],b=hr(l),p=b.products,d=b.totalProducts,f=b.productsLoading,m=Object(x.useInnerBlockLayoutContext)().parentClassName,g=function(e){e.order,e.orderby,e.page,e.per_page;return S()(e,["order","orderby","page","per_page"])||{}}(l),j=Object(fr.b)("attributes",[]),v=k()(j,2),h=v[0],y=v[1],w=Object(fr.b)("min_price"),E=k()(w,2),_=E[0],P=E[1],C=Object(fr.b)("max_price"),N=k()(C,2),D=N[0],B=N[1],z=Object(yr.a)({totalQuery:g,totalProducts:d},xr);Object(i.useEffect)((function(){Object(ar.isEqual)(g,null==z?void 0:z.totalQuery)||(n(1),(null==z?void 0:z.totalQuery)&&function(e){Number.isFinite(e)&&(0===e?Object(Er.speak)(Object(s.__)("No products found","woo-gutenberg-products-block")):Object(Er.speak)(Object(s.sprintf)(Object(s._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(d))}),[null==z?void 0:z.totalQuery,d,n,g]);var R,T,I,L,A,V=t.contentVisibility,F=t.columns*t.rows,M=!Number.isFinite(d)&&Number.isFinite(null==z?void 0:z.totalProducts)&&Object(ar.isEqual)(g,null==z?void 0:z.totalQuery)?Math.ceil(z.totalProducts/F):Math.ceil(d/F),H=p.length?p:Array.from({length:F}),q=0!==p.length||f,U=h.length>0||Number.isFinite(_)||Number.isFinite(D);return Object(i.createElement)("div",{className:(R=t.columns,T=t.rows,I=t.alignButtons,L=t.align,A=void 0!==L?"align"+L:"",O()(m,A,"has-"+R+"-columns",{"has-multiple-rows":T>1,"has-aligned-buttons":I}))},V.orderBy&&q&&Object(i.createElement)(br,{onChange:c,value:o}),!q&&U&&Object(i.createElement)(Cr,{resetCallback:function(){y([]),P(null),B(null)}}),!q&&!U&&Object(i.createElement)(kr,null),q&&Object(i.createElement)("ul",{className:"".concat(m,"__products")},H.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return Object(i.createElement)(dr,{key:e.id||r,attributes:t,product:e})}))),M>1&&Object(i.createElement)(ur,{currentPage:r,onPageChange:function(e){a({focusableSelector:"a, button"}),n(e)},totalPages:M}))})),Br=function(e){var t=e.attributes,r=Object(i.useState)(1),n=k()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),s=k()(a,2),u=s[0],l=s[1];Object(i.useEffect)((function(){l(t.orderby)}),[t.orderby]);return Object(i.createElement)(Dr,{attributes:t,currentPage:c,onPageChange:function(e){o(e)},onSortChange:function(e){var t=e.target.value;l(t),o(1)},sortValue:u})},zr=r(176);function Rr(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=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return At()(this,r)}}var Tr=function(e){It()(r,e);var t=Rr(r);function r(){return Bt()(this,r),t.apply(this,arguments)}return cr()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?zr.a:Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)(Br,{attributes:t,urlParameterSuffix:r}))}}]),r}(or.Component);function Ir(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=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return At()(this,r)}}var Lr=function(e){It()(r,e);var t=Ir(r);function r(){var e;Bt()(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),c()(Rt()(e),"state",{isEditing:!1,innerBlocks:[]}),c()(Rt()(e),"blockMap",Object(qt.a)("woocommerce/all-products")),c()(Rt()(e),"componentDidMount",(function(){var t=e.props.block;e.setState({innerBlocks:t.innerBlocks})})),c()(Rt()(e),"getTitle",(function(){return Object(s.__)("All Products","woo-gutenberg-products-block")})),c()(Rt()(e),"getIcon",(function(){return Object(i.createElement)(b.a,{srcElement:d})})),c()(Rt()(e),"togglePreview",(function(){var t=e.props.debouncedSpeak;e.setState({isEditing:!e.state.isEditing}),e.state.isEditing||t(Object(s.__)("Showing All Products block preview.","woo-gutenberg-products-block"))})),c()(Rt()(e),"getInspectorControls",(function(){var t=e.props,r=t.attributes,n=t.setAttributes,c=r.columns,o=r.rows,a=r.alignButtons;return Object(i.createElement)(u.InspectorControls,{key:"inspector"},Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(i.createElement)(Ht.a,{columns:c,rows:o,alignButtons:a,setAttributes:n})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content Settings","woo-gutenberg-products-block")},tr(r,n),rr(r,n)))})),c()(Rt()(e),"getBlockControls",(function(){var t=e.state.isEditing;return Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.Toolbar,{controls:[{icon:"edit",title:Object(s.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return e.togglePreview()},isActive:t}]}))})),c()(Rt()(e),"renderEditMode",(function(){var t={template:e.props.attributes.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(e.blockMap)};return 0!==e.props.attributes.layoutConfig.length&&(t.renderAppender=!1),Object(i.createElement)(h.Placeholder,{icon:e.getIcon(),label:e.getTitle()},Object(s.__)("Display all products from your store as a grid.","woo-gutenberg-products-block"),Object(i.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(i.createElement)(h.Tip,null,Object(s.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.","woo-gutenberg-products-block")),Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(i.createElement)("ul",{className:"wc-block-grid__products"},Object(i.createElement)("li",{className:"wc-block-grid__product"},Object(i.createElement)(x.ProductDataContextProvider,{product:Ut.a[0]},Object(i.createElement)(u.InnerBlocks,t)))))),Object(i.createElement)("div",{className:"wc-block-all-products__actions"},Object(i.createElement)(h.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,isLarge:!0,onClick:function(){var t=e.props,r=t.block;(0,t.setAttributes)({layoutConfig:Jt(r.innerBlocks)}),e.setState({innerBlocks:r.innerBlocks}),e.togglePreview()}},Object(s.__)("Done","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-all-products__cancel-button",isTertiary:!0,onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=e.state.innerBlocks;n(r.clientId,c,!1),e.togglePreview()}},Object(s.__)("Cancel","woo-gutenberg-products-block")),Object(i.createElement)(h.IconButton,{className:"wc-block-all-products__reset-button",icon:Object(i.createElement)(b.a,{srcElement:d}),label:Object(s.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=[];$t.map((function(e){var t=k()(e,2),r=t[0],n=t[1];return c.push(Object(l.createBlock)(r,n)),!0})),n(r.clientId,c,!1),e.setState({innerBlocks:r.innerBlocks})}},Object(s.__)("Reset Layout","woo-gutenberg-products-block")))))})),c()(Rt()(e),"renderViewMode",(function(){var t=e.props.attributes,r=t.layoutConfig,n=r&&0!==r.length,c=e.getTitle(),o=e.getIcon();return n?Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Tr,{attributes:t})):Xt(c,o)})),c()(Rt()(e),"render",(function(){var t=e.props.attributes,r=e.state.isEditing,n=e.getTitle(),c=e.getIcon();return f.s?Object(i.createElement)("div",{className:Yt("wc-block-all-products",t)},e.getBlockControls(),e.getInspectorControls(),r?e.renderEditMode():e.renderViewMode()):Wt(n,c)})),e}return r}(i.Component),Ar=Object(y.compose)(h.withSpokenMessages,Object(Mt.withSelect)((function(e,t){var r=t.clientId;return{block:(0,e("core/block-editor").getBlock)(r)}})),Object(Mt.withDispatch)((function(e){return{replaceInnerBlocks:e("core/block-editor").replaceInnerBlocks}})))(Lr),Vr={columns:f.m,rows:f.o,alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:$t,isPreview:!1};function Fr(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 Mr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Hr={title:Object(s.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display products from your store in a grid layout.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:Vr,edit:function(e){return Object(i.createElement)(Ar,e)},save:function(e){var t=e.attributes,r={};Object.keys(t).sort().forEach((function(e){r[e]=t[e]}));var n={"data-attributes":JSON.stringify(r)};return Object(i.createElement)("div",a()({className:Yt("wc-block-all-products",t)},n),Object(i.createElement)(u.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",Mr(Mr({},Hr),{},{deprecated:[{attributes:Object.assign({},Hr.attributes,{rows:{type:"number",default:1}}),save:function(e){var t=e.attributes,r={"data-attributes":JSON.stringify(t)};return Object(i.createElement)("div",a()({className:Yt("wc-block-all-products",t)},r),Object(i.createElement)(u.InnerBlocks.Content,null))}}]}))},9:function(e,t){!function(){e.exports=this.React}()},927:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(56),c=r(0),o=r(5);r.p=o.V,Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(11)]).then(r.bind(null,534))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(3),r.e(10)]).then(r.bind(null,947))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(17)]).then(r.bind(null,948))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(c.lazy)((function(){return r.e(12).then(r.bind(null,535))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(2),r.e(8)]).then(r.bind(null,536))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(c.lazy)((function(){return r.e(15).then(r.bind(null,538))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(c.lazy)((function(){return r.e(3).then(r.bind(null,267))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(c.lazy)((function(){return r.e(13).then(r.bind(null,539))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(c.lazy)((function(){return r.e(9).then(r.bind(null,540))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(c.lazy)((function(){return r.e(16).then(r.bind(null,541))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(c.lazy)((function(){return r.e(14).then(r.bind(null,542))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(2),r.e(7)]).then(r.bind(null,949))}))});var a=function(e){return Object(n.getRegisteredBlockComponents)(e)}},929: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.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},94:function(e,t){!function(){e.exports=this.wp.date}()},95:function(e,t){!function(){e.exports=this.wp.autop}()},99:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(280),u=(r(2),r(7)),l=r.n(u);r(239);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(i.createElement)(s.a,c()({className:b},u),n&&Object(i.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(i.createElement)("span",{className:"wc-block-components-button__text"},o))}}});
build/all-reviews.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => 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'), 'version' => '957b08a406056940a419d8f2c2deb799');
1
+ <?php return array('dependencies' => 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'), 'version' => 'a6f0283db4b9bbf08ab99b5eaf7e3b3f');
build/all-reviews.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var n,i,a=t[0],s=t[1],l=t[2],b=0,d=[];b<a.length;b++)i=a[b],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&d.push(o[i][0]),o[i]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,a=1;a<r.length;a++){var s=r[a];0!==o[s]&&(n=!1)}n&&(c.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={6:0},c=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var u=s;return c.push([828,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},122:function(e,t){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},137: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 p}));var n=r(0),o=r(1),c=r(191),i=r(4),a=r(14),s=r(3),l=r(5),u=r(74),b=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.Toolbar,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!l.K&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Product rating is disabled in your <a>store settings</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(i.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)(u.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&&!l.Q&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Reviewer photo is disabled in your <a>site settings</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},p=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(i.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)(i.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)(i.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)(i.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}))}},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},144:function(e,t,r){"use strict";var n=r(0),o=r(58),c=Object(n.createElement)(o.a,{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},147:function(e,t){},149:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(7)),c=r.n(o),i=r(48),a=r(192);r(201);t.a=Object(a.a)((function(e){var t=e.className,r=e.instanceId,o=e.defaultValue,a=e.label,s=e.onChange,l=e.options,u=e.screenReaderLabel,b=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:a,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",defaultValue:o,onChange:s,readOnly:b,value:d},l.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},15:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},157:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(5),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:"#",reviewer:Object(n.__)("Alice","woo-gutenberg-products-block"),review:"<p>".concat(Object(n.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block"),"</p>\n"),reviewer_avatar_urls:{48:o.U+"img/avatar.jpg",96:o.U+"img/avatar.jpg"},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:"#",reviewer:Object(n.__)("Bob","woo-gutenberg-products-block"),review:"<p>".concat(Object(n.__)("This product is awesome, I love it!","woo-gutenberg-products-block"),"</p>\n"),reviewer_avatar_urls:{48:o.U+"img/avatar.jpg",96:o.U+"img/avatar.jpg"},rating:null,verified:!1}]}}},17:function(e,t){!function(){e.exports=this.wp.blocks}()},181: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}}},182:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(0),i=(r(200),r(70));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({className:Object(i.a)(t)},Object(i.b)(t)))}},187:function(e,t,r){"use strict";var n=r(21),o=r.n(n),c=r(24),i=r.n(c),a=r(22),s=r.n(a),l=r(23),u=r.n(l),b=r(12),d=r.n(b),p=r(0),w=r(1),g=r(9),f=(r(2),r(6)),m=r(4),v=r(5),h=r(93),O=r(48),j=(r(257),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(p.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(p.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(p.createElement)(O.a,{label:r,screenReaderLabel:n})))});j.defaultProps={label:Object(w.__)("Load more","woo-gutenberg-products-block")};var y=j,_=r(149),k=(r(254),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(_.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",defaultValue:t,label:Object(w.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(w.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(w.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(w.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(w.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),R=r(8),E=r.n(R),S=r(7),P=r.n(S),C=r(19),N=r.n(C),x=r(231),T=r.n(x),L=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=T()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=I(e,t,r);return L(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=L(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};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var B=function(e){s()(r,e);var t=A(r);function r(e){var n;return o()(this,r),(n=t.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},n.reviewSummary=Object(g.createRef)(),n.reviewContent=Object(g.createRef)(),n.getButton=n.getButton.bind(N()(n)),n.onClick=n.onClick.bind(N()(n)),n}return i()(r,[{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,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{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,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),r}(g.Component);B.defaultProps={maxLines:3,ellipsis:"&hellip;",moreText:Object(w.__)("Read more","woo-gutenberg-products-block"),lessText:Object(w.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=B;r(256);var F=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,i=t.showReviewerName,a=t.showReviewImage,s=t.showReviewRating,l=t.showReviewContent,u=t.showProductName,b=n.rating,d=!Object.keys(n).length>0,g=Number.isFinite(b)&&s;return Object(p.createElement)("li",{className:P()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||c||i||a||g)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},a&&function(e,t,r){var n,o;return r||!e?Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(p.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)||""}):Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x"}),e.verified&&Object(p.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(w.__)("Verified buyer","woo-gutenberg-products-block")},Object(w.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||i||g||c)&&Object(p.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+"%"};return Object(p.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(p.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img"},Object(p.createElement)("span",{style:r},Object(w.sprintf)(Object(w.__)("Rated %f out of 5","woo-gutenberg-products-block"),t))))}(n),u&&function(e){return Object(p.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(p.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 Object(p.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(p.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 Object(p.createElement)(H,{maxLines:10,moreText:Object(w.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(w.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(p.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(255);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 U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){E()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var z=function(e){var t=e.attributes,r=e.reviews,n=(v.Q||"product"===t.imageType)&&t.showReviewImage,o=v.K&&t.showReviewRating,c=U(U({},t),{},{showReviewImage:n,showReviewRating:o});return Object(p.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(p.createElement)(F,{attributes:c}):r.map((function(e,t){return Object(p.createElement)(F,{key:e.id||t,attributes:c,review:e})})))},W=r(10),G=r.n(W),J=r(15),K=r.n(J),Q=r(37),q=r.n(Q),Y=r(46),X=r.n(Y),Z=r(70),$=r(43);function ee(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=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}function te(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=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var re=function(e){var t=function(t){s()(n,t);var r=ee(n);function n(){var e;o()(this,n);for(var t=arguments.length,c=new Array(t),i=0;i<t;i++)c[i]=arguments[i];return e=r.call.apply(r,[this].concat(c)),E()(N()(e),"isPreview",!!e.props.attributes.previewReviews),E()(N()(e),"delayedAppendReviews",e.props.delayFunction(e.appendReviews)),E()(N()(e),"state",{error:null,loading:!0,reviews:e.isPreview?e.props.attributes.previewReviews:[],totalReviews:e.isPreview?e.props.attributes.previewReviews.length:0}),E()(N()(e),"setError",function(){var t=q()(K.a.mark((function t(r){var n,o;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.onReviewsLoadError,t.next=3,Object($.a)(r);case 3:o=t.sent,e.setState({reviews:[],loading:!1,error:o}),n(o);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return i()(n,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!X()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,i={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(i.category_id=Array.isArray(r)?r.join(","):r),c&&(i.product_id=c),i}},{key:"replaceReviews",value:function(){if(!this.isPreview){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}}},{key:"appendReviews",value:function(){if(!this.isPreview){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&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.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,c=r.reviews,i=r.totalReviews;return Object(p.createElement)(e,G()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:i}))}}]),n}(g.Component);E()(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){s()(r,e);var t=te(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,i=e.totalReviews;return r?Object(p.createElement)(h.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(p.createElement)(m.Disabled,null,t.showOrderby&&v.K&&Object(p.createElement)(k,{readOnly:!0,value:t.orderby}),Object(p.createElement)(z,{attributes:t,reviews:c}),t.showLoadMore&&i>c.length&&Object(p.createElement)(y,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),r}(g.Component));function ne(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=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var oe=function(e){s()(r,e);var t=ne(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(m.Placeholder,{icon:t,label:r},Object(w.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.noReviewsPlaceholder,n=t.categoryIds,o=t.productId,c=t.reviewsOnPageLoad,i=t.showProductName,a=t.showReviewDate,s=t.showReviewerName,l=t.showReviewContent,u=t.showReviewImage,b=t.showReviewRating,d=Object(Z.d)(t.orderby),w=d.order,g=d.orderby;return!(l||b||a||s||u||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(Z.a)(t)},Object(p.createElement)(re,{attributes:t,categoryIds:n,delayFunction:function(e){return Object(f.debounce)(e,400)},noReviewsPlaceholder:r,orderby:g,order:w,productId:o,reviewsToDisplay:c}))}}]),r}(g.Component);t.a=oe},200:function(e,t){},201:function(e,t){},25:function(e,t){!function(){e.exports=this.wp.compose}()},254:function(e,t){},255:function(e,t){},256:function(e,t){},257:function(e,t){},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},4:function(e,t){!function(){e.exports=this.wp.components}()},43:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(15),o=r.n(n),c=r(37),i=r.n(c),a=function(){var e=i()(o.a.mark((function e(t){var r;return o.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(t){return e.apply(this,arguments)}}()},46:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},47:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},48:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(0),i=(r(2),r(9)),a=r(7),s=r.n(a);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 u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=r,d=null!=n;return!b&&d?(t=o||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),Object(c.createElement)(t,l,n)):(t=o||i.Fragment,b&&d&&r!==n?Object(c.createElement)(t,l,Object(c.createElement)("span",{"aria-hidden":"true"},r),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,l,r))}},49:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(47));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(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"===i?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")))}},5:function(e,t,r){"use strict";r.d(t,"l",(function(){return o})),r.d(t,"K",(function(){return c})),r.d(t,"Q",(function(){return i})),r.d(t,"A",(function(){return a})),r.d(t,"C",(function(){return s})),r.d(t,"m",(function(){return l})),r.d(t,"B",(function(){return u})),r.d(t,"E",(function(){return b})),r.d(t,"o",(function(){return d})),r.d(t,"D",(function(){return p})),r.d(t,"n",(function(){return w})),r.d(t,"G",(function(){return g})),r.d(t,"v",(function(){return f})),r.d(t,"y",(function(){return m})),r.d(t,"s",(function(){return v})),r.d(t,"t",(function(){return h})),r.d(t,"u",(function(){return O})),r.d(t,"k",(function(){return j})),r.d(t,"M",(function(){return y})),r.d(t,"R",(function(){return _})),r.d(t,"q",(function(){return k})),r.d(t,"r",(function(){return R})),r.d(t,"p",(function(){return E})),r.d(t,"J",(function(){return S})),r.d(t,"c",(function(){return P})),r.d(t,"w",(function(){return C})),r.d(t,"x",(function(){return N})),r.d(t,"U",(function(){return T})),r.d(t,"V",(function(){return L})),r.d(t,"L",(function(){return D})),r.d(t,"a",(function(){return I})),r.d(t,"O",(function(){return M})),r.d(t,"b",(function(){return A})),r.d(t,"N",(function(){return B})),r.d(t,"F",(function(){return H})),r.d(t,"i",(function(){return F})),r.d(t,"P",(function(){return z})),r.d(t,"h",(function(){return W})),r.d(t,"j",(function(){return G})),r.d(t,"I",(function(){return J})),r.d(t,"H",(function(){return K})),r.d(t,"T",(function(){return Q})),r.d(t,"S",(function(){return q})),r.d(t,"d",(function(){return Y})),r.d(t,"e",(function(){return X})),r.d(t,"f",(function(){return Z})),r.d(t,"g",(function(){return $})),r.d(t,"z",(function(){return ee})),r.d(t,"Y",(function(){return re})),r.d(t,"Z",(function(){return ne})),r.d(t,"W",(function(){return oe})),r.d(t,"X",(function(){return ce}));var n=r(3),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),l=Object(n.getSetting)("default_columns",3),u=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),d=Object(n.getSetting)("default_rows",3),p=Object(n.getSetting)("min_height",500),w=Object(n.getSetting)("default_height",500),g=Object(n.getSetting)("placeholderImgSrc",""),f=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),m=Object(n.getSetting)("limitTags"),v=Object(n.getSetting)("hasProducts",!0),h=Object(n.getSetting)("hasTags",!0),O=Object(n.getSetting)("homeUrl",""),j=Object(n.getSetting)("couponsEnabled",!0),y=Object(n.getSetting)("shippingEnabled",!0),_=Object(n.getSetting)("taxesEnabled",!0),k=Object(n.getSetting)("displayItemizedTaxes",!1),R=Object(n.getSetting)("hasDarkEditorStyleSupport",!1),E=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),S=Object(n.getSetting)("productCount",0),P=Object(n.getSetting)("attributes",[]),C=Object(n.getSetting)("isShippingCalculatorEnabled",!0),N=Object(n.getSetting)("isShippingCostHidden",!1),x=Object(n.getSetting)("woocommerceBlocksPhase",1),T=Object(n.getSetting)("wcBlocksAssetUrl",""),L=Object(n.getSetting)("wcBlocksBuildUrl",""),D=Object(n.getSetting)("shippingCountries",{}),I=Object(n.getSetting)("allowedCountries",{}),M=Object(n.getSetting)("shippingStates",{}),A=Object(n.getSetting)("allowedStates",{}),B=Object(n.getSetting)("shippingMethodsExist",!1),H=Object(n.getSetting)("paymentGatewaySortOrder",[]),F=Object(n.getSetting)("checkoutShowLoginReminder",!0),V={id:0,title:"",permalink:""},U=Object(n.getSetting)("storePages",{shop:V,cart:V,checkout:V,privacy:V,terms:V}),z=U.shop.permalink,W=U.checkout.id,G=U.checkout.permalink,J=U.privacy.permalink,K=U.privacy.title,Q=U.terms.permalink,q=U.terms.title,Y=U.cart.id,X=U.cart.permalink,Z=Object(n.getSetting)("checkoutAllowsGuest",!1),$=Object(n.getSetting)("checkoutAllowsSignup",!1),ee=Object(n.getSetting)("loginUrl","/wp-login.php"),te=r(17),re=function(e,t){if(x>2)return Object(te.registerBlockType)(e,t)},ne=function(e,t){if(x>1)return Object(te.registerBlockType)(e,t)},oe=function(){return x>2},ce=function(){return x>1}},6:function(e,t){!function(){e.exports=this.lodash}()},61:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(27),i=r.n(c),a=r(9);r(2);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,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},70:function(e,t,r){"use strict";r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return b}));var n=r(13),o=r.n(n),c=r(7),i=r.n(c),a=r(5),s=function(e){if(a.K){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=function(e){return o()({path:"/wc/store/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},u=function(e){var t=e.className,r=e.categoryIds,n=e.productId,o=e.showReviewDate,c=e.showReviewerName,a=e.showReviewContent,s=e.showProductName,l=e.showReviewImage,u=e.showReviewRating,b="wc-block-all-reviews";return n&&(b="wc-block-reviews-by-product"),Array.isArray(r)&&(b="wc-block-reviews-by-category"),i()(b,t,{"has-image":l,"has-name":c,"has-date":o,"has-rating":u,"has-content":a,"has-product-name":s})},b=function(e){var t=e.categoryIds,r=e.imageType,n=e.orderby,o=e.productId,c={"data-image-type":r,"data-orderby":n,"data-reviews-on-page-load":e.reviewsOnPageLoad,"data-reviews-on-load-more":e.reviewsOnLoadMore,"data-show-load-more":e.showLoadMore,"data-show-orderby":e.showOrderby};return o&&(c["data-product-id"]=o),Array.isArray(t)&&(c["data-category-ids"]=t.join(",")),c}},74:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(21),i=r.n(c),a=r(24),s=r.n(a),l=r(19),u=r.n(l),b=r(22),d=r.n(b),p=r(23),w=r.n(p),g=r(12),f=r.n(g),m=r(0),v=r(6),h=r(7),O=r.n(h),j=r(4),y=r(25);r(122);function _(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=f()(e);if(t){var o=f()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return w()(this,r)}}var k=function(e){d()(r,e);var t=_(r);function r(){var e;return i()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(u()(e)),e}return s()(r,[{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,c=r.checked,i=r.instanceId,a=r.className,s=r.help,l=r.options,u=r.value,b="inspector-toggle-button-control-".concat(i);return s&&(e=Object(v.isFunction)(s)?s(c):s),Object(m.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",a)},Object(m.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(m.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isDefault=!0,c["aria-pressed"]=!1),Object(m.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)}))))}}]),r}(m.Component);t.a=Object(y.withInstanceId)(k)},828:function(e,t,r){e.exports=r(913)},9:function(e,t){!function(){e.exports=this.React}()},913:function(e,t,r){"use strict";r.r(t);var n=r(8),o=r.n(n),c=r(0),i=r(1),a=r(17),s=r(61),l=r(58),u=Object(c.createElement)(l.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M15 4v7H5.17l-.59.59-.58.58V4h11m1-2H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm5 4h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1z"})),b=(r(200),r(14)),d=r(4),p=(r(2),r(187)),w=function(){return Object(c.createElement)(d.Placeholder,{className:"wc-block-all-reviews",icon:Object(c.createElement)(s.a,{srcElement:u,className:"block-editor-block-icon"}),label:Object(i.__)("All Reviews","woo-gutenberg-products-block")},Object(i.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"))},g=r(137),f=function(e){var t=e.attributes,r=e.setAttributes;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(b.InspectorControls,{key:"inspector"},Object(c.createElement)(d.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(d.ToggleControl,{label:Object(i.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return r({showProductName:!t.showProductName})}}),Object(g.b)(t,r)),Object(c.createElement)(d.PanelBody,{title:Object(i.__)("List Settings","woo-gutenberg-products-block")},Object(g.c)(t,r))),Object(c.createElement)(p.a,{attributes:t,icon:Object(c.createElement)(s.a,{icon:u,className:"block-editor-block-icon"}),name:Object(i.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))},m=r(181),v=r(182),h=r(157);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 j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(a.registerBlockType)("woocommerce/all-reviews",{title:Object(i.__)("All Reviews","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(s.a,{srcElement:u}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Show a list of all product reviews.","woo-gutenberg-products-block"),supports:{html:!1},example:j(j({},h.a),{},{attributes:j(j({},h.a.attributes),{},{showProductName:!0})}),attributes:j(j({},m.a),{},{showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(f,e)},save:v.a})},93:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(61)),i=r(144),a=r(7),s=r.n(a),l=r(4),u=r(49);r(147);t.a=function(e){var t=e.className,r=e.error,a=e.isLoading,b=e.onRetry;return Object(n.createElement)(l.Placeholder,{icon:Object(n.createElement)(c.a,{srcElement:i.a}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:s()("wc-block-api-error",t)},Object(n.createElement)(u.a,{error:r}),b&&Object(n.createElement)(n.Fragment,null,a?Object(n.createElement)(l.Spinner,null):Object(n.createElement)(l.Button,{isDefault:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var n,i,a=t[0],s=t[1],l=t[2],b=0,d=[];b<a.length;b++)i=a[b],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&d.push(o[i][0]),o[i]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,a=1;a<r.length;a++){var s=r[a];0!==o[s]&&(n=!1)}n&&(c.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={6:0},c=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var u=s;return c.push([828,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},122:function(e,t){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},137: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 p}));var n=r(0),o=r(1),c=r(192),i=r(4),a=r(14),s=r(3),l=r(5),u=r(74),b=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.Toolbar,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!l.K&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Product rating is disabled in your <a>store settings</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(i.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)(u.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&&!l.Q&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Reviewer photo is disabled in your <a>site settings</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},p=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(i.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)(i.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)(i.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)(i.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}))}},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},144:function(e,t,r){"use strict";var n=r(0),o=r(57),c=Object(n.createElement)(o.a,{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},147:function(e,t){},149:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(7)),c=r.n(o),i=r(48),a=r(193);r(202);t.a=Object(a.a)((function(e){var t=e.className,r=e.instanceId,o=e.defaultValue,a=e.label,s=e.onChange,l=e.options,u=e.screenReaderLabel,b=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:a,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",defaultValue:o,onChange:s,readOnly:b,value:d},l.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},15:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},157:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(5),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:"#",reviewer:Object(n.__)("Alice","woo-gutenberg-products-block"),review:"<p>".concat(Object(n.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block"),"</p>\n"),reviewer_avatar_urls:{48:o.U+"img/avatar.jpg",96:o.U+"img/avatar.jpg"},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:"#",reviewer:Object(n.__)("Bob","woo-gutenberg-products-block"),review:"<p>".concat(Object(n.__)("This product is awesome, I love it!","woo-gutenberg-products-block"),"</p>\n"),reviewer_avatar_urls:{48:o.U+"img/avatar.jpg",96:o.U+"img/avatar.jpg"},rating:null,verified:!1}]}}},17:function(e,t){!function(){e.exports=this.wp.blocks}()},182: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}}},183:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(0),i=(r(201),r(71));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({className:Object(i.a)(t)},Object(i.b)(t)))}},188:function(e,t,r){"use strict";var n=r(22),o=r.n(n),c=r(25),i=r.n(c),a=r(23),s=r.n(a),l=r(24),u=r.n(l),b=r(12),d=r.n(b),p=r(0),w=r(1),g=r(9),f=(r(2),r(6)),m=r(4),v=r(5),h=r(93),O=r(48),j=(r(258),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(p.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(p.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(p.createElement)(O.a,{label:r,screenReaderLabel:n})))});j.defaultProps={label:Object(w.__)("Load more","woo-gutenberg-products-block")};var y=j,_=r(149),k=(r(255),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(_.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",defaultValue:t,label:Object(w.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(w.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(w.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(w.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(w.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),R=r(8),E=r.n(R),S=r(7),P=r.n(S),C=r(19),N=r.n(C),x=r(232),T=r.n(x),L=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=T()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=I(e,t,r);return L(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=L(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};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var B=function(e){s()(r,e);var t=A(r);function r(e){var n;return o()(this,r),(n=t.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},n.reviewSummary=Object(g.createRef)(),n.reviewContent=Object(g.createRef)(),n.getButton=n.getButton.bind(N()(n)),n.onClick=n.onClick.bind(N()(n)),n}return i()(r,[{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,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{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,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),r}(g.Component);B.defaultProps={maxLines:3,ellipsis:"&hellip;",moreText:Object(w.__)("Read more","woo-gutenberg-products-block"),lessText:Object(w.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=B;r(257);var F=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,i=t.showReviewerName,a=t.showReviewImage,s=t.showReviewRating,l=t.showReviewContent,u=t.showProductName,b=n.rating,d=!Object.keys(n).length>0,g=Number.isFinite(b)&&s;return Object(p.createElement)("li",{className:P()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||c||i||a||g)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},a&&function(e,t,r){var n,o;return r||!e?Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(p.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)||""}):Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x"}),e.verified&&Object(p.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(w.__)("Verified buyer","woo-gutenberg-products-block")},Object(w.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||i||g||c)&&Object(p.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+"%"};return Object(p.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(p.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img"},Object(p.createElement)("span",{style:r},Object(w.sprintf)(Object(w.__)("Rated %f out of 5","woo-gutenberg-products-block"),t))))}(n),u&&function(e){return Object(p.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(p.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 Object(p.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(p.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 Object(p.createElement)(H,{maxLines:10,moreText:Object(w.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(w.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(p.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(256);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 U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){E()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var z=function(e){var t=e.attributes,r=e.reviews,n=(v.Q||"product"===t.imageType)&&t.showReviewImage,o=v.K&&t.showReviewRating,c=U(U({},t),{},{showReviewImage:n,showReviewRating:o});return Object(p.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(p.createElement)(F,{attributes:c}):r.map((function(e,t){return Object(p.createElement)(F,{key:e.id||t,attributes:c,review:e})})))},W=r(10),G=r.n(W),J=r(15),K=r.n(J),Q=r(37),q=r.n(Q),Y=r(43),X=r.n(Y),Z=r(71),$=r(44);function ee(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=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}function te(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=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var re=function(e){var t=function(t){s()(n,t);var r=ee(n);function n(){var e;o()(this,n);for(var t=arguments.length,c=new Array(t),i=0;i<t;i++)c[i]=arguments[i];return e=r.call.apply(r,[this].concat(c)),E()(N()(e),"isPreview",!!e.props.attributes.previewReviews),E()(N()(e),"delayedAppendReviews",e.props.delayFunction(e.appendReviews)),E()(N()(e),"state",{error:null,loading:!0,reviews:e.isPreview?e.props.attributes.previewReviews:[],totalReviews:e.isPreview?e.props.attributes.previewReviews.length:0}),E()(N()(e),"setError",function(){var t=q()(K.a.mark((function t(r){var n,o;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.onReviewsLoadError,t.next=3,Object($.a)(r);case 3:o=t.sent,e.setState({reviews:[],loading:!1,error:o}),n(o);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return i()(n,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!X()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,i={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(i.category_id=Array.isArray(r)?r.join(","):r),c&&(i.product_id=c),i}},{key:"replaceReviews",value:function(){if(!this.isPreview){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}}},{key:"appendReviews",value:function(){if(!this.isPreview){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&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.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,c=r.reviews,i=r.totalReviews;return Object(p.createElement)(e,G()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:i}))}}]),n}(g.Component);E()(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){s()(r,e);var t=te(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,i=e.totalReviews;return r?Object(p.createElement)(h.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(p.createElement)(m.Disabled,null,t.showOrderby&&v.K&&Object(p.createElement)(k,{readOnly:!0,value:t.orderby}),Object(p.createElement)(z,{attributes:t,reviews:c}),t.showLoadMore&&i>c.length&&Object(p.createElement)(y,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),r}(g.Component));function ne(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=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var oe=function(e){s()(r,e);var t=ne(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(m.Placeholder,{icon:t,label:r},Object(w.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.noReviewsPlaceholder,n=t.categoryIds,o=t.productId,c=t.reviewsOnPageLoad,i=t.showProductName,a=t.showReviewDate,s=t.showReviewerName,l=t.showReviewContent,u=t.showReviewImage,b=t.showReviewRating,d=Object(Z.d)(t.orderby),w=d.order,g=d.orderby;return!(l||b||a||s||u||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(Z.a)(t)},Object(p.createElement)(re,{attributes:t,categoryIds:n,delayFunction:function(e){return Object(f.debounce)(e,400)},noReviewsPlaceholder:r,orderby:g,order:w,productId:o,reviewsToDisplay:c}))}}]),r}(g.Component);t.a=oe},201:function(e,t){},202:function(e,t){},255:function(e,t){},256:function(e,t){},257:function(e,t){},258:function(e,t){},26:function(e,t){!function(){e.exports=this.wp.compose}()},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},4:function(e,t){!function(){e.exports=this.wp.components}()},43:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},44:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(15),o=r.n(n),c=r(37),i=r.n(c),a=function(){var e=i()(o.a.mark((function e(t){var r;return o.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(t){return e.apply(this,arguments)}}()},47:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},48:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(0),i=(r(2),r(9)),a=r(7),s=r.n(a);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 u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=r,d=null!=n;return!b&&d?(t=o||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),Object(c.createElement)(t,l,n)):(t=o||i.Fragment,b&&d&&r!==n?Object(c.createElement)(t,l,Object(c.createElement)("span",{"aria-hidden":"true"},r),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,l,r))}},49:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(47));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(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"===i?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")))}},5:function(e,t,r){"use strict";r.d(t,"l",(function(){return o})),r.d(t,"K",(function(){return c})),r.d(t,"Q",(function(){return i})),r.d(t,"A",(function(){return a})),r.d(t,"C",(function(){return s})),r.d(t,"m",(function(){return l})),r.d(t,"B",(function(){return u})),r.d(t,"E",(function(){return b})),r.d(t,"o",(function(){return d})),r.d(t,"D",(function(){return p})),r.d(t,"n",(function(){return w})),r.d(t,"G",(function(){return g})),r.d(t,"v",(function(){return f})),r.d(t,"y",(function(){return m})),r.d(t,"s",(function(){return v})),r.d(t,"t",(function(){return h})),r.d(t,"u",(function(){return O})),r.d(t,"k",(function(){return j})),r.d(t,"M",(function(){return y})),r.d(t,"R",(function(){return _})),r.d(t,"q",(function(){return k})),r.d(t,"r",(function(){return R})),r.d(t,"p",(function(){return E})),r.d(t,"J",(function(){return S})),r.d(t,"c",(function(){return P})),r.d(t,"w",(function(){return C})),r.d(t,"x",(function(){return N})),r.d(t,"U",(function(){return T})),r.d(t,"V",(function(){return L})),r.d(t,"L",(function(){return D})),r.d(t,"a",(function(){return I})),r.d(t,"O",(function(){return M})),r.d(t,"b",(function(){return A})),r.d(t,"N",(function(){return B})),r.d(t,"F",(function(){return H})),r.d(t,"i",(function(){return F})),r.d(t,"P",(function(){return z})),r.d(t,"h",(function(){return W})),r.d(t,"j",(function(){return G})),r.d(t,"I",(function(){return J})),r.d(t,"H",(function(){return K})),r.d(t,"T",(function(){return Q})),r.d(t,"S",(function(){return q})),r.d(t,"d",(function(){return Y})),r.d(t,"e",(function(){return X})),r.d(t,"f",(function(){return Z})),r.d(t,"g",(function(){return $})),r.d(t,"z",(function(){return ee})),r.d(t,"Y",(function(){return re})),r.d(t,"Z",(function(){return ne})),r.d(t,"W",(function(){return oe})),r.d(t,"X",(function(){return ce}));var n=r(3),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),l=Object(n.getSetting)("default_columns",3),u=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),d=Object(n.getSetting)("default_rows",3),p=Object(n.getSetting)("min_height",500),w=Object(n.getSetting)("default_height",500),g=Object(n.getSetting)("placeholderImgSrc",""),f=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),m=Object(n.getSetting)("limitTags"),v=Object(n.getSetting)("hasProducts",!0),h=Object(n.getSetting)("hasTags",!0),O=Object(n.getSetting)("homeUrl",""),j=Object(n.getSetting)("couponsEnabled",!0),y=Object(n.getSetting)("shippingEnabled",!0),_=Object(n.getSetting)("taxesEnabled",!0),k=Object(n.getSetting)("displayItemizedTaxes",!1),R=Object(n.getSetting)("hasDarkEditorStyleSupport",!1),E=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),S=Object(n.getSetting)("productCount",0),P=Object(n.getSetting)("attributes",[]),C=Object(n.getSetting)("isShippingCalculatorEnabled",!0),N=Object(n.getSetting)("isShippingCostHidden",!1),x=Object(n.getSetting)("woocommerceBlocksPhase",1),T=Object(n.getSetting)("wcBlocksAssetUrl",""),L=Object(n.getSetting)("wcBlocksBuildUrl",""),D=Object(n.getSetting)("shippingCountries",{}),I=Object(n.getSetting)("allowedCountries",{}),M=Object(n.getSetting)("shippingStates",{}),A=Object(n.getSetting)("allowedStates",{}),B=Object(n.getSetting)("shippingMethodsExist",!1),H=Object(n.getSetting)("paymentGatewaySortOrder",[]),F=Object(n.getSetting)("checkoutShowLoginReminder",!0),V={id:0,title:"",permalink:""},U=Object(n.getSetting)("storePages",{shop:V,cart:V,checkout:V,privacy:V,terms:V}),z=U.shop.permalink,W=U.checkout.id,G=U.checkout.permalink,J=U.privacy.permalink,K=U.privacy.title,Q=U.terms.permalink,q=U.terms.title,Y=U.cart.id,X=U.cart.permalink,Z=Object(n.getSetting)("checkoutAllowsGuest",!1),$=Object(n.getSetting)("checkoutAllowsSignup",!1),ee=Object(n.getSetting)("loginUrl","/wp-login.php"),te=r(17),re=function(e,t){if(x>2)return Object(te.registerBlockType)(e,t)},ne=function(e,t){if(x>1)return Object(te.registerBlockType)(e,t)},oe=function(){return x>2},ce=function(){return x>1}},6:function(e,t){!function(){e.exports=this.lodash}()},61:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(27),i=r.n(c),a=r(9);r(2);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,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},71:function(e,t,r){"use strict";r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return b}));var n=r(13),o=r.n(n),c=r(7),i=r.n(c),a=r(5),s=function(e){if(a.K){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=function(e){return o()({path:"/wc/store/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},u=function(e){var t=e.className,r=e.categoryIds,n=e.productId,o=e.showReviewDate,c=e.showReviewerName,a=e.showReviewContent,s=e.showProductName,l=e.showReviewImage,u=e.showReviewRating,b="wc-block-all-reviews";return n&&(b="wc-block-reviews-by-product"),Array.isArray(r)&&(b="wc-block-reviews-by-category"),i()(b,t,{"has-image":l,"has-name":c,"has-date":o,"has-rating":u,"has-content":a,"has-product-name":s})},b=function(e){var t=e.categoryIds,r=e.imageType,n=e.orderby,o=e.productId,c={"data-image-type":r,"data-orderby":n,"data-reviews-on-page-load":e.reviewsOnPageLoad,"data-reviews-on-load-more":e.reviewsOnLoadMore,"data-show-load-more":e.showLoadMore,"data-show-orderby":e.showOrderby};return o&&(c["data-product-id"]=o),Array.isArray(t)&&(c["data-category-ids"]=t.join(",")),c}},74:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(22),i=r.n(c),a=r(25),s=r.n(a),l=r(19),u=r.n(l),b=r(23),d=r.n(b),p=r(24),w=r.n(p),g=r(12),f=r.n(g),m=r(0),v=r(6),h=r(7),O=r.n(h),j=r(4),y=r(26);r(122);function _(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=f()(e);if(t){var o=f()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return w()(this,r)}}var k=function(e){d()(r,e);var t=_(r);function r(){var e;return i()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(u()(e)),e}return s()(r,[{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,c=r.checked,i=r.instanceId,a=r.className,s=r.help,l=r.options,u=r.value,b="inspector-toggle-button-control-".concat(i);return s&&(e=Object(v.isFunction)(s)?s(c):s),Object(m.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",a)},Object(m.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(m.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isDefault=!0,c["aria-pressed"]=!1),Object(m.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)}))))}}]),r}(m.Component);t.a=Object(y.withInstanceId)(k)},828:function(e,t,r){e.exports=r(913)},9:function(e,t){!function(){e.exports=this.React}()},913:function(e,t,r){"use strict";r.r(t);var n=r(8),o=r.n(n),c=r(0),i=r(1),a=r(17),s=r(61),l=r(57),u=Object(c.createElement)(l.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M15 4v7H5.17l-.59.59-.58.58V4h11m1-2H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm5 4h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1z"})),b=(r(201),r(14)),d=r(4),p=(r(2),r(188)),w=function(){return Object(c.createElement)(d.Placeholder,{className:"wc-block-all-reviews",icon:Object(c.createElement)(s.a,{srcElement:u,className:"block-editor-block-icon"}),label:Object(i.__)("All Reviews","woo-gutenberg-products-block")},Object(i.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"))},g=r(137),f=function(e){var t=e.attributes,r=e.setAttributes;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(b.InspectorControls,{key:"inspector"},Object(c.createElement)(d.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(d.ToggleControl,{label:Object(i.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return r({showProductName:!t.showProductName})}}),Object(g.b)(t,r)),Object(c.createElement)(d.PanelBody,{title:Object(i.__)("List Settings","woo-gutenberg-products-block")},Object(g.c)(t,r))),Object(c.createElement)(p.a,{attributes:t,icon:Object(c.createElement)(s.a,{icon:u,className:"block-editor-block-icon"}),name:Object(i.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))},m=r(182),v=r(183),h=r(157);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 j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(a.registerBlockType)("woocommerce/all-reviews",{title:Object(i.__)("All Reviews","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(s.a,{srcElement:u}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Show a list of all product reviews.","woo-gutenberg-products-block"),supports:{html:!1},example:j(j({},h.a),{},{attributes:j(j({},h.a.attributes),{},{showProductName:!0})}),attributes:j(j({},m.a),{},{showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(f,e)},save:v.a})},93:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(61)),i=r(144),a=r(7),s=r.n(a),l=r(4),u=r(49);r(147);t.a=function(e){var t=e.className,r=e.error,a=e.isLoading,b=e.onRetry;return Object(n.createElement)(l.Placeholder,{icon:Object(n.createElement)(c.a,{srcElement:i.a}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:s()("wc-block-api-error",t)},Object(n.createElement)(u.a,{error:r}),b&&Object(n.createElement)(n.Fragment,null,a?Object(n.createElement)(l.Spinner,null):Object(n.createElement)(l.Button,{isDefault:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}}});
build/atomic-block-components/add-to-cart-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{112:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(6),a=r.n(n),c=r(7);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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(c.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,c=t.id,o=t.callback,l=t.priority,d=new Map(e[n]);switch(r){case i:return d.set(c,{priority:l,callback:o}),s(s({},e),{},a()({},n,d));case u:return d.delete(c),s(s({},e),{},a()({},n,d))}return e}},147:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(58),a=(r(4),r(150),function(e){var t=e.errorMessage,r=void 0===t?"":t,a=e.propertyName,c=void 0===a?"":a,o=e.elementId,s=void 0===o?"":o,i=Object(n.b)(),u=i.getValidationError,l=i.getValidationErrorId;if(!r){var d=u(c)||{};if(!d.message||d.hidden)return null;r=d.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(s)},r))})},150:function(e,t){},151:function(e,t){},180:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},194:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},a={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},o=function(e){return n(e,a.SUCCESS)},s=function(e){return n(e,a.ERROR)},i=function(e){return n(e,a.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:a,noticeContexts:c,shouldRetry:u,isSuccessResponse:o,isErrorResponse:s,isFailResponse:i}}},195:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(112),a=function(e,t){return function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=n.a.addEventCallback(e,r,a);return t(c),function(){t(n.a.removeEventCallback(e,c.id))}}}},196:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p}));var n=r(23),a=r.n(n),c=r(24),o=r.n(c),s=r(51),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw c}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=[],i=u(c),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:p=e.sent,"object"===o()(p)&&s.push(p),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),p=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=u(c),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===o()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},277:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return o}));var n=window.Event||null,a=function(e,t){var r=t.bubbles,a=void 0!==r&&r,c=t.cancelable,o=void 0!==c&&c,s=t.element;if(s||(s=document.body),"function"==typeof n){var i=new n(e,{bubbles:a,cancelable:o});s.dispatchEvent(i)}else{var u=document.createEvent("Event");u.initEvent(e,a,o),s.dispatchEvent(u)}},c=function(){a("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=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(){a(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},278:function(e,t,r){"use strict";var n=r(50),a=React.createElement(n.a,{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},282:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(180);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},289:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(9),a=r.n(n),c=r(0),o=r(13),s=r(81),i=r(15),u=r(17),l=r(80),d=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},f=function(e){var t=Object(o.useDispatch)(i.CART_STORE_KEY).addItemToCart,r=Object(s.a)(),n=r.cartItems,f=r.cartIsLoading,p=Object(l.a)(),b=p.addErrorNotice,m=p.removeNotice,v=Object(c.useState)(!1),h=a()(v,2),g=h[0],y=h[1],O=Object(c.useRef)(d(n,e));return Object(c.useEffect)((function(){var t=d(n,e);t!==O.current&&(O.current=t)}),[n,e]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:g,cartIsLoading:f,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;y(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){b(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){y(!1)}))}}}},295:function(e,t){},296:function(e,t){},305:function(e,t,r){"use strict";r.r(t);var n=r(26),a=r(282),c=(r(4),r(5)),o=r.n(c),s=r(58),i=r(9),u=r.n(i),l=r(0),d=r(1),f=r(37),p=r(80),b=r(194),m=function(e){return e.is_purchasable||!1},v="pristine",h="idle",g="disabled",y="processing",O="before_processing",j="after_processing",E={status:v,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},w="set_pristine",P="set_idle",k="set_disabled",_="set_processing",R="set_before_processing",C="set_after_processing",S="set_processing_response",A="set_has_error",x="set_no_error",T="set_quantity",I="set_request_params",D=w,N=P,q=k,V=_,F=R,Q=C,W=S,B=A,L=x,M=T,H=I,Y=function(){return{type:D}},J=function(){return{type:N}},K=function(){return{type:q}},U=function(){return{type:V}},z=function(){return{type:F}},G=function(){return{type:Q}},X=function(e){return{type:W,data:e}},$=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?B:L;return{type:t}},Z=function(e){return{type:M,quantity:e}},ee=function(e){return{type:H,data:e}},te=r(6),re=r.n(te);function ne(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 ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ce=w,oe=P,se=k,ie=_,ue=R,le=C,de=S,fe=A,pe=x,be=T,me=I,ve=v,he=h,ge=g,ye=y,Oe=O,je=j,Ee=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,a=r.type,c=r.data;switch(a){case ce:e=E;break;case oe:e=t.status!==he?ae(ae({},t),{},{status:he}):t;break;case se:e=t.status!==ge?ae(ae({},t),{},{status:ge}):t;break;case be:e=n!==t.quantity?ae(ae({},t),{},{quantity:n}):t;break;case me:e=ae(ae({},t),{},{requestParams:ae(ae({},t.requestParams),c)});break;case de:e=ae(ae({},t),{},{processingResponse:c});break;case ie:e=!1===(e=t.status!==ye?ae(ae({},t),{},{status:ye,hasError:!1}):t).hasError?e:ae(ae({},e),{},{hasError:!1});break;case ue:e=t.status!==Oe?ae(ae({},t),{},{status:Oe,hasError:!1}):t;break;case le:e=t.status!==je?ae(ae({},t),{},{status:je}):t;break;case fe:e=t.hasError?t:ae(ae({},t),{},{hasError:!0}),e=t.status===ye||t.status===Oe?ae(ae({},e),{},{status:he}):e;break;case pe:e=t.hasError?ae(ae({},t),{},{hasError:!1}):t}return e!==t&&a!==ce&&e.status===ve&&(e.status=he),e},we=r(112),Pe=r(195),ke="add_to_cart_before_processing",_e="add_to_cart_after_processing_with_success",Re="add_to_cart_after_processing_with_error",Ce=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Pe.a)(_e,e),onAddToCartProcessingWithError:Object(Pe.a)(Re,e),onAddToCartBeforeProcessing:Object(Pe.a)(ke,e)}},Se=r(196),Ae=Object(l.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){}}}),xe=function(){return Object(l.useContext)(Ae)},Te=function(e){var t=e.children,r=e.product,n=e.showFormElements,a=Object(l.useReducer)(Ee,E),c=u()(a,2),o=c[0],i=c[1],v=Object(l.useReducer)(we.b,{}),w=u()(v,2),P=w[0],k=w[1],_=Object(f.a)(P),R=Object(p.a)(),C=R.addErrorNotice,S=R.removeNotices,A=Object(s.b)().setValidationErrors,x=Object(b.a)(),T=x.isSuccessResponse,I=x.isErrorResponse,D=x.isFailResponse,N=Object(l.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Ce(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Ce(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Ce(k).onAddToCartBeforeProcessing}}),[k]),q=Object(l.useMemo)((function(){return{resetForm:function(){i(Y())},submitForm:function(){i(z())},setQuantity:function(e){i(Z(e))},setHasError:function(e){i($(e))},setRequestParams:function(e){i(ee(e))},setAfterProcessing:function(e){i(X(e)),i(G())}}}),[]);Object(l.useEffect)((function(){var e=o.status,t=!r.id||!m(r);e!==g||t?e!==g&&t&&i(K()):i(J())}),[o.status,r,i]),Object(l.useEffect)((function(){o.status===O&&(S("error"),Object(Se.a)(_,ke,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&C(t),r&&A(r)})),i(J())):i(U())})))}),[o.status,A,C,S,i,_]),Object(l.useEffect)((function(){if(o.status===j){var e={processingResponse:o.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;C(e.message,t)}};if(o.hasError)return void Object(Se.b)(_,Re,e).then((function(r){if(I(r)||D(r))t(r);else{var n,a=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(d.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");C(a,{id:"add-to-cart"})}i(J())}));Object(Se.b)(_,_e,e).then((function(e){I(e)||D(e)?(t(e),i($(!0))):i(J())}))}}),[o.status,o.hasError,o.processingResponse,q,C,I,D,T,_]);var V=function(e){return["simple","variable"].includes(e.type||"simple")}(r),F={product:r,productType:r.type||"simple",productIsPurchasable:m(r),productHasOptions:r.has_options||!1,supportsFormElements:V,showFormElements:n&&V,quantity:o.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:o.requestParams,isIdle:o.status===h,isDisabled:o.status===g,isProcessing:o.status===y,isBeforeProcessing:o.status===O,isAfterProcessing:o.status===j,hasError:o.hasError,eventRegistration:N,dispatchActions:q};return React.createElement(Ae.Provider,{value:F},t)},Ie=r(57),De=r.n(Ie),Ne=r(81),qe=r(17),Ve=r(277);function Fe(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 Qe=function(){var e=xe(),t=e.dispatchActions,r=e.product,n=e.quantity,a=e.eventRegistration,c=e.hasError,o=e.isProcessing,i=e.requestParams,f=Object(s.b)(),b=f.hasValidationErrors,m=f.showAllValidationErrors,v=Object(p.a)(),h=v.addErrorNotice,g=v.removeNotice,y=Object(Ne.a)().receiveCart,O=Object(l.useState)(!1),j=u()(O,2),E=j[0],w=j[1],P=!c&&o,k=Object(l.useCallback)((function(){return!b||(m(),{type:"error"})}),[b,m]);Object(l.useEffect)((function(){var e=a.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[a,k]);var _=Object(l.useCallback)((function(){w(!0),g("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:n},i);De()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){De.a.setNonce(e.headers),e.json().then((function(r){e.ok?y(r):(r.body&&r.body.message?h(Object(qe.decodeEntities)(r.body.message),{id:"add-to-cart"}):h(Object(d.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Ve.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&y(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,h,g,y,t,n,i]);return Object(l.useEffect)((function(){P&&!E&&_()}),[P,_,E]),null},We=function(e){var t=e.children,r=e.product,n=e.showFormElements;return React.createElement(s.a,null,React.createElement(Te,{product:r,showFormElements:n},t,React.createElement(Qe,null)))},Be=r(69),Le=r(7),Me=r(191),He=(r(295),r(74)),Ye=r(126),Je=r(278),Ke=r(289),Ue=function(e){var t=e.className,r=e.href,n=e.text;return React.createElement(He.a,{className:t,href:r,rel:"nofollow"},n)},ze=function(e){var t=e.className,r=e.quantityInCart,n=e.isProcessing,a=e.isDisabled,c=e.isDone,o=e.onClick;return React.createElement(He.a,{className:t,disabled:a,showSpinner:n,onClick:o},c&&r>0?Object(d.sprintf)(Object(d._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(d.__)("Add to cart","woo-gutenberg-products-block"),!!c&&React.createElement(Ye.a,{srcElement:Je.a,alt:Object(d.__)("Done","woo-gutenberg-products-block")}))},Ge=function(){var e=xe(),t=e.showFormElements,r=e.productIsPurchasable,n=e.productHasOptions,a=e.product,c=e.productType,o=e.isDisabled,s=e.isProcessing,i=e.eventRegistration,f=e.hasError,p=e.dispatchActions,b=Object(Ke.a)(a.id||0).cartQuantity,m=Object(l.useState)(!1),v=u()(m,2),h=v[0],g=v[1],y=a.add_to_cart||{url:"",text:""};return Object(l.useEffect)((function(){var e=i.onAddToCartAfterProcessingWithSuccess((function(){return f||g(!0),!0}),0);return function(){e()}}),[i,f]),(t||!n&&"simple"===c)&&r?React.createElement(ze,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:b,isDisabled:o,isProcessing:s,isDone:h,onClick:function(){return p.submitForm()}}):React.createElement(Ue,{className:"wc-block-components-product-add-to-cart-button",href:y.url,text:y.text||Object(d.__)("View Product","woo-gutenberg-products-block")})},Xe=function(e){var t=e.disabled,r=e.min,n=e.max,a=e.value,c=e.onChange;return React.createElement("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:a,min:r,max:n,hidden:1===n,disabled:t,onChange:function(e){c(e.target.value)}})},$e=function(e){var t=e.reason,r=void 0===t?Object(d.__)("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)},Ze=function(){var e=xe(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement($e,null):t.id&&!t.is_in_stock?React.createElement($e,{reason:Object(d.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Xe,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(Ge,null))},et=(r(296),r(42)),tt=r.n(et),rt=r(193),nt=r(3),at=r(147),ct={value:"",label:Object(d.__)("Select an option","woo-gutenberg-products-block")},ot=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,a=e.value,c=void 0===a?"":a,i=e.onChange,u=void 0===i?function(){}:i,l=e.errorMessage,f=void 0===l?Object(d.__)("Please select a value.","woo-gutenberg-products-block"):l,p=Object(s.b)(),b=p.getValidationError,m=p.setValidationErrors,v=p.clearValidationError,h=t,g=b(h)||{};return Object(nt.useEffect)((function(){c?v(h):m(re()({},h,{message:f,hidden:!0}))}),[c,h,f,v,m]),Object(nt.useEffect)((function(){return function(){v(h)}}),[h,v]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},React.createElement(rt.SelectControl,{label:Object(qe.decodeEntities)(t),value:c||"",options:[ct].concat(tt()(n)),onChange:u,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":g.message&&!g.hidden})}),React.createElement(at.a,{propertyName:h,elementId:h}))};function st(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 it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?st(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ut=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var a=Object.keys(e);return n.filter((function(e){return a.every((function(n){var a=r[n]||"",c=t["id:"+e].attributes[n];return""===a||(null===c||c===a)}))}))},lt=function(e,t,r){var n={},a=Object.keys(e),c=Object.values(r).filter(Boolean).length>0;return a.forEach((function(a){var o=e[a],s=it(it({},r),{},re()({},a,null)),i=c?ut(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[a]})):null;n[a]=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(qe.decodeEntities)(r)}:null})).filter(Boolean)}(o.terms,u)})),n};function dt(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 ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pt=function(e){var t=e.attributes,r=e.variationAttributes,n=e.setRequestParams,a=Object(f.a)(t),c=Object(f.a)(r),o=Object(l.useState)(0),s=u()(o,2),i=s[0],d=s[1],p=Object(l.useState)({}),b=u()(p,2),m=b[0],v=b[1],h=Object(l.useMemo)((function(){return lt(a,c,m)}),[m,a,c]);return Object(l.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(a).length?d(function(e,t,r){return ut(e,t,r)[0]||0}(a,c,m)):i>0&&d(0)}),[m,i,a,c]),Object(l.useEffect)((function(){n({id:i,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[n,i,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(a).map((function(e){return React.createElement(ot,{key:e,attributeName:e,options:h[e],value:m[e],onChange:function(t){v(ft(ft({},m),{},re()({},e,t)))}})})))},bt=function(e){var t=e.product,r=e.dispatchers,n=function(e){return e?Object(Le.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),a=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===a.length?null:React.createElement(pt,{attributes:n,variationAttributes:a,setRequestParams:r.setRequestParams})},mt=function(){var e=xe(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement($e,null):t.id&&!t.is_in_stock?React.createElement($e,{reason:Object(d.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(bt,{product:t,dispatchers:c}),React.createElement(Xe,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(Ge,null))},vt=function(){return React.createElement(Ge,null)},ht=function(){return React.createElement(rt.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},gt=function(){return React.createElement(ht,null)},yt=function(){var e=xe(),t=e.showFormElements,r=e.productType;return t?"variable"===r?React.createElement(mt,null):"grouped"===r?React.createElement(gt,null):"external"===r?React.createElement(vt,null):"simple"===r||"variation"===r?React.createElement(Ze,null):null:React.createElement(Ge,null)},Ot=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,n=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Le.isEmpty)(n)});return React.createElement(We,{product:n,showFormElements:r},React.createElement("div",{className:a},React.createElement(yt,null)))})),jt={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}};t.default=Object(n.compose)(Object(a.a)(jt))(Ot)},37:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),a=r(36),c=r.n(a),o=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},42:function(e,t,r){var n=r(91),a=r(92),c=r(54),o=r(93);e.exports=function(e){return n(e)||a(e)||c(e)||o()}},51:function(e,t){function r(e,t,r,n,a,c,o){try{var s=e[c](o),i=s.value}catch(e){return void r(e)}s.done?t(i):Promise.resolve(i).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,c){var o=e.apply(t,n);function s(e){r(o,a,c,s,i,"next",e)}function i(e){r(o,a,c,s,i,"throw",e)}s(void 0)}))}}},58:function(e,t,r){"use strict";r.d(t,"b",(function(){return b})),r.d(t,"a",(function(){return m}));var n=r(6),a=r.n(n),c=r(9),o=r.n(c),s=r(0),i=r(7),u=r(36),l=r.n(u);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 f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=Object(s.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),b=function(){return Object(s.useContext)(p)},m=function(e){var t=e.children,r=Object(s.useState)({}),n=o()(r,2),c=n[0],u=n[1],d=Object(s.useCallback)((function(e){return c[e]}),[c]),b=Object(s.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),m=Object(s.useCallback)((function(e){u((function(t){return t[e]?Object(i.omit)(t,[e]):t}))}),[]),v=Object(s.useCallback)((function(){u({})}),[]),h=Object(s.useCallback)((function(e){e&&u((function(t){return e=Object(i.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:f(f({},t),e)}))}),[]),g=Object(s.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=f(f({},r[e]),t);return l()(r[e],n)?r:f(f({},r),{},a()({},e,n))}))}),[]),y={getValidationError:d,setValidationErrors:h,clearValidationError:m,clearAllValidationErrors:v,hideValidationError:Object(s.useCallback)((function(e){g(e,{hidden:!0})}),[g]),showValidationError:Object(s.useCallback)((function(e){g(e,{hidden:!1})}),[g]),showAllValidationErrors:Object(s.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=f(f({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:f(f({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:b};return React.createElement(p.Provider,{value:y},t)}},74:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(14),o=r.n(c),s=r(76),i=(r(4),r(5)),u=r.n(i);r(151);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,c=e.children,i=o()(e,["className","showSpinner","children"]),l=u()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return React.createElement(s.a,a()({className:l},i),n&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},c))}},81:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(15),a=r(13),c=r(117),o=r(17),s=r(7),i={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(c.a)(),r=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},d=e.shouldSelect,f=Object(a.useSelect)((function(e,t){var a=t.dispatch;if(!d)return i;if(r)return{cartCoupons:l.coupons,cartItems:l.items,cartItemsCount:l.items_count,cartItemsWeight:l.items_weight,cartNeedsPayment:l.needs_payment,cartNeedsShipping:l.needs_shipping,cartItemErrors:[],cartTotals:l.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:l.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==l?void 0:l.receiveCart)?l.receiveCart:function(){}};var c=e(n.CART_STORE_KEY),u=c.getCartData(),f=c.getCartErrors(),p=c.getCartTotals(),b=!c.hasFinishedResolution("getCartData"),m=c.areShippingRatesLoading(),v=a(n.CART_STORE_KEY).receiveCart,h=Object(s.mapValues)(u.shippingAddress,(function(e){return Object(o.decodeEntities)(e)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:p,cartIsLoading:b,cartErrors:f,shippingAddress:h,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!h.country,receiveCart:v}}),[d]);return f}},91:function(e,t,r){var n=r(55);e.exports=function(e){if(Array.isArray(e))return n(e)}},92:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},93: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.")}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{113:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(6),a=r.n(n),c=r(7);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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(c.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,c=t.id,o=t.callback,l=t.priority,d=new Map(e[n]);switch(r){case i:return d.set(c,{priority:l,callback:o}),s(s({},e),{},a()({},n,d));case u:return d.delete(c),s(s({},e),{},a()({},n,d))}return e}},148:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(58),a=(r(4),r(151),function(e){var t=e.errorMessage,r=void 0===t?"":t,a=e.propertyName,c=void 0===a?"":a,o=e.elementId,s=void 0===o?"":o,i=Object(n.b)(),u=i.getValidationError,l=i.getValidationErrorId;if(!r){var d=u(c)||{};if(!d.message||d.hidden)return null;r=d.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(s)},r))})},151:function(e,t){},152:function(e,t){},181:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},194:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},a={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},o=function(e){return n(e,a.SUCCESS)},s=function(e){return n(e,a.ERROR)},i=function(e){return n(e,a.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:a,noticeContexts:c,shouldRetry:u,isSuccessResponse:o,isErrorResponse:s,isFailResponse:i}}},195:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(113),a=function(e,t){return function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=n.a.addEventCallback(e,r,a);return t(c),function(){t(n.a.removeEventCallback(e,c.id))}}}},196:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p}));var n=r(23),a=r.n(n),c=r(25),o=r.n(c),s=r(51),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw c}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=[],i=u(c),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:p=e.sent,"object"===o()(p)&&s.push(p),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),p=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=u(c),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===o()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},277:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return o}));var n=window.Event||null,a=function(e,t){var r=t.bubbles,a=void 0!==r&&r,c=t.cancelable,o=void 0!==c&&c,s=t.element;if(s||(s=document.body),"function"==typeof n){var i=new n(e,{bubbles:a,cancelable:o});s.dispatchEvent(i)}else{var u=document.createEvent("Event");u.initEvent(e,a,o),s.dispatchEvent(u)}},c=function(){a("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=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(){a(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},278:function(e,t,r){"use strict";var n=r(50),a=React.createElement(n.a,{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},282:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(181);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},289:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(10),a=r.n(n),c=r(0),o=r(12),s=r(81),i=r(15),u=r(17),l=r(80),d=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},f=function(e){var t=Object(o.useDispatch)(i.CART_STORE_KEY).addItemToCart,r=Object(s.a)(),n=r.cartItems,f=r.cartIsLoading,p=Object(l.a)(),b=p.addErrorNotice,m=p.removeNotice,v=Object(c.useState)(!1),h=a()(v,2),g=h[0],y=h[1],O=Object(c.useRef)(d(n,e));return Object(c.useEffect)((function(){var t=d(n,e);t!==O.current&&(O.current=t)}),[n,e]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:g,cartIsLoading:f,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;y(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){b(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){y(!1)}))}}}},295:function(e,t){},296:function(e,t){},305:function(e,t,r){"use strict";r.r(t);var n=r(28),a=r(282),c=(r(4),r(5)),o=r.n(c),s=r(58),i=r(10),u=r.n(i),l=r(0),d=r(1),f=r(36),p=r(80),b=r(194),m=function(e){return e.is_purchasable||!1},v="pristine",h="idle",g="disabled",y="processing",O="before_processing",j="after_processing",E={status:v,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},w="set_pristine",P="set_idle",k="set_disabled",_="set_processing",R="set_before_processing",C="set_after_processing",S="set_processing_response",A="set_has_error",x="set_no_error",T="set_quantity",I="set_request_params",D=w,N=P,q=k,V=_,F=R,Q=C,W=S,B=A,L=x,M=T,H=I,Y=function(){return{type:D}},J=function(){return{type:N}},K=function(){return{type:q}},U=function(){return{type:V}},z=function(){return{type:F}},G=function(){return{type:Q}},X=function(e){return{type:W,data:e}},$=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?B:L;return{type:t}},Z=function(e){return{type:M,quantity:e}},ee=function(e){return{type:H,data:e}},te=r(6),re=r.n(te);function ne(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 ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ce=w,oe=P,se=k,ie=_,ue=R,le=C,de=S,fe=A,pe=x,be=T,me=I,ve=v,he=h,ge=g,ye=y,Oe=O,je=j,Ee=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,a=r.type,c=r.data;switch(a){case ce:e=E;break;case oe:e=t.status!==he?ae(ae({},t),{},{status:he}):t;break;case se:e=t.status!==ge?ae(ae({},t),{},{status:ge}):t;break;case be:e=n!==t.quantity?ae(ae({},t),{},{quantity:n}):t;break;case me:e=ae(ae({},t),{},{requestParams:ae(ae({},t.requestParams),c)});break;case de:e=ae(ae({},t),{},{processingResponse:c});break;case ie:e=!1===(e=t.status!==ye?ae(ae({},t),{},{status:ye,hasError:!1}):t).hasError?e:ae(ae({},e),{},{hasError:!1});break;case ue:e=t.status!==Oe?ae(ae({},t),{},{status:Oe,hasError:!1}):t;break;case le:e=t.status!==je?ae(ae({},t),{},{status:je}):t;break;case fe:e=t.hasError?t:ae(ae({},t),{},{hasError:!0}),e=t.status===ye||t.status===Oe?ae(ae({},e),{},{status:he}):e;break;case pe:e=t.hasError?ae(ae({},t),{},{hasError:!1}):t}return e!==t&&a!==ce&&e.status===ve&&(e.status=he),e},we=r(113),Pe=r(195),ke="add_to_cart_before_processing",_e="add_to_cart_after_processing_with_success",Re="add_to_cart_after_processing_with_error",Ce=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Pe.a)(_e,e),onAddToCartProcessingWithError:Object(Pe.a)(Re,e),onAddToCartBeforeProcessing:Object(Pe.a)(ke,e)}},Se=r(196),Ae=Object(l.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){}}}),xe=function(){return Object(l.useContext)(Ae)},Te=function(e){var t=e.children,r=e.product,n=e.showFormElements,a=Object(l.useReducer)(Ee,E),c=u()(a,2),o=c[0],i=c[1],v=Object(l.useReducer)(we.b,{}),w=u()(v,2),P=w[0],k=w[1],_=Object(f.a)(P),R=Object(p.a)(),C=R.addErrorNotice,S=R.removeNotices,A=Object(s.b)().setValidationErrors,x=Object(b.a)(),T=x.isSuccessResponse,I=x.isErrorResponse,D=x.isFailResponse,N=Object(l.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Ce(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Ce(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Ce(k).onAddToCartBeforeProcessing}}),[k]),q=Object(l.useMemo)((function(){return{resetForm:function(){i(Y())},submitForm:function(){i(z())},setQuantity:function(e){i(Z(e))},setHasError:function(e){i($(e))},setRequestParams:function(e){i(ee(e))},setAfterProcessing:function(e){i(X(e)),i(G())}}}),[]);Object(l.useEffect)((function(){var e=o.status,t=!r.id||!m(r);e!==g||t?e!==g&&t&&i(K()):i(J())}),[o.status,r,i]),Object(l.useEffect)((function(){o.status===O&&(S("error"),Object(Se.a)(_,ke,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&C(t),r&&A(r)})),i(J())):i(U())})))}),[o.status,A,C,S,i,_]),Object(l.useEffect)((function(){if(o.status===j){var e={processingResponse:o.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;C(e.message,t)}};if(o.hasError)return void Object(Se.b)(_,Re,e).then((function(r){if(I(r)||D(r))t(r);else{var n,a=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(d.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");C(a,{id:"add-to-cart"})}i(J())}));Object(Se.b)(_,_e,e).then((function(e){I(e)||D(e)?(t(e),i($(!0))):i(J())}))}}),[o.status,o.hasError,o.processingResponse,q,C,I,D,T,_]);var V=function(e){return["simple","variable"].includes(e.type||"simple")}(r),F={product:r,productType:r.type||"simple",productIsPurchasable:m(r),productHasOptions:r.has_options||!1,supportsFormElements:V,showFormElements:n&&V,quantity:o.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:o.requestParams,isIdle:o.status===h,isDisabled:o.status===g,isProcessing:o.status===y,isBeforeProcessing:o.status===O,isAfterProcessing:o.status===j,hasError:o.hasError,eventRegistration:N,dispatchActions:q};return React.createElement(Ae.Provider,{value:F},t)},Ie=r(57),De=r.n(Ie),Ne=r(81),qe=r(17),Ve=r(277);function Fe(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 Qe=function(){var e=xe(),t=e.dispatchActions,r=e.product,n=e.quantity,a=e.eventRegistration,c=e.hasError,o=e.isProcessing,i=e.requestParams,f=Object(s.b)(),b=f.hasValidationErrors,m=f.showAllValidationErrors,v=Object(p.a)(),h=v.addErrorNotice,g=v.removeNotice,y=Object(Ne.a)().receiveCart,O=Object(l.useState)(!1),j=u()(O,2),E=j[0],w=j[1],P=!c&&o,k=Object(l.useCallback)((function(){return!b||(m(),{type:"error"})}),[b,m]);Object(l.useEffect)((function(){var e=a.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[a,k]);var _=Object(l.useCallback)((function(){w(!0),g("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:n},i);De()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){De.a.setNonce(e.headers),e.json().then((function(r){e.ok?y(r):(r.body&&r.body.message?h(Object(qe.decodeEntities)(r.body.message),{id:"add-to-cart"}):h(Object(d.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Ve.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&y(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,h,g,y,t,n,i]);return Object(l.useEffect)((function(){P&&!E&&_()}),[P,_,E]),null},We=function(e){var t=e.children,r=e.product,n=e.showFormElements;return React.createElement(s.a,null,React.createElement(Te,{product:r,showFormElements:n},t,React.createElement(Qe,null)))},Be=r(69),Le=r(7),Me=r(191),He=(r(295),r(74)),Ye=r(127),Je=r(278),Ke=r(289),Ue=function(e){var t=e.className,r=e.href,n=e.text;return React.createElement(He.a,{className:t,href:r,rel:"nofollow"},n)},ze=function(e){var t=e.className,r=e.quantityInCart,n=e.isProcessing,a=e.isDisabled,c=e.isDone,o=e.onClick;return React.createElement(He.a,{className:t,disabled:a,showSpinner:n,onClick:o},c&&r>0?Object(d.sprintf)(Object(d._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(d.__)("Add to cart","woo-gutenberg-products-block"),!!c&&React.createElement(Ye.a,{srcElement:Je.a,alt:Object(d.__)("Done","woo-gutenberg-products-block")}))},Ge=function(){var e=xe(),t=e.showFormElements,r=e.productIsPurchasable,n=e.productHasOptions,a=e.product,c=e.productType,o=e.isDisabled,s=e.isProcessing,i=e.eventRegistration,f=e.hasError,p=e.dispatchActions,b=Object(Ke.a)(a.id||0).cartQuantity,m=Object(l.useState)(!1),v=u()(m,2),h=v[0],g=v[1],y=a.add_to_cart||{url:"",text:""};return Object(l.useEffect)((function(){var e=i.onAddToCartAfterProcessingWithSuccess((function(){return f||g(!0),!0}),0);return function(){e()}}),[i,f]),(t||!n&&"simple"===c)&&r?React.createElement(ze,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:b,isDisabled:o,isProcessing:s,isDone:h,onClick:function(){return p.submitForm()}}):React.createElement(Ue,{className:"wc-block-components-product-add-to-cart-button",href:y.url,text:y.text||Object(d.__)("View Product","woo-gutenberg-products-block")})},Xe=function(e){var t=e.disabled,r=e.min,n=e.max,a=e.value,c=e.onChange;return React.createElement("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:a,min:r,max:n,hidden:1===n,disabled:t,onChange:function(e){c(e.target.value)}})},$e=function(e){var t=e.reason,r=void 0===t?Object(d.__)("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)},Ze=function(){var e=xe(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement($e,null):t.id&&!t.is_in_stock?React.createElement($e,{reason:Object(d.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Xe,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(Ge,null))},et=(r(296),r(42)),tt=r.n(et),rt=r(193),nt=r(2),at=r(148),ct={value:"",label:Object(d.__)("Select an option","woo-gutenberg-products-block")},ot=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,a=e.value,c=void 0===a?"":a,i=e.onChange,u=void 0===i?function(){}:i,l=e.errorMessage,f=void 0===l?Object(d.__)("Please select a value.","woo-gutenberg-products-block"):l,p=Object(s.b)(),b=p.getValidationError,m=p.setValidationErrors,v=p.clearValidationError,h=t,g=b(h)||{};return Object(nt.useEffect)((function(){c?v(h):m(re()({},h,{message:f,hidden:!0}))}),[c,h,f,v,m]),Object(nt.useEffect)((function(){return function(){v(h)}}),[h,v]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},React.createElement(rt.SelectControl,{label:Object(qe.decodeEntities)(t),value:c||"",options:[ct].concat(tt()(n)),onChange:u,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":g.message&&!g.hidden})}),React.createElement(at.a,{propertyName:h,elementId:h}))};function st(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 it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?st(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ut=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var a=Object.keys(e);return n.filter((function(e){return a.every((function(n){var a=r[n]||"",c=t["id:"+e].attributes[n];return""===a||(null===c||c===a)}))}))},lt=function(e,t,r){var n={},a=Object.keys(e),c=Object.values(r).filter(Boolean).length>0;return a.forEach((function(a){var o=e[a],s=it(it({},r),{},re()({},a,null)),i=c?ut(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[a]})):null;n[a]=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(qe.decodeEntities)(r)}:null})).filter(Boolean)}(o.terms,u)})),n};function dt(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 ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pt=function(e){var t=e.attributes,r=e.variationAttributes,n=e.setRequestParams,a=Object(f.a)(t),c=Object(f.a)(r),o=Object(l.useState)(0),s=u()(o,2),i=s[0],d=s[1],p=Object(l.useState)({}),b=u()(p,2),m=b[0],v=b[1],h=Object(l.useMemo)((function(){return lt(a,c,m)}),[m,a,c]);return Object(l.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(a).length?d(function(e,t,r){return ut(e,t,r)[0]||0}(a,c,m)):i>0&&d(0)}),[m,i,a,c]),Object(l.useEffect)((function(){n({id:i,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[n,i,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(a).map((function(e){return React.createElement(ot,{key:e,attributeName:e,options:h[e],value:m[e],onChange:function(t){v(ft(ft({},m),{},re()({},e,t)))}})})))},bt=function(e){var t=e.product,r=e.dispatchers,n=function(e){return e?Object(Le.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),a=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===a.length?null:React.createElement(pt,{attributes:n,variationAttributes:a,setRequestParams:r.setRequestParams})},mt=function(){var e=xe(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement($e,null):t.id&&!t.is_in_stock?React.createElement($e,{reason:Object(d.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(bt,{product:t,dispatchers:c}),React.createElement(Xe,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(Ge,null))},vt=function(){return React.createElement(Ge,null)},ht=function(){return React.createElement(rt.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},gt=function(){return React.createElement(ht,null)},yt=function(){var e=xe(),t=e.showFormElements,r=e.productType;return t?"variable"===r?React.createElement(mt,null):"grouped"===r?React.createElement(gt,null):"external"===r?React.createElement(vt,null):"simple"===r||"variation"===r?React.createElement(Ze,null):null:React.createElement(Ge,null)},Ot=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,n=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Le.isEmpty)(n)});return React.createElement(We,{product:n,showFormElements:r},React.createElement("div",{className:a},React.createElement(yt,null)))})),jt={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}};t.default=Object(n.compose)(Object(a.a)(jt))(Ot)},36:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),a=r(27),c=r.n(a),o=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},42:function(e,t,r){var n=r(91),a=r(92),c=r(54),o=r(93);e.exports=function(e){return n(e)||a(e)||c(e)||o()}},51:function(e,t){function r(e,t,r,n,a,c,o){try{var s=e[c](o),i=s.value}catch(e){return void r(e)}s.done?t(i):Promise.resolve(i).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,c){var o=e.apply(t,n);function s(e){r(o,a,c,s,i,"next",e)}function i(e){r(o,a,c,s,i,"throw",e)}s(void 0)}))}}},58:function(e,t,r){"use strict";r.d(t,"b",(function(){return b})),r.d(t,"a",(function(){return m}));var n=r(6),a=r.n(n),c=r(10),o=r.n(c),s=r(0),i=r(7),u=r(27),l=r.n(u);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 f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=Object(s.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),b=function(){return Object(s.useContext)(p)},m=function(e){var t=e.children,r=Object(s.useState)({}),n=o()(r,2),c=n[0],u=n[1],d=Object(s.useCallback)((function(e){return c[e]}),[c]),b=Object(s.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),m=Object(s.useCallback)((function(e){u((function(t){return t[e]?Object(i.omit)(t,[e]):t}))}),[]),v=Object(s.useCallback)((function(){u({})}),[]),h=Object(s.useCallback)((function(e){e&&u((function(t){return e=Object(i.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:f(f({},t),e)}))}),[]),g=Object(s.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=f(f({},r[e]),t);return l()(r[e],n)?r:f(f({},r),{},a()({},e,n))}))}),[]),y={getValidationError:d,setValidationErrors:h,clearValidationError:m,clearAllValidationErrors:v,hideValidationError:Object(s.useCallback)((function(e){g(e,{hidden:!0})}),[g]),showValidationError:Object(s.useCallback)((function(e){g(e,{hidden:!1})}),[g]),showAllValidationErrors:Object(s.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=f(f({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:f(f({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:b};return React.createElement(p.Provider,{value:y},t)}},74:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(14),o=r.n(c),s=r(76),i=(r(4),r(5)),u=r.n(i);r(152);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,c=e.children,i=o()(e,["className","showSpinner","children"]),l=u()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return React.createElement(s.a,a()({className:l},i),n&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},c))}},81:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(15),a=r(12),c=r(118),o=r(17),s=r(7),i={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(c.a)(),r=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},d=e.shouldSelect,f=Object(a.useSelect)((function(e,t){var a=t.dispatch;if(!d)return i;if(r)return{cartCoupons:l.coupons,cartItems:l.items,cartItemsCount:l.items_count,cartItemsWeight:l.items_weight,cartNeedsPayment:l.needs_payment,cartNeedsShipping:l.needs_shipping,cartItemErrors:[],cartTotals:l.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:l.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==l?void 0:l.receiveCart)?l.receiveCart:function(){}};var c=e(n.CART_STORE_KEY),u=c.getCartData(),f=c.getCartErrors(),p=c.getCartTotals(),b=!c.hasFinishedResolution("getCartData"),m=c.areShippingRatesLoading(),v=a(n.CART_STORE_KEY).receiveCart,h=Object(s.mapValues)(u.shippingAddress,(function(e){return Object(o.decodeEntities)(e)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:p,cartIsLoading:b,cartErrors:f,shippingAddress:h,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!h.country,receiveCart:v}}),[d]);return f}},91:function(e,t,r){var n=r(55);e.exports=function(e){if(Array.isArray(e))return n(e)}},92:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},93: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.")}}}]);
build/atomic-block-components/add-to-cart.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{150:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(8),c=r.n(n),o=r(6);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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case i:return b.set(o,{priority:l,callback:a}),s(s({},e),{},c()({},n,b));case u:return b.delete(o),s(s({},e),{},c()({},n,b))}return e}},232:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(86),o=(r(2),r(239),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){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))})},238:function(e,t){},239:function(e,t){},390:function(e,t){},394:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},s=function(e){return n(e,c.ERROR)},i=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:s,isFailResponse:i}}},395:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(150),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))}}}},396:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n=r(15),c=r.n(n),o=r(56),a=r.n(o),s=r(37),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(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=e[Symbol.iterator]()},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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=[],i=u(o),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:d=e.sent,"object"===a()(d)&&s.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=u(o),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===a()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},397:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},398:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(86),s=r(11),i=r.n(s),u=r(1),l=r(60),b=r(140),f=r(394),d=r(929),p="pristine",O="idle",m="disabled",j="processing",v="before_processing",h="after_processing",y={status:p,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},g="set_pristine",E="set_idle",w="set_disabled",P="set_processing",k="set_before_processing",_="set_after_processing",C="set_processing_response",A="set_has_error",S="set_no_error",x="set_quantity",D="set_request_params",q=g,R=E,N=w,T=P,V=k,F=_,I=C,B=A,Q=S,M=x,W=D,H=function(){return{type:q}},L=function(){return{type:R}},U=function(){return{type:N}},z=function(){return{type:T}},J=function(){return{type:V}},Y=function(){return{type:F}},G=function(e){return{type:I,data:e}},X=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?B:Q;return{type:t}},$=function(e){return{type:M,quantity:e}},K=function(e){return{type:W,data:e}},Z=r(8),ee=r.n(Z);function te(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 re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=g,ce=E,oe=w,ae=P,se=k,ie=_,ue=C,le=A,be=S,fe=x,de=D,pe=p,Oe=O,me=m,je=j,ve=v,he=h,ye=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case ne:e=y;break;case ce:e=t.status!==Oe?re(re({},t),{},{status:Oe}):t;break;case oe:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case fe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case de:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),o)});break;case ue:e=re(re({},t),{},{processingResponse:o});break;case ae:e=!1===(e=t.status!==je?re(re({},t),{},{status:je,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case se:e=t.status!==ve?re(re({},t),{},{status:ve,hasError:!1}):t;break;case ie:e=t.status!==he?re(re({},t),{},{status:he}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===je||t.status===ve?re(re({},e),{},{status:Oe}):e;break;case be:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&c!==ne&&e.status===pe&&(e.status=Oe),e},ge=r(150),Ee=r(395),we="add_to_cart_before_processing",Pe="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",_e=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Ee.a)(Pe,e),onAddToCartProcessingWithError:Object(Ee.a)(ke,e),onAddToCartBeforeProcessing:Object(Ee.a)(we,e)}},Ce=r(396),Ae=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){}}}),Se=function(){return Object(n.useContext)(Ae)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(ye,y),s=i()(o,2),p=s[0],g=s[1],E=Object(n.useReducer)(ge.b,{}),w=i()(E,2),P=w[0],k=w[1],_=Object(l.a)(P),C=Object(b.a)(),A=C.addErrorNotice,S=C.removeNotices,x=Object(a.b)().setValidationErrors,D=Object(f.a)(),q=D.isSuccessResponse,R=D.isErrorResponse,N=D.isFailResponse,T=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:_e(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:_e(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:_e(k).onAddToCartBeforeProcessing}}),[k]),V=Object(n.useMemo)((function(){return{resetForm:function(){g(H())},submitForm:function(){g(J())},setQuantity:function(e){g($(e))},setHasError:function(e){g(X(e))},setRequestParams:function(e){g(K(e))},setAfterProcessing:function(e){g(G(e)),g(Y())}}}),[]);Object(n.useEffect)((function(){var e=p.status,t=!r.id||!Object(d.a)(r);e!==m||t?e!==m&&t&&g(U()):g(L())}),[p.status,r,g]),Object(n.useEffect)((function(){p.status===v&&(S("error"),Object(Ce.a)(_,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&A(t),r&&x(r)})),g(L())):g(z())})))}),[p.status,x,A,S,g,_]),Object(n.useEffect)((function(){if(p.status===h){var e={processingResponse:p.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;A(e.message,t)}};if(p.hasError)return void Object(Ce.b)(_,ke,e).then((function(r){if(R(r)||N(r))t(r);else{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"})}g(L())}));Object(Ce.b)(_,Pe,e).then((function(e){R(e)||N(e)?(t(e),g(X(!0))):g(L())}))}}),[p.status,p.hasError,p.processingResponse,V,A,R,N,q,_]);var F=Object(d.b)(r),I={product:r,productType:r.type||"simple",productIsPurchasable:Object(d.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:F,showFormElements:c&&F,quantity:p.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:p.requestParams,isIdle:p.status===O,isDisabled:p.status===m,isProcessing:p.status===j,isBeforeProcessing:p.status===v,isAfterProcessing:p.status===h,hasError:p.hasError,eventRegistration:T,dispatchActions:V};return Object(n.createElement)(Ae.Provider,{value:I},t)},De=r(13),qe=r.n(De),Re=r(134),Ne=r(33),Te=r(536);function Ve(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 Fe=function(){var e=Se(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,s=e.hasError,l=e.isProcessing,f=e.requestParams,d=Object(a.b)(),p=d.hasValidationErrors,O=d.showAllValidationErrors,m=Object(b.a)(),j=m.addErrorNotice,v=m.removeNotice,h=Object(Re.a)().receiveCart,y=Object(n.useState)(!1),g=i()(y,2),E=g[0],w=g[1],P=!s&&l,k=Object(n.useCallback)((function(){return!p||(O(),{type:"error"})}),[p,O]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var _=Object(n.useCallback)((function(){w(!0),v("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},f);qe()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){qe.a.setNonce(e.headers),e.json().then((function(r){e.ok?h(r):(r.body&&r.body.message?j(Object(Ne.decodeEntities)(r.body.message),{id:"add-to-cart"}):j(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&h(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,j,v,h,t,c,f]);return Object(n.useEffect)((function(){P&&!E&&_()}),[P,_,E]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(a.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Fe,null)))},Be=r(44),Qe=r(6),Me=r(73),We=(r(390),r(99)),He=r(61),Le=r(563),Ue=r(842),ze=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(We.a,{className:t,href:r,rel:"nofollow"},c)},Je=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,s=e.onClick;return Object(n.createElement)(We.a,{className:t,disabled:o,showSpinner:c,onClick:s},a&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(He.a,{srcElement:Le.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},Ye=function(){var e=Se(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,s=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,f=e.hasError,d=e.dispatchActions,p=Object(Ue.a)(o.id||0).cartQuantity,O=Object(n.useState)(!1),m=i()(O,2),j=m[0],v=m[1],h=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return f||v(!0),!0}),0);return function(){e()}}),[b,f]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Je,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:s,isProcessing:l,isDone:j,onClick:function(){return d.submitForm()}}):Object(n.createElement)(ze,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=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)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(u.__)("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)},$e=function(){var e=Se(),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)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},Ke=(r(562),r(51)),Ze=r.n(Ke),et=r(4),tt=r(9),rt=r(232),nt={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,s=e.value,i=void 0===s?"":s,l=e.onChange,b=void 0===l?function(){}:l,f=e.errorMessage,d=void 0===f?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):f,p=Object(a.b)(),O=p.getValidationError,m=p.setValidationErrors,j=p.clearValidationError,v=t,h=O(v)||{};return Object(tt.useEffect)((function(){i?j(v):m(ee()({},v,{message:d,hidden:!0}))}),[i,v,d,j,m]),Object(tt.useEffect)((function(){return function(){j(v)}}),[v,j]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Ne.decodeEntities)(t),value:i||"",options:[nt].concat(Ze()(c)),onChange:b,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),Object(n.createElement)(rt.a,{propertyName:v,elementId:v}))};function ot(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 at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},it=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],s=at(at({},r),{},ee()({},c,null)),i=o?st(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(Ne.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};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 lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(l.a)(t),a=Object(l.a)(r),s=Object(n.useState)(0),u=i()(s,2),b=u[0],f=u[1],d=Object(n.useState)({}),p=i()(d,2),O=p[0],m=p[1],j=Object(n.useMemo)((function(){return it(o,a,O)}),[O,o,a]);return Object(n.useEffect)((function(){Object.values(O).filter((function(e){return""!==e})).length===Object.keys(o).length?f(function(e,t,r){return st(e,t,r)[0]||0}(o,a,O)):b>0&&f(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)(ct,{key:e,attributeName:e,options:j[e],value:O[e],onChange:function(t){m(lt(lt({},O),{},ee()({},e,t)))}})})))},ft=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Qe.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)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Se(),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)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(ft,{product:t,dispatchers:a}),Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},pt=function(){return Object(n.createElement)(Ye,null)},Ot=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},mt=function(){return Object(n.createElement)(Ot,null)},jt=function(){var e=Se(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(mt,null):"external"===r?Object(n.createElement)(pt,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Ye,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Qe.isEmpty)(c)});return Object(n.createElement)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(jt,null)))}))},562:function(e,t){},563:function(e,t,r){"use strict";var n=r(0),c=r(58),o=Object(n.createElement)(c.a,{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},60:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},86:function(e,t,r){"use strict";r.d(t,"b",(function(){return p})),r.d(t,"a",(function(){return O}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),s=r(0),i=r(6),u=r(46),l=r.n(u);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 f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=Object(s.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),p=function(){return Object(s.useContext)(d)},O=function(e){var t=e.children,r=Object(s.useState)({}),n=a()(r,2),o=n[0],u=n[1],b=Object(s.useCallback)((function(e){return o[e]}),[o]),p=Object(s.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),O=Object(s.useCallback)((function(e){u((function(t){return t[e]?Object(i.omit)(t,[e]):t}))}),[]),m=Object(s.useCallback)((function(){u({})}),[]),j=Object(s.useCallback)((function(e){e&&u((function(t){return e=Object(i.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:f(f({},t),e)}))}),[]),v=Object(s.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=f(f({},r[e]),t);return l()(r[e],n)?r:f(f({},r),{},c()({},e,n))}))}),[]),h={getValidationError:b,setValidationErrors:j,clearValidationError:O,clearAllValidationErrors:m,hideValidationError:Object(s.useCallback)((function(e){v(e,{hidden:!0})}),[v]),showValidationError:Object(s.useCallback)((function(e){v(e,{hidden:!1})}),[v]),showAllValidationErrors:Object(s.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=f(f({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:f(f({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:p};return Object(s.createElement)(d.Provider,{value:h},t)}},929: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.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},949:function(e,t,r){"use strict";r.r(t);var n=r(25),c=r(946),o=r(398),a=r(397);t.default=Object(n.compose)(Object(c.a)(a.a))(o.a)},99:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),s=r(0),i=r(279),u=(r(2),r(7)),l=r.n(u);r(238);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(s.createElement)(i.a,c()({className:b},u),n&&Object(s.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(s.createElement)("span",{className:"wc-block-components-button__text"},o))}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{150:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(8),c=r.n(n),o=r(6);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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case i:return b.set(o,{priority:l,callback:a}),s(s({},e),{},c()({},n,b));case u:return b.delete(o),s(s({},e),{},c()({},n,b))}return e}},233:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(86),o=(r(2),r(240),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){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))})},239:function(e,t){},240:function(e,t){},391:function(e,t){},395:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},s=function(e){return n(e,c.ERROR)},i=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:s,isFailResponse:i}}},396:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(150),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))}}}},397:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n=r(15),c=r.n(n),o=r(60),a=r.n(o),s=r(37),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(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=e[Symbol.iterator]()},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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=[],i=u(o),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:d=e.sent,"object"===a()(d)&&s.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=u(o),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===a()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},398:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},399:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(86),s=r(11),i=r.n(s),u=r(1),l=r(58),b=r(140),f=r(395),d=r(929),p="pristine",O="idle",m="disabled",j="processing",v="before_processing",h="after_processing",y={status:p,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},g="set_pristine",E="set_idle",w="set_disabled",P="set_processing",k="set_before_processing",_="set_after_processing",C="set_processing_response",A="set_has_error",S="set_no_error",x="set_quantity",D="set_request_params",q=g,R=E,N=w,T=P,V=k,F=_,I=C,B=A,Q=S,M=x,W=D,H=function(){return{type:q}},L=function(){return{type:R}},U=function(){return{type:N}},z=function(){return{type:T}},J=function(){return{type:V}},Y=function(){return{type:F}},G=function(e){return{type:I,data:e}},X=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?B:Q;return{type:t}},$=function(e){return{type:M,quantity:e}},K=function(e){return{type:W,data:e}},Z=r(8),ee=r.n(Z);function te(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 re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=g,ce=E,oe=w,ae=P,se=k,ie=_,ue=C,le=A,be=S,fe=x,de=D,pe=p,Oe=O,me=m,je=j,ve=v,he=h,ye=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case ne:e=y;break;case ce:e=t.status!==Oe?re(re({},t),{},{status:Oe}):t;break;case oe:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case fe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case de:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),o)});break;case ue:e=re(re({},t),{},{processingResponse:o});break;case ae:e=!1===(e=t.status!==je?re(re({},t),{},{status:je,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case se:e=t.status!==ve?re(re({},t),{},{status:ve,hasError:!1}):t;break;case ie:e=t.status!==he?re(re({},t),{},{status:he}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===je||t.status===ve?re(re({},e),{},{status:Oe}):e;break;case be:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&c!==ne&&e.status===pe&&(e.status=Oe),e},ge=r(150),Ee=r(396),we="add_to_cart_before_processing",Pe="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",_e=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Ee.a)(Pe,e),onAddToCartProcessingWithError:Object(Ee.a)(ke,e),onAddToCartBeforeProcessing:Object(Ee.a)(we,e)}},Ce=r(397),Ae=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){}}}),Se=function(){return Object(n.useContext)(Ae)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(ye,y),s=i()(o,2),p=s[0],g=s[1],E=Object(n.useReducer)(ge.b,{}),w=i()(E,2),P=w[0],k=w[1],_=Object(l.a)(P),C=Object(b.a)(),A=C.addErrorNotice,S=C.removeNotices,x=Object(a.b)().setValidationErrors,D=Object(f.a)(),q=D.isSuccessResponse,R=D.isErrorResponse,N=D.isFailResponse,T=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:_e(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:_e(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:_e(k).onAddToCartBeforeProcessing}}),[k]),V=Object(n.useMemo)((function(){return{resetForm:function(){g(H())},submitForm:function(){g(J())},setQuantity:function(e){g($(e))},setHasError:function(e){g(X(e))},setRequestParams:function(e){g(K(e))},setAfterProcessing:function(e){g(G(e)),g(Y())}}}),[]);Object(n.useEffect)((function(){var e=p.status,t=!r.id||!Object(d.a)(r);e!==m||t?e!==m&&t&&g(U()):g(L())}),[p.status,r,g]),Object(n.useEffect)((function(){p.status===v&&(S("error"),Object(Ce.a)(_,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&A(t),r&&x(r)})),g(L())):g(z())})))}),[p.status,x,A,S,g,_]),Object(n.useEffect)((function(){if(p.status===h){var e={processingResponse:p.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;A(e.message,t)}};if(p.hasError)return void Object(Ce.b)(_,ke,e).then((function(r){if(R(r)||N(r))t(r);else{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"})}g(L())}));Object(Ce.b)(_,Pe,e).then((function(e){R(e)||N(e)?(t(e),g(X(!0))):g(L())}))}}),[p.status,p.hasError,p.processingResponse,V,A,R,N,q,_]);var F=Object(d.b)(r),I={product:r,productType:r.type||"simple",productIsPurchasable:Object(d.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:F,showFormElements:c&&F,quantity:p.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:p.requestParams,isIdle:p.status===O,isDisabled:p.status===m,isProcessing:p.status===j,isBeforeProcessing:p.status===v,isAfterProcessing:p.status===h,hasError:p.hasError,eventRegistration:T,dispatchActions:V};return Object(n.createElement)(Ae.Provider,{value:I},t)},De=r(13),qe=r.n(De),Re=r(134),Ne=r(33),Te=r(537);function Ve(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 Fe=function(){var e=Se(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,s=e.hasError,l=e.isProcessing,f=e.requestParams,d=Object(a.b)(),p=d.hasValidationErrors,O=d.showAllValidationErrors,m=Object(b.a)(),j=m.addErrorNotice,v=m.removeNotice,h=Object(Re.a)().receiveCart,y=Object(n.useState)(!1),g=i()(y,2),E=g[0],w=g[1],P=!s&&l,k=Object(n.useCallback)((function(){return!p||(O(),{type:"error"})}),[p,O]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var _=Object(n.useCallback)((function(){w(!0),v("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},f);qe()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){qe.a.setNonce(e.headers),e.json().then((function(r){e.ok?h(r):(r.body&&r.body.message?j(Object(Ne.decodeEntities)(r.body.message),{id:"add-to-cart"}):j(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&h(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,j,v,h,t,c,f]);return Object(n.useEffect)((function(){P&&!E&&_()}),[P,_,E]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(a.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Fe,null)))},Be=r(45),Qe=r(6),Me=r(73),We=(r(391),r(99)),He=r(61),Le=r(563),Ue=r(842),ze=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(We.a,{className:t,href:r,rel:"nofollow"},c)},Je=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,s=e.onClick;return Object(n.createElement)(We.a,{className:t,disabled:o,showSpinner:c,onClick:s},a&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(He.a,{srcElement:Le.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},Ye=function(){var e=Se(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,s=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,f=e.hasError,d=e.dispatchActions,p=Object(Ue.a)(o.id||0).cartQuantity,O=Object(n.useState)(!1),m=i()(O,2),j=m[0],v=m[1],h=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return f||v(!0),!0}),0);return function(){e()}}),[b,f]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Je,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:s,isProcessing:l,isDone:j,onClick:function(){return d.submitForm()}}):Object(n.createElement)(ze,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=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)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(u.__)("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)},$e=function(){var e=Se(),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)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},Ke=(r(562),r(51)),Ze=r.n(Ke),et=r(4),tt=r(9),rt=r(233),nt={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,s=e.value,i=void 0===s?"":s,l=e.onChange,b=void 0===l?function(){}:l,f=e.errorMessage,d=void 0===f?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):f,p=Object(a.b)(),O=p.getValidationError,m=p.setValidationErrors,j=p.clearValidationError,v=t,h=O(v)||{};return Object(tt.useEffect)((function(){i?j(v):m(ee()({},v,{message:d,hidden:!0}))}),[i,v,d,j,m]),Object(tt.useEffect)((function(){return function(){j(v)}}),[v,j]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Ne.decodeEntities)(t),value:i||"",options:[nt].concat(Ze()(c)),onChange:b,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),Object(n.createElement)(rt.a,{propertyName:v,elementId:v}))};function ot(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 at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},it=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],s=at(at({},r),{},ee()({},c,null)),i=o?st(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(Ne.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};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 lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(l.a)(t),a=Object(l.a)(r),s=Object(n.useState)(0),u=i()(s,2),b=u[0],f=u[1],d=Object(n.useState)({}),p=i()(d,2),O=p[0],m=p[1],j=Object(n.useMemo)((function(){return it(o,a,O)}),[O,o,a]);return Object(n.useEffect)((function(){Object.values(O).filter((function(e){return""!==e})).length===Object.keys(o).length?f(function(e,t,r){return st(e,t,r)[0]||0}(o,a,O)):b>0&&f(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)(ct,{key:e,attributeName:e,options:j[e],value:O[e],onChange:function(t){m(lt(lt({},O),{},ee()({},e,t)))}})})))},ft=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Qe.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)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Se(),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)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(ft,{product:t,dispatchers:a}),Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},pt=function(){return Object(n.createElement)(Ye,null)},Ot=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},mt=function(){return Object(n.createElement)(Ot,null)},jt=function(){var e=Se(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(mt,null):"external"===r?Object(n.createElement)(pt,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Ye,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Qe.isEmpty)(c)});return Object(n.createElement)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(jt,null)))}))},562:function(e,t){},563:function(e,t,r){"use strict";var n=r(0),c=r(57),o=Object(n.createElement)(c.a,{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},58:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(43),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},86:function(e,t,r){"use strict";r.d(t,"b",(function(){return p})),r.d(t,"a",(function(){return O}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),s=r(0),i=r(6),u=r(43),l=r.n(u);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 f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=Object(s.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),p=function(){return Object(s.useContext)(d)},O=function(e){var t=e.children,r=Object(s.useState)({}),n=a()(r,2),o=n[0],u=n[1],b=Object(s.useCallback)((function(e){return o[e]}),[o]),p=Object(s.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),O=Object(s.useCallback)((function(e){u((function(t){return t[e]?Object(i.omit)(t,[e]):t}))}),[]),m=Object(s.useCallback)((function(){u({})}),[]),j=Object(s.useCallback)((function(e){e&&u((function(t){return e=Object(i.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:f(f({},t),e)}))}),[]),v=Object(s.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=f(f({},r[e]),t);return l()(r[e],n)?r:f(f({},r),{},c()({},e,n))}))}),[]),h={getValidationError:b,setValidationErrors:j,clearValidationError:O,clearAllValidationErrors:m,hideValidationError:Object(s.useCallback)((function(e){v(e,{hidden:!0})}),[v]),showValidationError:Object(s.useCallback)((function(e){v(e,{hidden:!1})}),[v]),showAllValidationErrors:Object(s.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=f(f({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:f(f({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:p};return Object(s.createElement)(d.Provider,{value:h},t)}},929: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.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},949:function(e,t,r){"use strict";r.r(t);var n=r(26),c=r(946),o=r(399),a=r(398);t.default=Object(n.compose)(Object(c.a)(a.a))(o.a)},99:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),s=r(0),i=r(280),u=(r(2),r(7)),l=r.n(u);r(239);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(s.createElement)(i.a,c()({className:b},u),n&&Object(s.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(s.createElement)("span",{className:"wc-block-components-button__text"},o))}}}]);
build/atomic-block-components/add-to-cart~atomic-block-components/button.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{134:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(41),c=n(36),o=n(211),i=n(33),a=n(6),s={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(o.b)(),n=t.isEditor,u=t.previewData,d=(null==u?void 0:u.previewCart)||{},l=e.shouldSelect,f=Object(c.useSelect)((function(e,t){var c=t.dispatch;if(!l)return s;if(n)return{cartCoupons:d.coupons,cartItems:d.items,cartItemsCount:d.items_count,cartItemsWeight:d.items_weight,cartNeedsPayment:d.needs_payment,cartNeedsShipping:d.needs_shipping,cartItemErrors:[],cartTotals:d.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:d.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==d?void 0:d.receiveCart)?d.receiveCart:function(){}};var o=e(r.CART_STORE_KEY),u=o.getCartData(),f=o.getCartErrors(),p=o.getCartTotals(),v=!o.hasFinishedResolution("getCartData"),b=o.areShippingRatesLoading(),m=c(r.CART_STORE_KEY).receiveCart,g=Object(a.mapValues)(u.shippingAddress,(function(e){return Object(i.decodeEntities)(e)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:p,cartIsLoading:v,cartErrors:f,shippingAddress:g,shippingRates:u.shippingRates||[],shippingRatesLoading:b,hasShippingAddress:!!g.country,receiveCart:m}}),[l]);return f}},140:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(8),c=n.n(r),o=n(190),i=n(0);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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,c=e.createSnackbarNotice,a=e.setIsSuppressed,u=Object(i.useRef)(t);Object(i.useEffect)((function(){u.current=t}),[t]);var d=Object(i.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),l=Object(i.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))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[n,c]);return s(s(s({notices:t},d),l),{},{setIsSuppressed:a})}},190:function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return h}));var r=n(8),c=n.n(r),o=n(11),i=n.n(o),a=n(0),s=(n(2),n(36)),u=n(302),d=n(944),l=n(140),f=n(211),p=function(){var e=Object(f.b)().isEditor,t=Object(l.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var c=n.filter((function(e){return"snackbar"===e.type}));return Object(a.createElement)(d.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:r})};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 b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(a.useContext)(m)},h=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=e.createNoticeContainer,o=void 0===c||c,d=e.context,l=void 0===d?"wc/core":d,f=Object(s.useDispatch)("core/notices"),v=f.createNotice,g=f.removeNotice,h=Object(a.useState)(!1),O=i()(h,2),j=O[0],w=O[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};v(e,t,b(b({},n),{},{context:n.context||l}))}),[v,l]),E=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;g(e,t)}),[g,l]),N=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,b(b({},t),{},{type:"snackbar"}))}),[y]),C={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(l)}}),[l]).notices,createNotice:y,createSnackbarNotice:N,removeNotice:E,context:l,setIsSuppressed:w},S=j?null:Object(a.createElement)(u.a,{className:r,notices:C.notices}),I=j?null:Object(a.createElement)(p,null);return Object(a.createElement)(m.Provider,{value:C},o&&S,t,I)}},211:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(0),c=n(36),o=Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),i=function(){return Object(r.useContext)(o)},a=function(e){var t=e.children,n=e.currentPostId,i=void 0===n?0:n,a=e.previewData,s=void 0===a?{}:a,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return i||e("core/editor").getCurrentPostId()}),[i]),previewData:s};return Object(r.createElement)(o.Provider,{value:u},t)}},237:function(e,t){},268:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),i=n.n(o),a=n(0),s=n(58),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=void 0===n?20:n,o=i()(e,["className","size"]);return Object(a.createElement)(s.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},o),Object(a.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),d=n(283);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=d.a}return t?Object(a.cloneElement)(t,{size:e.size||20,className:e.className}):null}},283:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),i=n.n(o),a=n(0),s=n(58),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return Object(a.createElement)(s.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.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},302:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(0),i=(n(2),n(7)),a=n.n(i),s=n(389),u=n(190),d=(n(237),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,i=n.filter((function(e){return"snackbar"!==e.type}));if(!i.length)return null;var l=a()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:l},i.map((function(e){return Object(o.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice","woocommerce-message",d(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},536:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return i}));var r=window.Event||null,c=function(e,t){var n=t.bubbles,c=void 0!==n&&n,o=t.cancelable,i=void 0!==o&&o,a=t.element;if(a||(a=document.body),"function"==typeof r){var s=new r(e,{bubbles:c,cancelable:i});a.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,i),a.dispatchEvent(u)}},o=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},i=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)}}},842:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(11),c=n.n(r),o=n(0),i=n(36),a=n(134),s=n(41),u=n(33),d=n(140),l=function(e,t){var n=e.find((function(e){return e.id===t}));return n?n.quantity:0},f=function(e){var t=Object(i.useDispatch)(s.CART_STORE_KEY).addItemToCart,n=Object(a.a)(),r=n.cartItems,f=n.cartIsLoading,p=Object(d.a)(),v=p.addErrorNotice,b=p.removeNotice,m=Object(o.useState)(!1),g=c()(m,2),h=g[0],O=g[1],j=Object(o.useRef)(l(r,e));return Object(o.useEffect)((function(){var t=l(r,e);t!==j.current&&(j.current=t)}),[r,e]),{cartQuantity:Number.isFinite(j.current)?j.current:0,addingToCart:h,cartIsLoading:f,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;O(!0),t(e,n).then((function(e){!0===e&&b("add-to-cart")})).catch((function(e){v(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){O(!1)}))}}}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{134:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(41),c=n(36),o=n(212),i=n(33),a=n(6),s={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(o.b)(),n=t.isEditor,u=t.previewData,d=(null==u?void 0:u.previewCart)||{},l=e.shouldSelect,f=Object(c.useSelect)((function(e,t){var c=t.dispatch;if(!l)return s;if(n)return{cartCoupons:d.coupons,cartItems:d.items,cartItemsCount:d.items_count,cartItemsWeight:d.items_weight,cartNeedsPayment:d.needs_payment,cartNeedsShipping:d.needs_shipping,cartItemErrors:[],cartTotals:d.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:d.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==d?void 0:d.receiveCart)?d.receiveCart:function(){}};var o=e(r.CART_STORE_KEY),u=o.getCartData(),f=o.getCartErrors(),p=o.getCartTotals(),v=!o.hasFinishedResolution("getCartData"),b=o.areShippingRatesLoading(),m=c(r.CART_STORE_KEY).receiveCart,g=Object(a.mapValues)(u.shippingAddress,(function(e){return Object(i.decodeEntities)(e)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:p,cartIsLoading:v,cartErrors:f,shippingAddress:g,shippingRates:u.shippingRates||[],shippingRatesLoading:b,hasShippingAddress:!!g.country,receiveCart:m}}),[l]);return f}},140:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(8),c=n.n(r),o=n(191),i=n(0);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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,c=e.createSnackbarNotice,a=e.setIsSuppressed,u=Object(i.useRef)(t);Object(i.useEffect)((function(){u.current=t}),[t]);var d=Object(i.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),l=Object(i.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))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[n,c]);return s(s(s({notices:t},d),l),{},{setIsSuppressed:a})}},191:function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return h}));var r=n(8),c=n.n(r),o=n(11),i=n.n(o),a=n(0),s=(n(2),n(36)),u=n(303),d=n(944),l=n(140),f=n(212),p=function(){var e=Object(f.b)().isEditor,t=Object(l.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var c=n.filter((function(e){return"snackbar"===e.type}));return Object(a.createElement)(d.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:r})};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 b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(a.useContext)(m)},h=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=e.createNoticeContainer,o=void 0===c||c,d=e.context,l=void 0===d?"wc/core":d,f=Object(s.useDispatch)("core/notices"),v=f.createNotice,g=f.removeNotice,h=Object(a.useState)(!1),O=i()(h,2),j=O[0],w=O[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};v(e,t,b(b({},n),{},{context:n.context||l}))}),[v,l]),E=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;g(e,t)}),[g,l]),N=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,b(b({},t),{},{type:"snackbar"}))}),[y]),C={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(l)}}),[l]).notices,createNotice:y,createSnackbarNotice:N,removeNotice:E,context:l,setIsSuppressed:w},S=j?null:Object(a.createElement)(u.a,{className:r,notices:C.notices}),I=j?null:Object(a.createElement)(p,null);return Object(a.createElement)(m.Provider,{value:C},o&&S,t,I)}},212:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(0),c=n(36),o=Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),i=function(){return Object(r.useContext)(o)},a=function(e){var t=e.children,n=e.currentPostId,i=void 0===n?0:n,a=e.previewData,s=void 0===a?{}:a,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return i||e("core/editor").getCurrentPostId()}),[i]),previewData:s};return Object(r.createElement)(o.Provider,{value:u},t)}},238:function(e,t){},269:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),i=n.n(o),a=n(0),s=n(57),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=void 0===n?20:n,o=i()(e,["className","size"]);return Object(a.createElement)(s.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},o),Object(a.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),d=n(284);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=d.a}return t?Object(a.cloneElement)(t,{size:e.size||20,className:e.className}):null}},284:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),i=n.n(o),a=n(0),s=n(57),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return Object(a.createElement)(s.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.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},303:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(0),i=(n(2),n(7)),a=n.n(i),s=n(390),u=n(191),d=(n(238),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,i=n.filter((function(e){return"snackbar"!==e.type}));if(!i.length)return null;var l=a()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:l},i.map((function(e){return Object(o.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice","woocommerce-message",d(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},537:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return i}));var r=window.Event||null,c=function(e,t){var n=t.bubbles,c=void 0!==n&&n,o=t.cancelable,i=void 0!==o&&o,a=t.element;if(a||(a=document.body),"function"==typeof r){var s=new r(e,{bubbles:c,cancelable:i});a.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,i),a.dispatchEvent(u)}},o=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},i=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)}}},842:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(11),c=n.n(r),o=n(0),i=n(36),a=n(134),s=n(41),u=n(33),d=n(140),l=function(e,t){var n=e.find((function(e){return e.id===t}));return n?n.quantity:0},f=function(e){var t=Object(i.useDispatch)(s.CART_STORE_KEY).addItemToCart,n=Object(a.a)(),r=n.cartItems,f=n.cartIsLoading,p=Object(d.a)(),v=p.addErrorNotice,b=p.removeNotice,m=Object(o.useState)(!1),g=c()(m,2),h=g[0],O=g[1],j=Object(o.useRef)(l(r,e));return Object(o.useEffect)((function(){var t=l(r,e);t!==j.current&&(j.current=t)}),[r,e]),{cartQuantity:Number.isFinite(j.current)?j.current:0,addingToCart:h,cartIsLoading:f,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;O(!0),t(e,n).then((function(e){!0===e&&b("add-to-cart")})).catch((function(e){v(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){O(!1)}))}}}}}]);
build/atomic-block-components/button-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{277:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o}));var r=window.Event||null,c=function(t,e){var n=e.bubbles,c=void 0!==n&&n,a=e.cancelable,o=void 0!==a&&a,i=e.element;if(i||(i=document.body),"function"==typeof r){var s=new r(t,{bubbles:c,cancelable:o});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(t,c,o),i.dispatchEvent(u)}},a=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(t,e){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 a=function(){c(e,{bubbles:n,cancelable:r})};return jQuery(document).on(t,a),function(){return jQuery(document).off(t,a)}}},288:function(t,e){},289:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(9),c=n.n(r),a=n(0),o=n(13),i=n(81),s=n(15),u=n(17),d=n(80),p=function(t,e){var n=t.find((function(t){return t.id===e}));return n?n.quantity:0},l=function(t){var e=Object(o.useDispatch)(s.CART_STORE_KEY).addItemToCart,n=Object(i.a)(),r=n.cartItems,l=n.cartIsLoading,b=Object(d.a)(),f=b.addErrorNotice,m=b.removeNotice,g=Object(a.useState)(!1),h=c()(g,2),_=h[0],v=h[1],E=Object(a.useRef)(p(r,t));return Object(a.useEffect)((function(){var e=p(r,t);e!==E.current&&(E.current=e)}),[r,t]),{cartQuantity:Number.isFinite(E.current)?E.current:0,addingToCart:_,cartIsLoading:l,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v(!0),e(t,n).then((function(t){!0===t&&m("add-to-cart")})).catch((function(t){f(Object(u.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},299:function(t,e,n){"use strict";n.r(e);var r=n(11),c=n.n(r),a=n(6),o=n.n(a),i=(n(4),n(5)),s=n.n(i),u=n(1),d=n(0),p=n(289),l=n(17),b=n(277),f=n(69),m=n(191),g=(n(288),function(t){var e=t.product,n=Object(d.useRef)(!0),r=e.id,a=e.permalink,o=e.add_to_cart,i=e.has_options,f=e.is_purchasable,m=e.is_in_stock,g=Object(p.a)(r),h=g.cartQuantity,_=g.addingToCart,v=g.addToCart;Object(d.useEffect)((function(){n.current?n.current=!1:Object(b.c)()}),[h]);var E=Number.isFinite(h)&&h>0,C=!i&&f&&m,j=Object(l.decodeEntities)((null==o?void 0:o.description)||""),O=E?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",h,"woo-gutenberg-products-block"),h):Object(l.decodeEntities)((null==o?void 0:o.text)||Object(u.__)("Add to cart","woo-gutenberg-products-block")),w=C?"button":"a",y={};return C?y.onClick=function(){v()}:(y.href=a,y.rel="nofollow"),React.createElement(w,c()({"aria-label":j,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:_,added:E}),disabled:_},y),O)}),h=function(){return React.createElement("button",{className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};e.default=Object(m.withProductDataContext)((function(t){var e=t.className,n=Object(f.useInnerBlockLayoutContext)().parentClassName,r=Object(f.useProductDataContext)().product;return React.createElement("div",{className:s()(e,"wp-block-button","wc-block-components-product-button",o()({},"".concat(n,"__product-add-to-cart"),n))},r.id?React.createElement(g,{product:r}):React.createElement(h,null))}))},81:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(15),c=n(13),a=n(117),o=n(17),i=n(7),s={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},e=Object(a.a)(),n=e.isEditor,u=e.previewData,d=(null==u?void 0:u.previewCart)||{},p=t.shouldSelect,l=Object(c.useSelect)((function(t,e){var c=e.dispatch;if(!p)return s;if(n)return{cartCoupons:d.coupons,cartItems:d.items,cartItemsCount:d.items_count,cartItemsWeight:d.items_weight,cartNeedsPayment:d.needs_payment,cartNeedsShipping:d.needs_shipping,cartItemErrors:[],cartTotals:d.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:d.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==d?void 0:d.receiveCart)?d.receiveCart:function(){}};var a=t(r.CART_STORE_KEY),u=a.getCartData(),l=a.getCartErrors(),b=a.getCartTotals(),f=!a.hasFinishedResolution("getCartData"),m=a.areShippingRatesLoading(),g=c(r.CART_STORE_KEY).receiveCart,h=Object(i.mapValues)(u.shippingAddress,(function(t){return Object(o.decodeEntities)(t)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:b,cartIsLoading:f,cartErrors:l,shippingAddress:h,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!h.country,receiveCart:g}}),[p]);return l}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{277:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o}));var r=window.Event||null,c=function(t,e){var n=e.bubbles,c=void 0!==n&&n,a=e.cancelable,o=void 0!==a&&a,i=e.element;if(i||(i=document.body),"function"==typeof r){var s=new r(t,{bubbles:c,cancelable:o});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(t,c,o),i.dispatchEvent(u)}},a=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(t,e){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 a=function(){c(e,{bubbles:n,cancelable:r})};return jQuery(document).on(t,a),function(){return jQuery(document).off(t,a)}}},288:function(t,e){},289:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(10),c=n.n(r),a=n(0),o=n(12),i=n(81),s=n(15),u=n(17),d=n(80),p=function(t,e){var n=t.find((function(t){return t.id===e}));return n?n.quantity:0},l=function(t){var e=Object(o.useDispatch)(s.CART_STORE_KEY).addItemToCart,n=Object(i.a)(),r=n.cartItems,l=n.cartIsLoading,b=Object(d.a)(),f=b.addErrorNotice,m=b.removeNotice,g=Object(a.useState)(!1),h=c()(g,2),_=h[0],v=h[1],E=Object(a.useRef)(p(r,t));return Object(a.useEffect)((function(){var e=p(r,t);e!==E.current&&(E.current=e)}),[r,t]),{cartQuantity:Number.isFinite(E.current)?E.current:0,addingToCart:_,cartIsLoading:l,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v(!0),e(t,n).then((function(t){!0===t&&m("add-to-cart")})).catch((function(t){f(Object(u.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},299:function(t,e,n){"use strict";n.r(e);var r=n(11),c=n.n(r),a=n(6),o=n.n(a),i=(n(4),n(5)),s=n.n(i),u=n(1),d=n(0),p=n(289),l=n(17),b=n(277),f=n(69),m=n(191),g=(n(288),function(t){var e=t.product,n=Object(d.useRef)(!0),r=e.id,a=e.permalink,o=e.add_to_cart,i=e.has_options,f=e.is_purchasable,m=e.is_in_stock,g=Object(p.a)(r),h=g.cartQuantity,_=g.addingToCart,v=g.addToCart;Object(d.useEffect)((function(){n.current?n.current=!1:Object(b.c)()}),[h]);var E=Number.isFinite(h)&&h>0,C=!i&&f&&m,j=Object(l.decodeEntities)((null==o?void 0:o.description)||""),O=E?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",h,"woo-gutenberg-products-block"),h):Object(l.decodeEntities)((null==o?void 0:o.text)||Object(u.__)("Add to cart","woo-gutenberg-products-block")),w=C?"button":"a",y={};return C?y.onClick=function(){v()}:(y.href=a,y.rel="nofollow"),React.createElement(w,c()({"aria-label":j,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:_,added:E}),disabled:_},y),O)}),h=function(){return React.createElement("button",{className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};e.default=Object(m.withProductDataContext)((function(t){var e=t.className,n=Object(f.useInnerBlockLayoutContext)().parentClassName,r=Object(f.useProductDataContext)().product;return React.createElement("div",{className:s()(e,"wp-block-button","wc-block-components-product-button",o()({},"".concat(n,"__product-add-to-cart"),n))},r.id?React.createElement(g,{product:r}):React.createElement(h,null))}))},81:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(15),c=n(12),a=n(118),o=n(17),i=n(7),s={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},e=Object(a.a)(),n=e.isEditor,u=e.previewData,d=(null==u?void 0:u.previewCart)||{},p=t.shouldSelect,l=Object(c.useSelect)((function(t,e){var c=e.dispatch;if(!p)return s;if(n)return{cartCoupons:d.coupons,cartItems:d.items,cartItemsCount:d.items_count,cartItemsWeight:d.items_weight,cartNeedsPayment:d.needs_payment,cartNeedsShipping:d.needs_shipping,cartItemErrors:[],cartTotals:d.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:d.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==d?void 0:d.receiveCart)?d.receiveCart:function(){}};var a=t(r.CART_STORE_KEY),u=a.getCartData(),l=a.getCartErrors(),b=a.getCartTotals(),f=!a.hasFinishedResolution("getCartData"),m=a.areShippingRatesLoading(),g=c(r.CART_STORE_KEY).receiveCart,h=Object(i.mapValues)(u.shippingAddress,(function(t){return Object(o.decodeEntities)(t)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:b,cartIsLoading:f,cartErrors:l,shippingAddress:h,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!h.country,receiveCart:g}}),[p]);return l}}}]);
build/atomic-block-components/button.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{535:function(t,c,e){"use strict";e.r(c);var o=e(10),n=e.n(o),a=e(8),r=e.n(a),u=e(0),d=(e(2),e(7)),b=e.n(d),l=e(1),i=e(842),s=e(33),p=e(536),_=e(44),k=e(73),j=(e(556),function(t){var c=t.product,e=Object(u.useRef)(!0),o=c.id,a=c.permalink,r=c.add_to_cart,d=c.has_options,_=c.is_purchasable,k=c.is_in_stock,j=Object(i.a)(o),w=j.cartQuantity,O=j.addingToCart,m=j.addToCart;Object(u.useEffect)((function(){e.current?e.current=!1:Object(p.c)()}),[w]);var f=Number.isFinite(w)&&w>0,E=!d&&_&&k,v=Object(s.decodeEntities)((null==r?void 0:r.description)||""),C=f?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",w,"woo-gutenberg-products-block"),w):Object(s.decodeEntities)((null==r?void 0:r.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),g=E?"button":"a",h={};return E?h.onClick=function(){m()}:(h.href=a,h.rel="nofollow"),Object(u.createElement)(g,n()({"aria-label":v,className:b()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:O,added:f}),disabled:O},h),C)}),w=function(){return Object(u.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})};c.default=Object(k.withProductDataContext)((function(t){var c=t.className,e=Object(_.useInnerBlockLayoutContext)().parentClassName,o=Object(_.useProductDataContext)().product;return Object(u.createElement)("div",{className:b()(c,"wp-block-button","wc-block-components-product-button",r()({},"".concat(e,"__product-add-to-cart"),e))},o.id?Object(u.createElement)(j,{product:o}):Object(u.createElement)(w,null))}))},556:function(t,c){}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{536:function(t,c,e){"use strict";e.r(c);var o=e(10),n=e.n(o),a=e(8),r=e.n(a),u=e(0),d=(e(2),e(7)),b=e.n(d),l=e(1),i=e(842),s=e(33),p=e(537),_=e(45),k=e(73),j=(e(556),function(t){var c=t.product,e=Object(u.useRef)(!0),o=c.id,a=c.permalink,r=c.add_to_cart,d=c.has_options,_=c.is_purchasable,k=c.is_in_stock,j=Object(i.a)(o),w=j.cartQuantity,O=j.addingToCart,m=j.addToCart;Object(u.useEffect)((function(){e.current?e.current=!1:Object(p.c)()}),[w]);var f=Number.isFinite(w)&&w>0,E=!d&&_&&k,v=Object(s.decodeEntities)((null==r?void 0:r.description)||""),C=f?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",w,"woo-gutenberg-products-block"),w):Object(s.decodeEntities)((null==r?void 0:r.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),g=E?"button":"a",h={};return E?h.onClick=function(){m()}:(h.href=a,h.rel="nofollow"),Object(u.createElement)(g,n()({"aria-label":v,className:b()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:O,added:f}),disabled:O},h),C)}),w=function(){return Object(u.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})};c.default=Object(k.withProductDataContext)((function(t){var c=t.className,e=Object(_.useInnerBlockLayoutContext)().parentClassName,o=Object(_.useProductDataContext)().product;return Object(u.createElement)("div",{className:b()(c,"wp-block-button","wc-block-components-product-button",r()({},"".concat(e,"__product-add-to-cart"),e))},o.id?Object(u.createElement)(j,{product:o}):Object(u.createElement)(w,null))}))},556:function(t,c){}}]);
build/atomic-block-components/category-list.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{539:function(e,t,c){"use strict";c.r(t);var n=c(8),o=c.n(n),a=c(0),r=c(1),s=(c(2),c(7)),l=c.n(s),u=c(44),i=c(6),b=c(73);c(559);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))}))))}))},559:function(e,t){}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{540:function(e,t,c){"use strict";c.r(t);var n=c(8),o=c.n(n),a=c(0),r=c(1),s=(c(2),c(7)),l=c.n(s),u=c(45),i=c(6),b=c(73);c(559);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))}))))}))},559:function(e,t){}}]);
build/atomic-block-components/image-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5,8],{180:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},282:function(e,t,r){"use strict";var n=r(11),c=r.n(n),a=r(180);t.a=function(e){return function(t){return function(r){var n=Object(a.a)(e,r);return React.createElement(t,c()({},r,n))}}}},283:function(e,t){},284:function(e,t,r){"use strict";r.r(t);var n=r(6),c=r.n(n),a=(r(4),r(1)),o=r(5),l=r.n(o),u=r(33),s=r(69),i=r(191);r(283);t.default=Object(i.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(s.useInnerBlockLayoutContext)().parentClassName,o=Object(s.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var i="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,i,c()({},"".concat(n,"__product-onsale"),n))},React.createElement(u.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},285:function(e,t){},307:function(e,t,r){"use strict";r.r(t);var n=r(26),c=r(282),a=r(6),o=r.n(a),l=r(9),u=r.n(l),s=(r(4),r(0)),i=r(5),p=r.n(i),d=r(8),b=r(69),m=r(191),f=r(7),g=r(284);r(285);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 j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=function(){return React.createElement("img",{src:d.t,alt:"",width:500,height:500})},y=function(e){var t=e.image,r=e.onLoad,n=e.loaded,c=e.showFullSize,a=t||{},o=a.thumbnail,l=a.src,u=a.srcset,s=a.sizes,i={alt:a.alt,onLoad:r,hidden:!n,src:o};return c&&(i=j(j({},i),{},{src:l,srcSet:u,sizes:s})),React.createElement(React.Fragment,null,React.createElement("img",i),!n&&React.createElement(w,null))},v=Object(m.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,c=e.productLink,a=void 0===c||c,l=e.showSaleBadge,i=e.saleBadgeAlign,d=void 0===i?"right":i,m=Object(b.useInnerBlockLayoutContext)().parentClassName,O=Object(b.useProductDataContext)().product,j=Object(s.useState)(!1),v=u()(j,2),h=v[0],E=v[1];if(!O.id)return React.createElement("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",o()({},"".concat(m,"__product-image"),m))},React.createElement(w,null));var R=Object(f.isEmpty)(O.images)?null:O.images[0];return React.createElement("div",{className:p()(t,"wc-block-components-product-image",o()({},"".concat(m,"__product-image"),m))},a?React.createElement("a",{href:O.permalink,rel:"nofollow"},!!l&&React.createElement(g.default,{align:d,product:O}),React.createElement(y,{image:R,onLoad:function(){return E(!0)},loaded:h,showFullSize:"cropped"!==n})):React.createElement(React.Fragment,null,!!l&&React.createElement(g.default,{align:d,product:O}),React.createElement(y,{image:R,onLoad:function(){return E(!0)},loaded:h,showFullSize:"cropped"!==n})))})),h={productLink:{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}};t.default=Object(n.compose)(Object(c.a)(h))(v)},33:function(e,t,r){"use strict";var n=r(6),c=r.n(n),a=(r(4),r(3)),o=r(5),l=r.n(o);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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,o=e.wrapperProps,u=void 0===o?{}:o,i=null!=r,p=null!=n;return!i&&p?(t=c||"span",u=s(s({},u),{},{className:l()(u.className,"screen-reader-text")}),React.createElement(t,u,n)):(t=c||a.Fragment,i&&p&&r!==n?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,u,r))}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5,8],{181:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},282:function(e,t,r){"use strict";var n=r(11),c=r.n(n),a=r(181);t.a=function(e){return function(t){return function(r){var n=Object(a.a)(e,r);return React.createElement(t,c()({},r,n))}}}},283:function(e,t){},284:function(e,t,r){"use strict";r.r(t);var n=r(6),c=r.n(n),a=(r(4),r(1)),o=r(5),l=r.n(o),u=r(34),s=r(69),i=r(191);r(283);t.default=Object(i.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(s.useInnerBlockLayoutContext)().parentClassName,o=Object(s.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var i="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,i,c()({},"".concat(n,"__product-onsale"),n))},React.createElement(u.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},285:function(e,t){},307:function(e,t,r){"use strict";r.r(t);var n=r(28),c=r(282),a=r(6),o=r.n(a),l=r(10),u=r.n(l),s=(r(4),r(0)),i=r(5),p=r.n(i),d=r(8),b=r(69),m=r(191),f=r(7),g=r(284);r(285);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 j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=function(){return React.createElement("img",{src:d.t,alt:"",width:500,height:500})},y=function(e){var t=e.image,r=e.onLoad,n=e.loaded,c=e.showFullSize,a=t||{},o=a.thumbnail,l=a.src,u=a.srcset,s=a.sizes,i={alt:a.alt,onLoad:r,hidden:!n,src:o};return c&&(i=j(j({},i),{},{src:l,srcSet:u,sizes:s})),React.createElement(React.Fragment,null,React.createElement("img",i),!n&&React.createElement(w,null))},v=Object(m.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,c=e.productLink,a=void 0===c||c,l=e.showSaleBadge,i=e.saleBadgeAlign,d=void 0===i?"right":i,m=Object(b.useInnerBlockLayoutContext)().parentClassName,O=Object(b.useProductDataContext)().product,j=Object(s.useState)(!1),v=u()(j,2),h=v[0],E=v[1];if(!O.id)return React.createElement("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",o()({},"".concat(m,"__product-image"),m))},React.createElement(w,null));var R=Object(f.isEmpty)(O.images)?null:O.images[0];return React.createElement("div",{className:p()(t,"wc-block-components-product-image",o()({},"".concat(m,"__product-image"),m))},a?React.createElement("a",{href:O.permalink,rel:"nofollow"},!!l&&React.createElement(g.default,{align:d,product:O}),React.createElement(y,{image:R,onLoad:function(){return E(!0)},loaded:h,showFullSize:"cropped"!==n})):React.createElement(React.Fragment,null,!!l&&React.createElement(g.default,{align:d,product:O}),React.createElement(y,{image:R,onLoad:function(){return E(!0)},loaded:h,showFullSize:"cropped"!==n})))})),h={productLink:{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}};t.default=Object(n.compose)(Object(c.a)(h))(v)},34:function(e,t,r){"use strict";var n=r(6),c=r.n(n),a=(r(4),r(2)),o=r(5),l=r.n(o);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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,o=e.wrapperProps,u=void 0===o?{}:o,i=null!=r,p=null!=n;return!i&&p?(t=c||"span",u=s(s({},u),{},{className:l()(u.className,"screen-reader-text")}),React.createElement(t,u,n)):(t=c||a.Fragment,i&&p&&r!==n?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,u,r))}}}]);
build/atomic-block-components/image.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{392:function(e,t,c){"use strict";t.a={productLink:{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}}},393:function(e,t,c){"use strict";var n=c(8),r=c.n(n),a=c(11),o=c.n(a),l=c(0),i=(c(2),c(7)),u=c.n(i),s=c(5),d=c(44),p=c(73),m=c(6),b=c(266);c(554);function g(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 O(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?g(Object(c),!0).forEach((function(t){r()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):g(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var f=function(){return Object(l.createElement)("img",{src:s.G,alt:"",width:500,height:500})},j=function(e){var t=e.image,c=e.onLoad,n=e.loaded,r=e.showFullSize,a=t||{},o=a.thumbnail,i=a.src,u=a.srcset,s=a.sizes,d={alt:a.alt,onLoad:c,hidden:!n,src:o};return r&&(d=O(O({},d),{},{src:i,srcSet:u,sizes:s})),Object(l.createElement)(l.Fragment,null,Object(l.createElement)("img",d),!n&&Object(l.createElement)(f,null))};t.a=Object(p.withProductDataContext)((function(e){var t=e.className,c=e.imageSizing,n=void 0===c?"full-size":c,a=e.productLink,i=void 0===a||a,s=e.showSaleBadge,p=e.saleBadgeAlign,g=void 0===p?"right":p,O=Object(d.useInnerBlockLayoutContext)().parentClassName,w=Object(d.useProductDataContext)().product,h=Object(l.useState)(!1),y=o()(h,2),E=y[0],v=y[1];if(!w.id)return Object(l.createElement)("div",{className:u()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",r()({},"".concat(O,"__product-image"),O))},Object(l.createElement)(f,null));var k=Object(m.isEmpty)(w.images)?null:w.images[0];return Object(l.createElement)("div",{className:u()(t,"wc-block-components-product-image",r()({},"".concat(O,"__product-image"),O))},i?Object(l.createElement)("a",{href:w.permalink,rel:"nofollow"},!!s&&Object(l.createElement)(b.default,{align:g,product:w}),Object(l.createElement)(j,{image:k,onLoad:function(){return v(!0)},loaded:E,showFullSize:"cropped"!==n})):Object(l.createElement)(l.Fragment,null,!!s&&Object(l.createElement)(b.default,{align:g,product:w}),Object(l.createElement)(j,{image:k,onLoad:function(){return v(!0)},loaded:E,showFullSize:"cropped"!==n})))}))},554:function(e,t){},947:function(e,t,c){"use strict";c.r(t);var n=c(25),r=c(946),a=c(393),o=c(392);t.default=Object(n.compose)(Object(r.a)(o.a))(a.a)}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{393:function(e,t,c){"use strict";t.a={productLink:{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}}},394:function(e,t,c){"use strict";var n=c(8),r=c.n(n),a=c(11),o=c.n(a),l=c(0),i=(c(2),c(7)),u=c.n(i),s=c(5),d=c(45),p=c(73),m=c(6),b=c(267);c(554);function g(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 O(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?g(Object(c),!0).forEach((function(t){r()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):g(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var f=function(){return Object(l.createElement)("img",{src:s.G,alt:"",width:500,height:500})},j=function(e){var t=e.image,c=e.onLoad,n=e.loaded,r=e.showFullSize,a=t||{},o=a.thumbnail,i=a.src,u=a.srcset,s=a.sizes,d={alt:a.alt,onLoad:c,hidden:!n,src:o};return r&&(d=O(O({},d),{},{src:i,srcSet:u,sizes:s})),Object(l.createElement)(l.Fragment,null,Object(l.createElement)("img",d),!n&&Object(l.createElement)(f,null))};t.a=Object(p.withProductDataContext)((function(e){var t=e.className,c=e.imageSizing,n=void 0===c?"full-size":c,a=e.productLink,i=void 0===a||a,s=e.showSaleBadge,p=e.saleBadgeAlign,g=void 0===p?"right":p,O=Object(d.useInnerBlockLayoutContext)().parentClassName,w=Object(d.useProductDataContext)().product,h=Object(l.useState)(!1),y=o()(h,2),E=y[0],v=y[1];if(!w.id)return Object(l.createElement)("div",{className:u()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",r()({},"".concat(O,"__product-image"),O))},Object(l.createElement)(f,null));var k=Object(m.isEmpty)(w.images)?null:w.images[0];return Object(l.createElement)("div",{className:u()(t,"wc-block-components-product-image",r()({},"".concat(O,"__product-image"),O))},i?Object(l.createElement)("a",{href:w.permalink,rel:"nofollow"},!!s&&Object(l.createElement)(b.default,{align:g,product:w}),Object(l.createElement)(j,{image:k,onLoad:function(){return v(!0)},loaded:E,showFullSize:"cropped"!==n})):Object(l.createElement)(l.Fragment,null,!!s&&Object(l.createElement)(b.default,{align:g,product:w}),Object(l.createElement)(j,{image:k,onLoad:function(){return v(!0)},loaded:E,showFullSize:"cropped"!==n})))}))},554:function(e,t){},947:function(e,t,c){"use strict";c.r(t);var n=c(26),r=c(946),a=c(394),o=c(393);t.default=Object(n.compose)(Object(r.a)(o.a))(a.a)}}]);
build/atomic-block-components/price-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{122:function(e,r){},130:function(e,r,t){"use strict";var c=t(6),a=t.n(c),n=t(1),o=t(38),i=t(5),l=t.n(i),s=(t(4),t(149),function(e){var r=e.className,t=e.currency,c=e.maxPrice,a=e.minPrice,n=e.priceClassName,i=e.priceStyle;return React.createElement("span",{className:r},React.createElement(o.a,{className:l()("wc-block-components-product-price__value",n),currency:t,value:a,style:i})," — ",React.createElement(o.a,{className:l()("wc-block-components-product-price__value",n),currency:t,value:c,style:i}))}),u=function(e){var r=e.className,t=e.currency,c=e.regularPriceClassName,a=e.regularPriceStyle,i=e.regularPrice,s=e.priceClassName,u=e.priceStyle,p=e.price;return React.createElement("span",{className:r},React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("del",{className:l()("wc-block-components-product-price__regular",c),style:a},e)},value:i}),React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("ins",{className:l()("wc-block-components-product-price__value","is-discounted",s),style:u},e)},value:p}))};r.a=function(e){var r=e.align,t=e.className,c=e.currency,n=e.maxPrice,i=void 0===n?null:n,p=e.minPrice,m=void 0===p?null:p,f=e.price,y=void 0===f?null:f,b=e.priceClassName,d=e.priceStyle,g=e.regularPrice,v=e.regularPriceClassName,_=e.regularPriceStyle,N=l()(t,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(r),r));return g&&y!==g?React.createElement(u,{className:N,currency:c,price:y,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:v,regularPriceStyle:_}):null!==m&&null!==i?React.createElement(s,{className:N,currency:c,maxPrice:i,minPrice:m,priceClassName:b,priceStyle:d}):null!==y?React.createElement("span",{className:N},React.createElement(o.a,{className:l()("wc-block-components-product-price__value",b),currency:c,value:y,style:d})):React.createElement("span",{className:N},React.createElement("span",{className:l()("wc-block-components-product-price__value",b)}))}},149:function(e,r){},152:function(e,r,t){"use strict";t.d(r,"c",(function(){return f})),t.d(r,"b",(function(){return y})),t.d(r,"a",(function(){return b}));var c=t(6),a=t.n(c),n=t(24),o=t.n(n),i=t(2);function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){a()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u,p,m={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(u=i.CURRENCY.symbol,p=i.CURRENCY.symbolPosition,{left:u,left_space:" "+u,right:"",right_space:""}[p]||""),suffix:function(e,r){return{left:"",left_space:"",right:e,right_space:" "+e}[r]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},f=function(e){if(!e||"object"!==o()(e))return m;var r=e.currency_code,t=e.currency_symbol,c=e.currency_thousand_separator,a=e.currency_decimal_separator,n=e.currency_minor_unit,i=e.currency_prefix,l=e.currency_suffix;return{code:r||"USD",symbol:t||"$",thousandSeparator:"string"==typeof c?c:",",decimalSeparator:"string"==typeof a?a:".",minorUnit:Number.isFinite(n)?n:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof l?l:""}},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},m),e)},b=function(e,r){if(""===e||void 0===e)return"";var t=parseInt(e,10);if(!Number.isFinite(t))return"";var c=y(r),a=t/Math.pow(10,c.minorUnit),n=c.prefix+a+c.suffix,o=document.createElement("textarea");return o.innerHTML=n,o.value}},297:function(e,r,t){"use strict";t.r(r);var c=t(6),a=t.n(c),n=(t(4),t(5)),o=t.n(n),i=t(130),l=t(152),s=t(69),u=t(192),p=t(8),m=t(191);r.default=Object(m.withProductDataContext)((function(e){var r,t,c,n,m,f,y,b=e.className,d=e.align,g=e.fontSize,v=e.customFontSize,_=e.saleFontSize,N=e.customSaleFontSize,O=e.color,C=e.customColor,P=e.saleColor,j=e.customSaleColor,S=Object(s.useInnerBlockLayoutContext)().parentClassName,R=Object(s.useProductDataContext)().product,w=o()(b,a()({},"".concat(S,"__product-price"),S));if(!R.id)return React.createElement(i.a,{align:d,className:w});var E=Object(u.getColorClassName)("color",O),h=Object(u.getFontSizeClass)(g),x=Object(u.getColorClassName)("color",P),k=Object(u.getFontSizeClass)(_),U=o()((r={"has-text-color":O||C,"has-font-size":g||v},a()(r,E,E),a()(r,h,h),r)),D=o()((t={"has-text-color":P||j,"has-font-size":_||N},a()(t,x,x),a()(t,k,k),t)),z={color:C,fontSize:v},Y={color:j,fontSize:N},F=R.prices,H=Object(l.c)(F),M=F.price!==F.regular_price,T=M?o()((c={},a()(c,"".concat(S,"__product-price__value"),S),a()(c,D,Object(p.H)()),c)):o()((n={},a()(n,"".concat(S,"__product-price__value"),S),a()(n,U,Object(p.H)()),n)),V=M?Y:z;return React.createElement(i.a,{align:d,className:w,currency:H,price:F.price,priceClassName:T,priceStyle:Object(p.H)()?V:{},minPrice:null==F||null===(m=F.price_range)||void 0===m?void 0:m.min_amount,maxPrice:null==F||null===(f=F.price_range)||void 0===f?void 0:f.max_amount,regularPrice:F.regular_price,regularPriceClassName:o()((y={},a()(y,"".concat(S,"__product-price__regular"),S),a()(y,U,Object(p.H)()),y)),regularPriceStyle:Object(p.H)()?z:{}})}))},38:function(e,r,t){"use strict";var c=t(11),a=t.n(c),n=t(6),o=t.n(n),i=t(14),l=t.n(i),s=t(100),u=t(5),p=t.n(u);t(122);function m(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?m(Object(t),!0).forEach((function(r){o()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.a=function(e){var r=e.className,t=e.value,c=e.currency,n=e.onValueChange,o=l()(e,["className","value","currency","onValueChange"]);if("-"===t)return null;var i=t/Math.pow(10,c.minorUnit);if(!Number.isFinite(i))return null;var u=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),m=f(f(f({displayType:"text"},o),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(c)),{},{value:void 0,currency:void 0,onValueChange:void 0}),y=n?function(e){var r=e.value*Math.pow(10,c.minorUnit);n(r)}:function(){};return React.createElement(s.a,a()({className:u},m,{value:i,onValueChange:y}))}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{123:function(e,r){},131:function(e,r,t){"use strict";var c=t(6),a=t.n(c),n=t(1),o=t(38),i=t(5),l=t.n(i),s=(t(4),t(150),function(e){var r=e.className,t=e.currency,c=e.maxPrice,a=e.minPrice,n=e.priceClassName,i=e.priceStyle;return React.createElement("span",{className:r},React.createElement(o.a,{className:l()("wc-block-components-product-price__value",n),currency:t,value:a,style:i})," — ",React.createElement(o.a,{className:l()("wc-block-components-product-price__value",n),currency:t,value:c,style:i}))}),u=function(e){var r=e.className,t=e.currency,c=e.regularPriceClassName,a=e.regularPriceStyle,i=e.regularPrice,s=e.priceClassName,u=e.priceStyle,p=e.price;return React.createElement("span",{className:r},React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("del",{className:l()("wc-block-components-product-price__regular",c),style:a},e)},value:i}),React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("ins",{className:l()("wc-block-components-product-price__value","is-discounted",s),style:u},e)},value:p}))};r.a=function(e){var r=e.align,t=e.className,c=e.currency,n=e.maxPrice,i=void 0===n?null:n,p=e.minPrice,m=void 0===p?null:p,f=e.price,y=void 0===f?null:f,b=e.priceClassName,d=e.priceStyle,g=e.regularPrice,v=e.regularPriceClassName,_=e.regularPriceStyle,N=l()(t,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(r),r));return g&&y!==g?React.createElement(u,{className:N,currency:c,price:y,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:v,regularPriceStyle:_}):null!==m&&null!==i?React.createElement(s,{className:N,currency:c,maxPrice:i,minPrice:m,priceClassName:b,priceStyle:d}):null!==y?React.createElement("span",{className:N},React.createElement(o.a,{className:l()("wc-block-components-product-price__value",b),currency:c,value:y,style:d})):React.createElement("span",{className:N},React.createElement("span",{className:l()("wc-block-components-product-price__value",b)}))}},150:function(e,r){},153:function(e,r,t){"use strict";t.d(r,"c",(function(){return f})),t.d(r,"b",(function(){return y})),t.d(r,"a",(function(){return b}));var c=t(6),a=t.n(c),n=t(25),o=t.n(n),i=t(3);function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){a()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u,p,m={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(u=i.CURRENCY.symbol,p=i.CURRENCY.symbolPosition,{left:u,left_space:" "+u,right:"",right_space:""}[p]||""),suffix:function(e,r){return{left:"",left_space:"",right:e,right_space:" "+e}[r]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},f=function(e){if(!e||"object"!==o()(e))return m;var r=e.currency_code,t=e.currency_symbol,c=e.currency_thousand_separator,a=e.currency_decimal_separator,n=e.currency_minor_unit,i=e.currency_prefix,l=e.currency_suffix;return{code:r||"USD",symbol:t||"$",thousandSeparator:"string"==typeof c?c:",",decimalSeparator:"string"==typeof a?a:".",minorUnit:Number.isFinite(n)?n:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof l?l:""}},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},m),e)},b=function(e,r){if(""===e||void 0===e)return"";var t=parseInt(e,10);if(!Number.isFinite(t))return"";var c=y(r),a=t/Math.pow(10,c.minorUnit),n=c.prefix+a+c.suffix,o=document.createElement("textarea");return o.innerHTML=n,o.value}},297:function(e,r,t){"use strict";t.r(r);var c=t(6),a=t.n(c),n=(t(4),t(5)),o=t.n(n),i=t(131),l=t(153),s=t(69),u=t(192),p=t(8),m=t(191);r.default=Object(m.withProductDataContext)((function(e){var r,t,c,n,m,f,y,b=e.className,d=e.align,g=e.fontSize,v=e.customFontSize,_=e.saleFontSize,N=e.customSaleFontSize,O=e.color,C=e.customColor,P=e.saleColor,j=e.customSaleColor,S=Object(s.useInnerBlockLayoutContext)().parentClassName,R=Object(s.useProductDataContext)().product,w=o()(b,a()({},"".concat(S,"__product-price"),S));if(!R.id)return React.createElement(i.a,{align:d,className:w});var E=Object(u.getColorClassName)("color",O),h=Object(u.getFontSizeClass)(g),x=Object(u.getColorClassName)("color",P),k=Object(u.getFontSizeClass)(_),U=o()((r={"has-text-color":O||C,"has-font-size":g||v},a()(r,E,E),a()(r,h,h),r)),D=o()((t={"has-text-color":P||j,"has-font-size":_||N},a()(t,x,x),a()(t,k,k),t)),z={color:C,fontSize:v},Y={color:j,fontSize:N},F=R.prices,G=Object(l.c)(F),M=F.price!==F.regular_price,T=M?o()((c={},a()(c,"".concat(S,"__product-price__value"),S),a()(c,D,Object(p.G)()),c)):o()((n={},a()(n,"".concat(S,"__product-price__value"),S),a()(n,U,Object(p.G)()),n)),V=M?Y:z;return React.createElement(i.a,{align:d,className:w,currency:G,price:F.price,priceClassName:T,priceStyle:Object(p.G)()?V:{},minPrice:null==F||null===(m=F.price_range)||void 0===m?void 0:m.min_amount,maxPrice:null==F||null===(f=F.price_range)||void 0===f?void 0:f.max_amount,regularPrice:F.regular_price,regularPriceClassName:o()((y={},a()(y,"".concat(S,"__product-price__regular"),S),a()(y,U,Object(p.G)()),y)),regularPriceStyle:Object(p.G)()?z:{}})}))},38:function(e,r,t){"use strict";var c=t(11),a=t.n(c),n=t(6),o=t.n(n),i=t(14),l=t.n(i),s=t(101),u=t(5),p=t.n(u);t(123);function m(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?m(Object(t),!0).forEach((function(r){o()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.a=function(e){var r=e.className,t=e.value,c=e.currency,n=e.onValueChange,o=l()(e,["className","value","currency","onValueChange"]);if("-"===t)return null;var i=t/Math.pow(10,c.minorUnit);if(!Number.isFinite(i))return null;var u=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),m=f(f(f({displayType:"text"},o),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(c)),{},{value:void 0,currency:void 0,onValueChange:void 0}),y=n?function(e){var r=e.value*Math.pow(10,c.minorUnit);n(r)}:function(){};return React.createElement(s.a,a()({className:u},m,{value:i,onValueChange:y}))}}}]);
build/atomic-block-components/price.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{164:function(e,r,t){"use strict";var c=t(8),n=t.n(c),a=t(0),o=t(1),i=t(55),l=t(7),s=t.n(l),u=(t(2),t(236),function(e){var r=e.className,t=e.currency,c=e.maxPrice,n=e.minPrice,o=e.priceClassName,l=e.priceStyle;return Object(a.createElement)("span",{className:r},Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",o),currency:t,value:n,style:l})," — ",Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",o),currency:t,value:c,style:l}))}),p=function(e){var r=e.className,t=e.currency,c=e.regularPriceClassName,n=e.regularPriceStyle,l=e.regularPrice,u=e.priceClassName,p=e.priceStyle,m=e.price;return Object(a.createElement)("span",{className:r},Object(a.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Previous price:","woo-gutenberg-products-block")),Object(a.createElement)(i.a,{currency:t,renderText:function(e){return Object(a.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:n},e)},value:l}),Object(a.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Discounted price:","woo-gutenberg-products-block")),Object(a.createElement)(i.a,{currency:t,renderText:function(e){return Object(a.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",u),style:p},e)},value:m}))};r.a=function(e){var r=e.align,t=e.className,c=e.currency,o=e.maxPrice,l=void 0===o?null:o,m=e.minPrice,b=void 0===m?null:m,f=e.price,y=void 0===f?null:f,d=e.priceClassName,O=e.priceStyle,g=e.regularPrice,j=e.regularPriceClassName,v=e.regularPriceStyle,_=s()(t,"price","wc-block-components-product-price",n()({},"wc-block-components-product-price--align-".concat(r),r));return g&&y!==g?Object(a.createElement)(p,{className:_,currency:c,price:y,priceClassName:d,priceStyle:O,regularPrice:g,regularPriceClassName:j,regularPriceStyle:v}):null!==b&&null!==l?Object(a.createElement)(u,{className:_,currency:c,maxPrice:l,minPrice:b,priceClassName:d,priceStyle:O}):null!==y?Object(a.createElement)("span",{className:_},Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",d),currency:c,value:y,style:O})):Object(a.createElement)("span",{className:_},Object(a.createElement)("span",{className:s()("wc-block-components-product-price__value",d)}))}},193:function(e,r){},236:function(e,r){},258:function(e,r,t){"use strict";t.d(r,"c",(function(){return b})),t.d(r,"b",(function(){return f})),t.d(r,"a",(function(){return y}));var c=t(8),n=t.n(c),a=t(56),o=t.n(a),i=t(3);function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){n()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u,p,m={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(u=i.CURRENCY.symbol,p=i.CURRENCY.symbolPosition,{left:u,left_space:" "+u,right:"",right_space:""}[p]||""),suffix:function(e,r){return{left:"",left_space:"",right:e,right_space:" "+e}[r]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},b=function(e){if(!e||"object"!==o()(e))return m;var r=e.currency_code,t=e.currency_symbol,c=e.currency_thousand_separator,n=e.currency_decimal_separator,a=e.currency_minor_unit,i=e.currency_prefix,l=e.currency_suffix;return{code:r||"USD",symbol:t||"$",thousandSeparator:"string"==typeof c?c:",",decimalSeparator:"string"==typeof n?n:".",minorUnit:Number.isFinite(a)?a:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof l?l:""}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},m),e)},y=function(e,r){if(""===e||void 0===e)return"";var t=parseInt(e,10);if(!Number.isFinite(t))return"";var c=f(r),n=t/Math.pow(10,c.minorUnit),a=c.prefix+n+c.suffix,o=document.createElement("textarea");return o.innerHTML=a,o.value}},533:function(e,r,t){"use strict";t.r(r);var c=t(8),n=t.n(c),a=t(0),o=(t(2),t(7)),i=t.n(o),l=t(164),s=t(258),u=t(44),p=t(14),m=t(5),b=t(73);r.default=Object(b.withProductDataContext)((function(e){var r,t,c,o,b,f,y,d=e.className,O=e.align,g=e.fontSize,j=e.customFontSize,v=e.saleFontSize,_=e.customSaleFontSize,N=e.color,C=e.customColor,P=e.saleColor,S=e.customSaleColor,w=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,h=i()(d,n()({},"".concat(w,"__product-price"),w));if(!E.id)return Object(a.createElement)(l.a,{align:O,className:h});var x=Object(p.getColorClassName)("color",N),k=Object(p.getFontSizeClass)(g),R=Object(p.getColorClassName)("color",P),U=Object(p.getFontSizeClass)(v),D=i()((r={"has-text-color":N||C,"has-font-size":g||j},n()(r,x,x),n()(r,k,k),r)),z=i()((t={"has-text-color":P||S,"has-font-size":v||_},n()(t,R,R),n()(t,U,U),t)),Y={color:C,fontSize:j},F={color:S,fontSize:_},X=E.prices,M=Object(s.c)(X),T=X.price!==X.regular_price,V=T?i()((c={},n()(c,"".concat(w,"__product-price__value"),w),n()(c,z,Object(m.X)()),c)):i()((o={},n()(o,"".concat(w,"__product-price__value"),w),n()(o,D,Object(m.X)()),o)),B=T?F:Y;return Object(a.createElement)(l.a,{align:O,className:h,currency:M,price:X.price,priceClassName:V,priceStyle:Object(m.X)()?B:{},minPrice:null==X||null===(b=X.price_range)||void 0===b?void 0:b.min_amount,maxPrice:null==X||null===(f=X.price_range)||void 0===f?void 0:f.max_amount,regularPrice:X.regular_price,regularPriceClassName:i()((y={},n()(y,"".concat(w,"__product-price__regular"),w),n()(y,D,Object(m.X)()),y)),regularPriceStyle:Object(m.X)()?Y:{}})}))},55:function(e,r,t){"use strict";var c=t(10),n=t.n(c),a=t(8),o=t.n(a),i=t(27),l=t.n(i),s=t(0),u=t(183),p=t(7),m=t.n(p);t(193);function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?b(Object(t),!0).forEach((function(r){o()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.a=function(e){var r=e.className,t=e.value,c=e.currency,a=e.onValueChange,o=l()(e,["className","value","currency","onValueChange"]);if("-"===t)return null;var i=t/Math.pow(10,c.minorUnit);if(!Number.isFinite(i))return null;var p=m()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),b=f(f(f({displayType:"text"},o),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(c)),{},{value:void 0,currency:void 0,onValueChange:void 0}),y=a?function(e){var r=e.value*Math.pow(10,c.minorUnit);a(r)}:function(){};return Object(s.createElement)(u.a,n()({className:p},b,{value:i,onValueChange:y}))}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{164:function(e,r,t){"use strict";var c=t(8),n=t.n(c),a=t(0),o=t(1),i=t(55),l=t(7),s=t.n(l),u=(t(2),t(237),function(e){var r=e.className,t=e.currency,c=e.maxPrice,n=e.minPrice,o=e.priceClassName,l=e.priceStyle;return Object(a.createElement)("span",{className:r},Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",o),currency:t,value:n,style:l})," — ",Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",o),currency:t,value:c,style:l}))}),p=function(e){var r=e.className,t=e.currency,c=e.regularPriceClassName,n=e.regularPriceStyle,l=e.regularPrice,u=e.priceClassName,p=e.priceStyle,m=e.price;return Object(a.createElement)("span",{className:r},Object(a.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Previous price:","woo-gutenberg-products-block")),Object(a.createElement)(i.a,{currency:t,renderText:function(e){return Object(a.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:n},e)},value:l}),Object(a.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Discounted price:","woo-gutenberg-products-block")),Object(a.createElement)(i.a,{currency:t,renderText:function(e){return Object(a.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",u),style:p},e)},value:m}))};r.a=function(e){var r=e.align,t=e.className,c=e.currency,o=e.maxPrice,l=void 0===o?null:o,m=e.minPrice,b=void 0===m?null:m,f=e.price,y=void 0===f?null:f,d=e.priceClassName,O=e.priceStyle,g=e.regularPrice,j=e.regularPriceClassName,v=e.regularPriceStyle,_=s()(t,"price","wc-block-components-product-price",n()({},"wc-block-components-product-price--align-".concat(r),r));return g&&y!==g?Object(a.createElement)(p,{className:_,currency:c,price:y,priceClassName:d,priceStyle:O,regularPrice:g,regularPriceClassName:j,regularPriceStyle:v}):null!==b&&null!==l?Object(a.createElement)(u,{className:_,currency:c,maxPrice:l,minPrice:b,priceClassName:d,priceStyle:O}):null!==y?Object(a.createElement)("span",{className:_},Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",d),currency:c,value:y,style:O})):Object(a.createElement)("span",{className:_},Object(a.createElement)("span",{className:s()("wc-block-components-product-price__value",d)}))}},194:function(e,r){},237:function(e,r){},259:function(e,r,t){"use strict";t.d(r,"c",(function(){return b})),t.d(r,"b",(function(){return f})),t.d(r,"a",(function(){return y}));var c=t(8),n=t.n(c),a=t(60),o=t.n(a),i=t(3);function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){n()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u,p,m={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(u=i.CURRENCY.symbol,p=i.CURRENCY.symbolPosition,{left:u,left_space:" "+u,right:"",right_space:""}[p]||""),suffix:function(e,r){return{left:"",left_space:"",right:e,right_space:" "+e}[r]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},b=function(e){if(!e||"object"!==o()(e))return m;var r=e.currency_code,t=e.currency_symbol,c=e.currency_thousand_separator,n=e.currency_decimal_separator,a=e.currency_minor_unit,i=e.currency_prefix,l=e.currency_suffix;return{code:r||"USD",symbol:t||"$",thousandSeparator:"string"==typeof c?c:",",decimalSeparator:"string"==typeof n?n:".",minorUnit:Number.isFinite(a)?a:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof l?l:""}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},m),e)},y=function(e,r){if(""===e||void 0===e)return"";var t=parseInt(e,10);if(!Number.isFinite(t))return"";var c=f(r),n=t/Math.pow(10,c.minorUnit),a=c.prefix+n+c.suffix,o=document.createElement("textarea");return o.innerHTML=a,o.value}},534:function(e,r,t){"use strict";t.r(r);var c=t(8),n=t.n(c),a=t(0),o=(t(2),t(7)),i=t.n(o),l=t(164),s=t(259),u=t(45),p=t(14),m=t(5),b=t(73);r.default=Object(b.withProductDataContext)((function(e){var r,t,c,o,b,f,y,d=e.className,O=e.align,g=e.fontSize,j=e.customFontSize,v=e.saleFontSize,_=e.customSaleFontSize,N=e.color,C=e.customColor,P=e.saleColor,S=e.customSaleColor,w=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,h=i()(d,n()({},"".concat(w,"__product-price"),w));if(!E.id)return Object(a.createElement)(l.a,{align:O,className:h});var x=Object(p.getColorClassName)("color",N),k=Object(p.getFontSizeClass)(g),R=Object(p.getColorClassName)("color",P),U=Object(p.getFontSizeClass)(v),D=i()((r={"has-text-color":N||C,"has-font-size":g||j},n()(r,x,x),n()(r,k,k),r)),z=i()((t={"has-text-color":P||S,"has-font-size":v||_},n()(t,R,R),n()(t,U,U),t)),Y={color:C,fontSize:j},F={color:S,fontSize:_},X=E.prices,M=Object(s.c)(X),T=X.price!==X.regular_price,V=T?i()((c={},n()(c,"".concat(w,"__product-price__value"),w),n()(c,z,Object(m.X)()),c)):i()((o={},n()(o,"".concat(w,"__product-price__value"),w),n()(o,D,Object(m.X)()),o)),B=T?F:Y;return Object(a.createElement)(l.a,{align:O,className:h,currency:M,price:X.price,priceClassName:V,priceStyle:Object(m.X)()?B:{},minPrice:null==X||null===(b=X.price_range)||void 0===b?void 0:b.min_amount,maxPrice:null==X||null===(f=X.price_range)||void 0===f?void 0:f.max_amount,regularPrice:X.regular_price,regularPriceClassName:i()((y={},n()(y,"".concat(w,"__product-price__regular"),w),n()(y,D,Object(m.X)()),y)),regularPriceStyle:Object(m.X)()?Y:{}})}))},55:function(e,r,t){"use strict";var c=t(10),n=t.n(c),a=t(8),o=t.n(a),i=t(27),l=t.n(i),s=t(0),u=t(184),p=t(7),m=t.n(p);t(194);function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?b(Object(t),!0).forEach((function(r){o()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.a=function(e){var r=e.className,t=e.value,c=e.currency,a=e.onValueChange,o=l()(e,["className","value","currency","onValueChange"]);if("-"===t)return null;var i=t/Math.pow(10,c.minorUnit);if(!Number.isFinite(i))return null;var p=m()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),b=f(f(f({displayType:"text"},o),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(c)),{},{value:void 0,currency:void 0,onValueChange:void 0}),y=a?function(e){var r=e.value*Math.pow(10,c.minorUnit);a(r)}:function(){};return Object(s.createElement)(u.a,n()({className:p},b,{value:i,onValueChange:y}))}}}]);
build/atomic-block-components/rating.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{534:function(t,e,c){"use strict";c.r(e);var a=c(8),n=c.n(a),r=c(0),o=(c(2),c(1)),s=c(7),u=c.n(s),i=c(44),l=c(73),p=(c(555),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)(Object(o.__)("Rated %f out of 5","woo-gutenberg-products-block"),s);return Object(r.createElement)("div",{className:u()(e,"star-rating","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)))}))},555:function(t,e){}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{535:function(t,e,c){"use strict";c.r(e);var a=c(8),n=c.n(a),r=c(0),o=(c(2),c(1)),s=c(7),u=c.n(s),i=c(45),l=c(73),p=(c(555),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)(Object(o.__)("Rated %f out of 5","woo-gutenberg-products-block"),s);return Object(r.createElement)("div",{className:u()(e,"star-rating","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)))}))},555:function(t,e){}}]);
build/atomic-block-components/sale-badge-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{283:function(e,t){},284:function(e,t,r){"use strict";r.r(t);var c=r(6),n=r.n(c),a=(r(4),r(1)),o=r(5),s=r.n(o),l=r(33),u=r(69),p=r(191);r(283);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")}))}))},33:function(e,t,r){"use strict";var c=r(6),n=r.n(c),a=(r(4),r(3)),o=r(5),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<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,o=e.wrapperProps,l=void 0===o?{}:o,p=null!=r,b=null!=c;return!p&&b?(t=n||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),React.createElement(t,l,c)):(t=n||a.Fragment,p&&b&&r!==c?React.createElement(t,l,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},c)):React.createElement(t,l,r))}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{283:function(e,t){},284:function(e,t,r){"use strict";r.r(t);var c=r(6),n=r.n(c),a=(r(4),r(1)),o=r(5),s=r.n(o),l=r(34),u=r(69),p=r(191);r(283);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")}))}))},34:function(e,t,r){"use strict";var c=r(6),n=r.n(c),a=(r(4),r(2)),o=r(5),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<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,o=e.wrapperProps,l=void 0===o?{}:o,p=null!=r,b=null!=c;return!p&&b?(t=n||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),React.createElement(t,l,c)):(t=n||a.Fragment,p&&b&&r!==c?React.createElement(t,l,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},c)):React.createElement(t,l,r))}}}]);
build/atomic-block-components/sale-badge.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{266:function(e,t,r){"use strict";r.r(t);var c=r(8),n=r.n(c),a=r(0),o=(r(2),r(1)),s=r(7),l=r.n(s),u=r(48),b=r(44),p=r(73);r(553);t.default=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(b.useInnerBlockLayoutContext)().parentClassName,s=Object(b.useProductDataContext)().product;if(!s.id||!s.on_sale)return null;var p="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(a.createElement)("div",{className:l()("wc-block-components-product-sale-badge",t,p,n()({},"".concat(c,"__product-onsale"),c))},Object(a.createElement)(u.a,{label:Object(o.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Product on sale","woo-gutenberg-products-block")}))}))},48:function(e,t,r){"use strict";var c=r(8),n=r.n(c),a=r(0),o=(r(2),r(9)),s=r(7),l=r.n(s);function u(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 b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,s=e.wrapperProps,u=void 0===s?{}:s,p=null!=r,i=null!=c;return!p&&i?(t=n||"span",u=b(b({},u),{},{className:l()(u.className,"screen-reader-text")}),Object(a.createElement)(t,u,c)):(t=n||o.Fragment,p&&i&&r!==c?Object(a.createElement)(t,u,Object(a.createElement)("span",{"aria-hidden":"true"},r),Object(a.createElement)("span",{className:"screen-reader-text"},c)):Object(a.createElement)(t,u,r))}},553:function(e,t){}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{267:function(e,t,r){"use strict";r.r(t);var c=r(8),n=r.n(c),a=r(0),o=(r(2),r(1)),s=r(7),l=r.n(s),u=r(48),b=r(45),p=r(73);r(553);t.default=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(b.useInnerBlockLayoutContext)().parentClassName,s=Object(b.useProductDataContext)().product;if(!s.id||!s.on_sale)return null;var p="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(a.createElement)("div",{className:l()("wc-block-components-product-sale-badge",t,p,n()({},"".concat(c,"__product-onsale"),c))},Object(a.createElement)(u.a,{label:Object(o.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Product on sale","woo-gutenberg-products-block")}))}))},48:function(e,t,r){"use strict";var c=r(8),n=r.n(c),a=r(0),o=(r(2),r(9)),s=r(7),l=r.n(s);function u(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 b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,s=e.wrapperProps,u=void 0===s?{}:s,p=null!=r,i=null!=c;return!p&&i?(t=n||"span",u=b(b({},u),{},{className:l()(u.className,"screen-reader-text")}),Object(a.createElement)(t,u,c)):(t=n||o.Fragment,p&&i&&r!==c?Object(a.createElement)(t,u,Object(a.createElement)("span",{"aria-hidden":"true"},r),Object(a.createElement)("span",{className:"screen-reader-text"},c)):Object(a.createElement)(t,u,r))}},553:function(e,t){}}]);
build/atomic-block-components/sku.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{538:function(t,c,e){"use strict";e.r(c);var n=e(8),o=e.n(n),u=e(0),s=e(1),a=(e(2),e(7)),r=e.n(a),l=e(44),b=e(73);e(558);c.default=Object(b.withProductDataContext)((function(t){var c=t.className,e=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product.sku;return n?Object(u.createElement)("div",{className:r()(c,"wc-block-components-product-sku",o()({},"".concat(e,"__product-sku"),e))},Object(s.__)("SKU:","woo-gutenberg-products-block")," ",Object(u.createElement)("strong",null,n)):null}))},558:function(t,c){}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{539:function(t,c,e){"use strict";e.r(c);var n=e(8),o=e.n(n),u=e(0),s=e(1),a=(e(2),e(7)),r=e.n(a),l=e(45),b=e(73);e(558);c.default=Object(b.withProductDataContext)((function(t){var c=t.className,e=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product.sku;return n?Object(u.createElement)("div",{className:r()(c,"wc-block-components-product-sku",o()({},"".concat(e,"__product-sku"),e))},Object(s.__)("SKU:","woo-gutenberg-products-block")," ",Object(u.createElement)("strong",null,n)):null}))},558:function(t,c){}}]);
build/atomic-block-components/stock-indicator.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{541:function(o,c,t){"use strict";t.r(c);var n=t(8),e=t.n(n),r=t(0),s=t(1),a=(t(2),t(7)),i=t.n(a),u=t(44),k=t(73),b=(t(561),function(o){return Object(s.sprintf)(Object(s.__)("%d left in stock","woo-gutenberg-products-block"),o)}),d=function(o,c){return c?Object(s.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(s.__)("In Stock","woo-gutenberg-products-block"):Object(s.__)("Out of Stock","woo-gutenberg-products-block")};c.default=Object(k.withProductDataContext)((function(o){var c,t=o.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,s=Object(u.useProductDataContext)().product;if(!s.id||!s.is_purchasable)return null;var a=!!s.is_in_stock,k=s.low_stock_remaining,l=s.is_on_backorder;return Object(r.createElement)("div",{className:i()(t,"wc-block-components-product-stock-indicator",(c={},e()(c,"".concat(n,"__stock-indicator"),n),e()(c,"wc-block-components-product-stock-indicator--in-stock",a),e()(c,"wc-block-components-product-stock-indicator--out-of-stock",!a),e()(c,"wc-block-components-product-stock-indicator--low-stock",!!k),e()(c,"wc-block-components-product-stock-indicator--available-on-backorder",!!l),c))},k?b(k):d(a,l))}))},561:function(o,c){}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{542:function(o,c,t){"use strict";t.r(c);var n=t(8),e=t.n(n),r=t(0),s=t(1),a=(t(2),t(7)),i=t.n(a),u=t(45),k=t(73),b=(t(561),function(o){return Object(s.sprintf)(Object(s.__)("%d left in stock","woo-gutenberg-products-block"),o)}),d=function(o,c){return c?Object(s.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(s.__)("In Stock","woo-gutenberg-products-block"):Object(s.__)("Out of Stock","woo-gutenberg-products-block")};c.default=Object(k.withProductDataContext)((function(o){var c,t=o.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,s=Object(u.useProductDataContext)().product;if(!s.id||!s.is_purchasable)return null;var a=!!s.is_in_stock,k=s.low_stock_remaining,l=s.is_on_backorder;return Object(r.createElement)("div",{className:i()(t,"wc-block-components-product-stock-indicator",(c={},e()(c,"".concat(n,"__stock-indicator"),n),e()(c,"wc-block-components-product-stock-indicator--in-stock",a),e()(c,"wc-block-components-product-stock-indicator--out-of-stock",!a),e()(c,"wc-block-components-product-stock-indicator--low-stock",!!k),e()(c,"wc-block-components-product-stock-indicator--available-on-backorder",!!l),c))},k?b(k):d(a,l))}))},561:function(o,c){}}]);
build/atomic-block-components/summary-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{135:function(t,e,n){"use strict";var c=n(0),r=n(95),o=n(79),a=function(t){var e=t.indexOf("</p>");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]:"&hellip;",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]:"&hellip;",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)}},290:function(t,e){},300:function(t,e,n){"use strict";n.r(e);var c=n(6),r=n.n(c),o=(n(4),n(5)),a=n.n(o),u=n(135),s=n(2),i=n(69),l=n(191);n(290);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;if(!o)return null;var l=Object(s.getSetting)("wordCountType","words");return React.createElement(u.a,{className:a()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n)),source:o,maxLength:150,countType:l})}))}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{136:function(t,e,n){"use strict";var c=n(0),r=n(95),o=n(79),a=function(t){var e=t.indexOf("</p>");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]:"&hellip;",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]:"&hellip;",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)}},290:function(t,e){},300:function(t,e,n){"use strict";n.r(e);var c=n(6),r=n.n(c),o=(n(4),n(5)),a=n.n(o),u=n(136),s=n(3),i=n(69),l=n(191);n(290);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;if(!o)return null;var l=Object(s.getSetting)("wordCountType","words");return React.createElement(u.a,{className:a()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n)),source:o,maxLength:150,countType:l})}))}}]);
build/atomic-block-components/summary.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{176:function(t,e,n){"use strict";var c=n(0),r=n(142),o=n(95),a=function(t){var e=t.indexOf("</p>");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]:"&hellip;",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]:"&hellip;",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 Object(c.createElement)(c.RawHTML,{className:m},v)}},537:function(t,e,n){"use strict";n.r(e);var c=n(8),r=n.n(c),o=n(0),a=(n(2),n(7)),u=n.n(a),s=n(176),i=n(3),l=n(44),p=n(73);n(557);e.default=Object(p.withProductDataContext)((function(t){var e=t.className,n=Object(l.useInnerBlockLayoutContext)().parentClassName,c=Object(l.useProductDataContext)().product;if(!c)return Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n))});var a=c.short_description?c.short_description:c.description;if(!a)return null;var p=Object(i.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:u()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n)),source:a,maxLength:150,countType:p})}))},557:function(t,e){}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{177:function(t,e,n){"use strict";var c=n(0),r=n(142),o=n(95),a=function(t){var e=t.indexOf("</p>");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]:"&hellip;",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]:"&hellip;",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 Object(c.createElement)(c.RawHTML,{className:m},v)}},538:function(t,e,n){"use strict";n.r(e);var c=n(8),r=n.n(c),o=n(0),a=(n(2),n(7)),u=n.n(a),s=n(177),i=n(3),l=n(45),p=n(73);n(557);e.default=Object(p.withProductDataContext)((function(t){var e=t.className,n=Object(l.useInnerBlockLayoutContext)().parentClassName,c=Object(l.useProductDataContext)().product;if(!c)return Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n))});var a=c.short_description?c.short_description:c.description;if(!a)return null;var p=Object(i.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:u()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n)),source:a,maxLength:150,countType:p})}))},557:function(t,e){}}]);
build/atomic-block-components/tag-list.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{540:function(t,e,c){"use strict";c.r(e);var n=c(8),a=c.n(n),o=c(0),s=c(1),l=(c(2),c(7)),u=c.n(l),r=c(44),i=c(6),b=c(73);c(560);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))}))))}))},560:function(t,e){}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{541:function(t,e,c){"use strict";c.r(e);var n=c(8),a=c.n(n),o=c(0),s=c(1),l=(c(2),c(7)),u=c.n(l),r=c(45),i=c(6),b=c(73);c(560);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))}))))}))},560:function(t,e){}}]);
build/atomic-block-components/title-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{180:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var o=function(e,t){var c=[];return Object.keys(e).forEach((function(o){if(void 0!==t[o])switch(e[o].type){case"boolean":c[o]="false"!==t[o]&&!1!==t[o];break;case"number":c[o]=parseInt(t[o],10);break;case"array":case"object":c[o]=JSON.parse(t[o]);break;default:c[o]=t[o]}else c[o]=e[o].default})),c}},282:function(e,t,c){"use strict";var o=c(11),n=c.n(o),r=c(180);t.a=function(e){return function(t){return function(c){var o=Object(r.a)(e,c);return React.createElement(t,n()({},c,o))}}}},286:function(e,t){},306:function(e,t,c){"use strict";c.r(t);var o=c(26),n=c(282),r=c(6),a=c.n(r),i=(c(4),c(5)),s=c.n(i),l=c(17),u=c(69),p=c(192),b=c(8),f=function(e){var t=e.color,c=e.fontSize;return Object(b.H)()?{color:t,fontSize:c}:{}},O=c(191),d=(c(286),Object(O.withProductDataContext)((function(e){var t,c,o,n=e.className,r=e.headingLevel,i=void 0===r?2:r,O=e.productLink,d=void 0===O||O,m=e.align,j=e.color,y=e.customColor,g=e.fontSize,v=e.customFontSize,w=Object(u.useInnerBlockLayoutContext)().parentClassName,k=Object(u.useProductDataContext)().product,h="h".concat(i),S=Object(p.getColorClassName)("color",j),z=Object(p.getFontSizeClass)(g),P=s()((t={"has-text-color":j||y,"has-font-size":g||v},a()(t,S,S),a()(t,z,z),t));if(!k.id)return React.createElement(h,{className:s()(n,"wc-block-components-product-title",(o={},a()(o,"".concat(w,"__product-title"),w),a()(o,"wc-block-components-product-title--align-".concat(m),m&&Object(b.H)()),a()(o,P,Object(b.H)()),o)),style:f({color:y,fontSize:v})});var C=Object(l.decodeEntities)(k.name);return React.createElement(h,{className:s()(n,"wc-block-components-product-title",(c={},a()(c,"".concat(w,"__product-title"),w),a()(c,"wc-block-components-product-title--align-".concat(m),m&&Object(b.H)()),c))},d?React.createElement("a",{href:k.permalink,rel:"nofollow",className:s()(a()({},P,Object(b.H)())),style:f({color:y,fontSize:v})},C):React.createElement("span",{className:s()(a()({},P,Object(b.H)())),style:f({color:y,fontSize:v})},C))})));function m(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,o)}return c}function j(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?m(Object(c),!0).forEach((function(t){a()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):m(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var y={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(b.H)()&&(y=j(j({},y),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}));var g=y;t.default=Object(o.compose)(Object(n.a)(g))(d)}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{181:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var o=function(e,t){var c=[];return Object.keys(e).forEach((function(o){if(void 0!==t[o])switch(e[o].type){case"boolean":c[o]="false"!==t[o]&&!1!==t[o];break;case"number":c[o]=parseInt(t[o],10);break;case"array":case"object":c[o]=JSON.parse(t[o]);break;default:c[o]=t[o]}else c[o]=e[o].default})),c}},282:function(e,t,c){"use strict";var o=c(11),n=c.n(o),r=c(181);t.a=function(e){return function(t){return function(c){var o=Object(r.a)(e,c);return React.createElement(t,n()({},c,o))}}}},286:function(e,t){},306:function(e,t,c){"use strict";c.r(t);var o=c(28),n=c(282),r=c(6),a=c.n(r),i=(c(4),c(5)),s=c.n(i),l=c(17),u=c(69),p=c(192),b=c(8),f=function(e){var t=e.color,c=e.fontSize;return Object(b.G)()?{color:t,fontSize:c}:{}},O=c(191),d=(c(286),Object(O.withProductDataContext)((function(e){var t,c,o,n=e.className,r=e.headingLevel,i=void 0===r?2:r,O=e.productLink,d=void 0===O||O,m=e.align,j=e.color,y=e.customColor,g=e.fontSize,v=e.customFontSize,w=Object(u.useInnerBlockLayoutContext)().parentClassName,k=Object(u.useProductDataContext)().product,h="h".concat(i),S=Object(p.getColorClassName)("color",j),z=Object(p.getFontSizeClass)(g),P=s()((t={"has-text-color":j||y,"has-font-size":g||v},a()(t,S,S),a()(t,z,z),t));if(!k.id)return React.createElement(h,{className:s()(n,"wc-block-components-product-title",(o={},a()(o,"".concat(w,"__product-title"),w),a()(o,"wc-block-components-product-title--align-".concat(m),m&&Object(b.G)()),a()(o,P,Object(b.G)()),o)),style:f({color:y,fontSize:v})});var C=Object(l.decodeEntities)(k.name);return React.createElement(h,{className:s()(n,"wc-block-components-product-title",(c={},a()(c,"".concat(w,"__product-title"),w),a()(c,"wc-block-components-product-title--align-".concat(m),m&&Object(b.G)()),c))},d?React.createElement("a",{href:k.permalink,rel:"nofollow",className:s()(a()({},P,Object(b.G)())),style:f({color:y,fontSize:v})},C):React.createElement("span",{className:s()(a()({},P,Object(b.G)())),style:f({color:y,fontSize:v})},C))})));function m(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,o)}return c}function j(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?m(Object(c),!0).forEach((function(t){a()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):m(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var y={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(b.G)()&&(y=j(j({},y),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}));var g=y;t.default=Object(o.compose)(Object(n.a)(g))(d)}}]);
build/atomic-block-components/title.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{391:function(t,e,o){"use strict";var c=o(8),n=o.n(c),r=o(5);function a(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,c)}return o}function l(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?a(Object(o),!0).forEach((function(e){n()(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var i={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(r.X)()&&(i=l(l({},i),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),e.a=i},399:function(t,e,o){"use strict";var c=o(8),n=o.n(c),r=o(0),a=(o(2),o(7)),l=o.n(a),i=o(33),s=o(44),u=o(14),p=o(5),b=function(t){var e=t.color,o=t.fontSize;return Object(p.X)()?{color:e,fontSize:o}:{}},O=o(73);o(552),e.a=Object(O.withProductDataContext)((function(t){var e,o,c,a=t.className,O=t.headingLevel,f=void 0===O?2:O,j=t.productLink,d=void 0===j||j,m=t.align,y=t.color,g=t.customColor,w=t.fontSize,v=t.customFontSize,k=Object(s.useInnerBlockLayoutContext)().parentClassName,h=Object(s.useProductDataContext)().product,S="h".concat(f),z=Object(u.getColorClassName)("color",y),P=Object(u.getFontSizeClass)(w),C=l()((e={"has-text-color":y||g,"has-font-size":w||v},n()(e,z,z),n()(e,P,P),e));if(!h.id)return Object(r.createElement)(S,{className:l()(a,"wc-block-components-product-title",(c={},n()(c,"".concat(k,"__product-title"),k),n()(c,"wc-block-components-product-title--align-".concat(m),m&&Object(p.X)()),n()(c,C,Object(p.X)()),c)),style:b({color:g,fontSize:v})});var E=Object(i.decodeEntities)(h.name);return Object(r.createElement)(S,{className:l()(a,"wc-block-components-product-title",(o={},n()(o,"".concat(k,"__product-title"),k),n()(o,"wc-block-components-product-title--align-".concat(m),m&&Object(p.X)()),o))},d?Object(r.createElement)("a",{href:h.permalink,rel:"nofollow",className:l()(n()({},C,Object(p.X)())),style:b({co