Full Site Editing - Version 1.11

Version Description

  • Fix broken blocks in page layout picker preview in Firefox.
  • Add settings to the donation block.
  • Fix premium content block to ensure it is auto-selected when mounted.
  • Add fallback to donations block to set default products if none are already defined.
  • Fix block pattern preview viewport scaling.
  • Fix broken site editor page.
  • Add one time payment option to payment plans.
  • Add a general transform to premium content.
  • Fix custom font size in block patterns previews.
Download this release

Release Info

Developer addiestavlo
Plugin Icon wp plugin Full Site Editing
Version 1.11
Comparing to
See all releases

Code changes from version 1.10 to 1.11

Files changed (95) hide show
  1. block-patterns/patterns/call-to-action-02.php +5 -4
  2. block-patterns/patterns/call-to-action-03.php +5 -4
  3. block-patterns/patterns/collage-gallery.php +4 -3
  4. block-patterns/patterns/coming-soon.php +5 -4
  5. block-patterns/patterns/contact-02.php +4 -3
  6. block-patterns/patterns/contact-03.php +4 -3
  7. block-patterns/patterns/contact-04.php +5 -4
  8. block-patterns/patterns/contact.php +4 -3
  9. block-patterns/patterns/description-and-image.php +4 -3
  10. block-patterns/patterns/food-menu.php +5 -4
  11. block-patterns/patterns/headline-02.php +4 -3
  12. block-patterns/patterns/headline.php +4 -3
  13. block-patterns/patterns/image-and-description.php +4 -3
  14. block-patterns/patterns/image-and-text.php +4 -3
  15. block-patterns/patterns/images-with-titles.php +5 -4
  16. block-patterns/patterns/list.php +5 -4
  17. block-patterns/patterns/masonry-gallery.php +4 -3
  18. block-patterns/patterns/numbered-list.php +5 -4
  19. block-patterns/patterns/numbers.php +7 -6
  20. block-patterns/patterns/portraits-and-text.php +5 -4
  21. block-patterns/patterns/recent-posts-02.php +4 -3
  22. block-patterns/patterns/recent-posts.php +4 -3
  23. block-patterns/patterns/three-columns-and-image.php +8 -7
  24. block-patterns/patterns/three-images-side-by-side.php +4 -3
  25. block-patterns/patterns/tiled-mosaic-gallery.php +5 -4
  26. block-patterns/patterns/two-column-text-and-image.php +5 -4
  27. block-patterns/patterns/two-images-and-quote.php +4 -3
  28. block-patterns/patterns/two-images-side-by-side.php +4 -3
  29. common/data-stores/index.ts +1 -0
  30. common/data-stores/plans.ts +6 -0
  31. common/dist/common.asset.php +1 -1
  32. common/dist/common.js +1 -1
  33. common/dist/data-stores.asset.php +1 -1
  34. common/dist/data-stores.js +21 -1
  35. donations/dist/donations.asset.php +1 -1
  36. donations/dist/donations.css +1 -1
  37. donations/dist/donations.js +2 -2
  38. donations/dist/donations.rtl.css +1 -1
  39. donations/donations.js +84 -33
  40. donations/edit.js +50 -8
  41. donations/fetch-default-products.js +23 -0
  42. donations/fetch-status.js +6 -2
  43. donations/index.js +22 -8
  44. donations/style.scss +37 -38
  45. editor-domain-picker/dist/editor-domain-picker.asset.php +1 -1
  46. editor-domain-picker/dist/editor-domain-picker.css +1 -0
  47. editor-domain-picker/dist/editor-domain-picker.js +12 -1
  48. editor-domain-picker/dist/editor-domain-picker.rtl.css +1 -0
  49. editor-domain-picker/index.php +8 -0
  50. editor-domain-picker/index.ts +12 -19
  51. editor-domain-picker/src/domain-picker-button/index.tsx +62 -0
  52. editor-domain-picker/src/domain-picker-modal/index.tsx +36 -0
  53. editor-domain-picker/src/stores/index.ts +6 -0
  54. editor-plans-grid/dist/editor-plans-grid.asset.php +1 -0
  55. editor-plans-grid/dist/editor-plans-grid.css +1 -0
  56. editor-plans-grid/dist/editor-plans-grid.js +6 -0
  57. editor-plans-grid/dist/editor-plans-grid.rtl.css +1 -0
  58. editor-plans-grid/index.php +45 -0
  59. editor-plans-grid/index.ts +22 -0
  60. editor-plans-grid/src/hooks/use-selected-plan.ts +1 -0
  61. editor-plans-grid/src/plans-grid-button/index.tsx +61 -0
  62. editor-plans-grid/src/plans-modal/index.tsx +51 -0
  63. editor-plans-grid/src/plans-modal/styles.scss +33 -0
  64. editor-plans-grid/src/stores/index.ts +6 -0
  65. full-site-editing-plugin.php +19 -7
  66. newspack-blocks/synced-newspack-blocks/blocks/carousel/view.php +19 -19
  67. newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/class-wp-rest-newspack-articles-controller.php +26 -26
  68. newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/view.php +15 -15
  69. newspack-blocks/synced-newspack-blocks/class-newspack-blocks-api.php +43 -43
  70. newspack-blocks/synced-newspack-blocks/class-newspack-blocks.php +12 -12
  71. premium-content/blocks/buttons/edit.js +41 -23
  72. premium-content/blocks/container/index.js +51 -0
  73. premium-content/blocks/logged-out-view/edit.js +8 -4
  74. premium-content/dist/premium-content.asset.php +1 -1
  75. premium-content/dist/premium-content.js +5 -5
  76. premium-content/editor.css +5 -0
  77. premium-content/subscription-service/class-token-subscription-service.php +5 -2
  78. readme.txt +12 -1
  79. starter-page-templates/dist/starter-page-templates.asset.php +1 -1
  80. starter-page-templates/dist/starter-page-templates.js +1 -1
  81. starter-page-templates/page-template-modal/components/block-iframe-preview.js +21 -26
  82. wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.asset.php +1 -1
  83. wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.css +1 -1
  84. wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.js +2 -2
  85. wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.rtl.css +1 -1
  86. wpcom-block-editor-nav-sidebar/src/components/create-page/index.tsx +1 -2
  87. wpcom-block-editor-nav-sidebar/src/components/nav-item/index.tsx +60 -0
  88. wpcom-block-editor-nav-sidebar/src/components/nav-item/style.scss +55 -0
  89. wpcom-block-editor-nav-sidebar/src/components/nav-sidebar/index.tsx +5 -44
  90. wpcom-block-editor-nav-sidebar/src/components/nav-sidebar/style.scss +0 -54
  91. wpcom-block-editor-nav-sidebar/src/components/view-all-posts/index.tsx +1 -2
  92. wpcom-block-editor-nav-sidebar/src/types.ts +6 -0
  93. wpcom-block-editor-nux/dist/wpcom-block-editor-nux.asset.php +1 -1
  94. wpcom-block-editor-nux/dist/wpcom-block-editor-nux.js +1 -1
  95. wpcom-block-editor-nux/src/disable-core-nux.js +2 -2
block-patterns/patterns/call-to-action-02.php CHANGED
@@ -13,7 +13,7 @@ $markup = '
13
  <div class="wp-block-jetpack-layout-grid alignfull column1-desktop-grid__span-10 column1-desktop-grid__start-2 column1-desktop-grid__row-1 column1-tablet-grid__span-8 column1-tablet-grid__row-1 column1-mobile-grid__span-4 column1-mobile-grid__row-1 wp-block-jetpack-layout-gutter__nowrap">
14
  <!-- wp:jetpack/layout-grid-column -->
15
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
16
- <!-- wp:paragraph {"align":"center","customTextColor":"#ffffff","customFontSize":80,"className":"margin-bottom-none"} -->
17
  <p style="color:#ffffff;font-size:80px" class="has-text-color has-text-align-center margin-bottom-none"><strong>' . esc_html__( 'Get it delivered', 'full-site-editing' ) . '</strong></p>
18
  <!-- /wp:paragraph -->
19
 
@@ -37,7 +37,8 @@ $markup = '
37
  ';
38
 
39
  return array(
40
- 'title' => esc_html__( 'Call to Action', 'full-site-editing' ),
41
- 'categories' => array( 'call-to-action' ),
42
- 'content' => $markup,
 
43
  );
13
  <div class="wp-block-jetpack-layout-grid alignfull column1-desktop-grid__span-10 column1-desktop-grid__start-2 column1-desktop-grid__row-1 column1-tablet-grid__span-8 column1-tablet-grid__row-1 column1-mobile-grid__span-4 column1-mobile-grid__row-1 wp-block-jetpack-layout-gutter__nowrap">
14
  <!-- wp:jetpack/layout-grid-column -->
15
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
16
+ <!-- wp:paragraph {"align":"center","customTextColor":"#ffffff","style":{"typography":{"fontSize":80}},"className":"margin-bottom-none"} -->
17
  <p style="color:#ffffff;font-size:80px" class="has-text-color has-text-align-center margin-bottom-none"><strong>' . esc_html__( 'Get it delivered', 'full-site-editing' ) . '</strong></p>
18
  <!-- /wp:paragraph -->
19
 
37
  ';
38
 
39
  return array(
40
+ 'title' => esc_html__( 'Call to Action', 'full-site-editing' ),
41
+ 'categories' => array( 'call-to-action' ),
42
+ 'content' => $markup,
43
+ 'viewportWidth' => 1280,
44
  );
block-patterns/patterns/call-to-action-03.php CHANGED
@@ -50,10 +50,10 @@ $markup = '
50
  ';
51
 
52
  return array(
53
- '__file' => 'wp_block',
54
- 'title' => esc_html__( 'Call to Action', 'full-site-editing' ),
55
- 'categories' => array( 'call-to-action' ),
56
- 'content' => sprintf(
57
  $markup,
58
  esc_html__( 'Want to volunteer?', 'full-site-editing' ),
59
  esc_html__( 'We’ve had an incredible response so far, and are doing everything we can to respond to everyone who wants to volunteer in one of our community programmes.', 'full-site-editing' ),
@@ -61,4 +61,5 @@ return array(
61
  esc_html__( 'Are you a business?', 'full-site-editing' ),
62
  esc_html__( 'We are uniting our resources around this challenge, and we are combining our resources and asks to make it easy for people to support their communities.', 'full-site-editing' )
63
  ),
 
64
  );
50
  ';
51
 
52
  return array(
53
+ '__file' => 'wp_block',
54
+ 'title' => esc_html__( 'Call to Action', 'full-site-editing' ),
55
+ 'categories' => array( 'call-to-action' ),
56
+ 'content' => sprintf(
57
  $markup,
58
  esc_html__( 'Want to volunteer?', 'full-site-editing' ),
59
  esc_html__( 'We’ve had an incredible response so far, and are doing everything we can to respond to everyone who wants to volunteer in one of our community programmes.', 'full-site-editing' ),
61
  esc_html__( 'Are you a business?', 'full-site-editing' ),
62
  esc_html__( 'We are uniting our resources around this challenge, and we are combining our resources and asks to make it easy for people to support their communities.', 'full-site-editing' )
63
  ),
64
+ 'viewportWidth' => 1280,
65
  );
block-patterns/patterns/collage-gallery.php CHANGED
@@ -12,7 +12,8 @@ $markup = '
12
  ';
13
 
14
  return array(
15
- 'title' => esc_html__( 'Collage gallery', 'full-site-editing' ),
16
- 'categories' => array( 'gallery' ),
17
- 'content' => $markup,
 
18
  );
12
  ';
13
 
14
  return array(
15
+ 'title' => esc_html__( 'Collage gallery', 'full-site-editing' ),
16
+ 'categories' => array( 'gallery' ),
17
+ 'content' => $markup,
18
+ 'viewportWidth' => 1280,
19
  );
block-patterns/patterns/coming-soon.php CHANGED
@@ -30,10 +30,10 @@ $markup = '
30
  ';
31
 
32
  return array(
33
- '__file' => 'wp_block',
34
- 'title' => esc_html__( 'Coming Soon', 'full-site-editing' ),
35
- 'categories' => array( 'call-to-action' ),
36
- 'content' => sprintf(
37
  $markup,
38
  esc_html__( 'Coming Soon', 'full-site-editing' ),
39
  esc_html__( 'Come back here when our journey begins.', 'full-site-editing' ),
@@ -41,4 +41,5 @@ return array(
41
  esc_html__( 'CA 12345-6789', 'full-site-editing' ),
42
  esc_html__( 'hello@example.com', 'full-site-editing' )
43
  ),
 
44
  );
30
  ';
31
 
32
  return array(
33
+ '__file' => 'wp_block',
34
+ 'title' => esc_html__( 'Coming Soon', 'full-site-editing' ),
35
+ 'categories' => array( 'call-to-action' ),
36
+ 'content' => sprintf(
37
  $markup,
38
  esc_html__( 'Coming Soon', 'full-site-editing' ),
39
  esc_html__( 'Come back here when our journey begins.', 'full-site-editing' ),
41
  esc_html__( 'CA 12345-6789', 'full-site-editing' ),
42
  esc_html__( 'hello@example.com', 'full-site-editing' )
43
  ),
44
+ 'viewportWidth' => 1280,
45
  );
block-patterns/patterns/contact-02.php CHANGED
@@ -44,13 +44,14 @@ $markup = '
44
  ';
45
 
46
  return array(
47
- 'title' => esc_html__( 'Contact', 'full-site-editing' ),
48
- 'categories' => array( 'contact' ),
49
- 'content' => sprintf(
50
  $markup,
51
  esc_html__( 'Contact', 'full-site-editing' ),
52
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
53
  esc_html__( 'San Francisco, California', 'full-site-editing' ),
54
  esc_html__( 'hello@example.com', 'full-site-editing' )
55
  ),
 
56
  );
44
  ';
45
 
46
  return array(
47
+ 'title' => esc_html__( 'Contact', 'full-site-editing' ),
48
+ 'categories' => array( 'contact' ),
49
+ 'content' => sprintf(
50
  $markup,
51
  esc_html__( 'Contact', 'full-site-editing' ),
52
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
53
  esc_html__( 'San Francisco, California', 'full-site-editing' ),
54
  esc_html__( 'hello@example.com', 'full-site-editing' )
55
  ),
56
+ 'viewportWidth' => 1280,
57
  );
block-patterns/patterns/contact-03.php CHANGED
@@ -50,13 +50,14 @@ $markup = '
50
  // phpcs:enable WordPress.WP.CapitalPDangit.Misspelled
51
 
52
  return array(
53
- 'title' => esc_html__( 'Contact', 'full-site-editing' ),
54
- 'categories' => array( 'contact' ),
55
- 'content' => sprintf(
56
  $markup,
57
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
58
  esc_html__( 'San Francisco, California', 'full-site-editing' ),
59
  esc_html__( '123-456-7890', 'full-site-editing' ),
60
  esc_html__( 'hello@example.com', 'full-site-editing' )
61
  ),
 
62
  );
50
  // phpcs:enable WordPress.WP.CapitalPDangit.Misspelled
51
 
52
  return array(
53
+ 'title' => esc_html__( 'Contact', 'full-site-editing' ),
54
+ 'categories' => array( 'contact' ),
55
+ 'content' => sprintf(
56
  $markup,
57
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
58
  esc_html__( 'San Francisco, California', 'full-site-editing' ),
59
  esc_html__( '123-456-7890', 'full-site-editing' ),
60
  esc_html__( 'hello@example.com', 'full-site-editing' )
61
  ),
62
+ 'viewportWidth' => 1280,
63
  );
block-patterns/patterns/contact-04.php CHANGED
@@ -58,10 +58,10 @@ $markup = '
58
  // phpcs:enable WordPress.WP.CapitalPDangit.Misspelled
59
 
60
  return array(
61
- '__file' => 'wp_block',
62
- 'title' => esc_html__( 'Contact', 'full-site-editing' ),
63
- 'categories' => array( 'contact' ),
64
- 'content' => sprintf(
65
  $markup,
66
  esc_html__( 'Burger Brothers', 'full-site-editing' ),
67
  esc_html__( '123 Example St, San Francisco,', 'full-site-editing' ),
@@ -77,4 +77,5 @@ return array(
77
  esc_html__( 'Sunday:', 'full-site-editing' ),
78
  esc_html__( 'Closed', 'full-site-editing' )
79
  ),
 
80
  );
58
  // phpcs:enable WordPress.WP.CapitalPDangit.Misspelled
59
 
60
  return array(
61
+ '__file' => 'wp_block',
62
+ 'title' => esc_html__( 'Contact', 'full-site-editing' ),
63
+ 'categories' => array( 'contact' ),
64
+ 'content' => sprintf(
65
  $markup,
66
  esc_html__( 'Burger Brothers', 'full-site-editing' ),
67
  esc_html__( '123 Example St, San Francisco,', 'full-site-editing' ),
77
  esc_html__( 'Sunday:', 'full-site-editing' ),
78
  esc_html__( 'Closed', 'full-site-editing' )
79
  ),
80
+ 'viewportWidth' => 1280,
81
  );
block-patterns/patterns/contact.php CHANGED
@@ -50,13 +50,14 @@ $markup = '
50
  ';
51
 
52
  return array(
53
- 'title' => esc_html__( 'Contact', 'full-site-editing' ),
54
- 'categories' => array( 'contact' ),
55
- 'content' => sprintf(
56
  $markup,
57
  esc_html__( 'Get in touch', 'full-site-editing' ),
58
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
59
  esc_html__( 'San Francisco, California', 'full-site-editing' ),
60
  esc_html__( 'hello@example.com', 'full-site-editing' )
61
  ),
 
62
  );
50
  ';
51
 
52
  return array(
53
+ 'title' => esc_html__( 'Contact', 'full-site-editing' ),
54
+ 'categories' => array( 'contact' ),
55
+ 'content' => sprintf(
56
  $markup,
57
  esc_html__( 'Get in touch', 'full-site-editing' ),
58
  esc_html__( 'Jennifer Dolan Photography', 'full-site-editing' ),
59
  esc_html__( 'San Francisco, California', 'full-site-editing' ),
60
  esc_html__( 'hello@example.com', 'full-site-editing' )
61
  ),
62
+ 'viewportWidth' => 1280,
63
  );
block-patterns/patterns/description-and-image.php CHANGED
@@ -30,11 +30,12 @@ $markup = '
30
  ';
31
 
32
  return array(
33
- 'title' => esc_html__( 'Description and Image', 'full-site-editing' ),
34
- 'categories' => array( 'images' ),
35
- 'content' => sprintf(
36
  $markup,
37
  esc_html__( 'The artist is the creator of beautiful things. To reveal art and conceal the artist is art&#8217;s aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.', 'full-site-editing' ),
38
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/leaf.jpg' )
39
  ),
 
40
  );
30
  ';
31
 
32
  return array(
33
+ 'title' => esc_html__( 'Description and Image', 'full-site-editing' ),
34
+ 'categories' => array( 'images' ),
35
+ 'content' => sprintf(
36
  $markup,
37
  esc_html__( 'The artist is the creator of beautiful things. To reveal art and conceal the artist is art&#8217;s aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.', 'full-site-editing' ),
38
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/leaf.jpg' )
39
  ),
40
+ 'viewportWidth' => 1280,
41
  );
block-patterns/patterns/food-menu.php CHANGED
@@ -10,7 +10,7 @@ $markup = '
10
  <div class="wp-block-jetpack-layout-grid alignfull column1-desktop-grid__span-10 column1-desktop-grid__start-2 column1-desktop-grid__row-1 column1-tablet-grid__span-8 column1-tablet-grid__row-1 column1-mobile-grid__span-4 column1-mobile-grid__row-1">
11
  <!-- wp:jetpack/layout-grid-column -->
12
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
13
- <!-- wp:paragraph {"customFontSize":71} -->
14
  <p style="font-size:71px"><strong>Menu</strong></p>
15
  <!-- /wp:paragraph -->
16
  <!-- wp:columns -->
@@ -56,9 +56,9 @@ $markup = '
56
  ';
57
 
58
  return array(
59
- 'title' => esc_html__( 'Food Menu', 'full-site-editing' ),
60
- 'categories' => array( 'text' ),
61
- 'content' => sprintf(
62
  $markup,
63
  esc_html__( 'Awesome Burger', 'full-site-editing' ),
64
  esc_html__( 'The burger that made us famous. 100% pure lean beef grilled to perfection.', 'full-site-editing' ),
@@ -70,4 +70,5 @@ return array(
70
  esc_html__( 'Garden Salad', 'full-site-editing' ),
71
  esc_html__( 'Fresh greens with cheddar cheese diced tomatoes, and honey mustard dressing.', 'full-site-editing' )
72
  ),
 
73
  );
10
  <div class="wp-block-jetpack-layout-grid alignfull column1-desktop-grid__span-10 column1-desktop-grid__start-2 column1-desktop-grid__row-1 column1-tablet-grid__span-8 column1-tablet-grid__row-1 column1-mobile-grid__span-4 column1-mobile-grid__row-1">
11
  <!-- wp:jetpack/layout-grid-column -->
12
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
13
+ <!-- wp:paragraph {"style":{"typography":{"fontSize":71}}} -->
14
  <p style="font-size:71px"><strong>Menu</strong></p>
15
  <!-- /wp:paragraph -->
16
  <!-- wp:columns -->
56
  ';
57
 
58
  return array(
59
+ 'title' => esc_html__( 'Food Menu', 'full-site-editing' ),
60
+ 'categories' => array( 'text' ),
61
+ 'content' => sprintf(
62
  $markup,
63
  esc_html__( 'Awesome Burger', 'full-site-editing' ),
64
  esc_html__( 'The burger that made us famous. 100% pure lean beef grilled to perfection.', 'full-site-editing' ),
70
  esc_html__( 'Garden Salad', 'full-site-editing' ),
71
  esc_html__( 'Fresh greens with cheddar cheese diced tomatoes, and honey mustard dressing.', 'full-site-editing' )
72
  ),
73
+ 'viewportWidth' => 1280,
74
  );
block-patterns/patterns/headline-02.php CHANGED
@@ -24,11 +24,12 @@ $markup = '
24
  ';
25
 
26
  return array(
27
- 'title' => esc_html__( 'Headline', 'full-site-editing' ),
28
- 'categories' => array( 'text' ),
29
- 'content' => sprintf(
30
  $markup,
31
  esc_html__( 'Eat Dessert First is for my love of food and sharing my favorites with you.', 'full-site-editing' ),
32
  esc_html__( 'Hi, I’m Lillie. Previously a magazine editor, I became a full-time mother and freelance writer in 2017. I spend most of my time with my kids and husband over at The Brown Bear Family.', 'full-site-editing' )
33
  ),
 
34
  );
24
  ';
25
 
26
  return array(
27
+ 'title' => esc_html__( 'Headline', 'full-site-editing' ),
28
+ 'categories' => array( 'text' ),
29
+ 'content' => sprintf(
30
  $markup,
31
  esc_html__( 'Eat Dessert First is for my love of food and sharing my favorites with you.', 'full-site-editing' ),
32
  esc_html__( 'Hi, I’m Lillie. Previously a magazine editor, I became a full-time mother and freelance writer in 2017. I spend most of my time with my kids and husband over at The Brown Bear Family.', 'full-site-editing' )
33
  ),
34
+ 'viewportWidth' => 1280,
35
  );
block-patterns/patterns/headline.php CHANGED
@@ -40,13 +40,14 @@ $markup = '
40
  ';
41
 
42
  return array(
43
- 'title' => esc_html__( 'Headline', 'full-site-editing' ),
44
- 'categories' => array( 'blog' ),
45
- 'content' => sprintf(
46
  $markup,
47
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/cayla1-w6ftfbpcs9i-unsplash.jpg' ),
48
  esc_html__( 'Weekly Recipe', 'full-site-editing' ),
49
  esc_html__( 'Stay Warm in Autumn: Roasted Pumpkin Soup', 'full-site-editing' ),
50
  esc_html__( 'More Recipes', 'full-site-editing' )
51
  ),
 
52
  );
40
  ';
41
 
42
  return array(
43
+ 'title' => esc_html__( 'Headline', 'full-site-editing' ),
44
+ 'categories' => array( 'blog' ),
45
+ 'content' => sprintf(
46
  $markup,
47
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/cayla1-w6ftfbpcs9i-unsplash.jpg' ),
48
  esc_html__( 'Weekly Recipe', 'full-site-editing' ),
49
  esc_html__( 'Stay Warm in Autumn: Roasted Pumpkin Soup', 'full-site-editing' ),
50
  esc_html__( 'More Recipes', 'full-site-editing' )
51
  ),
52
+ 'viewportWidth' => 1280,
53
  );
block-patterns/patterns/image-and-description.php CHANGED
@@ -30,11 +30,12 @@ $markup = '
30
  ';
31
 
32
  return array(
33
- 'title' => esc_html__( 'Image and Description', 'full-site-editing' ),
34
- 'categories' => array( 'images' ),
35
- 'content' => sprintf(
36
  $markup,
37
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/lollipop.jpg' ),
38
  esc_html__( 'The artist is the creator of beautiful things. To reveal art and conceal the artist is art&#8217;s aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.', 'full-site-editing' )
39
  ),
 
40
  );
30
  ';
31
 
32
  return array(
33
+ 'title' => esc_html__( 'Image and Description', 'full-site-editing' ),
34
+ 'categories' => array( 'images' ),
35
+ 'content' => sprintf(
36
  $markup,
37
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/lollipop.jpg' ),
38
  esc_html__( 'The artist is the creator of beautiful things. To reveal art and conceal the artist is art&#8217;s aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.', 'full-site-editing' )
39
  ),
40
+ 'viewportWidth' => 1280,
41
  );
block-patterns/patterns/image-and-text.php CHANGED
@@ -32,10 +32,11 @@ $markup = '
32
  ';
33
 
34
  return array(
35
- 'title' => esc_html__( 'Image and Text', 'full-site-editing' ),
36
- 'categories' => array( 'images' ),
37
- 'content' => sprintf(
38
  $markup,
39
  esc_html__( 'His latest work is A Life Well-Lived, a selection of photos and stories of people across Nebraska highlighting their stories from the past 70 years. These are photographs and stories of those who might be forgotten in the rush of history.', 'full-site-editing' )
40
  ),
 
41
  );
32
  ';
33
 
34
  return array(
35
+ 'title' => esc_html__( 'Image and Text', 'full-site-editing' ),
36
+ 'categories' => array( 'images' ),
37
+ 'content' => sprintf(
38
  $markup,
39
  esc_html__( 'His latest work is A Life Well-Lived, a selection of photos and stories of people across Nebraska highlighting their stories from the past 70 years. These are photographs and stories of those who might be forgotten in the rush of history.', 'full-site-editing' )
40
  ),
41
+ 'viewportWidth' => 1280,
42
  );
block-patterns/patterns/images-with-titles.php CHANGED
@@ -60,14 +60,15 @@ $markup = '
60
  ';
61
 
62
  return array(
63
- '__file' => 'wp_block',
64
- 'title' => esc_html__( 'Image with Titles', 'full-site-editing' ),
65
- 'categories' => array( 'gallery', 'list' ),
66
- 'content' => sprintf(
67
  $markup,
68
  esc_html__( 'Brice - 2020', 'full-site-editing' ),
69
  esc_html__( 'Vesta Magazine - 2019', 'full-site-editing' ),
70
  esc_html__( 'Easley Magazine - 2019', 'full-site-editing' ),
71
  esc_html__( 'Overton - 2018', 'full-site-editing' )
72
  ),
 
73
  );
60
  ';
61
 
62
  return array(
63
+ '__file' => 'wp_block',
64
+ 'title' => esc_html__( 'Image with Titles', 'full-site-editing' ),
65
+ 'categories' => array( 'gallery', 'list' ),
66
+ 'content' => sprintf(
67
  $markup,
68
  esc_html__( 'Brice - 2020', 'full-site-editing' ),
69
  esc_html__( 'Vesta Magazine - 2019', 'full-site-editing' ),
70
  esc_html__( 'Easley Magazine - 2019', 'full-site-editing' ),
71
  esc_html__( 'Overton - 2018', 'full-site-editing' )
72
  ),
73
+ 'viewportWidth' => 1280,
74
  );
block-patterns/patterns/list.php CHANGED
@@ -26,10 +26,10 @@ $markup = '
26
  ';
27
 
28
  return array(
29
- '__file' => 'wp_block',
30
- 'title' => esc_html__( 'List', 'full-site-editing' ),
31
- 'categories' => array( 'list' ),
32
- 'content' => sprintf(
33
  $markup,
34
  esc_html__( 'Beth Silva', 'full-site-editing' ),
35
  esc_html__( 'Christine Russell', 'full-site-editing' ),
@@ -43,4 +43,5 @@ return array(
43
  esc_html__( 'Emily Fry', 'full-site-editing' ),
44
  esc_html__( 'Lucie Avila', 'full-site-editing' )
45
  ),
 
46
  );
26
  ';
27
 
28
  return array(
29
+ '__file' => 'wp_block',
30
+ 'title' => esc_html__( 'List', 'full-site-editing' ),
31
+ 'categories' => array( 'list' ),
32
+ 'content' => sprintf(
33
  $markup,
34
  esc_html__( 'Beth Silva', 'full-site-editing' ),
35
  esc_html__( 'Christine Russell', 'full-site-editing' ),
43
  esc_html__( 'Emily Fry', 'full-site-editing' ),
44
  esc_html__( 'Lucie Avila', 'full-site-editing' )
45
  ),
46
+ 'viewportWidth' => 1280,
47
  );
block-patterns/patterns/masonry-gallery.php CHANGED
@@ -12,7 +12,8 @@ $markup = '
12
  ';
13
 
14
  return array(
15
- 'title' => esc_html__( 'Masonry gallery', 'full-site-editing' ),
16
- 'categories' => array( 'gallery' ),
17
- 'content' => $markup,
 
18
  );
12
  ';
13
 
14
  return array(
15
+ 'title' => esc_html__( 'Masonry gallery', 'full-site-editing' ),
16
+ 'categories' => array( 'gallery' ),
17
+ 'content' => $markup,
18
+ 'viewportWidth' => 1280,
19
  );
block-patterns/patterns/numbered-list.php CHANGED
@@ -82,10 +82,10 @@ $markup = '
82
  ';
83
 
84
  return array(
85
- '__file' => 'wp_block',
86
- 'title' => esc_html__( 'Numbered List', 'full-site-editing' ),
87
- 'categories' => array( 'list' ),
88
- 'content' => sprintf(
89
  $markup,
90
  esc_html__( '01', 'full-site-editing' ),
91
  esc_html__( 'Strategy', 'full-site-editing' ),
@@ -100,4 +100,5 @@ return array(
100
  esc_html__( 'Grow', 'full-site-editing' ),
101
  esc_html__( 'Look at the sunset. Surround yourself with angels, positive energy, beautiful people, beautiful souls, clean heart, angel.', 'full-site-editing' )
102
  ),
 
103
  );
82
  ';
83
 
84
  return array(
85
+ '__file' => 'wp_block',
86
+ 'title' => esc_html__( 'Numbered List', 'full-site-editing' ),
87
+ 'categories' => array( 'list' ),
88
+ 'content' => sprintf(
89
  $markup,
90
  esc_html__( '01', 'full-site-editing' ),
91
  esc_html__( 'Strategy', 'full-site-editing' ),
100
  esc_html__( 'Grow', 'full-site-editing' ),
101
  esc_html__( 'Look at the sunset. Surround yourself with angels, positive energy, beautiful people, beautiful souls, clean heart, angel.', 'full-site-editing' )
102
  ),
103
+ 'viewportWidth' => 1280,
104
  );
block-patterns/patterns/numbers.php CHANGED
@@ -8,7 +8,7 @@
8
  $markup = '
9
  <!-- wp:jetpack/layout-grid {"column1DesktopSpan":4,"column1TabletSpan":4,"column1MobileSpan":4,"column2DesktopSpan":4,"column2TabletSpan":4,"column2MobileSpan":4,"column3DesktopSpan":4,"column3TabletSpan":8,"column3MobileSpan":4,"className":"column1-desktop-grid__span-4 column1-desktop-grid__row-1 column2-desktop-grid__span-4 column2-desktop-grid__start-5 column2-desktop-grid__row-1 column3-desktop-grid__span-4 column3-desktop-grid__start-9 column3-desktop-grid__row-1 column1-tablet-grid__span-4 column1-tablet-grid__row-1 column2-tablet-grid__span-4 column2-tablet-grid__start-5 column2-tablet-grid__row-1 column3-tablet-grid__span-8 column3-tablet-grid__row-2 column1-mobile-grid__span-4 column1-mobile-grid__row-1 column2-mobile-grid__span-4 column2-mobile-grid__row-2 column3-mobile-grid__span-4 column3-mobile-grid__row-3"} -->
10
  <div class="wp-block-jetpack-layout-grid alignfull column1-desktop-grid__span-4 column1-desktop-grid__row-1 column2-desktop-grid__span-4 column2-desktop-grid__start-5 column2-desktop-grid__row-1 column3-desktop-grid__span-4 column3-desktop-grid__start-9 column3-desktop-grid__row-1 column1-tablet-grid__span-4 column1-tablet-grid__row-1 column2-tablet-grid__span-4 column2-tablet-grid__start-5 column2-tablet-grid__row-1 column3-tablet-grid__span-8 column3-tablet-grid__row-2 column1-mobile-grid__span-4 column1-mobile-grid__row-1 column2-mobile-grid__span-4 column2-mobile-grid__row-2 column3-mobile-grid__span-4 column3-mobile-grid__row-3"><!-- wp:jetpack/layout-grid-column -->
11
- <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none"><!-- wp:paragraph {"align":"center","customFontSize":70,"className":"margin-bottom-none"} -->
12
  <p style="font-size:70px" class="has-text-align-center margin-bottom-none"><strong>%1$s</strong></p>
13
  <!-- /wp:paragraph -->
14
 
@@ -18,7 +18,7 @@ $markup = '
18
  <!-- /wp:jetpack/layout-grid-column -->
19
 
20
  <!-- wp:jetpack/layout-grid-column -->
21
- <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none"><!-- wp:paragraph {"align":"center","customFontSize":70,"className":"margin-bottom-none"} -->
22
  <p style="font-size:70px" class="has-text-align-center margin-bottom-none"><strong>%3$s</strong></p>
23
  <!-- /wp:paragraph -->
24
 
@@ -28,7 +28,7 @@ $markup = '
28
  <!-- /wp:jetpack/layout-grid-column -->
29
 
30
  <!-- wp:jetpack/layout-grid-column -->
31
- <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none"><!-- wp:paragraph {"align":"center","customFontSize":70,"className":"margin-bottom-none"} -->
32
  <p style="font-size:70px" class="has-text-align-center margin-bottom-none"><strong>%5$s</strong></p>
33
  <!-- /wp:paragraph -->
34
 
@@ -40,9 +40,9 @@ $markup = '
40
  ';
41
 
42
  return array(
43
- 'title' => esc_html__( 'Numbers', 'full-site-editing' ),
44
- 'categories' => array( 'text' ),
45
- 'content' => sprintf(
46
  $markup,
47
  esc_html__( '1,652', 'full-site-editing' ),
48
  esc_html__( 'Volunteers available', 'full-site-editing' ),
@@ -51,4 +51,5 @@ return array(
51
  esc_html__( '1,927', 'full-site-editing' ),
52
  esc_html__( 'Matches last year', 'full-site-editing' )
53
  ),
 
54
  );
8
  $markup = '
9
  <!-- wp:jetpack/layout-grid {"column1DesktopSpan":4,"column1TabletSpan":4,"column1MobileSpan":4,"column2DesktopSpan":4,"column2TabletSpan":4,"column2MobileSpan":4,"column3DesktopSpan":4,"column3TabletSpan":8,"column3MobileSpan":4,"className":"column1-desktop-grid__span-4 column1-desktop-grid__row-1 column2-desktop-grid__span-4 column2-desktop-grid__start-5 column2-desktop-grid__row-1 column3-desktop-grid__span-4 column3-desktop-grid__start-9 column3-desktop-grid__row-1 column1-tablet-grid__span-4 column1-tablet-grid__row-1 column2-tablet-grid__span-4 column2-tablet-grid__start-5 column2-tablet-grid__row-1 column3-tablet-grid__span-8 column3-tablet-grid__row-2 column1-mobile-grid__span-4 column1-mobile-grid__row-1 column2-mobile-grid__span-4 column2-mobile-grid__row-2 column3-mobile-grid__span-4 column3-mobile-grid__row-3"} -->
10
  <div class="wp-block-jetpack-layout-grid alignfull column1-desktop-grid__span-4 column1-desktop-grid__row-1 column2-desktop-grid__span-4 column2-desktop-grid__start-5 column2-desktop-grid__row-1 column3-desktop-grid__span-4 column3-desktop-grid__start-9 column3-desktop-grid__row-1 column1-tablet-grid__span-4 column1-tablet-grid__row-1 column2-tablet-grid__span-4 column2-tablet-grid__start-5 column2-tablet-grid__row-1 column3-tablet-grid__span-8 column3-tablet-grid__row-2 column1-mobile-grid__span-4 column1-mobile-grid__row-1 column2-mobile-grid__span-4 column2-mobile-grid__row-2 column3-mobile-grid__span-4 column3-mobile-grid__row-3"><!-- wp:jetpack/layout-grid-column -->
11
+ <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none"><!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":70}},"className":"margin-bottom-none"} -->
12
  <p style="font-size:70px" class="has-text-align-center margin-bottom-none"><strong>%1$s</strong></p>
13
  <!-- /wp:paragraph -->
14
 
18
  <!-- /wp:jetpack/layout-grid-column -->
19
 
20
  <!-- wp:jetpack/layout-grid-column -->
21
+ <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none"><!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":70}},"className":"margin-bottom-none"} -->
22
  <p style="font-size:70px" class="has-text-align-center margin-bottom-none"><strong>%3$s</strong></p>
23
  <!-- /wp:paragraph -->
24
 
28
  <!-- /wp:jetpack/layout-grid-column -->
29
 
30
  <!-- wp:jetpack/layout-grid-column -->
31
+ <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none"><!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":70}},"className":"margin-bottom-none"} -->
32
  <p style="font-size:70px" class="has-text-align-center margin-bottom-none"><strong>%5$s</strong></p>
33
  <!-- /wp:paragraph -->
34
 
40
  ';
41
 
42
  return array(
43
+ 'title' => esc_html__( 'Numbers', 'full-site-editing' ),
44
+ 'categories' => array( 'text' ),
45
+ 'content' => sprintf(
46
  $markup,
47
  esc_html__( '1,652', 'full-site-editing' ),
48
  esc_html__( 'Volunteers available', 'full-site-editing' ),
51
  esc_html__( '1,927', 'full-site-editing' ),
52
  esc_html__( 'Matches last year', 'full-site-editing' )
53
  ),
54
+ 'viewportWidth' => 1280,
55
  );
block-patterns/patterns/portraits-and-text.php CHANGED
@@ -74,10 +74,10 @@ $markup = '
74
  ';
75
 
76
  return array(
77
- '__file' => 'wp_block',
78
- 'title' => esc_html__( 'Portraits and Text', 'full-site-editing' ),
79
- 'categories' => array( 'gallery', 'list' ),
80
- 'content' => sprintf(
81
  $markup,
82
  esc_html__( 'Natsuho Kishi', 'full-site-editing' ),
83
  esc_html__( 'Design Director at EJ Solutions focusing on raising the standard of communication online. She has been leading several award-winning branding projects. including Strn.', 'full-site-editing' ),
@@ -88,4 +88,5 @@ return array(
88
  esc_html__( 'Elise Pratt', 'full-site-editing' ),
89
  esc_html__( 'Senior Product Designer at Idea. Previously Senior Design Director at Minova, UX Design Manager at Ryman. Elise’s work has been featured as pioneer in CX as best practice.', 'full-site-editing' )
90
  ),
 
91
  );
74
  ';
75
 
76
  return array(
77
+ '__file' => 'wp_block',
78
+ 'title' => esc_html__( 'Portraits and Text', 'full-site-editing' ),
79
+ 'categories' => array( 'gallery', 'list' ),
80
+ 'content' => sprintf(
81
  $markup,
82
  esc_html__( 'Natsuho Kishi', 'full-site-editing' ),
83
  esc_html__( 'Design Director at EJ Solutions focusing on raising the standard of communication online. She has been leading several award-winning branding projects. including Strn.', 'full-site-editing' ),
88
  esc_html__( 'Elise Pratt', 'full-site-editing' ),
89
  esc_html__( 'Senior Product Designer at Idea. Previously Senior Design Director at Minova, UX Design Manager at Ryman. Elise’s work has been featured as pioneer in CX as best practice.', 'full-site-editing' )
90
  ),
91
+ 'viewportWidth' => 1280,
92
  );
block-patterns/patterns/recent-posts-02.php CHANGED
@@ -20,10 +20,11 @@ $markup = '
20
  ';
21
 
22
  return array(
23
- 'title' => esc_html__( 'Recent Posts', 'full-site-editing' ),
24
- 'categories' => array( 'blog' ),
25
- 'content' => sprintf(
26
  $markup,
27
  esc_html__( 'Latest Posts', 'full-site-editing' )
28
  ),
 
29
  );
20
  ';
21
 
22
  return array(
23
+ 'title' => esc_html__( 'Recent Posts', 'full-site-editing' ),
24
+ 'categories' => array( 'blog' ),
25
+ 'content' => sprintf(
26
  $markup,
27
  esc_html__( 'Latest Posts', 'full-site-editing' )
28
  ),
29
+ 'viewportWidth' => 1280,
30
  );
block-patterns/patterns/recent-posts.php CHANGED
@@ -14,7 +14,8 @@ $markup = '
14
  ';
15
 
16
  return array(
17
- 'title' => esc_html__( 'Recent Posts', 'full-site-editing' ),
18
- 'categories' => array( 'blog' ),
19
- 'content' => $markup,
 
20
  );
14
  ';
15
 
16
  return array(
17
+ 'title' => esc_html__( 'Recent Posts', 'full-site-editing' ),
18
+ 'categories' => array( 'blog' ),
19
+ 'content' => $markup,
20
+ 'viewportWidth' => 1280,
21
  );
block-patterns/patterns/three-columns-and-image.php CHANGED
@@ -10,7 +10,7 @@ $markup = '
10
  <div class="wp-block-jetpack-layout-grid alignfull column1-desktop-grid__span-9 column1-desktop-grid__start-4 column1-desktop-grid__row-1 column1-tablet-grid__span-8 column1-tablet-grid__row-1 column1-mobile-grid__span-4 column1-mobile-grid__row-1">
11
  <!-- wp:jetpack/layout-grid-column -->
12
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
13
- <!-- wp:paragraph {"customFontSize":50} -->
14
  <p style="font-size:50px"><strong>%1$s</strong></p>
15
  <!-- /wp:paragraph -->
16
  </div>
@@ -22,7 +22,7 @@ $markup = '
22
  <div class="wp-block-jetpack-layout-grid alignfull column1-desktop-grid__span-3 column1-desktop-grid__start-4 column1-desktop-grid__row-1 column2-desktop-grid__span-3 column2-desktop-grid__start-7 column2-desktop-grid__row-1 column3-desktop-grid__span-3 column3-desktop-grid__start-10 column3-desktop-grid__row-1 column1-tablet-grid__span-4 column1-tablet-grid__row-1 column2-tablet-grid__span-4 column2-tablet-grid__start-5 column2-tablet-grid__row-1 column3-tablet-grid__span-4 column3-tablet-grid__row-2 column1-mobile-grid__span-4 column1-mobile-grid__row-1 column2-mobile-grid__span-4 column2-mobile-grid__row-2 column3-mobile-grid__span-4 column3-mobile-grid__row-3">
23
  <!-- wp:jetpack/layout-grid-column -->
24
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
25
- <!-- wp:paragraph {"customFontSize":14} -->
26
  <p style="font-size:14px">%2$s</p>
27
  <!-- /wp:paragraph -->
28
  </div>
@@ -30,7 +30,7 @@ $markup = '
30
 
31
  <!-- wp:jetpack/layout-grid-column -->
32
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
33
- <!-- wp:paragraph {"customFontSize":14} -->
34
  <p style="font-size:14px">%3$s</p>
35
  <!-- /wp:paragraph -->
36
  </div>
@@ -38,7 +38,7 @@ $markup = '
38
 
39
  <!-- wp:jetpack/layout-grid-column -->
40
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
41
- <!-- wp:paragraph {"customFontSize":14} -->
42
  <p style="font-size:14px">%4$s</p>
43
  <!-- /wp:paragraph -->
44
  </div>
@@ -66,9 +66,9 @@ $markup = '
66
  ';
67
 
68
  return array(
69
- 'title' => esc_html__( 'Three columns', 'full-site-editing' ),
70
- 'categories' => array( 'images' ),
71
- 'content' => sprintf(
72
  $markup,
73
  esc_html__( 'Salainis', 'full-site-editing' ),
74
  esc_html__( 'I had learned already many of the Outland methods of communicating by forest notes rather than trust to the betraying, high-pitched human voice.', 'full-site-editing' ),
@@ -76,4 +76,5 @@ return array(
76
  esc_html__( 'Then whoever was on his way from that placed hurried, and whoever was coming toward it stayed where he was until he had permission to move on.', 'full-site-editing' ),
77
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/kristaps-ungurs-trgv9atxume-unsplash-1.jpg' )
78
  ),
 
79
  );
10
  <div class="wp-block-jetpack-layout-grid alignfull column1-desktop-grid__span-9 column1-desktop-grid__start-4 column1-desktop-grid__row-1 column1-tablet-grid__span-8 column1-tablet-grid__row-1 column1-mobile-grid__span-4 column1-mobile-grid__row-1">
11
  <!-- wp:jetpack/layout-grid-column -->
12
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
13
+ <!-- wp:paragraph {"style":{"typography":{"fontSize":50}}} -->
14
  <p style="font-size:50px"><strong>%1$s</strong></p>
15
  <!-- /wp:paragraph -->
16
  </div>
22
  <div class="wp-block-jetpack-layout-grid alignfull column1-desktop-grid__span-3 column1-desktop-grid__start-4 column1-desktop-grid__row-1 column2-desktop-grid__span-3 column2-desktop-grid__start-7 column2-desktop-grid__row-1 column3-desktop-grid__span-3 column3-desktop-grid__start-10 column3-desktop-grid__row-1 column1-tablet-grid__span-4 column1-tablet-grid__row-1 column2-tablet-grid__span-4 column2-tablet-grid__start-5 column2-tablet-grid__row-1 column3-tablet-grid__span-4 column3-tablet-grid__row-2 column1-mobile-grid__span-4 column1-mobile-grid__row-1 column2-mobile-grid__span-4 column2-mobile-grid__row-2 column3-mobile-grid__span-4 column3-mobile-grid__row-3">
23
  <!-- wp:jetpack/layout-grid-column -->
24
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
25
+ <!-- wp:paragraph {"style":{"typography":{"fontSize":14}}} -->
26
  <p style="font-size:14px">%2$s</p>
27
  <!-- /wp:paragraph -->
28
  </div>
30
 
31
  <!-- wp:jetpack/layout-grid-column -->
32
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
33
+ <!-- wp:paragraph {"style":{"typography":{"fontSize":14}}} -->
34
  <p style="font-size:14px">%3$s</p>
35
  <!-- /wp:paragraph -->
36
  </div>
38
 
39
  <!-- wp:jetpack/layout-grid-column -->
40
  <div class="wp-block-jetpack-layout-grid-column wp-block-jetpack-layout-grid__padding-none">
41
+ <!-- wp:paragraph {"style":{"typography":{"fontSize":14}}} -->
42
  <p style="font-size:14px">%4$s</p>
43
  <!-- /wp:paragraph -->
44
  </div>
66
  ';
67
 
68
  return array(
69
+ 'title' => esc_html__( 'Three columns', 'full-site-editing' ),
70
+ 'categories' => array( 'images' ),
71
+ 'content' => sprintf(
72
  $markup,
73
  esc_html__( 'Salainis', 'full-site-editing' ),
74
  esc_html__( 'I had learned already many of the Outland methods of communicating by forest notes rather than trust to the betraying, high-pitched human voice.', 'full-site-editing' ),
76
  esc_html__( 'Then whoever was on his way from that placed hurried, and whoever was coming toward it stayed where he was until he had permission to move on.', 'full-site-editing' ),
77
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/kristaps-ungurs-trgv9atxume-unsplash-1.jpg' )
78
  ),
79
+ 'viewportWidth' => 1280,
80
  );
block-patterns/patterns/three-images-side-by-side.php CHANGED
@@ -42,7 +42,8 @@ $markup = '
42
  ';
43
 
44
  return array(
45
- 'title' => esc_html__( 'Three images side-by-side', 'full-site-editing' ),
46
- 'categories' => array( 'gallery', 'images' ),
47
- 'content' => $markup,
 
48
  );
42
  ';
43
 
44
  return array(
45
+ 'title' => esc_html__( 'Three images side-by-side', 'full-site-editing' ),
46
+ 'categories' => array( 'gallery', 'images' ),
47
+ 'content' => $markup,
48
+ 'viewportWidth' => 1280,
49
  );
block-patterns/patterns/tiled-mosaic-gallery.php CHANGED
@@ -12,8 +12,9 @@ $markup = '
12
  ';
13
 
14
  return array(
15
- '__file' => 'wp_block',
16
- 'title' => esc_html__( 'Tiled Mosaic Gallery', 'full-site-editing' ),
17
- 'categories' => array( 'gallery' ),
18
- 'content' => $markup,
 
19
  );
12
  ';
13
 
14
  return array(
15
+ '__file' => 'wp_block',
16
+ 'title' => esc_html__( 'Tiled Mosaic Gallery', 'full-site-editing' ),
17
+ 'categories' => array( 'gallery' ),
18
+ 'content' => $markup,
19
+ 'viewportWidth' => 1280,
20
  );
block-patterns/patterns/two-column-text-and-image.php CHANGED
@@ -42,12 +42,13 @@ $markup = '
42
  ';
43
 
44
  return array(
45
- '__file' => 'wp_block',
46
- 'title' => esc_html__( 'Two Column Text and Image', 'full-site-editing' ),
47
- 'categories' => array( 'images' ),
48
- 'content' => sprintf(
49
  $markup,
50
  esc_html__( 'Some still say its organic shapes were a reflection of the constant movement of thoughts on his never-ending ideas. It was remarkable but prudent, complex but minimal, and it&rsquo;s geometrical lines contrasted beautifully with the curly waves that defined it.', 'full-site-editing' ),
51
  esc_html__( 'It was his sanctuary, the place where he would go to rest, but also to celebrate. Those that were once there always highlight the Peace they felt around the building. Was it the endless organic shapes? Was it the assurance they felt from the precision of its geometrical lines? Or was it him?', 'full-site-editing' )
52
  ),
 
53
  );
42
  ';
43
 
44
  return array(
45
+ '__file' => 'wp_block',
46
+ 'title' => esc_html__( 'Two Column Text and Image', 'full-site-editing' ),
47
+ 'categories' => array( 'images' ),
48
+ 'content' => sprintf(
49
  $markup,
50
  esc_html__( 'Some still say its organic shapes were a reflection of the constant movement of thoughts on his never-ending ideas. It was remarkable but prudent, complex but minimal, and it&rsquo;s geometrical lines contrasted beautifully with the curly waves that defined it.', 'full-site-editing' ),
51
  esc_html__( 'It was his sanctuary, the place where he would go to rest, but also to celebrate. Those that were once there always highlight the Peace they felt around the building. Was it the endless organic shapes? Was it the assurance they felt from the precision of its geometrical lines? Or was it him?', 'full-site-editing' )
52
  ),
53
+ 'viewportWidth' => 1280,
54
  );
block-patterns/patterns/two-images-and-quote.php CHANGED
@@ -40,12 +40,13 @@ $markup = '
40
  ';
41
 
42
  return array(
43
- 'title' => esc_html__( 'Two images and quote', 'full-site-editing' ),
44
- 'categories' => array( 'images' ),
45
- 'content' => sprintf(
46
  $markup,
47
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/bianca-berg-l4-sra8ii80-unsplash-2.jpg' ),
48
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/bianca-berg-pyvtnjcwc-g-unsplash.jpg' ),
49
  esc_html__( '&#8220;The artist is the creator of beautiful things. To reveal art and conceal the artist is art&#8217;s aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.&#8221;', 'full-site-editing' )
50
  ),
 
51
  );
40
  ';
41
 
42
  return array(
43
+ 'title' => esc_html__( 'Two images and quote', 'full-site-editing' ),
44
+ 'categories' => array( 'images' ),
45
+ 'content' => sprintf(
46
  $markup,
47
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/bianca-berg-l4-sra8ii80-unsplash-2.jpg' ),
48
  esc_url( 'https://dotcompatterns.files.wordpress.com/2020/03/bianca-berg-pyvtnjcwc-g-unsplash.jpg' ),
49
  esc_html__( '&#8220;The artist is the creator of beautiful things. To reveal art and conceal the artist is art&#8217;s aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.&#8221;', 'full-site-editing' )
50
  ),
51
+ 'viewportWidth' => 1280,
52
  );
block-patterns/patterns/two-images-side-by-side.php CHANGED
@@ -32,7 +32,8 @@ $markup = '
32
  ';
33
 
34
  return array(
35
- 'title' => esc_html__( 'Two images side-by-side', 'full-site-editing' ),
36
- 'categories' => array( 'gallery', 'images' ),
37
- 'content' => $markup,
 
38
  );
32
  ';
33
 
34
  return array(
35
+ 'title' => esc_html__( 'Two images side-by-side', 'full-site-editing' ),
36
+ 'categories' => array( 'gallery', 'images' ),
37
+ 'content' => $markup,
38
+ 'viewportWidth' => 1280,
39
  );
common/data-stores/index.ts CHANGED
@@ -2,3 +2,4 @@
2
  * Internal dependencies
3
  */
4
  import './domain-suggestions';
 
2
  * Internal dependencies
3
  */
4
  import './domain-suggestions';
5
+ import './plans';
common/data-stores/plans.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { Plans } from '@automattic/data-stores';
5
+
6
+ Plans.register();
common/dist/common.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-polyfill'), 'version' => '6165265cad8b717d6023a21a62a02799');
1
+ <?php return array('dependencies' => array('wp-polyfill'), 'version' => '4d6ec141f83ecace68a5bdee2b8176ae');
common/dist/common.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,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=9)}({17:function(e,t,n){},9:function(e,t,n){"use strict";n.r(t);n(17)}}));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,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=32)}({32:function(e,t,n){"use strict";n.r(t);n(39)},39:function(e,t,n){}}));
common/dist/data-stores.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => 'f85e4af0d449d6ecb51aa06232cea8c1');
1
+ <?php return array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-polyfill'), 'version' => '26d06852b7ff3e7e7b4be23250ef36d6');
common/dist/data-stores.js CHANGED
@@ -1 +1,21 @@
1
- !function(e,t){for(var r in t)e[r]=t[r]}(window,function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=30)}([function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){var r,n=window.ProgressEvent,o=!!n;try{r=new n("loaded"),o="loaded"===r.type,r=null}catch(i){o=!1}e.exports=o?n:"function"==typeof document.createEvent?function(e,t){var r=document.createEvent("Event");return r.initEvent(e,!1,!1),t?(r.lengthComputable=Boolean(t.lengthComputable),r.loaded=Number(t.loaded)||0,r.total=Number(t.total)||0):(r.lengthComputable=!1,r.loaded=r.total=0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.lengthComputable=Boolean(t.lengthComputable),r.loaded=Number(t.loaded)||0,r.total=Number(t.total)||0):(r.lengthComputable=!1,r.loaded=r.total=0),r}},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:u}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(o){return n}},encode:function(e,t,r){if(0===e.length)return e;var n=e;if("symbol"==typeof e?n=Symbol.prototype.toString.call(e):"string"!=typeof e&&(n=String(e)),"iso-8859-1"===r)return escape(n).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",a=0;a<n.length;++a){var s=n.charCodeAt(a);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=n.charAt(a):s<128?o+=i[s]:s<2048?o+=i[192|s>>6]+i[128|63&s]:s<55296||s>=57344?o+=i[224|s>>12]+i[128|s>>6&63]+i[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&n.charCodeAt(a)),o+=i[240|s>>18]+i[128|s>>12&63]+i[128|s>>6&63]+i[128|63&s])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,r,i){if(!r)return t;if("object"!=typeof r){if(o(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(i&&(i.plainObjects||i.allowPrototypes)||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var s=t;return o(t)&&!o(r)&&(s=a(t,i)),o(t)&&o(r)?(r.forEach((function(r,o){if(n.call(t,o)){var a=t[o];a&&"object"==typeof a&&r&&"object"==typeof r?t[o]=e(a,r,i):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var a=r[o];return n.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t}),s)}}},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}},function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g,i=r(2),a={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return String(e)}}},a)},function(e,t,r){var n=r(18),o=r(20);function i(e,t){if(t)if("number"==typeof t)a(e,t);else{t.status_code&&a(e,t.status_code),t.error&&(e.name=c(t.error)),t.error_description&&(e.message=t.error_description);var r=t.errors;if(r)i(e,r.length?r[0]:r);for(var n in t)e[n]=t[n];e.status&&(t.method||t.path)&&s(e)}}function a(e,t){e.name=c(o[t]),e.status=e.statusCode=t,s(e)}function s(e){var t=e.status,r=e.method,n=e.path,o=t+" status code",i=r||n;i&&(o+=' for "'),r&&(o+=r),i&&(o+=" "),n&&(o+=n),i&&(o+='"'),e.message=o}function c(e){return n(String(e).replace(/error$/i,""),"error")}e.exports=function e(){for(var t=new Error,r=0;r<arguments.length;r++)i(t,arguments[r]);"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(t,e);return t}},function(e,t,r){t.log=function(){var e;return"object"==typeof console&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(r){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(r){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=r(21)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t,r){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,o=t.cmp&&(r=t.cmp,function(e){return function(t,n){var o={key:t,value:e[t]},i={key:n,value:e[n]};return r(o,i)}}),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,a;if(Array.isArray(t)){for(a="[",r=0;r<t.length;r++)r&&(a+=","),a+=e(t[r])||"null";return a+"]"}if(null===t)return"null";if(-1!==i.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(t)-1,c=Object.keys(t).sort(o&&o(t));for(a="",r=0;r<c.length;r++){var u=c[r],l=e(t[u]);l&&(a&&(a+=","),a+=JSON.stringify(u)+":"+l)}return i.splice(s,1),"{"+a+"}"}}(e)}},function(e,t,r){"use strict";var n=r(28),o=r(29),i=r(4);e.exports={formats:i,parse:o,stringify:n}},,,,,,,,,,function(e,t,r){"use strict";var n=r(19);e.exports=function(){var e=n.apply(n,arguments);return e.charAt(0).toUpperCase()+e.slice(1)}},function(e,t,r){"use strict";e.exports=function(){var e=[].map.call(arguments,(function(e){return e.trim()})).filter((function(e){return e.length})).join("-");return e.length?1!==e.length&&/[_.\- ]+/.test(e)?e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(function(e,t){return t.toUpperCase()})):e[0]===e[0].toLowerCase()&&e.slice(1)!==e.slice(1).toLowerCase()?e:e.toLowerCase():""}},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,r){var n=r(22);e.exports=function(e){function t(e){for(var t=0,r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){var r;function n(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(n.enabled){var a=n,s=Number(new Date),c=s-(r||s);a.diff=c,a.prev=r,a.curr=s,r=s,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var u=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return e;u++;var n=o.formatters[r];if("function"==typeof n){var i=t[u];e=n.call(a,i),t.splice(u,1),u--}return e})),o.formatArgs.call(a,t);var l=a.log||o.log;l.apply(a,t)}}return n.namespace=e,n.enabled=o.enabled(e),n.useColors=o.useColors(),n.color=t(e),n.destroy=i,n.extend=a,"function"==typeof o.init&&o.init(n),o.instances.push(n),n}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function a(e,t){var r=o(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},o.disable=function(){var e=[].concat(n(o.names.map(s)),n(o.skips.map(s).map((function(e){return"-"+e})))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t<n;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,r;for(t=0,r=o.skips.length;t<r;t++)if(o.skips[t].test(e))return!1;for(t=0,r=o.names.length;t<r;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=r(27),Object.keys(e).forEach((function(t){o[t]=e[t]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t,r){var n=r(23),o=r(24),i=r(25),a=r(26);e.exports=function(e){return n(e)||o(e)||i(e)||a()}},function(e,t,r){var n=r(3);e.exports=function(e){if(Array.isArray(e))return n(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t,r){var n=r(3);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(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){var r=1e3,n=6e4,o=60*n,i=24*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return a(e,t,i,"day");if(t>=o)return a(e,t,o,"hour");if(t>=n)return a(e,t,n,"minute");if(t>=r)return a(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=n)return Math.round(e/n)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){"use strict";var n=r(2),o=r(4),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},l=Date.prototype.toISOString,f=o.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,r,o,i,a,c,l,f,p,y,m,g,h){var v,b=t;if("function"==typeof l?b=l(r,b):b instanceof Date?b=y(b):"comma"===o&&s(b)&&(b=b.join(",")),null===b){if(i)return c&&!g?c(r,d.encoder,h,"key"):r;b=""}if("string"==typeof(v=b)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||n.isBuffer(b))return c?[m(g?r:c(r,d.encoder,h,"key"))+"="+m(c(b,d.encoder,h,"value"))]:[m(r)+"="+m(String(b))];var C,w=[];if(void 0===b)return w;if(s(l))C=l;else{var O=Object.keys(b);C=f?O.sort(f):O}for(var F=0;F<C.length;++F){var S=C[F];a&&null===b[S]||(s(b)?u(w,e(b[S],"function"==typeof o?o(r,S):r,o,i,a,c,l,f,p,y,m,g,h)):u(w,e(b[S],r+(p?"."+S:"["+S+"]"),o,i,a,c,l,f,p,y,m,g,h)))}return w};e.exports=function(e,t){var r,n=e,c=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=o.default;if(void 0!==e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=o.formatters[r],a=d.filter;return("function"==typeof e.filter||s(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:a,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof c.filter?n=(0,c.filter)("",n):s(c.filter)&&(r=c.filter);var l,f=[];if("object"!=typeof n||null===n)return"";l=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var y=a[l];r||(r=Object.keys(n)),c.sort&&r.sort(c.sort);for(var m=0;m<r.length;++m){var g=r[m];c.skipNulls&&null===n[g]||u(f,p(n[g],g,y,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.formatter,c.encodeValuesOnly,c.charset))}var h=f.join(c.delimiter),v=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),h.length>0?v+h:""}},function(e,t,r){"use strict";var n=r(2),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(n),s=a?n.slice(0,a.index):n,c=[];if(s){if(!r.plainObjects&&o.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var u=0;r.depth>0&&null!==(a=i.exec(n))&&u<r.depth;){if(u+=1,!r.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+n.slice(a.index)+"]"),function(e,t,r){for(var n=t,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a&&r.parseArrays)i=[].concat(n);else{i=r.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(s,10);r.parseArrays||""!==s?!isNaN(c)&&a!==s&&String(c)===s&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(i=[])[c]=n:i[s]=n:i={0:n}}n=i}return n}(c,t,r)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var r,c={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,f=u.split(t.delimiter,l),d=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[r]?p="utf-8":"utf8=%26%2310003%3B"===f[r]&&(p="iso-8859-1"),d=r,r=f.length);for(r=0;r<f.length;++r)if(r!==d){var y,m,g=f[r],h=g.indexOf("]="),v=-1===h?g.indexOf("="):h+1;-1===v?(y=t.decoder(g,a.decoder,p,"key"),m=t.strictNullHandling?null:""):(y=t.decoder(g.slice(0,v),a.decoder,p,"key"),m=t.decoder(g.slice(v+1),a.decoder,p,"value")),m&&t.interpretNumericEntities&&"iso-8859-1"===p&&(m=s(m)),m&&"string"==typeof m&&t.comma&&m.indexOf(",")>-1&&(m=m.split(",")),g.indexOf("[]=")>-1&&(m=i(m)?[m]:m),o.call(c,y)?c[y]=n.combine(c[y],m):c[y]=m}return c}(e,r):e,l=r.plainObjects?Object.create(null):{},f=Object.keys(u),d=0;d<f.length;++d){var p=f[d],y=c(p,u[p],r);l=n.merge(l,y,r)}return n.compact(l)}},function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"receiveCategories",(function(){return y})),r.d(n,"receiveDomainSuggestions",(function(){return m}));var o={};r.r(o),r.d(o,"getCategories",(function(){return $})),r.d(o,"__internalGetDomainSuggestions",(function(){return W}));var i={};r.r(i),r.d(i,"register",(function(){return K}));var a=r(0),s="automattic/domains/suggestions";var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function u(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function l(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}var f=r(7),d=r.n(f).a,p=Object(a.combineReducers)({categories:function(e,t){return void 0===e&&(e=[]),"RECEIVE_CATEGORIES"===t.type?t.categories:e},domainSuggestions:function(e,t){var r;return void 0===e&&(e={}),"RECEIVE_DOMAIN_SUGGESTIONS"===t.type?c(c({},e),((r={})[d(t.queryObject)]=t.suggestions,r)):e}}),y=function(e){return{type:"RECEIVE_CATEGORIES",categories:e}},m=function(e,t){return{type:"RECEIVE_DOMAIN_SUGGESTIONS",queryObject:e,suggestions:t}},g=r(8),h="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),v=new Uint8Array(16);function b(){if(!h)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return h(v)}for(var C=[],w=0;w<256;++w)C[w]=(w+256).toString(16).substr(1);var O=function(e,t){var r=t||0,n=C;return[n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")};var F,S=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||b)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[n+i]=o[i];return t||O(o)},E=r(5),j=r.n(E),x=r(1),A=r.n(x),N=r(6),P=r.n(N)()("wpcom-proxy-request"),R="https://public-api.wordpress.com",_=window.location.protocol+"//"+window.location.host,k=function(){var e=!1;try{window.postMessage({toString:function(){e=!0}},"*")}catch(t){}return e}(),L=function(){try{return new window.File(["a"],"test.jpg",{type:"image/jpeg"}),!0}catch(e){return!1}}(),D=null,I=!1,T={},M=!!window.ProgressEvent&&!!window.FormData;P('using "origin": %o',_);var U=function(e,t){var r=Object.assign({},e);P("request(%o)",r),D||B();var n=S();r.callback=n,r.supports_args=!0,r.supports_error_obj=!0,r.supports_progress=M,r.method=String(r.method||"GET").toUpperCase(),P("params object: %o",r);var o=new window.XMLHttpRequest;if(o.params=r,T[n]=o,"function"==typeof t){var i=!1,a=function(e){if(!i){i=!0;var r=e.error||e.err||e;P("error: ",r),P("headers: ",e.headers),t(r,null,e.headers)}};o.addEventListener("load",(function(e){if(!i){i=!0;var r=e.response||o.response;P("body: ",r),P("headers: ",e.headers),t(null,r,e.headers)}})),o.addEventListener("abort",a),o.addEventListener("error",a)}return I?V(r):(P("buffering API request since proxying <iframe> is not yet loaded"),F.push(r)),o},q=function(e,t){return"function"==typeof t?U(e,t):new Promise((function(t,r){U(e,(function(e,n){e?r(e):t(n)}))}))};function V(e){P("sending API request to proxy <iframe> %o",e),e.formData&&function(e){if(!window.chrome||!L)return;for(var t=0;t<e.length;t++){var r=H(e[t][1]);r&&(e[t][1]=new window.File([r],r.name,{type:r.type}))}}(e.formData),D.contentWindow.postMessage(k?JSON.stringify(e):e,R)}function G(e){return e&&"[object File]"===Object.prototype.toString.call(e)}function H(e){return G(e)?e:"object"==typeof e&&G(e.fileContents)?e.fileContents:null}function B(){P("install()"),D&&(P("uninstall()"),window.removeEventListener("message",Q),document.body.removeChild(D),I=!1,D=null),F=[],window.addEventListener("message",Q),(D=document.createElement("iframe")).src=R+"/wp-admin/rest-proxy/?v=2.0#"+_,D.style.display="none",document.body.appendChild(D)}function Q(e){if(P("onmessage"),e.origin===R){var t=e.data;if(!t)return P("no `data`, bailing");if("ready"!==t){if(k&&"string"==typeof t&&(t=JSON.parse(t)),t.upload||t.download)return function(e){P('got "progress" event: %o',e);var t=T[e.callbackId];if(t){var r=new A.a("progress",e);(e.upload?t.upload:t).dispatchEvent(r)}}(t);if(!t.length)return P("`e.data` doesn't appear to be an Array, bailing...");var r=t[t.length-1];if(!(r in T))return P("bailing, no matching request with callback: %o",r);var n=T[r],o=n.params,i=t[0],a=t[1],s=t[2];if(207===a||delete T[r],o.metaAPI?a="metaAPIupdated"===i?200:500:P("got %o status code for URL: %o",a,o.path),"object"==typeof s&&(s.status=a),a&&2===Math.floor(a/100))!function(e,t,r){var n=new A.a("load");n.data=n.body=n.response=t,n.headers=r,e.dispatchEvent(n)}(n,i,s);else!function(e,t,r){var n=new A.a("error");n.error=n.err=t,n.headers=r,e.dispatchEvent(n)}(n,j()(o,a,i),s)}else!function(){if(P('proxy <iframe> "load" event'),I=!0,F){for(var e=0;e<F.length;e++)V(F[e]);F=null}}()}else P("ignoring message... %o !== %o",e.origin,R)}var J=q,z={WPCOM_REQUEST:function(e){var t=e.request;return J(t)},FETCH_AND_PARSE:function(e){var t,r,n,o,i=e.resource,a=e.options;return t=void 0,r=void 0,o=function(){var e,t;return u(this,(function(r){switch(r.label){case 0:return[4,window.fetch(i,a)];case 1:return e=r.sent(),t={ok:e.ok},[4,e.json()];case 2:return[2,(t.body=r.sent(),t)]}}))},new((n=void 0)||(n=Promise))((function(e,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(t){t.done?e(t.value):new n((function(e){e(t.value)})).then(a,s)}c((o=o.apply(t,r||[])).next())}))},RELOAD_PROXY:function(){B()},REQUEST_ALL_BLOGS_ACCESS:function(){return q({metaAPI:{accessAllUsersBlogs:!0}})},WAIT:function(e){var t=e.ms;return new Promise((function(e){return setTimeout(e,t)}))}};function $(){var e;return u(this,(function(t){switch(t.label){case 0:return[4,(r="https://public-api.wordpress.com/wpcom/v2/onboarding/domains/categories",{type:"FETCH_AND_PARSE",resource:r,options:n})];case 1:return e=t.sent(),[2,y(e.body)]}var r,n}))}function W(e){var t;return u(this,(function(r){switch(r.label){case 0:return e.query?[4,(n={apiVersion:"1.1",path:"/domains/suggestions",query:Object(g.stringify)(e)},{type:"WPCOM_REQUEST",request:n})]:[2,m(e,[])];case 1:return t=r.sent(),[2,m(e,t)]}var n}))}var X=function(e){function t(t,r){return c(c({include_wordpressdotcom:r.only_wordpressdotcom||!1,include_dotblogsubdomain:!1,only_wordpressdotcom:!1,quantity:5,vendor:e},r),{query:t.trim().toLocaleLowerCase()})}return{getCategories:function(e){return function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}(e.categories.filter((function(e){return null!==e.tier})).sort((function(e,t){return e>t?1:-1})),e.categories.filter((function(e){return null===e.tier})).sort((function(e,t){return e.title.localeCompare(t.title)})))},getDomainSuggestions:function(e,r,n){void 0===n&&(n={});var o=t(r,n);return Object(a.select)(s).__internalGetDomainSuggestions(o)},isLoadingDomainSuggestions:function(e,r,n){void 0===n&&(n={});var o=t(r,n);return Object(a.select)("core/data").isResolving(s,"__internalGetDomainSuggestions",[o])},__internalGetDomainSuggestions:function(e,t){return e.domainSuggestions[d(t)]}}},Z=!1;function K(e){var t=e.vendor;return Z||(Z=!0,Object(a.registerStore)(s,{actions:n,controls:z,reducer:p,resolvers:o,selectors:X(t)})),s}i.register({vendor:"variation2_front"})}]));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,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=66)}([function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.data}()},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,n){t.log=function(){var e;return"object"==typeof console&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(43)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t){!function(){e.exports=this.wp.dataControls}()},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){var n,r=window.ProgressEvent,o=!!r;try{n=new r("loaded"),o="loaded"===n.type,n=null}catch(i){o=!1}e.exports=o?r:"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("Event");return n.initEvent(e,!1,!1),t?(n.lengthComputable=Boolean(t.lengthComputable),n.loaded=Number(t.loaded)||0,n.total=Number(t.total)||0):(n.lengthComputable=!1,n.loaded=n.total=0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.lengthComputable=Boolean(t.lengthComputable),n.loaded=Number(t.loaded)||0,n.total=Number(t.total)||0):(n.lengthComputable=!1,n.loaded=n.total=0),n}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:a,prop:c}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(o){return r}},encode:function(e,t,n){if(0===e.length)return e;var r=e;if("symbol"==typeof e?r=Symbol.prototype.toString.call(e):"string"!=typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",a=0;a<r.length;++a){var s=r.charCodeAt(a);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=r.charAt(a):s<128?o+=i[s]:s<2048?o+=i[192|s>>6]+i[128|63&s]:s<55296||s>=57344?o+=i[224|s>>12]+i[128|s>>6&63]+i[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&r.charCodeAt(a)),o+=i[240|s>>18]+i[128|s>>12&63]+i[128|s>>6&63]+i[128|63&s])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,i){if(!n)return t;if("object"!=typeof n){if(o(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(i&&(i.plainObjects||i.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var s=t;return o(t)&&!o(n)&&(s=a(t,i)),o(t)&&o(n)?(n.forEach((function(n,o){if(r.call(t,o)){var a=t[o];a&&"object"==typeof a&&n&&"object"==typeof n?t[o]=e(a,n,i):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var a=n[o];return r.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t}),s)}}},function(e,t,n){"use strict";var r=n(16),o=n(15);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var a=e.charCodeAt(o);a<128?n[r++]=a:a<2048?(n[r++]=a>>6|192,n[r++]=63&a|128):i(e,o)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++o)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=a(o)),n+=u(o.toString(16))}return n},t.zero2=s,t.zero8=u,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var a=new Array(i/4),s=0,u=t;s<a.length;s++,u+=4){var c;c="big"===o?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],a[s]=c>>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,a=(i<r?1:0)+n+o;e[t]=a>>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,a,s){var u=0,c=t;return u+=(c=c+r>>>0)<t?1:0,u+=(c=c+i>>>0)<i?1:0,e+n+o+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,a,s){return t+r+i+s>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,a,s,u,c){var l=0,f=t;return l+=(f=f+r>>>0)<t?1:0,l+=(f=f+i>>>0)<i?1:0,l+=(f=f+s>>>0)<s?1:0,e+n+o+a+u+(l+=(f=f+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,a,s,u,c){return t+r+i+s+c>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){var r=n(44),o=n(45),i=n(12),a=n(46);e.exports=function(e){return r(e)||o(e)||i(e)||a()}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var o,i,a,s;if(c(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=l(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=p.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):y(o,o.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var c=u.length,l=y(u,c);for(n=0;n<c;++n)i(l[n],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,a;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},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){var r=n(11);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){"use strict";var r=String.prototype.replace,o=/%20/g,i=n(7),a={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return String(e)}}},a)},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){var r=n(40),o=n(42);function i(e,t){if(t)if("number"==typeof t)a(e,t);else{t.status_code&&a(e,t.status_code),t.error&&(e.name=u(t.error)),t.error_description&&(e.message=t.error_description);var n=t.errors;if(n)i(e,n.length?n[0]:n);for(var r in t)e[r]=t[r];e.status&&(t.method||t.path)&&s(e)}}function a(e,t){e.name=u(o[t]),e.status=e.statusCode=t,s(e)}function s(e){var t=e.status,n=e.method,r=e.path,o=t+" status code",i=n||r;i&&(o+=' for "'),n&&(o+=n),i&&(o+=" "),r&&(o+=r),i&&(o+='"'),e.message=o}function u(e){return r(String(e).replace(/error$/i,""),"error")}e.exports=function e(){for(var t=new Error,n=0;n<arguments.length;n++)i(t,arguments[n]);"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(t,e);return t}},function(e,t,n){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n,r="boolean"==typeof t.cycles&&t.cycles,o=t.cmp&&(n=t.cmp,function(e){return function(t,r){var o={key:t,value:e[t]},i={key:r,value:e[r]};return n(o,i)}}),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var n,a;if(Array.isArray(t)){for(a="[",n=0;n<t.length;n++)n&&(a+=","),a+=e(t[n])||"null";return a+"]"}if(null===t)return"null";if(-1!==i.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(t)-1,u=Object.keys(t).sort(o&&o(t));for(a="",n=0;n<u.length;n++){var c=u[n],l=e(t[c]);l&&(a&&(a+=","),a+=JSON.stringify(c)+":"+l)}return i.splice(s,1),"{"+a+"}"}}(e)}},function(e,t,n){"use strict";var r=n(48),o=n(49),i=n(13);e.exports={formats:i,parse:o,stringify:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=s(n(0)),i=s(n(50)),a=s(n(53));function s(e){return e&&e.__esModule?e:{default:e}}var u=void 0;function c(e,t){var n,a,s,l,f,p,d,h,m=[],y={};for(p=0;p<e.length;p++)if("string"!==(f=e[p]).type){if(!t.hasOwnProperty(f.value)||void 0===t[f.value])throw new Error("Invalid interpolation, missing component node: `"+f.value+"`");if("object"!==r(t[f.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+f.value+"`","\n> "+u);if("componentClose"===f.type)throw new Error("Missing opening component token: `"+f.value+"`");if("componentOpen"===f.type){n=t[f.value],s=p;break}m.push(t[f.value])}else m.push(f.value);return n&&(l=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(s,e),d=c(e.slice(s+1,l),t),a=o.default.cloneElement(n,{},d),m.push(a),l<e.length-1&&(h=c(e.slice(l+1),t),m=m.concat(h))),1===m.length?m[0]:(m.forEach((function(e,t){e&&(y["interpolation-child-"+t]=e)})),(0,i.default)(y))}t.default=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(u=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,a.default)(t);try{return c(i,n)}catch(s){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+s.message+"`");return t}}},function(e,t,n){var r=n(10),o=n(15);function i(e){if(!(this instanceof i))return new i(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=i,o(i,r.EventEmitter),Object.defineProperty(i.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),i.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},i.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},i.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},i.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},i.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},i.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},i.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},i.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},function(e,t,n){"use strict";var r=n(8),o=n(54),i=n(55),a=r.rotl32,s=r.sum32,u=r.sum32_5,c=i.ft_1,l=o.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(p,l),e.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=a(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var o=this.h[0],i=this.h[1],l=this.h[2],p=this.h[3],d=this.h[4];for(r=0;r<n.length;r++){var h=~~(r/20),m=u(a(o,5),c(h,i,l,p),d,n[r],f[h]);d=p,p=l,l=a(i,30),i=o,o=m}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],l),this.h[3]=s(this.h[3],p),this.h[4]=s(this.h[4],d)},p.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){var r=n(2);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},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(56);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(57),o=n(58),i=n(59);e.exports=function(e){return function(){var t,n=r(e);if(o()){var a=r(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return i(this,t)}}},function(e,t,n){var r=n(61),o=n(62),i=n(12),a=n(63);e.exports=function(e,t){return r(e)||o(e,t)||i(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,n){"use strict";e.exports=n(64)},function(e,t){!function(){e.exports=this.wp.compose}()},,,,,,,,,function(e,t,n){"use strict";var r=n(41);e.exports=function(){var e=r.apply(r,arguments);return e.charAt(0).toUpperCase()+e.slice(1)}},function(e,t,n){"use strict";e.exports=function(){var e=[].map.call(arguments,(function(e){return e.trim()})).filter((function(e){return e.length})).join("-");return e.length?1!==e.length&&/[_.\- ]+/.test(e)?e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(function(e,t){return t.toUpperCase()})):e[0]===e[0].toLowerCase()&&e.slice(1)!==e.slice(1).toLowerCase()?e:e.toLowerCase():""}},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,n){var r=n(9);e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var a=r,s=Number(new Date),u=s-(n||s);a.diff=u,a.prev=n,a.curr=s,n=s,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var c=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;c++;var r=o.formatters[n];if("function"==typeof r){var i=t[c];e=r.call(a,i),t.splice(c,1),c--}return e})),o.formatArgs.call(a,t);var l=a.log||o.log;l.apply(a,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=a,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function a(e,t){var n=o(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},o.disable=function(){var e=[].concat(r(o.names.map(s)),r(o.skips.map(s).map((function(e){return"-"+e})))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(47),Object.keys(e).forEach((function(t){o[t]=e[t]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t,n){var r=n(11);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){var n=1e3,r=6e4,o=60*r,i=24*o;function a(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return a(e,t,i,"day");if(t>=o)return a(e,t,o,"hour");if(t>=r)return a(e,t,r,"minute");if(t>=n)return a(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";var r=n(7),o=n(13),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,s(t)?t:[t])},l=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,n,o,i,a,u,l,f,d,h,m,y,g){var v,b=t;if("function"==typeof l?b=l(n,b):b instanceof Date?b=h(b):"comma"===o&&s(b)&&(b=r.maybeMap(b,(function(e){return e instanceof Date?h(e):e})).join(",")),null===b){if(i)return u&&!y?u(n,p.encoder,g,"key"):n;b=""}if("string"==typeof(v=b)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||r.isBuffer(b))return u?[m(y?n:u(n,p.encoder,g,"key"))+"="+m(u(b,p.encoder,g,"value"))]:[m(n)+"="+m(String(b))];var w,O=[];if(void 0===b)return O;if(s(l))w=l;else{var S=Object.keys(b);w=f?S.sort(f):S}for(var _=0;_<w.length;++_){var C=w[_],x=b[C];if(!a||null!==x){var E=s(b)?"function"==typeof o?o(n,C):n:n+(d?"."+C:"["+C+"]");c(O,e(x,E,o,i,a,u,l,f,d,h,m,y,g))}}return O};e.exports=function(e,t){var n,r=e,u=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],a=p.filter;return("function"==typeof e.filter||s(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:a,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof u.filter?r=(0,u.filter)("",r):s(u.filter)&&(n=u.filter);var l,f=[];if("object"!=typeof r||null===r)return"";l=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=a[l];n||(n=Object.keys(r)),u.sort&&n.sort(u.sort);for(var m=0;m<n.length;++m){var y=n[m];u.skipNulls&&null===r[y]||c(f,d(r[y],y,h,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.formatter,u.encodeValuesOnly,u.charset))}var g=f.join(u.delimiter),v=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),g.length>0?v+g:""}},function(e,t,n){"use strict";var r=n(7),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,l=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var f=0;n.depth>0&&null!==(s=a.exec(i))&&f<n.depth;){if(f+=1,!n.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),function(e,t,n,r){for(var o=r?t:u(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=o:a[c]=o:a={0:o}}o=a}return o}(l,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var n,c={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=l.split(t.delimiter,f),d=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n<p.length;++n)0===p[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[n]?h="utf-8":"utf8=%26%2310003%3B"===p[n]&&(h="iso-8859-1"),d=n,n=p.length);for(n=0;n<p.length;++n)if(n!==d){var m,y,g=p[n],v=g.indexOf("]="),b=-1===v?g.indexOf("="):v+1;-1===b?(m=t.decoder(g,a.decoder,h,"key"),y=t.strictNullHandling?null:""):(m=t.decoder(g.slice(0,b),a.decoder,h,"key"),y=r.maybeMap(u(g.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,h,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===h&&(y=s(y)),g.indexOf("[]=")>-1&&(y=i(y)?[y]:y),o.call(c,m)?c[m]=r.combine(c[m],y):c[m]=y}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},p=Object.keys(l),d=0;d<p.length;++d){var h=p[d],m=c(h,l[h],n,"string"==typeof e);f=r.merge(f,m,n)}return r.compact(f)}},function(e,t,n){"use strict";var r=n(0),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(14),a=n(51),s=n(52),u="function"==typeof Symbol&&Symbol.iterator;function c(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function l(e,t,n,r){var i,s=typeof e;if("undefined"!==s&&"boolean"!==s||(e=null),null===e||"string"===s||"number"===s||"object"===s&&e.$$typeof===o)return n(r,e,""===t?"."+c(e,0):t),1;var f=0,p=""===t?".":t+":";if(Array.isArray(e))for(var d=0;d<e.length;d++)f+=l(i=e[d],p+c(i,d),n,r);else{var h=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(h){0;for(var m,y=h.call(e),g=0;!(m=y.next()).done;)f+=l(i=m.value,p+c(i,g++),n,r)}else if("object"===s){0;var v=""+e;a(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===v?"object with keys {"+Object.keys(e).join(", ")+"}":v,"")}}return f}var f=/\/+/g;function p(e){return(""+e).replace(f,"$&/")}var d,h,m=y,y=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},g=function(e){a(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function v(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function b(e,t,n){var o,a,s=e.result,u=e.keyPrefix,c=e.func,l=e.context,f=c.call(l,t,e.count++);Array.isArray(f)?w(f,s,n,i.thatReturnsArgument):null!=f&&(r.isValidElement(f)&&(o=f,a=u+(!f.key||t&&t.key===f.key?"":p(f.key)+"/")+n,f=r.cloneElement(o,{key:a},void 0!==o.props?o.props.children:void 0)),s.push(f))}function w(e,t,n,r,o){var i="";null!=n&&(i=p(n)+"/");var a=v.getPooled(t,i,r,o);!function(e,t,n){null==e||l(e,"",t,n)}(e,b,a),v.release(a)}v.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},d=function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},(h=v).instancePool=[],h.getPooled=d||m,h.poolSize||(h.poolSize=10),h.release=g;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return s(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return s(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;a(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)w(e[n],t,n,i.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,s],l=0;(u=new Error(t.replace(/%s/g,(function(){return c[l++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){"use strict";var r=n(14);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t,n){"use strict";var r=n(8),o=n(16);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},function(e,t,n){"use strict";var r=n(8).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function a(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?a(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=a,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},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){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){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(60),o=n(5);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},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){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,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.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";
2
+ /** @license React v1.3.0
3
+ * use-subscription.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */Object.defineProperty(t,"__esModule",{value:!0});var r=n(65),o=n(0);t.useSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe,i=o.useState((function(){return{getCurrentValue:t,subscribe:n,value:t()}}));e=i[0];var a=i[1];return i=e.value,e.getCurrentValue===t&&e.subscribe===n||(i=t(),a({getCurrentValue:t,subscribe:n,value:i})),o.useDebugValue(i),o.useEffect((function(){function e(){if(!o){var e=t();a((function(o){return o.getCurrentValue!==t||o.subscribe!==n||o.value===e?o:r({},o,{value:e})}))}}var o=!1,i=n(e);return e(),function(){o=!0,i()}}),[t,n]),i}},function(e,t,n){"use strict";
10
+ /*
11
+ object-assign
12
+ (c) Sindre Sorhus
13
+ @license MIT
14
+ */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)i.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"receiveCategories",(function(){return b})),n.d(r,"receiveDomainSuggestions",(function(){return w}));var o={};n.r(o),n.d(o,"getCategories",(function(){return ee})),n.d(o,"__internalGetDomainSuggestions",(function(){return te}));var i={};n.r(i),n.d(i,"register",(function(){return oe}));var a={};n.r(a),n.d(a,"setPrices",(function(){return bt})),n.d(a,"setPlan",(function(){return wt})),n.d(a,"resetPlan",(function(){return Ot}));var s={};n.r(s),n.d(s,"getSelectedPlan",(function(){return _t})),n.d(s,"getDefaultPlan",(function(){return Ct})),n.d(s,"getSupportedPlans",(function(){return xt})),n.d(s,"getPlanByPath",(function(){return Et})),n.d(s,"getPlansDetails",(function(){return jt})),n.d(s,"getPlansPaths",(function(){return At})),n.d(s,"getPrices",(function(){return Pt})),n.d(s,"isPlanEcommerce",(function(){return Ft})),n.d(s,"isPlanFree",(function(){return Nt}));var u={};n.r(u),n.d(u,"getPrices",(function(){return kt}));var c={};n.r(c),n.d(c,"plansPaths",(function(){return ht})),n.d(c,"register",(function(){return Tt}));var l=n(1),f="automattic/domains/suggestions";var p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function d(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}var y=n(18),g=n.n(y).a,v=Object(l.combineReducers)({categories:function(e,t){return void 0===e&&(e=[]),"RECEIVE_CATEGORIES"===t.type?t.categories:e},domainSuggestions:function(e,t){var n;return void 0===e&&(e={}),"RECEIVE_DOMAIN_SUGGESTIONS"===t.type?p(p({},e),((n={})[g(t.queryObject)]=t.suggestions,n)):e}}),b=function(e){return{type:"RECEIVE_CATEGORIES",categories:e}},w=function(e,t){return{type:"RECEIVE_DOMAIN_SUGGESTIONS",queryObject:e,suggestions:t}},O=n(19),S="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),_=new Uint8Array(16);function C(){if(!S)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return S(_)}for(var x=[],E=0;E<256;++E)x[E]=(E+256).toString(16).substr(1);var j=function(e,t){var n=t||0,r=x;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var A,P=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||C)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[r+i]=o[i];return t||j(o)},F=n(17),N=n.n(F),k=n(6),L=n.n(k),T=n(3),M=n.n(T),R=M()("wpcom-proxy-request"),D="https://public-api.wordpress.com",U=window.location.protocol+"//"+window.location.host,H=function(){var e=!1;try{window.postMessage({toString:function(){e=!0}},"*")}catch(t){}return e}(),I=function(){try{return new window.File(["a"],"test.jpg",{type:"image/jpeg"}),!0}catch(e){return!1}}(),B=null,G=!1,q={},z=!!window.ProgressEvent&&!!window.FormData;R('using "origin": %o',U);var Y=function(e,t){var n=Object.assign({},e);R("request(%o)",n),B||J();var r=P();n.callback=r,n.supports_args=!0,n.supports_error_obj=!0,n.supports_progress=z,n.method=String(n.method||"GET").toUpperCase(),R("params object: %o",n);var o=new window.XMLHttpRequest;if(o.params=n,q[r]=o,"function"==typeof t){var i=!1,a=function(e){if(!i){i=!0;var n=e.error||e.err||e;R("error: ",n),R("headers: ",e.headers),t(n,null,e.headers)}};o.addEventListener("load",(function(e){if(!i){i=!0;var n=e.response||o.response;R("body: ",n),R("headers: ",e.headers),t(null,n,e.headers)}})),o.addEventListener("abort",a),o.addEventListener("error",a)}return G?$(n):(R("buffering API request since proxying <iframe> is not yet loaded"),A.push(n)),o},V=function(e,t){return"function"==typeof t?Y(e,t):new Promise((function(t,n){Y(e,(function(e,r){e?n(e):t(r)}))}))};function $(e){R("sending API request to proxy <iframe> %o",e),e.formData&&function(e){if(!window.chrome||!I)return;for(var t=0;t<e.length;t++){var n=K(e[t][1]);n&&(e[t][1]=new window.File([n],n.name,{type:n.type}))}}(e.formData),B.contentWindow.postMessage(H?JSON.stringify(e):e,D)}function W(e){return e&&"[object File]"===Object.prototype.toString.call(e)}function K(e){return W(e)?e:"object"==typeof e&&W(e.fileContents)?e.fileContents:null}function J(){R("install()"),B&&(R("uninstall()"),window.removeEventListener("message",Q),document.body.removeChild(B),G=!1,B=null),A=[],window.addEventListener("message",Q),(B=document.createElement("iframe")).src=D+"/wp-admin/rest-proxy/?v=2.0#"+U,B.style.display="none",document.body.appendChild(B)}function Q(e){if(R("onmessage"),e.origin===D){var t=e.data;if(!t)return R("no `data`, bailing");if("ready"!==t){if(H&&"string"==typeof t&&(t=JSON.parse(t)),t.upload||t.download)return function(e){R('got "progress" event: %o',e);var t=q[e.callbackId];if(t){var n=new L.a("progress",e);(e.upload?t.upload:t).dispatchEvent(n)}}(t);if(!t.length)return R("`e.data` doesn't appear to be an Array, bailing...");var n=t[t.length-1];if(!(n in q))return R("bailing, no matching request with callback: %o",n);var r=q[n],o=r.params,i=t[0],a=t[1],s=t[2];if(207===a||delete q[n],o.metaAPI?a="metaAPIupdated"===i?200:500:R("got %o status code for URL: %o",a,o.path),"object"==typeof s&&(s.status=a),a&&2===Math.floor(a/100))!function(e,t,n){var r=new L.a("load");r.data=r.body=r.response=t,r.headers=n,e.dispatchEvent(r)}(r,i,s);else!function(e,t,n){var r=new L.a("error");r.error=r.err=t,r.headers=n,e.dispatchEvent(r)}(r,N()(o,a,i),s)}else!function(){if(R('proxy <iframe> "load" event'),G=!0,A){for(var e=0;e<A.length;e++)$(A[e]);A=null}}()}else R("ignoring message... %o !== %o",e.origin,D)}var Z=V,X={WPCOM_REQUEST:function(e){var t=e.request;return Z(t)},FETCH_AND_PARSE:function(e){var t,n,r,o,i=e.resource,a=e.options;return t=void 0,n=void 0,o=function(){var e,t;return d(this,(function(n){switch(n.label){case 0:return[4,window.fetch(i,a)];case 1:return e=n.sent(),t={ok:e.ok},[4,e.json()];case 2:return[2,(t.body=n.sent(),t)]}}))},new((r=void 0)||(r=Promise))((function(e,i){function a(e){try{u(o.next(e))}catch(t){i(t)}}function s(e){try{u(o.throw(e))}catch(t){i(t)}}function u(t){t.done?e(t.value):new r((function(e){e(t.value)})).then(a,s)}u((o=o.apply(t,n||[])).next())}))},RELOAD_PROXY:function(){J()},REQUEST_ALL_BLOGS_ACCESS:function(){return V({metaAPI:{accessAllUsersBlogs:!0}})},WAIT:function(e){var t=e.ms;return new Promise((function(e){return setTimeout(e,t)}))}};function ee(){var e;return d(this,(function(t){switch(t.label){case 0:return[4,(n="https://public-api.wordpress.com/wpcom/v2/onboarding/domains/categories",{type:"FETCH_AND_PARSE",resource:n,options:r})];case 1:return e=t.sent(),[2,b(e.body)]}var n,r}))}function te(e){var t;return d(this,(function(n){switch(n.label){case 0:return e.query?[4,(r={apiVersion:"1.1",path:"/domains/suggestions",query:Object(O.stringify)(e)},{type:"WPCOM_REQUEST",request:r})]:[2,w(e,[])];case 1:return t=n.sent(),[2,w(e,t)]}var r}))}var ne=function(e){function t(t,n){return p(p({include_wordpressdotcom:n.only_wordpressdotcom||!1,include_dotblogsubdomain:!1,only_wordpressdotcom:!1,quantity:5,vendor:e},n),{query:t.trim().toLocaleLowerCase()})}return{getCategories:function(e){return m(e.categories.filter((function(e){return null!==e.tier})).sort((function(e,t){return e>t?1:-1})),e.categories.filter((function(e){return null===e.tier})).sort((function(e,t){return e.title.localeCompare(t.title)})))},getDomainSuggestions:function(e,n,r){void 0===r&&(r={});var o=t(n,r);return Object(l.select)(f).__internalGetDomainSuggestions(o)},getDomainSuggestionVendor:function(){return e},isLoadingDomainSuggestions:function(e,n,r){void 0===r&&(r={});var o=t(n,r);return Object(l.select)("core/data").isResolving(f,"__internalGetDomainSuggestions",[o])},__internalGetDomainSuggestions:function(e,t){return e.domainSuggestions[g(t)]}}},re=!1;function oe(e){var t=e.vendor;return re||(re=!0,Object(l.registerStore)(f,{actions:r,controls:X,reducer:v,resolvers:o,selectors:ne(t)})),f}var ie,ae,se,ue,ce=n(4),le={USD:{format:"SYMBOL_THEN_AMOUNT",symbol:"$",decimal:2},GBP:{format:"SYMBOL_THEN_AMOUNT",symbol:"£",decimal:2},JPY:{format:"SYMBOL_THEN_AMOUNT",symbol:"¥",decimal:0},BRL:{format:"SYMBOL_THEN_AMOUNT",symbol:"R$",decimal:2},EUR:{format:"SYMBOL_THEN_AMOUNT",symbol:"€",decimal:2},NZD:{format:"SYMBOL_THEN_AMOUNT",symbol:"NZ$",decimal:2},AUD:{format:"SYMBOL_THEN_AMOUNT",symbol:"A$",decimal:2},CAD:{format:"SYMBOL_THEN_AMOUNT",symbol:"C$",decimal:2},IDR:{format:"AMOUNT_THEN_SYMBOL",symbol:"Rp",decimal:0},INR:{format:"AMOUNT_THEN_SYMBOL",symbol:"₹",decimal:0},ILS:{format:"AMOUNT_THEN_SYMBOL",symbol:"₪",decimal:2},RUB:{format:"AMOUNT_THEN_SYMBOL",symbol:"₽",decimal:2},MXN:{format:"SYMBOL_THEN_AMOUNT",symbol:"MX$",decimal:2},SEK:{format:"AMOUNT_THEN_SYMBOL",symbol:"SEK",decimal:2},HUF:{format:"AMOUNT_THEN_SYMBOL",symbol:"Ft",decimal:0},CHF:{format:"AMOUNT_THEN_SYMBOL",symbol:"CHF",decimal:2},CZK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Kč",decimal:2},DKK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Dkr",decimal:2},HKD:{format:"AMOUNT_THEN_SYMBOL",symbol:"HK$",decimal:2},NOK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Kr",decimal:2},PHP:{format:"AMOUNT_THEN_SYMBOL",symbol:"₱",decimal:2},PLN:{format:"AMOUNT_THEN_SYMBOL",symbol:"PLN",decimal:2},SGD:{format:"SYMBOL_THEN_AMOUNT",symbol:"S$",decimal:2},TWD:{format:"SYMBOL_THEN_AMOUNT",symbol:"NT$",decimal:0},THB:{format:"SYMBOL_THEN_AMOUNT",symbol:"฿",decimal:2},TRY:{format:"AMOUNT_THEN_SYMBOL",symbol:"TL",decimal:2}},fe=n(9),pe=n.n(fe),de=n(2),he=n.n(de),me=n(20),ye=n.n(me);ie={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},ae=["(","?"],se={")":["("],":":["?","?:"]},ue=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var ge={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function ve(e){var t=function(e){for(var t,n,r,o,i=[],a=[];t=e.match(ue);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=a.pop();){if(se[n]){if(se[n][0]===o){n=se[n][1]||n;break}}else if(ae.indexOf(o)>=0||ie[o]<ie[n]){a.push(o);break}i.push(o)}se[n]||a.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(a.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,a,s,u=[];for(n=0;n<e.length;n++){if(a=e[n],i=ge[a]){for(r=i.length,o=Array(r);r--;)o[r]=u.pop();try{s=i.apply(null,o)}catch(c){return c}}else s=t.hasOwnProperty(a)?t[a]:+a;u.push(s)}return u[0]}(t,e)}}var be={contextDelimiter:"",onMissingKey:null};function we(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},be)this.options[n]=void 0!==t&&n in t?t[n]:be[n]}we.prototype.getPluralForm=function(e,t){var n,r,o,i,a=this.pluralForms[e];return a||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=ve(r),o=function(e){return+i({n:e})}),a=this.pluralForms[e]=o),a(t)},we.prototype.dcnpgettext=function(e,t,n,r,o){var i,a,s;return i=void 0===o?0:this.getPluralForm(e,o),a=n,t&&(a=t+this.options.contextDelimiter+n),(s=this.data[e][a])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var Oe=n(21),Se=n.n(Oe),_e=n(22),Ce=n.n(_e),xe=n(10),Ee=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function je(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(Ee,(function(){var e,r,o,i,a;return e=arguments[3],r=arguments[5],o=arguments[7],"%"===(i=arguments[9])?"%":("*"===o&&(o=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(a=t[0][r]):(void 0===e&&(e=n),n++,a=t[e-1]),"f"===i?a=parseFloat(a)||0:"d"===i&&(a=parseInt(a)||0),void 0!==o&&("f"===i?a=a.toFixed(o):"s"===i&&(a=a.substr(0,o))),null!=a?a:"")}))}
15
+ /*
16
+ * Exposes number format capability
17
+ *
18
+ * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
19
+ * @license See CREDITS.md
20
+ * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
21
+ */function Ae(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,a=void 0===r?",":r,s=void 0===n?".":n,u="";return(u=(i?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split("."))[0].length>3&&(u[0]=u[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(u[1]||"").length<i&&(u[1]=u[1]||"",u[1]+=new Array(i-u[1].length+1).join("0")),u.join(s)}var Pe=M()("i18n-calypso"),Fe=[function(e){return e}],Ne={};function ke(){De.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function Le(e){return Array.prototype.slice.call(e)}function Te(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&ke("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",Le(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&ke("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",Le(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function Me(e,t){return e.dcnpgettext("messages",t.context,t.original,t.plural,t.count)}function Re(e,t){for(var n=Fe.length-1;n>=0;n--){var r=Fe[n](Object.assign({},t)),o=r.context?r.context+""+r.original:r.original;if(e.state.locale[o])return Me(e.state.tannin,r)}return null}function De(){if(!(this instanceof De))return new De;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:Se()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new xe.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}De.throwErrors=!1,De.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},De.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},De.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},De.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return Ae(e,n,r,o)},De.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},De.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==Ne[n+e])return Ne[n+e];var r=Ce()().update(e).digest("hex");return Ne[n+e]=t?r.substr(0,t):r},a=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)Fe.push(a(!1));else{var s=o.substr(5).indexOf("-");if(s<0){var u=Number(o.substr(5));Fe.push(a(u))}else for(var c=Number(o.substr(5,s)),l=Number(o.substr(6+s)),f=c;f<=l;f++)Fe.push(a(f))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new we(he()({},"messages",this.state.locale)),this.state.numberFormatSettings.decimal_point=Me(this.state.tannin,Te(["number_format_decimals"])),this.state.numberFormatSettings.thousands_sep=Me(this.state.tannin,Te(["number_format_thousands_sep"])),"number_format_decimals"===this.state.numberFormatSettings.decimal_point&&(this.state.numberFormatSettings.decimal_point="."),"number_format_thousands_sep"===this.state.numberFormatSettings.thousands_sep&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},De.prototype.getLocale=function(){return this.state.locale},De.prototype.getLocaleSlug=function(){return this.state.localeSlug},De.prototype.isRtl=function(){return"rtl"===this.state.textDirection},De.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},De.prototype.hasTranslation=function(){return!!Re(this,Te(arguments))},De.prototype.translate=function(){var e=Te(arguments),t=Re(this,e);if(t||(t=Me(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=je.apply(void 0,pe()(n))}catch(o){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[r](o):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=ye()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},De.prototype.reRenderTranslations=function(){Pe("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},De.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},De.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var Ue=De,He=n(23),Ie=n.n(He),Be=n(24),Ge=n.n(Be),qe=n(25),ze=n.n(qe),Ye=n(5),Ve=n.n(Ye),$e=n(26),We=n.n($e),Ke=n(27),Je=n.n(Ke),Qe=n(0),Ze=n.n(Qe),Xe=n(28),et=n.n(Xe),tt=n(29),nt=n.n(tt),rt=n(30),ot=n(31);var it,at,st,ut,ct=new Ue,lt=(ct.numberFormat.bind(ct),ct.translate.bind(ct)),ft=(ct.configure.bind(ct),ct.setLocale.bind(ct),ct.getLocale.bind(ct),ct.getLocaleSlug.bind(ct),ct.addTranslations.bind(ct),ct.reRenderTranslations.bind(ct),ct.registerComponentUpdateHook.bind(ct),ct.registerTranslateHook.bind(ct),ct.state,ct.stateObserver,ct.on.bind(ct),ct.off.bind(ct),ct.emit.bind(ct),at={numberFormat:(it=ct).numberFormat.bind(it),translate:it.translate.bind(it)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(ct),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(rt.useSubscription)(t)}var r=Object(ot.createHigherOrderComponent)((function(e){return Object(Qe.forwardRef)((function(t,r){var o=n();return Ze.a.createElement(e,nt()({},t,{isRtl:o,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(ct)),pt=(ft.useRtl,ft.withRtl,["Remove WordPress.com ads","Email & basic Live Chat Support","Collect recurring payments","Collect one-time payments","Earn ad revenue","Premium themes","Upload videos","Google Analytics support","Business features (incl. SEO)","Upload themes","Install plugins","Accept Payments in 60+ Countries"]),dt=((st={}).free_plan={title:lt("Free"),productId:1,storeSlug:"free_plan",pathSlug:"beginner",features:["3 GB storage space"],isFree:!0},st["personal-bundle"]={title:lt("Personal"),productId:1009,storeSlug:"personal-bundle",pathSlug:"personal",features:m(["6 GB storage space"],pt.slice(0,3))},st.value_bundle={title:lt("Premium"),productId:1003,storeSlug:"value_bundle",pathSlug:"premium",features:m(["13 GB storage space"],pt.slice(0,8)),isPopular:!0},st["business-bundle"]={title:lt("Business"),productId:1008,storeSlug:"business-bundle",pathSlug:"business",features:m(["200 GB storage space"],pt.slice(0,11))},st["ecommerce-bundle"]={title:lt("eCommerce"),productId:1011,storeSlug:"ecommerce-bundle",pathSlug:"ecommerce",features:m(["200 GB storage space"],pt)},st),ht=Object.keys(dt).map((function(e){return dt[e].pathSlug})),mt=[{id:"general",name:null,features:[{name:"Free domain for One Year",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Email & basic live chat support",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"24/7 Priority live chat support",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Preinstalled SSL security",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Jetpack essential features",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Storage",type:"text",data:["3 GB","6 GB","13 GB","200 GB","200 GB"]},{name:"Dozens of free designs",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Remove WordPress.com ads",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Unlimited premium themes",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Advanced design customization",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Get personalized help",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Install plugins",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Upload themes",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Remove WordPress.com branding",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Automated backup & one-click rewind",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"SFTP and database access",type:"checkbox",data:[!1,!1,!1,!0,!0]}]},{id:"commerce",name:"Commerce",features:[{name:"Sell subscriptions (recurring payments)",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Sell single items (simple payments)",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Accept payments in 60+ countries",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Integrations with top shipping carriers",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Sell anything (products and/or services)",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Premium customizable starter themes",type:"checkbox",data:[!1,!1,!1,!1,!0]}]},{id:"marketing",name:"Marketing",features:[{name:"WordAds",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Advanced social media tools",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"VideoPress support",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"SEO tools",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Commerce marketing tools",type:"checkbox",data:[!1,!1,!1,!1,!0]}]}],yt=Object.keys(dt),gt={supportedPlanSlugs:yt,selectedPlanSlug:void 0,prices:(ut={},ut.free_plan="",ut["personal-bundle"]="",ut.value_bundle="",ut["business-bundle"]="",ut["ecommerce-bundle"]="",ut)},vt=function(e,t){switch(void 0===e&&(e=gt),t.type){case"SET_PLAN":return p(p({},e),{selectedPlanSlug:t.slug});case"SET_PRICES":return p(p({},e),{prices:t.prices});case"RESET_PLAN":return gt;default:return e}},bt=function(e){return{type:"SET_PRICES",prices:e}},wt=function(e){return{type:"SET_PLAN",slug:e}},Ot=function(){return{type:"RESET_PLAN"}};function St(e){return dt[e]}var _t=function(e){return e.selectedPlanSlug?St(e.selectedPlanSlug):null},Ct=function(e,t,n){return t||n?St("value_bundle"):void 0},xt=function(e){return e.supportedPlanSlugs.map(St)},Et=function(e,t){return t&&xt(e).find((function(e){return(null==e?void 0:e.pathSlug)===t}))},jt=function(){return mt},At=function(e){return xt(e).map((function(e){return null==e?void 0:e.pathSlug}))},Pt=function(e){return e.prices},Ft=function(e,t){return"ecommerce-bundle"===t},Nt=function(e,t){return"free_plan"===t};function kt(){var e,t,n;return d(this,(function(r){switch(r.label){case 0:return[4,Object(ce.apiFetch)({global:!0,url:"https://public-api.wordpress.com/rest/v1.5/plans",mode:"cors",credentials:"omit"})];case 1:return e=r.sent(),t=e.filter((function(e){return-1!==yt.indexOf(e.product_slug)})),n=t.reduce((function(e,t){return e[t.product_slug]=function(e){var t=le[e.currency_code],n=e.raw_price/12;return Number.isInteger(n)||(n=n.toFixed(t.decimal)),"AMOUNT_THEN_SYMBOL"===t.format?""+n+t.symbol:""+t.symbol+n}(t),e}),{}),[4,bt(n)];case 2:return r.sent(),[2]}}))}var Lt=!1;function Tt(){return Lt||(Lt=!0,Object(l.registerStore)("automattic/onboard/plans",{resolvers:u,actions:a,controls:ce.controls,reducer:vt,selectors:s,persist:["selectedPlanSlug"]})),"automattic/onboard/plans"}i.register({vendor:"variation2_front"}),c.register()}]));
donations/dist/donations.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '20ed40ac53590362cfcba4f9d89f61e6');
1
+ <?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'ab3a91fafda1cf4778ea9fcb49c53400');
donations/dist/donations.css CHANGED
@@ -1 +1 @@
1
- .donations__tabs{border:1px solid #ddd;display:grid;grid-template-columns:repeat(3,1fr)}.donations__tabs .components-button{border-bottom:1px solid #ddd}.donations__tabs .components-button:first-child.active{border-right:1px solid #ddd}.donations__tabs .components-button:nth-child(2).active{border-left:1px solid #ddd;border-right:1px solid #ddd}.donations__tabs .components-button:nth-child(3).active{border-left:1px solid #ddd}.donations__tabs .components-button.active{border-bottom:none}.donations__tab{grid-area:2/1/2/4;visibility:hidden}.donations__tab.active{visibility:visible}.donations__nudge{margin-bottom:32px}
1
+ .donations__container{border:1px solid #a7aaad}.donations__container .donations__tabs{display:flex;border-bottom:1px solid #a7aaad}.donations__container .donations__tabs .components-button{font-weight:700;display:inline-block;flex-grow:1;text-align:center;font-size:16px;padding:16px;height:auto;border-radius:0;border-left:1px solid #a7aaad}.donations__container .donations__tabs .components-button:first-child{border-left:none}.donations__container .donations__tabs .components-button:hover{color:inherit}.donations__container .donations__tabs .components-button.is-active{background-color:#2271b1;box-shadow:none;color:#fff}.donations__container .donations__content{padding:24px}
donations/dist/donations.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,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=19)}([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.wp.components}()},function(e,t,n){var r=n(13),o=n(14),i=n(15),c=n(17);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){function n(e,t,n,r,o,i,c){try{var a=e[i](c),u=a.value}catch(l){return void n(l)}a.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var c=e.apply(t,r);function a(e){n(c,o,i,a,u,"next",e)}function u(e){n(c,o,i,a,u,"throw",e)}a(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},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){var r=n(12);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wp.data}()},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){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(u){o=!0,i=u}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}},function(e,t,n){var r=n(16);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(n):"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(){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){},function(e,t,n){"use strict";n.r(t);var r=n(8),o=n.n(r),i=n(4),c=n.n(i),a=n(0),u=n(6),l=n.n(u),s=n(5),f=n(1),p=n(3),b=n.n(p),d=n(7),m=n.n(d),_=n(2),O=n(9),j=n(10),g=n(11),v=Object(j.compose)([Object(g.withDispatch)((function(e,t){var n,r=t.stripeConnectUrl;return{autosaveAndRedirect:(n=c()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.stripeConnectUrl;return Object(a.createElement)(O.Warning,{actions:n&&[Object(a.createElement)(_.Button,{key:"connect",href:n,onClick:t,target:"_top",isDefault:!0,className:"premium-content-block-nudge__button stripe-nudge__button"},Object(f.__)("Connect","full-site-editing"))],className:"donations__nudge premium-content-block-nudge"},Object(a.createElement)("span",{className:"donations__nudge-info premium-content-block-nudge__info"},Object(a.createElement)(_.Dashicon,{icon:"star-filled"}),Object(a.createElement)("span",{className:"donations__nudge-text-container premium-content-block-nudge__text-container"},Object(a.createElement)("span",{className:"donations__nudge-title premium-content-block-nudge__title"},Object(f.__)("Connect to Stripe to use this block on your site","full-site-editing")),Object(a.createElement)("span",{className:"donations__nudge-message premium-content-block-nudge__message"},Object(f.__)("This block will be hidden from your visitors until you connect to Stripe.","full-site-editing")))))})),h=function(e){var t=e.stripeConnectUrl,n=Object(a.useState)("one-time"),r=b()(n,2),o=r[0],i=r[1],c=function(e){return o===e?"active":null};return Object(a.createElement)("div",{className:"donations__container"},t&&Object(a.createElement)(v,{stripeConnectUrl:t}),Object(a.createElement)("div",{className:"donations__tabs"},Object(a.createElement)(_.Button,{className:c("one-time"),onClick:function(){return i("one-time")}},Object(f.__)("One-Time","full-site-editing")),Object(a.createElement)(_.Button,{className:c("monthly"),onClick:function(){return i("monthly")}},Object(f.__)("Monthly","full-site-editing")),Object(a.createElement)(_.Button,{className:c("annually"),onClick:function(){return i("annually")}},Object(f.__)("Annually","full-site-editing")),Object(a.createElement)("div",{id:"donations__tab-one-time",className:m()("donations__tab",{active:c("one-time")})},Object(f.__)("One time","full-site-editing")),Object(a.createElement)("div",{id:"donations__tab-monthly",className:m()("donations__tab",{active:c("monthly")})},Object(f.__)("Monthly","full-site-editing")),Object(a.createElement)("div",{id:"donations__tab-annually",className:m()("donations__tab",{active:c("annually")})},Object(f.__)("Annually","full-site-editing"))))},y=function(e){var t=e.error;return Object(a.createElement)("div",{className:"donations__loading-status"},Object(a.createElement)(_.Placeholder,{icon:"lock",label:Object(f.__)("Donations","full-site-editing"),instructions:t}))},w=function(){return Object(a.createElement)("div",{className:"donations__loading-status"},Object(a.createElement)(_.Placeholder,{icon:"lock",label:Object(f.__)("Donations","full-site-editing"),instructions:Object(f.__)("Loading data…","full-site-editing")},Object(a.createElement)(_.Spinner,null)))},k=function(e){var t=e.upgradeUrl;return Object(a.createElement)("div",{className:"donations__upgrade-plan"},Object(a.createElement)(_.Placeholder,{icon:"lock",label:Object(f.__)("Donations","full-site-editing"),instructions:Object(f.__)("You'll need to upgrade your plan to use the Donations block.","full-site-editing")},Object(a.createElement)(_.Button,{isSecondary:!0,isLarge:!0,href:t,target:"_blank",className:"donations__button plan-nudge__button"},Object(f.__)("Upgrade Your Plan","full-site-editing")),Object(a.createElement)("div",{className:"donations__disclaimer membership-button__disclaimer"},Object(a.createElement)(_.ExternalLink,{href:"https://wordpress.com/support/donations-block/"},Object(f.__)("Read more about Donations and related fees.","full-site-editing")))))},x=function(){var e=c()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l()({path:"/wpcom/v2/memberships/status",method:"GET"});case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",Promise.reject(e.t0.message));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=Object(a.useState)(!0),t=b()(e,2),n=t[0],r=t[1],o=Object(a.useState)(""),i=b()(o,2),c=i[0],u=i[1],l=Object(a.useState)(!1),s=b()(l,2),p=s[0],d=s[1],m=Object(a.useState)(!1),_=b()(m,2),O=_[0],j=_[1],g=Object(a.useState)(""),v=b()(g,2),E=v[0],P=v[1],S=function(e){!e&&"object"!=typeof e||e.errors?u(Object(f.__)("Could not load data from WordPress.com.","full-site-editing")):(d(e.should_upgrade_to_access_memberships),P(e.upgrade_url),j(e.connect_url)),r(!1)},N=function(e){u(e),r(!1)};return Object(a.useEffect)((function(){x().then(S,N)}),[]),n?Object(a.createElement)(w,null):c?Object(a.createElement)(y,{error:c}):p?Object(a.createElement)(k,{upgradeUrl:E}):Object(a.createElement)(h,{stripeConnectUrl:O})},P=(n(18),function(){var e=c()(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l()({path:"/wpcom/v2/memberships/status"});case 3:t=e.sent,e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return");case 9:if(!t.should_upgrade_to_access_memberships){e.next=17;break}if(n=Object(s.getBlockType)("a8c/donations")){e.next=14;break}return e.abrupt("return");case 14:r=Object(f._x)("paid","Short label appearing near a block requiring a paid plan","full-site-editing"),Object(s.unregisterBlockType)("a8c/donations"),Object(s.registerBlockType)("a8c/donations",o()({},n,{title:"".concat(n.title," (").concat(r,")")}));case 17:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}());Object(s.registerBlockType)("a8c/donations",{title:Object(f.__)("Donations (a8c-only)","full-site-editing"),description:Object(f.__)("Accept donations on your site.","full-site-editing"),category:"common",icon:Object(a.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(a.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(a.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),supports:{html:!1},keywords:["donations",Object(f.__)("premium","full-site-editing"),Object(f.__)("paywall","full-site-editing")],edit:E,save:function(){return Object(a.createElement)("div",null,"Donations block")}}),P()}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,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=19)}([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.wp.components}()},function(e,t,n){var r=n(13),o=n(14),i=n(15),c=n(17);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){function n(e,t,n,r,o,i,c){try{var a=e[i](c),u=a.value}catch(l){return void n(l)}a.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var c=e.apply(t,r);function a(e){n(c,o,i,a,u,"next",e)}function u(e){n(c,o,i,a,u,"throw",e)}a(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.blocks}()},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){var r=n(12);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wp.data}()},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){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(u){o=!0,i=u}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}},function(e,t,n){var r=n(16);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(n):"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(){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){},function(e,t,n){"use strict";n.r(t);var r=n(9),o=n.n(r),i=n(4),c=n.n(i),a=n(0),u=n(5),l=n.n(u),s=n(7),f=n(1),p=n(3),d=n.n(p),b=n(8),m=n.n(b),O=n(6),g=n(2),_=n(10),j=n(11),h=Object(_.compose)([Object(j.withDispatch)((function(e,t){var n,r=t.stripeConnectUrl;return{autosaveAndRedirect:(n=c()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.stripeConnectUrl;return Object(a.createElement)(O.Warning,{actions:n&&[Object(a.createElement)(g.Button,{key:"connect",href:n,onClick:t,target:"_top",isDefault:!0,className:"premium-content-block-nudge__button stripe-nudge__button"},Object(f.__)("Connect","full-site-editing"))],className:"donations__nudge premium-content-block-nudge"},Object(a.createElement)("span",{className:"donations__nudge-info premium-content-block-nudge__info"},Object(a.createElement)(g.Dashicon,{icon:"star-filled"}),Object(a.createElement)("span",{className:"donations__nudge-text-container premium-content-block-nudge__text-container"},Object(a.createElement)("span",{className:"donations__nudge-title premium-content-block-nudge__title"},Object(f.__)("Connect to Stripe to use this block on your site","full-site-editing")),Object(a.createElement)("span",{className:"donations__nudge-message premium-content-block-nudge__message"},Object(f.__)("This block will be hidden from your visitors until you connect to Stripe.","full-site-editing")))))})),y=function(e){var t=e.attributes,n=e.products,r=e.setAttributes,o=e.siteSlug,i=e.stripeConnectUrl,c=t.oneTimePlanId,u=t.monthlyPlanId,l=t.annuallyPlanId,s=t.showCustomAmount,p=Object(a.useState)("one-time"),b=d()(p,2),_=b[0],j=b[1],y=function(e){return _===e};return Object(a.useEffect)((function(){c||r({oneTimePlanId:n["one-time"]})}),[c]),Object(a.createElement)(O.__experimentalBlock.div,null,i&&Object(a.createElement)(h,{stripeConnectUrl:i}),Object(a.createElement)("div",{className:"donations__container"},(u||l)&&Object(a.createElement)("div",{className:"donations__tabs"},Object(a.createElement)(g.Button,{className:m()({"is-active":y("one-time")}),onClick:function(){return j("one-time")}},Object(f.__)("One-Time","full-site-editing")),u&&Object(a.createElement)(g.Button,{className:m()({"is-active":y("monthly")}),onClick:function(){return j("monthly")}},Object(f.__)("Monthly","full-site-editing")),l&&Object(a.createElement)(g.Button,{className:m()({"is-active":y("annually")}),onClick:function(){return j("annually")}},Object(f.__)("Annually","full-site-editing"))),Object(a.createElement)("div",{className:"donations__content"},Object(a.createElement)("div",null,y("one-time")&&Object(f.__)("Make a one-time donation","full-site-editing"),y("monthly")&&Object(f.__)("Make a monthly donation","full-site-editing"),y("annually")&&Object(f.__)("Make a yearly donation","full-site-editing")),s&&Object(a.createElement)("div",null,Object(f.__)("Or enter a custom amount","full-site-editing")," "))),Object(a.createElement)(O.InspectorControls,null,Object(a.createElement)(g.PanelBody,{title:Object(f.__)("Settings","full-site-editing")},Object(a.createElement)(g.ToggleControl,{checked:!!u,onChange:function(e){r({monthlyPlanId:e?n["1 month"]:null})},label:Object(f.__)("Show monthly donations","full-site-editing")}),Object(a.createElement)(g.ToggleControl,{checked:!!l,onChange:function(e){r({annuallyPlanId:e?n["1 year"]:null})},label:Object(f.__)("Show annual donations","full-site-editing")}),Object(a.createElement)(g.ToggleControl,{checked:s,onChange:function(e){r({showCustomAmount:e})},label:Object(f.__)("Show custom amount option","full-site-editing")}),Object(a.createElement)(g.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(o)},Object(f.__)("View donation earnings","full-site-editing")))))},v=function(e){var t=e.error;return Object(a.createElement)("div",{className:"donations__loading-status"},Object(a.createElement)(g.Placeholder,{icon:"lock",label:Object(f.__)("Donations","full-site-editing"),instructions:t}))},w=function(){return Object(a.createElement)("div",{className:"donations__loading-status"},Object(a.createElement)(g.Placeholder,{icon:"lock",label:Object(f.__)("Donations","full-site-editing"),instructions:Object(f.__)("Loading data…","full-site-editing")},Object(a.createElement)(g.Spinner,null)))},k=function(e){var t=e.upgradeUrl;return Object(a.createElement)("div",{className:"donations__upgrade-plan"},Object(a.createElement)(g.Placeholder,{icon:"lock",label:Object(f.__)("Donations","full-site-editing"),instructions:Object(f.__)("You'll need to upgrade your plan to use the Donations block.","full-site-editing")},Object(a.createElement)(g.Button,{isSecondary:!0,isLarge:!0,href:t,target:"_blank",className:"donations__button plan-nudge__button"},Object(f.__)("Upgrade Your Plan","full-site-editing")),Object(a.createElement)("div",{className:"donations__disclaimer membership-button__disclaimer"},Object(a.createElement)(g.ExternalLink,{href:"https://wordpress.com/support/donations-block/"},Object(f.__)("Read more about Donations and related fees.","full-site-editing")))))},E=function(){var e=c()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:t}});case 3:return n=e.sent,e.abrupt("return",n);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",Promise.reject(e.t0.message));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=c()(regeneratorRuntime.mark((function e(){var t,n,r,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:null,n="/wpcom/v2/memberships/status",t&&(n+="?type=".concat(t)),e.prev=3,e.next=6,l()({path:n,method:"GET"});case 6:return r=e.sent,e.abrupt("return",r);case 10:return e.prev=10,e.t0=e.catch(3),e.abrupt("return",Promise.reject(e.t0.message));case 13:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(){return e.apply(this,arguments)}}(),P=function(e){var t=e.attributes,n=e.setAttributes,r=Object(a.useState)(!0),o=d()(r,2),i=o[0],c=o[1],u=Object(a.useState)(""),l=d()(u,2),s=l[0],p=l[1],b=Object(a.useState)(!1),m=d()(b,2),O=m[0],g=m[1],_=Object(a.useState)(!1),j=d()(_,2),h=j[0],P=j[1],S=Object(a.useState)([]),C=d()(S,2),D=C[0],A=C[1],N=Object(a.useState)(""),T=d()(N,2),L=T[0],I=T[1],B=Object(a.useState)(""),U=d()(B,2),M=U[0],R=U[1],W=function(e){p(e),c(!1)},Y=function(e,t){return e.reduce((function(e,n){var r=n.id,o=n.currency,i=n.type,c=n.interval;return o===t&&"donation"===i&&(e[c]=r),e}),{})},q=function(e){if(!e&&"object"!=typeof e||e.errors)p(Object(f.__)("Could not load data from WordPress.com.","full-site-editing"));else{g(e.should_upgrade_to_access_memberships),I(e.upgrade_url),P(e.connect_url),R(e.site_slug);var t=Y(e.products,"USD");n=t,(r=Object.keys(n)).includes("one-time")&&r.includes("1 month")&&r.includes("1 year")?A(t):E("USD").then((function(e){return A(Y(e,"USD"))}),W)}var n,r;c(!1)};return Object(a.useEffect)((function(){x("donation").then(q,W)}),[]),i?Object(a.createElement)(w,null):s?Object(a.createElement)(v,{error:s}):O?Object(a.createElement)(k,{upgradeUrl:L}):Object(a.createElement)(y,{attributes:t,products:D,stripeConnectUrl:h,setAttributes:n,siteSlug:M})},S=(n(18),function(){var e=c()(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l()({path:"/wpcom/v2/memberships/status"});case 3:t=e.sent,e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return");case 9:if(!t.should_upgrade_to_access_memberships){e.next=17;break}if(n=Object(s.getBlockType)("a8c/donations")){e.next=14;break}return e.abrupt("return");case 14:r=Object(f._x)("paid","Short label appearing near a block requiring a paid plan","full-site-editing"),Object(s.unregisterBlockType)("a8c/donations"),Object(s.registerBlockType)("a8c/donations",o()({},n,{title:"".concat(n.title," (").concat(r,")")}));case 17:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}());Object(s.registerBlockType)("a8c/donations",{title:Object(f.__)("Donations (a8c-only)","full-site-editing"),description:Object(f.__)("Collect one-time, monthly, or annually recurring donations.","full-site-editing"),attributes:{oneTimePlanId:{type:"number",default:null},monthlyPlanId:{type:"number",default:null},annuallyPlanId:{type:"number",default:null},showCustomAmount:{type:"boolean",default:!1}},category:"common",icon:Object(a.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(a.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(a.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),supports:{html:!1},edit:P,save:function(){return Object(a.createElement)("div",null,"Donations block")}}),S()}]));
donations/dist/donations.rtl.css CHANGED
@@ -1 +1 @@
1
- .donations__tabs{border:1px solid #ddd;display:grid;grid-template-columns:repeat(3,1fr)}.donations__tabs .components-button{border-bottom:1px solid #ddd}.donations__tabs .components-button:first-child.active{border-left:1px solid #ddd}.donations__tabs .components-button:nth-child(2).active{border-right:1px solid #ddd;border-left:1px solid #ddd}.donations__tabs .components-button:nth-child(3).active{border-right:1px solid #ddd}.donations__tabs .components-button.active{border-bottom:none}.donations__tab{grid-area:2/1/2/4;visibility:hidden}.donations__tab.active{visibility:visible}.donations__nudge{margin-bottom:32px}
1
+ .donations__container{border:1px solid #a7aaad}.donations__container .donations__tabs{display:flex;border-bottom:1px solid #a7aaad}.donations__container .donations__tabs .components-button{font-weight:700;display:inline-block;flex-grow:1;text-align:center;font-size:16px;padding:16px;height:auto;border-radius:0;border-right:1px solid #a7aaad}.donations__container .donations__tabs .components-button:first-child{border-right:none}.donations__container .donations__tabs .components-button:hover{color:inherit}.donations__container .donations__tabs .components-button.is-active{background-color:#2271b1;box-shadow:none;color:#fff}.donations__container .donations__content{padding:24px}
donations/donations.js CHANGED
@@ -6,53 +6,104 @@ import classNames from 'classnames';
6
  /**
7
  * WordPress dependencies
8
  */
9
- import { useState } from '@wordpress/element';
 
 
10
  import { __ } from '@wordpress/i18n';
11
- import { Button } from '@wordpress/components';
12
 
13
  /**
14
  * Internal dependencies
15
  */
16
  import StripeNudge from './stripe-nudge';
17
 
18
- const Donations = ( { stripeConnectUrl } ) => {
 
19
  const [ activeTab, setActiveTab ] = useState( 'one-time' );
20
 
21
- const isActive = ( button ) => ( activeTab === button ? 'active' : null );
 
 
 
 
 
 
22
 
23
  return (
24
- <div className="donations__container">
25
  { stripeConnectUrl && <StripeNudge stripeConnectUrl={ stripeConnectUrl } /> }
26
- <div className="donations__tabs">
27
- <Button className={ isActive( 'one-time' ) } onClick={ () => setActiveTab( 'one-time' ) }>
28
- { __( 'One-Time', 'full-site-editing' ) }
29
- </Button>
30
- <Button className={ isActive( 'monthly' ) } onClick={ () => setActiveTab( 'monthly' ) }>
31
- { __( 'Monthly', 'full-site-editing' ) }
32
- </Button>
33
- <Button className={ isActive( 'annually' ) } onClick={ () => setActiveTab( 'annually' ) }>
34
- { __( 'Annually', 'full-site-editing' ) }
35
- </Button>
36
- <div
37
- id="donations__tab-one-time"
38
- className={ classNames( 'donations__tab', { active: isActive( 'one-time' ) } ) }
39
- >
40
- { __( 'One time', 'full-site-editing' ) }
41
- </div>
42
- <div
43
- id="donations__tab-monthly"
44
- className={ classNames( 'donations__tab', { active: isActive( 'monthly' ) } ) }
45
- >
46
- { __( 'Monthly', 'full-site-editing' ) }
47
- </div>
48
- <div
49
- id="donations__tab-annually"
50
- className={ classNames( 'donations__tab', { active: isActive( 'annually' ) } ) }
51
- >
52
- { __( 'Annually', 'full-site-editing' ) }
 
 
 
 
 
 
 
 
 
53
  </div>
54
  </div>
55
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  );
57
  };
58
 
6
  /**
7
  * WordPress dependencies
8
  */
9
+ import { InspectorControls, __experimentalBlock as Block } from '@wordpress/block-editor';
10
+ import { Button, ExternalLink, PanelBody, ToggleControl } from '@wordpress/components';
11
+ import { useEffect, useState } from '@wordpress/element';
12
  import { __ } from '@wordpress/i18n';
 
13
 
14
  /**
15
  * Internal dependencies
16
  */
17
  import StripeNudge from './stripe-nudge';
18
 
19
+ const Donations = ( { attributes, products, setAttributes, siteSlug, stripeConnectUrl } ) => {
20
+ const { oneTimePlanId, monthlyPlanId, annuallyPlanId, showCustomAmount } = attributes;
21
  const [ activeTab, setActiveTab ] = useState( 'one-time' );
22
 
23
+ const isTabActive = ( tab ) => activeTab === tab;
24
+
25
+ useEffect( () => {
26
+ if ( ! oneTimePlanId ) {
27
+ setAttributes( { oneTimePlanId: products[ 'one-time' ] } );
28
+ }
29
+ }, [ oneTimePlanId ] );
30
 
31
  return (
32
+ <Block.div>
33
  { stripeConnectUrl && <StripeNudge stripeConnectUrl={ stripeConnectUrl } /> }
34
+ <div className="donations__container">
35
+ { ( monthlyPlanId || annuallyPlanId ) && (
36
+ <div className="donations__tabs">
37
+ <Button
38
+ className={ classNames( { 'is-active': isTabActive( 'one-time' ) } ) }
39
+ onClick={ () => setActiveTab( 'one-time' ) }
40
+ >
41
+ { __( 'One-Time', 'full-site-editing' ) }
42
+ </Button>
43
+ { monthlyPlanId && (
44
+ <Button
45
+ className={ classNames( { 'is-active': isTabActive( 'monthly' ) } ) }
46
+ onClick={ () => setActiveTab( 'monthly' ) }
47
+ >
48
+ { __( 'Monthly', 'full-site-editing' ) }
49
+ </Button>
50
+ ) }
51
+ { annuallyPlanId && (
52
+ <Button
53
+ className={ classNames( { 'is-active': isTabActive( 'annually' ) } ) }
54
+ onClick={ () => setActiveTab( 'annually' ) }
55
+ >
56
+ { __( 'Annually', 'full-site-editing' ) }
57
+ </Button>
58
+ ) }
59
+ </div>
60
+ ) }
61
+ <div className="donations__content">
62
+ <div>
63
+ { isTabActive( 'one-time' ) && __( 'Make a one-time donation', 'full-site-editing' ) }
64
+ { isTabActive( 'monthly' ) && __( 'Make a monthly donation', 'full-site-editing' ) }
65
+ { isTabActive( 'annually' ) && __( 'Make a yearly donation', 'full-site-editing' ) }
66
+ </div>
67
+ { showCustomAmount && (
68
+ <div>{ __( 'Or enter a custom amount', 'full-site-editing' ) } </div>
69
+ ) }
70
  </div>
71
  </div>
72
+ <InspectorControls>
73
+ <PanelBody title={ __( 'Settings', 'full-site-editing' ) }>
74
+ <ToggleControl
75
+ checked={ !! monthlyPlanId }
76
+ onChange={ ( showMonthlyDonations ) => {
77
+ setAttributes( {
78
+ monthlyPlanId: showMonthlyDonations ? products[ '1 month' ] : null,
79
+ } );
80
+ } }
81
+ label={ __( 'Show monthly donations', 'full-site-editing' ) }
82
+ />
83
+ <ToggleControl
84
+ checked={ !! annuallyPlanId }
85
+ onChange={ ( showAnnuallyDonations ) => {
86
+ setAttributes( {
87
+ annuallyPlanId: showAnnuallyDonations ? products[ '1 year' ] : null,
88
+ } );
89
+ } }
90
+ label={ __( 'Show annual donations', 'full-site-editing' ) }
91
+ />
92
+ <ToggleControl
93
+ checked={ showCustomAmount }
94
+ onChange={ ( newShowCustomAmountValue ) => {
95
+ setAttributes( {
96
+ showCustomAmount: newShowCustomAmountValue,
97
+ } );
98
+ } }
99
+ label={ __( 'Show custom amount option', 'full-site-editing' ) }
100
+ />
101
+ <ExternalLink href={ `https://wordpress.com/earn/payments/${ siteSlug }` }>
102
+ { __( 'View donation earnings', 'full-site-editing' ) }
103
+ </ExternalLink>
104
+ </PanelBody>
105
+ </InspectorControls>
106
+ </Block.div>
107
  );
108
  };
109
 
donations/edit.js CHANGED
@@ -11,14 +11,41 @@ import Donations from './donations';
11
  import LoadingError from './loading-error';
12
  import LoadingStatus from './loading-status';
13
  import UpgradePlan from './upgrade-plan';
 
14
  import fetchStatus from './fetch-status';
15
 
16
- const Edit = () => {
17
  const [ isLoading, setIsLoading ] = useState( true );
18
  const [ loadingError, setLoadingError ] = useState( '' );
19
  const [ shouldUpgrade, setShouldUpgrade ] = useState( false );
20
  const [ stripeConnectUrl, setStripeConnectUrl ] = useState( false );
 
21
  const [ upgradeUrl, setUpgradeUrl ] = useState( '' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  const mapStatusToState = ( result ) => {
24
  if ( ( ! result && typeof result !== 'object' ) || result.errors ) {
@@ -27,18 +54,25 @@ const Edit = () => {
27
  setShouldUpgrade( result.should_upgrade_to_access_memberships );
28
  setUpgradeUrl( result.upgrade_url );
29
  setStripeConnectUrl( result.connect_url );
30
- }
31
 
32
- setIsLoading( false );
33
- };
 
 
 
 
 
 
 
 
 
34
 
35
- const apiError = ( message ) => {
36
- setLoadingError( message );
37
  setIsLoading( false );
38
  };
39
 
40
  useEffect( () => {
41
- const updateData = () => fetchStatus().then( mapStatusToState, apiError );
42
  updateData();
43
  }, [] );
44
 
@@ -54,7 +88,15 @@ const Edit = () => {
54
  return <UpgradePlan upgradeUrl={ upgradeUrl } />;
55
  }
56
 
57
- return <Donations stripeConnectUrl={ stripeConnectUrl } />;
 
 
 
 
 
 
 
 
58
  };
59
 
60
  export default Edit;
11
  import LoadingError from './loading-error';
12
  import LoadingStatus from './loading-status';
13
  import UpgradePlan from './upgrade-plan';
14
+ import fetchDefaultProducts from './fetch-default-products';
15
  import fetchStatus from './fetch-status';
16
 
17
+ const Edit = ( { attributes, setAttributes } ) => {
18
  const [ isLoading, setIsLoading ] = useState( true );
19
  const [ loadingError, setLoadingError ] = useState( '' );
20
  const [ shouldUpgrade, setShouldUpgrade ] = useState( false );
21
  const [ stripeConnectUrl, setStripeConnectUrl ] = useState( false );
22
+ const [ products, setProducts ] = useState( [] );
23
  const [ upgradeUrl, setUpgradeUrl ] = useState( '' );
24
+ const [ siteSlug, setSiteSlug ] = useState( '' );
25
+
26
+ const apiError = ( message ) => {
27
+ setLoadingError( message );
28
+ setIsLoading( false );
29
+ };
30
+
31
+ const filterProducts = ( productList, productCurrency ) => {
32
+ return productList.reduce( ( filteredProducts, { id, currency, type, interval } ) => {
33
+ if ( currency === productCurrency && type === 'donation' ) {
34
+ filteredProducts[ interval ] = id;
35
+ }
36
+ return filteredProducts;
37
+ }, {} );
38
+ };
39
+
40
+ const hasRequiredProducts = ( productIdsPerInterval ) => {
41
+ const intervals = Object.keys( productIdsPerInterval );
42
+
43
+ return (
44
+ intervals.includes( 'one-time' ) &&
45
+ intervals.includes( '1 month' ) &&
46
+ intervals.includes( '1 year' )
47
+ );
48
+ };
49
 
50
  const mapStatusToState = ( result ) => {
51
  if ( ( ! result && typeof result !== 'object' ) || result.errors ) {
54
  setShouldUpgrade( result.should_upgrade_to_access_memberships );
55
  setUpgradeUrl( result.upgrade_url );
56
  setStripeConnectUrl( result.connect_url );
57
+ setSiteSlug( result.site_slug );
58
 
59
+ const filteredProducts = filterProducts( result.products, 'USD' );
60
+
61
+ if ( hasRequiredProducts( filteredProducts ) ) {
62
+ setProducts( filteredProducts );
63
+ } else {
64
+ fetchDefaultProducts( 'USD' ).then(
65
+ ( defaultProducts ) => setProducts( filterProducts( defaultProducts, 'USD' ) ),
66
+ apiError
67
+ );
68
+ }
69
+ }
70
 
 
 
71
  setIsLoading( false );
72
  };
73
 
74
  useEffect( () => {
75
+ const updateData = () => fetchStatus( 'donation' ).then( mapStatusToState, apiError );
76
  updateData();
77
  }, [] );
78
 
88
  return <UpgradePlan upgradeUrl={ upgradeUrl } />;
89
  }
90
 
91
+ return (
92
+ <Donations
93
+ attributes={ attributes }
94
+ products={ products }
95
+ stripeConnectUrl={ stripeConnectUrl }
96
+ setAttributes={ setAttributes }
97
+ siteSlug={ siteSlug }
98
+ />
99
+ );
100
  };
101
 
102
  export default Edit;
donations/fetch-default-products.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* eslint-disable wpcalypso/import-docblock */
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import apiFetch from '@wordpress/api-fetch';
6
+
7
+ const fetchDefaultProducts = async ( currency ) => {
8
+ try {
9
+ const result = await apiFetch( {
10
+ path: '/wpcom/v2/memberships/products',
11
+ method: 'POST',
12
+ data: {
13
+ type: 'donation',
14
+ currency,
15
+ },
16
+ } );
17
+ return result;
18
+ } catch ( error ) {
19
+ return Promise.reject( error.message );
20
+ }
21
+ };
22
+
23
+ export default fetchDefaultProducts;
donations/fetch-status.js CHANGED
@@ -4,10 +4,14 @@
4
  */
5
  import apiFetch from '@wordpress/api-fetch';
6
 
7
- const fetchStatus = async () => {
 
 
 
 
8
  try {
9
  const result = await apiFetch( {
10
- path: '/wpcom/v2/memberships/status',
11
  method: 'GET',
12
  } );
13
  return result;
4
  */
5
  import apiFetch from '@wordpress/api-fetch';
6
 
7
+ const fetchStatus = async ( type = null ) => {
8
+ let path = '/wpcom/v2/memberships/status';
9
+ if ( type ) {
10
+ path += `?type=${ type }`;
11
+ }
12
  try {
13
  const result = await apiFetch( {
14
+ path,
15
  method: 'GET',
16
  } );
17
  return result;
donations/index.js CHANGED
@@ -47,7 +47,28 @@ const addPaidBlockFlags = async () => {
47
  function registerDonationsBlock() {
48
  registerBlockType( 'a8c/donations', {
49
  title: __( 'Donations (a8c-only)', 'full-site-editing' ),
50
- description: __( 'Accept donations on your site.', 'full-site-editing' ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  category: 'common',
52
  icon: (
53
  <svg
@@ -80,13 +101,6 @@ function registerDonationsBlock() {
80
  supports: {
81
  html: false,
82
  },
83
- keywords: [
84
- 'donations',
85
- /* translators: block keyword */
86
- __( 'premium', 'full-site-editing' ),
87
- /* translators: block keyword */
88
- __( 'paywall', 'full-site-editing' ),
89
- ],
90
  edit,
91
  save() {
92
  return <div>Donations block</div>;
47
  function registerDonationsBlock() {
48
  registerBlockType( 'a8c/donations', {
49
  title: __( 'Donations (a8c-only)', 'full-site-editing' ),
50
+ description: __(
51
+ 'Collect one-time, monthly, or annually recurring donations.',
52
+ 'full-site-editing'
53
+ ),
54
+ attributes: {
55
+ oneTimePlanId: {
56
+ type: 'number',
57
+ default: null,
58
+ },
59
+ monthlyPlanId: {
60
+ type: 'number',
61
+ default: null,
62
+ },
63
+ annuallyPlanId: {
64
+ type: 'number',
65
+ default: null,
66
+ },
67
+ showCustomAmount: {
68
+ type: 'boolean',
69
+ default: false,
70
+ },
71
+ },
72
  category: 'common',
73
  icon: (
74
  <svg
101
  supports: {
102
  html: false,
103
  },
 
 
 
 
 
 
 
104
  edit,
105
  save() {
106
  return <div>Donations block</div>;
donations/style.scss CHANGED
@@ -1,39 +1,38 @@
1
- .donations__tabs {
2
- border: 1px solid #ddd;
3
- display: grid;
4
- grid-template-columns: repeat( 3, 1fr );
5
- }
6
-
7
- .donations__tabs .components-button {
8
- border-bottom: 1px solid #ddd;
9
- }
10
-
11
- .donations__tabs .components-button:first-child.active {
12
- border-right: 1px solid #ddd;
13
- }
14
-
15
- .donations__tabs .components-button:nth-child( 2 ).active {
16
- border-left: 1px solid #ddd;
17
- border-right: 1px solid #ddd;
18
- }
19
-
20
- .donations__tabs .components-button:nth-child( 3 ).active {
21
- border-left: 1px solid #ddd;
22
- }
23
-
24
- .donations__tabs .components-button.active {
25
- border-bottom: none;
26
- }
27
-
28
- .donations__tab {
29
- grid-area: 2/1/2/4;
30
- visibility: hidden;
31
- }
32
-
33
- .donations__tab.active {
34
- visibility: visible;
35
- }
36
-
37
- .donations__nudge {
38
- margin-bottom: 32px;
39
  }
1
+ .donations__container {
2
+ border: 1px solid #a7aaad;
3
+
4
+ .donations__tabs {
5
+ display: flex;
6
+ border-bottom: 1px solid #a7aaad;
7
+
8
+ .components-button {
9
+ font-weight: bold;
10
+ display: inline-block;
11
+ flex-grow: 1;
12
+ text-align: center;
13
+ font-size: 16px;
14
+ padding: 16px;
15
+ height: auto;
16
+ border-radius: 0;
17
+ border-left: 1px solid #a7aaad;
18
+
19
+ &:first-child {
20
+ border-left: none;
21
+ }
22
+
23
+ &:hover {
24
+ color: inherit;
25
+ }
26
+
27
+ &.is-active {
28
+ background-color: #2271b1;
29
+ box-shadow: none;
30
+ color: #fff;
31
+ }
32
+ }
33
+ }
34
+
35
+ .donations__content {
36
+ padding: 24px;
37
+ }
 
38
  }
editor-domain-picker/dist/editor-domain-picker.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'wp-data', 'wp-polyfill'), 'version' => '69a6c7928c3a7d594f65c41fb680d845');
1
+ <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '2c8b6999f71f1e76599e340301687ef5');
editor-domain-picker/dist/editor-domain-picker.css ADDED
@@ -0,0 +1 @@
 
1
+ @keyframes domain-picker-loading-fade{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.domain-picker__empty-state{display:flex;justify-content:center;align-items:center}.domain-picker__empty-state--text{max-width:320px;font-size:.9em;margin:0 10px;color:#555d66}.domain-picker__show-more{padding:10px;text-align:center}.domain-picker__search{position:relative;margin-bottom:20px}.domain-picker__search input[type=text].components-text-control__input{padding:6px 40px 6px 16px;height:38px;background:#f0f0f0;border:none}.domain-picker__search input[type=text].components-text-control__input:-ms-input-placeholder{color:#000;color:var(--studio-black)}.domain-picker__search input[type=text].components-text-control__input::-ms-input-placeholder{color:#000;color:var(--studio-black)}.domain-picker__search input[type=text].components-text-control__input::placeholder{color:#000;color:var(--studio-black)}.domain-picker__search input[type=text].components-text-control__input:focus{box-shadow:0 0 0 2px #5198d9;box-shadow:0 0 0 2px var(--studio-blue-30);background:#fff;background:var(--studio-white)}.domain-picker__search svg{position:absolute;top:6px;right:8px}.domain-picker__suggestion-item-group{flex-grow:1}.domain-picker__suggestion-item{font-size:14px;line-height:17px;display:flex;justify-content:space-between;align-items:center;width:100%;min-height:58px;border:1px solid #dcdcde;border:1px solid var(--studio-gray-5);padding:10px 14px;margin:0;position:relative;z-index:1;text-align:left;cursor:pointer}.domain-picker__suggestion-item.placeholder{cursor:default}.domain-picker__suggestion-item:focus:not(.placeholder),.domain-picker__suggestion-item:hover:not(.placeholder){background:#e9eff5;background:var(--studio-blue-0);border-color:#3582c4;border-color:var(--studio-blue-40);z-index:2}@media (min-width:600px){.domain-picker__suggestion-item:focus .domain-picker__suggestion-item-select-button,.domain-picker__suggestion-item:hover .domain-picker__suggestion-item-select-button{opacity:1}.domain-picker__suggestion-item:focus .domain-picker__price,.domain-picker__suggestion-item:hover .domain-picker__price{opacity:0}}.domain-picker__suggestion-item+.domain-picker__suggestion-item{margin-top:-1px}.domain-picker__suggestion-item:nth-child(7){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:0ms}.domain-picker__suggestion-item:nth-child(8){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:40ms}.domain-picker__suggestion-item:nth-child(9){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:80ms}.domain-picker__suggestion-item:nth-child(10){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:.12s}.domain-picker__suggestion-item:nth-child(11){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:.16s}.domain-picker__suggestion-item:nth-child(12){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:.2s}.domain-picker__suggestion-item:nth-child(13){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:.24s}.domain-picker__suggestion-item:nth-child(14){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:.28s}@keyframes domain-picker-item-slide-up{to{transform:translateY(0);opacity:1}}.domain-picker__suggestion-item-name{flex-grow:1;margin-right:24px;letter-spacing:.4px}.domain-picker__suggestion-item-name .domain-picker__domain-name{word-break:break-word}.domain-picker__suggestion-item-name.placeholder{animation:domain-picker-loading-fade 1.6s ease-in-out infinite;background:#f3f4f5;color:transparent;max-width:30%;margin-right:auto}.domain-picker__suggestion-item-name.placeholder:after{content:"\00a0"}.domain-picker__domain-tld{color:#3582c4;color:var(--studio-blue-40);margin-right:10px}.domain-picker__badge{display:inline-flex;border-radius:2px;padding:0 10px;line-height:20px;height:20px;align-items:center;font-size:10px;text-transform:uppercase;vertical-align:middle;background-color:#2271b1;background-color:var(--studio-blue-50);color:#fff;color:var(--color-text-inverted)}.domain-picker__price{color:#787c82;color:var(--studio-gray-40);text-align:right;flex-basis:0;transition:opacity .2s ease-in-out}.domain-picker__price:not(.is-paid){display:none}@media (min-width:600px){.domain-picker__price{flex-basis:auto}.domain-picker__price:not(.is-paid){display:inline}}.domain-picker__price.placeholder{animation:domain-picker-loading-fade 1.6s ease-in-out infinite;background:#f3f4f5;color:transparent;min-width:64px}.domain-picker__price.placeholder:after{content:"\00a0"}.domain-picker__price-long{display:none}@media (min-width:600px){.domain-picker__price-long{display:inline}}.domain-picker__price-short{display:inline}@media (min-width:600px){.domain-picker__price-short{display:none}}.domain-picker__price-cost{text-decoration:line-through}.domain-picker__suggestion-item-select-button{display:flex;align-items:center;height:36px}.domain-picker__suggestion-item-select-button span{display:none}.domain-picker__suggestion-item-select-button svg{fill:#2271b1;fill:var(--studio-blue-50);margin-left:10px;margin-right:-2px}@media (min-width:600px){.domain-picker__suggestion-item-select-button{background:#007cba;color:#fff;color:var(--studio-white);border-radius:2px;padding:0 12px;opacity:0;transition:opacity .2s ease-in-out;position:absolute;right:14px}.domain-picker__suggestion-item-select-button:hover{background:#0070a7}.domain-picker__suggestion-item-select-button span{display:inline-block}.domain-picker__suggestion-item-select-button svg{display:none}}.domain-picker__body{display:flex}@media (max-width:480px){.domain-picker__body{display:block}.domain-picker__body .domain-picker__aside{width:100%;padding:0}}.domain-picker__aside{width:220px;padding-right:30px}:root{--studio-white:#fff;--studio-black:#000;--studio-gray-0:#f6f7f7;--studio-gray-5:#dcdcde;--studio-gray-10:#c3c4c7;--studio-gray-20:#a7aaad;--studio-gray-30:#8c8f94;--studio-gray-40:#787c82;--studio-gray-50:#646970;--studio-gray-60:#50575e;--studio-gray-70:#3c434a;--studio-gray-80:#2c3338;--studio-gray-90:#1d2327;--studio-gray-100:#101517;--studio-gray:#646970;--studio-blue-0:#e9eff5;--studio-blue-5:#c5d9ed;--studio-blue-10:#9ec2e6;--studio-blue-20:#72aee6;--studio-blue-30:#5198d9;--studio-blue-40:#3582c4;--studio-blue-50:#2271b1;--studio-blue-60:#135e96;--studio-blue-70:#0a4b78;--studio-blue-80:#043959;--studio-blue-90:#01263a;--studio-blue-100:#00131c;--studio-blue:#2271b1;--studio-purple-0:#f2e9ed;--studio-purple-5:#ebcee0;--studio-purple-10:#e3afd5;--studio-purple-20:#d48fc8;--studio-purple-30:#c475bd;--studio-purple-40:#b35eb1;--studio-purple-50:#984a9c;--studio-purple-60:#7c3982;--studio-purple-70:#662c6e;--studio-purple-80:#4d2054;--studio-purple-90:#35163b;--studio-purple-100:#1e0c21;--studio-purple:#984a9c;--studio-pink-0:#f5e9ed;--studio-pink-5:#f2ceda;--studio-pink-10:#f7a8c3;--studio-pink-20:#f283aa;--studio-pink-30:#eb6594;--studio-pink-40:#e34c84;--studio-pink-50:#c9356e;--studio-pink-60:#ab235a;--studio-pink-70:#8c1749;--studio-pink-80:#700f3b;--studio-pink-90:#4f092a;--studio-pink-100:#260415;--studio-pink:#c9356e;--studio-red-0:#f7ebec;--studio-red-5:#facfd2;--studio-red-10:#ffabaf;--studio-red-20:#ff8085;--studio-red-30:#f86368;--studio-red-40:#e65054;--studio-red-50:#d63638;--studio-red-60:#b32d2e;--studio-red-70:#8a2424;--studio-red-80:#691c1c;--studio-red-90:#451313;--studio-red-100:#240a0a;--studio-red:#d63638;--studio-orange-0:#f5ece6;--studio-orange-5:#f7dcc6;--studio-orange-10:#ffbf86;--studio-orange-20:#faa754;--studio-orange-30:#e68b28;--studio-orange-40:#d67709;--studio-orange-50:#b26200;--studio-orange-60:#8a4d00;--studio-orange-70:#704000;--studio-orange-80:#543100;--studio-orange-90:#361f00;--studio-orange-100:#1f1200;--studio-orange:#b26200;--studio-yellow-0:#f5f1e1;--studio-yellow-5:#f5e6b3;--studio-yellow-10:#f2d76b;--studio-yellow-20:#f0c930;--studio-yellow-30:#deb100;--studio-yellow-40:#c08c00;--studio-yellow-50:#9d6e00;--studio-yellow-60:#7d5600;--studio-yellow-70:#674600;--studio-yellow-80:#4f3500;--studio-yellow-90:#320;--studio-yellow-100:#1c1300;--studio-yellow:#9d6e00;--studio-green-0:#e6f2e8;--studio-green-5:#b8e6bf;--studio-green-10:#68de86;--studio-green-20:#1ed15a;--studio-green-30:#00ba37;--studio-green-40:#00a32a;--studio-green-50:#008a20;--studio-green-60:#007017;--studio-green-70:#005c12;--studio-green-80:#00450c;--studio-green-90:#003008;--studio-green-100:#001c05;--studio-green:#008a20;--studio-celadon-0:#e4f2ed;--studio-celadon-5:#a7e8d4;--studio-celadon-10:#63d6b6;--studio-celadon-20:#2ebd99;--studio-celadon-30:#09a884;--studio-celadon-40:#009172;--studio-celadon-50:#007e65;--studio-celadon-60:#006753;--studio-celadon-70:#005042;--studio-celadon-80:#003b30;--studio-celadon-90:#002721;--studio-celadon-100:#001c17;--studio-celadon:#007e65;--studio-wordpress-blue-0:#e6f1f5;--studio-wordpress-blue-5:#bedae6;--studio-wordpress-blue-10:#98c6d9;--studio-wordpress-blue-20:#6ab3d0;--studio-wordpress-blue-30:#3895ba;--studio-wordpress-blue-40:#187aa2;--studio-wordpress-blue-50:#006088;--studio-wordpress-blue-60:#004e6e;--studio-wordpress-blue-70:#003c56;--studio-wordpress-blue-80:#002c40;--studio-wordpress-blue-90:#001d2d;--studio-wordpress-blue-100:#00101c;--studio-wordpress-blue:#006088;--studio-simplenote-blue-0:#e9ecf5;--studio-simplenote-blue-5:#ced9f2;--studio-simplenote-blue-10:#abc1f5;--studio-simplenote-blue-20:#84a4f0;--studio-simplenote-blue-30:#618df2;--studio-simplenote-blue-40:#4678eb;--studio-simplenote-blue-50:#3361cc;--studio-simplenote-blue-60:#1d4fc4;--studio-simplenote-blue-70:#113ead;--studio-simplenote-blue-80:#0d2f85;--studio-simplenote-blue-90:#09205c;--studio-simplenote-blue-100:#05102e;--studio-simplenote-blue:#3361cc;--studio-woocommerce-purple-0:#f7edf7;--studio-woocommerce-purple-5:#e5cfe8;--studio-woocommerce-purple-10:#d6b4e0;--studio-woocommerce-purple-20:#c792e0;--studio-woocommerce-purple-30:#af7dd1;--studio-woocommerce-purple-40:#9a69c7;--studio-woocommerce-purple-50:#7f54b3;--studio-woocommerce-purple-60:#674399;--studio-woocommerce-purple-70:#533582;--studio-woocommerce-purple-80:#3c2861;--studio-woocommerce-purple-90:#271b3d;--studio-woocommerce-purple-100:#140e1f;--studio-woocommerce-purple:#7f54b3;--studio-jetpack-green-0:#f0f2eb;--studio-jetpack-green-5:#d0e6b8;--studio-jetpack-green-10:#9dd977;--studio-jetpack-green-20:#64ca43;--studio-jetpack-green-30:#2fb41f;--studio-jetpack-green-40:#069e08;--studio-jetpack-green-50:#008710;--studio-jetpack-green-60:#007117;--studio-jetpack-green-70:#005b18;--studio-jetpack-green-80:#004515;--studio-jetpack-green-90:#003010;--studio-jetpack-green-100:#001c09;--studio-jetpack-green:#2fb41f}:root{--studio-white-rgb:255,255,255;--studio-black-rgb:0,0,0;--studio-gray-0-rgb:246,247,247;--studio-gray-5-rgb:220,220,222;--studio-gray-10-rgb:195,196,199;--studio-gray-20-rgb:167,170,173;--studio-gray-30-rgb:140,143,148;--studio-gray-40-rgb:120,124,130;--studio-gray-50-rgb:100,105,112;--studio-gray-60-rgb:80,87,94;--studio-gray-70-rgb:60,67,74;--studio-gray-80-rgb:44,51,56;--studio-gray-90-rgb:29,35,39;--studio-gray-100-rgb:16,21,23;--studio-gray-rgb:100,105,112;--studio-blue-0-rgb:233,239,245;--studio-blue-5-rgb:197,217,237;--studio-blue-10-rgb:158,194,230;--studio-blue-20-rgb:114,174,230;--studio-blue-30-rgb:81,152,217;--studio-blue-40-rgb:53,130,196;--studio-blue-50-rgb:34,113,177;--studio-blue-60-rgb:19,94,150;--studio-blue-70-rgb:10,75,120;--studio-blue-80-rgb:4,57,89;--studio-blue-90-rgb:1,38,58;--studio-blue-100-rgb:0,19,28;--studio-blue-rgb:34,113,177;--studio-purple-0-rgb:242,233,237;--studio-purple-5-rgb:235,206,224;--studio-purple-10-rgb:227,175,213;--studio-purple-20-rgb:212,143,200;--studio-purple-30-rgb:196,117,189;--studio-purple-40-rgb:179,94,177;--studio-purple-50-rgb:152,74,156;--studio-purple-60-rgb:124,57,130;--studio-purple-70-rgb:102,44,110;--studio-purple-80-rgb:77,32,84;--studio-purple-90-rgb:53,22,59;--studio-purple-100-rgb:30,12,33;--studio-purple-rgb:152,74,156;--studio-pink-0-rgb:245,233,237;--studio-pink-5-rgb:242,206,218;--studio-pink-10-rgb:247,168,195;--studio-pink-20-rgb:242,131,170;--studio-pink-30-rgb:235,101,148;--studio-pink-40-rgb:227,76,132;--studio-pink-50-rgb:201,53,110;--studio-pink-60-rgb:171,35,90;--studio-pink-70-rgb:140,23,73;--studio-pink-80-rgb:112,15,59;--studio-pink-90-rgb:79,9,42;--studio-pink-100-rgb:38,4,21;--studio-pink-rgb:201,53,110;--studio-red-0-rgb:247,235,236;--studio-red-5-rgb:250,207,210;--studio-red-10-rgb:255,171,175;--studio-red-20-rgb:255,128,133;--studio-red-30-rgb:248,99,104;--studio-red-40-rgb:230,80,84;--studio-red-50-rgb:214,54,56;--studio-red-60-rgb:179,45,46;--studio-red-70-rgb:138,36,36;--studio-red-80-rgb:105,28,28;--studio-red-90-rgb:69,19,19;--studio-red-100-rgb:36,10,10;--studio-red-rgb:214,54,56;--studio-orange-0-rgb:245,236,230;--studio-orange-5-rgb:247,220,198;--studio-orange-10-rgb:255,191,134;--studio-orange-20-rgb:250,167,84;--studio-orange-30-rgb:230,139,40;--studio-orange-40-rgb:214,119,9;--studio-orange-50-rgb:178,98,0;--studio-orange-60-rgb:138,77,0;--studio-orange-70-rgb:112,64,0;--studio-orange-80-rgb:84,49,0;--studio-orange-90-rgb:54,31,0;--studio-orange-100-rgb:31,18,0;--studio-orange-rgb:178,98,0;--studio-yellow-0-rgb:245,241,225;--studio-yellow-5-rgb:245,230,179;--studio-yellow-10-rgb:242,215,107;--studio-yellow-20-rgb:240,201,48;--studio-yellow-30-rgb:222,177,0;--studio-yellow-40-rgb:192,140,0;--studio-yellow-50-rgb:157,110,0;--studio-yellow-60-rgb:125,86,0;--studio-yellow-70-rgb:103,70,0;--studio-yellow-80-rgb:79,53,0;--studio-yellow-90-rgb:51,34,0;--studio-yellow-100-rgb:28,19,0;--studio-yellow-rgb:157,110,0;--studio-green-0-rgb:230,242,232;--studio-green-5-rgb:184,230,191;--studio-green-10-rgb:104,222,134;--studio-green-20-rgb:30,209,90;--studio-green-30-rgb:0,186,55;--studio-green-40-rgb:0,163,42;--studio-green-50-rgb:0,138,32;--studio-green-60-rgb:0,112,23;--studio-green-70-rgb:0,92,18;--studio-green-80-rgb:0,69,12;--studio-green-90-rgb:0,48,8;--studio-green-100-rgb:0,28,5;--studio-green-rgb:0,138,32;--studio-celadon-0-rgb:228,242,237;--studio-celadon-5-rgb:167,232,212;--studio-celadon-10-rgb:99,214,182;--studio-celadon-20-rgb:46,189,153;--studio-celadon-30-rgb:9,168,132;--studio-celadon-40-rgb:0,145,114;--studio-celadon-50-rgb:0,126,101;--studio-celadon-60-rgb:0,103,83;--studio-celadon-70-rgb:0,80,66;--studio-celadon-80-rgb:0,59,48;--studio-celadon-90-rgb:0,39,33;--studio-celadon-100-rgb:0,28,23;--studio-celadon-rgb:0,126,101;--studio-wordpress-blue-0-rgb:230,241,245;--studio-wordpress-blue-5-rgb:190,218,230;--studio-wordpress-blue-10-rgb:152,198,217;--studio-wordpress-blue-20-rgb:106,179,208;--studio-wordpress-blue-30-rgb:56,149,186;--studio-wordpress-blue-40-rgb:24,122,162;--studio-wordpress-blue-50-rgb:0,96,136;--studio-wordpress-blue-60-rgb:0,78,110;--studio-wordpress-blue-70-rgb:0,60,86;--studio-wordpress-blue-80-rgb:0,44,64;--studio-wordpress-blue-90-rgb:0,29,45;--studio-wordpress-blue-100-rgb:0,16,28;--studio-wordpress-blue-rgb:0,96,136;--studio-simplenote-blue-0-rgb:233,236,245;--studio-simplenote-blue-5-rgb:206,217,242;--studio-simplenote-blue-10-rgb:171,193,245;--studio-simplenote-blue-20-rgb:132,164,240;--studio-simplenote-blue-30-rgb:97,141,242;--studio-simplenote-blue-40-rgb:70,120,235;--studio-simplenote-blue-50-rgb:51,97,204;--studio-simplenote-blue-60-rgb:29,79,196;--studio-simplenote-blue-70-rgb:17,62,173;--studio-simplenote-blue-80-rgb:13,47,133;--studio-simplenote-blue-90-rgb:9,32,92;--studio-simplenote-blue-100-rgb:5,16,46;--studio-simplenote-blue-rgb:51,97,204;--studio-woocommerce-purple-0-rgb:247,237,247;--studio-woocommerce-purple-5-rgb:229,207,232;--studio-woocommerce-purple-10-rgb:214,180,224;--studio-woocommerce-purple-20-rgb:199,146,224;--studio-woocommerce-purple-30-rgb:175,125,209;--studio-woocommerce-purple-40-rgb:154,105,199;--studio-woocommerce-purple-50-rgb:127,84,179;--studio-woocommerce-purple-60-rgb:103,67,153;--studio-woocommerce-purple-70-rgb:83,53,130;--studio-woocommerce-purple-80-rgb:60,40,97;--studio-woocommerce-purple-90-rgb:39,27,61;--studio-woocommerce-purple-100-rgb:20,14,31;--studio-woocommerce-purple-rgb:127,84,179;--studio-jetpack-green-0-rgb:240,242,235;--studio-jetpack-green-5-rgb:208,230,184;--studio-jetpack-green-10-rgb:157,217,119;--studio-jetpack-green-20-rgb:100,202,67;--studio-jetpack-green-30-rgb:47,180,31;--studio-jetpack-green-40-rgb:6,158,8;--studio-jetpack-green-50-rgb:0,135,16;--studio-jetpack-green-60-rgb:0,113,23;--studio-jetpack-green-70-rgb:0,91,24;--studio-jetpack-green-80-rgb:0,69,21;--studio-jetpack-green-90-rgb:0,48,16;--studio-jetpack-green-100-rgb:0,28,9;--studio-jetpack-green-rgb:47,180,31}:root{--color-primary:var(--studio-blue-50);--color-primary-rgb:var(--studio-blue-50-rgb);--color-primary-dark:var(--studio-blue-70);--color-primary-dark-rgb:var(--studio-blue-70-rgb);--color-primary-light:var(--studio-blue-30);--color-primary-light-rgb:var(--studio-blue-30-rgb);--color-primary-0:var(--studio-blue-0);--color-primary-0-rgb:var(--studio-blue-0-rgb);--color-primary-5:var(--studio-blue-5);--color-primary-5-rgb:var(--studio-blue-5-rgb);--color-primary-10:var(--studio-blue-10);--color-primary-10-rgb:var(--studio-blue-10-rgb);--color-primary-20:var(--studio-blue-20);--color-primary-20-rgb:var(--studio-blue-20-rgb);--color-primary-30:var(--studio-blue-30);--color-primary-30-rgb:var(--studio-blue-30-rgb);--color-primary-40:var(--studio-blue-40);--color-primary-40-rgb:var(--studio-blue-40-rgb);--color-primary-50:var(--studio-blue-50);--color-primary-50-rgb:var(--studio-blue-50-rgb);--color-primary-60:var(--studio-blue-60);--color-primary-60-rgb:var(--studio-blue-60-rgb);--color-primary-70:var(--studio-blue-70);--color-primary-70-rgb:var(--studio-blue-70-rgb);--color-primary-80:var(--studio-blue-80);--color-primary-80-rgb:var(--studio-blue-80-rgb);--color-primary-90:var(--studio-blue-90);--color-primary-90-rgb:var(--studio-blue-90-rgb);--color-primary-100:var(--studio-blue-100);--color-primary-100-rgb:var(--studio-blue-100-rgb);--color-accent:var(--studio-pink-50);--color-accent-rgb:var(--studio-pink-50-rgb);--color-accent-dark:var(--studio-pink-70);--color-accent-dark-rgb:var(--studio-pink-70-rgb);--color-accent-light:var(--studio-pink-30);--color-accent-light-rgb:var(--studio-pink-30-rgb);--color-accent-0:var(--studio-pink-0);--color-accent-0-rgb:var(--studio-pink-0-rgb);--color-accent-5:var(--studio-pink-5);--color-accent-5-rgb:var(--studio-pink-5-rgb);--color-accent-10:var(--studio-pink-10);--color-accent-10-rgb:var(--studio-pink-10-rgb);--color-accent-20:var(--studio-pink-20);--color-accent-20-rgb:var(--studio-pink-20-rgb);--color-accent-30:var(--studio-pink-30);--color-accent-30-rgb:var(--studio-pink-30-rgb);--color-accent-40:var(--studio-pink-40);--color-accent-40-rgb:var(--studio-pink-40-rgb);--color-accent-50:var(--studio-pink-50);--color-accent-50-rgb:var(--studio-pink-50-rgb);--color-accent-60:var(--studio-pink-60);--color-accent-60-rgb:var(--studio-pink-60-rgb);--color-accent-70:var(--studio-pink-70);--color-accent-70-rgb:var(--studio-pink-70-rgb);--color-accent-80:var(--studio-pink-80);--color-accent-80-rgb:var(--studio-pink-80-rgb);--color-accent-90:var(--studio-pink-90);--color-accent-90-rgb:var(--studio-pink-90-rgb);--color-accent-100:var(--studio-pink-100);--color-accent-100-rgb:var(--studio-pink-100-rgb);--color-neutral:var(--studio-gray-50);--color-neutral-rgb:var(--studio-gray-50-rgb);--color-neutral-dark:var(--studio-gray-70);--color-neutral-dark-rgb:var(--studio-gray-70-rgb);--color-neutral-light:var(--studio-gray-30);--color-neutral-light-rgb:var(--studio-gray-30-rgb);--color-neutral-0:var(--studio-gray-0);--color-neutral-0-rgb:var(--studio-gray-0-rgb);--color-neutral-5:var(--studio-gray-5);--color-neutral-5-rgb:var(--studio-gray-5-rgb);--color-neutral-10:var(--studio-gray-10);--color-neutral-10-rgb:var(--studio-gray-10-rgb);--color-neutral-20:var(--studio-gray-20);--color-neutral-20-rgb:var(--studio-gray-20-rgb);--color-neutral-30:var(--studio-gray-30);--color-neutral-30-rgb:var(--studio-gray-30-rgb);--color-neutral-40:var(--studio-gray-40);--color-neutral-40-rgb:var(--studio-gray-40-rgb);--color-neutral-50:var(--studio-gray-50);--color-neutral-50-rgb:var(--studio-gray-50-rgb);--color-neutral-60:var(--studio-gray-60);--color-neutral-60-rgb:var(--studio-gray-60-rgb);--color-neutral-70:var(--studio-gray-70);--color-neutral-70-rgb:var(--studio-gray-70-rgb);--color-neutral-80:var(--studio-gray-80);--color-neutral-80-rgb:var(--studio-gray-80-rgb);--color-neutral-90:var(--studio-gray-90);--color-neutral-90-rgb:var(--studio-gray-90-rgb);--color-neutral-100:var(--studio-gray-100);--color-neutral-100-rgb:var(--studio-gray-100-rgb);--color-success:var(--studio-green-50);--color-success-rgb:var(--studio-green-50-rgb);--color-success-dark:var(--studio-green-70);--color-success-dark-rgb:var(--studio-green-70-rgb);--color-success-light:var(--studio-green-30);--color-success-light-rgb:var(--studio-green-30-rgb);--color-success-0:var(--studio-green-0);--color-success-0-rgb:var(--studio-green-0-rgb);--color-success-5:var(--studio-green-5);--color-success-5-rgb:var(--studio-green-5-rgb);--color-success-10:var(--studio-green-10);--color-success-10-rgb:var(--studio-green-10-rgb);--color-success-20:var(--studio-green-20);--color-success-20-rgb:var(--studio-green-20-rgb);--color-success-30:var(--studio-green-30);--color-success-30-rgb:var(--studio-green-30-rgb);--color-success-40:var(--studio-green-40);--color-success-40-rgb:var(--studio-green-40-rgb);--color-success-50:var(--studio-green-50);--color-success-50-rgb:var(--studio-green-50-rgb);--color-success-60:var(--studio-green-60);--color-success-60-rgb:var(--studio-green-60-rgb);--color-success-70:var(--studio-green-70);--color-success-70-rgb:var(--studio-green-70-rgb);--color-success-80:var(--studio-green-80);--color-success-80-rgb:var(--studio-green-80-rgb);--color-success-90:var(--studio-green-90);--color-success-90-rgb:var(--studio-green-90-rgb);--color-success-100:var(--studio-green-100);--color-success-100-rgb:var(--studio-green-100-rgb);--color-warning:var(--studio-yellow-50);--color-warning-rgb:var(--studio-yellow-50-rgb);--color-warning-dark:var(--studio-yellow-70);--color-warning-dark-rgb:var(--studio-yellow-70-rgb);--color-warning-light:var(--studio-yellow-30);--color-warning-light-rgb:var(--studio-yellow-30-rgb);--color-warning-0:var(--studio-yellow-0);--color-warning-0-rgb:var(--studio-yellow-0-rgb);--color-warning-5:var(--studio-yellow-5);--color-warning-5-rgb:var(--studio-yellow-5-rgb);--color-warning-10:var(--studio-yellow-10);--color-warning-10-rgb:var(--studio-yellow-10-rgb);--color-warning-20:var(--studio-yellow-20);--color-warning-20-rgb:var(--studio-yellow-20-rgb);--color-warning-30:var(--studio-yellow-30);--color-warning-30-rgb:var(--studio-yellow-30-rgb);--color-warning-40:var(--studio-yellow-40);--color-warning-40-rgb:var(--studio-yellow-40-rgb);--color-warning-50:var(--studio-yellow-50);--color-warning-50-rgb:var(--studio-yellow-50-rgb);--color-warning-60:var(--studio-yellow-60);--color-warning-60-rgb:var(--studio-yellow-60-rgb);--color-warning-70:var(--studio-yellow-70);--color-warning-70-rgb:var(--studio-yellow-70-rgb);--color-warning-80:var(--studio-yellow-80);--color-warning-80-rgb:var(--studio-yellow-80-rgb);--color-warning-90:var(--studio-yellow-90);--color-warning-90-rgb:var(--studio-yellow-90-rgb);--color-warning-100:var(--studio-yellow-100);--color-warning-100-rgb:var(--studio-yellow-100-rgb);--color-error:var(--studio-red-50);--color-error-rgb:var(--studio-red-50-rgb);--color-error-dark:var(--studio-red-70);--color-error-dark-rgb:var(--studio-red-70-rgb);--color-error-light:var(--studio-red-30);--color-error-light-rgb:var(--studio-red-30-rgb);--color-error-0:var(--studio-red-0);--color-error-0-rgb:var(--studio-red-0-rgb);--color-error-5:var(--studio-red-5);--color-error-5-rgb:var(--studio-red-5-rgb);--color-error-10:var(--studio-red-10);--color-error-10-rgb:var(--studio-red-10-rgb);--color-error-20:var(--studio-red-20);--color-error-20-rgb:var(--studio-red-20-rgb);--color-error-30:var(--studio-red-30);--color-error-30-rgb:var(--studio-red-30-rgb);--color-error-40:var(--studio-red-40);--color-error-40-rgb:var(--studio-red-40-rgb);--color-error-50:var(--studio-red-50);--color-error-50-rgb:var(--studio-red-50-rgb);--color-error-60:var(--studio-red-60);--color-error-60-rgb:var(--studio-red-60-rgb);--color-error-70:var(--studio-red-70);--color-error-70-rgb:var(--studio-red-70-rgb);--color-error-80:var(--studio-red-80);--color-error-80-rgb:var(--studio-red-80-rgb);--color-error-90:var(--studio-red-90);--color-error-90-rgb:var(--studio-red-90-rgb);--color-error-100:var(--studio-red-100);--color-error-100-rgb:var(--studio-red-100-rgb);--color-surface:var(--studio-white);--color-surface-rgb:var(--studio-white-rgb);--color-surface-backdrop:var(--studio-gray-0);--color-surface-backdrop-rgb:var(--studio-gray-0-rgb);--color-text:var(--studio-gray-80);--color-text-rgb:var(--studio-gray-80-rgb);--color-text-subtle:var(--studio-gray-50);--color-text-subtle-rgb:var(--studio-gray-50-rgb);--color-text-inverted:var(--studio-white);--color-text-inverted-rgb:var(--studio-white-rgb);--color-border:var(--color-neutral-20);--color-border-rgb:var(--color-neutral-20-rgb);--color-border-subtle:var(--color-neutral-5);--color-border-subtle-rgb:var(--color-neutral-5-rgb);--color-border-shadow:var(--color-neutral-0);--color-border-shadow-rgb:var(--color-neutral-0-rgb);--color-border-inverted:var(--studio-white);--color-border-inverted-rgb:var(--studio-white-rgb);--color-link:var(--studio-blue-50);--color-link-rgb:var(--studio-blue-50-rgb);--color-link-dark:var(--studio-blue-70);--color-link-dark-rgb:var(--studio-blue-70-rgb);--color-link-light:var(--studio-blue-30);--color-link-light-rgb:var(--studio-blue-30-rgb);--color-link-0:var(--studio-blue-0);--color-link-0-rgb:var(--studio-blue-0-rgb);--color-link-5:var(--studio-blue-5);--color-link-5-rgb:var(--studio-blue-5-rgb);--color-link-10:var(--studio-blue-10);--color-link-10-rgb:var(--studio-blue-10-rgb);--color-link-20:var(--studio-blue-20);--color-link-20-rgb:var(--studio-blue-20-rgb);--color-link-30:var(--studio-blue-30);--color-link-30-rgb:var(--studio-blue-30-rgb);--color-link-40:var(--studio-blue-40);--color-link-40-rgb:var(--studio-blue-40-rgb);--color-link-50:var(--studio-blue-50);--color-link-50-rgb:var(--studio-blue-50-rgb);--color-link-60:var(--studio-blue-60);--color-link-60-rgb:var(--studio-blue-60-rgb);--color-link-70:var(--studio-blue-70);--color-link-70-rgb:var(--studio-blue-70-rgb);--color-link-80:var(--studio-blue-80);--color-link-80-rgb:var(--studio-blue-80-rgb);--color-link-90:var(--studio-blue-90);--color-link-90-rgb:var(--studio-blue-90-rgb);--color-link-100:var(--studio-blue-100);--color-link-100-rgb:var(--studio-blue-100-rgb);--color-plan-free:var(--studio-gray-30);--color-plan-blogger:var(--studio-celadon-30);--color-plan-personal:var(--studio-blue-30);--color-plan-premium:var(--studio-yellow-30);--color-plan-business:var(--studio-orange-30);--color-plan-ecommerce:var(--studio-purple-30);--color-jetpack-plan-free:var(--studio-blue-30);--color-jetpack-plan-personal:var(--studio-yellow-30);--color-jetpack-plan-premium:var(--studio-jetpack-green-30);--color-jetpack-plan-professional:var(--studio-purple-30);--color-masterbar-background:var(--studio-blue-60);--color-masterbar-border:var(--studio-blue-70);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-blue-70);--color-masterbar-item-active-background:var(--studio-blue-90);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-40);--color-masterbar-unread-dot-background:var(--color-accent-20);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--color-surface);--color-sidebar-background-rgb:var(--studio-white-rgb);--color-sidebar-border:var(--studio-gray-5);--color-sidebar-text:var(--studio-gray-80);--color-sidebar-text-rgb:var(--studio-gray-80-rgb);--color-sidebar-text-alternative:var(--studio-gray-50);--color-sidebar-gridicon-fill:var(--studio-gray-50);--color-sidebar-menu-selected-background:var(--studio-blue-5);--color-sidebar-menu-selected-background-rgb:var(--studio-blue-5-rgb);--color-sidebar-menu-selected-text:var(--studio-blue-70);--color-sidebar-menu-selected-text-rgb:var(--studio-blue-70-rgb);--color-sidebar-menu-hover-background:var(--studio-gray-5);--color-sidebar-menu-hover-background-rgb:var(--studio-gray-5-rgb);--color-sidebar-menu-hover-text:var(--studio-gray-90);--color-jetpack-onboarding-text:var(--studio-white);--color-jetpack-onboarding-text-rgb:var(--studio-white-rgb);--color-jetpack-onboarding-background:var(--studio-blue-100);--color-jetpack-onboarding-background-rgb:var(--studio-blue-100-rgb);--color-automattic:var(--studio-blue-40);--color-jetpack:var(--studio-jetpack-green);--color-simplenote:var(--studio-simplenote-blue);--color-woocommerce:var(--studio-woocommerce-purple);--color-wordpress-com:var(--studio-wordpress-blue);--color-wordpress-org:#585c60;--color-blogger:#ff5722;--color-eventbrite:#ff8000;--color-facebook:#39579a;--color-godaddy:#5ea95a;--color-google-plus:#df4a32;--color-instagram:#d93174;--color-linkedin:#0976b4;--color-medium:#12100e;--color-pinterest:#cc2127;--color-pocket:#ee4256;--color-print:#f8f8f8;--color-reddit:#5f99cf;--color-skype:#00aff0;--color-stumbleupon:#eb4924;--color-squarespace:#222;--color-telegram:#08c;--color-tumblr:#35465c;--color-twitter:#55acee;--color-whatsapp:#43d854;--color-wix:#faad4d;--color-email:var(--studio-gray-0);--color-podcasting:#9b4dd5;--color-wp-admin-button-background:#008ec2;--color-wp-admin-button-border:#006799}.color-scheme.is-classic-blue{--color-accent:var(--studio-orange-50);--color-accent-rgb:var(--studio-orange-50-rgb);--color-accent-dark:var(--studio-orange-70);--color-accent-dark-rgb:var(--studio-orange-70-rgb);--color-accent-light:var(--studio-orange-30);--color-accent-light-rgb:var(--studio-orange-30-rgb);--color-accent-0:var(--studio-orange-0);--color-accent-0-rgb:var(--studio-orange-0-rgb);--color-accent-5:var(--studio-orange-5);--color-accent-5-rgb:var(--studio-orange-5-rgb);--color-accent-10:var(--studio-orange-10);--color-accent-10-rgb:var(--studio-orange-10-rgb);--color-accent-20:var(--studio-orange-20);--color-accent-20-rgb:var(--studio-orange-20-rgb);--color-accent-30:var(--studio-orange-30);--color-accent-30-rgb:var(--studio-orange-30-rgb);--color-accent-40:var(--studio-orange-40);--color-accent-40-rgb:var(--studio-orange-40-rgb);--color-accent-50:var(--studio-orange-50);--color-accent-50-rgb:var(--studio-orange-50-rgb);--color-accent-60:var(--studio-orange-60);--color-accent-60-rgb:var(--studio-orange-60-rgb);--color-accent-70:var(--studio-orange-70);--color-accent-70-rgb:var(--studio-orange-70-rgb);--color-accent-80:var(--studio-orange-80);--color-accent-80-rgb:var(--studio-orange-80-rgb);--color-accent-90:var(--studio-orange-90);--color-accent-90-rgb:var(--studio-orange-90-rgb);--color-accent-100:var(--studio-orange-100);--color-accent-100-rgb:var(--studio-orange-100-rgb);--color-masterbar-unread-dot-background:var(--color-accent-30);--color-sidebar-background:var(--studio-gray-5);--color-sidebar-background-rgb:var(--studio-gray-5-rgb);--color-sidebar-text-alternative:var(--studio-gray-50);--color-sidebar-border:var(--studio-gray-10);--color-sidebar-menu-selected-background:var(--studio-gray-60);--color-sidebar-menu-selected-background-rgb:var(--studio-gray-60-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--color-surface);--color-sidebar-menu-hover-background-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-text:var(--studio-blue-50)}.color-scheme.is-contrast{--color-primary:var(--studio-gray-80);--color-primary-rgb:var(--studio-gray-80-rgb);--color-primary-dark:var(--studio-gray-100);--color-primary-dark-rgb:var(--studio-gray-100-rgb);--color-primary-light:var(--studio-gray-60);--color-primary-light-rgb:var(--studio-gray-60-rgb);--color-primary-0:var(--studio-gray-0);--color-primary-0-rgb:var(--studio-gray-0-rgb);--color-primary-5:var(--studio-gray-5);--color-primary-5-rgb:var(--studio-gray-5-rgb);--color-primary-10:var(--studio-gray-10);--color-primary-10-rgb:var(--studio-gray-10-rgb);--color-primary-20:var(--studio-gray-20);--color-primary-20-rgb:var(--studio-gray-20-rgb);--color-primary-30:var(--studio-gray-30);--color-primary-30-rgb:var(--studio-gray-30-rgb);--color-primary-40:var(--studio-gray-40);--color-primary-40-rgb:var(--studio-gray-40-rgb);--color-primary-50:var(--studio-gray-50);--color-primary-50-rgb:var(--studio-gray-50-rgb);--color-primary-60:var(--studio-gray-60);--color-primary-60-rgb:var(--studio-gray-60-rgb);--color-primary-70:var(--studio-gray-70);--color-primary-70-rgb:var(--studio-gray-70-rgb);--color-primary-80:var(--studio-gray-80);--color-primary-80-rgb:var(--studio-gray-80-rgb);--color-primary-90:var(--studio-gray-90);--color-primary-90-rgb:var(--studio-gray-90-rgb);--color-primary-100:var(--studio-gray-100);--color-primary-100-rgb:var(--studio-gray-100-rgb);--color-accent:var(--studio-blue-70);--color-accent-rgb:var(--studio-blue-70-rgb);--color-accent-dark:var(--studio-blue-90);--color-accent-dark-rgb:var(--studio-blue-90-rgb);--color-accent-light:var(--studio-blue-50);--color-accent-light-rgb:var(--studio-blue-50-rgb);--color-accent-0:var(--studio-blue-0);--color-accent-0-rgb:var(--studio-blue-0-rgb);--color-accent-5:var(--studio-blue-5);--color-accent-5-rgb:var(--studio-blue-5-rgb);--color-accent-10:var(--studio-blue-10);--color-accent-10-rgb:var(--studio-blue-10-rgb);--color-accent-20:var(--studio-blue-20);--color-accent-20-rgb:var(--studio-blue-20-rgb);--color-accent-30:var(--studio-blue-30);--color-accent-30-rgb:var(--studio-blue-30-rgb);--color-accent-40:var(--studio-blue-40);--color-accent-40-rgb:var(--studio-blue-40-rgb);--color-accent-50:var(--studio-blue-50);--color-accent-50-rgb:var(--studio-blue-50-rgb);--color-accent-60:var(--studio-blue-60);--color-accent-60-rgb:var(--studio-blue-60-rgb);--color-accent-70:var(--studio-blue-70);--color-accent-70-rgb:var(--studio-blue-70-rgb);--color-accent-80:var(--studio-blue-80);--color-accent-80-rgb:var(--studio-blue-80-rgb);--color-accent-90:var(--studio-blue-90);--color-accent-90-rgb:var(--studio-blue-90-rgb);--color-accent-100:var(--studio-blue-100);--color-accent-100-rgb:var(--studio-blue-100-rgb);--color-surface-backdrop:var(--studio-white);--color-surface-backdrop-rgb:var(--studio-white-rgb);--color-text:var(--studio-gray-100);--color-text-rgb:var(--studio-gray-100-rgb);--color-text-subtle:var(--studio-gray-70);--color-text-subtle-rgb:var(--studio-gray-70-rgb);--color-link:var(--studio-blue-70);--color-link-rgb:var(--studio-blue-70-rgb);--color-link-dark:var(--studio-blue-100);--color-link-dark-rgb:var(--studio-blue-100-rgb);--color-link-light:var(--studio-blue-50);--color-link-light-rgb:var(--studio-blue-50-rgb);--color-link-0:var(--studio-blue-0);--color-link-0-rgb:var(--studio-blue-0-rgb);--color-link-5:var(--studio-blue-5);--color-link-5-rgb:var(--studio-blue-5-rgb);--color-link-10:var(--studio-blue-10);--color-link-10-rgb:var(--studio-blue-10-rgb);--color-link-20:var(--studio-blue-20);--color-link-20-rgb:var(--studio-blue-20-rgb);--color-link-30:var(--studio-blue-30);--color-link-30-rgb:var(--studio-blue-30-rgb);--color-link-40:var(--studio-blue-40);--color-link-40-rgb:var(--studio-blue-40-rgb);--color-link-50:var(--studio-blue-50);--color-link-50-rgb:var(--studio-blue-50-rgb);--color-link-60:var(--studio-blue-60);--color-link-60-rgb:var(--studio-blue-60-rgb);--color-link-70:var(--studio-blue-70);--color-link-70-rgb:var(--studio-blue-70-rgb);--color-link-80:var(--studio-blue-80);--color-link-80-rgb:var(--studio-blue-80-rgb);--color-link-90:var(--studio-blue-90);--color-link-90-rgb:var(--studio-blue-90-rgb);--color-link-100:var(--studio-blue-100);--color-link-100-rgb:var(--studio-blue-100-rgb);--color-masterbar-background:var(--studio-gray-100);--color-masterbar-border:var(--studio-gray-90);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-gray-80);--color-masterbar-item-active-background:var(--studio-gray-60);--color-masterbar-item-new-editor-background:var(--studio-gray-70);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-90);--color-masterbar-unread-dot-background:var(--studio-yellow-20);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-70);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-70);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--color-surface);--color-sidebar-background-rgb:var(--studio-white-rgb);--color-sidebar-border:var(--studio-gray-5);--color-sidebar-text:var(--studio-gray-90);--color-sidebar-text-rgb:var(--studio-gray-90-rgb);--color-sidebar-text-alternative:var(--studio-gray-90);--color-sidebar-gridicon-fill:var(--studio-gray-90);--color-sidebar-menu-selected-background:var(--studio-gray-100);--color-sidebar-menu-selected-background-rgb:var(--studio-gray-100-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--studio-gray-60);--color-sidebar-menu-hover-background-rgb:var(--studio-gray-60-rgb);--color-sidebar-menu-hover-text:var(--studio-white)}.color-scheme.is-midnight{--color-primary:var(--studio-gray-70);--color-primary-rgb:var(--studio-gray-70-rgb);--color-primary-dark:var(--studio-gray-80);--color-primary-dark-rgb:var(--studio-gray-80-rgb);--color-primary-light:var(--studio-gray-50);--color-primary-light-rgb:var(--studio-gray-50-rgb);--color-primary-0:var(--studio-gray-0);--color-primary-0-rgb:var(--studio-gray-0-rgb);--color-primary-5:var(--studio-gray-5);--color-primary-5-rgb:var(--studio-gray-5-rgb);--color-primary-10:var(--studio-gray-10);--color-primary-10-rgb:var(--studio-gray-10-rgb);--color-primary-20:var(--studio-gray-20);--color-primary-20-rgb:var(--studio-gray-20-rgb);--color-primary-30:var(--studio-gray-30);--color-primary-30-rgb:var(--studio-gray-30-rgb);--color-primary-40:var(--studio-gray-40);--color-primary-40-rgb:var(--studio-gray-40-rgb);--color-primary-50:var(--studio-gray-50);--color-primary-50-rgb:var(--studio-gray-50-rgb);--color-primary-60:var(--studio-gray-60);--color-primary-60-rgb:var(--studio-gray-60-rgb);--color-primary-70:var(--studio-gray-70);--color-primary-70-rgb:var(--studio-gray-70-rgb);--color-primary-80:var(--studio-gray-80);--color-primary-80-rgb:var(--studio-gray-80-rgb);--color-primary-90:var(--studio-gray-90);--color-primary-90-rgb:var(--studio-gray-90-rgb);--color-primary-100:var(--studio-gray-100);--color-primary-100-rgb:var(--studio-gray-100-rgb);--color-accent:var(--studio-blue-50);--color-accent-rgb:var(--studio-blue-50-rgb);--color-accent-dark:var(--studio-blue-70);--color-accent-dark-rgb:var(--studio-blue-70-rgb);--color-accent-light:var(--studio-blue-30);--color-accent-light-rgb:var(--studio-blue-30-rgb);--color-accent-0:var(--studio-blue-0);--color-accent-0-rgb:var(--studio-blue-0-rgb);--color-accent-5:var(--studio-blue-5);--color-accent-5-rgb:var(--studio-blue-5-rgb);--color-accent-10:var(--studio-blue-10);--color-accent-10-rgb:var(--studio-blue-10-rgb);--color-accent-20:var(--studio-blue-20);--color-accent-20-rgb:var(--studio-blue-20-rgb);--color-accent-30:var(--studio-blue-30);--color-accent-30-rgb:var(--studio-blue-30-rgb);--color-accent-40:var(--studio-blue-40);--color-accent-40-rgb:var(--studio-blue-40-rgb);--color-accent-50:var(--studio-blue-50);--color-accent-50-rgb:var(--studio-blue-50-rgb);--color-accent-60:var(--studio-blue-60);--color-accent-60-rgb:var(--studio-blue-60-rgb);--color-accent-70:var(--studio-blue-70);--color-accent-70-rgb:var(--studio-blue-70-rgb);--color-accent-80:var(--studio-blue-80);--color-accent-80-rgb:var(--studio-blue-80-rgb);--color-accent-90:var(--studio-blue-90);--color-accent-90-rgb:var(--studio-blue-90-rgb);--color-accent-100:var(--studio-blue-100);--color-accent-100-rgb:var(--studio-blue-100-rgb);--color-link:var(--studio-red-60);--color-link-rgb:var(--studio-red-60-rgb);--color-link-dark:var(--studio-red-70);--color-link-dark-rgb:var(--studio-red-70-rgb);--color-link-light:var(--studio-red-30);--color-link-light-rgb:var(--studio-red-30-rgb);--color-link-0:var(--studio-red-0);--color-link-0-rgb:var(--studio-red-0-rgb);--color-link-5:var(--studio-red-5);--color-link-5-rgb:var(--studio-red-5-rgb);--color-link-10:var(--studio-red-10);--color-link-10-rgb:var(--studio-red-10-rgb);--color-link-20:var(--studio-red-20);--color-link-20-rgb:var(--studio-red-20-rgb);--color-link-30:var(--studio-red-30);--color-link-30-rgb:var(--studio-red-30-rgb);--color-link-40:var(--studio-red-40);--color-link-40-rgb:var(--studio-red-40-rgb);--color-link-50:var(--studio-red-50);--color-link-50-rgb:var(--studio-red-50-rgb);--color-link-60:var(--studio-red-60);--color-link-60-rgb:var(--studio-red-60-rgb);--color-link-70:var(--studio-red-70);--color-link-70-rgb:var(--studio-red-70-rgb);--color-link-80:var(--studio-red-80);--color-link-80-rgb:var(--studio-red-80-rgb);--color-link-90:var(--studio-red-90);--color-link-90-rgb:var(--studio-red-90-rgb);--color-link-100:var(--studio-red-100);--color-link-100-rgb:var(--studio-red-100-rgb);--color-masterbar-background:var(--studio-gray-70);--color-masterbar-border:var(--studio-gray-70);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-gray-80);--color-masterbar-item-active-background:var(--studio-gray-90);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-gray-90);--color-sidebar-background-rgb:var(--studio-gray-90-rgb);--color-sidebar-border:var(--studio-gray-80);--color-sidebar-text:var(--studio-white);--color-sidebar-text-rgb:var(--studio-white-rgb);--color-sidebar-text-alternative:var(--studio-gray-20);--color-sidebar-gridicon-fill:var(--studio-gray-10);--color-sidebar-menu-selected-background:var(--studio-red-50);--color-sidebar-menu-selected-background-rgb:var(--studio-red-50-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--studio-gray-80);--color-sidebar-menu-hover-background-rgb:var(--studio-gray-80-rgb);--color-sidebar-menu-hover-text:var(--studio-white)}.color-scheme.is-nightfall{--color-primary:var(--studio-gray-90);--color-primary-rgb:var(--studio-gray-90-rgb);--color-primary-dark:var(--studio-gray-70);--color-primary-dark-rgb:var(--studio-gray-70-rgb);--color-primary-light:var(--studio-gray-30);--color-primary-light-rgb:var(--studio-gray-30-rgb);--color-primary-0:var(--studio-gray-0);--color-primary-0-rgb:var(--studio-gray-0-rgb);--color-primary-5:var(--studio-gray-5);--color-primary-5-rgb:var(--studio-gray-5-rgb);--color-primary-10:var(--studio-gray-10);--color-primary-10-rgb:var(--studio-gray-10-rgb);--color-primary-20:var(--studio-gray-20);--color-primary-20-rgb:var(--studio-gray-20-rgb);--color-primary-30:var(--studio-gray-30);--color-primary-30-rgb:var(--studio-gray-30-rgb);--color-primary-40:var(--studio-gray-40);--color-primary-40-rgb:var(--studio-gray-40-rgb);--color-primary-50:var(--studio-gray-50);--color-primary-50-rgb:var(--studio-gray-50-rgb);--color-primary-60:var(--studio-gray-60);--color-primary-60-rgb:var(--studio-gray-60-rgb);--color-primary-70:var(--studio-gray-70);--color-primary-70-rgb:var(--studio-gray-70-rgb);--color-primary-80:var(--studio-gray-80);--color-primary-80-rgb:var(--studio-gray-80-rgb);--color-primary-90:var(--studio-gray-90);--color-primary-90-rgb:var(--studio-gray-90-rgb);--color-primary-100:var(--studio-gray-100);--color-primary-100-rgb:var(--studio-gray-100-rgb);--color-accent:var(--studio-blue-50);--color-accent-rgb:var(--studio-blue-50-rgb);--color-accent-dark:var(--studio-blue-70);--color-accent-dark-rgb:var(--studio-blue-70-rgb);--color-accent-light:var(--studio-blue-30);--color-accent-light-rgb:var(--studio-blue-30-rgb);--color-accent-0:var(--studio-blue-0);--color-accent-0-rgb:var(--studio-blue-0-rgb);--color-accent-5:var(--studio-blue-5);--color-accent-5-rgb:var(--studio-blue-5-rgb);--color-accent-10:var(--studio-blue-10);--color-accent-10-rgb:var(--studio-blue-10-rgb);--color-accent-20:var(--studio-blue-20);--color-accent-20-rgb:var(--studio-blue-20-rgb);--color-accent-30:var(--studio-blue-30);--color-accent-30-rgb:var(--studio-blue-30-rgb);--color-accent-40:var(--studio-blue-40);--color-accent-40-rgb:var(--studio-blue-40-rgb);--color-accent-50:var(--studio-blue-50);--color-accent-50-rgb:var(--studio-blue-50-rgb);--color-accent-60:var(--studio-blue-60);--color-accent-60-rgb:var(--studio-blue-60-rgb);--color-accent-70:var(--studio-blue-70);--color-accent-70-rgb:var(--studio-blue-70-rgb);--color-accent-80:var(--studio-blue-80);--color-accent-80-rgb:var(--studio-blue-80-rgb);--color-accent-90:var(--studio-blue-90);--color-accent-90-rgb:var(--studio-blue-90-rgb);--color-accent-100:var(--studio-blue-100);--color-accent-100-rgb:var(--studio-blue-100-rgb);--color-link:var(--studio-blue-50);--color-link-rgb:var(--studio-blue-50-rgb);--color-link-dark:var(--studio-blue-70);--color-link-dark-rgb:var(--studio-blue-70-rgb);--color-link-light:var(--studio-blue-30);--color-link-light-rgb:var(--studio-blue-30-rgb);--color-link-0:var(--studio-blue-0);--color-link-0-rgb:var(--studio-blue-0-rgb);--color-link-5:var(--studio-blue-5);--color-link-5-rgb:var(--studio-blue-5-rgb);--color-link-10:var(--studio-blue-10);--color-link-10-rgb:var(--studio-blue-10-rgb);--color-link-20:var(--studio-blue-20);--color-link-20-rgb:var(--studio-blue-20-rgb);--color-link-30:var(--studio-blue-30);--color-link-30-rgb:var(--studio-blue-30-rgb);--color-link-40:var(--studio-blue-40);--color-link-40-rgb:var(--studio-blue-40-rgb);--color-link-50:var(--studio-blue-50);--color-link-50-rgb:var(--studio-blue-50-rgb);--color-link-60:var(--studio-blue-60);--color-link-60-rgb:var(--studio-blue-60-rgb);--color-link-70:var(--studio-blue-70);--color-link-70-rgb:var(--studio-blue-70-rgb);--color-link-80:var(--studio-blue-80);--color-link-80-rgb:var(--studio-blue-80-rgb);--color-link-90:var(--studio-blue-90);--color-link-90-rgb:var(--studio-blue-90-rgb);--color-link-100:var(--studio-blue-100);--color-link-100-rgb:var(--studio-blue-100-rgb);--color-masterbar-background:var(--studio-blue-100);--color-masterbar-border:var(--studio-blue-100);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-blue-90);--color-masterbar-item-active-background:var(--studio-blue-80);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-40);--color-masterbar-unread-dot-background:var(--color-accent-30);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-blue-80);--color-sidebar-background-rgb:var(--studio-blue-80-rgb);--color-sidebar-border:var(--studio-blue-90);--color-sidebar-text:var(--studio-blue-5);--color-sidebar-text-rgb:var(--studio-blue-5-rgb);--color-sidebar-text-alternative:var(--studio-blue-20);--color-sidebar-gridicon-fill:var(--studio-blue-10);--color-sidebar-menu-selected-background:var(--studio-blue-100);--color-sidebar-menu-selected-background-rgb:var(--studio-blue-100-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--studio-blue-70);--color-sidebar-menu-hover-background-rgb:var(--studio-blue-70-rgb);--color-sidebar-menu-hover-text:var(--studio-white)}.color-scheme.is-ocean{--color-primary:var(--studio-blue-50);--color-primary-rgb:var(--studio-blue-50-rgb);--color-primary-dark:var(--studio-blue-70);--color-primary-dark-rgb:var(--studio-blue-70-rgb);--color-primary-light:var(--studio-blue-30);--color-primary-light-rgb:var(--studio-blue-30-rgb);--color-primary-0:var(--studio-blue-0);--color-primary-0-rgb:var(--studio-blue-0-rgb);--color-primary-5:var(--studio-blue-5);--color-primary-5-rgb:var(--studio-blue-5-rgb);--color-primary-10:var(--studio-blue-10);--color-primary-10-rgb:var(--studio-blue-10-rgb);--color-primary-20:var(--studio-blue-20);--color-primary-20-rgb:var(--studio-blue-20-rgb);--color-primary-30:var(--studio-blue-30);--color-primary-30-rgb:var(--studio-blue-30-rgb);--color-primary-40:var(--studio-blue-40);--color-primary-40-rgb:var(--studio-blue-40-rgb);--color-primary-50:var(--studio-blue-50);--color-primary-50-rgb:var(--studio-blue-50-rgb);--color-primary-60:var(--studio-blue-60);--color-primary-60-rgb:var(--studio-blue-60-rgb);--color-primary-70:var(--studio-blue-70);--color-primary-70-rgb:var(--studio-blue-70-rgb);--color-primary-80:var(--studio-blue-80);--color-primary-80-rgb:var(--studio-blue-80-rgb);--color-primary-90:var(--studio-blue-90);--color-primary-90-rgb:var(--studio-blue-90-rgb);--color-primary-100:var(--studio-blue-100);--color-primary-100-rgb:var(--studio-blue-100-rgb);--color-accent:var(--studio-celadon-50);--color-accent-rgb:var(--studio-celadon-50-rgb);--color-accent-dark:var(--studio-celadon-70);--color-accent-dark-rgb:var(--studio-celadon-70-rgb);--color-accent-light:var(--studio-celadon-30);--color-accent-light-rgb:var(--studio-celadon-30-rgb);--color-accent-0:var(--studio-celadon-0);--color-accent-0-rgb:var(--studio-celadon-0-rgb);--color-accent-5:var(--studio-celadon-5);--color-accent-5-rgb:var(--studio-celadon-5-rgb);--color-accent-10:var(--studio-celadon-10);--color-accent-10-rgb:var(--studio-celadon-10-rgb);--color-accent-20:var(--studio-celadon-20);--color-accent-20-rgb:var(--studio-celadon-20-rgb);--color-accent-30:var(--studio-celadon-30);--color-accent-30-rgb:var(--studio-celadon-30-rgb);--color-accent-40:var(--studio-celadon-40);--color-accent-40-rgb:var(--studio-celadon-40-rgb);--color-accent-50:var(--studio-celadon-50);--color-accent-50-rgb:var(--studio-celadon-50-rgb);--color-accent-60:var(--studio-celadon-60);--color-accent-60-rgb:var(--studio-celadon-60-rgb);--color-accent-70:var(--studio-celadon-70);--color-accent-70-rgb:var(--studio-celadon-70-rgb);--color-accent-80:var(--studio-celadon-80);--color-accent-80-rgb:var(--studio-celadon-80-rgb);--color-accent-90:var(--studio-celadon-90);--color-accent-90-rgb:var(--studio-celadon-90-rgb);--color-accent-100:var(--studio-celadon-100);--color-accent-100-rgb:var(--studio-celadon-100-rgb);--color-link:var(--studio-celadon-50);--color-link-rgb:var(--studio-celadon-50-rgb);--color-link-dark:var(--studio-celadon-70);--color-link-dark-rgb:var(--studio-celadon-70-rgb);--color-link-light:var(--studio-celadon-30);--color-link-light-rgb:var(--studio-celadon-30-rgb);--color-link-0:var(--studio-celadon-0);--color-link-0-rgb:var(--studio-celadon-0-rgb);--color-link-5:var(--studio-celadon-5);--color-link-5-rgb:var(--studio-celadon-5-rgb);--color-link-10:var(--studio-celadon-10);--color-link-10-rgb:var(--studio-celadon-10-rgb);--color-link-20:var(--studio-celadon-20);--color-link-20-rgb:var(--studio-celadon-20-rgb);--color-link-30:var(--studio-celadon-30);--color-link-30-rgb:var(--studio-celadon-30-rgb);--color-link-40:var(--studio-celadon-40);--color-link-40-rgb:var(--studio-celadon-40-rgb);--color-link-50:var(--studio-celadon-50);--color-link-50-rgb:var(--studio-celadon-50-rgb);--color-link-60:var(--studio-celadon-60);--color-link-60-rgb:var(--studio-celadon-60-rgb);--color-link-70:var(--studio-celadon-70);--color-link-70-rgb:var(--studio-celadon-70-rgb);--color-link-80:var(--studio-celadon-80);--color-link-80-rgb:var(--studio-celadon-80-rgb);--color-link-90:var(--studio-celadon-90);--color-link-90-rgb:var(--studio-celadon-90-rgb);--color-link-100:var(--studio-celadon-100);--color-link-100-rgb:var(--studio-celadon-100-rgb);--color-masterbar-background:var(--studio-blue-80);--color-masterbar-border:var(--studio-blue-80);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-blue-90);--color-masterbar-item-active-background:var(--studio-blue-100);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-60);--color-masterbar-unread-dot-background:var(--color-accent-30);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-blue-60);--color-sidebar-background-rgb:var(--studio-blue-60-rgb);--color-sidebar-border:var(--studio-blue-70);--color-sidebar-text:var(--studio-white);--color-sidebar-text-rgb:var(--studio-white-rgb);--color-sidebar-text-alternative:var(--studio-blue-5);--color-sidebar-gridicon-fill:var(--studio-blue-5);--color-sidebar-menu-selected-background:var(--studio-yellow-20);--color-sidebar-menu-selected-background-rgb:var(--studio-yellow-20-rgb);--color-sidebar-menu-selected-text:var(--studio-blue-90);--color-sidebar-menu-selected-text-rgb:var(--studio-blue-90-rgb);--color-sidebar-menu-hover-background:var(--studio-blue-50);--color-sidebar-menu-hover-background-rgb:var(--studio-blue-50-rgb);--color-sidebar-menu-hover-text:var(--studio-white)}.color-scheme.is-powder-snow{--color-primary:var(--studio-gray-90);--color-primary-rgb:var(--studio-gray-90-rgb);--color-primary-dark:var(--studio-gray-70);--color-primary-dark-rgb:var(--studio-gray-70-rgb);--color-primary-light:var(--studio-gray-30);--color-primary-light-rgb:var(--studio-gray-30-rgb);--color-primary-0:var(--studio-gray-0);--color-primary-0-rgb:var(--studio-gray-0-rgb);--color-primary-5:var(--studio-gray-5);--color-primary-5-rgb:var(--studio-gray-5-rgb);--color-primary-10:var(--studio-gray-10);--color-primary-10-rgb:var(--studio-gray-10-rgb);--color-primary-20:var(--studio-gray-20);--color-primary-20-rgb:var(--studio-gray-20-rgb);--color-primary-30:var(--studio-gray-30);--color-primary-30-rgb:var(--studio-gray-30-rgb);--color-primary-40:var(--studio-gray-40);--color-primary-40-rgb:var(--studio-gray-40-rgb);--color-primary-50:var(--studio-gray-50);--color-primary-50-rgb:var(--studio-gray-50-rgb);--color-primary-60:var(--studio-gray-60);--color-primary-60-rgb:var(--studio-gray-60-rgb);--color-primary-70:var(--studio-gray-70);--color-primary-70-rgb:var(--studio-gray-70-rgb);--color-primary-80:var(--studio-gray-80);--color-primary-80-rgb:var(--studio-gray-80-rgb);--color-primary-90:var(--studio-gray-90);--color-primary-90-rgb:var(--studio-gray-90-rgb);--color-primary-100:var(--studio-gray-100);--color-primary-100-rgb:var(--studio-gray-100-rgb);--color-accent:var(--studio-blue-50);--color-accent-rgb:var(--studio-blue-50-rgb);--color-accent-dark:var(--studio-blue-70);--color-accent-dark-rgb:var(--studio-blue-70-rgb);--color-accent-light:var(--studio-blue-30);--color-accent-light-rgb:var(--studio-blue-30-rgb);--color-accent-0:var(--studio-blue-0);--color-accent-0-rgb:var(--studio-blue-0-rgb);--color-accent-5:var(--studio-blue-5);--color-accent-5-rgb:var(--studio-blue-5-rgb);--color-accent-10:var(--studio-blue-10);--color-accent-10-rgb:var(--studio-blue-10-rgb);--color-accent-20:var(--studio-blue-20);--color-accent-20-rgb:var(--studio-blue-20-rgb);--color-accent-30:var(--studio-blue-30);--color-accent-30-rgb:var(--studio-blue-30-rgb);--color-accent-40:var(--studio-blue-40);--color-accent-40-rgb:var(--studio-blue-40-rgb);--color-accent-50:var(--studio-blue-50);--color-accent-50-rgb:var(--studio-blue-50-rgb);--color-accent-60:var(--studio-blue-60);--color-accent-60-rgb:var(--studio-blue-60-rgb);--color-accent-70:var(--studio-blue-70);--color-accent-70-rgb:var(--studio-blue-70-rgb);--color-accent-80:var(--studio-blue-80);--color-accent-80-rgb:var(--studio-blue-80-rgb);--color-accent-90:var(--studio-blue-90);--color-accent-90-rgb:var(--studio-blue-90-rgb);--color-accent-100:var(--studio-blue-100);--color-accent-100-rgb:var(--studio-blue-100-rgb);--color-link:var(--studio-blue-50);--color-link-rgb:var(--studio-blue-50-rgb);--color-link-dark:var(--studio-blue-70);--color-link-dark-rgb:var(--studio-blue-70-rgb);--color-link-light:var(--studio-blue-30);--color-link-light-rgb:var(--studio-blue-30-rgb);--color-link-0:var(--studio-blue-0);--color-link-0-rgb:var(--studio-blue-0-rgb);--color-link-5:var(--studio-blue-5);--color-link-5-rgb:var(--studio-blue-5-rgb);--color-link-10:var(--studio-blue-10);--color-link-10-rgb:var(--studio-blue-10-rgb);--color-link-20:var(--studio-blue-20);--color-link-20-rgb:var(--studio-blue-20-rgb);--color-link-30:var(--studio-blue-30);--color-link-30-rgb:var(--studio-blue-30-rgb);--color-link-40:var(--studio-blue-40);--color-link-40-rgb:var(--studio-blue-40-rgb);--color-link-50:var(--studio-blue-50);--color-link-50-rgb:var(--studio-blue-50-rgb);--color-link-60:var(--studio-blue-60);--color-link-60-rgb:var(--studio-blue-60-rgb);--color-link-70:var(--studio-blue-70);--color-link-70-rgb:var(--studio-blue-70-rgb);--color-link-80:var(--studio-blue-80);--color-link-80-rgb:var(--studio-blue-80-rgb);--color-link-90:var(--studio-blue-90);--color-link-90-rgb:var(--studio-blue-90-rgb);--color-link-100:var(--studio-blue-100);--color-link-100-rgb:var(--studio-blue-100-rgb);--color-masterbar-background:var(--studio-gray-100);--color-masterbar-border:var(--studio-gray-90);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-gray-80);--color-masterbar-item-active-background:var(--studio-gray-70);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-40);--color-masterbar-unread-dot-background:var(--color-accent-30);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-gray-5);--color-sidebar-background-rgb:var(--studio-gray-5-rgb);--color-sidebar-border:var(--studio-gray-10);--color-sidebar-text:var(--studio-gray-80);--color-sidebar-text-rgb:var(--studio-gray-80-rgb);--color-sidebar-text-alternative:var(--studio-gray-60);--color-sidebar-gridicon-fill:var(--studio-gray-50);--color-sidebar-menu-selected-background:var(--studio-gray-60);--color-sidebar-menu-selected-background-rgb:var(--studio-gray-60-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--color-surface);--color-sidebar-menu-hover-background-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-text:var(--studio-blue-60)}.color-scheme.is-sakura{--color-primary:var(--studio-celadon-50);--color-primary-rgb:var(--studio-celadon-50-rgb);--color-primary-dark:var(--studio-celadon-70);--color-primary-dark-rgb:var(--studio-celadon-70-rgb);--color-primary-light:var(--studio-celadon-30);--color-primary-light-rgb:var(--studio-celadon-30-rgb);--color-primary-0:var(--studio-celadon-0);--color-primary-0-rgb:var(--studio-celadon-0-rgb);--color-primary-5:var(--studio-celadon-5);--color-primary-5-rgb:var(--studio-celadon-5-rgb);--color-primary-10:var(--studio-celadon-10);--color-primary-10-rgb:var(--studio-celadon-10-rgb);--color-primary-20:var(--studio-celadon-20);--color-primary-20-rgb:var(--studio-celadon-20-rgb);--color-primary-30:var(--studio-celadon-30);--color-primary-30-rgb:var(--studio-celadon-30-rgb);--color-primary-40:var(--studio-celadon-40);--color-primary-40-rgb:var(--studio-celadon-40-rgb);--color-primary-50:var(--studio-celadon-50);--color-primary-50-rgb:var(--studio-celadon-50-rgb);--color-primary-60:var(--studio-celadon-60);--color-primary-60-rgb:var(--studio-celadon-60-rgb);--color-primary-70:var(--studio-celadon-70);--color-primary-70-rgb:var(--studio-celadon-70-rgb);--color-primary-80:var(--studio-celadon-80);--color-primary-80-rgb:var(--studio-celadon-80-rgb);--color-primary-90:var(--studio-celadon-90);--color-primary-90-rgb:var(--studio-celadon-90-rgb);--color-primary-100:var(--studio-celadon-100);--color-primary-100-rgb:var(--studio-celadon-100-rgb);--color-accent:var(--studio-blue-50);--color-accent-rgb:var(--studio-blue-50-rgb);--color-accent-dark:var(--studio-blue-70);--color-accent-dark-rgb:var(--studio-blue-70-rgb);--color-accent-light:var(--studio-blue-30);--color-accent-light-rgb:var(--studio-blue-30-rgb);--color-accent-0:var(--studio-blue-0);--color-accent-0-rgb:var(--studio-blue-0-rgb);--color-accent-5:var(--studio-blue-5);--color-accent-5-rgb:var(--studio-blue-5-rgb);--color-accent-10:var(--studio-blue-10);--color-accent-10-rgb:var(--studio-blue-10-rgb);--color-accent-20:var(--studio-blue-20);--color-accent-20-rgb:var(--studio-blue-20-rgb);--color-accent-30:var(--studio-blue-30);--color-accent-30-rgb:var(--studio-blue-30-rgb);--color-accent-40:var(--studio-blue-40);--color-accent-40-rgb:var(--studio-blue-40-rgb);--color-accent-50:var(--studio-blue-50);--color-accent-50-rgb:var(--studio-blue-50-rgb);--color-accent-60:var(--studio-blue-60);--color-accent-60-rgb:var(--studio-blue-60-rgb);--color-accent-70:var(--studio-blue-70);--color-accent-70-rgb:var(--studio-blue-70-rgb);--color-accent-80:var(--studio-blue-80);--color-accent-80-rgb:var(--studio-blue-80-rgb);--color-accent-90:var(--studio-blue-90);--color-accent-90-rgb:var(--studio-blue-90-rgb);--color-accent-100:var(--studio-blue-100);--color-accent-100-rgb:var(--studio-blue-100-rgb);--color-link:var(--studio-celadon-50);--color-link-rgb:var(--studio-celadon-50-rgb);--color-link-dark:var(--studio-celadon-70);--color-link-dark-rgb:var(--studio-celadon-70-rgb);--color-link-light:var(--studio-celadon-30);--color-link-light-rgb:var(--studio-celadon-30-rgb);--color-link-0:var(--studio-celadon-0);--color-link-0-rgb:var(--studio-celadon-0-rgb);--color-link-5:var(--studio-celadon-5);--color-link-5-rgb:var(--studio-celadon-5-rgb);--color-link-10:var(--studio-celadon-10);--color-link-10-rgb:var(--studio-celadon-10-rgb);--color-link-20:var(--studio-celadon-20);--color-link-20-rgb:var(--studio-celadon-20-rgb);--color-link-30:var(--studio-celadon-30);--color-link-30-rgb:var(--studio-celadon-30-rgb);--color-link-40:var(--studio-celadon-40);--color-link-40-rgb:var(--studio-celadon-40-rgb);--color-link-50:var(--studio-celadon-50);--color-link-50-rgb:var(--studio-celadon-50-rgb);--color-link-60:var(--studio-celadon-60);--color-link-60-rgb:var(--studio-celadon-60-rgb);--color-link-70:var(--studio-celadon-70);--color-link-70-rgb:var(--studio-celadon-70-rgb);--color-link-80:var(--studio-celadon-80);--color-link-80-rgb:var(--studio-celadon-80-rgb);--color-link-90:var(--studio-celadon-90);--color-link-90-rgb:var(--studio-celadon-90-rgb);--color-link-100:var(--studio-celadon-100);--color-link-100-rgb:var(--studio-celadon-100-rgb);--color-masterbar-background:var(--studio-celadon-70);--color-masterbar-border:var(--studio-celadon-80);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-celadon-80);--color-masterbar-item-active-background:var(--studio-celadon-90);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-pink-5);--color-sidebar-background-rgb:var(--studio-pink-5-rgb);--color-sidebar-border:var(--studio-pink-10);--color-sidebar-text:var(--studio-pink-80);--color-sidebar-text-rgb:var(--studio-pink-80-rgb);--color-sidebar-text-alternative:var(--studio-pink-60);--color-sidebar-gridicon-fill:var(--studio-pink-70);--color-sidebar-menu-selected-background:var(--studio-blue-50);--color-sidebar-menu-selected-background-rgb:var(--studio-blue-50-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--studio-pink-10);--color-sidebar-menu-hover-background-rgb:var(--studio-pink-10-rgb);--color-sidebar-menu-hover-text:var(--studio-pink-90)}.color-scheme.is-sunset{--color-primary:var(--studio-red-50);--color-primary-rgb:var(--studio-red-50-rgb);--color-primary-dark:var(--studio-red-70);--color-primary-dark-rgb:var(--studio-red-70-rgb);--color-primary-light:var(--studio-red-30);--color-primary-light-rgb:var(--studio-red-30-rgb);--color-primary-0:var(--studio-red-0);--color-primary-0-rgb:var(--studio-red-0-rgb);--color-primary-5:var(--studio-red-5);--color-primary-5-rgb:var(--studio-red-5-rgb);--color-primary-10:var(--studio-red-10);--color-primary-10-rgb:var(--studio-red-10-rgb);--color-primary-20:var(--studio-red-20);--color-primary-20-rgb:var(--studio-red-20-rgb);--color-primary-30:var(--studio-red-30);--color-primary-30-rgb:var(--studio-red-30-rgb);--color-primary-40:var(--studio-red-40);--color-primary-40-rgb:var(--studio-red-40-rgb);--color-primary-50:var(--studio-red-50);--color-primary-50-rgb:var(--studio-red-50-rgb);--color-primary-60:var(--studio-red-60);--color-primary-60-rgb:var(--studio-red-60-rgb);--color-primary-70:var(--studio-red-70);--color-primary-70-rgb:var(--studio-red-70-rgb);--color-primary-80:var(--studio-red-80);--color-primary-80-rgb:var(--studio-red-80-rgb);--color-primary-90:var(--studio-red-90);--color-primary-90-rgb:var(--studio-red-90-rgb);--color-primary-100:var(--studio-red-100);--color-primary-100-rgb:var(--studio-red-100-rgb);--color-accent:var(--studio-orange-50);--color-accent-rgb:var(--studio-orange-50-rgb);--color-accent-dark:var(--studio-orange-70);--color-accent-dark-rgb:var(--studio-orange-70-rgb);--color-accent-light:var(--studio-orange-30);--color-accent-light-rgb:var(--studio-orange-30-rgb);--color-accent-0:var(--studio-orange-0);--color-accent-0-rgb:var(--studio-orange-0-rgb);--color-accent-5:var(--studio-orange-5);--color-accent-5-rgb:var(--studio-orange-5-rgb);--color-accent-10:var(--studio-orange-10);--color-accent-10-rgb:var(--studio-orange-10-rgb);--color-accent-20:var(--studio-orange-20);--color-accent-20-rgb:var(--studio-orange-20-rgb);--color-accent-30:var(--studio-orange-30);--color-accent-30-rgb:var(--studio-orange-30-rgb);--color-accent-40:var(--studio-orange-40);--color-accent-40-rgb:var(--studio-orange-40-rgb);--color-accent-50:var(--studio-orange-50);--color-accent-50-rgb:var(--studio-orange-50-rgb);--color-accent-60:var(--studio-orange-60);--color-accent-60-rgb:var(--studio-orange-60-rgb);--color-accent-70:var(--studio-orange-70);--color-accent-70-rgb:var(--studio-orange-70-rgb);--color-accent-80:var(--studio-orange-80);--color-accent-80-rgb:var(--studio-orange-80-rgb);--color-accent-90:var(--studio-orange-90);--color-accent-90-rgb:var(--studio-orange-90-rgb);--color-accent-100:var(--studio-orange-100);--color-accent-100-rgb:var(--studio-orange-100-rgb);--color-link:var(--studio-orange-50);--color-link-rgb:var(--studio-orange-50-rgb);--color-link-dark:var(--studio-orange-70);--color-link-dark-rgb:var(--studio-orange-70-rgb);--color-link-light:var(--studio-orange-30);--color-link-light-rgb:var(--studio-orange-30-rgb);--color-link-0:var(--studio-orange-0);--color-link-0-rgb:var(--studio-orange-0-rgb);--color-link-5:var(--studio-orange-5);--color-link-5-rgb:var(--studio-orange-5-rgb);--color-link-10:var(--studio-orange-10);--color-link-10-rgb:var(--studio-orange-10-rgb);--color-link-20:var(--studio-orange-20);--color-link-20-rgb:var(--studio-orange-20-rgb);--color-link-30:var(--studio-orange-30);--color-link-30-rgb:var(--studio-orange-30-rgb);--color-link-40:var(--studio-orange-40);--color-link-40-rgb:var(--studio-orange-40-rgb);--color-link-50:var(--studio-orange-50);--color-link-50-rgb:var(--studio-orange-50-rgb);--color-link-60:var(--studio-orange-60);--color-link-60-rgb:var(--studio-orange-60-rgb);--color-link-70:var(--studio-orange-70);--color-link-70-rgb:var(--studio-orange-70-rgb);--color-link-80:var(--studio-orange-80);--color-link-80-rgb:var(--studio-orange-80-rgb);--color-link-90:var(--studio-orange-90);--color-link-90-rgb:var(--studio-orange-90-rgb);--color-link-100:var(--studio-orange-100);--color-link-100-rgb:var(--studio-orange-100-rgb);--color-masterbar-background:var(--studio-red-80);--color-masterbar-border:var(--studio-red-80);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-red-90);--color-masterbar-item-active-background:var(--studio-red-100);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-red-70);--color-sidebar-background-rgb:var(--studio-red-70-rgb);--color-sidebar-border:var(--studio-red-80);--color-sidebar-text:var(--studio-white);--color-sidebar-text-rgb:var(--studio-white-rgb);--color-sidebar-text-alternative:var(--studio-red-10);--color-sidebar-gridicon-fill:var(--studio-red-5);--color-sidebar-menu-selected-background:var(--studio-yellow-20);--color-sidebar-menu-selected-background-rgb:var(--studio-yellow-20-rgb);--color-sidebar-menu-selected-text:var(--studio-yellow-80);--color-sidebar-menu-selected-text-rgb:var(--studio-yellow-80-rgb);--color-sidebar-menu-hover-background:var(--studio-red-80);--color-sidebar-menu-hover-background-rgb:var(--studio-red-80-rgb);--color-sidebar-menu-hover-text:var(--studio-white)}.color-scheme.is-jetpack-cloud,.theme-jetpack-cloud{--color-primary:var(--studio-jetpack-green);--color-primary-rgb:var(--studio-jetpack-green-rgb);--color-primary-dark:var(--studio-jetpack-green-70);--color-primary-dark-rgb:var(--studio-jetpack-green-70-rgb);--color-primary-light:var(--studio-jetpack-green-30);--color-primary-light-rgb:var(--studio-jetpack-green-30-rgb);--color-primary-0:var(--studio-jetpack-green-0);--color-primary-0-rgb:var(--studio-jetpack-green-0-rgb);--color-primary-5:var(--studio-jetpack-green-5);--color-primary-5-rgb:var(--studio-jetpack-green-5-rgb);--color-primary-10:var(--studio-jetpack-green-10);--color-primary-10-rgb:var(--studio-jetpack-green-10-rgb);--color-primary-20:var(--studio-jetpack-green-20);--color-primary-20-rgb:var(--studio-jetpack-green-20-rgb);--color-primary-30:var(--studio-jetpack-green-30);--color-primary-30-rgb:var(--studio-jetpack-green-30-rgb);--color-primary-40:var(--studio-jetpack-green-40);--color-primary-40-rgb:var(--studio-jetpack-green-40-rgb);--color-primary-50:var(--studio-jetpack-green-50);--color-primary-50-rgb:var(--studio-jetpack-green-50-rgb);--color-primary-60:var(--studio-jetpack-green-60);--color-primary-60-rgb:var(--studio-jetpack-green-60-rgb);--color-primary-70:var(--studio-jetpack-green-70);--color-primary-70-rgb:var(--studio-jetpack-green-70-rgb);--color-primary-80:var(--studio-jetpack-green-80);--color-primary-80-rgb:var(--studio-jetpack-green-80-rgb);--color-primary-90:var(--studio-jetpack-green-90);--color-primary-90-rgb:var(--studio-jetpack-green-90-rgb);--color-primary-100:var(--studio-jetpack-green-100);--color-primary-100-rgb:var(--studio-jetpack-green-100-rgb);--color-accent:var(--studio-jetpack-green);--color-accent-rgb:var(--studio-jetpack-green-rgb);--color-accent-dark:var(--studio-jetpack-green-70);--color-accent-dark-rgb:var(--studio-jetpack-green-70-rgb);--color-accent-light:var(--studio-jetpack-green-30);--color-accent-light-rgb:var(--studio-jetpack-green-30-rgb);--color-accent-0:var(--studio-jetpack-green-0);--color-accent-0-rgb:var(--studio-jetpack-green-0-rgb);--color-accent-5:var(--studio-jetpack-green-5);--color-accent-5-rgb:var(--studio-jetpack-green-5-rgb);--color-accent-10:var(--studio-jetpack-green-10);--color-accent-10-rgb:var(--studio-jetpack-green-10-rgb);--color-accent-20:var(--studio-jetpack-green-20);--color-accent-20-rgb:var(--studio-jetpack-green-20-rgb);--color-accent-30:var(--studio-jetpack-green-30);--color-accent-30-rgb:var(--studio-jetpack-green-30-rgb);--color-accent-40:var(--studio-jetpack-green-40);--color-accent-40-rgb:var(--studio-jetpack-green-40-rgb);--color-accent-50:var(--studio-jetpack-green-50);--color-accent-50-rgb:var(--studio-jetpack-green-50-rgb);--color-accent-60:var(--studio-jetpack-green-60);--color-accent-60-rgb:var(--studio-jetpack-green-60-rgb);--color-accent-70:var(--studio-jetpack-green-70);--color-accent-70-rgb:var(--studio-jetpack-green-70-rgb);--color-accent-80:var(--studio-jetpack-green-80);--color-accent-80-rgb:var(--studio-jetpack-green-80-rgb);--color-accent-90:var(--studio-jetpack-green-90);--color-accent-90-rgb:var(--studio-jetpack-green-90-rgb);--color-accent-100:var(--studio-jetpack-green-100);--color-accent-100-rgb:var(--studio-jetpack-green-100-rgb);--color-link:var(--studio-jetpack-green-40);--color-link-rgb:var(--studio-jetpack-green-40-rgb);--color-link-dark:var(--studio-jetpack-green-60);--color-link-dark-rgb:var(--studio-jetpack-green-60-rgb);--color-link-light:var(--studio-jetpack-green-20);--color-link-light-rgb:var(--studio-jetpack-green-20-rgb);--color-link-0:var(--studio-jetpack-green-0);--color-link-0-rgb:var(--studio-jetpack-green-0-rgb);--color-link-5:var(--studio-jetpack-green-5);--color-link-5-rgb:var(--studio-jetpack-green-5-rgb);--color-link-10:var(--studio-jetpack-green-10);--color-link-10-rgb:var(--studio-jetpack-green-10-rgb);--color-link-20:var(--studio-jetpack-green-20);--color-link-20-rgb:var(--studio-jetpack-green-20-rgb);--color-link-30:var(--studio-jetpack-green-30);--color-link-30-rgb:var(--studio-jetpack-green-30-rgb);--color-link-40:var(--studio-jetpack-green-40);--color-link-40-rgb:var(--studio-jetpack-green-40-rgb);--color-link-50:var(--studio-jetpack-green-50);--color-link-50-rgb:var(--studio-jetpack-green-50-rgb);--color-link-60:var(--studio-jetpack-green-60);--color-link-60-rgb:var(--studio-jetpack-green-60-rgb);--color-link-70:var(--studio-jetpack-green-70);--color-link-70-rgb:var(--studio-jetpack-green-70-rgb);--color-link-80:var(--studio-jetpack-green-80);--color-link-80-rgb:var(--studio-jetpack-green-80-rgb);--color-link-90:var(--studio-jetpack-green-90);--color-link-90-rgb:var(--studio-jetpack-green-90-rgb);--color-link-100:var(--studio-jetpack-green-100);--color-link-100-rgb:var(--studio-jetpack-green-100-rgb);--color-masterbar-background:var(--studio-white);--color-masterbar-border:var(--studio-gray-5);--color-masterbar-text:var(--studio-gray-50);--color-masterbar-item-hover-background:var(--studio-white);--color-masterbar-item-active-background:var(--studio-white);--color-masterbar-item-new-editor-background:var(--studio-white);--color-masterbar-item-new-editor-hover-background:var(--studio-white);--color-masterbar-unread-dot-background:var(--color-accent-30);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-white);--color-sidebar-background-rgb:var(--studio-white-rgb);--color-sidebar-border:var(--studio-gray-5);--color-sidebar-text:var(--studio-gray-60);--color-sidebar-text-rgb:var(--studio-gray-60-rgb);--color-sidebar-text-alternative:var(--studio-gray-60);--color-sidebar-gridicon-fill:var(--studio-gray-60);--color-sidebar-menu-selected-text:var(--studio-jetpack-green-50);--color-sidebar-menu-selected-text-rgb:var(--studio-jetpack-green-50-rgb);--color-sidebar-menu-selected-background:var(--studio-jetpack-green-5);--color-sidebar-menu-selected-background-rgb:var(--studio-jetpack-green-5-rgb);--color-sidebar-menu-hover-text:var(--studio-gray-90);--color-sidebar-menu-hover-background:var(--studio-gray-5);--color-sidebar-menu-hover-background-rgb:var(--studio-gray-5-rgb);--color-scary-0:var(--studio-red-0);--color-scary-5:var(--studio-red-5);--color-scary-40:var(--studio-red-40);--color-scary-50:var(--studio-red-50);--color-scary-60:var(--studio-red-60)}@media (max-width:480px){.domain-categories{margin-bottom:20px}.domain-categories .domain-categories__dropdown-button.components-button{display:block;margin-bottom:0}.domain-categories .domain-categories__item-group{display:none}.domain-categories.is-open .domain-categories__item-group{display:block}}.domain-categories__dropdown-button.components-button{width:100%;text-align:center;margin-bottom:8px;height:40px;border:1px solid #dcdcde;border:1px solid var(--studio-gray-5);display:none}.domain-categories__dropdown-button.components-button>*{vertical-align:middle}.domain-categories__dropdown-button.components-button svg{margin-left:5px}@media (max-width:480px){.domain-categories__item-group{text-align:center;border:1px solid #dcdcde;border:1px solid var(--studio-gray-5);margin-top:-1px}}.domain-categories__item .components-button{color:#101517;color:var(--studio-gray-100);width:100%;text-align:left}.domain-categories__item .components-button:focus,.domain-categories__item .components-button:hover{color:#101517;color:var(--studio-gray-100);box-shadow:none;font-weight:600;text-decoration:underline}.domain-categories__item.is-selected .components-button{font-weight:600;text-decoration:underline}@media (max-width:480px){.domain-categories__item .components-button{display:block;text-align:center}}html:not(.accessible-focus) .domain-categories__item .components-button:focus{box-shadow:none}
editor-domain-picker/dist/editor-domain-picker.js CHANGED
@@ -1 +1,12 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";n.r(t);n(2);var o,r=n(0);console.log("👋 Hi! I'm the editor-domain-picker bundle running!");var i=setInterval((function(){(o=Object(r.select)("automattic/domains/suggestions").getCategories()).length&&(console.log(o),clearInterval(i),i=void 0)}));setTimeout((function(){i&&(console.log("😢 Timed out before we were able to get Domain Categories."),clearInterval(i))}),5e3)},function(e,t){!function(){e.exports=this["a8c-fse-common-data-stores"]}()}]));
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,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=56)}([function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){t.log=function(){var e;return"object"==typeof console&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(40)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.primitives}()},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 s in r)n.call(r,s)&&r[s]&&e.push(s)}}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.i18n}()},function(e,t,n){"use strict";
7
+ /*!
8
+ * cookie
9
+ * Copyright(c) 2012-2014 Roman Shtylman
10
+ * Copyright(c) 2015 Douglas Christopher Wilson
11
+ * MIT Licensed
12
+ */t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},a=e.split(i),c=o.decode||r,u=0;u<a.length;u++){var l=a[u],f=l.indexOf("=");if(!(f<0)){var d=l.substr(0,f).trim(),p=l.substr(++f,l.length).trim();'"'==p[0]&&(p=p.slice(1,-1)),null==n[d]&&(n[d]=s(p,c))}}return n},t.serialize=function(e,t,n){var r=n||{},i=r.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var s=i(t);if(s&&!a.test(s))throw new TypeError("argument val is invalid");var c=e+"="+s;if(null!=r.maxAge){var u=r.maxAge-0;if(isNaN(u))throw new Error("maxAge should be a Number");c+="; Max-Age="+Math.floor(u)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");c+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");c+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");c+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(c+="; HttpOnly");r.secure&&(c+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return c};var r=decodeURIComponent,o=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(n){return e}}},function(e,t){var n,r=window.ProgressEvent,o=!!r;try{n=new r("loaded"),o="loaded"===n.type,n=null}catch(i){o=!1}e.exports=o?r:"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("Event");return n.initEvent(e,!1,!1),t?(n.lengthComputable=Boolean(t.lengthComputable),n.loaded=Number(t.loaded)||0,n.total=Number(t.total)||0):(n.lengthComputable=!1,n.loaded=n.total=0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.lengthComputable=Boolean(t.lengthComputable),n.loaded=Number(t.loaded)||0,n.total=Number(t.total)||0):(n.lengthComputable=!1,n.loaded=n.total=0),n}},,function(e,t,n){"use strict";var r=n(13),o=n(46);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var a=e.charCodeAt(o);a<128?n[r++]=a:a<2048?(n[r++]=a>>6|192,n[r++]=63&a|128):i(e,o)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++o)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=a(o)),n+=c(o.toString(16))}return n},t.zero2=s,t.zero8=c,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var a=new Array(i/4),s=0,c=t;s<a.length;s++,c+=4){var u;u="big"===o?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],a[s]=u>>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,a=(i<r?1:0)+n+o;e[t]=a>>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,a,s){var c=0,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+i>>>0)<i?1:0,e+n+o+a+(c+=(u=u+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,a,s){return t+r+i+s>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,a,s,c,u){var l=0,f=t;return l+=(f=f+r>>>0)<t?1:0,l+=(f=f+i>>>0)<i?1:0,l+=(f=f+s>>>0)<s?1:0,e+n+o+a+c+(l+=(f=f+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,a,s,c,u){return t+r+i+s+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){var r=n(35),o=n(36),i=n(16),a=n(37);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},function(e,t){!function(){e.exports=this["a8c-fse-common-data-stores"]}()},function(e,t,n){var r=n(17);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(n):"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){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(38);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,n){"use strict";var r=n(12),o=n(47),i=n(48),a=n(13),s=r.sum32,c=r.sum32_4,u=r.sum32_5,l=i.ch32,f=i.maj32,d=i.s0_256,p=i.s1_256,m=i.g0_256,h=i.g1_256,v=o.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(y,v),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(h(n[r-2]),n[r-7],m(n[r-15]),n[r-16]);var o=this.h[0],i=this.h[1],v=this.h[2],g=this.h[3],y=this.h[4],b=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var E=u(_,p(y),l(y,b,w),this.k[r],n[r]),C=s(d(o),f(o,i,v));_=w,w=b,b=y,y=s(g,E),g=v,v=i,i=o,o=s(E,C)}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],v),this.h[3]=s(this.h[3],g),this.h[4]=s(this.h[4],y),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],_)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var o,i,a,s;if(u(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=l(e))>0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=d.bind(r);return o.listener=n,r.wrapFn=o,o}function m(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):v(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=v(c,u);for(n=0;n<u;++n)i(l[n],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,a;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(49),o=n(50),i=o;i.v1=r,i.v4=o,e.exports=i},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){var r=n(53),o=n(55);function i(e,t){if(t)if("number"==typeof t)a(e,t);else{t.status_code&&a(e,t.status_code),t.error&&(e.name=c(t.error)),t.error_description&&(e.message=t.error_description);var n=t.errors;if(n)i(e,n.length?n[0]:n);for(var r in t)e[r]=t[r];e.status&&(t.method||t.path)&&s(e)}}function a(e,t){e.name=c(o[t]),e.status=e.statusCode=t,s(e)}function s(e){var t=e.status,n=e.method,r=e.path,o=t+" status code",i=n||r;i&&(o+=' for "'),n&&(o+=n),i&&(o+=" "),r&&(o+=r),i&&(o+='"'),e.message=o}function c(e){return r(String(e).replace(/error$/i,""),"error")}e.exports=function e(){for(var t=new Error,n=0;n<arguments.length;n++)i(t,arguments[n]);"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(t,e);return t}},function(e,t){!function(){e.exports=this.ReactDOM}()},,,,,,,,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,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==s.return||s.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){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){},function(e,t,n){var r=n(41);e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var a=r,s=Number(new Date),c=s-(n||s);a.diff=c,a.prev=n,a.curr=s,n=s,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var u=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;u++;var r=o.formatters[n];if("function"==typeof r){var i=t[u];e=r.call(a,i),t.splice(u,1),u--}return e})),o.formatArgs.call(a,t);var l=a.log||o.log;l.apply(a,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=a,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function a(e,t){var n=o(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},o.disable=function(){var e=[].concat(r(o.names.map(s)),r(o.skips.map(s).map((function(e){return"-"+e})))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(45),Object.keys(e).forEach((function(t){o[t]=e[t]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t,n){var r=n(42),o=n(43),i=n(16),a=n(44);e.exports=function(e){return r(e)||o(e)||i(e)||a()}},function(e,t,n){var r=n(17);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){var n=1e3,r=6e4,o=60*r,i=24*o;function a(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return a(e,t,i,"day");if(t>=o)return a(e,t,o,"hour");if(t>=r)return a(e,t,r,"minute");if(t>=n)return a(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";var r=n(12),o=n(13);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},function(e,t,n){"use strict";var r=n(12).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function a(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?a(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=a,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){var r,o,i=n(18),a=n(19),s=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,l=t||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==d){var p=i();null==f&&(f=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:c+1,v=m-s+(h-c)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||m>s)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=m,c=h,o=d;var g=(1e4*(268435455&(m+=122192928e5))+h)%4294967296;l[u++]=g>>>24&255,l[u++]=g>>>16&255,l[u++]=g>>>8&255,l[u++]=255&g;var y=m/4294967296*1e4&268435455;l[u++]=y>>>8&255,l[u++]=255&y,l[u++]=y>>>24&15|16,l[u++]=y>>>16&255,l[u++]=d>>>8|128,l[u++]=255&d;for(var b=0;b<6;++b)l[u+b]=f[b];return t||a(l)}},function(e,t,n){var r=n(18),o=n(19);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(54);e.exports=function(){var e=r.apply(r,arguments);return e.charAt(0).toUpperCase()+e.slice(1)}},function(e,t,n){"use strict";e.exports=function(){var e=[].map.call(arguments,(function(e){return e.trim()})).filter((function(e){return e.length})).join("-");return e.length?1!==e.length&&/[_.\- ]+/.test(e)?e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(function(e,t){return t.toUpperCase()})):e[0]===e[0].toLowerCase()&&e.slice(1)!==e.slice(1).toLowerCase()?e:e.toLowerCase():""}},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"getSite",(function(){return Z}));var o={};n.r(o),n.d(o,"getState",(function(){return Y})),n.d(o,"getNewSite",(function(){return ee})),n.d(o,"getNewSiteError",(function(){return te})),n.d(o,"isFetchingSite",(function(){return ne})),n.d(o,"isNewSite",(function(){return re})),n.d(o,"getSite",(function(){return oe}));var i={};n.r(i),n.d(i,"register",(function(){return ae}));var a=n(0),s=n.n(a),c=(n(15),n(14)),u=n.n(c),l=n(1),f=n(2),d="automattic/site";var p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function m(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function h(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var v=Object(f.combineReducers)({data:function(e,t){return"RECEIVE_NEW_SITE"===t.type?t.response.blog_details:"RECEIVE_NEW_SITE_FAILED"!==t.type&&"RESET_SITE_STORE"!==t.type?e:void 0},error:function(e,t){switch(t.type){case"FETCH_NEW_SITE":case"RECEIVE_NEW_SITE":case"RESET_SITE_STORE":case"RESET_RECEIVE_NEW_SITE_FAILED":return;case"RECEIVE_NEW_SITE_FAILED":return{error:t.error.error,status:t.error.status,statusCode:t.error.statusCode,name:t.error.name,message:t.error.message}}return e},isFetching:function(e,t){switch(void 0===e&&(e=!1),t.type){case"FETCH_NEW_SITE":return!0;case"RECEIVE_NEW_SITE":case"RECEIVE_NEW_SITE_FAILED":case"RESET_SITE_STORE":case"RESET_RECEIVE_NEW_SITE_FAILED":return!1}return e}}),g=Object(f.combineReducers)({newSite:v,sites:function(e,t){var n;if(void 0===e&&(e={}),"RECEIVE_SITE"===t.type)return p(p({},e),((n={})[t.siteId]=t.response,n));if("RECEIVE_SITE_FAILED"===t.type){var r=e,o=t.siteId,i=(r[o],m(r,["symbol"==typeof o?o:o+""]));return p({},i)}return"RESET_SITE_STORE"===t.type?{}:e}}),y="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),b=new Uint8Array(16);function w(){if(!y)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y(b)}for(var _=[],E=0;E<256;++E)_[E]=(E+256).toString(16).substr(1);var C=function(e,t){var n=t||0,r=_;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var S,O=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||w)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[r+i]=o[i];return t||C(o)},x=n(26),j=n.n(x),F=n(10),k=n.n(F),R=n(4),I=n.n(R),A=I()("wpcom-proxy-request"),T="https://public-api.wordpress.com",L=window.location.protocol+"//"+window.location.host,N=function(){var e=!1;try{window.postMessage({toString:function(){e=!0}},"*")}catch(t){}return e}(),P=function(){try{return new window.File(["a"],"test.jpg",{type:"image/jpeg"}),!0}catch(e){return!1}}(),M=null,D=!1,V={},q=!!window.ProgressEvent&&!!window.FormData;A('using "origin": %o',L);var U=function(e,t){var n=Object.assign({},e);A("request(%o)",n),M||G();var r=O();n.callback=r,n.supports_args=!0,n.supports_error_obj=!0,n.supports_progress=q,n.method=String(n.method||"GET").toUpperCase(),A("params object: %o",n);var o=new window.XMLHttpRequest;if(o.params=n,V[r]=o,"function"==typeof t){var i=!1,a=function(e){if(!i){i=!0;var n=e.error||e.err||e;A("error: ",n),A("headers: ",e.headers),t(n,null,e.headers)}};o.addEventListener("load",(function(e){if(!i){i=!0;var n=e.response||o.response;A("body: ",n),A("headers: ",e.headers),t(null,n,e.headers)}})),o.addEventListener("abort",a),o.addEventListener("error",a)}return D?W(n):(A("buffering API request since proxying <iframe> is not yet loaded"),S.push(n)),o},z=function(e,t){return"function"==typeof t?U(e,t):new Promise((function(t,n){U(e,(function(e,r){e?n(e):t(r)}))}))};function W(e){A("sending API request to proxy <iframe> %o",e),e.formData&&function(e){if(!window.chrome||!P)return;for(var t=0;t<e.length;t++){var n=H(e[t][1]);n&&(e[t][1]=new window.File([n],n.name,{type:n.type}))}}(e.formData),M.contentWindow.postMessage(N?JSON.stringify(e):e,T)}function B(e){return e&&"[object File]"===Object.prototype.toString.call(e)}function H(e){return B(e)?e:"object"==typeof e&&B(e.fileContents)?e.fileContents:null}function G(){A("install()"),M&&(A("uninstall()"),window.removeEventListener("message",$),document.body.removeChild(M),D=!1,M=null),S=[],window.addEventListener("message",$),(M=document.createElement("iframe")).src=T+"/wp-admin/rest-proxy/?v=2.0#"+L,M.style.display="none",document.body.appendChild(M)}function $(e){if(A("onmessage"),e.origin===T){var t=e.data;if(!t)return A("no `data`, bailing");if("ready"!==t){if(N&&"string"==typeof t&&(t=JSON.parse(t)),t.upload||t.download)return function(e){A('got "progress" event: %o',e);var t=V[e.callbackId];if(t){var n=new k.a("progress",e);(e.upload?t.upload:t).dispatchEvent(n)}}(t);if(!t.length)return A("`e.data` doesn't appear to be an Array, bailing...");var n=t[t.length-1];if(!(n in V))return A("bailing, no matching request with callback: %o",n);var r=V[n],o=r.params,i=t[0],a=t[1],s=t[2];if(207===a||delete V[n],o.metaAPI?a="metaAPIupdated"===i?200:500:A("got %o status code for URL: %o",a,o.path),"object"==typeof s&&(s.status=a),a&&2===Math.floor(a/100))!function(e,t,n){var r=new k.a("load");r.data=r.body=r.response=t,r.headers=n,e.dispatchEvent(r)}(r,i,s);else!function(e,t,n){var r=new k.a("error");r.error=r.err=t,r.headers=n,e.dispatchEvent(r)}(r,j()(o,a,i),s)}else!function(){if(A('proxy <iframe> "load" event'),D=!0,S){for(var e=0;e<S.length;e++)W(S[e]);S=null}}()}else A("ignoring message... %o !== %o",e.origin,T)}var J=z,X=function(e){return{type:"WPCOM_REQUEST",request:e}},K={WPCOM_REQUEST:function(e){var t=e.request;return J(t)},FETCH_AND_PARSE:function(e){var t,n,r,o,i=e.resource,a=e.options;return t=void 0,n=void 0,o=function(){var e,t;return h(this,(function(n){switch(n.label){case 0:return[4,window.fetch(i,a)];case 1:return e=n.sent(),t={ok:e.ok},[4,e.json()];case 2:return[2,(t.body=n.sent(),t)]}}))},new((r=void 0)||(r=Promise))((function(e,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(t){t.done?e(t.value):new r((function(e){e(t.value)})).then(a,s)}c((o=o.apply(t,n||[])).next())}))},RELOAD_PROXY:function(){G()},REQUEST_ALL_BLOGS_ACCESS:function(){return z({metaAPI:{accessAllUsersBlogs:!0}})},WAIT:function(e){var t=e.ms;return new Promise((function(e){return setTimeout(e,t)}))}};function Q(e){var t=function(){return{type:"FETCH_NEW_SITE"}},n=function(e){return{type:"RECEIVE_NEW_SITE",response:e}},r=function(e){return{type:"RECEIVE_NEW_SITE_FAILED",error:e}};return{fetchNewSite:t,receiveNewSite:n,receiveNewSiteFailed:r,resetNewSiteFailed:function(){return{type:"RESET_RECEIVE_NEW_SITE_FAILED"}},createSite:function(t){var o,i,a,s,c,u;return h(this,(function(l){switch(l.label){case 0:return[4,{type:"FETCH_NEW_SITE"}];case 1:l.sent(),l.label=2;case 2:return l.trys.push([2,5,,7]),o=t.authToken,i=m(t,["authToken"]),a={client_id:e.client_id,client_secret:e.client_secret,find_available_url:!0,public:-1},s=p(p(p({},a),i),{validate:!1}),[4,X({path:"/sites/new",apiVersion:"1.1",method:"post",body:s,token:o})];case 3:return c=l.sent(),[4,n(c)];case 4:return l.sent(),[2,!0];case 5:return u=l.sent(),[4,r(u)];case 6:return l.sent(),[2,!1];case 7:return[2]}}))},receiveSite:function(e,t){return{type:"RECEIVE_SITE",siteId:e,response:t}},receiveSiteFailed:function(e,t){return{type:"RECEIVE_SITE_FAILED",siteId:e,response:t}},reset:function(){return{type:"RESET_SITE_STORE"}}}}function Z(e){var t;return h(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,5]),[4,X({path:"/sites/"+encodeURIComponent(e),apiVersion:"1.1"})];case 1:return t=n.sent(),[4,Object(f.dispatch)(d).receiveSite(e,t)];case 2:return n.sent(),[3,5];case 3:return n.sent(),[4,Object(f.dispatch)(d).receiveSiteFailed(e,void 0)];case 4:return n.sent(),[3,5];case 5:return[2]}}))}var Y=function(e){return e},ee=function(e){return e.newSite.data},te=function(e){return e.newSite.error},ne=function(e){return e.newSite.isFetching},re=function(e){return!!e.newSite.data},oe=function(e,t){return e.sites[t]},ie=!1;function ae(e){return ie||(ie=!0,Object(f.registerStore)(d,{actions:Q(e),controls:K,reducer:g,resolvers:r,selectors:o})),d}var se=n(20),ce=n.n(se),ue=n(21),le=n.n(ue),fe=n(3),de=n(5);function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function me(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 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}var ve=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,o=me(e,["icon","size"]);return Object(l.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){pe(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))},ge=n(6),ye=Object(l.createElement)(ge.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(ge.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),be=I()("calypso:analytics");n(22);"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}));n(9);var we=n(23),_e=I()("lib/load-script/callback-handler"),Ee=new Map;function Ce(){return Ee}function Se(e){return Ce().has(e)}function Oe(e,t){var n=Ce();Se(e)?(_e('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(_e('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Ce(),r=n.get(e);if(r){var o='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));_e(o),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function je(){var e=this.getAttribute("src");_e('Handling successful request for "'.concat(e,'"')),xe(e),this.onload=null}function Fe(){var e=this.getAttribute("src");_e('Handling failed request for "'.concat(e,'"')),xe(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}var ke=I()("lib/load-script/dom-operations");I()("package/load-script");function Re(e,t){var n;if(!Se(e)&&(n=function(e){ke('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=je,t.onerror=Fe,t}(e),ke("Attaching element to head"),document.head.appendChild(n)),"function"!=typeof t)return new Promise((function(t,n){Oe(e,(function(e){null===e?t():n(e)}))}));Oe(e,t)}var Ie,Ae=["a8c_cookie_banner_ok","wcadmin_storeprofiler_create_jetpack_account","wcadmin_storeprofiler_connect_store","wcadmin_storeprofiler_login_jetpack_account","wcadmin_storeprofiler_payment_login","wcadmin_storeprofiler_payment_create_account"];Promise.resolve();function Te(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&Re("//stats.wp.com/w.js?61");var Le=new we.EventEmitter;function Ne(e,t){if(be('Record event "%s" called with props %o',e,t=t||{}),e.startsWith("calypso_")||Object(de.includes)(Ae,e)){if(Ie){var n=Ie(t);t=p(p({},t),n)}t=Object(de.omitBy)(t,de.isUndefined),be('Recording event "%s" with actual props %o',e,t),Te(["recordEvent",e,t]),Le.emit("record-event",e,t)}else be('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}var Pe=n(24);var Me=n(8),De=n(25),Ve=a.createContext(Ue()),qe=function(){return a.useContext(Ve)};Object(De.createHigherOrderComponent)((function(e){return function(t){var n=qe();return a.createElement(e,p({},n,t))}}),"withI18n");function Ue(e){var t,n,r=Object(Me.createI18n)(e),o=null!==(n=null===(t=null==e?void 0:e[""])||void 0===t?void 0:t.localeSlug)&&void 0!==n?n:"en";return{__:r.__.bind(r),_n:r._n.bind(r),_nx:r._nx.bind(r),_x:r._x.bind(r),isRTL:r.isRTL.bind(r),i18nLocale:o}}var ze=n(7),We=n.n(ze),Be="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),He=new Uint8Array(16);function Ge(){if(!Be)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Be(He)}for(var $e=[],Je=0;Je<256;++Je)$e[Je]=(Je+256).toString(16).substr(1);var Xe=function(e,t){var n=t||0,r=$e;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var Ke=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||Ge)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[r+i]=o[i];return t||Xe(o)},Qe=Object(l.createElement)(ge.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(l.createElement)(ge.Path,{d:"M2 11V9h12l-4-4 1-2 7 7-7 7-1-2 4-4H2z"})),Ze=function(e){var t=e.suggestion,n=e.railcarId,r=e.isRecommended,o=void 0!==r&&r,i=e.onSelect,c=e.onRender,u=qe().__,f=t.domain_name,d=f.indexOf("."),p=f.slice(0,d),m=f.slice(d),h=Object(a.useState)(),v=h[0],g=h[1],y=Object(a.useState)(),b=y[0],w=y[1],_=Ke();Object(a.useEffect)((function(){f!==v&&b!==n&&n&&(c(),g(f),w(n))}),[f,v,b,n,c]);return s.a.createElement("button",{type:"button",className:We()("domain-picker__suggestion-item",{"is-free":t.is_free}),onClick:function(){b&&function(e){Ne("calypso_traintracks_interact",{railcar:e.railcarId,action:e.action})}({action:"domain_selected",railcarId:b}),i(t)},id:_},s.a.createElement("div",{className:"domain-picker__suggestion-item-name"},s.a.createElement("span",{className:"domain-picker__domain-name"},p),s.a.createElement("span",{className:"domain-picker__domain-tld"},m),o&&s.a.createElement("div",{className:"domain-picker__badge is-recommended"},u("Recommended"))),s.a.createElement("div",{className:We()("domain-picker__price",{"is-paid":!t.is_free})},t.is_free?u("Free"):s.a.createElement(s.a.Fragment,null,s.a.createElement("span",{className:"domain-picker__price-long"},Object(l.createInterpolateElement)(Object(Me.sprintf)(u("Included in paid plan, <strikethrough>%s/year</strikethrough>"),t.cost),{strikethrough:s.a.createElement("span",{className:"domain-picker__price-cost"})})),s.a.createElement("span",{className:"domain-picker__price-short domain-picker__price-cost"},Object(Me.sprintf)(u("%s/year"),t.cost)))),s.a.createElement("div",{className:"domain-picker__suggestion-item-select-button"},s.a.createElement("span",null,u("Select")),s.a.createElement(ve,{icon:Qe,size:18})))},Ye=function(){return s.a.createElement("div",{className:"domain-picker__suggestion-item placeholder"},s.a.createElement("div",{className:"domain-picker__suggestion-item-name placeholder"}),s.a.createElement("div",{className:"domain-picker__price placeholder"}))};function et(e,t){return e===t}function tt(e,t,n){var r=n&&n.equalityFn?n.equalityFn:et,o=Object(a.useState)(e),i=o[0],s=o[1],c=function(e,t,n){void 0===n&&(n={});var r=n.maxWait,o=Object(a.useRef)(null),i=Object(a.useRef)([]),s=n.leading,c=Object(a.useRef)(!1),u=Object(a.useRef)(null),l=Object(a.useRef)(!1),f=Object(a.useRef)(e);f.current=e;var d=Object(a.useCallback)((function(){clearTimeout(u.current),clearTimeout(o.current),o.current=null,i.current=[],u.current=null,c.current=!1}),[]);return Object(a.useEffect)((function(){return function(){l.current=!0}}),[]),[Object(a.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(i.current=e,clearTimeout(u.current),!u.current&&s&&!c.current)return f.current.apply(f,e),void(c.current=!0);u.current=setTimeout((function(){d(),l.current||f.current.apply(f,e)}),t),r&&!o.current&&(o.current=setTimeout((function(){var e=i.current;d(),l.current||f.current.apply(null,e)}),r))}),[r,t,d,s]),d,function(){u.current&&(f.current.apply(null,i.current),d())}]}(Object(a.useCallback)((function(e){return s(e)}),[]),t,n),u=c[0],l=c[1],f=Object(a.useRef)(e);return Object(a.useEffect)((function(){r(f.current,e)||(u(e),f.current=e)}),[e,u,r]),[i,l]}var nt=Object(l.createElement)(ge.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(ge.Path,{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),rt=(n(52),function(e){var t=e.onSelect,n=e.selected,r=qe().__,o=Object(l.useState)(!1),i=o[0],s=o[1],c=function(e){s(!1),t(e)},u=Object(f.useSelect)((function(e){return e("automattic/domains/suggestions").getCategories()}));return a.createElement("div",{className:We()("domain-categories",{"is-open":i})},a.createElement(fe.Button,{className:"domain-categories__dropdown-button",onClick:function(){return s(!i)}},a.createElement("span",null,n||r("All Categories")),a.createElement(ve,{icon:nt,size:16})),a.createElement("ul",{className:"domain-categories__item-group"},a.createElement("li",{className:We()("domain-categories__item",{"is-selected":!n})},a.createElement(fe.Button,{onClick:function(){return c()}},r("View all"))),u.map((function(e){var t=e.slug,r=e.title;return a.createElement("li",{key:t,className:We()("domain-categories__item",{"is-selected":t===n})},a.createElement(fe.Button,{onClick:function(){return c(t)}},r))}))))}),ot=function(){return s.a.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 300 40",xmlSpace:"preserve",width:"300"},s.a.createElement("rect",{x:"0",width:"310",height:"50",rx:"10",fill:"#D8D8D8"}),s.a.createElement("rect",{x:"8",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),s.a.createElement("rect",{x:"40",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),s.a.createElement("rect",{x:"72",y:"8",width:"300",height:"25",rx:"5",fill:"#fff"}),s.a.createElement("text",{x:"80",y:"26",fontFamily:"roboto",fill:"#999"},"https://"),s.a.createElement("text",{x:"133",y:"26",fontFamily:"roboto",fill:"#515151"},"example.com"))},it=(n(51),function(e){var t,n=e.header,r=e.showDomainCategories,o=e.onDomainSelect,i=e.quantity,c=void 0===i?5:i,u=e.quantityExpanded,l=void 0===u?10:u,d=e.analyticsFlowId,p=e.analyticsUiAlgo,m=e.initialDomainSearch,h=void 0===m?"":m,v=e.onSetDomainSearch,g=qe().__,y=g("Search for a domain"),b=Object(a.useState)(!1),w=b[0],_=b[1],E=Object(a.useState)(h),C=E[0],S=E[1],O=Object(a.useState)(),x=O[0],j=O[1],F=Object(f.useSelect)((function(e){return e("automattic/domains/suggestions").getDomainSuggestionVendor()})),k=function(e,t,n,r){void 0===e&&(e=""),void 0===r&&(r="en");var o=tt(e,300)[0];return Object(f.useSelect)((function(e){if(o)return e("automattic/domains/suggestions").getDomainSuggestions(o,{include_wordpressdotcom:!0,include_dotblogsubdomain:!1,quantity:t+1,locale:r,category_slug:n})}),[o,n,t])}(C.trim(),l,x,qe().i18nLocale),R=null==k?void 0:k.slice(0,w?l:c);if(R&&R.length>1){var I=R.findIndex((function(e){return e.is_free}));if(I>-1){var A=R[1];R[1]=R[I],R[I]=A}}Object(a.useEffect)((function(){_(!1)}),[C]);var T=Object(a.useState)(),L=T[0],N=T[1];Object(a.useEffect)((function(){var e;k&&N((void 0===(e="suggestion")&&(e="recommendation"),Object(Pe.v4)().replace(/-/g,"")+"-"+e))}),[k,N]);var P=function(e,t,n,r){var o="/domains/search/"+F+"/"+d+(x?"/"+x:""),i=e.domain_name;!function(e){Ne("calypso_traintracks_render",{railcar:e.railcarId,ui_algo:e.uiAlgo,ui_position:e.uiPosition,fetch_algo:e.fetchAlgo,rec_result:e.result,fetch_query:e.query})}({uiAlgo:"/"+d+"/"+p,fetchAlgo:o,query:C,railcarId:t,result:r?i+"#recommended":i,uiPosition:n})};return s.a.createElement("div",{className:"domain-picker"},n,s.a.createElement("div",{className:"domain-picker__search"},s.a.createElement("div",{className:"domain-picker__search-icon"},s.a.createElement(ve,{icon:ye})),s.a.createElement(fe.TextControl,{"data-hj-whitelist":!0,hideLabelFromVision:!0,label:y,placeholder:y,onChange:function(e){S(e),v(e)},value:C})),C.trim()?s.a.createElement("div",{className:"domain-picker__body"},r&&s.a.createElement("div",{className:"domain-picker__aside"},s.a.createElement(rt,{selected:x,onSelect:j})),s.a.createElement("div",{className:"domain-picker__suggestion-item-group"},null!==(t=null==R?void 0:R.map((function(e,t){return s.a.createElement(Ze,{key:e.domain_name,suggestion:e,railcarId:L?""+L+t:void 0,isRecommended:0===t,onRender:function(){return P(e,""+L+t,t,0===t)},onSelect:o})})))&&void 0!==t?t:Object(de.times)(c,(function(e){return s.a.createElement(Ye,{key:e})})),!w&&(null==k?void 0:k.length)&&(null==k?void 0:k.length)>c&&s.a.createElement("div",{className:"domain-picker__show-more"},s.a.createElement(fe.Button,{onClick:function(){return _(!0)}},g("View more results"))))):s.a.createElement("div",{className:"domain-picker__empty-state"},s.a.createElement("p",{className:"domain-picker__empty-state--text"},g("A domain name is the site address people type in their browser to visit your site.")),s.a.createElement("div",null,s.a.createElement(ot,null))))}),at=(n(39),function(e){var t=e.isOpen,n=e.onClose,r=le()(e,["isOpen","onClose"]);return t?Object(l.createElement)(fe.Modal,{className:"domain-picker-modal",overlayClassName:"domain-picker-modal-overlay",bodyOpenClassName:"has-domain-picker-modal",onRequestClose:n,title:""},Object(l.createElement)(it,ce()({showDomainCategories:!0},r))):null}),st=i.register({client_id:"",client_secret:""});function ct(){var e,t,n=a.useState(!1),r=u()(n,2),o=r[0],i=r[1],s=a.useState(""),c=u()(s,2),d=c[0],p=c[1],m=Object(f.useSelect)((function(e){return e(st).getSite(window._currentSiteId)})),h={domain_name:(null==m?void 0:m.URL)&&new URL(null==m?void 0:m.URL).hostname||"",is_free:null==m||null===(e=m.URL)||void 0===e?void 0:e.endsWith("wordpress.com")},v=null!==(t=d.trim()||(null==m?void 0:m.name))&&void 0!==t?t:"";return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(fe.Button,{"aria-expanded":o,"aria-haspopup":"menu","aria-pressed":o,onClick:function(){return i((function(e){return!e}))}},Object(l.createElement)("span",{className:"domain-picker-button__label"},"Domain: ".concat(h.domain_name)),Object(l.createElement)(ve,{icon:nt,size:22})),Object(l.createElement)(at,{analyticsFlowId:"gutenboarding",analyticsUiAlgo:"editor_domain_modal",initialDomainSearch:v,onSetDomainSearch:p,isOpen:o,showDomainConnectButton:!0,showDomainCategories:!0,currentDomain:h,onDomainSelect:function(){return i(!1)},onClose:function(){return i(!1)}}))}var ut=n(27),lt=setInterval((function(){var e=document.querySelector(".edit-post-header__settings");if(e){clearInterval(lt);var t=document.createElement("div");e.prepend(t),ut.render(a.createElement(ct),t)}}))}]));
editor-domain-picker/dist/editor-domain-picker.rtl.css ADDED
@@ -0,0 +1 @@
 
1
+ @keyframes domain-picker-loading-fade{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.domain-picker__empty-state{display:flex;justify-content:center;align-items:center}.domain-picker__empty-state--text{max-width:320px;font-size:.9em;margin:0 10px;color:#555d66}.domain-picker__show-more{padding:10px;text-align:center}.domain-picker__search{position:relative;margin-bottom:20px}.domain-picker__search input[type=text].components-text-control__input{padding:6px 16px 6px 40px;height:38px;background:#f0f0f0;border:none}.domain-picker__search input[type=text].components-text-control__input:-ms-input-placeholder{color:#000;color:var(--studio-black)}.domain-picker__search input[type=text].components-text-control__input::-ms-input-placeholder{color:#000;color:var(--studio-black)}.domain-picker__search input[type=text].components-text-control__input::placeholder{color:#000;color:var(--studio-black)}.domain-picker__search input[type=text].components-text-control__input:focus{box-shadow:0 0 0 2px #5198d9;box-shadow:0 0 0 2px var(--studio-blue-30);background:#fff;background:var(--studio-white)}.domain-picker__search svg{position:absolute;top:6px;left:8px}.domain-picker__suggestion-item-group{flex-grow:1}.domain-picker__suggestion-item{font-size:14px;line-height:17px;display:flex;justify-content:space-between;align-items:center;width:100%;min-height:58px;border:1px solid #dcdcde;border:1px solid var(--studio-gray-5);padding:10px 14px;margin:0;position:relative;z-index:1;text-align:right;cursor:pointer}.domain-picker__suggestion-item.placeholder{cursor:default}.domain-picker__suggestion-item:focus:not(.placeholder),.domain-picker__suggestion-item:hover:not(.placeholder){background:#e9eff5;background:var(--studio-blue-0);border-color:#3582c4;border-color:var(--studio-blue-40);z-index:2}@media (min-width:600px){.domain-picker__suggestion-item:focus .domain-picker__suggestion-item-select-button,.domain-picker__suggestion-item:hover .domain-picker__suggestion-item-select-button{opacity:1}.domain-picker__suggestion-item:focus .domain-picker__price,.domain-picker__suggestion-item:hover .domain-picker__price{opacity:0}}.domain-picker__suggestion-item+.domain-picker__suggestion-item{margin-top:-1px}.domain-picker__suggestion-item:nth-child(7){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:0ms}.domain-picker__suggestion-item:nth-child(8){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:40ms}.domain-picker__suggestion-item:nth-child(9){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:80ms}.domain-picker__suggestion-item:nth-child(10){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:.12s}.domain-picker__suggestion-item:nth-child(11){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:.16s}.domain-picker__suggestion-item:nth-child(12){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:.2s}.domain-picker__suggestion-item:nth-child(13){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:.24s}.domain-picker__suggestion-item:nth-child(14){transform:translateY(20px);opacity:0;animation:domain-picker-item-slide-up .1s ease-in forwards;animation-delay:.28s}@keyframes domain-picker-item-slide-up{to{transform:translateY(0);opacity:1}}.domain-picker__suggestion-item-name{flex-grow:1;margin-left:24px;letter-spacing:.4px}.domain-picker__suggestion-item-name .domain-picker__domain-name{word-break:break-word}.domain-picker__suggestion-item-name.placeholder{animation:domain-picker-loading-fade 1.6s ease-in-out infinite;background:#f3f4f5;color:transparent;max-width:30%;margin-left:auto}.domain-picker__suggestion-item-name.placeholder:after{content:"\00a0"}.domain-picker__domain-tld{color:#3582c4;color:var(--studio-blue-40);margin-left:10px}.domain-picker__badge{display:inline-flex;border-radius:2px;padding:0 10px;line-height:20px;height:20px;align-items:center;font-size:10px;text-transform:uppercase;vertical-align:middle;background-color:#2271b1;background-color:var(--studio-blue-50);color:#fff;color:var(--color-text-inverted)}.domain-picker__price{color:#787c82;color:var(--studio-gray-40);text-align:left;flex-basis:0;transition:opacity .2s ease-in-out}.domain-picker__price:not(.is-paid){display:none}@media (min-width:600px){.domain-picker__price{flex-basis:auto}.domain-picker__price:not(.is-paid){display:inline}}.domain-picker__price.placeholder{animation:domain-picker-loading-fade 1.6s ease-in-out infinite;background:#f3f4f5;color:transparent;min-width:64px}.domain-picker__price.placeholder:after{content:"\00a0"}.domain-picker__price-long{display:none}@media (min-width:600px){.domain-picker__price-long{display:inline}}.domain-picker__price-short{display:inline}@media (min-width:600px){.domain-picker__price-short{display:none}}.domain-picker__price-cost{text-decoration:line-through}.domain-picker__suggestion-item-select-button{display:flex;align-items:center;height:36px}.domain-picker__suggestion-item-select-button span{display:none}.domain-picker__suggestion-item-select-button svg{fill:#2271b1;fill:var(--studio-blue-50);margin-right:10px;margin-left:-2px}@media (min-width:600px){.domain-picker__suggestion-item-select-button{background:#007cba;color:#fff;color:var(--studio-white);border-radius:2px;padding:0 12px;opacity:0;transition:opacity .2s ease-in-out;position:absolute;left:14px}.domain-picker__suggestion-item-select-button:hover{background:#0070a7}.domain-picker__suggestion-item-select-button span{display:inline-block}.domain-picker__suggestion-item-select-button svg{display:none}}.domain-picker__body{display:flex}@media (max-width:480px){.domain-picker__body{display:block}.domain-picker__body .domain-picker__aside{width:100%;padding:0}}.domain-picker__aside{width:220px;padding-left:30px}:root{--studio-white:#fff;--studio-black:#000;--studio-gray-0:#f6f7f7;--studio-gray-5:#dcdcde;--studio-gray-10:#c3c4c7;--studio-gray-20:#a7aaad;--studio-gray-30:#8c8f94;--studio-gray-40:#787c82;--studio-gray-50:#646970;--studio-gray-60:#50575e;--studio-gray-70:#3c434a;--studio-gray-80:#2c3338;--studio-gray-90:#1d2327;--studio-gray-100:#101517;--studio-gray:#646970;--studio-blue-0:#e9eff5;--studio-blue-5:#c5d9ed;--studio-blue-10:#9ec2e6;--studio-blue-20:#72aee6;--studio-blue-30:#5198d9;--studio-blue-40:#3582c4;--studio-blue-50:#2271b1;--studio-blue-60:#135e96;--studio-blue-70:#0a4b78;--studio-blue-80:#043959;--studio-blue-90:#01263a;--studio-blue-100:#00131c;--studio-blue:#2271b1;--studio-purple-0:#f2e9ed;--studio-purple-5:#ebcee0;--studio-purple-10:#e3afd5;--studio-purple-20:#d48fc8;--studio-purple-30:#c475bd;--studio-purple-40:#b35eb1;--studio-purple-50:#984a9c;--studio-purple-60:#7c3982;--studio-purple-70:#662c6e;--studio-purple-80:#4d2054;--studio-purple-90:#35163b;--studio-purple-100:#1e0c21;--studio-purple:#984a9c;--studio-pink-0:#f5e9ed;--studio-pink-5:#f2ceda;--studio-pink-10:#f7a8c3;--studio-pink-20:#f283aa;--studio-pink-30:#eb6594;--studio-pink-40:#e34c84;--studio-pink-50:#c9356e;--studio-pink-60:#ab235a;--studio-pink-70:#8c1749;--studio-pink-80:#700f3b;--studio-pink-90:#4f092a;--studio-pink-100:#260415;--studio-pink:#c9356e;--studio-red-0:#f7ebec;--studio-red-5:#facfd2;--studio-red-10:#ffabaf;--studio-red-20:#ff8085;--studio-red-30:#f86368;--studio-red-40:#e65054;--studio-red-50:#d63638;--studio-red-60:#b32d2e;--studio-red-70:#8a2424;--studio-red-80:#691c1c;--studio-red-90:#451313;--studio-red-100:#240a0a;--studio-red:#d63638;--studio-orange-0:#f5ece6;--studio-orange-5:#f7dcc6;--studio-orange-10:#ffbf86;--studio-orange-20:#faa754;--studio-orange-30:#e68b28;--studio-orange-40:#d67709;--studio-orange-50:#b26200;--studio-orange-60:#8a4d00;--studio-orange-70:#704000;--studio-orange-80:#543100;--studio-orange-90:#361f00;--studio-orange-100:#1f1200;--studio-orange:#b26200;--studio-yellow-0:#f5f1e1;--studio-yellow-5:#f5e6b3;--studio-yellow-10:#f2d76b;--studio-yellow-20:#f0c930;--studio-yellow-30:#deb100;--studio-yellow-40:#c08c00;--studio-yellow-50:#9d6e00;--studio-yellow-60:#7d5600;--studio-yellow-70:#674600;--studio-yellow-80:#4f3500;--studio-yellow-90:#320;--studio-yellow-100:#1c1300;--studio-yellow:#9d6e00;--studio-green-0:#e6f2e8;--studio-green-5:#b8e6bf;--studio-green-10:#68de86;--studio-green-20:#1ed15a;--studio-green-30:#00ba37;--studio-green-40:#00a32a;--studio-green-50:#008a20;--studio-green-60:#007017;--studio-green-70:#005c12;--studio-green-80:#00450c;--studio-green-90:#003008;--studio-green-100:#001c05;--studio-green:#008a20;--studio-celadon-0:#e4f2ed;--studio-celadon-5:#a7e8d4;--studio-celadon-10:#63d6b6;--studio-celadon-20:#2ebd99;--studio-celadon-30:#09a884;--studio-celadon-40:#009172;--studio-celadon-50:#007e65;--studio-celadon-60:#006753;--studio-celadon-70:#005042;--studio-celadon-80:#003b30;--studio-celadon-90:#002721;--studio-celadon-100:#001c17;--studio-celadon:#007e65;--studio-wordpress-blue-0:#e6f1f5;--studio-wordpress-blue-5:#bedae6;--studio-wordpress-blue-10:#98c6d9;--studio-wordpress-blue-20:#6ab3d0;--studio-wordpress-blue-30:#3895ba;--studio-wordpress-blue-40:#187aa2;--studio-wordpress-blue-50:#006088;--studio-wordpress-blue-60:#004e6e;--studio-wordpress-blue-70:#003c56;--studio-wordpress-blue-80:#002c40;--studio-wordpress-blue-90:#001d2d;--studio-wordpress-blue-100:#00101c;--studio-wordpress-blue:#006088;--studio-simplenote-blue-0:#e9ecf5;--studio-simplenote-blue-5:#ced9f2;--studio-simplenote-blue-10:#abc1f5;--studio-simplenote-blue-20:#84a4f0;--studio-simplenote-blue-30:#618df2;--studio-simplenote-blue-40:#4678eb;--studio-simplenote-blue-50:#3361cc;--studio-simplenote-blue-60:#1d4fc4;--studio-simplenote-blue-70:#113ead;--studio-simplenote-blue-80:#0d2f85;--studio-simplenote-blue-90:#09205c;--studio-simplenote-blue-100:#05102e;--studio-simplenote-blue:#3361cc;--studio-woocommerce-purple-0:#f7edf7;--studio-woocommerce-purple-5:#e5cfe8;--studio-woocommerce-purple-10:#d6b4e0;--studio-woocommerce-purple-20:#c792e0;--studio-woocommerce-purple-30:#af7dd1;--studio-woocommerce-purple-40:#9a69c7;--studio-woocommerce-purple-50:#7f54b3;--studio-woocommerce-purple-60:#674399;--studio-woocommerce-purple-70:#533582;--studio-woocommerce-purple-80:#3c2861;--studio-woocommerce-purple-90:#271b3d;--studio-woocommerce-purple-100:#140e1f;--studio-woocommerce-purple:#7f54b3;--studio-jetpack-green-0:#f0f2eb;--studio-jetpack-green-5:#d0e6b8;--studio-jetpack-green-10:#9dd977;--studio-jetpack-green-20:#64ca43;--studio-jetpack-green-30:#2fb41f;--studio-jetpack-green-40:#069e08;--studio-jetpack-green-50:#008710;--studio-jetpack-green-60:#007117;--studio-jetpack-green-70:#005b18;--studio-jetpack-green-80:#004515;--studio-jetpack-green-90:#003010;--studio-jetpack-green-100:#001c09;--studio-jetpack-green:#2fb41f}:root{--studio-white-rgb:255,255,255;--studio-black-rgb:0,0,0;--studio-gray-0-rgb:246,247,247;--studio-gray-5-rgb:220,220,222;--studio-gray-10-rgb:195,196,199;--studio-gray-20-rgb:167,170,173;--studio-gray-30-rgb:140,143,148;--studio-gray-40-rgb:120,124,130;--studio-gray-50-rgb:100,105,112;--studio-gray-60-rgb:80,87,94;--studio-gray-70-rgb:60,67,74;--studio-gray-80-rgb:44,51,56;--studio-gray-90-rgb:29,35,39;--studio-gray-100-rgb:16,21,23;--studio-gray-rgb:100,105,112;--studio-blue-0-rgb:233,239,245;--studio-blue-5-rgb:197,217,237;--studio-blue-10-rgb:158,194,230;--studio-blue-20-rgb:114,174,230;--studio-blue-30-rgb:81,152,217;--studio-blue-40-rgb:53,130,196;--studio-blue-50-rgb:34,113,177;--studio-blue-60-rgb:19,94,150;--studio-blue-70-rgb:10,75,120;--studio-blue-80-rgb:4,57,89;--studio-blue-90-rgb:1,38,58;--studio-blue-100-rgb:0,19,28;--studio-blue-rgb:34,113,177;--studio-purple-0-rgb:242,233,237;--studio-purple-5-rgb:235,206,224;--studio-purple-10-rgb:227,175,213;--studio-purple-20-rgb:212,143,200;--studio-purple-30-rgb:196,117,189;--studio-purple-40-rgb:179,94,177;--studio-purple-50-rgb:152,74,156;--studio-purple-60-rgb:124,57,130;--studio-purple-70-rgb:102,44,110;--studio-purple-80-rgb:77,32,84;--studio-purple-90-rgb:53,22,59;--studio-purple-100-rgb:30,12,33;--studio-purple-rgb:152,74,156;--studio-pink-0-rgb:245,233,237;--studio-pink-5-rgb:242,206,218;--studio-pink-10-rgb:247,168,195;--studio-pink-20-rgb:242,131,170;--studio-pink-30-rgb:235,101,148;--studio-pink-40-rgb:227,76,132;--studio-pink-50-rgb:201,53,110;--studio-pink-60-rgb:171,35,90;--studio-pink-70-rgb:140,23,73;--studio-pink-80-rgb:112,15,59;--studio-pink-90-rgb:79,9,42;--studio-pink-100-rgb:38,4,21;--studio-pink-rgb:201,53,110;--studio-red-0-rgb:247,235,236;--studio-red-5-rgb:250,207,210;--studio-red-10-rgb:255,171,175;--studio-red-20-rgb:255,128,133;--studio-red-30-rgb:248,99,104;--studio-red-40-rgb:230,80,84;--studio-red-50-rgb:214,54,56;--studio-red-60-rgb:179,45,46;--studio-red-70-rgb:138,36,36;--studio-red-80-rgb:105,28,28;--studio-red-90-rgb:69,19,19;--studio-red-100-rgb:36,10,10;--studio-red-rgb:214,54,56;--studio-orange-0-rgb:245,236,230;--studio-orange-5-rgb:247,220,198;--studio-orange-10-rgb:255,191,134;--studio-orange-20-rgb:250,167,84;--studio-orange-30-rgb:230,139,40;--studio-orange-40-rgb:214,119,9;--studio-orange-50-rgb:178,98,0;--studio-orange-60-rgb:138,77,0;--studio-orange-70-rgb:112,64,0;--studio-orange-80-rgb:84,49,0;--studio-orange-90-rgb:54,31,0;--studio-orange-100-rgb:31,18,0;--studio-orange-rgb:178,98,0;--studio-yellow-0-rgb:245,241,225;--studio-yellow-5-rgb:245,230,179;--studio-yellow-10-rgb:242,215,107;--studio-yellow-20-rgb:240,201,48;--studio-yellow-30-rgb:222,177,0;--studio-yellow-40-rgb:192,140,0;--studio-yellow-50-rgb:157,110,0;--studio-yellow-60-rgb:125,86,0;--studio-yellow-70-rgb:103,70,0;--studio-yellow-80-rgb:79,53,0;--studio-yellow-90-rgb:51,34,0;--studio-yellow-100-rgb:28,19,0;--studio-yellow-rgb:157,110,0;--studio-green-0-rgb:230,242,232;--studio-green-5-rgb:184,230,191;--studio-green-10-rgb:104,222,134;--studio-green-20-rgb:30,209,90;--studio-green-30-rgb:0,186,55;--studio-green-40-rgb:0,163,42;--studio-green-50-rgb:0,138,32;--studio-green-60-rgb:0,112,23;--studio-green-70-rgb:0,92,18;--studio-green-80-rgb:0,69,12;--studio-green-90-rgb:0,48,8;--studio-green-100-rgb:0,28,5;--studio-green-rgb:0,138,32;--studio-celadon-0-rgb:228,242,237;--studio-celadon-5-rgb:167,232,212;--studio-celadon-10-rgb:99,214,182;--studio-celadon-20-rgb:46,189,153;--studio-celadon-30-rgb:9,168,132;--studio-celadon-40-rgb:0,145,114;--studio-celadon-50-rgb:0,126,101;--studio-celadon-60-rgb:0,103,83;--studio-celadon-70-rgb:0,80,66;--studio-celadon-80-rgb:0,59,48;--studio-celadon-90-rgb:0,39,33;--studio-celadon-100-rgb:0,28,23;--studio-celadon-rgb:0,126,101;--studio-wordpress-blue-0-rgb:230,241,245;--studio-wordpress-blue-5-rgb:190,218,230;--studio-wordpress-blue-10-rgb:152,198,217;--studio-wordpress-blue-20-rgb:106,179,208;--studio-wordpress-blue-30-rgb:56,149,186;--studio-wordpress-blue-40-rgb:24,122,162;--studio-wordpress-blue-50-rgb:0,96,136;--studio-wordpress-blue-60-rgb:0,78,110;--studio-wordpress-blue-70-rgb:0,60,86;--studio-wordpress-blue-80-rgb:0,44,64;--studio-wordpress-blue-90-rgb:0,29,45;--studio-wordpress-blue-100-rgb:0,16,28;--studio-wordpress-blue-rgb:0,96,136;--studio-simplenote-blue-0-rgb:233,236,245;--studio-simplenote-blue-5-rgb:206,217,242;--studio-simplenote-blue-10-rgb:171,193,245;--studio-simplenote-blue-20-rgb:132,164,240;--studio-simplenote-blue-30-rgb:97,141,242;--studio-simplenote-blue-40-rgb:70,120,235;--studio-simplenote-blue-50-rgb:51,97,204;--studio-simplenote-blue-60-rgb:29,79,196;--studio-simplenote-blue-70-rgb:17,62,173;--studio-simplenote-blue-80-rgb:13,47,133;--studio-simplenote-blue-90-rgb:9,32,92;--studio-simplenote-blue-100-rgb:5,16,46;--studio-simplenote-blue-rgb:51,97,204;--studio-woocommerce-purple-0-rgb:247,237,247;--studio-woocommerce-purple-5-rgb:229,207,232;--studio-woocommerce-purple-10-rgb:214,180,224;--studio-woocommerce-purple-20-rgb:199,146,224;--studio-woocommerce-purple-30-rgb:175,125,209;--studio-woocommerce-purple-40-rgb:154,105,199;--studio-woocommerce-purple-50-rgb:127,84,179;--studio-woocommerce-purple-60-rgb:103,67,153;--studio-woocommerce-purple-70-rgb:83,53,130;--studio-woocommerce-purple-80-rgb:60,40,97;--studio-woocommerce-purple-90-rgb:39,27,61;--studio-woocommerce-purple-100-rgb:20,14,31;--studio-woocommerce-purple-rgb:127,84,179;--studio-jetpack-green-0-rgb:240,242,235;--studio-jetpack-green-5-rgb:208,230,184;--studio-jetpack-green-10-rgb:157,217,119;--studio-jetpack-green-20-rgb:100,202,67;--studio-jetpack-green-30-rgb:47,180,31;--studio-jetpack-green-40-rgb:6,158,8;--studio-jetpack-green-50-rgb:0,135,16;--studio-jetpack-green-60-rgb:0,113,23;--studio-jetpack-green-70-rgb:0,91,24;--studio-jetpack-green-80-rgb:0,69,21;--studio-jetpack-green-90-rgb:0,48,16;--studio-jetpack-green-100-rgb:0,28,9;--studio-jetpack-green-rgb:47,180,31}:root{--color-primary:var(--studio-blue-50);--color-primary-rgb:var(--studio-blue-50-rgb);--color-primary-dark:var(--studio-blue-70);--color-primary-dark-rgb:var(--studio-blue-70-rgb);--color-primary-light:var(--studio-blue-30);--color-primary-light-rgb:var(--studio-blue-30-rgb);--color-primary-0:var(--studio-blue-0);--color-primary-0-rgb:var(--studio-blue-0-rgb);--color-primary-5:var(--studio-blue-5);--color-primary-5-rgb:var(--studio-blue-5-rgb);--color-primary-10:var(--studio-blue-10);--color-primary-10-rgb:var(--studio-blue-10-rgb);--color-primary-20:var(--studio-blue-20);--color-primary-20-rgb:var(--studio-blue-20-rgb);--color-primary-30:var(--studio-blue-30);--color-primary-30-rgb:var(--studio-blue-30-rgb);--color-primary-40:var(--studio-blue-40);--color-primary-40-rgb:var(--studio-blue-40-rgb);--color-primary-50:var(--studio-blue-50);--color-primary-50-rgb:var(--studio-blue-50-rgb);--color-primary-60:var(--studio-blue-60);--color-primary-60-rgb:var(--studio-blue-60-rgb);--color-primary-70:var(--studio-blue-70);--color-primary-70-rgb:var(--studio-blue-70-rgb);--color-primary-80:var(--studio-blue-80);--color-primary-80-rgb:var(--studio-blue-80-rgb);--color-primary-90:var(--studio-blue-90);--color-primary-90-rgb:var(--studio-blue-90-rgb);--color-primary-100:var(--studio-blue-100);--color-primary-100-rgb:var(--studio-blue-100-rgb);--color-accent:var(--studio-pink-50);--color-accent-rgb:var(--studio-pink-50-rgb);--color-accent-dark:var(--studio-pink-70);--color-accent-dark-rgb:var(--studio-pink-70-rgb);--color-accent-light:var(--studio-pink-30);--color-accent-light-rgb:var(--studio-pink-30-rgb);--color-accent-0:var(--studio-pink-0);--color-accent-0-rgb:var(--studio-pink-0-rgb);--color-accent-5:var(--studio-pink-5);--color-accent-5-rgb:var(--studio-pink-5-rgb);--color-accent-10:var(--studio-pink-10);--color-accent-10-rgb:var(--studio-pink-10-rgb);--color-accent-20:var(--studio-pink-20);--color-accent-20-rgb:var(--studio-pink-20-rgb);--color-accent-30:var(--studio-pink-30);--color-accent-30-rgb:var(--studio-pink-30-rgb);--color-accent-40:var(--studio-pink-40);--color-accent-40-rgb:var(--studio-pink-40-rgb);--color-accent-50:var(--studio-pink-50);--color-accent-50-rgb:var(--studio-pink-50-rgb);--color-accent-60:var(--studio-pink-60);--color-accent-60-rgb:var(--studio-pink-60-rgb);--color-accent-70:var(--studio-pink-70);--color-accent-70-rgb:var(--studio-pink-70-rgb);--color-accent-80:var(--studio-pink-80);--color-accent-80-rgb:var(--studio-pink-80-rgb);--color-accent-90:var(--studio-pink-90);--color-accent-90-rgb:var(--studio-pink-90-rgb);--color-accent-100:var(--studio-pink-100);--color-accent-100-rgb:var(--studio-pink-100-rgb);--color-neutral:var(--studio-gray-50);--color-neutral-rgb:var(--studio-gray-50-rgb);--color-neutral-dark:var(--studio-gray-70);--color-neutral-dark-rgb:var(--studio-gray-70-rgb);--color-neutral-light:var(--studio-gray-30);--color-neutral-light-rgb:var(--studio-gray-30-rgb);--color-neutral-0:var(--studio-gray-0);--color-neutral-0-rgb:var(--studio-gray-0-rgb);--color-neutral-5:var(--studio-gray-5);--color-neutral-5-rgb:var(--studio-gray-5-rgb);--color-neutral-10:var(--studio-gray-10);--color-neutral-10-rgb:var(--studio-gray-10-rgb);--color-neutral-20:var(--studio-gray-20);--color-neutral-20-rgb:var(--studio-gray-20-rgb);--color-neutral-30:var(--studio-gray-30);--color-neutral-30-rgb:var(--studio-gray-30-rgb);--color-neutral-40:var(--studio-gray-40);--color-neutral-40-rgb:var(--studio-gray-40-rgb);--color-neutral-50:var(--studio-gray-50);--color-neutral-50-rgb:var(--studio-gray-50-rgb);--color-neutral-60:var(--studio-gray-60);--color-neutral-60-rgb:var(--studio-gray-60-rgb);--color-neutral-70:var(--studio-gray-70);--color-neutral-70-rgb:var(--studio-gray-70-rgb);--color-neutral-80:var(--studio-gray-80);--color-neutral-80-rgb:var(--studio-gray-80-rgb);--color-neutral-90:var(--studio-gray-90);--color-neutral-90-rgb:var(--studio-gray-90-rgb);--color-neutral-100:var(--studio-gray-100);--color-neutral-100-rgb:var(--studio-gray-100-rgb);--color-success:var(--studio-green-50);--color-success-rgb:var(--studio-green-50-rgb);--color-success-dark:var(--studio-green-70);--color-success-dark-rgb:var(--studio-green-70-rgb);--color-success-light:var(--studio-green-30);--color-success-light-rgb:var(--studio-green-30-rgb);--color-success-0:var(--studio-green-0);--color-success-0-rgb:var(--studio-green-0-rgb);--color-success-5:var(--studio-green-5);--color-success-5-rgb:var(--studio-green-5-rgb);--color-success-10:var(--studio-green-10);--color-success-10-rgb:var(--studio-green-10-rgb);--color-success-20:var(--studio-green-20);--color-success-20-rgb:var(--studio-green-20-rgb);--color-success-30:var(--studio-green-30);--color-success-30-rgb:var(--studio-green-30-rgb);--color-success-40:var(--studio-green-40);--color-success-40-rgb:var(--studio-green-40-rgb);--color-success-50:var(--studio-green-50);--color-success-50-rgb:var(--studio-green-50-rgb);--color-success-60:var(--studio-green-60);--color-success-60-rgb:var(--studio-green-60-rgb);--color-success-70:var(--studio-green-70);--color-success-70-rgb:var(--studio-green-70-rgb);--color-success-80:var(--studio-green-80);--color-success-80-rgb:var(--studio-green-80-rgb);--color-success-90:var(--studio-green-90);--color-success-90-rgb:var(--studio-green-90-rgb);--color-success-100:var(--studio-green-100);--color-success-100-rgb:var(--studio-green-100-rgb);--color-warning:var(--studio-yellow-50);--color-warning-rgb:var(--studio-yellow-50-rgb);--color-warning-dark:var(--studio-yellow-70);--color-warning-dark-rgb:var(--studio-yellow-70-rgb);--color-warning-light:var(--studio-yellow-30);--color-warning-light-rgb:var(--studio-yellow-30-rgb);--color-warning-0:var(--studio-yellow-0);--color-warning-0-rgb:var(--studio-yellow-0-rgb);--color-warning-5:var(--studio-yellow-5);--color-warning-5-rgb:var(--studio-yellow-5-rgb);--color-warning-10:var(--studio-yellow-10);--color-warning-10-rgb:var(--studio-yellow-10-rgb);--color-warning-20:var(--studio-yellow-20);--color-warning-20-rgb:var(--studio-yellow-20-rgb);--color-warning-30:var(--studio-yellow-30);--color-warning-30-rgb:var(--studio-yellow-30-rgb);--color-warning-40:var(--studio-yellow-40);--color-warning-40-rgb:var(--studio-yellow-40-rgb);--color-warning-50:var(--studio-yellow-50);--color-warning-50-rgb:var(--studio-yellow-50-rgb);--color-warning-60:var(--studio-yellow-60);--color-warning-60-rgb:var(--studio-yellow-60-rgb);--color-warning-70:var(--studio-yellow-70);--color-warning-70-rgb:var(--studio-yellow-70-rgb);--color-warning-80:var(--studio-yellow-80);--color-warning-80-rgb:var(--studio-yellow-80-rgb);--color-warning-90:var(--studio-yellow-90);--color-warning-90-rgb:var(--studio-yellow-90-rgb);--color-warning-100:var(--studio-yellow-100);--color-warning-100-rgb:var(--studio-yellow-100-rgb);--color-error:var(--studio-red-50);--color-error-rgb:var(--studio-red-50-rgb);--color-error-dark:var(--studio-red-70);--color-error-dark-rgb:var(--studio-red-70-rgb);--color-error-light:var(--studio-red-30);--color-error-light-rgb:var(--studio-red-30-rgb);--color-error-0:var(--studio-red-0);--color-error-0-rgb:var(--studio-red-0-rgb);--color-error-5:var(--studio-red-5);--color-error-5-rgb:var(--studio-red-5-rgb);--color-error-10:var(--studio-red-10);--color-error-10-rgb:var(--studio-red-10-rgb);--color-error-20:var(--studio-red-20);--color-error-20-rgb:var(--studio-red-20-rgb);--color-error-30:var(--studio-red-30);--color-error-30-rgb:var(--studio-red-30-rgb);--color-error-40:var(--studio-red-40);--color-error-40-rgb:var(--studio-red-40-rgb);--color-error-50:var(--studio-red-50);--color-error-50-rgb:var(--studio-red-50-rgb);--color-error-60:var(--studio-red-60);--color-error-60-rgb:var(--studio-red-60-rgb);--color-error-70:var(--studio-red-70);--color-error-70-rgb:var(--studio-red-70-rgb);--color-error-80:var(--studio-red-80);--color-error-80-rgb:var(--studio-red-80-rgb);--color-error-90:var(--studio-red-90);--color-error-90-rgb:var(--studio-red-90-rgb);--color-error-100:var(--studio-red-100);--color-error-100-rgb:var(--studio-red-100-rgb);--color-surface:var(--studio-white);--color-surface-rgb:var(--studio-white-rgb);--color-surface-backdrop:var(--studio-gray-0);--color-surface-backdrop-rgb:var(--studio-gray-0-rgb);--color-text:var(--studio-gray-80);--color-text-rgb:var(--studio-gray-80-rgb);--color-text-subtle:var(--studio-gray-50);--color-text-subtle-rgb:var(--studio-gray-50-rgb);--color-text-inverted:var(--studio-white);--color-text-inverted-rgb:var(--studio-white-rgb);--color-border:var(--color-neutral-20);--color-border-rgb:var(--color-neutral-20-rgb);--color-border-subtle:var(--color-neutral-5);--color-border-subtle-rgb:var(--color-neutral-5-rgb);--color-border-shadow:var(--color-neutral-0);--color-border-shadow-rgb:var(--color-neutral-0-rgb);--color-border-inverted:var(--studio-white);--color-border-inverted-rgb:var(--studio-white-rgb);--color-link:var(--studio-blue-50);--color-link-rgb:var(--studio-blue-50-rgb);--color-link-dark:var(--studio-blue-70);--color-link-dark-rgb:var(--studio-blue-70-rgb);--color-link-light:var(--studio-blue-30);--color-link-light-rgb:var(--studio-blue-30-rgb);--color-link-0:var(--studio-blue-0);--color-link-0-rgb:var(--studio-blue-0-rgb);--color-link-5:var(--studio-blue-5);--color-link-5-rgb:var(--studio-blue-5-rgb);--color-link-10:var(--studio-blue-10);--color-link-10-rgb:var(--studio-blue-10-rgb);--color-link-20:var(--studio-blue-20);--color-link-20-rgb:var(--studio-blue-20-rgb);--color-link-30:var(--studio-blue-30);--color-link-30-rgb:var(--studio-blue-30-rgb);--color-link-40:var(--studio-blue-40);--color-link-40-rgb:var(--studio-blue-40-rgb);--color-link-50:var(--studio-blue-50);--color-link-50-rgb:var(--studio-blue-50-rgb);--color-link-60:var(--studio-blue-60);--color-link-60-rgb:var(--studio-blue-60-rgb);--color-link-70:var(--studio-blue-70);--color-link-70-rgb:var(--studio-blue-70-rgb);--color-link-80:var(--studio-blue-80);--color-link-80-rgb:var(--studio-blue-80-rgb);--color-link-90:var(--studio-blue-90);--color-link-90-rgb:var(--studio-blue-90-rgb);--color-link-100:var(--studio-blue-100);--color-link-100-rgb:var(--studio-blue-100-rgb);--color-plan-free:var(--studio-gray-30);--color-plan-blogger:var(--studio-celadon-30);--color-plan-personal:var(--studio-blue-30);--color-plan-premium:var(--studio-yellow-30);--color-plan-business:var(--studio-orange-30);--color-plan-ecommerce:var(--studio-purple-30);--color-jetpack-plan-free:var(--studio-blue-30);--color-jetpack-plan-personal:var(--studio-yellow-30);--color-jetpack-plan-premium:var(--studio-jetpack-green-30);--color-jetpack-plan-professional:var(--studio-purple-30);--color-masterbar-background:var(--studio-blue-60);--color-masterbar-border:var(--studio-blue-70);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-blue-70);--color-masterbar-item-active-background:var(--studio-blue-90);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-40);--color-masterbar-unread-dot-background:var(--color-accent-20);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--color-surface);--color-sidebar-background-rgb:var(--studio-white-rgb);--color-sidebar-border:var(--studio-gray-5);--color-sidebar-text:var(--studio-gray-80);--color-sidebar-text-rgb:var(--studio-gray-80-rgb);--color-sidebar-text-alternative:var(--studio-gray-50);--color-sidebar-gridicon-fill:var(--studio-gray-50);--color-sidebar-menu-selected-background:var(--studio-blue-5);--color-sidebar-menu-selected-background-rgb:var(--studio-blue-5-rgb);--color-sidebar-menu-selected-text:var(--studio-blue-70);--color-sidebar-menu-selected-text-rgb:var(--studio-blue-70-rgb);--color-sidebar-menu-hover-background:var(--studio-gray-5);--color-sidebar-menu-hover-background-rgb:var(--studio-gray-5-rgb);--color-sidebar-menu-hover-text:var(--studio-gray-90);--color-jetpack-onboarding-text:var(--studio-white);--color-jetpack-onboarding-text-rgb:var(--studio-white-rgb);--color-jetpack-onboarding-background:var(--studio-blue-100);--color-jetpack-onboarding-background-rgb:var(--studio-blue-100-rgb);--color-automattic:var(--studio-blue-40);--color-jetpack:var(--studio-jetpack-green);--color-simplenote:var(--studio-simplenote-blue);--color-woocommerce:var(--studio-woocommerce-purple);--color-wordpress-com:var(--studio-wordpress-blue);--color-wordpress-org:#585c60;--color-blogger:#ff5722;--color-eventbrite:#ff8000;--color-facebook:#39579a;--color-godaddy:#5ea95a;--color-google-plus:#df4a32;--color-instagram:#d93174;--color-linkedin:#0976b4;--color-medium:#12100e;--color-pinterest:#cc2127;--color-pocket:#ee4256;--color-print:#f8f8f8;--color-reddit:#5f99cf;--color-skype:#00aff0;--color-stumbleupon:#eb4924;--color-squarespace:#222;--color-telegram:#08c;--color-tumblr:#35465c;--color-twitter:#55acee;--color-whatsapp:#43d854;--color-wix:#faad4d;--color-email:var(--studio-gray-0);--color-podcasting:#9b4dd5;--color-wp-admin-button-background:#008ec2;--color-wp-admin-button-border:#006799}.color-scheme.is-classic-blue{--color-accent:var(--studio-orange-50);--color-accent-rgb:var(--studio-orange-50-rgb);--color-accent-dark:var(--studio-orange-70);--color-accent-dark-rgb:var(--studio-orange-70-rgb);--color-accent-light:var(--studio-orange-30);--color-accent-light-rgb:var(--studio-orange-30-rgb);--color-accent-0:var(--studio-orange-0);--color-accent-0-rgb:var(--studio-orange-0-rgb);--color-accent-5:var(--studio-orange-5);--color-accent-5-rgb:var(--studio-orange-5-rgb);--color-accent-10:var(--studio-orange-10);--color-accent-10-rgb:var(--studio-orange-10-rgb);--color-accent-20:var(--studio-orange-20);--color-accent-20-rgb:var(--studio-orange-20-rgb);--color-accent-30:var(--studio-orange-30);--color-accent-30-rgb:var(--studio-orange-30-rgb);--color-accent-40:var(--studio-orange-40);--color-accent-40-rgb:var(--studio-orange-40-rgb);--color-accent-50:var(--studio-orange-50);--color-accent-50-rgb:var(--studio-orange-50-rgb);--color-accent-60:var(--studio-orange-60);--color-accent-60-rgb:var(--studio-orange-60-rgb);--color-accent-70:var(--studio-orange-70);--color-accent-70-rgb:var(--studio-orange-70-rgb);--color-accent-80:var(--studio-orange-80);--color-accent-80-rgb:var(--studio-orange-80-rgb);--color-accent-90:var(--studio-orange-90);--color-accent-90-rgb:var(--studio-orange-90-rgb);--color-accent-100:var(--studio-orange-100);--color-accent-100-rgb:var(--studio-orange-100-rgb);--color-masterbar-unread-dot-background:var(--color-accent-30);--color-sidebar-background:var(--studio-gray-5);--color-sidebar-background-rgb:var(--studio-gray-5-rgb);--color-sidebar-text-alternative:var(--studio-gray-50);--color-sidebar-border:var(--studio-gray-10);--color-sidebar-menu-selected-background:var(--studio-gray-60);--color-sidebar-menu-selected-background-rgb:var(--studio-gray-60-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--color-surface);--color-sidebar-menu-hover-background-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-text:var(--studio-blue-50)}.color-scheme.is-contrast{--color-primary:var(--studio-gray-80);--color-primary-rgb:var(--studio-gray-80-rgb);--color-primary-dark:var(--studio-gray-100);--color-primary-dark-rgb:var(--studio-gray-100-rgb);--color-primary-light:var(--studio-gray-60);--color-primary-light-rgb:var(--studio-gray-60-rgb);--color-primary-0:var(--studio-gray-0);--color-primary-0-rgb:var(--studio-gray-0-rgb);--color-primary-5:var(--studio-gray-5);--color-primary-5-rgb:var(--studio-gray-5-rgb);--color-primary-10:var(--studio-gray-10);--color-primary-10-rgb:var(--studio-gray-10-rgb);--color-primary-20:var(--studio-gray-20);--color-primary-20-rgb:var(--studio-gray-20-rgb);--color-primary-30:var(--studio-gray-30);--color-primary-30-rgb:var(--studio-gray-30-rgb);--color-primary-40:var(--studio-gray-40);--color-primary-40-rgb:var(--studio-gray-40-rgb);--color-primary-50:var(--studio-gray-50);--color-primary-50-rgb:var(--studio-gray-50-rgb);--color-primary-60:var(--studio-gray-60);--color-primary-60-rgb:var(--studio-gray-60-rgb);--color-primary-70:var(--studio-gray-70);--color-primary-70-rgb:var(--studio-gray-70-rgb);--color-primary-80:var(--studio-gray-80);--color-primary-80-rgb:var(--studio-gray-80-rgb);--color-primary-90:var(--studio-gray-90);--color-primary-90-rgb:var(--studio-gray-90-rgb);--color-primary-100:var(--studio-gray-100);--color-primary-100-rgb:var(--studio-gray-100-rgb);--color-accent:var(--studio-blue-70);--color-accent-rgb:var(--studio-blue-70-rgb);--color-accent-dark:var(--studio-blue-90);--color-accent-dark-rgb:var(--studio-blue-90-rgb);--color-accent-light:var(--studio-blue-50);--color-accent-light-rgb:var(--studio-blue-50-rgb);--color-accent-0:var(--studio-blue-0);--color-accent-0-rgb:var(--studio-blue-0-rgb);--color-accent-5:var(--studio-blue-5);--color-accent-5-rgb:var(--studio-blue-5-rgb);--color-accent-10:var(--studio-blue-10);--color-accent-10-rgb:var(--studio-blue-10-rgb);--color-accent-20:var(--studio-blue-20);--color-accent-20-rgb:var(--studio-blue-20-rgb);--color-accent-30:var(--studio-blue-30);--color-accent-30-rgb:var(--studio-blue-30-rgb);--color-accent-40:var(--studio-blue-40);--color-accent-40-rgb:var(--studio-blue-40-rgb);--color-accent-50:var(--studio-blue-50);--color-accent-50-rgb:var(--studio-blue-50-rgb);--color-accent-60:var(--studio-blue-60);--color-accent-60-rgb:var(--studio-blue-60-rgb);--color-accent-70:var(--studio-blue-70);--color-accent-70-rgb:var(--studio-blue-70-rgb);--color-accent-80:var(--studio-blue-80);--color-accent-80-rgb:var(--studio-blue-80-rgb);--color-accent-90:var(--studio-blue-90);--color-accent-90-rgb:var(--studio-blue-90-rgb);--color-accent-100:var(--studio-blue-100);--color-accent-100-rgb:var(--studio-blue-100-rgb);--color-surface-backdrop:var(--studio-white);--color-surface-backdrop-rgb:var(--studio-white-rgb);--color-text:var(--studio-gray-100);--color-text-rgb:var(--studio-gray-100-rgb);--color-text-subtle:var(--studio-gray-70);--color-text-subtle-rgb:var(--studio-gray-70-rgb);--color-link:var(--studio-blue-70);--color-link-rgb:var(--studio-blue-70-rgb);--color-link-dark:var(--studio-blue-100);--color-link-dark-rgb:var(--studio-blue-100-rgb);--color-link-light:var(--studio-blue-50);--color-link-light-rgb:var(--studio-blue-50-rgb);--color-link-0:var(--studio-blue-0);--color-link-0-rgb:var(--studio-blue-0-rgb);--color-link-5:var(--studio-blue-5);--color-link-5-rgb:var(--studio-blue-5-rgb);--color-link-10:var(--studio-blue-10);--color-link-10-rgb:var(--studio-blue-10-rgb);--color-link-20:var(--studio-blue-20);--color-link-20-rgb:var(--studio-blue-20-rgb);--color-link-30:var(--studio-blue-30);--color-link-30-rgb:var(--studio-blue-30-rgb);--color-link-40:var(--studio-blue-40);--color-link-40-rgb:var(--studio-blue-40-rgb);--color-link-50:var(--studio-blue-50);--color-link-50-rgb:var(--studio-blue-50-rgb);--color-link-60:var(--studio-blue-60);--color-link-60-rgb:var(--studio-blue-60-rgb);--color-link-70:var(--studio-blue-70);--color-link-70-rgb:var(--studio-blue-70-rgb);--color-link-80:var(--studio-blue-80);--color-link-80-rgb:var(--studio-blue-80-rgb);--color-link-90:var(--studio-blue-90);--color-link-90-rgb:var(--studio-blue-90-rgb);--color-link-100:var(--studio-blue-100);--color-link-100-rgb:var(--studio-blue-100-rgb);--color-masterbar-background:var(--studio-gray-100);--color-masterbar-border:var(--studio-gray-90);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-gray-80);--color-masterbar-item-active-background:var(--studio-gray-60);--color-masterbar-item-new-editor-background:var(--studio-gray-70);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-90);--color-masterbar-unread-dot-background:var(--studio-yellow-20);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-70);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-70);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--color-surface);--color-sidebar-background-rgb:var(--studio-white-rgb);--color-sidebar-border:var(--studio-gray-5);--color-sidebar-text:var(--studio-gray-90);--color-sidebar-text-rgb:var(--studio-gray-90-rgb);--color-sidebar-text-alternative:var(--studio-gray-90);--color-sidebar-gridicon-fill:var(--studio-gray-90);--color-sidebar-menu-selected-background:var(--studio-gray-100);--color-sidebar-menu-selected-background-rgb:var(--studio-gray-100-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--studio-gray-60);--color-sidebar-menu-hover-background-rgb:var(--studio-gray-60-rgb);--color-sidebar-menu-hover-text:var(--studio-white)}.color-scheme.is-midnight{--color-primary:var(--studio-gray-70);--color-primary-rgb:var(--studio-gray-70-rgb);--color-primary-dark:var(--studio-gray-80);--color-primary-dark-rgb:var(--studio-gray-80-rgb);--color-primary-light:var(--studio-gray-50);--color-primary-light-rgb:var(--studio-gray-50-rgb);--color-primary-0:var(--studio-gray-0);--color-primary-0-rgb:var(--studio-gray-0-rgb);--color-primary-5:var(--studio-gray-5);--color-primary-5-rgb:var(--studio-gray-5-rgb);--color-primary-10:var(--studio-gray-10);--color-primary-10-rgb:var(--studio-gray-10-rgb);--color-primary-20:var(--studio-gray-20);--color-primary-20-rgb:var(--studio-gray-20-rgb);--color-primary-30:var(--studio-gray-30);--color-primary-30-rgb:var(--studio-gray-30-rgb);--color-primary-40:var(--studio-gray-40);--color-primary-40-rgb:var(--studio-gray-40-rgb);--color-primary-50:var(--studio-gray-50);--color-primary-50-rgb:var(--studio-gray-50-rgb);--color-primary-60:var(--studio-gray-60);--color-primary-60-rgb:var(--studio-gray-60-rgb);--color-primary-70:var(--studio-gray-70);--color-primary-70-rgb:var(--studio-gray-70-rgb);--color-primary-80:var(--studio-gray-80);--color-primary-80-rgb:var(--studio-gray-80-rgb);--color-primary-90:var(--studio-gray-90);--color-primary-90-rgb:var(--studio-gray-90-rgb);--color-primary-100:var(--studio-gray-100);--color-primary-100-rgb:var(--studio-gray-100-rgb);--color-accent:var(--studio-blue-50);--color-accent-rgb:var(--studio-blue-50-rgb);--color-accent-dark:var(--studio-blue-70);--color-accent-dark-rgb:var(--studio-blue-70-rgb);--color-accent-light:var(--studio-blue-30);--color-accent-light-rgb:var(--studio-blue-30-rgb);--color-accent-0:var(--studio-blue-0);--color-accent-0-rgb:var(--studio-blue-0-rgb);--color-accent-5:var(--studio-blue-5);--color-accent-5-rgb:var(--studio-blue-5-rgb);--color-accent-10:var(--studio-blue-10);--color-accent-10-rgb:var(--studio-blue-10-rgb);--color-accent-20:var(--studio-blue-20);--color-accent-20-rgb:var(--studio-blue-20-rgb);--color-accent-30:var(--studio-blue-30);--color-accent-30-rgb:var(--studio-blue-30-rgb);--color-accent-40:var(--studio-blue-40);--color-accent-40-rgb:var(--studio-blue-40-rgb);--color-accent-50:var(--studio-blue-50);--color-accent-50-rgb:var(--studio-blue-50-rgb);--color-accent-60:var(--studio-blue-60);--color-accent-60-rgb:var(--studio-blue-60-rgb);--color-accent-70:var(--studio-blue-70);--color-accent-70-rgb:var(--studio-blue-70-rgb);--color-accent-80:var(--studio-blue-80);--color-accent-80-rgb:var(--studio-blue-80-rgb);--color-accent-90:var(--studio-blue-90);--color-accent-90-rgb:var(--studio-blue-90-rgb);--color-accent-100:var(--studio-blue-100);--color-accent-100-rgb:var(--studio-blue-100-rgb);--color-link:var(--studio-red-60);--color-link-rgb:var(--studio-red-60-rgb);--color-link-dark:var(--studio-red-70);--color-link-dark-rgb:var(--studio-red-70-rgb);--color-link-light:var(--studio-red-30);--color-link-light-rgb:var(--studio-red-30-rgb);--color-link-0:var(--studio-red-0);--color-link-0-rgb:var(--studio-red-0-rgb);--color-link-5:var(--studio-red-5);--color-link-5-rgb:var(--studio-red-5-rgb);--color-link-10:var(--studio-red-10);--color-link-10-rgb:var(--studio-red-10-rgb);--color-link-20:var(--studio-red-20);--color-link-20-rgb:var(--studio-red-20-rgb);--color-link-30:var(--studio-red-30);--color-link-30-rgb:var(--studio-red-30-rgb);--color-link-40:var(--studio-red-40);--color-link-40-rgb:var(--studio-red-40-rgb);--color-link-50:var(--studio-red-50);--color-link-50-rgb:var(--studio-red-50-rgb);--color-link-60:var(--studio-red-60);--color-link-60-rgb:var(--studio-red-60-rgb);--color-link-70:var(--studio-red-70);--color-link-70-rgb:var(--studio-red-70-rgb);--color-link-80:var(--studio-red-80);--color-link-80-rgb:var(--studio-red-80-rgb);--color-link-90:var(--studio-red-90);--color-link-90-rgb:var(--studio-red-90-rgb);--color-link-100:var(--studio-red-100);--color-link-100-rgb:var(--studio-red-100-rgb);--color-masterbar-background:var(--studio-gray-70);--color-masterbar-border:var(--studio-gray-70);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-gray-80);--color-masterbar-item-active-background:var(--studio-gray-90);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-gray-90);--color-sidebar-background-rgb:var(--studio-gray-90-rgb);--color-sidebar-border:var(--studio-gray-80);--color-sidebar-text:var(--studio-white);--color-sidebar-text-rgb:var(--studio-white-rgb);--color-sidebar-text-alternative:var(--studio-gray-20);--color-sidebar-gridicon-fill:var(--studio-gray-10);--color-sidebar-menu-selected-background:var(--studio-red-50);--color-sidebar-menu-selected-background-rgb:var(--studio-red-50-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--studio-gray-80);--color-sidebar-menu-hover-background-rgb:var(--studio-gray-80-rgb);--color-sidebar-menu-hover-text:var(--studio-white)}.color-scheme.is-nightfall{--color-primary:var(--studio-gray-90);--color-primary-rgb:var(--studio-gray-90-rgb);--color-primary-dark:var(--studio-gray-70);--color-primary-dark-rgb:var(--studio-gray-70-rgb);--color-primary-light:var(--studio-gray-30);--color-primary-light-rgb:var(--studio-gray-30-rgb);--color-primary-0:var(--studio-gray-0);--color-primary-0-rgb:var(--studio-gray-0-rgb);--color-primary-5:var(--studio-gray-5);--color-primary-5-rgb:var(--studio-gray-5-rgb);--color-primary-10:var(--studio-gray-10);--color-primary-10-rgb:var(--studio-gray-10-rgb);--color-primary-20:var(--studio-gray-20);--color-primary-20-rgb:var(--studio-gray-20-rgb);--color-primary-30:var(--studio-gray-30);--color-primary-30-rgb:var(--studio-gray-30-rgb);--color-primary-40:var(--studio-gray-40);--color-primary-40-rgb:var(--studio-gray-40-rgb);--color-primary-50:var(--studio-gray-50);--color-primary-50-rgb:var(--studio-gray-50-rgb);--color-primary-60:var(--studio-gray-60);--color-primary-60-rgb:var(--studio-gray-60-rgb);--color-primary-70:var(--studio-gray-70);--color-primary-70-rgb:var(--studio-gray-70-rgb);--color-primary-80:var(--studio-gray-80);--color-primary-80-rgb:var(--studio-gray-80-rgb);--color-primary-90:var(--studio-gray-90);--color-primary-90-rgb:var(--studio-gray-90-rgb);--color-primary-100:var(--studio-gray-100);--color-primary-100-rgb:var(--studio-gray-100-rgb);--color-accent:var(--studio-blue-50);--color-accent-rgb:var(--studio-blue-50-rgb);--color-accent-dark:var(--studio-blue-70);--color-accent-dark-rgb:var(--studio-blue-70-rgb);--color-accent-light:var(--studio-blue-30);--color-accent-light-rgb:var(--studio-blue-30-rgb);--color-accent-0:var(--studio-blue-0);--color-accent-0-rgb:var(--studio-blue-0-rgb);--color-accent-5:var(--studio-blue-5);--color-accent-5-rgb:var(--studio-blue-5-rgb);--color-accent-10:var(--studio-blue-10);--color-accent-10-rgb:var(--studio-blue-10-rgb);--color-accent-20:var(--studio-blue-20);--color-accent-20-rgb:var(--studio-blue-20-rgb);--color-accent-30:var(--studio-blue-30);--color-accent-30-rgb:var(--studio-blue-30-rgb);--color-accent-40:var(--studio-blue-40);--color-accent-40-rgb:var(--studio-blue-40-rgb);--color-accent-50:var(--studio-blue-50);--color-accent-50-rgb:var(--studio-blue-50-rgb);--color-accent-60:var(--studio-blue-60);--color-accent-60-rgb:var(--studio-blue-60-rgb);--color-accent-70:var(--studio-blue-70);--color-accent-70-rgb:var(--studio-blue-70-rgb);--color-accent-80:var(--studio-blue-80);--color-accent-80-rgb:var(--studio-blue-80-rgb);--color-accent-90:var(--studio-blue-90);--color-accent-90-rgb:var(--studio-blue-90-rgb);--color-accent-100:var(--studio-blue-100);--color-accent-100-rgb:var(--studio-blue-100-rgb);--color-link:var(--studio-blue-50);--color-link-rgb:var(--studio-blue-50-rgb);--color-link-dark:var(--studio-blue-70);--color-link-dark-rgb:var(--studio-blue-70-rgb);--color-link-light:var(--studio-blue-30);--color-link-light-rgb:var(--studio-blue-30-rgb);--color-link-0:var(--studio-blue-0);--color-link-0-rgb:var(--studio-blue-0-rgb);--color-link-5:var(--studio-blue-5);--color-link-5-rgb:var(--studio-blue-5-rgb);--color-link-10:var(--studio-blue-10);--color-link-10-rgb:var(--studio-blue-10-rgb);--color-link-20:var(--studio-blue-20);--color-link-20-rgb:var(--studio-blue-20-rgb);--color-link-30:var(--studio-blue-30);--color-link-30-rgb:var(--studio-blue-30-rgb);--color-link-40:var(--studio-blue-40);--color-link-40-rgb:var(--studio-blue-40-rgb);--color-link-50:var(--studio-blue-50);--color-link-50-rgb:var(--studio-blue-50-rgb);--color-link-60:var(--studio-blue-60);--color-link-60-rgb:var(--studio-blue-60-rgb);--color-link-70:var(--studio-blue-70);--color-link-70-rgb:var(--studio-blue-70-rgb);--color-link-80:var(--studio-blue-80);--color-link-80-rgb:var(--studio-blue-80-rgb);--color-link-90:var(--studio-blue-90);--color-link-90-rgb:var(--studio-blue-90-rgb);--color-link-100:var(--studio-blue-100);--color-link-100-rgb:var(--studio-blue-100-rgb);--color-masterbar-background:var(--studio-blue-100);--color-masterbar-border:var(--studio-blue-100);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-blue-90);--color-masterbar-item-active-background:var(--studio-blue-80);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-40);--color-masterbar-unread-dot-background:var(--color-accent-30);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-blue-80);--color-sidebar-background-rgb:var(--studio-blue-80-rgb);--color-sidebar-border:var(--studio-blue-90);--color-sidebar-text:var(--studio-blue-5);--color-sidebar-text-rgb:var(--studio-blue-5-rgb);--color-sidebar-text-alternative:var(--studio-blue-20);--color-sidebar-gridicon-fill:var(--studio-blue-10);--color-sidebar-menu-selected-background:var(--studio-blue-100);--color-sidebar-menu-selected-background-rgb:var(--studio-blue-100-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--studio-blue-70);--color-sidebar-menu-hover-background-rgb:var(--studio-blue-70-rgb);--color-sidebar-menu-hover-text:var(--studio-white)}.color-scheme.is-ocean{--color-primary:var(--studio-blue-50);--color-primary-rgb:var(--studio-blue-50-rgb);--color-primary-dark:var(--studio-blue-70);--color-primary-dark-rgb:var(--studio-blue-70-rgb);--color-primary-light:var(--studio-blue-30);--color-primary-light-rgb:var(--studio-blue-30-rgb);--color-primary-0:var(--studio-blue-0);--color-primary-0-rgb:var(--studio-blue-0-rgb);--color-primary-5:var(--studio-blue-5);--color-primary-5-rgb:var(--studio-blue-5-rgb);--color-primary-10:var(--studio-blue-10);--color-primary-10-rgb:var(--studio-blue-10-rgb);--color-primary-20:var(--studio-blue-20);--color-primary-20-rgb:var(--studio-blue-20-rgb);--color-primary-30:var(--studio-blue-30);--color-primary-30-rgb:var(--studio-blue-30-rgb);--color-primary-40:var(--studio-blue-40);--color-primary-40-rgb:var(--studio-blue-40-rgb);--color-primary-50:var(--studio-blue-50);--color-primary-50-rgb:var(--studio-blue-50-rgb);--color-primary-60:var(--studio-blue-60);--color-primary-60-rgb:var(--studio-blue-60-rgb);--color-primary-70:var(--studio-blue-70);--color-primary-70-rgb:var(--studio-blue-70-rgb);--color-primary-80:var(--studio-blue-80);--color-primary-80-rgb:var(--studio-blue-80-rgb);--color-primary-90:var(--studio-blue-90);--color-primary-90-rgb:var(--studio-blue-90-rgb);--color-primary-100:var(--studio-blue-100);--color-primary-100-rgb:var(--studio-blue-100-rgb);--color-accent:var(--studio-celadon-50);--color-accent-rgb:var(--studio-celadon-50-rgb);--color-accent-dark:var(--studio-celadon-70);--color-accent-dark-rgb:var(--studio-celadon-70-rgb);--color-accent-light:var(--studio-celadon-30);--color-accent-light-rgb:var(--studio-celadon-30-rgb);--color-accent-0:var(--studio-celadon-0);--color-accent-0-rgb:var(--studio-celadon-0-rgb);--color-accent-5:var(--studio-celadon-5);--color-accent-5-rgb:var(--studio-celadon-5-rgb);--color-accent-10:var(--studio-celadon-10);--color-accent-10-rgb:var(--studio-celadon-10-rgb);--color-accent-20:var(--studio-celadon-20);--color-accent-20-rgb:var(--studio-celadon-20-rgb);--color-accent-30:var(--studio-celadon-30);--color-accent-30-rgb:var(--studio-celadon-30-rgb);--color-accent-40:var(--studio-celadon-40);--color-accent-40-rgb:var(--studio-celadon-40-rgb);--color-accent-50:var(--studio-celadon-50);--color-accent-50-rgb:var(--studio-celadon-50-rgb);--color-accent-60:var(--studio-celadon-60);--color-accent-60-rgb:var(--studio-celadon-60-rgb);--color-accent-70:var(--studio-celadon-70);--color-accent-70-rgb:var(--studio-celadon-70-rgb);--color-accent-80:var(--studio-celadon-80);--color-accent-80-rgb:var(--studio-celadon-80-rgb);--color-accent-90:var(--studio-celadon-90);--color-accent-90-rgb:var(--studio-celadon-90-rgb);--color-accent-100:var(--studio-celadon-100);--color-accent-100-rgb:var(--studio-celadon-100-rgb);--color-link:var(--studio-celadon-50);--color-link-rgb:var(--studio-celadon-50-rgb);--color-link-dark:var(--studio-celadon-70);--color-link-dark-rgb:var(--studio-celadon-70-rgb);--color-link-light:var(--studio-celadon-30);--color-link-light-rgb:var(--studio-celadon-30-rgb);--color-link-0:var(--studio-celadon-0);--color-link-0-rgb:var(--studio-celadon-0-rgb);--color-link-5:var(--studio-celadon-5);--color-link-5-rgb:var(--studio-celadon-5-rgb);--color-link-10:var(--studio-celadon-10);--color-link-10-rgb:var(--studio-celadon-10-rgb);--color-link-20:var(--studio-celadon-20);--color-link-20-rgb:var(--studio-celadon-20-rgb);--color-link-30:var(--studio-celadon-30);--color-link-30-rgb:var(--studio-celadon-30-rgb);--color-link-40:var(--studio-celadon-40);--color-link-40-rgb:var(--studio-celadon-40-rgb);--color-link-50:var(--studio-celadon-50);--color-link-50-rgb:var(--studio-celadon-50-rgb);--color-link-60:var(--studio-celadon-60);--color-link-60-rgb:var(--studio-celadon-60-rgb);--color-link-70:var(--studio-celadon-70);--color-link-70-rgb:var(--studio-celadon-70-rgb);--color-link-80:var(--studio-celadon-80);--color-link-80-rgb:var(--studio-celadon-80-rgb);--color-link-90:var(--studio-celadon-90);--color-link-90-rgb:var(--studio-celadon-90-rgb);--color-link-100:var(--studio-celadon-100);--color-link-100-rgb:var(--studio-celadon-100-rgb);--color-masterbar-background:var(--studio-blue-80);--color-masterbar-border:var(--studio-blue-80);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-blue-90);--color-masterbar-item-active-background:var(--studio-blue-100);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-60);--color-masterbar-unread-dot-background:var(--color-accent-30);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-blue-60);--color-sidebar-background-rgb:var(--studio-blue-60-rgb);--color-sidebar-border:var(--studio-blue-70);--color-sidebar-text:var(--studio-white);--color-sidebar-text-rgb:var(--studio-white-rgb);--color-sidebar-text-alternative:var(--studio-blue-5);--color-sidebar-gridicon-fill:var(--studio-blue-5);--color-sidebar-menu-selected-background:var(--studio-yellow-20);--color-sidebar-menu-selected-background-rgb:var(--studio-yellow-20-rgb);--color-sidebar-menu-selected-text:var(--studio-blue-90);--color-sidebar-menu-selected-text-rgb:var(--studio-blue-90-rgb);--color-sidebar-menu-hover-background:var(--studio-blue-50);--color-sidebar-menu-hover-background-rgb:var(--studio-blue-50-rgb);--color-sidebar-menu-hover-text:var(--studio-white)}.color-scheme.is-powder-snow{--color-primary:var(--studio-gray-90);--color-primary-rgb:var(--studio-gray-90-rgb);--color-primary-dark:var(--studio-gray-70);--color-primary-dark-rgb:var(--studio-gray-70-rgb);--color-primary-light:var(--studio-gray-30);--color-primary-light-rgb:var(--studio-gray-30-rgb);--color-primary-0:var(--studio-gray-0);--color-primary-0-rgb:var(--studio-gray-0-rgb);--color-primary-5:var(--studio-gray-5);--color-primary-5-rgb:var(--studio-gray-5-rgb);--color-primary-10:var(--studio-gray-10);--color-primary-10-rgb:var(--studio-gray-10-rgb);--color-primary-20:var(--studio-gray-20);--color-primary-20-rgb:var(--studio-gray-20-rgb);--color-primary-30:var(--studio-gray-30);--color-primary-30-rgb:var(--studio-gray-30-rgb);--color-primary-40:var(--studio-gray-40);--color-primary-40-rgb:var(--studio-gray-40-rgb);--color-primary-50:var(--studio-gray-50);--color-primary-50-rgb:var(--studio-gray-50-rgb);--color-primary-60:var(--studio-gray-60);--color-primary-60-rgb:var(--studio-gray-60-rgb);--color-primary-70:var(--studio-gray-70);--color-primary-70-rgb:var(--studio-gray-70-rgb);--color-primary-80:var(--studio-gray-80);--color-primary-80-rgb:var(--studio-gray-80-rgb);--color-primary-90:var(--studio-gray-90);--color-primary-90-rgb:var(--studio-gray-90-rgb);--color-primary-100:var(--studio-gray-100);--color-primary-100-rgb:var(--studio-gray-100-rgb);--color-accent:var(--studio-blue-50);--color-accent-rgb:var(--studio-blue-50-rgb);--color-accent-dark:var(--studio-blue-70);--color-accent-dark-rgb:var(--studio-blue-70-rgb);--color-accent-light:var(--studio-blue-30);--color-accent-light-rgb:var(--studio-blue-30-rgb);--color-accent-0:var(--studio-blue-0);--color-accent-0-rgb:var(--studio-blue-0-rgb);--color-accent-5:var(--studio-blue-5);--color-accent-5-rgb:var(--studio-blue-5-rgb);--color-accent-10:var(--studio-blue-10);--color-accent-10-rgb:var(--studio-blue-10-rgb);--color-accent-20:var(--studio-blue-20);--color-accent-20-rgb:var(--studio-blue-20-rgb);--color-accent-30:var(--studio-blue-30);--color-accent-30-rgb:var(--studio-blue-30-rgb);--color-accent-40:var(--studio-blue-40);--color-accent-40-rgb:var(--studio-blue-40-rgb);--color-accent-50:var(--studio-blue-50);--color-accent-50-rgb:var(--studio-blue-50-rgb);--color-accent-60:var(--studio-blue-60);--color-accent-60-rgb:var(--studio-blue-60-rgb);--color-accent-70:var(--studio-blue-70);--color-accent-70-rgb:var(--studio-blue-70-rgb);--color-accent-80:var(--studio-blue-80);--color-accent-80-rgb:var(--studio-blue-80-rgb);--color-accent-90:var(--studio-blue-90);--color-accent-90-rgb:var(--studio-blue-90-rgb);--color-accent-100:var(--studio-blue-100);--color-accent-100-rgb:var(--studio-blue-100-rgb);--color-link:var(--studio-blue-50);--color-link-rgb:var(--studio-blue-50-rgb);--color-link-dark:var(--studio-blue-70);--color-link-dark-rgb:var(--studio-blue-70-rgb);--color-link-light:var(--studio-blue-30);--color-link-light-rgb:var(--studio-blue-30-rgb);--color-link-0:var(--studio-blue-0);--color-link-0-rgb:var(--studio-blue-0-rgb);--color-link-5:var(--studio-blue-5);--color-link-5-rgb:var(--studio-blue-5-rgb);--color-link-10:var(--studio-blue-10);--color-link-10-rgb:var(--studio-blue-10-rgb);--color-link-20:var(--studio-blue-20);--color-link-20-rgb:var(--studio-blue-20-rgb);--color-link-30:var(--studio-blue-30);--color-link-30-rgb:var(--studio-blue-30-rgb);--color-link-40:var(--studio-blue-40);--color-link-40-rgb:var(--studio-blue-40-rgb);--color-link-50:var(--studio-blue-50);--color-link-50-rgb:var(--studio-blue-50-rgb);--color-link-60:var(--studio-blue-60);--color-link-60-rgb:var(--studio-blue-60-rgb);--color-link-70:var(--studio-blue-70);--color-link-70-rgb:var(--studio-blue-70-rgb);--color-link-80:var(--studio-blue-80);--color-link-80-rgb:var(--studio-blue-80-rgb);--color-link-90:var(--studio-blue-90);--color-link-90-rgb:var(--studio-blue-90-rgb);--color-link-100:var(--studio-blue-100);--color-link-100-rgb:var(--studio-blue-100-rgb);--color-masterbar-background:var(--studio-gray-100);--color-masterbar-border:var(--studio-gray-90);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-gray-80);--color-masterbar-item-active-background:var(--studio-gray-70);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-40);--color-masterbar-unread-dot-background:var(--color-accent-30);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-gray-5);--color-sidebar-background-rgb:var(--studio-gray-5-rgb);--color-sidebar-border:var(--studio-gray-10);--color-sidebar-text:var(--studio-gray-80);--color-sidebar-text-rgb:var(--studio-gray-80-rgb);--color-sidebar-text-alternative:var(--studio-gray-60);--color-sidebar-gridicon-fill:var(--studio-gray-50);--color-sidebar-menu-selected-background:var(--studio-gray-60);--color-sidebar-menu-selected-background-rgb:var(--studio-gray-60-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--color-surface);--color-sidebar-menu-hover-background-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-text:var(--studio-blue-60)}.color-scheme.is-sakura{--color-primary:var(--studio-celadon-50);--color-primary-rgb:var(--studio-celadon-50-rgb);--color-primary-dark:var(--studio-celadon-70);--color-primary-dark-rgb:var(--studio-celadon-70-rgb);--color-primary-light:var(--studio-celadon-30);--color-primary-light-rgb:var(--studio-celadon-30-rgb);--color-primary-0:var(--studio-celadon-0);--color-primary-0-rgb:var(--studio-celadon-0-rgb);--color-primary-5:var(--studio-celadon-5);--color-primary-5-rgb:var(--studio-celadon-5-rgb);--color-primary-10:var(--studio-celadon-10);--color-primary-10-rgb:var(--studio-celadon-10-rgb);--color-primary-20:var(--studio-celadon-20);--color-primary-20-rgb:var(--studio-celadon-20-rgb);--color-primary-30:var(--studio-celadon-30);--color-primary-30-rgb:var(--studio-celadon-30-rgb);--color-primary-40:var(--studio-celadon-40);--color-primary-40-rgb:var(--studio-celadon-40-rgb);--color-primary-50:var(--studio-celadon-50);--color-primary-50-rgb:var(--studio-celadon-50-rgb);--color-primary-60:var(--studio-celadon-60);--color-primary-60-rgb:var(--studio-celadon-60-rgb);--color-primary-70:var(--studio-celadon-70);--color-primary-70-rgb:var(--studio-celadon-70-rgb);--color-primary-80:var(--studio-celadon-80);--color-primary-80-rgb:var(--studio-celadon-80-rgb);--color-primary-90:var(--studio-celadon-90);--color-primary-90-rgb:var(--studio-celadon-90-rgb);--color-primary-100:var(--studio-celadon-100);--color-primary-100-rgb:var(--studio-celadon-100-rgb);--color-accent:var(--studio-blue-50);--color-accent-rgb:var(--studio-blue-50-rgb);--color-accent-dark:var(--studio-blue-70);--color-accent-dark-rgb:var(--studio-blue-70-rgb);--color-accent-light:var(--studio-blue-30);--color-accent-light-rgb:var(--studio-blue-30-rgb);--color-accent-0:var(--studio-blue-0);--color-accent-0-rgb:var(--studio-blue-0-rgb);--color-accent-5:var(--studio-blue-5);--color-accent-5-rgb:var(--studio-blue-5-rgb);--color-accent-10:var(--studio-blue-10);--color-accent-10-rgb:var(--studio-blue-10-rgb);--color-accent-20:var(--studio-blue-20);--color-accent-20-rgb:var(--studio-blue-20-rgb);--color-accent-30:var(--studio-blue-30);--color-accent-30-rgb:var(--studio-blue-30-rgb);--color-accent-40:var(--studio-blue-40);--color-accent-40-rgb:var(--studio-blue-40-rgb);--color-accent-50:var(--studio-blue-50);--color-accent-50-rgb:var(--studio-blue-50-rgb);--color-accent-60:var(--studio-blue-60);--color-accent-60-rgb:var(--studio-blue-60-rgb);--color-accent-70:var(--studio-blue-70);--color-accent-70-rgb:var(--studio-blue-70-rgb);--color-accent-80:var(--studio-blue-80);--color-accent-80-rgb:var(--studio-blue-80-rgb);--color-accent-90:var(--studio-blue-90);--color-accent-90-rgb:var(--studio-blue-90-rgb);--color-accent-100:var(--studio-blue-100);--color-accent-100-rgb:var(--studio-blue-100-rgb);--color-link:var(--studio-celadon-50);--color-link-rgb:var(--studio-celadon-50-rgb);--color-link-dark:var(--studio-celadon-70);--color-link-dark-rgb:var(--studio-celadon-70-rgb);--color-link-light:var(--studio-celadon-30);--color-link-light-rgb:var(--studio-celadon-30-rgb);--color-link-0:var(--studio-celadon-0);--color-link-0-rgb:var(--studio-celadon-0-rgb);--color-link-5:var(--studio-celadon-5);--color-link-5-rgb:var(--studio-celadon-5-rgb);--color-link-10:var(--studio-celadon-10);--color-link-10-rgb:var(--studio-celadon-10-rgb);--color-link-20:var(--studio-celadon-20);--color-link-20-rgb:var(--studio-celadon-20-rgb);--color-link-30:var(--studio-celadon-30);--color-link-30-rgb:var(--studio-celadon-30-rgb);--color-link-40:var(--studio-celadon-40);--color-link-40-rgb:var(--studio-celadon-40-rgb);--color-link-50:var(--studio-celadon-50);--color-link-50-rgb:var(--studio-celadon-50-rgb);--color-link-60:var(--studio-celadon-60);--color-link-60-rgb:var(--studio-celadon-60-rgb);--color-link-70:var(--studio-celadon-70);--color-link-70-rgb:var(--studio-celadon-70-rgb);--color-link-80:var(--studio-celadon-80);--color-link-80-rgb:var(--studio-celadon-80-rgb);--color-link-90:var(--studio-celadon-90);--color-link-90-rgb:var(--studio-celadon-90-rgb);--color-link-100:var(--studio-celadon-100);--color-link-100-rgb:var(--studio-celadon-100-rgb);--color-masterbar-background:var(--studio-celadon-70);--color-masterbar-border:var(--studio-celadon-80);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-celadon-80);--color-masterbar-item-active-background:var(--studio-celadon-90);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-pink-5);--color-sidebar-background-rgb:var(--studio-pink-5-rgb);--color-sidebar-border:var(--studio-pink-10);--color-sidebar-text:var(--studio-pink-80);--color-sidebar-text-rgb:var(--studio-pink-80-rgb);--color-sidebar-text-alternative:var(--studio-pink-60);--color-sidebar-gridicon-fill:var(--studio-pink-70);--color-sidebar-menu-selected-background:var(--studio-blue-50);--color-sidebar-menu-selected-background-rgb:var(--studio-blue-50-rgb);--color-sidebar-menu-selected-text:var(--studio-white);--color-sidebar-menu-selected-text-rgb:var(--studio-white-rgb);--color-sidebar-menu-hover-background:var(--studio-pink-10);--color-sidebar-menu-hover-background-rgb:var(--studio-pink-10-rgb);--color-sidebar-menu-hover-text:var(--studio-pink-90)}.color-scheme.is-sunset{--color-primary:var(--studio-red-50);--color-primary-rgb:var(--studio-red-50-rgb);--color-primary-dark:var(--studio-red-70);--color-primary-dark-rgb:var(--studio-red-70-rgb);--color-primary-light:var(--studio-red-30);--color-primary-light-rgb:var(--studio-red-30-rgb);--color-primary-0:var(--studio-red-0);--color-primary-0-rgb:var(--studio-red-0-rgb);--color-primary-5:var(--studio-red-5);--color-primary-5-rgb:var(--studio-red-5-rgb);--color-primary-10:var(--studio-red-10);--color-primary-10-rgb:var(--studio-red-10-rgb);--color-primary-20:var(--studio-red-20);--color-primary-20-rgb:var(--studio-red-20-rgb);--color-primary-30:var(--studio-red-30);--color-primary-30-rgb:var(--studio-red-30-rgb);--color-primary-40:var(--studio-red-40);--color-primary-40-rgb:var(--studio-red-40-rgb);--color-primary-50:var(--studio-red-50);--color-primary-50-rgb:var(--studio-red-50-rgb);--color-primary-60:var(--studio-red-60);--color-primary-60-rgb:var(--studio-red-60-rgb);--color-primary-70:var(--studio-red-70);--color-primary-70-rgb:var(--studio-red-70-rgb);--color-primary-80:var(--studio-red-80);--color-primary-80-rgb:var(--studio-red-80-rgb);--color-primary-90:var(--studio-red-90);--color-primary-90-rgb:var(--studio-red-90-rgb);--color-primary-100:var(--studio-red-100);--color-primary-100-rgb:var(--studio-red-100-rgb);--color-accent:var(--studio-orange-50);--color-accent-rgb:var(--studio-orange-50-rgb);--color-accent-dark:var(--studio-orange-70);--color-accent-dark-rgb:var(--studio-orange-70-rgb);--color-accent-light:var(--studio-orange-30);--color-accent-light-rgb:var(--studio-orange-30-rgb);--color-accent-0:var(--studio-orange-0);--color-accent-0-rgb:var(--studio-orange-0-rgb);--color-accent-5:var(--studio-orange-5);--color-accent-5-rgb:var(--studio-orange-5-rgb);--color-accent-10:var(--studio-orange-10);--color-accent-10-rgb:var(--studio-orange-10-rgb);--color-accent-20:var(--studio-orange-20);--color-accent-20-rgb:var(--studio-orange-20-rgb);--color-accent-30:var(--studio-orange-30);--color-accent-30-rgb:var(--studio-orange-30-rgb);--color-accent-40:var(--studio-orange-40);--color-accent-40-rgb:var(--studio-orange-40-rgb);--color-accent-50:var(--studio-orange-50);--color-accent-50-rgb:var(--studio-orange-50-rgb);--color-accent-60:var(--studio-orange-60);--color-accent-60-rgb:var(--studio-orange-60-rgb);--color-accent-70:var(--studio-orange-70);--color-accent-70-rgb:var(--studio-orange-70-rgb);--color-accent-80:var(--studio-orange-80);--color-accent-80-rgb:var(--studio-orange-80-rgb);--color-accent-90:var(--studio-orange-90);--color-accent-90-rgb:var(--studio-orange-90-rgb);--color-accent-100:var(--studio-orange-100);--color-accent-100-rgb:var(--studio-orange-100-rgb);--color-link:var(--studio-orange-50);--color-link-rgb:var(--studio-orange-50-rgb);--color-link-dark:var(--studio-orange-70);--color-link-dark-rgb:var(--studio-orange-70-rgb);--color-link-light:var(--studio-orange-30);--color-link-light-rgb:var(--studio-orange-30-rgb);--color-link-0:var(--studio-orange-0);--color-link-0-rgb:var(--studio-orange-0-rgb);--color-link-5:var(--studio-orange-5);--color-link-5-rgb:var(--studio-orange-5-rgb);--color-link-10:var(--studio-orange-10);--color-link-10-rgb:var(--studio-orange-10-rgb);--color-link-20:var(--studio-orange-20);--color-link-20-rgb:var(--studio-orange-20-rgb);--color-link-30:var(--studio-orange-30);--color-link-30-rgb:var(--studio-orange-30-rgb);--color-link-40:var(--studio-orange-40);--color-link-40-rgb:var(--studio-orange-40-rgb);--color-link-50:var(--studio-orange-50);--color-link-50-rgb:var(--studio-orange-50-rgb);--color-link-60:var(--studio-orange-60);--color-link-60-rgb:var(--studio-orange-60-rgb);--color-link-70:var(--studio-orange-70);--color-link-70-rgb:var(--studio-orange-70-rgb);--color-link-80:var(--studio-orange-80);--color-link-80-rgb:var(--studio-orange-80-rgb);--color-link-90:var(--studio-orange-90);--color-link-90-rgb:var(--studio-orange-90-rgb);--color-link-100:var(--studio-orange-100);--color-link-100-rgb:var(--studio-orange-100-rgb);--color-masterbar-background:var(--studio-red-80);--color-masterbar-border:var(--studio-red-80);--color-masterbar-text:var(--studio-white);--color-masterbar-item-hover-background:var(--studio-red-90);--color-masterbar-item-active-background:var(--studio-red-100);--color-masterbar-item-new-editor-background:var(--studio-gray-50);--color-masterbar-item-new-editor-hover-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-red-70);--color-sidebar-background-rgb:var(--studio-red-70-rgb);--color-sidebar-border:var(--studio-red-80);--color-sidebar-text:var(--studio-white);--color-sidebar-text-rgb:var(--studio-white-rgb);--color-sidebar-text-alternative:var(--studio-red-10);--color-sidebar-gridicon-fill:var(--studio-red-5);--color-sidebar-menu-selected-background:var(--studio-yellow-20);--color-sidebar-menu-selected-background-rgb:var(--studio-yellow-20-rgb);--color-sidebar-menu-selected-text:var(--studio-yellow-80);--color-sidebar-menu-selected-text-rgb:var(--studio-yellow-80-rgb);--color-sidebar-menu-hover-background:var(--studio-red-80);--color-sidebar-menu-hover-background-rgb:var(--studio-red-80-rgb);--color-sidebar-menu-hover-text:var(--studio-white)}.color-scheme.is-jetpack-cloud,.theme-jetpack-cloud{--color-primary:var(--studio-jetpack-green);--color-primary-rgb:var(--studio-jetpack-green-rgb);--color-primary-dark:var(--studio-jetpack-green-70);--color-primary-dark-rgb:var(--studio-jetpack-green-70-rgb);--color-primary-light:var(--studio-jetpack-green-30);--color-primary-light-rgb:var(--studio-jetpack-green-30-rgb);--color-primary-0:var(--studio-jetpack-green-0);--color-primary-0-rgb:var(--studio-jetpack-green-0-rgb);--color-primary-5:var(--studio-jetpack-green-5);--color-primary-5-rgb:var(--studio-jetpack-green-5-rgb);--color-primary-10:var(--studio-jetpack-green-10);--color-primary-10-rgb:var(--studio-jetpack-green-10-rgb);--color-primary-20:var(--studio-jetpack-green-20);--color-primary-20-rgb:var(--studio-jetpack-green-20-rgb);--color-primary-30:var(--studio-jetpack-green-30);--color-primary-30-rgb:var(--studio-jetpack-green-30-rgb);--color-primary-40:var(--studio-jetpack-green-40);--color-primary-40-rgb:var(--studio-jetpack-green-40-rgb);--color-primary-50:var(--studio-jetpack-green-50);--color-primary-50-rgb:var(--studio-jetpack-green-50-rgb);--color-primary-60:var(--studio-jetpack-green-60);--color-primary-60-rgb:var(--studio-jetpack-green-60-rgb);--color-primary-70:var(--studio-jetpack-green-70);--color-primary-70-rgb:var(--studio-jetpack-green-70-rgb);--color-primary-80:var(--studio-jetpack-green-80);--color-primary-80-rgb:var(--studio-jetpack-green-80-rgb);--color-primary-90:var(--studio-jetpack-green-90);--color-primary-90-rgb:var(--studio-jetpack-green-90-rgb);--color-primary-100:var(--studio-jetpack-green-100);--color-primary-100-rgb:var(--studio-jetpack-green-100-rgb);--color-accent:var(--studio-jetpack-green);--color-accent-rgb:var(--studio-jetpack-green-rgb);--color-accent-dark:var(--studio-jetpack-green-70);--color-accent-dark-rgb:var(--studio-jetpack-green-70-rgb);--color-accent-light:var(--studio-jetpack-green-30);--color-accent-light-rgb:var(--studio-jetpack-green-30-rgb);--color-accent-0:var(--studio-jetpack-green-0);--color-accent-0-rgb:var(--studio-jetpack-green-0-rgb);--color-accent-5:var(--studio-jetpack-green-5);--color-accent-5-rgb:var(--studio-jetpack-green-5-rgb);--color-accent-10:var(--studio-jetpack-green-10);--color-accent-10-rgb:var(--studio-jetpack-green-10-rgb);--color-accent-20:var(--studio-jetpack-green-20);--color-accent-20-rgb:var(--studio-jetpack-green-20-rgb);--color-accent-30:var(--studio-jetpack-green-30);--color-accent-30-rgb:var(--studio-jetpack-green-30-rgb);--color-accent-40:var(--studio-jetpack-green-40);--color-accent-40-rgb:var(--studio-jetpack-green-40-rgb);--color-accent-50:var(--studio-jetpack-green-50);--color-accent-50-rgb:var(--studio-jetpack-green-50-rgb);--color-accent-60:var(--studio-jetpack-green-60);--color-accent-60-rgb:var(--studio-jetpack-green-60-rgb);--color-accent-70:var(--studio-jetpack-green-70);--color-accent-70-rgb:var(--studio-jetpack-green-70-rgb);--color-accent-80:var(--studio-jetpack-green-80);--color-accent-80-rgb:var(--studio-jetpack-green-80-rgb);--color-accent-90:var(--studio-jetpack-green-90);--color-accent-90-rgb:var(--studio-jetpack-green-90-rgb);--color-accent-100:var(--studio-jetpack-green-100);--color-accent-100-rgb:var(--studio-jetpack-green-100-rgb);--color-link:var(--studio-jetpack-green-40);--color-link-rgb:var(--studio-jetpack-green-40-rgb);--color-link-dark:var(--studio-jetpack-green-60);--color-link-dark-rgb:var(--studio-jetpack-green-60-rgb);--color-link-light:var(--studio-jetpack-green-20);--color-link-light-rgb:var(--studio-jetpack-green-20-rgb);--color-link-0:var(--studio-jetpack-green-0);--color-link-0-rgb:var(--studio-jetpack-green-0-rgb);--color-link-5:var(--studio-jetpack-green-5);--color-link-5-rgb:var(--studio-jetpack-green-5-rgb);--color-link-10:var(--studio-jetpack-green-10);--color-link-10-rgb:var(--studio-jetpack-green-10-rgb);--color-link-20:var(--studio-jetpack-green-20);--color-link-20-rgb:var(--studio-jetpack-green-20-rgb);--color-link-30:var(--studio-jetpack-green-30);--color-link-30-rgb:var(--studio-jetpack-green-30-rgb);--color-link-40:var(--studio-jetpack-green-40);--color-link-40-rgb:var(--studio-jetpack-green-40-rgb);--color-link-50:var(--studio-jetpack-green-50);--color-link-50-rgb:var(--studio-jetpack-green-50-rgb);--color-link-60:var(--studio-jetpack-green-60);--color-link-60-rgb:var(--studio-jetpack-green-60-rgb);--color-link-70:var(--studio-jetpack-green-70);--color-link-70-rgb:var(--studio-jetpack-green-70-rgb);--color-link-80:var(--studio-jetpack-green-80);--color-link-80-rgb:var(--studio-jetpack-green-80-rgb);--color-link-90:var(--studio-jetpack-green-90);--color-link-90-rgb:var(--studio-jetpack-green-90-rgb);--color-link-100:var(--studio-jetpack-green-100);--color-link-100-rgb:var(--studio-jetpack-green-100-rgb);--color-masterbar-background:var(--studio-white);--color-masterbar-border:var(--studio-gray-5);--color-masterbar-text:var(--studio-gray-50);--color-masterbar-item-hover-background:var(--studio-white);--color-masterbar-item-active-background:var(--studio-white);--color-masterbar-item-new-editor-background:var(--studio-white);--color-masterbar-item-new-editor-hover-background:var(--studio-white);--color-masterbar-unread-dot-background:var(--color-accent-30);--color-masterbar-toggle-drafts-editor-background:var(--studio-gray-60);--color-masterbar-toggle-drafts-editor-hover-background:var(--studio-gray-40);--color-masterbar-toggle-drafts-editor-border:var(--studio-gray-10);--color-sidebar-background:var(--studio-white);--color-sidebar-background-rgb:var(--studio-white-rgb);--color-sidebar-border:var(--studio-gray-5);--color-sidebar-text:var(--studio-gray-60);--color-sidebar-text-rgb:var(--studio-gray-60-rgb);--color-sidebar-text-alternative:var(--studio-gray-60);--color-sidebar-gridicon-fill:var(--studio-gray-60);--color-sidebar-menu-selected-text:var(--studio-jetpack-green-50);--color-sidebar-menu-selected-text-rgb:var(--studio-jetpack-green-50-rgb);--color-sidebar-menu-selected-background:var(--studio-jetpack-green-5);--color-sidebar-menu-selected-background-rgb:var(--studio-jetpack-green-5-rgb);--color-sidebar-menu-hover-text:var(--studio-gray-90);--color-sidebar-menu-hover-background:var(--studio-gray-5);--color-sidebar-menu-hover-background-rgb:var(--studio-gray-5-rgb);--color-scary-0:var(--studio-red-0);--color-scary-5:var(--studio-red-5);--color-scary-40:var(--studio-red-40);--color-scary-50:var(--studio-red-50);--color-scary-60:var(--studio-red-60)}@media (max-width:480px){.domain-categories{margin-bottom:20px}.domain-categories .domain-categories__dropdown-button.components-button{display:block;margin-bottom:0}.domain-categories .domain-categories__item-group{display:none}.domain-categories.is-open .domain-categories__item-group{display:block}}.domain-categories__dropdown-button.components-button{width:100%;text-align:center;margin-bottom:8px;height:40px;border:1px solid #dcdcde;border:1px solid var(--studio-gray-5);display:none}.domain-categories__dropdown-button.components-button>*{vertical-align:middle}.domain-categories__dropdown-button.components-button svg{margin-right:5px}@media (max-width:480px){.domain-categories__item-group{text-align:center;border:1px solid #dcdcde;border:1px solid var(--studio-gray-5);margin-top:-1px}}.domain-categories__item .components-button{color:#101517;color:var(--studio-gray-100);width:100%;text-align:right}.domain-categories__item .components-button:focus,.domain-categories__item .components-button:hover{color:#101517;color:var(--studio-gray-100);box-shadow:none;font-weight:600;text-decoration:underline}.domain-categories__item.is-selected .components-button{font-weight:600;text-decoration:underline}@media (max-width:480px){.domain-categories__item .components-button{display:block;text-align:center}}html:not(.accessible-focus) .domain-categories__item .components-button:focus{box-shadow:none}
editor-domain-picker/index.php CHANGED
@@ -29,6 +29,7 @@ function enqueue_script_and_style() {
29
  $asset_file = include plugin_dir_path( __FILE__ ) . 'dist/editor-domain-picker.asset.php';
30
  $script_dependencies = isset( $asset_file['dependencies'] ) ? $asset_file['dependencies'] : array();
31
  $script_version = isset( $asset_file['version'] ) ? $asset_file['version'] : filemtime( plugin_dir_path( __FILE__ ) . 'dist/editor-domain-picker.js' );
 
32
 
33
  wp_enqueue_script(
34
  'a8c-fse-editor-domain-picker-script',
@@ -37,5 +38,12 @@ function enqueue_script_and_style() {
37
  $script_version,
38
  true
39
  );
 
 
 
 
 
 
 
40
  }
41
  add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_script_and_style' );
29
  $asset_file = include plugin_dir_path( __FILE__ ) . 'dist/editor-domain-picker.asset.php';
30
  $script_dependencies = isset( $asset_file['dependencies'] ) ? $asset_file['dependencies'] : array();
31
  $script_version = isset( $asset_file['version'] ) ? $asset_file['version'] : filemtime( plugin_dir_path( __FILE__ ) . 'dist/editor-domain-picker.js' );
32
+ $styles_version = isset( $asset_file['version'] ) ? $asset_file['version'] : filemtime( plugin_dir_path( __FILE__ ) . 'dist/editor-domain-picker.css' );
33
 
34
  wp_enqueue_script(
35
  'a8c-fse-editor-domain-picker-script',
38
  $script_version,
39
  true
40
  );
41
+
42
+ wp_enqueue_style(
43
+ 'a8c-fse-editor-domain-picker-styles',
44
+ plugins_url( 'dist/editor-domain-picker.css', __FILE__ ),
45
+ array(),
46
+ $styles_version
47
+ );
48
  }
49
  add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_script_and_style' );
editor-domain-picker/index.ts CHANGED
@@ -1,28 +1,21 @@
1
  /**
2
  * External dependencies
3
  */
 
4
  import 'a8c-fse-common-data-stores';
5
- import { select } from '@wordpress/data';
6
 
7
- /* eslint-disable no-console */
 
8
 
9
- console.log( "👋 Hi! I'm the editor-domain-picker bundle running!" );
 
 
 
 
 
10
 
11
- let results;
12
- let int: number | undefined = setInterval( () => {
13
- results = select( 'automattic/domains/suggestions' ).getCategories();
14
 
15
- if ( results.length ) {
16
- // eslint-disable-next-line no-console
17
- console.log( results );
18
- clearInterval( int );
19
- int = undefined;
20
- }
21
  } );
22
-
23
- setTimeout( () => {
24
- if ( int ) {
25
- console.log( '😢 Timed out before we were able to get Domain Categories.' );
26
- clearInterval( int );
27
- }
28
- }, 5000 );
1
  /**
2
  * External dependencies
3
  */
4
+ import * as React from 'react';
5
  import 'a8c-fse-common-data-stores';
 
6
 
7
+ import DomainPickerButton from './src/domain-picker-button';
8
+ import * as ReactDOM from 'react-dom';
9
 
10
+ const awaitSettingsBar = setInterval( () => {
11
+ const settingsBar = document.querySelector( '.edit-post-header__settings' );
12
+ if ( ! settingsBar ) {
13
+ return;
14
+ }
15
+ clearInterval( awaitSettingsBar );
16
 
17
+ const domainPickerContainer = document.createElement( 'div' );
18
+ settingsBar.prepend( domainPickerContainer );
 
19
 
20
+ ReactDOM.render( React.createElement( DomainPickerButton ), domainPickerContainer );
 
 
 
 
 
21
  } );
 
 
 
 
 
 
 
editor-domain-picker/src/domain-picker-button/index.tsx ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import * as React from 'react';
5
+ import { useSelect } from '@wordpress/data';
6
+ import 'a8c-fse-common-data-stores';
7
+ import { Site } from '@automattic/data-stores';
8
+
9
+ import DomainPickerModal from '../domain-picker-modal';
10
+ import { Button } from '@wordpress/components';
11
+ import { Icon, chevronDown } from '@wordpress/icons';
12
+ const FLOW_ID = 'gutenboarding';
13
+
14
+ const SITES_STORE = Site.register( { client_id: '', client_secret: '' } );
15
+
16
+ declare global {
17
+ interface Window {
18
+ _currentSiteId: number;
19
+ }
20
+ }
21
+
22
+ export default function DomainPickerButton() {
23
+ const [ isDomainModalVisible, setDomainModalVisibility ] = React.useState( false );
24
+ const [ domainSearch, setDomainSearch ] = React.useState( '' );
25
+
26
+ const site = useSelect( ( select ) => select( SITES_STORE ).getSite( window._currentSiteId ) );
27
+
28
+ const currentDomain = {
29
+ domain_name: ( site?.URL && new URL( site?.URL ).hostname ) || '',
30
+ is_free: site?.URL?.endsWith( 'wordpress.com' ),
31
+ };
32
+
33
+ const search = ( domainSearch.trim() || site?.name ) ?? '';
34
+
35
+ return (
36
+ <>
37
+ <Button
38
+ aria-expanded={ isDomainModalVisible }
39
+ aria-haspopup="menu"
40
+ aria-pressed={ isDomainModalVisible }
41
+ onClick={ () => setDomainModalVisibility( ( s ) => ! s ) }
42
+ >
43
+ <span className="domain-picker-button__label">{ `Domain: ${ currentDomain.domain_name }` }</span>
44
+ <Icon icon={ chevronDown } size={ 22 } />
45
+ </Button>
46
+ <DomainPickerModal
47
+ analyticsFlowId={ FLOW_ID }
48
+ analyticsUiAlgo="editor_domain_modal"
49
+ initialDomainSearch={ search }
50
+ onSetDomainSearch={ setDomainSearch }
51
+ isOpen={ isDomainModalVisible }
52
+ showDomainConnectButton
53
+ showDomainCategories
54
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
55
+ // @ts-ignore
56
+ currentDomain={ currentDomain }
57
+ onDomainSelect={ () => setDomainModalVisibility( false ) }
58
+ onClose={ () => setDomainModalVisibility( false ) }
59
+ />
60
+ </>
61
+ );
62
+ }
editor-domain-picker/src/domain-picker-modal/index.tsx ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import * as React from 'react';
5
+ import { Modal } from '@wordpress/components';
6
+
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+ import DomainPicker, { Props as DomainPickerProps } from '@automattic/domain-picker';
11
+ import './styles.scss';
12
+
13
+ interface Props extends DomainPickerProps {
14
+ isOpen: boolean;
15
+ onClose: () => void;
16
+ }
17
+
18
+ const DomainPickerModal: React.FunctionComponent< Props > = ( { isOpen, onClose, ...props } ) => {
19
+ if ( ! isOpen ) {
20
+ return null;
21
+ }
22
+
23
+ return (
24
+ <Modal
25
+ className="domain-picker-modal"
26
+ overlayClassName="domain-picker-modal-overlay"
27
+ bodyOpenClassName="has-domain-picker-modal"
28
+ onRequestClose={ onClose }
29
+ title=""
30
+ >
31
+ <DomainPicker showDomainCategories { ...props } />
32
+ </Modal>
33
+ );
34
+ };
35
+
36
+ export default DomainPickerModal;
editor-domain-picker/src/stores/index.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import 'a8c-fse-common-data-stores';
5
+
6
+ export const DOMAIN_SUGGESTIONS_STORE = 'automattic/domains/suggestions';
editor-plans-grid/dist/editor-plans-grid.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'e404d21a9c818509f079bd111a04d5db');
editor-plans-grid/dist/editor-plans-grid.css ADDED
@@ -0,0 +1 @@
 
1
+ @font-face{font-display:swap;font-family:Recoleta;font-weight:400;src:url(https://s1.wp.com/i/fonts/recoleta/400.woff2) format("woff2"),url(https://s1.wp.com/i/fonts/recoleta/400.woff) format("woff")}.wp-brand-font{font-family:"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400}[lang*=af] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=ca] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=cs] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=da] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=de] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=en] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=es] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=eu] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=fi] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=fr] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=gl] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=hr] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=hu] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=id] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=is] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=it] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=lv] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=mt] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=nb] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=nl] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=pl] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=pt] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=ro] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=ru] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sk] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sl] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sq] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sr] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sv] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sw] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=tr] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=uz] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}.plans-modal-overlay.components-modal__screen-overlay{background:none;width:100%;height:100%}.plans-modal.components-modal__frame{width:100%;height:100%;top:0;left:0;min-width:unset;max-width:none;max-height:none;transform:none;border:none;box-shadow:none;position:absolute}.plans-modal .components-modal__content{padding:0}.plans-grid-container{padding:88px}.plans-grid{margin-bottom:85px}@media (min-width:600px){.plans-grid{margin-bottom:0}}.plans-grid__header{margin:44px 0 50px;display:flex;justify-content:space-between;align-items:center}@media (min-width:480px){.plans-grid__header{margin:64px 0 80px}}.plans-grid__details{margin-top:70px;margin-bottom:120px}@media (max-width:1440px){.plans-grid__details-container{overflow-x:auto;width:100vw;position:absolute;left:0;padding:0 20px}}@media (max-width:1440px) and (min-width:600px){.plans-grid__details-container{padding:0 44px}}@media (max-width:1440px) and (min-width:782px){.plans-grid__details-container{padding:0 88px}}.plans-grid__details-heading .plans-ui-title{color:var(--studio-black);margin-bottom:40px;font-size:32px;line-height:40px;letter-spacing:.2px}.plans-table{width:100%;display:flex;flex-wrap:wrap}.plan-item{display:inline-flex;min-width:250px;flex-grow:1;flex-basis:0;flex-direction:column;margin-top:30px}@media (min-width:480px){.plan-item+.plan-item{margin-left:-1px}}@media (max-width:480px){.plan-item:not(.is-popular){margin-top:-1px}.plan-item.is-open:not(.is-popular){margin-bottom:30px}}.plan-item__viewport{width:100%;height:100%;flex:1;border:1px solid #e2e4e7;padding:20px}.plan-item:not(.is-popular) .plan-item__heading{display:flex;align-items:center}@media (max-width:480px){.plan-item:not(.is-popular) .plan-item__heading{font-size:1em}}.plan-item__name{font-weight:700;font-size:18px;line-height:24px;display:inline-block}@media (max-width:480px){.plan-item__name{font-size:14px}}@media (max-width:480px){.plan-item:not(.is-popular) .plan-item__name{font-weight:400}}.plan-item__domain-name{font-size:.875rem}.plan-item__mobile-expand-all-plans.components-button.is-link{margin:20px auto;color:#555d66}.plan-item__badge{position:relative;display:block;background:#000;text-align:center;text-transform:uppercase;color:#fff;padding:4.5px;font-size:.75rem;margin:-24px 0 0}.plan-item__price-amount{font-weight:600;font-size:32px;line-height:24px}.plan-item__price-amount.is-loading{max-width:60px;animation:loading-fade 1.6s ease-in-out infinite;background:var(--color-neutral-5);color:transparent}.plan-item__price-amount.is-loading:after{content:"\00a0"}@media (max-width:480px){.plan-item:not(.is-open) .plan-item__price-amount{font-weight:400;font-size:1em}}.plan-item__summary{width:100%}.plan-item__summary::-webkit-details-marker{display:none}@media (min-width:480px){.plan-item.is-popular .plan-item__summary,.plan-item__summary{pointer-events:none}}@media (max-width:480px){.plan-item:not(.is-open) .plan-item__summary{display:flex}}.plan-item__price-note{font-size:12px;line-height:19px;letter-spacing:-.4px;color:var(--studio-gray-40);margin-top:8px;margin-bottom:10px}.plan-item__details .plan-item__summary .plan-item__price{margin-top:16px;margin-bottom:8px}.plan-item:not(.is-open) .plan-item__summary .plan-item__price{margin-top:0;margin-bottom:0;margin-left:10px;color:#555d66}.plan-item__actions{margin-bottom:16px}.plan-item__dropdown-chevron{flex:1;text-align:right}.plan-item.is-open .plan-item__dropdown-chevron{display:none}.plan-item__domain-summary{font-size:.875rem;line-height:22px;margin-top:10px}.plan-item__domain-summary.components-button.is-link{text-decoration:none;font-size:14px;color:var(--studio-blue-40);display:flex;align-items:flex-start}.plan-item__domain-summary svg:first-child{margin-right:5px;vertical-align:middle;margin-top:4px;flex:none}.plan-item__domain-summary svg:first-child path{fill:#4aa150;stroke:#4aa150}@media (max-width:480px){.plan-item.is-popular{order:-3}}.plan-item__domain-summary.is-picked{font-weight:700}.plan-item__domain-summary.is-cta{font-weight:700;padding:0}.plan-item__domain-summary.is-cta.components-button.is-link{color:var(--studio-blue-40)}.plan-item__domain-summary.is-cta svg:first-child path{fill:#4aa150;stroke:#4aa150;margin-top:5px}.plan-item__domain-summary.is-cta svg:last-child{fill:var(--studio-blue-40);stroke:var(--studio-blue-40);margin-left:8px;margin-top:8px}.plan-item__domain-summary.components-button.is-link.is-free{font-weight:700;color:#ce863d;text-decoration:line-through}.plan-item__domain-summary.components-button.is-link.is-free svg path{fill:#ce863d;stroke:#ce863d}.plan-item__select-button.components-button{padding:0 24px;height:40px}.plan-item__select-button.components-button svg{margin-left:-8px;margin-right:10px}.plan-item__domain-picker-button.components-button{font-size:.875rem;line-height:19px;letter-spacing:.2px;word-break:break-word}.plan-item__domain-picker-button.components-button.has-domain{color:var(--studio-gray-50);text-decoration:none}.plan-item__domain-picker-button.components-button svg{margin-left:2px}.plan-item__feature-item{font-size:.875rem;line-height:20px;letter-spacing:.2px;margin:4px 0;vertical-align:middle;color:#555d66;display:flex;align-items:flex-start}.plan-item__feature-item svg{display:block;margin-right:6px;margin-top:2px}.plan-item__feature-item svg path{fill:#4aa150;stroke:#4aa150}.plans-ui-title{font-family:Recoleta,Georgia,Times New Roman,Times,serif;font-weight:400;letter-spacing:-.4px;font-size:32px;line-height:40px;color:var(--studio-gray-100)}@media (min-width:480px){.plans-ui-title{font-family:Recoleta,Georgia,Times New Roman,Times,serif;font-weight:400;letter-spacing:-.4px;font-size:36px;line-height:40px}}@media (min-width:1080px){.plans-ui-title{font-family:Recoleta,Georgia,Times New Roman,Times,serif;font-weight:400;letter-spacing:-.4px;font-size:42px;line-height:57px}}.plans-details__table{width:100%}.plans-details__table td,.plans-details__table th{padding:13px 24px}.plans-details__table td:first-child,.plans-details__table th:first-child{padding-left:0;width:20%}@media (min-width:480px){.plans-details__table td:first-child,.plans-details__table th:first-child{width:40%}}.plans-details__table td:not(:first-child),.plans-details__table th:not(:first-child){white-space:nowrap}.plans-details__table .hidden{display:none}.plans-details__header-row th{font-weight:600;font-size:.875rem;line-height:20px;text-transform:uppercase;color:var(--studio-gray-20);padding-top:5px;padding-bottom:5px;border-bottom:1px solid #eaeaeb}.plans-details__feature-row td,.plans-details__feature-row th{font-size:.875rem;line-height:17px;letter-spacing:.2px;border-bottom:1px solid #eaeaeb;vertical-align:middle}
editor-plans-grid/dist/editor-plans-grid.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},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=25)}([function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){var a;
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 r(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var l=typeof a;if("string"===l||"number"===l)e.push(a);else if(Array.isArray(a)&&a.length){var i=r.apply(null,a);i&&e.push(i)}else if("object"===l)for(var c in a)n.call(a,c)&&a[c]&&e.push(c)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(a=function(){return r}.apply(t,[]))||(e.exports=a)}()},function(e,t){!function(){e.exports=this["a8c-fse-common-data-stores"]}()},,function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,n){var a=n(14),r=n(15),l=n(16),i=n(18);e.exports=function(e,t){return a(e)||r(e,t)||l(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 a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var a=n(19);e.exports=function(e,t){if(null==e)return{};var n,r,l=a(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)&&(l[n]=e[n])}return l}},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=[],a=!0,r=!1,l=void 0;try{for(var i,c=e[Symbol.iterator]();!(a=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(o){r=!0,l=o}finally{try{a||null==c.return||c.return()}finally{if(r)throw l}}return n}}},function(e,t,n){var a=n(17);e.exports=function(e,t){if(e){if("string"==typeof e)return 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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}},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){e.exports=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),l=n(10),i=(n(8),n(11)),c=n.n(i),o=n(1),s=n(2),u=n(3);function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}var d=function(e){var t=e.icon,n=e.size,a=void 0===n?24:n,r=p(e,["icon","size"]);return Object(o.cloneElement)(t,function(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){m(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}({width:a,height:a},r))},b=n(4),v=Object(o.createElement)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(b.Path,{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),_=n(12),E=n.n(_),y=n(13),O=n.n(y),g=n(5);var h=function(){return(h=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};var j=n(6),P=a.createContext(S()),N=function(){return a.useContext(P)};Object(j.createHigherOrderComponent)((function(e){return function(t){var n=N();return a.createElement(e,h({},n,t))}}),"withI18n");function S(e){var t,n,a=Object(g.createI18n)(e),r=null!==(n=null===(t=null==e?void 0:e[""])||void 0===t?void 0:t.localeSlug)&&void 0!==n?n:"en";return{__:a.__.bind(a),_n:a._n.bind(a),_nx:a._nx.bind(a),_x:a._x.bind(a),isRTL:a.isRTL.bind(a),i18nLocale:r}}n(23);var w=function(e){var t=e.children;return a.createElement("h1",{className:"plans-ui-title"},t)},x=Object(o.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(b.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"})),k=Object(o.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(b.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"})),A=n(7),D=n.n(A),C=r.a.createElement(d,{icon:x,size:17}),M=r.a.createElement(d,{icon:k,size:17}),I=r.a.createElement("svg",{width:"8",viewBox:"0 0 8 4"},r.a.createElement("path",{d:"M0 0 L8 0 L4 4 L0 0",fill:"currentColor"}));var L=function(e){var t=e.slug,n=e.name,l=e.price,i=e.isPopular,c=void 0!==i&&i,o=e.isFree,s=void 0!==o&&o,m=e.domain,p=e.features,f=e.onSelect,d=e.onPickDomainClick,b=e.onToggleExpandAll,v=e.allPlansExpanded,_=N().__,E=Object(a.useState)(!1),y=E[0],O=E[1],h=Object(j.useViewportMatch)("mobile",">="),P=function(e,t,n){return{NO_DOMAIN:{FREE_PLAN:null,PAID_PLAN:{className:"plan-item__domain-summary is-cta",icon:C,domainMessage:r.a.createElement(r.a.Fragment,null,n("Pick a free domain (1 year)")," ",I)}},FREE_DOMAIN:{FREE_PLAN:null,PAID_PLAN:{className:"plan-item__domain-summary is-cta",icon:C,domainMessage:r.a.createElement(r.a.Fragment,null,n("Pick a free domain (1 year)")," ",I)}},PAID_DOMAIN:{FREE_PLAN:{className:"plan-item__domain-summary is-free",icon:M,domainMessage:Object(g.sprintf)(n("%s is not included"),null==t?void 0:t.domain_name)},PAID_PLAN:{className:"plan-item__domain-summary is-picked",icon:C,domainMessage:Object(g.sprintf)(n("%s is included"),null==t?void 0:t.domain_name)}}}[t&&(t.is_free?"FREE_DOMAIN":"PAID_DOMAIN")||"NO_DOMAIN"][e?"FREE_PLAN":"PAID_PLAN"]}(s,m,_);Object(a.useEffect)((function(){O(v)}),[v]);var S=v||h||c||y;return r.a.createElement("div",{className:D()("plan-item",{"is-popular":c,"is-open":S})},c&&r.a.createElement("span",{className:"plan-item__badge"},_("Popular")),r.a.createElement("div",{className:D()("plan-item__viewport",{"is-popular":c})},r.a.createElement("div",{className:"plan-item__details"},r.a.createElement("div",{tabIndex:0,role:"button",onClick:function(){return O((function(e){return!e}))},onKeyDown:function(e){return 32===e.keyCode&&O((function(e){return!e}))},className:"plan-item__summary"},r.a.createElement("div",{className:"plan-item__heading"},r.a.createElement("div",{className:"plan-item__name"},n)),r.a.createElement("div",{className:"plan-item__price"},r.a.createElement("div",{className:D()("plan-item__price-amount",{"is-loading":!l})},l||" ")),!S&&r.a.createElement("div",{className:"plan-item__dropdown-chevron"},I)),r.a.createElement("div",{hidden:!S},r.a.createElement("div",{className:"plan-item__price-note"},_(s?"free forever":"per month, billed yearly")),r.a.createElement("div",{className:"plan-item__actions"},r.a.createElement(u.Button,{className:"plan-item__select-button",onClick:function(){f(t)},isPrimary:!0,isLarge:!0},r.a.createElement("span",null,_("Choose")))),r.a.createElement("div",{className:"plan-item__domain"},P&&r.a.createElement(u.Button,{className:P.className,onClick:d,isLink:!0},P.icon,P.domainMessage)),r.a.createElement("div",{className:"plan-item__features"},r.a.createElement("ul",{className:"plan-item__feature-item-group"},p.map((function(e,t){return r.a.createElement("li",{key:t,className:"plan-item__feature-item"},C," ",e)}))))))),c&&!h&&r.a.createElement(u.Button,{onClick:b,className:"plan-item__mobile-expand-all-plans",isLink:!0},_(v?"Collapse all plans":"Expand all plans")))},F="automattic/onboard/plans",R=(n(22),function(e){var t=e.selectedPlanSlug,n=e.onPlanSelect,l=e.onPickDomainClick,i=e.currentDomain,c=Object(s.useSelect)((function(e){return e(F).getSupportedPlans()})),o=Object(s.useSelect)((function(e){return e(F).getPrices()})),u=Object(a.useState)(!1),m=u[0],p=u[1];return r.a.createElement("div",{className:"plans-table"},c.map((function(e){var a;return e&&r.a.createElement(L,{allPlansExpanded:m,key:e.storeSlug,slug:e.storeSlug,domain:i,features:null!==(a=e.features)&&void 0!==a?a:[],isPopular:e.isPopular,isFree:e.isFree,price:o[e.storeSlug],name:null==e?void 0:e.title.toString(),isSelected:e.storeSlug===t,onSelect:n,onPickDomainClick:l,onToggleExpandAll:function(){return p((function(e){return!e}))}})})))}),z=(n(24),r.a.createElement(d,{icon:x,size:25})),B=function(e){var t=e.onSelect,n=Object(s.useSelect)((function(e){return e(F).getPlansDetails()})),a=Object(s.useSelect)((function(e){return e(F).getPrices()})),l=Object(s.useSelect)((function(e){return e(F).getSupportedPlans()})),i=N().__;return r.a.createElement("div",{className:"plans-details"},r.a.createElement("table",{className:"plans-details__table"},r.a.createElement("thead",null,r.a.createElement("tr",{className:"plans-details__header-row"},r.a.createElement("th",null,i("Feature")),l.map((function(e){return r.a.createElement("th",{key:e.storeSlug},e.title)})))),n.map((function(e){return r.a.createElement("tbody",{key:e.id},e.name&&r.a.createElement("tr",{className:"plans-details__header-row"},r.a.createElement("th",{colSpan:6},e.name)),e.features.map((function(e,t){return r.a.createElement("tr",{className:"plans-details__feature-row",key:t},r.a.createElement("th",null,e.name),e.data.map((function(t,n){return r.a.createElement("td",{key:n},"checkbox"===e.type&&(t?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{className:"hidden"},i("Available")),z):r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{className:"hidden"},i("Unavailable")," "))),"text"===e.type&&t)})))})))})),r.a.createElement("tbody",null,r.a.createElement("tr",{className:"plans-details__header-row"},r.a.createElement("th",{colSpan:6},i("Sign up"))),r.a.createElement("tr",{className:"plans-details__feature-row",key:"price"},r.a.createElement("th",null,i("Monthly subscription (billed yearly)")),l.map((function(e){return r.a.createElement("td",{key:e.storeSlug},a[e.storeSlug])}))),r.a.createElement("tr",{className:"plans-details__feature-row",key:"cta"},r.a.createElement("th",null),l.map((function(e){return r.a.createElement("td",{key:e.storeSlug},r.a.createElement(u.Button,{onClick:function(){t(e.storeSlug)},isPrimary:!0,isLarge:!0},r.a.createElement("span",null,i("Choose"))))}))))))},T=(n(21),function(e){var t,n=e.header,r=e.currentPlan,l=e.currentDomain,i=e.onPlanSelect,c=e.onPickDomainClick,o=N().__,u=Object(s.useDispatch)(F).setPlan,m=function(e){u(e),null==i||i(e)};return a.createElement("div",{className:"plans-grid"},a.createElement("div",{className:"plans-grid__header"},n),a.createElement("div",{className:"plans-grid__table"},a.createElement("div",{className:"plans-grid__table-container"},a.createElement(R,{selectedPlanSlug:null!==(t=null==r?void 0:r.storeSlug)&&void 0!==t?t:"",onPlanSelect:m,currentDomain:l,onPickDomainClick:c}))),a.createElement("div",{className:"plans-grid__details"},a.createElement("div",{className:"plans-grid__details-heading"},a.createElement(w,null,o("Detailed comparison"))),a.createElement("div",{className:"plans-grid__details-container"},a.createElement(B,{onSelect:m}))))}),V=(n(20),function(e){var t=e.isOpen,n=e.onClose,a=O()(e,["isOpen","onClose"]);if(!t)return null;var r=Object(o.createElement)("div",null,Object(o.createElement)("h1",{className:"wp-brand-font"},Object(g.__)("Choose a plan")),Object(o.createElement)("p",null,Object(g.__)("Pick a plan that’s right for you. Switch plans as your needs change. There’s no risk, you can cancel for a full refund within 30 days.")));return Object(o.createElement)(u.Modal,{className:"plans-modal",overlayClassName:"plans-modal-overlay",bodyOpenClassName:"has-plans-modal",onRequestClose:n,title:""},Object(o.createElement)("div",{className:"plans-grid-container"},Object(o.createElement)(T,E()({header:r},a))))}),G=function(){var e=a.useState(!1),t=c()(e,2),n=t[0],r=t[1],l=Object(s.useSelect)((function(e){return e("automattic/onboard/plans").getSelectedPlan()||void 0})),i=Object(s.useDispatch)("automattic/onboard/plans").setPlan;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(u.Button,{"aria-expanded":n,"aria-haspopup":"menu","aria-pressed":n,onClick:function(){return r((function(e){return!e}))}},Object(o.createElement)("span",null,"Plans: ",l&&l.title),Object(o.createElement)(d,{icon:v,size:22})),Object(o.createElement)(V,{isOpen:n,currentDomain:void 0,currentPlan:l,onPlanSelect:function(e){i(e),r(!1)},onClose:function(){return r(!1)}}))},q=setInterval((function(){var e=document.querySelector(".edit-post-header__settings");if(e){clearInterval(q);var t=document.createElement("div");e.prepend(t),l.render(a.createElement(G),t)}}))}]));
editor-plans-grid/dist/editor-plans-grid.rtl.css ADDED
@@ -0,0 +1 @@
 
1
+ @font-face{font-display:swap;font-family:Recoleta;font-weight:400;src:url(https://s1.wp.com/i/fonts/recoleta/400.woff2) format("woff2"),url(https://s1.wp.com/i/fonts/recoleta/400.woff) format("woff")}.wp-brand-font{font-family:"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400}[lang*=af] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=ca] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=cs] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=da] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=de] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=en] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=es] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=eu] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=fi] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=fr] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=gl] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=hr] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=hu] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=id] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=is] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=it] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=lv] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=mt] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=nb] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=nl] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=pl] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=pt] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=ro] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=ru] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sk] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sl] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sq] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sr] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sv] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=sw] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=tr] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}[lang*=uz] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}.plans-modal-overlay.components-modal__screen-overlay{background:none;width:100%;height:100%}.plans-modal.components-modal__frame{width:100%;height:100%;top:0;right:0;min-width:unset;max-width:none;max-height:none;transform:none;border:none;box-shadow:none;position:absolute}.plans-modal .components-modal__content{padding:0}.plans-grid-container{padding:88px}.plans-grid{margin-bottom:85px}@media (min-width:600px){.plans-grid{margin-bottom:0}}.plans-grid__header{margin:44px 0 50px;display:flex;justify-content:space-between;align-items:center}@media (min-width:480px){.plans-grid__header{margin:64px 0 80px}}.plans-grid__details{margin-top:70px;margin-bottom:120px}@media (max-width:1440px){.plans-grid__details-container{overflow-x:auto;width:100vw;position:absolute;right:0;padding:0 20px}}@media (max-width:1440px) and (min-width:600px){.plans-grid__details-container{padding:0 44px}}@media (max-width:1440px) and (min-width:782px){.plans-grid__details-container{padding:0 88px}}.plans-grid__details-heading .plans-ui-title{color:var(--studio-black);margin-bottom:40px;font-size:32px;line-height:40px;letter-spacing:.2px}.plans-table{width:100%;display:flex;flex-wrap:wrap}.plan-item{display:inline-flex;min-width:250px;flex-grow:1;flex-basis:0;flex-direction:column;margin-top:30px}@media (min-width:480px){.plan-item+.plan-item{margin-right:-1px}}@media (max-width:480px){.plan-item:not(.is-popular){margin-top:-1px}.plan-item.is-open:not(.is-popular){margin-bottom:30px}}.plan-item__viewport{width:100%;height:100%;flex:1;border:1px solid #e2e4e7;padding:20px}.plan-item:not(.is-popular) .plan-item__heading{display:flex;align-items:center}@media (max-width:480px){.plan-item:not(.is-popular) .plan-item__heading{font-size:1em}}.plan-item__name{font-weight:700;font-size:18px;line-height:24px;display:inline-block}@media (max-width:480px){.plan-item__name{font-size:14px}}@media (max-width:480px){.plan-item:not(.is-popular) .plan-item__name{font-weight:400}}.plan-item__domain-name{font-size:.875rem}.plan-item__mobile-expand-all-plans.components-button.is-link{margin:20px auto;color:#555d66}.plan-item__badge{position:relative;display:block;background:#000;text-align:center;text-transform:uppercase;color:#fff;padding:4.5px;font-size:.75rem;margin:-24px 0 0}.plan-item__price-amount{font-weight:600;font-size:32px;line-height:24px}.plan-item__price-amount.is-loading{max-width:60px;animation:loading-fade 1.6s ease-in-out infinite;background:var(--color-neutral-5);color:transparent}.plan-item__price-amount.is-loading:after{content:"\00a0"}@media (max-width:480px){.plan-item:not(.is-open) .plan-item__price-amount{font-weight:400;font-size:1em}}.plan-item__summary{width:100%}.plan-item__summary::-webkit-details-marker{display:none}@media (min-width:480px){.plan-item.is-popular .plan-item__summary,.plan-item__summary{pointer-events:none}}@media (max-width:480px){.plan-item:not(.is-open) .plan-item__summary{display:flex}}.plan-item__price-note{font-size:12px;line-height:19px;letter-spacing:-.4px;color:var(--studio-gray-40);margin-top:8px;margin-bottom:10px}.plan-item__details .plan-item__summary .plan-item__price{margin-top:16px;margin-bottom:8px}.plan-item:not(.is-open) .plan-item__summary .plan-item__price{margin-top:0;margin-bottom:0;margin-right:10px;color:#555d66}.plan-item__actions{margin-bottom:16px}.plan-item__dropdown-chevron{flex:1;text-align:left}.plan-item.is-open .plan-item__dropdown-chevron{display:none}.plan-item__domain-summary{font-size:.875rem;line-height:22px;margin-top:10px}.plan-item__domain-summary.components-button.is-link{text-decoration:none;font-size:14px;color:var(--studio-blue-40);display:flex;align-items:flex-start}.plan-item__domain-summary svg:first-child{margin-left:5px;vertical-align:middle;margin-top:4px;flex:none}.plan-item__domain-summary svg:first-child path{fill:#4aa150;stroke:#4aa150}@media (max-width:480px){.plan-item.is-popular{order:-3}}.plan-item__domain-summary.is-picked{font-weight:700}.plan-item__domain-summary.is-cta{font-weight:700;padding:0}.plan-item__domain-summary.is-cta.components-button.is-link{color:var(--studio-blue-40)}.plan-item__domain-summary.is-cta svg:first-child path{fill:#4aa150;stroke:#4aa150;margin-top:5px}.plan-item__domain-summary.is-cta svg:last-child{fill:var(--studio-blue-40);stroke:var(--studio-blue-40);margin-right:8px;margin-top:8px}.plan-item__domain-summary.components-button.is-link.is-free{font-weight:700;color:#ce863d;text-decoration:line-through}.plan-item__domain-summary.components-button.is-link.is-free svg path{fill:#ce863d;stroke:#ce863d}.plan-item__select-button.components-button{padding:0 24px;height:40px}.plan-item__select-button.components-button svg{margin-right:-8px;margin-left:10px}.plan-item__domain-picker-button.components-button{font-size:.875rem;line-height:19px;letter-spacing:.2px;word-break:break-word}.plan-item__domain-picker-button.components-button.has-domain{color:var(--studio-gray-50);text-decoration:none}.plan-item__domain-picker-button.components-button svg{margin-right:2px}.plan-item__feature-item{font-size:.875rem;line-height:20px;letter-spacing:.2px;margin:4px 0;vertical-align:middle;color:#555d66;display:flex;align-items:flex-start}.plan-item__feature-item svg{display:block;margin-left:6px;margin-top:2px}.plan-item__feature-item svg path{fill:#4aa150;stroke:#4aa150}.plans-ui-title{font-family:Recoleta,Georgia,Times New Roman,Times,serif;font-weight:400;letter-spacing:-.4px;font-size:32px;line-height:40px;color:var(--studio-gray-100)}@media (min-width:480px){.plans-ui-title{font-family:Recoleta,Georgia,Times New Roman,Times,serif;font-weight:400;letter-spacing:-.4px;font-size:36px;line-height:40px}}@media (min-width:1080px){.plans-ui-title{font-family:Recoleta,Georgia,Times New Roman,Times,serif;font-weight:400;letter-spacing:-.4px;font-size:42px;line-height:57px}}.plans-details__table{width:100%}.plans-details__table td,.plans-details__table th{padding:13px 24px}.plans-details__table td:first-child,.plans-details__table th:first-child{padding-right:0;width:20%}@media (min-width:480px){.plans-details__table td:first-child,.plans-details__table th:first-child{width:40%}}.plans-details__table td:not(:first-child),.plans-details__table th:not(:first-child){white-space:nowrap}.plans-details__table .hidden{display:none}.plans-details__header-row th{font-weight:600;font-size:.875rem;line-height:20px;text-transform:uppercase;color:var(--studio-gray-20);padding-top:5px;padding-bottom:5px;border-bottom:1px solid #eaeaeb}.plans-details__feature-row td,.plans-details__feature-row th{font-size:.875rem;line-height:17px;letter-spacing:.2px;border-bottom:1px solid #eaeaeb;vertical-align:middle}
editor-plans-grid/index.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plans grid for block editor.
4
+ *
5
+ * @package A8C\FSE
6
+ */
7
+
8
+ namespace A8C\FSE\EditorPlansGrid;
9
+
10
+ /**
11
+ * Enqueue assets
12
+ */
13
+ function enqueue_script_and_style() {
14
+ // @TODO: Remove this block to enable in production
15
+ // Constant to disable the feature for development.
16
+ if ( ! ( defined( 'A8C_FSE_PLANS_GRID_ENABLE' ) && A8C_FSE_PLANS_GRID_ENABLE ) ) {
17
+ return;
18
+ }
19
+
20
+ // Avoid loading assets if possible.
21
+ if ( ! \A8C\FSE\Common\is_block_editor_screen() ) {
22
+ return;
23
+ }
24
+
25
+ $asset_file = include plugin_dir_path( __FILE__ ) . 'dist/editor-plans-grid.asset.php';
26
+ $script_dependencies = isset( $asset_file['dependencies'] ) ? $asset_file['dependencies'] : array();
27
+ $script_version = isset( $asset_file['version'] ) ? $asset_file['version'] : filemtime( plugin_dir_path( __FILE__ ) . 'dist/editor-plans-grid.js' );
28
+ $styles_version = isset( $asset_file['version'] ) ? $asset_file['version'] : filemtime( plugin_dir_path( __FILE__ ) . 'dist/editor-plans-grid.css' );
29
+
30
+ wp_enqueue_script(
31
+ 'a8c-fse-editor-plans-grid-script',
32
+ plugins_url( 'dist/editor-plans-grid.js', __FILE__ ),
33
+ $script_dependencies,
34
+ $script_version,
35
+ true
36
+ );
37
+
38
+ wp_enqueue_style(
39
+ 'a8c-fse-editor-plans-grid-styles',
40
+ plugins_url( 'dist/editor-plans-grid.css', __FILE__ ),
41
+ array(),
42
+ $styles_version
43
+ );
44
+ }
45
+ add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_script_and_style' );
editor-plans-grid/index.ts ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import * as React from 'react';
5
+ import * as ReactDOM from 'react-dom';
6
+
7
+ import 'a8c-fse-common-data-stores';
8
+
9
+ import PlansGridButton from './src/plans-grid-button';
10
+
11
+ const awaitSettingsBar = setInterval( () => {
12
+ const settingsBar = document.querySelector( '.edit-post-header__settings' );
13
+ if ( ! settingsBar ) {
14
+ return;
15
+ }
16
+ clearInterval( awaitSettingsBar );
17
+
18
+ const plansGridContainer = document.createElement( 'div' );
19
+ settingsBar.prepend( plansGridContainer );
20
+
21
+ ReactDOM.render( React.createElement( PlansGridButton ), plansGridContainer );
22
+ } );
editor-plans-grid/src/hooks/use-selected-plan.ts ADDED
@@ -0,0 +1 @@
 
1
+ // TODO: Remove this. This is added to fix wonky PHPCS error.
editor-plans-grid/src/plans-grid-button/index.tsx ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import * as React from 'react';
5
+ import { useSelect, useDispatch } from '@wordpress/data';
6
+ import { Plans } from '@automattic/data-stores';
7
+ import { Button } from '@wordpress/components';
8
+ import { Icon, chevronDown } from '@wordpress/icons';
9
+ import 'a8c-fse-common-data-stores';
10
+
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+ import PlansModal from '../plans-modal';
15
+ import { PLANS_STORE } from '../stores';
16
+
17
+ type PlansSlug = Plans.PlanSlug;
18
+
19
+ const PlansGridButton = () => {
20
+ const [ isPlansModalVisible, setPlansModalVisibility ] = React.useState( false );
21
+
22
+ // TODO: Get current domain from store.
23
+ const currentDomain = undefined;
24
+
25
+ // TODO: Proper plan selection as seen in gutenboarding version. Needs currentDomain to work on this.
26
+ const currentPlan = useSelect( ( select ) => {
27
+ const selectedPlan = select( PLANS_STORE ).getSelectedPlan();
28
+ return selectedPlan || undefined;
29
+ } );
30
+
31
+ const { setPlan } = useDispatch( PLANS_STORE );
32
+
33
+ const handlePlanSelect = ( plan: PlansSlug ) => {
34
+ setPlan( plan );
35
+ setPlansModalVisibility( false );
36
+ };
37
+
38
+ return (
39
+ <>
40
+ <Button
41
+ aria-expanded={ isPlansModalVisible }
42
+ aria-haspopup="menu"
43
+ aria-pressed={ isPlansModalVisible }
44
+ onClick={ () => setPlansModalVisibility( ( s ) => ! s ) }
45
+ >
46
+ { /* TODO: Refine this */ }
47
+ <span>Plans: { currentPlan && currentPlan.title }</span>
48
+ <Icon icon={ chevronDown } size={ 22 } />
49
+ </Button>
50
+ <PlansModal
51
+ isOpen={ isPlansModalVisible }
52
+ currentDomain={ currentDomain }
53
+ currentPlan={ currentPlan }
54
+ onPlanSelect={ handlePlanSelect }
55
+ onClose={ () => setPlansModalVisibility( false ) }
56
+ />
57
+ </>
58
+ );
59
+ };
60
+
61
+ export default PlansGridButton;
editor-plans-grid/src/plans-modal/index.tsx ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import * as React from 'react';
5
+ import { Modal } from '@wordpress/components';
6
+ import { __ } from '@wordpress/i18n';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import PlansGrid, { Props as PlansGridProps } from '@automattic/plans-grid';
12
+ import './styles.scss';
13
+
14
+ interface Props extends Omit< PlansGridProps, 'header' > {
15
+ isOpen: boolean;
16
+ onClose: () => void;
17
+ }
18
+
19
+ const PlansModal: React.FunctionComponent< Props > = ( { isOpen, onClose, ...props } ) => {
20
+ if ( ! isOpen ) {
21
+ return null;
22
+ }
23
+
24
+ const header = (
25
+ <div>
26
+ { /* eslint-disable @wordpress/i18n-text-domain */ }
27
+ <h1 className="wp-brand-font">{ __( 'Choose a plan' ) }</h1>
28
+ <p>
29
+ { __(
30
+ 'Pick a plan that’s right for you. Switch plans as your needs change. There’s no risk, you can cancel for a full refund within 30 days.'
31
+ ) }
32
+ </p>
33
+ </div>
34
+ );
35
+
36
+ return (
37
+ <Modal
38
+ className="plans-modal"
39
+ overlayClassName="plans-modal-overlay"
40
+ bodyOpenClassName="has-plans-modal"
41
+ onRequestClose={ onClose }
42
+ title=""
43
+ >
44
+ <div className="plans-grid-container">
45
+ <PlansGrid header={ header } { ...props } />
46
+ </div>
47
+ </Modal>
48
+ );
49
+ };
50
+
51
+ export default PlansModal;
editor-plans-grid/src/plans-modal/styles.scss ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import '~@automattic/typography/sass/fonts';
2
+
3
+ .plans-modal-overlay {
4
+ &.components-modal__screen-overlay {
5
+ background: none;
6
+ width: 100%;
7
+ height: 100%;
8
+ }
9
+ }
10
+
11
+ .plans-modal {
12
+ &.components-modal__frame {
13
+ width: 100%;
14
+ height: 100%;
15
+ top: 0;
16
+ left: 0;
17
+ min-width: unset;
18
+ max-width: none;
19
+ max-height: none;
20
+ transform: none;
21
+ border: none;
22
+ box-shadow: none;
23
+ position: absolute;
24
+ }
25
+
26
+ .components-modal__content {
27
+ padding: 0;
28
+ }
29
+ }
30
+
31
+ .plans-grid-container {
32
+ padding: 88px;
33
+ }
editor-plans-grid/src/stores/index.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import 'a8c-fse-common-data-stores';
5
+
6
+ export const PLANS_STORE = 'automattic/onboard/plans';
full-site-editing-plugin.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
- * Version: 1.10
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
@@ -35,7 +35,7 @@ namespace A8C\FSE;
35
  *
36
  * @var string
37
  */
38
- define( 'PLUGIN_VERSION', '1.10' );
39
 
40
  // Always include these helper files for dotcom FSE.
41
  require_once __DIR__ . '/dotcom-fse/helpers.php';
@@ -157,6 +157,14 @@ function load_editor_domain_picker() {
157
  }
158
  add_action( 'plugins_loaded', __NAMESPACE__ . '\load_editor_domain_picker' );
159
 
 
 
 
 
 
 
 
 
160
  /**
161
  * Sigh: load_editor_gutenboarding_launch
162
  */
@@ -221,13 +229,14 @@ add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_coblocks_gallery_scr
221
  * Load Blog Posts block.
222
  */
223
  function load_blog_posts_block() {
224
- $slug = 'newspack-blocks/newspack-blocks.php';
 
225
  $disable_block = (
226
  ( defined( 'WP_CLI' ) && WP_CLI ) ||
227
  /* phpcs:ignore WordPress.Security.NonceVerification */
228
- ( isset( $_GET['action'], $_GET['plugin'] ) && 'activate' === $_GET['action'] && $slug === $_GET['plugin'] ) ||
229
- in_array( $slug, (array) get_option( 'active_plugins', array() ), true ) ||
230
- in_array( $slug, (array) get_site_option( 'active_sitewide_plugins', array() ), true )
231
  );
232
 
233
  /**
@@ -302,7 +311,10 @@ add_action( 'plugins_loaded', __NAMESPACE__ . '\load_mailerlite' );
302
  * Load WPCOM block editor nav sidebar
303
  */
304
  function load_wpcom_block_editor_sidebar() {
305
- if ( defined( 'WPCOM_BLOCK_EDITOR_SIDEBAR' ) && WPCOM_BLOCK_EDITOR_SIDEBAR ) {
 
 
 
306
  require_once __DIR__ . '/wpcom-block-editor-nav-sidebar/class-wpcom-block-editor-nav-sidebar.php';
307
  }
308
  }
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
+ * Version: 1.11
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
35
  *
36
  * @var string
37
  */
38
+ define( 'PLUGIN_VERSION', '1.11' );
39
 
40
  // Always include these helper files for dotcom FSE.
41
  require_once __DIR__ . '/dotcom-fse/helpers.php';
157
  }
158
  add_action( 'plugins_loaded', __NAMESPACE__ . '\load_editor_domain_picker' );
159
 
160
+ /**
161
+ * Sigh: load_editor_plans_grid
162
+ */
163
+ function load_editor_plans_grid() {
164
+ require_once __DIR__ . '/editor-plans-grid/index.php';
165
+ }
166
+ add_action( 'plugins_loaded', __NAMESPACE__ . '\load_editor_plans_grid' );
167
+
168
  /**
169
  * Sigh: load_editor_gutenboarding_launch
170
  */
229
  * Load Blog Posts block.
230
  */
231
  function load_blog_posts_block() {
232
+ // Use regex instead of static slug in order to match plugin installation also from github, where slug may contain (HASH|branch-name).
233
+ $slug_regex = '/newspack-blocks(-[A-Za-z0-9-]+)?\/newspack-blocks\.php/';
234
  $disable_block = (
235
  ( defined( 'WP_CLI' ) && WP_CLI ) ||
236
  /* phpcs:ignore WordPress.Security.NonceVerification */
237
+ ( isset( $_GET['action'], $_GET['plugin'] ) && 'activate' === $_GET['action'] && preg_match( $slug_regex, sanitize_text_field( wp_unslash( $_GET['plugin'] ) ) ) ) ||
238
+ preg_grep( $slug_regex, (array) get_option( 'active_plugins' ) ) ||
239
+ preg_grep( $slug_regex, (array) get_site_option( 'active_sitewide_plugins' ) )
240
  );
241
 
242
  /**
311
  * Load WPCOM block editor nav sidebar
312
  */
313
  function load_wpcom_block_editor_sidebar() {
314
+ if (
315
+ ( defined( 'WPCOM_BLOCK_EDITOR_SIDEBAR' ) && WPCOM_BLOCK_EDITOR_SIDEBAR ) ||
316
+ apply_filters( 'a8c_enable_nav_sidebar', false )
317
+ ) {
318
  require_once __DIR__ . '/wpcom-block-editor-nav-sidebar/class-wpcom-block-editor-nav-sidebar.php';
319
  }
320
  }
newspack-blocks/synced-newspack-blocks/blocks/carousel/view.php CHANGED
@@ -55,9 +55,9 @@ function newspack_blocks_render_block_carousel( $attributes ) {
55
 
56
  $article_query = new WP_Query( $args );
57
  $counter = 0;
58
- $article_classes = [
59
  'post-has-image',
60
- ];
61
  if ( ! $is_amp ) {
62
  $article_classes[] = 'swiper-slide';
63
  }
@@ -132,7 +132,7 @@ function newspack_blocks_render_block_carousel( $attributes ) {
132
  <?php
133
  printf(
134
  /* translators: %s: post author. */
135
- esc_html_x( 'by %s', 'post author', 'newspack-blocks' ),
136
  '<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
137
  );
138
  ?>
@@ -140,12 +140,12 @@ function newspack_blocks_render_block_carousel( $attributes ) {
140
  <?php
141
  endif;
142
 
143
- if ( $attributes['showDate'] ) :
144
- printf(
145
- '<time class="entry-date published" datetime="%1$s">%2$s</time>',
146
- esc_attr( get_the_date( DATE_W3C ) ),
147
- esc_html( get_the_date() )
148
- );
149
  endif;
150
  ?>
151
  </div><!-- .entry-meta -->
@@ -160,7 +160,7 @@ function newspack_blocks_render_block_carousel( $attributes ) {
160
  for ( $x = 0; $x < $counter; $x++ ) {
161
  $aria_label = sprintf(
162
  /* translators: %d: Slide number. */
163
- __( 'Go to slide %d', 'newspack-blocks' ),
164
  absint( $x + 1 )
165
  );
166
  $buttons[] = sprintf(
@@ -178,8 +178,8 @@ function newspack_blocks_render_block_carousel( $attributes ) {
178
  );
179
  $carousel = sprintf(
180
  '<amp-carousel width="4" height="3" layout="responsive" type="slides" data-next-button-aria-label="%1$s" data-prev-button-aria-label="%2$s" controls loop %3$s id="wp-block-newspack-carousel__amp-carousel__%4$s" on="slideChange:wp-block-newspack-carousel__amp-pagination__%4$s.toggle(index=event.index, value=true)">%5$s</amp-carousel>',
181
- esc_attr__( 'Next Slide', 'newspack-blocks' ),
182
- esc_attr__( 'Previous Slide', 'newspack-blocks' ),
183
  $autoplay ? 'autoplay delay=' . esc_attr( $delay * 1000 ) : '',
184
  absint( $newspack_blocks_carousel_id ),
185
  $slides
@@ -192,8 +192,8 @@ function newspack_blocks_render_block_carousel( $attributes ) {
192
  );
193
  $navigation = sprintf(
194
  '<button class="swiper-button swiper-button-prev" aria-label="%s"></button><button class="swiper-button swiper-button-next" aria-label="%s"></button>',
195
- esc_attr__( 'Previous Slide', 'newspack-blocks' ),
196
- esc_attr__( 'Next Slide', 'newspack-blocks' )
197
  );
198
  $carousel = sprintf(
199
  '<div class="swiper-container"><div class="swiper-wrapper">%s</div>%s</div>',
@@ -202,7 +202,7 @@ function newspack_blocks_render_block_carousel( $attributes ) {
202
  );
203
  $autoplay_ui = $autoplay ? newspack_blocks_carousel_block_autoplay_ui( $newspack_blocks_carousel_id ) : '';
204
  }
205
- $data_attributes = [];
206
 
207
  if ( $autoplay && ! $is_amp ) {
208
  $data_attributes[] = 'data-autoplay=1';
@@ -230,8 +230,8 @@ function newspack_blocks_render_block_carousel( $attributes ) {
230
  function newspack_blocks_carousel_block_autoplay_ui( $block_ordinal = 0 ) {
231
  return sprintf(
232
  '<button aria-label="%s" class="swiper-button swiper-button-pause"></button><button aria-label="%s" class="swiper-button swiper-button-play"></button>',
233
- esc_attr__( 'Pause Slideshow', 'newspack-blocks' ),
234
- esc_attr__( 'Play Slideshow', 'newspack-blocks' )
235
  );
236
  }
237
 
@@ -253,13 +253,13 @@ function newspack_blocks_carousel_block_autoplay_ui_amp( $block_ordinal = 0 ) {
253
  );
254
  $autoplay_pause = sprintf(
255
  '<button aria-label="%s" class="amp-carousel-button-pause amp-carousel-button" on="tap:%s.toggleAutoplay(toggleOn=false),%s.toggleClass(class=wp-block-newspack-blocks-carousel__autoplay-playing,force=false)"></button>',
256
- esc_attr__( 'Pause Slideshow', 'newspack-blocks' ),
257
  esc_attr( $amp_carousel_id ),
258
  esc_attr( $block_id )
259
  );
260
  $autoplay_play = sprintf(
261
  '<button aria-label="%s" class="amp-carousel-button-play amp-carousel-button" on="tap:%s.toggleAutoplay(toggleOn=true),%s.toggleClass(class=wp-block-newspack-blocks-carousel__autoplay-playing,force=true)"></button>',
262
- esc_attr__( 'Play Slideshow', 'newspack-blocks' ),
263
  esc_attr( $amp_carousel_id ),
264
  esc_attr( $block_id )
265
  );
55
 
56
  $article_query = new WP_Query( $args );
57
  $counter = 0;
58
+ $article_classes = array(
59
  'post-has-image',
60
+ );
61
  if ( ! $is_amp ) {
62
  $article_classes[] = 'swiper-slide';
63
  }
132
  <?php
133
  printf(
134
  /* translators: %s: post author. */
135
+ esc_html_x( 'by %s', 'post author', 'full-site-editing' ),
136
  '<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
137
  );
138
  ?>
140
  <?php
141
  endif;
142
 
143
+ if ( $attributes['showDate'] ) :
144
+ printf(
145
+ '<time class="entry-date published" datetime="%1$s">%2$s</time>',
146
+ esc_attr( get_the_date( DATE_W3C ) ),
147
+ esc_html( get_the_date() )
148
+ );
149
  endif;
150
  ?>
151
  </div><!-- .entry-meta -->
160
  for ( $x = 0; $x < $counter; $x++ ) {
161
  $aria_label = sprintf(
162
  /* translators: %d: Slide number. */
163
+ __( 'Go to slide %d', 'full-site-editing' ),
164
  absint( $x + 1 )
165
  );
166
  $buttons[] = sprintf(
178
  );
179
  $carousel = sprintf(
180
  '<amp-carousel width="4" height="3" layout="responsive" type="slides" data-next-button-aria-label="%1$s" data-prev-button-aria-label="%2$s" controls loop %3$s id="wp-block-newspack-carousel__amp-carousel__%4$s" on="slideChange:wp-block-newspack-carousel__amp-pagination__%4$s.toggle(index=event.index, value=true)">%5$s</amp-carousel>',
181
+ esc_attr__( 'Next Slide', 'full-site-editing' ),
182
+ esc_attr__( 'Previous Slide', 'full-site-editing' ),
183
  $autoplay ? 'autoplay delay=' . esc_attr( $delay * 1000 ) : '',
184
  absint( $newspack_blocks_carousel_id ),
185
  $slides
192
  );
193
  $navigation = sprintf(
194
  '<button class="swiper-button swiper-button-prev" aria-label="%s"></button><button class="swiper-button swiper-button-next" aria-label="%s"></button>',
195
+ esc_attr__( 'Previous Slide', 'full-site-editing' ),
196
+ esc_attr__( 'Next Slide', 'full-site-editing' )
197
  );
198
  $carousel = sprintf(
199
  '<div class="swiper-container"><div class="swiper-wrapper">%s</div>%s</div>',
202
  );
203
  $autoplay_ui = $autoplay ? newspack_blocks_carousel_block_autoplay_ui( $newspack_blocks_carousel_id ) : '';
204
  }
205
+ $data_attributes = array();
206
 
207
  if ( $autoplay && ! $is_amp ) {
208
  $data_attributes[] = 'data-autoplay=1';
230
  function newspack_blocks_carousel_block_autoplay_ui( $block_ordinal = 0 ) {
231
  return sprintf(
232
  '<button aria-label="%s" class="swiper-button swiper-button-pause"></button><button aria-label="%s" class="swiper-button swiper-button-play"></button>',
233
+ esc_attr__( 'Pause Slideshow', 'full-site-editing' ),
234
+ esc_attr__( 'Play Slideshow', 'full-site-editing' )
235
  );
236
  }
237
 
253
  );
254
  $autoplay_pause = sprintf(
255
  '<button aria-label="%s" class="amp-carousel-button-pause amp-carousel-button" on="tap:%s.toggleAutoplay(toggleOn=false),%s.toggleClass(class=wp-block-newspack-blocks-carousel__autoplay-playing,force=false)"></button>',
256
+ esc_attr__( 'Pause Slideshow', 'full-site-editing' ),
257
  esc_attr( $amp_carousel_id ),
258
  esc_attr( $block_id )
259
  );
260
  $autoplay_play = sprintf(
261
  '<button aria-label="%s" class="amp-carousel-button-play amp-carousel-button" on="tap:%s.toggleAutoplay(toggleOn=true),%s.toggleClass(class=wp-block-newspack-blocks-carousel__autoplay-playing,force=true)"></button>',
262
+ esc_attr__( 'Play Slideshow', 'full-site-editing' ),
263
  esc_attr( $amp_carousel_id ),
264
  esc_attr( $block_id )
265
  );
newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/class-wp-rest-newspack-articles-controller.php CHANGED
@@ -36,14 +36,14 @@ class WP_REST_Newspack_Articles_Controller extends WP_REST_Controller {
36
  register_rest_route(
37
  $this->namespace,
38
  '/' . $this->rest_base,
39
- [
40
- [
41
  'methods' => WP_REST_Server::READABLE,
42
- 'callback' => [ $this, 'get_items' ],
43
  'args' => $this->get_attribute_schema(),
44
  'permission_callback' => '__return_true',
45
- ],
46
- ]
47
  );
48
  }
49
 
@@ -55,10 +55,10 @@ class WP_REST_Newspack_Articles_Controller extends WP_REST_Controller {
55
  */
56
  public function get_items( $request ) {
57
  $page = $request->get_param( 'page' ) ?? 1;
58
- $exclude_ids = $request->get_param( 'exclude_ids' ) ?? [];
59
  $next_page = $page + 1;
60
  $attributes = wp_parse_args(
61
- $request->get_params() ?? [],
62
  wp_list_pluck( $this->get_attribute_schema(), 'default' )
63
  );
64
 
@@ -66,17 +66,17 @@ class WP_REST_Newspack_Articles_Controller extends WP_REST_Controller {
66
 
67
  $query = array_merge(
68
  $article_query_args,
69
- [
70
  'post__not_in' => $exclude_ids,
71
- ]
72
  );
73
 
74
  // Run Query.
75
  $article_query = new WP_Query( $query );
76
 
77
  // Defaults.
78
- $items = [];
79
- $ids = [];
80
  $next_url = '';
81
 
82
  // The Loop.
@@ -84,9 +84,9 @@ class WP_REST_Newspack_Articles_Controller extends WP_REST_Controller {
84
  $article_query->the_post();
85
  $html = Newspack_Blocks::template_inc(
86
  __DIR__ . '/templates/article.php',
87
- [
88
  'attributes' => $attributes,
89
- ]
90
  );
91
 
92
  if ( $request->get_param( 'amp' ) ) {
@@ -106,22 +106,22 @@ class WP_REST_Newspack_Articles_Controller extends WP_REST_Controller {
106
  },
107
  $attributes
108
  ),
109
- [
110
  'exclude_ids' => false,
111
  'page' => $next_page,
112
  'amp' => $request->get_param( 'amp' ),
113
- ]
114
  ),
115
  rest_url( '/newspack-blocks/v1/articles' )
116
  );
117
  }
118
 
119
  return rest_ensure_response(
120
- [
121
  'items' => $items,
122
  'ids' => $ids,
123
  'next' => $next_url,
124
- ]
125
  );
126
  }
127
 
@@ -139,15 +139,15 @@ class WP_REST_Newspack_Articles_Controller extends WP_REST_Controller {
139
 
140
  $this->attribute_schema = array_merge(
141
  $block_json['attributes'],
142
- [
143
- 'exclude_ids' => [
144
  'type' => 'array',
145
- 'default' => [],
146
- 'items' => [
147
  'type' => 'integer',
148
- ],
149
- ],
150
- ]
151
  );
152
  }
153
  return $this->attribute_schema;
@@ -165,9 +165,9 @@ class WP_REST_Newspack_Articles_Controller extends WP_REST_Controller {
165
  AMP_Content_Sanitizer::sanitize_document(
166
  $dom,
167
  amp_get_content_sanitizers(),
168
- [
169
  'use_document_element' => false,
170
- ]
171
  );
172
  $xpath = new DOMXPath( $dom );
173
  foreach ( iterator_to_array( $xpath->query( '//noscript | //comment()' ) ) as $node ) {
36
  register_rest_route(
37
  $this->namespace,
38
  '/' . $this->rest_base,
39
+ array(
40
+ array(
41
  'methods' => WP_REST_Server::READABLE,
42
+ 'callback' => array( $this, 'get_items' ),
43
  'args' => $this->get_attribute_schema(),
44
  'permission_callback' => '__return_true',
45
+ ),
46
+ )
47
  );
48
  }
49
 
55
  */
56
  public function get_items( $request ) {
57
  $page = $request->get_param( 'page' ) ?? 1;
58
+ $exclude_ids = $request->get_param( 'exclude_ids' ) ?? array();
59
  $next_page = $page + 1;
60
  $attributes = wp_parse_args(
61
+ $request->get_params() ?? array(),
62
  wp_list_pluck( $this->get_attribute_schema(), 'default' )
63
  );
64
 
66
 
67
  $query = array_merge(
68
  $article_query_args,
69
+ array(
70
  'post__not_in' => $exclude_ids,
71
+ )
72
  );
73
 
74
  // Run Query.
75
  $article_query = new WP_Query( $query );
76
 
77
  // Defaults.
78
+ $items = array();
79
+ $ids = array();
80
  $next_url = '';
81
 
82
  // The Loop.
84
  $article_query->the_post();
85
  $html = Newspack_Blocks::template_inc(
86
  __DIR__ . '/templates/article.php',
87
+ array(
88
  'attributes' => $attributes,
89
+ )
90
  );
91
 
92
  if ( $request->get_param( 'amp' ) ) {
106
  },
107
  $attributes
108
  ),
109
+ array(
110
  'exclude_ids' => false,
111
  'page' => $next_page,
112
  'amp' => $request->get_param( 'amp' ),
113
+ )
114
  ),
115
  rest_url( '/newspack-blocks/v1/articles' )
116
  );
117
  }
118
 
119
  return rest_ensure_response(
120
+ array(
121
  'items' => $items,
122
  'ids' => $ids,
123
  'next' => $next_url,
124
+ )
125
  );
126
  }
127
 
139
 
140
  $this->attribute_schema = array_merge(
141
  $block_json['attributes'],
142
+ array(
143
+ 'exclude_ids' => array(
144
  'type' => 'array',
145
+ 'default' => array(),
146
+ 'items' => array(
147
  'type' => 'integer',
148
+ ),
149
+ ),
150
+ )
151
  );
152
  }
153
  return $this->attribute_schema;
165
  AMP_Content_Sanitizer::sanitize_document(
166
  $dom,
167
  amp_get_content_sanitizers(),
168
+ array(
169
  'use_document_element' => false,
170
+ )
171
  );
172
  $xpath = new DOMXPath( $dom );
173
  foreach ( iterator_to_array( $xpath->query( '//noscript | //comment()' ) ) as $node ) {
newspack-blocks/synced-newspack-blocks/blocks/homepage-articles/view.php CHANGED
@@ -18,7 +18,7 @@ function newspack_blocks_render_block_homepage_articles( $attributes ) {
18
 
19
  $article_query = new WP_Query( Newspack_Blocks::build_articles_query( $attributes ) );
20
 
21
- $classes = Newspack_Blocks::block_classes( 'homepage-articles', $attributes, [ 'wpnbha' ] );
22
 
23
  if ( isset( $attributes['postLayout'] ) && 'grid' === $attributes['postLayout'] ) {
24
  $classes .= ' is-grid';
@@ -74,10 +74,10 @@ function newspack_blocks_render_block_homepage_articles( $attributes ) {
74
  },
75
  $attributes
76
  ),
77
- [
78
  'page' => 2,
79
  'amp' => Newspack_Blocks::is_amp(),
80
- ]
81
  ),
82
  rest_url( '/newspack-blocks/v1/articles' )
83
  );
@@ -120,11 +120,11 @@ function newspack_blocks_render_block_homepage_articles( $attributes ) {
120
  <?php
121
  echo Newspack_Blocks::template_inc(
122
  __DIR__ . '/templates/articles-list.php',
123
- [
124
  'articles_rest_url' => $articles_rest_url,
125
  'article_query' => $article_query,
126
  'attributes' => $attributes,
127
- ]
128
  );
129
  ?>
130
  </div>
@@ -137,15 +137,15 @@ function newspack_blocks_render_block_homepage_articles( $attributes ) {
137
  if ( ! empty( $attributes['moreButtonText'] ) ) {
138
  echo esc_html( $attributes['moreButtonText'] );
139
  } else {
140
- esc_html_e( 'Load more posts', 'newspack-blocks' );
141
  }
142
  ?>
143
  </button>
144
  <p class="loading">
145
- <?php _e( 'Loading...', 'newspack-blocks' ); ?>
146
  </p>
147
  <p class="error">
148
- <?php _e( 'Something went wrong. Please refresh the page and/or try again.', 'newspack-blocks' ); ?>
149
  </p>
150
 
151
  <?php endif; ?>
@@ -214,9 +214,9 @@ function newspack_blocks_format_avatars( $author_info ) {
214
  function newspack_blocks_format_byline( $author_info ) {
215
  $index = -1;
216
  $elements = array_merge(
217
- [
218
- esc_html_x( 'by', 'post author', 'newspack-blocks' ) . ' ',
219
- ],
220
  array_reduce(
221
  $author_info,
222
  function ( $accumulator, $author ) use ( $author_info, &$index ) {
@@ -230,7 +230,7 @@ function newspack_blocks_format_byline( $author_info ) {
230
 
231
  return array_merge(
232
  $accumulator,
233
- [
234
  sprintf(
235
  /* translators: 1: author link. 2: author name. 3. variable seperator (comma, 'and', or empty) */
236
  '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
@@ -238,11 +238,11 @@ function newspack_blocks_format_byline( $author_info ) {
238
  esc_html( $author->display_name )
239
  ),
240
  ( $index < $penultimate ) ? ', ' : '',
241
- ( count( $author_info ) > 1 && $penultimate === $index ) ? esc_html_x( ' and ', 'post author', 'newspack-blocks' ) : '',
242
- ]
243
  );
244
  },
245
- []
246
  )
247
  );
248
 
18
 
19
  $article_query = new WP_Query( Newspack_Blocks::build_articles_query( $attributes ) );
20
 
21
+ $classes = Newspack_Blocks::block_classes( 'homepage-articles', $attributes, array( 'wpnbha' ) );
22
 
23
  if ( isset( $attributes['postLayout'] ) && 'grid' === $attributes['postLayout'] ) {
24
  $classes .= ' is-grid';
74
  },
75
  $attributes
76
  ),
77
+ array(
78
  'page' => 2,
79
  'amp' => Newspack_Blocks::is_amp(),
80
+ )
81
  ),
82
  rest_url( '/newspack-blocks/v1/articles' )
83
  );
120
  <?php
121
  echo Newspack_Blocks::template_inc(
122
  __DIR__ . '/templates/articles-list.php',
123
+ array(
124
  'articles_rest_url' => $articles_rest_url,
125
  'article_query' => $article_query,
126
  'attributes' => $attributes,
127
+ )
128
  );
129
  ?>
130
  </div>
137
  if ( ! empty( $attributes['moreButtonText'] ) ) {
138
  echo esc_html( $attributes['moreButtonText'] );
139
  } else {
140
+ esc_html_e( 'Load more posts', 'full-site-editing' );
141
  }
142
  ?>
143
  </button>
144
  <p class="loading">
145
+ <?php _e( 'Loading...', 'full-site-editing' ); ?>
146
  </p>
147
  <p class="error">
148
+ <?php _e( 'Something went wrong. Please refresh the page and/or try again.', 'full-site-editing' ); ?>
149
  </p>
150
 
151
  <?php endif; ?>
214
  function newspack_blocks_format_byline( $author_info ) {
215
  $index = -1;
216
  $elements = array_merge(
217
+ array(
218
+ esc_html_x( 'by', 'post author', 'full-site-editing' ) . ' ',
219
+ ),
220
  array_reduce(
221
  $author_info,
222
  function ( $accumulator, $author ) use ( $author_info, &$index ) {
230
 
231
  return array_merge(
232
  $accumulator,
233
+ array(
234
  sprintf(
235
  /* translators: 1: author link. 2: author name. 3. variable seperator (comma, 'and', or empty) */
236
  '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
238
  esc_html( $author->display_name )
239
  ),
240
  ( $index < $penultimate ) ? ', ' : '',
241
+ ( count( $author_info ) > 1 && $penultimate === $index ) ? esc_html_x( ' and ', 'post author', 'full-site-editing' ) : '',
242
+ )
243
  );
244
  },
245
+ array()
246
  )
247
  );
248
 
newspack-blocks/synced-newspack-blocks/class-newspack-blocks-api.php CHANGED
@@ -15,76 +15,76 @@ class Newspack_Blocks_API {
15
  */
16
  public static function register_rest_fields() {
17
  register_rest_field(
18
- [ 'post', 'page' ],
19
  'newspack_featured_image_src',
20
- [
21
- 'get_callback' => [ 'Newspack_Blocks_API', 'newspack_blocks_get_image_src' ],
22
- 'schema' => [
23
- 'context' => [
24
  'edit',
25
- ],
26
  'type' => 'array',
27
- ],
28
- ]
29
  );
30
 
31
  register_rest_field(
32
- [ 'post', 'page' ],
33
  'newspack_featured_image_caption',
34
- [
35
- 'get_callback' => [ 'Newspack_Blocks_API', 'newspack_blocks_get_image_caption' ],
36
- 'schema' => [
37
- 'context' => [
38
  'edit',
39
- ],
40
  'type' => 'string',
41
- ],
42
- ]
43
  );
44
 
45
  /* Add author info source */
46
  register_rest_field(
47
  'post',
48
  'newspack_author_info',
49
- [
50
- 'get_callback' => [ 'Newspack_Blocks_API', 'newspack_blocks_get_author_info' ],
51
- 'schema' => [
52
- 'context' => [
53
  'edit',
54
- ],
55
  'type' => 'array',
56
- ],
57
- ]
58
  );
59
 
60
  /* Add first category source */
61
  register_rest_field(
62
  'post',
63
  'newspack_category_info',
64
- [
65
- 'get_callback' => [ 'Newspack_Blocks_API', 'newspack_blocks_get_primary_category' ],
66
- 'schema' => [
67
- 'context' => [
68
  'edit',
69
- ],
70
  'type' => 'string',
71
- ],
72
- ]
73
  );
74
 
75
  /* Add list of categories for CSS classes */
76
  register_rest_field(
77
  'post',
78
  'newspack_article_classes',
79
- [
80
- 'get_callback' => [ 'Newspack_Blocks_API', 'newspack_blocks_get_cat_tag_classes' ],
81
- 'schema' => [
82
- 'context' => [
83
  'edit',
84
- ],
85
  'type' => 'string',
86
- ],
87
- ]
88
  );
89
  }
90
 
@@ -95,7 +95,7 @@ class Newspack_Blocks_API {
95
  * @return array | bool Featured image if available, false if not.
96
  */
97
  public static function newspack_blocks_get_image_src( $object ) {
98
- $featured_image_set = [];
99
 
100
  if ( 0 === $object['featured_media'] ) {
101
  return false;
@@ -169,7 +169,7 @@ class Newspack_Blocks_API {
169
  * @return array Author data.
170
  */
171
  public static function newspack_blocks_get_author_info( $object ) {
172
- $author_data = [];
173
 
174
  if ( function_exists( 'coauthors_posts_links' ) ) :
175
  $authors = get_coauthors();
@@ -231,7 +231,7 @@ class Newspack_Blocks_API {
231
  // Use Yoast primary category if set.
232
  if ( class_exists( 'WPSEO_Primary_Term' ) ) {
233
  $primary_term = new WPSEO_Primary_Term( 'category', $object['id'] );
234
- $category_id = $primary_term->get_primary_term();
235
  if ( $category_id ) {
236
  $category = get_term( $category_id );
237
  }
@@ -268,10 +268,10 @@ class Newspack_Blocks_API {
268
  register_rest_route(
269
  'newspack-blocks/v1',
270
  '/video-playlist',
271
- [
272
  'methods' => 'GET',
273
- 'callback' => [ 'Newspack_Blocks_API', 'video_playlist_endpoint' ],
274
- ]
275
  );
276
  }
277
 
15
  */
16
  public static function register_rest_fields() {
17
  register_rest_field(
18
+ array( 'post', 'page' ),
19
  'newspack_featured_image_src',
20
+ array(
21
+ 'get_callback' => array( 'Newspack_Blocks_API', 'newspack_blocks_get_image_src' ),
22
+ 'schema' => array(
23
+ 'context' => array(
24
  'edit',
25
+ ),
26
  'type' => 'array',
27
+ ),
28
+ )
29
  );
30
 
31
  register_rest_field(
32
+ array( 'post', 'page' ),
33
  'newspack_featured_image_caption',
34
+ array(
35
+ 'get_callback' => array( 'Newspack_Blocks_API', 'newspack_blocks_get_image_caption' ),
36
+ 'schema' => array(
37
+ 'context' => array(
38
  'edit',
39
+ ),
40
  'type' => 'string',
41
+ ),
42
+ )
43
  );
44
 
45
  /* Add author info source */
46
  register_rest_field(
47
  'post',
48
  'newspack_author_info',
49
+ array(
50
+ 'get_callback' => array( 'Newspack_Blocks_API', 'newspack_blocks_get_author_info' ),
51
+ 'schema' => array(
52
+ 'context' => array(
53
  'edit',
54
+ ),
55
  'type' => 'array',
56
+ ),
57
+ )
58
  );
59
 
60
  /* Add first category source */
61
  register_rest_field(
62
  'post',
63
  'newspack_category_info',
64
+ array(
65
+ 'get_callback' => array( 'Newspack_Blocks_API', 'newspack_blocks_get_primary_category' ),
66
+ 'schema' => array(
67
+ 'context' => array(
68
  'edit',
69
+ ),
70
  'type' => 'string',
71
+ ),
72
+ )
73
  );
74
 
75
  /* Add list of categories for CSS classes */
76
  register_rest_field(
77
  'post',
78
  'newspack_article_classes',
79
+ array(
80
+ 'get_callback' => array( 'Newspack_Blocks_API', 'newspack_blocks_get_cat_tag_classes' ),
81
+ 'schema' => array(
82
+ 'context' => array(
83
  'edit',
84
+ ),
85
  'type' => 'string',
86
+ ),
87
+ )
88
  );
89
  }
90
 
95
  * @return array | bool Featured image if available, false if not.
96
  */
97
  public static function newspack_blocks_get_image_src( $object ) {
98
+ $featured_image_set = array();
99
 
100
  if ( 0 === $object['featured_media'] ) {
101
  return false;
169
  * @return array Author data.
170
  */
171
  public static function newspack_blocks_get_author_info( $object ) {
172
+ $author_data = array();
173
 
174
  if ( function_exists( 'coauthors_posts_links' ) ) :
175
  $authors = get_coauthors();
231
  // Use Yoast primary category if set.
232
  if ( class_exists( 'WPSEO_Primary_Term' ) ) {
233
  $primary_term = new WPSEO_Primary_Term( 'category', $object['id'] );
234
+ $category_id = $primary_term->get_primary_term();
235
  if ( $category_id ) {
236
  $category = get_term( $category_id );
237
  }
268
  register_rest_route(
269
  'newspack-blocks/v1',
270
  '/video-playlist',
271
+ array(
272
  'methods' => 'GET',
273
+ 'callback' => array( 'Newspack_Blocks_API', 'video_playlist_endpoint' ),
274
+ )
275
  );
276
  }
277
 
newspack-blocks/synced-newspack-blocks/class-newspack-blocks.php CHANGED
@@ -14,7 +14,7 @@ class Newspack_Blocks {
14
  * Add hooks and filters.
15
  */
16
  public static function init() {
17
- add_action( 'after_setup_theme', [ __CLASS__, 'add_image_sizes' ] );
18
  }
19
 
20
  /**
@@ -60,9 +60,9 @@ class Newspack_Blocks {
60
  wp_localize_script(
61
  'newspack-blocks-editor',
62
  'newspack_blocks_data',
63
- [
64
  'patterns' => self::get_patterns_for_post_type( get_post_type() ),
65
- ]
66
  );
67
 
68
  wp_set_script_translations(
@@ -183,7 +183,7 @@ class Newspack_Blocks {
183
  * @return string Class list separated by spaces.
184
  */
185
  public static function block_classes( $type, $attributes = array(), $extra = array() ) {
186
- $classes = [ "wp-block-newspack-blocks-{$type}" ];
187
 
188
  if ( ! empty( $attributes['align'] ) ) {
189
  $classes[] = 'align' . $attributes['align'];
@@ -418,7 +418,7 @@ class Newspack_Blocks {
418
  * @return string CSS classes.
419
  */
420
  public static function get_term_classes( $post_id ) {
421
- $classes = [];
422
 
423
  $tags = get_the_terms( $post_id, 'post_tag' );
424
  if ( ! empty( $tags ) ) {
@@ -444,26 +444,26 @@ class Newspack_Blocks {
444
  * @return array Array of patterns.
445
  */
446
  public static function get_patterns_for_post_type( $post_type = null ) {
447
- $patterns = apply_filters( 'newspack_blocks_patterns', [], $post_type );
448
- $categorized = [];
449
- $clean = [];
450
  foreach ( $patterns as $pattern ) {
451
  if ( ! isset( $pattern['image'] ) || ! $pattern['image'] ) {
452
  continue;
453
  }
454
- $category = isset( $pattern['category'] ) ? $pattern['category'] : __( 'Common', 'newspack-blocks' );
455
  if ( ! isset( $categorized[ $category ] ) ) {
456
- $categorized[ $category ] = [];
457
  }
458
  $categorized[ $category ][] = $pattern;
459
  }
460
  $categories = array_keys( $categorized );
461
  sort( $categories );
462
  foreach ( $categories as $category ) {
463
- $clean[] = [
464
  'title' => $category,
465
  'items' => $categorized[ $category ],
466
- ];
467
  }
468
  return $clean;
469
  }
14
  * Add hooks and filters.
15
  */
16
  public static function init() {
17
+ add_action( 'after_setup_theme', array( __CLASS__, 'add_image_sizes' ) );
18
  }
19
 
20
  /**
60
  wp_localize_script(
61
  'newspack-blocks-editor',
62
  'newspack_blocks_data',
63
+ array(
64
  'patterns' => self::get_patterns_for_post_type( get_post_type() ),
65
+ )
66
  );
67
 
68
  wp_set_script_translations(
183
  * @return string Class list separated by spaces.
184
  */
185
  public static function block_classes( $type, $attributes = array(), $extra = array() ) {
186
+ $classes = array( "wp-block-newspack-blocks-{$type}" );
187
 
188
  if ( ! empty( $attributes['align'] ) ) {
189
  $classes[] = 'align' . $attributes['align'];
418
  * @return string CSS classes.
419
  */
420
  public static function get_term_classes( $post_id ) {
421
+ $classes = array();
422
 
423
  $tags = get_the_terms( $post_id, 'post_tag' );
424
  if ( ! empty( $tags ) ) {
444
  * @return array Array of patterns.
445
  */
446
  public static function get_patterns_for_post_type( $post_type = null ) {
447
+ $patterns = apply_filters( 'newspack_blocks_patterns', array(), $post_type );
448
+ $categorized = array();
449
+ $clean = array();
450
  foreach ( $patterns as $pattern ) {
451
  if ( ! isset( $pattern['image'] ) || ! $pattern['image'] ) {
452
  continue;
453
  }
454
+ $category = isset( $pattern['category'] ) ? $pattern['category'] : __( 'Common', 'full-site-editing' );
455
  if ( ! isset( $categorized[ $category ] ) ) {
456
+ $categorized[ $category ] = array();
457
  }
458
  $categorized[ $category ][] = $pattern;
459
  }
460
  $categories = array_keys( $categorized );
461
  sort( $categories );
462
  foreach ( $categories as $category ) {
463
+ $clean[] = array(
464
  'title' => $category,
465
  'items' => $categorized[ $category ],
466
+ );
467
  }
468
  return $clean;
469
  }
premium-content/blocks/buttons/edit.js CHANGED
@@ -11,6 +11,7 @@ import { compose } from '@wordpress/compose';
11
  import { withDispatch, withSelect } from '@wordpress/data';
12
  import { useEffect } from '@wordpress/element';
13
  import { __ } from '@wordpress/i18n';
 
14
 
15
  const ALLOWED_BLOCKS = [
16
  'core/button',
@@ -23,7 +24,7 @@ const alignmentHooksSetting = {
23
  isEmbedButton: true,
24
  };
25
 
26
- function ButtonsEdit( { context, innerBlocks, setRecurringPaymentsPlan } ) {
27
  const planId = context[ 'premium-content/planId' ];
28
 
29
  const template = [
@@ -37,12 +38,35 @@ function ButtonsEdit( { context, innerBlocks, setRecurringPaymentsPlan } ) {
37
  [ 'premium-content/login-button' ],
38
  ];
39
 
 
 
40
  useEffect( () => {
41
- if ( planId ) {
42
- // Updates the plan on any Recurring Payment inner block.
43
- setRecurringPaymentsPlan( planId );
44
  }
45
- }, [ planId, innerBlocks ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  return (
48
  // eslint-disable-next-line wpcalypso/jsx-classname-namespace
@@ -60,28 +84,22 @@ function ButtonsEdit( { context, innerBlocks, setRecurringPaymentsPlan } ) {
60
 
61
  export default compose( [
62
  withSelect( ( select, props ) => ( {
63
- innerBlocks: select( 'core/block-editor' ).getBlock( props.clientId ).innerBlocks,
 
 
 
 
64
  } ) ),
65
- withDispatch( ( dispatch, props, registry ) => ( {
66
  /**
67
- * Updates the selected plan on the Recurring Payments inner block.
68
  *
69
- * @param planId {int} Recurring Payments plan.
70
  */
71
- setRecurringPaymentsPlan( planId ) {
72
- const { updateBlockAttributes } = dispatch( 'core/block-editor' );
73
- const { getBlock } = registry.select( 'core/block-editor' );
74
-
75
- const updatePlanAttribute = ( block ) => {
76
- if ( block.name === 'jetpack/recurring-payments' ) {
77
- updateBlockAttributes( block.clientId, { planId } );
78
- }
79
-
80
- block.innerBlocks.forEach( updatePlanAttribute );
81
- };
82
-
83
- const block = getBlock( props.clientId );
84
- updatePlanAttribute( block );
85
  },
86
  } ) ),
87
  ] )( ButtonsEdit );
11
  import { withDispatch, withSelect } from '@wordpress/data';
12
  import { useEffect } from '@wordpress/element';
13
  import { __ } from '@wordpress/i18n';
14
+ import { addFilter } from '@wordpress/hooks';
15
 
16
  const ALLOWED_BLOCKS = [
17
  'core/button',
24
  isEmbedButton: true,
25
  };
26
 
27
+ function ButtonsEdit( { context, subscribeButton, setSubscribeButtonPlan } ) {
28
  const planId = context[ 'premium-content/planId' ];
29
 
30
  const template = [
38
  [ 'premium-content/login-button' ],
39
  ];
40
 
41
+ // Keep in sync the plan selected on the Premium Content block with the plan selected on the Recurring Payments
42
+ // inner block acting as a subscribe button.
43
  useEffect( () => {
44
+ if ( ! planId || ! subscribeButton ) {
45
+ return;
 
46
  }
47
+
48
+ if ( subscribeButton.attributes.planId !== planId ) {
49
+ setSubscribeButtonPlan( planId );
50
+ }
51
+ }, [ planId, subscribeButton ] );
52
+
53
+ // Hides the inspector controls of the Recurring Payments inner block acting as a subscribe button so users can only
54
+ // switch plans using the plan selector of the Premium Content block.
55
+ useEffect( () => {
56
+ if ( ! subscribeButton ) {
57
+ return;
58
+ }
59
+ addFilter(
60
+ 'jetpack.RecurringPayments.showControls',
61
+ 'full-site-editing/premium-content-hide-recurring-payments-controls',
62
+ ( showControls, clientId ) => {
63
+ if ( clientId === subscribeButton.clientId ) {
64
+ return false;
65
+ }
66
+ return showControls;
67
+ }
68
+ );
69
+ }, [ subscribeButton ] );
70
 
71
  return (
72
  // eslint-disable-next-line wpcalypso/jsx-classname-namespace
84
 
85
  export default compose( [
86
  withSelect( ( select, props ) => ( {
87
+ // Only first block is assumed to be a subscribe button (users can add additional Recurring Payments blocks for
88
+ // other plans).
89
+ subscribeButton: select( 'core/block-editor' )
90
+ .getBlock( props.clientId )
91
+ .innerBlocks.find( ( block ) => block.name === 'jetpack/recurring-payments' ),
92
  } ) ),
93
+ withDispatch( ( dispatch, props ) => ( {
94
  /**
95
+ * Updates the plan on the Recurring Payments block acting as a subscribe button.
96
  *
97
+ * @param planId {int} Plan ID.
98
  */
99
+ setSubscribeButtonPlan( planId ) {
100
+ dispatch( 'core/block-editor' ).updateBlockAttributes( props.subscribeButton.clientId, {
101
+ planId,
102
+ } );
 
 
 
 
 
 
 
 
 
 
103
  },
104
  } ) ),
105
  ] )( ButtonsEdit );
premium-content/blocks/container/index.js CHANGED
@@ -4,6 +4,8 @@
4
  import { __ } from '@wordpress/i18n';
5
  import { getCurrencyDefaults } from '@automattic/format-currency';
6
  import { trimEnd } from 'lodash';
 
 
7
 
8
  /**
9
  * Internal dependencies
@@ -14,6 +16,20 @@ import save from './save';
14
  const name = 'premium-content/container';
15
  const category = 'common';
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  /**
18
  * @typedef {object} Attributes
19
  * @property { string } newPlanName
@@ -94,6 +110,41 @@ const settings = {
94
  // Removes support for an HTML mode.
95
  html: false,
96
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  keywords: [
98
  'premium-content',
99
  /* translators: block keyword */
4
  import { __ } from '@wordpress/i18n';
5
  import { getCurrencyDefaults } from '@automattic/format-currency';
6
  import { trimEnd } from 'lodash';
7
+ import { createBlock } from '@wordpress/blocks';
8
+ import { select } from '@wordpress/data';
9
 
10
  /**
11
  * Internal dependencies
16
  const name = 'premium-content/container';
17
  const category = 'common';
18
 
19
+ const blockContainsPremiumBlock = ( block ) => {
20
+ if ( block.name.indexOf( 'premium-content/' ) === 0 ) {
21
+ return true;
22
+ }
23
+
24
+ return block.innerBlocks.some( blockContainsPremiumBlock );
25
+ };
26
+
27
+ const blockHasParentPremiumBlock = ( block ) => {
28
+ const { getBlocksByClientId, getBlockParents } = select( 'core/block-editor' );
29
+ const parents = getBlocksByClientId( getBlockParents( block.clientId ) );
30
+ return !! parents.find( ( parent ) => parent.name.indexOf( 'premium-content/' ) === 0 );
31
+ };
32
+
33
  /**
34
  * @typedef {object} Attributes
35
  * @property { string } newPlanName
110
  // Removes support for an HTML mode.
111
  html: false,
112
  },
113
+ transforms: {
114
+ from: [
115
+ {
116
+ type: 'block',
117
+ isMultiBlock: true,
118
+ blocks: [ '*' ],
119
+ __experimentalConvert( blocks ) {
120
+ // Avoid transforming any premium-content block.
121
+ if ( blocks.some( blockContainsPremiumBlock ) ) {
122
+ return;
123
+ }
124
+
125
+ // Avoid transforming if any parent is a premium-content block. Blocks share same parents since they
126
+ // are siblings, so checking the first one is enough.
127
+ if ( blockHasParentPremiumBlock( blocks[ 0 ] ) ) {
128
+ return;
129
+ }
130
+
131
+ // Clone the Blocks
132
+ // Failing to create new block references causes the original blocks
133
+ // to be replaced in the switchToBlockType call thereby meaning they
134
+ // are removed both from their original location and within the
135
+ // new premium content block.
136
+ const innerBlocksSubscribe = blocks.map( ( block ) => {
137
+ return createBlock( block.name, block.attributes, block.innerBlocks );
138
+ } );
139
+
140
+ return createBlock( 'premium-content/container', {}, [
141
+ createBlock( 'premium-content/subscriber-view', {}, innerBlocksSubscribe ),
142
+ createBlock( 'premium-content/logged-out-view' ),
143
+ ] );
144
+ },
145
+ },
146
+ ],
147
+ },
148
  keywords: [
149
  'premium-content',
150
  /* translators: block keyword */
premium-content/blocks/logged-out-view/edit.js CHANGED
@@ -23,13 +23,17 @@ import Context from '../container/context';
23
  * @property { string } containerClientId
24
  * @property { Attributes } attributes
25
  * @property { Function } setAttributes
26
- * @property { Function } selectBlock
27
  *
28
  * @param { Props } props Properties
29
  */
30
- function Edit( { selectBlock } ) {
31
  useEffect( () => {
32
- selectBlock();
 
 
 
 
33
  }, [] );
34
 
35
  return (
@@ -75,7 +79,7 @@ export default compose( [
75
  withDispatch( ( dispatch, props ) => {
76
  const { selectBlock } = dispatch( 'core/block-editor' );
77
  return {
78
- selectBlock() {
79
  // @ts-ignore difficult to type with JSDoc
80
  selectBlock( props.containerClientId );
81
  },
23
  * @property { string } containerClientId
24
  * @property { Attributes } attributes
25
  * @property { Function } setAttributes
26
+ * @property { Function } selectContainerBlock
27
  *
28
  * @param { Props } props Properties
29
  */
30
+ function Edit( { selectContainerBlock } ) {
31
  useEffect( () => {
32
+ // Selects the container block on mount.
33
+ //
34
+ // Execution delayed with setTimeout to ensure it runs after any block auto-selection performed by inner blocks
35
+ // (such as the Recurring Payments block). @see https://github.com/Automattic/wp-calypso/issues/43450
36
+ setTimeout( selectContainerBlock, 0 );
37
  }, [] );
38
 
39
  return (
79
  withDispatch( ( dispatch, props ) => {
80
  const { selectBlock } = dispatch( 'core/block-editor' );
81
  return {
82
+ selectContainerBlock() {
83
  // @ts-ignore difficult to type with JSDoc
84
  selectBlock( props.containerClientId );
85
  },
premium-content/dist/premium-content.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'ff724b857818cc3c75051e41ce9e28ad');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '46f250ff4b3554e2299c96e43af36803');
premium-content/dist/premium-content.js CHANGED
@@ -1,9 +1,9 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,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=59)}([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.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){var r=n(9);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){var r=n(38),o=n(39),i=n(23),c=n(40);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){!function(){e.exports=this.wp.compose}()},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){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.React}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.blocks}()},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 s in r)n.call(r,s)&&r[s]&&e.push(s)}}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){var r=n(41),o=n(42),i=n(23),c=n(43);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},function(e,t){function n(e,t,n,r,o,i,c){try{var s=e[i](c),l=s.value}catch(a){return void n(a)}s.done?t(l):Promise.resolve(l).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var c=e.apply(t,r);function s(e){n(c,o,i,s,l,"next",e)}function l(e){n(c,o,i,s,l,"throw",e)}s(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},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.url}()},function(e,t,n){"use strict";var r=n(27),o=n(26);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function c(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var c=e.charCodeAt(o);c<128?n[r++]=c:c<2048?(n[r++]=c>>6|192,n[r++]=63&c|128):i(e,o)?(c=65536+((1023&c)<<10)+(1023&e.charCodeAt(++o)),n[r++]=c>>18|240,n[r++]=c>>12&63|128,n[r++]=c>>6&63|128,n[r++]=63&c|128):(n[r++]=c>>12|224,n[r++]=c>>6&63|128,n[r++]=63&c|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=c,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=c(o)),n+=l(o.toString(16))}return n},t.zero2=s,t.zero8=l,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var c=new Array(i/4),s=0,l=t;s<c.length;s++,l+=4){var a;a="big"===o?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],c[s]=a>>>0}return c},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,c=(i<r?1:0)+n+o;e[t]=c>>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,c,s){var l=0,a=t;return l+=(a=a+r>>>0)<t?1:0,l+=(a=a+i>>>0)<i?1:0,e+n+o+c+(l+=(a=a+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,c,s){return t+r+i+s>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,c,s,l,a){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+i>>>0)<i?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+o+c+l+(u+=(p=p+a>>>0)<a?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,c,s,l,a){return t+r+i+s+a>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var c=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function p(e,t,n,r){var o,i,c,s;if(a(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),c=i[t]),void 0===c)c=i[t]=n,++e._eventsCount;else if("function"==typeof c?c=i[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(o=u(e))>0&&c.length>o&&!c.warned){c.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=c.length,s=l,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=d.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):b(o,o.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function b(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var c;if(t.length>0&&(c=t[0]),c instanceof Error)throw c;var s=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw s.context=c,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var a=l.length,u=b(l,a);for(n=0;n<a;++n)i(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return p(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return p(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,m(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,m(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,c;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){c=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,c||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t,n){var r=n(24);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(n):"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 r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){t.log=function(){var e;return"object"==typeof console&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(44)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=s(n(10)),i=s(n(46)),c=s(n(49));function s(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function a(e,t){var n,c,s,u,p,d,m,f,g=[],b={};for(d=0;d<e.length;d++)if("string"!==(p=e[d]).type){if(!t.hasOwnProperty(p.value)||void 0===t[p.value])throw new Error("Invalid interpolation, missing component node: `"+p.value+"`");if("object"!==r(t[p.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+p.value+"`","\n> "+l);if("componentClose"===p.type)throw new Error("Missing opening component token: `"+p.value+"`");if("componentOpen"===p.type){n=t[p.value],s=d;break}g.push(t[p.value])}else g.push(p.value);return n&&(u=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(s,e),m=a(e.slice(s+1,u),t),c=o.default.cloneElement(n,{},m),g.push(c),u<e.length-1&&(f=a(e.slice(u+1),t),g=g.concat(f))),1===g.length?g[0]:(g.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,i.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(l=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,c.default)(t);try{return a(i,n)}catch(s){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+s.message+"`");return t}}},function(e,t,n){var r=n(20),o=n(26);function i(e){if(!(this instanceof i))return new i(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=i,o(i,r.EventEmitter),Object.defineProperty(i.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),i.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},i.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},i.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},i.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},i.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},i.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},i.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},i.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},function(e,t,n){"use strict";var r=n(19),o=n(50),i=n(51),c=r.rotl32,s=r.sum32,l=r.sum32_5,a=i.ft_1,u=o.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var o=this.h[0],i=this.h[1],u=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var f=~~(r/20),g=l(c(o,5),a(f,i,u,d),m,n[r],p[f]);m=d,d=u,u=c(i,30),i=o,o=g}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],m)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},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(52);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(53),o=n(54),i=n(55);e.exports=function(e){return function(){var t,n=r(e);if(o()){var c=r(this).constructor;t=Reflect.construct(n,arguments,c)}else t=n.apply(this,arguments);return i(this,t)}}},function(e,t,n){"use strict";e.exports=n(57)},,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,s=e[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(l){o=!0,i=l}finally{try{r||null==s.return||s.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){var r=n(24);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){var r=n(14);e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var c=r,s=Number(new Date),l=s-(n||s);c.diff=l,c.prev=n,c.curr=s,n=s,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var a=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;a++;var r=o.formatters[n];if("function"==typeof r){var i=t[a];e=r.call(c,i),t.splice(a,1),a--}return e})),o.formatArgs.call(c,t);var u=c.log||o.log;u.apply(c,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=c,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function c(e,t){var n=o(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},o.disable=function(){var e=[].concat(r(o.names.map(s)),r(o.skips.map(s).map((function(e){return"-"+e})))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(45),Object.keys(e).forEach((function(t){o[t]=e[t]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function c(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return c(e,t,i,"day");if(t>=o)return c(e,t,o,"hour");if(t>=r)return c(e,t,r,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";var r=n(10),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(25),c=n(47),s=n(48),l="function"==typeof Symbol&&Symbol.iterator;function a(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var i,s=typeof e;if("undefined"!==s&&"boolean"!==s||(e=null),null===e||"string"===s||"number"===s||"object"===s&&e.$$typeof===o)return n(r,e,""===t?"."+a(e,0):t),1;var p=0,d=""===t?".":t+":";if(Array.isArray(e))for(var m=0;m<e.length;m++)p+=u(i=e[m],d+a(i,m),n,r);else{var f=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(f){0;for(var g,b=f.call(e),h=0;!(g=b.next()).done;)p+=u(i=g.value,d+a(i,h++),n,r)}else if("object"===s){0;var v=""+e;c(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===v?"object with keys {"+Object.keys(e).join(", ")+"}":v,"")}}return p}var p=/\/+/g;function d(e){return(""+e).replace(p,"$&/")}var m,f,g=b,b=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},h=function(e){c(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function v(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function y(e,t,n){var o,c,s=e.result,l=e.keyPrefix,a=e.func,u=e.context,p=a.call(u,t,e.count++);Array.isArray(p)?O(p,s,n,i.thatReturnsArgument):null!=p&&(r.isValidElement(p)&&(o=p,c=l+(!p.key||t&&t.key===p.key?"":d(p.key)+"/")+n,p=r.cloneElement(o,{key:c},void 0!==o.props?o.props.children:void 0)),s.push(p))}function O(e,t,n,r,o){var i="";null!=n&&(i=d(n)+"/");var c=v.getPooled(t,i,r,o);!function(e,t,n){null==e||u(e,"",t,n)}(e,y,c),v.release(c)}v.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},m=function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},(f=v).instancePool=[],f.getPooled=m||g,f.poolSize||(f.poolSize=10),f.release=h;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return s(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return s(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;c(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)O(e[n],t,n,i.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,c,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=[n,r,o,i,c,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return a[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";var r=n(25);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t,n){"use strict";var r=n(19),o=n(27);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},function(e,t,n){"use strict";var r=n(19).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function c(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?c(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=c,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},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){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){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(56),o=n(17);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";
7
  /** @license React v1.3.0
8
  * use-subscription.production.min.js
9
  *
@@ -11,16 +11,16 @@
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
- */Object.defineProperty(t,"__esModule",{value:!0});var r=n(58),o=n(10);t.useSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe,i=o.useState((function(){return{getCurrentValue:t,subscribe:n,value:t()}}));e=i[0];var c=i[1];return i=e.value,e.getCurrentValue===t&&e.subscribe===n||(i=t(),c({getCurrentValue:t,subscribe:n,value:i})),o.useDebugValue(i),o.useEffect((function(){function e(){if(!o){var e=t();c((function(o){return o.getCurrentValue!==t||o.subscribe!==n||o.value===e?o:r({},o,{value:e})}))}}var o=!1,i=n(e);return e(),function(){o=!0,i()}}),[t,n]),i}},function(e,t,n){"use strict";
15
  /*
16
  object-assign
17
  (c) Sindre Sorhus
18
  @license MIT
19
- */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function c(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,l=c(e),a=1;a<arguments.length;a++){for(var u in n=Object(arguments[a]))o.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var p=0;p<s.length;p++)i.call(n,s[p])&&(l[s[p]]=n[s[p]])}}return l}},function(e,t,n){"use strict";n.r(t),n.d(t,"registerPremiumContentBlocks",(function(){return At}));var r={};n.r(r),n.d(r,"name",(function(){return He})),n.d(r,"category",(function(){return Ve})),n.d(r,"settings",(function(){return We})),n.d(r,"SUPPORTED_CURRENCIES",(function(){return ze})),n.d(r,"CURRENCY_OPTIONS",(function(){return Ze})),n.d(r,"minimumTransactionAmountForCurrency",(function(){return Ye})),n.d(r,"isPriceValid",(function(){return Je}));var o={};n.r(o),n.d(o,"name",(function(){return Xe})),n.d(o,"category",(function(){return Qe})),n.d(o,"settings",(function(){return et}));var i={};n.r(i),n.d(i,"name",(function(){return ot})),n.d(i,"category",(function(){return it})),n.d(i,"settings",(function(){return ct}));var c={};n.r(c),n.d(c,"name",(function(){return mt})),n.d(c,"category",(function(){return ft})),n.d(c,"settings",(function(){return gt}));var s={};n.r(s),n.d(s,"name",(function(){return kt})),n.d(s,"category",(function(){return xt})),n.d(s,"settings",(function(){return Et}));var l=n(15),a=n.n(l),u=n(5),p=n.n(u),d=n(11),m=n(16),f=n.n(m),g=n(12),b=n(1),h=n(0),v={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function y(e){return v[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}var O,j,C,w,_=n(8),k=n.n(_),x=n(6),E=n.n(x),S=n(3),P=n(7),F=n(4),B=n(18),N=n(14),R=n.n(N),A=n(9),L=n.n(A),T=n(28),D=n.n(T),I=n(29),M=n.n(I);O={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},j=["(","?"],C={")":["("],":":["?","?:"]},w=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var $={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function U(e){var t=function(e){for(var t,n,r,o,i=[],c=[];t=e.match(w);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=c.pop();){if(C[n]){if(C[n][0]===o){n=C[n][1]||n;break}}else if(j.indexOf(o)>=0||O[o]<O[n]){c.push(o);break}i.push(o)}C[n]||c.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(c.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,c,s,l=[];for(n=0;n<e.length;n++){if(c=e[n],i=$[c]){for(r=i.length,o=Array(r);r--;)o[r]=l.pop();try{s=i.apply(null,o)}catch(a){return a}}else s=t.hasOwnProperty(c)?t[c]:+c;l.push(s)}return l[0]}(t,e)}}var K={contextDelimiter:"",onMissingKey:null};function G(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},K)this.options[n]=void 0!==t&&n in t?t[n]:K[n]}G.prototype.getPluralForm=function(e,t){var n,r,o,i,c=this.pluralForms[e];return c||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=U(r),o=function(e){return+i({n:e})}),c=this.pluralForms[e]=o),c(t)},G.prototype.dcnpgettext=function(e,t,n,r,o){var i,c,s;return i=void 0===o?0:this.getPluralForm(e,o),c=n,t&&(c=t+this.options.contextDelimiter+n),(s=this.data[e][c])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var H=n(30),V=n.n(H),W=n(31),z=n.n(W),Z=n(20),Y=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function J(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(Y,(function(){var e,r,o,i,c;return e=arguments[3],r=arguments[5],o=arguments[7],"%"===(i=arguments[9])?"%":("*"===o&&(o=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(c=t[0][r]):(void 0===e&&(e=n),n++,c=t[e-1]),"f"===i?c=parseFloat(c)||0:"d"===i&&(c=parseInt(c)||0),void 0!==o&&("f"===i?c=c.toFixed(o):"s"===i&&(c=c.substr(0,o))),null!=c?c:"")}))}
20
  /*
21
  * Exposes number format capability
22
  *
23
  * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
24
  * @license See CREDITS.md
25
  * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
26
- */function q(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,c=void 0===r?",":r,s=void 0===n?".":n,l="";return(l=(i?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split("."))[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(l[1]||"").length<i&&(l[1]=l[1]||"",l[1]+=new Array(i-l[1].length+1).join("0")),l.join(s)}var X=D()("i18n-calypso"),Q=[function(e){return e}],ee={};function te(){ce.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function ne(e){return Array.prototype.slice.call(e)}function re(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&te("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",ne(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&te("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",ne(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function oe(e,t){return e.dcnpgettext("messages",t.context,t.original,t.plural,t.count)}function ie(e,t){for(var n=Q.length-1;n>=0;n--){var r=Q[n](Object.assign({},t)),o=r.context?r.context+""+r.original:r.original;if(e.state.locale[o])return oe(e.state.tannin,r)}return null}function ce(){if(!(this instanceof ce))return new ce;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:V()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new Z.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}ce.throwErrors=!1,ce.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},ce.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},ce.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},ce.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return q(e,n,r,o)},ce.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},ce.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==ee[n+e])return ee[n+e];var r=z()().update(e).digest("hex");return ee[n+e]=t?r.substr(0,t):r},c=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)Q.push(c(!1));else{var s=o.substr(5).indexOf("-");if(s<0){var l=Number(o.substr(5));Q.push(c(l))}else for(var a=Number(o.substr(5,s)),u=Number(o.substr(6+s)),p=a;p<=u;p++)Q.push(c(p))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new G(L()({},"messages",this.state.locale)),this.state.numberFormatSettings.decimal_point=oe(this.state.tannin,re(["number_format_decimals"])),this.state.numberFormatSettings.thousands_sep=oe(this.state.tannin,re(["number_format_thousands_sep"])),"number_format_decimals"===this.state.numberFormatSettings.decimal_point&&(this.state.numberFormatSettings.decimal_point="."),"number_format_thousands_sep"===this.state.numberFormatSettings.thousands_sep&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},ce.prototype.getLocale=function(){return this.state.locale},ce.prototype.getLocaleSlug=function(){return this.state.localeSlug},ce.prototype.isRtl=function(){return"rtl"===this.state.textDirection},ce.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},ce.prototype.hasTranslation=function(){return!!ie(this,re(arguments))},ce.prototype.translate=function(){var e=re(arguments),t=ie(this,e);if(t||(t=oe(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=J.apply(void 0,R()(n))}catch(o){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[r](o):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=M()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},ce.prototype.reRenderTranslations=function(){X("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},ce.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},ce.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var se=ce,le=n(32),ae=n.n(le),ue=n(33),pe=n.n(ue),de=n(17),me=n.n(de),fe=n(34),ge=n.n(fe),be=n(35),he=n.n(be),ve=n(10),ye=n.n(ve),Oe=n(36);var je,Ce,we=new se,_e=we.numberFormat.bind(we),ke=(we.translate.bind(we),we.configure.bind(we),we.setLocale.bind(we),we.getLocale.bind(we),we.getLocaleSlug.bind(we),we.addTranslations.bind(we),we.reRenderTranslations.bind(we),we.registerComponentUpdateHook.bind(we),we.registerTranslateHook.bind(we),we.state,we.stateObserver,we.on.bind(we),we.off.bind(we),we.emit.bind(we),Ce={numberFormat:(je=we).numberFormat.bind(je),translate:je.translate.bind(je)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(we),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(Oe.useSubscription)(t)}var r=Object(P.createHigherOrderComponent)((function(e){return Object(ve.forwardRef)((function(t,r){var o=n();return ye.a.createElement(e,k()({},t,{isRtl:o,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(we));ke.useRtl,ke.withRtl;function xe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=y(t);if(!r||isNaN(e))return null;var o=p()({},r,{},n),i=o.decimal,c=o.grouping,s=o.precision,l=o.symbol,a=e<0?"-":"",u=_e(Math.abs(e),{decimals:s,thousandsSep:c,decPoint:i});return n.stripZeros&&(u=Ee(u,i)),"".concat(a).concat(l).concat(u)}function Ee(e,t){var n=new RegExp("\\".concat(t,"0+$"));return e.replace(n,"")}function Se(e){var t=e.className,n=e.tab,r=e.label,o=e.selectedTab,i=e.onSelected,c=(n.id===o.id?["is-pressed","is-active"]:[]).concat([t,"components-button","components-tab-button"]);return Object(h.createElement)("button",{type:"button",onClick:function(){return i(n)},className:c.join(" ")},r)}function Pe(e){var t=e.className,n=e.tabs,r=e.selectedTab,o=e.onSelected,i=e.selectBlock;return Object(h.createElement)("div",{className:"premium-content-tabs block-editor-block-toolbar"},n.map((function(n){return Object(h.createElement)(Se,k()({key:n.id},e,{tab:n,selectedTab:r,className:"".concat(t,"--tab"),label:n.label,onSelected:o}))})),Object(h.createElement)("button",{onClick:function(){Object(F.select)("core/edit-post").isEditorSidebarOpened()||Object(F.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block"),i()},className:"edit components-button is-button is-secondary"},Object(b.__)("Edit","full-site-editing")))}var Fe=n(2);function Be(){return Object(h.createElement)("div",{className:"premium-content-wrapper"},Object(h.createElement)(Fe.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]]}))}function Ne(e){var t=e.className,n=e.plan,r=e.selectedPlan,o=e.onSelected,i=e.onClose,c=e.getPlanDescription,s=r&&n.id===r.id,l=(s?["is-selected"]:[]).concat([t]).join(" "),a=s?"yes":void 0,u=null;return n&&(u=" "+c(n)),Object(h.createElement)(S.MenuItem,{onClick:function(e){e.preventDefault(),o(n),i()},className:l,key:n.id,value:n.id,selected:s,icon:a},n.title," : ",u)}function Re(e){var t=e.plans,n=e.selectedPlan,r=e.onSelected;return Object(h.createElement)(S.MenuGroup,null,t.map((function(t){return Object(h.createElement)(Ne,k()({},e,{key:t.id,selectedPlan:n,onSelected:r,plan:t}))})))}function Ae(e){return Object(h.createElement)(S.MenuGroup,null,Object(h.createElement)(S.MenuItem,{onClick:function(t){t.preventDefault(),Object(F.select)("core/edit-post").isEditorSidebarOpened()||Object(F.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block");var n=document.getElementById("new-plan-name");null!==n&&n.focus(),e.onClose()}},Object(b.__)("Add a new subscription","full-site-editing")))}function Le(e){var t=e.selectedPlanId,n=e.onSelected,r=e.plans,o=e.getPlanDescription,i=r.find((function(e){return e.id===t})),c=null;return i&&(c=" "+o(i)),Object(h.createElement)(Fe.BlockControls,null,Object(h.createElement)(S.Toolbar,null,Object(h.createElement)(S.DropdownMenu,{icon:Object(h.createElement)(h.Fragment,null,Object(h.createElement)(S.Dashicon,{icon:"update"})," ",c&&Object(h.createElement)(h.Fragment,null,c)),label:Object(b.__)("Select a plan","full-site-editing"),className:"premium-content-toolbar-button"},(function(t){var r=t.onClose;return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(Re,k()({},e,{onSelected:n,onClose:r,selectedPlan:i})),Object(h.createElement)(Ae,k()({},e,{onClose:r})))}))))}function Te(e){var t=Object(h.useState)(0),n=E()(t,2),r=n[0],o=n[1],i=e.attributes,c=e.setAttributes,s=e.className,l=e.savePlan,a=(e.currencies,e.siteSlug);return Object(h.createElement)(Fe.InspectorControls,null,a&&Object(h.createElement)(S.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(a),className:"wp-block-premium-content-container---link-to-earn"},Object(b.__)("Manage your subscriptions.","full-site-editing")),Object(h.createElement)(S.PanelBody,{title:"Add a new subscription",initialOpen:!0,className:"".concat(s,"---settings-add_plan")},1===r&&Object(h.createElement)(S.Placeholder,{icon:"lock",label:Object(b.__)("Premium Content","full-site-editing"),instructions:Object(b.__)("Saving plan…","full-site-editing")},Object(h.createElement)(S.Spinner,null)),0===r&&Object(h.createElement)("div",null,Object(h.createElement)(S.PanelRow,{className:"plan-name"},Object(h.createElement)(S.TextControl,{id:"new-plan-name",label:"Name",value:i.newPlanName,onChange:function(e){return c({newPlanName:e})}})),Object(h.createElement)(S.PanelRow,{className:"plan-price"},Object(h.createElement)(S.SelectControl,{label:"Currency",onChange:function(e){return c({newPlanCurrency:e})},value:i.newPlanCurrency,options:Ze}),Object(h.createElement)(S.TextControl,{label:"Price",value:i.newPlanPrice,onChange:function(e){return c({newPlanPrice:parseFloat(e)})},type:"number"})),Object(h.createElement)(S.PanelRow,{className:"plan-interval"},Object(h.createElement)(S.SelectControl,{label:"Interval",onChange:function(e){return c({newPlanInterval:e})},value:i.newPlanInterval,options:[{label:"Month",value:"1 month"},{label:"Year",value:"1 year"}]})),Object(h.createElement)(S.PanelRow,null,Object(h.createElement)(S.Button,{isSecondary:!0,isLarge:!0,onClick:function(t){t.preventDefault(),o(1),l(e.attributes,(function(e){o(0),e&&(c({newPlanPrice:5}),c({newPlanName:""}))}))}},Object(b.__)("Add subscription","full-site-editing"))))))}var De=Object(P.compose)([Object(F.withDispatch)((function(e,t){var n,r=t.stripeConnectUrl;return{autosaveAndRedirect:(n=a()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.stripeConnectUrl;return Object(h.createElement)(Fe.Warning,{actions:n&&[Object(h.createElement)(S.Button,{key:"connect",href:n,onClick:t,target:"_top",isDefault:!0,className:"premium-content-block-nudge__button stripe-nudge__button"},Object(b.__)("Connect","full-site-editing"))],className:"premium-content-block-nudge"},Object(h.createElement)("span",{className:"premium-content-block-nudge__info"},Object(h.createElement)(S.Dashicon,{icon:"star-filled"}),Object(h.createElement)("span",{className:"premium-content-block-nudge__text-container"},Object(h.createElement)("span",{className:"premium-content-block-nudge__title"},Object(b.__)("Connect to Stripe to use this block on your site","full-site-editing")),Object(h.createElement)("span",{className:"premium-content-block-nudge__message"},Object(b.__)("This block will be hidden from your visitors until you connect to Stripe.","full-site-editing")))))})),Ie={selectedTab:{id:"",className:"",label:Object(h.createElement)(h.Fragment,null)},stripeNudge:null},Me=Object(h.createContext)(Ie),$e=[{id:"premium",label:Object(h.createElement)("span",null,Object(b.__)("Subscriber View","full-site-editing")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:Object(h.createElement)("span",null,Object(b.__)("Non-subscriber View","full-site-editing")),className:"wp-premium-content-logged-out-view"}],Ue=[];function Ke(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)}var Ge=Object(P.compose)([Object(F.withSelect)((function(e,t){return{postId:(0,e("core/editor").getCurrentPostId)(),containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),S.withNotices,Object(F.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){var t=Object(h.useState)($e[1]),n=E()(t,2),r=n[0],o=n[1],i=Object(h.useState)(!1),c=E()(i,2),s=c[0],l=c[1],a=Object(h.useState)(Ue),u=E()(a,2),p=u[0],d=u[1],m=Object(h.useState)(null),g=E()(m,2),v=g[0],y=g[1],O=Object(h.useState)(0),j=E()(O,2),C=j[0],w=j[1],_=Object(h.useState)(!1),x=E()(_,2),P=x[0],F=x[1],N=Object(h.useState)(""),R=E()(N,2),A=R[0],L=R[1],T=Object(h.useState)(""),D=E()(T,2),I=D[0],M=D[1];function $(t,n){if(!t.newPlanName||0===t.newPlanName.length)return Ke(e,Object(b.__)("Plan requires a name","full-site-editing")),void n(!1);var r=parseFloat(t.newPlanPrice),o=Ye(t.newPlanCurrency),i=Object(b.sprintf)(Object(b.__)("Minimum allowed price is %s.","full-site-editing"),xe(o,t.newPlanCurrency));if(r<o)return Ke(e,i),void n(!1);if(!Je(t.newPlanCurrency,r))return Ke(e,Object(b.__)("Plan requires a valid price","full-site-editing")),void n(!1);var c={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:t.newPlanCurrency,price:t.newPlanPrice,title:t.newPlanName,interval:t.newPlanInterval}};f()(c).then((function(t){var r={id:t.id,title:t.title,interval:t.interval,price:t.price,currency:t.currency};d(p.concat([r])),U(r),function(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createNotice({status:"info",content:t})}(e,Object(b.__)("Successfully created plan","full-site-editing")),n&&n(!0)}),(function(){Ke(e,Object(b.__)("There was an error when adding the plan.","full-site-editing")),n&&n(!1)}))}function U(t){e.setAttributes({selectedPlanId:t.id})}var K=Object(h.useRef)(null);!function(e,t){function n(n){e.current&&n.target&&n.target instanceof Node&&!e.current.contains(n.target)?t(!1):t(!0)}Object(h.useEffect)((function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}(K,l);var G=e.isSelected,H=e.className;if(Object(h.useEffect)((function(){var t={path:"/wpcom/v2/memberships/status",method:"GET"};f()(t).then((function(t){if(t||"object"==typeof t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return w(2),void Ke(e,Object.values(t.errors)[0][0]);y(t.connect_url),F(t.should_upgrade_to_access_memberships),L(t.upgrade_url),M(t.site_slug),t.products&&0===t.products.length&&!t.should_upgrade_to_access_memberships&&t.connected_account_id?$({newPlanCurrency:"USD",newPlanPrice:5,newPlanName:Object(b.__)("Monthly Subscription","full-site-editing"),newPlanInterval:"1 month"},(function(){w(t.connected_account_id?1:2)})):(t.products&&t.products.length>0&&(d(t.products),e.attributes.selectedPlanId||U(t.products[0])),w(t.connected_account_id?1:2))}}),(function(t){y(null),w(2),Ke(e,t.message)})),e.selectBlock()}),[]),0===C)return Object(h.createElement)("div",{className:H,ref:K},e.noticeUI,Object(h.createElement)(S.Placeholder,{icon:"lock",label:Object(b.__)("Premium Content","full-site-editing"),instructions:Object(b.__)("Loading data…","full-site-editing")},Object(h.createElement)(S.Spinner,null)));if(P)return Object(h.createElement)("div",{className:H,ref:K},e.noticeUI,Object(h.createElement)(S.Placeholder,{icon:"lock",label:Object(b.__)("Premium Content","full-site-editing"),instructions:Object(b.__)("You'll need to upgrade your plan to use the Premium Content block.","full-site-editing")},Object(h.createElement)(S.Button,{isSecondary:!0,isLarge:!0,href:A,target:"_blank",className:"premium-content-block-nudge__button plan-nudge__button"},Object(b.__)("Upgrade Your Plan","full-site-editing")),Object(h.createElement)("div",{className:"membership-button__disclaimer"},Object(h.createElement)(S.ExternalLink,{href:"https://wordpress.com/support/premium-content-block/"},Object(b.__)("Read more about Premium Content and related fees.","full-site-editing")))));var V=null;if(!P&&1!==C&&v){var W=function(e,t){var n,r=e.postId;if(!Object(B.isURL)(t))return null;if(!r)return t;try{var o=Object(B.getQueryArg)(t,"state");"string"==typeof o&&(n=JSON.parse(atob(o)))}catch(i){return t}return n.from_editor_post_id=r,Object(B.addQueryArgs)(t,{state:btoa(JSON.stringify(n))})}(e,v);V=Object(h.createElement)(De,k()({},e,{stripeConnectUrl:W}))}return Object(h.createElement)("div",{className:H,ref:K},e.noticeUI,(G||s)&&1===C&&Object(h.createElement)(Le,k()({},e,{plans:p,selectedPlanId:e.attributes.selectedPlanId,onSelected:U,getPlanDescription:function(e){var t=xe(parseFloat(e.price),e.currency);return"1 month"===e.interval?Object(b.sprintf)(Object(b.__)("%s / month","full-site-editing"),t):"1 year"===e.interval?Object(b.sprintf)(Object(b.__)("%s / year","full-site-editing"),t):"one-time"===e.interval?t:Object(b.sprintf)(Object(b.__)("%s / %s","full-site-editing"),t,e.interval)}})),(G||s)&&1===C&&Object(h.createElement)(Te,k()({},e,{savePlan:$,siteSlug:I})),(G||s)&&Object(h.createElement)(Pe,k()({},e,{tabs:$e,selectedTab:r,onSelected:o})),Object(h.createElement)(Me.Provider,{value:{selectedTab:r,stripeNudge:V}},Object(h.createElement)(Be,null)))}));var He="premium-content/container",Ve="common",We={name:He,attributes:{newPlanName:{type:"string",default:"Monthly Subscription"},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0}},title:Object(b.__)("Premium Content","full-site-editing"),description:Object(b.__)("Restrict access to your content for paying subscribers.","full-site-editing"),category:Ve,icon:Object(h.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(h.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(h.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(h.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),supports:{html:!1},keywords:["premium-content",Object(b.__)("premium","full-site-editing"),Object(b.__)("paywall","full-site-editing")],edit:Ge,save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-container"},Object(h.createElement)(Fe.InnerBlocks.Content,null))},providesContext:{"premium-content/planId":"selectedPlanId"}},ze={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5},Ze=Object.keys(ze).map((function(e){var t=y(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(d.trimEnd)(t,"."))}}));function Ye(e){return ze[e]}function Je(e,t){return!isNaN(t)&&t>=Ye(e)}var qe=Object(P.compose)([Object(F.withSelect)((function(e,t){return{hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length,containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),Object(F.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){return Object(h.useEffect)((function(){e.selectBlock()}),[]),Object(h.createElement)(Me.Consumer,null,(function(t){var n=t.selectedTab,r=t.stripeNudge;return Object(h.createElement)("div",{hidden:"wall"===n.id,className:n.className},r,Object(h.createElement)(Fe.InnerBlocks,{renderAppender:!e.hasInnerBlocks&&Fe.InnerBlocks.ButtonBlockAppender,templateLock:!1,template:[["core/paragraph",{placeholder:Object(b.__)("Insert the piece of content you want your visitors to see after they subscribe.","full-site-editing")}]]}))}))}));var Xe="premium-content/subscriber-view",Qe="common",et={name:Xe,category:Qe,attributes:{},title:Object(b.__)("Subscriber View","full-site-editing"),description:Object(b.__)("Subscriber View.","full-site-editing"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:qe,save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-subscriber-view"},Object(h.createElement)(Fe.InnerBlocks.Content,null))}};var tt=Object(P.compose)([Object(F.withSelect)((function(e,t){return{containerClientId:(0,e("core/block-editor").getBlockHierarchyRootClientId)(t.clientId)}})),Object(F.withDispatch)((function(e,t){var n=e("core/block-editor").selectBlock;return{selectBlock:function(){n(t.containerClientId)}}}))])((function(e){var t=e.selectBlock;return Object(h.useEffect)((function(){t()}),[]),Object(h.createElement)(Me.Consumer,null,(function(e){var t=e.selectedTab,n=e.stripeNudge;return Object(h.createElement)("div",{hidden:"premium"===t.id,className:t.className},n,Object(h.createElement)(Fe.InnerBlocks,{templateLock:!1,template:[["core/heading",{content:Object(b.__)("Subscribe to get access","full-site-editing"),level:3}],["core/paragraph",{content:Object(b.__)("Read more of this content when you subscribe today.","full-site-editing")}],["premium-content/buttons"]]}))}))}));var nt=[{attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},isEligible:function(e){return!!e.buttonClasses},migrate:function(e,t){var n=Object(g.createBlock)("premium-content/buttons",{},[Object(g.createBlock)("jetpack/recurring-payments",{submitButtonText:e.subscribeButtonText,backgroundButtonColor:e.backgroundButtonColor,textButtonColor:e.textButtonColor,customBackgroundButtonColor:e.customBackgroundButtonColor,customTextButtonColor:e.customTextButtonColor}),Object(g.createBlock)("premium-content/login-button",{text:e.loginButtonText,backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,style:{color:{background:e.customBackgroundButtonColor,text:e.customTextButtonColor}}})]);return[e,[].concat(R()(t),[n])]},save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(h.createElement)(Fe.InnerBlocks.Content,null))}}],rt=n(21),ot="premium-content/logged-out-view",it="common",ct={name:ot,category:it,attributes:{},title:Object(b.__)("Logged Out View","full-site-editing"),description:Object(b.__)("Logged Out View.","full-site-editing"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:tt,save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(h.createElement)(Fe.InnerBlocks.Content,null))},deprecated:nt},st=Object(F.subscribe)((function(){var e=Object(F.select)("core/rich-text").getFormatType("core/link");if(e){st(),Object(rt.unregisterFormatType)("core/link");var t=Object(P.compose)(Object(F.withSelect)((function(e){return{selectedBlock:e("core/block-editor").getSelectedBlock()}})),Object(P.ifCondition)((function(e){return e.selectedBlock&&e.selectedBlock.name!==ot})))(e.edit);Object(rt.registerFormatType)("core/link",p()({},e,{edit:t}))}})),lt=n(22),at=Object(h.createElement)(lt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(h.createElement)(lt.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"})),ut=["core/button","jetpack/recurring-payments","premium-content/login-button"],pt={isEmbedButton:!0};var dt=Object(P.compose)([Object(F.withSelect)((function(e,t){return{innerBlocks:e("core/block-editor").getBlock(t.clientId).innerBlocks}})),Object(F.withDispatch)((function(e,t,n){return{setRecurringPaymentsPlan:function(r){var o=e("core/block-editor").updateBlockAttributes;!function e(t){"jetpack/recurring-payments"===t.name&&o(t.clientId,{planId:r}),t.innerBlocks.forEach(e)}((0,n.select("core/block-editor").getBlock)(t.clientId))}}}))])((function(e){var t=e.context,n=e.innerBlocks,r=e.setRecurringPaymentsPlan,o=t["premium-content/planId"],i=[["jetpack/recurring-payments",{planId:o,submitButtonText:Object(b.__)("Subscribe","full-site-editing")}],["premium-content/login-button"]];return Object(h.useEffect)((function(){o&&r(o)}),[o,n]),Object(h.createElement)(Fe.__experimentalBlock.div,{className:"wp-block-buttons"},Object(h.createElement)(Fe.__experimentalAlignmentHookSettingsProvider,{value:pt},Object(h.createElement)(Fe.InnerBlocks,{allowedBlocks:ut,template:i,__experimentalMoverDirection:"horizontal"})))}));var mt="premium-content/buttons",ft="design",gt={name:mt,category:ft,title:Object(b.__)("Premium Content buttons","full-site-editing"),description:Object(b.__)("Prompt Premium Content visitors to take action with a group of button-style links.","full-site-editing"),icon:at,supports:{align:!0,alignWide:!1,lightBlockWrapper:!0},keywords:[Object(b.__)("link","full-site-editing")],edit:dt,save:function(){return Object(h.createElement)("div",{className:"wp-block-buttons"},Object(h.createElement)(Fe.InnerBlocks.Content,null))},context:["premium-content/planId"]},bt=n(13),ht=n.n(bt),vt="web"===h.Platform.OS;var yt=function e(t){if(!Object(d.isObject)(t))return t;var n=Object(d.pickBy)(Object(d.mapValues)(t,e),d.identity);return Object(d.isEqual)(n,{})?void 0:n};function Ot(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,i=window,c=i.getComputedStyle,s=i.Node,l=Object(h.useState)(),a=E()(l,2),u=a[0],p=a[1],d=Object(h.useState)(),m=E()(d,2),f=m[0],g=m[1],v=vt?Object(b.__)("Color settings","full-site-editing"):Object(b.__)("Color Settings","full-site-editing");return Object(h.useEffect)((function(){if(!vt||o){var e=function(e){return document.getElementById("block-"+e)}(n);if(e){g(c(e).color);for(var t=e,r=c(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===s.ELEMENT_NODE;)t=t.parentNode,r=c(t).backgroundColor;p(r)}}})),Object(h.createElement)(Fe.InspectorControls,null,Object(h.createElement)(Fe.__experimentalPanelColorGradientSettings,{title:v,initialOpen:!1,settings:t},vt&&o&&Object(h.createElement)(Fe.ContrastChecker,{backgroundColor:u,textColor:f})))}var jt=function(e){var t,n,r,o=e.attributes,i=Object(F.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),c=i.colors,s=i.gradients,l=Object(h.useRef)(o);Object(h.useEffect)((function(){l.current=o}),[o]);var a,u,d=o.style,m=o.textColor,f=o.backgroundColor,g=o.gradient;a=g?Object(Fe.getGradientValueBySlug)(s,g):null==d||null===(u=d.color)||void 0===u?void 0:u.gradient;var v=function(t){return function(n){var r,o,i=Object(Fe.getColorObjectByColorValue)(c,n),s=t+"Color",a=p()({},l.current.style,{color:p()({},null===(r=l.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,L()({},t,(null==i?void 0:i.slug)?void 0:n))}),u=(null==i?void 0:i.slug)?i.slug:void 0,d=L()({style:yt(a)},s,u);e.setAttributes(d),l.current=p()({},l.current,{},d)}};return Object(h.createElement)(Ot,{enableContrastChecking:!g&&!(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient),clientId:e.clientId,settings:[{label:Object(b.__)("Text Color","full-site-editing"),onColorChange:v("text"),colorValue:Object(Fe.getColorObjectByAttributeValues)(c,m,null==d||null===(n=d.color)||void 0===n?void 0:n.text).color},{label:Object(b.__)("Background Color","full-site-editing"),onColorChange:v("background"),colorValue:Object(Fe.getColorObjectByAttributeValues)(c,f,null==d||null===(r=d.color)||void 0===r?void 0:r.background).color,gradientValue:a,onGradientChange:function(t){var n,r=Object(Fe.getGradientSlugByValue)(s,t);if(r){var o,i,c,a=p()({},null===(o=l.current)||void 0===o?void 0:o.style,{color:p()({},null===(i=l.current)||void 0===i||null===(c=i.style)||void 0===c?void 0:c.color,{gradient:void 0})});n={style:yt(a),gradient:r}}else{var u,d,m,f=p()({},null===(u=l.current)||void 0===u?void 0:u.style,{color:p()({},null===(d=l.current)||void 0===d||null===(m=d.style)||void 0===m?void 0:m.color,{gradient:t})});n={style:yt(f),gradient:void 0}}e.setAttributes(n),l.current=p()({},l.current,{},n)}}]})};function Ct(e){var t,n,r,o,i,c,s,l,a,u,p,d=e.backgroundColor,m=e.textColor,f=e.gradient,g=e.style,b=Object(Fe.getColorClassName)("background-color",d),h=Object(Fe.__experimentalGetGradientClass)(f),v=Object(Fe.getColorClassName)("color",m),y=ht()(v,h,(i={},L()(i,b,!(null==g||null===(t=g.color)||void 0===t?void 0:t.gradient)&&!!b),L()(i,"has-text-color",m||(null==g||null===(n=g.color)||void 0===n?void 0:n.text)),L()(i,"has-background",d||(null==g||null===(r=g.color)||void 0===r?void 0:r.background)||f||(null==g||null===(o=g.color)||void 0===o?void 0:o.gradient)),i));return{className:y||void 0,style:(null==g||null===(c=g.color)||void 0===c?void 0:c.background)||(null==g||null===(s=g.color)||void 0===s?void 0:s.text)||(null==g||null===(l=g.color)||void 0===l?void 0:l.gradient)?{background:(null==g||null===(a=g.color)||void 0===a?void 0:a.gradient)?g.color.gradient:void 0,backgroundColor:(null==g||null===(u=g.color)||void 0===u?void 0:u.background)?g.color.background:void 0,color:(null==g||null===(p=g.color)||void 0===p?void 0:p.text)?g.color.text:void 0}:{}}}function wt(e){var t=e.borderRadius,n=void 0===t?"":t,r=e.setAttributes,o=Object(h.useCallback)((function(e){r({borderRadius:e})}),[r]);return Object(h.createElement)(S.PanelBody,{title:Object(b.__)("Border settings","full-site-editing")},Object(h.createElement)(S.RangeControl,{value:n,label:Object(b.__)("Border radius","full-site-editing"),min:0,max:50,initialPosition:5,allowReset:!0,onChange:o}))}var _t=function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.borderRadius,i=t.text,c=Ct(t);return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(Fe.__experimentalBlock.div,{className:"wp-block-button"},Object(h.createElement)(Fe.RichText,{placeholder:Object(b.__)("Add text…","full-site-editing"),value:i,onChange:function(e){return n({text:e})},withoutInteractiveFormatting:!0,className:ht()(r,"wp-block-button__link",c.className,{"no-border-radius":0===o}),style:p()({borderRadius:o?o+"px":void 0},c.style)})),Object(h.createElement)(Fe.InspectorControls,null,Object(h.createElement)(jt,e),Object(h.createElement)(wt,{borderRadius:o,setAttributes:n})))};var kt="premium-content/login-button",xt="design",Et={name:kt,title:Object(b.__)("Premium Content login button","full-site-editing"),description:Object(b.__)("Prompt subscriber visitors to log in with a button-style link (only visible for logged out users).","full-site-editing"),attributes:{text:{type:"string",source:"html",selector:"a",default:Object(b.__)("Log in","full-site-editing")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},icon:at,keywords:[Object(b.__)("link","full-site-editing")],supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0},edit:_t,save:function(e){var t=e.attributes,n=t.borderRadius,r=t.text,o=Ct(t),i=ht()("wp-block-button__link",o.className,{"no-border-radius":0===n}),c=p()({borderRadius:n?n+"px":void 0},o.style);return Object(h.createElement)("div",{className:"wp-block-button"},Object(h.createElement)(Fe.RichText.Content,{tagName:"a",className:i,style:c,value:r}))}},St=function(e){if(e){var t=e.name,n=e.category,r=e.settings;Object(g.registerBlockType)(t,p()({category:n},r))}},Pt=function(e,t){var n=Object(g.getBlockType)(e);if(n){Object(g.unregisterBlockType)(e);var r=Object(d.mergeWith)({},n,t,(function(e,t){if(Array.isArray(e))return e.concat(t)}));Object(g.registerBlockType)(e,r)}},Ft=function(){var e=a()(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",f()({path:"/wpcom/v2/memberships/status"}));case 4:return e.prev=4,e.t0=e.catch(0),e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,null,[[0,4]])})));return function(){return e.apply(this,arguments)}}(),Bt=function(e){if(e.should_upgrade_to_access_memberships){var t=Object(b._x)("paid","Short label appearing near a block requiring a paid plan","full-site-editing");Pt(He,{title:"".concat(We.title," (").concat(t,")")})}},Nt=function(e){!e.should_upgrade_to_access_memberships&&e.connected_account_id||(Pt(mt,{supports:{inserter:!1}}),Pt(kt,{supports:{inserter:!1}}))},Rt=function(){var e=a()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ft();case 2:t=e.sent,Bt(t),Nt(t);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),At=function(){[r,i,o,c,s].forEach(St)};At(),Rt()}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,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){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){var r=n(10);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){var r=n(39),o=n(40),i=n(23),c=n(41);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){!function(){e.exports=this.wp.compose}()},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.blocks}()},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.React}()},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 c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}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){var r=n(42),o=n(43),i=n(23),c=n(44);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},function(e,t){function n(e,t,n,r,o,i,c){try{var s=e[i](c),l=s.value}catch(a){return void n(a)}s.done?t(l):Promise.resolve(l).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var c=e.apply(t,r);function s(e){n(c,o,i,s,l,"next",e)}function l(e){n(c,o,i,s,l,"throw",e)}s(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},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.url}()},function(e,t,n){"use strict";var r=n(27),o=n(26);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function c(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var c=e.charCodeAt(o);c<128?n[r++]=c:c<2048?(n[r++]=c>>6|192,n[r++]=63&c|128):i(e,o)?(c=65536+((1023&c)<<10)+(1023&e.charCodeAt(++o)),n[r++]=c>>18|240,n[r++]=c>>12&63|128,n[r++]=c>>6&63|128,n[r++]=63&c|128):(n[r++]=c>>12|224,n[r++]=c>>6&63|128,n[r++]=63&c|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=c,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=c(o)),n+=l(o.toString(16))}return n},t.zero2=s,t.zero8=l,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var c=new Array(i/4),s=0,l=t;s<c.length;s++,l+=4){var a;a="big"===o?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],c[s]=a>>>0}return c},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,c=(i<r?1:0)+n+o;e[t]=c>>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,c,s){var l=0,a=t;return l+=(a=a+r>>>0)<t?1:0,l+=(a=a+i>>>0)<i?1:0,e+n+o+c+(l+=(a=a+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,c,s){return t+r+i+s>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,c,s,l,a){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+i>>>0)<i?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+o+c+l+(u+=(p=p+a>>>0)<a?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,c,s,l,a){return t+r+i+s+a>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var c=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function p(e,t,n,r){var o,i,c,s;if(a(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),c=i[t]),void 0===c)c=i[t]=n,++e._eventsCount;else if("function"==typeof c?c=i[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(o=u(e))>0&&c.length>o&&!c.warned){c.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=c.length,s=l,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=d.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):b(o,o.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function b(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var c;if(t.length>0&&(c=t[0]),c instanceof Error)throw c;var s=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw s.context=c,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var a=l.length,u=b(l,a);for(n=0;n<a;++n)i(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return p(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return p(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,m(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,m(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,c;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){c=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,c||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t,n){var r=n(24);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(n):"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 r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){t.log=function(){var e;return"object"==typeof console&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(45)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=s(n(11)),i=s(n(47)),c=s(n(50));function s(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function a(e,t){var n,c,s,u,p,d,m,f,g=[],b={};for(d=0;d<e.length;d++)if("string"!==(p=e[d]).type){if(!t.hasOwnProperty(p.value)||void 0===t[p.value])throw new Error("Invalid interpolation, missing component node: `"+p.value+"`");if("object"!==r(t[p.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+p.value+"`","\n> "+l);if("componentClose"===p.type)throw new Error("Missing opening component token: `"+p.value+"`");if("componentOpen"===p.type){n=t[p.value],s=d;break}g.push(t[p.value])}else g.push(p.value);return n&&(u=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(s,e),m=a(e.slice(s+1,u),t),c=o.default.cloneElement(n,{},m),g.push(c),u<e.length-1&&(f=a(e.slice(u+1),t),g=g.concat(f))),1===g.length?g[0]:(g.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,i.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(l=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,c.default)(t);try{return a(i,n)}catch(s){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+s.message+"`");return t}}},function(e,t,n){var r=n(20),o=n(26);function i(e){if(!(this instanceof i))return new i(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=i,o(i,r.EventEmitter),Object.defineProperty(i.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),i.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},i.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},i.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},i.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},i.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},i.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},i.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},i.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},function(e,t,n){"use strict";var r=n(19),o=n(51),i=n(52),c=r.rotl32,s=r.sum32,l=r.sum32_5,a=i.ft_1,u=o.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var o=this.h[0],i=this.h[1],u=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var f=~~(r/20),g=l(c(o,5),a(f,i,u,d),m,n[r],p[f]);m=d,d=u,u=c(i,30),i=o,o=g}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],m)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},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(53);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(54),o=n(55),i=n(56);e.exports=function(e){return function(){var t,n=r(e);if(o()){var c=r(this).constructor;t=Reflect.construct(n,arguments,c)}else t=n.apply(this,arguments);return i(this,t)}}},function(e,t,n){"use strict";e.exports=n(58)},function(e,t){!function(){e.exports=this.wp.hooks}()},,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,s=e[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(l){o=!0,i=l}finally{try{r||null==s.return||s.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){var r=n(24);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){var r=n(14);e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var c=r,s=Number(new Date),l=s-(n||s);c.diff=l,c.prev=n,c.curr=s,n=s,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var a=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;a++;var r=o.formatters[n];if("function"==typeof r){var i=t[a];e=r.call(c,i),t.splice(a,1),a--}return e})),o.formatArgs.call(c,t);var u=c.log||o.log;u.apply(c,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=c,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function c(e,t){var n=o(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},o.disable=function(){var e=[].concat(r(o.names.map(s)),r(o.skips.map(s).map((function(e){return"-"+e})))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(46),Object.keys(e).forEach((function(t){o[t]=e[t]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function c(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return c(e,t,i,"day");if(t>=o)return c(e,t,o,"hour");if(t>=r)return c(e,t,r,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";var r=n(11),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(25),c=n(48),s=n(49),l="function"==typeof Symbol&&Symbol.iterator;function a(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var i,s=typeof e;if("undefined"!==s&&"boolean"!==s||(e=null),null===e||"string"===s||"number"===s||"object"===s&&e.$$typeof===o)return n(r,e,""===t?"."+a(e,0):t),1;var p=0,d=""===t?".":t+":";if(Array.isArray(e))for(var m=0;m<e.length;m++)p+=u(i=e[m],d+a(i,m),n,r);else{var f=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(f){0;for(var g,b=f.call(e),h=0;!(g=b.next()).done;)p+=u(i=g.value,d+a(i,h++),n,r)}else if("object"===s){0;var v=""+e;c(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===v?"object with keys {"+Object.keys(e).join(", ")+"}":v,"")}}return p}var p=/\/+/g;function d(e){return(""+e).replace(p,"$&/")}var m,f,g=b,b=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},h=function(e){c(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function v(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function y(e,t,n){var o,c,s=e.result,l=e.keyPrefix,a=e.func,u=e.context,p=a.call(u,t,e.count++);Array.isArray(p)?O(p,s,n,i.thatReturnsArgument):null!=p&&(r.isValidElement(p)&&(o=p,c=l+(!p.key||t&&t.key===p.key?"":d(p.key)+"/")+n,p=r.cloneElement(o,{key:c},void 0!==o.props?o.props.children:void 0)),s.push(p))}function O(e,t,n,r,o){var i="";null!=n&&(i=d(n)+"/");var c=v.getPooled(t,i,r,o);!function(e,t,n){null==e||u(e,"",t,n)}(e,y,c),v.release(c)}v.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},m=function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},(f=v).instancePool=[],f.getPooled=m||g,f.poolSize||(f.poolSize=10),f.release=h;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return s(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return s(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;c(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)O(e[n],t,n,i.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,c,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=[n,r,o,i,c,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return a[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";var r=n(25);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t,n){"use strict";var r=n(19),o=n(27);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},function(e,t,n){"use strict";var r=n(19).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function c(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?c(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=c,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},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){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){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(57),o=n(17);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";
7
  /** @license React v1.3.0
8
  * use-subscription.production.min.js
9
  *
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
+ */Object.defineProperty(t,"__esModule",{value:!0});var r=n(59),o=n(11);t.useSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe,i=o.useState((function(){return{getCurrentValue:t,subscribe:n,value:t()}}));e=i[0];var c=i[1];return i=e.value,e.getCurrentValue===t&&e.subscribe===n||(i=t(),c({getCurrentValue:t,subscribe:n,value:i})),o.useDebugValue(i),o.useEffect((function(){function e(){if(!o){var e=t();c((function(o){return o.getCurrentValue!==t||o.subscribe!==n||o.value===e?o:r({},o,{value:e})}))}}var o=!1,i=n(e);return e(),function(){o=!0,i()}}),[t,n]),i}},function(e,t,n){"use strict";
15
  /*
16
  object-assign
17
  (c) Sindre Sorhus
18
  @license MIT
19
+ */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function c(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,l=c(e),a=1;a<arguments.length;a++){for(var u in n=Object(arguments[a]))o.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var p=0;p<s.length;p++)i.call(n,s[p])&&(l[s[p]]=n[s[p]])}}return l}},function(e,t,n){"use strict";n.r(t),n.d(t,"registerPremiumContentBlocks",(function(){return Tt}));var r={};n.r(r),n.d(r,"name",(function(){return He})),n.d(r,"category",(function(){return Ve})),n.d(r,"settings",(function(){return ze})),n.d(r,"SUPPORTED_CURRENCIES",(function(){return Ze})),n.d(r,"CURRENCY_OPTIONS",(function(){return Ye})),n.d(r,"minimumTransactionAmountForCurrency",(function(){return Je})),n.d(r,"isPriceValid",(function(){return qe}));var o={};n.r(o),n.d(o,"name",(function(){return Qe})),n.d(o,"category",(function(){return et})),n.d(o,"settings",(function(){return tt}));var i={};n.r(i),n.d(i,"name",(function(){return it})),n.d(i,"category",(function(){return ct})),n.d(i,"settings",(function(){return st}));var c={};n.r(c),n.d(c,"name",(function(){return gt})),n.d(c,"category",(function(){return bt})),n.d(c,"settings",(function(){return ht}));var s={};n.r(s),n.d(s,"name",(function(){return Et})),n.d(s,"category",(function(){return St})),n.d(s,"settings",(function(){return Pt}));var l=n(15),a=n.n(l),u=n(5),p=n.n(u),d=n(12),m=n(16),f=n.n(m),g=n(9),b=n(1),h=n(0),v={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function y(e){return v[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}var O,j,C,w,_=n(4),k=n(8),x=n.n(k),E=n(6),S=n.n(E),P=n(3),F=n(7),B=n(18),N=n(14),R=n.n(N),A=n(10),L=n.n(A),T=n(28),I=n.n(T),D=n(29),M=n.n(D);O={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},j=["(","?"],C={")":["("],":":["?","?:"]},w=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var $={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function U(e){var t=function(e){for(var t,n,r,o,i=[],c=[];t=e.match(w);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=c.pop();){if(C[n]){if(C[n][0]===o){n=C[n][1]||n;break}}else if(j.indexOf(o)>=0||O[o]<O[n]){c.push(o);break}i.push(o)}C[n]||c.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(c.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,c,s,l=[];for(n=0;n<e.length;n++){if(c=e[n],i=$[c]){for(r=i.length,o=Array(r);r--;)o[r]=l.pop();try{s=i.apply(null,o)}catch(a){return a}}else s=t.hasOwnProperty(c)?t[c]:+c;l.push(s)}return l[0]}(t,e)}}var K={contextDelimiter:"",onMissingKey:null};function G(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},K)this.options[n]=void 0!==t&&n in t?t[n]:K[n]}G.prototype.getPluralForm=function(e,t){var n,r,o,i,c=this.pluralForms[e];return c||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=U(r),o=function(e){return+i({n:e})}),c=this.pluralForms[e]=o),c(t)},G.prototype.dcnpgettext=function(e,t,n,r,o){var i,c,s;return i=void 0===o?0:this.getPluralForm(e,o),c=n,t&&(c=t+this.options.contextDelimiter+n),(s=this.data[e][c])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var H=n(30),V=n.n(H),W=n(31),z=n.n(W),Z=n(20),Y=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function J(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(Y,(function(){var e,r,o,i,c;return e=arguments[3],r=arguments[5],o=arguments[7],"%"===(i=arguments[9])?"%":("*"===o&&(o=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(c=t[0][r]):(void 0===e&&(e=n),n++,c=t[e-1]),"f"===i?c=parseFloat(c)||0:"d"===i&&(c=parseInt(c)||0),void 0!==o&&("f"===i?c=c.toFixed(o):"s"===i&&(c=c.substr(0,o))),null!=c?c:"")}))}
20
  /*
21
  * Exposes number format capability
22
  *
23
  * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
24
  * @license See CREDITS.md
25
  * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
26
+ */function q(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,c=void 0===r?",":r,s=void 0===n?".":n,l="";return(l=(i?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split("."))[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(l[1]||"").length<i&&(l[1]=l[1]||"",l[1]+=new Array(i-l[1].length+1).join("0")),l.join(s)}var X=I()("i18n-calypso"),Q=[function(e){return e}],ee={};function te(){ce.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function ne(e){return Array.prototype.slice.call(e)}function re(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&te("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",ne(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&te("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",ne(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function oe(e,t){return e.dcnpgettext("messages",t.context,t.original,t.plural,t.count)}function ie(e,t){for(var n=Q.length-1;n>=0;n--){var r=Q[n](Object.assign({},t)),o=r.context?r.context+""+r.original:r.original;if(e.state.locale[o])return oe(e.state.tannin,r)}return null}function ce(){if(!(this instanceof ce))return new ce;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:V()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new Z.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}ce.throwErrors=!1,ce.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},ce.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},ce.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},ce.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return q(e,n,r,o)},ce.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},ce.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==ee[n+e])return ee[n+e];var r=z()().update(e).digest("hex");return ee[n+e]=t?r.substr(0,t):r},c=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)Q.push(c(!1));else{var s=o.substr(5).indexOf("-");if(s<0){var l=Number(o.substr(5));Q.push(c(l))}else for(var a=Number(o.substr(5,s)),u=Number(o.substr(6+s)),p=a;p<=u;p++)Q.push(c(p))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new G(L()({},"messages",this.state.locale)),this.state.numberFormatSettings.decimal_point=oe(this.state.tannin,re(["number_format_decimals"])),this.state.numberFormatSettings.thousands_sep=oe(this.state.tannin,re(["number_format_thousands_sep"])),"number_format_decimals"===this.state.numberFormatSettings.decimal_point&&(this.state.numberFormatSettings.decimal_point="."),"number_format_thousands_sep"===this.state.numberFormatSettings.thousands_sep&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},ce.prototype.getLocale=function(){return this.state.locale},ce.prototype.getLocaleSlug=function(){return this.state.localeSlug},ce.prototype.isRtl=function(){return"rtl"===this.state.textDirection},ce.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},ce.prototype.hasTranslation=function(){return!!ie(this,re(arguments))},ce.prototype.translate=function(){var e=re(arguments),t=ie(this,e);if(t||(t=oe(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=J.apply(void 0,R()(n))}catch(o){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[r](o):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=M()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},ce.prototype.reRenderTranslations=function(){X("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},ce.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},ce.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var se=ce,le=n(32),ae=n.n(le),ue=n(33),pe=n.n(ue),de=n(17),me=n.n(de),fe=n(34),ge=n.n(fe),be=n(35),he=n.n(be),ve=n(11),ye=n.n(ve),Oe=n(36);var je,Ce,we=new se,_e=we.numberFormat.bind(we),ke=(we.translate.bind(we),we.configure.bind(we),we.setLocale.bind(we),we.getLocale.bind(we),we.getLocaleSlug.bind(we),we.addTranslations.bind(we),we.reRenderTranslations.bind(we),we.registerComponentUpdateHook.bind(we),we.registerTranslateHook.bind(we),we.state,we.stateObserver,we.on.bind(we),we.off.bind(we),we.emit.bind(we),Ce={numberFormat:(je=we).numberFormat.bind(je),translate:je.translate.bind(je)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(we),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(Oe.useSubscription)(t)}var r=Object(F.createHigherOrderComponent)((function(e){return Object(ve.forwardRef)((function(t,r){var o=n();return ye.a.createElement(e,x()({},t,{isRtl:o,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(we));ke.useRtl,ke.withRtl;function xe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=y(t);if(!r||isNaN(e))return null;var o=p()({},r,{},n),i=o.decimal,c=o.grouping,s=o.precision,l=o.symbol,a=e<0?"-":"",u=_e(Math.abs(e),{decimals:s,thousandsSep:c,decPoint:i});return n.stripZeros&&(u=Ee(u,i)),"".concat(a).concat(l).concat(u)}function Ee(e,t){var n=new RegExp("\\".concat(t,"0+$"));return e.replace(n,"")}function Se(e){var t=e.className,n=e.tab,r=e.label,o=e.selectedTab,i=e.onSelected,c=(n.id===o.id?["is-pressed","is-active"]:[]).concat([t,"components-button","components-tab-button"]);return Object(h.createElement)("button",{type:"button",onClick:function(){return i(n)},className:c.join(" ")},r)}function Pe(e){var t=e.className,n=e.tabs,r=e.selectedTab,o=e.onSelected,i=e.selectBlock;return Object(h.createElement)("div",{className:"premium-content-tabs block-editor-block-toolbar"},n.map((function(n){return Object(h.createElement)(Se,x()({key:n.id},e,{tab:n,selectedTab:r,className:"".concat(t,"--tab"),label:n.label,onSelected:o}))})),Object(h.createElement)("button",{onClick:function(){Object(_.select)("core/edit-post").isEditorSidebarOpened()||Object(_.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block"),i()},className:"edit components-button is-button is-secondary"},Object(b.__)("Edit","full-site-editing")))}var Fe=n(2);function Be(){return Object(h.createElement)("div",{className:"premium-content-wrapper"},Object(h.createElement)(Fe.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]]}))}function Ne(e){var t=e.className,n=e.plan,r=e.selectedPlan,o=e.onSelected,i=e.onClose,c=e.getPlanDescription,s=r&&n.id===r.id,l=(s?["is-selected"]:[]).concat([t]).join(" "),a=s?"yes":void 0,u=null;return n&&(u=" "+c(n)),Object(h.createElement)(P.MenuItem,{onClick:function(e){e.preventDefault(),o(n),i()},className:l,key:n.id,value:n.id,selected:s,icon:a},n.title," : ",u)}function Re(e){var t=e.plans,n=e.selectedPlan,r=e.onSelected;return Object(h.createElement)(P.MenuGroup,null,t.map((function(t){return Object(h.createElement)(Ne,x()({},e,{key:t.id,selectedPlan:n,onSelected:r,plan:t}))})))}function Ae(e){return Object(h.createElement)(P.MenuGroup,null,Object(h.createElement)(P.MenuItem,{onClick:function(t){t.preventDefault(),Object(_.select)("core/edit-post").isEditorSidebarOpened()||Object(_.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block");var n=document.getElementById("new-plan-name");null!==n&&n.focus(),e.onClose()}},Object(b.__)("Add a new subscription","full-site-editing")))}function Le(e){var t=e.selectedPlanId,n=e.onSelected,r=e.plans,o=e.getPlanDescription,i=r.find((function(e){return e.id===t})),c=null;return i&&(c=" "+o(i)),Object(h.createElement)(Fe.BlockControls,null,Object(h.createElement)(P.Toolbar,null,Object(h.createElement)(P.DropdownMenu,{icon:Object(h.createElement)(h.Fragment,null,Object(h.createElement)(P.Dashicon,{icon:"update"})," ",c&&Object(h.createElement)(h.Fragment,null,c)),label:Object(b.__)("Select a plan","full-site-editing"),className:"premium-content-toolbar-button"},(function(t){var r=t.onClose;return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(Re,x()({},e,{onSelected:n,onClose:r,selectedPlan:i})),Object(h.createElement)(Ae,x()({},e,{onClose:r})))}))))}function Te(e){var t=Object(h.useState)(0),n=S()(t,2),r=n[0],o=n[1],i=e.attributes,c=e.setAttributes,s=e.className,l=e.savePlan,a=(e.currencies,e.siteSlug);return Object(h.createElement)(Fe.InspectorControls,null,a&&Object(h.createElement)(P.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(a),className:"wp-block-premium-content-container---link-to-earn"},Object(b.__)("Manage your subscriptions.","full-site-editing")),Object(h.createElement)(P.PanelBody,{title:"Add a new subscription",initialOpen:!0,className:"".concat(s,"---settings-add_plan")},1===r&&Object(h.createElement)(P.Placeholder,{icon:"lock",label:Object(b.__)("Premium Content","full-site-editing"),instructions:Object(b.__)("Saving plan…","full-site-editing")},Object(h.createElement)(P.Spinner,null)),0===r&&Object(h.createElement)("div",null,Object(h.createElement)(P.PanelRow,{className:"plan-name"},Object(h.createElement)(P.TextControl,{id:"new-plan-name",label:"Name",value:i.newPlanName,onChange:function(e){return c({newPlanName:e})}})),Object(h.createElement)(P.PanelRow,{className:"plan-price"},Object(h.createElement)(P.SelectControl,{label:"Currency",onChange:function(e){return c({newPlanCurrency:e})},value:i.newPlanCurrency,options:Ye}),Object(h.createElement)(P.TextControl,{label:"Price",value:i.newPlanPrice,onChange:function(e){return c({newPlanPrice:parseFloat(e)})},type:"number"})),Object(h.createElement)(P.PanelRow,{className:"plan-interval"},Object(h.createElement)(P.SelectControl,{label:"Interval",onChange:function(e){return c({newPlanInterval:e})},value:i.newPlanInterval,options:[{label:"Month",value:"1 month"},{label:"Year",value:"1 year"}]})),Object(h.createElement)(P.PanelRow,null,Object(h.createElement)(P.Button,{isSecondary:!0,isLarge:!0,onClick:function(t){t.preventDefault(),o(1),l(e.attributes,(function(e){o(0),e&&(c({newPlanPrice:5}),c({newPlanName:""}))}))}},Object(b.__)("Add subscription","full-site-editing"))))))}var Ie=Object(F.compose)([Object(_.withDispatch)((function(e,t){var n,r=t.stripeConnectUrl;return{autosaveAndRedirect:(n=a()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.stripeConnectUrl;return Object(h.createElement)(Fe.Warning,{actions:n&&[Object(h.createElement)(P.Button,{key:"connect",href:n,onClick:t,target:"_top",isDefault:!0,className:"premium-content-block-nudge__button stripe-nudge__button"},Object(b.__)("Connect","full-site-editing"))],className:"premium-content-block-nudge"},Object(h.createElement)("span",{className:"premium-content-block-nudge__info"},Object(h.createElement)(P.Dashicon,{icon:"star-filled"}),Object(h.createElement)("span",{className:"premium-content-block-nudge__text-container"},Object(h.createElement)("span",{className:"premium-content-block-nudge__title"},Object(b.__)("Connect to Stripe to use this block on your site","full-site-editing")),Object(h.createElement)("span",{className:"premium-content-block-nudge__message"},Object(b.__)("This block will be hidden from your visitors until you connect to Stripe.","full-site-editing")))))})),De={selectedTab:{id:"",className:"",label:Object(h.createElement)(h.Fragment,null)},stripeNudge:null},Me=Object(h.createContext)(De),$e=[{id:"premium",label:Object(h.createElement)("span",null,Object(b.__)("Subscriber View","full-site-editing")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:Object(h.createElement)("span",null,Object(b.__)("Non-subscriber View","full-site-editing")),className:"wp-premium-content-logged-out-view"}],Ue=[];function Ke(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)}var Ge=Object(F.compose)([Object(_.withSelect)((function(e,t){return{postId:(0,e("core/editor").getCurrentPostId)(),containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),P.withNotices,Object(_.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){var t=Object(h.useState)($e[1]),n=S()(t,2),r=n[0],o=n[1],i=Object(h.useState)(!1),c=S()(i,2),s=c[0],l=c[1],a=Object(h.useState)(Ue),u=S()(a,2),p=u[0],d=u[1],m=Object(h.useState)(null),g=S()(m,2),v=g[0],y=g[1],O=Object(h.useState)(0),j=S()(O,2),C=j[0],w=j[1],_=Object(h.useState)(!1),k=S()(_,2),E=k[0],F=k[1],N=Object(h.useState)(""),R=S()(N,2),A=R[0],L=R[1],T=Object(h.useState)(""),I=S()(T,2),D=I[0],M=I[1];function $(t,n){if(!t.newPlanName||0===t.newPlanName.length)return Ke(e,Object(b.__)("Plan requires a name","full-site-editing")),void n(!1);var r=parseFloat(t.newPlanPrice),o=Je(t.newPlanCurrency),i=Object(b.sprintf)(Object(b.__)("Minimum allowed price is %s.","full-site-editing"),xe(o,t.newPlanCurrency));if(r<o)return Ke(e,i),void n(!1);if(!qe(t.newPlanCurrency,r))return Ke(e,Object(b.__)("Plan requires a valid price","full-site-editing")),void n(!1);var c={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:t.newPlanCurrency,price:t.newPlanPrice,title:t.newPlanName,interval:t.newPlanInterval}};f()(c).then((function(t){var r={id:t.id,title:t.title,interval:t.interval,price:t.price,currency:t.currency};d(p.concat([r])),U(r),function(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createNotice({status:"info",content:t})}(e,Object(b.__)("Successfully created plan","full-site-editing")),n&&n(!0)}),(function(){Ke(e,Object(b.__)("There was an error when adding the plan.","full-site-editing")),n&&n(!1)}))}function U(t){e.setAttributes({selectedPlanId:t.id})}var K=Object(h.useRef)(null);!function(e,t){function n(n){e.current&&n.target&&n.target instanceof Node&&!e.current.contains(n.target)?t(!1):t(!0)}Object(h.useEffect)((function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}(K,l);var G=e.isSelected,H=e.className;if(Object(h.useEffect)((function(){var t={path:"/wpcom/v2/memberships/status",method:"GET"};f()(t).then((function(t){if(t||"object"==typeof t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return w(2),void Ke(e,Object.values(t.errors)[0][0]);y(t.connect_url),F(t.should_upgrade_to_access_memberships),L(t.upgrade_url),M(t.site_slug),t.products&&0===t.products.length&&!t.should_upgrade_to_access_memberships&&t.connected_account_id?$({newPlanCurrency:"USD",newPlanPrice:5,newPlanName:Object(b.__)("Monthly Subscription","full-site-editing"),newPlanInterval:"1 month"},(function(){w(t.connected_account_id?1:2)})):(t.products&&t.products.length>0&&(d(t.products),e.attributes.selectedPlanId||U(t.products[0])),w(t.connected_account_id?1:2))}}),(function(t){y(null),w(2),Ke(e,t.message)})),e.selectBlock()}),[]),0===C)return Object(h.createElement)("div",{className:H,ref:K},e.noticeUI,Object(h.createElement)(P.Placeholder,{icon:"lock",label:Object(b.__)("Premium Content","full-site-editing"),instructions:Object(b.__)("Loading data…","full-site-editing")},Object(h.createElement)(P.Spinner,null)));if(E)return Object(h.createElement)("div",{className:H,ref:K},e.noticeUI,Object(h.createElement)(P.Placeholder,{icon:"lock",label:Object(b.__)("Premium Content","full-site-editing"),instructions:Object(b.__)("You'll need to upgrade your plan to use the Premium Content block.","full-site-editing")},Object(h.createElement)(P.Button,{isSecondary:!0,isLarge:!0,href:A,target:"_blank",className:"premium-content-block-nudge__button plan-nudge__button"},Object(b.__)("Upgrade Your Plan","full-site-editing")),Object(h.createElement)("div",{className:"membership-button__disclaimer"},Object(h.createElement)(P.ExternalLink,{href:"https://wordpress.com/support/premium-content-block/"},Object(b.__)("Read more about Premium Content and related fees.","full-site-editing")))));var V=null;if(!E&&1!==C&&v){var W=function(e,t){var n,r=e.postId;if(!Object(B.isURL)(t))return null;if(!r)return t;try{var o=Object(B.getQueryArg)(t,"state");"string"==typeof o&&(n=JSON.parse(atob(o)))}catch(i){return t}return n.from_editor_post_id=r,Object(B.addQueryArgs)(t,{state:btoa(JSON.stringify(n))})}(e,v);V=Object(h.createElement)(Ie,x()({},e,{stripeConnectUrl:W}))}return Object(h.createElement)("div",{className:H,ref:K},e.noticeUI,(G||s)&&1===C&&Object(h.createElement)(Le,x()({},e,{plans:p,selectedPlanId:e.attributes.selectedPlanId,onSelected:U,getPlanDescription:function(e){var t=xe(parseFloat(e.price),e.currency);return"1 month"===e.interval?Object(b.sprintf)(Object(b.__)("%s / month","full-site-editing"),t):"1 year"===e.interval?Object(b.sprintf)(Object(b.__)("%s / year","full-site-editing"),t):"one-time"===e.interval?t:Object(b.sprintf)(Object(b.__)("%s / %s","full-site-editing"),t,e.interval)}})),(G||s)&&1===C&&Object(h.createElement)(Te,x()({},e,{savePlan:$,siteSlug:D})),(G||s)&&Object(h.createElement)(Pe,x()({},e,{tabs:$e,selectedTab:r,onSelected:o})),Object(h.createElement)(Me.Provider,{value:{selectedTab:r,stripeNudge:V}},Object(h.createElement)(Be,null)))}));var He="premium-content/container",Ve="common",We=function e(t){return 0===t.name.indexOf("premium-content/")||t.innerBlocks.some(e)},ze={name:He,attributes:{newPlanName:{type:"string",default:"Monthly Subscription"},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0}},title:Object(b.__)("Premium Content","full-site-editing"),description:Object(b.__)("Restrict access to your content for paying subscribers.","full-site-editing"),category:Ve,icon:Object(h.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(h.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(h.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(h.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),supports:{html:!1},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:function(e){if(!e.some(We)&&(t=e[0],!(0,(n=Object(_.select)("core/block-editor")).getBlocksByClientId)((0,n.getBlockParents)(t.clientId)).find((function(e){return 0===e.name.indexOf("premium-content/")})))){var t,n,r=e.map((function(e){return Object(g.createBlock)(e.name,e.attributes,e.innerBlocks)}));return Object(g.createBlock)("premium-content/container",{},[Object(g.createBlock)("premium-content/subscriber-view",{},r),Object(g.createBlock)("premium-content/logged-out-view")])}}}]},keywords:["premium-content",Object(b.__)("premium","full-site-editing"),Object(b.__)("paywall","full-site-editing")],edit:Ge,save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-container"},Object(h.createElement)(Fe.InnerBlocks.Content,null))},providesContext:{"premium-content/planId":"selectedPlanId"}},Ze={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5},Ye=Object.keys(Ze).map((function(e){var t=y(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(d.trimEnd)(t,"."))}}));function Je(e){return Ze[e]}function qe(e,t){return!isNaN(t)&&t>=Je(e)}var Xe=Object(F.compose)([Object(_.withSelect)((function(e,t){return{hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length,containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),Object(_.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){return Object(h.useEffect)((function(){e.selectBlock()}),[]),Object(h.createElement)(Me.Consumer,null,(function(t){var n=t.selectedTab,r=t.stripeNudge;return Object(h.createElement)("div",{hidden:"wall"===n.id,className:n.className},r,Object(h.createElement)(Fe.InnerBlocks,{renderAppender:!e.hasInnerBlocks&&Fe.InnerBlocks.ButtonBlockAppender,templateLock:!1,template:[["core/paragraph",{placeholder:Object(b.__)("Insert the piece of content you want your visitors to see after they subscribe.","full-site-editing")}]]}))}))}));var Qe="premium-content/subscriber-view",et="common",tt={name:Qe,category:et,attributes:{},title:Object(b.__)("Subscriber View","full-site-editing"),description:Object(b.__)("Subscriber View.","full-site-editing"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:Xe,save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-subscriber-view"},Object(h.createElement)(Fe.InnerBlocks.Content,null))}};var nt=Object(F.compose)([Object(_.withSelect)((function(e,t){return{containerClientId:(0,e("core/block-editor").getBlockHierarchyRootClientId)(t.clientId)}})),Object(_.withDispatch)((function(e,t){var n=e("core/block-editor").selectBlock;return{selectContainerBlock:function(){n(t.containerClientId)}}}))])((function(e){var t=e.selectContainerBlock;return Object(h.useEffect)((function(){setTimeout(t,0)}),[]),Object(h.createElement)(Me.Consumer,null,(function(e){var t=e.selectedTab,n=e.stripeNudge;return Object(h.createElement)("div",{hidden:"premium"===t.id,className:t.className},n,Object(h.createElement)(Fe.InnerBlocks,{templateLock:!1,template:[["core/heading",{content:Object(b.__)("Subscribe to get access","full-site-editing"),level:3}],["core/paragraph",{content:Object(b.__)("Read more of this content when you subscribe today.","full-site-editing")}],["premium-content/buttons"]]}))}))}));var rt=[{attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},isEligible:function(e){return!!e.buttonClasses},migrate:function(e,t){var n=Object(g.createBlock)("premium-content/buttons",{},[Object(g.createBlock)("jetpack/recurring-payments",{submitButtonText:e.subscribeButtonText,backgroundButtonColor:e.backgroundButtonColor,textButtonColor:e.textButtonColor,customBackgroundButtonColor:e.customBackgroundButtonColor,customTextButtonColor:e.customTextButtonColor}),Object(g.createBlock)("premium-content/login-button",{text:e.loginButtonText,backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,style:{color:{background:e.customBackgroundButtonColor,text:e.customTextButtonColor}}})]);return[e,[].concat(R()(t),[n])]},save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(h.createElement)(Fe.InnerBlocks.Content,null))}}],ot=n(21),it="premium-content/logged-out-view",ct="common",st={name:it,category:ct,attributes:{},title:Object(b.__)("Logged Out View","full-site-editing"),description:Object(b.__)("Logged Out View.","full-site-editing"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:nt,save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(h.createElement)(Fe.InnerBlocks.Content,null))},deprecated:rt},lt=Object(_.subscribe)((function(){var e=Object(_.select)("core/rich-text").getFormatType("core/link");if(e){lt(),Object(ot.unregisterFormatType)("core/link");var t=Object(F.compose)(Object(_.withSelect)((function(e){return{selectedBlock:e("core/block-editor").getSelectedBlock()}})),Object(F.ifCondition)((function(e){return e.selectedBlock&&e.selectedBlock.name!==it})))(e.edit);Object(ot.registerFormatType)("core/link",p()({},e,{edit:t}))}})),at=n(22),ut=Object(h.createElement)(at.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(h.createElement)(at.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"})),pt=n(37),dt=["core/button","jetpack/recurring-payments","premium-content/login-button"],mt={isEmbedButton:!0};var ft=Object(F.compose)([Object(_.withSelect)((function(e,t){return{subscribeButton:e("core/block-editor").getBlock(t.clientId).innerBlocks.find((function(e){return"jetpack/recurring-payments"===e.name}))}})),Object(_.withDispatch)((function(e,t){return{setSubscribeButtonPlan:function(n){e("core/block-editor").updateBlockAttributes(t.subscribeButton.clientId,{planId:n})}}}))])((function(e){var t=e.context,n=e.subscribeButton,r=e.setSubscribeButtonPlan,o=t["premium-content/planId"],i=[["jetpack/recurring-payments",{planId:o,submitButtonText:Object(b.__)("Subscribe","full-site-editing")}],["premium-content/login-button"]];return Object(h.useEffect)((function(){o&&n&&n.attributes.planId!==o&&r(o)}),[o,n]),Object(h.useEffect)((function(){n&&Object(pt.addFilter)("jetpack.RecurringPayments.showControls","full-site-editing/premium-content-hide-recurring-payments-controls",(function(e,t){return t!==n.clientId&&e}))}),[n]),Object(h.createElement)(Fe.__experimentalBlock.div,{className:"wp-block-buttons"},Object(h.createElement)(Fe.__experimentalAlignmentHookSettingsProvider,{value:mt},Object(h.createElement)(Fe.InnerBlocks,{allowedBlocks:dt,template:i,__experimentalMoverDirection:"horizontal"})))}));var gt="premium-content/buttons",bt="design",ht={name:gt,category:bt,title:Object(b.__)("Premium Content buttons","full-site-editing"),description:Object(b.__)("Prompt Premium Content visitors to take action with a group of button-style links.","full-site-editing"),icon:ut,supports:{align:!0,alignWide:!1,lightBlockWrapper:!0},keywords:[Object(b.__)("link","full-site-editing")],edit:ft,save:function(){return Object(h.createElement)("div",{className:"wp-block-buttons"},Object(h.createElement)(Fe.InnerBlocks.Content,null))},context:["premium-content/planId"]},vt=n(13),yt=n.n(vt),Ot="web"===h.Platform.OS;var jt=function e(t){if(!Object(d.isObject)(t))return t;var n=Object(d.pickBy)(Object(d.mapValues)(t,e),d.identity);return Object(d.isEqual)(n,{})?void 0:n};function Ct(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,i=window,c=i.getComputedStyle,s=i.Node,l=Object(h.useState)(),a=S()(l,2),u=a[0],p=a[1],d=Object(h.useState)(),m=S()(d,2),f=m[0],g=m[1],v=Ot?Object(b.__)("Color settings","full-site-editing"):Object(b.__)("Color Settings","full-site-editing");return Object(h.useEffect)((function(){if(!Ot||o){var e=function(e){return document.getElementById("block-"+e)}(n);if(e){g(c(e).color);for(var t=e,r=c(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===s.ELEMENT_NODE;)t=t.parentNode,r=c(t).backgroundColor;p(r)}}})),Object(h.createElement)(Fe.InspectorControls,null,Object(h.createElement)(Fe.__experimentalPanelColorGradientSettings,{title:v,initialOpen:!1,settings:t},Ot&&o&&Object(h.createElement)(Fe.ContrastChecker,{backgroundColor:u,textColor:f})))}var wt=function(e){var t,n,r,o=e.attributes,i=Object(_.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),c=i.colors,s=i.gradients,l=Object(h.useRef)(o);Object(h.useEffect)((function(){l.current=o}),[o]);var a,u,d=o.style,m=o.textColor,f=o.backgroundColor,g=o.gradient;a=g?Object(Fe.getGradientValueBySlug)(s,g):null==d||null===(u=d.color)||void 0===u?void 0:u.gradient;var v=function(t){return function(n){var r,o,i=Object(Fe.getColorObjectByColorValue)(c,n),s=t+"Color",a=p()({},l.current.style,{color:p()({},null===(r=l.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,L()({},t,(null==i?void 0:i.slug)?void 0:n))}),u=(null==i?void 0:i.slug)?i.slug:void 0,d=L()({style:jt(a)},s,u);e.setAttributes(d),l.current=p()({},l.current,{},d)}};return Object(h.createElement)(Ct,{enableContrastChecking:!g&&!(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient),clientId:e.clientId,settings:[{label:Object(b.__)("Text Color","full-site-editing"),onColorChange:v("text"),colorValue:Object(Fe.getColorObjectByAttributeValues)(c,m,null==d||null===(n=d.color)||void 0===n?void 0:n.text).color},{label:Object(b.__)("Background Color","full-site-editing"),onColorChange:v("background"),colorValue:Object(Fe.getColorObjectByAttributeValues)(c,f,null==d||null===(r=d.color)||void 0===r?void 0:r.background).color,gradientValue:a,onGradientChange:function(t){var n,r=Object(Fe.getGradientSlugByValue)(s,t);if(r){var o,i,c,a=p()({},null===(o=l.current)||void 0===o?void 0:o.style,{color:p()({},null===(i=l.current)||void 0===i||null===(c=i.style)||void 0===c?void 0:c.color,{gradient:void 0})});n={style:jt(a),gradient:r}}else{var u,d,m,f=p()({},null===(u=l.current)||void 0===u?void 0:u.style,{color:p()({},null===(d=l.current)||void 0===d||null===(m=d.style)||void 0===m?void 0:m.color,{gradient:t})});n={style:jt(f),gradient:void 0}}e.setAttributes(n),l.current=p()({},l.current,{},n)}}]})};function _t(e){var t,n,r,o,i,c,s,l,a,u,p,d=e.backgroundColor,m=e.textColor,f=e.gradient,g=e.style,b=Object(Fe.getColorClassName)("background-color",d),h=Object(Fe.__experimentalGetGradientClass)(f),v=Object(Fe.getColorClassName)("color",m),y=yt()(v,h,(i={},L()(i,b,!(null==g||null===(t=g.color)||void 0===t?void 0:t.gradient)&&!!b),L()(i,"has-text-color",m||(null==g||null===(n=g.color)||void 0===n?void 0:n.text)),L()(i,"has-background",d||(null==g||null===(r=g.color)||void 0===r?void 0:r.background)||f||(null==g||null===(o=g.color)||void 0===o?void 0:o.gradient)),i));return{className:y||void 0,style:(null==g||null===(c=g.color)||void 0===c?void 0:c.background)||(null==g||null===(s=g.color)||void 0===s?void 0:s.text)||(null==g||null===(l=g.color)||void 0===l?void 0:l.gradient)?{background:(null==g||null===(a=g.color)||void 0===a?void 0:a.gradient)?g.color.gradient:void 0,backgroundColor:(null==g||null===(u=g.color)||void 0===u?void 0:u.background)?g.color.background:void 0,color:(null==g||null===(p=g.color)||void 0===p?void 0:p.text)?g.color.text:void 0}:{}}}function kt(e){var t=e.borderRadius,n=void 0===t?"":t,r=e.setAttributes,o=Object(h.useCallback)((function(e){r({borderRadius:e})}),[r]);return Object(h.createElement)(P.PanelBody,{title:Object(b.__)("Border settings","full-site-editing")},Object(h.createElement)(P.RangeControl,{value:n,label:Object(b.__)("Border radius","full-site-editing"),min:0,max:50,initialPosition:5,allowReset:!0,onChange:o}))}var xt=function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.borderRadius,i=t.text,c=_t(t);return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(Fe.__experimentalBlock.div,{className:"wp-block-button"},Object(h.createElement)(Fe.RichText,{placeholder:Object(b.__)("Add text…","full-site-editing"),value:i,onChange:function(e){return n({text:e})},withoutInteractiveFormatting:!0,className:yt()(r,"wp-block-button__link",c.className,{"no-border-radius":0===o}),style:p()({borderRadius:o?o+"px":void 0},c.style)})),Object(h.createElement)(Fe.InspectorControls,null,Object(h.createElement)(wt,e),Object(h.createElement)(kt,{borderRadius:o,setAttributes:n})))};var Et="premium-content/login-button",St="design",Pt={name:Et,title:Object(b.__)("Premium Content login button","full-site-editing"),description:Object(b.__)("Prompt subscriber visitors to log in with a button-style link (only visible for logged out users).","full-site-editing"),attributes:{text:{type:"string",source:"html",selector:"a",default:Object(b.__)("Log in","full-site-editing")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},icon:ut,keywords:[Object(b.__)("link","full-site-editing")],supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0},edit:xt,save:function(e){var t=e.attributes,n=t.borderRadius,r=t.text,o=_t(t),i=yt()("wp-block-button__link",o.className,{"no-border-radius":0===n}),c=p()({borderRadius:n?n+"px":void 0},o.style);return Object(h.createElement)("div",{className:"wp-block-button"},Object(h.createElement)(Fe.RichText.Content,{tagName:"a",className:i,style:c,value:r}))}},Ft=function(e){if(e){var t=e.name,n=e.category,r=e.settings;Object(g.registerBlockType)(t,p()({category:n},r))}},Bt=function(e,t){var n=Object(g.getBlockType)(e);if(n){Object(g.unregisterBlockType)(e);var r=Object(d.mergeWith)({},n,t,(function(e,t){if(Array.isArray(e))return e.concat(t)}));Object(g.registerBlockType)(e,r)}},Nt=function(){var e=a()(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",f()({path:"/wpcom/v2/memberships/status"}));case 4:return e.prev=4,e.t0=e.catch(0),e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,null,[[0,4]])})));return function(){return e.apply(this,arguments)}}(),Rt=function(e){if(e.should_upgrade_to_access_memberships){var t=Object(b._x)("paid","Short label appearing near a block requiring a paid plan","full-site-editing");Bt(He,{title:"".concat(ze.title," (").concat(t,")")})}},At=function(e){!e.should_upgrade_to_access_memberships&&e.connected_account_id||(Bt(gt,{supports:{inserter:!1}}),Bt(Et,{supports:{inserter:!1}}))},Lt=function(){var e=a()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nt();case 2:t=e.sent,Rt(t),At(t);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Tt=function(){[r,i,o,c,s].forEach(Ft)};Tt(),Lt()}]));
premium-content/editor.css CHANGED
@@ -120,4 +120,9 @@
120
 
121
  .wp-block-buttons .wp-block[data-type='jetpack/recurring-payments'] {
122
  display: inline-block;
 
 
 
 
 
123
  }
120
 
121
  .wp-block-buttons .wp-block[data-type='jetpack/recurring-payments'] {
122
  display: inline-block;
123
+ margin: 0 8px 0 0;
124
+ }
125
+
126
+ .editor-styles-wrapper .wp-block-buttons .wp-block[data-type='jetpack/recurring-payments'] .wp-block-button:not( .alignleft ):not( .alignright ) {
127
+ margin: 0;
128
  }
premium-content/subscription-service/class-token-subscription-service.php CHANGED
@@ -167,8 +167,11 @@ abstract class Token_Subscription_Service implements Subscription_Service {
167
  * @var Token_Subscription $token_subscription
168
  */
169
  foreach ( $token_subscriptions as $product_id => $token_subscription ) {
170
- if ( in_array( $product_id, $product_ids, true ) && strtotime( $token_subscription->end_date ) > time() ) {
171
- return true;
 
 
 
172
  }
173
  }
174
  return false;
167
  * @var Token_Subscription $token_subscription
168
  */
169
  foreach ( $token_subscriptions as $product_id => $token_subscription ) {
170
+ if ( in_array( $product_id, $product_ids, true ) ) {
171
+ $end = is_int( $token_subscription->end_date ) ? $token_subscription->end_date : strtotime( $token_subscription->end_date );
172
+ if ( $end > time() ) {
173
+ return true;
174
+ }
175
  }
176
  }
177
  return false;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: alexislloyd, allancole, automattic, bartkalisz, codebykat, copons,
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.0
5
  Tested up to: 5.4
6
- Stable tag: 1.10
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -40,6 +40,17 @@ This plugin is experimental, so we don't provide any support for it outside of w
40
 
41
  == Changelog ==
42
 
 
 
 
 
 
 
 
 
 
 
 
43
  = 1.10 =
44
  * Improvements to the premium blocks.
45
  * Add 10 new block patterns.
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.0
5
  Tested up to: 5.4
6
+ Stable tag: 1.11
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
40
 
41
  == Changelog ==
42
 
43
+ = 1.11 =
44
+ * Fix broken blocks in page layout picker preview in Firefox.
45
+ * Add settings to the donation block.
46
+ * Fix premium content block to ensure it is auto-selected when mounted.
47
+ * Add fallback to donations block to set default products if none are already defined.
48
+ * Fix block pattern preview viewport scaling.
49
+ * Fix broken site editor page.
50
+ * Add one time payment option to payment plans.
51
+ * Add a general transform to premium content.
52
+ * Fix custom font size in block patterns previews.
53
+
54
  = 1.10 =
55
  * Improvements to the premium blocks.
56
  * Add 10 new block patterns.
starter-page-templates/dist/starter-page-templates.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => 'ca084a84a90b3c8b4b90de34aaa2afcb');
1
+ <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => '3311f8e9c3d38bc93e9031244e6df44b');
starter-page-templates/dist/starter-page-templates.js CHANGED
@@ -3,4 +3,4 @@
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 i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(3);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}e.exports=function(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){r(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}},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(29);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(30),i=n(31),o=n(32);e.exports=function(e){return function(){var t,n=r(e);if(i()){var a=r(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return o(this,t)}}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){var r=n(36),i=n(37),o=n(21),a=n(38);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)}))}}},function(e,t,n){var r=n(39),i=n(40),o=n(21),a=n(41);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},function(e,t,n){var r=n(22);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(n):"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){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.editPost}()},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){var r=n(42);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},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){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){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(33),i=n(4);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},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.nux}()},function(e,t,n){},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,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}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){var r=n(22);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){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}},function(e,t,n){"use strict";n.r(t);var r=n(23),i=n.n(r),o=n(0),a=n(2),s=n(15),c=n(6),l=n(24),u=n(9),p=n.n(u),m=n(10),d=n.n(m),f=n(11),b=n.n(f),g=n(4),O=n.n(g),v=n(12),h=n.n(v),y=n(13),j=n.n(y),_=n(3),w=n.n(_),T=n(1),k=n(8),P=n.n(k),E=(n(34),n(7)),S=n(5),x=n(14),B=n(16),I=(n(35),n(17)),C=n.n(I),N=n(18),A=n(25),D=function(e){var t=e.blocks,n=e.settings,r=e.hidePageTitle,i=e.recomputeBlockListKey;return Object(o.createElement)(N.BlockEditorProvider,{value:t,settings:n},Object(o.createElement)(S.Disabled,{key:i},!r&&Object(o.createElement)("div",{className:"block-iframe-preview__template-title edit-post-visual-editor__post-title-wrapper"},Object(o.createElement)(A.PostTitle,null)),Object(o.createElement)(N.BlockList,null)))},L=Object(E.compose)(E.withSafeTimeout,Object(c.withSelect)((function(e){var t=e("core/block-editor");return{settings:t?t.getSettings():{}}})))((function(e){var t=e.className,n=void 0===t?"block-iframe-preview":t,r=e.bodyClassName,i=void 0===r?"block-iframe-preview-body":r,s=e.viewportWidth,c=e.blocks,l=e.settings,u=e.setTimeout,p=void 0===u?T.noop:u,m=e.title,d=Object(o.useRef)(),f=Object(o.useRef)(),b=Object(o.useRef)(),g=Object(o.useState)({transform:"scale( 1 )"}),O=C()(g,2),v=O[0],h=O[1],y=Object(o.useMemo)((function(){return Object(T.castArray)(c)}),[c]),j=Object(o.useReducer)((function(e){return e+1}),0),_=C()(j,2),w=_[0],k=_[1];Object(o.useLayoutEffect)(k,[c]);var E=Object(o.useCallback)((function(){var e=Object(T.get)(d,["current","parentNode"]);if(e){var t=s||d.current.offsetWidth,n=e.offsetWidth/s,r=e.offsetHeight/n;h({width:t,height:r,transform:"scale( ".concat(n," )")})}}),[s]);return Object(o.useEffect)((function(){if(m){var e=Object(T.get)(b,["current","contentDocument","body"]);if(e){var t=e.querySelector(".editor-post-title .editor-post-title__input");t&&(t.value=m)}}}),[w]),Object(o.useEffect)((function(){p((function(){var e,t,n,r;e=window.document,t=b.current.contentDocument,n=["link","style"],r={head:document.createDocumentFragment(),body:document.createDocumentFragment()},Object(T.each)(Object.keys(r),(function(t){return Object(T.each)(Object(T.filter)(e[t].children,(function(e){var t=e.localName;return n.includes(t)})),(function(e){r[t].appendChild(e.cloneNode(!0))}))})),t.head.appendChild(r.head),t.body.appendChild(r.body),b.current.contentDocument.body.classList.add(i,"editor-styles-wrapper","block-editor__container"),E()}),0)}),[p,i,E]),Object(o.useEffect)((function(){var e=Object(T.get)(b,["current","contentDocument","body"]);e&&(e.scrollTop=0)}),[w]),Object(o.useEffect)((function(){var e=f&&f.current;e&&b.current.contentDocument.body.appendChild(e)}),[w]),Object(o.useEffect)((function(){var e=Object(T.debounce)(E,300);return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[E]),Object(o.useEffect)((function(){return window.jQuery&&window.jQuery(window.document).on("wp-collapse-menu",E),function(){window.jQuery&&window.jQuery(window.document).off("wp-collapse-menu",E)}}),[E]),Object(o.createElement)("div",{ref:d},Object(o.createElement)("iframe",{ref:b,title:Object(a.__)("Preview","full-site-editing"),className:P()("editor-styles-wrapper",n),style:v}),Object(o.createElement)("div",{ref:f,className:"block-editor"},Object(o.createElement)("div",{className:"edit-post-visual-editor"},Object(o.createElement)("div",{className:"editor-styles-wrapper"},Object(o.createElement)("div",{className:"editor-writing-flow"},Object(o.createElement)(D,{blocks:y,settings:l,hidePageTitle:!m,recomputeBlockListKey:w}))))))})),M=function(e){var t=e.id,n=e.value,r=e.onSelect,i=e.label,a=e.useDynamicPreview,s=void 0!==a&&a,c=e.staticPreviewImg,l=e.staticPreviewImgAlt,u=void 0===l?"":l,p=e.blocks,m=void 0===p?[]:p,d=e.isSelected;if(Object(T.isNil)(t)||Object(T.isNil)(i)||Object(T.isNil)(n))return null;if(s&&(Object(T.isNil)(m)||Object(T.isEmpty)(m)))return null;var f=s?Object(o.createElement)(S.Disabled,null,Object(o.createElement)(L,{blocks:m,viewportWidth:960})):Object(o.createElement)("img",{className:"template-selector-item__media",src:c,alt:u}),b="label-".concat(t,"-").concat(n);return Object(o.createElement)("button",{type:"button",className:P()("template-selector-item__label",{"is-selected":d}),value:n,onClick:function(){r(n)},"aria-labelledby":"".concat(t," ").concat(b)},Object(o.createElement)("span",{className:"template-selector-item__preview-wrap"},f))},F={Address:Object(a._x)("123 Main St","default address","full-site-editing"),Phone:Object(a._x)("555-555-5555","default phone number","full-site-editing"),CompanyName:Object(a._x)("Your Company Name","default company name","full-site-editing"),Vertical:Object(a._x)("Business","default vertical name","full-site-editing")},W={CompanyName:"title",Address:"address",Phone:"phone",Vertical:"vertical"},R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.replace(/{{(\w+)}}/g,(function(e,n){var r=F[n];return t[W[n]]||r||n})):""},G=Object(E.compose)(o.memo,E.withInstanceId)((function(e){var t=e.label,n=e.className,r=e.help,i=e.instanceId,a=e.templates,s=void 0===a?[]:a,c=e.blocksByTemplates,l=void 0===c?{}:c,u=e.useDynamicPreview,p=void 0!==u&&u,m=e.onTemplateSelect,d=void 0===m?T.noop:m,f=e.siteInformation,b=void 0===f?{}:f,g=e.selectedTemplate;if(Object(T.isEmpty)(s)||!Object(T.isArray)(s))return null;if(!0===p&&Object(T.isEmpty)(l))return null;var O="template-selector-control-".concat(i);return Object(o.createElement)(S.BaseControl,{label:t,id:O,help:r,className:P()(n,"template-selector-control")},Object(o.createElement)("ul",{className:"template-selector-control__options","data-testid":"template-selector-control-options"},Object(T.map)(s,(function(e){var t=e.slug,n=e.title,i=e.preview,a=e.previewAlt;return Object(o.createElement)("li",{key:"".concat(O,"-").concat(t),className:"template-selector-control__template"},Object(o.createElement)(M,{id:O,value:t,label:R(n,b),help:r,onSelect:d,staticPreviewImg:i,staticPreviewImgAlt:a,blocks:l.hasOwnProperty(t)?l[t]:[],useDynamicPreview:p,isSelected:t===g}))}))))})),q=function(e){var t=e.blocks,n=void 0===t?[]:t,r=e.viewportWidth,i=e.title,s=!n.length;return Object(o.createElement)("div",{className:"template-selector-preview ".concat(s?"not-selected":"")},s&&Object(o.createElement)("div",{className:"editor-styles-wrapper"},Object(o.createElement)("div",{className:"template-selector-preview__empty-state"},Object(a.__)("Select a layout to preview.","full-site-editing"))),Object(o.createElement)(L,{blocks:n,viewportWidth:r,title:i}))};window._tkq=window._tkq||[];var U=null,z=function(e,t){U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_dismiss",{blog_id:U.blogid,segment_id:e,vertical_id:t}])},V=function(e,t,n){U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_template_selected",{blog_id:U.blogid,segment_id:e,vertical_id:t,template:n}])},Q=n(19),H=n.n(Q),K=n(20),Y=n.n(K),$=n(26),J=n.n($),X=n(27),Z=function(e,t,n){var r=e[t=Object(X.removeQueryArgs)(t,"w","s")]||{url:t,usages:[]};return p()({},e,w()({},t,p()({},r,{usages:[].concat(Y()(r.usages),Y()(n))})))},ee=function e(t,n){switch(t.blocksByClientId[n.clientId]=n,n.name){case"core/cover":case"core/image":var r=n.attributes.url;r&&(t.assets=Z(t.assets,r,[{prop:"url",path:[n.clientId,"attributes","url"]},{prop:"id",path:[n.clientId,"attributes","id"]}]));case"core/media-text":var i=n.attributes.mediaUrl;i&&"image"===n.attributes.mediaType&&(t.assets=Z(t.assets,i,[{prop:"url",path:[n.clientId,"attributes","mediaUrl"]},{prop:"id",path:[n.clientId,"attributes","mediaId"]}]));case"core/gallery":Object(T.forEach)(n.attributes.images,(function(e,r){t.assets=Z(t.assets,e.url,[{prop:"url",path:[n.clientId,"attributes","images",r,"url"]},{prop:"url",path:[n.clientId,"attributes","images",r,"link"]},{prop:"id",path:[n.clientId,"attributes","images",r,"id"]},{prop:"id",path:[n.clientId,"attributes","ids",r]}])}))}return Object(T.isEmpty)(n.innerBlocks)?t:Object(T.reduce)(n.innerBlocks,e,t)},te=function(){var e=H()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,J()({method:"POST",path:"/fse/v1/sideload/image/batch",data:{resources:Object(T.map)(t)}}).then((function(e){return Object(T.reduce)(t,(function(t,n){var r=e.shift(),i=r.id,o=r.source_url;return p()({},t,w()({},n.url,{id:i,url:o}))}),{})}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ne=function(e,t){return Object(T.forEach)(e.assets,(function(n){var r=t[n.url];r&&Object(T.forEach)(n.usages,(function(t){Object(T.set)(e.blocksByClientId,t.path,r[t.prop])}))})),e.blocks},re=function(){var e=H()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Object(T.reduce)(t,ee,{assets:{},blocksByClientId:{},blocks:t}),!Object(T.isEmpty)(n.assets)){e.next=3;break}return e.abrupt("return",t);case 3:return e.abrupt("return",te(n.assets).then((function(e){return ne(n,e)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var ie=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T.identity;return t.map((function(t){return(t=n(Object(x.cloneBlock)(t))).innerBlocks&&t.innerBlocks.length&&(t.innerBlocks=e(t.innerBlocks,n)),t}))};var oe=function e(t){return!!t.find((function(t){return"core/missing"===t.name||!(!t.innerBlocks||!t.innerBlocks.length)&&e(t.innerBlocks)}))},ae=function(e){h()(n,e);var t=j()(n);function n(){var e;d()(this,n);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),w()(O()(e),"state",{isLoading:!1,previewedTemplate:null,error:null}),w()(O()(e),"getTitlesByTemplateSlugs",Object(T.memoize)((function(e){return Object(T.mapValues)(Object(T.keyBy)(e,"slug"),"title")}))),w()(O()(e),"getBlocksByTemplateSlugs",Object(T.memoize)((function(t){var n=Object(T.reduce)(t,(function(t,n){var r=n.slug,i=n.content;return t[r]=i?Object(x.parse)(R(i,e.props.siteInformation)):[],t}),{});return e.filterTemplatesWithMissingBlocks(n)}))),w()(O()(e),"getBlocksForPreview",Object(T.memoize)((function(t){var n=e.getBlocksByTemplateSlug(t);return ie(n,(function(e){return"jetpack/contact-form"===e.name&&void 0!==e.attributes.hasFormSettingsSet&&(e.attributes.hasFormSettingsSet=!0),e}))}))),w()(O()(e),"getBlocksForSelection",(function(t){var n=e.getBlocksByTemplateSlug(t);return ie(n,(function(e){return"core/button"===e.name&&void 0!==e.attributes.url&&(e.attributes.url="#"),e}))})),w()(O()(e),"setTemplate",(function(t){if(V(e.props.segment.id,e.props.vertical.id,t),e.props.saveTemplateChoice(t),"blank"===t)return e.props.insertTemplate("",[]),void e.props.setIsOpen(!1);var n=Object(T.find)(e.props.templates,{slug:t,category:"home"}),r=e.getBlocksForSelection(t),i=n?null:e.getTitleByTemplateSlug(t);r&&r.length?(e.setState({error:null,isLoading:!0}),e.maybePrefetchAssets(r).then((function(t){e.setState({isLoading:!1}),e.props.isOpen&&(e.props.insertTemplate(i,t),e.props.setIsOpen(!1))})).catch((function(t){e.setState({isLoading:!1,error:t})}))):e.props.setIsOpen(!1)})),w()(O()(e),"maybePrefetchAssets",(function(t){return e.props.shouldPrefetchAssets?re(t):Promise.resolve(t)})),w()(O()(e),"handleConfirmation",(function(t){"string"!=typeof t&&(t=e.state.previewedTemplate),e.setTemplate(t),e.props.isPromptedFromSidebar&&e.props.toggleTemplateModal()})),w()(O()(e),"previewTemplate",(function(t){e.setState({previewedTemplate:t}),window.matchMedia("(min-width: 660px)").matches||e.handleConfirmation(t)})),w()(O()(e),"closeModal",(function(t){if(t.target.matches("button.template-selector-item__label"))return!1;z(e.props.segment.id,e.props.vertical.id);var n=Object(T.get)(window,["calypsoifyGutenberg","closeUrl"]);window.top.location=n||"edit.php?post_type=page"})),w()(O()(e),"getTemplateGroups",(function(){return{blankTemplate:Object(T.filter)(e.props.templates,{slug:"blank"}),aboutTemplates:Object(T.filter)(e.props.templates,{category:"about"}),blogTemplates:Object(T.filter)(e.props.templates,{category:"blog"}),contactTemplates:Object(T.filter)(e.props.templates,{category:"contact"}),eventTemplates:Object(T.filter)(e.props.templates,{category:"event"}),menuTemplates:Object(T.filter)(e.props.templates,{category:"menu"}),portfolioTemplates:Object(T.filter)(e.props.templates,{category:"portfolio"}),productTemplates:Object(T.filter)(e.props.templates,{category:"product"}),servicesTemplates:Object(T.filter)(e.props.templates,{category:"services"}),teamTemplates:Object(T.filter)(e.props.templates,{category:"team"}),homepageTemplates:Object(T.sortBy)(Object(T.filter)(e.props.templates,{category:"home"}),"title")}})),w()(O()(e),"renderTemplatesList",(function(t,n){if(!t.length)return null;var r,i=e.getBlocksByTemplateSlugs(e.props.templates),s=Object.keys(i),c=(r=s,t.filter((function(e){return r.includes(e.slug)})));return c.length?Object(o.createElement)("fieldset",{className:"page-template-modal__list"},Object(o.createElement)("legend",{className:"page-template-modal__form-title"},n),Object(o.createElement)(G,{label:Object(a.__)("Layout","full-site-editing"),templates:c,blocksByTemplates:i,onTemplateSelect:e.previewTemplate,useDynamicPreview:!1,siteInformation:e.props.siteInformation,selectedTemplate:e.state.previewedTemplate})):null})),e}return b()(n,[{key:"filterTemplatesWithMissingBlocks",value:function(e){return Object(T.reduce)(e,(function(e,t,n){return oe(t)&&t.length||(e[n]=t),e}),{})}},{key:"componentDidMount",value:function(){this.props.isOpen&&this.trackCurrentView()}},{key:"componentDidUpdate",value:function(e){!e.isOpen&&this.props.isOpen&&this.trackCurrentView(),(this.props.isWelcomeGuideActive||this.props.areTipsEnabled)&&this.props.hideWelcomeGuide()}},{key:"trackCurrentView",value:function(){var e,t,n;e=this.props.segment.id,t=this.props.vertical.id,n=this.props.isPromptedFromSidebar?"sidebar":"add-page",U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_view",{blog_id:U.blogid,segment_id:e,vertical_id:t,source:n}])}},{key:"getBlocksByTemplateSlug",value:function(e){return Object(T.get)(this.getBlocksByTemplateSlugs(this.props.templates),[e],[])}},{key:"getTitleByTemplateSlug",value:function(e){return Object(T.get)(this.getTitlesByTemplateSlugs(this.props.templates),[e],"")}},{key:"render",value:function(){var e=this.state,t=e.previewedTemplate,n=e.isLoading,r=this.props,i=r.isPromptedFromSidebar,s=r.hidePageTitle;if(!r.isOpen)return null;var c=this.getTemplateGroups(),l=c.blankTemplate,u=c.aboutTemplates,p=c.blogTemplates,m=c.contactTemplates,d=c.eventTemplates,f=c.menuTemplates,b=c.portfolioTemplates,g=c.productTemplates,O=c.servicesTemplates,v=c.teamTemplates,h=c.homepageTemplates;return Object(o.createElement)(S.Modal,{title:Object(a.__)("Select Page Layout","full-site-editing"),className:"page-template-modal",overlayClassName:"page-template-modal-screen-overlay",shouldCloseOnClickOutside:!1,isDismissable:!1,isDismissible:!1},i?Object(o.createElement)(S.IconButton,{className:"page-template-modal__close-button components-icon-button",onClick:this.props.toggleTemplateModal,icon:"no-alt",label:Object(a.__)("Close Layout Selector","full-site-editing")}):Object(o.createElement)(S.IconButton,{className:"page-template-modal__close-button components-icon-button",onClick:this.closeModal,icon:"arrow-left-alt2",label:Object(a.__)("Go back","full-site-editing")}),Object(o.createElement)("div",{className:"page-template-modal__inner"},n?Object(o.createElement)("div",{className:"page-template-modal__loading"},Object(o.createElement)(S.Spinner,null),Object(a.__)("Adding layout…","full-site-editing")):Object(o.createElement)(o.Fragment,null,Object(o.createElement)("form",{className:"page-template-modal__form"},this.props.isFrontPage&&this.renderTemplatesList(h,Object(a.__)("Home Pages","full-site-editing")),this.renderTemplatesList(l,Object(a.__)("Blank","full-site-editing")),this.renderTemplatesList(u,Object(a.__)("About Pages","full-site-editing")),this.renderTemplatesList(p,Object(a.__)("Blog Pages","full-site-editing")),this.renderTemplatesList(m,Object(a.__)("Contact Pages","full-site-editing")),this.renderTemplatesList(d,Object(a.__)("Event Pages","full-site-editing")),this.renderTemplatesList(f,Object(a.__)("Menu Pages","full-site-editing")),this.renderTemplatesList(b,Object(a.__)("Portfolio Pages","full-site-editing")),this.renderTemplatesList(g,Object(a.__)("Product Pages","full-site-editing")),this.renderTemplatesList(O,Object(a.__)("Services Pages","full-site-editing")),this.renderTemplatesList(v,Object(a.__)("Team Pages","full-site-editing")),!this.props.isFrontPage&&this.renderTemplatesList(h,Object(a.__)("Home Pages","full-site-editing"))),Object(o.createElement)(q,{blocks:this.getBlocksForPreview(t),viewportWidth:1200,title:!s&&this.getTitleByTemplateSlug(t)}))),Object(o.createElement)("div",{className:P()("page-template-modal__buttons",{"is-visually-hidden":Object(T.isEmpty)(t)||n})},Object(o.createElement)(S.Button,{isPrimary:!0,isLarge:!0,disabled:Object(T.isEmpty)(t)||n,onClick:this.handleConfirmation},Object(a.sprintf)(Object(a.__)("Use %s layout","full-site-editing"),this.getTitleByTemplateSlug(t)))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.previewedTemplate||Object(T.isEmpty)(e.templates)?null:{previewedTemplate:n.getDefaultSelectedTemplate(e)}}}]),n}(o.Component);w()(ae,"getDefaultSelectedTemplate",(function(e){var t=Object(T.get)(e.templates,[0,"slug"]),n=e._starter_page_template;if(!e.isFrontPage&&!n)return t;"home"===n&&(n=e.theme);var r=n||e.theme;return Object(T.find)(e.templates,{slug:r})?r:Object(T.find)(e.templates,{slug:"maywood"})?"maywood":t}));var se=Object(E.compose)(Object(c.withSelect)((function(e){var t=function(){return e("core/editor").getEditedPostAttribute("meta")},n=t()._starter_page_template;return{isOpen:e("automattic/starter-page-layouts").isOpen(),getMeta:t,_starter_page_template:n,postContentBlock:e("core/editor").getBlocks().find((function(e){return"a8c/post-content"===e.name})),isWelcomeGuideActive:e("core/edit-post").isFeatureActive("welcomeGuide"),areTipsEnabled:!!e("core/nux")&&e("core/nux").areTipsEnabled()}})),Object(c.withDispatch)((function(e,t){var n=e("core/editor");return{setIsOpen:e("automattic/starter-page-layouts").setIsOpen,saveTemplateChoice:function(e){var r=t.getMeta();n.editPost({meta:p()({},r,{_starter_page_template:e})})},insertTemplate:function(r,i){Object(B.addFilter)("isInsertingPageTemplate","automattic/full-site-editing/inserting-template",T.stubTrue),r&&n.editPost({title:r});var o=t.postContentBlock;e("core/block-editor").replaceInnerBlocks(o?o.clientId:"",i,!1),Object(B.removeFilter)("isInsertingPageTemplate","automattic/full-site-editing/inserting-template")},hideWelcomeGuide:function(){t.isWelcomeGuideActive?e("core/edit-post").toggleFeature("welcomeGuide"):t.areTipsEnabled&&e("core/nux").disableTips()}}})))(ae),ce=function(e){h()(n,e);var t=j()(n);function n(){var e;d()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),w()(O()(e),"state",{isWarningOpen:!1}),w()(O()(e),"toggleTemplateModal",(function(){e.props.setIsOpen(!e.props.isOpen)})),w()(O()(e),"toggleWarningModal",(function(){e.setState({isWarningOpen:!e.state.isWarningOpen})})),e}return b()(n,[{key:"render",value:function(){var e=this.props,t=e.templates,n=e.theme,r=e.vertical,i=e.segment,s=e.hidePageTitle,c=e.isFrontPage,l=e.isOpen;return Object(o.createElement)("div",{className:"sidebar-modal-opener"},Object(o.createElement)(S.Button,{isSecondary:!0,onClick:this.toggleWarningModal},Object(a.__)("Change Layout","full-site-editing")),l&&Object(o.createElement)(se,{shouldPrefetchAssets:!1,templates:t,theme:n,vertical:r,segment:i,toggleTemplateModal:this.toggleTemplateModal,hidePageTitle:s,isFrontPage:c,isPromptedFromSidebar:!0}),this.state.isWarningOpen&&Object(o.createElement)(S.Modal,{title:Object(a.__)("Overwrite Page Content?","full-site-editing"),isDismissible:!1,onRequestClose:this.toggleWarningModal,className:"sidebar-modal-opener__warning-modal"},Object(o.createElement)("div",{className:"sidebar-modal-opener__warning-text"},Object(a.__)("Changing the page's layout will remove any customizations or edits you have already made.","full-site-editing")),Object(o.createElement)("div",{className:"sidebar-modal-opener__warning-options"},Object(o.createElement)(S.Button,{isDefault:!0,onClick:this.toggleWarningModal},Object(a.__)("Cancel","full-site-editing")),Object(o.createElement)(S.Button,{isPrimary:!0,onClick:this.toggleTemplateModal},Object(a.__)("Change Layout","full-site-editing")))))}}]),n}(o.Component),le=Object(E.compose)(Object(c.withSelect)((function(e){return{isOpen:e("automattic/starter-page-layouts").isOpen()}})),Object(c.withDispatch)((function(e){return{setIsOpen:e("automattic/starter-page-layouts").setIsOpen}})))(ce),ue=n(28),pe=n.n(ue);Object(c.registerStore)("automattic/starter-page-layouts",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isOpen:!1},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=pe()(t,["type"]);return"SET_IS_OPEN"===n?p()({},e,{isOpen:r.isOpen}):e},actions:{setIsOpen:function(e){return{type:"SET_IS_OPEN",isOpen:e}}},selectors:{isOpen:function(e){return e.isOpen}}});var me,de=window.starterPageTemplatesConfig,fe=de.templates,be=void 0===fe?[]:fe,ge=de.vertical,Oe=de.segment,ve=de.tracksUserData,he=de.screenAction,ye=de.theme,je=de.isFrontPage,_e=de.hideFrontPageTitle;ve&&(U=me=ve,window._tkq.push(["identifyUser",me.userid,me.username]));var we={segment:Oe,templates:be,theme:ye,vertical:ge,isFrontPage:je,hidePageTitle:Boolean(je&&_e)};"add"===he&&(Object(c.dispatch)("automattic/starter-page-layouts").setIsOpen(!0),Object(s.registerPlugin)("page-templates",{render:function(){return Object(o.createElement)(se,i()({},we,{shouldPrefetchAssets:!1}))}})),Object(s.registerPlugin)("page-templates-sidebar",{render:function(){return Object(o.createElement)(l.PluginDocumentSettingPanel,{name:"Template Modal Opener",title:Object(a.__)("Page Layout","full-site-editing"),className:"page-template-modal__sidebar",icon:"none"},Object(o.createElement)(le,we))}});var Te=Object(c.subscribe)((function(){Object(c.select)("core/edit-post").isEditorPanelOpened("page-templates-sidebar/Template Modal Opener")||Object(c.dispatch)("core/edit-post").toggleEditorPanelOpened("page-templates-sidebar/Template Modal Opener"),Te()}))}]));
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 i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(3);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}e.exports=function(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){r(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}},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(29);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(30),i=n(31),o=n(32);e.exports=function(e){return function(){var t,n=r(e);if(i()){var a=r(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return o(this,t)}}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){var r=n(36),i=n(37),o=n(21),a=n(38);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)}))}}},function(e,t,n){var r=n(39),i=n(40),o=n(21),a=n(41);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},function(e,t,n){var r=n(22);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(n):"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){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.editPost}()},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){var r=n(42);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},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){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){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(33),i=n(4);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},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.nux}()},function(e,t,n){},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,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}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){var r=n(22);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){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}},function(e,t,n){"use strict";n.r(t);var r=n(23),i=n.n(r),o=n(0),a=n(2),s=n(15),c=n(6),l=n(24),u=n(9),p=n.n(u),m=n(10),d=n.n(m),f=n(11),b=n.n(f),g=n(4),O=n.n(g),v=n(12),h=n.n(v),y=n(13),j=n.n(y),_=n(3),w=n.n(_),T=n(1),k=n(8),P=n.n(k),E=(n(34),n(7)),S=n(5),x=n(14),B=n(16),I=(n(35),n(17)),C=n.n(I),N=n(18),A=n(25),D=function(e){var t=e.blocks,n=e.settings,r=e.hidePageTitle,i=e.recomputeBlockListKey;return Object(o.createElement)(N.BlockEditorProvider,{value:t,settings:n},Object(o.createElement)(S.Disabled,{key:i},!r&&Object(o.createElement)("div",{className:"block-iframe-preview__template-title edit-post-visual-editor__post-title-wrapper"},Object(o.createElement)(A.PostTitle,null)),Object(o.createElement)(N.BlockList,null)))},L=Object(E.compose)(E.withSafeTimeout,Object(c.withSelect)((function(e){var t=e("core/block-editor");return{settings:t?t.getSettings():{}}})))((function(e){var t,n,r=e.className,i=void 0===r?"block-iframe-preview":r,s=e.bodyClassName,c=void 0===s?"block-iframe-preview-body":s,l=e.viewportWidth,u=e.blocks,p=e.settings,m=e.setTimeout,d=void 0===m?T.noop:m,f=e.title,b=Object(o.useRef)(),g=Object(o.useRef)(),O=Object(o.useState)({transform:"scale( 1 )"}),v=C()(O,2),h=v[0],y=v[1],j=Object(o.useMemo)((function(){return Object(T.castArray)(u)}),[u]),_=Object(o.useReducer)((function(e){return e+1}),0),w=C()(_,2),k=w[0],E=w[1];Object(o.useLayoutEffect)(E,[u]);var S=Object(o.useCallback)((function(){var e=Object(T.get)(b,["current","parentNode"]);if(e){var t=l||b.current.offsetWidth,n=e.offsetWidth/l,r=e.offsetHeight/n;y({width:t,height:r,transform:"scale( ".concat(n," )")})}}),[l]);return Object(o.useEffect)((function(){if(f){var e=Object(T.get)(g,["current","contentDocument","body"]);if(e){var t=e.querySelector(".editor-post-title .editor-post-title__input");t&&(t.value=f)}}}),[k]),Object(o.useEffect)((function(){d((function(){var e,t,n,r;e=window.document,t=g.current.contentDocument,n=["link","style"],r={head:document.createDocumentFragment(),body:document.createDocumentFragment()},Object(T.each)(Object.keys(r),(function(t){return Object(T.each)(Object(T.filter)(e[t].children,(function(e){var t=e.localName;return n.includes(t)})),(function(e){r[t].appendChild(e.cloneNode(!0))}))})),t.head.appendChild(r.head),t.body.appendChild(r.body),g.current.contentDocument.body.classList.add(c,"editor-styles-wrapper","block-editor__container"),S()}),0)}),[d,c,S]),Object(o.useEffect)((function(){var e=Object(T.get)(g,["current","contentDocument","body"]);e&&(e.scrollTop=0)}),[k]),Object(o.useEffect)((function(){var e=Object(T.debounce)(S,300);return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[S]),Object(o.useEffect)((function(){return window.jQuery&&window.jQuery(window.document).on("wp-collapse-menu",S),function(){window.jQuery&&window.jQuery(window.document).off("wp-collapse-menu",S)}}),[S]),Object(o.createElement)("div",{ref:b},Object(o.createElement)("iframe",{ref:g,title:Object(a.__)("Preview","full-site-editing"),className:P()("editor-styles-wrapper",i),style:h},(null===(t=g.current)||void 0===t||null===(n=t.contentDocument)||void 0===n?void 0:n.body)&&Object(o.createPortal)(Object(o.createElement)("div",{className:"block-editor"},Object(o.createElement)("div",{className:"edit-post-visual-editor"},Object(o.createElement)("div",{className:"editor-styles-wrapper"},Object(o.createElement)("div",{className:"editor-writing-flow"},Object(o.createElement)(D,{blocks:j,settings:p,hidePageTitle:!f,recomputeBlockListKey:k}))))),g.current.contentDocument.body)))})),M=function(e){var t=e.id,n=e.value,r=e.onSelect,i=e.label,a=e.useDynamicPreview,s=void 0!==a&&a,c=e.staticPreviewImg,l=e.staticPreviewImgAlt,u=void 0===l?"":l,p=e.blocks,m=void 0===p?[]:p,d=e.isSelected;if(Object(T.isNil)(t)||Object(T.isNil)(i)||Object(T.isNil)(n))return null;if(s&&(Object(T.isNil)(m)||Object(T.isEmpty)(m)))return null;var f=s?Object(o.createElement)(S.Disabled,null,Object(o.createElement)(L,{blocks:m,viewportWidth:960})):Object(o.createElement)("img",{className:"template-selector-item__media",src:c,alt:u}),b="label-".concat(t,"-").concat(n);return Object(o.createElement)("button",{type:"button",className:P()("template-selector-item__label",{"is-selected":d}),value:n,onClick:function(){r(n)},"aria-labelledby":"".concat(t," ").concat(b)},Object(o.createElement)("span",{className:"template-selector-item__preview-wrap"},f))},F={Address:Object(a._x)("123 Main St","default address","full-site-editing"),Phone:Object(a._x)("555-555-5555","default phone number","full-site-editing"),CompanyName:Object(a._x)("Your Company Name","default company name","full-site-editing"),Vertical:Object(a._x)("Business","default vertical name","full-site-editing")},W={CompanyName:"title",Address:"address",Phone:"phone",Vertical:"vertical"},R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.replace(/{{(\w+)}}/g,(function(e,n){var r=F[n];return t[W[n]]||r||n})):""},G=Object(E.compose)(o.memo,E.withInstanceId)((function(e){var t=e.label,n=e.className,r=e.help,i=e.instanceId,a=e.templates,s=void 0===a?[]:a,c=e.blocksByTemplates,l=void 0===c?{}:c,u=e.useDynamicPreview,p=void 0!==u&&u,m=e.onTemplateSelect,d=void 0===m?T.noop:m,f=e.siteInformation,b=void 0===f?{}:f,g=e.selectedTemplate;if(Object(T.isEmpty)(s)||!Object(T.isArray)(s))return null;if(!0===p&&Object(T.isEmpty)(l))return null;var O="template-selector-control-".concat(i);return Object(o.createElement)(S.BaseControl,{label:t,id:O,help:r,className:P()(n,"template-selector-control")},Object(o.createElement)("ul",{className:"template-selector-control__options","data-testid":"template-selector-control-options"},Object(T.map)(s,(function(e){var t=e.slug,n=e.title,i=e.preview,a=e.previewAlt;return Object(o.createElement)("li",{key:"".concat(O,"-").concat(t),className:"template-selector-control__template"},Object(o.createElement)(M,{id:O,value:t,label:R(n,b),help:r,onSelect:d,staticPreviewImg:i,staticPreviewImgAlt:a,blocks:l.hasOwnProperty(t)?l[t]:[],useDynamicPreview:p,isSelected:t===g}))}))))})),q=function(e){var t=e.blocks,n=void 0===t?[]:t,r=e.viewportWidth,i=e.title,s=!n.length;return Object(o.createElement)("div",{className:"template-selector-preview ".concat(s?"not-selected":"")},s&&Object(o.createElement)("div",{className:"editor-styles-wrapper"},Object(o.createElement)("div",{className:"template-selector-preview__empty-state"},Object(a.__)("Select a layout to preview.","full-site-editing"))),Object(o.createElement)(L,{blocks:n,viewportWidth:r,title:i}))};window._tkq=window._tkq||[];var U=null,z=function(e,t){U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_dismiss",{blog_id:U.blogid,segment_id:e,vertical_id:t}])},V=function(e,t,n){U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_template_selected",{blog_id:U.blogid,segment_id:e,vertical_id:t,template:n}])},Q=n(19),H=n.n(Q),K=n(20),Y=n.n(K),$=n(26),J=n.n($),X=n(27),Z=function(e,t,n){var r=e[t=Object(X.removeQueryArgs)(t,"w","s")]||{url:t,usages:[]};return p()({},e,w()({},t,p()({},r,{usages:[].concat(Y()(r.usages),Y()(n))})))},ee=function e(t,n){switch(t.blocksByClientId[n.clientId]=n,n.name){case"core/cover":case"core/image":var r=n.attributes.url;r&&(t.assets=Z(t.assets,r,[{prop:"url",path:[n.clientId,"attributes","url"]},{prop:"id",path:[n.clientId,"attributes","id"]}]));case"core/media-text":var i=n.attributes.mediaUrl;i&&"image"===n.attributes.mediaType&&(t.assets=Z(t.assets,i,[{prop:"url",path:[n.clientId,"attributes","mediaUrl"]},{prop:"id",path:[n.clientId,"attributes","mediaId"]}]));case"core/gallery":Object(T.forEach)(n.attributes.images,(function(e,r){t.assets=Z(t.assets,e.url,[{prop:"url",path:[n.clientId,"attributes","images",r,"url"]},{prop:"url",path:[n.clientId,"attributes","images",r,"link"]},{prop:"id",path:[n.clientId,"attributes","images",r,"id"]},{prop:"id",path:[n.clientId,"attributes","ids",r]}])}))}return Object(T.isEmpty)(n.innerBlocks)?t:Object(T.reduce)(n.innerBlocks,e,t)},te=function(){var e=H()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,J()({method:"POST",path:"/fse/v1/sideload/image/batch",data:{resources:Object(T.map)(t)}}).then((function(e){return Object(T.reduce)(t,(function(t,n){var r=e.shift(),i=r.id,o=r.source_url;return p()({},t,w()({},n.url,{id:i,url:o}))}),{})}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ne=function(e,t){return Object(T.forEach)(e.assets,(function(n){var r=t[n.url];r&&Object(T.forEach)(n.usages,(function(t){Object(T.set)(e.blocksByClientId,t.path,r[t.prop])}))})),e.blocks},re=function(){var e=H()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Object(T.reduce)(t,ee,{assets:{},blocksByClientId:{},blocks:t}),!Object(T.isEmpty)(n.assets)){e.next=3;break}return e.abrupt("return",t);case 3:return e.abrupt("return",te(n.assets).then((function(e){return ne(n,e)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var ie=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T.identity;return t.map((function(t){return(t=n(Object(x.cloneBlock)(t))).innerBlocks&&t.innerBlocks.length&&(t.innerBlocks=e(t.innerBlocks,n)),t}))};var oe=function e(t){return!!t.find((function(t){return"core/missing"===t.name||!(!t.innerBlocks||!t.innerBlocks.length)&&e(t.innerBlocks)}))},ae=function(e){h()(n,e);var t=j()(n);function n(){var e;d()(this,n);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),w()(O()(e),"state",{isLoading:!1,previewedTemplate:null,error:null}),w()(O()(e),"getTitlesByTemplateSlugs",Object(T.memoize)((function(e){return Object(T.mapValues)(Object(T.keyBy)(e,"slug"),"title")}))),w()(O()(e),"getBlocksByTemplateSlugs",Object(T.memoize)((function(t){var n=Object(T.reduce)(t,(function(t,n){var r=n.slug,i=n.content;return t[r]=i?Object(x.parse)(R(i,e.props.siteInformation)):[],t}),{});return e.filterTemplatesWithMissingBlocks(n)}))),w()(O()(e),"getBlocksForPreview",Object(T.memoize)((function(t){var n=e.getBlocksByTemplateSlug(t);return ie(n,(function(e){return"jetpack/contact-form"===e.name&&void 0!==e.attributes.hasFormSettingsSet&&(e.attributes.hasFormSettingsSet=!0),e}))}))),w()(O()(e),"getBlocksForSelection",(function(t){var n=e.getBlocksByTemplateSlug(t);return ie(n,(function(e){return"core/button"===e.name&&void 0!==e.attributes.url&&(e.attributes.url="#"),e}))})),w()(O()(e),"setTemplate",(function(t){if(V(e.props.segment.id,e.props.vertical.id,t),e.props.saveTemplateChoice(t),"blank"===t)return e.props.insertTemplate("",[]),void e.props.setIsOpen(!1);var n=Object(T.find)(e.props.templates,{slug:t,category:"home"}),r=e.getBlocksForSelection(t),i=n?null:e.getTitleByTemplateSlug(t);r&&r.length?(e.setState({error:null,isLoading:!0}),e.maybePrefetchAssets(r).then((function(t){e.setState({isLoading:!1}),e.props.isOpen&&(e.props.insertTemplate(i,t),e.props.setIsOpen(!1))})).catch((function(t){e.setState({isLoading:!1,error:t})}))):e.props.setIsOpen(!1)})),w()(O()(e),"maybePrefetchAssets",(function(t){return e.props.shouldPrefetchAssets?re(t):Promise.resolve(t)})),w()(O()(e),"handleConfirmation",(function(t){"string"!=typeof t&&(t=e.state.previewedTemplate),e.setTemplate(t),e.props.isPromptedFromSidebar&&e.props.toggleTemplateModal()})),w()(O()(e),"previewTemplate",(function(t){e.setState({previewedTemplate:t}),window.matchMedia("(min-width: 660px)").matches||e.handleConfirmation(t)})),w()(O()(e),"closeModal",(function(t){if(t.target.matches("button.template-selector-item__label"))return!1;z(e.props.segment.id,e.props.vertical.id);var n=Object(T.get)(window,["calypsoifyGutenberg","closeUrl"]);window.top.location=n||"edit.php?post_type=page"})),w()(O()(e),"getTemplateGroups",(function(){return{blankTemplate:Object(T.filter)(e.props.templates,{slug:"blank"}),aboutTemplates:Object(T.filter)(e.props.templates,{category:"about"}),blogTemplates:Object(T.filter)(e.props.templates,{category:"blog"}),contactTemplates:Object(T.filter)(e.props.templates,{category:"contact"}),eventTemplates:Object(T.filter)(e.props.templates,{category:"event"}),menuTemplates:Object(T.filter)(e.props.templates,{category:"menu"}),portfolioTemplates:Object(T.filter)(e.props.templates,{category:"portfolio"}),productTemplates:Object(T.filter)(e.props.templates,{category:"product"}),servicesTemplates:Object(T.filter)(e.props.templates,{category:"services"}),teamTemplates:Object(T.filter)(e.props.templates,{category:"team"}),homepageTemplates:Object(T.sortBy)(Object(T.filter)(e.props.templates,{category:"home"}),"title")}})),w()(O()(e),"renderTemplatesList",(function(t,n){if(!t.length)return null;var r,i=e.getBlocksByTemplateSlugs(e.props.templates),s=Object.keys(i),c=(r=s,t.filter((function(e){return r.includes(e.slug)})));return c.length?Object(o.createElement)("fieldset",{className:"page-template-modal__list"},Object(o.createElement)("legend",{className:"page-template-modal__form-title"},n),Object(o.createElement)(G,{label:Object(a.__)("Layout","full-site-editing"),templates:c,blocksByTemplates:i,onTemplateSelect:e.previewTemplate,useDynamicPreview:!1,siteInformation:e.props.siteInformation,selectedTemplate:e.state.previewedTemplate})):null})),e}return b()(n,[{key:"filterTemplatesWithMissingBlocks",value:function(e){return Object(T.reduce)(e,(function(e,t,n){return oe(t)&&t.length||(e[n]=t),e}),{})}},{key:"componentDidMount",value:function(){this.props.isOpen&&this.trackCurrentView()}},{key:"componentDidUpdate",value:function(e){!e.isOpen&&this.props.isOpen&&this.trackCurrentView(),(this.props.isWelcomeGuideActive||this.props.areTipsEnabled)&&this.props.hideWelcomeGuide()}},{key:"trackCurrentView",value:function(){var e,t,n;e=this.props.segment.id,t=this.props.vertical.id,n=this.props.isPromptedFromSidebar?"sidebar":"add-page",U&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_view",{blog_id:U.blogid,segment_id:e,vertical_id:t,source:n}])}},{key:"getBlocksByTemplateSlug",value:function(e){return Object(T.get)(this.getBlocksByTemplateSlugs(this.props.templates),[e],[])}},{key:"getTitleByTemplateSlug",value:function(e){return Object(T.get)(this.getTitlesByTemplateSlugs(this.props.templates),[e],"")}},{key:"render",value:function(){var e=this.state,t=e.previewedTemplate,n=e.isLoading,r=this.props,i=r.isPromptedFromSidebar,s=r.hidePageTitle;if(!r.isOpen)return null;var c=this.getTemplateGroups(),l=c.blankTemplate,u=c.aboutTemplates,p=c.blogTemplates,m=c.contactTemplates,d=c.eventTemplates,f=c.menuTemplates,b=c.portfolioTemplates,g=c.productTemplates,O=c.servicesTemplates,v=c.teamTemplates,h=c.homepageTemplates;return Object(o.createElement)(S.Modal,{title:Object(a.__)("Select Page Layout","full-site-editing"),className:"page-template-modal",overlayClassName:"page-template-modal-screen-overlay",shouldCloseOnClickOutside:!1,isDismissable:!1,isDismissible:!1},i?Object(o.createElement)(S.IconButton,{className:"page-template-modal__close-button components-icon-button",onClick:this.props.toggleTemplateModal,icon:"no-alt",label:Object(a.__)("Close Layout Selector","full-site-editing")}):Object(o.createElement)(S.IconButton,{className:"page-template-modal__close-button components-icon-button",onClick:this.closeModal,icon:"arrow-left-alt2",label:Object(a.__)("Go back","full-site-editing")}),Object(o.createElement)("div",{className:"page-template-modal__inner"},n?Object(o.createElement)("div",{className:"page-template-modal__loading"},Object(o.createElement)(S.Spinner,null),Object(a.__)("Adding layout…","full-site-editing")):Object(o.createElement)(o.Fragment,null,Object(o.createElement)("form",{className:"page-template-modal__form"},this.props.isFrontPage&&this.renderTemplatesList(h,Object(a.__)("Home Pages","full-site-editing")),this.renderTemplatesList(l,Object(a.__)("Blank","full-site-editing")),this.renderTemplatesList(u,Object(a.__)("About Pages","full-site-editing")),this.renderTemplatesList(p,Object(a.__)("Blog Pages","full-site-editing")),this.renderTemplatesList(m,Object(a.__)("Contact Pages","full-site-editing")),this.renderTemplatesList(d,Object(a.__)("Event Pages","full-site-editing")),this.renderTemplatesList(f,Object(a.__)("Menu Pages","full-site-editing")),this.renderTemplatesList(b,Object(a.__)("Portfolio Pages","full-site-editing")),this.renderTemplatesList(g,Object(a.__)("Product Pages","full-site-editing")),this.renderTemplatesList(O,Object(a.__)("Services Pages","full-site-editing")),this.renderTemplatesList(v,Object(a.__)("Team Pages","full-site-editing")),!this.props.isFrontPage&&this.renderTemplatesList(h,Object(a.__)("Home Pages","full-site-editing"))),Object(o.createElement)(q,{blocks:this.getBlocksForPreview(t),viewportWidth:1200,title:!s&&this.getTitleByTemplateSlug(t)}))),Object(o.createElement)("div",{className:P()("page-template-modal__buttons",{"is-visually-hidden":Object(T.isEmpty)(t)||n})},Object(o.createElement)(S.Button,{isPrimary:!0,isLarge:!0,disabled:Object(T.isEmpty)(t)||n,onClick:this.handleConfirmation},Object(a.sprintf)(Object(a.__)("Use %s layout","full-site-editing"),this.getTitleByTemplateSlug(t)))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.previewedTemplate||Object(T.isEmpty)(e.templates)?null:{previewedTemplate:n.getDefaultSelectedTemplate(e)}}}]),n}(o.Component);w()(ae,"getDefaultSelectedTemplate",(function(e){var t=Object(T.get)(e.templates,[0,"slug"]),n=e._starter_page_template;if(!e.isFrontPage&&!n)return t;"home"===n&&(n=e.theme);var r=n||e.theme;return Object(T.find)(e.templates,{slug:r})?r:Object(T.find)(e.templates,{slug:"maywood"})?"maywood":t}));var se=Object(E.compose)(Object(c.withSelect)((function(e){var t=function(){return e("core/editor").getEditedPostAttribute("meta")},n=t()._starter_page_template;return{isOpen:e("automattic/starter-page-layouts").isOpen(),getMeta:t,_starter_page_template:n,postContentBlock:e("core/editor").getBlocks().find((function(e){return"a8c/post-content"===e.name})),isWelcomeGuideActive:e("core/edit-post").isFeatureActive("welcomeGuide"),areTipsEnabled:!!e("core/nux")&&e("core/nux").areTipsEnabled()}})),Object(c.withDispatch)((function(e,t){var n=e("core/editor");return{setIsOpen:e("automattic/starter-page-layouts").setIsOpen,saveTemplateChoice:function(e){var r=t.getMeta();n.editPost({meta:p()({},r,{_starter_page_template:e})})},insertTemplate:function(r,i){Object(B.addFilter)("isInsertingPageTemplate","automattic/full-site-editing/inserting-template",T.stubTrue),r&&n.editPost({title:r});var o=t.postContentBlock;e("core/block-editor").replaceInnerBlocks(o?o.clientId:"",i,!1),Object(B.removeFilter)("isInsertingPageTemplate","automattic/full-site-editing/inserting-template")},hideWelcomeGuide:function(){t.isWelcomeGuideActive?e("core/edit-post").toggleFeature("welcomeGuide"):t.areTipsEnabled&&e("core/nux").disableTips()}}})))(ae),ce=function(e){h()(n,e);var t=j()(n);function n(){var e;d()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),w()(O()(e),"state",{isWarningOpen:!1}),w()(O()(e),"toggleTemplateModal",(function(){e.props.setIsOpen(!e.props.isOpen)})),w()(O()(e),"toggleWarningModal",(function(){e.setState({isWarningOpen:!e.state.isWarningOpen})})),e}return b()(n,[{key:"render",value:function(){var e=this.props,t=e.templates,n=e.theme,r=e.vertical,i=e.segment,s=e.hidePageTitle,c=e.isFrontPage,l=e.isOpen;return Object(o.createElement)("div",{className:"sidebar-modal-opener"},Object(o.createElement)(S.Button,{isSecondary:!0,onClick:this.toggleWarningModal},Object(a.__)("Change Layout","full-site-editing")),l&&Object(o.createElement)(se,{shouldPrefetchAssets:!1,templates:t,theme:n,vertical:r,segment:i,toggleTemplateModal:this.toggleTemplateModal,hidePageTitle:s,isFrontPage:c,isPromptedFromSidebar:!0}),this.state.isWarningOpen&&Object(o.createElement)(S.Modal,{title:Object(a.__)("Overwrite Page Content?","full-site-editing"),isDismissible:!1,onRequestClose:this.toggleWarningModal,className:"sidebar-modal-opener__warning-modal"},Object(o.createElement)("div",{className:"sidebar-modal-opener__warning-text"},Object(a.__)("Changing the page's layout will remove any customizations or edits you have already made.","full-site-editing")),Object(o.createElement)("div",{className:"sidebar-modal-opener__warning-options"},Object(o.createElement)(S.Button,{isDefault:!0,onClick:this.toggleWarningModal},Object(a.__)("Cancel","full-site-editing")),Object(o.createElement)(S.Button,{isPrimary:!0,onClick:this.toggleTemplateModal},Object(a.__)("Change Layout","full-site-editing")))))}}]),n}(o.Component),le=Object(E.compose)(Object(c.withSelect)((function(e){return{isOpen:e("automattic/starter-page-layouts").isOpen()}})),Object(c.withDispatch)((function(e){return{setIsOpen:e("automattic/starter-page-layouts").setIsOpen}})))(ce),ue=n(28),pe=n.n(ue);Object(c.registerStore)("automattic/starter-page-layouts",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isOpen:!1},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=pe()(t,["type"]);return"SET_IS_OPEN"===n?p()({},e,{isOpen:r.isOpen}):e},actions:{setIsOpen:function(e){return{type:"SET_IS_OPEN",isOpen:e}}},selectors:{isOpen:function(e){return e.isOpen}}});var me,de=window.starterPageTemplatesConfig,fe=de.templates,be=void 0===fe?[]:fe,ge=de.vertical,Oe=de.segment,ve=de.tracksUserData,he=de.screenAction,ye=de.theme,je=de.isFrontPage,_e=de.hideFrontPageTitle;ve&&(U=me=ve,window._tkq.push(["identifyUser",me.userid,me.username]));var we={segment:Oe,templates:be,theme:ye,vertical:ge,isFrontPage:je,hidePageTitle:Boolean(je&&_e)};"add"===he&&(Object(c.dispatch)("automattic/starter-page-layouts").setIsOpen(!0),Object(s.registerPlugin)("page-templates",{render:function(){return Object(o.createElement)(se,i()({},we,{shouldPrefetchAssets:!1}))}})),Object(s.registerPlugin)("page-templates-sidebar",{render:function(){return Object(o.createElement)(l.PluginDocumentSettingPanel,{name:"Template Modal Opener",title:Object(a.__)("Page Layout","full-site-editing"),className:"page-template-modal__sidebar",icon:"none"},Object(o.createElement)(le,we))}});var Te=Object(c.subscribe)((function(){Object(c.select)("core/edit-post").isEditorPanelOpened("page-templates-sidebar/Template Modal Opener")||Object(c.dispatch)("core/edit-post").toggleEditorPanelOpened("page-templates-sidebar/Template Modal Opener"),Te()}))}]));
starter-page-templates/page-template-modal/components/block-iframe-preview.js CHANGED
@@ -9,6 +9,7 @@ import classnames from 'classnames';
9
  */
10
  /* eslint-disable import/no-extraneous-dependencies */
11
  import {
 
12
  useRef,
13
  useEffect,
14
  useState,
@@ -87,7 +88,6 @@ const BlockFramePreview = ( {
87
  title,
88
  } ) => {
89
  const frameContainerRef = useRef();
90
- const renderedBlocksRef = useRef();
91
  const iframeRef = useRef();
92
 
93
  // Set the initial scale factor.
@@ -176,15 +176,6 @@ const BlockFramePreview = ( {
176
  body.scrollTop = 0;
177
  }, [ recomputeBlockListKey ] );
178
 
179
- // Append rendered Blocks to iFrame when changed
180
- useEffect( () => {
181
- const renderedBlocksDOM = renderedBlocksRef && renderedBlocksRef.current;
182
-
183
- if ( renderedBlocksDOM ) {
184
- iframeRef.current.contentDocument.body.appendChild( renderedBlocksDOM );
185
- }
186
- }, [ recomputeBlockListKey ] );
187
-
188
  // Handling windows resize event.
189
  useEffect( () => {
190
  const refreshPreview = debounce( rescale, DEBOUNCE_TIMEOUT );
@@ -215,22 +206,26 @@ const BlockFramePreview = ( {
215
  title={ __( 'Preview', 'full-site-editing' ) }
216
  className={ classnames( 'editor-styles-wrapper', className ) }
217
  style={ style }
218
- />
219
-
220
- <div ref={ renderedBlocksRef } className="block-editor">
221
- <div className="edit-post-visual-editor">
222
- <div className="editor-styles-wrapper">
223
- <div className="editor-writing-flow">
224
- <CustomBlockPreview
225
- blocks={ renderedBlocks }
226
- settings={ settings }
227
- hidePageTitle={ ! title }
228
- recomputeBlockListKey={ recomputeBlockListKey }
229
- />
230
- </div>
231
- </div>
232
- </div>
233
- </div>
 
 
 
 
234
  </div>
235
  );
236
  /* eslint-enable wpcalypso/jsx-classname-namespace */
9
  */
10
  /* eslint-disable import/no-extraneous-dependencies */
11
  import {
12
+ createPortal,
13
  useRef,
14
  useEffect,
15
  useState,
88
  title,
89
  } ) => {
90
  const frameContainerRef = useRef();
 
91
  const iframeRef = useRef();
92
 
93
  // Set the initial scale factor.
176
  body.scrollTop = 0;
177
  }, [ recomputeBlockListKey ] );
178
 
 
 
 
 
 
 
 
 
 
179
  // Handling windows resize event.
180
  useEffect( () => {
181
  const refreshPreview = debounce( rescale, DEBOUNCE_TIMEOUT );
206
  title={ __( 'Preview', 'full-site-editing' ) }
207
  className={ classnames( 'editor-styles-wrapper', className ) }
208
  style={ style }
209
+ >
210
+ { iframeRef.current?.contentDocument?.body &&
211
+ createPortal(
212
+ <div className="block-editor">
213
+ <div className="edit-post-visual-editor">
214
+ <div className="editor-styles-wrapper">
215
+ <div className="editor-writing-flow">
216
+ <CustomBlockPreview
217
+ blocks={ renderedBlocks }
218
+ settings={ settings }
219
+ hidePageTitle={ ! title }
220
+ recomputeBlockListKey={ recomputeBlockListKey }
221
+ />
222
+ </div>
223
+ </div>
224
+ </div>
225
+ </div>,
226
+ iframeRef.current.contentDocument.body
227
+ ) }
228
+ </iframe>
229
  </div>
230
  );
231
  /* eslint-enable wpcalypso/jsx-classname-namespace */
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'ce952d13fa7bcfdb349521b28ef2a861');
1
+ <?php return array('dependencies' => array('lodash', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3906c93aa60c2d4511ed7219363a9a3c');
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.css CHANGED
@@ -1 +1 @@
1
- .wpcom-block-editor-nav-sidebar-create-page{margin-bottom:8px}.wpcom-block-editor-nav-sidebar-create-page,.wpcom-block-editor-nav-sidebar-view-all-posts{display:flex;justify-content:center;width:100%}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-layout{transition:margin-left .2s}@media (prefers-reduced-motion:reduce){.is-wpcom-block-editor-nav-sidebar-attached .edit-post-layout{transition-duration:0s}}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{transition:width .2s}@media (prefers-reduced-motion:reduce){.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{transition-duration:0s}}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{min-width:0}.is-wpcom-block-editor-nav-sidebar-opened .edit-post-layout{margin-left:272px}.is-wpcom-block-editor-nav-sidebar-opened .edit-post-fullscreen-mode-close{width:0}.is-wpcom-block-editor-nav-sidebar-close-hidden .edit-post-fullscreen-mode-close{opacity:0;padding:0;pointer-events:none}.wpcom-block-editor-nav-sidebar-nav-sidebar__container{box-sizing:border-box;position:fixed;top:0;left:-272px;bottom:0;width:272px;border-right:1px solid #e2e4e7;transition:left .2s}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__container{transition-duration:0s}}.wpcom-block-editor-nav-sidebar-nav-sidebar__container:not([aria-hidden=true]){left:0}.wpcom-block-editor-nav-sidebar-nav-sidebar__header{top:0;left:0;position:fixed;height:60px}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button{height:60px;width:60px;display:flex;align-items:center;justify-content:center;border-radius:0;background:#32373d!important;color:#fff!important;box-shadow:none!important}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-shrinking{animation:wpcom-block-editor-nav-sidebar__shrink .2s normal forwards}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-shrinking{animation-duration:1ms}}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-growing{animation:wpcom-block-editor-nav-sidebar__grow .2s normal forwards}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-growing{animation-duration:1ms}}.wpcom-block-editor-nav-sidebar-nav-sidebar__header-space{height:60px;border-bottom:1px solid #e2e4e7}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button-container{border-bottom:1px solid #e2e4e7}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button{height:46px;width:100%;font-weight:600;border:none!important;box-shadow:none!important}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button:hover{text-decoration:underline}.wpcom-block-editor-nav-sidebar-nav-sidebar__controls{padding:10px}.wpcom-block-editor-nav-sidebar__page-list li{margin:0;padding:0}.wpcom-block-editor-nav-sidebar__item-button{display:flex;flex-direction:row;align-items:center;width:100%;height:auto;margin:0;padding:8px 16px;border-radius:2px;text-align:initial}.wpcom-block-editor-nav-sidebar__item-button.is-selected{background:#000;color:#fff}.wpcom-block-editor-nav-sidebar__item-button.is-selected .wpcom-block-editor-nav-sidebar__label{background:#555d66}.wpcom-block-editor-nav-sidebar__item-button:not(.is-selected):hover{background:#e8eaeb}.wpcom-block-editor-nav-sidebar__item-button:not(.is-selected) .wpcom-block-editor-nav-sidebar__slug{color:#6c7781}.wpcom-block-editor-nav-sidebar__title-container{flex:1}.wpcom-block-editor-nav-sidebar__title.is-untitled{font-style:italic;color:#757575}.wpcom-block-editor-nav-sidebar__slug{font-size:11px;padding-top:4px}.wpcom-block-editor-nav-sidebar__label{display:inline-block;padding:4px;border-radius:4px;background:#d7dade;font-weight:600}@keyframes wpcom-block-editor-nav-sidebar__shrink{0%{transform:scale(1)}to{transform:scale(.55)}}@keyframes wpcom-block-editor-nav-sidebar__grow{0%{transform:scale(.55)}to{transform:scale(1)}}
1
+ .wpcom-block-editor-nav-sidebar-create-page{margin-bottom:8px}.wpcom-block-editor-nav-sidebar-create-page,.wpcom-block-editor-nav-sidebar-view-all-posts{display:flex;justify-content:center;width:100%}.wpcom-block-editor-nav-item{display:flex;flex-direction:row;align-items:center;width:100%;height:auto;margin:0;padding:8px 16px;border-radius:2px;text-align:initial}.wpcom-block-editor-nav-item.is-selected{background:#000;color:#fff}.wpcom-block-editor-nav-item.is-selected .wpcom-block-editor-nav-item__label{background:#555d66}.wpcom-block-editor-nav-item:not(.is-selected):hover{background:#e8eaeb}.wpcom-block-editor-nav-item:not(.is-selected) .wpcom-block-editor-nav-item__slug{color:#6c7781}.wpcom-block-editor-nav-item__title-container{flex:1}.wpcom-block-editor-nav-item__title.is-untitled{font-style:italic;color:#757575}.wpcom-block-editor-nav-item__slug{font-size:11px;padding-top:4px}.wpcom-block-editor-nav-item__label{display:inline-block;padding:4px;border-radius:4px;background:#d7dade;font-weight:600}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-layout{transition:margin-left .2s}@media (prefers-reduced-motion:reduce){.is-wpcom-block-editor-nav-sidebar-attached .edit-post-layout{transition-duration:0s}}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{transition:width .2s}@media (prefers-reduced-motion:reduce){.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{transition-duration:0s}}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{min-width:0}.is-wpcom-block-editor-nav-sidebar-opened .edit-post-layout{margin-left:272px}.is-wpcom-block-editor-nav-sidebar-opened .edit-post-fullscreen-mode-close{width:0}.is-wpcom-block-editor-nav-sidebar-close-hidden .edit-post-fullscreen-mode-close{opacity:0;padding:0;pointer-events:none}.wpcom-block-editor-nav-sidebar-nav-sidebar__container{box-sizing:border-box;position:fixed;top:0;left:-272px;bottom:0;width:272px;border-right:1px solid #e2e4e7;transition:left .2s}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__container{transition-duration:0s}}.wpcom-block-editor-nav-sidebar-nav-sidebar__container:not([aria-hidden=true]){left:0}.wpcom-block-editor-nav-sidebar-nav-sidebar__header{top:0;left:0;position:fixed;height:60px}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button{height:60px;width:60px;display:flex;align-items:center;justify-content:center;border-radius:0;background:#32373d!important;color:#fff!important;box-shadow:none!important}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-shrinking{animation:wpcom-block-editor-nav-sidebar__shrink .2s normal forwards}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-shrinking{animation-duration:1ms}}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-growing{animation:wpcom-block-editor-nav-sidebar__grow .2s normal forwards}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-growing{animation-duration:1ms}}.wpcom-block-editor-nav-sidebar-nav-sidebar__header-space{height:60px;border-bottom:1px solid #e2e4e7}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button-container{border-bottom:1px solid #e2e4e7}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button{height:46px;width:100%;font-weight:600;border:none!important;box-shadow:none!important}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button:hover{text-decoration:underline}.wpcom-block-editor-nav-sidebar-nav-sidebar__controls{padding:10px}.wpcom-block-editor-nav-sidebar__page-list li{margin:0;padding:0}@keyframes wpcom-block-editor-nav-sidebar__shrink{0%{transform:scale(1)}to{transform:scale(.55)}}@keyframes wpcom-block-editor-nav-sidebar__grow{0%{transform:scale(.55)}to{transform:scale(1)}}
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(e,t){for(var r in t)e[r]=t[r]}(window,function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=27)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t,r){var n=r(23);e.exports=function(e,t){if(null==e)return{};var r,o,i=n(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)r=c[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}},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 i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var c=o.apply(null,n);c&&e.push(c)}else if("object"===i)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)}()},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}},function(e,t){function r(e,t,r,n,o,i,c){try{var a=e[i](c),s=a.value}catch(u){return void r(u)}a.done?t(s):Promise.resolve(s).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var c=e.apply(t,n);function a(e){r(c,o,i,a,s,"next",e)}function s(e){r(c,o,i,a,s,"throw",e)}a(void 0)}))}}},function(e,t,r){var n=r(20),o=r(21),i=r(14),c=r(22);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||c()}},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}},function(e,t,r){var n=r(13);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(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t,r){var n=r(10);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}e.exports=function(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){n(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(e,t,r){var n=r(17),o=r(18),i=r(14),c=r(19);e.exports=function(e){return n(e)||o(e)||i(e)||c()}},function(e,t,r){var n=r(13);e.exports=function(e){if(Array.isArray(e))return n(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){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 r=[],n=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(n=(c=a.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(s){o=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}}},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){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){"use strict";r.r(t);var n=r(11),o=r.n(n),i=r(0),c=r(2),a=r(1),s="automattic/block-editor-nav-sidebar",u=r(10),l=r.n(u),d=r(15),p=r.n(d),b=r(16),f=r.n(b),m=r(12),v=r.n(m),y=r(8),O=r.n(y),g=r(4),j=r(7),h=Object(i.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(i.createElement)(j.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),w=Object(i.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(j.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),E=r(3),_=r(5),k=r(6),x=r(9),S=r.n(x);r(24);function P(e){var t=e.postType,r=Object(_.get)(t,["labels","add_new_item"],Object(E.__)("Create","full-site-editing")),n=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostLabel",r,t.slug),o=Object(k.addQueryArgs)("post-new.php",{post_type:t.slug}),c=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostUrl",o,t.slug);return Object(i.createElement)(g.Button,{target:Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0),isPrimary:!0,className:"wpcom-block-editor-nav-sidebar-create-page",href:c},n)}r(25);var N=function(e){var t=e.children,r=O()(e,["children"]);return Object(i.createElement)(g.Button,r,t)};function A(e){var t=e.postType,r=Object(_.get)(t,["labels","view_items"],Object(E.__)("Back","full-site-editing")),n=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.allPostsLabel",r,t.slug),o=Object(k.addQueryArgs)("edit.php",{post_type:t.slug}),c=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.allPostsUrl",o,t.slug);return Object(i.createElement)(N,{target:Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0),isSecondary:!0,className:"wpcom-block-editor-nav-sidebar-view-all-posts",href:c},n)}r(26);var T=function(e){var t=e.children,r=O()(e,["children"]);return Object(i.createElement)(g.Button,r,t)};function B(){var e=Object(c.useSelect)((function(e){var t=e("core").getPostType;return[C(e),e(s).isSidebarOpened(),t(e("core/editor").getCurrentPostType()),e("core/editor").getCurrentPostId(),R(e)]})),t=v()(e,5),r=t[0],n=t[1],o=t[2],u=t[3],l=t[4],d=Object(i.useRef)(n),p=Object(i.useState)(!1),b=v()(p,2),f=b[0],m=b[1];Object(i.useEffect)((function(){n?document.body.classList.add("is-wpcom-block-editor-nav-sidebar-close-hidden"):d.current&&m(!0),d.current=n}),[n,d,m]);var y=Object(c.useDispatch)(s).toggleSidebar,O=Object(k.addQueryArgs)("edit.php",{post_type:o.slug});O=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeUrl",O);var g=Object(_.get)(o,["labels","all_items"],Object(E.__)("Back","full-site-editing"));g=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeLabel",g);return Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__container","aria-hidden":!n},(n||f)&&Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__header"},Object(i.createElement)(T,{icon:h,iconSize:36,className:S()({"is-shrinking":n,"is-growing":f}),onClick:function(){n&&m(!0),y()},onAnimationEnd:function(e){"wpcom-block-editor-nav-sidebar__grow"===e.animationName&&(m(!1),document.body.classList.remove("is-wpcom-block-editor-nav-sidebar-close-hidden"))}})),Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__header-space"}),Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__home-button-container"},Object(i.createElement)(T,{href:O,className:"wpcom-block-editor-nav-sidebar-nav-sidebar__home-button",icon:w,onClick:function(e){Object(a.hasAction)("a8c.wpcom-block-editor.closeEditor")&&(e.preventDefault(),Object(a.doAction)("a8c.wpcom-block-editor.closeEditor"))}},g)),Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__controls"},Object(i.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__page-list"},r.map((function(e){return Object(i.createElement)(L,{key:e.id,item:e,selected:e.id===u,statusLabel:l[e.status]})}))),Object(i.createElement)(P,{postType:o}),Object(i.createElement)(A,{postType:o})))}function L(e){var t,r,n=e.item,o=e.selected,c=e.statusLabel,a=S()("wpcom-block-editor-nav-sidebar__item-button",{"is-selected":o}),s=S()("wpcom-block-editor-nav-sidebar__title",{"is-untitled":!(null===(t=n.title)||void 0===t?void 0:t.raw)});return Object(i.createElement)("li",null,Object(i.createElement)(T,{className:a},Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__title-container"},Object(i.createElement)("div",{className:s},(null===(r=n.title)||void 0===r?void 0:r.raw)||Object(E.__)("Untitled","full-site-editing")),n.slug&&Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__slug"},"/".concat(n.slug,"/"))),c&&Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar__label"},c)))}function C(e){var t=e("core/editor"),r=t.isEditedPostNew,n=t.getCurrentPostId,o=t.getCurrentPostType,i=t.getEditedPostAttribute,c=e("core").getEntityRecords("root","status");if(!c)return[];var a=c.filter((function(e){return e.show_in_list})).map((function(e){return e.slug})).join(","),s=n(),u=o(),l=e("core").getEntityRecords("postType",u,{_fields:"id,slug,status,title",exclude:[s],orderby:"modified",per_page:10,status:a})||[];return[{id:s,slug:i("slug"),status:r()?"draft":i("status"),title:{raw:i("title"),rendered:""}}].concat(f()(l))}function R(e){return(e("core").getEntityRecords("root","status")||[]).reduce((function(e,t){var r=t.name,n=t.slug;return"publish"===n?e:p()({},e,l()({},n,r))}),{})}function I(e){return M.apply(this,arguments)}function M(){return(M=o()(regeneratorRuntime.mark((function e(t){var r,n,o,i,c,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:5e3,o=new Promise((function(e){!function r(){var o=document.querySelector(t);o?e(o):n=setTimeout(r,200)}()})),i=new Promise((function(e){return setTimeout(e,r,"timeout")})),e.next=5,Promise.race([o,i]);case 5:if(c=e.sent,clearTimeout(n),"timeout"!==c){e.next=9;break}return e.abrupt("return",void 0);case 9:return e.abrupt("return",c);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(){return(D=o()(regeneratorRuntime.mark((function e(){var t,r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I(".edit-post-fullscreen-mode-close");case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return");case 5:Object(a.addFilter)("a8c.wpcom-block-editor.shouldCloseEditor","a8c/fse/attachSidebar",(function(){return!1})),Object(c.dispatch)("core").addEntities([{baseURL:"/wp/v2/statuses",key:"slug",kind:"root",name:"status",plural:"statuses"}]),document.body.classList.add("is-wpcom-block-editor-nav-sidebar-attached"),t.addEventListener("click",(function(e){e.preventDefault(),Object(c.dispatch)(s).toggleSidebar()})),r=!1,Object(c.subscribe)((function(){var e=Object(c.select)(s).isSidebarOpened();r!==e&&((r=e)?document.body.classList.add("is-wpcom-block-editor-nav-sidebar-opened"):document.body.classList.remove("is-wpcom-block-editor-nav-sidebar-opened"))})),n=document.createElement("div"),document.body.appendChild(n),Object(i.render)(Object(i.createElement)(B,null),n),C(c.select);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){D.apply(this,arguments)}();var F={toggleSidebar:function(){return{type:"TOGGLE_SIDEBAR"}}},W=Object(c.combineReducers)({opened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SIDEBAR":return!e;default:return e}}});Object(c.registerStore)(s,{actions:F,reducer:W,selectors:{isSidebarOpened:function(e){return e.opened}}})}]));
1
+ !function(e,t){for(var r in t)e[r]=t[r]}(window,function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=28)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.primitives}()},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 i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var c=o.apply(null,n);c&&e.push(c)}else if("object"===i)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)}()},function(e,t,r){var n=r(23);e.exports=function(e,t){if(null==e)return{};var r,o,i=n(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)r=c[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}},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}},function(e,t){function r(e,t,r,n,o,i,c){try{var a=e[i](c),s=a.value}catch(l){return void r(l)}a.done?t(s):Promise.resolve(s).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var c=e.apply(t,n);function a(e){r(c,o,i,a,s,"next",e)}function s(e){r(c,o,i,a,s,"throw",e)}a(void 0)}))}}},function(e,t,r){var n=r(20),o=r(21),i=r(14),c=r(22);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||c()}},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}},function(e,t,r){var n=r(13);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(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t,r){var n=r(10);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}e.exports=function(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){n(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(e,t,r){var n=r(17),o=r(18),i=r(14),c=r(19);e.exports=function(e){return n(e)||o(e)||i(e)||c()}},function(e,t,r){var n=r(13);e.exports=function(e){if(Array.isArray(e))return n(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){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 r=[],n=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(n=(c=a.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(s){o=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}}},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){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){"use strict";r.r(t);var n=r(11),o=r.n(n),i=r(0),c=r(2),a=r(1),s="automattic/block-editor-nav-sidebar",l=r(10),u=r.n(l),d=r(15),p=r.n(d),b=r(16),f=r.n(b),m=r(12),v=r.n(m),y=r(9),O=r.n(y),g=r(3),j=r(7),h=Object(i.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(i.createElement)(j.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),w=Object(i.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(j.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),E=r(4),k=r(6),_=r(5),x=r(8),S=r.n(x);r(24);function P(e){var t=e.postType,r=Object(k.get)(t,["labels","add_new_item"],Object(E.__)("Create","full-site-editing")),n=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostLabel",r,t.slug),o=Object(_.addQueryArgs)("post-new.php",{post_type:t.slug}),c=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostUrl",o,t.slug);return Object(i.createElement)(g.Button,{target:Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0),isPrimary:!0,className:"wpcom-block-editor-nav-sidebar-create-page",href:c},n)}r(25);var N=function(e){var t=e.children,r=O()(e,["children"]);return Object(i.createElement)(g.Button,r,t)};function T(e){var t=e.postType,r=Object(k.get)(t,["labels","view_items"],Object(E.__)("Back","full-site-editing")),n=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.allPostsLabel",r,t.slug),o=Object(_.addQueryArgs)("edit.php",{post_type:t.slug}),c=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.allPostsUrl",o,t.slug);return Object(i.createElement)(N,{target:Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0),isSecondary:!0,className:"wpcom-block-editor-nav-sidebar-view-all-posts",href:c},n)}r(26);function A(e){var t,r,n=e.item,o=e.postType,c=e.selected,s=e.statusLabel,l=S()("wpcom-block-editor-nav-item",{"is-selected":c}),u=S()("wpcom-block-editor-nav-item__title",{"is-untitled":!(null===(t=n.title)||void 0===t?void 0:t.raw)}),d=Object(_.addQueryArgs)("post.php",{post:n.id,action:"edit"}),p=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.editPostUrl",d,n.id,o.slug);return Object(i.createElement)("li",null,Object(i.createElement)(g.Button,{className:l,href:p,target:Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0)},Object(i.createElement)("div",{className:"wpcom-block-editor-nav-item__title-container"},Object(i.createElement)("div",{className:u},(null===(r=n.title)||void 0===r?void 0:r.raw)||Object(E._x)("Untitled","post title for posts with no title","full-site-editing")),n.slug&&Object(i.createElement)("div",{className:"wpcom-block-editor-nav-item__slug"},"/".concat(n.slug,"/"))),s&&Object(i.createElement)("div",{className:"wpcom-block-editor-nav-item__label"},s)))}r(27);var B=function(e){var t=e.children,r=O()(e,["children"]);return Object(i.createElement)(g.Button,r,t)};function L(){var e=Object(c.useSelect)((function(e){var t=e("core").getPostType;return[C(e),e(s).isSidebarOpened(),t(e("core/editor").getCurrentPostType()),e("core/editor").getCurrentPostId(),R(e)]})),t=v()(e,5),r=t[0],n=t[1],o=t[2],l=t[3],u=t[4],d=Object(i.useRef)(n),p=Object(i.useState)(!1),b=v()(p,2),f=b[0],m=b[1];Object(i.useEffect)((function(){n?document.body.classList.add("is-wpcom-block-editor-nav-sidebar-close-hidden"):d.current&&m(!0),d.current=n}),[n,d,m]);var y=Object(c.useDispatch)(s).toggleSidebar,O=Object(_.addQueryArgs)("edit.php",{post_type:o.slug});O=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeUrl",O);var g=Object(k.get)(o,["labels","all_items"],Object(E.__)("Back","full-site-editing"));g=Object(a.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeLabel",g);return Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__container","aria-hidden":!n},(n||f)&&Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__header"},Object(i.createElement)(B,{icon:h,iconSize:36,className:S()({"is-shrinking":n,"is-growing":f}),onClick:function(){n&&m(!0),y()},onAnimationEnd:function(e){"wpcom-block-editor-nav-sidebar__grow"===e.animationName&&(m(!1),document.body.classList.remove("is-wpcom-block-editor-nav-sidebar-close-hidden"))}})),Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__header-space"}),Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__home-button-container"},Object(i.createElement)(B,{href:O,className:"wpcom-block-editor-nav-sidebar-nav-sidebar__home-button",icon:w,onClick:function(e){Object(a.hasAction)("a8c.wpcom-block-editor.closeEditor")&&(e.preventDefault(),Object(a.doAction)("a8c.wpcom-block-editor.closeEditor"))}},g)),Object(i.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__controls"},Object(i.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__page-list"},r.map((function(e){return Object(i.createElement)(A,{key:e.id,item:e,postType:o,selected:e.id===l,statusLabel:u[e.status]})}))),Object(i.createElement)(P,{postType:o}),Object(i.createElement)(T,{postType:o})))}function C(e){var t=e("core/editor"),r=t.isEditedPostNew,n=t.getCurrentPostId,o=t.getCurrentPostType,i=t.getEditedPostAttribute,c=e("core").getEntityRecords("root","status");if(!c)return[];var a=c.filter((function(e){return e.show_in_list})).map((function(e){return e.slug})).join(","),s=n(),l=o(),u=e("core").getEntityRecords("postType",l,{_fields:"id,slug,status,title",exclude:[s],orderby:"modified",per_page:10,status:a})||[];return[{id:s,slug:i("slug"),status:r()?"draft":i("status"),title:{raw:i("title"),rendered:""}}].concat(f()(u))}function R(e){return(e("core").getEntityRecords("root","status")||[]).reduce((function(e,t){var r=t.name,n=t.slug;return"publish"===n?e:p()({},e,u()({},n,r))}),{})}function F(e){return I.apply(this,arguments)}function I(){return(I=o()(regeneratorRuntime.mark((function e(t){var r,n,o,i,c,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:5e3,o=new Promise((function(e){!function r(){var o=document.querySelector(t);o?e(o):n=setTimeout(r,200)}()})),i=new Promise((function(e){return setTimeout(e,r,"timeout")})),e.next=5,Promise.race([o,i]);case 5:if(c=e.sent,clearTimeout(n),"timeout"!==c){e.next=9;break}return e.abrupt("return",void 0);case 9:return e.abrupt("return",c);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(){return(M=o()(regeneratorRuntime.mark((function e(){var t,r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F(".edit-post-fullscreen-mode-close");case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return");case 5:Object(a.addFilter)("a8c.wpcom-block-editor.shouldCloseEditor","a8c/fse/attachSidebar",(function(){return!1})),Object(c.dispatch)("core").addEntities([{baseURL:"/wp/v2/statuses",key:"slug",kind:"root",name:"status",plural:"statuses"}]),document.body.classList.add("is-wpcom-block-editor-nav-sidebar-attached"),t.addEventListener("click",(function(e){e.preventDefault(),Object(c.dispatch)(s).toggleSidebar()})),r=!1,Object(c.subscribe)((function(){var e=Object(c.select)(s).isSidebarOpened();r!==e&&((r=e)?document.body.classList.add("is-wpcom-block-editor-nav-sidebar-opened"):document.body.classList.remove("is-wpcom-block-editor-nav-sidebar-opened"))})),n=document.createElement("div"),document.body.appendChild(n),Object(i.render)(Object(i.createElement)(L,null),n),C(c.select);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){M.apply(this,arguments)}();var W={toggleSidebar:function(){return{type:"TOGGLE_SIDEBAR"}}},D=Object(c.combineReducers)({opened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SIDEBAR":return!e;default:return e}}});Object(c.registerStore)(s,{actions:W,reducer:D,selectors:{isSidebarOpened:function(e){return e.opened}}})}]));
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.rtl.css CHANGED
@@ -1 +1 @@
1
- .wpcom-block-editor-nav-sidebar-create-page{margin-bottom:8px}.wpcom-block-editor-nav-sidebar-create-page,.wpcom-block-editor-nav-sidebar-view-all-posts{display:flex;justify-content:center;width:100%}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-layout{transition:margin-right .2s}@media (prefers-reduced-motion:reduce){.is-wpcom-block-editor-nav-sidebar-attached .edit-post-layout{transition-duration:0s}}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{transition:width .2s}@media (prefers-reduced-motion:reduce){.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{transition-duration:0s}}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{min-width:0}.is-wpcom-block-editor-nav-sidebar-opened .edit-post-layout{margin-right:272px}.is-wpcom-block-editor-nav-sidebar-opened .edit-post-fullscreen-mode-close{width:0}.is-wpcom-block-editor-nav-sidebar-close-hidden .edit-post-fullscreen-mode-close{opacity:0;padding:0;pointer-events:none}.wpcom-block-editor-nav-sidebar-nav-sidebar__container{box-sizing:border-box;position:fixed;top:0;right:-272px;bottom:0;width:272px;border-left:1px solid #e2e4e7;transition:right .2s}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__container{transition-duration:0s}}.wpcom-block-editor-nav-sidebar-nav-sidebar__container:not([aria-hidden=true]){right:0}.wpcom-block-editor-nav-sidebar-nav-sidebar__header{top:0;right:0;position:fixed;height:60px}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button{height:60px;width:60px;display:flex;align-items:center;justify-content:center;border-radius:0;background:#32373d!important;color:#fff!important;box-shadow:none!important}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-shrinking{animation:wpcom-block-editor-nav-sidebar__shrink .2s normal forwards}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-shrinking{animation-duration:1ms}}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-growing{animation:wpcom-block-editor-nav-sidebar__grow .2s normal forwards}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-growing{animation-duration:1ms}}.wpcom-block-editor-nav-sidebar-nav-sidebar__header-space{height:60px;border-bottom:1px solid #e2e4e7}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button-container{border-bottom:1px solid #e2e4e7}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button{height:46px;width:100%;font-weight:600;border:none!important;box-shadow:none!important}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button:hover{text-decoration:underline}.wpcom-block-editor-nav-sidebar-nav-sidebar__controls{padding:10px}.wpcom-block-editor-nav-sidebar__page-list li{margin:0;padding:0}.wpcom-block-editor-nav-sidebar__item-button{display:flex;flex-direction:row;align-items:center;width:100%;height:auto;margin:0;padding:8px 16px;border-radius:2px;text-align:initial}.wpcom-block-editor-nav-sidebar__item-button.is-selected{background:#000;color:#fff}.wpcom-block-editor-nav-sidebar__item-button.is-selected .wpcom-block-editor-nav-sidebar__label{background:#555d66}.wpcom-block-editor-nav-sidebar__item-button:not(.is-selected):hover{background:#e8eaeb}.wpcom-block-editor-nav-sidebar__item-button:not(.is-selected) .wpcom-block-editor-nav-sidebar__slug{color:#6c7781}.wpcom-block-editor-nav-sidebar__title-container{flex:1}.wpcom-block-editor-nav-sidebar__title.is-untitled{font-style:italic;color:#757575}.wpcom-block-editor-nav-sidebar__slug{font-size:11px;padding-top:4px}.wpcom-block-editor-nav-sidebar__label{display:inline-block;padding:4px;border-radius:4px;background:#d7dade;font-weight:600}@keyframes wpcom-block-editor-nav-sidebar__shrink{0%{transform:scale(1)}to{transform:scale(.55)}}@keyframes wpcom-block-editor-nav-sidebar__grow{0%{transform:scale(.55)}to{transform:scale(1)}}
1
+ .wpcom-block-editor-nav-sidebar-create-page{margin-bottom:8px}.wpcom-block-editor-nav-sidebar-create-page,.wpcom-block-editor-nav-sidebar-view-all-posts{display:flex;justify-content:center;width:100%}.wpcom-block-editor-nav-item{display:flex;flex-direction:row;align-items:center;width:100%;height:auto;margin:0;padding:8px 16px;border-radius:2px;text-align:initial}.wpcom-block-editor-nav-item.is-selected{background:#000;color:#fff}.wpcom-block-editor-nav-item.is-selected .wpcom-block-editor-nav-item__label{background:#555d66}.wpcom-block-editor-nav-item:not(.is-selected):hover{background:#e8eaeb}.wpcom-block-editor-nav-item:not(.is-selected) .wpcom-block-editor-nav-item__slug{color:#6c7781}.wpcom-block-editor-nav-item__title-container{flex:1}.wpcom-block-editor-nav-item__title.is-untitled{font-style:italic;color:#757575}.wpcom-block-editor-nav-item__slug{font-size:11px;padding-top:4px}.wpcom-block-editor-nav-item__label{display:inline-block;padding:4px;border-radius:4px;background:#d7dade;font-weight:600}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-layout{transition:margin-right .2s}@media (prefers-reduced-motion:reduce){.is-wpcom-block-editor-nav-sidebar-attached .edit-post-layout{transition-duration:0s}}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{transition:width .2s}@media (prefers-reduced-motion:reduce){.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{transition-duration:0s}}.is-wpcom-block-editor-nav-sidebar-attached .edit-post-fullscreen-mode-close{min-width:0}.is-wpcom-block-editor-nav-sidebar-opened .edit-post-layout{margin-right:272px}.is-wpcom-block-editor-nav-sidebar-opened .edit-post-fullscreen-mode-close{width:0}.is-wpcom-block-editor-nav-sidebar-close-hidden .edit-post-fullscreen-mode-close{opacity:0;padding:0;pointer-events:none}.wpcom-block-editor-nav-sidebar-nav-sidebar__container{box-sizing:border-box;position:fixed;top:0;right:-272px;bottom:0;width:272px;border-left:1px solid #e2e4e7;transition:right .2s}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__container{transition-duration:0s}}.wpcom-block-editor-nav-sidebar-nav-sidebar__container:not([aria-hidden=true]){right:0}.wpcom-block-editor-nav-sidebar-nav-sidebar__header{top:0;right:0;position:fixed;height:60px}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button{height:60px;width:60px;display:flex;align-items:center;justify-content:center;border-radius:0;background:#32373d!important;color:#fff!important;box-shadow:none!important}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-shrinking{animation:wpcom-block-editor-nav-sidebar__shrink .2s normal forwards}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-shrinking{animation-duration:1ms}}.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-growing{animation:wpcom-block-editor-nav-sidebar__grow .2s normal forwards}@media (prefers-reduced-motion:reduce){.wpcom-block-editor-nav-sidebar-nav-sidebar__header .components-button.is-growing{animation-duration:1ms}}.wpcom-block-editor-nav-sidebar-nav-sidebar__header-space{height:60px;border-bottom:1px solid #e2e4e7}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button-container{border-bottom:1px solid #e2e4e7}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button{height:46px;width:100%;font-weight:600;border:none!important;box-shadow:none!important}.wpcom-block-editor-nav-sidebar-nav-sidebar__home-button:hover{text-decoration:underline}.wpcom-block-editor-nav-sidebar-nav-sidebar__controls{padding:10px}.wpcom-block-editor-nav-sidebar__page-list li{margin:0;padding:0}@keyframes wpcom-block-editor-nav-sidebar__shrink{0%{transform:scale(1)}to{transform:scale(.55)}}@keyframes wpcom-block-editor-nav-sidebar__grow{0%{transform:scale(.55)}to{transform:scale(1)}}
wpcom-block-editor-nav-sidebar/src/components/create-page/index.tsx CHANGED
@@ -3,7 +3,6 @@
3
  */
4
  import { get } from 'lodash';
5
  import { Button } from '@wordpress/components';
6
- import React from '@wordpress/element';
7
  import { applyFilters } from '@wordpress/hooks';
8
  import { __ } from '@wordpress/i18n';
9
  import { addQueryArgs } from '@wordpress/url';
@@ -14,7 +13,7 @@ import { addQueryArgs } from '@wordpress/url';
14
  import './style.scss';
15
 
16
  interface Props {
17
- postType: any;
18
  }
19
 
20
  export default function CreatePage( { postType }: Props ) {
3
  */
4
  import { get } from 'lodash';
5
  import { Button } from '@wordpress/components';
 
6
  import { applyFilters } from '@wordpress/hooks';
7
  import { __ } from '@wordpress/i18n';
8
  import { addQueryArgs } from '@wordpress/url';
13
  import './style.scss';
14
 
15
  interface Props {
16
+ postType: { slug: string };
17
  }
18
 
19
  export default function CreatePage( { postType }: Props ) {
wpcom-block-editor-nav-sidebar/src/components/nav-item/index.tsx ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classNames from 'classnames';
5
+ import { Button } from '@wordpress/components';
6
+ import { _x } from '@wordpress/i18n';
7
+ import { addQueryArgs } from '@wordpress/url';
8
+ import { applyFilters } from '@wordpress/hooks';
9
+
10
+ /**
11
+ * Internal dependencies
12
+ */
13
+ import { Post } from '../../types';
14
+ import './style.scss';
15
+
16
+ interface NavItemProps {
17
+ item: Post;
18
+ postType: { slug: string };
19
+ selected: boolean;
20
+ statusLabel?: string;
21
+ }
22
+
23
+ export default function NavItem( { item, postType, selected, statusLabel }: NavItemProps ) {
24
+ const buttonClasses = classNames( 'wpcom-block-editor-nav-item', {
25
+ 'is-selected': selected,
26
+ } );
27
+
28
+ const titleClasses = classNames( 'wpcom-block-editor-nav-item__title', {
29
+ 'is-untitled': ! item.title?.raw,
30
+ } );
31
+
32
+ const defaultEditUrl = addQueryArgs( 'post.php', { post: item.id, action: 'edit' } );
33
+ const editUrl = applyFilters(
34
+ 'a8c.WpcomBlockEditorNavSidebar.editPostUrl',
35
+ defaultEditUrl,
36
+ item.id,
37
+ postType.slug
38
+ );
39
+
40
+ return (
41
+ <li>
42
+ <Button
43
+ className={ buttonClasses }
44
+ href={ editUrl }
45
+ target={ applyFilters( 'a8c.WpcomBlockEditorNavSidebar.linkTarget', undefined ) }
46
+ >
47
+ <div className="wpcom-block-editor-nav-item__title-container">
48
+ <div className={ titleClasses }>
49
+ { item.title?.raw ||
50
+ _x( 'Untitled', 'post title for posts with no title', 'full-site-editing' ) }
51
+ </div>
52
+ { item.slug && (
53
+ <div className="wpcom-block-editor-nav-item__slug">{ `/${ item.slug }/` }</div>
54
+ ) }
55
+ </div>
56
+ { statusLabel && <div className="wpcom-block-editor-nav-item__label">{ statusLabel }</div> }
57
+ </Button>
58
+ </li>
59
+ );
60
+ }
wpcom-block-editor-nav-sidebar/src/components/nav-item/style.scss ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import '~@wordpress/base-styles/colors';
2
+ @import '~@wordpress/base-styles/variables';
3
+
4
+ .wpcom-block-editor-nav-item {
5
+ display: flex;
6
+ flex-direction: row;
7
+ align-items: center;
8
+ width: 100%;
9
+ height: auto;
10
+ margin: 0;
11
+ padding: ($panel-padding / 2) $panel-padding;
12
+ border-radius: $radius-block-ui;
13
+ text-align: initial;
14
+
15
+ &.is-selected {
16
+ background: $black;
17
+ color: $white;
18
+
19
+ .wpcom-block-editor-nav-item__label {
20
+ background: $dark-gray-500;
21
+ }
22
+ }
23
+
24
+ &:not( .is-selected ):hover {
25
+ background: $light-gray-400;
26
+ }
27
+
28
+ &:not( .is-selected ) .wpcom-block-editor-nav-item__slug {
29
+ color: $dark-gray-300;
30
+ }
31
+ }
32
+
33
+ .wpcom-block-editor-nav-item__title-container {
34
+ flex: 1;
35
+ }
36
+
37
+ .wpcom-block-editor-nav-item__title {
38
+ &.is-untitled {
39
+ font-style: italic;
40
+ color: $medium-gray-text;
41
+ }
42
+ }
43
+
44
+ .wpcom-block-editor-nav-item__slug {
45
+ font-size: $default-font-size - 2;
46
+ padding-top: 4px;
47
+ }
48
+
49
+ .wpcom-block-editor-nav-item__label {
50
+ display: inline-block;
51
+ padding: 4px;
52
+ border-radius: $radius-round-rectangle;
53
+ background: $light-gray-600;
54
+ font-weight: 600;
55
+ }
wpcom-block-editor-nav-sidebar/src/components/nav-sidebar/index.tsx CHANGED
@@ -1,8 +1,7 @@
1
- /* eslint-disable import/no-extraneous-dependencies */
2
  /**
3
  * External dependencies
4
  */
5
- import React, { useState, useEffect, useRef } from '@wordpress/element';
6
  import { useSelect, useDispatch } from '@wordpress/data';
7
  import { Button as OriginalButton } from '@wordpress/components';
8
  import { chevronLeft, wordpress } from '@wordpress/icons';
@@ -18,15 +17,10 @@ import classNames from 'classnames';
18
  import { STORE_KEY } from '../../constants';
19
  import CreatePage from '../create-page';
20
  import ViewAllPosts from '../view-all-posts';
 
 
21
  import './style.scss';
22
 
23
- interface Post {
24
- id: number;
25
- slug: string;
26
- status: string;
27
- title: { raw: string; rendered: string };
28
- }
29
-
30
  const Button = ( {
31
  children,
32
  ...rest
@@ -69,7 +63,7 @@ export default function WpcomBlockEditorNavSidebar() {
69
  let closeLabel = get( postType, [ 'labels', 'all_items' ], __( 'Back', 'full-site-editing' ) );
70
  closeLabel = applyFilters( 'a8c.WpcomBlockEditorNavSidebar.closeLabel', closeLabel );
71
 
72
- const handleClose = ( e: React.WPSyntheticEvent ) => {
73
  if ( hasAction( 'a8c.wpcom-block-editor.closeEditor' ) ) {
74
  e.preventDefault();
75
  doAction( 'a8c.wpcom-block-editor.closeEditor' );
@@ -123,6 +117,7 @@ export default function WpcomBlockEditorNavSidebar() {
123
  <NavItem
124
  key={ item.id }
125
  item={ item }
 
126
  selected={ item.id === selectedItemId }
127
  statusLabel={ statusLabels[ item.status ] }
128
  />
@@ -135,40 +130,6 @@ export default function WpcomBlockEditorNavSidebar() {
135
  );
136
  }
137
 
138
- interface NavItemProps {
139
- item: Post;
140
- selected: boolean;
141
- statusLabel?: string;
142
- }
143
-
144
- function NavItem( { item, selected, statusLabel }: NavItemProps ) {
145
- const buttonClasses = classNames( 'wpcom-block-editor-nav-sidebar__item-button', {
146
- 'is-selected': selected,
147
- } );
148
-
149
- const titleClasses = classNames( 'wpcom-block-editor-nav-sidebar__title', {
150
- 'is-untitled': ! item.title?.raw,
151
- } );
152
-
153
- return (
154
- <li>
155
- <Button className={ buttonClasses }>
156
- <div className="wpcom-block-editor-nav-sidebar__title-container">
157
- <div className={ titleClasses }>
158
- { item.title?.raw || __( 'Untitled', 'full-site-editing' ) }
159
- </div>
160
- { item.slug && (
161
- <div className="wpcom-block-editor-nav-sidebar__slug">{ `/${ item.slug }/` }</div>
162
- ) }
163
- </div>
164
- { statusLabel && (
165
- <div className="wpcom-block-editor-nav-sidebar__label">{ statusLabel }</div>
166
- ) }
167
- </Button>
168
- </li>
169
- );
170
- }
171
-
172
  export function selectNavItems( select: typeof import('@wordpress/data').select ): Post[] {
173
  const { isEditedPostNew, getCurrentPostId, getCurrentPostType, getEditedPostAttribute } = select(
174
  'core/editor'
 
1
  /**
2
  * External dependencies
3
  */
4
+ import { useState, useEffect, useRef, WPSyntheticEvent } from '@wordpress/element';
5
  import { useSelect, useDispatch } from '@wordpress/data';
6
  import { Button as OriginalButton } from '@wordpress/components';
7
  import { chevronLeft, wordpress } from '@wordpress/icons';
17
  import { STORE_KEY } from '../../constants';
18
  import CreatePage from '../create-page';
19
  import ViewAllPosts from '../view-all-posts';
20
+ import NavItem from '../nav-item';
21
+ import { Post } from '../../types';
22
  import './style.scss';
23
 
 
 
 
 
 
 
 
24
  const Button = ( {
25
  children,
26
  ...rest
63
  let closeLabel = get( postType, [ 'labels', 'all_items' ], __( 'Back', 'full-site-editing' ) );
64
  closeLabel = applyFilters( 'a8c.WpcomBlockEditorNavSidebar.closeLabel', closeLabel );
65
 
66
+ const handleClose = ( e: WPSyntheticEvent ) => {
67
  if ( hasAction( 'a8c.wpcom-block-editor.closeEditor' ) ) {
68
  e.preventDefault();
69
  doAction( 'a8c.wpcom-block-editor.closeEditor' );
117
  <NavItem
118
  key={ item.id }
119
  item={ item }
120
+ postType={ postType } // We know the post type of this item is always the same as the post type of the current editor
121
  selected={ item.id === selectedItemId }
122
  statusLabel={ statusLabels[ item.status ] }
123
  />
130
  );
131
  }
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  export function selectNavItems( select: typeof import('@wordpress/data').select ): Post[] {
134
  const { isEditedPostNew, getCurrentPostId, getCurrentPostType, getEditedPostAttribute } = select(
135
  'core/editor'
wpcom-block-editor-nav-sidebar/src/components/nav-sidebar/style.scss CHANGED
@@ -114,60 +114,6 @@ $transition-period: 200ms;
114
  padding: 0;
115
  }
116
 
117
- .wpcom-block-editor-nav-sidebar__item-button {
118
- display: flex;
119
- flex-direction: row;
120
- align-items: center;
121
- width: 100%;
122
- height: auto;
123
- margin: 0;
124
- padding: ($panel-padding / 2) $panel-padding;
125
- border-radius: $radius-block-ui;
126
- text-align: initial;
127
-
128
- &.is-selected {
129
- background: $black;
130
- color: $white;
131
-
132
- .wpcom-block-editor-nav-sidebar__label {
133
- background: $dark-gray-500;
134
- }
135
- }
136
-
137
- &:not( .is-selected ):hover {
138
- background: $light-gray-400;
139
- }
140
-
141
- &:not( .is-selected ) .wpcom-block-editor-nav-sidebar__slug {
142
- color: $dark-gray-300;
143
- }
144
- }
145
-
146
- .wpcom-block-editor-nav-sidebar__title-container {
147
- flex: 1;
148
- }
149
-
150
- .wpcom-block-editor-nav-sidebar__title {
151
- &.is-untitled {
152
- font-style: italic;
153
- color: $medium-gray-text;
154
- }
155
- }
156
-
157
- .wpcom-block-editor-nav-sidebar__slug {
158
- font-size: $default-font-size - 2;
159
- padding-top: 4px;
160
- }
161
-
162
- .wpcom-block-editor-nav-sidebar__label {
163
- display: inline-block;
164
- padding: 4px;
165
- border-radius: $radius-round-rectangle;
166
- background: $light-gray-600;
167
- font-weight: 600;
168
- }
169
-
170
-
171
  @keyframes wpcom-block-editor-nav-sidebar__shrink {
172
  0% {
173
  transform: scale( 1 );
114
  padding: 0;
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  @keyframes wpcom-block-editor-nav-sidebar__shrink {
118
  0% {
119
  transform: scale( 1 );
wpcom-block-editor-nav-sidebar/src/components/view-all-posts/index.tsx CHANGED
@@ -3,7 +3,6 @@
3
  */
4
  import { get } from 'lodash';
5
  import { Button as OriginalButton } from '@wordpress/components';
6
- import React from '@wordpress/element';
7
  import { applyFilters } from '@wordpress/hooks';
8
  import { __ } from '@wordpress/i18n';
9
  import { addQueryArgs } from '@wordpress/url';
@@ -14,7 +13,7 @@ import { addQueryArgs } from '@wordpress/url';
14
  import './style.scss';
15
 
16
  interface Props {
17
- postType: any;
18
  }
19
 
20
  const Button = ( { children, ...rest }: OriginalButton.Props & { isSecondary?: boolean } ) => (
3
  */
4
  import { get } from 'lodash';
5
  import { Button as OriginalButton } from '@wordpress/components';
 
6
  import { applyFilters } from '@wordpress/hooks';
7
  import { __ } from '@wordpress/i18n';
8
  import { addQueryArgs } from '@wordpress/url';
13
  import './style.scss';
14
 
15
  interface Props {
16
+ postType: { slug: string };
17
  }
18
 
19
  const Button = ( { children, ...rest }: OriginalButton.Props & { isSecondary?: boolean } ) => (
wpcom-block-editor-nav-sidebar/src/types.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ export interface Post {
2
+ id: number;
3
+ slug: string;
4
+ status: string;
5
+ title: { raw: string; rendered: string };
6
+ }
wpcom-block-editor-nux/dist/wpcom-block-editor-nux.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill'), 'version' => '2abd647072b43030fb24f5d895691b61');
1
+ <?php return array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill'), 'version' => 'eff276ce8a9790fefd367aaada5de4b2');
wpcom-block-editor-nux/dist/wpcom-block-editor-nux.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},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=17)}([function(e,t){!function(){e.exports=this.wp.data}()},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.wp.components}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){var i=n(13);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},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 i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){function n(e,t,n,i,o,r,c){try{var u=e[r](c),a=u.value}catch(s){return void n(s)}u.done?t(a):Promise.resolve(a).then(i,o)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise((function(o,r){var c=e.apply(t,i);function u(e){n(c,o,r,u,a,"next",e)}function a(e){n(c,o,r,u,a,"throw",e)}u(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){e.exports=n.p+"images/block-picker-53b676a08dd25f523d4adb0157a40b4c.svg"},function(e,t,n){e.exports=n.p+"images/editor-1a0c404dcc59d4a340edb4649127f4c9.svg"},function(e,t,n){e.exports=n.p+"images/preview-a2ab6dbfd49f58a76c13c9dab8b09e0e.svg"},function(e,t,n){e.exports=n.p+"images/private-598e2a26fcb0c685d165d750fdf02364.svg"},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.wp.nux}()},function(e,t,n){"object"==typeof window&&window.wpcomBlockEditorNuxAssetsUrl&&(n.p=window.wpcomBlockEditorNuxAssetsUrl)},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var i=n(5),o=n.n(i),r=n(4),c=n.n(r),u=n(0),a={setWpcomNuxStatus:function(e){var t=e.isNuxEnabled;return e.bypassApi||c()({path:"/wpcom/v2/block-editor/nux",method:"POST",data:{isNuxEnabled:t}}),{type:"WPCOM_BLOCK_EDITOR_NUX_SET_STATUS",isNuxEnabled:t}}};Object(u.registerStore)("automattic/nux",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,i=t.isNuxEnabled;return"WPCOM_BLOCK_EDITOR_NUX_SET_STATUS"===n?o()({},e,{isNuxEnabled:i}):e},actions:a,selectors:{isWpcomNuxEnabled:function(e){return e.isNuxEnabled}},persist:!0});n(14);var s=Object(u.subscribe)((function(){Object(u.dispatch)("core/nux").disableTips(),Object(u.select)("core/edit-post").isFeatureActive("welcomeGuide")&&Object(u.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),s()}));Object(u.subscribe)((function(){Object(u.select)("core/nux").areTipsEnabled()&&(Object(u.dispatch)("core/nux").disableTips(),Object(u.dispatch)("automattic/nux").setWpcomNuxStatus({isNuxEnabled:!0})),Object(u.select)("core/edit-post").isFeatureActive("welcomeGuide")&&(Object(u.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),Object(u.dispatch)("automattic/nux").setWpcomNuxStatus({isNuxEnabled:!0}))}));var l=n(6),d=n.n(l),p=n(7),f=n.n(p),b=n(1),m=(n(15),n(3)),g=n(2),O=n(8),x=(n(16),n(9)),v=n.n(x),h=n(10),y=n.n(h),w=n(11),j=n.n(w),_=n(12),E=n.n(_);function N(){var e,t=Object(u.useSelect)((function(e){return{isWpcomNuxEnabled:e("automattic/nux").isWpcomNuxEnabled(),isSPTOpen:e("automattic/starter-page-layouts")&&e("automattic/starter-page-layouts").isOpen()}})),n=t.isWpcomNuxEnabled,i=t.isSPTOpen,o=Object(u.useDispatch)("automattic/nux").setWpcomNuxStatus;if(Object(b.useEffect)((function(){void 0===n&&function(){var e=f()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c()({path:"/wpcom/v2/block-editor/nux"});case 2:t=e.sent,o({isNuxEnabled:t.is_nux_enabled,bypassApi:!0});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[n,o]),!n||i)return null;var r=!!(null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding);return Object(b.createElement)(m.Guide,{className:"wpcom-block-editor-nux",contentLabel:Object(g.__)("Welcome to your website","full-site-editing"),finishButtonText:Object(g.__)("Get started","full-site-editing"),onFinish:function(){return o({isNuxEnabled:!1})}},function(e){return[{heading:Object(g.__)("Welcome to your website","full-site-editing"),description:Object(g.__)("Edit your homepage, add the pages you need, and change your site’s look and feel.","full-site-editing"),imgSrc:y.a,alignBottom:!0},{heading:Object(g.__)("Add or edit your content","full-site-editing"),description:Object(g.__)("Edit the placeholder content we’ve started you off with, or click the plus sign to add more content.","full-site-editing"),imgSrc:v.a},{heading:Object(g.__)("Preview your site as you go","full-site-editing"),description:Object(g.__)("As you edit your site content, click “Preview” to see your site the way your visitors will.","full-site-editing"),imgSrc:j.a,alignBottom:!0},{heading:Object(g.__)("Private until you’re ready","full-site-editing"),description:Object(g.__)("Your site will remain private as you make changes until you’re ready to launch and share with the world.","full-site-editing"),imgSrc:E.a,shouldHide:!e,alignBottom:!0}].filter((function(e){return!e.shouldHide}))}(r).map((function(e){return Object(b.createElement)(P,d()({key:e.heading},e))})))}function P(e){var t=e.alignBottom,n=void 0!==t&&t,i=e.heading,o=e.description,r=e.imgSrc;return Object(b.createElement)(m.GuidePage,{className:"wpcom-block-editor-nux__page"},Object(b.createElement)("div",{className:"wpcom-block-editor-nux__text"},Object(b.createElement)("h1",{className:"wpcom-block-editor-nux__heading"},i),Object(b.createElement)("div",{className:"wpcom-block-editor-nux__description"},o)),Object(b.createElement)("div",{className:"wpcom-block-editor-nux__visual"},Object(b.createElement)("img",{key:r,src:r,alt:"","aria-hidden":"true",className:"wpcom-block-editor-nux__image"+(n?" align-bottom":"")})))}m.Guide&&m.GuidePage&&Object(O.registerPlugin)("wpcom-block-editor-nux",{render:function(){return Object(b.createElement)(N,null)}})}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},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=17)}([function(e,t){!function(){e.exports=this.wp.data}()},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.wp.components}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){var i=n(13);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},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 i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){function n(e,t,n,i,o,r,c){try{var u=e[r](c),a=u.value}catch(s){return void n(s)}u.done?t(a):Promise.resolve(a).then(i,o)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise((function(o,r){var c=e.apply(t,i);function u(e){n(c,o,r,u,a,"next",e)}function a(e){n(c,o,r,u,a,"throw",e)}u(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){e.exports=n.p+"images/block-picker-53b676a08dd25f523d4adb0157a40b4c.svg"},function(e,t,n){e.exports=n.p+"images/editor-1a0c404dcc59d4a340edb4649127f4c9.svg"},function(e,t,n){e.exports=n.p+"images/preview-a2ab6dbfd49f58a76c13c9dab8b09e0e.svg"},function(e,t,n){e.exports=n.p+"images/private-598e2a26fcb0c685d165d750fdf02364.svg"},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.wp.nux}()},function(e,t,n){"object"==typeof window&&window.wpcomBlockEditorNuxAssetsUrl&&(n.p=window.wpcomBlockEditorNuxAssetsUrl)},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var i=n(5),o=n.n(i),r=n(4),c=n.n(r),u=n(0),a={setWpcomNuxStatus:function(e){var t=e.isNuxEnabled;return e.bypassApi||c()({path:"/wpcom/v2/block-editor/nux",method:"POST",data:{isNuxEnabled:t}}),{type:"WPCOM_BLOCK_EDITOR_NUX_SET_STATUS",isNuxEnabled:t}}};Object(u.registerStore)("automattic/nux",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,i=t.isNuxEnabled;return"WPCOM_BLOCK_EDITOR_NUX_SET_STATUS"===n?o()({},e,{isNuxEnabled:i}):e},actions:a,selectors:{isWpcomNuxEnabled:function(e){return e.isNuxEnabled}},persist:!0});n(14);var s=Object(u.subscribe)((function(){var e;Object(u.dispatch)("core/nux").disableTips(),(null===(e=Object(u.select)("core/edit-post"))||void 0===e?void 0:e.isFeatureActive("welcomeGuide"))&&Object(u.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),s()}));Object(u.subscribe)((function(){var e;Object(u.select)("core/nux").areTipsEnabled()&&(Object(u.dispatch)("core/nux").disableTips(),Object(u.dispatch)("automattic/nux").setWpcomNuxStatus({isNuxEnabled:!0})),(null===(e=Object(u.select)("core/edit-post"))||void 0===e?void 0:e.isFeatureActive("welcomeGuide"))&&(Object(u.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),Object(u.dispatch)("automattic/nux").setWpcomNuxStatus({isNuxEnabled:!0}))}));var l=n(6),d=n.n(l),p=n(7),f=n.n(p),b=n(1),m=(n(15),n(3)),g=n(2),O=n(8),v=(n(16),n(9)),x=n.n(v),h=n(10),y=n.n(h),w=n(11),j=n.n(w),_=n(12),E=n.n(_);function N(){var e,t=Object(u.useSelect)((function(e){return{isWpcomNuxEnabled:e("automattic/nux").isWpcomNuxEnabled(),isSPTOpen:e("automattic/starter-page-layouts")&&e("automattic/starter-page-layouts").isOpen()}})),n=t.isWpcomNuxEnabled,i=t.isSPTOpen,o=Object(u.useDispatch)("automattic/nux").setWpcomNuxStatus;if(Object(b.useEffect)((function(){void 0===n&&function(){var e=f()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c()({path:"/wpcom/v2/block-editor/nux"});case 2:t=e.sent,o({isNuxEnabled:t.is_nux_enabled,bypassApi:!0});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[n,o]),!n||i)return null;var r=!!(null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding);return Object(b.createElement)(m.Guide,{className:"wpcom-block-editor-nux",contentLabel:Object(g.__)("Welcome to your website","full-site-editing"),finishButtonText:Object(g.__)("Get started","full-site-editing"),onFinish:function(){return o({isNuxEnabled:!1})}},function(e){return[{heading:Object(g.__)("Welcome to your website","full-site-editing"),description:Object(g.__)("Edit your homepage, add the pages you need, and change your site’s look and feel.","full-site-editing"),imgSrc:y.a,alignBottom:!0},{heading:Object(g.__)("Add or edit your content","full-site-editing"),description:Object(g.__)("Edit the placeholder content we’ve started you off with, or click the plus sign to add more content.","full-site-editing"),imgSrc:x.a},{heading:Object(g.__)("Preview your site as you go","full-site-editing"),description:Object(g.__)("As you edit your site content, click “Preview” to see your site the way your visitors will.","full-site-editing"),imgSrc:j.a,alignBottom:!0},{heading:Object(g.__)("Private until you’re ready","full-site-editing"),description:Object(g.__)("Your site will remain private as you make changes until you’re ready to launch and share with the world.","full-site-editing"),imgSrc:E.a,shouldHide:!e,alignBottom:!0}].filter((function(e){return!e.shouldHide}))}(r).map((function(e){return Object(b.createElement)(P,d()({key:e.heading},e))})))}function P(e){var t=e.alignBottom,n=void 0!==t&&t,i=e.heading,o=e.description,r=e.imgSrc;return Object(b.createElement)(m.GuidePage,{className:"wpcom-block-editor-nux__page"},Object(b.createElement)("div",{className:"wpcom-block-editor-nux__text"},Object(b.createElement)("h1",{className:"wpcom-block-editor-nux__heading"},i),Object(b.createElement)("div",{className:"wpcom-block-editor-nux__description"},o)),Object(b.createElement)("div",{className:"wpcom-block-editor-nux__visual"},Object(b.createElement)("img",{key:r,src:r,alt:"","aria-hidden":"true",className:"wpcom-block-editor-nux__image"+(n?" align-bottom":"")})))}m.Guide&&m.GuidePage&&Object(O.registerPlugin)("wpcom-block-editor-nux",{render:function(){return Object(b.createElement)(N,null)}})}]));
wpcom-block-editor-nux/src/disable-core-nux.js CHANGED
@@ -8,7 +8,7 @@ import '@wordpress/nux'; //ensure nux store loads
8
  // Disable nux and welcome guide features from core.
9
  const unsubscribe = subscribe( () => {
10
  dispatch( 'core/nux' ).disableTips();
11
- if ( select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ) ) {
12
  dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' );
13
  }
14
  unsubscribe();
@@ -20,7 +20,7 @@ subscribe( () => {
20
  dispatch( 'core/nux' ).disableTips();
21
  dispatch( 'automattic/nux' ).setWpcomNuxStatus( { isNuxEnabled: true } );
22
  }
23
- if ( select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ) ) {
24
  dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' );
25
  dispatch( 'automattic/nux' ).setWpcomNuxStatus( { isNuxEnabled: true } );
26
  }
8
  // Disable nux and welcome guide features from core.
9
  const unsubscribe = subscribe( () => {
10
  dispatch( 'core/nux' ).disableTips();
11
+ if ( select( 'core/edit-post' )?.isFeatureActive( 'welcomeGuide' ) ) {
12
  dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' );
13
  }
14
  unsubscribe();
20
  dispatch( 'core/nux' ).disableTips();
21
  dispatch( 'automattic/nux' ).setWpcomNuxStatus( { isNuxEnabled: true } );
22
  }
23
+ if ( select( 'core/edit-post' )?.isFeatureActive( 'welcomeGuide' ) ) {
24
  dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' );
25
  dispatch( 'automattic/nux' ).setWpcomNuxStatus( { isNuxEnabled: true } );
26
  }