WooCommerce Gutenberg Products Block - Version 4.5.0-dev

Version Description

Download this release

Release Info

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

Code changes from version 4.4.2 to 4.5.0-dev

Files changed (87) hide show
  1. assets/js/base/components/cart-checkout/address-form/address-form.js +16 -13
  2. assets/js/base/components/cart-checkout/address-form/country-address-fields.js +59 -526
  3. assets/js/base/components/cart-checkout/address-form/default-address-fields.js +9 -9
  4. assets/js/base/components/cart-checkout/address-form/prepare-address-fields.js +39 -0
  5. assets/js/base/components/cart-checkout/address-form/test/index.js +3 -0
  6. assets/js/base/components/cart-checkout/order-summary/index.js +1 -0
  7. assets/js/base/components/cart-checkout/order-summary/order-summary-item.js +61 -13
  8. assets/js/base/components/cart-checkout/order-summary/style.scss +7 -8
  9. assets/js/base/components/cart-checkout/product-details/style.scss +4 -0
  10. assets/js/base/components/cart-checkout/product-sale-badge/index.js +23 -15
  11. assets/js/base/components/cart-checkout/shipping-rates-control/index.js +6 -2
  12. assets/js/base/components/cart-checkout/totals/coupon/index.js +0 -1
  13. assets/js/base/components/cart-checkout/totals/footer-item/index.js +12 -6
  14. assets/js/base/components/cart-checkout/totals/footer-item/style.scss +1 -1
  15. assets/js/base/components/cart-checkout/totals/shipping/style.scss +5 -13
  16. assets/js/base/components/payment-methods/style.scss +15 -5
  17. assets/js/base/components/product-price/index.js +38 -34
  18. assets/js/base/components/product-price/test/__snapshots__/index.js.snap +57 -0
  19. assets/js/base/components/product-price/test/index.js +63 -0
  20. assets/js/base/components/radio-control/style.scss +10 -3
  21. assets/js/base/components/select/style.scss +6 -0
  22. assets/js/base/components/sidebar-layout/style.scss +3 -5
  23. assets/js/base/context/cart-checkout/checkout/processor/index.js +9 -0
  24. assets/js/base/context/cart-checkout/payment-methods/test/payment-method-data-context.js +1 -1
  25. assets/js/base/hooks/cart/test/use-store-cart.js +4 -1
  26. assets/js/base/hooks/cart/use-store-cart.js +9 -5
  27. assets/js/blocks/cart-checkout/cart/full-cart/cart-line-item-row.js +87 -14
  28. assets/js/blocks/cart-checkout/cart/full-cart/index.js +61 -50
  29. assets/js/blocks/cart-checkout/cart/full-cart/style.scss +15 -12
  30. assets/js/blocks/cart-checkout/cart/test/block.js +4 -2
  31. assets/js/blocks/cart-checkout/checkout/block.js +1 -1
  32. assets/js/blocks/cart-checkout/checkout/form/address-step.js +1 -8
  33. assets/js/blocks/cart-checkout/checkout/form/order-notes/style.scss +12 -2
  34. assets/js/blocks/cart-checkout/checkout/form/style.scss +8 -2
  35. assets/js/blocks/cart-checkout/checkout/style.scss +7 -10
  36. assets/js/data/cart/test/reducers.js +3 -0
  37. assets/js/data/cart/test/resolvers.js +2 -0
  38. assets/js/data/default-states.js +1 -0
  39. assets/js/settings/blocks/constants.js +5 -1
  40. build/active-filters-frontend.asset.php +0 -1
  41. build/active-filters-frontend.js +0 -6
  42. build/active-filters.asset.php +0 -1
  43. build/active-filters.js +0 -1
  44. build/all-products-frontend.asset.php +0 -1
  45. build/all-products-frontend.js +0 -6
  46. build/all-products.asset.php +0 -1
  47. build/all-products.js +0 -1
  48. build/all-reviews.asset.php +0 -1
  49. build/all-reviews.js +0 -1
  50. build/atomic-block-components/add-to-cart--atomic-block-components/button.js +0 -1
  51. build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js +0 -1
  52. build/atomic-block-components/add-to-cart-frontend.js +0 -1
  53. build/atomic-block-components/add-to-cart.js +0 -1
  54. build/atomic-block-components/button-frontend.js +0 -1
  55. build/atomic-block-components/button.js +0 -1
  56. build/atomic-block-components/category-list-frontend.js +0 -1
  57. build/atomic-block-components/category-list.js +0 -1
  58. build/atomic-block-components/image-frontend.js +0 -1
  59. build/atomic-block-components/image.js +0 -1
  60. build/atomic-block-components/price-frontend.js +0 -1
  61. build/atomic-block-components/price.js +0 -1
  62. build/atomic-block-components/rating-frontend.js +0 -1
  63. build/atomic-block-components/rating.js +0 -1
  64. build/atomic-block-components/sale-badge-frontend.js +0 -1
  65. build/atomic-block-components/sale-badge.js +0 -1
  66. build/atomic-block-components/sku-frontend.js +0 -1
  67. build/atomic-block-components/sku.js +0 -1
  68. build/atomic-block-components/stock-indicator-frontend.js +0 -1
  69. build/atomic-block-components/stock-indicator.js +0 -1
  70. build/atomic-block-components/summary-frontend.js +0 -1
  71. build/atomic-block-components/summary.js +0 -1
  72. build/atomic-block-components/tag-list-frontend.js +0 -1
  73. build/atomic-block-components/tag-list.js +0 -1
  74. build/atomic-block-components/title-frontend.js +0 -1
  75. build/atomic-block-components/title.js +0 -1
  76. build/attribute-filter-frontend.asset.php +0 -1
  77. build/attribute-filter-frontend.js +0 -14
  78. build/attribute-filter.asset.php +0 -1
  79. build/attribute-filter.js +0 -1
  80. build/blocks-checkout.asset.php +0 -1
  81. build/blocks-checkout.js +0 -6
  82. build/blocks.asset.php +0 -1
  83. build/blocks.js +0 -1
  84. build/cart-frontend.asset.php +0 -1
  85. build/cart-frontend.js +0 -14
  86. build/cart.asset.php +0 -1
  87. build/cart.js +0 -1
assets/js/base/components/cart-checkout/address-form/address-form.js CHANGED
@@ -12,15 +12,16 @@ import {
12
  ShippingStateInput,
13
  } from '@woocommerce/base-components/state-input';
14
  import { useValidationContext } from '@woocommerce/base-context';
15
- import { useEffect } from '@wordpress/element';
16
  import { __ } from '@wordpress/i18n';
17
  import { withInstanceId } from '@woocommerce/base-hocs/with-instance-id';
 
18
 
19
  /**
20
  * Internal dependencies
21
  */
22
  import defaultAddressFields from './default-address-fields';
23
- import countryAddressFields from './country-address-fields';
24
 
25
  // If it's the shipping address form and the user starts entering address
26
  // values without having set the country first, show an error.
@@ -76,18 +77,20 @@ const AddressForm = ( {
76
  setValidationErrors,
77
  clearValidationError,
78
  } = useValidationContext();
79
- const countryLocale = countryAddressFields[ values.country ] || {};
80
- const addressFields = fields.map( ( field ) => ( {
81
- key: field,
82
- ...defaultAddressFields[ field ],
83
- ...countryLocale[ field ],
84
- ...fieldConfig[ field ],
85
- } ) );
86
- const sortedAddressFields = addressFields.sort(
87
- ( a, b ) => a.index - b.index
88
- );
89
  const countryValidationError =
90
  getValidationError( 'shipping-missing-country' ) || {};
 
 
 
 
 
 
 
 
 
91
  useEffect( () => {
92
  if ( type === 'shipping' ) {
93
  validateShippingCountry(
@@ -111,7 +114,7 @@ const AddressForm = ( {
111
 
112
  return (
113
  <div id={ id } className="wc-block-components-address-form">
114
- { sortedAddressFields.map( ( field ) => {
115
  if ( field.hidden ) {
116
  return null;
117
  }
12
  ShippingStateInput,
13
  } from '@woocommerce/base-components/state-input';
14
  import { useValidationContext } from '@woocommerce/base-context';
15
+ import { useEffect, useMemo } from '@wordpress/element';
16
  import { __ } from '@wordpress/i18n';
17
  import { withInstanceId } from '@woocommerce/base-hocs/with-instance-id';
18
+ import { useShallowEqual } from '@woocommerce/base-hooks';
19
 
20
  /**
21
  * Internal dependencies
22
  */
23
  import defaultAddressFields from './default-address-fields';
24
+ import prepareAddressFields from './prepare-address-fields';
25
 
26
  // If it's the shipping address form and the user starts entering address
27
  // values without having set the country first, show an error.
77
  setValidationErrors,
78
  clearValidationError,
79
  } = useValidationContext();
80
+
81
+ const currentFields = useShallowEqual( fields );
82
+
 
 
 
 
 
 
 
83
  const countryValidationError =
84
  getValidationError( 'shipping-missing-country' ) || {};
85
+
86
+ const addressFormFields = useMemo( () => {
87
+ return prepareAddressFields(
88
+ currentFields,
89
+ fieldConfig,
90
+ values.country
91
+ );
92
+ }, [ currentFields, fieldConfig, values.country ] );
93
+
94
  useEffect( () => {
95
  if ( type === 'shipping' ) {
96
  validateShippingCountry(
114
 
115
  return (
116
  <div id={ id } className="wc-block-components-address-form">
117
+ { addressFormFields.map( ( field ) => {
118
  if ( field.hidden ) {
119
  return null;
120
  }
assets/js/base/components/cart-checkout/address-form/country-address-fields.js CHANGED
@@ -5,542 +5,75 @@
5
  /**
6
  * External dependencies
7
  */
8
- import { __ } from '@wordpress/i18n';
 
9
 
10
  /**
11
- * Used to render postcode before the city field.
 
12
  *
13
- * @type {Object <AddressFieldKey, AddressField>}
14
  */
15
- const postcodeBeforeCity = {
16
- city: {
17
- index: 9,
18
- },
19
- postcode: {
20
- index: 7,
21
- },
22
- };
23
 
24
  /**
25
- * Used to make the state field optional.
26
  *
27
- * @type {Object <AddressFieldKey, AddressField>}
28
- */
29
- const optionalState = {
30
- state: {
31
- required: false,
32
- },
33
- };
34
-
35
- /**
36
- * Used to hide the state field.
37
  *
38
- * @type {Object <AddressFieldKey, AddressField>}
 
39
  */
40
- const hiddenState = {
41
- state: {
42
- required: false,
43
- hidden: true,
44
- },
45
- };
46
 
47
- /**
48
- * Used to hide the postcode field.
49
- *
50
- * @type {Object <AddressFieldKey, AddressField>}
51
- */
52
- const hiddenPostcode = {
53
- postcode: {
54
- required: false,
55
- hidden: true,
56
- },
57
- };
58
 
59
- /**
60
- * Country specific address field properties.
61
- *
62
- * @type {CountryAddressFields}
63
- */
64
- const countryAddressFields = {
65
- AE: {
66
- ...hiddenPostcode,
67
- ...optionalState,
68
- },
69
- AF: hiddenState,
70
- AO: {
71
- ...hiddenPostcode,
72
- state: {
73
- label: __( 'Province', 'woo-gutenberg-products-block' ),
74
- optionalLabel: __(
75
- 'Province (optional)',
76
- 'woo-gutenberg-products-block'
77
- ),
78
- },
79
- },
80
- AT: {
81
- ...postcodeBeforeCity,
82
- ...hiddenState,
83
- },
84
- AU: {
85
- city: {
86
- label: __( 'Suburb', 'woo-gutenberg-products-block' ),
87
- optionalLabel: __(
88
- 'Suburb (optional)',
89
- 'woo-gutenberg-products-block'
90
- ),
91
- },
92
- postcode: {
93
- label: __( 'Postcode', 'woo-gutenberg-products-block' ),
94
- optionalLabel: __(
95
- 'Postcode (optional)',
96
- 'woo-gutenberg-products-block'
97
- ),
98
- },
99
- state: {
100
- label: __( 'State', 'woo-gutenberg-products-block' ),
101
- optionalLabel: __(
102
- 'State (optional)',
103
- 'woo-gutenberg-products-block'
104
- ),
105
- },
106
- },
107
- AX: {
108
- ...postcodeBeforeCity,
109
- ...hiddenState,
110
- },
111
- BD: {
112
- postcode: {
113
- required: false,
114
- },
115
- state: {
116
- label: __( 'District', 'woo-gutenberg-products-block' ),
117
- optionalLabel: __(
118
- 'District (optional)',
119
- 'woo-gutenberg-products-block'
120
- ),
121
- },
122
- },
123
- BE: {
124
- ...postcodeBeforeCity,
125
- ...hiddenState,
126
- },
127
- BH: {
128
- postcode: {
129
- required: false,
130
- },
131
- ...hiddenState,
132
- },
133
- BI: hiddenState,
134
- BO: hiddenPostcode,
135
- BS: hiddenPostcode,
136
- CA: {
137
- state: {
138
- label: __( 'Province', 'woo-gutenberg-products-block' ),
139
- optionalLabel: __(
140
- 'Province (optional)',
141
- 'woo-gutenberg-products-block'
142
- ),
143
- },
144
- },
145
- CH: {
146
- ...postcodeBeforeCity,
147
- state: {
148
- label: __( 'Canton', 'woo-gutenberg-products-block' ),
149
- optionalLabel: __(
150
- 'Canton (optional)',
151
- 'woo-gutenberg-products-block'
152
- ),
153
- required: false,
154
- },
155
- },
156
- CL: {
157
- city: {
158
- require: true,
159
- },
160
- postcode: {
161
- required: false,
162
- },
163
- state: {
164
- label: __( 'Region', 'woo-gutenberg-products-block' ),
165
- optionalLabel: __(
166
- 'Region (optional)',
167
- 'woo-gutenberg-products-block'
168
- ),
169
- },
170
- },
171
- CN: {
172
- state: {
173
- label: __( 'Province', 'woo-gutenberg-products-block' ),
174
- optionalLabel: __(
175
- 'Province (optional)',
176
- 'woo-gutenberg-products-block'
177
- ),
178
- },
179
- },
180
- CO: {
181
- postcode: {
182
- required: false,
183
- },
184
- },
185
- CZ: hiddenState,
186
- DE: {
187
- ...postcodeBeforeCity,
188
- ...hiddenState,
189
- },
190
- DK: {
191
- ...postcodeBeforeCity,
192
- ...hiddenState,
193
- },
194
- EE: {
195
- ...postcodeBeforeCity,
196
- ...hiddenState,
197
- },
198
- ES: {
199
- ...postcodeBeforeCity,
200
- state: {
201
- label: __( 'Province', 'woo-gutenberg-products-block' ),
202
- optionalLabel: __(
203
- 'Province (optional)',
204
- 'woo-gutenberg-products-block'
205
- ),
206
- },
207
- },
208
- FI: {
209
- ...postcodeBeforeCity,
210
- ...hiddenState,
211
- },
212
- FR: {
213
- ...postcodeBeforeCity,
214
- ...hiddenState,
215
- },
216
- GB: {
217
- postcode: {
218
- label: __( 'Postcode', 'woo-gutenberg-products-block' ),
219
- optionalLabel: __(
220
- 'Postcode (optional)',
221
- 'woo-gutenberg-products-block'
222
- ),
223
- },
224
- state: {
225
- label: __( 'County', 'woo-gutenberg-products-block' ),
226
- optionalLabel: __(
227
- 'County (optional)',
228
- 'woo-gutenberg-products-block'
229
- ),
230
- },
231
- },
232
- GP: hiddenState,
233
- GF: hiddenState,
234
- GR: optionalState,
235
- HK: {
236
- postcode: {
237
- required: false,
238
- },
239
- city: {
240
- label: __( 'Town/District', 'woo-gutenberg-products-block' ),
241
- optionalLabel: __(
242
- 'Town/District (optional)',
243
- 'woo-gutenberg-products-block'
244
- ),
245
- },
246
- state: {
247
- label: __( 'Region', 'woo-gutenberg-products-block' ),
248
- optionalLabel: __(
249
- 'Region (optional)',
250
- 'woo-gutenberg-products-block'
251
- ),
252
- },
253
- },
254
- HU: {
255
- state: {
256
- label: __( 'County', 'woo-gutenberg-products-block' ),
257
- optionalLabel: __(
258
- 'County (optional)',
259
- 'woo-gutenberg-products-block'
260
- ),
261
- },
262
- },
263
- ID: {
264
- state: {
265
- label: __( 'Province', 'woo-gutenberg-products-block' ),
266
- optionalLabel: __(
267
- 'Province (optional)',
268
- 'woo-gutenberg-products-block'
269
- ),
270
- },
271
- },
272
- IE: {
273
- postcode: {
274
- label: __( 'Eircode', 'woo-gutenberg-products-block' ),
275
- optionalLabel: __(
276
- 'Eircode (optional)',
277
- 'woo-gutenberg-products-block'
278
- ),
279
- required: false,
280
- },
281
- state: {
282
- label: __( 'County', 'woo-gutenberg-products-block' ),
283
- optionalLabel: __(
284
- 'County (optional)',
285
- 'woo-gutenberg-products-block'
286
- ),
287
- },
288
- },
289
- IS: {
290
- ...postcodeBeforeCity,
291
- ...hiddenState,
292
- },
293
- IL: {
294
- ...postcodeBeforeCity,
295
- ...hiddenState,
296
- },
297
- IM: hiddenState,
298
- IT: {
299
- ...postcodeBeforeCity,
300
- state: {
301
- label: __( 'Province', 'woo-gutenberg-products-block' ),
302
- optionalLabel: __(
303
- 'Province (optional)',
304
- 'woo-gutenberg-products-block'
305
- ),
306
- },
307
- },
308
- JP: {
309
- first_name: {
310
- index: 2,
311
- },
312
- last_name: {
313
- index: 1,
314
- },
315
- address_1: {
316
- index: 7,
317
- },
318
- address_2: {
319
- index: 8,
320
- },
321
- postcode: {
322
- index: 4,
323
- },
324
- city: {
325
- index: 6,
326
- },
327
- state: {
328
- label: __( 'Prefecture', 'woo-gutenberg-products-block' ),
329
- optionalLabel: __(
330
- 'Prefecture (optional)',
331
- 'woo-gutenberg-products-block'
332
- ),
333
- index: 5,
334
- },
335
- },
336
- KR: hiddenState,
337
- KW: hiddenState,
338
- LB: hiddenState,
339
- LI: {
340
- ...postcodeBeforeCity,
341
- state: {
342
- label: __( 'Municipality', 'woo-gutenberg-products-block' ),
343
- optionalLabel: __(
344
- 'Municipality (optional)',
345
- 'woo-gutenberg-products-block'
346
- ),
347
- required: false,
348
- },
349
- },
350
- LK: hiddenState,
351
- LU: hiddenState,
352
- LV: {
353
- state: {
354
- label: __( 'Municipality', 'woo-gutenberg-products-block' ),
355
- optionalLabel: __(
356
- 'Municipality (optional)',
357
- 'woo-gutenberg-products-block'
358
- ),
359
- required: false,
360
- },
361
- },
362
- MQ: hiddenState,
363
- MT: hiddenState,
364
- MZ: {
365
- ...hiddenPostcode,
366
- state: {
367
- label: __( 'Province', 'woo-gutenberg-products-block' ),
368
- optionalLabel: __(
369
- 'Province (optional)',
370
- 'woo-gutenberg-products-block'
371
- ),
372
- },
373
- },
374
- NL: {
375
- ...postcodeBeforeCity,
376
- ...hiddenState,
377
- },
378
- NG: {
379
- ...hiddenPostcode,
380
- state: {
381
- label: __( 'State', 'woo-gutenberg-products-block' ),
382
- optionalLabel: __(
383
- 'State (optional)',
384
- 'woo-gutenberg-products-block'
385
- ),
386
- },
387
- },
388
- NO: {
389
- ...postcodeBeforeCity,
390
- ...hiddenState,
391
- },
392
- NP: {
393
- postcode: {
394
- required: false,
395
- },
396
- state: {
397
- label: __( 'State', 'woo-gutenberg-products-block' ),
398
- optionalLabel: __(
399
- 'State (optional)',
400
- 'woo-gutenberg-products-block'
401
- ),
402
- },
403
- },
404
- NZ: {
405
- postcode: {
406
- label: __( 'Postcode', 'woo-gutenberg-products-block' ),
407
- optionalLabel: __(
408
- 'Postcode (optional)',
409
- 'woo-gutenberg-products-block'
410
- ),
411
- },
412
- state: {
413
- label: __( 'Region', 'woo-gutenberg-products-block' ),
414
- optionalLabel: __(
415
- 'Region (optional)',
416
- 'woo-gutenberg-products-block'
417
- ),
418
- },
419
- },
420
- PL: {
421
- ...postcodeBeforeCity,
422
- ...hiddenState,
423
- },
424
- PT: hiddenState,
425
- RE: hiddenState,
426
- RO: {
427
- state: {
428
- label: __( 'County', 'woo-gutenberg-products-block' ),
429
- optionalLabel: __(
430
- 'County (optional)',
431
- 'woo-gutenberg-products-block'
432
- ),
433
- },
434
- },
435
- RS: hiddenState,
436
- SE: {
437
- ...postcodeBeforeCity,
438
- ...hiddenState,
439
- },
440
- SG: {
441
- city: {
442
- required: false,
443
- },
444
- ...hiddenState,
445
- },
446
- SK: {
447
- ...postcodeBeforeCity,
448
- ...hiddenState,
449
- },
450
- SI: {
451
- ...postcodeBeforeCity,
452
- ...hiddenState,
453
- },
454
- SR: {
455
- ...hiddenPostcode,
456
- },
457
- ST: {
458
- ...hiddenPostcode,
459
- state: {
460
- label: __( 'District', 'woo-gutenberg-products-block' ),
461
- optionalLabel: __(
462
- 'District (optional)',
463
- 'woo-gutenberg-products-block'
464
- ),
465
- },
466
- },
467
- MD: {
468
- state: {
469
- label: __(
470
- 'Municipality/District',
471
- 'woo-gutenberg-products-block'
472
- ),
473
- optionalLabel: __(
474
- 'Municipality/District (optional)',
475
- 'woo-gutenberg-products-block'
476
- ),
477
- },
478
- },
479
- TR: {
480
- ...postcodeBeforeCity,
481
- state: {
482
- label: __( 'Province', 'woo-gutenberg-products-block' ),
483
- optionalLabel: __(
484
- 'Province (optional)',
485
- 'woo-gutenberg-products-block'
486
- ),
487
- },
488
- },
489
- UG: {
490
- ...hiddenPostcode,
491
- city: {
492
- label: __( 'Town/Village', 'woo-gutenberg-products-block' ),
493
- optionalLabel: __(
494
- 'Town/Village (optional)',
495
- 'woo-gutenberg-products-block'
496
- ),
497
- },
498
- state: {
499
- label: __( 'District', 'woo-gutenberg-products-block' ),
500
- optionalLabel: __(
501
- 'District (optional)',
502
- 'woo-gutenberg-products-block'
503
- ),
504
- },
505
- },
506
- US: {
507
- postcode: {
508
- label: __( 'ZIP', 'woo-gutenberg-products-block' ),
509
- optionalLabel: __(
510
- 'ZIP (optional)',
511
- 'woo-gutenberg-products-block'
512
- ),
513
- },
514
- state: {
515
- label: __( 'State', 'woo-gutenberg-products-block' ),
516
- optionalLabel: __(
517
- 'State (optional)',
518
- 'woo-gutenberg-products-block'
519
- ),
520
- },
521
- },
522
- VN: {
523
- city: {
524
- index: 8,
525
- },
526
- postcode: {
527
- index: 7,
528
- required: false,
529
- },
530
- ...hiddenState,
531
- },
532
- WS: hiddenPostcode,
533
- YT: hiddenState,
534
- ZA: {
535
- state: {
536
- label: __( 'Province', 'woo-gutenberg-products-block' ),
537
- optionalLabel: __(
538
- 'Province (optional)',
539
- 'woo-gutenberg-products-block'
540
- ),
541
- },
542
- },
543
- ZW: hiddenPostcode,
544
  };
545
 
546
- export default countryAddressFields;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  /**
6
  * External dependencies
7
  */
8
+ import { __, sprintf } from '@wordpress/i18n';
9
+ import { getSetting } from '@woocommerce/settings';
10
 
11
  /**
12
+ * This is locale data from WooCommerce countries class. This doesn't match the shape of the new field data blocks uses,
13
+ * but we can import part of it to set which fields are required.
14
  *
15
+ * This supports new properties such as optionalLabel which are not used by core (yet).
16
  */
17
+ const coreLocale = getSetting( 'countryLocale', {} );
 
 
 
 
 
 
 
18
 
19
  /**
20
+ * Get supported props from the core locale and map to the correct format.
21
  *
22
+ * Ignores "class", "type", "placeholder", and "autocomplete"--blocks handles these visual elements.
 
 
 
 
 
 
 
 
 
23
  *
24
+ * @param {Object} localeField Locale fields from WooCommerce.
25
+ * @return {Object} Supported locale fields.
26
  */
27
+ const getSupportedProps = ( localeField ) => {
28
+ const fields = {};
 
 
 
 
29
 
30
+ if ( localeField.label !== undefined ) {
31
+ fields.label = localeField.label;
32
+ }
 
 
 
 
 
 
 
 
33
 
34
+ if ( localeField.required !== undefined ) {
35
+ fields.required = localeField.required;
36
+ }
37
+
38
+ if ( localeField.hidden !== undefined ) {
39
+ fields.hidden = localeField.hidden;
40
+ }
41
+
42
+ if ( localeField.label !== undefined && ! localeField.optionalLabel ) {
43
+ fields.optionalLabel = sprintf(
44
+ /* Translators: %s Field label. */
45
+ __( '%s (optional)', 'woo-gutenberg-products-block' ),
46
+ localeField.label
47
+ );
48
+ }
49
+
50
+ if ( localeField.priority ) {
51
+ fields.index = parseInt( localeField.priority, 10 );
52
+ }
53
+
54
+ if ( localeField.hidden === true ) {
55
+ fields.required = false;
56
+ }
57
+
58
+ return fields;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  };
60
 
61
+ const coreAddressFieldConfig = Object.entries( coreLocale )
62
+ .map( ( [ country, countryLocale ] ) => [
63
+ country,
64
+ Object.entries( countryLocale )
65
+ .map( ( [ localeFieldKey, localeField ] ) => [
66
+ localeFieldKey,
67
+ getSupportedProps( localeField ),
68
+ ] )
69
+ .reduce( ( obj, [ key, val ] ) => {
70
+ obj[ key ] = val;
71
+ return obj;
72
+ }, {} ),
73
+ ] )
74
+ .reduce( ( obj, [ key, val ] ) => {
75
+ obj[ key ] = val;
76
+ return obj;
77
+ }, {} );
78
+
79
+ export default coreAddressFieldConfig;
assets/js/base/components/cart-checkout/address-form/default-address-fields.js CHANGED
@@ -29,7 +29,7 @@ const AddressFields = {
29
  autocapitalize: 'sentences',
30
  required: true,
31
  hidden: false,
32
- index: 1,
33
  },
34
  last_name: {
35
  label: __( 'Last name', 'woo-gutenberg-products-block' ),
@@ -41,7 +41,7 @@ const AddressFields = {
41
  autocapitalize: 'sentences',
42
  required: true,
43
  hidden: false,
44
- index: 2,
45
  },
46
  company: {
47
  label: __( 'Company', 'woo-gutenberg-products-block' ),
@@ -53,7 +53,7 @@ const AddressFields = {
53
  autocapitalize: 'sentences',
54
  required: false,
55
  hidden: false,
56
- index: 3,
57
  },
58
  address_1: {
59
  label: __( 'Address', 'woo-gutenberg-products-block' ),
@@ -65,7 +65,7 @@ const AddressFields = {
65
  autocapitalize: 'sentences',
66
  required: true,
67
  hidden: false,
68
- index: 4,
69
  },
70
  address_2: {
71
  label: __( 'Apartment, suite, etc.', 'woo-gutenberg-products-block' ),
@@ -77,7 +77,7 @@ const AddressFields = {
77
  autocapitalize: 'sentences',
78
  required: false,
79
  hidden: false,
80
- index: 5,
81
  },
82
  country: {
83
  label: __( 'Country/Region', 'woo-gutenberg-products-block' ),
@@ -88,7 +88,7 @@ const AddressFields = {
88
  autocomplete: 'country',
89
  required: true,
90
  hidden: false,
91
- index: 6,
92
  },
93
  city: {
94
  label: __( 'City', 'woo-gutenberg-products-block' ),
@@ -97,7 +97,7 @@ const AddressFields = {
97
  autocapitalize: 'sentences',
98
  required: true,
99
  hidden: false,
100
- index: 7,
101
  },
102
  state: {
103
  label: __( 'State/County', 'woo-gutenberg-products-block' ),
@@ -109,7 +109,7 @@ const AddressFields = {
109
  autocapitalize: 'sentences',
110
  required: true,
111
  hidden: false,
112
- index: 8,
113
  },
114
  postcode: {
115
  label: __( 'Postal code', 'woo-gutenberg-products-block' ),
@@ -121,7 +121,7 @@ const AddressFields = {
121
  autocapitalize: 'characters',
122
  required: true,
123
  hidden: false,
124
- index: 9,
125
  },
126
  };
127
 
29
  autocapitalize: 'sentences',
30
  required: true,
31
  hidden: false,
32
+ index: 10,
33
  },
34
  last_name: {
35
  label: __( 'Last name', 'woo-gutenberg-products-block' ),
41
  autocapitalize: 'sentences',
42
  required: true,
43
  hidden: false,
44
+ index: 20,
45
  },
46
  company: {
47
  label: __( 'Company', 'woo-gutenberg-products-block' ),
53
  autocapitalize: 'sentences',
54
  required: false,
55
  hidden: false,
56
+ index: 30,
57
  },
58
  address_1: {
59
  label: __( 'Address', 'woo-gutenberg-products-block' ),
65
  autocapitalize: 'sentences',
66
  required: true,
67
  hidden: false,
68
+ index: 40,
69
  },
70
  address_2: {
71
  label: __( 'Apartment, suite, etc.', 'woo-gutenberg-products-block' ),
77
  autocapitalize: 'sentences',
78
  required: false,
79
  hidden: false,
80
+ index: 50,
81
  },
82
  country: {
83
  label: __( 'Country/Region', 'woo-gutenberg-products-block' ),
88
  autocomplete: 'country',
89
  required: true,
90
  hidden: false,
91
+ index: 60,
92
  },
93
  city: {
94
  label: __( 'City', 'woo-gutenberg-products-block' ),
97
  autocapitalize: 'sentences',
98
  required: true,
99
  hidden: false,
100
+ index: 70,
101
  },
102
  state: {
103
  label: __( 'State/County', 'woo-gutenberg-products-block' ),
109
  autocapitalize: 'sentences',
110
  required: true,
111
  hidden: false,
112
+ index: 80,
113
  },
114
  postcode: {
115
  label: __( 'Postal code', 'woo-gutenberg-products-block' ),
121
  autocapitalize: 'characters',
122
  required: true,
123
  hidden: false,
124
+ index: 90,
125
  },
126
  };
127
 
assets/js/base/components/cart-checkout/address-form/prepare-address-fields.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** @typedef { import('@woocommerce/type-defs/address-fields').CountryAddressFields } CountryAddressFields */
2
+
3
+ /**
4
+ * Internal dependencies
5
+ */
6
+ import defaultAddressFields from './default-address-fields';
7
+ import countryAddressFields from './country-address-fields';
8
+
9
+ /**
10
+ * Combines address fields, including fields from the locale, and sorts them by index.
11
+ *
12
+ * @param {Array} fields List of field keys--only address fields matching these will be returned.
13
+ * @param {Object} fieldConfigs Fields config contains field specific overrides at block level which may, for example, hide a field.
14
+ * @param {string} addressCountry Address country code. If unknown, locale fields will not be merged.
15
+ * @return {CountryAddressFields} Object containing address fields.
16
+ */
17
+ const prepareAddressFields = ( fields, fieldConfigs, addressCountry = '' ) => {
18
+ const localeConfigs =
19
+ addressCountry && countryAddressFields[ addressCountry ] !== undefined
20
+ ? countryAddressFields[ addressCountry ]
21
+ : {};
22
+
23
+ return fields
24
+ .map( ( field ) => {
25
+ const defaultConfig = defaultAddressFields[ field ] || {};
26
+ const localeConfig = localeConfigs[ field ] || {};
27
+ const fieldConfig = fieldConfigs[ field ] || {};
28
+
29
+ return {
30
+ key: field,
31
+ ...defaultConfig,
32
+ ...localeConfig,
33
+ ...fieldConfig,
34
+ };
35
+ } )
36
+ .sort( ( a, b ) => a.index - b.index );
37
+ };
38
+
39
+ export default prepareAddressFields;
assets/js/base/components/cart-checkout/address-form/test/index.js CHANGED
@@ -149,6 +149,9 @@ describe( 'AddressForm Component', () => {
149
 
150
  // Verify state input has been removed.
151
  expect( screen.queryByText( stateRegExp ) ).not.toBeInTheDocument();
 
 
 
152
  // Verify postal code input label changed.
153
  expect( screen.getByLabelText( /Postal code/ ) ).toBeInTheDocument();
154
  } );
149
 
150
  // Verify state input has been removed.
151
  expect( screen.queryByText( stateRegExp ) ).not.toBeInTheDocument();
152
+
153
+ inputAddress( tertiaryAddress );
154
+
155
  // Verify postal code input label changed.
156
  expect( screen.getByLabelText( /Postal code/ ) ).toBeInTheDocument();
157
  } );
assets/js/base/components/cart-checkout/order-summary/index.js CHANGED
@@ -23,6 +23,7 @@ const OrderSummary = ( { cartItems = [] } ) => {
23
  <Panel
24
  className="wc-block-components-order-summary"
25
  initialOpen={ isLarge }
 
26
  title={
27
  <span className="wc-block-components-order-summary__button-text">
28
  { __( 'Order summary', 'woo-gutenberg-products-block' ) }
23
  <Panel
24
  className="wc-block-components-order-summary"
25
  initialOpen={ isLarge }
26
+ hasBorder={ true }
27
  title={
28
  <span className="wc-block-components-order-summary__button-text">
29
  { __( 'Order summary', 'woo-gutenberg-products-block' ) }
assets/js/base/components/cart-checkout/order-summary/order-summary-item.js CHANGED
@@ -6,8 +6,10 @@ import Label from '@woocommerce/base-components/label';
6
  import ProductPrice from '@woocommerce/base-components/product-price';
7
  import ProductName from '@woocommerce/base-components/product-name';
8
  import { getCurrency } from '@woocommerce/price-format';
 
9
  import PropTypes from 'prop-types';
10
  import Dinero from 'dinero.js';
 
11
 
12
  /**
13
  * Internal dependencies
@@ -22,7 +24,7 @@ const OrderSummaryItem = ( { cartItem } ) => {
22
  images,
23
  low_stock_remaining: lowStockRemaining = null,
24
  show_backorder_badge: showBackorderBadge = false,
25
- name,
26
  permalink,
27
  prices,
28
  quantity,
@@ -30,26 +32,67 @@ const OrderSummaryItem = ( { cartItem } ) => {
30
  description: fullDescription,
31
  item_data: itemData = [],
32
  variation,
 
 
33
  } = cartItem;
34
 
35
- const currency = getCurrency( prices );
 
 
 
 
 
 
 
 
 
 
 
36
  const regularPriceSingle = Dinero( {
37
  amount: parseInt( prices.raw_prices.regular_price, 10 ),
38
  precision: parseInt( prices.raw_prices.precision, 10 ),
39
  } )
40
- .convertPrecision( currency.minorUnit )
41
  .getAmount();
42
- const unconvertedLinePrice = Dinero( {
43
  amount: parseInt( prices.raw_prices.price, 10 ),
44
  precision: parseInt( prices.raw_prices.precision, 10 ),
45
- } );
46
- const linePriceSingle = unconvertedLinePrice
47
- .convertPrecision( currency.minorUnit )
48
  .getAmount();
49
- const linePrice = unconvertedLinePrice
50
- .multiply( quantity )
51
- .convertPrecision( currency.minorUnit )
 
 
 
 
 
 
 
52
  .getAmount();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  return (
55
  <div className="wc-block-components-order-summary-item">
@@ -73,12 +116,13 @@ const OrderSummaryItem = ( { cartItem } ) => {
73
  permalink={ permalink }
74
  />
75
  <ProductPrice
76
- currency={ currency }
77
- price={ linePriceSingle }
78
  regularPrice={ regularPriceSingle }
79
  className="wc-block-components-order-summary-item__individual-prices"
80
  priceClassName="wc-block-components-order-summary-item__individual-price"
81
  regularPriceClassName="wc-block-components-order-summary-item__regular-individual-price"
 
82
  />
83
  { showBackorderBadge ? (
84
  <ProductBackorderBadge />
@@ -97,7 +141,11 @@ const OrderSummaryItem = ( { cartItem } ) => {
97
  />
98
  </div>
99
  <div className="wc-block-components-order-summary-item__total-price">
100
- <ProductPrice currency={ currency } price={ linePrice } />
 
 
 
 
101
  </div>
102
  </div>
103
  );
6
  import ProductPrice from '@woocommerce/base-components/product-price';
7
  import ProductName from '@woocommerce/base-components/product-name';
8
  import { getCurrency } from '@woocommerce/price-format';
9
+ import { __experimentalApplyCheckoutFilter } from '@woocommerce/blocks-checkout';
10
  import PropTypes from 'prop-types';
11
  import Dinero from 'dinero.js';
12
+ import { DISPLAY_CART_PRICES_INCLUDING_TAX } from '@woocommerce/block-settings';
13
 
14
  /**
15
  * Internal dependencies
24
  images,
25
  low_stock_remaining: lowStockRemaining = null,
26
  show_backorder_badge: showBackorderBadge = false,
27
+ name: initialName,
28
  permalink,
29
  prices,
30
  quantity,
32
  description: fullDescription,
33
  item_data: itemData = [],
34
  variation,
35
+ totals,
36
+ extensions,
37
  } = cartItem;
38
 
39
+ const priceCurrency = getCurrency( prices );
40
+
41
+ const name = __experimentalApplyCheckoutFilter( {
42
+ filterName: 'itemName',
43
+ defaultValue: initialName,
44
+ arg: {
45
+ extensions,
46
+ context: 'summary',
47
+ },
48
+ validation: ( value ) => typeof value === 'string',
49
+ } );
50
+
51
  const regularPriceSingle = Dinero( {
52
  amount: parseInt( prices.raw_prices.regular_price, 10 ),
53
  precision: parseInt( prices.raw_prices.precision, 10 ),
54
  } )
55
+ .convertPrecision( priceCurrency.minorUnit )
56
  .getAmount();
57
+ const priceSingle = Dinero( {
58
  amount: parseInt( prices.raw_prices.price, 10 ),
59
  precision: parseInt( prices.raw_prices.precision, 10 ),
60
+ } )
61
+ .convertPrecision( priceCurrency.minorUnit )
 
62
  .getAmount();
63
+ const totalsCurrency = getCurrency( totals );
64
+
65
+ let lineTotal = parseInt( totals.line_total, 10 );
66
+ if ( DISPLAY_CART_PRICES_INCLUDING_TAX ) {
67
+ lineTotal += parseInt( totals.line_total_tax, 10 );
68
+ }
69
+ const totalsPrice = Dinero( {
70
+ amount: lineTotal,
71
+ } )
72
+ .convertPrecision( totals.currency_minor_unit )
73
  .getAmount();
74
+ const subtotalPriceFormat = __experimentalApplyCheckoutFilter( {
75
+ filterName: 'subtotalPriceFormat',
76
+ defaultValue: '<price/>',
77
+ arg: {
78
+ lineItem: cartItem,
79
+ },
80
+ // Only accept strings.
81
+ validation: ( value ) =>
82
+ typeof value === 'string' && value.includes( '<price/>' ),
83
+ } );
84
+
85
+ // Allow extensions to filter how the price is displayed. Ie: prepending or appending some values.
86
+ const productPriceFormat = __experimentalApplyCheckoutFilter( {
87
+ filterName: 'cartItemPrice',
88
+ defaultValue: '<price/>',
89
+ arg: {
90
+ cartItem,
91
+ block: 'checkout',
92
+ },
93
+ validation: ( value ) =>
94
+ typeof value === 'string' && value.includes( '<price/>' ),
95
+ } );
96
 
97
  return (
98
  <div className="wc-block-components-order-summary-item">
116
  permalink={ permalink }
117
  />
118
  <ProductPrice
119
+ currency={ priceCurrency }
120
+ price={ priceSingle }
121
  regularPrice={ regularPriceSingle }
122
  className="wc-block-components-order-summary-item__individual-prices"
123
  priceClassName="wc-block-components-order-summary-item__individual-price"
124
  regularPriceClassName="wc-block-components-order-summary-item__regular-individual-price"
125
+ format={ subtotalPriceFormat }
126
  />
127
  { showBackorderBadge ? (
128
  <ProductBackorderBadge />
141
  />
142
  </div>
143
  <div className="wc-block-components-order-summary-item__total-price">
144
+ <ProductPrice
145
+ currency={ totalsCurrency }
146
+ format={ productPriceFormat }
147
+ price={ totalsPrice }
148
+ />
149
  </div>
150
  </div>
151
  );
assets/js/base/components/cart-checkout/order-summary/style.scss CHANGED
@@ -1,10 +1,3 @@
1
- .wc-block-components-order-summary {
2
- .wc-blocks-components-panel__button {
3
- margin-top: 0;
4
- padding-top: 0;
5
- }
6
- }
7
-
8
  .wc-block-components-order-summary__content {
9
  display: table;
10
  width: 100%;
@@ -18,6 +11,10 @@
18
  padding-top: $gap;
19
  width: 100%;
20
 
 
 
 
 
21
  &:last-child {
22
  > div {
23
  padding-bottom: 0;
@@ -65,7 +62,7 @@
65
  justify-content: center;
66
  min-width: 20px;
67
  right: 0;
68
- top: $gap;
69
  transform: translate(50%, -50%);
70
  white-space: nowrap;
71
  z-index: 1;
@@ -73,6 +70,7 @@
73
 
74
  .wc-block-components-order-summary-item__description {
75
  padding-left: $gap-large;
 
76
  padding-bottom: $gap;
77
 
78
  p,
@@ -85,6 +83,7 @@
85
  .wc-block-components-order-summary-item__total-price {
86
  font-weight: bold;
87
  margin-left: auto;
 
88
  }
89
 
90
 
 
 
 
 
 
 
 
1
  .wc-block-components-order-summary__content {
2
  display: table;
3
  width: 100%;
11
  padding-top: $gap;
12
  width: 100%;
13
 
14
+ &:first-child {
15
+ padding-top: 0;
16
+ }
17
+
18
  &:last-child {
19
  > div {
20
  padding-bottom: 0;
62
  justify-content: center;
63
  min-width: 20px;
64
  right: 0;
65
+ top: 0;
66
  transform: translate(50%, -50%);
67
  white-space: nowrap;
68
  z-index: 1;
70
 
71
  .wc-block-components-order-summary-item__description {
72
  padding-left: $gap-large;
73
+ padding-right: $gap-small;
74
  padding-bottom: $gap;
75
 
76
  p,
83
  .wc-block-components-order-summary-item__total-price {
84
  font-weight: bold;
85
  margin-left: auto;
86
+ text-align: right;
87
  }
88
 
89
 
assets/js/base/components/cart-checkout/product-details/style.scss CHANGED
@@ -7,6 +7,10 @@
7
  &:last-of-type {
8
  margin-bottom: 0;
9
  }
 
 
 
 
10
  }
11
 
12
  .wc-block-components-product-details__name,
7
  &:last-of-type {
8
  margin-bottom: 0;
9
  }
10
+
11
+ li {
12
+ margin-left: 0;
13
+ }
14
  }
15
 
16
  .wc-block-components-product-details__name,
assets/js/base/components/cart-checkout/product-sale-badge/index.js CHANGED
@@ -2,7 +2,7 @@
2
  * External dependencies
3
  */
4
  import { createInterpolateElement } from 'wordpress-element';
5
- import { __ } from '@wordpress/i18n';
6
  import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
7
  import PropTypes from 'prop-types';
8
 
@@ -17,27 +17,35 @@ import ProductBadge from '../product-badge';
17
  * @param {Object} props Incoming props.
18
  * @param {Object} props.currency Currency object.
19
  * @param {number} props.saleAmount Discounted amount.
20
- *
21
  * @return {*} The component.
22
  */
23
- const ProductSaleBadge = ( { currency, saleAmount } ) => {
24
  if ( ! saleAmount || saleAmount <= 0 ) {
25
  return null;
26
  }
 
 
 
 
 
 
 
 
 
 
 
 
27
  return (
28
  <ProductBadge className="wc-block-components-sale-badge">
29
- { createInterpolateElement(
30
- /* translators: <price/> will be replaced by the discount amount */
31
- __( 'Save <price/>', 'woo-gutenberg-products-block' ),
32
- {
33
- price: (
34
- <FormattedMonetaryAmount
35
- currency={ currency }
36
- value={ saleAmount }
37
- />
38
- ),
39
- }
40
- ) }
41
  </ProductBadge>
42
  );
43
  };
2
  * External dependencies
3
  */
4
  import { createInterpolateElement } from 'wordpress-element';
5
+ import { __, sprintf } from '@wordpress/i18n';
6
  import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
7
  import PropTypes from 'prop-types';
8
 
17
  * @param {Object} props Incoming props.
18
  * @param {Object} props.currency Currency object.
19
  * @param {number} props.saleAmount Discounted amount.
20
+ * @param {string} [props.format] Format to change the price.
21
  * @return {*} The component.
22
  */
23
+ const ProductSaleBadge = ( { currency, saleAmount, format = '<price/>' } ) => {
24
  if ( ! saleAmount || saleAmount <= 0 ) {
25
  return null;
26
  }
27
+ if ( ! format.includes( '<price/>' ) ) {
28
+ format = '<price/>';
29
+ // eslint-disable-next-line no-console
30
+ console.error( 'Price formats need to include the `<price/>` tag.' );
31
+ }
32
+
33
+ const formattedMessage = sprintf(
34
+ /* translators: %s will be replaced by the discount amount */
35
+ __( `Save %s`, 'woo-gutenberg-products-block' ),
36
+ format
37
+ );
38
+
39
  return (
40
  <ProductBadge className="wc-block-components-sale-badge">
41
+ { createInterpolateElement( formattedMessage, {
42
+ price: (
43
+ <FormattedMonetaryAmount
44
+ currency={ currency }
45
+ value={ saleAmount }
46
+ />
47
+ ),
48
+ } ) }
 
 
 
 
49
  </ProductBadge>
50
  );
51
  };
assets/js/base/components/cart-checkout/shipping-rates-control/index.js CHANGED
@@ -26,9 +26,9 @@ import {
26
  * @param {Array} props.shippingRates Array of packages containing shipping rates.
27
  * @param {boolean} props.shippingRatesLoading True when rates are being loaded.
28
  * @param {string} props.className Class name for package rates.
29
- * @param {boolean} props.collapsible If true, when multiple packages are rendered they can be toggled open and closed.
30
  * @param {React.ReactElement} props.noResultsMessage Rendered when there are no packages.
31
- * @param {Function} props.renderOption Function to render a shipping rate.
32
  */
33
  const ShippingRatesControl = ( {
34
  shippingRates,
@@ -103,6 +103,7 @@ const ShippingRatesControl = ( {
103
  <Packages
104
  packages={ shippingRates }
105
  noResultsMessage={ noResultsMessage }
 
106
  />
107
  </ExperimentalOrderShippingPackages>
108
  </LoadingMask>
@@ -120,6 +121,7 @@ const ShippingRatesControl = ( {
120
  * @param {boolean} props.collapse If the panel should be collapsed by default,
121
  * only works if collapsible is true.
122
  * @param {boolean} props.showItems If we should items below the package name.
 
123
  * @return {React.ReactElement|Array|null} Rendered components.
124
  */
125
  const Packages = ( {
@@ -128,6 +130,7 @@ const Packages = ( {
128
  showItems,
129
  collapsible,
130
  noResultsMessage,
 
131
  } ) => {
132
  // If there are no packages, return nothing.
133
  if ( ! packages.length ) {
@@ -143,6 +146,7 @@ const Packages = ( {
143
  collapse={ collapse }
144
  showItems={ showItems }
145
  noResultsMessage={ noResultsMessage }
 
146
  />
147
  ) );
148
  };
26
  * @param {Array} props.shippingRates Array of packages containing shipping rates.
27
  * @param {boolean} props.shippingRatesLoading True when rates are being loaded.
28
  * @param {string} props.className Class name for package rates.
29
+ * @param {boolean} [props.collapsible] If true, when multiple packages are rendered they can be toggled open and closed.
30
  * @param {React.ReactElement} props.noResultsMessage Rendered when there are no packages.
31
+ * @param {Function} [props.renderOption] Function to render a shipping rate.
32
  */
33
  const ShippingRatesControl = ( {
34
  shippingRates,
103
  <Packages
104
  packages={ shippingRates }
105
  noResultsMessage={ noResultsMessage }
106
+ renderOption={ renderOption }
107
  />
108
  </ExperimentalOrderShippingPackages>
109
  </LoadingMask>
121
  * @param {boolean} props.collapse If the panel should be collapsed by default,
122
  * only works if collapsible is true.
123
  * @param {boolean} props.showItems If we should items below the package name.
124
+ * @param {Function} [props.renderOption] Function to render a shipping rate.
125
  * @return {React.ReactElement|Array|null} Rendered components.
126
  */
127
  const Packages = ( {
130
  showItems,
131
  collapsible,
132
  noResultsMessage,
133
+ renderOption,
134
  } ) => {
135
  // If there are no packages, return nothing.
136
  if ( ! packages.length ) {
146
  collapse={ collapse }
147
  showItems={ showItems }
148
  noResultsMessage={ noResultsMessage }
149
+ renderOption={ renderOption }
150
  />
151
  ) );
152
  };
assets/js/base/components/cart-checkout/totals/coupon/index.js CHANGED
@@ -59,7 +59,6 @@ const TotalsCoupon = ( {
59
  htmlFor={ textInputId }
60
  />
61
  }
62
- titleTag="h2"
63
  >
64
  <LoadingMask
65
  screenReaderLabel={ __(
59
  htmlFor={ textInputId }
60
  />
61
  }
 
62
  >
63
  <LoadingMask
64
  screenReaderLabel={ __(
assets/js/base/components/cart-checkout/totals/footer-item/index.js CHANGED
@@ -10,10 +10,10 @@ import { createInterpolateElement } from 'wordpress-element';
10
  import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
11
  import PropTypes from 'prop-types';
12
  import {
13
- __EXPERIMENTAL_TOTAL_LABEL_FILTER,
14
  TotalsItem,
15
  } from '@woocommerce/blocks-checkout';
16
- import { applyFilters } from '@wordpress/hooks';
17
 
18
  /**
19
  * Internal dependencies
@@ -24,10 +24,16 @@ const SHOW_TAXES = TAXES_ENABLED && DISPLAY_CART_PRICES_INCLUDING_TAX;
24
 
25
  const TotalsFooterItem = ( { currency, values } ) => {
26
  const { total_price: totalPrice, total_tax: totalTax } = values;
27
- const label = applyFilters(
28
- __EXPERIMENTAL_TOTAL_LABEL_FILTER,
29
- __( 'Total', 'woo-gutenberg-products-block' )
30
- );
 
 
 
 
 
 
31
 
32
  return (
33
  <TotalsItem
10
  import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
11
  import PropTypes from 'prop-types';
12
  import {
13
+ __experimentalApplyCheckoutFilter,
14
  TotalsItem,
15
  } from '@woocommerce/blocks-checkout';
16
+ import { useStoreCart } from '@woocommerce/base-hooks';
17
 
18
  /**
19
  * Internal dependencies
24
 
25
  const TotalsFooterItem = ( { currency, values } ) => {
26
  const { total_price: totalPrice, total_tax: totalTax } = values;
27
+ const { extensions } = useStoreCart();
28
+ const label = __experimentalApplyCheckoutFilter( {
29
+ filterName: 'totalLabel',
30
+ defaultValue: __( 'Total', 'woo-gutenberg-products-block' ),
31
+ arg: {
32
+ extensions,
33
+ },
34
+ // Only accept strings.
35
+ validation: ( value ) => typeof value === 'string',
36
+ } );
37
 
38
  return (
39
  <TotalsItem
assets/js/base/components/cart-checkout/totals/footer-item/style.scss CHANGED
@@ -5,7 +5,7 @@
5
  }
6
 
7
  .wc-block-components-totals-item__label {
8
- font-weight: normal;
9
  }
10
 
11
  .wc-block-components-totals-footer-item-tax {
5
  }
6
 
7
  .wc-block-components-totals-item__label {
8
+ font-weight: 700;
9
  }
10
 
11
  .wc-block-components-totals-footer-item-tax {
assets/js/base/components/cart-checkout/totals/shipping/style.scss CHANGED
@@ -1,6 +1,4 @@
1
  .wc-block-components-totals-shipping {
2
- @include with-translucent-border(1px 0 0);
3
-
4
  // Added extra label for specificity.
5
  fieldset.wc-block-components-totals-shipping__fieldset {
6
  background-color: transparent;
@@ -19,15 +17,8 @@
19
  }
20
  }
21
 
22
- .wc-block-components-radio-control__option,
23
- .wc-block-components-radio-control__option-layout {
24
- &:last-child::after {
25
- display: none;
26
- }
27
- }
28
-
29
  .wc-block-components-shipping-rates-control__no-results-notice {
30
- margin-bottom: em($gap-small);
31
  }
32
 
33
  .wc-block-components-totals-shipping__change-address-button {
@@ -39,8 +30,9 @@
39
  opacity: 0.8;
40
  }
41
  }
 
42
 
43
- .wc-blocks-components-panel:last-child::after {
44
- border-bottom-width: 0;
45
- }
46
  }
1
  .wc-block-components-totals-shipping {
 
 
2
  // Added extra label for specificity.
3
  fieldset.wc-block-components-totals-shipping__fieldset {
4
  background-color: transparent;
17
  }
18
  }
19
 
 
 
 
 
 
 
 
20
  .wc-block-components-shipping-rates-control__no-results-notice {
21
+ margin: 0 0 em($gap-small);
22
  }
23
 
24
  .wc-block-components-totals-shipping__change-address-button {
30
  opacity: 0.8;
31
  }
32
  }
33
+ }
34
 
35
+ // Extra classes for specificity.
36
+ .theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button {
37
+ @include link-button();
38
  }
assets/js/base/components/payment-methods/style.scss CHANGED
@@ -184,13 +184,10 @@
184
  }
185
  }
186
 
187
- .wc-block-components-radio-control__option-checked.wc-block-components-radio-control__option-checked {
188
- font-weight: bold;
189
- }
190
-
191
  .wc-block-checkout__payment-method {
192
  .wc-block-components-radio-control__option {
193
  padding-left: 56px;
 
194
  &::after {
195
  content: none;
196
  }
@@ -200,6 +197,19 @@
200
  }
201
  }
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  .wc-block-components-radio-control__option:last-child,
204
  .wc-block-components-radio-control-accordion-option:last-child {
205
  border-width: 1px;
@@ -239,7 +249,7 @@
239
  }
240
 
241
  .wc-block-components-radio-control-accordion-content {
242
- padding: 8px 16px 16px 16px;
243
  }
244
 
245
  .wc-block-checkout__order-notes {
184
  }
185
  }
186
 
 
 
 
 
187
  .wc-block-checkout__payment-method {
188
  .wc-block-components-radio-control__option {
189
  padding-left: 56px;
190
+
191
  &::after {
192
  content: none;
193
  }
197
  }
198
  }
199
 
200
+ // We need to add the first-child and last-child pseudoclasses for specificity.
201
+ .wc-block-components-radio-control__option,
202
+ .wc-block-components-radio-control__option:first-child,
203
+ .wc-block-components-radio-control__option:last-child {
204
+ margin: 0;
205
+ padding-bottom: em($gap);
206
+ padding-top: em($gap);
207
+ }
208
+
209
+ .wc-block-components-radio-control__option-checked {
210
+ font-weight: bold;
211
+ }
212
+
213
  .wc-block-components-radio-control__option:last-child,
214
  .wc-block-components-radio-control-accordion-option:last-child {
215
  border-width: 1px;
249
  }
250
 
251
  .wc-block-components-radio-control-accordion-content {
252
+ padding: 0 $gap em($gap) $gap;
253
  }
254
 
255
  .wc-block-checkout__order-notes {
assets/js/base/components/product-price/index.js CHANGED
@@ -5,6 +5,7 @@ import { __ } from '@wordpress/i18n';
5
  import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
6
  import classNames from 'classnames';
7
  import PropTypes from 'prop-types';
 
8
 
9
  /**
10
  * Internal dependencies
@@ -12,7 +13,6 @@ import PropTypes from 'prop-types';
12
  import './style.scss';
13
 
14
  const PriceRange = ( {
15
- className,
16
  currency,
17
  maxPrice,
18
  minPrice,
@@ -20,7 +20,7 @@ const PriceRange = ( {
20
  priceStyle,
21
  } ) => {
22
  return (
23
- <span className={ className }>
24
  <FormattedMonetaryAmount
25
  className={ classNames(
26
  'wc-block-components-product-price__value',
@@ -40,12 +40,11 @@ const PriceRange = ( {
40
  value={ maxPrice }
41
  style={ priceStyle }
42
  />
43
- </span>
44
  );
45
  };
46
 
47
  const SalePrice = ( {
48
- className,
49
  currency,
50
  regularPriceClassName,
51
  regularPriceStyle,
@@ -55,7 +54,7 @@ const SalePrice = ( {
55
  price,
56
  } ) => {
57
  return (
58
- <span className={ className }>
59
  <span className="screen-reader-text">
60
  { __( 'Previous price:', 'woo-gutenberg-products-block' ) }
61
  </span>
@@ -93,7 +92,7 @@ const SalePrice = ( {
93
  ) }
94
  value={ price }
95
  />
96
- </span>
97
  );
98
  };
99
 
@@ -101,6 +100,7 @@ const ProductPrice = ( {
101
  align,
102
  className,
103
  currency,
 
104
  maxPrice = null,
105
  minPrice = null,
106
  price = null,
@@ -119,12 +119,25 @@ const ProductPrice = ( {
119
  }
120
  );
121
 
 
 
 
 
 
 
122
  const isDiscounted = regularPrice && price !== regularPrice;
 
 
 
 
 
 
 
 
123
 
124
  if ( isDiscounted ) {
125
- return (
126
  <SalePrice
127
- className={ wrapperClassName }
128
  currency={ currency }
129
  price={ price }
130
  priceClassName={ priceClassName }
@@ -134,12 +147,9 @@ const ProductPrice = ( {
134
  regularPriceStyle={ regularPriceStyle }
135
  />
136
  );
137
- }
138
-
139
- if ( minPrice !== null && maxPrice !== null ) {
140
- return (
141
  <PriceRange
142
- className={ wrapperClassName }
143
  currency={ currency }
144
  maxPrice={ maxPrice }
145
  minPrice={ minPrice }
@@ -147,32 +157,25 @@ const ProductPrice = ( {
147
  priceStyle={ priceStyle }
148
  />
149
  );
150
- }
151
-
152
- if ( price !== null ) {
153
- return (
154
- <span className={ wrapperClassName }>
155
- <FormattedMonetaryAmount
156
- className={ classNames(
157
- 'wc-block-components-product-price__value',
158
- priceClassName
159
- ) }
160
- currency={ currency }
161
- value={ price }
162
- style={ priceStyle }
163
- />
164
- </span>
165
- );
166
- }
167
-
168
- return (
169
- <span className={ wrapperClassName }>
170
- <span
171
  className={ classNames(
172
  'wc-block-components-product-price__value',
173
  priceClassName
174
  ) }
 
 
 
175
  />
 
 
 
 
 
 
 
 
176
  </span>
177
  );
178
  };
@@ -181,6 +184,7 @@ ProductPrice.propTypes = {
181
  align: PropTypes.oneOf( [ 'left', 'center', 'right' ] ),
182
  className: PropTypes.string,
183
  currency: PropTypes.object,
 
184
  price: PropTypes.oneOfType( [ PropTypes.number, PropTypes.string ] ),
185
  priceClassName: PropTypes.string,
186
  priceStyle: PropTypes.object,
5
  import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
6
  import classNames from 'classnames';
7
  import PropTypes from 'prop-types';
8
+ import { createInterpolateElement } from 'wordpress-element';
9
 
10
  /**
11
  * Internal dependencies
13
  import './style.scss';
14
 
15
  const PriceRange = ( {
 
16
  currency,
17
  maxPrice,
18
  minPrice,
20
  priceStyle,
21
  } ) => {
22
  return (
23
+ <>
24
  <FormattedMonetaryAmount
25
  className={ classNames(
26
  'wc-block-components-product-price__value',
40
  value={ maxPrice }
41
  style={ priceStyle }
42
  />
43
+ </>
44
  );
45
  };
46
 
47
  const SalePrice = ( {
 
48
  currency,
49
  regularPriceClassName,
50
  regularPriceStyle,
54
  price,
55
  } ) => {
56
  return (
57
+ <>
58
  <span className="screen-reader-text">
59
  { __( 'Previous price:', 'woo-gutenberg-products-block' ) }
60
  </span>
92
  ) }
93
  value={ price }
94
  />
95
+ </>
96
  );
97
  };
98
 
100
  align,
101
  className,
102
  currency,
103
+ format = '<price/>',
104
  maxPrice = null,
105
  minPrice = null,
106
  price = null,
119
  }
120
  );
121
 
122
+ if ( ! format.includes( '<price/>' ) ) {
123
+ format = '<price/>';
124
+ // eslint-disable-next-line no-console
125
+ console.error( 'Price formats need to include the `<price/>` tag.' );
126
+ }
127
+
128
  const isDiscounted = regularPrice && price !== regularPrice;
129
+ let priceComponent = (
130
+ <span
131
+ className={ classNames(
132
+ 'wc-block-components-product-price__value',
133
+ priceClassName
134
+ ) }
135
+ />
136
+ );
137
 
138
  if ( isDiscounted ) {
139
+ priceComponent = (
140
  <SalePrice
 
141
  currency={ currency }
142
  price={ price }
143
  priceClassName={ priceClassName }
147
  regularPriceStyle={ regularPriceStyle }
148
  />
149
  );
150
+ } else if ( minPrice !== null && maxPrice !== null ) {
151
+ priceComponent = (
 
 
152
  <PriceRange
 
153
  currency={ currency }
154
  maxPrice={ maxPrice }
155
  minPrice={ minPrice }
157
  priceStyle={ priceStyle }
158
  />
159
  );
160
+ } else if ( price !== null ) {
161
+ priceComponent = (
162
+ <FormattedMonetaryAmount
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  className={ classNames(
164
  'wc-block-components-product-price__value',
165
  priceClassName
166
  ) }
167
+ currency={ currency }
168
+ value={ price }
169
+ style={ priceStyle }
170
  />
171
+ );
172
+ }
173
+
174
+ return (
175
+ <span className={ wrapperClassName }>
176
+ { createInterpolateElement( format, {
177
+ price: priceComponent,
178
+ } ) }
179
  </span>
180
  );
181
  };
184
  align: PropTypes.oneOf( [ 'left', 'center', 'right' ] ),
185
  className: PropTypes.string,
186
  currency: PropTypes.object,
187
+ format: PropTypes.string,
188
  price: PropTypes.oneOfType( [ PropTypes.number, PropTypes.string ] ),
189
  priceClassName: PropTypes.string,
190
  priceStyle: PropTypes.object,
assets/js/base/components/product-price/test/__snapshots__/index.js.snap ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`ProductPrice should apply the format if one is provided 1`] = `
4
+ <span
5
+ className="price wc-block-components-product-price"
6
+ >
7
+ pre price
8
+ <span
9
+ className="screen-reader-text"
10
+ >
11
+ Previous price:
12
+ </span>
13
+ <del
14
+ className="wc-block-components-product-price__regular"
15
+ >
16
+ £1.00
17
+ </del>
18
+ <span
19
+ className="screen-reader-text"
20
+ >
21
+ Discounted price:
22
+ </span>
23
+ <ins
24
+ className="wc-block-components-product-price__value is-discounted"
25
+ >
26
+ £0.50
27
+ </ins>
28
+ Test format
29
+ </span>
30
+ `;
31
+
32
+ exports[`ProductPrice should use default price if no format is provided 1`] = `
33
+ <span
34
+ className="price wc-block-components-product-price"
35
+ >
36
+ <span
37
+ className="screen-reader-text"
38
+ >
39
+ Previous price:
40
+ </span>
41
+ <del
42
+ className="wc-block-components-product-price__regular"
43
+ >
44
+ £1.00
45
+ </del>
46
+ <span
47
+ className="screen-reader-text"
48
+ >
49
+ Discounted price:
50
+ </span>
51
+ <ins
52
+ className="wc-block-components-product-price__value is-discounted"
53
+ >
54
+ £0.50
55
+ </ins>
56
+ </span>
57
+ `;
assets/js/base/components/product-price/test/index.js ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import TestRenderer from 'react-test-renderer';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import ProductPrice from '../index';
10
+
11
+ describe( 'ProductPrice', () => {
12
+ const currency = {
13
+ code: 'GBP',
14
+ currency_code: 'GBP',
15
+ currency_decimal_separator: '.',
16
+ currency_minor_unit: 2,
17
+ currency_prefix: '£',
18
+ currency_suffix: '',
19
+ currency_symbol: '£',
20
+ currency_thousand_separator: ',',
21
+ decimalSeparator: '.',
22
+ minorUnit: 2,
23
+ prefix: '£',
24
+ price: '61400',
25
+ price_range: null,
26
+ raw_prices: {
27
+ precision: 6,
28
+ price: '614000000',
29
+ regular_price: '614000000',
30
+ sale_price: '614000000',
31
+ },
32
+ regular_price: '61400',
33
+ sale_price: '61400',
34
+ suffix: '',
35
+ symbol: '£',
36
+ thousandSeparator: ',',
37
+ };
38
+
39
+ test( 'should use default price if no format is provided', () => {
40
+ const component = TestRenderer.create(
41
+ <ProductPrice
42
+ price={ 50 }
43
+ regularPrice={ 100 }
44
+ currency={ currency }
45
+ />
46
+ );
47
+
48
+ expect( component.toJSON() ).toMatchSnapshot();
49
+ } );
50
+
51
+ test( 'should apply the format if one is provided', () => {
52
+ const component = TestRenderer.create(
53
+ <ProductPrice
54
+ price={ 50 }
55
+ regularPrice={ 100 }
56
+ currency={ currency }
57
+ format="pre price <price/> Test format"
58
+ />
59
+ );
60
+
61
+ expect( component.toJSON() ).toMatchSnapshot();
62
+ } );
63
+ } );
assets/js/base/components/radio-control/style.scss CHANGED
@@ -1,12 +1,19 @@
1
  .wc-block-components-radio-control__option {
2
  @include reset-typography();
3
- @include with-translucent-border( 0 0 1px );
4
  display: block;
5
- padding: em($gap) 0 em($gap) em($gap-largest);
 
 
 
 
 
 
 
 
 
6
  }
7
 
8
  .wc-block-components-radio-control__option-layout {
9
- @include with-translucent-border( 0 0 1px );
10
  display: table;
11
  width: 100%;
12
  }
1
  .wc-block-components-radio-control__option {
2
  @include reset-typography();
 
3
  display: block;
4
+ margin: em($gap) 0;
5
+ padding: 0 0 0 em($gap-largest);
6
+ position: relative;
7
+
8
+ &:first-child {
9
+ margin-top: 0;
10
+ }
11
+ &:last-child {
12
+ margin-bottom: 0;
13
+ }
14
  }
15
 
16
  .wc-block-components-radio-control__option-layout {
 
17
  display: table;
18
  width: 100%;
19
  }
assets/js/base/components/select/style.scss CHANGED
@@ -121,6 +121,12 @@
121
  }
122
 
123
  .theme-twentytwentyone {
 
 
 
 
 
 
124
  &.is-dark-theme {
125
  // If the theme is in dark mode, as well as the block, then this selector will match.
126
  .has-dark-controls {
121
  }
122
 
123
  .theme-twentytwentyone {
124
+ // Extra classes for specificity.
125
+ &.theme-twentytwentyone.theme-twentytwentyone .components-custom-select-control__button {
126
+ background-color: #fff;
127
+ color: $input-text-active;
128
+ }
129
+
130
  &.is-dark-theme {
131
  // If the theme is in dark mode, as well as the block, then this selector will match.
132
  .has-dark-controls {
assets/js/base/components/sidebar-layout/style.scss CHANGED
@@ -18,11 +18,9 @@
18
  padding-left: percentage($gap-large / 1060px);
19
  width: 35%;
20
 
21
- .wc-blocks-components-panel {
22
- > h2 {
23
- @include font-size(large);
24
- @include reset-box();
25
- }
26
  }
27
  }
28
 
18
  padding-left: percentage($gap-large / 1060px);
19
  width: 35%;
20
 
21
+ .wc-blocks-components-panel > h2 {
22
+ @include font-size(regular);
23
+ @include reset-box();
 
 
24
  }
25
  }
26
 
assets/js/base/context/cart-checkout/checkout/processor/index.js CHANGED
@@ -230,6 +230,15 @@ const CheckoutProcessor = () => {
230
  addErrorNotice( formatStoreApiErrorMessage( response ), {
231
  id: 'checkout',
232
  } );
 
 
 
 
 
 
 
 
 
233
  dispatchActions.setHasError();
234
  dispatchActions.setAfterProcessing( response );
235
  setIsProcessingOrder( false );
230
  addErrorNotice( formatStoreApiErrorMessage( response ), {
231
  id: 'checkout',
232
  } );
233
+
234
+ response.additional_errors?.forEach?.(
235
+ ( additionalError ) => {
236
+ addErrorNotice( additionalError.message, {
237
+ id: additionalError.error_code,
238
+ } );
239
+ }
240
+ );
241
+
242
  dispatchActions.setHasError();
243
  dispatchActions.setAfterProcessing( response );
244
  setIsProcessingOrder( false );
assets/js/base/context/cart-checkout/payment-methods/test/payment-method-data-context.js CHANGED
@@ -130,7 +130,7 @@ describe( 'Testing Payment Method Data Context Provider', () => {
130
  } );
131
  // need to clear the store resolution state between tests.
132
  await dispatch( storeKey ).invalidateResolutionForStore();
133
- await dispatch( storeKey ).receiveCart( defaultCartState );
134
  } );
135
  afterEach( async () => {
136
  resetMockPaymentMethods();
130
  } );
131
  // need to clear the store resolution state between tests.
132
  await dispatch( storeKey ).invalidateResolutionForStore();
133
+ await dispatch( storeKey ).receiveCart( defaultCartState.cartData );
134
  } );
135
  afterEach( async () => {
136
  resetMockPaymentMethods();
assets/js/base/hooks/cart/test/use-store-cart.js CHANGED
@@ -29,6 +29,7 @@ describe( 'useStoreCart', () => {
29
  const previewCartData = {
30
  cartCoupons: previewCart.coupons,
31
  cartItems: previewCart.items,
 
32
  cartItemsCount: previewCart.items_count,
33
  cartItemsWeight: previewCart.items_weight,
34
  cartNeedsPayment: previewCart.needs_payment,
@@ -37,7 +38,6 @@ describe( 'useStoreCart', () => {
37
  cartIsLoading: false,
38
  cartItemErrors: [],
39
  cartErrors: [],
40
- cartFees: [],
41
  billingAddress: {
42
  first_name: '',
43
  last_name: '',
@@ -75,6 +75,7 @@ describe( 'useStoreCart', () => {
75
  const mockCartData = {
76
  coupons: [],
77
  items: mockCartItems,
 
78
  itemsCount: 1,
79
  itemsWeight: 10,
80
  needsPayment: true,
@@ -83,6 +84,8 @@ describe( 'useStoreCart', () => {
83
  shippingAddress: mockShippingAddress,
84
  shippingRates: [],
85
  hasCalculatedShipping: true,
 
 
86
  };
87
  const mockCartTotals = {
88
  currency_code: 'USD',
29
  const previewCartData = {
30
  cartCoupons: previewCart.coupons,
31
  cartItems: previewCart.items,
32
+ cartFees: previewCart.fees,
33
  cartItemsCount: previewCart.items_count,
34
  cartItemsWeight: previewCart.items_weight,
35
  cartNeedsPayment: previewCart.needs_payment,
38
  cartIsLoading: false,
39
  cartItemErrors: [],
40
  cartErrors: [],
 
41
  billingAddress: {
42
  first_name: '',
43
  last_name: '',
75
  const mockCartData = {
76
  coupons: [],
77
  items: mockCartItems,
78
+ fees: [],
79
  itemsCount: 1,
80
  itemsWeight: 10,
81
  needsPayment: true,
84
  shippingAddress: mockShippingAddress,
85
  shippingRates: [],
86
  hasCalculatedShipping: true,
87
+ extensions: {},
88
+ errors: [],
89
  };
90
  const mockCartTotals = {
91
  currency_code: 'USD',
assets/js/base/hooks/cart/use-store-cart.js CHANGED
@@ -27,8 +27,8 @@ const defaultBillingAddress = {
27
  phone: '',
28
  };
29
 
30
- const decodeAddress = ( address ) =>
31
- mapValues( address, ( value ) => decodeEntities( value ) );
32
 
33
  /**
34
  * @constant
@@ -53,6 +53,7 @@ export const defaultCartData = {
53
  cartHasCalculatedShipping: false,
54
  paymentRequirements: [],
55
  receiveCart: () => {},
 
56
  };
57
 
58
  /**
@@ -115,14 +116,17 @@ export const useStoreCart = ( options = { shouldSelect: true } ) => {
115
  );
116
  const shippingRatesLoading = store.isCustomerDataUpdating();
117
  const { receiveCart } = dispatch( storeKey );
118
- const billingAddress = decodeAddress( cartData.billingAddress );
119
  const shippingAddress = cartData.needsShipping
120
- ? decodeAddress( cartData.shippingAddress )
121
  : billingAddress;
 
 
 
122
  return {
123
  cartCoupons: cartData.coupons,
124
  cartItems: cartData.items || [],
125
- cartFees: cartData.fees || [],
126
  cartItemsCount: cartData.itemsCount,
127
  cartItemsWeight: cartData.itemsWeight,
128
  cartNeedsPayment: cartData.needsPayment,
27
  phone: '',
28
  };
29
 
30
+ const decodeValues = ( object ) =>
31
+ mapValues( object, ( value ) => decodeEntities( value ) );
32
 
33
  /**
34
  * @constant
53
  cartHasCalculatedShipping: false,
54
  paymentRequirements: [],
55
  receiveCart: () => {},
56
+ extensions: {},
57
  };
58
 
59
  /**
116
  );
117
  const shippingRatesLoading = store.isCustomerDataUpdating();
118
  const { receiveCart } = dispatch( storeKey );
119
+ const billingAddress = decodeValues( cartData.billingAddress );
120
  const shippingAddress = cartData.needsShipping
121
+ ? decodeValues( cartData.shippingAddress )
122
  : billingAddress;
123
+ const cartFees = cartData.fees.map( ( fee ) =>
124
+ decodeValues( fee )
125
+ );
126
  return {
127
  cartCoupons: cartData.coupons,
128
  cartItems: cartData.items || [],
129
+ cartFees,
130
  cartItemsCount: cartData.itemsCount,
131
  cartItemsWeight: cartData.itemsWeight,
132
  cartNeedsPayment: cartData.needsPayment,
assets/js/blocks/cart-checkout/cart/full-cart/cart-line-item-row.js CHANGED
@@ -16,7 +16,9 @@ import {
16
  ProductSaleBadge,
17
  } from '@woocommerce/base-components/cart-checkout';
18
  import { getCurrency } from '@woocommerce/price-format';
 
19
  import Dinero from 'dinero.js';
 
20
 
21
  /**
22
  * @typedef {import('@woocommerce/type-defs/cart').CartItem} CartItem
@@ -41,7 +43,7 @@ const getAmountFromRawPrice = ( priceObject, currency ) => {
41
  */
42
  const CartLineItemRow = ( { lineItem = {} } ) => {
43
  const {
44
- name = '',
45
  catalog_visibility: catalogVisibility = '',
46
  short_description: shortDescription = '',
47
  description: fullDescription = '',
@@ -71,6 +73,18 @@ const CartLineItemRow = ( { lineItem = {} } ) => {
71
  sale_price: '0',
72
  },
73
  },
 
 
 
 
 
 
 
 
 
 
 
 
74
  } = lineItem;
75
 
76
  const {
@@ -80,7 +94,18 @@ const CartLineItemRow = ( { lineItem = {} } ) => {
80
  isPendingDelete,
81
  } = useStoreCartItemQuantity( lineItem );
82
 
83
- const currency = getCurrency( prices );
 
 
 
 
 
 
 
 
 
 
 
84
  const regularAmountSingle = Dinero( {
85
  amount: parseInt( prices.raw_prices.regular_price, 10 ),
86
  precision: parseInt( prices.raw_prices.precision, 10 ),
@@ -89,16 +114,57 @@ const CartLineItemRow = ( { lineItem = {} } ) => {
89
  amount: parseInt( prices.raw_prices.price, 10 ),
90
  precision: parseInt( prices.raw_prices.precision, 10 ),
91
  } );
92
- const regularAmount = regularAmountSingle.multiply( quantity );
93
- const purchaseAmount = purchaseAmountSingle.multiply( quantity );
94
  const saleAmountSingle = regularAmountSingle.subtract(
95
  purchaseAmountSingle
96
  );
97
- const saleAmount = regularAmount.subtract( purchaseAmount );
 
 
 
 
 
 
 
 
 
98
  const firstImage = images.length ? images[ 0 ] : {};
99
  const isProductHiddenFromCatalog =
100
  catalogVisibility === 'hidden' || catalogVisibility === 'search';
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  return (
103
  <tr
104
  className={ classnames( 'wc-block-cart-items__row', {
@@ -137,24 +203,26 @@ const CartLineItemRow = ( { lineItem = {} } ) => {
137
 
138
  <div className="wc-block-cart-item__prices">
139
  <ProductPrice
140
- currency={ currency }
141
  regularPrice={ getAmountFromRawPrice(
142
  regularAmountSingle,
143
- currency
144
  ) }
145
  price={ getAmountFromRawPrice(
146
  purchaseAmountSingle,
147
- currency
148
  ) }
 
149
  />
150
  </div>
151
 
152
  <ProductSaleBadge
153
- currency={ currency }
154
  saleAmount={ getAmountFromRawPrice(
155
  saleAmountSingle,
156
- currency
157
  ) }
 
158
  />
159
 
160
  <ProductMetadata
@@ -183,17 +251,22 @@ const CartLineItemRow = ( { lineItem = {} } ) => {
183
  </td>
184
  <td className="wc-block-cart-item__total">
185
  <ProductPrice
186
- currency={ currency }
187
- price={ getAmountFromRawPrice( purchaseAmount, currency ) }
 
 
 
 
188
  />
189
 
190
  { quantity > 1 && (
191
  <ProductSaleBadge
192
- currency={ currency }
193
  saleAmount={ getAmountFromRawPrice(
194
  saleAmount,
195
- currency
196
  ) }
 
197
  />
198
  ) }
199
  </td>
16
  ProductSaleBadge,
17
  } from '@woocommerce/base-components/cart-checkout';
18
  import { getCurrency } from '@woocommerce/price-format';
19
+ import { __experimentalApplyCheckoutFilter } from '@woocommerce/blocks-checkout';
20
  import Dinero from 'dinero.js';
21
+ import { DISPLAY_CART_PRICES_INCLUDING_TAX } from '@woocommerce/block-settings';
22
 
23
  /**
24
  * @typedef {import('@woocommerce/type-defs/cart').CartItem} CartItem
43
  */
44
  const CartLineItemRow = ( { lineItem = {} } ) => {
45
  const {
46
+ name: initialName = '',
47
  catalog_visibility: catalogVisibility = '',
48
  short_description: shortDescription = '',
49
  description: fullDescription = '',
73
  sale_price: '0',
74
  },
75
  },
76
+ totals = {
77
+ currency_code: 'USD',
78
+ currency_minor_unit: 2,
79
+ currency_symbol: '$',
80
+ currency_prefix: '$',
81
+ currency_suffix: '',
82
+ currency_decimal_separator: '.',
83
+ currency_thousand_separator: ',',
84
+ line_total: '0',
85
+ line_total_tax: '0',
86
+ },
87
+ extensions,
88
  } = lineItem;
89
 
90
  const {
94
  isPendingDelete,
95
  } = useStoreCartItemQuantity( lineItem );
96
 
97
+ const priceCurrency = getCurrency( prices );
98
+
99
+ const name = __experimentalApplyCheckoutFilter( {
100
+ filterName: 'itemName',
101
+ defaultValue: initialName,
102
+ arg: {
103
+ extensions,
104
+ context: 'cart',
105
+ },
106
+ validation: ( value ) => typeof value === 'string',
107
+ } );
108
+
109
  const regularAmountSingle = Dinero( {
110
  amount: parseInt( prices.raw_prices.regular_price, 10 ),
111
  precision: parseInt( prices.raw_prices.precision, 10 ),
114
  amount: parseInt( prices.raw_prices.price, 10 ),
115
  precision: parseInt( prices.raw_prices.precision, 10 ),
116
  } );
 
 
117
  const saleAmountSingle = regularAmountSingle.subtract(
118
  purchaseAmountSingle
119
  );
120
+ const saleAmount = saleAmountSingle.multiply( quantity );
121
+ const totalsCurrency = getCurrency( totals );
122
+ let lineTotal = parseInt( totals.line_total, 10 );
123
+ if ( DISPLAY_CART_PRICES_INCLUDING_TAX ) {
124
+ lineTotal += parseInt( totals.line_total_tax, 10 );
125
+ }
126
+ const totalsPrice = Dinero( {
127
+ amount: lineTotal,
128
+ } );
129
+
130
  const firstImage = images.length ? images[ 0 ] : {};
131
  const isProductHiddenFromCatalog =
132
  catalogVisibility === 'hidden' || catalogVisibility === 'search';
133
 
134
+ // Allow extensions to filter how the price is displayed. Ie: prepending or appending some values.
135
+ const productPriceFormat = __experimentalApplyCheckoutFilter( {
136
+ filterName: 'cartItemPrice',
137
+ defaultValue: '<price/>',
138
+ arg: {
139
+ cartItem: lineItem,
140
+ block: 'cart',
141
+ },
142
+ validation: ( value ) =>
143
+ typeof value === 'string' && value.includes( '<price/>' ),
144
+ } );
145
+
146
+ const subtotalPriceFormat = __experimentalApplyCheckoutFilter( {
147
+ filterName: 'subtotalPriceFormat',
148
+ defaultValue: '<price/>',
149
+ arg: {
150
+ lineItem,
151
+ },
152
+ // Only accept strings.
153
+ validation: ( value ) =>
154
+ typeof value === 'string' && value.includes( '<price/>' ),
155
+ } );
156
+
157
+ const saleBadgePriceFormat = __experimentalApplyCheckoutFilter( {
158
+ filterName: 'saleBadgePriceFormat',
159
+ defaultValue: '<price/>',
160
+ arg: {
161
+ lineItem,
162
+ },
163
+ // Only accept strings.
164
+ validation: ( value ) =>
165
+ typeof value === 'string' && value.includes( '<price/>' ),
166
+ } );
167
+
168
  return (
169
  <tr
170
  className={ classnames( 'wc-block-cart-items__row', {
203
 
204
  <div className="wc-block-cart-item__prices">
205
  <ProductPrice
206
+ currency={ priceCurrency }
207
  regularPrice={ getAmountFromRawPrice(
208
  regularAmountSingle,
209
+ priceCurrency
210
  ) }
211
  price={ getAmountFromRawPrice(
212
  purchaseAmountSingle,
213
+ priceCurrency
214
  ) }
215
+ format={ subtotalPriceFormat }
216
  />
217
  </div>
218
 
219
  <ProductSaleBadge
220
+ currency={ priceCurrency }
221
  saleAmount={ getAmountFromRawPrice(
222
  saleAmountSingle,
223
+ priceCurrency
224
  ) }
225
+ format={ saleBadgePriceFormat }
226
  />
227
 
228
  <ProductMetadata
251
  </td>
252
  <td className="wc-block-cart-item__total">
253
  <ProductPrice
254
+ currency={ totalsCurrency }
255
+ format={ productPriceFormat }
256
+ price={ getAmountFromRawPrice(
257
+ totalsPrice,
258
+ totalsCurrency
259
+ ) }
260
  />
261
 
262
  { quantity > 1 && (
263
  <ProductSaleBadge
264
+ currency={ priceCurrency }
265
  saleAmount={ getAmountFromRawPrice(
266
  saleAmount,
267
+ priceCurrency
268
  ) }
269
+ format={ saleBadgePriceFormat }
270
  />
271
  ) }
272
  </td>
assets/js/blocks/cart-checkout/cart/full-cart/index.js CHANGED
@@ -105,63 +105,74 @@ const Cart = ( { attributes } ) => {
105
  } );
106
 
107
  return (
108
- <SidebarLayout className={ cartClassName }>
109
- <Main className="wc-block-cart__main">
110
- <CartLineItemsTitle itemCount={ cartItemsCount } />
111
- <CartLineItemsTable
112
- lineItems={ cartItems }
113
- isLoading={ cartIsLoading }
114
- />
115
- </Main>
116
- <Sidebar className="wc-block-cart__sidebar">
117
- <Title headingLevel="2" className="wc-block-cart__totals-title">
118
- { __( 'Cart totals', 'woo-gutenberg-products-block' ) }
119
- </Title>
120
- <Subtotal currency={ totalsCurrency } values={ cartTotals } />
121
- <TotalsFees currency={ totalsCurrency } cartFees={ cartFees } />
122
- <TotalsDiscount
123
- cartCoupons={ appliedCoupons }
124
- currency={ totalsCurrency }
125
- isRemovingCoupon={ isRemovingCoupon }
126
- removeCoupon={ removeCoupon }
127
- values={ cartTotals }
128
- />
129
- { cartNeedsShipping && (
130
- <TotalsShipping
131
- showCalculator={ isShippingCalculatorEnabled }
132
- showRateSelector={ true }
133
  values={ cartTotals }
 
 
134
  currency={ totalsCurrency }
 
135
  />
136
- ) }
137
- { ! DISPLAY_CART_PRICES_INCLUDING_TAX && (
138
- <TotalsTaxes
139
  currency={ totalsCurrency }
 
 
140
  values={ cartTotals }
141
  />
142
- ) }
143
- { COUPONS_ENABLED && (
144
- <TotalsCoupon
145
- onSubmit={ applyCoupon }
146
- isLoading={ isApplyingCoupon }
147
- />
148
- ) }
149
- <TotalsFooterItem
150
- currency={ totalsCurrency }
151
- values={ cartTotals }
152
- />
153
- <ExperimentalOrderMeta.Slot />
154
- <div className="wc-block-cart__payment-options">
155
- { cartNeedsPayment && <CartExpressPayment /> }
156
- <CheckoutButton
157
- link={ getSetting(
158
- 'page-' + attributes?.checkoutPageId,
159
- false
160
- ) }
 
 
 
 
161
  />
162
- </div>
163
- </Sidebar>
164
- </SidebarLayout>
 
 
 
 
 
 
 
 
 
 
165
  );
166
  };
167
 
105
  } );
106
 
107
  return (
108
+ <>
109
+ <CartLineItemsTitle itemCount={ cartItemsCount } />
110
+ <SidebarLayout className={ cartClassName }>
111
+ <Main className="wc-block-cart__main">
112
+ <CartLineItemsTable
113
+ lineItems={ cartItems }
114
+ isLoading={ cartIsLoading }
115
+ />
116
+ </Main>
117
+ <Sidebar className="wc-block-cart__sidebar">
118
+ <Title
119
+ headingLevel="2"
120
+ className="wc-block-cart__totals-title"
121
+ >
122
+ { __( 'Cart totals', 'woo-gutenberg-products-block' ) }
123
+ </Title>
124
+ <Subtotal
125
+ currency={ totalsCurrency }
 
 
 
 
 
 
 
126
  values={ cartTotals }
127
+ />
128
+ <TotalsFees
129
  currency={ totalsCurrency }
130
+ cartFees={ cartFees }
131
  />
132
+ <TotalsDiscount
133
+ cartCoupons={ appliedCoupons }
 
134
  currency={ totalsCurrency }
135
+ isRemovingCoupon={ isRemovingCoupon }
136
+ removeCoupon={ removeCoupon }
137
  values={ cartTotals }
138
  />
139
+ { cartNeedsShipping && (
140
+ <TotalsShipping
141
+ showCalculator={ isShippingCalculatorEnabled }
142
+ showRateSelector={ true }
143
+ values={ cartTotals }
144
+ currency={ totalsCurrency }
145
+ />
146
+ ) }
147
+ { ! DISPLAY_CART_PRICES_INCLUDING_TAX && (
148
+ <TotalsTaxes
149
+ currency={ totalsCurrency }
150
+ values={ cartTotals }
151
+ />
152
+ ) }
153
+ { COUPONS_ENABLED && (
154
+ <TotalsCoupon
155
+ onSubmit={ applyCoupon }
156
+ isLoading={ isApplyingCoupon }
157
+ />
158
+ ) }
159
+ <TotalsFooterItem
160
+ currency={ totalsCurrency }
161
+ values={ cartTotals }
162
  />
163
+ <ExperimentalOrderMeta.Slot />
164
+ <div className="wc-block-cart__payment-options">
165
+ { cartNeedsPayment && <CartExpressPayment /> }
166
+ <CheckoutButton
167
+ link={ getSetting(
168
+ 'page-' + attributes?.checkoutPageId,
169
+ false
170
+ ) }
171
+ />
172
+ </div>
173
+ </Sidebar>
174
+ </SidebarLayout>
175
+ </>
176
  );
177
  };
178
 
assets/js/blocks/cart-checkout/cart/full-cart/style.scss CHANGED
@@ -26,7 +26,6 @@ table.wc-block-cart-items td {
26
 
27
  .editor-styles-wrapper table.wc-block-cart-items,
28
  table.wc-block-cart-items {
29
- table-layout: fixed;
30
  width: 100%;
31
 
32
  .wc-block-cart-items__header {
@@ -38,10 +37,6 @@ table.wc-block-cart-items {
38
  }
39
  .wc-block-cart-items__header-product {
40
  visibility: hidden;
41
- min-width: 300px;
42
- }
43
- .wc-block-cart-items__header-quantity {
44
- width: 116px;
45
  }
46
  .wc-block-cart-items__header-total {
47
  width: 100px;
@@ -70,12 +65,6 @@ table.wc-block-cart-items {
70
  @include font-size(regular);
71
  text-align: right;
72
  line-height: 1.25;
73
-
74
- .wc-block-components-product-price__regular,
75
- .wc-block-components-product-price__value {
76
- display: block;
77
- font-weight: bold;
78
- }
79
  }
80
  .wc-block-components-product-metadata {
81
  margin-bottom: 0.75em;
@@ -89,6 +78,10 @@ table.wc-block-cart-items {
89
  }
90
  }
91
 
 
 
 
 
92
  // Loading placeholder state.
93
  .wc-block-cart--is-loading {
94
  th span,
@@ -241,8 +234,18 @@ table.wc-block-cart-items {
241
  left: 0;
242
  }
243
 
 
 
 
 
 
 
 
 
 
 
 
244
  .wc-block-components-sidebar {
245
- > .wc-block-cart__totals-title,
246
  .wc-block-components-shipping-calculator,
247
  .wc-block-components-shipping-rates-control__package:not(.wc-blocks-components-panel) {
248
  padding-left: $gap;
26
 
27
  .editor-styles-wrapper table.wc-block-cart-items,
28
  table.wc-block-cart-items {
 
29
  width: 100%;
30
 
31
  .wc-block-cart-items__header {
37
  }
38
  .wc-block-cart-items__header-product {
39
  visibility: hidden;
 
 
 
 
40
  }
41
  .wc-block-cart-items__header-total {
42
  width: 100px;
65
  @include font-size(regular);
66
  text-align: right;
67
  line-height: 1.25;
 
 
 
 
 
 
68
  }
69
  .wc-block-components-product-metadata {
70
  margin-bottom: 0.75em;
78
  }
79
  }
80
 
81
+ .wc-block-cart .wc-block-components-shipping-rates-control__package {
82
+ @include with-translucent-border(1px 0 0);
83
+ }
84
+
85
  // Loading placeholder state.
86
  .wc-block-cart--is-loading {
87
  th span,
234
  left: 0;
235
  }
236
 
237
+ .wc-block-cart__totals-title {
238
+ @include with-translucent-border(0 0 1px);
239
+ @include text-heading();
240
+ @include font-size(smaller);
241
+ display: block;
242
+ font-weight: 600;
243
+ padding: 0.25rem 0;
244
+ text-align: right;
245
+ text-transform: uppercase;
246
+ }
247
+
248
  .wc-block-components-sidebar {
 
249
  .wc-block-components-shipping-calculator,
250
  .wc-block-components-shipping-rates-control__package:not(.wc-blocks-components-panel) {
251
  padding-left: $gap;
assets/js/blocks/cart-checkout/cart/test/block.js CHANGED
@@ -20,7 +20,7 @@ describe( 'Testing cart', () => {
20
  } );
21
  // need to clear the store resolution state between tests.
22
  await dispatch( storeKey ).invalidateResolutionForStore();
23
- await dispatch( storeKey ).receiveCart( defaultCartState );
24
  } );
25
  afterEach( () => {
26
  fetchMock.resetMocks();
@@ -44,7 +44,9 @@ describe( 'Testing cart', () => {
44
  it( 'renders empty cart if there are no items in the cart', async () => {
45
  fetchMock.mockResponse( ( req ) => {
46
  if ( req.url.match( /wc\/store\/cart/ ) ) {
47
- return Promise.resolve( JSON.stringify( defaultCartState ) );
 
 
48
  }
49
  } );
50
  render(
20
  } );
21
  // need to clear the store resolution state between tests.
22
  await dispatch( storeKey ).invalidateResolutionForStore();
23
+ await dispatch( storeKey ).receiveCart( defaultCartState.cartData );
24
  } );
25
  afterEach( () => {
26
  fetchMock.resetMocks();
44
  it( 'renders empty cart if there are no items in the cart', async () => {
45
  fetchMock.mockResponse( ( req ) => {
46
  if ( req.url.match( /wc\/store\/cart/ ) ) {
47
+ return Promise.resolve(
48
+ JSON.stringify( defaultCartState.cartData )
49
+ );
50
  }
51
  } );
52
  render(
assets/js/blocks/cart-checkout/checkout/block.js CHANGED
@@ -141,7 +141,6 @@ const Checkout = ( { attributes, scrollToTop } ) => {
141
  allowCreateAccount={ allowCreateAccount }
142
  />
143
  <div className="wc-block-checkout__actions">
144
- <PlaceOrderButton />
145
  { attributes.showReturnToCart && (
146
  <ReturnToCartButton
147
  link={ getSetting(
@@ -150,6 +149,7 @@ const Checkout = ( { attributes, scrollToTop } ) => {
150
  ) }
151
  />
152
  ) }
 
153
  </div>
154
  { attributes.showPolicyLinks && <Policies /> }
155
  </Main>
141
  allowCreateAccount={ allowCreateAccount }
142
  />
143
  <div className="wc-block-checkout__actions">
 
144
  { attributes.showReturnToCart && (
145
  <ReturnToCartButton
146
  link={ getSetting(
149
  ) }
150
  />
151
  ) }
152
+ <PlaceOrderButton />
153
  </div>
154
  { attributes.showPolicyLinks && <Policies /> }
155
  </Main>
assets/js/blocks/cart-checkout/checkout/form/address-step.js CHANGED
@@ -41,21 +41,14 @@ const AddressStep = ( {
41
  const addressFieldsConfig = useMemo( () => {
42
  return {
43
  company: {
44
- ...defaultAddressFields.company,
45
  hidden: ! showCompanyField,
46
  required: requireCompanyField,
47
  },
48
  address_2: {
49
- ...defaultAddressFields.address_2,
50
  hidden: ! showApartmentField,
51
  },
52
  };
53
- }, [
54
- defaultAddressFields,
55
- showCompanyField,
56
- requireCompanyField,
57
- showApartmentField,
58
- ] );
59
 
60
  return (
61
  <>
41
  const addressFieldsConfig = useMemo( () => {
42
  return {
43
  company: {
 
44
  hidden: ! showCompanyField,
45
  required: requireCompanyField,
46
  },
47
  address_2: {
 
48
  hidden: ! showApartmentField,
49
  },
50
  };
51
+ }, [ showCompanyField, requireCompanyField, showApartmentField ] );
 
 
 
 
 
52
 
53
  return (
54
  <>
assets/js/blocks/cart-checkout/checkout/form/order-notes/style.scss CHANGED
@@ -1,6 +1,16 @@
1
  .wc-block-checkout__add-note {
2
- padding: $gap $gap 0 9px;
3
- margin-bottom: $gap;
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
  .wc-block-checkout__add-note .wc-block-components-textarea {
1
  .wc-block-checkout__add-note {
2
+ margin: em($gap-large) 0 em($gap-large) 9px;
3
+ }
4
+
5
+ .is-mobile,
6
+ .is-small,
7
+ .is-medium {
8
+ .wc-block-checkout__add-note {
9
+ @include with-translucent-border(1px 0);
10
+ margin-bottom: em($gap);
11
+ margin-top: em($gap);
12
+ padding: em($gap) 0;
13
+ }
14
  }
15
 
16
  .wc-block-checkout__add-note .wc-block-components-textarea {
assets/js/blocks/cart-checkout/checkout/form/style.scss CHANGED
@@ -8,8 +8,14 @@
8
  }
9
 
10
  .wc-block-checkout__shipping-option {
11
- .wc-block-components-shipping-rates-control__package:not(:first-of-type) {
12
- margin-top: $gap-larger;
 
 
 
 
 
 
13
  }
14
  }
15
 
8
  }
9
 
10
  .wc-block-checkout__shipping-option {
11
+ .wc-block-components-radio-control__option {
12
+ @include with-translucent-border( 0 0 1px );
13
+ margin: 0;
14
+ padding: em($gap-small) 0 em($gap-small) em($gap-largest);
15
+ }
16
+
17
+ .wc-block-components-shipping-rates-control__no-results-notice {
18
+ margin: em($gap-small) 0;
19
  }
20
  }
21
 
assets/js/blocks/cart-checkout/checkout/style.scss CHANGED
@@ -4,8 +4,8 @@
4
 
5
  .wc-block-checkout__sidebar {
6
  .wc-block-components-product-name {
 
7
  color: inherit;
8
- padding-right: $gap-small;
9
  flex-grow: 1;
10
  // Required by IE11.
11
  flex-basis: 0;
@@ -14,15 +14,14 @@
14
 
15
  .wc-block-checkout__actions {
16
  display: flex;
17
- flex-direction: column;
18
- margin: 0 0 $gap-large*2;
19
- padding-left: 9px;
20
 
21
  .wc-block-components-checkout-place-order-button {
22
  width: 50%;
23
  padding: 1em;
24
  height: auto;
25
- margin-bottom: 44px;
26
 
27
  .wc-block-components-button__text {
28
  line-height: 24px;
@@ -147,10 +146,8 @@
147
 
148
  .is-large {
149
  .wc-block-checkout__actions {
150
- padding-right: 36px;
 
 
151
  }
152
  }
153
-
154
- .wc-block-checkout__actions {
155
- margin-top: $gap;
156
- }
4
 
5
  .wc-block-checkout__sidebar {
6
  .wc-block-components-product-name {
7
+ display: block;
8
  color: inherit;
 
9
  flex-grow: 1;
10
  // Required by IE11.
11
  flex-basis: 0;
14
 
15
  .wc-block-checkout__actions {
16
  display: flex;
17
+ justify-content: space-between;
18
+ align-items: center;
19
+ margin-left: 9px;
20
 
21
  .wc-block-components-checkout-place-order-button {
22
  width: 50%;
23
  padding: 1em;
24
  height: auto;
 
25
 
26
  .wc-block-components-button__text {
27
  line-height: 24px;
146
 
147
  .is-large {
148
  .wc-block-checkout__actions {
149
+ @include with-translucent-border(1px 0 0);
150
+ margin-right: $gap-large;
151
+ padding-top: em($gap-large);
152
  }
153
  }
 
 
 
 
assets/js/data/cart/test/reducers.js CHANGED
@@ -14,6 +14,7 @@ describe( 'cartReducer', () => {
14
  cartData: {
15
  coupons: [],
16
  items: [],
 
17
  itemsCount: 0,
18
  itemsWeight: 0,
19
  needsShipping: true,
@@ -34,6 +35,7 @@ describe( 'cartReducer', () => {
34
  response: {
35
  coupons: [],
36
  items: [],
 
37
  itemsCount: 0,
38
  itemsWeight: 0,
39
  needsShipping: true,
@@ -45,6 +47,7 @@ describe( 'cartReducer', () => {
45
  expect( newState.cartData ).toEqual( {
46
  coupons: [],
47
  items: [],
 
48
  itemsCount: 0,
49
  itemsWeight: 0,
50
  needsShipping: true,
14
  cartData: {
15
  coupons: [],
16
  items: [],
17
+ fees: [],
18
  itemsCount: 0,
19
  itemsWeight: 0,
20
  needsShipping: true,
35
  response: {
36
  coupons: [],
37
  items: [],
38
+ fees: [],
39
  itemsCount: 0,
40
  itemsWeight: 0,
41
  needsShipping: true,
47
  expect( newState.cartData ).toEqual( {
48
  coupons: [],
49
  items: [],
50
+ fees: [],
51
  itemsCount: 0,
52
  itemsWeight: 0,
53
  needsShipping: true,
assets/js/data/cart/test/resolvers.js CHANGED
@@ -20,6 +20,7 @@ describe( 'getCartData', () => {
20
  const { value } = fulfillment.next( {
21
  coupons: [],
22
  items: [],
 
23
  itemsCount: 0,
24
  itemsWeight: 0,
25
  needsShipping: true,
@@ -29,6 +30,7 @@ describe( 'getCartData', () => {
29
  receiveCart( {
30
  coupons: [],
31
  items: [],
 
32
  itemsCount: 0,
33
  itemsWeight: 0,
34
  needsShipping: true,
20
  const { value } = fulfillment.next( {
21
  coupons: [],
22
  items: [],
23
+ fees: [],
24
  itemsCount: 0,
25
  itemsWeight: 0,
26
  needsShipping: true,
30
  receiveCart( {
31
  coupons: [],
32
  items: [],
33
+ fees: [],
34
  itemsCount: 0,
35
  itemsWeight: 0,
36
  needsShipping: true,
assets/js/data/default-states.js CHANGED
@@ -16,6 +16,7 @@ export const defaultCartState = {
16
  country: '',
17
  },
18
  items: [],
 
19
  itemsCount: 0,
20
  itemsWeight: 0,
21
  needsShipping: true,
16
  country: '',
17
  },
18
  items: [],
19
+ fees: [],
20
  itemsCount: 0,
21
  itemsWeight: 0,
22
  needsShipping: true,
assets/js/settings/blocks/constants.js CHANGED
@@ -84,6 +84,7 @@ const defaultPage = {
84
  permalink: '',
85
  };
86
  const storePages = getSetting( 'storePages', {
 
87
  shop: defaultPage,
88
  cart: defaultPage,
89
  checkout: defaultPage,
@@ -109,4 +110,7 @@ export const CHECKOUT_ALLOWS_SIGNUP = getSetting(
109
  'checkoutAllowsSignup',
110
  false
111
  );
112
- export const LOGIN_URL = getSetting( 'loginUrl', '/wp-login.php' );
 
 
 
84
  permalink: '',
85
  };
86
  const storePages = getSetting( 'storePages', {
87
+ myaccount: defaultPage,
88
  shop: defaultPage,
89
  cart: defaultPage,
90
  checkout: defaultPage,
110
  'checkoutAllowsSignup',
111
  false
112
  );
113
+
114
+ export const LOGIN_URL = storePages.myaccount.permalink
115
+ ? storePages.myaccount.permalink
116
+ : getSetting( 'loginUrl', '/wp-login.php' );
build/active-filters-frontend.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'b8af54d255a3c438e6892d6dc0c1ac7c');
 
build/active-filters-frontend.js DELETED
@@ -1,6 +0,0 @@
1
- !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=228)}({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(82),o=r(83),c=r(59),i=r(84);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(7),i=r.n(c),a=r(0),u=r(43);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){},12:function(e,t){!function(){e.exports=this.wp.data}()},129:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(28),u=function(e){var t=e.className,r=e.size,n=i()(e,["className","size"]);return React.createElement(a.SVG,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},130:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=r(14),i=r.n(c),a=r(2);r(3);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}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))}},132:function(e,t,r){"use strict";var n=r(0),o=r(4),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(61);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}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i}));var n=r(9),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}))}},144:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(8),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")))}},15:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},150:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=(r(3),r(5)),u=r.n(a),s=r(1),l=r(130),f=r(129),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,h=void 0===v?"":v,j=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),w=y?"span":"button";if(!r){var _=h&&"string"==typeof h?h:O;r="string"!=typeof _?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),_)}var S={"aria-label":r,disabled:b,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},E=y?S:{},R=y?{"aria-hidden":!0}:S;return React.createElement(p,o()({},j,E,{className:u()(c,"is-removable"),element:y?"button":j.element,screenReaderText:h,text:O}),React.createElement(w,o()({className:"wc-block-components-chip__remove"},R),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},2:function(e,t){!function(){e.exports=this.React}()},20: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}},21:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},22:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},228:function(e,t,r){e.exports=r(277)},229:function(e,t){},24: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},27: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},277:function(e,t,r){"use strict";r.r(t);var n=r(132),o=r(108),c=r(10),i=r.n(c),a=r(1),u=r(92),s=r(0),l=r(5),f=r.n(l),p=(r(3),r(38)),b=(r(229),r(143)),d=r(46),g=r(150),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.formatPrice)(e),Object(d.formatPrice)(t)):Number.isFinite(e)?Object(a.sprintf)(Object(a.__)("From %s","woo-gutenberg-products-block"),Object(d.formatPrice)(e)):Object(a.sprintf)(Object(a.__)("Up to %s","woo-gutenberg-products-block"),Object(d.formatPrice)(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(99),v=r(22),h=r(144),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 w=r.label;return React.createElement("li",null,React.createElement("span",{className:"wc-block-active-filters__list-item-type"},w,":"),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:w,name:Object(v.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(h.a)(m,j,r,e)},showLabel:!1,displayStyle:l})}))))},w=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],w=Object(u.b)("max_price"),_=i()(w,2),S=_[0],E=_[1],R=Object(s.useMemo)((function(){return Number.isFinite(v)||Number.isFinite(S)?y({type:Object(a.__)("Price","woo-gutenberg-products-block"),name:m(v,S),removeCallback:function(){h(void 0),E(void 0)},displayStyle:t.displayStyle}):null}),[v,S,t.displayStyle,h,E]),k=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,t.displayStyle]);if(!(l.length>0||Number.isFinite(v)||Number.isFinite(S)||n))return null;var x="h".concat(t.headingLevel),P=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return React.createElement(React.Fragment,null,!n&&t.heading&&React.createElement(x,null,t.heading),React.createElement("div",{className:"wc-block-active-filters"},React.createElement("ul",{className:P},n?React.createElement(React.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(React.Fragment,null,R,k)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){h(void 0),E(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)(w),getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},28:function(e,t){!function(){e.exports=this.wp.primitives}()},3:function(e,t,r){e.exports=r(71)()},31:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},32: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}},33:function(e,t,r){var n=r(70);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)}},34:function(e,t,r){var n=r(27),o=r(20);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},38:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=(r(3),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))}},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(21),c=r.n(o),i=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},4:function(e,t){!function(){e.exports=this.wc.wcSettings}()},40:function(e,t){!function(){e.exports=this.wp.blocks}()},43:function(e,t,r){"use strict";var n=r(31),o=r.n(n),c=r(32),i=r.n(c),a=r(20),u=r.n(a),s=r(33),l=r.n(s),f=r(34),p=r.n(f),b=r(24),d=r.n(b),g=r(7),m=r.n(g),y=(r(3),r(2)),O=r(1),v=r(9),h=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.C,"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(73);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 w=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=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof i?i({errorMessage:u}):React.createElement(h,{errorMessage:n?u: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(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(y.Component);w.defaultProps={showErrorMessage:!0};t.a=w},46:function(e,t){!function(){e.exports=this.wc.priceFormat}()},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)}()},59:function(e,t,r){var n=r(60);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}}},60: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}},61: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}},62: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 Object(c.useCallback)((function(e){return t((function(){throw e}))}),[])}},63: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}},67: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},7: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}},70: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},71:function(e,t,r){"use strict";var n=r(72);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}},72:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},73:function(e,t){},8:function(e,t){!function(){e.exports=this.lodash}()},82:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},83: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}}},84: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.")}},9:function(e,t,r){"use strict";r.d(t,"j",(function(){return o})),r.d(t,"u",(function(){return c})),r.d(t,"y",(function(){return i})),r.d(t,"r",(function(){return a})),r.d(t,"m",(function(){return u})),r.d(t,"o",(function(){return s})),r.d(t,"i",(function(){return l})),r.d(t,"z",(function(){return f})),r.d(t,"l",(function(){return p})),r.d(t,"k",(function(){return b})),r.d(t,"c",(function(){return d})),r.d(t,"n",(function(){return g})),r.d(t,"C",(function(){return y})),r.d(t,"D",(function(){return O})),r.d(t,"v",(function(){return v})),r.d(t,"a",(function(){return h})),r.d(t,"w",(function(){return j})),r.d(t,"b",(function(){return w})),r.d(t,"q",(function(){return _})),r.d(t,"g",(function(){return S})),r.d(t,"x",(function(){return k})),r.d(t,"h",(function(){return x})),r.d(t,"t",(function(){return P})),r.d(t,"s",(function(){return T})),r.d(t,"B",(function(){return N})),r.d(t,"A",(function(){return C})),r.d(t,"d",(function(){return A})),r.d(t,"e",(function(){return B})),r.d(t,"f",(function(){return L})),r.d(t,"p",(function(){return D})),r.d(t,"E",(function(){return F}));var n=r(4),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),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),b=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),d=(Object(n.getSetting)("productCount",0),Object(n.getSetting)("attributes",[])),g=Object(n.getSetting)("isShippingCalculatorEnabled",!0),m=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),y=Object(n.getSetting)("wcBlocksAssetUrl",""),O=Object(n.getSetting)("wcBlocksBuildUrl",""),v=Object(n.getSetting)("shippingCountries",{}),h=Object(n.getSetting)("allowedCountries",{}),j=Object(n.getSetting)("shippingStates",{}),w=Object(n.getSetting)("allowedStates",{}),_=(Object(n.getSetting)("shippingMethodsExist",!1),Object(n.getSetting)("paymentGatewaySortOrder",[])),S=Object(n.getSetting)("checkoutShowLoginReminder",!0),E={id:0,title:"",permalink:""},R=Object(n.getSetting)("storePages",{shop:E,cart:E,checkout:E,privacy:E,terms:E}),k=R.shop.permalink,x=(R.checkout.id,R.checkout.permalink),P=R.privacy.permalink,T=R.privacy.title,N=R.terms.permalink,C=R.terms.title,A=(R.cart.id,R.cart.permalink),B=Object(n.getSetting)("checkoutAllowsGuest",!1),L=Object(n.getSetting)("checkoutAllowsSignup",!1),D=Object(n.getSetting)("loginUrl","/wp-login.php"),F=(r(40),function(){return m>1})},92: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 g}));var n=r(10),o=r.n(n),c=r(15),i=r(12),a=r(0),u=r(67),s=r(21),l=r.n(s),f=r(39),p=r(63),b=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])]},d=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])]},g=function(e,t){var r=Object(u.a)(),n=b(t=t||r),c=o()(n,2),i=c[0],s=c[1],d=Object(f.a)(i),g=Object(f.a)(e),m=Object(p.a)(g),y=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(m,g)||(s(Object.assign({},d,g)),y.current=!0)}),[d,g,m,s]),y.current?[i,s]:[e,s]}},99: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(39),a=r(62),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(i.a)(f),m=Object(i.a)(s),y=Object(a.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}}});
 
 
 
 
 
 
build/active-filters.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'ead836de86982e73c7ddcea408128f33');
 
build/active-filters.js DELETED
@@ -1 +0,0 @@
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([854,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},100: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},119:function(e,t){},144:function(e,t,n){"use strict";var r=n(14),c=n.n(r),i=n(15),o=n.n(i),a=n(16),u=n.n(a),l=n(17),s=n.n(l),b=n(10),f=n.n(b),d=n(0),p=n(7),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(d.createElement)(m.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.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(d.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(d.createElement)(m.ToolbarGroup,{isCollapsed:r,icon:Object(d.createElement)(v,{level:o}),controls:Object(p.range)(c,i).map((function(t){return e.createLevelControl(t,o,a)}))})}}]),n}(d.Component);t.a=h},146:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return g}));var r=n(18),c=n.n(r),i=n(37),o=n(21),a=n(0),u=n(100),l=n(33),s=n.n(l),b=n(53),f=n(96),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])]},p=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])]},g=function(e,t){var n=Object(u.a)(),r=d(t=t||n),i=c()(r,2),o=i[0],l=i[1],p=Object(b.a)(o),g=Object(b.a)(e),m=Object(f.a)(g),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){s()(m,g)||(l(Object.assign({},p,g)),v.current=!0)}),[p,g,m,l]),v.current?[o,l]:[e,l]}},156:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(37),c=n(21),i=n(0),o=n(53),a=n(95),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,d=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 p=Object(i.useRef)({results:[],isLoading:!0}),g=Object(o.a)(b),m=Object(o.a)(l),v=Object(a.a)(),O=Object(c.useSelect)((function(e){if(!d)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,d]);return null!==O&&(p.current=O),p.current}},172:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(22)),i=n(8),o=n.n(i);n(241);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}))}},188:function(e,t){},21:function(e,t){!function(){e.exports=this.wp.data}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},241:function(e,t){},248:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(6),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}))}},249:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i}));var r=n(7),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")))}},255:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),u=(n(2),n(8)),l=n.n(u),s=n(1),b=n(54),f=n(261),d=(n(188),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,d=void 0===f?"small":f,p=e.children,g=void 0===p?null:p,m=o()(e,["text","screenReaderText","element","className","radius","children"]),v=u,O=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+d),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,p=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 S=y&&"string"==typeof y?y:h;n="string"!=typeof S?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),S)}var E={"aria-label":n,disabled:p,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},k=O?E:{},x=O?{"aria-hidden":!0}:E;return Object(a.createElement)(d,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})))}},261:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),u=n(31),l=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(u.SVG,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},28:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},37:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},4:function(e,t){!function(){e.exports=this.wp.components}()},42:function(e,t,n){"use strict";var r=n(5),c=n.n(r),i=n(0),o=(n(2),n(9)),a=n(8),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))}},53:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(33),i=n.n(c),o=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},54:function(e,t,n){"use strict";var r=n(5),c=n.n(r),i=n(24),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))}},6:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"I",(function(){return i})),n.d(t,"O",(function(){return o})),n.d(t,"y",(function(){return a})),n.d(t,"A",(function(){return u})),n.d(t,"m",(function(){return l})),n.d(t,"z",(function(){return s})),n.d(t,"C",(function(){return b})),n.d(t,"o",(function(){return f})),n.d(t,"B",(function(){return d})),n.d(t,"n",(function(){return p})),n.d(t,"E",(function(){return g})),n.d(t,"u",(function(){return m})),n.d(t,"w",(function(){return v})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return j})),n.d(t,"k",(function(){return y})),n.d(t,"K",(function(){return w})),n.d(t,"P",(function(){return _})),n.d(t,"q",(function(){return S})),n.d(t,"p",(function(){return E})),n.d(t,"H",(function(){return k})),n.d(t,"c",(function(){return x})),n.d(t,"v",(function(){return C})),n.d(t,"S",(function(){return P})),n.d(t,"T",(function(){return R})),n.d(t,"J",(function(){return L})),n.d(t,"a",(function(){return T})),n.d(t,"M",(function(){return z})),n.d(t,"b",(function(){return H})),n.d(t,"L",(function(){return V})),n.d(t,"D",(function(){return B})),n.d(t,"i",(function(){return F})),n.d(t,"N",(function(){return M})),n.d(t,"h",(function(){return U})),n.d(t,"j",(function(){return I})),n.d(t,"G",(function(){return G})),n.d(t,"F",(function(){return Q})),n.d(t,"R",(function(){return Y})),n.d(t,"Q",(function(){return K})),n.d(t,"d",(function(){return W})),n.d(t,"e",(function(){return q})),n.d(t,"f",(function(){return J})),n.d(t,"g",(function(){return $})),n.d(t,"x",(function(){return X})),n.d(t,"W",(function(){return ee})),n.d(t,"X",(function(){return te})),n.d(t,"U",(function(){return ne})),n.d(t,"V",(function(){return re}));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),d=Object(r.getSetting)("min_height",500),p=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),S=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),E=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),k=Object(r.getSetting)("productCount",0),x=Object(r.getSetting)("attributes",[]),C=Object(r.getSetting)("isShippingCalculatorEnabled",!0),N=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),P=Object(r.getSetting)("wcBlocksAssetUrl",""),R=Object(r.getSetting)("wcBlocksBuildUrl",""),L=Object(r.getSetting)("shippingCountries",{}),T=Object(r.getSetting)("allowedCountries",{}),z=Object(r.getSetting)("shippingStates",{}),H=Object(r.getSetting)("allowedStates",{}),V=Object(r.getSetting)("shippingMethodsExist",!1),B=Object(r.getSetting)("paymentGatewaySortOrder",[]),F=Object(r.getSetting)("checkoutShowLoginReminder",!0),A={id:0,title:"",permalink:""},D=Object(r.getSetting)("storePages",{shop:A,cart:A,checkout:A,privacy:A,terms:A}),M=D.shop.permalink,U=D.checkout.id,I=D.checkout.permalink,G=D.privacy.permalink,Q=D.privacy.title,Y=D.terms.permalink,K=D.terms.title,W=D.cart.id,q=D.cart.permalink,J=Object(r.getSetting)("checkoutAllowsGuest",!1),$=Object(r.getSetting)("checkoutAllowsSignup",!1),X=Object(r.getSetting)("loginUrl","/wp-login.php"),Z=n(23),ee=function(e,t){if(N>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(N>1)return Object(Z.registerBlockType)(e,t)},ne=function(){return N>2},re=function(){return N>1}},63:function(e,t){!function(){e.exports=this.wc.priceFormat}()},68:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(14),o=n.n(i),a=n(15),u=n.n(a),l=n(12),s=n.n(l),b=n(16),f=n.n(b),d=n(17),p=n.n(d),g=n(10),m=n.n(g),v=n(0),O=n(7),h=n(8),j=n.n(h),y=n(4),w=n(177);n(119);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 p()(this,n)}}var S=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.isSecondary=!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.a)(S)},7:function(e,t){!function(){e.exports=this.lodash}()},854:function(e,t,n){e.exports=n(894)},855:function(e,t){},894:function(e,t,n){"use strict";n.r(t);var r=n(11),c=n.n(r),i=n(0),o=n(1),a=n(23),u=n(54),l=n(31),s=Object(i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(i.createElement)("path",{d:"M17 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(8),f=n.n(b),d=n(22),p=n(4),g=n(144),m=n(172),v=n(68),O=n(18),h=n.n(O),j=n(146),y=(n(2),n(42)),w=(n(855),n(248)),_=n(63),S=n(255),E=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(_.formatPrice)(e),Object(_.formatPrice)(t)):Number.isFinite(e)?Object(o.sprintf)(Object(o.__)("From %s","woo-gutenberg-products-block"),Object(_.formatPrice)(e)):Object(o.sprintf)(Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(_.formatPrice)(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)(S.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(156),C=n(28),N=n(249),P=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,d=Object(j.b)("attributes",[]),p=h()(d,2),g=p[0],m=p[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(N.a)(g,m,n,e)},showLabel:!1,displayStyle:l})}))))},R=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),d=b[0],p=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(d)||Number.isFinite(v)?k({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:E(d,v),removeCallback:function(){p(void 0),O(void 0)},displayStyle:t.displayStyle}):null}),[d,v,t.displayStyle,p,O]),S=Object(i.useMemo)((function(){return u.map((function(e){var n=Object(w.b)(e.attribute);return Object(i.createElement)(P,{attributeObject:n,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[u,t.displayStyle]);if(!(u.length>0||Number.isFinite(d)||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,_,S)),Object(i.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){p(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(p.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)(d.InspectorControls,{key:"inspector"},Object(i.createElement)(p.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)(p.Disabled,null,Object(i.createElement)(R,{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"}))}})},9:function(e,t){!function(){e.exports=this.React}()},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(18),c=n.n(r),i=n(0),o=function(){var e=Object(i.useState)(),t=c()(e,2)[1];return Object(i.useCallback)((function(e){return t((function(){throw e}))}),[])}},96: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}}});
 
build/all-products-frontend.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-warning', 'wp-wordcount'), 'version' => 'fd2de089f691f8f94871e39f9fbb8eac');
 
build/all-products-frontend.js DELETED
@@ -1,6 +0,0 @@
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=216)}([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,n){e.exports=n(71)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},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,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){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,"u",(function(){return c})),n.d(t,"y",(function(){return i})),n.d(t,"r",(function(){return a})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"z",(function(){return f})),n.d(t,"l",(function(){return p})),n.d(t,"k",(function(){return d})),n.d(t,"c",(function(){return b})),n.d(t,"n",(function(){return m})),n.d(t,"C",(function(){return v})),n.d(t,"D",(function(){return g})),n.d(t,"v",(function(){return y})),n.d(t,"a",(function(){return O})),n.d(t,"w",(function(){return j})),n.d(t,"b",(function(){return w})),n.d(t,"q",(function(){return k})),n.d(t,"g",(function(){return E})),n.d(t,"x",(function(){return R})),n.d(t,"h",(function(){return _})),n.d(t,"t",(function(){return x})),n.d(t,"s",(function(){return C})),n.d(t,"B",(function(){return N})),n.d(t,"A",(function(){return T})),n.d(t,"d",(function(){return A})),n.d(t,"e",(function(){return D})),n.d(t,"f",(function(){return F})),n.d(t,"p",(function(){return M})),n.d(t,"E",(function(){return I}));var r=n(4),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),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),d=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),m=Object(r.getSetting)("isShippingCalculatorEnabled",!0),h=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),v=Object(r.getSetting)("wcBlocksAssetUrl",""),g=Object(r.getSetting)("wcBlocksBuildUrl",""),y=Object(r.getSetting)("shippingCountries",{}),O=Object(r.getSetting)("allowedCountries",{}),j=Object(r.getSetting)("shippingStates",{}),w=Object(r.getSetting)("allowedStates",{}),k=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),E=Object(r.getSetting)("checkoutShowLoginReminder",!0),S={id:0,title:"",permalink:""},P=Object(r.getSetting)("storePages",{shop:S,cart:S,checkout:S,privacy:S,terms:S}),R=P.shop.permalink,_=(P.checkout.id,P.checkout.permalink),x=P.privacy.permalink,C=P.privacy.title,N=P.terms.permalink,T=P.terms.title,A=(P.cart.id,P.cart.permalink),D=Object(r.getSetting)("checkoutAllowsGuest",!1),F=Object(r.getSetting)("checkoutAllowsSignup",!1),M=Object(r.getSetting)("loginUrl","/wp-login.php"),I=(n(40),function(){return h>1})},function(e,t,n){var r=n(82),o=n(83),c=n(59),i=n(84);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(61);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,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(56);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,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(23);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,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){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(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},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 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){!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){!function(){e.exports=this.wp.primitives}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(50);var o=n(56);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){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(70);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(27),o=n(20);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},,function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=(n(3),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,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(21),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){!function(){e.exports=this.wp.dom}()},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";var r=n(31),o=n.n(r),c=n(32),i=n.n(c),a=n(20),u=n.n(a),s=n(33),l=n.n(s),f=n(34),p=n.n(f),d=n(24),b=n.n(d),m=n(7),h=n.n(m),v=(n(3),n(2)),g=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.C,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(g.__)("Oops!","woo-gutenberg-products-block"):r,c=e.text,i=void 0===c?Object(g.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(g.__)("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(73);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=b()(e);if(t){var o=b()(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=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof i?i({errorMessage:u}):React.createElement(O,{errorMessage:r?u: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(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(v.Component);w.defaultProps={showErrorMessage:!0};t.a=w},function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(58),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(74))},,function(e,t){!function(){e.exports=this.wc.priceFormat}()},,,,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.apiFetch}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},,,function(e,t){!function(){e.exports=this.wp.deprecated}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(16),o=n(0);function c(e){var t=Object(o.useState)((function(){return!(!e||"undefined"==typeof window||!window.matchMedia(e).matches)})),n=Object(r.a)(t,2),c=n[0],i=n[1];return Object(o.useEffect)((function(){if(e){var t=function(){return i(window.matchMedia(e).matches)};t();var n=window.matchMedia(e);return n.addListener(t),function(){n.removeListener(t)}}}),[e]),e&&c}},function(e,t){!function(){e.exports=this.wp.warning}()},function(e,t,n){var r=n(60);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,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 Object(c.useCallback)((function(e){return t((function(){throw e}))}),[])}},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 c}));var r=n(0),o=Object(r.createContext)("page"),c=function(){return Object(r.useContext)(o)};o.Provider},function(e,t,n){"use strict";var r=n(6),o=n(17),c=n(0),i=n(5),a=n.n(i),u=n(8),s=n(55),l=n.n(s);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}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(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&&b(e,t)}var h=n(42),v=n(13);function g(e,t){return!t||"object"!==Object(h.a)(t)&&"function"!=typeof t?Object(v.a)(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=n(16),j=n(41),w=n(52),k=n(57),E={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},S={">=":"min-width","<":"max-width"},P={">=":function(e,t){return t>=e},"<":function(e,t){return t<e}},R=Object(c.createContext)(null),_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">=",n=Object(c.useContext)(R),r=!n&&"(".concat(S[t],": ").concat(E[e],"px)"),o=Object(k.a)(r);return n?P[t](E[e],n):o};_.__experimentalWidthProvider=R.Provider;var x=_,C=n(160),N=n(118),T=n(19);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 D(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){Object(T.a)(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}function F(e,t,n,r,o,c,i){var a=t.width,u="rtl"===document.documentElement.dir;"left"===n&&u?n="right":"right"===n&&u&&(n="left"),"left"===r&&u?r="right":"right"===r&&u&&(r="left");var s=Math.round(e.left+e.width/2),l={popoverLeft:s,contentWidth:(s-a/2>0?a/2:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===r?f=e.right:"middle"!==c&&(f=s);var p=e.right;"left"===r?p=e.left:"middle"!==c&&(p=s);var d,b={popoverLeft:f,contentWidth:f-a>0?a:f},m={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},h=n,v=null;if(!o)if("center"===n&&l.contentWidth===a)h="center";else if("left"===n&&b.contentWidth===a)h="left";else if("right"===n&&m.contentWidth===a)h="right";else{var g="left"===(h=b.contentWidth>m.contentWidth?"left":"right")?b.contentWidth:m.contentWidth;v=g!==a?g:null}if(d="center"===h?l.popoverLeft:"left"===h?b.popoverLeft:m.popoverLeft,i){var y=i.getBoundingClientRect();d=Math.min(d,y.right-a)}return{xAxis:h,popoverLeft:d,contentWidth:v}}function M(e,t,n,r,o,c,i){var a=t.height;if(o){var u=(Object(j.getScrollContainer)(c)||document.body).getBoundingClientRect().top+a-i;if(e.top<=u)return{yAxis:n,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===r?s=e.bottom:"top"===r&&(s=e.top);var l={popoverTop:s,contentHeight:(s-a/2>0?a/2:s)+(s+a/2>window.innerHeight?window.innerHeight-s:a/2)},f={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},d=n,b=null;if(!o)if("middle"===n&&l.contentHeight===a)d="middle";else if("top"===n&&f.contentHeight===a)d="top";else if("bottom"===n&&p.contentHeight===a)d="bottom";else{var m="top"===(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;b=m!==a?m:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:b}}var I=n(29);var L=function(e,t){return function(n){var r=e(n),o=n.displayName,c=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(u.upperFirst)(Object(u.camelCase)(t)),"(").concat(c,")"),r}};function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var V=Object(c.createContext)({focusHistory:[]}),z=V.Provider,q=V.Consumer;z.displayName="FocusReturnProvider",q.displayName="FocusReturnConsumer";c.Component;function W(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var H=L((function e(t){if((r=t)instanceof c.Component||"function"==typeof r){var n=t;return e({})(n)}var r,o=t.onFocusReturn,i=void 0===o?u.stubTrue:o;return function(e){var t=function(t){m(r,t);var n=W(r);function r(){var e;return f(this,r),(e=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 d(r,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==i())for(var r,o=[].concat(Object(I.a)(u.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(I.a)(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(c.createElement)(e,this.props.childProps))}}]),r}(c.Component);return function(e){return Object(c.createElement)(q,null,(function(n){return Object(c.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");function U(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var K=L((function(e){return function(t){m(r,t);var n=U(r);function r(){var e;return f(this,r),(e=n.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(v.a)(e)),e}return d(r,[{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(c.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(c.createElement)(e,this.props))}}]),r}(c.Component)}),"withConstrainedTabbing");function Q(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var G=["button","submit"];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 n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var $=L((function(e){return function(t){m(o,t);var n=Q(o);function o(){var e;return f(this,o),(e=n.apply(this,arguments)).bindNode=e.bindNode.bind(Object(v.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(v.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(v.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(v.a)(e)),e}return d(o,[{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(u.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(u.includes)(G,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(c.createElement)(e,Object(r.a)({ref:this.bindNode},this.props)))}}]),o}(c.Component)}),"withFocusOutside")(function(e){m(n,e);var t=Y(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),n}(c.Component));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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,r=e.className,o=void 0===r?"lockscroll":r,i=0,a=0;function u(e){var t=n.scrollingElement||n.body;e&&(a=t.scrollTop);var r=e?"add":"remove";t.classList[r](o),n.documentElement.classList[r](o),e||(t.scrollTop=a)}function s(){0===i&&u(!0),++i}function l(){1===i&&u(!1),--i}return function(e){m(n,e);var t=J(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(c.Component)}();function X(e){e.stopPropagation()}var ee=Object(c.forwardRef)((function(e,t){var n=e.children,i=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({},i,{ref:t,onMouseDown:X}),n)})),te=n(44);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){Object(T.a)(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}function oe(e){var t=Object(c.useContext)(te.a),n=t.slots[e]||{},r=t.fills[e],o=Object(c.useMemo)((function(){return r||[]}),[r]),i=Object(c.useCallback)((function(n){t.updateSlot(e,n)}),[e,t.updateSlot]),a=Object(c.useCallback)((function(n){t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),u=Object(c.useCallback)((function(n){t.registerFill(e,n)}),[e,t.registerFill]),s=Object(c.useCallback)((function(n){t.unregisterFill(e,n)}),[e,t.unregisterFill]);return re(re({},n),{},{updateSlot:i,unregisterSlot:a,fills:o,registerFill:u,unregisterFill:s})}function ce(e,t,n){return(ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}var ie=n(21),ae=n.n(ie);function ue(e){var t=function(e,t){if("object"!==Object(h.a)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Object(h.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Object(h.a)(t)?t:String(t)}function se(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 le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fe(e){var t,n,r,i,a,u,s,l,f,p,d,b,m,h=e.children,v=(t=Object(c.useState)({}),n=Object(O.a)(t,2),r=n[0],i=n[1],a=Object(c.useState)({}),u=Object(O.a)(a,2),s=u[0],l=u[1],f=Object(c.useCallback)((function(e,t,n){i((function(r){var o=r[e]||{};return le(le({},r),{},Object(T.a)({},e,le(le({},o),{},{ref:t||o.ref,fillProps:n||o.fillProps||{}})))}))}),[]),p=Object(c.useCallback)((function(e,t){i((function(n){var r=n[e],c=Object(o.a)(n,[e].map(ue));return(null==r?void 0:r.ref)===t?c:n}))}),[]),d=Object(c.useCallback)((function(e,t){var n=r[e];if(n&&!ae()(n.fillProps,t)){n.fillProps=t;var o=s[e];o&&o.map((function(e){return e.current.rerender()}))}}),[r,s]),b=Object(c.useCallback)((function(e,t){l((function(n){return le(le({},n),{},Object(T.a)({},e,[].concat(Object(I.a)(n[e]||[]),[t])))}))}),[]),m=Object(c.useCallback)((function(e,t){l((function(n){return n[e]?le(le({},n),{},Object(T.a)({},e,n[e].filter((function(e){return e!==t})))):n}))}),[]),Object(c.useMemo)((function(){return{slots:r,fills:s,registerSlot:f,updateSlot:d,unregisterSlot:p,registerFill:b,unregisterFill:m}}),[r,s,f,d,p,b,m]));return Object(c.createElement)(te.a.Provider,{value:v},h)}function pe(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var de=Object(c.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),be=de.Provider,me=de.Consumer;c.Component;function he(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var ve=function(e){m(n,e);var t=he(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(Object(v.a)(e)),e}return d(n,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(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:"forceUpdate",value:function(){this.isUnmounted||ce(y(n.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,r=e.fillProps,o=void 0===r?{}:r,i=e.getFills,a=Object(u.map)(i(n,this),(function(e){var t=e.occurrence,n=Object(u.isFunction)(e.children)?e.children(o):e.children;return c.Children.map(n,(function(e,n){if(!e||Object(u.isString)(e))return e;var r="".concat(t,"---").concat(e.key||n);return Object(c.cloneElement)(e,{key:r})}))})).filter(Object(u.negate)(c.isEmptyElement));return Object(c.createElement)(c.Fragment,null,Object(u.isFunction)(t)?t(a):a)}}]),n}(c.Component),ge=function(e){return Object(c.createElement)(me,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,i=t.getFills;return Object(c.createElement)(ve,Object(r.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:i}))}))},ye=0;function Oe(e){var t=e.name,n=e.children,r=e.registerFill,o=e.unregisterFill,i=function(e){var t=Object(c.useContext)(de),n=t.getSlot,r=t.subscribe,o=Object(c.useState)(n(e)),i=Object(O.a)(o,2),a=i[0],u=i[1];return Object(c.useEffect)((function(){return u(n(e)),r((function(){u(n(e))}))}),[e]),a}(t),a=Object(c.useRef)({name:t,children:n});return a.current.occurrence||(a.current.occurrence=++ye),Object(c.useLayoutEffect)((function(){return r(t,a.current),function(){return o(t,a.current)}}),[]),Object(c.useLayoutEffect)((function(){a.current.children=n,i&&i.forceUpdate()}),[n]),Object(c.useLayoutEffect)((function(){t!==a.current.name&&(o(a.current.name,a.current),a.current.name=t,r(t,a.current))}),[t]),i&&i.node?(Object(u.isFunction)(n)&&(n=n(i.props.fillProps)),Object(c.createPortal)(n,i.node)):null}var je=function(e){return Object(c.createElement)(me,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(c.createElement)(Oe,Object(r.a)({},e,{registerFill:n,unregisterFill:o}))}))};function we(e){var t=e.name,n=e.fillProps,i=void 0===n?{}:n,a=e.as,u=void 0===a?"div":a,s=Object(o.a)(e,["name","fillProps","as"]),l=Object(c.useContext)(te.a),f=Object(c.useRef)();return Object(c.useLayoutEffect)((function(){return l.registerSlot(t,f,i),function(){l.unregisterSlot(t,f)}}),[l.registerSlot,l.unregisterSlot,t]),Object(c.useLayoutEffect)((function(){l.updateSlot(t,i)})),Object(c.createElement)(u,Object(r.a)({ref:f},s))}function ke(e){var t,n,r=e.name,o=e.children,i=oe(r),a=Object(c.useRef)({rerender:(t=Object(c.useState)({}),n=Object(O.a)(t,2)[1],function(){return n({})})});return Object(c.useEffect)((function(){return i.registerFill(a),function(){i.unregisterFill(a)}}),[i.registerFill,i.unregisterFill]),i.ref&&i.ref.current?("function"==typeof o&&(o=o(i.fillProps)),Object(c.createPortal)(o,i.ref.current)):null}function Ee(e){var t=e.bubblesVirtually,n=Object(o.a)(e,["bubblesVirtually"]);return t?Object(c.createElement)(we,n):Object(c.createElement)(ge,n)}function Se(e){return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(je,e),Object(c.createElement)(ke,e))}function Pe(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?Pe(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e){var t=e.type,n=e.origin,r=void 0===n?function(e){return"appear"===e?"top":"left"}(t):n;if("appear"===t){var o,c=r.split(" "),i=Object(O.a)(c,2),u=i[0],s=i[1],l=void 0===s?"center":s;return a()("components-animate__appear",(o={},Object(T.a)(o,"is-from-"+l,"center"!==l),Object(T.a)(o,"is-from-"+u,"middle"!==u),o))}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+r):"loading"===t?a()("components-animate__loading"):void 0}function xe(e){var t=e.type,n=e.options,r=void 0===n?{}:n;return(0,e.children)({className:_e(Re({type:t},r))})}var Ce=K(H((function(e){return e.children})));function Ne(e,t){var n,r=(n=t).ownerDocument.defaultView.getComputedStyle(n),o=r.paddingTop,c=r.paddingBottom,i=r.paddingLeft,a=r.paddingRight,u=o?parseInt(o,10):0,s=c?parseInt(c,10):0,l=i?parseInt(i,10):0,f=a?parseInt(a,10):0;return{x:e.left+l,y:e.top+u,width:e.width-l-f,height:e.height-u-s,left:e.left+l,right:e.right-f,top:e.top+u,bottom:e.bottom-s}}function Te(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Ae(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function De(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var Fe=function(e){var t=e.headerTitle,n=e.onClose,i=e.onKeyDown,u=e.children,s=e.className,f=e.noArrow,p=void 0===f||f,d=e.isAlternate,b=e.position,m=void 0===b?"bottom right":b,h=(e.range,e.focusOnMount),v=void 0===h?"firstElement":h,g=e.anchorRef,y=e.shouldAnchorIncludePadding,k=e.anchorRect,E=e.getAnchorRect,S=e.expandOnMobile,P=e.animate,R=void 0===P||P,_=e.onClickOutside,T=e.onFocusOutside,A=e.__unstableSticky,I=e.__unstableSlotName,L=void 0===I?"Popover":I,B=e.__unstableObserveElement,V=e.__unstableBoundaryParent,z=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),q=Object(c.useRef)(null),W=Object(c.useRef)(null),H=Object(c.useRef)(),U=x("medium","<"),K=Object(c.useState)(),Q=Object(O.a)(K,2),G=Q[0],Y=Q[1],J=oe(L),X=S&&U,te=Object(C.a)(),ne=Object(O.a)(te,2),re=ne[0],ce=ne[1];p=X||p,Object(c.useLayoutEffect)((function(){if(X)return De(H.current,"is-without-arrow",p),De(H.current,"is-alternate",d),Te(H.current,"data-x-axis"),Te(H.current,"data-y-axis"),Ae(H.current,"top"),Ae(H.current,"left"),Ae(W.current,"maxHeight"),void Ae(W.current,"maxWidth");var e=function(){if(H.current&&W.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(j.getRectangleFromRange)(r);if(r instanceof window.Element){var c=r.getBoundingClientRect();return o?c:Ne(c,r)}var i=r.top,a=r.bottom,u=i.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:Ne(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:Ne(p,f)}}(q,k,E,g,y);if(e){var t,n,r=H.current,o=r.offsetParent,c=r.ownerDocument,i=0;if(o&&o!==c.body){var a=o.getBoundingClientRect();i=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}if(V)t=null===(n=H.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode;var u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=n.split(" "),u=Object(O.a)(a,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=M(e,t,s,p,r,o,c),b=F(e,t,f,p,r,d.yAxis,i);return D(D({},b),d)}(e,ce.height?ce:W.current.getBoundingClientRect(),m,A,H.current,i,t),s=u.popoverTop,l=u.popoverLeft,f=u.xAxis,b=u.yAxis,h=u.contentHeight,v=u.contentWidth;"number"==typeof s&&"number"==typeof l&&(Ae(H.current,"top",s+"px"),Ae(H.current,"left",l+"px")),De(H.current,"is-without-arrow",p||"center"===f&&"middle"===b),De(H.current,"is-alternate",d),Te(H.current,"data-x-axis",f),Te(H.current,"data-y-axis",b),Ae(W.current,"maxHeight","number"==typeof h?h+"px":""),Ae(W.current,"maxWidth","number"==typeof v?v+"px":"");Y(({left:"right",right:"left"}[f]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),B&&(n=new window.MutationObserver(e)).observe(B,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[X,k,E,g,y,m,ce,A,B,V]),function(e,t){Object(c.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=j.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(v,W);var ie=function(e){e.keyCode===w.ESCAPE&&n&&(e.stopPropagation(),n()),i&&i(e)};var ae=Object(c.createElement)($,{onFocusOutside:function(e){if(T)T(e);else if(_){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),_(t)}else n&&n()}},Object(c.createElement)(xe,{type:R&&G?"appear":null,options:{origin:G}},(function(e){var o=e.className;return Object(c.createElement)(ee,Object(r.a)({className:a()("components-popover",s,o,{"is-expanded":X,"is-without-arrow":p,"is-alternate":d})},z,{onKeyDown:ie,ref:H}),X&&Object(c.createElement)(Z,null),X&&Object(c.createElement)("div",{className:"components-popover__header"},Object(c.createElement)("span",{className:"components-popover__header-title"},t),Object(c.createElement)(He,{className:"components-popover__close",icon:N.a,onClick:n})),Object(c.createElement)("div",{ref:W,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},re,u)))})));return v&&(ae=Object(c.createElement)(Ce,null,ae)),J.ref&&(ae=Object(c.createElement)(Se,{name:L},ae)),g||k?ae:Object(c.createElement)("span",{ref:q},ae)};Fe.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(c.createElement)(Ee,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var Me=Fe;var Ie=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(u.isString)(r)&&(t=r),Object(u.isObject)(r)&&(t=r.display,n=r.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":n},t)):null};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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var Be=function(e){m(n,e);var t=Le(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).delayedSetIsOver=Object(u.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return d(n,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===c.Children.count(n)){var r=c.Children.only(n);"function"==typeof r.props[e]&&r.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(u.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,r=e.text,o=e.shortcut;if(1!==c.Children.count(t))return t;var i=c.Children.only(t),a=this.state.isOver;return Object(c.cloneElement)(i,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(c.concatChildren)(i.props.children,a&&Object(c.createElement)(Me,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(c.createElement)(Ie,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),n}(c.Component),Ve=n(86);function ze(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function qe(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}var We=["onMouseDown","onClick"];var He=t.a=Object(c.forwardRef)((function(e,t){var n=e.href,i=e.target,s=e.isPrimary,f=e.isSmall,p=e.isTertiary,d=e.isPressed,b=e.isBusy,m=e.isDefault,h=e.isSecondary,v=e.isLink,g=e.isDestructive,y=e.className,O=e.disabled,j=e.icon,w=e.iconSize,k=e.showTooltip,E=e.tooltipPosition,S=e.shortcut,P=e.label,R=e.children,_=e.__experimentalIsFocusable,x=Object(o.a)(e,["href","target","isPrimary","isSmall","isTertiary","isPressed","isBusy","isDefault","isSecondary","isLink","isDestructive","className","disabled","icon","iconSize","showTooltip","tooltipPosition","shortcut","label","children","__experimentalIsFocusable"]);m&&l()("Button isDefault prop",{alternative:"isSecondary"});var C=a()("components-button",y,{"is-secondary":m||h,"is-primary":s,"is-small":f,"is-tertiary":p,"is-pressed":d,"is-busy":b,"is-link":v,"is-destructive":g,"has-text":!!j&&!!R,"has-icon":!!j}),N=O&&!_,T=void 0===n||N?"button":"a",A="a"===T?{href:n,target:i}:{type:"button",disabled:N,"aria-pressed":d};if(O&&_){A["aria-disabled"]=!0;var D,F=ze(We);try{for(F.s();!(D=F.n()).done;){x[D.value]=function(e){e.stopPropagation(),e.preventDefault()}}}catch(e){F.e(e)}finally{F.f()}}var M=!N&&(k&&P||S||!!P&&(!R||Object(u.isArray)(R)&&!R.length)&&!1!==k),I=Object(c.createElement)(T,Object(r.a)({},A,x,{className:C,"aria-label":x["aria-label"]||P,ref:t}),j&&Object(c.createElement)(Ve.a,{icon:j,size:w}),R);return M?Object(c.createElement)(Be,{text:P,shortcut:S,position:E},I):I}))},,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(72);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){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f<t;)u&&u[f].run();f=-1,t=s.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new b(e,t)),1!==s.length||l||a(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(2),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},c=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},i=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=i);var t=r.useState(e(null)),n=t[0],o=t[1],a=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(c,{onResize:a})}),[a]),n]}},,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";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(61)),i=n(2),a=r(i),u=r(n(110)),s=r(n(20)),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 b(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 m(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,v,g=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 g&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}return u(t,e),t}(g),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 g&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&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 g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function j(e,t){h={fn:e,transform:t}}function w(e){v=e}var k,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},S=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function P(e){k=e}var R,_=function(){return Date.now()};function x(e){R=e}var C,N,T=function(e){return e.current};function A(e){C=e}var D=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return v},injectColorNames:w,get requestFrame(){return E},get cancelFrame(){return S},injectFrame:function(e,t){E=e,S=t},get interpolation(){return k},injectStringInterpolator:P,get now(){return _},injectNow:function(e){_=e},get defaultElement(){return R},injectDefaultElement:x,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return C},injectCreateAnimatedStyle:A,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),F=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),M=!1,I=new Set,L=function e(){if(!M)return!1;var t=_(),n=I,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 b=s.fromValues[p],m=s.toValues[p],h=d.lastPosition,v=m instanceof g,y=Array.isArray(s.initialVelocity)?s.initialVelocity[p]:s.initialVelocity;if(v&&(m=m.getValue()),s.immediate)d.setValue(m),d.done=!0;else if("string"!=typeof b&&"string"!=typeof m){if(void 0!==s.duration)h=b+s.easing((t-d.startTime)/s.duration)*(m-b),l=t>=d.startTime+s.duration;else if(s.decay)h=b+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-h)<.1)&&(m=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-m)+-s.friction*y)/s.mass)/1e3)/1e3}var w=!(!s.clamp||0===s.tension)&&(b<m?h>m:h<m),k=Math.abs(y)<=s.precision,S=0===s.tension||Math.abs(m-h)<=s.precision;l=w||k&&S,d.lastVelocity=y,d.lastTime=t}v&&!s.toValues[p].done&&(l=!1),l?(d.value!==m&&(h=m),d.done=!0):a=!0,d.setValue(h),d.lastPosition=h}else d.setValue(m),d.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(I.delete(i),i.stop(!0))}return I.size?N?N():E(e):M=!1,M};function B(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return B({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=B(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=B(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}(g),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),W=0,H=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=W++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,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:b(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,I.has(t)||I.add(t),M||(M=!0,E(N||L));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,I.has(t)&&I.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,m(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,m(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,m=n.attach,h=n.reset,g=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=m&&m(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)&&!v[i],m=l.arr(i),y=!u&&!m&&!f,j=l.und(c[r])?i:c[r],w=u||m||f?i:1,E=b(s,r);O&&(w=O.animations[r].parent);var S,P=a.parent,R=a.interpolation,x=d(O?w.getPayload():w),C=i;y&&(C=k({range:[0,1],output:[i,i]})(1));var N,T=R&&R.getValue(),A=!l.und(P)&&a.animatedValues.some((function(e){return!e.done})),D=!l.equ(C,T),F=!l.equ(C,a.previous),M=!l.equ(E,a.config);if(h||F&&D||M){var I;if(u||f)P=R=a.parent||new z(j);else if(m)P=R=a.parent||new q(j);else if(y){var L=a.interpolation&&a.interpolation.calc(a.parent.value);L=void 0===L||h?j:L,a.parent?(P=a.parent).setValue(0,!1):P=new z(0);var B={output:[L,i]};a.interpolation?(R=a.interpolation,a.interpolation.updateConfig(B)):R=P.interpolate(B)}return x=d(O?w.getPayload():w),S=d(P.getPayload()),h&&!y&&P.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=_(),e.done=!1,e.animatedStyles.clear()})),b(g,r)&&P.setValue(y?w:i,!1),o({},e,((I={})[r]=o({},a,{name:r,parent:P,interpolation:R,animatedValues:S,toValues:x,previous:C,config:E,fromValues:d(P.getValue()),immediate:b(g,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}),I))}return D?e:(y&&(P.setValue(1,!1),R.updateConfig({output:[C,C]})),P.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 H,i=o?b(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?b(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)},G=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 Y(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 g||(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 be(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 me=/[+\-]?(?: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,ve=new RegExp("("+Object.keys(J).join("|")+")","g"),ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).reduce((function(e,t){return ye.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ge);var je={};A((function(e){return new $(e)})),x("div"),P((function(e){var t=e.output.map((function(e){return e.replace(he,be)})).map((function(e){return e.replace(ve,be)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return B(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),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 F(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 b,m=s.current.getValue(),v=(m.scrollTop,m.scrollLeft,c(m,["scrollTop","scrollLeft"])),g=(b=e,!l.fun(b)||b.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({},v,{ref:g}))}))},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=L,t.animated=Se,t.a=Se,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,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=b(t),a=i.useRef(),u=U(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:b(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:b(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=G(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),m=(a.keys,a.items,a.onFrame),h=a.onRest,v=a.onStart,g=a.ref,y=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),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=G(t),u=a.items,s=a.keys,l=a.initial,f=a.from,p=a.enter,d=a.leave,m=a.update,h=a.trail,v=void 0===h?0:h,g=a.unique,y=a.config,O=a.order,j=void 0===O?["enter","leave","update"]:O,w=G(r),k=w.keys,E=w.items,S=o({},i.current),P=[].concat(i.deleted),R=Object.keys(S),_=new Set(R),x=new Set(s),C=s.filter((function(e){return!_.has(e)})),N=i.transitions.filter((function(e){return!e.destroyed&&!x.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return _.has(e)})),A=-v;for(;j.length;){switch(j.shift()){case"enter":C.forEach((function(e,t){g&&P.find((function(t){return t.originalKey===e}))&&(P=P.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:g?String(e):K++,item:o,trail:A+=v,config:b(y,o,c),from:b(n&&void 0!==l?l||{}:f,o),to:b(p,o)}}));break;case"leave":N.forEach((function(e){var t=k.indexOf(e),n=E[t];P.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+=v,config:b(y,n,"leave"),to:b(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+=v,config:b(y,n,"update"),to:b(m,n)})}))}}var D=s.map((function(e){return S[e]}));return P.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:C.length||N.length||T.length,first:n&&0===C.length,transitions:D,current:S,deleted:P,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 H);var l=w.current.instances.get(a),f=o({},y,{to:r,from:n,config:c,ref:g,onRest:function(n){w.current.mounted&&(e.destroyed&&(g||s||Y(w,a),d&&d(u)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(g||s)&&w.current.deleted.length>0&&Y(w),h&&h(u,t,n))},onStart:v&&function(){return v(u,t)},onFrame:m&&function(e){return m(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){!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(19),o=n(6),c=n(17),i=n(0),a=n(28),u=n(11),s=n.n(u),l=n(14),f=n.n(l),p=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,o=f()(e,["className","size"]);return React.createElement(a.SVG,s()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},o),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},d=React.createElement(p,null),b=n(129),m=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=d;break;case"no-alt":t=b.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icon,n=void 0===t?null:t,r=e.size,u=Object(c.a)(e,["icon","size"]);if("string"==typeof n)return Object(i.createElement)(m,Object(o.a)({icon:n},u));if(n&&m===n.type)return Object(i.cloneElement)(n,v({},u));var s=r||24;if("function"==typeof n)return n.prototype instanceof i.Component?Object(i.createElement)(n,v({size:s},u)):n(v({size:s},u));if(n&&("svg"===n.type||n.type===a.SVG)){var l=v(v({width:s,height:s},n.props),u);return Object(i.createElement)(a.SVG,l)}return Object(i.isValidElement)(n)?Object(i.cloneElement)(n,v({size:s},u)):n}},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(7),o=n.n(r),c=n(93),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,n){"use strict";(function(e){var r=n(0),o=n(8),c=n(5),i=n.n(c),a=n(36),u=n(1),s=(n(58),n(68));t.a=Object(r.forwardRef)((function(t,n){var c=t.className,l=t.children,f=t.spokenMessage,p=void 0===f?l:f,d=t.politeness,b=void 0===d?"polite":d,m=t.actions,h=void 0===m?[]:m,v=t.onRemove,g=void 0===v?o.noop:v;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(a.speak)(n,t)}),[n,t])}(p,b),Object(r.useEffect)((function(){var e=setTimeout((function(){g()}),1e4);return function(){return clearTimeout(e)}}),[]);var y=i()(c,"components-snackbar");return h&&h.length>1&&(void 0!==e&&e.env,h=[h[0]]),Object(r.createElement)("div",{ref:n,className:y,onClick:g,tabIndex:"0",role:"button",onKeyPress:g,"aria-label":Object(u.__)("Dismiss this notice")},Object(r.createElement)("div",{className:"components-snackbar__content"},l,h.map((function(e,t){var n=e.label,o=e.onClick,c=e.url;return Object(r.createElement)(s.a,{key:t,href:c,isTertiary:!0,onClick:function(e){e.stopPropagation(),o&&o(e)},className:"components-snackbar__action"},n)}))))}))}).call(this,n(74))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return m}));var r=n(10),o=n.n(r),c=n(15),i=n(12),a=n(0),u=n(67),s=n(21),l=n.n(s),f=n(39),p=n(63),d=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])]},m=function(e,t){var n=Object(u.a)(),r=d(t=t||n),c=o()(r,2),i=c[0],s=c[1],b=Object(f.a)(i),m=Object(f.a)(e),h=Object(p.a)(m),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(h,m)||(s(Object.assign({},b,m)),v.current=!0)}),[b,m,h,s]),v.current?[i,s]:[e,s]}},function(e,t,n){"use strict";n.d(t,"b",(function(){return x})),n.d(t,"a",(function(){return C}));var r=n(7),o=n.n(r),c=n(10),i=n.n(c),a=(n(3),n(0)),u=n(12),s=n(140),l=n(6),f=n(25),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 b(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 m=n(16),h=n(5),v=n.n(h),g=n(8),y=n(78),O=n(161),j=n(89);var w=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,c=void 0===o?g.noop:o,i=Object(O.a)(),u=Object(a.useState)((function(){return new WeakMap})),s=Object(m.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=b(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=b(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=v()("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)(j.a,Object(l.a)({},Object(g.omit)(t,["content"]),{onRemove:d(t)}),t.content)))})))},k=n(88),E=n(77),S=function(){var e=Object(E.a)().isEditor,t=Object(k.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var o=n.filter((function(e){return"snackbar"===e.type}));return React.createElement(w,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),x=function(){return Object(a.useContext)(_)},C=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,b=p.removeNotice,m=Object(a.useState)(!1),h=i()(m,2),v=h[0],g=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,R(R({},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;b(e,t)}),[b,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,R(R({},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:g},k=v?null:React.createElement(s.a,{className:r,notices:w.notices}),E=v?null:React.createElement(S,null);return React.createElement(_.Provider,{value:w},c&&k,t,E)}},,,,,,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(39),a=n(62),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 b=Object(c.useRef)({results:[],isLoading:!0}),m=Object(i.a)(f),h=Object(i.a)(s),v=Object(a.a)(),g=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),c=[t,n,m,h],i=o.getCollectionError.apply(o,c);return i&&v(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,n,h,m,d]);return null!==g&&(b.current=g),b.current}},function(e,t){!function(){e.exports=this.wp.wordcount}()},,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(31),i=n.n(c),a=n(32),u=n.n(a),s=n(20),l=n.n(s),f=n(33),p=n.n(f),d=n(34),b=n.n(d),m=n(24),h=n.n(m),v=n(7),g=n.n(v),y=n(2);n(131);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 b()(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),g()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),g()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),g()(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(React.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 b}));var r=n(11),o=n.n(r),c=n(7),i=n.n(c),a=n(0),u=n(43);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})},b=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";var r=n(0),o=n(8),c=n(5),i=n.n(c),a=n(1),u=n(36),s=n(118),l=n(68);t.a=function(e){var t=e.className,n=e.status,c=void 0===n?"info":n,f=e.children,p=e.spokenMessage,d=void 0===p?f:p,b=e.onRemove,m=void 0===b?o.noop:b,h=e.isDismissible,v=void 0===h||h,g=e.actions,y=void 0===g?[]:g,O=e.politeness,j=void 0===O?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(c):O,w=e.__unstableHTML;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(u.speak)(n,t)}),[n,t])}(d,j);var k=i()(t,"components-notice","is-"+c,{"is-dismissible":v});return w&&(f=Object(r.createElement)(r.RawHTML,null,f)),Object(r.createElement)("div",{className:k},Object(r.createElement)("div",{className:"components-notice__content"},f,y.map((function(e,t){var n=e.className,o=e.label,c=e.isPrimary,a=e.noDefaultClasses,u=void 0!==a&&a,s=e.onClick,f=e.url;return Object(r.createElement)(l.a,{key:t,href:f,isPrimary:c,isSecondary:!u&&!f,isLink:!u&&!!f,onClick:f?void 0:s,className:i()("components-notice__action",n)},o)}))),v&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:s.a,label:Object(a.__)("Dismiss this notice"),onClick:m,showTooltip:!1}))}},function(e,t,n){"use strict";var r=n(0),o=n(28),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},,,,function(e,t,n){"use strict";var r=n(6),o=n(0),c=n(8);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(14),i=n.n(c),a=n(28),u=function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return React.createElement(a.SVG,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(7),o=n.n(r),c=n(14),i=n.n(c),a=n(2);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}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(4),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(3);var r=n(5),o=n.n(r),c=n(38),i=n(122);n(159);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(3),n(5)),i=n.n(c),a=n(117),u=n(93),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(37),o=n(0),c=n(9);n.p=c.D,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,301))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)((function(){return n.e(5).then(n.bind(null,311))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)((function(){return n.e(13).then(n.bind(null,310))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)((function(){return n.e(7).then(n.bind(null,302))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)((function(){return n.e(3).then(n.bind(null,303))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)((function(){return n.e(11).then(n.bind(null,304))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)((function(){return n.e(8).then(n.bind(null,288))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)((function(){return n.e(9).then(n.bind(null,305))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)((function(){return n.e(4).then(n.bind(null,306))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)((function(){return n.e(12).then(n.bind(null,307))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)((function(){return n.e(10).then(n.bind(null,308))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)((function(){return n.e(2).then(n.bind(null,309))}))});var i=function(e){return Object(r.getRegisteredBlockComponents)(e)}},,,,,,,,,,function(e,t){},function(e,t,n){"use strict";var r=n(75),o=n.n(r);t.a=o.a},function(e,t,n){"use strict";(function(e){var r=n(57),o="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Trident")>=0,c=e.env.FORCE_REDUCED_MOTION||o?function(){return!0}:function(){return Object(r.a)("(prefers-reduced-motion: reduce)")};t.a=c}).call(this,n(74))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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(270)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(132),o=n(93),c=n(108),i=n(31),a=n.n(i),u=n(32),s=n.n(u),l=n(33),f=n.n(l),p=n(34),d=n.n(p),b=n(24),m=n.n(b),h=n(2),v=(n(3),n(10)),g=n.n(v),y=n(0),O=n(14),j=n.n(O),w=n(7),k=n.n(w),E=n(1),S=n(8),P=n(5),R=n.n(P),_=n(38),x=(n(219),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 b=[];if(u&&s)for(var m=u;m<=s;m++)b.push(m);return React.createElement("div",{className:"wc-block-pagination wc-block-components-pagination"},React.createElement(_.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(_.a,{label:"<",screenReaderLabel:Object(E.__)("Previous page","woo-gutenberg-products-block")})),l&&React.createElement("button",{className:R()("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(_.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")),b.map((function(e){return React.createElement("button",{key:e,className:R()("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(_.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:R()("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(_.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(_.a,{label:">",screenReaderLabel:Object(E.__)("Next page","woo-gutenberg-products-block")})))});x.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var C=x,N=n(139),T=(n(218),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(80),D=n(122),F=n(11),M=n.n(F),I=n(149),L=Object(D.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=R()("".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(I.a)(t);return r.map((function(r,i){var a=g()(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,b=["layout",u,i,o,d];return React.createElement(y.Suspense,{key:b.join("_"),fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(p,M()({},l,{children:f,product:n})))}))}}(a,t,o,r))})),B=n(92),V=n(99),z=n(15),q=n(12),W=n(39);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(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(W.a)(a),s=Object(W.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(63),G=n(103),Y=n(36),$=(n(217),n(130)),J=n(28),Z=React.createElement(J.SVG,{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.SVG,{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(G.a)((function(e){var t=e.attributes,n=e.currentPage,r=e.onPageChange,o=e.onSortChange,c=e.sortValue,i=e.scrollToTop,a=Object(B.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=g()(a,1)[0],s=K(u),l=s.products,f=s.totalProducts,p=s.productsLoading,d=Object(A.useInnerBlockLayoutContext)().parentClassName,b=function(e){e.order,e.orderby,e.page,e.per_page;return j()(e,["order","orderby","page","per_page"])||{}}(u),m=Object(B.b)("attributes",[]),h=g()(m,2),v=h[0],O=h[1],w=Object(B.b)("min_price"),k=g()(w,2),P=k[0],_=k[1],x=Object(B.b)("max_price"),N=g()(x,2),D=N[0],F=N[1],M=Object(Q.a)({totalQuery:b,totalProducts:f},oe);Object(y.useEffect)((function(){Object(S.isEqual)(b,null==M?void 0:M.totalQuery)||(r(1),null!=M&&M.totalQuery&&function(e){Number.isFinite(e)&&(0===e?Object(Y.speak)(Object(E.__)("No products found","woo-gutenberg-products-block")):Object(Y.speak)(Object(E.sprintf)(Object(E._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(f))}),[null==M?void 0:M.totalQuery,f,r,b]);var I,V,z,q,W,H=t.contentVisibility,U=t.columns*t.rows,G=!Number.isFinite(f)&&Number.isFinite(null==M?void 0:M.totalProducts)&&Object(S.isEqual)(b,null==M?void 0:M.totalQuery)?Math.ceil(M.totalProducts/U):Math.ceil(f/U),$=l.length?l:Array.from({length:U}),J=0!==l.length||p,Z=v.length>0||Number.isFinite(P)||Number.isFinite(D);return React.createElement("div",{className:(I=t.columns,V=t.rows,z=t.alignButtons,q=t.align,W=void 0!==q?"align"+q:"",R()(d,W,"has-"+I+"-columns",{"has-multiple-rows":V>1,"has-aligned-buttons":z}))},H.orderBy&&J&&React.createElement(T,{onChange:o,value:c}),!J&&Z&&React.createElement(te,{resetCallback:function(){O([]),_(null),F(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(L,{key:e.id||n,attributes:t,product:e})}))),G>1&&React.createElement(C,{currentPage:n,onPageChange:function(e){i({focusableSelector:"a, button"}),r(e)},totalPages:G}))})),ie=function(e){var t=e.attributes,n=Object(y.useState)(1),r=g()(n,2),o=r[0],c=r[1],i=Object(y.useState)(t.orderby),a=g()(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(9),ue=React.createElement("img",{src:ae.C+"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=m()(e);if(t){var o=m()(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 DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '47865600114d32028364905262d5be47');
 
build/all-products.js DELETED
@@ -1 +0,0 @@
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([834,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},100: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},106:function(e,t){},107:function(e,t){},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){},121: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(21),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)}},127:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(54),a=r(157),i=r(3),s=r(22),u=r(39);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}},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},134:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(5),c=r.n(n),o=r(175),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})}},135:function(e,t){!function(){e.exports=this.wp.wordcount}()},136:function(e,t,r){"use strict";var n=r(30),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(1),u=r(7),l=(r(2),r(44)),b=r(4),p=r(8),d=r.n(p),f=r(14),m=r.n(f),O=r(15),g=r.n(O),j=r(16),v=r.n(j),h=r(17),y=r.n(h),w=r(10),E=r.n(w),k=r(139);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=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(k.a)((function(e){var t=function(t){v()(n,t);var r=_(n);function n(){return m()(this,n),r.apply(this,arguments)}return g()(n,[{key:"render",value:function(){var t=this.props.selected,r=null==t;return Object(i.createElement)(e,a()({},this.props,{selected:r?[]:[t]}))}}]),n}(i.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),S=r(277),C=r(13),N=r.n(C),x=r(27),D=r.n(x),B=r(12),z=r.n(B),V=r(5),R=r.n(V),T=r(33),A=r.n(T),I=r(36),L=r(38);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){R()(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(k.a)((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)),R()(z()(e),"state",{error:null,loading:!1,variations:{}}),R()(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(I.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),{},R()({},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(L.a)(r);case 2:n=t.sent,e.setState({variations:M(M({},e.state.variations),{},R()({},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),{},R()({},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&&(!A()(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 R()(t,"defaultProps",{selected:[],showVariations:!1}),t}),"withProductVariations"),Q=r(54),G=r(31),W=Object(i.createElement)(G.SVG,{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"})),U=Object(i.createElement)(G.SVG,{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"})),Y=r(41);r(185);function K(e,t){if(!t)return e;var r=new RegExp(Object(u.escapeRegExp)(t),"ig");return e.replace(r,"<strong>$&</strong>")}var J=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(i.createElement)(Q.a,{srcElement:W}):Object(i.createElement)(Q.a,{srcElement:U})},$={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")},X=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"},J(p)),Object(i.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(i.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:K(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)(Y.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})};X.defaultProps={expandedProduct:null,selected:[],showVariations:!1};t.a=P(Object(S.a)(q(X)))},138:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=o},141:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(8)),o=r.n(c),a=r(42),i=r(213);r(187);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)}))))}))},142:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(1),i=r(55),s=r(8),u=r.n(s),l=(r(2),r(215),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)}))}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(5),c=r.n(n),o=r(7);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}},144:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(15),a=r.n(o),i=r(16),s=r.n(i),u=r(17),l=r.n(u),b=r(10),p=r.n(b),d=r(0),f=r(7),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.ToolbarGroup,{isCollapsed:n,icon:Object(d.createElement)(g,{level:a}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),r}(d.Component);t.a=v},146:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return m}));var n=r(18),c=r.n(n),o=r(37),a=r(21),i=r(0),s=r(100),u=r(33),l=r.n(u),b=r(53),p=r(96),d=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])]},f=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])]},m=function(e,t){var r=Object(s.a)(),n=d(t=t||r),o=c()(n,2),a=o[0],u=o[1],f=Object(b.a)(a),m=Object(b.a)(e),O=Object(p.a)(m),g=Object(i.useRef)(!1);return Object(i.useEffect)((function(){l()(O,m)||(u(Object.assign({},f,m)),g.current=!0)}),[f,m,O,u]),g.current?[a,u]:[e,u]}},155:function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r(5),c=r.n(n),o=r(37),a=r(21),i=r(121),s=r(28),u=r(7);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={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},d=b(b({},p),{},{email:"",phone:""}),f=function(e){return Object(u.mapValues)(e,(function(e){return Object(s.decodeEntities)(e)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:d,shippingAddress:p,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(i.b)(),r=t.isEditor,n=t.previewData,c=(null==n?void 0:n.previewCart)||{},s=e.shouldSelect,u=Object(a.useSelect)((function(e,t){var n=t.dispatch;if(!s)return m;if(r)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:d,shippingAddress:p,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var a=e(o.CART_STORE_KEY),i=a.getCartData(),u=a.getCartErrors(),l=a.getCartTotals(),b=!a.hasFinishedResolution("getCartData"),O=a.isCustomerDataUpdating(),g=n(o.CART_STORE_KEY).receiveCart,j=f(i.billingAddress),v=i.needsShipping?f(i.shippingAddress):j;return{cartCoupons:i.coupons,cartItems:i.items||[],cartFees:i.fees||[],cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors||[],cartTotals:l,cartIsLoading:b,cartErrors:u,billingAddress:j,shippingAddress:v,extensions:i.extensions||{},shippingRates:i.shippingRates||[],shippingRatesLoading:O,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements||[],receiveCart:g}}),[s]);return u}},156:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(37),c=r(21),o=r(0),a=r(53),i=r(95),s=function(e){var t=e.namespace,r=e.resourceName,s=e.resourceValues,u=void 0===s?[]:s,l=e.query,b=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var f=Object(o.useRef)({results:[],isLoading:!0}),m=Object(a.a)(b),O=Object(a.a)(u),g=Object(i.a)(),j=Object(c.useSelect)((function(e){if(!d)return null;var c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,m,O],a=c.getCollectionError.apply(c,o);return a&&g(a),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,r,O,m,d]);return null!==j&&(f.current=j),f.current}},157:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(n.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(n.createElement)("g",{mask:"url(#external-mask)"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},165:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(6),o=Object(n.createElement)("img",{src:c.S+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},166:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=(r(2),r(28)),u=r(8),l=r.n(u);r(214);t.a=function(e){var t=e.className,r=void 0===t?"":t,n=e.disabled,o=void 0!==n&&n,u=e.name,b=e.permalink,p=void 0===b?"":b,d=a()(e,["className","disabled","name","permalink"]),f=l()("wc-block-components-product-name",r);return o?Object(i.createElement)("span",c()({className:f},d),Object(s.decodeEntities)(u)):Object(i.createElement)("a",c()({className:f,href:p},d),Object(s.decodeEntities)(u))}},167:function(e,t,r){"use strict";var n=r(0),c=r(135),o=r(89),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)}},171:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(14),a=r.n(o),i=r(15),s=r.n(i),u=r(12),l=r.n(u),b=r(16),p=r.n(b),d=r(17),f=r.n(d),m=r(10),O=r.n(m),g=r(5),j=r.n(g),v=r(0),h=r(9);r(240);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)(v.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}},175:function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return j}));var n=r(5),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=(r(2),r(21)),u=r(279),l=r(931),b=r(134),p=r(121),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]),k=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]),_={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(b)}}),[b]).notices,createNotice:w,createSnackbarNotice:k,removeNotice:E,context:b,setIsSuppressed:y},P=h?null:Object(i.createElement)(u.a,{className:n,notices:_.notices}),S=h?null:Object(i.createElement)(d,null);return Object(i.createElement)(O.Provider,{value:_},o&&P,t,S)}},178:function(e,t){},185:function(e,t){},187:function(e,t){},189:function(e,t){!function(){e.exports=this.wp.warning}()},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},20:function(e,t){!function(){e.exports=this.wp.url}()},207: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}}},21:function(e,t){!function(){e.exports=this.wp.data}()},214:function(e,t){},215:function(e,t){},216:function(e,t){},217:function(e,t){},218:function(e,t){},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},240:function(e,t){},246:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(31),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.SVG,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(261);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}},26:function(e,t){!function(){e.exports=this.moment}()},261:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(31),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]);return Object(i.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),Object(i.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},277:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(13),a=r.n(o),i=r(27),s=r.n(i),u=r(14),l=r.n(u),b=r(15),p=r.n(b),d=r(12),f=r.n(d),m=r(16),O=r.n(m),g=r(17),j=r.n(g),v=r(10),h=r.n(v),y=r(0),w=r(7),E=r(139),k=(r(2),r(6)),_=r(36),P=r(38);function S(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 C=Object(E.a)((function(e){var t=function(t){O()(o,t);var r,n=S(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(_.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(_.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:k.u?function(e){t.setState({loading:!0}),t.debouncedOnSearch(e)}:null}))}}]),o}(y.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");t.a=C},278:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(8),s=r.n(i),u=r(42),l=r(39),b=r(66);r(539);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")}))}))},279:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(375),u=r(175),l=(r(216),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)})))}},28:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},280:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(88),o=(r(2),r(218),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))})},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},34:function(e,t){!function(){e.exports=this.wp.dataControls}()},345:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},36: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(5),c=r.n(n),o=r(20),a=r(19),i=r.n(a),s=r(7),u=r(6);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.u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",b(b({},s),i))];return u.u&&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.w?100:0,orderby:u.w?"count":"name",order:u.w?"desc":"asc",search:n})];return u.w&&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))}},37:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},376:function(e,t){},378:function(e,t,r){"use strict";var n=r(5),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={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(o.V)()&&(s=i(i({},s),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=s},379: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}}},38:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(13),c=r.n(n),o=r(27),a=r.n(o),i=r(1),s=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)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},380:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(18),s=r.n(i),u=r(0),l=(r(2),r(1)),b=r(8),p=r.n(b),d=r(6),f=r(39),m=r(66),O=r(278);r(540);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 j(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){a()(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 v=function(){return Object(u.createElement)("img",{src:d.E,alt:"",width:500,height:500})},h=function(e){var t=e.image,r=e.onLoad,n=e.loaded,o=e.showFullSize,a=e.fallbackAlt,i=t||{},s=i.thumbnail,l=i.src,b=i.srcset,p=i.sizes,d=j({alt:i.alt||a,onLoad:r,hidden:!n,src:s},o&&{src:l,srcSet:b,sizes:p});return Object(u.createElement)(u.Fragment,null,d.src&&Object(u.createElement)("img",c()({"data-testid":"product-image"},d)),!n&&Object(u.createElement)(v,null))};t.a=Object(m.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,c=e.productLink,o=void 0===c||c,i=e.showSaleBadge,b=e.saleBadgeAlign,d=void 0===b?"right":b,m=Object(f.useInnerBlockLayoutContext)().parentClassName,g=Object(f.useProductDataContext)().product,y=Object(u.useState)(!1),w=s()(y,2),E=w[0],k=w[1];if(!g.id)return Object(u.createElement)("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",a()({},"".concat(m,"__product-image"),m))},Object(u.createElement)(v,null));var _=!!g.images.length,P=_?g.images[0]:null,S=o?"a":u.Fragment,C=Object(l.sprintf)(Object(l.__)("Link to %s","woo-gutenberg-products-block"),g.name),N=j({href:g.permalink,rel:"nofollow"},!_&&{"aria-label":C});return Object(u.createElement)("div",{className:p()(t,"wc-block-components-product-image",a()({},"".concat(m,"__product-image"),m))},Object(u.createElement)(S,o&&N,!!i&&Object(u.createElement)(O.default,{align:d,product:g}),Object(u.createElement)(h,{fallbackAlt:g.name,image:P,onLoad:function(){return k(!0)},loaded:E,showFullSize:"cropped"!==n})))}))},381:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(143),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))}}}},382:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return d}));var n=r(13),c=r.n(n),o=r(45),a=r.n(o),i=r(27),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)}}()},383:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},384:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(8)),o=r.n(c),a=r(18),i=r.n(a),s=r(1),u=r(53),l=r(134),b=r(207),p=r(916),d="pristine",f="idle",m="disabled",O="processing",g="before_processing",j="after_processing",v={status:d,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},h="set_pristine",y="set_idle",w="set_disabled",E="set_processing",k="set_before_processing",_="set_after_processing",P="set_processing_response",S="set_has_error",C="set_no_error",N="set_quantity",x="set_request_params",D=h,B=y,z=w,V=E,R=k,T=_,A=P,I=S,L=C,F=N,M=x,H=function(){return{type:D}},q=function(){return{type:B}},Q=function(){return{type:z}},G=function(){return{type:V}},W=function(){return{type:R}},U=function(){return{type:T}},Y=function(e){return{type:A,data:e}},K=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:L;return{type:t}},J=function(e){return{type:F,quantity:e}},$=function(e){return{type:M,data:e}},X=r(5),Z=r.n(X);function ee(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 te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var re=h,ne=y,ce=w,oe=E,ae=k,ie=_,se=P,ue=S,le=C,be=N,pe=x,de=d,fe=f,me=m,Oe=O,ge=g,je=j,ve=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case re:e=v;break;case ne:e=t.status!==fe?te(te({},t),{},{status:fe}):t;break;case ce:e=t.status!==me?te(te({},t),{},{status:me}):t;break;case be:e=n!==t.quantity?te(te({},t),{},{quantity:n}):t;break;case pe:e=te(te({},t),{},{requestParams:te(te({},t.requestParams),o)});break;case se:e=te(te({},t),{},{processingResponse:o});break;case oe:e=!1===(e=t.status!==Oe?te(te({},t),{},{status:Oe,hasError:!1}):t).hasError?e:te(te({},e),{},{hasError:!1});break;case ae:e=t.status!==ge?te(te({},t),{},{status:ge,hasError:!1}):t;break;case ie:e=t.status!==je?te(te({},t),{},{status:je}):t;break;case ue:e=t.hasError?t:te(te({},t),{},{hasError:!0}),e=t.status===Oe||t.status===ge?te(te({},e),{},{status:fe}):e;break;case le:e=t.hasError?te(te({},t),{},{hasError:!1}):t}return e!==t&&c!==re&&e.status===de&&(e.status=fe),e},he=r(143),ye=r(381),we="add_to_cart_before_processing",Ee="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",_e=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(ye.a)(Ee,e),onAddToCartProcessingWithError:Object(ye.a)(ke,e),onAddToCartBeforeProcessing:Object(ye.a)(we,e)}},Pe=r(382),Se=r(88),Ce=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)(Ce)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(ve,v),a=i()(o,2),d=a[0],h=a[1],y=Object(n.useReducer)(he.b,{}),w=i()(y,2),E=w[0],k=w[1],_=Object(u.a)(E),P=Object(l.a)(),S=P.addErrorNotice,C=P.removeNotices,N=Object(Se.b)().setValidationErrors,x=Object(b.a)(),D=x.isSuccessResponse,B=x.isErrorResponse,z=x.isFailResponse,V=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:_e(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:_e(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:_e(k).onAddToCartBeforeProcessing}}),[k]),R=Object(n.useMemo)((function(){return{resetForm:function(){h(H())},submitForm:function(){h(W())},setQuantity:function(e){h(J(e))},setHasError:function(e){h(K(e))},setRequestParams:function(e){h($(e))},setAfterProcessing:function(e){h(Y(e)),h(U())}}}),[]);Object(n.useEffect)((function(){var e=d.status,t=!r.id||!Object(p.a)(r);e!==m||t?e!==m&&t&&h(Q()):h(q())}),[d.status,r,h]),Object(n.useEffect)((function(){d.status===g&&(C("error"),Object(Pe.a)(_,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&S(t),r&&N(r)})),h(q())):h(G())})))}),[d.status,N,S,C,h,_]),Object(n.useEffect)((function(){if(d.status===j){var e={processingResponse:d.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;S(e.message,t)}};if(d.hasError)return void Object(Pe.b)(_,ke,e).then((function(r){if(B(r)||z(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");S(c,{id:"add-to-cart"})}h(q())}));Object(Pe.b)(_,Ee,e).then((function(e){B(e)||z(e)?(t(e),h(K(!0))):h(q())}))}}),[d.status,d.hasError,d.processingResponse,R,S,B,z,D,_]);var T=Object(p.b)(r),A={product:r,productType:r.type||"simple",productIsPurchasable:Object(p.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:T,showFormElements:c&&T,quantity:d.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:d.requestParams,isIdle:d.status===f,isDisabled:d.status===m,isProcessing:d.status===O,isBeforeProcessing:d.status===g,isAfterProcessing:d.status===j,hasError:d.hasError,eventRegistration:V,dispatchActions:R};return Object(n.createElement)(Ce.Provider,{value:A},t)},De=r(19),Be=r.n(De),ze=r(155),Ve=r(28),Re=r(523);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}var Ae=function(){var e=Ne(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,a=e.hasError,u=e.isProcessing,b=e.requestParams,p=Object(Se.b)(),d=p.hasValidationErrors,f=p.showAllValidationErrors,m=Object(l.a)(),O=m.addErrorNotice,g=m.removeNotice,j=Object(ze.a)().receiveCart,v=Object(n.useState)(!1),h=i()(v,2),y=h[0],w=h[1],E=!a&&u,k=Object(n.useCallback)((function(){return!d||(f(),{type:"error"})}),[d,f]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var _=Object(n.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?Te(Object(r),!0).forEach((function(t){Z()(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}({id:r.id||0,quantity:c},b);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?j(r):(r.body&&r.body.message?O(Object(Ve.decodeEntities)(r.body.message),{id:"add-to-cart"}):O(Object(s.__)("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(Re.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&j(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,O,g,j,t,c,b]);return Object(n.useEffect)((function(){E&&!y&&_()}),[E,_,y]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(Se.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Ae,null)))},Le=r(39),Fe=r(7),Me=r(66),He=(r(376),r(94)),qe=r(54),Qe=r(549),Ge=r(837),We=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)},Ue=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(s.sprintf)(Object(s._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(s.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(qe.a,{srcElement:Qe.a,alt:Object(s.__)("Done","woo-gutenberg-products-block")}))},Ye=function(){var e=Ne(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,u=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,p=e.hasError,d=e.dispatchActions,f=Object(Ge.a)(o.id||0).cartQuantity,m=Object(n.useState)(!1),O=i()(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)(Ue,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:f,isDisabled:u,isProcessing:l,isDone:g,onClick:function(){return d.submitForm()}}):Object(n.createElement)(We,{className:"wc-block-components-product-add-to-cart-button",href:v.url,text:v.text||Object(s.__)("View Product","woo-gutenberg-products-block")})},Ke=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)}})},Je=function(e){var t=e.reason,r=void 0===t?Object(s.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$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)(Je,null):t.id&&!t.is_in_stock?Object(n.createElement)(Je,{reason:Object(s.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ke,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},Xe=(r(548),r(30)),Ze=r.n(Xe),et=r(4),tt=r(9),rt=r(280),nt={value:"",label:Object(s.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,a=e.value,i=void 0===a?"":a,u=e.onChange,l=void 0===u?function(){}:u,b=e.errorMessage,p=void 0===b?Object(s.__)("Please select a value.","woo-gutenberg-products-block"):b,d=Object(Se.b)(),f=d.getValidationError,m=d.setValidationErrors,O=d.clearValidationError,g=t,j=f(g)||{};return Object(tt.useEffect)((function(){i?O(g):m(Z()({},g,{message:p,hidden:!0}))}),[i,g,p,O,m]),Object(tt.useEffect)((function(){return function(){O(g)}}),[g,O]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Ve.decodeEntities)(t),value:i||"",options:[nt].concat(Ze()(c)),onChange:l,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":j.message&&!j.hidden})}),Object(n.createElement)(rt.a,{propertyName:g,elementId:g}))};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){Z()(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),{},Z()({},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(Ve.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){Z()(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(u.a)(t),a=Object(u.a)(r),s=Object(n.useState)(0),l=i()(s,2),b=l[0],p=l[1],d=Object(n.useState)({}),f=i()(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),{},Z()({},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)(Je,null):t.id&&!t.is_in_stock?Object(n.createElement)(Je,{reason:Object(s.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(pt,{product:t,dispatchers:a}),Object(n.createElement)(Ke,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},ft=function(){return Object(n.createElement)(Ye,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)(Ye,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Le.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)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(gt,null)))}))},385:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(39),u=r(22),l=r(6),b=function(e){var t=e.color,r=e.fontSize;return Object(l.V)()?{color:t,fontSize:r}:{}},p=r(66),d=r(166);r(538),t.a=Object(p.withProductDataContext)((function(e){var t,r,n,a=e.className,p=e.headingLevel,f=void 0===p?2:p,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(s.useInnerBlockLayoutContext)().parentClassName,E=Object(s.useProductDataContext)().product,k="h".concat(f),_=Object(u.getColorClassName)("color",j),P=Object(u.getFontSizeClass)(h),S=i()((t={"has-text-color":j||v,"has-font-size":h||y},c()(t,_,_),c()(t,P,P),t));return E.id?Object(o.createElement)(k,{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(l.V)()),r))},Object(o.createElement)(d.a,{className:i()(c()({},S,Object(l.V)())),disabled:!O,name:E.name,permalink:E.permalink,rel:O?"nofollow":null,style:b({color:v,fontSize:y})})):Object(o.createElement)(k,{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(l.V)()),c()(n,S,Object(l.V)()),n)),style:b({color:v,fontSize:y})})}))},39:function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},41:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(40));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")))}},42:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r(8),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))}},48:function(e,t){!function(){e.exports=this.wp.keycodes}()},51:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},520:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(142),u=r(63),l=r(39),b=r(22),p=r(6),d=r(66);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,k=e.saleColor,_=e.customSaleColor,P=Object(l.useInnerBlockLayoutContext)().parentClassName,S=Object(l.useProductDataContext)().product,C=i()(O,c()({},"".concat(P,"__product-price"),P));if(!S.id)return Object(o.createElement)(s.a,{align:g,className:C});var N=Object(b.getColorClassName)("color",w),x=Object(b.getFontSizeClass)(j),D=Object(b.getColorClassName)("color",k),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)),V=i()((r={"has-text-color":k||_,"has-font-size":h||y},c()(r,D,D),c()(r,B,B),r)),R={color:E,fontSize:v},T={color:_,fontSize:y},A=S.prices,I=Object(u.getCurrencyFromPriceResponse)(A),L=A.price!==A.regular_price,F=L?i()((n={},c()(n,"".concat(P,"__product-price__value"),P),c()(n,V,Object(p.V)()),n)):i()((a={},c()(a,"".concat(P,"__product-price__value"),P),c()(a,z,Object(p.V)()),a)),M=L?T:R;return Object(o.createElement)(s.a,{align:g,className:C,currency:I,price:A.price,priceClassName:F,priceStyle:Object(p.V)()?M:{},minPrice:null==A||null===(d=A.price_range)||void 0===d?void 0:d.min_amount,maxPrice:null==A||null===(f=A.price_range)||void 0===f?void 0:f.max_amount,regularPrice:A.regular_price,regularPriceClassName:i()((m={},c()(m,"".concat(P,"__product-price__regular"),P),c()(m,z,Object(p.V)()),m)),regularPriceStyle:Object(p.V)()?R:{}})}))},521:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(8),s=r.n(i),u=r(39),l=r(66),b=(r(541),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,"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)))}))},522:function(e,t,r){"use strict";r.r(t);var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(0),s=(r(2),r(8)),u=r.n(s),l=r(1),b=r(837),p=r(28),d=r(523),f=r(39),m=r(66),O=(r(542),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")),k=y?"button":"a",_={};return y?_.onClick=function(){v()}:(_.href=o,_.rel="nofollow"),Object(i.createElement)(k,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},_),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))}))},523: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)}}},524:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(167),u=r(3),l=r(39),b=r(66);r(543);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})}))},525:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(66);r(544);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}))},526:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(7),b=r(66);r(545);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))}))))}))},527:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(7),b=r(66);r(546);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.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))}))))}))},528:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(66),b=(r(547),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))}))},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(33),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},538:function(e,t){},539:function(e,t){},54:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(24),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))}},540:function(e,t){},541:function(e,t){},542:function(e,t){},543:function(e,t){},544:function(e,t){},545:function(e,t){},546:function(e,t){},547:function(e,t){},548:function(e,t){},549:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},55:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(24),s=r.n(i),u=r(0),l=r(170),b=r(8),p=r.n(b);r(178);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}))}},58:function(e,t){!function(){e.exports=this.wp.hooks}()},6:function(e,t,r){"use strict";r.d(t,"l",(function(){return c})),r.d(t,"I",(function(){return o})),r.d(t,"O",(function(){return a})),r.d(t,"y",(function(){return i})),r.d(t,"A",(function(){return s})),r.d(t,"m",(function(){return u})),r.d(t,"z",(function(){return l})),r.d(t,"C",(function(){return b})),r.d(t,"o",(function(){return p})),r.d(t,"B",(function(){return d})),r.d(t,"n",(function(){return f})),r.d(t,"E",(function(){return m})),r.d(t,"u",(function(){return O})),r.d(t,"w",(function(){return g})),r.d(t,"r",(function(){return j})),r.d(t,"s",(function(){return v})),r.d(t,"t",(function(){return h})),r.d(t,"k",(function(){return y})),r.d(t,"K",(function(){return w})),r.d(t,"P",(function(){return E})),r.d(t,"q",(function(){return k})),r.d(t,"p",(function(){return _})),r.d(t,"H",(function(){return P})),r.d(t,"c",(function(){return S})),r.d(t,"v",(function(){return C})),r.d(t,"S",(function(){return x})),r.d(t,"T",(function(){return D})),r.d(t,"J",(function(){return B})),r.d(t,"a",(function(){return z})),r.d(t,"M",(function(){return V})),r.d(t,"b",(function(){return R})),r.d(t,"L",(function(){return T})),r.d(t,"D",(function(){return A})),r.d(t,"i",(function(){return I})),r.d(t,"N",(function(){return M})),r.d(t,"h",(function(){return H})),r.d(t,"j",(function(){return q})),r.d(t,"G",(function(){return Q})),r.d(t,"F",(function(){return G})),r.d(t,"R",(function(){return W})),r.d(t,"Q",(function(){return U})),r.d(t,"d",(function(){return Y})),r.d(t,"e",(function(){return K})),r.d(t,"f",(function(){return J})),r.d(t,"g",(function(){return $})),r.d(t,"x",(function(){return X})),r.d(t,"W",(function(){return ee})),r.d(t,"X",(function(){return te})),r.d(t,"U",(function(){return re})),r.d(t,"V",(function(){return ne}));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),k=(Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),_=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),P=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),C=Object(n.getSetting)("isShippingCalculatorEnabled",!0),N=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),x=Object(n.getSetting)("wcBlocksAssetUrl",""),D=Object(n.getSetting)("wcBlocksBuildUrl",""),B=Object(n.getSetting)("shippingCountries",{}),z=Object(n.getSetting)("allowedCountries",{}),V=Object(n.getSetting)("shippingStates",{}),R=Object(n.getSetting)("allowedStates",{}),T=Object(n.getSetting)("shippingMethodsExist",!1),A=Object(n.getSetting)("paymentGatewaySortOrder",[]),I=Object(n.getSetting)("checkoutShowLoginReminder",!0),L={id:0,title:"",permalink:""},F=Object(n.getSetting)("storePages",{shop:L,cart:L,checkout:L,privacy:L,terms:L}),M=F.shop.permalink,H=F.checkout.id,q=F.checkout.permalink,Q=F.privacy.permalink,G=F.privacy.title,W=F.terms.permalink,U=F.terms.title,Y=F.cart.id,K=F.cart.permalink,J=Object(n.getSetting)("checkoutAllowsGuest",!1),$=Object(n.getSetting)("checkoutAllowsSignup",!1),X=Object(n.getSetting)("loginUrl","/wp-login.php"),Z=r(23),ee=function(e,t){if(N>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(N>1)return Object(Z.registerBlockType)(e,t)},re=function(){return N>2},ne=function(){return N>1}},63:function(e,t){!function(){e.exports=this.wc.priceFormat}()},66:function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},67:function(e,t){!function(){e.exports=this.wp.dom}()},68:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(14),a=r.n(o),i=r(15),s=r.n(i),u=r(12),l=r.n(u),b=r(16),p=r.n(b),d=r(17),f=r.n(d),m=r(10),O=r.n(m),g=r(0),j=r(7),v=r(8),h=r.n(v),y=r(4),w=r(177);r(119);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 k=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.isSecondary=!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.a)(k)},7:function(e,t){!function(){e.exports=this.lodash}()},70:function(e,t){!function(){e.exports=this.wp.deprecated}()},71:function(e,t){!function(){e.exports=this.wp.a11y}()},73:function(e,t){!function(){e.exports=this.ReactDOM}()},75:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(7),a=(r(2),r(4)),i=r(6);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.A,i.y);s({columns:Number.isNaN(t)?"":t})},min:i.A,max:i.y}),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.C,i.z);s({rows:Number.isNaN(t)?"":t})},min:i.C,max:i.z}),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})}}))}},76:function(e,t){!function(){e.exports=this.wp.viewport}()},77:function(e,t){!function(){e.exports=this.wp.date}()},806:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"}));t.a=o},813:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}),Object(n.createElement)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),Object(n.createElement)("path",{d:"M8.9 12.55c0 .57.23 1.07.6 1.45l3.5 3.5 3.5-3.5c.37-.37.6-.89.6-1.45 0-1.13-.92-2.05-2.05-2.05-.57 0-1.08.23-1.45.6l-.6.6-.6-.59c-.37-.38-.89-.61-1.45-.61-1.13 0-2.05.92-2.05 2.05z"}));t.a=o},821:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}));t.a=o},822:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),c=r(6),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.S+"img/pennant.jpg",thumbnail:c.S+"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}]},827:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));t.a=o},834:function(e,t,r){e.exports=r(886)},835:function(e,t){},836:function(e,t){},837:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(18),c=r.n(n),o=r(0),a=r(21),i=r(37),s=r(28),u=r(134),l=r(155),b=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},p=function(e){var t=Object(a.useDispatch)(i.CART_STORE_KEY).addItemToCart,r=Object(l.a)(),n=r.cartItems,p=r.cartIsLoading,d=Object(u.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(s.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},839:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=o},840:function(e,t){},841:function(e,t){},842:function(e,t){},843:function(e,t){},88:function(e,t,r){"use strict";r.d(t,"b",(function(){return v})),r.d(t,"a",(function(){return h}));var n=r(45),c=r.n(n),o=r(5),a=r.n(o),i=r(24),s=r.n(i),u=r(18),l=r.n(u),b=r(0),p=r(7),d=r(33),f=r.n(d);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){a()(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}function g(e){var t=function(e,t){if("object"!==c()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c()(t)?t:String(t)}var j=Object(b.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}}),v=function(){return Object(b.useContext)(j)},h=function(e){var t=e.children,r=Object(b.useState)({}),n=l()(r,2),c=n[0],o=n[1],i=Object(b.useCallback)((function(e){return c[e]}),[c]),u=Object(b.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),d=Object(b.useCallback)((function(e){o((function(t){if(!t[e])return t;t[e];return s()(t,[e].map(g))}))}),[]),m=Object(b.useCallback)((function(){o({})}),[]),v=Object(b.useCallback)((function(e){e&&o((function(t){return e=Object(p.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!f()(t[r],e))})),0===Object.values(e).length?t:O(O({},t),e)}))}),[]),h=Object(b.useCallback)((function(e,t){o((function(r){if(!r.hasOwnProperty(e))return r;var n=O(O({},r[e]),t);return f()(r[e],n)?r:O(O({},r),{},a()({},e,n))}))}),[]),y={getValidationError:i,setValidationErrors:v,clearValidationError:d,clearAllValidationErrors:m,hideValidationError:Object(b.useCallback)((function(e){h(e,{hidden:!0})}),[h]),showValidationError:Object(b.useCallback)((function(e){h(e,{hidden:!1})}),[h]),showAllValidationErrors:Object(b.useCallback)((function(){o((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=O(O({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:O(O({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:u};return Object(b.createElement)(j.Provider,{value:y},t)}},886:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(1),u=r(22),l=r(23),b=r(54),p=r(31),d=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"})),f=r(6),m=r(8),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.U)()?null:["@woocommerce/all-products","@woocommerce/single-product"],save:g,deprecated:[{save:function(){}}]},v=r(378),h=r(4),y=r(925),w=r(144),E=r(385),k=r(18),_=r.n(k),P=r(136),S=r(24),C=r.n(S);r(836);var N=function(e){var t=e.className,r=void 0===t?"":t,n=C()(e,["className"]),c=O()("wc-block-text-toolbar-button",r);return Object(i.createElement)(h.Button,a()({className:c},n))},x=r(39),D=(r(835),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=_()(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,{isSecondary:!0,disabled:!a,onClick:function(){d(!1)}},Object(s.__)("Done","woo-gutenberg-products-block")))):Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.ToolbarGroup,null,Object(i.createElement)(N,{onClick:function(){return d(!0)}},Object(s.__)("Switch product…","woo-gutenberg-products-block")))),Object(i.createElement)(t,r)))}}}),B=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(i.createElement)("path",{d:"M17 3H7a2 2 0 00-2 2v16l7-3 7 3V5a2 2 0 00-2-2z"})),z=Object(s.__)("Product Title","woo-gutenberg-products-block"),V=Object(i.createElement)(b.a,{srcElement:B}),R=Object(s.__)("Display the title of a product.","woo-gutenberg-products-block"),T=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.V)()&&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.V)()&&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)))},A=Object(f.V)()?Object(y.a)([Object(u.withFontSizes)("fontSize"),Object(u.withColors)("color",{textColor:"color"}),D({icon:V,label:z,description:Object(s.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(T):T;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 L(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 F={title:z,description:R,icon:{src:V,foreground:"#874FB9"},attributes:v.a,edit:A};Object(l.registerBlockType)("woocommerce/product-title",L(L({},j),F));var M=r(520),H=r(345),q=Object(s.__)("Product Price","woo-gutenberg-products-block"),Q=Object(i.createElement)(b.a,{srcElement:H.a}),G=Object(s.__)("Display the price of a product.","woo-gutenberg-products-block"),W=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")})))},U=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.V)()&&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.V)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Price","woo-gutenberg-products-block")},Object(i.createElement)(W,{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)(W,{color:a,setColor:b,fontSize:r,setFontSize:c,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})))),Object(i.createElement)(M.default,p))},Y=Object(f.V)()?Object(y.a)([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:Q,label:q,description:Object(s.__)("Choose a product to display its price.","woo-gutenberg-products-block")})])(U):U;function K(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?K(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $={productId:{type:"number",default:0}};function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(f.V)()&&($=J(J({},$),{},{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:G,icon:{src:Q,foreground:"#874FB9"},attributes:$,edit:Y};Object(l.registerBlockType)("woocommerce/product-price",Z(Z({},j),ee));var te=r(379),re=r(176),ne=r(68),ce=r(3),oe=r(380),ae=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"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(521),Oe=r(821),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(522),ke=r(839),_e=Object(s.__)("Add to Cart Button","woo-gutenberg-products-block"),Pe=Object(i.createElement)(b.a,{srcElement:ke.a});function Se(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 Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne={title:_e,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:_e,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",Ce(Ce({},j),Ne));var xe={productId:{type:"number",default:0}},De=r(524),Be=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),ze=Object(s.__)("Product Summary","woo-gutenberg-products-block"),Ve=Object(i.createElement)(b.a,{srcElement:Be});function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae={title:ze,description:Object(s.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:Ve,foreground:"#874FB9"},attributes:xe,edit:D({icon:Ve,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",Te(Te({},j),Ae));var Ie={productId:{type:"number",default:0}},Le=r(278),Fe=r(813),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 Qe(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 Ge={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:Ie,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)(Le.default,t)}))};Object(l.registerBlockType)("woocommerce/product-sale-badge",Qe(Qe({},j),Ge));var We={productId:{type:"number",default:0}},Ue=r(127),Ye=r(525),Ke=Object(i.createElement)(p.SVG,{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"})),Je=Object(s.__)("Product SKU","woo-gutenberg-products-block"),$e=Object(i.createElement)(b.a,{srcElement:Ke});function Xe(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?Xe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var et={title:Je,description:Object(s.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:$e,foreground:"#874FB9"},attributes:We,edit:D({icon:$e,label:Je,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)(Ue.a,null),Object(i.createElement)(Ye.default,t))}))};Object(f.W)("woocommerce/product-sku",Ze(Ze({},j),et));var tt={productId:{type:"number",default:0}},rt=r(526),nt=r(806),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)(Ue.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(rt.default,t)))}))};Object(f.W)("woocommerce/product-category-list",it(it({},j),st));var ut={productId:{type:"number",default:0}},lt=r(527),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)(Ue.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(lt.default,t)))}))};Object(f.W)("woocommerce/product-tag-list",ft(ft({},j),mt));var Ot={productId:{type:"number",default:0}},gt=r(528),jt=Object(i.createElement)(p.SVG,{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)(Ue.a,null),Object(i.createElement)(gt.default,t))}))};Object(f.W)("woocommerce/product-stock-indicator",wt(wt({},j),Et));var kt=r(916),_t=(r(376),r(384)),Pt=Object(s.__)("Add to Cart","woo-gutenberg-products-block"),St=Object(i.createElement)(b.a,{srcElement:ke.a});function Ct(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?Ct(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ct(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:St,foreground:"#874FB9"},edit:D({icon:St,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)(Ue.a,{productId:n.id}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block")},Object(kt.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)(_t.a,t)))})),attributes:r(383).a};Object(f.W)("woocommerce/product-add-to-cart",Nt(Nt({},j),xt));var Dt=r(14),Bt=r.n(Dt),zt=r(12),Vt=r.n(zt),Rt=r(16),Tt=r.n(Rt),At=r(17),It=r.n(At),Lt=r(10),Ft=r.n(Lt),Mt=r(21),Ht=(r(2),r(75)),qt=r(912),Qt=r(822),Gt=r(157),Wt=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})},Ut=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",isSecondary:!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:Gt.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")))},Yt=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 Kt(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 Jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(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"]],Xt=function e(t){return t&&0!==t.length?t.map((function(t){return[t.name,Jt(Jt({},t.attributes),{},{product:void 0,children:t.innerBlocks.length>0?e(t.innerBlocks):[]})]})):[]};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(15),cr=r.n(nr),or=r(9),ar=r(7),ir=r(42),sr=(r(843),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(141),br=(r(842),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(213),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=_()(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(146),mr=r(156),Or=r(37),gr=r(53);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(96),wr=r(171),Er=r(71),kr=(r(841),r(138)),_r=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:kr.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(827),Sr=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 Cr(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?Cr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cr(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=_()(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 C()(e,["order","orderby","page","per_page"])||{}}(l),j=Object(fr.b)("attributes",[]),v=_()(j,2),h=v[0],y=v[1],w=Object(fr.b)("min_price"),E=_()(w,2),k=E[0],P=E[1],S=Object(fr.b)("max_price"),N=_()(S,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&&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 V,R,T,A,I,L=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,Q=h.length>0||Number.isFinite(k)||Number.isFinite(D);return Object(i.createElement)("div",{className:(V=t.columns,R=t.rows,T=t.alignButtons,A=t.align,I=void 0!==A?"align"+A:"",O()(m,I,"has-"+V+"-columns",{"has-multiple-rows":R>1,"has-aligned-buttons":T}))},L.orderBy&&q&&Object(i.createElement)(br,{onChange:c,value:o}),!q&&Q&&Object(i.createElement)(Sr,{resetCallback:function(){y([]),P(null),B(null)}}),!q&&!Q&&Object(i.createElement)(_r,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=_()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),s=_()(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(165);function Vr(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 It()(this,r)}}var Rr=function(e){Tt()(r,e);var t=Vr(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);r(840);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 It()(this,r)}}var Ar=function(e){Tt()(r,e);var t=Tr(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()(Vt()(e),"state",{isEditing:!1,innerBlocks:[]}),c()(Vt()(e),"blockMap",Object(qt.a)("woocommerce/all-products")),c()(Vt()(e),"componentDidMount",(function(){var t=e.props.block;e.setState({innerBlocks:t.innerBlocks})})),c()(Vt()(e),"getTitle",(function(){return Object(s.__)("All Products","woo-gutenberg-products-block")})),c()(Vt()(e),"getIcon",(function(){return Object(i.createElement)(b.a,{srcElement:d})})),c()(Vt()(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()(Vt()(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()(Vt()(e),"getBlockControls",(function(){var t=e.state.isEditing;return Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.ToolbarGroup,{controls:[{icon:"edit",title:Object(s.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return e.togglePreview()},isActive:t}]}))})),c()(Vt()(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:Qt.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,onClick:function(){var t=e.props,r=t.block;(0,t.setAttributes)({layoutConfig:Xt(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.Button,{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=_()(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()(Vt()(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)(Rr,{attributes:t})):Yt(c,o)})),c()(Vt()(e),"render",(function(){var t=e.props.attributes,r=e.state.isEditing,n=e.getTitle(),c=e.getIcon();return f.r?Object(i.createElement)("div",{className:Wt("wc-block-all-products",t)},e.getBlockControls(),e.getInspectorControls(),r?e.renderEditMode():e.renderViewMode()):Ut(n,c)})),e}return r}(i.Component),Ir=Object(y.a)(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),Lr={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:Lr,edit:function(e){return Object(i.createElement)(Ir,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:Wt("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:Wt("wc-block-all-products",t)},r),Object(i.createElement)(u.InnerBlocks.Content,null))}}]}))},89:function(e,t){!function(){e.exports=this.wp.autop}()},9:function(e,t){!function(){e.exports=this.React}()},912:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(51),c=r(0),o=r(6);r.p=o.T,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,520))}))}),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,933))}))}),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,934))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(c.lazy)((function(){return r.e(12).then(r.bind(null,521))}))}),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,522))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(c.lazy)((function(){return r.e(15).then(r.bind(null,524))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(c.lazy)((function(){return r.e(3).then(r.bind(null,278))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(c.lazy)((function(){return r.e(13).then(r.bind(null,525))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(c.lazy)((function(){return r.e(9).then(r.bind(null,526))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(c.lazy)((function(){return r.e(16).then(r.bind(null,527))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(c.lazy)((function(){return r.e(14).then(r.bind(null,528))}))}),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,935))}))});var a=function(e){return Object(n.getRegisteredBlockComponents)(e)}},916: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,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(212),u=(r(2),r(8)),l=r.n(u);r(217);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))}},95:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(18),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return Object(o.useCallback)((function(e){return t((function(){throw e}))}),[])}},96: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}}});
 
build/all-reviews.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '31dabe5aa13f01f8d0dc049a5fe0611a');
 
build/all-reviews.js DELETED
@@ -1 +0,0 @@
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([823,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},119:function(e,t){},129: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(176),i=r(4),a=r(22),s=r(3),l=r(6),u=r(68),b=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.ToolbarGroup,{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.I&&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.O&&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}))}},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},138:function(e,t,r){"use strict";var n=r(0),o=r(31),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},140:function(e,t){},141:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(8)),c=r.n(o),i=r(42),a=r(213);r(187);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)}))))}))},147:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(6),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.S+"img/avatar.jpg",96:o.S+"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.S+"img/avatar.jpg",96:o.S+"img/avatar.jpg"},rating:null,verified:!1}]}}},168: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}}},169:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(0),i=(r(186),r(65));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({className:Object(i.a)(t)},Object(i.b)(t)))}},173:function(e,t,r){"use strict";var n=r(14),o=r.n(n),c=r(15),i=r.n(c),a=r(16),s=r.n(a),l=r(17),u=r.n(l),b=r(10),d=r.n(b),p=r(0),w=r(1),g=r(9),f=(r(2),r(7)),m=r(4),v=r(6),h=r(87),O=r(42),j=(r(239),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(141),k=(r(236),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(5),E=r.n(R),S=r(8),P=r.n(S),C=r(12),N=r.n(C),x=r(208),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(238);var V=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+"%"},n=Object(w.sprintf)(Object(w.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);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","aria-label":n},Object(p.createElement)("span",{style:r},n)))}(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(237);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 z(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){E()(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 G=function(e){var t=e.attributes,r=e.reviews,n=(v.O||"product"===t.imageType)&&t.showReviewImage,o=v.I&&t.showReviewRating,c=z(z({},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)(V,{attributes:c}):r.map((function(e,t){return Object(p.createElement)(V,{key:e.id||t,attributes:c,review:e})})))},U=r(11),W=r.n(U),J=r(13),q=r.n(J),K=r(27),Q=r.n(K),X=r(33),Y=r.n(X),Z=r(65),$=r(38);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()(q.a.mark((function t(r){var n,o;return q.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||!Y()(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,W()({},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.I&&Object(p.createElement)(k,{readOnly:!0,value:t.orderby}),Object(p.createElement)(G,{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},186:function(e,t){},187:function(e,t){},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},236:function(e,t){},237:function(e,t){},238:function(e,t){},239:function(e,t){},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},38:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}));var n=r(13),o=r.n(n),c=r(27),i=r.n(c),a=r(1),s=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)}}(),l=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},41:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(40));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")))}},42:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(0),i=(r(2),r(9)),a=r(8),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))}},54:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(24),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))}},6:function(e,t,r){"use strict";r.d(t,"l",(function(){return o})),r.d(t,"I",(function(){return c})),r.d(t,"O",(function(){return i})),r.d(t,"y",(function(){return a})),r.d(t,"A",(function(){return s})),r.d(t,"m",(function(){return l})),r.d(t,"z",(function(){return u})),r.d(t,"C",(function(){return b})),r.d(t,"o",(function(){return d})),r.d(t,"B",(function(){return p})),r.d(t,"n",(function(){return w})),r.d(t,"E",(function(){return g})),r.d(t,"u",(function(){return f})),r.d(t,"w",(function(){return m})),r.d(t,"r",(function(){return v})),r.d(t,"s",(function(){return h})),r.d(t,"t",(function(){return O})),r.d(t,"k",(function(){return j})),r.d(t,"K",(function(){return y})),r.d(t,"P",(function(){return _})),r.d(t,"q",(function(){return k})),r.d(t,"p",(function(){return R})),r.d(t,"H",(function(){return E})),r.d(t,"c",(function(){return S})),r.d(t,"v",(function(){return P})),r.d(t,"S",(function(){return N})),r.d(t,"T",(function(){return x})),r.d(t,"J",(function(){return T})),r.d(t,"a",(function(){return L})),r.d(t,"M",(function(){return D})),r.d(t,"b",(function(){return I})),r.d(t,"L",(function(){return M})),r.d(t,"D",(function(){return A})),r.d(t,"i",(function(){return B})),r.d(t,"N",(function(){return F})),r.d(t,"h",(function(){return z})),r.d(t,"j",(function(){return G})),r.d(t,"G",(function(){return U})),r.d(t,"F",(function(){return W})),r.d(t,"R",(function(){return J})),r.d(t,"Q",(function(){return q})),r.d(t,"d",(function(){return K})),r.d(t,"e",(function(){return Q})),r.d(t,"f",(function(){return X})),r.d(t,"g",(function(){return Y})),r.d(t,"x",(function(){return Z})),r.d(t,"W",(function(){return ee})),r.d(t,"X",(function(){return te})),r.d(t,"U",(function(){return re})),r.d(t,"V",(function(){return ne}));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),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),R=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),E=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),P=Object(n.getSetting)("isShippingCalculatorEnabled",!0),C=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),N=Object(n.getSetting)("wcBlocksAssetUrl",""),x=Object(n.getSetting)("wcBlocksBuildUrl",""),T=Object(n.getSetting)("shippingCountries",{}),L=Object(n.getSetting)("allowedCountries",{}),D=Object(n.getSetting)("shippingStates",{}),I=Object(n.getSetting)("allowedStates",{}),M=Object(n.getSetting)("shippingMethodsExist",!1),A=Object(n.getSetting)("paymentGatewaySortOrder",[]),B=Object(n.getSetting)("checkoutShowLoginReminder",!0),H={id:0,title:"",permalink:""},V=Object(n.getSetting)("storePages",{shop:H,cart:H,checkout:H,privacy:H,terms:H}),F=V.shop.permalink,z=V.checkout.id,G=V.checkout.permalink,U=V.privacy.permalink,W=V.privacy.title,J=V.terms.permalink,q=V.terms.title,K=V.cart.id,Q=V.cart.permalink,X=Object(n.getSetting)("checkoutAllowsGuest",!1),Y=Object(n.getSetting)("checkoutAllowsSignup",!1),Z=Object(n.getSetting)("loginUrl","/wp-login.php"),$=r(23),ee=function(e,t){if(C>2)return Object($.registerBlockType)(e,t)},te=function(e,t){if(C>1)return Object($.registerBlockType)(e,t)},re=function(){return C>2},ne=function(){return C>1}},65: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(19),o=r.n(n),c=r(8),i=r.n(c),a=r(6),s=function(e){if(a.I){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}},68:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(15),s=r.n(a),l=r(12),u=r.n(l),b=r(16),d=r.n(b),p=r(17),w=r.n(p),g=r(10),f=r.n(g),m=r(0),v=r(7),h=r(8),O=r.n(h),j=r(4),y=r(177);r(119);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.isSecondary=!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.a)(k)},7:function(e,t){!function(){e.exports=this.lodash}()},823:function(e,t,r){e.exports=r(900)},87:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(54)),i=r(138),a=r(8),s=r.n(a),l=r(4),u=r(41);r(140);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,{isSecondary:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},9:function(e,t){!function(){e.exports=this.React}()},900:function(e,t,r){"use strict";r.r(t);var n=r(5),o=r.n(n),c=r(0),i=r(1),a=r(23),s=r(54),l=r(31),u=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"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(186),r(22)),d=r(4),p=(r(2),r(173)),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(129),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(168),v=r(169),h=r(147);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})}});
 
build/atomic-block-components/add-to-cart--atomic-block-components/button.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{121:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(0),c=n(21),i=Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),o=function(){return Object(r.useContext)(i)},a=function(e){var t=e.children,n=e.currentPostId,o=void 0===n?0:n,a=e.previewData,s=void 0===a?{}:a,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return o||e("core/editor").getCurrentPostId()}),[o]),previewData:s};return Object(r.createElement)(i.Provider,{value:u},t)}},134:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),c=n.n(r),i=n(175),o=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(i.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,c=e.createSnackbarNotice,a=e.setIsSuppressed,u=Object(o.useRef)(t);Object(o.useEffect)((function(){u.current=t}),[t]);var l=Object(o.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]),d=Object(o.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},l),d),{},{setIsSuppressed:a})}},155:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(5),c=n.n(r),i=n(37),o=n(21),a=n(121),s=n(28),u=n(7);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 d(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}var f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},p=d(d({},f),{},{email:"",phone:""}),b=function(e){return Object(u.mapValues)(e,(function(e){return Object(s.decodeEntities)(e)}))},v={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:p,shippingAddress:f,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(a.b)(),n=t.isEditor,r=t.previewData,c=(null==r?void 0:r.previewCart)||{},s=e.shouldSelect,u=Object(o.useSelect)((function(e,t){var r=t.dispatch;if(!s)return v;if(n)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:p,shippingAddress:f,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var o=e(i.CART_STORE_KEY),a=o.getCartData(),u=o.getCartErrors(),l=o.getCartTotals(),d=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),g=r(i.CART_STORE_KEY).receiveCart,O=b(a.billingAddress),h=a.needsShipping?b(a.shippingAddress):O;return{cartCoupons:a.coupons,cartItems:a.items||[],cartFees:a.fees||[],cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors||[],cartTotals:l,cartIsLoading:d,cartErrors:u,billingAddress:O,shippingAddress:h,extensions:a.extensions||{},shippingRates:a.shippingRates||[],shippingRatesLoading:m,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements||[],receiveCart:g}}),[s]);return u}},175:function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return O}));var r=n(5),c=n.n(r),i=n(18),o=n.n(i),a=n(0),s=(n(2),n(21)),u=n(279),l=n(931),d=n(134),f=n(121),p=function(){var e=Object(f.b)().isEditor,t=Object(d.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)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:r})};function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(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)},O=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=e.createNoticeContainer,i=void 0===c||c,l=e.context,d=void 0===l?"wc/core":l,f=Object(s.useDispatch)("core/notices"),b=f.createNotice,g=f.removeNotice,O=Object(a.useState)(!1),h=o()(O,2),j=h[0],w=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]:{};b(e,t,v(v({},n),{},{context:n.context||d}))}),[b,d]),E=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;g(e,t)}),[g,d]),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,v(v({},t),{},{type:"snackbar"}))}),[y]),C={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(d)}}),[d]).notices,createNotice:y,createSnackbarNotice:N,removeNotice:E,context:d,setIsSuppressed:w},S=j?null:Object(a.createElement)(u.a,{className:r,notices:C.notices}),P=j?null:Object(a.createElement)(p,null);return Object(a.createElement)(m.Provider,{value:C},i&&S,t,P)}},216:function(e,t){},246:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),s=n(31),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=void 0===n?20:n,i=o()(e,["className","size"]);return Object(a.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},i),Object(a.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=n(261);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(a.cloneElement)(t,{size:e.size||20,className:e.className}):null}},261:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),s=n(31),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(s.SVG,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},279:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(0),o=(n(2),n(8)),a=n.n(o),s=n(375),u=n(175),l=(n(216),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,o=n.filter((function(e){return"snackbar"!==e.type}));if(!o.length)return null;var d=a()(t,"wc-block-components-notices");return Object(i.createElement)("div",{className:d},o.map((function(e){return Object(i.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},523:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var r=window.Event||null,c=function(e,t){var n=t.bubbles,c=void 0!==n&&n,i=t.cancelable,o=void 0!==i&&i,a=t.element;if(a||(a=document.body),"function"==typeof r){var s=new r(e,{bubbles:c,cancelable:o});a.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,o),a.dispatchEvent(u)}},i=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=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 i=function(){c(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,i),function(){return jQuery(document).off(e,i)}}},837:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(18),c=n.n(r),i=n(0),o=n(21),a=n(37),s=n(28),u=n(134),l=n(155),d=function(e,t){var n=e.find((function(e){return e.id===t}));return n?n.quantity:0},f=function(e){var t=Object(o.useDispatch)(a.CART_STORE_KEY).addItemToCart,n=Object(l.a)(),r=n.cartItems,f=n.cartIsLoading,p=Object(u.a)(),b=p.addErrorNotice,v=p.removeNotice,m=Object(i.useState)(!1),g=c()(m,2),O=g[0],h=g[1],j=Object(i.useRef)(d(r,e));return Object(i.useEffect)((function(){var t=d(r,e);t!==j.current&&(j.current=t)}),[r,e]),{cartQuantity:Number.isFinite(j.current)?j.current:0,addingToCart:O,cartIsLoading:f,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;h(!0),t(e,n).then((function(e){!0===e&&v("add-to-cart")})).catch((function(e){b(Object(s.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){h(!1)}))}}}}}]);
 
build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[1],{932:function(e,n,a){"use strict";var c=a(11),r=a.n(c),t=a(0),o=function(e,n){var a=[];return Object.keys(e).forEach((function(c){if(void 0!==n[c])switch(e[c].type){case"boolean":a[c]="false"!==n[c]&&!1!==n[c];break;case"number":a[c]=parseInt(n[c],10);break;case"array":case"object":a[c]=JSON.parse(n[c]);break;default:a[c]=n[c]}else a[c]=e[c].default})),a};n.a=function(e){return function(n){return function(a){var c=o(e,a);return Object(t.createElement)(n,r()({},a,c))}}}}}]);
 
build/atomic-block-components/add-to-cart-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{112:function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var n=r(7),a=r.n(n),c=r(15),o=r(12),s=r(77),i=r(22),u=r(8);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 d(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){a()(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 f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},p=d(d({},f),{},{email:"",phone:""}),b=function(e){return Object(u.mapValues)(e,(function(e){return Object(i.decodeEntities)(e)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:p,shippingAddress:f,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(s.a)(),r=t.isEditor,n=t.previewData,a=(null==n?void 0:n.previewCart)||{},i=e.shouldSelect,u=Object(o.useSelect)((function(e,t){var n=t.dispatch;if(!i)return m;if(r)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:[],cartTotals:a.totals,cartIsLoading:!1,cartErrors:[],billingAddress:p,shippingAddress:f,extensions:{},shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:function(){}};var o=e(c.CART_STORE_KEY),s=o.getCartData(),u=o.getCartErrors(),l=o.getCartTotals(),d=!o.hasFinishedResolution("getCartData"),v=o.isCustomerDataUpdating(),h=n(c.CART_STORE_KEY).receiveCart,g=b(s.billingAddress),y=s.needsShipping?b(s.shippingAddress):g;return{cartCoupons:s.coupons,cartItems:s.items||[],cartFees:s.fees||[],cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors||[],cartTotals:l,cartIsLoading:d,cartErrors:u,billingAddress:g,shippingAddress:y,extensions:s.extensions||{},shippingRates:s.shippingRates||[],shippingRatesLoading:v,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements||[],receiveCart:h}}),[i]);return u}},114:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(7),a=r.n(n),c=r(8);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}},138: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}}},155:function(e,t){},156:function(e,t){},182:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(79),a=(r(3),r(155),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))})},191: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}},205:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(114),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))}}}},206:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p}));var n=r(25),a=r.n(n),c=r(27),o=r.n(c),s=r(48),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)}}()},279: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)}}},280:function(e,t,r){"use strict";var n=r(28),a=React.createElement(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=a},286:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(191);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},293: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(15),i=r(22),u=r(88),l=r(112),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)(s.CART_STORE_KEY).addItemToCart,r=Object(l.a)(),n=r.cartItems,f=r.cartIsLoading,p=Object(u.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(i.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){y(!1)}))}}}},299:function(e,t){},300:function(e,t){},309:function(e,t,r){"use strict";r.r(t);var n=r(286),a=(r(3),r(5)),c=r.n(a),o=r(10),s=r.n(o),i=r(0),u=r(1),l=r(39),d=r(88),f=r(138),p=function(e){return e.is_purchasable||!1},b="pristine",m="idle",v="disabled",h="processing",g="before_processing",y="after_processing",O={status:b,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},j="set_pristine",E="set_idle",w="set_disabled",P="set_processing",k="set_before_processing",R="set_after_processing",_="set_processing_response",C="set_has_error",S="set_no_error",A="set_quantity",x="set_request_params",D=j,T=E,I=w,N=P,q=k,V=R,F=_,Q=C,W=S,B=A,L=x,M=function(){return{type:D}},H=function(){return{type:T}},Y=function(){return{type:I}},U=function(){return{type:N}},J=function(){return{type:q}},K=function(){return{type:V}},z=function(e){return{type:F,data:e}},G=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?Q:W;return{type:t}},X=function(e){return{type:B,quantity:e}},$=function(e){return{type:L,data:e}},Z=r(7),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=j,ae=E,ce=w,oe=P,se=k,ie=R,ue=_,le=C,de=S,fe=A,pe=x,be=b,me=m,ve=v,he=h,ge=g,ye=y,Oe=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,a=r.type,c=r.data;switch(a){case ne:e=O;break;case ae:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case ce:e=t.status!==ve?re(re({},t),{},{status:ve}):t;break;case fe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case pe:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),c)});break;case ue:e=re(re({},t),{},{processingResponse:c});break;case oe:e=!1===(e=t.status!==he?re(re({},t),{},{status:he,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case se:e=t.status!==ge?re(re({},t),{},{status:ge,hasError:!1}):t;break;case ie:e=t.status!==ye?re(re({},t),{},{status:ye}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===he||t.status===ge?re(re({},e),{},{status:me}):e;break;case de:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&a!==ne&&e.status===be&&(e.status=me),e},je=r(114),Ee=r(205),we="add_to_cart_before_processing",Pe="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",Re=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Ee.a)(Pe,e),onAddToCartProcessingWithError:Object(Ee.a)(ke,e),onAddToCartBeforeProcessing:Object(Ee.a)(we,e)}},_e=r(206),Ce=r(79),Se=Object(i.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Ae=function(){return Object(i.useContext)(Se)},xe=function(e){var t=e.children,r=e.product,n=e.showFormElements,a=Object(i.useReducer)(Oe,O),c=s()(a,2),o=c[0],b=c[1],j=Object(i.useReducer)(je.b,{}),E=s()(j,2),w=E[0],P=E[1],k=Object(l.a)(w),R=Object(d.a)(),_=R.addErrorNotice,C=R.removeNotices,S=Object(Ce.b)().setValidationErrors,A=Object(f.a)(),x=A.isSuccessResponse,D=A.isErrorResponse,T=A.isFailResponse,I=Object(i.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Re(P).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Re(P).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Re(P).onAddToCartBeforeProcessing}}),[P]),N=Object(i.useMemo)((function(){return{resetForm:function(){b(M())},submitForm:function(){b(J())},setQuantity:function(e){b(X(e))},setHasError:function(e){b(G(e))},setRequestParams:function(e){b($(e))},setAfterProcessing:function(e){b(z(e)),b(K())}}}),[]);Object(i.useEffect)((function(){var e=o.status,t=!r.id||!p(r);e!==v||t?e!==v&&t&&b(Y()):b(H())}),[o.status,r,b]),Object(i.useEffect)((function(){o.status===g&&(C("error"),Object(_e.a)(k,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&_(t),r&&S(r)})),b(H())):b(U())})))}),[o.status,S,_,C,b,k]),Object(i.useEffect)((function(){if(o.status===y){var e={processingResponse:o.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;_(e.message,t)}};if(o.hasError)return void Object(_e.b)(k,ke,e).then((function(r){if(D(r)||T(r))t(r);else{var n,a=(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,{id:"add-to-cart"})}b(H())}));Object(_e.b)(k,Pe,e).then((function(e){D(e)||T(e)?(t(e),b(G(!0))):b(H())}))}}),[o.status,o.hasError,o.processingResponse,N,_,D,T,x,k]);var q=function(e){return["simple","variable"].includes(e.type||"simple")}(r),V={product:r,productType:r.type||"simple",productIsPurchasable:p(r),productHasOptions:r.has_options||!1,supportsFormElements:q,showFormElements:n&&q,quantity:o.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:o.requestParams,isIdle:o.status===m,isDisabled:o.status===v,isProcessing:o.status===h,isBeforeProcessing:o.status===g,isAfterProcessing:o.status===y,hasError:o.hasError,eventRegistration:I,dispatchActions:N};return React.createElement(Se.Provider,{value:V},t)},De=r(51),Te=r.n(De),Ie=r(112),Ne=r(22),qe=r(279);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=Ae(),t=e.dispatchActions,r=e.product,n=e.quantity,a=e.eventRegistration,c=e.hasError,o=e.isProcessing,l=e.requestParams,f=Object(Ce.b)(),p=f.hasValidationErrors,b=f.showAllValidationErrors,m=Object(d.a)(),v=m.addErrorNotice,h=m.removeNotice,g=Object(Ie.a)().receiveCart,y=Object(i.useState)(!1),O=s()(y,2),j=O[0],E=O[1],w=!c&&o,P=Object(i.useCallback)((function(){return!p||(b(),{type:"error"})}),[p,b]);Object(i.useEffect)((function(){var e=a.onAddToCartBeforeProcessing(P,0);return function(){e()}}),[a,P]);var k=Object(i.useCallback)((function(){E(!0),h("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:n},l);Te()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Te.a.setNonce(e.headers),e.json().then((function(r){e.ok?g(r):(r.body&&r.body.message?v(Object(Ne.decodeEntities)(r.body.message),{id:"add-to-cart"}):v(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(qe.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&g(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,v,h,g,t,n,l]);return Object(i.useEffect)((function(){w&&!j&&k()}),[w,k,j]),null},Qe=function(e){var t=e.children,r=e.product,n=e.showFormElements;return React.createElement(Ce.a,null,React.createElement(xe,{product:r,showFormElements:n},t,React.createElement(Fe,null)))},We=r(80),Be=r(8),Le=r(200),Me=(r(299),r(85)),He=r(130),Ye=r(280),Ue=r(293),Je=function(e){var t=e.className,r=e.href,n=e.text;return React.createElement(Me.a,{className:t,href:r,rel:"nofollow"},n)},Ke=function(e){var t=e.className,r=e.quantityInCart,n=e.isProcessing,a=e.isDisabled,c=e.isDone,o=e.onClick;return React.createElement(Me.a,{className:t,disabled:a,showSpinner:n,onClick:o},c&&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"),!!c&&React.createElement(He.a,{srcElement:Ye.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},ze=function(){var e=Ae(),t=e.showFormElements,r=e.productIsPurchasable,n=e.productHasOptions,a=e.product,c=e.productType,o=e.isDisabled,l=e.isProcessing,d=e.eventRegistration,f=e.hasError,p=e.dispatchActions,b=Object(Ue.a)(a.id||0).cartQuantity,m=Object(i.useState)(!1),v=s()(m,2),h=v[0],g=v[1],y=a.add_to_cart||{url:"",text:""};return Object(i.useEffect)((function(){var e=d.onAddToCartAfterProcessingWithSuccess((function(){return f||g(!0),!0}),0);return function(){e()}}),[d,f]),(t||!n&&"simple"===c)&&r?React.createElement(Ke,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:b,isDisabled:o,isProcessing:l,isDone:h,onClick:function(){return p.submitForm()}}):React.createElement(Je,{className:"wc-block-components-product-add-to-cart-button",href:y.url,text:y.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=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)}})},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 React.createElement("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Ae(),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(Xe,null):t.id&&!t.is_in_stock?React.createElement(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Ge,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(ze,null))},Ze=(r(300),r(47)),et=r.n(Ze),tt=r(204),rt=r(2),nt=r(182),at={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,a=e.value,o=void 0===a?"":a,s=e.onChange,i=void 0===s?function(){}:s,l=e.errorMessage,d=void 0===l?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):l,f=Object(Ce.b)(),p=f.getValidationError,b=f.setValidationErrors,m=f.clearValidationError,v=t,h=p(v)||{};return Object(rt.useEffect)((function(){o?m(v):b(ee()({},v,{message:d,hidden:!0}))}),[o,v,d,m,b]),Object(rt.useEffect)((function(){return function(){m(v)}}),[v,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},React.createElement(tt.SelectControl,{label:Object(Ne.decodeEntities)(t),value:o||"",options:[at].concat(et()(n)),onChange:i,required:!0,className:c()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),React.createElement(nt.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 st(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 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)}))}))},ut=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=st(st({},r),{},ee()({},a,null)),i=c?it(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(Ne.decodeEntities)(r)}:null})).filter(Boolean)}(o.terms,u)})),n};function lt(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 dt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ft=function(e){var t=e.attributes,r=e.variationAttributes,n=e.setRequestParams,a=Object(l.a)(t),c=Object(l.a)(r),o=Object(i.useState)(0),u=s()(o,2),d=u[0],f=u[1],p=Object(i.useState)({}),b=s()(p,2),m=b[0],v=b[1],h=Object(i.useMemo)((function(){return ut(a,c,m)}),[m,a,c]);return Object(i.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(a).length?f(function(e,t,r){return it(e,t,r)[0]||0}(a,c,m)):d>0&&f(0)}),[m,d,a,c]),Object(i.useEffect)((function(){n({id:d,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[n,d,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(a).map((function(e){return React.createElement(ct,{key:e,attributeName:e,options:h[e],value:m[e],onChange:function(t){v(dt(dt({},m),{},ee()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,n=function(e){return e?Object(Be.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(ft,{attributes:n,variationAttributes:a,setRequestParams:r.setRequestParams})},bt=function(){var e=Ae(),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(Xe,null):t.id&&!t.is_in_stock?React.createElement(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(pt,{product:t,dispatchers:c}),React.createElement(Ge,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(ze,null))},mt=function(){return React.createElement(ze,null)},vt=function(){return React.createElement(tt.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},ht=function(){return React.createElement(vt,null)},gt=function(){var e=Ae(),t=e.showFormElements,r=e.productType;return t?"variable"===r?React.createElement(bt,null):"grouped"===r?React.createElement(ht,null):"external"===r?React.createElement(mt,null):"simple"===r||"variation"===r?React.createElement($e,null):null:React.createElement(ze,null)},yt=Object(Le.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,n=Object(We.useProductDataContext)().product,a=c()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Be.isEmpty)(n)});return React.createElement(Qe,{product:n,showFormElements:r},React.createElement("div",{className:a},React.createElement(gt,null)))})),Ot={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}};t.default=Object(n.a)(Ot)(yt)},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),a=r(21),c=r.n(a),o=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},47:function(e,t,r){var n=r(95),a=r(96),c=r(59),o=r(97);e.exports=function(e){return n(e)||a(e)||c(e)||o()}},48: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)}))}}},79:function(e,t,r){"use strict";r.d(t,"b",(function(){return y})),r.d(t,"a",(function(){return O}));var n=r(27),a=r.n(n),c=r(7),o=r.n(c),s=r(14),i=r.n(s),u=r(10),l=r.n(u),d=r(0),f=r(8),p=r(21),b=r.n(p);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){o()(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}function h(e){var t=function(e,t){if("object"!==a()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a()(t)?t:String(t)}var g=Object(d.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}}),y=function(){return Object(d.useContext)(g)},O=function(e){var t=e.children,r=Object(d.useState)({}),n=l()(r,2),a=n[0],c=n[1],s=Object(d.useCallback)((function(e){return a[e]}),[a]),u=Object(d.useCallback)((function(e){var t=a[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[a]),p=Object(d.useCallback)((function(e){c((function(t){if(!t[e])return t;t[e];return i()(t,[e].map(h))}))}),[]),m=Object(d.useCallback)((function(){c({})}),[]),y=Object(d.useCallback)((function(e){e&&c((function(t){return e=Object(f.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!b()(t[r],e))})),0===Object.values(e).length?t:v(v({},t),e)}))}),[]),O=Object(d.useCallback)((function(e,t){c((function(r){if(!r.hasOwnProperty(e))return r;var n=v(v({},r[e]),t);return b()(r[e],n)?r:v(v({},r),{},o()({},e,n))}))}),[]),j={getValidationError:s,setValidationErrors:y,clearValidationError:p,clearAllValidationErrors:m,hideValidationError:Object(d.useCallback)((function(e){O(e,{hidden:!0})}),[O]),showValidationError:Object(d.useCallback)((function(e){O(e,{hidden:!1})}),[O]),showAllValidationErrors:Object(d.useCallback)((function(){c((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=v(v({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:v(v({},e),t)}))}),[]),hasValidationErrors:Object.keys(a).length>0,getValidationErrorId:u};return React.createElement(g.Provider,{value:j},t)}},85:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(14),o=r.n(c),s=r(68),i=(r(3),r(5)),u=r.n(i);r(156);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))}},95:function(e,t,r){var n=r(60);e.exports=function(e){if(Array.isArray(e))return n(e)}},96:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},97: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 DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{143:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(5),c=r.n(n),o=r(7);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}},207: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}}},217:function(e,t){},218:function(e,t){},280:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(88),o=(r(2),r(218),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))})},376:function(e,t){},381:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(143),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))}}}},382:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n=r(13),c=r.n(n),o=r(45),a=r.n(o),s=r(27),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)}}()},383:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},384:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(8)),o=r.n(c),a=r(18),s=r.n(a),i=r(1),u=r(53),l=r(134),b=r(207),f=r(916),d="pristine",p="idle",O="disabled",m="processing",v="before_processing",j="after_processing",h={status:d,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},y="set_pristine",g="set_idle",E="set_disabled",w="set_processing",P="set_before_processing",k="set_after_processing",_="set_processing_response",C="set_has_error",A="set_no_error",S="set_quantity",x="set_request_params",D=y,q=g,N=E,R=w,T=P,V=k,F=_,I=C,B=A,Q=S,M=x,W=function(){return{type:D}},H=function(){return{type:q}},L=function(){return{type:N}},U=function(){return{type:R}},z=function(){return{type:T}},G=function(){return{type:V}},J=function(e){return{type:F,data:e}},Y=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:B;return{type:t}},X=function(e){return{type:Q,quantity:e}},$=function(e){return{type:M,data:e}},K=r(5),Z=r.n(K);function ee(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 te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var re=y,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,ve=v,je=j,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 re:e=h;break;case ne:e=t.status!==pe?te(te({},t),{},{status:pe}):t;break;case ce:e=t.status!==Oe?te(te({},t),{},{status:Oe}):t;break;case be:e=n!==t.quantity?te(te({},t),{},{quantity:n}):t;break;case fe:e=te(te({},t),{},{requestParams:te(te({},t.requestParams),o)});break;case ie:e=te(te({},t),{},{processingResponse:o});break;case oe:e=!1===(e=t.status!==me?te(te({},t),{},{status:me,hasError:!1}):t).hasError?e:te(te({},e),{},{hasError:!1});break;case ae:e=t.status!==ve?te(te({},t),{},{status:ve,hasError:!1}):t;break;case se:e=t.status!==je?te(te({},t),{},{status:je}):t;break;case ue:e=t.hasError?t:te(te({},t),{},{hasError:!0}),e=t.status===me||t.status===ve?te(te({},e),{},{status:pe}):e;break;case le:e=t.hasError?te(te({},t),{},{hasError:!1}):t}return e!==t&&c!==re&&e.status===de&&(e.status=pe),e},ye=r(143),ge=r(381),Ee="add_to_cart_before_processing",we="add_to_cart_after_processing_with_success",Pe="add_to_cart_after_processing_with_error",ke=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(ge.a)(we,e),onAddToCartProcessingWithError:Object(ge.a)(Pe,e),onAddToCartBeforeProcessing:Object(ge.a)(Ee,e)}},_e=r(382),Ce=r(88),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)(he,h),a=s()(o,2),d=a[0],y=a[1],g=Object(n.useReducer)(ye.b,{}),E=s()(g,2),w=E[0],P=E[1],k=Object(u.a)(w),_=Object(l.a)(),C=_.addErrorNotice,A=_.removeNotices,S=Object(Ce.b)().setValidationErrors,x=Object(b.a)(),D=x.isSuccessResponse,q=x.isErrorResponse,N=x.isFailResponse,R=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:ke(P).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:ke(P).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:ke(P).onAddToCartBeforeProcessing}}),[P]),T=Object(n.useMemo)((function(){return{resetForm:function(){y(W())},submitForm:function(){y(z())},setQuantity:function(e){y(X(e))},setHasError:function(e){y(Y(e))},setRequestParams:function(e){y($(e))},setAfterProcessing:function(e){y(J(e)),y(G())}}}),[]);Object(n.useEffect)((function(){var e=d.status,t=!r.id||!Object(f.a)(r);e!==O||t?e!==O&&t&&y(L()):y(H())}),[d.status,r,y]),Object(n.useEffect)((function(){d.status===v&&(A("error"),Object(_e.a)(k,Ee,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&C(t),r&&S(r)})),y(H())):y(U())})))}),[d.status,S,C,A,y,k]),Object(n.useEffect)((function(){if(d.status===j){var e={processingResponse:d.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;C(e.message,t)}};if(d.hasError)return void Object(_e.b)(k,Pe,e).then((function(r){if(q(r)||N(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");C(c,{id:"add-to-cart"})}y(H())}));Object(_e.b)(k,we,e).then((function(e){q(e)||N(e)?(t(e),y(Y(!0))):y(H())}))}}),[d.status,d.hasError,d.processingResponse,T,C,q,N,D,k]);var V=Object(f.b)(r),F={product:r,productType:r.type||"simple",productIsPurchasable:Object(f.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:V,showFormElements:c&&V,quantity:d.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:d.requestParams,isIdle:d.status===p,isDisabled:d.status===O,isProcessing:d.status===m,isBeforeProcessing:d.status===v,isAfterProcessing:d.status===j,hasError:d.hasError,eventRegistration:R,dispatchActions:T};return Object(n.createElement)(Ae.Provider,{value:F},t)},De=r(19),qe=r.n(De),Ne=r(155),Re=r(28),Te=r(523);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,a=e.hasError,u=e.isProcessing,b=e.requestParams,f=Object(Ce.b)(),d=f.hasValidationErrors,p=f.showAllValidationErrors,O=Object(l.a)(),m=O.addErrorNotice,v=O.removeNotice,j=Object(Ne.a)().receiveCart,h=Object(n.useState)(!1),y=s()(h,2),g=y[0],E=y[1],w=!a&&u,P=Object(n.useCallback)((function(){return!d||(p(),{type:"error"})}),[d,p]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(P,0);return function(){e()}}),[o,P]);var k=Object(n.useCallback)((function(){E(!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){Z()(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},b);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?j(r):(r.body&&r.body.message?m(Object(Re.decodeEntities)(r.body.message),{id:"add-to-cart"}):m(Object(i.__)("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&&r.cart&&j(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,m,v,j,t,c,b]);return Object(n.useEffect)((function(){w&&!g&&k()}),[w,k,g]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(Ce.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Fe,null)))},Be=r(39),Qe=r(7),Me=r(66),We=(r(376),r(94)),He=r(54),Le=r(549),Ue=r(837),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)},Ge=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(i.sprintf)(Object(i._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(i.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(He.a,{srcElement:Le.a,alt:Object(i.__)("Done","woo-gutenberg-products-block")}))},Je=function(){var e=Se(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,u=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,f=e.hasError,d=e.dispatchActions,p=Object(Ue.a)(o.id||0).cartQuantity,O=Object(n.useState)(!1),m=s()(O,2),v=m[0],j=m[1],h=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return f||j(!0),!0}),0);return function(){e()}}),[b,f]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Ge,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:u,isProcessing:l,isDone:v,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(i.__)("View Product","woo-gutenberg-products-block")})},Ye=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(i.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$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(i.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ye,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Je,null))},Ke=(r(548),r(30)),Ze=r.n(Ke),et=r(4),tt=r(9),rt=r(280),nt={value:"",label:Object(i.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,a=e.value,s=void 0===a?"":a,u=e.onChange,l=void 0===u?function(){}:u,b=e.errorMessage,f=void 0===b?Object(i.__)("Please select a value.","woo-gutenberg-products-block"):b,d=Object(Ce.b)(),p=d.getValidationError,O=d.setValidationErrors,m=d.clearValidationError,v=t,j=p(v)||{};return Object(tt.useEffect)((function(){s?m(v):O(Z()({},v,{message:f,hidden:!0}))}),[s,v,f,m,O]),Object(tt.useEffect)((function(){return function(){m(v)}}),[v,m]),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:l,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":j.message&&!j.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){Z()(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),{},Z()({},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(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){Z()(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(u.a)(t),a=Object(u.a)(r),i=Object(n.useState)(0),l=s()(i,2),b=l[0],f=l[1],d=Object(n.useState)({}),p=s()(d,2),O=p[0],m=p[1],v=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:v[e],value:O[e],onChange:function(t){m(lt(lt({},O),{},Z()({},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(i.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(ft,{product:t,dispatchers:a}),Object(n.createElement)(Ye,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Je,null))},pt=function(){return Object(n.createElement)(Je,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)},vt=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)(Je,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)(vt,null)))}))},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(33),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},548:function(e,t){},549:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},88:function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return y}));var n=r(45),c=r.n(n),o=r(5),a=r.n(o),s=r(24),i=r.n(s),u=r(18),l=r.n(u),b=r(0),f=r(7),d=r(33),p=r.n(d);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;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}function v(e){var t=function(e,t){if("object"!==c()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c()(t)?t:String(t)}var j=Object(b.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}}),h=function(){return Object(b.useContext)(j)},y=function(e){var t=e.children,r=Object(b.useState)({}),n=l()(r,2),c=n[0],o=n[1],s=Object(b.useCallback)((function(e){return c[e]}),[c]),u=Object(b.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),d=Object(b.useCallback)((function(e){o((function(t){if(!t[e])return t;t[e];return i()(t,[e].map(v))}))}),[]),O=Object(b.useCallback)((function(){o({})}),[]),h=Object(b.useCallback)((function(e){e&&o((function(t){return e=Object(f.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!p()(t[r],e))})),0===Object.values(e).length?t:m(m({},t),e)}))}),[]),y=Object(b.useCallback)((function(e,t){o((function(r){if(!r.hasOwnProperty(e))return r;var n=m(m({},r[e]),t);return p()(r[e],n)?r:m(m({},r),{},a()({},e,n))}))}),[]),g={getValidationError:s,setValidationErrors:h,clearValidationError:d,clearAllValidationErrors:O,hideValidationError:Object(b.useCallback)((function(e){y(e,{hidden:!0})}),[y]),showValidationError:Object(b.useCallback)((function(e){y(e,{hidden:!1})}),[y]),showAllValidationErrors:Object(b.useCallback)((function(){o((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=m(m({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:m(m({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:u};return Object(b.createElement)(j.Provider,{value:g},t)}},916: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")}},935:function(e,t,r){"use strict";r.r(t);var n=r(932),c=r(384),o=r(383);t.default=Object(n.a)(o.a)(c.a)},94:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),s=r(0),i=r(212),u=(r(2),r(8)),l=r.n(u);r(217);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/button-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{112:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(7),c=n.n(r),a=n(15),i=n(12),o=n(77),s=n(22),u=n(8);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){c()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},b=p(p({},l),{},{email:"",phone:""}),f=function(t){return Object(u.mapValues)(t,(function(t){return Object(s.decodeEntities)(t)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:b,shippingAddress:l,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},e=Object(o.a)(),n=e.isEditor,r=e.previewData,c=(null==r?void 0:r.previewCart)||{},s=t.shouldSelect,u=Object(i.useSelect)((function(t,e){var r=e.dispatch;if(!s)return m;if(n)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:b,shippingAddress:l,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var i=t(a.CART_STORE_KEY),o=i.getCartData(),u=i.getCartErrors(),d=i.getCartTotals(),p=!i.hasFinishedResolution("getCartData"),g=i.isCustomerDataUpdating(),h=r(a.CART_STORE_KEY).receiveCart,v=f(o.billingAddress),_=o.needsShipping?f(o.shippingAddress):v;return{cartCoupons:o.coupons,cartItems:o.items||[],cartFees:o.fees||[],cartItemsCount:o.itemsCount,cartItemsWeight:o.itemsWeight,cartNeedsPayment:o.needsPayment,cartNeedsShipping:o.needsShipping,cartItemErrors:o.errors||[],cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:v,shippingAddress:_,extensions:o.extensions||{},shippingRates:o.shippingRates||[],shippingRatesLoading:g,cartHasCalculatedShipping:o.hasCalculatedShipping,paymentRequirements:o.paymentRequirements||[],receiveCart:h}}),[s]);return u}},279: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 i}));var r=window.Event||null,c=function(t,e){var n=e.bubbles,c=void 0!==n&&n,a=e.cancelable,i=void 0!==a&&a,o=e.element;if(o||(o=document.body),"function"==typeof r){var s=new r(t,{bubbles:c,cancelable:i});o.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(t,c,i),o.dispatchEvent(u)}},a=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},i=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)}}},292:function(t,e){},293:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(10),c=n.n(r),a=n(0),i=n(12),o=n(15),s=n(22),u=n(88),d=n(112),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(i.useDispatch)(o.CART_STORE_KEY).addItemToCart,n=Object(d.a)(),r=n.cartItems,l=n.cartIsLoading,b=Object(u.a)(),f=b.addErrorNotice,m=b.removeNotice,g=Object(a.useState)(!1),h=c()(g,2),v=h[0],_=h[1],O=Object(a.useRef)(p(r,t));return Object(a.useEffect)((function(){var e=p(r,t);e!==O.current&&(O.current=e)}),[r,t]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:v,cartIsLoading:l,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;_(!0),e(t,n).then((function(t){!0===t&&m("add-to-cart")})).catch((function(t){f(Object(s.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){_(!1)}))}}}},303:function(t,e,n){"use strict";n.r(e);var r=n(11),c=n.n(r),a=n(7),i=n.n(a),o=(n(3),n(5)),s=n.n(o),u=n(1),d=n(0),p=n(293),l=n(22),b=n(279),f=n(80),m=n(200),g=(n(292),function(t){var e=t.product,n=Object(d.useRef)(!0),r=e.id,a=e.permalink,i=e.add_to_cart,o=e.has_options,f=e.is_purchasable,m=e.is_in_stock,g=Object(p.a)(r),h=g.cartQuantity,v=g.addingToCart,_=g.addToCart;Object(d.useEffect)((function(){n.current?n.current=!1:Object(b.c)()}),[h]);var O=Number.isFinite(h)&&h>0,j=!o&&f&&m,y=Object(l.decodeEntities)((null==i?void 0:i.description)||""),C=O?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",h,"woo-gutenberg-products-block"),h):Object(l.decodeEntities)((null==i?void 0:i.text)||Object(u.__)("Add to cart","woo-gutenberg-products-block")),E=j?"button":"a",w={};return j?w.onClick=function(){_()}:(w.href=a,w.rel="nofollow"),React.createElement(E,c()({"aria-label":y,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:v,added:O}),disabled:v},w),C)}),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",i()({},"".concat(n,"__product-add-to-cart"),n))},r.id?React.createElement(g,{product:r}):React.createElement(h,null))}))}}]);
 
build/atomic-block-components/button.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{522:function(t,c,e){"use strict";e.r(c);var o=e(11),n=e.n(o),a=e(5),r=e.n(a),u=e(0),d=(e(2),e(8)),b=e.n(d),l=e(1),i=e(837),s=e(28),p=e(523),_=e(39),k=e(66),j=(e(542),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))}))},542:function(t,c){}}]);
 
build/atomic-block-components/category-list-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[4],{296:function(e,t){},306:function(e,t,c){"use strict";c.r(t);var a=c(7),n=c.n(a),o=c(1),r=(c(3),c(5)),s=c.n(r),l=c(80),u=c(8),i=c(200);c(296);t.default=Object(i.withProductDataContext)((function(e){var t=e.className,c=Object(l.useInnerBlockLayoutContext)().parentClassName,a=Object(l.useProductDataContext)().product;return Object(u.isEmpty)(a.categories)?null:React.createElement("div",{className:s()(t,"wc-block-components-product-category-list",n()({},"".concat(c,"__product-category-list"),c))},Object(o.__)("Categories:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(a.categories).map((function(e){var t=e.name,c=e.link,a=e.slug;return React.createElement("li",{key:"category-list-item-".concat(a)},React.createElement("a",{href:c},t))}))))}))}}]);
 
build/atomic-block-components/category-list.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{526:function(e,t,c){"use strict";c.r(t);var n=c(5),o=c.n(n),a=c(0),r=c(1),s=(c(2),c(8)),l=c.n(s),u=c(39),i=c(7),b=c(66);c(545);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))}))))}))},545:function(e,t){}}]);
 
build/atomic-block-components/image-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5,8],{191: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}},286:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(191);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},287:function(e,t){},288:function(e,t,r){"use strict";r.r(t);var n=r(7),a=r.n(n),c=(r(3),r(1)),o=r(5),l=r.n(o),s=r(38),u=r(80),i=r(200);r(287);t.default=Object(i.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(u.useInnerBlockLayoutContext)().parentClassName,o=Object(u.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,a()({},"".concat(n,"__product-onsale"),n))},React.createElement(s.a,{label:Object(c.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(c.__)("Product on sale","woo-gutenberg-products-block")}))}))},289:function(e,t){},311:function(e,t,r){"use strict";r.r(t);var n=r(286),a=r(11),c=r.n(a),o=r(7),l=r.n(o),s=r(10),u=r.n(s),i=(r(3),r(0)),p=r(1),d=r(5),b=r.n(d),f=r(9),m=r(80),g=r(200),O=r(288);r(289);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 w(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){l()(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}var y=function(){return React.createElement("img",{src:f.r,alt:"",width:500,height:500})},v=function(e){var t=e.image,r=e.onLoad,n=e.loaded,a=e.showFullSize,o=e.fallbackAlt,l=t||{},s=l.thumbnail,u=l.src,i=l.srcset,p=l.sizes,d=w({alt:l.alt||o,onLoad:r,hidden:!n,src:s},a&&{src:u,srcSet:i,sizes:p});return React.createElement(React.Fragment,null,d.src&&React.createElement("img",c()({"data-testid":"product-image"},d)),!n&&React.createElement(y,null))},h=Object(g.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,a=e.productLink,c=void 0===a||a,o=e.showSaleBadge,s=e.saleBadgeAlign,d=void 0===s?"right":s,f=Object(m.useInnerBlockLayoutContext)().parentClassName,g=Object(m.useProductDataContext)().product,j=Object(i.useState)(!1),h=u()(j,2),k=h[0],E=h[1];if(!g.id)return React.createElement("div",{className:b()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",l()({},"".concat(f,"__product-image"),f))},React.createElement(y,null));var P=!!g.images.length,R=P?g.images[0]:null,S=c?"a":i.Fragment,_=Object(p.sprintf)(Object(p.__)("Link to %s","woo-gutenberg-products-block"),g.name),D=w({href:g.permalink,rel:"nofollow"},!P&&{"aria-label":_});return React.createElement("div",{className:b()(t,"wc-block-components-product-image",l()({},"".concat(f,"__product-image"),f))},React.createElement(S,c&&D,!!o&&React.createElement(O.default,{align:d,product:g}),React.createElement(v,{fallbackAlt:g.name,image:R,onLoad:function(){return E(!0)},loaded:k,showFullSize:"cropped"!==n})))})),k={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.a)(k)(h)},38:function(e,t,r){"use strict";var n=r(7),a=r.n(n),c=(r(3),r(2)),o=r(5),l=r.n(o);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){a()(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}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,a=e.wrapperElement,o=e.wrapperProps,s=void 0===o?{}:o,i=null!=r,p=null!=n;return!i&&p?(t=a||"span",s=u(u({},s),{},{className:l()(s.className,"screen-reader-text")}),React.createElement(t,s,n)):(t=a||c.Fragment,i&&p&&r!==n?React.createElement(t,s,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,s,r))}}}]);
 
build/atomic-block-components/image.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{379: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}}},380:function(e,t,c){"use strict";var n=c(11),r=c.n(n),a=c(5),o=c.n(a),l=c(18),i=c.n(l),s=c(0),u=(c(2),c(1)),d=c(8),p=c.n(d),b=c(6),m=c(39),g=c(66),f=c(278);c(540);function O(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 j(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?O(Object(c),!0).forEach((function(t){o()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):O(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var w=function(){return Object(s.createElement)("img",{src:b.E,alt:"",width:500,height:500})},h=function(e){var t=e.image,c=e.onLoad,n=e.loaded,a=e.showFullSize,o=e.fallbackAlt,l=t||{},i=l.thumbnail,u=l.src,d=l.srcset,p=l.sizes,b=j({alt:l.alt||o,onLoad:c,hidden:!n,src:i},a&&{src:u,srcSet:d,sizes:p});return Object(s.createElement)(s.Fragment,null,b.src&&Object(s.createElement)("img",r()({"data-testid":"product-image"},b)),!n&&Object(s.createElement)(w,null))};t.a=Object(g.withProductDataContext)((function(e){var t=e.className,c=e.imageSizing,n=void 0===c?"full-size":c,r=e.productLink,a=void 0===r||r,l=e.showSaleBadge,d=e.saleBadgeAlign,b=void 0===d?"right":d,g=Object(m.useInnerBlockLayoutContext)().parentClassName,O=Object(m.useProductDataContext)().product,y=Object(s.useState)(!1),k=i()(y,2),v=k[0],E=k[1];if(!O.id)return Object(s.createElement)("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",o()({},"".concat(g,"__product-image"),g))},Object(s.createElement)(w,null));var P=!!O.images.length,S=P?O.images[0]:null,z=a?"a":s.Fragment,B=Object(u.sprintf)(Object(u.__)("Link to %s","woo-gutenberg-products-block"),O.name),L=j({href:O.permalink,rel:"nofollow"},!P&&{"aria-label":B});return Object(s.createElement)("div",{className:p()(t,"wc-block-components-product-image",o()({},"".concat(g,"__product-image"),g))},Object(s.createElement)(z,a&&L,!!l&&Object(s.createElement)(f.default,{align:b,product:O}),Object(s.createElement)(h,{fallbackAlt:O.name,image:S,onLoad:function(){return E(!0)},loaded:v,showFullSize:"cropped"!==n})))}))},540:function(e,t){},933:function(e,t,c){"use strict";c.r(t);var n=c(932),r=c(380),a=c(379);t.default=Object(n.a)(a.a)(r.a)}}]);
 
build/atomic-block-components/price-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{115:function(e,c,r){"use strict";var t=r(7),a=r.n(t),n=r(1),l=r(45),o=r(5),i=r.n(o),s=(r(3),r(154),function(e){var c=e.className,r=e.currency,t=e.maxPrice,a=e.minPrice,n=e.priceClassName,o=e.priceStyle;return React.createElement("span",{className:c},React.createElement(l.a,{className:i()("wc-block-components-product-price__value",n),currency:r,value:a,style:o})," — ",React.createElement(l.a,{className:i()("wc-block-components-product-price__value",n),currency:r,value:t,style:o}))}),u=function(e){var c=e.className,r=e.currency,t=e.regularPriceClassName,a=e.regularPriceStyle,o=e.regularPrice,s=e.priceClassName,u=e.priceStyle,p=e.price;return React.createElement("span",{className:c},React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(l.a,{currency:r,renderText:function(e){return React.createElement("del",{className:i()("wc-block-components-product-price__regular",t),style:a},e)},value:o}),React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(l.a,{currency:r,renderText:function(e){return React.createElement("ins",{className:i()("wc-block-components-product-price__value","is-discounted",s),style:u},e)},value:p}))};c.a=function(e){var c=e.align,r=e.className,t=e.currency,n=e.maxPrice,o=void 0===n?null:n,p=e.minPrice,m=void 0===p?null:p,d=e.price,b=void 0===d?null:d,y=e.priceClassName,f=e.priceStyle,g=e.regularPrice,v=e.regularPriceClassName,N=e.regularPriceStyle,_=i()(r,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(c),c));return g&&b!==g?React.createElement(u,{className:_,currency:t,price:b,priceClassName:y,priceStyle:f,regularPrice:g,regularPriceClassName:v,regularPriceStyle:N}):null!==m&&null!==o?React.createElement(s,{className:_,currency:t,maxPrice:o,minPrice:m,priceClassName:y,priceStyle:f}):null!==b?React.createElement("span",{className:_},React.createElement(l.a,{className:i()("wc-block-components-product-price__value",y),currency:t,value:b,style:f})):React.createElement("span",{className:_},React.createElement("span",{className:i()("wc-block-components-product-price__value",y)}))}},125:function(e,c){},154:function(e,c){},301:function(e,c,r){"use strict";r.r(c);var t=r(7),a=r.n(t),n=(r(3),r(5)),l=r.n(n),o=r(115),i=r(46),s=r(80),u=r(203),p=r(9),m=r(200);c.default=Object(m.withProductDataContext)((function(e){var c,r,t,n,m,d,b,y=e.className,f=e.align,g=e.fontSize,v=e.customFontSize,N=e.saleFontSize,_=e.customSaleFontSize,O=e.color,P=e.customColor,S=e.saleColor,C=e.customSaleColor,w=Object(s.useInnerBlockLayoutContext)().parentClassName,j=Object(s.useProductDataContext)().product,E=l()(y,a()({},"".concat(w,"__product-price"),w));if(!j.id)return React.createElement(o.a,{align:f,className:E});var x=Object(u.getColorClassName)("color",O),R=Object(u.getFontSizeClass)(g),h=Object(u.getColorClassName)("color",S),k=Object(u.getFontSizeClass)(N),z=l()((c={"has-text-color":O||P,"has-font-size":g||v},a()(c,x,x),a()(c,R,R),c)),D=l()((r={"has-text-color":S||C,"has-font-size":N||_},a()(r,h,h),a()(r,k,k),r)),F={color:P,fontSize:v},V={color:C,fontSize:_},B=j.prices,T=Object(i.getCurrencyFromPriceResponse)(B),U=B.price!==B.regular_price,J=U?l()((t={},a()(t,"".concat(w,"__product-price__value"),w),a()(t,D,Object(p.E)()),t)):l()((n={},a()(n,"".concat(w,"__product-price__value"),w),a()(n,z,Object(p.E)()),n)),M=U?V:F;return React.createElement(o.a,{align:f,className:E,currency:T,price:B.price,priceClassName:J,priceStyle:Object(p.E)()?M:{},minPrice:null==B||null===(m=B.price_range)||void 0===m?void 0:m.min_amount,maxPrice:null==B||null===(d=B.price_range)||void 0===d?void 0:d.max_amount,regularPrice:B.regular_price,regularPriceClassName:l()((b={},a()(b,"".concat(w,"__product-price__regular"),w),a()(b,z,Object(p.E)()),b)),regularPriceStyle:Object(p.E)()?F:{}})}))},45:function(e,c,r){"use strict";var t=r(11),a=r.n(t),n=r(7),l=r.n(n),o=r(14),i=r.n(o),s=r(102),u=r(5),p=r.n(u);r(125);function m(e,c){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);c&&(t=t.filter((function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),r.push.apply(r,t)}return r}function d(e){for(var c=1;c<arguments.length;c++){var r=null!=arguments[c]?arguments[c]:{};c%2?m(Object(r),!0).forEach((function(c){l()(e,c,r[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(c){Object.defineProperty(e,c,Object.getOwnPropertyDescriptor(r,c))}))}return e}c.a=function(e){var c=e.className,r=e.value,t=e.currency,n=e.onValueChange,l=i()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var o=r/Math.pow(10,t.minorUnit);if(!Number.isFinite(o))return null;var u=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",c),m=d(d(d({displayType:"text"},l),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(t)),{},{value:void 0,currency:void 0,onValueChange:void 0}),b=n?function(e){var c=e.value*Math.pow(10,t.minorUnit);n(c)}:function(){};return React.createElement(s.a,a()({className:u},m,{value:o,onValueChange:b}))}}}]);
 
build/atomic-block-components/price.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{142:function(e,c,r){"use strict";var t=r(5),a=r.n(t),n=r(0),l=r(1),o=r(55),i=r(8),s=r.n(i),u=(r(2),r(215),function(e){var c=e.className,r=e.currency,t=e.maxPrice,a=e.minPrice,l=e.priceClassName,i=e.priceStyle;return Object(n.createElement)("span",{className:c},Object(n.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:r,value:a,style:i})," — ",Object(n.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:r,value:t,style:i}))}),p=function(e){var c=e.className,r=e.currency,t=e.regularPriceClassName,a=e.regularPriceStyle,i=e.regularPrice,u=e.priceClassName,p=e.priceStyle,m=e.price;return Object(n.createElement)("span",{className:c},Object(n.createElement)("span",{className:"screen-reader-text"},Object(l.__)("Previous price:","woo-gutenberg-products-block")),Object(n.createElement)(o.a,{currency:r,renderText:function(e){return Object(n.createElement)("del",{className:s()("wc-block-components-product-price__regular",t),style:a},e)},value:i}),Object(n.createElement)("span",{className:"screen-reader-text"},Object(l.__)("Discounted price:","woo-gutenberg-products-block")),Object(n.createElement)(o.a,{currency:r,renderText:function(e){return Object(n.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",u),style:p},e)},value:m}))};c.a=function(e){var c=e.align,r=e.className,t=e.currency,l=e.maxPrice,i=void 0===l?null:l,m=e.minPrice,b=void 0===m?null:m,O=e.price,d=void 0===O?null:O,y=e.priceClassName,f=e.priceStyle,j=e.regularPrice,g=e.regularPriceClassName,v=e.regularPriceStyle,N=s()(r,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(c),c));return j&&d!==j?Object(n.createElement)(p,{className:N,currency:t,price:d,priceClassName:y,priceStyle:f,regularPrice:j,regularPriceClassName:g,regularPriceStyle:v}):null!==b&&null!==i?Object(n.createElement)(u,{className:N,currency:t,maxPrice:i,minPrice:b,priceClassName:y,priceStyle:f}):null!==d?Object(n.createElement)("span",{className:N},Object(n.createElement)(o.a,{className:s()("wc-block-components-product-price__value",y),currency:t,value:d,style:f})):Object(n.createElement)("span",{className:N},Object(n.createElement)("span",{className:s()("wc-block-components-product-price__value",y)}))}},178:function(e,c){},215:function(e,c){},520:function(e,c,r){"use strict";r.r(c);var t=r(5),a=r.n(t),n=r(0),l=(r(2),r(8)),o=r.n(l),i=r(142),s=r(63),u=r(39),p=r(22),m=r(6),b=r(66);c.default=Object(b.withProductDataContext)((function(e){var c,r,t,l,b,O,d,y=e.className,f=e.align,j=e.fontSize,g=e.customFontSize,v=e.saleFontSize,N=e.customSaleFontSize,_=e.color,P=e.customColor,S=e.saleColor,C=e.customSaleColor,w=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,x=o()(y,a()({},"".concat(w,"__product-price"),w));if(!E.id)return Object(n.createElement)(i.a,{align:f,className:x});var h=Object(p.getColorClassName)("color",_),k=Object(p.getFontSizeClass)(j),z=Object(p.getColorClassName)("color",S),V=Object(p.getFontSizeClass)(v),D=o()((c={"has-text-color":_||P,"has-font-size":j||g},a()(c,h,h),a()(c,k,k),c)),F=o()((r={"has-text-color":S||C,"has-font-size":v||N},a()(r,z,z),a()(r,V,V),r)),B={color:P,fontSize:g},T={color:C,fontSize:N},U=E.prices,J=Object(s.getCurrencyFromPriceResponse)(U),M=U.price!==U.regular_price,W=M?o()((t={},a()(t,"".concat(w,"__product-price__value"),w),a()(t,F,Object(m.V)()),t)):o()((l={},a()(l,"".concat(w,"__product-price__value"),w),a()(l,D,Object(m.V)()),l)),I=M?T:B;return Object(n.createElement)(i.a,{align:f,className:x,currency:J,price:U.price,priceClassName:W,priceStyle:Object(m.V)()?I:{},minPrice:null==U||null===(b=U.price_range)||void 0===b?void 0:b.min_amount,maxPrice:null==U||null===(O=U.price_range)||void 0===O?void 0:O.max_amount,regularPrice:U.regular_price,regularPriceClassName:o()((d={},a()(d,"".concat(w,"__product-price__regular"),w),a()(d,D,Object(m.V)()),d)),regularPriceStyle:Object(m.V)()?B:{}})}))},55:function(e,c,r){"use strict";var t=r(11),a=r.n(t),n=r(5),l=r.n(n),o=r(24),i=r.n(o),s=r(0),u=r(170),p=r(8),m=r.n(p);r(178);function b(e,c){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);c&&(t=t.filter((function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),r.push.apply(r,t)}return r}function O(e){for(var c=1;c<arguments.length;c++){var r=null!=arguments[c]?arguments[c]:{};c%2?b(Object(r),!0).forEach((function(c){l()(e,c,r[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(c){Object.defineProperty(e,c,Object.getOwnPropertyDescriptor(r,c))}))}return e}c.a=function(e){var c=e.className,r=e.value,t=e.currency,n=e.onValueChange,l=i()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var o=r/Math.pow(10,t.minorUnit);if(!Number.isFinite(o))return null;var p=m()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",c),b=O(O(O({displayType:"text"},l),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(t)),{},{value:void 0,currency:void 0,onValueChange:void 0}),d=n?function(e){var c=e.value*Math.pow(10,t.minorUnit);n(c)}:function(){};return Object(s.createElement)(u.a,a()({className:p},b,{value:o,onValueChange:d}))}}}]);
 
build/atomic-block-components/rating-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{291:function(t,e){},302:function(t,e,a){"use strict";a.r(e);var c=a(7),n=a.n(c),r=(a(3),a(1)),o=a(5),s=a.n(o),u=a(80),i=a(200),l=(a(291),function(t){var e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0});e.default=Object(i.withProductDataContext)((function(t){var e=t.className,a=Object(u.useInnerBlockLayoutContext)().parentClassName,c=Object(u.useProductDataContext)().product,o=l(c);if(!o)return null;var i={width:o/5*100+"%"},p=Object(r.sprintf)(Object(r.__)("Rated %f out of 5","woo-gutenberg-products-block"),o);return React.createElement("div",{className:s()(e,"wc-block-components-product-rating",n()({},"".concat(a,"__product-rating"),a))},React.createElement("div",{className:s()("wc-block-components-product-rating__stars","".concat(a,"__product-rating__stars")),role:"img","aria-label":p},React.createElement("span",{style:i},p)))}))}}]);
 
build/atomic-block-components/rating.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{521:function(t,e,c){"use strict";c.r(e);var a=c(5),n=c.n(a),r=c(0),o=(c(2),c(1)),s=c(8),u=c.n(s),i=c(39),l=c(66),p=(c(541),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,"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)))}))},541:function(t,e){}}]);
 
build/atomic-block-components/sale-badge-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{287:function(e,t){},288:function(e,t,r){"use strict";r.r(t);var c=r(7),n=r.n(c),a=(r(3),r(1)),o=r(5),s=r.n(o),l=r(38),u=r(80),p=r(200);r(287);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")}))}))},38:function(e,t,r){"use strict";var c=r(7),n=r.n(c),a=(r(3),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 DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{278:function(e,t,r){"use strict";r.r(t);var c=r(5),n=r.n(c),a=r(0),o=(r(2),r(1)),s=r(8),l=r.n(s),u=r(42),b=r(39),p=r(66);r(539);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")}))}))},42:function(e,t,r){"use strict";var c=r(5),n=r.n(c),a=r(0),o=(r(2),r(9)),s=r(8),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))}},539:function(e,t){}}]);
 
build/atomic-block-components/sku-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{295:function(t,c){},305:function(t,c,e){"use strict";e.r(c);var n=e(7),o=e.n(n),a=e(1),u=(e(3),e(5)),s=e.n(u),r=e(80),l=e(200);e(295);c.default=Object(l.withProductDataContext)((function(t){var c=t.className,e=Object(r.useInnerBlockLayoutContext)().parentClassName,n=Object(r.useProductDataContext)().product.sku;return n?React.createElement("div",{className:s()(c,"wc-block-components-product-sku",o()({},"".concat(e,"__product-sku"),e))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",React.createElement("strong",null,n)):null}))}}]);
 
build/atomic-block-components/sku.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{525:function(t,c,e){"use strict";e.r(c);var n=e(5),o=e.n(n),u=e(0),s=e(1),a=(e(2),e(8)),r=e.n(a),l=e(39),b=e(66);e(544);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}))},544:function(t,c){}}]);
 
build/atomic-block-components/stock-indicator-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{298:function(o,c){},308:function(o,c,t){"use strict";t.r(c);var n=t(7),e=t.n(n),r=t(1),s=(t(3),t(5)),a=t.n(s),i=t(80),u=t(200),k=(t(298),function(o){return Object(r.sprintf)(Object(r.__)("%d left in stock","woo-gutenberg-products-block"),o)}),b=function(o,c){return c?Object(r.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(r.__)("In Stock","woo-gutenberg-products-block"):Object(r.__)("Out of Stock","woo-gutenberg-products-block")};c.default=Object(u.withProductDataContext)((function(o){var c,t=o.className,n=Object(i.useInnerBlockLayoutContext)().parentClassName,r=Object(i.useProductDataContext)().product;if(!r.id||!r.is_purchasable)return null;var s=!!r.is_in_stock,u=r.low_stock_remaining,d=r.is_on_backorder;return React.createElement("div",{className:a()(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",s),e()(c,"wc-block-components-product-stock-indicator--out-of-stock",!s),e()(c,"wc-block-components-product-stock-indicator--low-stock",!!u),e()(c,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),c))},u?k(u):b(s,d))}))}}]);
 
build/atomic-block-components/stock-indicator.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{528:function(o,c,t){"use strict";t.r(c);var n=t(5),e=t.n(n),r=t(0),s=t(1),a=(t(2),t(8)),i=t.n(a),u=t(39),k=t(66),b=(t(547),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))}))},547:function(o,c){}}]);
 
build/atomic-block-components/summary-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{137:function(t,e,n){"use strict";var c=n(0),r=n(100),o=n(87),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)}},294:function(t,e){},304:function(t,e,n){"use strict";n.r(e);var c=n(7),r=n.n(c),o=(n(3),n(5)),a=n.n(o),u=n(137),s=n(4),i=n(80),l=n(200);n(294);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 DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{167:function(t,e,n){"use strict";var c=n(0),r=n(135),o=n(89),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)}},524:function(t,e,n){"use strict";n.r(e);var c=n(5),r=n.n(c),o=n(0),a=(n(2),n(8)),u=n.n(a),s=n(167),i=n(3),l=n(39),p=n(66);n(543);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})}))},543:function(t,e){}}]);
 
build/atomic-block-components/tag-list-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{297:function(t,e){},307:function(t,e,c){"use strict";c.r(e);var a=c(7),n=c.n(a),o=c(1),s=(c(3),c(5)),l=c.n(s),u=c(80),r=c(8),i=c(200);c(297);e.default=Object(i.withProductDataContext)((function(t){var e=t.className,c=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;return Object(r.isEmpty)(a.tags)?null:React.createElement("div",{className:l()(e,"wc-block-components-product-tag-list",n()({},"".concat(c,"__product-tag-list"),c))},Object(o.__)("Tags:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(a.tags).map((function(t){var e=t.name,c=t.link,a=t.slug;return React.createElement("li",{key:"tag-list-item-".concat(a)},React.createElement("a",{href:c},e))}))))}))}}]);
 
build/atomic-block-components/tag-list.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{527:function(t,e,c){"use strict";c.r(e);var n=c(5),a=c.n(n),o=c(0),s=c(1),l=(c(2),c(8)),u=c.n(l),r=c(39),i=c(7),b=c(66);c(546);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))}))))}))},546:function(t,e){}}]);
 
build/atomic-block-components/title-frontend.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{133:function(e,t,c){"use strict";var n=c(11),o=c.n(n),r=c(14),a=c.n(r),i=(c(3),c(22)),s=c(5),l=c.n(s);c(153);t.a=function(e){var t=e.className,c=void 0===t?"":t,n=e.disabled,r=void 0!==n&&n,s=e.name,u=e.permalink,p=void 0===u?"":u,b=a()(e,["className","disabled","name","permalink"]),f=l()("wc-block-components-product-name",c);return r?React.createElement("span",o()({className:f},b),Object(i.decodeEntities)(s)):React.createElement("a",o()({className:f,href:p},b),Object(i.decodeEntities)(s))}},153:function(e,t){},191:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var n=function(e,t){var c=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":c[n]="false"!==t[n]&&!1!==t[n];break;case"number":c[n]=parseInt(t[n],10);break;case"array":case"object":c[n]=JSON.parse(t[n]);break;default:c[n]=t[n]}else c[n]=e[n].default})),c}},286:function(e,t,c){"use strict";var n=c(11),o=c.n(n),r=c(191);t.a=function(e){return function(t){return function(c){var n=Object(r.a)(e,c);return React.createElement(t,o()({},c,n))}}}},290:function(e,t){},310:function(e,t,c){"use strict";c.r(t);var n=c(286),o=c(7),r=c.n(o),a=(c(3),c(5)),i=c.n(a),s=c(80),l=c(203),u=c(9),p=function(e){var t=e.color,c=e.fontSize;return Object(u.E)()?{color:t,fontSize:c}:{}},b=c(200),f=c(133),d=(c(290),Object(b.withProductDataContext)((function(e){var t,c,n,o=e.className,a=e.headingLevel,b=void 0===a?2:a,d=e.productLink,m=void 0===d||d,O=e.align,j=e.color,y=e.customColor,v=e.fontSize,k=e.customFontSize,w=Object(s.useInnerBlockLayoutContext)().parentClassName,g=Object(s.useProductDataContext)().product,E="h".concat(b),h=Object(l.getColorClassName)("color",j),S=Object(l.getFontSizeClass)(v),N=i()((t={"has-text-color":j||y,"has-font-size":v||k},r()(t,h,h),r()(t,S,S),t));return g.id?React.createElement(E,{className:i()(o,"wc-block-components-product-title",(c={},r()(c,"".concat(w,"__product-title"),w),r()(c,"wc-block-components-product-title--align-".concat(O),O&&Object(u.E)()),c))},React.createElement(f.a,{className:i()(r()({},N,Object(u.E)())),disabled:!m,name:g.name,permalink:g.permalink,rel:m?"nofollow":null,style:p({color:y,fontSize:k})})):React.createElement(E,{className:i()(o,"wc-block-components-product-title",(n={},r()(n,"".concat(w,"__product-title"),w),r()(n,"wc-block-components-product-title--align-".concat(O),O&&Object(u.E)()),r()(n,N,Object(u.E)()),n)),style:p({color:y,fontSize:k})})})));function m(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?m(Object(c),!0).forEach((function(t){r()(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 j={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(u.E)()&&(j=O(O({},j),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}));var y=j;t.default=Object(n.a)(y)(d)}}]);
 
build/atomic-block-components/title.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{166:function(e,t,c){"use strict";var o=c(11),n=c.n(o),r=c(24),a=c.n(r),i=c(0),l=(c(2),c(28)),s=c(8),u=c.n(s);c(214);t.a=function(e){var t=e.className,c=void 0===t?"":t,o=e.disabled,r=void 0!==o&&o,s=e.name,p=e.permalink,b=void 0===p?"":p,d=a()(e,["className","disabled","name","permalink"]),m=u()("wc-block-components-product-name",c);return r?Object(i.createElement)("span",n()({className:m},d),Object(l.decodeEntities)(s)):Object(i.createElement)("a",n()({className:m,href:b},d),Object(l.decodeEntities)(s))}},214:function(e,t){},378:function(e,t,c){"use strict";var o=c(5),n=c.n(o),r=c(6);function a(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 i(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?a(Object(c),!0).forEach((function(t){n()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):a(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var l={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(r.V)()&&(l=i(i({},l),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=l},385:function(e,t,c){"use strict";var o=c(5),n=c.n(o),r=c(0),a=(c(2),c(8)),i=c.n(a),l=c(39),s=c(22),u=c(6),p=function(e){var t=e.color,c=e.fontSize;return Object(u.V)()?{color:t,fontSize:c}:{}},b=c(66),d=c(166);c(538),t.a=Object(b.withProductDataContext)((function(e){var t,c,o,a=e.className,b=e.headingLevel,m=void 0===b?2:b,O=e.productLink,f=void 0===O||O,j=e.align,y=e.color,g=e.customColor,v=e.fontSize,w=e.customFontSize,k=Object(l.useInnerBlockLayoutContext)().parentClassName,h=Object(l.useProductDataContext)().product,S="h".concat(m),z=Object(s.getColorClassName)("color",y),N=Object(s.getFontSizeClass)(v),P=i()((t={"has-text-color":y||g,"has-font-size":v||w},n()(t,z,z),n()(t,N,N),t));return h.id?Object(r.createElement)(S,{className:i()(a,"wc-block-components-product-title",(c={},n()(c,"".concat(k,"__product-title"),k),n()(c,"wc-block-components-product-title--align-".concat(j),j&&Object(u.V)()),c))},Object(r.createElement)(d.a,{className:i()(n()({},P,Object(u.V)())),disabled:!f,name:h.name,permalink:h.permalink,rel:f?"nofollow":null,style:p({color:g,fontSize:w})})):Object(r.createElement)(S,{className:i()(a,"wc-block-components-product-title",(o={},n()(o,"".concat(k,"__product-title"),k),n()(o,"wc-block-components-product-title--align-".concat(j),j&&Object(u.V)()),n()(o,P,Object(u.V)()),o)),style:p({color:g,fontSize:w})})}))},538:function(e,t){},934:function(e,t,c){"use strict";c.r(t);var o=c(932),n=c(385),r=c(378);t.default=Object(o.a)(r.a)(n.a)}}]);
 
build/attribute-filter-frontend.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '601de5f8b6372ad81a669988a8add394');
 
build/attribute-filter-frontend.js DELETED
@@ -1,14 +0,0 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=223)}([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,n){e.exports=n(71)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},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 i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)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,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){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,"u",(function(){return i})),n.d(t,"y",(function(){return c})),n.d(t,"r",(function(){return a})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"z",(function(){return p})),n.d(t,"l",(function(){return d})),n.d(t,"k",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"n",(function(){return g})),n.d(t,"C",(function(){return h})),n.d(t,"D",(function(){return v})),n.d(t,"v",(function(){return y})),n.d(t,"a",(function(){return O})),n.d(t,"w",(function(){return w})),n.d(t,"b",(function(){return j})),n.d(t,"q",(function(){return S})),n.d(t,"g",(function(){return E})),n.d(t,"x",(function(){return k})),n.d(t,"h",(function(){return _})),n.d(t,"t",(function(){return R})),n.d(t,"s",(function(){return P})),n.d(t,"B",(function(){return C})),n.d(t,"A",(function(){return D})),n.d(t,"d",(function(){return T})),n.d(t,"e",(function(){return M})),n.d(t,"f",(function(){return A})),n.d(t,"p",(function(){return H})),n.d(t,"E",(function(){return N}));var r=n(4),o=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),c=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)),p=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),d=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),f=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),g=Object(r.getSetting)("isShippingCalculatorEnabled",!0),m=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),h=Object(r.getSetting)("wcBlocksAssetUrl",""),v=Object(r.getSetting)("wcBlocksBuildUrl",""),y=Object(r.getSetting)("shippingCountries",{}),O=Object(r.getSetting)("allowedCountries",{}),w=Object(r.getSetting)("shippingStates",{}),j=Object(r.getSetting)("allowedStates",{}),S=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),E=Object(r.getSetting)("checkoutShowLoginReminder",!0),I={id:0,title:"",permalink:""},x=Object(r.getSetting)("storePages",{shop:I,cart:I,checkout:I,privacy:I,terms:I}),k=x.shop.permalink,_=(x.checkout.id,x.checkout.permalink),R=x.privacy.permalink,P=x.privacy.title,C=x.terms.permalink,D=x.terms.title,T=(x.cart.id,x.cart.permalink),M=Object(r.getSetting)("checkoutAllowsGuest",!1),A=Object(r.getSetting)("checkoutAllowsSignup",!1),H=Object(r.getSetting)("loginUrl","/wp-login.php"),N=(n(40),function(){return m>1})},function(e,t,n){var r=n(82),o=n(83),i=n(59),c=n(84);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},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(61);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},,,,,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(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},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){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){!function(){e.exports=this.wp.primitives}()},,,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(70);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(27),o=n(20);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},,function(e,t){!function(){e.exports=this.wp.a11y}()},,function(e,t,n){"use strict";var r=n(7),o=n.n(r),i=(n(3),n(2)),c=n(5),a=n.n(c);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,c=e.wrapperProps,u=void 0===c?{}:c,l=null!=n,p=null!=r;return!l&&p?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||i.Fragment,l&&p&&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,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(21),i=n.n(o),c=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},function(e,t){!function(){e.exports=this.wp.blocks}()},,,function(e,t,n){"use strict";var r=n(31),o=n.n(r),i=n(32),c=n.n(i),a=n(20),u=n.n(a),s=n(33),l=n.n(s),p=n(34),d=n.n(p),f=n(24),b=n.n(f),g=n(7),m=n.n(g),h=(n(3),n(2)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.C,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,i=e.text,c=void 0===i?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):i,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),c&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},c),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(73);function w(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 j=function(e){l()(n,e);var t=w(n);function n(){var e;o()(this,n);for(var r=arguments.length,i=new Array(r),c=0;c<r;c++)i[c]=arguments[c];return e=t.call.apply(t,[this].concat(i)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,i=e.errorMessagePrefix,c=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof c?c({errorMessage:u}):React.createElement(O,{errorMessage:r?u:null,header:t,imageUrl:n,text:o,errorMessagePrefix:i}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(h.Component);j.defaultProps={showErrorMessage:!0};t.a=j},,,,function(e,t,n){var r=n(95),o=n(96),i=n(59),c=n(97);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},,,,,,,,,,,,function(e,t,n){var r=n(60);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={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(10),o=n.n(r),i=n(0),c=function(){var e=Object(i.useState)(),t=o()(e,2)[1];return Object(i.useCallback)((function(e){return t((function(){throw e}))}),[])}},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 i}));var r=n(0),o=Object(r.createContext)("page"),i=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(72);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,c){if(c!==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:i,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){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,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}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";n.d(t,"a",(function(){return o}));var r=n(2);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,i=Object(r.useRef)(null),c=Object(r.useRef)([]),a=n.leading,u=void 0===n.trailing||n.trailing,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),p=Object(r.useRef)(!1),d=Object(r.useRef)(e);d.current=e;var f=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(i.current),i.current=null,c.current=[],l.current=null,s.current=!1}),[]);Object(r.useEffect)((function(){return p.current=!1,function(){p.current=!0}}),[]);var b=Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c.current=e,clearTimeout(l.current),s.current&&(s.current=!1),l.current||!a||s.current||(d.current.apply(d,e),s.current=!0),l.current=setTimeout((function(){var t=!0;a&&s.current&&(t=!1),f(),!p.current&&u&&t&&d.current.apply(d,e)}),t),o&&!i.current&&u&&(i.current=setTimeout((function(){var e=c.current;f(),p.current||d.current.apply(null,e)}),o))}),[o,t,f,a,u]),g=Object(r.useCallback)((function(){l.current&&(d.current.apply(null,c.current),f())}),[f]);return[b,f,g]}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return g}));var r=n(10),o=n.n(r),i=n(15),c=n(12),a=n(0),u=n(67),s=n(21),l=n.n(s),p=n(39),d=n(63),f=function(e){var t=Object(u.a)();e=e||t;var n=Object(c.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(c.useDispatch)(i.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(c.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e,s])]},g=function(e,t){var n=Object(u.a)(),r=f(t=t||n),i=o()(r,2),c=i[0],s=i[1],b=Object(p.a)(c),g=Object(p.a)(e),m=Object(d.a)(g),h=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(m,g)||(s(Object.assign({},b,g)),h.current=!0)}),[b,g,m,s]),h.current?[c,s]:[e,s]}},,,function(e,t,n){var r=n(60);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},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.")}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(12),i=n(0),c=n(39),a=n(62),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,p=void 0===l?{}:l,d=e.shouldSelect,f=void 0===d||d;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(i.useRef)({results:[],isLoading:!0}),g=Object(c.a)(p),m=Object(c.a)(s),h=Object(a.a)(),v=Object(o.useSelect)((function(e){if(!f)return null;var o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],c=o.getCollectionError.apply(o,i);return c&&h(c),{results:o.getCollection.apply(o,i),isLoading:!o.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,f]);return null!==v&&(b.current=v),b.current}},,,,,function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function i(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return o(n.overflowY,t)||o(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function c(e,t,n,r,o,i,c,a){return i<e&&c>t||i>e&&c<t?0:i<=e&&a<=n||c>=t&&a>=n?i-e-r:c>t&&a<n||i<e&&a>n?c-t+o:0}t.a=function(e,t){var n=window,o=t.scrollMode,a=t.block,u=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,p="function"==typeof s?s:function(e){return e!==s};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],b=e;r(b)&&p(b);){if((b=b.parentNode)===d){f.push(b);break}b===document.body&&i(b)&&!i(document.documentElement)||i(b,l)&&f.push(b)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),O=y.height,w=y.width,j=y.top,S=y.right,E=y.bottom,I=y.left,x="start"===a||"nearest"===a?j:"end"===a?E:j+O/2,k="center"===u?I+w/2:"end"===u?S:I,_=[],R=0;R<f.length;R++){var P=f[R],C=P.getBoundingClientRect(),D=C.height,T=C.width,M=C.top,A=C.right,H=C.bottom,N=C.left;if("if-needed"===o&&j>=0&&I>=0&&E<=m&&S<=g&&j>=M&&E<=H&&I>=N&&S<=A)return _;var L=getComputedStyle(P),B=parseInt(L.borderLeftWidth,10),V=parseInt(L.borderTopWidth,10),K=parseInt(L.borderRightWidth,10),F=parseInt(L.borderBottomWidth,10),U=0,q=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-B-K:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-F:0;if(d===P)U="start"===a?x:"end"===a?x-m:"nearest"===a?c(v,v+m,m,V,F,v+x,v+x+O,O):x-m/2,q="start"===u?k:"center"===u?k-g/2:"end"===u?k-g:c(h,h+g,g,B,K,h+k,h+k+w,w),U=Math.max(0,U+v),q=Math.max(0,q+h);else{U="start"===a?x-M-V:"end"===a?x-H+F+W:"nearest"===a?c(M,H,D,V,F+W,x,x+O,O):x-(M+D/2)+W/2,q="start"===u?k-N-B:"center"===u?k-(N+T/2)+$/2:"end"===u?k-A+K+$:c(N,A,T,B,K+$,k,k+w,w);var Y=P.scrollLeft,z=P.scrollTop;x+=z-(U=Math.max(0,Math.min(z+U,P.scrollHeight-D+W))),k+=Y-(q=Math.max(0,Math.min(Y+q,P.scrollWidth-T+$)))}_.push({el:P,top:U,left:q})}return _}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),i=n(7),c=n.n(i),a=n(0),u=n(43);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){c()(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 p=[".wp-block-woocommerce-cart"],d=function(e){var t=e.Block,n=e.containers,r=e.getProps,i=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=i(e,n),c=s(e,n),p=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,c,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:p})))),e)}))},f=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,i=e.wrappers,c=document.body.querySelectorAll(o);i.length>0&&Array.prototype.filter.call(c,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),d({Block:t,containers:c,getProps:n,getErrorBoundaryProps:r})},b=function(e){var t=document.body.querySelectorAll(p.join(","));f(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,i,c,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,i=n.getErrorBoundaryProps,c=n.selector,a=n.wrapper.querySelectorAll(c),d({Block:r,containers:a,getProps:o,getErrorBoundaryProps:i})}))}))}},,,function(e,t){},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(14),c=n.n(i),a=n(28),u=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]);return React.createElement(a.SVG,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(7),o=n.n(r),i=n(14),c=n.n(i),a=n(2);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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=c()(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},i))}},,function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(15),c=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(c.useSelect)((function(e,t){if(n.current){var r=e(i.SCHEMA_STORE_KEY),o=r.isResolving,c=r.hasFinishedResolution,a=t.dispatch(i.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])||c("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(2),o=n(90);function i(e,t){return e===t}function c(e,t,n){var c=n&&n.equalityFn?n.equalityFn:i,a=Object(r.useState)(e),u=a[0],s=a[1],l=Object(o.a)(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),p=l[0],d=l[1],f=l[2],b=Object(r.useRef)(e);return Object(r.useEffect)((function(){c(b.current,e)||(p(e),b.current=e)}),[e,p,c]),[u,d,f]}},function(e,t,n){"use strict";var r=n(1),o=(n(3),n(5)),i=n.n(o),c=n(38),a=(n(162),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(r.__)("Go","woo-gutenberg-products-block"):o,u=e.onClick,s=e.screenReaderLabel,l=void 0===s?Object(r.__)("Apply filter","woo-gutenberg-products-block"):s;return React.createElement("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:u},React.createElement(c.a,{label:a,screenReaderLabel:l}))});a.defaultProps={disabled:!1},t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(9),o=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 o.find((function(t){return t.id===e}))},c=function(e){if(e)return o.find((function(t){return t.taxonomy===e}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(8),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),c=i.length?i[0]:null;if(c&&c.slug&&Array.isArray(c.slug)&&c.slug.includes(o)){var a=c.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(c.slug=a.sort(),u.push(c)),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,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",c=e.filter((function(e){return e.attribute!==n.taxonomy}));0===o.length?t(c):(c.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(o,"slug").sort()}),t(Object(r.sortBy)(c,"attribute")))}},,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(14),c=n.n(i),a=(n(3),n(5)),u=n.n(a),s=n(1),l=n(130),p=n(129),d=(n(111),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,a=void 0===i?"li":i,s=e.className,l=void 0===s?"":s,p=e.radius,d=void 0===p?"small":p,f=e.children,b=void 0===f?null:f,g=c()(e,["text","screenReaderText","element","className","radius","children"]),m=a,h=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+d),v=Boolean(r&&r!==t);return React.createElement(m,o()({className:h},g),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),b)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,a=e.disabled,f=void 0!==a&&a,b=e.onRemove,g=void 0===b?function(){}:b,m=e.removeOnAnyClick,h=void 0!==m&&m,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,w=c()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),j=h?"span":"button";if(!n){var S=O&&"string"==typeof O?O:v;n="string"!=typeof S?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),S)}var E={"aria-label":n,disabled:f,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},I=h?E:{},x=h?{"aria-hidden":!0}:E;return React.createElement(d,o()({},w,I,{className:u()(i,"is-removable"),element:h?"button":w.element,screenReaderText:O,text:v}),React.createElement(j,o()({className:"wc-block-components-chip__remove"},x),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},,,,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";e.exports=n(226)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(7),o=n.n(r),i=n(47),c=n.n(i),a=n(27),u=n.n(a),s=n(10),l=n.n(s),p=n(0),d=n(67),f=n(141),b=n(8),g=n(39),m=n(92),h=n(99);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){o()(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 O=function(e){var t=e.queryAttribute,n=e.queryPrices,r=e.queryState,o=Object(d.a)();o="".concat(o,"-collection-data");var i=Object(m.a)(o),a=l()(i,1)[0],s=Object(m.b)("calculate_attribute_counts",[],o),v=l()(s,2),O=v[0],w=v[1],j=Object(m.b)("calculate_price_range",null,o),S=l()(j,2),E=S[0],I=S[1],x=Object(g.a)(t||{}),k=Object(g.a)(n);Object(p.useEffect)((function(){"object"===u()(x)&&Object.keys(x).length&&(O.find((function(e){return e.taxonomy===x.taxonomy}))||w([].concat(c()(O),[x])))}),[x,O,w]),Object(p.useEffect)((function(){E!==k&&void 0!==k&&I(k)}),[k,I,E]);var _=Object(p.useState)(!1),R=l()(_,2),P=R[0],C=R[1],D=Object(f.a)(P,200),T=l()(D,1)[0];P||C(!0);var M=Object(p.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(b.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(a)}),[a]);return Object(h.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:y(y({},r),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},M),shouldSelect:T})}},,function(e,t,n){e.exports=n(272)},function(e,t){},function(e,t){},function(e,t,n){"use strict";
7
- /** @license React v17.0.1
8
- * react-is.production.min.js
9
- *
10
- * Copyright (c) Facebook, Inc. and its affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */var r=60103,o=60106,i=60107,c=60108,a=60114,u=60109,s=60110,l=60112,p=60113,d=60120,f=60115,b=60116,g=60121,m=60122,h=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var O=Symbol.for;r=O("react.element"),o=O("react.portal"),i=O("react.fragment"),c=O("react.strict_mode"),a=O("react.profiler"),u=O("react.provider"),s=O("react.context"),l=O("react.forward_ref"),p=O("react.suspense"),d=O("react.suspense_list"),f=O("react.memo"),b=O("react.lazy"),g=O("react.block"),m=O("react.server.block"),h=O("react.fundamental"),v=O("react.debug_trace_mode"),y=O("react.legacy_hidden")}function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case a:case c:case p:case d:return e;default:switch(e=e&&e.$$typeof){case s:case l:case b:case f:case u:return e;default:return t}}case o:return t}}}var j=u,S=r,E=l,I=i,x=b,k=f,_=o,R=a,P=c,C=p;t.ContextConsumer=s,t.ContextProvider=j,t.Element=S,t.ForwardRef=E,t.Fragment=I,t.Lazy=x,t.Memo=k,t.Portal=_,t.Profiler=R,t.StrictMode=P,t.Suspense=C,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return w(e)===s},t.isContextProvider=function(e){return w(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===l},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===b},t.isMemo=function(e){return w(e)===f},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===c},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===v||e===c||e===p||e===d||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===f||e.$$typeof===u||e.$$typeof===s||e.$$typeof===l||e.$$typeof===h||e.$$typeof===g||e[0]===m)},t.typeOf=w},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(132),o=n(108),i=n(7),c=n.n(i),a=n(10),u=n.n(a),s=n(1),l=n(36),p=n(92),d=n(99),f=n(221),b=n(39),g=n(63),m=n(0),h=n(47),v=n.n(h),y=n(3),O=n.n(y),w=n(5),j=n.n(w),S=(n(227),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,o=e.options,i=void 0===o?[]:o,c=e.checked,a=void 0===c?[]:c,l=e.isLoading,p=void 0!==l&&l,d=e.isDisabled,f=void 0!==d&&d,b=e.limit,g=void 0===b?10:b,h=Object(m.useState)(!1),y=u()(h,2),O=y[0],w=y[1],S=Object(m.useMemo)((function(){return v()(Array(5)).map((function(e,t){return React.createElement("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),E=Object(m.useMemo)((function(){var e=i.length-g;return!O&&React.createElement("li",{key:"show-more",className:"show-more"},React.createElement("button",{onClick:function(){w(!0)},"aria-expanded":!1,"aria-label":Object(s.sprintf)(Object(s._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(s.sprintf)(Object(s._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))}),[i,g,O]),I=Object(m.useMemo)((function(){return O&&React.createElement("li",{key:"show-less",className:"show-less"},React.createElement("button",{onClick:function(){w(!1)},"aria-expanded":!0,"aria-label":Object(s.__)("Show less options","woo-gutenberg-products-block")},Object(s.__)("Show less","woo-gutenberg-products-block")))}),[O]),x=Object(m.useMemo)((function(){var e=i.length>g+5;return React.createElement(React.Fragment,null,i.map((function(t,n){return React.createElement(m.Fragment,{key:t.value},React.createElement("li",e&&!O&&n>=g&&{hidden:!0},React.createElement("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:a.includes(t.value),disabled:f}),React.createElement("label",{htmlFor:t.value},t.label)),e&&n===g-1&&E)})),e&&I)}),[i,r,a,O,g,I,E,f]),k=j()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":p},t);return React.createElement("ul",{className:k},p?S:x)}),E=n(23),I=n(6),x=n(13),k=n(104),_=n(2),R=(n(185),n(105)),P=0;function C(e){return"function"==typeof e?e:D}function D(){}function T(e,t){e&&Object(R.a)(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function M(e,t){return e===t||t instanceof Node&&e.contains&&e.contains(t)}function A(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function H(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function N(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function L(){return String(P++)}function B(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function V(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function K(e){return"string"==typeof e.type}function F(e){return e.props}var U=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function q(e){void 0===e&&(e={});var t={};return U.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function $(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=W(t,r)?t[r]:e[r],n}),{})}function W(e,t){return void 0!==e[t]}function Y(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function z(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var c=t+e;c<0?c=o?i:0:c>i&&(c=o?0:i);var a=Q(e,c,n,r,o);return-1===a?t>=n?-1:t:a}function Q(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var c=t+1;c<n;c++)if(!r(c).hasAttribute("disabled"))return c}else for(var a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return o?e>0?Q(1,0,n,r,!1):Q(-1,n-1,n,r,!1):-1}function G(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(M(t,e)||r&&M(t,n.activeElement))}))}var X=A((function(e){Z(e).textContent=""}),500);function J(e,t){var n=Z(t);e&&(n.textContent=e,X(t))}function Z(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var ee=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),te=function(){var e=function(e){function t(t){var n;(n=e.call(this,t)||this).id=n.props.id||"downshift-"+L(),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=q(t),n.internalSetState(Object(I.a)({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=q(t),n.internalSetState(Object(I.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},c="function"==typeof e;return!c&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,Object(I.a)({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var a=c?e(t):e;a=n.props.stateReducer(t,a),r=a.hasOwnProperty("selectedItem");var u={};return r&&a.selectedItem!==t.selectedItem&&(o=a.selectedItem),a.type=a.type||0,Object.keys(a).forEach((function(e){t[e]!==a[e]&&(i[e]=a[e]),"type"!==e&&(a[e],W(n.props,e)||(u[e]=a[e]))})),c&&a.hasOwnProperty("inputValue")&&n.props.onInputValueChange(a.inputValue,Object(I.a)({},n.getStateAndHelpers(),a)),u}),(function(){C(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,c=void 0===i?"ref":i,a=o.ref,u=Object(E.a)(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;n.getRootProps.called=!0,n.getRootProps.refKey=c,n.getRootProps.suppressRefError=l;var p=n.getState().isOpen;return Object(I.a)(((r={})[c]=N(a,n.rootRef),r.role="combobox",r["aria-expanded"]=p,r["aria-haspopup"]="listbox",r["aria-owns"]=p?n.menuId:null,r["aria-labelledby"]=n.labelId,r),u)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=z(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=z(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset(Object(I.a)({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=Object(I.a)({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=Object(I.a)({},n.keyDownHandlers,{Home:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=Q(1,0,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}}},End:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=Q(-1,r-1,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:8})}}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick,o=(t.onPress,t.onKeyDown),i=t.onKeyUp,c=t.onBlur,a=Object(E.a)(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),u=n.getState().isOpen,s={onClick:H(r,n.buttonHandleClick),onKeyDown:H(o,n.buttonHandleKeyDown),onKeyUp:H(i,n.buttonHandleKeyUp),onBlur:H(c,n.buttonHandleBlur)},l=a.disabled?{}:s;return Object(I.a)({type:"button",role:"button","aria-label":u?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l,a)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=Y(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(Object(x.a)(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return Object(I.a)({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,c=t.onInput,a=(t.onChangeText,Object(E.a)(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),u={};var s,l=n.getState(),p=l.inputValue,d=l.isOpen,f=l.highlightedIndex;a.disabled||((s={}).onChange=H(i,c,n.inputHandleChange),s.onKeyDown=H(r,n.inputHandleKeyDown),s.onBlur=H(o,n.inputHandleBlur),u=s);return Object(I.a)({"aria-autocomplete":"list","aria-activedescendant":d&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":d?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},u,a)},n.inputHandleKeyDown=function(e){var t=Y(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(Object(x.a)(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,c=void 0===i?"ref":i,a=o.ref,u=Object(E.a)(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;return n.getMenuProps.called=!0,n.getMenuProps.refKey=c,n.getMenuProps.suppressRefError=l,Object(I.a)(((r={})[c]=N(a,n.menuRef),r.role="listbox",r["aria-labelledby"]=u&&u["aria-label"]?null:n.labelId,r.id=n.menuId,r),u)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,c=r.onClick,a=(r.onPress,r.index),u=r.item,s=void 0===u?void 0:u,l=Object(E.a)(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===a?(n.items.push(s),a=n.items.indexOf(s)):n.items[a]=s;var p=c,d=((t={onMouseMove:H(o,(function(){a!==n.getState().highlightedIndex&&(n.setHighlightedIndex(a,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:H(i,(function(e){e.preventDefault()}))}).onClick=H(p,(function(){n.selectItemAtIndex(a,{type:9})})),t),f=l.disabled?{onMouseDown:d.onMouseDown}:d;return Object(I.a)({id:n.getItemId(a),role:"option","aria-selected":n.getState().highlightedIndex===a},f,l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=q(e),n.internalSetState((function(t){var r=t.selectedItem;return Object(I.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=q(e),n.internalSetState((function(t){var r=t.isOpen;return Object(I.a)({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),C(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=A((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(Object(I.a)({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,J(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,c=void 0===i?o:i,a=r.defaultIsOpen,u=r.initialIsOpen,s=void 0===u?a:u,l=r.initialInputValue,p=void 0===l?"":l,d=r.initialSelectedItem,f=void 0===d?null:d,b=n.getState({highlightedIndex:c,isOpen:s,inputValue:p,selectedItem:f});return null!=b.selectedItem&&void 0===n.props.initialInputValue&&(b.inputValue=n.props.itemToString(b.selectedItem)),n.state=b,n}Object(k.a)(t,e);var n=t.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},n.getState=function(e){return void 0===e&&(e=this.state),$(e,this.props)},n.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},n.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},n.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},n.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=z(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},n.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,c=this.id,a=this.getRootProps,u=this.getToggleButtonProps,s=this.getLabelProps,l=this.getMenuProps,p=this.getInputProps,d=this.getItemProps,f=this.openMenu,b=this.closeMenu,g=this.toggleMenu,m=this.selectItem,h=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,O=this.clearSelection,w=this.clearItems;return{getRootProps:a,getToggleButtonProps:u,getLabelProps:s,getMenuProps:l,getInputProps:p,getItemProps:d,reset:this.reset,openMenu:f,closeMenu:b,toggleMenu:g,selectItem:m,selectItemAtIndex:h,selectHighlightedItem:v,setHighlightedIndex:y,clearSelection:O,clearItems:w,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:c,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},n.componentDidMount=function(){var e=this;var t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!G(t.target,[e._rootNode,e._menuNode],e.props.environment.document)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},i=function(t){var n=G(t.target,[e._rootNode,e._menuNode],e.props.environment.document,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},c=this.props.environment;c.addEventListener("mousedown",t),c.addEventListener("mouseup",n),c.addEventListener("touchstart",r),c.addEventListener("touchmove",o),c.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),c.removeEventListener("mousedown",t),c.removeEventListener("mouseup",n),c.removeEventListener("touchstart",r),c.removeEventListener("touchmove",o),c.removeEventListener("touchend",i)}},n.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},n.componentDidUpdate=function(e,t){W(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var e=V(this.props.children,D);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=V(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:K(t)?Object(_.cloneElement)(t,this.getRootProps(F(t))):void 0:null},t}(_.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:B,itemToString:function(e){return null==e?"":String(e)},onStateChange:D,onInputValueChange:D,onUserAction:D,onChange:D,onSelect:D,onOuterClick:D,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:T},e.stateChangeTypes=ee,e}();A((function(e,t){J(e(),t)}),200),"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_.useLayoutEffect:_.useEffect;var ne={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:T,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};O.a.array.isRequired,O.a.func,O.a.func,O.a.func,O.a.bool,O.a.number,O.a.number,O.a.number,O.a.bool,O.a.bool,O.a.bool,O.a.any,O.a.any,O.a.any,O.a.string,O.a.string,O.a.string,O.a.func,O.a.string,O.a.func,O.a.func,O.a.func,O.a.func,O.a.func,O.a.shape({addEventListener:O.a.func,removeEventListener:O.a.func,document:O.a.shape({getElementById:O.a.func,activeElement:O.a.any,body:O.a.any})});Object(I.a)({},ne,{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}});O.a.array.isRequired,O.a.func,O.a.func,O.a.func,O.a.bool,O.a.number,O.a.number,O.a.number,O.a.bool,O.a.bool,O.a.bool,O.a.any,O.a.any,O.a.any,O.a.string,O.a.string,O.a.string,O.a.string,O.a.string,O.a.string,O.a.func,O.a.string,O.a.string,O.a.func,O.a.func,O.a.func,O.a.func,O.a.func,O.a.func,O.a.shape({addEventListener:O.a.func,removeEventListener:O.a.func,document:O.a.shape({getElementById:O.a.func,activeElement:O.a.any,body:O.a.any})});Object(I.a)({},ne,{getA11yStatusMessage:B,circularNavigation:!0});O.a.array,O.a.array,O.a.array,O.a.func,O.a.func,O.a.func,O.a.number,O.a.number,O.a.number,O.a.func,O.a.func,O.a.string,O.a.string,O.a.shape({addEventListener:O.a.func,removeEventListener:O.a.func,document:O.a.shape({getElementById:O.a.func,activeElement:O.a.any,body:O.a.any})});var re=te,oe=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,o=e.isDisabled,i=e.onFocus,c=e.onRemoveItem,a=e.placeholder,u=e.tabIndex,s=e.value;return React.createElement("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:o,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&c(t[t.length-1])},placeholder:a,tabIndex:u}))},ie=function(e){var t=e.children,n=e.onClick;return React.createElement("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},ce=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,o=e.highlightedIndex,i=e.options;return React.createElement("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),i.map((function(e,r){var i=t.includes(e.value);return React.createElement("li",n({key:e.value,className:j()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":i,"is-highlighted":o===r}),index:r,item:e.value,"aria-label":i?Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)})))},ae=n(150),ue=function(e){var t=e.onRemoveItem,n=e.option;return React.createElement(ae.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:function(){t(n.value)},ariaLabel:Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},se=n(130),le=n(129),pe=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,o=Object(m.useRef)(null);return Object(m.useEffect)((function(){o.current.focus()}),[o]),React.createElement("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},React.createElement("button",{ref:o,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),React.createElement("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},React.createElement(se.a,{srcElement:le.a,size:16})))};n(225);function de(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 fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var be=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,o=e.checked,i=void 0===o?[]:o,c=e.inputLabel,a=void 0===c?"":c,u=e.isDisabled,l=void 0!==u&&u,p=e.isLoading,d=void 0!==p&&p,f=e.multiple,b=void 0!==f&&f,g=e.onChange,h=void 0===g?function(){}:g,v=e.options,y=void 0===v?[]:v,O=Object(m.useRef)(null),w=j()(r,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":l,"is-loading":d}),S=Object(m.useCallback)((function(e,t){switch(t.type){case re.stateChangeTypes.keyDownEnter:case re.stateChangeTypes.clickItem:return fe(fe({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:b,inputValue:""});case re.stateChangeTypes.blurInput:case re.stateChangeTypes.mouseUp:return fe(fe({},t),{},{inputValue:e.inputValue});default:return t}}),[b]);return React.createElement(re,{onChange:h,selectedItem:null,stateReducer:S},(function(e){var t=e.getInputProps,r=e.getItemProps,o=e.getLabelProps,c=e.getMenuProps,u=e.highlightedIndex,p=e.inputValue,d=e.isOpen,f=e.openMenu;return React.createElement("div",{className:j()(w,{"is-multiple":b,"is-single":!b,"has-checked":i.length>0,"is-open":d})},React.createElement("label",o({className:"screen-reader-text"}),a),React.createElement(ie,{isOpen:d,onClick:function(){return O.current.focus()}},i.map((function(e){var t=y.find((function(t){return t.value===e})),n=function(e){h(e),O.current.focus()};return b?React.createElement(ue,{key:e,onRemoveItem:n,option:t}):React.createElement(pe,{key:e,onClick:function(){return O.current.focus()},onRemoveItem:n,option:t})})),React.createElement(oe,{checked:i,getInputProps:t,inputRef:O,isDisabled:l,onFocus:f,onRemoveItem:function(e){h(e),O.current.focus()},placeholder:i.length>0&&b?null:Object(s.sprintf)(Object(s.__)("Any %s","woo-gutenberg-products-block"),n),tabIndex:!b&&i.length>0?"-1":"0",value:p})),d&&!l&&React.createElement(ce,{checked:i,getItemProps:r,getMenuProps:c,highlightedIndex:u,options:y.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},ge=n(142),me=n(21),he=n.n(me),ve=n(22),ye=n(143),Oe=n(144),we=n(38),je=function(e){var t=e.name,n=e.count;return React.createElement(React.Fragment,null,t,Number.isFinite(n)&&React.createElement(we.a,{label:n,screenReaderLabel:Object(s.sprintf)(Object(s._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},Se=[{value:"preview-1",name:"Blue",label:React.createElement(je,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:React.createElement(je,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:React.createElement(je,{name:"Red",count:2})}],Ee={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(224);function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ke=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,o=t.isPreview&&!t.attributeId?Ee:Object(ye.a)(t.attributeId),i=Object(m.useState)([]),c=u()(i,2),a=c[0],h=c[1],v=Object(m.useState)(t.isPreview&&!t.attributeId?Se:[]),y=u()(v,2),O=y[0],w=y[1],j=Object(p.a)(),E=u()(j,1)[0],I=Object(p.b)("attributes",[]),x=u()(I,2),k=x[0],_=x[1],R=Object(d.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[o.id],shouldSelect:t.attributeId>0}),P=R.results,C=R.isLoading,D="dropdown"!==t.displayStyle&&"and"===t.queryType,T=Object(f.a)({queryAttribute:{taxonomy:o.taxonomy,queryType:t.queryType},queryState:xe(xe({},E),{},{attributes:D?E.attributes:null})}),M=T.results,A=T.isLoading,H=Object(m.useCallback)((function(e){return M.attribute_counts?M.attribute_counts.find((function(t){return t.term===e})):null}),[M]);Object(m.useEffect)((function(){if(!C&&!A){var e=P.map((function(e){var n,r=H(e.id);if(!(r||a.includes(e.slug)||(n=e.slug,null!=E&&E.attributes&&E.attributes.some((function(e){var t=e.attribute,r=e.slug,i=void 0===r?[]:r;return t===o.taxonomy&&i.includes(n)})))))return null;var i=r?r.count:0;return{value:e.slug,name:Object(ve.decodeEntities)(e.name),label:React.createElement(je,{name:Object(ve.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);w(e)}}),[o.taxonomy,P,C,t.showCounts,A,H,a,E.attributes]),Object(m.useEffect)((function(){t.showFilterButton||K(a)}),[t.showFilterButton,a,K]);var N=Object(m.useMemo)((function(){return k.filter((function(e){return e.attribute===o.taxonomy})).flatMap((function(e){return e.slug}))}),[k,o.taxonomy]),L=Object(b.a)(N),B=Object(g.a)(L);Object(m.useEffect)((function(){he()(B,L)||he()(a,L)||h(L)}),[a,L,B]);var V=Object(m.useCallback)((function(e){return P.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[P]),K=Object(m.useCallback)((function(e){r||Object(Oe.b)(k,_,o,V(e),"or"===t.queryType?"in":"and")}),[r,k,_,o,V,t.queryType]),F="dropdown"!==t.displayStyle||"or"===t.queryType,U=Object(m.useCallback)((function(e){var t,n=function(e){return O.find((function(t){return t.value===e})).name},r=function(e){var t=e.filterAdded,r=e.filterRemoved,o=t?n(t):null,i=r?n(r):null;o&&i?Object(l.speak)(Object(s.sprintf)(Object(s.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),o,i)):o?Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter added.","woo-gutenberg-products-block"),o)):i&&Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter removed.","woo-gutenberg-products-block"),i))},o=a.includes(e);F?(t=a.filter((function(t){return t!==e})),o?r({filterRemoved:e}):(t.push(e),t.sort(),r({filterAdded:e}))):(t=o?[]:[e],r({filterAdded:o?null:e,filterRemoved:1===a.length?a[0]:null}));h(t)}),[a,O,F]);if(0===O.length&&!C)return null;var q="h".concat(t.headingLevel),$=!t.isPreview&&C,W=!t.isPreview&&A;return React.createElement(React.Fragment,null,!r&&t.heading&&React.createElement(q,null,t.heading),React.createElement("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?React.createElement(be,{attributeLabel:o.label,checked:a,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:$,multiple:F,onChange:U,options:O}):React.createElement(S,{className:"wc-block-attribute-filter-list",options:O,checked:a,onChange:U,isLoading:$,isDisabled:W}),t.showFilterButton&&React.createElement(ge.a,{className:"wc-block-attribute-filter__button",disabled:$||W,onClick:function(){return K(a)}})))};Object(o.a)({selector:".wp-block-woocommerce-attribute-filter",Block:Object(r.a)(ke),getProps:function(e){return{attributes:{attributeId:parseInt(e.dataset.attributeId||0,10),showCounts:"true"===e.dataset.showCounts,queryType:e.dataset.queryType,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3,displayStyle:e.dataset.displayStyle,showFilterButton:"true"===e.dataset.showFilterButton}}}})}]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build/attribute-filter.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '3972097b883c1d66d90a96ee2627cd69');
 
build/attribute-filter.js DELETED
@@ -1 +0,0 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var r,i,u=t[0],a=t[1],l=t[2],b=0,d=[];b<u.length;b++)i=u[b],Object.prototype.hasOwnProperty.call(c,i)&&c[i]&&d.push(c[i][0]),c[i]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(s&&s(t);d.length;)d.shift()();return o.push.apply(o,l||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(r=!1)}r&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},c={18:0},o=[];function i(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,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},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 u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var l=0;l<u.length;l++)t(u[l]);var s=a;return o.push([848,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},100:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=Object(r.createContext)("page"),o=function(){return Object(r.useContext)(c)};c.Provider},106:function(e,t){},107:function(e,t){},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){},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},144:function(e,t,n){"use strict";var r=n(14),c=n.n(r),o=n(15),i=n.n(o),u=n(16),a=n.n(u),l=n(17),s=n.n(l),b=n(10),d=n.n(b),p=n(0),f=n(7),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 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 n,r=d()(e);if(t){var c=d()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var j=function(e){a()(n,e);var t=h(n);function n(){return c()(this,n),t.apply(this,arguments)}return i()(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,o=t.maxLevel,i=t.selectedLevel,u=t.onChange;return Object(p.createElement)(m.ToolbarGroup,{isCollapsed:r,icon:Object(p.createElement)(O,{level:i}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,i,u)}))})}}]),n}(p.Component);t.a=j},146:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return g}));var r=n(18),c=n.n(r),o=n(37),i=n(21),u=n(0),a=n(100),l=n(33),s=n.n(l),b=n(53),d=n(96),p=function(e){var t=Object(a.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(u.useCallback)((function(t){r(e,t)}),[e,r])]},f=function(e,t,n){var r=Object(a.a)();n=n||r;var c=Object(i.useSelect)((function(r){return r(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(i.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(u.useCallback)((function(t){l(n,e,t)}),[n,e,l])]},g=function(e,t){var n=Object(a.a)(),r=p(t=t||n),o=c()(r,2),i=o[0],l=o[1],f=Object(b.a)(i),g=Object(b.a)(e),m=Object(d.a)(g),O=Object(u.useRef)(!1);return Object(u.useEffect)((function(){s()(m,g)||(l(Object.assign({},f,g)),O.current=!0)}),[f,g,m,l]),O.current?[i,l]:[e,l]}},156:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(37),c=n(21),o=n(0),i=n(53),u=n(95),a=function(e){var t=e.namespace,n=e.resourceName,a=e.resourceValues,l=void 0===a?[]:a,s=e.query,b=void 0===s?{}:s,d=e.shouldSelect,p=void 0===d||d;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var f=Object(o.useRef)({results:[],isLoading:!0}),g=Object(i.a)(b),m=Object(i.a)(l),O=Object(u.a)(),h=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),o=[t,n,g,m],i=c.getCollectionError.apply(c,o);return i&&O(i),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,n,m,g,p]);return null!==h&&(f.current=h),f.current}},157:function(e,t,n){"use strict";var r=n(0),c=n(31),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},172:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(22)),o=n(8),i=n.n(o);n(241);t.a=function(e){var t=e.className,n=e.headingLevel,o=e.onChange,u=e.heading,a="h".concat(n);return Object(r.createElement)(a,null,Object(r.createElement)(c.PlainText,{className:i()("wc-block-editor-components-title",t),value:u,onChange:o}))}},188:function(e,t){},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},20:function(e,t){!function(){e.exports=this.wp.url}()},21:function(e,t){!function(){e.exports=this.wp.data}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},241:function(e,t){},247:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(8)),i=n.n(o),u=n(42),a=(n(346),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(c.__)("Go","woo-gutenberg-products-block"):o,l=e.onClick,s=e.screenReaderLabel,b=void 0===s?Object(c.__)("Apply filter","woo-gutenberg-products-block"):s;return Object(r.createElement)("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:l},Object(r.createElement)(u.a,{label:a,screenReaderLabel:b}))});a.defaultProps={disabled:!1},t.a=a},248:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(6),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}),[]),o=function(e){if(e)return c.find((function(t){return t.id===e}))},i=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},249:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o}));var r=n(7),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]:"",o=e.filter((function(e){return e.attribute===n.taxonomy})),i=o.length?o[0]:null;if(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(c)){var u=i.slug.filter((function(e){return e!==c})),a=e.filter((function(e){return e.attribute!==n.taxonomy}));u.length>0&&(i.slug=u.sort(),a.push(i)),t(Object(r.sortBy)(a,"attribute"))}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",i=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(i):(i.push({attribute:n.taxonomy,operator:o,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(i,"attribute")))}},255:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(24),i=n.n(o),u=n(0),a=(n(2),n(8)),l=n.n(a),s=n(1),b=n(54),d=n(261),p=(n(188),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,o=e.element,a=void 0===o?"li":o,s=e.className,b=void 0===s?"":s,d=e.radius,p=void 0===d?"small":d,f=e.children,g=void 0===f?null:f,m=i()(e,["text","screenReaderText","element","className","radius","children"]),O=a,h=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+p),j=Boolean(r&&r!==t);return Object(u.createElement)(O,c()({className:h},m),Object(u.createElement)("span",{"aria-hidden":j,className:"wc-block-components-chip__text"},t),j&&Object(u.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,o=void 0===r?"":r,a=e.disabled,f=void 0!==a&&a,g=e.onRemove,m=void 0===g?function(){}:g,O=e.removeOnAnyClick,h=void 0!==O&&O,j=e.text,v=e.screenReaderText,w=void 0===v?"":v,y=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=h?"span":"button";if(!n){var k=w&&"string"==typeof w?w:j;n="string"!=typeof k?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),k)}var E={"aria-label":n,disabled:f,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},S=h?E:{},x=h?{"aria-hidden":!0}:E;return Object(u.createElement)(p,c()({},y,S,{className:l()(o,"is-removable"),element:h?"button":y.element,screenReaderText:w,text:j}),Object(u.createElement)(_,c()({className:"wc-block-components-chip__remove"},x),Object(u.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:d.a,size:16})))}},26:function(e,t){!function(){e.exports=this.moment}()},261:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(24),i=n.n(o),u=n(0),a=n(31),l=Object(u.createElement)((function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return Object(u.createElement)(a.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(u.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},28:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},34:function(e,t){!function(){e.exports=this.wp.dataControls}()},346:function(e,t){},37:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},4:function(e,t){!function(){e.exports=this.wp.components}()},42:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(0),i=(n(2),n(9)),u=n(8),a=n.n(u);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,u=e.wrapperProps,l=void 0===u?{}:u,b=null!=n,d=null!=r;return!b&&d?(t=c||"span",l=s(s({},l),{},{className:a()(l.className,"screen-reader-text")}),Object(o.createElement)(t,l,r)):(t=c||i.Fragment,b&&d&&n!==r?Object(o.createElement)(t,l,Object(o.createElement)("span",{"aria-hidden":"true"},n),Object(o.createElement)("span",{className:"screen-reader-text"},r)):Object(o.createElement)(t,l,n))}},48:function(e,t){!function(){e.exports=this.wp.keycodes}()},53:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=n(33),o=n.n(c),i=function(e){var t=Object(r.useRef)();return o()(e,t.current)||(t.current=e),t.current}},54:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(24),i=n.n(o),u=n(9);n(2);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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,o=i()(e,["srcElement","size"]);return Object(u.isValidElement)(t)&&Object(u.cloneElement)(t,function(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}({width:r,height:r},o))}},58:function(e,t){!function(){e.exports=this.wp.hooks}()},6:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"I",(function(){return o})),n.d(t,"O",(function(){return i})),n.d(t,"y",(function(){return u})),n.d(t,"A",(function(){return a})),n.d(t,"m",(function(){return l})),n.d(t,"z",(function(){return s})),n.d(t,"C",(function(){return b})),n.d(t,"o",(function(){return d})),n.d(t,"B",(function(){return p})),n.d(t,"n",(function(){return f})),n.d(t,"E",(function(){return g})),n.d(t,"u",(function(){return m})),n.d(t,"w",(function(){return O})),n.d(t,"r",(function(){return h})),n.d(t,"s",(function(){return j})),n.d(t,"t",(function(){return v})),n.d(t,"k",(function(){return w})),n.d(t,"K",(function(){return y})),n.d(t,"P",(function(){return _})),n.d(t,"q",(function(){return k})),n.d(t,"p",(function(){return E})),n.d(t,"H",(function(){return S})),n.d(t,"c",(function(){return x})),n.d(t,"v",(function(){return P})),n.d(t,"S",(function(){return R})),n.d(t,"T",(function(){return N})),n.d(t,"J",(function(){return T})),n.d(t,"a",(function(){return L})),n.d(t,"M",(function(){return D})),n.d(t,"b",(function(){return B})),n.d(t,"L",(function(){return I})),n.d(t,"D",(function(){return A})),n.d(t,"i",(function(){return V})),n.d(t,"N",(function(){return H})),n.d(t,"h",(function(){return z})),n.d(t,"j",(function(){return q})),n.d(t,"G",(function(){return G})),n.d(t,"F",(function(){return U})),n.d(t,"R",(function(){return Y})),n.d(t,"Q",(function(){return K})),n.d(t,"d",(function(){return Q})),n.d(t,"e",(function(){return W})),n.d(t,"f",(function(){return J})),n.d(t,"g",(function(){return $})),n.d(t,"x",(function(){return X})),n.d(t,"W",(function(){return ee})),n.d(t,"X",(function(){return te})),n.d(t,"U",(function(){return ne})),n.d(t,"V",(function(){return re}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),o=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),u=Object(r.getSetting)("max_columns",6),a=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),d=Object(r.getSetting)("default_rows",3),p=Object(r.getSetting)("min_height",500),f=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"),h=Object(r.getSetting)("hasProducts",!0),j=Object(r.getSetting)("hasTags",!0),v=Object(r.getSetting)("homeUrl",""),w=Object(r.getSetting)("couponsEnabled",!0),y=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),k=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),E=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),S=Object(r.getSetting)("productCount",0),x=Object(r.getSetting)("attributes",[]),P=Object(r.getSetting)("isShippingCalculatorEnabled",!0),C=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),R=Object(r.getSetting)("wcBlocksAssetUrl",""),N=Object(r.getSetting)("wcBlocksBuildUrl",""),T=Object(r.getSetting)("shippingCountries",{}),L=Object(r.getSetting)("allowedCountries",{}),D=Object(r.getSetting)("shippingStates",{}),B=Object(r.getSetting)("allowedStates",{}),I=Object(r.getSetting)("shippingMethodsExist",!1),A=Object(r.getSetting)("paymentGatewaySortOrder",[]),V=Object(r.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},F=Object(r.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),H=F.shop.permalink,z=F.checkout.id,q=F.checkout.permalink,G=F.privacy.permalink,U=F.privacy.title,Y=F.terms.permalink,K=F.terms.title,Q=F.cart.id,W=F.cart.permalink,J=Object(r.getSetting)("checkoutAllowsGuest",!1),$=Object(r.getSetting)("checkoutAllowsSignup",!1),X=Object(r.getSetting)("loginUrl","/wp-login.php"),Z=n(23),ee=function(e,t){if(C>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(C>1)return Object(Z.registerBlockType)(e,t)},ne=function(){return C>2},re=function(){return C>1}},67:function(e,t){!function(){e.exports=this.wp.dom}()},68:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(14),i=n.n(o),u=n(15),a=n.n(u),l=n(12),s=n.n(l),b=n(16),d=n.n(b),p=n(17),f=n.n(p),g=n(10),m=n.n(g),O=n(0),h=n(7),j=n(8),v=n.n(j),w=n(4),y=n(177);n(119);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 f()(this,n)}}var k=function(e){d()(n,e);var t=_(n);function n(){var e;return i()(this,n),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return a()(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,o=n.checked,i=n.instanceId,u=n.className,a=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(i);return a&&(e=Object(h.isFunction)(a)?a(o):a),Object(O.createElement)(w.BaseControl,{id:b,help:e,className:v()("components-toggle-button-control",u)},Object(O.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(O.createElement)(w.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var o={};return s===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(O.createElement)(w.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},o),e.label)}))))}}]),n}(O.Component);t.a=Object(y.a)(k)},7:function(e,t){!function(){e.exports=this.lodash}()},70:function(e,t){!function(){e.exports=this.wp.deprecated}()},71:function(e,t){!function(){e.exports=this.wp.a11y}()},73:function(e,t){!function(){e.exports=this.ReactDOM}()},76:function(e,t){!function(){e.exports=this.wp.viewport}()},77:function(e,t){!function(){e.exports=this.wp.date}()},846:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(5),c=n.n(r),o=n(30),i=n.n(o),u=n(45),a=n.n(u),l=n(18),s=n.n(l),b=n(0),d=n(100),p=n(536),f=n(7),g=n(53),m=n(146),O=n(156);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){var t=e.queryAttribute,n=e.queryPrices,r=e.queryState,c=Object(d.a)();c="".concat(c,"-collection-data");var o=Object(m.a)(c),u=s()(o,1)[0],l=Object(m.b)("calculate_attribute_counts",[],c),h=s()(l,2),v=h[0],w=h[1],y=Object(m.b)("calculate_price_range",null,c),_=s()(y,2),k=_[0],E=_[1],S=Object(g.a)(t||{}),x=Object(g.a)(n);Object(b.useEffect)((function(){"object"===a()(S)&&Object.keys(S).length&&(v.find((function(e){return e.taxonomy===S.taxonomy}))||w([].concat(i()(v),[S])))}),[S,v,w]),Object(b.useEffect)((function(){k!==x&&void 0!==x&&E(x)}),[x,E,k]);var P=Object(b.useState)(!1),C=s()(P,2),R=C[0],N=C[1],T=Object(p.a)(R,200),L=s()(T,1)[0];R||N(!0);var D=Object(b.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(f.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(u)}),[u]);return Object(O.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:j(j({},r),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},D),shouldSelect:L})}},848:function(e,t,n){e.exports=n(889)},849:function(e,t){},850:function(e,t){},851:function(e,t){},853:function(e,t){},889:function(e,t,n){"use strict";n.r(t);var r=n(11),c=n.n(r),o=n(0),i=n(1),u=n(23),a=n(54),l=n(31),s=Object(o.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"})),b=n(8),d=n.n(b),p=n(18),f=n.n(p),g=n(22),m=n(4),O=n(157),h=n(44),j=n(7),v=n(6),w=n(3),y=n(144),_=n(172),k=n(68),E=n(5),S=n.n(E),x=n(71),P=n(146),C=n(156),R=n(846),N=n(53),T=n(96),L=n(30),D=n.n(L),B=(n(2),n(853),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,c=e.options,u=void 0===c?[]:c,a=e.checked,l=void 0===a?[]:a,s=e.isLoading,b=void 0!==s&&s,p=e.isDisabled,g=void 0!==p&&p,m=e.limit,O=void 0===m?10:m,h=Object(o.useState)(!1),j=f()(h,2),v=j[0],w=j[1],y=Object(o.useMemo)((function(){return D()(Array(5)).map((function(e,t){return Object(o.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),_=Object(o.useMemo)((function(){var e=u.length-O;return!v&&Object(o.createElement)("li",{key:"show-more",className:"show-more"},Object(o.createElement)("button",{onClick:function(){w(!0)},"aria-expanded":!1,"aria-label":Object(i.sprintf)(Object(i._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(i.sprintf)(Object(i._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))}),[u,O,v]),k=Object(o.useMemo)((function(){return v&&Object(o.createElement)("li",{key:"show-less",className:"show-less"},Object(o.createElement)("button",{onClick:function(){w(!1)},"aria-expanded":!0,"aria-label":Object(i.__)("Show less options","woo-gutenberg-products-block")},Object(i.__)("Show less","woo-gutenberg-products-block")))}),[v]),E=Object(o.useMemo)((function(){var e=u.length>O+5;return Object(o.createElement)(o.Fragment,null,u.map((function(t,n){return Object(o.createElement)(o.Fragment,{key:t.value},Object(o.createElement)("li",e&&!v&&n>=O&&{hidden:!0},Object(o.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:l.includes(t.value),disabled:g}),Object(o.createElement)("label",{htmlFor:t.value},t.label)),e&&n===O-1&&_)})),e&&k)}),[u,r,l,v,O,k,_,g]),S=d()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":b},t);return Object(o.createElement)("ul",{className:S},b?y:E)}),I=n(211),A=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,c=e.isDisabled,i=e.onFocus,u=e.onRemoveItem,a=e.placeholder,l=e.tabIndex,s=e.value;return Object(o.createElement)("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:c,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&u(t[t.length-1])},placeholder:a,tabIndex:l}))},V=function(e){var t=e.children,n=e.onClick;return Object(o.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},M=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,c=e.highlightedIndex,u=e.options;return Object(o.createElement)("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),u.map((function(e,r){var u=t.includes(e.value);return Object(o.createElement)("li",n({key:e.value,className:d()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":u,"is-highlighted":c===r}),index:r,item:e.value,"aria-label":u?Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)})))},F=n(255),H=function(e){var t=e.onRemoveItem,n=e.option;return Object(o.createElement)(F.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:function(){t(n.value)},ariaLabel:Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},z=n(261),q=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,c=Object(o.useRef)(null);return Object(o.useEffect)((function(){c.current.focus()}),[c]),Object(o.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(o.createElement)("button",{ref:c,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},Object(o.createElement)(a.a,{srcElement:z.a,size:16})))};n(851);function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){S()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,c=e.checked,u=void 0===c?[]:c,a=e.inputLabel,l=void 0===a?"":a,s=e.isDisabled,b=void 0!==s&&s,p=e.isLoading,f=void 0!==p&&p,g=e.multiple,m=void 0!==g&&g,O=e.onChange,h=void 0===O?function(){}:O,j=e.options,v=void 0===j?[]:j,w=Object(o.useRef)(null),y=d()(r,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":b,"is-loading":f}),_=Object(o.useCallback)((function(e,t){switch(t.type){case I.a.stateChangeTypes.keyDownEnter:case I.a.stateChangeTypes.clickItem:return U(U({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:m,inputValue:""});case I.a.stateChangeTypes.blurInput:case I.a.stateChangeTypes.mouseUp:return U(U({},t),{},{inputValue:e.inputValue});default:return t}}),[m]);return Object(o.createElement)(I.a,{onChange:h,selectedItem:null,stateReducer:_},(function(e){var t=e.getInputProps,r=e.getItemProps,c=e.getLabelProps,a=e.getMenuProps,s=e.highlightedIndex,p=e.inputValue,f=e.isOpen,g=e.openMenu;return Object(o.createElement)("div",{className:d()(y,{"is-multiple":m,"is-single":!m,"has-checked":u.length>0,"is-open":f})},Object(o.createElement)("label",c({className:"screen-reader-text"}),l),Object(o.createElement)(V,{isOpen:f,onClick:function(){return w.current.focus()}},u.map((function(e){var t=v.find((function(t){return t.value===e})),n=function(e){h(e),w.current.focus()};return m?Object(o.createElement)(H,{key:e,onRemoveItem:n,option:t}):Object(o.createElement)(q,{key:e,onClick:function(){return w.current.focus()},onRemoveItem:n,option:t})})),Object(o.createElement)(A,{checked:u,getInputProps:t,inputRef:w,isDisabled:b,onFocus:g,onRemoveItem:function(e){h(e),w.current.focus()},placeholder:u.length>0&&m?null:Object(i.sprintf)(Object(i.__)("Any %s","woo-gutenberg-products-block"),n),tabIndex:!m&&u.length>0?"-1":"0",value:p})),f&&!b&&Object(o.createElement)(M,{checked:u,getItemProps:r,getMenuProps:a,highlightedIndex:s,options:v.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},K=n(247),Q=n(33),W=n.n(Q),J=n(28),$=n(248),X=n(249),Z=n(42),ee=function(e){var t=e.name,n=e.count;return Object(o.createElement)(o.Fragment,null,t,Number.isFinite(n)&&Object(o.createElement)(Z.a,{label:n,screenReaderLabel:Object(i.sprintf)(Object(i._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},te=[{value:"preview-1",name:"Blue",label:Object(o.createElement)(ee,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(o.createElement)(ee,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(o.createElement)(ee,{name:"Red",count:2})}],ne={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(850);function re(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?re(Object(n),!0).forEach((function(t){S()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=t.isPreview&&!t.attributeId?ne:Object($.a)(t.attributeId),u=Object(o.useState)([]),a=f()(u,2),l=a[0],s=a[1],b=Object(o.useState)(t.isPreview&&!t.attributeId?te:[]),d=f()(b,2),p=d[0],g=d[1],m=Object(P.a)(),O=f()(m,1)[0],h=Object(P.b)("attributes",[]),j=f()(h,2),v=j[0],w=j[1],y=Object(C.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[c.id],shouldSelect:t.attributeId>0}),_=y.results,k=y.isLoading,E="dropdown"!==t.displayStyle&&"and"===t.queryType,S=Object(R.a)({queryAttribute:{taxonomy:c.taxonomy,queryType:t.queryType},queryState:ce(ce({},O),{},{attributes:E?O.attributes:null})}),L=S.results,D=S.isLoading,I=Object(o.useCallback)((function(e){return L.attribute_counts?L.attribute_counts.find((function(t){return t.term===e})):null}),[L]);Object(o.useEffect)((function(){if(!k&&!D){var e=_.map((function(e){var n,r=I(e.id);if(!(r||l.includes(e.slug)||(n=e.slug,null!=O&&O.attributes&&O.attributes.some((function(e){var t=e.attribute,r=e.slug,o=void 0===r?[]:r;return t===c.taxonomy&&o.includes(n)})))))return null;var i=r?r.count:0;return{value:e.slug,name:Object(J.decodeEntities)(e.name),label:Object(o.createElement)(ee,{name:Object(J.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);g(e)}}),[c.taxonomy,_,k,t.showCounts,D,I,l,O.attributes]),Object(o.useEffect)((function(){t.showFilterButton||H(l)}),[t.showFilterButton,l,H]);var A=Object(o.useMemo)((function(){return v.filter((function(e){return e.attribute===c.taxonomy})).flatMap((function(e){return e.slug}))}),[v,c.taxonomy]),V=Object(N.a)(A),M=Object(T.a)(V);Object(o.useEffect)((function(){W()(M,V)||W()(l,V)||s(V)}),[l,V,M]);var F=Object(o.useCallback)((function(e){return _.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[_]),H=Object(o.useCallback)((function(e){r||Object(X.b)(v,w,c,F(e),"or"===t.queryType?"in":"and")}),[r,v,w,c,F,t.queryType]),z="dropdown"!==t.displayStyle||"or"===t.queryType,q=Object(o.useCallback)((function(e){var t,n=function(e){return p.find((function(t){return t.value===e})).name},r=function(e){var t=e.filterAdded,r=e.filterRemoved,c=t?n(t):null,o=r?n(r):null;c&&o?Object(x.speak)(Object(i.sprintf)(Object(i.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),c,o)):c?Object(x.speak)(Object(i.sprintf)(Object(i.__)("%s filter added.","woo-gutenberg-products-block"),c)):o&&Object(x.speak)(Object(i.sprintf)(Object(i.__)("%s filter removed.","woo-gutenberg-products-block"),o))},c=l.includes(e);z?(t=l.filter((function(t){return t!==e})),c?r({filterRemoved:e}):(t.push(e),t.sort(),r({filterAdded:e}))):(t=c?[]:[e],r({filterAdded:c?null:e,filterRemoved:1===l.length?l[0]:null}));s(t)}),[l,p,z]);if(0===p.length&&!k)return null;var G="h".concat(t.headingLevel),U=!t.isPreview&&k,Q=!t.isPreview&&D;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(G,null,t.heading),Object(o.createElement)("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?Object(o.createElement)(Y,{attributeLabel:c.label,checked:l,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:U,multiple:z,onChange:q,options:p}):Object(o.createElement)(B,{className:"wc-block-attribute-filter-list",options:p,checked:l,onChange:q,isLoading:U,isDisabled:Q}),t.showFilterButton&&Object(o.createElement)(K.a,{className:"wc-block-attribute-filter__button",disabled:U||Q,onClick:function(){return H(l)}})))},ie=(n(849),Object(m.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=e.debouncedSpeak,c=t.attributeId,u=t.className,l=t.displayStyle,b=t.heading,d=t.headingLevel,p=t.isPreview,E=t.queryType,S=t.showCounts,x=t.showFilterButton,P=Object(o.useState)(!c&&!p),C=f()(P,2),R=C[0],N=C[1],T=function(){N(!1),r(Object(i.__)("Showing Filter Products by Attribute block preview.","woo-gutenberg-products-block"))},L=function(e){if(e&&e.length){var t=e[0].id,r=Object(j.find)(v.c,["attribute_id",t.toString()]);if(r&&c!==t){var o=r.attribute_label;n({attributeId:t,heading:Object(i.sprintf)(Object(i.__)("Filter by %s","woo-gutenberg-products-block"),o)})}}},D=function(){var e={clear:Object(i.__)("Clear selected attribute","woo-gutenberg-products-block"),list:Object(i.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(i.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(i.__)("Search for a product attribute:","woo-gutenberg-products-block"),selected:function(e){return Object(i.sprintf)(Object(i._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e)},updated:Object(i.__)("Product attribute search results updated.","woo-gutenberg-products-block")},t=Object(j.sortBy)(Object(j.toArray)(Object(j.mapValues)(v.c,(function(e){return{id:parseInt(e.attribute_id,10),name:e.attribute_label}}))),"name");return Object(o.createElement)(h.a,{className:"woocommerce-product-attributes",list:t,selected:t.filter((function(e){return e.id===c})),onChange:L,messages:e,isSingle:!0})};return 0===Object.keys(v.c).length?Object(o.createElement)(m.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(i.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(o.createElement)("p",null,Object(i.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woo-gutenberg-products-block")),Object(o.createElement)(m.Button,{className:"wc-block-attribute-filter__add-attribute-button",isSecondary:!0,href:Object(w.getAdminLink)("edit.php?post_type=product&page=product_attributes")},Object(i.__)("Add new attribute","woo-gutenberg-products-block")+" ",Object(o.createElement)(a.a,{srcElement:O.a})),Object(o.createElement)(m.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(i.__)("Learn more","woo-gutenberg-products-block"))):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(g.BlockControls,null,Object(o.createElement)(m.ToolbarGroup,{controls:[{icon:"edit",title:Object(i.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return N(!R)},isActive:R}]})),Object(o.createElement)(g.InspectorControls,{key:"inspector"},Object(o.createElement)(m.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(m.ToggleControl,{label:Object(i.__)("Product count","woo-gutenberg-products-block"),help:S?Object(i.__)("Product count is visible.","woo-gutenberg-products-block"):Object(i.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:S,onChange:function(){return n({showCounts:!S})}}),Object(o.createElement)("p",null,Object(i.__)("Heading Level","woo-gutenberg-products-block")),Object(o.createElement)(y.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:d,onChange:function(e){return n({headingLevel:e})}})),Object(o.createElement)(m.PanelBody,{title:Object(i.__)("Block Settings","woo-gutenberg-products-block")},Object(o.createElement)(k.a,{label:Object(i.__)("Query Type","woo-gutenberg-products-block"),help:"and"===E?Object(i.__)("Products that have all of the selected attributes will be shown.","woo-gutenberg-products-block"):Object(i.__)("Products that have any of the selected attributes will be shown.","woo-gutenberg-products-block"),value:E,options:[{label:Object(i.__)("And","woo-gutenberg-products-block"),value:"and"},{label:Object(i.__)("Or","woo-gutenberg-products-block"),value:"or"}],onChange:function(e){return n({queryType:e})}}),Object(o.createElement)(k.a,{label:Object(i.__)("Display Style","woo-gutenberg-products-block"),value:l,options:[{label:Object(i.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(i.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:function(e){return n({displayStyle:e})}}),Object(o.createElement)(m.ToggleControl,{label:Object(i.__)("Filter button","woo-gutenberg-products-block"),help:x?Object(i.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(i.__)("Products will update as options are selected.","woo-gutenberg-products-block"),checked:x,onChange:function(e){return n({showFilterButton:e})}})),Object(o.createElement)(m.PanelBody,{title:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),initialOpen:!1},D())),R?Object(o.createElement)(m.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(i.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(o.createElement)("div",{className:"wc-block-attribute-filter__selection"},D(),Object(o.createElement)(m.Button,{isPrimary:!0,onClick:T},Object(i.__)("Done","woo-gutenberg-products-block")))):Object(o.createElement)("div",{className:u},Object(o.createElement)(_.a,{headingLevel:d,heading:b,onChange:function(e){return n({heading:e})}}),Object(o.createElement)(m.Disabled,null,Object(o.createElement)(oe,{attributes:t,isEditor:!0}))))})));Object(u.registerBlockType)("woocommerce/attribute-filter",{title:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(a.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Allow customers to filter the grid by product attribute, such as color. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1},example:{attributes:{isPreview:!0}},attributes:{attributeId:{type:"number",default:0},showCounts:{type:"boolean",default:!0},queryType:{type:"string",default:"or"},heading:{type:"string",default:Object(i.__)("Filter by attribute","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3},displayStyle:{type:"string",default:"list"},showFilterButton:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:ie,save:function(e){var t=e.attributes,n=t.className,r=t.showCounts,i=t.queryType,u=t.attributeId,a=t.heading,l=t.headingLevel,s=t.displayStyle,b=t.showFilterButton,p={"data-attribute-id":u,"data-show-counts":r,"data-query-type":i,"data-heading":a,"data-heading-level":l};return"list"!==s&&(p["data-display-style"]=s),b&&(p["data-show-filter-button"]=b),Object(o.createElement)("div",c()({className:d()("is-loading",n)},p),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"}))}})},9:function(e,t){!function(){e.exports=this.React}()},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(18),c=n.n(r),o=n(0),i=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return Object(o.useCallback)((function(e){return t((function(){throw e}))}),[])}},96: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}}});
 
build/blocks-checkout.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-warning'), 'version' => 'dd65885e29f230cfc00bf1387364c18a');
 
build/blocks-checkout.js DELETED
@@ -1,6 +0,0 @@
1
- this.wc=this.wc||{},this.wc.blocksCheckout=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=60)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,n){e.exports=n(30)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},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){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 i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}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){!function(){e.exports=this.wp.data}()},,function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t,n){var r=n(23),o=n(24),i=n(19),a=n(25);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},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){var r=n(51);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},,function(e,t){!function(){e.exports=this.React}()},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(){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.htmlEntities}()},function(e,t,n){var r=n(20);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,n){"use strict";(function(e){var r=n(0),o=(n(42),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(58))},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},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,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}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){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";var r=n(31);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,function(e,t){e.exports=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(){e.exports=this.wp.blocks}()},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){!function(){e.exports=this.wc.priceFormat}()},function(e,t){!function(){e.exports=this.wp.warning}()},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(59);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(11),o=n(33);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},,,,,function(e,t){},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,l=[],u=!1,f=-1;function p(){u&&s&&(u=!1,s.length?l=s.concat(l):f=-1,l.length&&m())}function m(){if(!u){var e=c(p);u=!0;for(var t=l.length;t;){for(s=l,l=[];++f<t;)s&&s[f].run();f=-1,t=l.length}s=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||u||c(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},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";n.r(t),n.d(t,"TotalsItem",(function(){return q})),n.d(t,"Subtotal",(function(){return X})),n.d(t,"TotalsTaxes",(function(){return Q})),n.d(t,"TotalsFees",(function(){return te})),n.d(t,"ShippingRatesControlPackage",(function(){return Ve})),n.d(t,"ExperimentalOrderMeta",(function(){return en})),n.d(t,"ExperimentalOrderShippingPackages",(function(){return an})),n.d(t,"Panel",(function(){return Ee})),n.d(t,"SlotFillProvider",(function(){return pt})),n.d(t,"__EXPERIMENTAL_TOTAL_LABEL_FILTER",(function(){return cn}));var r=n(0),o=n(1),i=n.n(o),a=n(6),c=n.n(a),s=n(17),l=n.n(s),u=n(3),f=n.n(u),p=n(13),m=n.n(p),g=n(15),d=n.n(g);function b(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 h(){return(h=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)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(){}function S(){}S.resetWarningCache=j;var w=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){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:S,resetWarningCache:j};return n.PropTypes=n,n}()}));function E(){}function x(e){return!!(e||"").match(/\d/)}function k(e){return null==e}function _(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function P(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),i=o[0],a=o[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNagation:n,addNegation:r}}function C(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function R(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function F(e,t,n){return Math.min(Math.max(e,t),n)}function N(e){return Math.max(e.selectionStart,e.selectionEnd)}var T={thousandSeparator:w.oneOfType([w.string,w.oneOf([!0])]),decimalSeparator:w.string,allowedDecimalSeparators:w.arrayOf(w.string),thousandsGroupStyle:w.oneOf(["thousand","lakh","wan"]),decimalScale:w.number,fixedDecimalScale:w.bool,displayType:w.oneOf(["input","text"]),prefix:w.string,suffix:w.string,format:w.oneOfType([w.string,w.func]),removeFormatting:w.func,mask:w.oneOfType([w.string,w.arrayOf(w.string)]),value:w.oneOfType([w.number,w.string]),defaultValue:w.oneOfType([w.number,w.string]),isNumericString:w.bool,customInput:w.elementType,allowNegative:w.bool,allowEmptyFormatting:w.bool,allowLeadingZeros:w.bool,onValueChange:w.func,onKeyDown:w.func,onMouseUp:w.func,onChange:w.func,onFocus:w.func,onBlur:w.func,type:w.oneOf(["text","tel","password"]),isAllowed:w.func,renderText:w.func,getInputRef:w.oneOfType([w.func,w.shape({current:w.any})])},D={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:E,onChange:E,onKeyDown:E,onMouseUp:E,onFocus:E,onBlur:E,isAllowed:function(){return!0}},I=function(e){function t(e){var n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,n=!(o=v(t).call(this,e))||"object"!=typeof o&&"function"!=typeof o?O(r):o;var i=e.defaultValue;n.validateProps();var a=n.formatValueProp(i);return n.state={value:a,numAsString:n.removeFormatting(a)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(O(n)),n.onKeyDown=n.onKeyDown.bind(O(n)),n.onMouseUp=n.onMouseUp.bind(O(n)),n.onFocus=n.onFocus.bind(O(n)),n.onBlur=n.onBlur.bind(O(n)),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,i=n.numAsString,a=void 0===i?"":i;if(e!==t){this.validateProps();var c=this.formatNumString(a),s=k(t.value)?c:this.formatValueProp(),l=this.removeFormatting(s),u=parseFloat(l),f=parseFloat(a);(isNaN(u)&&isNaN(f)||u===f)&&c===o&&(null!==r||s===o)||this.updateValue({formattedValue:s,numAsString:l,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),i="-"===e[0];i&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var a=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==a&&(e="".concat(e.substring(0,a),".").concat(e.substring(a+1,e.length).replace(new RegExp(_(r),"g"),""))),i&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,i=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!i||0===o||t||r?"":"|"+_(i)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){R(e,t),setTimeout((function(){e.value===n&&R(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,i=r.suffix,a=r.format;if(""===e)return 0;if(t=F(t,0,e.length),!a){var c="-"===e[0];return F(t,o.length+(c?1:0),e.length-i.length)}if("function"==typeof a)return t;if("#"===a[t]&&x(e[t]))return t;if("#"===a[t-1]&&x(e[t-1]))return t;var s=a.indexOf("#");t=F(t,s,a.lastIndexOf("#")+1);for(var l=a.substring(t,a.length).indexOf("#"),u=t,f=t+(-1===l?0:l);u>s&&("#"!==a[u]||!x(e[u]));)u-=1;return!x(e[f])||"left"===n&&t!==s||t-u<f-t?x(e[u])?u+1:u:f}},{key:"getCaretPosition",value:function(e,t,n){var r,o,i=this.props.format,a=this.state.value,c=this.getNumberRegex(!0),s=(e.match(c)||[]).join(""),l=(t.match(c)||[]).join("");for(r=0,o=0;o<n;o++){var u=e[o]||"",f=t[r]||"";if((u.match(c)||u===f)&&("0"!==u||!f.match(c)||"0"===f||s.length===l.length)){for(;u!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof i||a||(r=t.length),r=this.correctCaretPosition(t,r)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var i="-"===e[0];i&&(e=e.substring(1,e.length));var a=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(o);e=o&&-1!==a&&a===e.length-o.length?e.substring(0,a):e,i&&(e="-"+e)}return e}},{key:"removePatternFormatting",value:function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",o=0,i=t.length;o<=i;o++){var a=t[o]||"",c=o===i?e.length:e.indexOf(a,n);if(-1===c){r=e;break}r+=e.substring(n,c),n=c+a.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,n=0,r=t.split(""),o=0,i=t.length;o<i;o++)"#"===t[o]&&(r[o]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,i=t.suffix,a=t.allowNegative,c=t.thousandsGroupStyle,s=this.getSeparators(),l=s.thousandSeparator,u=s.decimalSeparator,f=-1!==e.indexOf(".")||n&&r,p=P(e,a),m=p.beforeDecimal,g=p.afterDecimal,d=p.addNegation;return void 0!==n&&(g=C(g,n,r)),l&&(m=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(m,l,c)),o&&(m=o+m),i&&(g+=i),d&&(m="-"+m),e=m+(f&&u||"")+g}},{key:"formatNumString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return o=""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,i=t.allowEmptyFormatting,a=this.props,c=a.value,s=a.isNumericString,l=!(c=k(c)?e:c)&&0!==c;return l&&i&&(c=""),l&&!i?"":("number"==typeof c&&(c=c.toString(),s=!0),"Infinity"===c&&s&&(c=""),s&&!n&&"number"==typeof r&&(c=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=P(e),i=o.beforeDecimal,a=o.afterDecimal,c=o.hasNagation,s=parseFloat("0.".concat(a||"0")).toFixed(t).split("."),l=i.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),s[0]),u=C(s[1]||"",Math.min(t,a.length),n),f=r?".":"";return"".concat(c?"-":"").concat(l).concat(f).concat(u)}(c,r,o)),s?this.formatNumString(c):this.formatInput(c))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,i=n.suffix,a=n.decimalScale,c=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-i.length||a&&c&&t[e]===s))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;r<t;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(e,t,n){var r=this.props,o=r.format,i=r.allowNegative,a=r.prefix,c=r.suffix,s=r.decimalScale,l=this.getSeparators(),u=l.allowedDecimalSeparators,f=l.decimalSeparator,p=this.state.numAsString||"",m=this.selectionBeforeInput,g=m.selectionStart,d=m.selectionEnd,b=function(e,t){for(var n=0,r=0,o=e.length,i=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[i-1-r]&&i-r>n&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),h=b.start,v=b.end;if(!o&&h===v&&-1!==u.indexOf(n[g])){var y=0===s?"":f;return n.substr(0,g)+y+n.substr(g+1,n.length)}var O=o?0:a.length,j=t.length-(o?0:c.length);if(n.length>t.length||!n.length||h===v||0===g&&d===t.length||g===O&&d===j)return n;if(this.checkIfFormatGotDeleted(h,v,t)&&(n=t),!o){var S=this.removeFormatting(n),w=P(S,i),E=w.beforeDecimal,x=w.afterDecimal,k=w.addNegation,_=e<n.indexOf(f)+1;if(S.length<p.length&&_&&""===E&&!parseFloat(x))return k?"-":""}return n}},{key:"updateValue",value:function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition,o=void 0===r||r,i=e.numAsString,a=e.caretPos,c=this.props.onValueChange,s=this.state.value;if(n)if(o){if(!a){var l=e.inputValue||n.value,u=N(n);n.value=t,a=this.getCaretPosition(l,t,u)}this.setPatchedCaretPosition(n,a,t)}else n.value=t;void 0===i&&(i=this.removeFormatting(t)),t!==s&&(this.setState({value:t,numAsString:i}),c(this.getValueObject(t,i)))}},{key:"onChange",value:function(e){var t=e.target,n=t.value,r=this.state,o=this.props,i=o.isAllowed,a=r.value||"",c=N(t);n=this.correctInputValue(c,a,n);var s=this.formatInput(n)||"",l=this.removeFormatting(s);i(this.getValueObject(s,l))||(s=a),this.updateValue({formattedValue:s,numAsString:l,inputValue:n,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,i=t.allowLeadingZeros,a=n.numAsString,c=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),!r){isNaN(parseFloat(a))&&(a=""),i||(a=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return"".concat(t?"-":"").concat(r).concat(o?".".concat(o):"")}(a));var s=this.formatNumString(a);if(s!==c)return this.updateValue({formattedValue:s,numAsString:a,input:e.target,setCaretPosition:!1}),void o(e)}o(e)}},{key:"onKeyDown",value:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,i=n.selectionEnd,a=n.value,c=void 0===a?"":a,s=this.props,l=s.decimalScale,u=s.fixedDecimalScale,f=s.prefix,p=s.suffix,m=s.format,g=s.onKeyDown,d=void 0!==l&&u,b=this.getNumberRegex(!1,d),h=new RegExp("-"),v="string"==typeof m;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:i},"ArrowLeft"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(t=o),void 0!==t&&o===i){var y=t,O=v?m.indexOf("#"):f.length,j=v?m.lastIndexOf("#")+1:c.length-p.length;if("ArrowLeft"===r||"ArrowRight"===r){var S="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(c,t,S)}else if("Delete"!==r||b.test(c[t])||h.test(c[t])){if("Backspace"===r&&!b.test(c[t]))if(o<=O+1&&"-"===c[0]&&void 0===m){var w=c.substring(1);this.updateValue({formattedValue:w,caretPos:y,input:n})}else if(!h.test(c[t])){for(;!b.test(c[y-1])&&y>O;)y--;y=this.correctCaretPosition(c,y,"left")}}else for(;!b.test(c[y])&&y<j;)y++;(y!==t||t<O||t>j)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,c)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,c),g(e)}else g(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,i=void 0===o?"":o;if(n===r){var a=this.correctCaretPosition(i,n);a!==n&&this.setPatchedCaretPosition(t,a,i)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,i=n.value,a=void 0===i?"":i,c=t.correctCaretPosition(a,r);c===r||0===r&&o===a.length||t.setPatchedCaretPosition(n,c,a),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.type,i=r.displayType,a=r.customInput,c=r.renderText,s=r.getInputRef,l=r.format,u=this.state.value,f=(e=this.props,t=T,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),p=h({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(l)?"numeric":void 0},f,{type:o,value:u,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===i)return c?c(u)||null:d.a.createElement("span",h({},f,{ref:s}),u);if(a){var m=a;return d.a.createElement(m,h({},p,{ref:s}))}return d.a.createElement("input",h({},p,{ref:s}))}}])&&b(n.prototype,r),o&&b(n,o),t}(d.a.Component);I.propTypes=T,I.defaultProps=D;var A=I;n(52);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 M(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){f()(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}var V=function(e){var t=e.className,n=e.value,o=e.currency,i=e.onValueChange,a=m()(e,["className","value","currency","onValueChange"]);if("-"===n)return null;var s=n/Math.pow(10,o.minorUnit);if(!Number.isFinite(s))return null;var u=c()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),f=M(M(M({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}}(o)),{},{value:void 0,currency:void 0,onValueChange:void 0}),p=i?function(e){var t=e.value*Math.pow(10,o.minorUnit);i(t)}:function(){};return Object(r.createElement)(A,l()({className:u},f,{value:s,onValueChange:p}))},U=(n(50),function(e){var t=e.className,n=e.currency,o=e.label,i=e.value,a=e.description;return Object(r.createElement)("div",{className:c()("wc-block-components-totals-item",t)},Object(r.createElement)("span",{className:"wc-block-components-totals-item__label"},o),Object(r.isValidElement)(i)?Object(r.createElement)("div",{className:"wc-block-components-totals-item__value"},i):Object(r.createElement)(V,{className:"wc-block-components-totals-item__value",currency:n,displayType:"text",value:i}),Object(r.createElement)("div",{className:"wc-block-components-totals-item__description"},a))});U.propTypes={currency:i.a.object,label:i.a.string.isRequired,value:i.a.oneOfType([i.a.number,i.a.node]),className:i.a.string,description:i.a.node};var q=U,B=n(9),W=n(2),K=Object(W.getSetting)("currentUserIsAdmin",!1),G=(Object(W.getSetting)("reviewRatingsEnabled",!0),Object(W.getSetting)("showAvatars",!0),Object(W.getSetting)("max_columns",6),Object(W.getSetting)("min_columns",1),Object(W.getSetting)("default_columns",3),Object(W.getSetting)("max_rows",6),Object(W.getSetting)("min_rows",1),Object(W.getSetting)("default_rows",3),Object(W.getSetting)("min_height",500),Object(W.getSetting)("default_height",500),Object(W.getSetting)("placeholderImgSrc",""),Object(W.getSetting)("thumbnail_size",300),Object(W.getSetting)("isLargeCatalog"),Object(W.getSetting)("limitTags"),Object(W.getSetting)("hasProducts",!0),Object(W.getSetting)("hasTags",!0),Object(W.getSetting)("homeUrl",""),Object(W.getSetting)("couponsEnabled",!0),Object(W.getSetting)("shippingEnabled",!0),Object(W.getSetting)("taxesEnabled",!0)),$=Object(W.getSetting)("displayItemizedTaxes",!1),z=(Object(W.getSetting)("hasDarkEditorStyleSupport",!1),Object(W.getSetting)("displayShopPricesIncludingTax",!1),Object(W.getSetting)("displayCartPricesIncludingTax",!1)),H=(Object(W.getSetting)("productCount",0),Object(W.getSetting)("attributes",[]),Object(W.getSetting)("isShippingCalculatorEnabled",!0),Object(W.getSetting)("isShippingCostHidden",!1),Object(W.getSetting)("woocommerceBlocksPhase",1),Object(W.getSetting)("wcBlocksAssetUrl",""),Object(W.getSetting)("wcBlocksBuildUrl",""),Object(W.getSetting)("shippingCountries",{}),Object(W.getSetting)("allowedCountries",{}),Object(W.getSetting)("shippingStates",{}),Object(W.getSetting)("allowedStates",{}),Object(W.getSetting)("shippingMethodsExist",!1),Object(W.getSetting)("paymentGatewaySortOrder",[]),Object(W.getSetting)("checkoutShowLoginReminder",!0),{id:0,title:"",permalink:""}),Y=Object(W.getSetting)("storePages",{shop:H,cart:H,checkout:H,privacy:H,terms:H}),Z=(Y.shop.permalink,Y.checkout.id,Y.checkout.permalink,Y.privacy.permalink,Y.privacy.title,Y.terms.permalink,Y.terms.title,Y.cart.id,Y.cart.permalink,Object(W.getSetting)("checkoutAllowsGuest",!1),Object(W.getSetting)("checkoutAllowsSignup",!1),Object(W.getSetting)("loginUrl","/wp-login.php"),n(35),function(e){var t=e.currency,n=e.values,o=e.className,i=n.total_items,a=n.total_items_tax,c=parseInt(i,10),s=parseInt(a,10);return Object(r.createElement)(q,{className:o,currency:t,label:Object(B.__)("Subtotal","woo-gutenberg-products-block"),value:z?c+s:c})});Z.propTypes={currency:i.a.object.isRequired,values:i.a.shape({total_items:i.a.string,total_items_tax:i.a.string}).isRequired,className:i.a.string};var X=Z,J=(n(53),function(e){var t=e.currency,n=e.values,o=e.className,i=n.total_tax,a=n.tax_lines;return G?$?Object(r.createElement)(r.Fragment,null,a.map((function(e,n){var o=e.name,i=e.price;return Object(r.createElement)(q,{key:"tax-line-".concat(n),className:"wc-block-components-totals-taxes",currency:t,label:o,value:parseInt(i,10)})}))," "):Object(r.createElement)(q,{className:c()("wc-block-components-totals-taxes",o),currency:t,label:Object(B.__)("Taxes","woo-gutenberg-products-block"),value:parseInt(i,10)}):null});J.propTypes={currency:i.a.object.isRequired,values:i.a.shape({total_tax:i.a.string}).isRequired,className:i.a.string};var Q=J,ee=function(e){var t=e.currency,n=e.cartFees,o=e.className;return Object(r.createElement)(r.Fragment,null,n.map((function(e){var n=e.id,i=e.name,a=e.totals,s=parseInt(a.total,10);if(!s)return null;var l=parseInt(a.total_tax,10);return Object(r.createElement)(q,{key:n,className:c()("wc-block-components-totals-fees",o),currency:t,label:i||Object(B.__)("Fee","woo-gutenberg-products-block"),value:z?s+l:s})})))};ee.propTypes={currency:i.a.object.isRequired,cartFees:i.a.array.isRequired,className:i.a.string};var te=ee,ne=n(18);function re(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 oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ie=function(e){var t,n=e.label,o=e.screenReaderLabel,i=e.wrapperElement,a=e.wrapperProps,s=void 0===a?{}:a,l=null!=n,u=null!=o;return!l&&u?(t=i||"span",s=oe(oe({},s),{},{className:c()(s.className,"screen-reader-text")}),Object(r.createElement)(t,s,o)):(t=i||g.Fragment,l&&u&&n!==o?Object(r.createElement)(t,s,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,s,n))};ie.propTypes={label:i.a.node,screenReaderLabel:i.a.node,wrapperElement:i.a.elementType,wrapperProps:i.a.object};var ae=ie,ce=(n(55),function(e){var t=e.children,n=e.className,o=e.headingLevel,i=m()(e,["children","className","headingLevel"]),a=c()("wc-block-components-title",n),s="h".concat(o);return Object(r.createElement)(s,l()({className:a},i),t)});ce.propTypes={headingLevel:i.a.oneOf(["1","2","3","4","5","6"]).isRequired,className:i.a.string,children:i.a.node};var se=ce,le=n(10),ue=n.n(le),fe=n(29),pe=n.n(fe),me=n(7),ge=n(22),de=function(){var e,t,n=(e=Object(r.useState)(),t=ue()(e,2)[1],Object(r.useCallback)((function(e){return t((function(){throw e}))}),[])),o=Object(me.useDispatch)(ge.CART_STORE_KEY).selectShippingRate;return{selectShippingRate:Object(r.useCallback)((function(e,t){o(e,t).catch((function(e){n(e)}))}),[n,o]),isSelectingRate:Object(me.useSelect)((function(e){return e(ge.CART_STORE_KEY).isShippingRateBeingSelected()}),[])}},be=function(e){var t;return null===(t=e.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,o=m()(e,["srcElement","size"]);return Object(g.isValidElement)(t)&&Object(g.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},o))}ve.propTypes={srcElement:i.a.element,size:i.a.number};var ye=ve,Oe=n(72),je=Object(r.createElement)(Oe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{d:"M12 8l-6 5.4 1 1.2 5-4.6 5 4.6 1-1.2z"})),Se=Object(r.createElement)(Oe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),we=(n(57),function(e){var t=e.children,n=e.className,o=e.initialOpen,i=void 0!==o&&o,a=e.hasBorder,s=void 0!==a&&a,l=e.title,u=e.titleTag,f=void 0===u?"div":u,p=Object(r.useState)(i),m=ue()(p,2),g=m[0],d=m[1];return Object(r.createElement)("div",{className:c()(n,"wc-blocks-components-panel",{"has-border":s})},Object(r.createElement)(f,null,Object(r.createElement)("button",{"aria-expanded":g,className:"wc-blocks-components-panel__button",onClick:function(){return d(!g)}},Object(r.createElement)(ye,{"aria-hidden":"true",className:"wc-blocks-components-panel__button-icon",srcElement:g?je:Se}),l)),Object(r.createElement)("div",{className:"wc-blocks-components-panel__content",hidden:!g},t))});we.propTypes={className:i.a.string,hasBorder:i.a.bool,initialOpen:i.a.bool,title:i.a.node,titleTag:i.a.string};var Ee=we;function xe(){return(xe=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)}var ke=n(5);var _e=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(ke.upperFirst)(Object(ke.camelCase)(t)),"(").concat(i,")"),r}},Pe=new WeakMap;function Ce(e,t){return Object(r.useMemo)((function(){var n=function(e){var t=Pe.get(e)||0;return Pe.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}var Re=_e((function(e){return function(t){var n=Ce(e);return Object(r.createElement)(e,xe({},t,{instanceId:n}))}}),"withInstanceId"),Fe=function(e){var t=e.label,n=e.secondaryLabel,o=e.description,i=e.secondaryDescription,a=e.id;return Object(r.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(r.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(r.createElement)("span",{id:a?"".concat(a,"__label"):null,className:"wc-block-components-radio-control__label"},t),n&&Object(r.createElement)("span",{id:a?"".concat(a,"__secondary-label"):null,className:"wc-block-components-radio-control__secondary-label"},n)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},o&&Object(r.createElement)("span",{id:a?"".concat(a,"__description"):null,className:"wc-block-components-radio-control__description"},o),i&&Object(r.createElement)("span",{id:a?"".concat(a,"__secondary-description"):null,className:"wc-block-components-radio-control__secondary-description"},i)))},Ne=function(e){var t,n=e.checked,o=e.name,i=e.onChange,a=e.option,s=a.value,l=a.label,u=a.description,p=a.secondaryLabel,m=a.secondaryDescription;return Object(r.createElement)("label",{className:c()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":n}),htmlFor:"".concat(o,"-").concat(s)},Object(r.createElement)("input",{id:"".concat(o,"-").concat(s),className:"wc-block-components-radio-control__input",type:"radio",name:o,value:s,onChange:function(e){return i(e.target.value)},checked:n,"aria-describedby":c()((t={},f()(t,"".concat(o,"-").concat(s,"__label"),l),f()(t,"".concat(o,"-").concat(s,"__secondary-label"),p),f()(t,"".concat(o,"-").concat(s,"__description"),u),f()(t,"".concat(o,"-").concat(s,"__secondary-description"),m),t))}),Object(r.createElement)(Fe,{id:"".concat(o,"-").concat(s),label:l,secondaryLabel:p,description:u,secondaryDescription:m}))},Te=(n(56),Re((function(e){var t=e.className,n=e.instanceId,o=e.id,i=e.selected,a=e.onChange,s=e.options,l=void 0===s?[]:s,u=o||n;return l.length&&Object(r.createElement)("div",{className:c()("wc-block-components-radio-control",t)},l.map((function(e){return Object(r.createElement)(Ne,{key:"".concat(u,"-").concat(e.value),name:"radio-control-".concat(u),checked:e.value===i,option:e,onChange:function(t){a(t),"function"==typeof e.onChange&&e.onChange(t)}})})))}))),De=n(41),Ie=function(e){var t=z?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(ne.decodeEntities)(e.name),value:e.rate_id,description:Object(r.createElement)(r.Fragment,null,Number.isFinite(t)&&Object(r.createElement)(V,{currency:Object(De.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(ne.decodeEntities)(e.delivery_time))}},Ae=function(e){var t=e.className,n=e.noResultsMessage,o=e.onSelectRate,i=e.rates,a=e.renderOption,c=void 0===a?Ie:a,s=e.selected;if(0===i.length)return n;if(i.length>1)return Object(r.createElement)(Te,{className:t,onChange:function(e){o(e)},selected:s,options:i.map(c)});var l=c(i[0]),u=l.label,f=l.secondaryLabel,p=l.description,m=l.secondaryDescription;return Object(r.createElement)(Fe,{label:u,secondaryLabel:f,description:p,secondaryDescription:m})};Ae.propTypes={onSelectRate:i.a.func.isRequired,rates:i.a.arrayOf(i.a.object).isRequired,renderOption:i.a.func,className:i.a.string,noResultsMessage:i.a.node,selected:i.a.string};var Le=Ae,Me=(n(54),function(e){var t=e.packageId,n=e.className,o=e.noResultsMessage,i=e.renderOption,a=e.packageData,s=e.collapsible,l=void 0!==s&&s,u=e.collapse,f=void 0!==u&&u,p=e.showItems,m=void 0!==p&&p,g=function(e,t){var n=de(),o=n.selectShippingRate,i=n.isSelectingRate,a=Object(r.useState)((function(){return be(t)})),c=ue()(a,2),s=c[0],l=c[1],u=Object(r.useRef)(t);return Object(r.useEffect)((function(){pe()(u.current,t)||(u.current=t,l(be(t)))}),[t]),{selectShippingRate:Object(r.useCallback)((function(t){l(t),o(t,e)}),[e,o]),selectedShippingRate:s,isSelectingRate:i}}(t,a.shipping_rates),d=g.selectShippingRate,b=g.selectedShippingRate,h=Object(r.createElement)(r.Fragment,null,(m||l)&&Object(r.createElement)(se,{className:"wc-block-components-shipping-rates-control__package-title",headingLevel:"3"},a.name),m&&Object(r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(a.items).map((function(e){var t=Object(ne.decodeEntities)(e.name),n=e.quantity;return Object(r.createElement)("li",{key:t,className:"wc-block-components-shipping-rates-control__package-item"},Object(r.createElement)(ae,{label:n>1?"".concat(t," × ").concat(n):"".concat(t),screenReaderLabel:Object(B.sprintf)(Object(B._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))})))),v=Object(r.createElement)(Le,{className:n,noResultsMessage:o,rates:a.shipping_rates,onSelectRate:d,selected:b,renderOption:i});return l?Object(r.createElement)(Ee,{className:"wc-block-components-shipping-rates-control__package",hasBorder:!0,initialOpen:!f,title:h},v):Object(r.createElement)("div",{className:c()("wc-block-components-shipping-rates-control__package",n)},h,v)});Me.propTypes={renderOption:i.a.func,packageData:i.a.shape({shipping_rates:i.a.arrayOf(i.a.object).isRequired,items:i.a.arrayOf(i.a.shape({name:i.a.string.isRequired,key:i.a.string.isRequired,quantity:i.a.number.isRequired}).isRequired).isRequired}).isRequired,className:i.a.string,collapsible:i.a.bool,noResultsMessage:i.a.node,showItems:i.a.bool};var Ve=Me;function Ue(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Be(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 We(e,t,n){return t&&Be(e.prototype,t),n&&Be(e,n),e}function Ke(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ge(e){return(Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $e(e,t,n){return($e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ge(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function He(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&&ze(e,t)}function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ze(e,t){return!t||"object"!==Ye(t)&&"function"!=typeof t?Ke(e):t}function Xe(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 Je(e,t){if(e){if("string"==typeof e)return Xe(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)?Xe(e,t):void 0}}function Qe(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,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(e,t)||Je(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 et(e){return function(e){if(Array.isArray(e))return Xe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Je(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 tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nt=n(21);function rt(e){var t=function(e,t){if("object"!==Ye(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ye(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ye(t)?t:String(t)}function ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(n),!0).forEach((function(t){tt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function at(e){var t,n,o,i,a,c,s,l,u,f,p,m=e.children,g=(t=Qe(Object(r.useState)({}),2),n=t[0],o=t[1],i=Qe(Object(r.useState)({}),2),a=i[0],c=i[1],s=Object(r.useCallback)((function(e,t,n){o((function(r){var o=r[e]||{};return it(it({},r),{},tt({},e,it(it({},o),{},{ref:t||o.ref,fillProps:n||o.fillProps||{}})))}))}),[]),l=Object(r.useCallback)((function(e,t){o((function(n){var r=n[e],o=Ue(n,[e].map(rt));return(null==r?void 0:r.ref)===t?o:n}))}),[]),u=Object(r.useCallback)((function(e,t){var r=n[e];if(r&&!pe()(r.fillProps,t)){r.fillProps=t;var o=a[e];o&&o.map((function(e){return e.current.rerender()}))}}),[n,a]),f=Object(r.useCallback)((function(e,t){c((function(n){return it(it({},n),{},tt({},e,[].concat(et(n[e]||[]),[t])))}))}),[]),p=Object(r.useCallback)((function(e,t){c((function(n){return n[e]?it(it({},n),{},tt({},e,n[e].filter((function(e){return e!==t})))):n}))}),[]),Object(r.useMemo)((function(){return{slots:n,fills:a,registerSlot:s,updateSlot:u,unregisterSlot:l,registerFill:f,unregisterFill:p}}),[n,a,s,u,l,f,p]));return Object(r.createElement)(nt.a.Provider,{value:g},m)}function ct(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=Ge(e);if(t){var o=Ge(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ze(this,n)}}var st=Object(r.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),lt=st.Provider,ut=st.Consumer,ft=function(e){He(n,e);var t=ct(n);function n(){var e;return qe(this,n),(e=t.apply(this,arguments)).registerSlot=e.registerSlot.bind(Ke(e)),e.registerFill=e.registerFill.bind(Ke(e)),e.unregisterSlot=e.unregisterSlot.bind(Ke(e)),e.unregisterFill=e.unregisterFill.bind(Ke(e)),e.getSlot=e.getSlot.bind(Ke(e)),e.getFills=e.getFills.bind(Ke(e)),e.hasFills=e.hasFills.bind(Ke(e)),e.subscribe=e.subscribe.bind(Ke(e)),e.slots={},e.fills={},e.listeners=[],e.contextValue={registerSlot:e.registerSlot,unregisterSlot:e.unregisterSlot,registerFill:e.registerFill,unregisterFill:e.unregisterFill,getSlot:e.getSlot,getFills:e.getFills,hasFills:e.hasFills,subscribe:e.subscribe},e}return We(n,[{key:"registerSlot",value:function(e,t){var n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}},{key:"registerFill",value:function(e,t){this.fills[e]=[].concat(et(this.fills[e]||[]),[t]),this.forceUpdateSlot(e)}},{key:"unregisterSlot",value:function(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}},{key:"unregisterFill",value:function(e,t){this.fills[e]=Object(ke.without)(this.fills[e],t),this.resetFillOccurrence(e),this.forceUpdateSlot(e)}},{key:"getSlot",value:function(e){return this.slots[e]}},{key:"getFills",value:function(e,t){return this.slots[e]!==t?[]:Object(ke.sortBy)(this.fills[e],"occurrence")}},{key:"hasFills",value:function(e){return this.fills[e]&&!!this.fills[e].length}},{key:"resetFillOccurrence",value:function(e){Object(ke.forEach)(this.fills[e],(function(e){e.occurrence=void 0}))}},{key:"forceUpdateSlot",value:function(e){var t=this.getSlot(e);t&&t.forceUpdate()}},{key:"triggerListeners",value:function(){this.listeners.forEach((function(e){return e()}))}},{key:"subscribe",value:function(e){var t=this;return this.listeners.push(e),function(){t.listeners=Object(ke.without)(t.listeners,e)}}},{key:"render",value:function(){return Object(r.createElement)(lt,{value:this.contextValue},Object(r.createElement)(at,null,this.props.children))}}]),n}(r.Component),pt=ft;function mt(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=Ge(e);if(t){var o=Ge(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ze(this,n)}}var gt=function(e){He(n,e);var t=mt(n);function n(){var e;return qe(this,n),(e=t.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(Ke(e)),e}return We(n,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(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:"forceUpdate",value:function(){this.isUnmounted||$e(Ge(n.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,o=e.fillProps,i=void 0===o?{}:o,a=e.getFills,c=Object(ke.map)(a(n,this),(function(e){var t=e.occurrence,n=Object(ke.isFunction)(e.children)?e.children(i):e.children;return r.Children.map(n,(function(e,n){if(!e||Object(ke.isString)(e))return e;var o="".concat(t,"---").concat(e.key||n);return Object(r.cloneElement)(e,{key:o})}))})).filter(Object(ke.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(ke.isFunction)(t)?t(c):c)}}]),n}(r.Component),dt=function(e){return Object(r.createElement)(ut,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,i=t.getFills;return Object(r.createElement)(gt,xe({},e,{registerSlot:n,unregisterSlot:o,getFills:i}))}))},bt=0;function ht(e){var t=e.name,n=e.children,o=e.registerFill,i=e.unregisterFill,a=function(e){var t=Object(r.useContext)(st),n=t.getSlot,o=t.subscribe,i=Qe(Object(r.useState)(n(e)),2),a=i[0],c=i[1];return Object(r.useEffect)((function(){return c(n(e)),o((function(){c(n(e))}))}),[e]),a}(t),c=Object(r.useRef)({name:t,children:n});return c.current.occurrence||(c.current.occurrence=++bt),Object(r.useLayoutEffect)((function(){return o(t,c.current),function(){return i(t,c.current)}}),[]),Object(r.useLayoutEffect)((function(){c.current.children=n,a&&a.forceUpdate()}),[n]),Object(r.useLayoutEffect)((function(){t!==c.current.name&&(i(c.current.name,c.current),c.current.name=t,o(t,c.current))}),[t]),a&&a.node?(Object(ke.isFunction)(n)&&(n=n(a.props.fillProps)),Object(r.createPortal)(n,a.node)):null}var vt=function(e){return Object(r.createElement)(ut,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(r.createElement)(ht,xe({},e,{registerFill:n,unregisterFill:o}))}))};function yt(e){var t=e.name,n=e.fillProps,o=void 0===n?{}:n,i=e.as,a=void 0===i?"div":i,c=Ue(e,["name","fillProps","as"]),s=Object(r.useContext)(nt.a),l=Object(r.useRef)();return Object(r.useLayoutEffect)((function(){return s.registerSlot(t,l,o),function(){s.unregisterSlot(t,l)}}),[s.registerSlot,s.unregisterSlot,t]),Object(r.useLayoutEffect)((function(){s.updateSlot(t,o)})),Object(r.createElement)(a,xe({ref:l},c))}function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){tt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function St(e){var t=Object(r.useContext)(nt.a),n=t.slots[e]||{},o=t.fills[e],i=Object(r.useMemo)((function(){return o||[]}),[o]),a=Object(r.useCallback)((function(n){t.updateSlot(e,n)}),[e,t.updateSlot]),c=Object(r.useCallback)((function(n){t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),s=Object(r.useCallback)((function(n){t.registerFill(e,n)}),[e,t.registerFill]),l=Object(r.useCallback)((function(n){t.unregisterFill(e,n)}),[e,t.unregisterFill]);return jt(jt({},n),{},{updateSlot:a,unregisterSlot:c,fills:i,registerFill:s,unregisterFill:l})}function wt(e){var t,n=e.name,o=e.children,i=St(n),a=Object(r.useRef)({rerender:(t=Qe(Object(r.useState)({}),2)[1],function(){return t({})})});return Object(r.useEffect)((function(){return i.registerFill(a),function(){i.unregisterFill(a)}}),[i.registerFill,i.unregisterFill]),i.ref&&i.ref.current?("function"==typeof o&&(o=o(i.fillProps)),Object(r.createPortal)(o,i.ref.current)):null}function Et(e){var t=e.bubblesVirtually,n=Ue(e,["bubblesVirtually"]);return t?Object(r.createElement)(yt,n):Object(r.createElement)(dt,n)}function xt(e){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(vt,e),Object(r.createElement)(wt,e))}function kt(e){var t=function(t){return Object(r.createElement)(xt,xe({name:e},t))};t.displayName=e+"Fill";var n=function(t){return Object(r.createElement)(Et,xe({name:e},t))};return n.displayName=e+"Slot",{Fill:t,Slot:n}}var _t=Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),Pt=function(){return Object(r.useContext)(_t)};function Ct(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 Rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ft={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},Nt=Rt(Rt({},Ft),{},{email:"",phone:""}),Tt=function(e){return Object(ke.mapValues)(e,(function(e){return Object(ne.decodeEntities)(e)}))},Dt={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:Nt,shippingAddress:Ft,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},It=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Pt(),n=t.isEditor,r=t.previewData,o=(null==r?void 0:r.previewCart)||{},i=e.shouldSelect,a=Object(me.useSelect)((function(e,t){var r=t.dispatch;if(!i)return Dt;if(n)return{cartCoupons:o.coupons,cartItems:o.items,cartFees:o.fees,cartItemsCount:o.items_count,cartItemsWeight:o.items_weight,cartNeedsPayment:o.needs_payment,cartNeedsShipping:o.needs_shipping,cartItemErrors:[],cartTotals:o.totals,cartIsLoading:!1,cartErrors:[],billingAddress:Nt,shippingAddress:Ft,extensions:{},shippingRates:o.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:o.has_calculated_shipping,paymentRequirements:o.paymentRequirements,receiveCart:"function"==typeof(null==o?void 0:o.receiveCart)?o.receiveCart:function(){}};var a=e(ge.CART_STORE_KEY),c=a.getCartData(),s=a.getCartErrors(),l=a.getCartTotals(),u=!a.hasFinishedResolution("getCartData"),f=a.isCustomerDataUpdating(),p=r(ge.CART_STORE_KEY).receiveCart,m=Tt(c.billingAddress),g=c.needsShipping?Tt(c.shippingAddress):m;return{cartCoupons:c.coupons,cartItems:c.items||[],cartFees:c.fees||[],cartItemsCount:c.itemsCount,cartItemsWeight:c.itemsWeight,cartNeedsPayment:c.needsPayment,cartNeedsShipping:c.needsShipping,cartItemErrors:c.errors||[],cartTotals:l,cartIsLoading:u,cartErrors:s,billingAddress:m,shippingAddress:g,extensions:c.extensions||{},shippingRates:c.shippingRates||[],shippingRatesLoading:f,cartHasCalculatedShipping:c.hasCalculatedShipping,paymentRequirements:c.paymentRequirements||[],receiveCart:p}}),[i]);return a},At=n(16),Lt=n.n(At),Mt=n(43),Vt=n.n(Mt),Ut=n(33),qt=n.n(Ut),Bt=n(44),Wt=n.n(Bt),Kt=n(45),Gt=n.n(Kt),$t=n(36),zt=n.n($t);function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zt()(e);if(t){var o=zt()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Gt()(this,n)}}var Yt=function(e){Wt()(n,e);var t=Ht(n);function n(){var e;Lt()(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),f()(qt()(e),"state",{errorMessage:"",hasError:!1}),e}return Vt()(n,[{key:"render",value:function(){var e=this.props.renderError,t=this.state,n=t.errorMessage;return t.hasError?"function"==typeof e?e(n):Object(r.createElement)("p",null,n):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("strong",null,e.status),": "+e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(g.Component),Zt=kt("__experimentalOrderMeta"),Xt=Zt.Fill,Jt=Zt.Slot;function Qt(e){var t=e.children;return Object(r.createElement)(Xt,null,(function(e){return r.Children.map(t,(function(t){return Object(r.createElement)(Yt,{renderError:K?null:function(){return null}},Object(r.cloneElement)(t,e))}))}))}Qt.Slot=function(e){var t=e.className,n=It(),o=n.extensions,i=(n.receiveCart,m()(n,["extensions","receiveCart"]));return Object(r.createElement)(Jt,{bubblesVirtually:!0,className:c()(t,"wc-block-components-order-meta"),fillProps:{extensions:o,cart:i}})};var en=Qt,tn=kt("__experimentalOrderShippingPackages"),nn=tn.Fill,rn=tn.Slot;function on(e){var t=e.children;return Object(r.createElement)(nn,null,(function(e){return r.Children.map(t,(function(t){return Object(r.createElement)(Yt,{renderError:K?null:function(){return null}},Object(r.cloneElement)(t,e))}))}))}on.Slot=function(e){var t=e.className,n=e.collapsible,o=e.noResultsMessage,i=e.renderOption,a=It(),s=a.extensions,l=(a.receiveCart,m()(a,["extensions","receiveCart"])),u=St("__experimentalOrderShippingPackages").fills.length>1;return Object(r.createElement)(rn,{bubblesVirtually:!0,className:c()("wc-block-components-shipping-rates-control",t),fillProps:{collapsible:n,collapse:u,showItems:u,noResultsMessage:o,renderOption:i,extensions:s,cart:l}})};var an=on,cn="wcBlocks.__experimental_total_label_filter"},,,,,,,,,,,,function(e,t){!function(){e.exports=this.wp.primitives}()}]);
 
 
 
 
 
 
build/blocks.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-blocks', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '8c11fce502715183760f2bff5a7a4128');
 
build/blocks.js DELETED
@@ -1 +0,0 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(t){function e(e){for(var r,i,s=e[0],u=e[1],a=e[2],f=0,p=[];f<s.length;f++)i=s[f],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(t[r]=u[r]);for(l&&l(e);p.length;)p.shift()();return c.push.apply(c,a||[]),n()}function n(){for(var t,e=0;e<c.length;e++){for(var n=c[e],r=!0,s=1;s<n.length;s++){var u=n[s];0!==o[u]&&(r=!1)}r&&(c.splice(e--,1),t=i(i.s=n[0]))}return t}var r={},o={19:0},c=[];function i(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=s.push.bind(s);s.push=e,s=s.slice();for(var a=0;a<s.length;a++)e(s[a]);var l=u;return c.push([896,0]),n()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},23:function(t,e){!function(){t.exports=this.wp.blocks}()},31:function(t,e){!function(){t.exports=this.wp.primitives}()},54:function(t,e,n){"use strict";var r=n(5),o=n.n(r),c=n(24),i=n.n(c),s=n(9);n(2);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}e.a=function(t){var e=t.srcElement,n=t.size,r=void 0===n?24:n,c=i()(t,["srcElement","size"]);return Object(s.isValidElement)(e)&&Object(s.cloneElement)(e,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({width:r,height:r},c))}},561:function(t,e){},562:function(t,e){},58:function(t,e){!function(){t.exports=this.wp.hooks}()},7:function(t,e){!function(){t.exports=this.lodash}()},896:function(t,e,n){"use strict";n.r(e);var r=n(30),o=n.n(r),c=n(0),i=n(23),s=n(1),u=n(54),a=n(11),l=n.n(a),f=n(24),p=n.n(f),b=n(31),h=n(8),m=n.n(h),d=Object(c.createElement)((function(t){var e=t.className,n=t.height,r=t.width,o=p()(t,["className","height","width"]);return Object(c.createElement)(b.SVG,l()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 245 145",className:m()("woo-icon",e),width:r,height:n},o),Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))}),null),w=Object(c.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M12 11a1 1 0 011 1 1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1M4.2 4.2c1.5-1.4 4.5-.8 7.8 1.4 3.3-2.2 6.4-2.8 7.8-1.4 1.4 1.5.8 4.5-1.4 7.8 2.2 3.3 2.8 6.4 1.4 7.8-1.4 1.4-4.6.8-7.8-1.4-3.3 2.2-6.3 2.8-7.8 1.4-1.4-1.4-.8-4.6 1.4-7.8-2.2-3.3-2.8-6.3-1.4-7.8m11.3 4.3a29 29 0 011.7 1.8c1.4-2 2-4 1.2-4.7-.8-.7-2.6-.2-4.7 1.2l1.8 1.7m-7 7a29 29 0 01-1.7-1.8c-1.4 2-2 4-1.2 4.7.8.7 2.6.2 4.7-1.2a29 29 0 01-1.8-1.7M5.6 5.6c-.7.8-.2 2.6 1.2 4.7a29 29 0 013.5-3.5c-2-1.4-4-2-4.7-1.2m4.3 8.5l2.1 2a28.1 28.1 0 004-4.1 28.1 28.1 0 00-4-4 28.1 28.1 0 00-4 4l1.9 2.1m8.5 4.3c.7-.8.2-2.6-1.2-4.7a29 29 0 01-3.5 3.5c2 1.4 4 2 4.7 1.2z"})),v=(n(561),n(562),n(14)),O=n.n(v),g=n(15),y=n.n(g),j=n(12),k=n.n(j),E=n(16),x=n.n(E),P=n(17),D=n.n(P),M=n(10),W=n.n(M),z=n(5),A=n.n(z),S=n(139),_=n(58);function B(t){var e=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(t){return!1}}();return function(){var n,r=W()(t);if(e){var o=W()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return D()(this,n)}}var C=Object(S.a)((function(t){return function(e){x()(r,e);var n=B(r);function r(){var t;O()(this,r);for(var e=arguments.length,o=new Array(e),c=0;c<e;c++)o[c]=arguments[c];return t=n.call.apply(n,[this].concat(o)),A()(k()(t),"mounted",!1),t}return y()(r,[{key:"componentDidMount",value:function(){var t=this.props,e=t.block,n=t.setAttributes;e.name.startsWith("woocommerce/")&&n(this.getAttributesWithDefaults())}},{key:"componentDidUpdate",value:function(){this.props.block.name.startsWith("woocommerce/")&&!this.mounted&&(this.mounted=!0)}},{key:"getAttributesWithDefaults",value:function(){var t=Object(i.getBlockType)(this.props.block.name),e=this.props.attributes;return!this.mounted&&this.props.block.name.startsWith("woocommerce/")&&void 0!==t.attributes&&void 0!==t.defaults&&(e=Object.assign({},this.props.attributes||{}),Object.keys(t.attributes).map((function(n){return void 0===e[n]&&void 0!==t.defaults[n]&&(e[n]=t.defaults[n]),n}))),e}},{key:"render",value:function(){return Object(c.createElement)(t,l()({},this.props,{attributes:this.getAttributesWithDefaults()}))}}]),r}(c.Component)}),"withDefaultAttributes");Object(_.addFilter)("editor.BlockListBlock","woocommerce-blocks/block-list-block",C);Object(_.addFilter)("blocks.getBlockAttributes","woocommerce-blocks/get-block-attributes",(function(t,e){return e.name.startsWith("woocommerce/")&&Object.keys(e.attributes).map((function(n){return void 0===t[n]&&void 0!==e.defaults&&void 0!==e.defaults[n]&&(t[n]=e.defaults[n]),n})),t})),Object(i.setCategories)([].concat(o()(Object(i.getCategories)().filter((function(t){var e=t.slug;return"woocommerce"!==e&&"woocommerce-product-elements"!==e}))),[{slug:"woocommerce",title:Object(s.__)("WooCommerce","woo-gutenberg-products-block"),icon:Object(c.createElement)(u.a,{srcElement:d})},{slug:"woocommerce-product-elements",title:Object(s.__)("WooCommerce Product Elements","woo-gutenberg-products-block"),icon:Object(c.createElement)(u.a,{srcElement:w,style:{fill:"#874FB9"}})}]))},9:function(t,e){!function(){t.exports=this.React}()}});
 
build/cart-frontend.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-warning', 'wp-wordcount'), 'version' => '43bc8802df1a6ea2b4e84f157a408605');
 
build/cart-frontend.js DELETED
@@ -1,14 +0,0 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=230)}([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,n){e.exports=n(71)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},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 a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}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,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){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,"u",(function(){return c})),n.d(t,"y",(function(){return a})),n.d(t,"r",(function(){return i})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"z",(function(){return f})),n.d(t,"l",(function(){return p})),n.d(t,"k",(function(){return d})),n.d(t,"c",(function(){return b})),n.d(t,"n",(function(){return m})),n.d(t,"C",(function(){return h})),n.d(t,"D",(function(){return v})),n.d(t,"v",(function(){return y})),n.d(t,"a",(function(){return O})),n.d(t,"w",(function(){return j})),n.d(t,"b",(function(){return E})),n.d(t,"q",(function(){return w})),n.d(t,"g",(function(){return S})),n.d(t,"x",(function(){return R})),n.d(t,"h",(function(){return P})),n.d(t,"t",(function(){return C})),n.d(t,"s",(function(){return x})),n.d(t,"B",(function(){return I})),n.d(t,"A",(function(){return N})),n.d(t,"d",(function(){return T})),n.d(t,"e",(function(){return M})),n.d(t,"f",(function(){return D})),n.d(t,"p",(function(){return A})),n.d(t,"E",(function(){return L}));var r=n(4),o=Object(r.getSetting)("currentUserIsAdmin",!1),c=Object(r.getSetting)("reviewRatingsEnabled",!0),a=Object(r.getSetting)("showAvatars",!0),i=(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),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),d=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),m=Object(r.getSetting)("isShippingCalculatorEnabled",!0),g=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),h=Object(r.getSetting)("wcBlocksAssetUrl",""),v=Object(r.getSetting)("wcBlocksBuildUrl",""),y=Object(r.getSetting)("shippingCountries",{}),O=Object(r.getSetting)("allowedCountries",{}),j=Object(r.getSetting)("shippingStates",{}),E=Object(r.getSetting)("allowedStates",{}),w=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),S=Object(r.getSetting)("checkoutShowLoginReminder",!0),_={id:0,title:"",permalink:""},k=Object(r.getSetting)("storePages",{shop:_,cart:_,checkout:_,privacy:_,terms:_}),R=k.shop.permalink,P=(k.checkout.id,k.checkout.permalink),C=k.privacy.permalink,x=k.privacy.title,I=k.terms.permalink,N=k.terms.title,T=(k.cart.id,k.cart.permalink),M=Object(r.getSetting)("checkoutAllowsGuest",!1),D=Object(r.getSetting)("checkoutAllowsSignup",!1),A=Object(r.getSetting)("loginUrl","/wp-login.php"),L=(n(40),function(){return g>1})},function(e,t,n){var r=n(82),o=n(83),c=n(59),a=n(84);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||a()}},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(61);e.exports=function(e,t){if(null==e)return{};var n,o,c=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[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,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(56);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 a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.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,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(23);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[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,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){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(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},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 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){!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){!function(){e.exports=this.wp.primitives}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(50);var o=n(56);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){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(70);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(27),o=n(20);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){!function(){e.exports=this.wc.blocksCheckout}()},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=(n(3),n(2)),a=n(5),i=n.n(a);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,a=e.wrapperProps,u=void 0===a?{}:a,l=null!=n,f=null!=r;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:i()(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,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n(21),c=n.n(o),a=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){!function(){e.exports=this.wp.dom}()},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";var r=n(31),o=n.n(r),c=n(32),a=n.n(c),i=n(20),u=n.n(i),s=n(33),l=n.n(s),f=n(34),p=n.n(f),d=n(24),b=n.n(d),m=n(7),g=n.n(m),h=(n(3),n(2)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.C,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,c=e.text,a=void 0===c?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,i=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),a&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},a),i&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",i)))};n(73);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=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var E=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),a=0;a<r;a++)c[a]=arguments[a];return e=t.call.apply(t,[this].concat(c)),g()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,a=e.renderError,i=this.state,u=i.errorMessage;return i.hasError?"function"==typeof a?a({errorMessage:u}):React.createElement(O,{errorMessage:r?u: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(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(h.Component);E.defaultProps={showErrorMessage:!0};t.a=E},function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(58),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(74))},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(7),a=n.n(c),i=n(14),u=n.n(i),s=n(102),l=n(5),f=n.n(l);n(125);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.className,n=e.value,r=e.currency,c=e.onValueChange,a=u()(e,["className","value","currency","onValueChange"]);if("-"===n)return null;var i=n/Math.pow(10,r.minorUnit);if(!Number.isFinite(i))return null;var l=f()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),p=d(d(d({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}}(r)),{},{value:void 0,currency:void 0,onValueChange:void 0}),b=c?function(e){var t=e.value*Math.pow(10,r.minorUnit);c(t)}:function(){};return React.createElement(s.a,o()({className:l},p,{value:i,onValueChange:b}))}},function(e,t){!function(){e.exports=this.wc.priceFormat}()},function(e,t,n){var r=n(95),o=n(96),c=n(59),a=n(97);e.exports=function(e){return r(e)||o(e)||c(e)||a()}},function(e,t){function n(e,t,n,r,o,c,a){try{var i=e[c](a),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var a=e.apply(t,r);function i(e){n(a,o,c,i,u,"next",e)}function u(e){n(a,o,c,i,u,"throw",e)}i(void 0)}))}}},,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.apiFetch}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},,,function(e,t){!function(){e.exports=this.wp.deprecated}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(16),o=n(0);function c(e){var t=Object(o.useState)((function(){return!(!e||"undefined"==typeof window||!window.matchMedia(e).matches)})),n=Object(r.a)(t,2),c=n[0],a=n[1];return Object(o.useEffect)((function(){if(e){var t=function(){return a(window.matchMedia(e).matches)};t();var n=window.matchMedia(e);return n.addListener(t),function(){n.removeListener(t)}}}),[e]),e&&c}},function(e,t){!function(){e.exports=this.wp.warning}()},function(e,t,n){var r=n(60);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,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(10),o=n.n(r),c=n(0),a=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){return t((function(){throw e}))}),[])}},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,"b",(function(){return M})),n.d(t,"a",(function(){return D}));var r=n(7),o=n.n(r),c=n(10),a=n.n(c),i=n(0),u=n(112),s=n(12),l=n(15),f=n(62),p=n(21),d=n.n(p),b=function(e){return e.map((function(e){var t;return[e.package_id,null===(t=e.shipping_rates.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id]})).reduce((function(e,t){var n=a()(t,2),r=n[0],o=n[1];return o&&(e[r]=o),e}),{})},m={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},g={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},h={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:function(){return null},shippingErrorTypes:m,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:function(){return null},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:function(){return null},onShippingRateSuccess:function(){return null},onShippingRateFail:function(){return null},onShippingRateSelectSuccess:function(){return null},onShippingRateSelectFail:function(){return null},needsShipping:!1},v=function(e,t){var n=t.type;return Object.values(m).includes(n)?n:e},y=n(114),O=n(205),j="shipping_rates_success",E="shipping_rates_fail",w="shipping_rate_select_success",S="shipping_rate_select_fail",_=function(e){return{onSuccess:Object(O.a)(j,e),onFail:Object(O.a)(E,e),onSelectSuccess:Object(O.a)(w,e),onSelectFail:Object(O.a)(S,e)}},k=n(206),R=n(65),P=n(66);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var x=m.NONE,I=m.INVALID_ADDRESS,N=m.UNKNOWN,T=Object(i.createContext)(h),M=function(){return Object(i.useContext)(T)},D=function(e){var t=e.children,n=Object(R.b)().dispatchActions,r=Object(P.b)(),c=r.shippingAddress,p=r.setShippingAddress,h=Object(u.a)(),O=h.cartNeedsShipping,M=h.cartHasCalculatedShipping,D=h.shippingRates,A=h.shippingRatesLoading,L=h.cartErrors,F=function(){var e=Object(f.a)(),t=Object(s.useDispatch)(l.CART_STORE_KEY).selectShippingRate;return{selectShippingRate:Object(i.useCallback)((function(n,r){t(n,r).catch((function(t){e(t)}))}),[e,t]),isSelectingRate:Object(s.useSelect)((function(e){return e(l.CART_STORE_KEY).isShippingRateBeingSelected()}),[])}}(),V=F.selectShippingRate,B=F.isSelectingRate,U=Object(i.useReducer)(v,x),q=a()(U,2),H=q[0],z=q[1],W=Object(i.useReducer)(y.b,{}),K=a()(W,2),G=K[0],Y=K[1],$=Object(i.useRef)(G),X=Object(i.useMemo)((function(){return{onShippingRateSuccess:_(Y).onSuccess,onShippingRateFail:_(Y).onFail,onShippingRateSelectSuccess:_(Y).onSelectSuccess,onShippingRateSelectFail:_(Y).onSelectFail}}),[Y]);Object(i.useEffect)((function(){$.current=G}),[G]);var Q=Object(i.useRef)((function(){return b(D)}));Object(i.useEffect)((function(){var e=b(D);d()(Q.current,e)||(Q.current=e)}),[D]),Object(i.useEffect)((function(){A?n.incrementCalculating():n.decrementCalculating()}),[A,n]),Object(i.useEffect)((function(){B?n.incrementCalculating():n.decrementCalculating()}),[B,n]),Object(i.useEffect)((function(){L.length>0&&L.some((function(e){return!(!e.code||!Object.values(g).includes(e.code))}))?z({type:I}):z({type:x})}),[L]);var Z=Object(i.useMemo)((function(){return{isPristine:H===x,isValid:H===x,hasInvalidAddress:H===I,hasError:H===N||H===I}}),[H]);Object(i.useEffect)((function(){A||0!==D.length&&!Z.hasError||Object(k.a)($.current,E,{hasInvalidAddress:Z.hasInvalidAddress,hasError:Z.hasError})}),[D,A,Z.hasError,Z.hasInvalidAddress]),Object(i.useEffect)((function(){!A&&D.length>0&&!Z.hasError&&Object(k.a)($.current,j,D)}),[D,A,Z.hasError]),Object(i.useEffect)((function(){B||(Z.hasError?Object(k.a)($.current,S,{hasError:Z.hasError,hasInvalidAddress:Z.hasInvalidAddress}):Object(k.a)($.current,w,Q.current))}),[B,Z.hasError,Z.hasInvalidAddress]);var J=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({shippingErrorStatus:Z,dispatchErrorStatus:z,shippingErrorTypes:m,shippingRates:D,shippingRatesLoading:A,selectedRates:Q.current,setSelectedRates:V,isSelectingRate:B,shippingAddress:c,setShippingAddress:p,needsShipping:O,hasCalculatedShipping:M},X);return React.createElement(React.Fragment,null,React.createElement(T.Provider,{value:J},t))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return Le})),n.d(t,"a",(function(){return Fe}));var r=n(7),o=n.n(r),c=n(10),a=n.n(c),i=n(0),u=n(1),s=n(88),l=n(138),f=n(12),p=n(63),d=n(4),b="pristine",m="idle",g="processing",h="complete",v="before_processing",y="after_processing",O=Object(d.getSetting)("checkoutData",{order_id:0,customer_id:0}),j={redirectUrl:"",status:b,hasError:!1,calculatingCount:0,orderId:O.order_id,orderNotes:"",customerId:O.customer_id,shouldCreateAccount:!1,processingResponse:null},E={SET_IDLE:"set_idle",SET_PRISTINE:"set_pristine",SET_REDIRECT_URL:"set_redirect_url",SET_COMPLETE:"set_checkout_complete",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_PROCESSING:"set_checkout_is_processing",SET_HAS_ERROR:"set_checkout_has_error",SET_NO_ERROR:"set_checkout_no_error",SET_CUSTOMER_ID:"set_checkout_customer_id",SET_ORDER_ID:"set_checkout_order_id",SET_ORDER_NOTES:"set_checkout_order_notes",INCREMENT_CALCULATING:"increment_calculating",DECREMENT_CALCULATING:"decrement_calculating"},w=E.SET_PRISTINE,S=E.SET_IDLE,_=E.SET_PROCESSING,k=E.SET_BEFORE_PROCESSING,R=E.SET_AFTER_PROCESSING,P=E.SET_PROCESSING_RESPONSE,C=E.SET_REDIRECT_URL,x=E.SET_COMPLETE,I=E.SET_HAS_ERROR,N=E.SET_NO_ERROR,T=E.INCREMENT_CALCULATING,M=E.DECREMENT_CALCULATING,D=E.SET_CUSTOMER_ID,A=E.SET_ORDER_ID,L=E.SET_SHOULD_CREATE_ACCOUNT,F=E.SET_ORDER_NOTES,V=function(){return{type:w}},B=function(){return{type:S}},U=function(){return{type:_}},q=function(e){return{type:C,url:e}},H=function(e){return{type:P,data:e}},z=function(e){return{type:x,data:e}},W=function(){return{type:k}},K=function(){return{type:R}},G=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:N;return{type:t}},Y=function(){return{type:T}},$=function(){return{type:M}},X=function(e){return{type:D,customerId:e}},Q=function(e){return{type:A,orderId:e}},Z=function(e){return{type:L,shouldCreateAccount:e}},J=function(e){return{type:F,orderNotes:e}},ee=n(22);function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=E.SET_PRISTINE,oe=E.SET_IDLE,ce=E.SET_PROCESSING,ae=E.SET_BEFORE_PROCESSING,ie=E.SET_AFTER_PROCESSING,ue=E.SET_PROCESSING_RESPONSE,se=E.SET_REDIRECT_URL,le=E.SET_COMPLETE,fe=E.SET_HAS_ERROR,pe=E.SET_NO_ERROR,de=E.INCREMENT_CALCULATING,be=E.DECREMENT_CALCULATING,me=E.SET_CUSTOMER_ID,ge=E.SET_ORDER_ID,he=E.SET_ORDER_NOTES,ve=E.SET_SHOULD_CREATE_ACCOUNT,ye=b,Oe=m,je=g,Ee=v,we=y,Se=h,_e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0,n=t.url,r=t.type,o=t.customerId,c=t.orderId,a=t.orderNotes,i=t.shouldCreateAccount,u=t.data,s=e;switch(r){case re:s=j;break;case oe:s=e.status!==Oe?ne(ne({},e),{},{status:Oe}):e;break;case se:s=n!==e.url?ne(ne({},e),{},{redirectUrl:n}):e;break;case ue:s=ne(ne({},e),{},{processingResponse:u});break;case le:s=e.status!==Se?ne(ne({},e),{},{status:Se,redirectUrl:(null==u?void 0:u.redirectUrl)||e.redirectUrl}):e;break;case ce:s=!1===(s=e.status!==je?ne(ne({},e),{},{status:je,hasError:!1}):e).hasError?s:ne(ne({},s),{},{hasError:!1});break;case ae:s=e.status!==Ee?ne(ne({},e),{},{status:Ee,hasError:!1}):e;break;case ie:s=e.status!==we?ne(ne({},e),{},{status:we}):e;break;case fe:s=e.hasError?e:ne(ne({},e),{},{hasError:!0}),s=e.status===je||e.status===Ee?ne(ne({},s),{},{status:Oe}):s;break;case pe:s=e.hasError?ne(ne({},e),{},{hasError:!1}):e;break;case de:s=ne(ne({},e),{},{calculatingCount:e.calculatingCount+1});break;case be:s=ne(ne({},e),{},{calculatingCount:Math.max(0,e.calculatingCount-1)});break;case me:s=ne(ne({},e),{},{customerId:o});break;case ge:s=ne(ne({},e),{},{orderId:c});break;case ve:i!==e.shouldCreateAccount&&(s=ne(ne({},e),{},{shouldCreateAccount:i}));break;case he:e.orderNotes!==a&&(s=ne(ne({},e),{},{orderNotes:a}))}return s!==e&&r!==re&&s.status===ye&&(s.status=Oe),s},ke=n(114),Re=n(205),Pe="checkout_before_processing",Ce="checkout_after_processing_with_success",xe="checkout_after_processing_with_error",Ie=function(e){return{onCheckoutAfterProcessingWithSuccess:Object(Re.a)(Ce,e),onCheckoutAfterProcessingWithError:Object(Re.a)(xe,e),onCheckoutBeforeProcessing:Object(Re.a)(Pe,e)}},Ne=n(206),Te=n(79);function Me(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 De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ae=Object(i.createContext)({isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onSubmit:function(){},onCheckoutAfterProcessingWithSuccess:function(e){},onCheckoutAfterProcessingWithError:function(e){},onCheckoutBeforeProcessing:function(e){},dispatchActions:{resetCheckout:function(){},setRedirectUrl:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},incrementCalculating:function(){},decrementCalculating:function(){},setCustomerId:function(e){},setOrderId:function(e){},setOrderNotes:function(e){}},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:function(e){}}),Le=function(){return Object(i.useContext)(Ae)},Fe=function(e){var t=e.children,n=e.redirectUrl,r=e.isCart,o=void 0!==r&&r;j.redirectUrl=n;var c,d=Object(i.useReducer)(_e,j),b=a()(d,2),O=b[0],E=b[1],w=Object(i.useReducer)(ke.b,{}),S=a()(w,2),_=S[0],k=S[1],R=Object(i.useRef)(_),P=Object(Te.b)().setValidationErrors,C=Object(s.a)(),x=C.addErrorNotice,I=C.removeNotices,N=O.calculatingCount>0,T=Object(l.a)(),M=T.isSuccessResponse,D=T.isErrorResponse,A=T.isFailResponse,L=T.shouldRetry,F=(c=Object(l.a)().noticeContexts,{checkoutNotices:Object(f.useSelect)((function(e){return e("core/notices").getNotices("wc/checkout")}),[]),expressPaymentNotices:Object(f.useSelect)((function(e){return e("core/notices").getNotices(c.EXPRESS_PAYMENTS)}),[c.EXPRESS_PAYMENTS]),paymentNotices:Object(f.useSelect)((function(e){return e("core/notices").getNotices(c.PAYMENTS)}),[c.PAYMENTS])}),te=F.checkoutNotices,ne=F.paymentNotices,re=F.expressPaymentNotices;Object(i.useEffect)((function(){R.current=_}),[_]);var oe=Object(i.useMemo)((function(){return Ie(k).onCheckoutAfterProcessingWithSuccess}),[k]),ce=Object(i.useMemo)((function(){return Ie(k).onCheckoutAfterProcessingWithError}),[k]),ae=Object(i.useMemo)((function(){return Ie(k).onCheckoutBeforeProcessing}),[k]),ie=Object(i.useMemo)((function(){return{resetCheckout:function(){E(V())},setRedirectUrl:function(e){E(q(e))},setHasError:function(e){E(G(e))},incrementCalculating:function(){E(Y())},decrementCalculating:function(){E($())},setCustomerId:function(e){E(X(e))},setOrderId:function(e){E(Q(e))},setOrderNotes:function(e){E(J(e))},setAfterProcessing:function(e){var t,n,r,o;(!e.payment_result&&e.message&&200!==(null==e||null===(t=e.data)||void 0===t?void 0:t.status)&&(e.payment_result=De(De({},e.payment_result),{},{message:e.message})),e.payment_result)&&(null!==(n=e.payment_result)&&void 0!==n&&n.redirect_url&&E(q(e.payment_result.redirect_url)),E(H((r=e.payment_result,o={message:(null==r?void 0:r.message)||"",paymentStatus:r.payment_status,paymentDetails:{}},Array.isArray(r.payment_details)&&r.payment_details.forEach((function(e){var t=e.key,n=e.value;o.paymentDetails[t]=Object(ee.decodeEntities)(n)})),o))));E(K())}}}),[]);Object(i.useEffect)((function(){O.status===v&&(I("error"),Object(Ne.a)(R.current,Pe,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,n=e.validationErrors;x(t),P(n)})),E(B())):E(U())})))}),[O.status,P,x,I,E]);var ue=Object(p.a)(O.status),se=Object(p.a)(O.hasError);Object(i.useEffect)((function(){if((O.status!==ue||O.hasError!==se)&&O.status===y){var e={redirectUrl:O.redirectUrl,orderId:O.orderId,customerId:O.customerId,customerNote:O.customerNote,processingResponse:O.processingResponse};O.hasError?Object(Ne.b)(R.current,xe,e).then((function(t){if(D(t)||A(t)){if(t.message){var n={id:null==t?void 0:t.messageContext,context:null==t?void 0:t.messageContext};x(t.message,n)}L(t)?E(B()):E(z(t))}else{if(!(te.some((function(e){return"error"===e.status}))||re.some((function(e){return"error"===e.status}))||ne.some((function(e){return"error"===e.status})))){var r,o=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");x(o,{id:"checkout"})}E(B())}})):Object(Ne.b)(R.current,Ce,e).then((function(e){if(M(e))E(z(e));else if(D(e)||A(e)){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;x(e.message,t)}L(e)?E(G(!0)):E(z(e))}else E(z())}))}}),[O.status,O.hasError,O.redirectUrl,O.orderId,O.customerId,O.customerNote,O.processingResponse,ue,se,ie,x,D,A,M,L,te,re,ne]);var le={onSubmit:Object(i.useCallback)((function(){E(W())}),[]),isComplete:O.status===h,isIdle:O.status===m,isCalculating:N,isProcessing:O.status===g,isBeforeProcessing:O.status===v,isAfterProcessing:O.status===y,hasError:O.hasError,redirectUrl:O.redirectUrl,onCheckoutAfterProcessingWithSuccess:oe,onCheckoutAfterProcessingWithError:ce,onCheckoutBeforeProcessing:ae,dispatchActions:ie,isCart:o,orderId:O.orderId,hasOrder:!!O.orderId,customerId:O.customerId,orderNotes:O.orderNotes,shouldCreateAccount:O.shouldCreateAccount,setShouldCreateAccount:function(e){return E(Z(e))}};return React.createElement(Ae.Provider,{value:le},t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return j})),n.d(t,"a",(function(){return E}));var r=n(0),o=n(7),c=n.n(o),a=n(10),i=n.n(a),u=n(12),s=n(15),l=n(141),f=n(21),p=n.n(f),d=n(113),b=function(e){var t=e.country,n=void 0===t?"":t,r=e.state,o=void 0===r?"":r,c=e.city,a=void 0===c?"":c,i=e.postcode,u=void 0===i?"":i;return{country:n.trim(),state:o.trim(),city:a.trim(),postcode:u?u.replace(" ","").toUpperCase():""}},m=function(e,t){return!!t.country&&!p()(b(e),b(t))},g=n(88),h=n(112);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<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 O=Object(r.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setBillingData:function(){return null},setShippingAddress:function(){return null}}),j=function(){return Object(r.useContext)(O)},E=function(e){var t=e.children,n=function(){var e=Object(u.useDispatch)(s.CART_STORE_KEY).updateCustomerData,t=Object(g.a)(),n=t.addErrorNotice,o=t.removeNotice,c=Object(h.a)(),a=c.billingAddress,f=c.shippingAddress,b=Object(r.useState)({billingData:a,shippingAddress:f}),v=i()(b,2),O=v[0],j=v[1],E=Object(r.useRef)(O),w=Object(l.a)(O,1e3,{equalityFn:function(e,t){return p()(e.billingData,t.billingData)&&p()(e.shippingAddress,t.shippingAddress)}}),S=i()(w,1)[0],_=Object(r.useCallback)((function(e){j((function(t){return y(y({},t),{},{billingData:y(y({},t.billingData),e)})}))}),[]),k=Object(r.useCallback)((function(e){j((function(t){return y(y({},t),{},{shippingAddress:e})}))}),[]);return Object(r.useEffect)((function(){(m(E.current.billingData,S.billingData)||m(E.current.shippingAddress,S.shippingAddress))&&(E.current=S,e({billing_address:S.billingData,shipping_address:S.shippingAddress}).then((function(){o("checkout")})).catch((function(e){n(Object(d.b)(e),{id:"checkout"})})))}),[S,n,o,e]),{billingData:O.billingData,shippingAddress:O.shippingAddress,setBillingData:_,setShippingAddress:k}}(),o={billingData:n.billingData,shippingAddress:n.shippingAddress,setBillingData:n.setBillingData,setShippingAddress:n.setShippingAddress};return React.createElement(O.Provider,{value:o},t)}},,function(e,t,n){"use strict";var r=n(6),o=n(17),c=n(0),a=n(5),i=n.n(a),u=n(8),s=n(55),l=n.n(s);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}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(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&&b(e,t)}var g=n(42),h=n(13);function v(e,t){return!t||"object"!==Object(g.a)(t)&&"function"!=typeof t?Object(h.a)(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=n(16),j=n(41),E=n(52),w=n(57),S={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},_={">=":"min-width","<":"max-width"},k={">=":function(e,t){return t>=e},"<":function(e,t){return t<e}},R=Object(c.createContext)(null),P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">=",n=Object(c.useContext)(R),r=!n&&"(".concat(_[t],": ").concat(S[e],"px)"),o=Object(w.a)(r);return n?k[t](S[e],n):o};P.__experimentalWidthProvider=R.Provider;var C=P,x=n(160),I=n(118),N=n(19);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){Object(N.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t,n,r,o,c,a){var i=t.width,u="rtl"===document.documentElement.dir;"left"===n&&u?n="right":"right"===n&&u&&(n="left"),"left"===r&&u?r="right":"right"===r&&u&&(r="left");var s=Math.round(e.left+e.width/2),l={popoverLeft:s,contentWidth:(s-i/2>0?i/2:s)+(s+i/2>window.innerWidth?window.innerWidth-s:i/2)},f=e.left;"right"===r?f=e.right:"middle"!==c&&(f=s);var p=e.right;"left"===r?p=e.left:"middle"!==c&&(p=s);var d,b={popoverLeft:f,contentWidth:f-i>0?i:f},m={popoverLeft:p,contentWidth:p+i>window.innerWidth?window.innerWidth-p:i},g=n,h=null;if(!o)if("center"===n&&l.contentWidth===i)g="center";else if("left"===n&&b.contentWidth===i)g="left";else if("right"===n&&m.contentWidth===i)g="right";else{var v="left"===(g=b.contentWidth>m.contentWidth?"left":"right")?b.contentWidth:m.contentWidth;h=v!==i?v:null}if(d="center"===g?l.popoverLeft:"left"===g?b.popoverLeft:m.popoverLeft,a){var y=a.getBoundingClientRect();d=Math.min(d,y.right-i)}return{xAxis:g,popoverLeft:d,contentWidth:h}}function A(e,t,n,r,o,c,a){var i=t.height;if(o){var u=(Object(j.getScrollContainer)(c)||document.body).getBoundingClientRect().top+i-a;if(e.top<=u)return{yAxis:n,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===r?s=e.bottom:"top"===r&&(s=e.top);var l={popoverTop:s,contentHeight:(s-i/2>0?i/2:s)+(s+i/2>window.innerHeight?window.innerHeight-s:i/2)},f={popoverTop:e.top,contentHeight:e.top-10-i>0?i:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+i>window.innerHeight?window.innerHeight-10-e.bottom:i},d=n,b=null;if(!o)if("middle"===n&&l.contentHeight===i)d="middle";else if("top"===n&&f.contentHeight===i)d="top";else if("bottom"===n&&p.contentHeight===i)d="bottom";else{var m="top"===(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;b=m!==i?m:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:b}}var L=n(29);var F=function(e,t){return function(n){var r=e(n),o=n.displayName,c=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(u.upperFirst)(Object(u.camelCase)(t)),"(").concat(c,")"),r}};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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var B=Object(c.createContext)({focusHistory:[]}),U=B.Provider,q=B.Consumer;U.displayName="FocusReturnProvider",q.displayName="FocusReturnConsumer";c.Component;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 n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var z=F((function e(t){if((r=t)instanceof c.Component||"function"==typeof r){var n=t;return e({})(n)}var r,o=t.onFocusReturn,a=void 0===o?u.stubTrue:o;return function(e){var t=function(t){m(r,t);var n=H(r);function r(){var e;return f(this,r),(e=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 d(r,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==a())for(var r,o=[].concat(Object(L.a)(u.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(L.a)(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(c.createElement)(e,this.props.childProps))}}]),r}(c.Component);return function(e){return Object(c.createElement)(q,null,(function(n){return Object(c.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");function W(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var K=F((function(e){return function(t){m(r,t);var n=W(r);function r(){var e;return f(this,r),(e=n.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(h.a)(e)),e}return d(r,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===E.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(c.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(c.createElement)(e,this.props))}}]),r}(c.Component)}),"withConstrainedTabbing");function G(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var Y=["button","submit"];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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var X=F((function(e){return function(t){m(o,t);var n=G(o);function o(){var e;return f(this,o),(e=n.apply(this,arguments)).bindNode=e.bindNode.bind(Object(h.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(h.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(h.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(h.a)(e)),e}return d(o,[{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(u.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(u.includes)(Y,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(c.createElement)(e,Object(r.a)({ref:this.bindNode},this.props)))}}]),o}(c.Component)}),"withFocusOutside")(function(e){m(n,e);var t=$(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),n}(c.Component));function Q(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,r=e.className,o=void 0===r?"lockscroll":r,a=0,i=0;function u(e){var t=n.scrollingElement||n.body;e&&(i=t.scrollTop);var r=e?"add":"remove";t.classList[r](o),n.documentElement.classList[r](o),e||(t.scrollTop=i)}function s(){0===a&&u(!0),++a}function l(){1===a&&u(!1),--a}return function(e){m(n,e);var t=Q(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(c.Component)}();function J(e){e.stopPropagation()}var ee=Object(c.forwardRef)((function(e,t){var n=e.children,a=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({},a,{ref:t,onMouseDown:J}),n)})),te=n(44);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){Object(N.a)(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}function oe(e){var t=Object(c.useContext)(te.a),n=t.slots[e]||{},r=t.fills[e],o=Object(c.useMemo)((function(){return r||[]}),[r]),a=Object(c.useCallback)((function(n){t.updateSlot(e,n)}),[e,t.updateSlot]),i=Object(c.useCallback)((function(n){t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),u=Object(c.useCallback)((function(n){t.registerFill(e,n)}),[e,t.registerFill]),s=Object(c.useCallback)((function(n){t.unregisterFill(e,n)}),[e,t.unregisterFill]);return re(re({},n),{},{updateSlot:a,unregisterSlot:i,fills:o,registerFill:u,unregisterFill:s})}function ce(e,t,n){return(ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}var ae=n(21),ie=n.n(ae);function ue(e){var t=function(e,t){if("object"!==Object(g.a)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Object(g.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Object(g.a)(t)?t:String(t)}function se(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 le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){Object(N.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fe(e){var t,n,r,a,i,u,s,l,f,p,d,b,m,g=e.children,h=(t=Object(c.useState)({}),n=Object(O.a)(t,2),r=n[0],a=n[1],i=Object(c.useState)({}),u=Object(O.a)(i,2),s=u[0],l=u[1],f=Object(c.useCallback)((function(e,t,n){a((function(r){var o=r[e]||{};return le(le({},r),{},Object(N.a)({},e,le(le({},o),{},{ref:t||o.ref,fillProps:n||o.fillProps||{}})))}))}),[]),p=Object(c.useCallback)((function(e,t){a((function(n){var r=n[e],c=Object(o.a)(n,[e].map(ue));return(null==r?void 0:r.ref)===t?c:n}))}),[]),d=Object(c.useCallback)((function(e,t){var n=r[e];if(n&&!ie()(n.fillProps,t)){n.fillProps=t;var o=s[e];o&&o.map((function(e){return e.current.rerender()}))}}),[r,s]),b=Object(c.useCallback)((function(e,t){l((function(n){return le(le({},n),{},Object(N.a)({},e,[].concat(Object(L.a)(n[e]||[]),[t])))}))}),[]),m=Object(c.useCallback)((function(e,t){l((function(n){return n[e]?le(le({},n),{},Object(N.a)({},e,n[e].filter((function(e){return e!==t})))):n}))}),[]),Object(c.useMemo)((function(){return{slots:r,fills:s,registerSlot:f,updateSlot:d,unregisterSlot:p,registerFill:b,unregisterFill:m}}),[r,s,f,d,p,b,m]));return Object(c.createElement)(te.a.Provider,{value:h},g)}function pe(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var de=Object(c.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),be=de.Provider,me=de.Consumer;c.Component;function ge(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var he=function(e){m(n,e);var t=ge(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(Object(h.a)(e)),e}return d(n,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(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:"forceUpdate",value:function(){this.isUnmounted||ce(y(n.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,r=e.fillProps,o=void 0===r?{}:r,a=e.getFills,i=Object(u.map)(a(n,this),(function(e){var t=e.occurrence,n=Object(u.isFunction)(e.children)?e.children(o):e.children;return c.Children.map(n,(function(e,n){if(!e||Object(u.isString)(e))return e;var r="".concat(t,"---").concat(e.key||n);return Object(c.cloneElement)(e,{key:r})}))})).filter(Object(u.negate)(c.isEmptyElement));return Object(c.createElement)(c.Fragment,null,Object(u.isFunction)(t)?t(i):i)}}]),n}(c.Component),ve=function(e){return Object(c.createElement)(me,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,a=t.getFills;return Object(c.createElement)(he,Object(r.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:a}))}))},ye=0;function Oe(e){var t=e.name,n=e.children,r=e.registerFill,o=e.unregisterFill,a=function(e){var t=Object(c.useContext)(de),n=t.getSlot,r=t.subscribe,o=Object(c.useState)(n(e)),a=Object(O.a)(o,2),i=a[0],u=a[1];return Object(c.useEffect)((function(){return u(n(e)),r((function(){u(n(e))}))}),[e]),i}(t),i=Object(c.useRef)({name:t,children:n});return i.current.occurrence||(i.current.occurrence=++ye),Object(c.useLayoutEffect)((function(){return r(t,i.current),function(){return o(t,i.current)}}),[]),Object(c.useLayoutEffect)((function(){i.current.children=n,a&&a.forceUpdate()}),[n]),Object(c.useLayoutEffect)((function(){t!==i.current.name&&(o(i.current.name,i.current),i.current.name=t,r(t,i.current))}),[t]),a&&a.node?(Object(u.isFunction)(n)&&(n=n(a.props.fillProps)),Object(c.createPortal)(n,a.node)):null}var je=function(e){return Object(c.createElement)(me,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(c.createElement)(Oe,Object(r.a)({},e,{registerFill:n,unregisterFill:o}))}))};function Ee(e){var t=e.name,n=e.fillProps,a=void 0===n?{}:n,i=e.as,u=void 0===i?"div":i,s=Object(o.a)(e,["name","fillProps","as"]),l=Object(c.useContext)(te.a),f=Object(c.useRef)();return Object(c.useLayoutEffect)((function(){return l.registerSlot(t,f,a),function(){l.unregisterSlot(t,f)}}),[l.registerSlot,l.unregisterSlot,t]),Object(c.useLayoutEffect)((function(){l.updateSlot(t,a)})),Object(c.createElement)(u,Object(r.a)({ref:f},s))}function we(e){var t,n,r=e.name,o=e.children,a=oe(r),i=Object(c.useRef)({rerender:(t=Object(c.useState)({}),n=Object(O.a)(t,2)[1],function(){return n({})})});return Object(c.useEffect)((function(){return a.registerFill(i),function(){a.unregisterFill(i)}}),[a.registerFill,a.unregisterFill]),a.ref&&a.ref.current?("function"==typeof o&&(o=o(a.fillProps)),Object(c.createPortal)(o,a.ref.current)):null}function Se(e){var t=e.bubblesVirtually,n=Object(o.a)(e,["bubblesVirtually"]);return t?Object(c.createElement)(Ee,n):Object(c.createElement)(ve,n)}function _e(e){return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(je,e),Object(c.createElement)(we,e))}function ke(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?ke(Object(n),!0).forEach((function(t){Object(N.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e){var t=e.type,n=e.origin,r=void 0===n?function(e){return"appear"===e?"top":"left"}(t):n;if("appear"===t){var o,c=r.split(" "),a=Object(O.a)(c,2),u=a[0],s=a[1],l=void 0===s?"center":s;return i()("components-animate__appear",(o={},Object(N.a)(o,"is-from-"+l,"center"!==l),Object(N.a)(o,"is-from-"+u,"middle"!==u),o))}return"slide-in"===t?i()("components-animate__slide-in","is-from-"+r):"loading"===t?i()("components-animate__loading"):void 0}function Ce(e){var t=e.type,n=e.options,r=void 0===n?{}:n;return(0,e.children)({className:Pe(Re({type:t},r))})}var xe=K(z((function(e){return e.children})));function Ie(e,t){var n,r=(n=t).ownerDocument.defaultView.getComputedStyle(n),o=r.paddingTop,c=r.paddingBottom,a=r.paddingLeft,i=r.paddingRight,u=o?parseInt(o,10):0,s=c?parseInt(c,10):0,l=a?parseInt(a,10):0,f=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+u,width:e.width-l-f,height:e.height-u-s,left:e.left+l,right:e.right-f,top:e.top+u,bottom:e.bottom-s}}function Ne(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Te(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function Me(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var De=function(e){var t=e.headerTitle,n=e.onClose,a=e.onKeyDown,u=e.children,s=e.className,f=e.noArrow,p=void 0===f||f,d=e.isAlternate,b=e.position,m=void 0===b?"bottom right":b,g=(e.range,e.focusOnMount),h=void 0===g?"firstElement":g,v=e.anchorRef,y=e.shouldAnchorIncludePadding,w=e.anchorRect,S=e.getAnchorRect,_=e.expandOnMobile,k=e.animate,R=void 0===k||k,P=e.onClickOutside,N=e.onFocusOutside,T=e.__unstableSticky,L=e.__unstableSlotName,F=void 0===L?"Popover":L,V=e.__unstableObserveElement,B=e.__unstableBoundaryParent,U=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),q=Object(c.useRef)(null),H=Object(c.useRef)(null),z=Object(c.useRef)(),W=C("medium","<"),K=Object(c.useState)(),G=Object(O.a)(K,2),Y=G[0],$=G[1],Q=oe(F),J=_&&W,te=Object(x.a)(),ne=Object(O.a)(te,2),re=ne[0],ce=ne[1];p=J||p,Object(c.useLayoutEffect)((function(){if(J)return Me(z.current,"is-without-arrow",p),Me(z.current,"is-alternate",d),Ne(z.current,"data-x-axis"),Ne(z.current,"data-y-axis"),Te(z.current,"top"),Te(z.current,"left"),Te(H.current,"maxHeight"),void Te(H.current,"maxWidth");var e=function(){if(z.current&&H.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(j.getRectangleFromRange)(r);if(r instanceof window.Element){var c=r.getBoundingClientRect();return o?c:Ie(c,r)}var a=r.top,i=r.bottom,u=a.getBoundingClientRect(),s=i.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:Ie(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:Ie(p,f)}}(q,w,S,v,y);if(e){var t,n,r=z.current,o=r.offsetParent,c=r.ownerDocument,a=0;if(o&&o!==c.body){var i=o.getBoundingClientRect();a=i.top,e=new window.DOMRect(e.left-i.left,e.top-i.top,e.width,e.height)}if(B)t=null===(n=z.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode;var u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,i=n.split(" "),u=Object(O.a)(i,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=A(e,t,s,p,r,o,c),b=D(e,t,f,p,r,d.yAxis,a);return M(M({},b),d)}(e,ce.height?ce:H.current.getBoundingClientRect(),m,T,z.current,a,t),s=u.popoverTop,l=u.popoverLeft,f=u.xAxis,b=u.yAxis,g=u.contentHeight,h=u.contentWidth;"number"==typeof s&&"number"==typeof l&&(Te(z.current,"top",s+"px"),Te(z.current,"left",l+"px")),Me(z.current,"is-without-arrow",p||"center"===f&&"middle"===b),Me(z.current,"is-alternate",d),Ne(z.current,"data-x-axis",f),Ne(z.current,"data-y-axis",b),Te(H.current,"maxHeight","number"==typeof g?g+"px":""),Te(H.current,"maxWidth","number"==typeof h?h+"px":"");$(({left:"right",right:"left"}[f]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),V&&(n=new window.MutationObserver(e)).observe(V,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[J,w,S,v,y,m,ce,T,V,B]),function(e,t){Object(c.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=j.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(h,H);var ae=function(e){e.keyCode===E.ESCAPE&&n&&(e.stopPropagation(),n()),a&&a(e)};var ie=Object(c.createElement)(X,{onFocusOutside:function(e){if(N)N(e);else if(P){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),P(t)}else n&&n()}},Object(c.createElement)(Ce,{type:R&&Y?"appear":null,options:{origin:Y}},(function(e){var o=e.className;return Object(c.createElement)(ee,Object(r.a)({className:i()("components-popover",s,o,{"is-expanded":J,"is-without-arrow":p,"is-alternate":d})},U,{onKeyDown:ae,ref:z}),J&&Object(c.createElement)(Z,null),J&&Object(c.createElement)("div",{className:"components-popover__header"},Object(c.createElement)("span",{className:"components-popover__header-title"},t),Object(c.createElement)(ze,{className:"components-popover__close",icon:I.a,onClick:n})),Object(c.createElement)("div",{ref:H,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},re,u)))})));return h&&(ie=Object(c.createElement)(xe,null,ie)),Q.ref&&(ie=Object(c.createElement)(_e,{name:F},ie)),v||w?ie:Object(c.createElement)("span",{ref:q},ie)};De.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(c.createElement)(Se,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var Ae=De;var Le=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(u.isString)(r)&&(t=r),Object(u.isObject)(r)&&(t=r.display,n=r.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":n},t)):null};function Fe(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=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var Ve=function(e){m(n,e);var t=Fe(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).delayedSetIsOver=Object(u.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return d(n,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===c.Children.count(n)){var r=c.Children.only(n);"function"==typeof r.props[e]&&r.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(u.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,r=e.text,o=e.shortcut;if(1!==c.Children.count(t))return t;var a=c.Children.only(t),i=this.state.isOver;return Object(c.cloneElement)(a,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(c.concatChildren)(a.props.children,i&&Object(c.createElement)(Ae,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(c.createElement)(Le,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),n}(c.Component),Be=n(86);function Ue(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw c}}}}function qe(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}var He=["onMouseDown","onClick"];var ze=t.a=Object(c.forwardRef)((function(e,t){var n=e.href,a=e.target,s=e.isPrimary,f=e.isSmall,p=e.isTertiary,d=e.isPressed,b=e.isBusy,m=e.isDefault,g=e.isSecondary,h=e.isLink,v=e.isDestructive,y=e.className,O=e.disabled,j=e.icon,E=e.iconSize,w=e.showTooltip,S=e.tooltipPosition,_=e.shortcut,k=e.label,R=e.children,P=e.__experimentalIsFocusable,C=Object(o.a)(e,["href","target","isPrimary","isSmall","isTertiary","isPressed","isBusy","isDefault","isSecondary","isLink","isDestructive","className","disabled","icon","iconSize","showTooltip","tooltipPosition","shortcut","label","children","__experimentalIsFocusable"]);m&&l()("Button isDefault prop",{alternative:"isSecondary"});var x=i()("components-button",y,{"is-secondary":m||g,"is-primary":s,"is-small":f,"is-tertiary":p,"is-pressed":d,"is-busy":b,"is-link":h,"is-destructive":v,"has-text":!!j&&!!R,"has-icon":!!j}),I=O&&!P,N=void 0===n||I?"button":"a",T="a"===N?{href:n,target:a}:{type:"button",disabled:I,"aria-pressed":d};if(O&&P){T["aria-disabled"]=!0;var M,D=Ue(He);try{for(D.s();!(M=D.n()).done;){C[M.value]=function(e){e.stopPropagation(),e.preventDefault()}}}catch(e){D.e(e)}finally{D.f()}}var A=!I&&(w&&k||_||!!k&&(!R||Object(u.isArray)(R)&&!R.length)&&!1!==w),L=Object(c.createElement)(N,Object(r.a)({},T,C,{className:x,"aria-label":C["aria-label"]||k,ref:t}),j&&Object(c.createElement)(Be.a,{icon:j,size:E}),R);return A?Object(c.createElement)(Ve,{text:k,shortcut:_,position:S},L):L}))},,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(72);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var e=i(p);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f<t;)u&&u[f].run();f=-1,t=s.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new b(e,t)),1!==s.length||l||i(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(2),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},c=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},a=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=a);var t=r.useState(e(null)),n=t[0],o=t[1],i=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(c,{onResize:i})}),[i]),n]}},function(e,t,n){"use strict";var r=n(1),o=(n(3),n(5)),c=n.n(o),a=n(0);function i(){return Object(a.createElement)("span",{className:"components-spinner"})}n(163),t.a=function(e){var t=e.children,n=e.className,o=e.screenReaderLabel,a=e.showSpinner,u=void 0!==a&&a,s=e.isLoading;return void 0===s||s?React.createElement("div",{className:c()(n,"wc-block-components-loading-mask")},u&&React.createElement(i,null),React.createElement("div",{className:"wc-block-components-loading-mask__children","aria-hidden":!0},t),React.createElement("span",{className:"screen-reader-text"},o||Object(r.__)("Loading…","woo-gutenberg-products-block"))):t}},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";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(61)),a=n(2),i=r(a),u=r(n(110)),s=r(n(20)),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=a.useState(!1)[1];return a.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 b(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 m(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 g,h,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){g={fn:e,transform:t}}function E(e){h=e}var w,S=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},_=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function k(e){w=e}var R,P=function(){return Date.now()};function C(e){R=e}var x,I,N=function(e){return e.current};function T(e){x=e}var M=Object.freeze({get applyAnimatedValues(){return g},injectApplyAnimatedValues:j,get colorNames(){return h},injectColorNames:E,get requestFrame(){return S},get cancelFrame(){return _},injectFrame:function(e,t){S=e,_=t},get interpolation(){return w},injectStringInterpolator:k,get now(){return P},injectNow:function(e){P=e},get defaultElement(){return R},injectDefaultElement:C,get animatedApi(){return N},injectAnimatedApi:function(e){N=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:T,get manualFrameloop(){return I},injectManualFrameloop:function(e){I=e}}),D=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:x(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),A=!1,L=new Set,F=function e(){if(!A)return!1;var t=P(),n=L,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 a=c,i=!1,u=0;u<a.configs.length;u++){for(var s=a.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var b=s.fromValues[p],m=s.toValues[p],g=d.lastPosition,h=m instanceof v,y=Array.isArray(s.initialVelocity)?s.initialVelocity[p]:s.initialVelocity;if(h&&(m=m.getValue()),s.immediate)d.setValue(m),d.done=!0;else if("string"!=typeof b&&"string"!=typeof m){if(void 0!==s.duration)g=b+s.easing((t-d.startTime)/s.duration)*(m-b),l=t>=d.startTime+s.duration;else if(s.decay)g=b+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-g)<.1)&&(m=g);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){g+=1*(y+=1*((-s.tension*(g-m)+-s.friction*y)/s.mass)/1e3)/1e3}var E=!(!s.clamp||0===s.tension)&&(b<m?g>m:g<m),w=Math.abs(y)<=s.precision,_=0===s.tension||Math.abs(m-g)<=s.precision;l=E||w&&_,d.lastVelocity=y,d.lastTime=t}h&&!s.toValues[p].done&&(l=!1),l?(d.value!==m&&(g=m),d.done=!0):i=!0,d.setValue(g),d.lastPosition=g}else d.setValue(m),d.done=!0}}a.props.onFrame&&(a.values[s.name]=s.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),i||(L.delete(a),a.stop(!0))}return L.size?I?I():S(e):A=!1,A};function V(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:n});if(w&&"string"==typeof e.output[0])return w(e);var r=e,o=r.output,c=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",i=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,a,i,u){var s=u?u(e):e;if(s<t){if("identity"===a)return s;"clamp"===a&&(s=t)}if(s>n){if("identity"===i)return s;"clamp"===i&&(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,a,i,r.map)}}var B=function(e){function t(n,r,o,c){var a;return(a=e.call(this)||this).calc=void 0,a.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],a.calc=V(r,o,c),a}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=V(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var U=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 B(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 U(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 B(this,e,t)},t}(y),H=0,z=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=H++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,a=t.to,i=c(t,["delay","to"]);if(l.arr(a)||l.fun(a))this.queue.push(o({},i,{delay:r,to:a}));else if(a){var u={};Object.entries(a).forEach((function(e){var t,n=e[0],c=e[1],a=o({to:(t={},t[n]=c,t),delay:b(r,n)},i),s=u[a.delay]&&u[a.delay].to;u[a.delay]=o({},u[a.delay],a,{to:o({},s,a.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),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,a=void 0===c?{}:c;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(a)&&(n.merged=o({},n.merged,a))}));var r=this.local=++this.guid,a=this.localQueue=this.queue;this.queue=[],a.forEach((function(t,o){var i=t.delay,u=c(t,["delay"]),s=function(t){o===a.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);i?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),i):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,L.has(t)||L.add(t),A||(A=!0,S(I||F));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,L.has(t)&&L.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),a=this.local,i=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,c=o({},r,m(r.to[t]));l.arr(c.config)&&(c.config=c.config[t]),i=i.then((function(){if(a===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;i=i.then((function(){return r.to((function(e){var t=o({},r,m(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,a===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}))}))}i.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,a=n.to,i=void 0===a?{}:a,u=n.config,s=void 0===u?{}:u,f=n.reverse,m=n.attach,g=n.reset,v=n.immediate;if(f){var y=[i,c];c=y[0],i=y[1]}this.merged=o({},c,this.merged,i),this.hasChanged=!1;var O=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],a=n[1],i=e[r]||{},u=l.num(a),f=l.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!h[a],m=l.arr(a),y=!u&&!m&&!f,j=l.und(c[r])?a:c[r],E=u||m||f?a:1,S=b(s,r);O&&(E=O.animations[r].parent);var _,k=i.parent,R=i.interpolation,C=d(O?E.getPayload():E),x=a;y&&(x=w({range:[0,1],output:[a,a]})(1));var I,N=R&&R.getValue(),T=!l.und(k)&&i.animatedValues.some((function(e){return!e.done})),M=!l.equ(x,N),D=!l.equ(x,i.previous),A=!l.equ(S,i.config);if(g||D&&M||A){var L;if(u||f)k=R=i.parent||new U(j);else if(m)k=R=i.parent||new q(j);else if(y){var F=i.interpolation&&i.interpolation.calc(i.parent.value);F=void 0===F||g?j:F,i.parent?(k=i.parent).setValue(0,!1):k=new U(0);var V={output:[F,a]};i.interpolation?(R=i.interpolation,i.interpolation.updateConfig(V)):R=k.interpolate(V)}return C=d(O?E.getPayload():E),_=d(k.getPayload()),g&&!y&&k.setValue(j,!1),t.hasChanged=!0,_.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=T?e.lastVelocity:void 0,e.lastTime=T?e.lastTime:void 0,e.startTime=P(),e.done=!1,e.animatedStyles.clear()})),b(v,r)&&k.setValue(y?E:a,!1),o({},e,((L={})[r]=o({},i,{name:r,parent:k,interpolation:R,animatedValues:_,toValues:C,previous:x,config:S,fromValues:d(k.getValue()),immediate:b(v,r),initialVelocity:p(S.velocity,0),clamp:p(S.clamp,!1),precision:p(S.precision,.01),tension:p(S.tension,170),friction:p(S.friction,26),mass:p(S.mass,1),duration:S.duration,easing:p(S.easing,(function(e){return e})),decay:S.decay}),L))}return M?e:(y&&(k.setValue(1,!1),R.updateConfig({output:[x,x]})),k.done=!0,t.hasChanged=!0,o({},e,((I={})[r]=o({},e[r],{previous:x}),I)))}),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}(),W=function(e,t){var n=a.useRef(!1),r=a.useRef(),o=l.fun(t),c=a.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 z,a=o?b(t,r,c):t[r];return 0===r&&(n=a.ref),c.update(a),n||c.start(),c})),n]}),[e]),i=c[0],u=c[1];r.current=i;a.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=a.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?b(e,n,t):e[n]),u||t.start()}))}}),[e]);a.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),a.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,G=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,a=c(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:G(t,r)},a)};function $(e,t){var n=function(){if(o){if(c>=r.length)return"break";a=r[c++]}else{if((c=r.next()).done)return"break";a=c.value}var n=a.key,i=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var a;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=g.transform(t)),n.payload=t,n}return u(t,e),t}(O),Q={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 J(){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"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(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})$/,ae=/^#([0-9a-fA-F]{6})$/,ie=/^#([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),a=ue(o,r,e),i=ue(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*a)<<16|Math.round(255*i)<<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 be(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ae.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[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=ie.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 me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ge=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,he=new RegExp("("+Object.keys(Q).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={};T((function(e){return new X(e)})),C("div"),k((function(e){var t=e.output.map((function(e){return e.replace(ge,be)})).map((function(e){return e.replace(he,be)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return V(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),E(Q),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,a=t.scrollLeft,i=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!==a&&(e.scrollLeft=a),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 i){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,i[p])}}),(function(e){return e}));var Ee,we,Se=(Ee=function(e){return a.forwardRef((function(t,n){var r=f(),u=a.useRef(!0),s=a.useRef(null),p=a.useRef(null),d=a.useCallback((function(e){var t=s.current;s.current=new D(e,(function(){var e=!1;p.current&&(e=g.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),a.useImperativeHandle(n,(function(){return N(p,u,r)})),d(t);var b,m=s.current.getValue(),h=(m.scrollTop,m.scrollLeft,c(m,["scrollTop","scrollLeft"])),v=(b=e,!l.fun(b)||b.prototype instanceof i.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 i.createElement(e,o({},h,{ref:v}))}))},void 0===(we=!1)&&(we=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=we?t[0].toLowerCase()+t.substring(1):t;return e[n]=Ee(n),e}),Ee)}),_e=Se(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Se,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=_e,t.a=_e,t.interpolate=function(e,t,n){return e&&new B(e,t,n)},t.Globals=M,t.useSpring=function(e){var t=l.fun(e),n=W(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=a.useRef(!1),r=l.fun(t),c=b(t),i=a.useRef(),u=W(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),o({},c,{config:b(c.config,e),attach:e>0&&function(){return i.current[e-1]}})})),s=u[0],f=u[1],p=u[2],d=a.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,a=i.current[r];return o({},e,{config:b(e.config||c.config,t),attach:a&&function(){return a}})}))}}),[e,c.reverse]);return a.useEffect((function(){n.current&&!r&&d(t)})),a.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),i=Y(r),u=i.lazy,s=void 0!==u&&u,l=(i.unique,i.reset),p=void 0!==l&&l,d=(i.enter,i.leave,i.update,i.onDestroyed),m=(i.keys,i.items,i.onFrame),g=i.onRest,h=i.onStart,v=i.ref,y=c(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=a.useRef(!1),E=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return a.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(E.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(E.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(E.current.instances).map((function(e){return e[1]}))}}})),E.current=function(e,t){var n=e.first,r=e.prevProps,a=c(e,["first","prevProps"]),i=Y(t),u=i.items,s=i.keys,l=i.initial,f=i.from,p=i.enter,d=i.leave,m=i.update,g=i.trail,h=void 0===g?0:g,v=i.unique,y=i.config,O=i.order,j=void 0===O?["enter","leave","update"]:O,E=Y(r),w=E.keys,S=E.items,_=o({},a.current),k=[].concat(a.deleted),R=Object.keys(_),P=new Set(R),C=new Set(s),x=s.filter((function(e){return!P.has(e)})),I=a.transitions.filter((function(e){return!e.destroyed&&!C.has(e.originalKey)})).map((function(e){return e.originalKey})),N=s.filter((function(e){return P.has(e)})),T=-h;for(;j.length;){switch(j.shift()){case"enter":x.forEach((function(e,t){v&&k.find((function(t){return t.originalKey===e}))&&(k=k.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],c=n&&void 0!==l?"initial":"enter";_[e]={slot:c,originalKey:e,key:v?String(e):K++,item:o,trail:T+=h,config:b(y,o,c),from:b(n&&void 0!==l?l||{}:f,o),to:b(p,o)}}));break;case"leave":I.forEach((function(e){var t=w.indexOf(e),n=S[t];k.unshift(o({},_[e],{slot:"leave",destroyed:!0,left:w[Math.max(0,t-1)],right:w[Math.min(w.length,t+1)],trail:T+=h,config:b(y,n,"leave"),to:b(d,n)})),delete _[e]}));break;case"update":N.forEach((function(e){var t=s.indexOf(e),n=u[t];_[e]=o({},_[e],{item:n,slot:"update",trail:T+=h,config:b(y,n,"update"),to:b(m,n)})}))}}var M=s.map((function(e){return _[e]}));return k.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[r],M.slice(t))})),o({},a,{changed:x.length||I.length||N.length,first:n&&0===x.length,transitions:M,current:_,deleted:k,prevProps:t})}(E.current,r),E.current.changed&&E.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,a=e.trail,i=e.key,u=e.item;E.current.instances.has(i)||E.current.instances.set(i,new z);var l=E.current.instances.get(i),f=o({},y,{to:r,from:n,config:c,ref:v,onRest:function(n){E.current.mounted&&(e.destroyed&&(v||s||$(E,i),d&&d(u)),!Array.from(E.current.instances).some((function(e){return!e[1].idle}))&&(v||s)&&E.current.deleted.length>0&&$(E),g&&g(u,t,n))},onStart:h&&function(){return h(u,t)},onFrame:m&&function(e){return m(u,t,e)},delay:a,reset:p&&"enter"===t});l.update(f),E.current.paused||l.start()})),a.useEffect((function(){return E.current.mounted=j.current=!0,function(){E.current.mounted=j.current=!1,Array.from(E.current.instances).map((function(e){return e[1].destroy()})),E.current.instances.clear()}}),[]),E.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:E.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=a.useRef();a.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 a=c.controllers;if(a.length){var i=n*t[r];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+i})})),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=W},function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return O}));var r=n(27),o=n.n(r),c=n(7),a=n.n(c),i=n(14),u=n.n(i),s=n(10),l=n.n(s),f=n(0),p=n(8),d=n(21),b=n.n(d);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e){var t=function(e,t){if("object"!==o()(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==o()(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o()(t)?t:String(t)}var v=Object(f.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}}),y=function(){return Object(f.useContext)(v)},O=function(e){var t=e.children,n=Object(f.useState)({}),r=l()(n,2),o=r[0],c=r[1],i=Object(f.useCallback)((function(e){return o[e]}),[o]),s=Object(f.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),d=Object(f.useCallback)((function(e){c((function(t){if(!t[e])return t;t[e];return u()(t,[e].map(h))}))}),[]),m=Object(f.useCallback)((function(){c({})}),[]),y=Object(f.useCallback)((function(e){e&&c((function(t){return e=Object(p.pickBy)(e,(function(e,n){return"string"==typeof e.message&&(!t.hasOwnProperty(n)||!b()(t[n],e))})),0===Object.values(e).length?t:g(g({},t),e)}))}),[]),O=Object(f.useCallback)((function(e,t){c((function(n){if(!n.hasOwnProperty(e))return n;var r=g(g({},n[e]),t);return b()(n[e],r)?n:g(g({},n),{},a()({},e,r))}))}),[]),j={getValidationError:i,setValidationErrors:y,clearValidationError:d,clearAllValidationErrors:m,hideValidationError:Object(f.useCallback)((function(e){O(e,{hidden:!0})}),[O]),showValidationError:Object(f.useCallback)((function(e){O(e,{hidden:!1})}),[O]),showAllValidationErrors:Object(f.useCallback)((function(){c((function(e){var t={};return Object.keys(e).forEach((function(n){e[n].hidden&&(t[n]=g(g({},e[n]),{},{hidden:!1}))})),0===Object.values(t).length?e:g(g({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:s};return React.createElement(v.Provider,{value:j},t)}},,,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 a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.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(11),o=n.n(r),c=n(14),a=n.n(c),i=n(68),u=(n(3),n(5)),s=n.n(u);n(156);t.a=function(e){var t=e.className,n=e.showSpinner,r=void 0!==n&&n,c=e.children,u=a()(e,["className","showSpinner","children"]),l=s()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return React.createElement(i.a,o()({className:l},u),r&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},c))}},function(e,t,n){"use strict";var r=n(19),o=n(6),c=n(17),a=n(0),i=n(28),u=n(11),s=n.n(u),l=n(14),f=n.n(l),p=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,o=f()(e,["className","size"]);return React.createElement(i.SVG,s()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},o),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},d=React.createElement(p,null),b=n(129),m=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=d;break;case"no-alt":t=b.a}return t?Object(a.cloneElement)(t,{size:e.size||20,className:e.className}):null};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icon,n=void 0===t?null:t,r=e.size,u=Object(c.a)(e,["icon","size"]);if("string"==typeof n)return Object(a.createElement)(m,Object(o.a)({icon:n},u));if(n&&m===n.type)return Object(a.cloneElement)(n,h({},u));var s=r||24;if("function"==typeof n)return n.prototype instanceof a.Component?Object(a.createElement)(n,h({size:s},u)):n(h({size:s},u));if(n&&("svg"===n.type||n.type===i.SVG)){var l=h(h({width:s,height:s},n.props),u);return Object(a.createElement)(i.SVG,l)}return Object(a.isValidElement)(n)?Object(a.cloneElement)(n,h({size:s},u)):n}},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(7),o=n.n(r),c=n(93),a=n(0);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(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,i=e.setIsSuppressed,s=Object(a.useRef)(t);Object(a.useEffect)((function(){s.current=t}),[t]);var l=Object(a.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(a.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:i})}},function(e,t,n){"use strict";(function(e){var r=n(0),o=n(8),c=n(5),a=n.n(c),i=n(36),u=n(1),s=(n(58),n(68));t.a=Object(r.forwardRef)((function(t,n){var c=t.className,l=t.children,f=t.spokenMessage,p=void 0===f?l:f,d=t.politeness,b=void 0===d?"polite":d,m=t.actions,g=void 0===m?[]:m,h=t.onRemove,v=void 0===h?o.noop:h;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(i.speak)(n,t)}),[n,t])}(p,b),Object(r.useEffect)((function(){var e=setTimeout((function(){v()}),1e4);return function(){return clearTimeout(e)}}),[]);var y=a()(c,"components-snackbar");return g&&g.length>1&&(void 0!==e&&e.env,g=[g[0]]),Object(r.createElement)("div",{ref:n,className:y,onClick:v,tabIndex:"0",role:"button",onKeyPress:v,"aria-label":Object(u.__)("Dismiss this notice")},Object(r.createElement)("div",{className:"components-snackbar__content"},l,g.map((function(e,t){var n=e.label,o=e.onClick,c=e.url;return Object(r.createElement)(s.a,{key:t,href:c,isTertiary:!0,onClick:function(e){e.stopPropagation(),o&&o(e)},className:"components-snackbar__action"},n)}))))}))}).call(this,n(74))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,c=Object(r.useRef)(null),a=Object(r.useRef)([]),i=n.leading,u=void 0===n.trailing||n.trailing,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),f=Object(r.useRef)(!1),p=Object(r.useRef)(e);p.current=e;var d=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(c.current),c.current=null,a.current=[],l.current=null,s.current=!1}),[]);Object(r.useEffect)((function(){return f.current=!1,function(){f.current=!0}}),[]);var b=Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];a.current=e,clearTimeout(l.current),s.current&&(s.current=!1),l.current||!i||s.current||(p.current.apply(p,e),s.current=!0),l.current=setTimeout((function(){var t=!0;i&&s.current&&(t=!1),d(),!f.current&&u&&t&&p.current.apply(p,e)}),t),o&&!c.current&&u&&(c.current=setTimeout((function(){var e=a.current;d(),f.current||p.current.apply(null,e)}),o))}),[o,t,d,i,u]),m=Object(r.useCallback)((function(){l.current&&(p.current.apply(null,a.current),d())}),[d]);return[b,d,m]}},function(e,t,n){"use strict";var r=n(5),o=n.n(r);n(3),n(166);t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-product-badge",n)},t)}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return C})),n.d(t,"a",(function(){return x}));var r=n(7),o=n.n(r),c=n(10),a=n.n(c),i=(n(3),n(0)),u=n(12),s=n(140),l=n(6),f=n(25),p=n.n(f);function d(e,t,n,r,o,c,a){try{var i=e[c](a),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){d(c,r,o,a,i,"next",e)}function i(e){d(c,r,o,a,i,"throw",e)}a(void 0)}))}}var m=n(16),g=n(5),h=n.n(g),v=n(8),y=n(78),O=n(161),j=n(89);var E=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,c=void 0===o?v.noop:o,a=Object(O.a)(),u=Object(i.useState)((function(){return new WeakMap})),s=Object(m.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=b(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=b(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:a});n=h()("components-snackbar-list",n);var d=function(e){return function(){return c(e.id)}};return Object(i.createElement)("div",{className:n},r,f.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(i.createElement)(y.animated.div,{key:n,style:r},Object(i.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(i.createElement)(j.a,Object(l.a)({},Object(v.omit)(t,["content"]),{onRemove:d(t)}),t.content)))})))},w=n(88),S=n(77),_=function(){var e=Object(S.a)().isEditor,t=Object(w.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 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 R(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){o()(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 P=Object(i.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),C=function(){return Object(i.useContext)(P)},x=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,b=p.removeNotice,m=Object(i.useState)(!1),g=a()(m,2),h=g[0],v=g[1],y=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]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(e,t,R(R({},n),{},{context:n.context||f}))}),[d,f]),O=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;b(e,t)}),[b,f]),j=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]:{};y("default",e,R(R({},t),{},{type:"snackbar"}))}),[y]),E={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},w=h?null:React.createElement(s.a,{className:r,notices:E.notices}),S=h?null:React.createElement(_,null);return React.createElement(P.Provider,{value:E},c&&w,t,S)}},,function(e,t,n){var r=n(60);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},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.")}},,,function(e,t){!function(){e.exports=this.wp.wordcount}()},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=n(5),u=n.n(i);n(3),n(165);t.a=function(e){var t=e.children,n=e.className,r=e.headingLevel,c=a()(e,["children","className","headingLevel"]),i=u()("wc-block-components-title",n),s="h".concat(r);return React.createElement(s,o()({className:i},c),t)}},function(e,t,n){"use strict";var r=n(2),o=n.n(r);function c(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 a(){return(a=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)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(){}function f(){}f.resetWarningCache=l;var p=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,o,c){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==c){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:f,resetWarningCache:l};return n.PropTypes=n,n}()}));function d(){}function b(e){return!!(e||"").match(/\d/)}function m(e){return null==e}function g(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function h(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),c=o[0],a=o[1]||"";return{beforeDecimal:c,afterDecimal:a,hasNagation:n,addNegation:r}}function v(e,t,n){for(var r="",o=n?"0":"",c=0;c<=t-1;c++)r+=e[c]||o;return r}function y(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function O(e,t,n){return Math.min(Math.max(e,t),n)}function j(e){return Math.max(e.selectionStart,e.selectionEnd)}var E={thousandSeparator:p.oneOfType([p.string,p.oneOf([!0])]),decimalSeparator:p.string,allowedDecimalSeparators:p.arrayOf(p.string),thousandsGroupStyle:p.oneOf(["thousand","lakh","wan"]),decimalScale:p.number,fixedDecimalScale:p.bool,displayType:p.oneOf(["input","text"]),prefix:p.string,suffix:p.string,format:p.oneOfType([p.string,p.func]),removeFormatting:p.func,mask:p.oneOfType([p.string,p.arrayOf(p.string)]),value:p.oneOfType([p.number,p.string]),defaultValue:p.oneOfType([p.number,p.string]),isNumericString:p.bool,customInput:p.elementType,allowNegative:p.bool,allowEmptyFormatting:p.bool,allowLeadingZeros:p.bool,onValueChange:p.func,onKeyDown:p.func,onMouseUp:p.func,onChange:p.func,onFocus:p.func,onBlur:p.func,type:p.oneOf(["text","tel","password"]),isAllowed:p.func,renderText:p.func,getInputRef:p.oneOfType([p.func,p.shape({current:p.any})])},w={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:d,onChange:d,onKeyDown:d,onMouseUp:d,onFocus:d,onBlur:d,isAllowed:function(){return!0}},S=function(e){function t(e){var n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,n=!(o=i(t).call(this,e))||"object"!=typeof o&&"function"!=typeof o?s(r):o;var c=e.defaultValue;n.validateProps();var a=n.formatValueProp(c);return n.state={value:a,numAsString:n.removeFormatting(a)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(s(n)),n.onKeyDown=n.onKeyDown.bind(s(n)),n.onMouseUp=n.onMouseUp.bind(s(n)),n.onFocus=n.onFocus.bind(s(n)),n.onBlur=n.onBlur.bind(s(n)),n}var n,r,l;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,c=n.numAsString,a=void 0===c?"":c;if(e!==t){this.validateProps();var i=this.formatNumString(a),u=m(t.value)?i:this.formatValueProp(),s=this.removeFormatting(u),l=parseFloat(s),f=parseFloat(a);(isNaN(l)&&isNaN(f)||l===f)&&i===o&&(null!==r||u===o)||this.updateValue({formattedValue:u,numAsString:s,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),c="-"===e[0];c&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var a=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==a&&(e="".concat(e.substring(0,a),".").concat(e.substring(a+1,e.length).replace(new RegExp(g(r),"g"),""))),c&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,c=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!c||0===o||t||r?"":"|"+g(c)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){y(e,t),setTimeout((function(){e.value===n&&y(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,c=r.suffix,a=r.format;if(""===e)return 0;if(t=O(t,0,e.length),!a){var i="-"===e[0];return O(t,o.length+(i?1:0),e.length-c.length)}if("function"==typeof a)return t;if("#"===a[t]&&b(e[t]))return t;if("#"===a[t-1]&&b(e[t-1]))return t;var u=a.indexOf("#");t=O(t,u,a.lastIndexOf("#")+1);for(var s=a.substring(t,a.length).indexOf("#"),l=t,f=t+(-1===s?0:s);l>u&&("#"!==a[l]||!b(e[l]));)l-=1;return!b(e[f])||"left"===n&&t!==u||t-l<f-t?b(e[l])?l+1:l:f}},{key:"getCaretPosition",value:function(e,t,n){var r,o,c=this.props.format,a=this.state.value,i=this.getNumberRegex(!0),u=(e.match(i)||[]).join(""),s=(t.match(i)||[]).join("");for(r=0,o=0;o<n;o++){var l=e[o]||"",f=t[r]||"";if((l.match(i)||l===f)&&("0"!==l||!f.match(i)||"0"===f||u.length===s.length)){for(;l!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof c||a||(r=t.length),r=this.correctCaretPosition(t,r)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var c="-"===e[0];c&&(e=e.substring(1,e.length));var a=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(o);e=o&&-1!==a&&a===e.length-o.length?e.substring(0,a):e,c&&(e="-"+e)}return e}},{key:"removePatternFormatting",value:function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",o=0,c=t.length;o<=c;o++){var a=t[o]||"",i=o===c?e.length:e.indexOf(a,n);if(-1===i){r=e;break}r+=e.substring(n,i),n=i+a.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,n=0,r=t.split(""),o=0,c=t.length;o<c;o++)"#"===t[o]&&(r[o]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,c=t.suffix,a=t.allowNegative,i=t.thousandsGroupStyle,u=this.getSeparators(),s=u.thousandSeparator,l=u.decimalSeparator,f=-1!==e.indexOf(".")||n&&r,p=h(e,a),d=p.beforeDecimal,b=p.afterDecimal,m=p.addNegation;return void 0!==n&&(b=v(b,n,r)),s&&(d=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(d,s,i)),o&&(d=o+d),c&&(b+=c),m&&(d="-"+d),e=d+(f&&l||"")+b}},{key:"formatNumString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return o=""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,c=t.allowEmptyFormatting,a=this.props,i=a.value,u=a.isNumericString,s=!(i=m(i)?e:i)&&0!==i;return s&&c&&(i=""),s&&!c?"":("number"==typeof i&&(i=i.toString(),u=!0),"Infinity"===i&&u&&(i=""),u&&!n&&"number"==typeof r&&(i=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=h(e),c=o.beforeDecimal,a=o.afterDecimal,i=o.hasNagation,u=parseFloat("0.".concat(a||"0")).toFixed(t).split("."),s=c.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),l=v(u[1]||"",Math.min(t,a.length),n),f=r?".":"";return"".concat(i?"-":"").concat(s).concat(f).concat(l)}(i,r,o)),u?this.formatNumString(i):this.formatInput(i))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),c=r.test(e);return e=e.replace(/-/g,""),o&&!c&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,c=n.suffix,a=n.decimalScale,i=n.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-c.length||a&&i&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;r<t;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(e,t,n){var r=this.props,o=r.format,c=r.allowNegative,a=r.prefix,i=r.suffix,u=r.decimalScale,s=this.getSeparators(),l=s.allowedDecimalSeparators,f=s.decimalSeparator,p=this.state.numAsString||"",d=this.selectionBeforeInput,b=d.selectionStart,m=d.selectionEnd,g=function(e,t){for(var n=0,r=0,o=e.length,c=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[c-1-r]&&c-r>n&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),v=g.start,y=g.end;if(!o&&v===y&&-1!==l.indexOf(n[b])){var O=0===u?"":f;return n.substr(0,b)+O+n.substr(b+1,n.length)}var j=o?0:a.length,E=t.length-(o?0:i.length);if(n.length>t.length||!n.length||v===y||0===b&&m===t.length||b===j&&m===E)return n;if(this.checkIfFormatGotDeleted(v,y,t)&&(n=t),!o){var w=this.removeFormatting(n),S=h(w,c),_=S.beforeDecimal,k=S.afterDecimal,R=S.addNegation,P=e<n.indexOf(f)+1;if(w.length<p.length&&P&&""===_&&!parseFloat(k))return R?"-":""}return n}},{key:"updateValue",value:function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition,o=void 0===r||r,c=e.numAsString,a=e.caretPos,i=this.props.onValueChange,u=this.state.value;if(n)if(o){if(!a){var s=e.inputValue||n.value,l=j(n);n.value=t,a=this.getCaretPosition(s,t,l)}this.setPatchedCaretPosition(n,a,t)}else n.value=t;void 0===c&&(c=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:c}),i(this.getValueObject(t,c)))}},{key:"onChange",value:function(e){var t=e.target,n=t.value,r=this.state,o=this.props,c=o.isAllowed,a=r.value||"",i=j(t);n=this.correctInputValue(i,a,n);var u=this.formatInput(n)||"",s=this.removeFormatting(u);c(this.getValueObject(u,s))||(u=a),this.updateValue({formattedValue:u,numAsString:s,inputValue:n,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,c=t.allowLeadingZeros,a=n.numAsString,i=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),!r){isNaN(parseFloat(a))&&(a=""),c||(a=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return"".concat(t?"-":"").concat(r).concat(o?".".concat(o):"")}(a));var u=this.formatNumString(a);if(u!==i)return this.updateValue({formattedValue:u,numAsString:a,input:e.target,setCaretPosition:!1}),void o(e)}o(e)}},{key:"onKeyDown",value:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,c=n.selectionEnd,a=n.value,i=void 0===a?"":a,u=this.props,s=u.decimalScale,l=u.fixedDecimalScale,f=u.prefix,p=u.suffix,d=u.format,b=u.onKeyDown,m=void 0!==s&&l,g=this.getNumberRegex(!1,m),h=new RegExp("-"),v="string"==typeof d;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:c},"ArrowLeft"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(t=o),void 0!==t&&o===c){var y=t,O=v?d.indexOf("#"):f.length,j=v?d.lastIndexOf("#")+1:i.length-p.length;if("ArrowLeft"===r||"ArrowRight"===r){var E="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(i,t,E)}else if("Delete"!==r||g.test(i[t])||h.test(i[t])){if("Backspace"===r&&!g.test(i[t]))if(o<=O+1&&"-"===i[0]&&void 0===d){var w=i.substring(1);this.updateValue({formattedValue:w,caretPos:y,input:n})}else if(!h.test(i[t])){for(;!g.test(i[y-1])&&y>O;)y--;y=this.correctCaretPosition(i,y,"left")}}else for(;!g.test(i[y])&&y<j;)y++;(y!==t||t<O||t>j)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,i)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,i),b(e)}else b(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,c=void 0===o?"":o;if(n===r){var a=this.correctCaretPosition(c,n);a!==n&&this.setPatchedCaretPosition(t,a,c)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,c=n.value,a=void 0===c?"":c,i=t.correctCaretPosition(a,r);i===r||0===r&&o===a.length||t.setPatchedCaretPosition(n,i,a),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,c=r.type,i=r.displayType,u=r.customInput,s=r.renderText,l=r.getInputRef,f=r.format,p=this.state.value,d=(e=this.props,t=E,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),b=a({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(f)?"numeric":void 0},d,{type:c,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===i)return s?s(p)||null:o.a.createElement("span",a({},d,{ref:l}),p);if(u){var m=u;return o.a.createElement(m,a({},b,{ref:l}))}return o.a.createElement("input",a({},b,{ref:l}))}}])&&c(n.prototype,r),l&&c(n,l),t}(o.a.Component);S.propTypes=E,S.defaultProps=w,t.a=S},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(31),a=n.n(c),i=n(32),u=n.n(i),s=n(20),l=n.n(s),f=n(33),p=n.n(f),d=n(34),b=n.n(d),m=n(24),g=n.n(m),h=n(7),v=n.n(h),y=n(2);n(131);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=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=O(r);function r(){var e;return a()(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(React.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";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function c(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return o(n.overflowY,t)||o(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function a(e,t,n,r,o,c,a,i){return c<e&&a>t||c>e&&a<t?0:c<=e&&i<=n||a>=t&&i>=n?c-e-r:a>t&&i<n||c<e&&i>n?a-t+o:0}t.a=function(e,t){var n=window,o=t.scrollMode,i=t.block,u=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,f="function"==typeof s?s:function(e){return e!==s};if(!r(e))throw new TypeError("Invalid target");for(var p=document.scrollingElement||document.documentElement,d=[],b=e;r(b)&&f(b);){if((b=b.parentNode)===p){d.push(b);break}b===document.body&&c(b)&&!c(document.documentElement)||c(b,l)&&d.push(b)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),O=y.height,j=y.width,E=y.top,w=y.right,S=y.bottom,_=y.left,k="start"===i||"nearest"===i?E:"end"===i?S:E+O/2,R="center"===u?_+j/2:"end"===u?w:_,P=[],C=0;C<d.length;C++){var x=d[C],I=x.getBoundingClientRect(),N=I.height,T=I.width,M=I.top,D=I.right,A=I.bottom,L=I.left;if("if-needed"===o&&E>=0&&_>=0&&S<=g&&w<=m&&E>=M&&S<=A&&_>=L&&w<=D)return P;var F=getComputedStyle(x),V=parseInt(F.borderLeftWidth,10),B=parseInt(F.borderTopWidth,10),U=parseInt(F.borderRightWidth,10),q=parseInt(F.borderBottomWidth,10),H=0,z=0,W="offsetWidth"in x?x.offsetWidth-x.clientWidth-V-U:0,K="offsetHeight"in x?x.offsetHeight-x.clientHeight-B-q:0;if(p===x)H="start"===i?k:"end"===i?k-g:"nearest"===i?a(v,v+g,g,B,q,v+k,v+k+O,O):k-g/2,z="start"===u?R:"center"===u?R-m/2:"end"===u?R-m:a(h,h+m,m,V,U,h+R,h+R+j,j),H=Math.max(0,H+v),z=Math.max(0,z+h);else{H="start"===i?k-M-B:"end"===i?k-A+q+K:"nearest"===i?a(M,A,N,B,q+K,k,k+O,O):k-(M+N/2)+K/2,z="start"===u?R-L-V:"center"===u?R-(L+T/2)+W/2:"end"===u?R-D+U+W:a(L,D,T,V,U+W,R,R+j,j);var G=x.scrollLeft,Y=x.scrollTop;k+=Y-(H=Math.max(0,Math.min(Y+H,x.scrollHeight-N+K))),R+=G-(z=Math.max(0,Math.min(G+z,x.scrollWidth-T+W)))}P.push({el:x,top:H,left:z})}return P}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),c=n(7),a=n.n(c),i=n(0),u=n(43);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){a()(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,a=e.getErrorBoundaryProps,s=void 0===a?function(){}:a;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=c(e,n),a=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(i.render)(React.createElement(u.a,a,React.createElement(i.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,a=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(a,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:a,getProps:n,getErrorBoundaryProps:r})},b=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,a,i;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,c=n.getErrorBoundaryProps,a=n.selector,i=n.wrapper.querySelectorAll(a),p({Block:r,containers:i,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){},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(7),o=n.n(r),c=n(15),a=n(12),i=n(77),u=n(22),s=n(8);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 f(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){o()(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}var p={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},d=f(f({},p),{},{email:"",phone:""}),b=function(e){return Object(s.mapValues)(e,(function(e){return Object(u.decodeEntities)(e)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:d,shippingAddress:p,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(i.a)(),n=t.isEditor,r=t.previewData,o=(null==r?void 0:r.previewCart)||{},u=e.shouldSelect,s=Object(a.useSelect)((function(e,t){var r=t.dispatch;if(!u)return m;if(n)return{cartCoupons:o.coupons,cartItems:o.items,cartFees:o.fees,cartItemsCount:o.items_count,cartItemsWeight:o.items_weight,cartNeedsPayment:o.needs_payment,cartNeedsShipping:o.needs_shipping,cartItemErrors:[],cartTotals:o.totals,cartIsLoading:!1,cartErrors:[],billingAddress:d,shippingAddress:p,extensions:{},shippingRates:o.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:o.has_calculated_shipping,paymentRequirements:o.paymentRequirements,receiveCart:"function"==typeof(null==o?void 0:o.receiveCart)?o.receiveCart:function(){}};var a=e(c.CART_STORE_KEY),i=a.getCartData(),s=a.getCartErrors(),l=a.getCartTotals(),f=!a.hasFinishedResolution("getCartData"),g=a.isCustomerDataUpdating(),h=r(c.CART_STORE_KEY).receiveCart,v=b(i.billingAddress),y=i.needsShipping?b(i.shippingAddress):v;return{cartCoupons:i.coupons,cartItems:i.items||[],cartFees:i.fees||[],cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors||[],cartTotals:l,cartIsLoading:f,cartErrors:s,billingAddress:v,shippingAddress:y,extensions:i.extensions||{},shippingRates:i.shippingRates||[],shippingRatesLoading:g,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements||[],receiveCart:h}}),[u]);return s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return s}));var r=n(25),o=n.n(r),c=n(48),a=n.n(c),i=n(1),u=function(){var e=a()(o.a.mark((function e(t){var n;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 n=e.sent,e.abrupt("return",{message:n.message,type:n.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),s=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return f}));var r=n(7),o=n.n(r),c=n(8);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 i(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 u="add_event_callback",s="remove_event_callback",l={addEventCallback:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(c.uniqueId)(),type:u,eventType:e,callback:t,priority:n}},removeEventCallback:function(e,t){return{id:t,type:s,eventType:e}}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.eventType,c=t.id,a=t.callback,l=t.priority,f=new Map(e[r]);switch(n){case u:return f.set(c,{priority:l,callback:a}),i(i({},e),{},o()({},r,f));case s:return f.delete(c),i(i({},e),{},o()({},r,f))}return e}},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=n(1),a=n(45),i=n(5),u=n.n(i),s=(n(3),n(154),function(e){var t=e.className,n=e.currency,r=e.maxPrice,o=e.minPrice,c=e.priceClassName,i=e.priceStyle;return React.createElement("span",{className:t},React.createElement(a.a,{className:u()("wc-block-components-product-price__value",c),currency:n,value:o,style:i})," — ",React.createElement(a.a,{className:u()("wc-block-components-product-price__value",c),currency:n,value:r,style:i}))}),l=function(e){var t=e.className,n=e.currency,r=e.regularPriceClassName,o=e.regularPriceStyle,i=e.regularPrice,s=e.priceClassName,l=e.priceStyle,f=e.price;return React.createElement("span",{className:t},React.createElement("span",{className:"screen-reader-text"},Object(c.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(a.a,{currency:n,renderText:function(e){return React.createElement("del",{className:u()("wc-block-components-product-price__regular",r),style:o},e)},value:i}),React.createElement("span",{className:"screen-reader-text"},Object(c.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(a.a,{currency:n,renderText:function(e){return React.createElement("ins",{className:u()("wc-block-components-product-price__value","is-discounted",s),style:l},e)},value:f}))};t.a=function(e){var t=e.align,n=e.className,r=e.currency,c=e.maxPrice,i=void 0===c?null:c,f=e.minPrice,p=void 0===f?null:f,d=e.price,b=void 0===d?null:d,m=e.priceClassName,g=e.priceStyle,h=e.regularPrice,v=e.regularPriceClassName,y=e.regularPriceStyle,O=u()(n,"price","wc-block-components-product-price",o()({},"wc-block-components-product-price--align-".concat(t),t));return h&&b!==h?React.createElement(l,{className:O,currency:r,price:b,priceClassName:m,priceStyle:g,regularPrice:h,regularPriceClassName:v,regularPriceStyle:y}):null!==p&&null!==i?React.createElement(s,{className:O,currency:r,maxPrice:i,minPrice:p,priceClassName:m,priceStyle:g}):null!==b?React.createElement("span",{className:O},React.createElement(a.a,{className:u()("wc-block-components-product-price__value",m),currency:r,value:b,style:g})):React.createElement("span",{className:O},React.createElement("span",{className:u()("wc-block-components-product-price__value",m)}))}},function(e,t,n){"use strict";var r=n(31),o=n.n(r),c=n(32),a=n.n(c),i=n(20),u=n.n(i),s=n(33),l=n.n(s),f=n(34),p=n.n(f),d=n(24),b=n.n(d),m=n(7),g=n.n(m),h=n(1),v=n(2),y=n(140),O=(n(3),n(9));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=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var E=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),a=0;a<r;a++)c[a]=arguments[a];return e=t.call.apply(t,[this].concat(c)),g()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(n,[{key:"render",value:function(){var e=this.state,t=e.hasError,n=e.errorMessage,r=this.props.isEditor;if(t){var o=Object(h.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(r||O.j)&&(o=n||Object(h.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));var c=[{id:"0",content:o,isDismissible:!1,status:"error"}];return React.createElement(y.a,{notices:c})}return this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{errorMessage:e.message,hasError:!0}}}]),n}(v.Component);E.defaultProps={isEditor:!1},t.a=E},function(e,t,n){"use strict";var r=n(0),o=n(8),c=n(5),a=n.n(c),i=n(1),u=n(36),s=n(118),l=n(68);t.a=function(e){var t=e.className,n=e.status,c=void 0===n?"info":n,f=e.children,p=e.spokenMessage,d=void 0===p?f:p,b=e.onRemove,m=void 0===b?o.noop:b,g=e.isDismissible,h=void 0===g||g,v=e.actions,y=void 0===v?[]:v,O=e.politeness,j=void 0===O?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(c):O,E=e.__unstableHTML;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(u.speak)(n,t)}),[n,t])}(d,j);var w=a()(t,"components-notice","is-"+c,{"is-dismissible":h});return E&&(f=Object(r.createElement)(r.RawHTML,null,f)),Object(r.createElement)("div",{className:w},Object(r.createElement)("div",{className:"components-notice__content"},f,y.map((function(e,t){var n=e.className,o=e.label,c=e.isPrimary,i=e.noDefaultClasses,u=void 0!==i&&i,s=e.onClick,f=e.url;return Object(r.createElement)(l.a,{key:t,href:f,isPrimary:c,isSecondary:!u&&!f,isLink:!u&&!!f,onClick:f?void 0:s,className:a()("components-notice__action",n)},o)}))),h&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:s.a,label:Object(i.__)("Dismiss this notice"),onClick:m,showTooltip:!1}))}},function(e,t,n){"use strict";var r=n(0),o=n(28),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},function(e,t,n){"use strict";var r={globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}};function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i={normalizePrecision:function(e){var t=e.reduce((function(e,t){return Math.max(e.getPrecision(),t.getPrecision())}));return e.map((function(e){return e.getPrecision()!==t?e.convertPrecision(t):e}))},minimum:function(e){var t=c(e),n=t[0],r=t.slice(1),o=n;return r.forEach((function(e){o=o.lessThan(e)?o:e})),o},maximum:function(e){var t=c(e),n=t[0],r=t.slice(1),o=n;return r.forEach((function(e){o=o.greaterThan(e)?o:e})),o}};function u(e){return!isNaN(parseInt(e))&&isFinite(e)}function s(e){return e%2==0}function l(e){return u(e)&&!Number.isInteger(e)}function f(e){return Math.abs(e)%1==.5}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in t)e.setRequestHeader(n,t[n]);return e}function d(e){return void 0===e}function b(){var e=function(e,t){var n=function(e){return Math.pow(10,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e.toString();if(t.indexOf("e-")>0)return parseInt(t.split("e-")[1]);var n=t.split(".")[1];return n?n.length:0}(e))},r=Math.max(n(e),n(t));return Math.round(e*r)*Math.round(t*r)/(r*r)},t={HALF_ODD:function(e){var t=Math.round(e);return f(e)&&s(t)?t-1:t},HALF_EVEN:function(e){var t=Math.round(e);return f(e)?s(t)?t:t-1:t},HALF_UP:function(e){return Math.round(e)},HALF_DOWN:function(e){return f(e)?Math.floor(e):Math.round(e)},HALF_TOWARDS_ZERO:function(e){return f(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e)},HALF_AWAY_FROM_ZERO:function(e){return f(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e)},DOWN:function(e){return Math.floor(e)}};return{add:function(e,t){return e+t},subtract:function(e,t){return e-t},multiply:function(t,n){return l(t)||l(n)?e(t,n):t*n},divide:function(e,t){return e/t},modulo:function(e,t){return e%t},round:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HALF_EVEN";return t[n](e)}}}var m=b();function g(e){var t=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(e);return{getMatches:function(){return null!==t?t.slice(1).filter((function(e){return!d(e)})):[]},getMinimumFractionDigits:function(){var e=function(e){return"."===e};return d(this.getMatches().find(e))?0:this.getMatches()[m.add(this.getMatches().findIndex(e),1)].split("").length},getCurrencyDisplay:function(){return{USD:"code",dollar:"name",$:"symbol"}[this.getMatches().find((function(e){return"USD"===e||"dollar"===e||"$"===e}))]},getStyle:function(){return d(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!d(this.getMatches().find((function(e){return","===e})))}}}function h(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;for(var n in t)e=e.replace("{{".concat(n,"}}"),t[n]);return e},n=function(n,r){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var o=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){4===o.readyState&&(o.status>=200&&o.status<400?n(JSON.parse(o.responseText)):r(new Error(o.statusText)))},onerror:function(){r(new Error("Network error"))}});o.open("GET",e,!0),p(o,t.headers),o.send()}))}(t(e.endpoint,{from:n,to:r}),{headers:e.headers})};return{getExchangeRate:function(r,c){return(a=e.endpoint,!Boolean(a)||"object"!==o(a)&&"function"!=typeof a||"function"!=typeof a.then?n(r,c):e.endpoint).then((function(n){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",r={};return Object.entries(t).forEach((function(t){if("object"===o(t[1])){var c=e(t[1]);Object.entries(c).forEach((function(e){r[t[0]+n+e[0]]=e[1]}))}else r[t[0]]=t[1]})),r}(n)[t(e.propertyPath,{from:r,to:c})]}));var a}}}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Error;if(!e)throw new n(t)}function y(e){v(function(e){return u(e)&&e<=100&&e>=0}(e),"You must provide a numeric value between 0 and 100.",RangeError)}function O(e){v(Number.isInteger(e),"You must provide an integer.",TypeError)}var j=b(),E=Object.assign((function e(t){var n=Object.assign({},{amount:e.defaultAmount,currency:e.defaultCurrency,precision:e.defaultPrecision},t),r=n.amount,o=n.currency,c=n.precision;O(r),O(c);var a=e.globalLocale,i=e.globalFormat,u=e.globalRoundingMode,s=e.globalFormatRoundingMode,l=Object.assign({},e.globalExchangeRatesApi),f=function(t){var n=Object.assign({},Object.assign({},{amount:r,currency:o,precision:c},t),Object.assign({},{locale:this.locale},t));return Object.assign(e({amount:n.amount,currency:n.currency,precision:n.precision}),{locale:n.locale})},p=function(e){v(this.hasSameCurrency(e),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return r},getCurrency:function(){return o},getLocale:function(){return this.locale||a},setLocale:function(e){return f.call(this,{locale:e})},getPrecision:function(){return c},convertPrecision:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return O(e),f.call(this,{amount:j.round(j.multiply(this.getAmount(),Math.pow(10,j.subtract(e,this.getPrecision()))),t),precision:e})},add:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return f.call(this,{amount:j.add(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},subtract:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return f.call(this,{amount:j.subtract(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},multiply:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;return f.call(this,{amount:j.round(j.multiply(this.getAmount(),e),t)})},divide:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;return f.call(this,{amount:j.round(j.divide(this.getAmount(),e),t)})},percentage:function(e){return y(e),this.multiply(j.divide(e,100))},allocate:function(e){var t=this;!function(e){v(function(e){return e.length>0&&e.every((function(e){return e>=0}))&&e.some((function(e){return e>0}))}(e),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}(e);for(var n=e.reduce((function(e,t){return j.add(e,t)})),r=this.getAmount(),o=e.map((function(e){var o=Math.floor(j.divide(j.multiply(t.getAmount(),e),n));return r=j.subtract(r,o),f.call(t,{amount:o})})),c=0;r>0;)e[c]>0&&(o[c]=o[c].add(f.call(this,{amount:1})),r=j.subtract(r,1)),c+=1;return o},convert:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.endpoint,o=void 0===r?l.endpoint:r,c=n.propertyPath,a=void 0===c?l.propertyPath||"rates.{{to}}":c,i=n.headers,s=void 0===i?l.headers:i,p=n.roundingMode,b=void 0===p?u:p,m=Object.assign({},{endpoint:o,propertyPath:a,headers:s,roundingMode:b});return h(m).getExchangeRate(this.getCurrency(),e).then((function(n){return v(!d(n),'No rate was found for the destination currency "'.concat(e,'".'),TypeError),f.call(t,{amount:j.round(j.multiply(t.getAmount(),parseFloat(n)),m.roundingMode),currency:e})}))},equalsTo:function(e){return this.hasSameAmount(e)&&this.hasSameCurrency(e)},lessThan:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()<n[1].getAmount()},lessThanOrEqual:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()<=n[1].getAmount()},greaterThan:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()>n[1].getAmount()},greaterThanOrEqual:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()>=n[1].getAmount()},isZero:function(){return 0===this.getAmount()},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return 0!==j.modulo(this.getAmount(),Math.pow(10,c))},hasCents:function(){return 0!==j.modulo(this.getAmount(),Math.pow(10,c))},hasSameCurrency:function(e){return this.getCurrency()===e.getCurrency()},hasSameAmount:function(t){var n=e.normalizePrecision([this,t]);return n[0].getAmount()===n[1].getAmount()},toFormat:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=g(e);return this.toRoundedUnit(n.getMinimumFractionDigits(),t).toLocaleString(this.getLocale(),{currencyDisplay:n.getCurrencyDisplay(),useGrouping:n.getUseGrouping(),minimumFractionDigits:n.getMinimumFractionDigits(),style:n.getStyle(),currency:this.getCurrency()})},toUnit:function(){return j.divide(this.getAmount(),Math.pow(10,c))},toRoundedUnit:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=Math.pow(10,e);return j.divide(j.round(j.multiply(this.toUnit(),n),t),n)},toObject:function(){return{amount:r,currency:o,precision:c}},toJSON:function(){return this.toObject()}}}),{defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},r,i);t.a=E},function(e,t,n){"use strict";var r=n(1),o={first_name:{label:Object(r.__)("First name","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("First name (optional)","woo-gutenberg-products-block"),autocomplete:"given-name",autocapitalize:"sentences",required:!0,hidden:!1,index:1},last_name:{label:Object(r.__)("Last name","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Last name (optional)","woo-gutenberg-products-block"),autocomplete:"family-name",autocapitalize:"sentences",required:!0,hidden:!1,index:2},company:{label:Object(r.__)("Company","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Company (optional)","woo-gutenberg-products-block"),autocomplete:"organization",autocapitalize:"sentences",required:!1,hidden:!1,index:3},address_1:{label:Object(r.__)("Address","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Address (optional)","woo-gutenberg-products-block"),autocomplete:"address-line1",autocapitalize:"sentences",required:!0,hidden:!1,index:4},address_2:{label:Object(r.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Apartment, suite, etc. (optional)","woo-gutenberg-products-block"),autocomplete:"address-line2",autocapitalize:"sentences",required:!1,hidden:!1,index:5},country:{label:Object(r.__)("Country/Region","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Country/Region (optional)","woo-gutenberg-products-block"),autocomplete:"country",required:!0,hidden:!1,index:6},city:{label:Object(r.__)("City","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("City (optional)","woo-gutenberg-products-block"),autocomplete:"address-level2",autocapitalize:"sentences",required:!0,hidden:!1,index:7},state:{label:Object(r.__)("State/County","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("State/County (optional)","woo-gutenberg-products-block"),autocomplete:"address-level1",autocapitalize:"sentences",required:!0,hidden:!1,index:8},postcode:{label:Object(r.__)("Postal code","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Postal code (optional)","woo-gutenberg-products-block"),autocomplete:"postal-code",autocapitalize:"characters",required:!0,hidden:!1,index:9}};t.a=o},function(e,t,n){"use strict";e.exports=n(172)},function(e,t,n){"use strict";var r=n(6),o=n(0),c=n(8);var a=function(e,t){return function(n){var r=e(n),o=n.displayName,a=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(c.upperFirst)(Object(c.camelCase)(t)),"(").concat(a,")"),r}},i=new WeakMap;function u(e,t){return Object(o.useMemo)((function(){var n=function(e){var t=i.get(e)||0;return i.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}t.a=a((function(e){return function(t){var n=u(e);return Object(o.createElement)(e,Object(r.a)({},t,{instanceId:n}))}}),"withInstanceId")},,,function(e,t){},,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=n(28),u=function(e){var t=e.className,n=e.size,r=a()(e,["className","size"]);return React.createElement(i.SVG,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(7),o=n.n(r),c=n(14),a=n.n(c),i=n(2);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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,c=a()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.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(4),c=n(15),a=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(a.useSelect)((function(e,t){if(n.current){var r=e(c.SCHEMA_STORE_KEY),o=r.isResolving,a=r.hasFinishedResolution,i=t.dispatch(c.SCHEMA_STORE_KEY),u=i.receiveRoutes,s=i.startResolution,l=i.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||a("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=(n(3),n(22)),u=n(5),s=n.n(u);n(153);t.a=function(e){var t=e.className,n=void 0===t?"":t,r=e.disabled,c=void 0!==r&&r,u=e.name,l=e.permalink,f=void 0===l?"":l,p=a()(e,["className","disabled","name","permalink"]),d=s()("wc-block-components-product-name",n);return c?React.createElement("span",o()({className:d},p),Object(i.decodeEntities)(u)):React.createElement("a",o()({className:d,href:f},p),Object(i.decodeEntities)(u))}},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(100),c=n(87),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,"")},u=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"&hellip;",r=i(e),o=r.split(" ").splice(0,t).join(" ");return Object(c.autop)(u(o,n))},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&hellip;",o=i(e),a=o.slice(0,t);if(n)return Object(c.autop)(u(a,r));var s=a.match(/([\s]+)/g),l=s?s.length:0,f=o.slice(0,t+l);return Object(c.autop)(u(f,r))};t.a=function(e){var t=e.source,n=e.maxLength,i=void 0===n?15:n,u=e.countType,f=void 0===u?"words":u,p=e.className,d=void 0===p?"":p,b=Object(r.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",r=Object(c.autop)(e),i=Object(o.count)(r,n);if(i<=t)return r;var u=a(r),f=Object(o.count)(u,n);return f<=t?u:"words"===n?s(u,t):l(u,t,"characters_including_spaces"===n)}(t,i,f)}),[t,i,f]);return React.createElement(r.RawHTML,{className:d},b)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=function(e,t){return!!e.type&&e.type===t},o={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return r(e,o.SUCCESS)},i=function(e){return r(e,o.ERROR)},u=function(e){return r(e,o.FAIL)},s=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:o,noticeContexts:c,shouldRetry:s,isSuccessResponse:a,isErrorResponse:i,isFailResponse:u}}},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(3),n(5)),a=n.n(c),i=n(117),u=n(93),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=a()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(i.a,o()({key:"store-notice-"+e.id},e,{className:a()("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 a}));var r=n(2),o=n(90);function c(e,t){return e===t}function a(e,t,n){var a=n&&n.equalityFn?n.equalityFn:c,i=Object(r.useState)(e),u=i[0],s=i[1],l=Object(o.a)(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),f=l[0],p=l[1],d=l[2],b=Object(r.useRef)(e);return Object(r.useEffect)((function(){a(b.current,e)||(f(e),b.current=e)}),[e,f,a]),[u,p,d]}},,,,function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){"use strict";var r=n(14),o=n.n(r),c=n(1),a=n(0),i=(n(3),n(36)),u=n(76),s=n(35),l=n(151),f=function(e){var t=e.packages,n=e.collapse,r=e.showItems,c=e.collapsible,a=e.noResultsMessage;return t.length?t.map((function(e){var t=e.package_id,i=o()(e,["package_id"]);return React.createElement(s.ShippingRatesControlPackage,{key:t,packageId:t,packageData:i,collapsible:c,collapse:n,showItems:r,noResultsMessage:a})})):null};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,r=e.className,o=e.collapsible,p=void 0!==o&&o,d=e.noResultsMessage,b=e.renderOption;return Object(a.useEffect)((function(){if(!n){var e=Object(l.a)(t),r=Object(l.b)(t);1===e?Object(i.speak)(Object(c.sprintf)(Object(c._n)("%d shipping option was found.","%d shipping options were found.",r,"woo-gutenberg-products-block"),r)):Object(i.speak)(Object(c.sprintf)(Object(c._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(c.sprintf)(Object(c._n)("%d shipping option was found","%d shipping options were found",r,"woo-gutenberg-products-block"),r))}}),[n,t]),React.createElement(u.a,{isLoading:n,screenReaderLabel:Object(c.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},React.createElement(s.ExperimentalOrderShippingPackages.Slot,{className:r,collapsible:p,noResultsMessage:d,renderOption:b}),React.createElement(s.ExperimentalOrderShippingPackages,null,React.createElement(f,{packages:t,noResultsMessage:d})))}},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=n(188),a=n(187),i=n(0),u=n(77),s=n(152),l=n(116);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(){var e=Object(u.a)().isEditor,t=Object(s.b)(),n=t.setActivePaymentMethod,r=t.activePaymentMethod,o=t.paymentMethodData,f=t.setPaymentStatus,d=Object(c.a)(),b=Object(a.a)().paymentMethods,m=Object(i.useRef)(r),g=Object(i.useRef)(o),h=Object(i.useCallback)((function(e){return function(){m.current=r,g.current=o,f().started(),n(e)}}),[r,o,n,f]),v=Object(i.useCallback)((function(){n(m.current),g.current.isSavedToken&&f().success(g.current)}),[n,f]),y=Object.keys(b),O=y.length>0?y.map((function(t){var n=e?b[t].edit:b[t].content;return Object(i.isValidElement)(n)?React.createElement("li",{key:t,id:"express-payment-method-".concat(t)},Object(i.cloneElement)(n,p(p({},d),{},{onClick:h(t),onClose:v}))):null})):React.createElement("li",{key:"noneRegistered"},"No registered Payment Methods");return React.createElement(l.a,{isEditor:e},React.createElement("ul",{className:"wc-block-components-express-payment__event-buttons"},O))}},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=(n(3),n(5)),u=n.n(i),s=n(1),l=n(130),f=n(129),p=(n(111),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,c=e.element,i=void 0===c?"li":c,s=e.className,l=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,d=e.children,b=void 0===d?null:d,m=a()(e,["text","screenReaderText","element","className","radius","children"]),g=i,h=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),v=Boolean(r&&r!==t);return React.createElement(g,o()({className:h},m),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),b)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,c=void 0===r?"":r,i=e.disabled,d=void 0!==i&&i,b=e.onRemove,m=void 0===b?function(){}:b,g=e.removeOnAnyClick,h=void 0!==g&&g,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,j=a()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),E=h?"span":"button";if(!n){var w=O&&"string"==typeof O?O:v;n="string"!=typeof w?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),w)}var S={"aria-label":n,disabled:d,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},_=h?S:{},k=h?{"aria-hidden":!0}:S;return React.createElement(p,o()({},j,_,{className:u()(c,"is-removable"),element:h?"button":j.element,screenReaderText:O,text:v}),React.createElement(E,o()({className:"wc-block-components-chip__remove"},k),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var r=function(e){return e.length},o=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return ye})),n.d(t,"a",(function(){return Oe}));var r=n(47),o=n.n(r),c=n(10),a=n.n(c),i=n(0),u=n(4),s=n(138),l=n(88),f=n(7),p=n.n(f);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={PRISTINE:"pristine",STARTED:"started",PROCESSING:"processing",ERROR:"has_error",FAILED:"failed",SUCCESS:"success",COMPLETE:"complete"},g=b(b({},m),{},{SET_REGISTERED_PAYMENT_METHODS:"set_registered_payment_methods",SET_REGISTERED_EXPRESS_PAYMENT_METHODS:"set_registered_express_payment_methods",SET_SHOULD_SAVE_PAYMENT_METHOD:"set_should_save_payment_method"}),h={currentStatus:m.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},v={setPaymentStatus:function(){return{started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(e,t){}}},currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1},paymentStatuses:m,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:function(){},activeSavedToken:"",setActiveSavedToken:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){},onPaymentSuccess:function(){},onPaymentFail:function(){}},y=n(27),O=n.n(y);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=g.STARTED,S=g.ERROR,_=g.FAILED,k=g.SUCCESS,R=g.PROCESSING,P=g.PRISTINE,C=g.COMPLETE,x=g.SET_REGISTERED_PAYMENT_METHODS,I=g.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,N=g.SET_SHOULD_SAVE_PAYMENT_METHOD,T=function(e){return!("object"!==O()(e)||!e.isSavedToken)},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.paymentMethodData,o=t.shouldSavePaymentMethod,c=t.errorMessage,a=t.paymentMethods;switch(n){case w:return e.currentStatus!==w?E(E({},e),{},{currentStatus:w}):e;case S:return e.currentStatus!==S?E(E({},e),{},{currentStatus:S,errorMessage:c||e.errorMessage}):e;case _:return e.currentStatus!==_?E(E({},e),{},{currentStatus:_,paymentMethodData:r||e.paymentMethodData,errorMessage:c||e.errorMessage}):e;case k:return e.currentStatus!==k?E(E({},e),{},{currentStatus:k,paymentMethodData:r||e.paymentMethodData,hasSavedToken:T(r)}):e;case R:return e.currentStatus!==R?E(E({},e),{},{currentStatus:R,errorMessage:""}):e;case C:return e.currentStatus!==C?E(E({},e),{},{currentStatus:C}):e;case P:return E(E({},h),{},{currentStatus:P,paymentMethods:E({},e.paymentMethods),expressPaymentMethods:E({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case x:return E(E({},e),{},{paymentMethods:a});case I:return E(E({},e),{},{expressPaymentMethods:a});case N:return E(E({},e),{},{shouldSavePaymentMethod:o})}return e},D=g.ERROR,A=g.FAILED,L=g.SUCCESS,F=g.SET_REGISTERED_PAYMENT_METHODS,V=g.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,B=g.SET_SHOULD_SAVE_PAYMENT_METHOD,U=function(e){return{type:e}},q=function(e){var t=e.errorMessage,n=e.paymentMethodData;return{type:A,errorMessage:t,paymentMethodData:n}},H=function(e){var t=e.paymentMethodData;return{type:L,paymentMethodData:t}},z=n(25),W=n.n(z),K=n(48),G=n.n(K),Y=n(1),$=n(37),X=n(39),Q=n(112),Z=n(9),J=n(77),ee=n(64);function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=function(e,t,n,r){var o=Object(i.useState)(!1),c=a()(o,2),u=c[0],s=c[1],f=Object(J.a)().isEditor,d=Object(ee.b)(),b=d.selectedRates,m=d.shippingAddress,g=Object(X.a)(b),h=Object(X.a)(n),v=Object(Q.a)(),y=v.cartTotals,O=v.cartNeedsShipping,j=v.paymentRequirements,E=Object(i.useRef)({cartTotals:y,cartNeedsShipping:O,shippingAddress:m,selectedShippingMethods:g,paymentRequirements:j}),w=Object(l.a)().addErrorNotice;Object(i.useEffect)((function(){E.current={cartTotals:y,cartNeedsShipping:O,shippingAddress:m,selectedShippingMethods:g,paymentRequirements:j}}),[y,O,m,g,j]);var S=Object(i.useCallback)(G()(W.a.mark((function n(){var o,c,a,i,u,l,d;return W.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o={},c=function(e){o=ne(ne({},o),{},p()({},e.name,e))},a=0;case 3:if(!(a<h.length)){n.next=24;break}if(i=h[a],u=t[i]){n.next=8;break}return n.abrupt("continue",21);case 8:return n.prev=8,n.next=11,Promise.resolve(u.canMakePayment(E.current));case 11:if(!(l=n.sent)){n.next=16;break}if(!l.error){n.next=15;break}throw new Error(l.error.message);case 15:c(u);case 16:n.next=21;break;case 18:n.prev=18,n.t0=n.catch(8),(Z.j||f)&&(d=Object(Y.sprintf)(Object(Y.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),u.paymentMethodId),w("".concat(d," ").concat(n.t0),{context:r,id:"wc-".concat(u.paymentMethodId,"-registration-error")}));case 21:a++,n.next=3;break;case 24:e(o),s(!0);case 26:case"end":return n.stop()}}),n,null,[[8,18]])}))),[w,e,f,r,h,t]);return Object(i.useEffect)((function(){S()}),[S,y,g,j]),u},oe=n(66),ce=n(65),ae=n(114),ie=n(205),ue="payment_processing",se=n(206),le=n(79),fe=m.STARTED,pe=m.PROCESSING,de=m.COMPLETE,be=m.PRISTINE,me=m.ERROR,ge=m.FAILED,he=m.SUCCESS,ve=Object(i.createContext)(v),ye=function(){return Object(i.useContext)(ve)},Oe=function(e){var t=e.children,n=Object(oe.b)().setBillingData,r=Object(ce.b)(),c=r.isProcessing,f=r.isIdle,p=r.isCalculating,d=r.hasError,b=Object(s.a)(),g=b.isSuccessResponse,v=b.isErrorResponse,y=b.isFailResponse,O=b.noticeContexts,j=Object(i.useState)(""),E=a()(j,2),w=E[0],S=E[1],_=Object(i.useState)(""),k=a()(_,2),R=k[0],P=k[1],C=Object(i.useReducer)(ae.b,{}),x=a()(C,2),I=x[0],N=x[1],T=Object(i.useRef)(I),A=Object(J.a)(),L=A.isEditor,z=A.previewData,W=Object(i.useReducer)(M,h),K=a()(W,2),G=K[0],Y=K[1],X=Object(i.useCallback)((function(e){S(e),Y(U(be))}),[S,Y]),Q=Object(i.useCallback)((function(e){Y(function(e){return{type:F,paymentMethods:e}}(e))}),[Y]),te=Object(i.useCallback)((function(e){Y(function(e){return{type:V,paymentMethods:e}}(e))}),[Y]),ne=function(e){var t=Object($.getPaymentMethods)(),n=Object(s.a)().noticeContexts,r=new Set([].concat(o()(Z.q),o()(Object.keys(t))));return re(e,t,Array.from(r),n.PAYMENTS)}(Q),ye=function(e){var t=Object($.getExpressPaymentMethods)(),n=Object(s.a)().noticeContexts;return re(e,t,Object.keys(t),n.EXPRESS_PAYMENTS)}(te),Oe=Object(le.b)().setValidationErrors,je=Object(l.a)(),Ee=je.addErrorNotice,we=je.removeNotice,Se=Object(ee.b)().setShippingAddress,_e=Object(i.useCallback)((function(e){Y({type:B,shouldSavePaymentMethod:e})}),[Y]),ke=Object(i.useMemo)((function(){return L&&z.previewSavedPaymentMethods?z.previewSavedPaymentMethods:ne&&0!==Object.keys(G.paymentMethods).length?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(u.getSetting)("customerPaymentMethods",{}),n=Object.keys(t),r={};return n.forEach((function(n){var o=t[n].filter((function(t){var n,r=t.method.gateway;return r in e&&(null===(n=e[r].supports)||void 0===n?void 0:n.showSavedCards)}));o.length&&(r[n]=o)})),r}(G.paymentMethods):{}}),[L,z.previewSavedPaymentMethods,ne,G.paymentMethods]),Re=Object(i.useCallback)((function(e){e?Ee(e,{id:"wc-express-payment-error",context:O.EXPRESS_PAYMENTS}):we("wc-express-payment-error",O.EXPRESS_PAYMENTS)}),[Ee,O.EXPRESS_PAYMENTS,we]);Object(i.useEffect)((function(){T.current=I}),[I]);var Pe=Object(i.useMemo)((function(){return(e=N,{onPaymentProcessing:Object(ie.a)(ue,e)}).onPaymentProcessing;var e}),[N]),Ce=Object(i.useMemo)((function(){return{isPristine:G.currentStatus===be,isStarted:G.currentStatus===fe,isProcessing:G.currentStatus===pe,isFinished:[me,ge,he].includes(G.currentStatus),hasError:G.currentStatus===me,hasFailed:G.currentStatus===ge,isSuccessful:G.currentStatus===he}}),[G.currentStatus]),xe=Object(i.useCallback)((function(){return{started:function(){return Y(U(fe))},processing:function(){return Y(U(pe))},completed:function(){return Y(U(de))},error:function(e){return Y(function(e){return{type:D,errorMessage:e}}(e))},failed:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r&&n(r),Y(q({errorMessage:e,paymentMethodData:t}))},success:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t&&n(t),null!==r&&null!=r&&r.address&&Se(r.address),Y(H({paymentMethodData:e}))}}}),[Y,n,Se]);Object(i.useEffect)((function(){!c||d||p||Ce.isFinished||xe().processing()}),[c,d,p,Ce.isFinished,xe]),Object(i.useEffect)((function(){f&&!Ce.isSuccessful&&Y(U(be))}),[f,Ce.isSuccessful]),Object(i.useEffect)((function(){d&&Ce.isSuccessful&&!G.hasSavedToken&&Y(U(be))}),[d,Ce.isSuccessful,G.hasSavedToken]),Object(i.useEffect)((function(){var e=Object.keys(G.paymentMethods),t=[].concat(o()(e),o()(Object.keys(G.expressPaymentMethods)));ne&&e.length&&S((function(e){return e&&t.includes(e)?e:(Y(U(be)),Object.keys(G.paymentMethods)[0])}))}),[ne,G.paymentMethods,G.expressPaymentMethods,S]),Object(i.useEffect)((function(){Ce.isProcessing&&(we("wc-payment-error",O.PAYMENTS),Object(se.b)(T.current,ue,{}).then((function(e){var t,n,r;if(g(e))xe().success(null==e||null===(t=e.meta)||void 0===t?void 0:t.paymentMethodData,null==e||null===(n=e.meta)||void 0===n?void 0:n.billingData,null==e||null===(r=e.meta)||void 0===r?void 0:r.shippingData);else if(y(e)){var o,c;e.message&&e.message.length&&Ee(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||O.PAYMENTS}),xe().failed(null==e?void 0:e.message,null==e||null===(o=e.meta)||void 0===o?void 0:o.paymentMethodData,null==e||null===(c=e.meta)||void 0===c?void 0:c.billingData)}else v(e)?(e.message&&e.message.length&&Ee(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||O.PAYMENTS}),xe().error(e.message),Oe(null==e?void 0:e.validationErrors)):xe().success()})))}),[Ce.isProcessing,Oe,xe,we,O.PAYMENTS,g,y,v,Ee]);var Ie={setPaymentStatus:xe,currentStatus:Ce,paymentStatuses:m,paymentMethodData:G.paymentMethodData,errorMessage:G.errorMessage,activePaymentMethod:w,setActivePaymentMethod:X,activeSavedToken:R,setActiveSavedToken:P,onPaymentProcessing:Pe,customerPaymentMethods:ke,paymentMethods:G.paymentMethods,expressPaymentMethods:G.expressPaymentMethods,paymentMethodsInitialized:ne,expressPaymentMethodsInitialized:ye,setExpressPaymentError:Re,shouldSavePayment:G.shouldSavePaymentMethod,setShouldSavePayment:_e};return React.createElement(ve.Provider,{value:Ie},t)}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,function(e,t,n){"use strict";var r=n(75),o=n.n(r);t.a=o.a},function(e,t,n){"use strict";(function(e){var r=n(57),o="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Trident")>=0,c=e.env.FORCE_REDUCED_MOTION||o?function(){return!0}:function(){return Object(r.a)("(prefers-reduced-motion: reduce)")};t.a=c}).call(this,n(74))},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";
7
- /** @license React v16.13.1
8
- * react-is.production.min.js
9
- *
10
- * Copyright (c) Facebook, Inc. and its affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,c=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,j=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case p:case a:case u:case i:case b:return e;default:switch(e=e&&e.$$typeof){case l:case d:case h:case g:case s:return e;default:return t}}case c:return t}}}function w(e){return E(e)===p}t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=d,t.Fragment=a,t.Lazy=h,t.Memo=g,t.Portal=c,t.Profiler=u,t.StrictMode=i,t.Suspense=b,t.isAsyncMode=function(e){return w(e)||E(e)===f},t.isConcurrentMode=w,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return E(e)===d},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===h},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===c},t.isProfiler=function(e){return E(e)===u},t.isStrictMode=function(e){return E(e)===i},t.isSuspense=function(e){return E(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===u||e===i||e===b||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===s||e.$$typeof===l||e.$$typeof===d||e.$$typeof===y||e.$$typeof===O||e.$$typeof===j||e.$$typeof===v)},t.typeOf=E},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(22),a=n(9);n(3);t.a=function(e){var t=e.image,n=void 0===t?{}:t,r={src:n.thumbnail||a.r,alt:Object(c.decodeEntities)(n.alt)||""};return React.createElement("img",o()({},r,{alt:r.alt}))}},function(e,t,n){"use strict";var r=n(1),o=n(91);t.a=function(){return React.createElement(o.a,{className:"wc-block-components-product-backorder-badge"},Object(r.__)("Available on backorder","woo-gutenberg-products-block"))}},function(e,t,n){"use strict";var r=n(1),o=(n(3),n(91));t.a=function(e){var t=e.lowStockRemaining;return t?React.createElement(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(r.sprintf)(Object(r.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(79),o=(n(3),n(155),function(e){var t=e.errorMessage,n=void 0===t?"":t,o=e.propertyName,c=void 0===o?"":o,a=e.elementId,i=void 0===a?"":a,u=Object(r.b)(),s=u.getValidationError,l=u.getValidationErrorId;if(!n){var f=s(c)||{};if(!f.message||f.hidden)return null;n=f.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(i)},n))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r=n(145),o=n(9),c=n(43),a=n(35),i=n(152),u=n(64),s=n(66),l=n(65),f=n(7),p=n.n(f),d=n(10),b=n.n(d),m=n(1),g=n(51),h=n.n(g),v=n(0),y=n(112),O=n(88),j=n(113),E=function(e,t,n){var r=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),o="wc-".concat(n,"-new-payment-method");return r.push({key:o,value:t}),r},w=n(79);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 _(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){p()(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 k=function(){var e=Object(l.b)(),t=e.hasError,n=e.onCheckoutBeforeProcessing,r=e.dispatchActions,o=e.redirectUrl,c=e.isProcessing,a=e.isBeforeProcessing,f=e.isComplete,p=e.orderNotes,d=e.shouldCreateAccount,g=Object(w.b)().hasValidationErrors,S=Object(u.b)().shippingErrorStatus,k=Object(s.b)(),R=k.billingData,P=k.shippingAddress,C=Object(y.a)(),x=C.cartNeedsPayment,I=C.receiveCart,N=Object(i.b)(),T=N.activePaymentMethod,M=N.currentStatus,D=N.paymentMethodData,A=N.expressPaymentMethods,L=N.paymentMethods,F=N.shouldSavePayment,V=Object(O.a)(),B=V.addErrorNotice,U=V.removeNotice,q=V.setIsSuppressed,H=Object(v.useRef)(R),z=Object(v.useRef)(P),W=Object(v.useRef)(o),K=Object(v.useState)(!1),G=b()(K,2),Y=G[0],$=G[1],X=Object.keys(A).includes(T),Q=Object(v.useMemo)((function(){var e,t=_(_({},A),L);return null==t||null===(e=t[T])||void 0===e?void 0:e.paymentMethodId}),[T,A,L]),Z=g&&!X||M.hasError||S.hasError;Object(v.useEffect)((function(){q(X)}),[X,q]),Object(v.useEffect)((function(){Z===t||!c&&!a||X||r.setHasError(Z)}),[Z,t,c,a,X,r]);var J=!t&&!Z&&(M.isSuccessful||!x)&&c;Object(v.useEffect)((function(){H.current=R,z.current=P,W.current=o}),[R,P,o]);var ee=Object(v.useCallback)((function(){return g?{errorMessage:Object(m.__)("Some input fields are invalid.","woo-gutenberg-products-block")}:M.hasError?{errorMessage:Object(m.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!S.hasError||{errorMessage:Object(m.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}}),[g,M.hasError,S.hasError]);Object(v.useEffect)((function(){var e;return X||(e=n(ee,0)),function(){X||e()}}),[n,ee,X]);var te=Object(v.useCallback)((function(){$(!0),U("checkout");var e={billing_address:H.current,shipping_address:z.current,customer_note:p,should_create_account:d};x&&(e=_(_({},e),{},{payment_method:Q,payment_data:E(D,F,T)})),h()({path:"/wc/store/checkout",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){h.a.setNonce(e.headers),r.setCustomerId(e.headers.get("X-WC-Store-API-User")),e.json().then((function(t){e.ok||(B(Object(j.b)(t),{id:"checkout"}),r.setHasError()),r.setAfterProcessing(t),$(!1)}))})).catch((function(e){var t;h.a.setNonce(e.headers),null!==(t=e.headers)&&void 0!==t&&t.get("X-WC-Store-API-User")&&r.setCustomerId(e.headers.get("X-WC-Store-API-User")),e.json().then((function(e){var t;null!==(t=e.data)&&void 0!==t&&t.cart&&I(e.data.cart),B(Object(j.b)(e),{id:"checkout"}),r.setHasError(),r.setAfterProcessing(e),$(!1)}))}))}),[B,U,Q,T,D,F,x,I,r,p,d]);return Object(v.useEffect)((function(){W.current&&(window.location.href=W.current)}),[f]),Object(v.useEffect)((function(){J&&!Y&&te()}),[te,J,Y]),null},R=function(e){var t=e.children,n=e.isCart,f=void 0!==n&&n,p=e.redirectUrl;return React.createElement(l.a,{redirectUrl:p,isCart:f},React.createElement(s.a,null,React.createElement(u.a,null,React.createElement(i.a,null,React.createElement(a.SlotFillProvider,null,t,React.createElement(c.a,{renderError:o.j?null:function(){return null}},React.createElement(r.PluginArea,null))),React.createElement(k,null)))))}},function(e,t,n){"use strict";n(3);var r=n(8),o=n(22),c=(n(168),function(e){var t=e.details,n=void 0===t?[]:t;return Array.isArray(n)?0===(n=n.filter((function(e){return!e.hidden}))).length?null:React.createElement("ul",{className:"wc-block-components-product-details"},n.map((function(e){var t=e.name?"wc-block-components-product-details__".concat(Object(r.kebabCase)(e.name)):"";return React.createElement("li",{key:e.name+(e.display||e.name),className:t},e.name&&React.createElement(React.Fragment,null,React.createElement("span",{className:"wc-block-components-product-details__name"},Object(o.decodeEntities)(e.name),":")," "),React.createElement("span",{className:"wc-block-components-product-details__value"},Object(o.decodeEntities)(e.display||e.value)))}))):null}),a=n(137),i=n(4),u=function(e){var t=e.className,n=e.shortDescription,r=void 0===n?"":n,o=e.fullDescription,c=r||(void 0===o?"":o);return c?React.createElement(a.a,{className:t,source:c,maxLength:15,countType:Object(i.getSetting)("wordCountType","words")}):null};n(167),t.a=function(e){var t=e.shortDescription,n=void 0===t?"":t,r=e.fullDescription,o=void 0===r?"":r,a=e.itemData,i=void 0===a?[]:a,s=e.variation,l=void 0===s?[]:s;return React.createElement("div",{className:"wc-block-components-product-metadata"},React.createElement(u,{className:"wc-block-components-product-metadata__description",shortDescription:n,fullDescription:o}),React.createElement(c,{details:i}),React.createElement(c,{details:l.map((function(e){var t=e.attribute;return{name:void 0===t?"":t,value:e.value}}))}))}},,function(e,t,n){"use strict";var r,o,c,a,i=n(16),u=n(42),s=n(29),l=n(2),f=/<(\/)?(\w+)\s*(\/)?>/g;function p(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}var d=function(e){var t="object"===Object(u.a)(e),n=t&&Object.values(e);return t&&n.length&&n.every((function(e){return Object(l.isValidElement)(e)}))};function b(e){var t=function(){var e=f.exec(r);if(null===e)return["no-more-tokens"];var t=e.index,n=Object(i.a)(e,4),o=n[0],c=n[1],a=n[2],u=n[3],s=o.length;if(u)return["self-closed",a,t,s];if(c)return["closer",a,t,s];return["opener",a,t,s]}(),n=Object(i.a)(t,4),u=n[0],d=n[1],b=n[2],h=n[3],v=a.length,y=b>o?o:null;if(!e[d])return m(),!1;switch(u){case"no-more-tokens":if(0!==v){var O=a.pop(),j=O.leadingTextStart,E=O.tokenStart;c.push(r.substr(j,E))}return m(),!1;case"self-closed":return 0===v?(null!==y&&c.push(r.substr(y,b-y)),c.push(e[d]),o=b+h,!0):(g(p(e[d],b,h)),o=b+h,!0);case"opener":return a.push(p(e[d],b,h,b+h,y)),o=b+h,!0;case"closer":if(1===v)return function(e){var t=a.pop(),n=t.element,o=t.leadingTextStart,i=t.prevOffset,u=t.tokenStart,f=t.children,p=e?r.substr(i,e-i):r.substr(i);p&&f.push(p);null!==o&&c.push(r.substr(o,u-o));c.push(l.cloneElement.apply(void 0,[n,null].concat(Object(s.a)(f))))}(b),o=b+h,!0;var w=a.pop(),S=r.substr(w.prevOffset,b-w.prevOffset);w.children.push(S),w.prevOffset=b+h;var _=p(w.element,w.tokenStart,w.tokenLength,b+h);return _.children=w.children,g(_),o=b+h,!0;default:return m(),!1}}function m(){var e=r.length-o;0!==e&&c.push(r.substr(o,e))}function g(e){var t=e.element,n=e.tokenStart,o=e.tokenLength,c=e.prevOffset,i=e.children,u=a[a.length-1],f=r.substr(u.prevOffset,n-u.prevOffset);f&&u.children.push(f),u.children.push(l.cloneElement.apply(void 0,[t,null].concat(Object(s.a)(i)))),u.prevOffset=c||n+o}t.a=function(e,t){if(r=e,o=0,c=[],a=[],f.lastIndex=0,!d(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(b(t));return l.createElement.apply(void 0,[l.Fragment,null].concat(Object(s.a)(c)))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return a}));var r=n(152),o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(r.b)(),n=t.paymentMethods,o=t.expressPaymentMethods,c=t.paymentMethodsInitialized,a=t.expressPaymentMethodsInitialized;return e?{paymentMethods:o,isInitialized:a}:{paymentMethods:n,isInitialized:c}},c=function(){return o()},a=function(){return o(!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r=n(65),o=n(152),c=n(64),a=n(66),i=n(1),u=n(46),s=n(0),l=n(9),f=n(182),p=n(278),d=n(5),b=n.n(d),m=n(28),g=React.createElement(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),h=React.createElement(m.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.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"})),v=n(240),y=React.createElement(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("path",{d:"M0 0h24v24H0z"}),React.createElement("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),React.createElement("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),O=n(130),j=(n(178),{bank:g,bill:h,card:v.a,checkPayment:y}),E=function(e){var t=e.icon,n=void 0===t?"":t,r=e.text,o=void 0===r?"":r,c=!!n,a=c&&"string"==typeof n&&j[n],i=b()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":c});return React.createElement("span",{className:i},a?React.createElement(O.a,{srcElement:j[n]}):n,o)},w=n(112),S=n(232),_=n(138),k=function(e,t){var n=[],r=function(t,n){var r=parseInt(e[n],10);return{label:t,value:r,valueWithTax:r+parseInt(e[n+"_tax"],10)}};return n.push(r(Object(i.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(r(Object(i.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(r(Object(i.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({label:Object(i.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(r(Object(i.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n},R=function(){var e=Object(r.b)(),t=e.isCalculating,n=e.isComplete,d=e.isIdle,b=e.isProcessing,m=e.onCheckoutAfterProcessingWithSuccess,g=e.onCheckoutAfterProcessingWithError,h=e.onCheckoutBeforeProcessing,v=e.onSubmit,y=e.customerId,O=Object(o.b)(),j=O.currentStatus,R=O.activePaymentMethod,P=O.onPaymentProcessing,C=O.setExpressPaymentError,x=Object(c.b)(),I=x.shippingErrorStatus,N=x.shippingErrorTypes,T=x.shippingRates,M=x.shippingRatesLoading,D=x.selectedRates,A=x.setSelectedRates,L=x.isSelectingRate,F=x.onShippingRateSuccess,V=x.onShippingRateFail,B=x.onShippingRateSelectSuccess,U=x.onShippingRateSelectFail,q=x.needsShipping,H=Object(a.b)(),z=H.billingData,W=H.shippingAddress,K=H.setShippingAddress,G=Object(w.a)().cartTotals,Y=Object(S.a)().appliedCoupons,$=Object(_.a)(),X=$.noticeContexts,Q=$.responseTypes,Z=Object(s.useRef)(k(G,q)),J=Object(s.useRef)({label:Object(i.__)("Total","woo-gutenberg-products-block"),value:parseInt(G.total_price,10)});return Object(s.useEffect)((function(){Z.current=k(G,q),J.current={label:Object(i.__)("Total","woo-gutenberg-products-block"),value:parseInt(G.total_price,10)}}),[G,q]),{checkoutStatus:{isCalculating:t,isComplete:n,isIdle:d,isProcessing:b},paymentStatus:j,shippingStatus:{shippingErrorStatus:I,shippingErrorTypes:N},shippingData:{shippingRates:T,shippingRatesLoading:M,selectedRates:D,setSelectedRates:A,isSelectingRate:L,shippingAddress:W,setShippingAddress:K,needsShipping:q},billing:{billingData:z,cartTotal:J.current,currency:Object(u.getCurrencyFromPriceResponse)(G),cartTotalItems:Z.current,displayPricesIncludingTax:l.k,appliedCoupons:Y,customerId:y},eventRegistration:{onCheckoutAfterProcessingWithSuccess:m,onCheckoutAfterProcessingWithError:g,onCheckoutBeforeProcessing:h,onShippingRateSuccess:F,onShippingRateFail:V,onShippingRateSelectSuccess:B,onShippingRateSelectFail:U,onPaymentProcessing:P},components:{ValidationInputError:f.a,PaymentMethodIcons:p.a,PaymentMethodLabel:E},emitResponse:{noticeContexts:X,responseTypes:Q},onSubmit:v,activePaymentMethod:R,setExpressPaymentError:C}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p}));var r=n(10),o=n.n(r),c=(n(3),n(0)),a=n(75),i=n.n(a).a,u=n(5),s=n.n(u),l=Object(c.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),f=function(){return Object(c.useContext)(l)},p=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=function(){var e=i(),t=o()(e,2),n=t[0],r=t[1].width,c="";return r>700?c="is-large":r>520?c="is-medium":r>400?c="is-small":r&&(c="is-mobile"),[n,c]}(),a=o()(c,2),u=a[0],f=a[1],p={hasContainerWidth:""!==f,containerClassName:f,isMobile:"is-mobile"===f,isSmall:"is-small"===f,isMedium:"is-medium"===f,isLarge:"is-large"===f};return React.createElement(l.Provider,{value:p},React.createElement("div",{className:s()(r,f)},u,t))}},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(7),a=n.n(c),i=n(10),u=n.n(i),s=n(14),l=n.n(s),f=n(1),p=n(2),d=(n(3),n(5)),b=n.n(d),m=n(79),g=n(182),h=n(122),v=n(0),y=n(38),O=(n(136),Object(p.forwardRef)((function(e,t){var n=e.className,r=e.id,o=e.type,c=void 0===o?"text":o,a=e.ariaLabel,i=e.ariaDescribedBy,s=e.label,l=e.screenReaderLabel,f=e.disabled,p=e.help,d=e.autoCapitalize,m=void 0===d?"off":d,g=e.autoComplete,h=void 0===g?"off":g,O=e.value,j=void 0===O?"":O,E=e.onChange,w=e.required,S=void 0!==w&&w,_=e.onBlur,k=void 0===_?function(){}:_,R=e.feedback,P=Object(v.useState)(!1),C=u()(P,2),x=C[0],I=C[1];return React.createElement("div",{className:b()("wc-block-components-text-input",n,{"is-active":x||j})},React.createElement("input",{type:c,id:r,value:j,ref:t,autoCapitalize:m,autoComplete:h,onChange:function(e){E(e.target.value)},onFocus:function(){return I(!0)},onBlur:function(){k(),I(!1)},"aria-label":a||s,disabled:f,"aria-describedby":p&&!i?r+"__help":i,required:S}),React.createElement(y.a,{label:s,screenReaderLabel:l||s,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!p&&React.createElement("p",{id:r+"__help",className:"wc-block-components-text-input__help"},p),R)})));t.a=Object(h.a)((function(e){var t=e.className,n=e.instanceId,r=e.id,c=e.ariaDescribedBy,i=e.errorId,s=e.validateOnMount,d=void 0===s||s,h=e.focusOnMount,v=void 0!==h&&h,y=e.onChange,j=e.showError,E=void 0===j||j,w=l()(e,["className","instanceId","id","ariaDescribedBy","errorId","validateOnMount","focusOnMount","onChange","showError"]),S=Object(p.useState)(!0),_=u()(S,2),k=_[0],R=_[1],P=Object(p.useRef)(),C=Object(m.b)(),x=C.getValidationError,I=C.hideValidationError,N=C.setValidationErrors,T=C.clearValidationError,M=C.getValidationErrorId,D=r||"textinput-"+n;i=i||D;var A=Object(p.useCallback)((function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=P.current||null;if(t){t.value=t.value.trim();var n=t.checkValidity();n?T(i):N(a()({},i,{message:t.validationMessage||Object(f.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}))}}),[T,i,N]);Object(p.useEffect)((function(){k&&(v&&P.current.focus(),R(!1))}),[v,k,R]),Object(p.useEffect)((function(){k&&(d&&A(),R(!1))}),[k,R,d,A]),Object(p.useEffect)((function(){return function(){T(i)}}),[T,i]);var L=x(i)||{},F=L.message&&!L.hidden,V=E&&F&&M(i)?M(i):c;return React.createElement(O,o()({className:b()(t,{"has-error":F}),id:D,onBlur:function(){A(!1)},feedback:E&&React.createElement(g.a,{propertyName:i}),ref:P,onChange:function(e){I(i),y(e)},ariaDescribedBy:V},w))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t){var n=[];return Object.keys(e).forEach((function(r){if(void 0!==t[r])switch(e[r].type){case"boolean":n[r]="false"!==t[r]&&!1!==t[r];break;case"number":n[r]=parseInt(t[r],10);break;case"array":case"object":n[r]=JSON.parse(t[r]);break;default:n[r]=t[r]}else n[r]=e[r].default})),n}},,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(114),o=function(e,t){return function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=r.a.addEventCallback(e,n,o);return t(c),function(){t(r.a.removeEventCallback(e,c.id))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return d}));var r=n(25),o=n.n(r),c=n(27),a=n.n(c),i=n(48),u=n.n(i);function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw c}}}}function l(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}var f=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=u()(o.a.mark((function e(t,n,r){var c,i,u,l,p,d;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=f(t,n),i=[],u=s(c),e.prev=3,u.s();case 5:if((l=u.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(r));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),u.e(e.t1);case 24:return e.prev=24,u.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,n,r){return e.apply(this,arguments)}}(),d=function(){var e=u()(o.a.mark((function e(t,n,r){var c,i,u,l,p;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=f(t,n),i=s(c),e.prev=2,i.s();case 4:if((u=i.n()).done){e.next=23;break}return l=u.value,e.prev=6,e.next=9,Promise.resolve(l.callback(r));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,n,r){return e.apply(this,arguments)}}()},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(271)},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(7),o=n.n(r),c=n(1),a=n(12),i=n(15),u=n(79),s=n(22),l=n(112),f=n(88);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var d=function(){var e=Object(l.a)(),t=e.cartCoupons,n=e.cartIsLoading,r=Object(f.a)(),d=r.addErrorNotice,b=r.addSnackbarNotice,m=Object(u.b)().setValidationErrors;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({appliedCoupons:t,isLoading:n},Object(a.useSelect)((function(e,t){var n=t.dispatch,r=e(i.CART_STORE_KEY),o=r.isApplyingCoupon(),a=r.isRemovingCoupon(),u=n(i.CART_STORE_KEY),l=u.applyCoupon,f=u.removeCoupon,p=u.receiveApplyingCoupon;return{applyCoupon:function(e){l(e).then((function(t){!0===t&&b(Object(c.sprintf)(Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){m({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),p("")}))},removeCoupon:function(e){f(e).then((function(t){!0===t&&b(Object(c.sprintf)(Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){d(e.message,{id:"coupon-form"}),p("")}))},isApplyingCoupon:o,isRemovingCoupon:a}}),[d,b]))}},function(e,t,n){"use strict";var r=n(5),o=n.n(r),c=(n(3),n(189));n(164);t.a=function(e){var t=e.children,n=e.className;return React.createElement(c.a,{className:o()("wc-block-components-sidebar-layout",n)},t)}},function(e,t,n){"use strict";var r=n(5),o=n.n(r);n(3);t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-main",n)},t)}},function(e,t){},function(e,t,n){"use strict";var r=n(5),o=n.n(r);n(3);t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-sidebar",n)},t)}},function(e,t,n){"use strict";var r=n(1),o=n(9),c=n(76),a=n(150),i=(n(3),n(35));n(169);t.a=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,u=e.currency,s=e.isRemovingCoupon,l=e.removeCoupon,f=e.values,p=f.total_discount,d=f.total_discount_tax,b=parseInt(p,10);if(!b&&0===n.length)return null;var m=parseInt(d,10),g=o.k?b+m:b;return React.createElement(i.TotalsItem,{className:"wc-block-components-totals-discount",currency:u,description:0!==n.length&&React.createElement(c.a,{screenReaderLabel:Object(r.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:s,showSpinner:!1},React.createElement("ul",{className:"wc-block-components-totals-discount__coupon-list"},n.map((function(e){return React.createElement(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.code,screenReaderText:Object(r.sprintf)(Object(r.__)("Coupon: %s","woo-gutenberg-products-block"),e.code),disabled:s,onRemove:function(){l(e.code)},radius:"large",ariaLabel:Object(r.sprintf)(Object(r.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.code)})})))),label:g?Object(r.__)("Discount","woo-gutenberg-products-block"):Object(r.__)("Coupons","woo-gutenberg-products-block"),value:g?-1*g:"-"})}},function(e,t,n){"use strict";var r=n(10),o=n.n(r),c=n(1),a=n(0),i=n(85),u=n(190),s=n(38),l=n(182),f=n(76),p=(n(3),n(122)),d=n(79),b=n(35);n(174);t.a=Object(p.a)((function(e){var t=e.instanceId,n=e.isLoading,r=void 0!==n&&n,p=e.initialOpen,m=void 0!==p&&p,g=e.onSubmit,h=void 0===g?function(){}:g,v=Object(a.useState)(""),y=o()(v,2),O=y[0],j=y[1],E=Object(a.useRef)(!1),w=Object(d.b)(),S=w.getValidationError,_=w.getValidationErrorId,k=S("coupon");Object(a.useEffect)((function(){E.current!==r&&(r||!O||k||j(""),E.current=r)}),[r,O,k]);var R="wc-block-components-totals-coupon__input-".concat(t);return React.createElement(b.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!0,initialOpen:m,title:React.createElement(s.a,{label:Object(c.__)("Coupon Code?","woo-gutenberg-products-block"),screenReaderLabel:Object(c.__)("Introduce Coupon Code","woo-gutenberg-products-block"),htmlFor:R}),titleTag:"h2"},React.createElement(f.a,{screenReaderLabel:Object(c.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:r,showSpinner:!1},React.createElement("div",{className:"wc-block-components-totals-coupon__content"},React.createElement("form",{className:"wc-block-components-totals-coupon__form"},React.createElement(u.a,{id:R,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(c.__)("Enter code","woo-gutenberg-products-block"),value:O,ariaDescribedBy:_(R),onChange:function(e){j(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),React.createElement(i.a,{className:"wc-block-components-totals-coupon__button",disabled:r||!O,showSpinner:r,onClick:function(e){e.preventDefault(),h(O)},type:"submit"},Object(c.__)("Apply","woo-gutenberg-products-block"))),React.createElement(l.a,{propertyName:"coupon",elementId:R}))))}))},function(e,t,n){"use strict";var r=n(1),o=n(9),c=n(186),a=n(45),i=(n(3),n(35)),u=n(147),s=(n(175),o.z&&o.k);t.a=function(e){var t=e.currency,n=e.values,o=n.total_price,l=n.total_tax,f=Object(u.applyFilters)(i.__EXPERIMENTAL_TOTAL_LABEL_FILTER,Object(r.__)("Total","woo-gutenberg-products-block"));return React.createElement(i.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:f,value:parseInt(o,10),description:s&&React.createElement("p",{className:"wc-block-components-totals-footer-item-tax"},Object(c.a)(Object(r.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:React.createElement(a.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,displayType:"text",value:parseInt(l,10)})}))})}},function(e,t,n){"use strict";var r=n(28),o=React.createElement(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(4),c=n(15),a=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("cartData")),Object(a.useSelect)((function(e,t){if(n.current){var r,o,a=e(c.CART_STORE_KEY),i=a.isResolving,u=a.hasFinishedResolution,s=t.dispatch(c.CART_STORE_KEY),l=s.receiveCart,f=s.receiveError,p=s.startResolution,d=s.finishResolution;i("getCartData",[])||u("getCartData",[])||(p("getCartData",[]),null!==(r=n.current)&&void 0!==r&&null!==(o=r.code)&&void 0!==o&&o.includes("error")?f(n.current):l(n.current),d("getCartData",[]))}}),[]),React.createElement(e,t)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=n(3),a=n.n(c),i=n(190),u=n(11),s=n.n(u),l=n(9),f=n(0),p=n(1),d=n(22),b=n(5),m=n.n(b),g=n(14),h=n.n(g),v=n(2),y=n(79),O=n(39),j=n(122),E=n(182),w=n(6),S=n(23),_=(n(13),n(104),n(121),n(105)),k=0;function R(e,t){e&&Object(_.a)(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function P(e,t){return e===t||e.contains&&e.contains(t)}function C(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,c=new Array(o),a=0;a<o;a++)c[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,c)}),t)}return o.cancel=r,o}function x(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function I(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function N(){return String(k++)}function T(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function M(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=D(t,r)?t[r]:e[r],n}),{})}function D(e,t){return void 0!==e[t]}function A(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function L(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var c=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:c+1);var a=t+e;a<0?a=o?c:0:a>c&&(a=o?0:c);var i=F(e,a,n,r,o);return-1===i?t>=n?-1:t:i}function F(e,t,n,r,o){var c=r(t);if(!c||!c.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var i=t-1;i>=0;i--)if(!r(i).hasAttribute("disabled"))return i;return o?e>0?F(1,0,n,r,!1):F(-1,n-1,n,r,!1):-1}function V(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(P(t,e)||r&&P(t,n.activeElement))}))}var B=C((function(){q().textContent=""}),500);function U(e,t){var n=q(t);e&&(n.textContent=e,B())}function q(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var H={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function z(e,t,n){var r=e.props,o=e.type,c={};Object.keys(t).forEach((function(e){!function(e,t,n,r){var o="on"+$(e)+"Change";t[o]&&void 0!==r[e]&&r[e]!==n[e]&&t[o](r)}(e,r,t,n),n[e]!==t[e]&&(c[e]=n[e])})),r.onStateChange&&Object.keys(c).length&&r.onStateChange(Object(w.a)({type:o},c))}var W=C((function(e,t){U(e(),t)}),200);function K(e){var t=e.id,n=e.labelId,r=e.menuId,o=e.getItemId,c=e.toggleButtonId,a=void 0===t?"downshift-"+N():t;return{labelId:n||a+"-label",menuId:r||a+"-menu",getItemId:o||function(e){return a+"-item-"+e},toggleButtonId:c||a+"-toggle-button"}}function G(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function Y(e){return/^\S{1}$/.test(e)}function $(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function X(e){var t=Object(v.useRef)(e);return t.current=e,t}function Q(e,t,n){var r=Object(v.useRef)(),o=Object(v.useRef)(),c=Object(v.useCallback)((function(t,n){o.current=n,t=M(t,n.props);var r=e(t,n);return n.props.stateReducer(t,Object(w.a)({},n,{changes:r}))}),[e]),a=Object(v.useReducer)(c,t),i=a[0],u=a[1],s=X(n),l=Object(v.useCallback)((function(e){return u(Object(w.a)({props:s.current},e))}),[s]),f=o.current;return Object(v.useEffect)((function(){f&&r.current&&r.current!==i&&z(f,M(r.current,f.props),i),r.current=i}),[i,n,f]),[i,l]}function Z(e,t,n){var r=Q(e,t,n),o=r[0],c=r[1];return[M(o,n),c]}var J={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:R,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function ee(e,t,n){void 0===n&&(n=H);var r="default"+$(t);return r in e?e[r]:n[t]}function te(e,t,n){if(void 0===n&&(n=H),t in e)return e[t];var r="initial"+$(t);return r in e?e[r]:ee(e,t,n)}function ne(e){var t=te(e,"selectedItem"),n=te(e,"isOpen"),r=te(e,"highlightedIndex"),o=te(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function re(e,t,n,r){var o=e.items,c=e.initialHighlightedIndex,a=e.defaultHighlightedIndex,i=t.selectedItem,u=t.highlightedIndex;return 0===o.length?-1:void 0!==c&&u===c?c:void 0!==a?a:i?0===n?o.indexOf(i):L(n,o.indexOf(i),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function oe(e,t,n,r){var o=Object(v.useRef)({isMouseDown:!1,isTouchMove:!1});return Object(v.useEffect)((function(){var c=function(){o.current.isMouseDown=!0},a=function(c){o.current.isMouseDown=!1,e&&!V(c.target,t.map((function(e){return e.current})),n.document)&&r()},i=function(){o.current.isTouchMove=!1},u=function(){o.current.isTouchMove=!0},s=function(c){!e||o.current.isTouchMove||V(c.target,t.map((function(e){return e.current})),n.document,!1)||r()};return n.addEventListener("mousedown",c),n.addEventListener("mouseup",a),n.addEventListener("touchstart",i),n.addEventListener("touchmove",u),n.addEventListener("touchend",s),function(){n.removeEventListener("mousedown",c),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",i),n.removeEventListener("touchmove",u),n.removeEventListener("touchend",s)}}),[e,n]),o}function ce(){for(var e=!1,t=Object(v.useRef)(!0),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var c=Object(v.useRef)(r.reduce((function(e,t){return e[t]={},e}),{}));Object(v.useEffect)((function(){e&&(Object.keys(c.current).forEach((function(e){var n=c.current[e];if(!t.current||Object.keys(n).length){var r=n.suppressRefError,o=n.refKey,a=n.elementRef;a&&a.current||r||console.error('downshift: The ref prop "'+o+'" from '+e+" was not applied correctly on your element.")}else console.error("downshift: You forgot to call the "+e+" getter function on your component / element.")})),t.current=!1)}));var a=Object(v.useCallback)((function(e,t,n,r){0}),[]);return a}function ae(e,t,n,r,o){for(var c=n.map((function(e){return r(e).toLowerCase()})),a=e.toLowerCase(),i=function(e,t){var n=o(t);return e.startsWith(a)&&!(n&&n.hasAttribute("disabled"))},u=t+1;u<c.length;u++){if(i(c[u],u))return u}for(var s=0;s<t;s++){if(i(c[s],s))return s}return t}a.a.array.isRequired,a.a.func,a.a.func,a.a.func,a.a.bool,a.a.number,a.a.number,a.a.number,a.a.bool,a.a.bool,a.a.bool,a.a.any,a.a.any,a.a.any,a.a.string,a.a.string,a.a.string,a.a.func,a.a.string,a.a.func,a.a.func,a.a.func,a.a.func,a.a.func,a.a.shape({addEventListener:a.a.func,removeEventListener:a.a.func,document:a.a.shape({getElementById:a.a.func,activeElement:a.a.any,body:a.a.any})});var ie=Object(w.a)({},J,{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}}),ue=Object.freeze({__proto__:null,MenuKeyDownArrowDown:0,MenuKeyDownArrowUp:1,MenuKeyDownEscape:2,MenuKeyDownHome:3,MenuKeyDownEnd:4,MenuKeyDownEnter:5,MenuKeyDownSpaceButton:6,MenuKeyDownCharacter:7,MenuBlur:8,MenuMouseLeave:9,ItemMouseMove:10,ItemClick:11,ToggleButtonClick:12,ToggleButtonKeyDownArrowDown:13,ToggleButtonKeyDownArrowUp:14,ToggleButtonKeyDownCharacter:15,FunctionToggleMenu:16,FunctionOpenMenu:17,FunctionCloseMenu:18,FunctionSetHighlightedIndex:19,FunctionSelectItem:20,FunctionSetInputValue:21,FunctionReset:22});function se(e,t){var n,r=t.type,o=t.props,c=t.shiftKey;switch(r){case 10:n={highlightedIndex:t.index};break;case 11:n={isOpen:ee(o,"isOpen"),highlightedIndex:ee(o,"highlightedIndex"),selectedItem:o.items[t.index]};break;case 15:var a=t.key,i=""+e.inputValue+a,u=ae(i,e.selectedItem?o.items.indexOf(e.selectedItem):-1,o.items,o.itemToString,t.getItemNodeFromIndex);n=Object(w.a)({inputValue:i},u>=0&&{selectedItem:o.items[u]});break;case 13:n={highlightedIndex:re(o,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:n={highlightedIndex:re(o,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:n=Object(w.a)({isOpen:ee(o,"isOpen"),highlightedIndex:ee(o,"highlightedIndex")},e.highlightedIndex>=0&&{selectedItem:o.items[e.highlightedIndex]});break;case 3:n={highlightedIndex:F(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case 4:n={highlightedIndex:F(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:n={isOpen:!1,highlightedIndex:-1};break;case 7:var s=t.key,l=""+e.inputValue+s,f=ae(l,e.highlightedIndex,o.items,o.itemToString,t.getItemNodeFromIndex);n=Object(w.a)({inputValue:l},f>=0&&{highlightedIndex:f});break;case 0:n={highlightedIndex:L(c?5:1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,o.circularNavigation)};break;case 1:n={highlightedIndex:L(c?-5:-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,o.circularNavigation)};break;case 9:n={highlightedIndex:-1};break;case 12:case 16:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:re(o,e,0)};break;case 17:n={isOpen:!0,highlightedIndex:re(o,e,0)};break;case 18:n={isOpen:!1};break;case 19:n={highlightedIndex:t.highlightedIndex};break;case 20:n={selectedItem:t.selectedItem};break;case 21:n={inputValue:t.inputValue};break;case 22:n={highlightedIndex:ee(o,"highlightedIndex"),isOpen:ee(o,"isOpen"),selectedItem:ee(o,"selectedItem"),inputValue:ee(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Object(w.a)({},e,n)}function le(e){void 0===e&&(e={});var t=Object(w.a)({},ie,e),n=t.items,r=t.scrollIntoView,o=t.environment,c=t.initialIsOpen,a=t.defaultIsOpen,i=t.itemToString,u=t.getA11ySelectionMessage,s=t.getA11yStatusMessage,l=Z(se,ne(t),t),f=l[0],p=l[1],d=f.isOpen,b=f.highlightedIndex,m=f.selectedItem,g=f.inputValue,h=Object(v.useRef)(null),y=Object(v.useRef)(null),O=Object(v.useRef)();O.current={};var j=Object(v.useRef)(!0),E=Object(v.useRef)(!0),_=Object(v.useRef)(null),k=Object(v.useRef)(K(t)),R=Object(v.useRef)(),P=Object(v.useRef)(!0),N=Object(v.useRef)(t),T=X({state:f,props:t}),M=function(e){return O.current[k.current.getItemId(e)]};Object(v.useEffect)((function(){if(!P.current){var e=R.current;W((function(){return s({isOpen:d,highlightedIndex:b,selectedItem:m,inputValue:g,highlightedItem:n[b],resultCount:n.length,itemToString:i,previousResultCount:e})}),o.document)}}),[d,b,g,n]),Object(v.useEffect)((function(){if(!P.current){var e=R.current;W((function(){return u({isOpen:d,highlightedIndex:b,selectedItem:m,inputValue:g,highlightedItem:n[b],resultCount:n.length,itemToString:i,previousResultCount:e})}),o.document)}}),[m]),Object(v.useEffect)((function(){P.current&&(_.current=C((function(e){e({type:21,inputValue:""})}),500)),g&&_.current(p)}),[g]),Object(v.useEffect)((function(){P.current?(c||a||d)&&y.current&&y.current.focus():d?y.current&&y.current.focus():o.document.activeElement===y.current&&h.current&&(E.current=!1,h.current.focus())}),[d]),Object(v.useEffect)((function(){b<0||!d||!Object.keys(O.current).length||(!1===j.current?j.current=!0:r(M(b),y.current))}),[b]),Object(v.useEffect)((function(){P.current||(R.current=n.length)})),Object(v.useEffect)((function(){P.current||(N.current,N.current=t)}),[f,t]);var D=oe(d,[y,h],o,(function(){p({type:8})})),L=ce("getMenuProps","getToggleButtonProps");Object(v.useEffect)((function(){P.current=!1}),[]);var F=Object(v.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),p({type:13,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),p({type:14,getItemNodeFromIndex:M,shiftKey:e.shiftKey})}}}),[p]),V=Object(v.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),p({type:0,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),p({type:1,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},Home:function(e){e.preventDefault(),p({type:3,getItemNodeFromIndex:M})},End:function(e){e.preventDefault(),p({type:4,getItemNodeFromIndex:M})},Escape:function(){p({type:2})},Enter:function(e){e.preventDefault(),p({type:5})}," ":function(e){e.preventDefault(),p({type:6})}}}),[p]),B=Object(v.useCallback)((function(){p({type:16})}),[p]),U=Object(v.useCallback)((function(){p({type:18})}),[p]),q=Object(v.useCallback)((function(){p({type:17})}),[p]),H=Object(v.useCallback)((function(e){p({type:19,highlightedIndex:e})}),[p]),z=Object(v.useCallback)((function(e){p({type:20,selectedItem:e})}),[p]),$=Object(v.useCallback)((function(){p({type:22})}),[p]),Q=Object(v.useCallback)((function(e){p({type:21,inputValue:e})}),[p]),J=Object(v.useCallback)((function(e){return Object(w.a)({id:k.current.labelId,htmlFor:k.current.toggleButtonId},e)}),[]),ee=Object(v.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.onMouseLeave,c=r.refKey,a=void 0===c?"ref":c,i=r.onKeyDown,u=r.onBlur,s=r.ref,l=Object(S.a)(r,["onMouseLeave","refKey","onKeyDown","onBlur","ref"]),f=(void 0===t?{}:t).suppressRefError,d=void 0!==f&&f,b=T.current.state;return L("getMenuProps",d,a,y),Object(w.a)(((n={})[a]=I(s,(function(e){y.current=e})),n.id=k.current.menuId,n.role="listbox",n["aria-labelledby"]=k.current.labelId,n.tabIndex=-1,n),b.isOpen&&b.highlightedIndex>-1&&{"aria-activedescendant":k.current.getItemId(b.highlightedIndex)},{onMouseLeave:x(o,(function(){p({type:9})})),onKeyDown:x(i,(function(e){var t=A(e);t&&V[t]?V[t](e):Y(t)&&p({type:7,key:t,getItemNodeFromIndex:M})})),onBlur:x(u,(function(){!1!==E.current?!D.current.isMouseDown&&p({type:8}):E.current=!0}))},l)}),[p,T,V,D,L]);return{getToggleButtonProps:Object(v.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.onClick,c=r.onKeyDown,a=r.refKey,i=void 0===a?"ref":a,u=r.ref,s=Object(S.a)(r,["onClick","onKeyDown","refKey","ref"]),l=(void 0===t?{}:t).suppressRefError,f=void 0!==l&&l,d=Object(w.a)(((n={})[i]=I(u,(function(e){h.current=e})),n.id=k.current.toggleButtonId,n["aria-haspopup"]="listbox",n["aria-expanded"]=T.current.state.isOpen,n["aria-labelledby"]=k.current.labelId+" "+k.current.toggleButtonId,n),s);return s.disabled||(d.onClick=x(o,(function(){p({type:12})})),d.onKeyDown=x(c,(function(e){var t=A(e);t&&F[t]?F[t](e):Y(t)&&p({type:15,key:t,getItemNodeFromIndex:M})}))),L("getToggleButtonProps",f,i,h),d}),[p,T,F,L]),getLabelProps:J,getMenuProps:ee,getItemProps:Object(v.useCallback)((function(e){var t,n=void 0===e?{}:e,r=n.item,o=n.index,c=n.onMouseMove,a=n.onClick,i=n.refKey,u=void 0===i?"ref":i,s=n.ref,l=Object(S.a)(n,["item","index","onMouseMove","onClick","refKey","ref"]),f=T.current,d=f.state,b=f.props,m=G(o,r,b.items);if(m<0)throw new Error("Pass either item or item index in getItemProps!");var g=Object(w.a)(((t={role:"option","aria-selected":""+(m===d.highlightedIndex),id:k.current.getItemId(m)})[u]=I(s,(function(e){e&&(O.current[k.current.getItemId(m)]=e)})),t),l);return l.disabled||(g.onMouseMove=x(c,(function(){o!==d.highlightedIndex&&(j.current=!1,p({type:10,index:o}))})),g.onClick=x(a,(function(){p({type:11,index:o})}))),g}),[p,T]),toggleMenu:B,openMenu:q,closeMenu:U,setHighlightedIndex:H,selectItem:z,reset:$,setInputValue:Q,highlightedIndex:b,isOpen:d,selectedItem:m,inputValue:g}}le.stateChangeTypes=ue;a.a.array.isRequired,a.a.func,a.a.func,a.a.func,a.a.bool,a.a.number,a.a.number,a.a.number,a.a.bool,a.a.bool,a.a.bool,a.a.any,a.a.any,a.a.any,a.a.string,a.a.string,a.a.string,a.a.string,a.a.string,a.a.string,a.a.func,a.a.string,a.a.string,a.a.func,a.a.func,a.a.func,a.a.func,a.a.func,a.a.func,a.a.shape({addEventListener:a.a.func,removeEventListener:a.a.func,document:a.a.shape({getElementById:a.a.func,activeElement:a.a.any,body:a.a.any})});Object(w.a)({},J,{getA11yStatusMessage:T,circularNavigation:!0});a.a.array,a.a.array,a.a.array,a.a.func,a.a.func,a.a.func,a.a.number,a.a.number,a.a.number,a.a.func,a.a.func,a.a.string,a.a.string,a.a.shape({addEventListener:a.a.func,removeEventListener:a.a.func,document:a.a.shape({getElementById:a.a.func,activeElement:a.a.any,body:a.a.any})});var fe=n(19),pe=n(17);function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var be=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,o=Object(pe.a)(e,["icon","size"]);return Object(f.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){Object(fe.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},o))},me=n(28),ge=Object(f.createElement)(me.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(f.createElement)(me.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),he=Object(f.createElement)(me.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(f.createElement)(me.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ye=function(e){var t=e.as,n=void 0===t?"div":t,r=e.className,o=Object(pe.a)(e,["as","className"]);return function(e){var t=e.as,n=void 0===t?"div":t,r=Object(pe.a)(e,["as"]);return"function"==typeof r.children?r.children(r):Object(f.createElement)(n,r)}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){Object(fe.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({as:n,className:m()("components-visually-hidden",r)},o))},Oe=n(68),je=function(e){return e&&e.name},Ee=function(e,t){var n=e.selectedItem,r=t.type,o=t.changes,c=t.props.items;switch(r){case le.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:c[n?Math.min(c.indexOf(n)+1,c.length-1):0]};case le.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:c[n?Math.max(c.indexOf(n)-1,0):c.length-1]};default:return o}};function we(e){var t=e.className,n=e.hideLabelFromVision,r=e.label,o=e.options,c=e.onChange,a=e.value,i=le({initialSelectedItem:o[0],items:o,itemToString:je,onSelectedItemChange:c,selectedItem:a,stateReducer:Ee}),u=i.getLabelProps,s=i.getToggleButtonProps,l=i.getMenuProps,p=i.getItemProps,d=i.isOpen,b=i.highlightedIndex,g=i.selectedItem,h=l({className:"components-custom-select-control__menu","aria-hidden":!d});return h["aria-activedescendant"]&&"downshift-null"===h["aria-activedescendant"].slice(0,"downshift-null".length)&&delete h["aria-activedescendant"],Object(f.createElement)("div",{className:m()("components-custom-select-control",t)},n?Object(f.createElement)(ye,Object(w.a)({as:"label"},u()),r):Object(f.createElement)("label",u({className:"components-custom-select-control__label"}),r),Object(f.createElement)(Oe.a,s({"aria-label":r,"aria-labelledby":void 0,className:"components-custom-select-control__button",isSmall:!0}),je(g),Object(f.createElement)(be,{icon:ge,className:"components-custom-select-control__button-icon"})),Object(f.createElement)("ul",h,d&&o.map((function(e,t){return Object(f.createElement)("li",p({item:e,index:t,key:e.key,className:m()(e.className,"components-custom-select-control__item",{"is-highlighted":t===b}),style:e.style}),e===g&&Object(f.createElement)(be,{icon:he,className:"components-custom-select-control__item-icon"}),e.name)}))))}n(135);var Se=function(e){var t=e.className,n=e.feedback,r=e.id,o=e.label,c=e.onChange,a=e.options,i=e.value;return React.createElement("div",{id:r,className:m()("wc-block-components-select",t,{"is-active":i})},React.createElement(we,{label:o,onChange:function(e){var t=e.selectedItem;c(t.key)},options:a,value:i||null}),n)},_e=Object(j.a)((function(e){var t=e.className,n=e.id,r=e.value,c=e.instanceId,a=e.required,i=e.errorId,u=e.errorMessage,l=void 0===u?Object(p.__)("Please select a value.","woo-gutenberg-products-block"):u,f=h()(e,["className","id","value","instanceId","required","errorId","errorMessage"]),d=n||"select-"+c;i=i||d;var b=Object(O.a)(r),g=Object(y.b)(),j=g.getValidationError,w=g.setValidationErrors,S=g.clearValidationError;Object(v.useEffect)((function(){!a||b?S(i):w(o()({},i,{message:l,hidden:!0}))}),[S,b,i,l,a,w]),Object(v.useEffect)((function(){return function(){S(i)}}),[S,i]);var _=j(i)||{};return React.createElement(Se,s()({id:d,className:m()(t,{"has-error":_.message&&!_.hidden}),feedback:React.createElement(E.a,{propertyName:i}),value:b},f))})),ke=(n(171),function(e){var t=e.className,n=e.countries,r=e.id,o=e.label,c=e.onChange,a=e.value,i=void 0===a?"":a,u=e.autoComplete,s=void 0===u?"off":u,l=e.required,b=void 0!==l&&l,g=e.errorId,h=e.errorMessage,v=void 0===h?Object(p.__)("Please select a country.","woo-gutenberg-products-block"):h,y=Object(f.useMemo)((function(){return Object.keys(n).map((function(e){return{key:e,name:Object(d.decodeEntities)(n[e])}}))}),[n]);return React.createElement("div",{className:m()(t,"wc-block-components-country-input")},React.createElement(_e,{id:r,label:o,onChange:c,options:y,value:y.find((function(e){return e.key===i})),errorId:g,errorMessage:v,required:b}),"off"!==s&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:s,value:i,onChange:function(e){var t=e.target.value,n=y.find((function(e){return e.key===t}));c(n?n.key:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),Re=function(e){return React.createElement(ke,s()({countries:l.v},e))},Pe=function(e){return React.createElement(ke,s()({countries:l.a},e))},Ce=(n(173),function(e){var t=e.className,n=e.id,r=e.states,o=e.country,c=e.label,a=e.onChange,u=e.autoComplete,s=void 0===u?"off":u,l=e.value,b=void 0===l?"":l,g=e.required,h=void 0!==g&&g,v=r[o],y=Object(f.useMemo)((function(){return v?Object.keys(v).map((function(e){return{key:e,name:Object(d.decodeEntities)(v[e])}})):[]}),[v]),O=Object(f.useCallback)((function(e){if(y.length>0){var t=y.find((function(t){return t.key===e||t.name===e}));a(t?t.key:"")}else a(e)}),[a,y]);return y.length>0?React.createElement(React.Fragment,null,React.createElement(_e,{className:m()(t,"wc-block-components-state-input"),id:n,label:c,onChange:O,options:y,value:y.find((function(e){return e.key===b})),errorMessage:Object(p.__)("Please select a state.","woo-gutenberg-products-block"),required:h}),"off"!==s&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:s,value:b,onChange:function(e){return O(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):React.createElement(i.a,{className:t,id:n,label:c,onChange:O,autoComplete:s,value:b,required:h})}),xe=function(e){return React.createElement(Ce,s()({states:l.w},e))},Ie=function(e){return React.createElement(Ce,s()({states:l.b},e))},Ne=n(120);function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var De={city:{index:9},postcode:{index:7}},Ae={state:{required:!1}},Le={state:{required:!1,hidden:!0}},Fe={postcode:{required:!1,hidden:!0}},Ve={AE:Me(Me({},Fe),Ae),AF:Le,AO:Me(Me({},Fe),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),AT:Me(Me({},De),Le),AU:{city:{label:Object(p.__)("Suburb","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Suburb (optional)","woo-gutenberg-products-block")},postcode:{label:Object(p.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}},AX:Me(Me({},De),Le),BD:{postcode:{required:!1},state:{label:Object(p.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("District (optional)","woo-gutenberg-products-block")}},BE:Me(Me({},De),Le),BH:Me({postcode:{required:!1}},Le),BI:Le,BO:Fe,BS:Fe,CA:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},CH:Me(Me({},De),{},{state:{label:Object(p.__)("Canton","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Canton (optional)","woo-gutenberg-products-block"),required:!1}}),CL:{city:{require:!0},postcode:{required:!1},state:{label:Object(p.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Region (optional)","woo-gutenberg-products-block")}},CN:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},CO:{postcode:{required:!1}},CZ:Le,DE:Me(Me({},De),Le),DK:Me(Me({},De),Le),EE:Me(Me({},De),Le),ES:Me(Me({},De),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),FI:Me(Me({},De),Le),FR:Me(Me({},De),Le),GB:{postcode:{label:Object(p.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},GP:Le,GF:Le,GR:Ae,HK:{postcode:{required:!1},city:{label:Object(p.__)("Town/District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Town/District (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Region (optional)","woo-gutenberg-products-block")}},HU:{state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},ID:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},IE:{postcode:{label:Object(p.__)("Eircode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Eircode (optional)","woo-gutenberg-products-block"),required:!1},state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},IS:Me(Me({},De),Le),IL:Me(Me({},De),Le),IM:Le,IT:Me(Me({},De),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),JP:{first_name:{index:2},last_name:{index:1},address_1:{index:7},address_2:{index:8},postcode:{index:4},city:{index:6},state:{label:Object(p.__)("Prefecture","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Prefecture (optional)","woo-gutenberg-products-block"),index:5}},KR:Le,KW:Le,LB:Le,LI:Me(Me({},De),{},{state:{label:Object(p.__)("Municipality","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Municipality (optional)","woo-gutenberg-products-block"),required:!1}}),LK:Le,LU:Le,LV:{state:{label:Object(p.__)("Municipality","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Municipality (optional)","woo-gutenberg-products-block"),required:!1}},MQ:Le,MT:Le,MZ:Me(Me({},Fe),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),NL:Me(Me({},De),Le),NG:Me(Me({},Fe),{},{state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}}),NO:Me(Me({},De),Le),NP:{postcode:{required:!1},state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}},NZ:{postcode:{label:Object(p.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Region (optional)","woo-gutenberg-products-block")}},PL:Me(Me({},De),Le),PT:Le,RE:Le,RO:{state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},RS:Le,SE:Me(Me({},De),Le),SG:Me({city:{required:!1}},Le),SK:Me(Me({},De),Le),SI:Me(Me({},De),Le),SR:Me({},Fe),ST:Me(Me({},Fe),{},{state:{label:Object(p.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("District (optional)","woo-gutenberg-products-block")}}),MD:{state:{label:Object(p.__)("Municipality/District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Municipality/District (optional)","woo-gutenberg-products-block")}},TR:Me(Me({},De),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),UG:Me(Me({},Fe),{},{city:{label:Object(p.__)("Town/Village","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Town/Village (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("District (optional)","woo-gutenberg-products-block")}}),US:{postcode:{label:Object(p.__)("ZIP","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("ZIP (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}},VN:Me({city:{index:8},postcode:{index:7,required:!1}},Le),WS:Fe,YT:Le,ZA:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},ZW:Fe};function Be(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 Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=Object(j.a)((function(e){var t=e.id,n=e.fields,r=void 0===n?Object.keys(Ne.a):n,c=e.fieldConfig,a=void 0===c?{}:c,u=e.instanceId,s=e.onChange,l=e.type,d=void 0===l?"shipping":l,b=e.values,m=Object(y.b)(),g=m.getValidationError,h=m.setValidationErrors,v=m.clearValidationError,O=Ve[b.country]||{},j=r.map((function(e){return Ue(Ue(Ue({key:e},Ne.a[e]),O[e]),a[e])})).sort((function(e,t){return e.index-t.index})),E=g("shipping-missing-country")||{};return Object(f.useEffect)((function(){"shipping"===d&&function(e,t,n,r){r||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(p.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),r&&e.country&&n("shipping-missing-country")}(b,h,v,E.message&&!E.hidden)}),[b,E.message,E.hidden,h,v,d]),t=t||u,React.createElement("div",{id:t,className:"wc-block-components-address-form"},j.map((function(e){if(e.hidden)return null;if("country"===e.key){var n="shipping"===d?Re:Pe;return React.createElement(n,{key:e.key,id:"".concat(t,"-").concat(e.key),label:e.required?e.label:e.optionalLabel,value:b.country,autoComplete:e.autocomplete,onChange:function(e){return s(Ue(Ue({},b),{},{country:e,state:"",city:"",postcode:""}))},errorId:"shipping"===d?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){var r="shipping"===d?xe:Ie;return React.createElement(r,{key:e.key,id:"".concat(t,"-").concat(e.key),country:b.country,label:e.required?e.label:e.optionalLabel,value:b.state,autoComplete:e.autocomplete,onChange:function(e){return s(Ue(Ue({},b),{},{state:e}))},errorMessage:e.errorMessage,required:e.required})}return React.createElement(i.a,{key:e.key,id:"".concat(t,"-").concat(e.key),className:"wc-block-components-address-form__".concat(e.key),label:e.required?e.label:e.optionalLabel,value:b[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:function(t){return s(Ue(Ue({},b),{},o()({},e.key,t)))},errorMessage:e.errorMessage,required:e.required})})))}))},,function(e,t,n){"use strict";n.r(t);var r=n(242),o=n(132),c=n(1),a=n(93),i=n(9),u=n(186),s=n(191),l=n(108),f=n(15),p=n(12),d=n(112),b=n(0),m=n(76),g=n(79),h=n(279),v=n(103),y=(n(3),n(237)),O=n(276),j=n(238),E=n(239),w=n(35),S=n(46),_=n(187),k=n(138),R=n(148),P=(n(176),function(){var e=Object(_.a)(),t=e.paymentMethods,n=e.isInitialized,r=Object(k.a)().noticeContexts;return!n||n&&0===Object.keys(t).length?null:React.createElement(React.Fragment,null,React.createElement("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},React.createElement("div",{className:"wc-block-components-express-payment__content"},React.createElement(a.a,{context:r.EXPRESS_PAYMENTS},React.createElement(R.a,null)))),React.createElement("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(c.__)("Or","woo-gutenberg-products-block")))}),C=n(232),x=n(88),I=n(5),N=n.n(I),T=n(233),M=n(234),D=n(236),A=n(101),L=n(4),F=n(22),V=n(183),B=function(e){var t=e.children,n=e.redirectUrl;return React.createElement(V.a,{isCart:!0,redirectUrl:n},t)},U=n(10),q=n.n(U),H=n(278),z=n(85),W=n(65),K={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},G=function(){var e,t,n=Object(b.useState)(""),r=q()(n,2),o=r[0],c=r[1],a=Object(b.useRef)(null),i=Object(b.useRef)((e=function(e){e[0].isIntersecting?c("visible"):c(e[0].boundingClientRect.top>0?"below":"above")},t={threshold:1},"function"!=typeof IntersectionObserver?{observe:function(){},unobserve:function(){}}:new IntersectionObserver(e,t)));return Object(b.useLayoutEffect)((function(){var e=a.current,t=i.current;return e&&t.observe(e),function(){t.unobserve(e)}}),[]),[React.createElement("div",{"aria-hidden":!0,ref:a,style:K}),o]},Y=(n(241),function(e){return Object.values(e).reduce((function(e,t){return null!==t.icons&&(e=e.concat(t.icons)),e}),[])}),$=function(e){var t=e.link,n=Object(W.b)().isCalculating,r=G(),o=q()(r,2),a=o[0],u=o[1],s=Object(b.useState)(!1),l=q()(s,2),f=l[0],p=l[1],d=Object(_.b)().paymentMethods;Object(b.useEffect)((function(){if(window&&"function"==typeof window.addEventListener&&"function"==typeof window.removeEventListener){var e=function(){p(!1)};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}}),[]);var m=React.createElement(React.Fragment,null,React.createElement(z.a,{className:"wc-block-cart__submit-button",href:t||i.h,disabled:n,onClick:function(){return p(!0)},showSpinner:f},Object(c.__)("Proceed to Checkout","woo-gutenberg-products-block")),React.createElement(H.a,{icons:Y(d)}));return React.createElement("div",{className:"wc-block-cart__submit"},a,React.createElement("div",{className:"wc-block-cart__submit-container"},m),"below"===u&&React.createElement("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},m))},X=function(e){var t=e.itemCount,n=void 0===t?1:t;return React.createElement(A.a,{headingLevel:"2"},Object(c.sprintf)(Object(c._n)("Your cart (%d item)","Your cart (%d items)",n,"woo-gutenberg-products-block"),n))},Q=n(47),Z=n.n(Q),J=n(27),ee=n.n(J),te=n(36),ne=n(52),re=(n(235),function(e){var t=e.className,n=e.quantity,r=void 0===n?1:n,o=e.minimum,a=void 0===o?1:o,i=e.maximum,u=e.onChange,s=void 0===u?function(){return null}:u,l=e.itemName,f=void 0===l?"":l,p=e.disabled,d=N()("wc-block-components-quantity-selector",t),m=void 0!==i,g=r>a,h=!m||r<i,v=Object(b.useCallback)((function(e){var t=void 0!==ee()(e.key)?"ArrowDown"===e.key:e.keyCode===ne.DOWN,n=void 0!==ee()(e.key)?"ArrowUp"===e.key:e.keyCode===ne.UP;t&&g&&(e.preventDefault(),s(r-1)),n&&h&&(e.preventDefault(),s(r+1))}),[r,s,h,g]);return React.createElement("div",{className:d},React.createElement("input",{className:"wc-block-components-quantity-selector__input",disabled:p,type:"number",step:"1",min:"0",value:r,onKeyDown:v,onChange:function(e){var t=isNaN(e.target.value)||!e.target.value?0:parseInt(e.target.value,10);m&&(t=Math.min(t,i)),(t=Math.max(t,a))!==r&&s(t)},"aria-label":Object(c.sprintf)(Object(c.__)("Quantity of %s in your cart.","woo-gutenberg-products-block"),f)}),React.createElement("button",{"aria-label":Object(c.__)("Reduce quantity","woo-gutenberg-products-block"),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:p||!g,onClick:function(){var e=r-1;s(e),Object(te.speak)(Object(c.sprintf)(Object(c.__)("Quantity reduced to %s.","woo-gutenberg-products-block"),e))}},"-"),React.createElement("button",{"aria-label":Object(c.__)("Increase quantity","woo-gutenberg-products-block"),disabled:p||!h,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:function(){var e=r+1;s(e),Object(te.speak)(Object(c.sprintf)(Object(c.__)("Quantity increased to %s.","woo-gutenberg-products-block"),e))}},"+"))}),oe=n(115),ce=n(133),ae=n(141),ie=n(63),ue=n(179),se=n(180),le=n(181),fe=n(45),pe=n(91),de=function(e){var t=e.currency,n=e.saleAmount;return!n||n<=0?null:React.createElement(pe.a,{className:"wc-block-components-sale-badge"},Object(u.a)(Object(c.__)("Save <price/>","woo-gutenberg-products-block"),{price:React.createElement(fe.a,{currency:t,value:n})}))},be=n(184),me=n(119),ge=function(e,t){return e.convertPrecision(t.minorUnit).getAmount()},he=function(e){var t=e.lineItem,n=void 0===t?{}:t,r=n.name,o=void 0===r?"":r,a=n.catalog_visibility,i=void 0===a?"":a,u=n.short_description,s=void 0===u?"":u,l=n.description,m=void 0===l?"":l,g=n.low_stock_remaining,v=void 0===g?null:g,y=n.show_backorder_badge,O=void 0!==y&&y,j=n.quantity_limit,E=void 0===j?99:j,w=n.permalink,_=void 0===w?"":w,k=n.images,R=void 0===k?[]:k,P=n.variation,C=void 0===P?[]:P,x=n.item_data,I=void 0===x?[]:x,T=n.prices,M=void 0===T?{currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}}:T,D=function(e){var t=e.key,n=void 0===t?"":t,r=e.quantity,o=void 0===r?1:r,c=Object(d.a)().cartErrors,a=Object(W.b)().dispatchActions,i=Object(b.useState)(o),u=q()(i,2),s=u[0],l=u[1],m=Object(ae.a)(s,400),g=q()(m,1)[0],v=Object(ie.a)(g),y=Object(p.useDispatch)(f.CART_STORE_KEY),O=y.removeItemFromCart,j=y.changeCartItemQuantity,E=Object(p.useSelect)((function(e){return!!n&&e(f.CART_STORE_KEY).isItemPendingQuantity(n)}),[n]),w=Object(ie.a)(E),S=Object(p.useSelect)((function(e){return!!n&&e(f.CART_STORE_KEY).isItemPendingDelete(n)}),[n]),_=Object(ie.a)(S);return Object(b.useEffect)((function(){n&&Number.isFinite(v)&&v!==g&&j(n,g).then(h.c)}),[n,j,g,v]),Object(b.useEffect)((function(){w!==E&&(E?a.incrementCalculating():a.decrementCalculating())}),[a,E,w]),Object(b.useEffect)((function(){return _!==S&&(S?a.incrementCalculating():a.decrementCalculating()),function(){S&&a.decrementCalculating()}}),[a,S,_]),{isPendingDelete:S,quantity:s,changeQuantity:l,removeItem:function(){return!!n&&O(n).then((function(){Object(h.c)()}))},cartItemQuantityErrors:c}}(n),A=D.quantity,L=D.changeQuantity,F=D.removeItem,V=D.isPendingDelete,B=Object(S.getCurrency)(M),U=Object(me.a)({amount:parseInt(M.raw_prices.regular_price,10),precision:parseInt(M.raw_prices.precision,10)}),H=Object(me.a)({amount:parseInt(M.raw_prices.price,10),precision:parseInt(M.raw_prices.precision,10)}),z=U.multiply(A),K=H.multiply(A),G=U.subtract(H),Y=z.subtract(K),$=R.length?R[0]:{},X="hidden"===i||"search"===i;return React.createElement("tr",{className:N()("wc-block-cart-items__row",{"is-disabled":V})},React.createElement("td",{className:"wc-block-cart-item__image","aria-hidden":!$.alt},X?React.createElement(ue.a,{image:$}):React.createElement("a",{href:_,tabIndex:-1},React.createElement(ue.a,{image:$}))),React.createElement("td",{className:"wc-block-cart-item__product"},React.createElement(ce.a,{disabled:V||X,name:o,permalink:_}),O?React.createElement(se.a,null):!!v&&React.createElement(le.a,{lowStockRemaining:v}),React.createElement("div",{className:"wc-block-cart-item__prices"},React.createElement(oe.a,{currency:B,regularPrice:ge(U,B),price:ge(H,B)})),React.createElement(de,{currency:B,saleAmount:ge(G,B)}),React.createElement(be.a,{shortDescription:s,fullDescription:m,itemData:I,variation:C}),React.createElement("div",{className:"wc-block-cart-item__quantity"},React.createElement(re,{disabled:V,quantity:A,maximum:E,onChange:L,itemName:o}),React.createElement("button",{className:"wc-block-cart-item__remove-link",onClick:F,disabled:V},Object(c.__)("Remove item","woo-gutenberg-products-block")))),React.createElement("td",{className:"wc-block-cart-item__total"},React.createElement(oe.a,{currency:B,price:ge(K,B)}),A>1&&React.createElement(de,{currency:B,saleAmount:ge(Y,B)})))},ve=Z()(Array(3)).map((function(e,t){return React.createElement(he,{key:t})})),ye=function(e){var t=e.lineItems,n=void 0===t?[]:t,r=e.isLoading,o=void 0!==r&&r?ve:n.map((function(e){return React.createElement(he,{key:e.key,lineItem:e})}));return React.createElement("table",{className:"wc-block-cart-items"},React.createElement("thead",null,React.createElement("tr",{className:"wc-block-cart-items__header"},React.createElement("th",{className:"wc-block-cart-items__header-image"},React.createElement("span",null,Object(c.__)("Product","woo-gutenberg-products-block"))),React.createElement("th",{className:"wc-block-cart-items__header-product"},React.createElement("span",null,Object(c.__)("Details","woo-gutenberg-products-block"))),React.createElement("th",{className:"wc-block-cart-items__header-total"},React.createElement("span",null,Object(c.__)("Total","woo-gutenberg-products-block"))))),React.createElement("tbody",null,o))},Oe=(n(231),function(e){var t=e.attributes,n=t.isShippingCalculatorEnabled,r=t.hasDarkControls,o=Object(d.a)(),a=o.cartItems,u=o.cartFees,s=o.cartTotals,l=o.cartIsLoading,f=o.cartItemsCount,p=o.cartItemErrors,m=o.cartNeedsPayment,g=o.cartNeedsShipping,h=Object(C.a)(),v=h.applyCoupon,_=h.removeCoupon,k=h.isApplyingCoupon,R=h.isRemovingCoupon,I=h.appliedCoupons,V=Object(x.a)().addErrorNotice;Object(b.useEffect)((function(){p.forEach((function(e){V(Object(F.decodeEntities)(e.message),{isDismissible:!0,id:e.code})}))}),[V,p]);var B=Object(S.getCurrencyFromPriceResponse)(s),U=N()("wc-block-cart",{"wc-block-cart--is-loading":l,"has-dark-controls":r});return React.createElement(T.a,{className:U},React.createElement(M.a,{className:"wc-block-cart__main"},React.createElement(X,{itemCount:f}),React.createElement(ye,{lineItems:a,isLoading:l})),React.createElement(D.a,{className:"wc-block-cart__sidebar"},React.createElement(A.a,{headingLevel:"2",className:"wc-block-cart__totals-title"},Object(c.__)("Cart totals","woo-gutenberg-products-block")),React.createElement(w.Subtotal,{currency:B,values:s}),React.createElement(w.TotalsFees,{currency:B,cartFees:u}),React.createElement(y.a,{cartCoupons:I,currency:B,isRemovingCoupon:R,removeCoupon:_,values:s}),g&&React.createElement(O.a,{showCalculator:n,showRateSelector:!0,values:s,currency:B}),!i.k&&React.createElement(w.TotalsTaxes,{currency:B,values:s}),i.i&&React.createElement(j.a,{onSubmit:v,isLoading:k}),React.createElement(E.a,{currency:B,values:s}),React.createElement(w.ExperimentalOrderMeta.Slot,null),React.createElement("div",{className:"wc-block-cart__payment-options"},m&&React.createElement(P,null),React.createElement($,{link:Object(L.getSetting)("page-"+(null==t?void 0:t.checkoutPageId),!1)}))))}),je=function(e){return React.createElement(B,null,React.createElement(Oe,e))},Ee=function(e){var t=e.content;return Object(b.useEffect)((function(){Object(h.a)("wc-blocks_render_blocks_frontend",{element:document.body.querySelector(".wp-block-woocommerce-cart")})}),[]),React.createElement(b.RawHTML,null,t)},we=Object(v.a)((function(e){var t=e.emptyCart,n=e.attributes,r=e.scrollToTop,o=Object(d.a)(),c=o.cartItems,a=o.cartIsLoading;return Object(b.useEffect)((function(){var e=function(){Object(p.dispatch)(f.CART_STORE_KEY).invalidateResolutionForStore(),r()},t=Object(h.b)("added_to_cart","wc-blocks_added_to_cart"),n=Object(h.b)("removed_from_cart","wc-blocks_removed_from_cart");return document.body.addEventListener("wc-blocks_added_to_cart",e),document.body.addEventListener("wc-blocks_removed_from_cart",e),function(){t(),n(),document.body.removeEventListener("wc-blocks_added_to_cart",e),document.body.removeEventListener("wc-blocks_removed_from_cart",e)}}),[r]),React.createElement(React.Fragment,null,a||0!==c.length?React.createElement(m.a,{showSpinner:!0,isLoading:a},React.createElement(g.a,null,React.createElement(je,{attributes:n}))):React.createElement(Ee,{content:t}))})),Se={isPreview:{type:"boolean",default:!1,save:!1},isShippingCalculatorEnabled:{type:"boolean",default:i.n},checkoutPageId:{type:"number",default:0},hasDarkControls:{type:"boolean",default:i.l}},_e=function(){window.location.reload(!0)};Object(l.a)({selector:".wp-block-woocommerce-cart",Block:Object(r.a)(Object(o.a)((function(e){return React.createElement(a.a,{context:"wc/cart"},React.createElement(we,e))}))),getProps:function(e){return{emptyCart:e.innerHTML,attributes:Object(s.a)(Se,e.dataset)}},getErrorBoundaryProps:function(){return{header:Object(c.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(u.a)(Object(c.__)("The cart has encountered an unexpected error. <button>Try reloading the page</button>. If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:React.createElement("button",{className:"wc-block-link-button",onClick:_e})}),showErrorMessage:i.j}}})},,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(10),a=n.n(c),i=n(5),u=n.n(i),s=n(1),l=n(9),f=(n(3),n(0)),p=n(112),d=n(64),b=n(85),m=n(21),g=n.n(m),h=n(79),v=(n(134),n(269)),y=function(e){var t=e.address,n=e.onUpdate,r=e.addressFields,o=Object(f.useState)(t),c=a()(o,2),i=c[0],u=c[1],l=Object(h.b)(),p=l.hasValidationErrors,d=l.showAllValidationErrors;return React.createElement("form",{className:"wc-block-components-shipping-calculator-address"},React.createElement(v.a,{fields:r,onChange:u,values:i}),React.createElement(b.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:g()(i,t),onClick:function(e){if(e.preventDefault(),d(),!p)return n(i)},type:"submit"},Object(s.__)("Update","woo-gutenberg-products-block")))},O=function(e){var t=e.onUpdate,n=void 0===t?function(){}:t,r=e.addressFields,o=void 0===r?["country","state","city","postcode"]:r,c=Object(d.b)(),a=c.shippingAddress,i=c.setShippingAddress;return React.createElement("div",{className:"wc-block-components-shipping-calculator"},React.createElement(y,{address:a,addressFields:o,onUpdate:function(e){i(e),n(e)}}))},j=n(27),E=n.n(j),w=n(22),S=function(e){var t=e.address;if(0===Object.values(t).length)return null;var n="string"==typeof l.v[t.country]?Object(w.decodeEntities)(l.v[t.country]):"",r="object"===E()(l.w[t.country])&&"string"==typeof l.w[t.country][t.state]?Object(w.decodeEntities)(l.w[t.country][t.state]):t.state,o=[];o.push(t.postcode.toUpperCase()),o.push(t.city),o.push(r),o.push(n);var c=o.filter(Boolean).join(", ");return c&&React.createElement("span",{className:"wc-block-components-shipping-address"},Object(s.sprintf)(Object(s.__)("Shipping to %s","woo-gutenberg-products-block"),c)+" ")},_=n(35),k=n(117),R=n(146),P=function(e){var t=e.hasRates,n=e.shippingRates,r=e.shippingRatesLoading,o=t?Object(s.__)("Shipping options","woo-gutenberg-products-block"):Object(s.__)("Choose a shipping option","woo-gutenberg-products-block");return React.createElement("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},React.createElement("legend",{className:"screen-reader-text"},o),React.createElement(R.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:React.createElement(k.a,{isDismissible:!1,className:u()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(s.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:n,shippingRatesLoading:r}))},C=function(e){return e.some((function(e){return e.shipping_rates.length}))},x=(n(170),function(e){var t=e.showCalculator,n=e.isShippingCalculatorOpen,r=e.setIsShippingCalculatorOpen,o=e.shippingAddress;return React.createElement(React.Fragment,null,React.createElement(S,{address:o}),t&&React.createElement(N,{label:Object(s.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:r}))}),I=function(e){var t=e.showCalculator,n=e.isShippingCalculatorOpen,r=e.setIsShippingCalculatorOpen;return t?React.createElement(N,{isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:r}):React.createElement("em",null,Object(s.__)("Calculated during checkout","woo-gutenberg-products-block"))},N=function(e){var t=e.label,n=void 0===t?Object(s.__)("Calculate","woo-gutenberg-products-block"):t,r=e.isShippingCalculatorOpen,o=e.setIsShippingCalculatorOpen;return React.createElement("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){o(!r)},"aria-expanded":r},n)};t.a=function(e){var t=e.currency,n=e.values,r=e.showCalculator,c=void 0===r||r,i=e.showRateSelector,d=void 0===i||i,b=e.className,m=Object(f.useState)(!1),g=a()(m,2),h=g[0],v=g[1],y=Object(p.a)(),j=y.shippingAddress,E=y.cartHasCalculatedShipping,w=y.shippingRates,S=y.shippingRatesLoading,k=l.k?parseInt(n.total_shipping,10)+parseInt(n.total_shipping_tax,10):parseInt(n.total_shipping,10),R=C(w)||k,N={isShippingCalculatorOpen:h,setIsShippingCalculatorOpen:v};return React.createElement("div",{className:u()("wc-block-components-totals-shipping",b)},React.createElement(_.TotalsItem,{label:Object(s.__)("Shipping","woo-gutenberg-products-block"),value:E?k:React.createElement(I,o()({showCalculator:c},N)),description:React.createElement(React.Fragment,null,E&&React.createElement(x,o()({shippingAddress:j,showCalculator:c},N))),currency:t}),c&&h&&React.createElement(O,{onUpdate:function(){v(!1)}}),d&&E&&React.createElement(P,{hasRates:R,shippingRates:w,shippingRatesLoading:S}))}},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(7),a=n.n(c),i=n(5),u=n.n(i),s=function(e){return"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--".concat(e)},l=function(e){var t=e.id,n=e.src,r=void 0===n?null:n,o=e.alt,c=void 0===o?"":o;return r?React.createElement("img",{className:s(t),src:r,alt:c}):null},f=n(9),p=[{id:"alipay",alt:"Alipay",src:f.C+"img/payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:f.C+"img/payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:f.C+"img/payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:f.C+"img/payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:f.C+"img/payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:f.C+"img/payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:f.C+"img/payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:f.C+"img/payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:f.C+"img/payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:f.C+"img/payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:f.C+"img/payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:f.C+"img/payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:f.C+"img/payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:f.C+"img/payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:f.C+"img/payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:f.C+"img/payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:f.C+"img/payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:f.C+"img/payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:f.C+"img/payment-methods/wechat.svg"}],d=n(27),b=n.n(d);n(177);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icons,n=void 0===t?[]:t,r=e.align,c=void 0===r?"center":r,a=function(e){var t={};return e.forEach((function(e){var n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"===b()(e)&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&!t[n.id]&&(t[n.id]=n)})),Object.values(t)}(n);if(0===a.length)return null;var i=u()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c});return React.createElement("div",{className:i},a.map((function(e){var t,n=g(g({},e),(t=e.id,p.find((function(e){return e.id===t}))||{}));return React.createElement(l,o()({key:"payment-method-icon-"+e.id},n))})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return a}));var r=window.Event||null,o=function(e,t){var n=t.bubbles,o=void 0!==n&&n,c=t.cancelable,a=void 0!==c&&c,i=t.element;if(i||(i=document.body),"function"==typeof r){var u=new r(e,{bubbles:o,cancelable:a});i.dispatchEvent(u)}else{var s=document.createEvent("Event");s.initEvent(e,o,a),i.dispatchEvent(s)}},c=function(){o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var c=function(){o(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}}]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build/cart.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'f8ffe4d34454a39312ef621960caeff2');
 
build/cart.js DELETED
@@ -1 +0,0 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.cart=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],p=0,b=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&b.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);b.length;)b.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={20: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.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="";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([856,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},120:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(8)),a=r.n(o),i=r(537);r(348);t.a=function(e){var t=e.children,r=e.className,o=e.screenReaderLabel,s=e.showSpinner,u=void 0!==s&&s,l=e.isLoading;return void 0===l||l?Object(n.createElement)("div",{className:a()(r,"wc-block-components-loading-mask")},u&&Object(n.createElement)(i.a,null),Object(n.createElement)("div",{className:"wc-block-components-loading-mask__children","aria-hidden":!0},t),Object(n.createElement)("span",{className:"screen-reader-text"},o||Object(c.__)("Loading…","woo-gutenberg-products-block"))):t}},121: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(21),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)}},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},134:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(5),c=r.n(n),o=r(175),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]),p=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),p),{},{setIsSuppressed:i})}},135:function(e,t){!function(){e.exports=this.wp.wordcount}()},137:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(15),a=r.n(o),i=r(12),s=r.n(i),u=r(16),l=r.n(u),p=r(17),b=r.n(p),d=r(10),m=r.n(d),g=r(5),f=r.n(g),O=r(0),j=(r(2),r(9)),h=r(1),v=r(6),y=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.S,"img/block-error.svg"):t,n=e.header,c=void 0===n?Object(h.__)("Oops!","woo-gutenberg-products-block"):n,o=e.text,a=void 0===o?Object(h.__)("There was an error loading the content.","woo-gutenberg-products-block"):o,i=e.errorMessage,s=e.errorMessagePrefix,u=void 0===s?Object(h.__)("Error:","woo-gutenberg-products-block"):s;return Object(O.createElement)("div",{className:"wc-block-error wc-block-components-error"},r&&Object(O.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),Object(O.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(O.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),a&&Object(O.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},a),i&&Object(O.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},u?u+" ":"",i)))};r(242);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=m()(e);if(t){var c=m()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return b()(this,r)}}var E=function(e){l()(r,e);var t=_(r);function r(){var e;c()(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)),f()(s()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(r,[{key:"render",value:function(){var e=this.props,t=e.header,r=e.imageUrl,n=e.showErrorMessage,c=e.text,o=e.errorMessagePrefix,a=e.renderError,i=this.state,s=i.errorMessage;return i.hasError?"function"==typeof a?a({errorMessage:s}):Object(O.createElement)(y,{errorMessage:n?s:null,header:t,imageUrl:r,text:c,errorMessagePrefix:o}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(O.createElement)(O.Fragment,null,Object(O.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(j.Component);E.defaultProps={showErrorMessage:!0};t.a=E},142:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(1),i=r(55),s=r(8),u=r.n(s),l=(r(2),r(215),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}))}),p=function(e){var t=e.className,r=e.currency,n=e.regularPriceClassName,c=e.regularPriceStyle,s=e.regularPrice,l=e.priceClassName,p=e.priceStyle,b=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:p},e)},value:b}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.maxPrice,s=void 0===a?null:a,b=e.minPrice,d=void 0===b?null:b,m=e.price,g=void 0===m?null:m,f=e.priceClassName,O=e.priceStyle,j=e.regularPrice,h=e.regularPriceClassName,v=e.regularPriceStyle,y=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));return j&&g!==j?Object(o.createElement)(p,{className:y,currency:n,price:g,priceClassName:f,priceStyle:O,regularPrice:j,regularPriceClassName:h,regularPriceStyle:v}):null!==d&&null!==s?Object(o.createElement)(l,{className:y,currency:n,maxPrice:s,minPrice:d,priceClassName:f,priceStyle:O}):null!==g?Object(o.createElement)("span",{className:y},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",f),currency:n,value:g,style:O})):Object(o.createElement)("span",{className:y},Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",f)}))}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return p}));var n=r(5),c=r.n(n),o=r(7);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}}},p=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,p=new Map(e[n]);switch(r){case s:return p.set(o,{priority:l,callback:a}),i(i({},e),{},c()({},n,p));case u:return p.delete(o),i(i({},e),{},c()({},n,p))}return e}},145:function(e,t,r){"use strict";var n=r(0),c=r(8),o=r.n(c);r(2),r(351);t.a=function(e){var t=e.children,r=e.className;return Object(n.createElement)("div",{className:o()("wc-block-components-product-badge",r)},t)}},155:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(5),c=r.n(n),o=r(37),a=r(21),i=r(121),s=r(28),u=r(7);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;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 b={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},d=p(p({},b),{},{email:"",phone:""}),m=function(e){return Object(u.mapValues)(e,(function(e){return Object(s.decodeEntities)(e)}))},g={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:d,shippingAddress:b,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(i.b)(),r=t.isEditor,n=t.previewData,c=(null==n?void 0:n.previewCart)||{},s=e.shouldSelect,u=Object(a.useSelect)((function(e,t){var n=t.dispatch;if(!s)return g;if(r)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:d,shippingAddress:b,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var a=e(o.CART_STORE_KEY),i=a.getCartData(),u=a.getCartErrors(),l=a.getCartTotals(),p=!a.hasFinishedResolution("getCartData"),f=a.isCustomerDataUpdating(),O=n(o.CART_STORE_KEY).receiveCart,j=m(i.billingAddress),h=i.needsShipping?m(i.shippingAddress):j;return{cartCoupons:i.coupons,cartItems:i.items||[],cartFees:i.fees||[],cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors||[],cartTotals:l,cartIsLoading:p,cartErrors:u,billingAddress:j,shippingAddress:h,extensions:i.extensions||{},shippingRates:i.shippingRates||[],shippingRatesLoading:f,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements||[],receiveCart:O}}),[s]);return u}},157:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(n.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(n.createElement)("g",{mask:"url(#external-mask)"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},158:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(8),u=r.n(s);r(2),r(350);t.a=function(e){var t=e.children,r=e.className,n=e.headingLevel,o=a()(e,["children","className","headingLevel"]),s=u()("wc-block-components-title",r),l="h".concat(n);return Object(i.createElement)(l,c()({className:s},o),t)}},166:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=(r(2),r(28)),u=r(8),l=r.n(u);r(214);t.a=function(e){var t=e.className,r=void 0===t?"":t,n=e.disabled,o=void 0!==n&&n,u=e.name,p=e.permalink,b=void 0===p?"":p,d=a()(e,["className","disabled","name","permalink"]),m=l()("wc-block-components-product-name",r);return o?Object(i.createElement)("span",c()({className:m},d),Object(s.decodeEntities)(u)):Object(i.createElement)("a",c()({className:m,href:b},d),Object(s.decodeEntities)(u))}},167:function(e,t,r){"use strict";var n=r(0),c=r(135),o=r(89),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,p=c.slice(0,t+l);return Object(o.autop)(s(p,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,s=e.countType,p=void 0===s?"words":s,b=e.className,d=void 0===b?"":b,m=Object(n.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",n=Object(o.autop)(e),i=Object(c.count)(n,r);if(i<=t)return n;var s=a(n),p=Object(c.count)(s,r);return p<=t?s:"words"===r?u(s,t):l(s,t,"characters_including_spaces"===r)}(t,i,p)}),[t,i,p]);return Object(n.createElement)(n.RawHTML,{className:d},m)}},171:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(14),a=r.n(o),i=r(15),s=r.n(i),u=r(12),l=r.n(u),p=r(16),b=r.n(p),d=r(17),m=r.n(d),g=r(10),f=r.n(g),O=r(5),j=r.n(O),h=r(0),v=r(9);r(240);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=f()(e);if(t){var c=f()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return m()(this,r)}}t.a=function(e){var t=function(t){b()(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(v.createRef)(),e}return s()(n,[{key:"render",value:function(){return Object(h.createElement)(h.Fragment,null,Object(h.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(h.createElement)(e,c()({},this.props,{scrollToTop:this.scrollToTop})))}}]),n}(v.Component);return t.displayName="withScrollToTop",t}},175:function(e,t,r){"use strict";r.d(t,"b",(function(){return O})),r.d(t,"a",(function(){return j}));var n=r(5),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=(r(2),r(21)),u=r(279),l=r(931),p=r(134),b=r(121),d=function(){var e=Object(b.b)().isEditor,t=Object(p.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 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 g(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 f=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),O=function(){return Object(i.useContext)(f)},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,p=void 0===l?"wc/core":l,b=Object(s.useDispatch)("core/notices"),m=b.createNotice,O=b.removeNotice,j=Object(i.useState)(!1),h=a()(j,2),v=h[0],y=h[1],_=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]:{};m(e,t,g(g({},r),{},{context:r.context||p}))}),[m,p]),E=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;O(e,t)}),[O,p]),w=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]:{};_("default",e,g(g({},t),{},{type:"snackbar"}))}),[_]),k={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(p)}}),[p]).notices,createNotice:_,createSnackbarNotice:w,removeNotice:E,context:p,setIsSuppressed:y},S=v?null:Object(i.createElement)(u.a,{className:n,notices:k.notices}),P=v?null:Object(i.createElement)(d,null);return Object(i.createElement)(f.Provider,{value:k},o&&S,t,P)}},178:function(e,t){},188:function(e,t){},189:function(e,t){!function(){e.exports=this.wp.warning}()},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},190:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(15),a=r.n(o),i=r(12),s=r.n(i),u=r(16),l=r.n(u),p=r(17),b=r.n(p),d=r(10),m=r.n(d),g=r(5),f=r.n(g),O=r(0),j=r(1),h=r(9),v=r(279),y=(r(2),r(6));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=m()(e);if(t){var c=m()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return b()(this,r)}}var E=function(e){l()(r,e);var t=_(r);function r(){var e;c()(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)),f()(s()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(r,[{key:"render",value:function(){var e=this.state,t=e.hasError,r=e.errorMessage,n=this.props.isEditor;if(t){var c=Object(j.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(n||y.l)&&(c=r||Object(j.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));var o=[{id:"0",content:c,isDismissible:!1,status:"error"}];return Object(O.createElement)(v.a,{notices:o})}return this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{errorMessage:e.message,hasError:!0}}}]),r}(h.Component);E.defaultProps={isEditor:!1},t.a=E},191:function(e,t,r){"use strict";var n=r(1),c={first_name:{label:Object(n.__)("First name","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("First name (optional)","woo-gutenberg-products-block"),autocomplete:"given-name",autocapitalize:"sentences",required:!0,hidden:!1,index:1},last_name:{label:Object(n.__)("Last name","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Last name (optional)","woo-gutenberg-products-block"),autocomplete:"family-name",autocapitalize:"sentences",required:!0,hidden:!1,index:2},company:{label:Object(n.__)("Company","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Company (optional)","woo-gutenberg-products-block"),autocomplete:"organization",autocapitalize:"sentences",required:!1,hidden:!1,index:3},address_1:{label:Object(n.__)("Address","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Address (optional)","woo-gutenberg-products-block"),autocomplete:"address-line1",autocapitalize:"sentences",required:!0,hidden:!1,index:4},address_2:{label:Object(n.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Apartment, suite, etc. (optional)","woo-gutenberg-products-block"),autocomplete:"address-line2",autocapitalize:"sentences",required:!1,hidden:!1,index:5},country:{label:Object(n.__)("Country/Region","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Country/Region (optional)","woo-gutenberg-products-block"),autocomplete:"country",required:!0,hidden:!1,index:6},city:{label:Object(n.__)("City","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("City (optional)","woo-gutenberg-products-block"),autocomplete:"address-level2",autocapitalize:"sentences",required:!0,hidden:!1,index:7},state:{label:Object(n.__)("State/County","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("State/County (optional)","woo-gutenberg-products-block"),autocomplete:"address-level1",autocapitalize:"sentences",required:!0,hidden:!1,index:8},postcode:{label:Object(n.__)("Postal code","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Postal code (optional)","woo-gutenberg-products-block"),autocomplete:"postal-code",autocapitalize:"characters",required:!0,hidden:!1,index:9}};t.a=c},20:function(e,t){!function(){e.exports=this.wp.url}()},207: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}}},21:function(e,t){!function(){e.exports=this.wp.data}()},214:function(e,t){},215:function(e,t){},216:function(e,t){},217:function(e,t){},218:function(e,t){},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},240:function(e,t){},242:function(e,t){},243:function(e,t){},244:function(e,t){},245:function(e,t){},246:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(31),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.SVG,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(261);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}},250:function(e,t,r){"use strict";var n=r(30),c=r.n(n),o=r(0),a=r(1),i=r(4),s=r(21),u=r(36);t.a=function(e){var t=e.setPageId,r=e.pageId,n=e.labels,l=Object(s.useSelect)((function(e){return e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100})}),[])||null;return l?Object(o.createElement)(i.PanelBody,{title:n.title},Object(o.createElement)(i.SelectControl,{label:Object(a.__)("Link to","woo-gutenberg-products-block"),value:r,options:[{label:n.default,value:0}].concat(c()(l.map((function(e){return{label:Object(u.a)(e,l),value:parseInt(e.id,10)}})))),onChange:function(e){return t(parseInt(e,10))}})):null}},251:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),c=r(1),o=(r(2),r(54)),a=r(284),i=r(157),s=(r(347),function(e){var t=e.text,r=e.url,s=void 0===r?"https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565":r;return Object(n.createElement)("div",{className:"wc-block-feedback-prompt"},Object(n.createElement)(o.a,{srcElement:a.a}),Object(n.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(c.__)("Feedback?","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(n.createElement)("a",{href:s,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(c.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(n.createElement)(o.a,{srcElement:i.a,size:16})))}),u=function(){return Object(n.createElement)(s,{text:Object(c.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woo-gutenberg-products-block"),url:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?template=--cart-checkout-feedback.md"})}},252:function(e,t){!function(){e.exports=this.wp.plugins}()},253:function(e,t,r){"use strict";var n=r(24),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(71)),s=r(120),u=r(49),l=r(257),p=function(e){var t=e.packages,r=e.collapse,n=e.showItems,a=e.collapsible,i=e.noResultsMessage;return t.length?t.map((function(e){var t=e.package_id,s=c()(e,["package_id"]);return Object(o.createElement)(u.ShippingRatesControlPackage,{key:t,packageId:t,packageData:s,collapsible:a,collapse:r,showItems:n,noResultsMessage:i})})):null};t.a=function(e){var t=e.shippingRates,r=e.shippingRatesLoading,n=e.className,c=e.collapsible,b=void 0!==c&&c,d=e.noResultsMessage,m=e.renderOption;return Object(o.useEffect)((function(){if(!r){var e=Object(l.a)(t),n=Object(l.b)(t);1===e?Object(i.speak)(Object(a.sprintf)(Object(a._n)("%d shipping option was found.","%d shipping options were found.",n,"woo-gutenberg-products-block"),n)):Object(i.speak)(Object(a.sprintf)(Object(a._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(a.sprintf)(Object(a._n)("%d shipping option was found","%d shipping options were found",n,"woo-gutenberg-products-block"),n))}}),[r,t]),Object(o.createElement)(s.a,{isLoading:r,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},Object(o.createElement)(u.ExperimentalOrderShippingPackages.Slot,{className:n,collapsible:b,noResultsMessage:d,renderOption:m}),Object(o.createElement)(u.ExperimentalOrderShippingPackages,null,Object(o.createElement)(p,{packages:t,noResultsMessage:d})))}},254:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(372),i=r(371),s=r(121),u=r(258),l=r(190);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(){var e=Object(s.b)().isEditor,t=Object(u.b)(),r=t.setActivePaymentMethod,n=t.activePaymentMethod,c=t.paymentMethodData,p=t.setPaymentStatus,d=Object(a.a)(),m=Object(i.a)().paymentMethods,g=Object(o.useRef)(n),f=Object(o.useRef)(c),O=Object(o.useCallback)((function(e){return function(){g.current=n,f.current=c,p().started(),r(e)}}),[n,c,r,p]),j=Object(o.useCallback)((function(){r(g.current),f.current.isSavedToken&&p().success(f.current)}),[r,p]),h=Object.keys(m),v=h.length>0?h.map((function(t){var r=e?m[t].edit:m[t].content;return Object(o.isValidElement)(r)?Object(o.createElement)("li",{key:t,id:"express-payment-method-".concat(t)},Object(o.cloneElement)(r,b(b({},d),{},{onClick:O(t),onClose:j}))):null})):Object(o.createElement)("li",{key:"noneRegistered"},"No registered Payment Methods");return Object(o.createElement)(l.a,{isEditor:e},Object(o.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},v))}},255:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=(r(2),r(8)),u=r.n(s),l=r(1),p=r(54),b=r(261),d=(r(188),function(e){var t=e.text,r=e.screenReaderText,n=void 0===r?"":r,o=e.element,s=void 0===o?"li":o,l=e.className,p=void 0===l?"":l,b=e.radius,d=void 0===b?"small":b,m=e.children,g=void 0===m?null:m,f=a()(e,["text","screenReaderText","element","className","radius","children"]),O=s,j=u()(p,"wc-block-components-chip","wc-block-components-chip--radius-"+d),h=Boolean(n&&n!==t);return Object(i.createElement)(O,c()({className:j},f),Object(i.createElement)("span",{"aria-hidden":h,className:"wc-block-components-chip__text"},t),h&&Object(i.createElement)("span",{className:"screen-reader-text"},n),g)});t.a=function(e){var t=e.ariaLabel,r=void 0===t?"":t,n=e.className,o=void 0===n?"":n,s=e.disabled,m=void 0!==s&&s,g=e.onRemove,f=void 0===g?function(){}:g,O=e.removeOnAnyClick,j=void 0!==O&&O,h=e.text,v=e.screenReaderText,y=void 0===v?"":v,_=a()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),E=j?"span":"button";if(!r){var w=y&&"string"==typeof y?y:h;r="string"!=typeof w?Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)(Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),w)}var k={"aria-label":r,disabled:m,onClick:f,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||f()}},S=j?k:{},P=j?{"aria-hidden":!0}:k;return Object(i.createElement)(d,c()({},_,S,{className:u()(o,"is-removable"),element:j?"button":_.element,screenReaderText:y,text:h}),Object(i.createElement)(E,c()({className:"wc-block-components-chip__remove"},P),Object(i.createElement)(p.a,{className:"wc-block-components-chip__remove-icon",srcElement:b.a,size:16})))}},257:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.length},c=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},258:function(e,t,r){"use strict";r.d(t,"b",(function(){return he})),r.d(t,"a",(function(){return ve}));var n=r(30),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=r(3),u=r(207),l=r(134),p=r(5),b=r.n(p);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 m(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){b()(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 g={PRISTINE:"pristine",STARTED:"started",PROCESSING:"processing",ERROR:"has_error",FAILED:"failed",SUCCESS:"success",COMPLETE:"complete"},f=m(m({},g),{},{SET_REGISTERED_PAYMENT_METHODS:"set_registered_payment_methods",SET_REGISTERED_EXPRESS_PAYMENT_METHODS:"set_registered_express_payment_methods",SET_SHOULD_SAVE_PAYMENT_METHOD:"set_should_save_payment_method"}),O={currentStatus:g.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},j={setPaymentStatus:function(){return{started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(e,t){}}},currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1},paymentStatuses:g,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:function(){},activeSavedToken:"",setActiveSavedToken:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){},onPaymentSuccess:function(){},onPaymentFail:function(){}},h=r(45),v=r.n(h);function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){b()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E=f.STARTED,w=f.ERROR,k=f.FAILED,S=f.SUCCESS,P=f.PROCESSING,C=f.PRISTINE,N=f.COMPLETE,M=f.SET_REGISTERED_PAYMENT_METHODS,I=f.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,D=f.SET_SHOULD_SAVE_PAYMENT_METHOD,R=function(e){return!("object"!==v()(e)||!e.isSavedToken)},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.paymentMethodData,c=t.shouldSavePaymentMethod,o=t.errorMessage,a=t.paymentMethods;switch(r){case E:return e.currentStatus!==E?_(_({},e),{},{currentStatus:E}):e;case w:return e.currentStatus!==w?_(_({},e),{},{currentStatus:w,errorMessage:o||e.errorMessage}):e;case k:return e.currentStatus!==k?_(_({},e),{},{currentStatus:k,paymentMethodData:n||e.paymentMethodData,errorMessage:o||e.errorMessage}):e;case S:return e.currentStatus!==S?_(_({},e),{},{currentStatus:S,paymentMethodData:n||e.paymentMethodData,hasSavedToken:R(n)}):e;case P:return e.currentStatus!==P?_(_({},e),{},{currentStatus:P,errorMessage:""}):e;case N:return e.currentStatus!==N?_(_({},e),{},{currentStatus:N}):e;case C:return _(_({},O),{},{currentStatus:C,paymentMethods:_({},e.paymentMethods),expressPaymentMethods:_({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case M:return _(_({},e),{},{paymentMethods:a});case I:return _(_({},e),{},{expressPaymentMethods:a});case D:return _(_({},e),{},{shouldSavePaymentMethod:c})}return e},T=f.ERROR,A=f.FAILED,L=f.SUCCESS,z=f.SET_REGISTERED_PAYMENT_METHODS,U=f.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,V=f.SET_SHOULD_SAVE_PAYMENT_METHOD,F=function(e){return{type:e}},q=function(e){var t=e.errorMessage,r=e.paymentMethodData;return{type:A,errorMessage:t,paymentMethodData:r}},B=function(e){var t=e.paymentMethodData;return{type:L,paymentMethodData:t}},H=r(13),Y=r.n(H),G=r(27),Q=r.n(G),W=r(1),K=r(51),X=r(53),Z=r(155),$=r(6),J=r(121),ee=r(97);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){b()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((func