Groups - Version 2.8.0

Version Description

  • Added the Groups Members block: A block whose content is only visible for members of selected groups.
  • Added the Groups Non-Members block: a block whose content is hidden for members of chosen groups.
  • Removed use of parenthesis with require_once and include_once.

For the full changelog see changelog.txt.

=

Download this release

Release Info

Developer itthinx
Plugin Icon 128x128 Groups
Version 2.8.0
Comparing to
See all releases

Code changes from version 2.7.2 to 2.8.0

changelog.txt CHANGED
@@ -1,4 +1,9 @@
1
- == Groups by itthinx - changelog.txt ==
 
 
 
 
 
2
 
3
  = 2.7.2 =
4
  * Fixes an issue with page builders and front-end editing.
@@ -349,7 +354,7 @@ The performance improvements included in this release are lessened with caching
349
  * Fixed: Error caused by typo when obtaining group_ids_deep property for a Groups_User.
350
  * Changed: Replaced some __get calls by properties.
351
  * Added: Filter by access restriction capabilities for enabled post types on overview screens.
352
-
353
  = 1.4.1 =
354
  * Added: Better group-assignment on the Users admin screen, allows to assign/remove multiple users to/from multiple groups along with a better UI.
355
  * Changed: Groups requires at least WordPress 3.5 now, although this only affects the group-action functionality on the Users admin screen, the restrict_manage_users action which is now used to render the UI elements needed, was introduced with WordPress 3.5.
@@ -372,7 +377,7 @@ The performance improvements included in this release are lessened with caching
372
  * Added the quick-create field to the access restrictions meta-box which allows to create group & capability on the fly.
373
  * Added [Selectize.js](http://brianreavis.github.io/selectize.js/) and using it in the access restrictions meta-box instead of checkboxes.
374
  * Improved the Groups > Options screen using a Selectize-based selection of capabilities that are enabled for access restriction.
375
-
376
  = 1.3.13 =
377
  * Fixed duplicate postmeta created when saving access restriction capabilities for a post.
378
  * [groups_can] and [groups_can_not] now accept multiple capabilities separated by comma.
@@ -448,7 +453,7 @@ The performance improvements included in this release are lessened with caching
448
  * Added show="users" option to [groups_group_info] shortcode which lists user logins for users in a group - rather experimental as it doesn't offer any sorting, pagination, linking or other options
449
 
450
  = 1.2.3 =
451
- * New shortcode [groups_join group="..."] lets a user join the given group
452
  * New shortcode [groups_leave group="..."] lets a user leave the given group
453
 
454
  = 1.2.2 =
@@ -483,7 +488,7 @@ The performance improvements included in this release are lessened with caching
483
  * Multisite: Fixed (removed) conditions that would only make Groups act on public and non-mature sites
484
  * Multisite: Adding add/remove to group only on sites', not network users admin screen
485
  * Multisite: Added constraint in user_register hook checking if the user is a member of the blog
486
-
487
  = 1.1.0 =
488
  * Added Groups menu to network admin
489
  * Added option to delete plugin data for all sites on multisite installations; removed option for individual sites
@@ -492,7 +497,7 @@ The performance improvements included in this release are lessened with caching
492
 
493
  = 1.0.0-beta-3d =
494
  * Fixed issues caused by an excessively long index for the capability DB table.
495
- Some installations wouldn't work correctly, showing no capabilities and making it impossible to add new ones.
496
  * Taking into account blog charset/collation on newly created tables.
497
 
498
  = 1.0.0-beta-3c =
@@ -504,7 +509,7 @@ Some installations wouldn't work correctly, showing no capabilities and making i
504
 
505
  = 1.0.0-beta-3 =
506
  * Groups wouldn't activate due to a fatal error on WP <= 3.2.1 : is_user_member_of_blog() is defined in ms-functions.php
507
- * Added [groups_group_info] shortcode
508
 
509
  = 1.0.0-beta-2 =
510
  * Increased length of capability.capability, capability.class, capability.object columns to support long capabilities.
1
+ == Groups by itthinx - changelog.txt
2
+
3
+ = 2.8.0 =
4
+ * Added the Groups Members block: A block whose content is only visible for members of selected groups.
5
+ * Added the Groups Non-Members block: a block whose content is hidden for members of chosen groups.
6
+ * Removed use of parenthesis with require_once and include_once.
7
 
8
  = 2.7.2 =
9
  * Fixes an issue with page builders and front-end editing.
354
  * Fixed: Error caused by typo when obtaining group_ids_deep property for a Groups_User.
355
  * Changed: Replaced some __get calls by properties.
356
  * Added: Filter by access restriction capabilities for enabled post types on overview screens.
357
+
358
  = 1.4.1 =
359
  * Added: Better group-assignment on the Users admin screen, allows to assign/remove multiple users to/from multiple groups along with a better UI.
360
  * Changed: Groups requires at least WordPress 3.5 now, although this only affects the group-action functionality on the Users admin screen, the restrict_manage_users action which is now used to render the UI elements needed, was introduced with WordPress 3.5.
377
  * Added the quick-create field to the access restrictions meta-box which allows to create group & capability on the fly.
378
  * Added [Selectize.js](http://brianreavis.github.io/selectize.js/) and using it in the access restrictions meta-box instead of checkboxes.
379
  * Improved the Groups > Options screen using a Selectize-based selection of capabilities that are enabled for access restriction.
380
+
381
  = 1.3.13 =
382
  * Fixed duplicate postmeta created when saving access restriction capabilities for a post.
383
  * [groups_can] and [groups_can_not] now accept multiple capabilities separated by comma.
453
  * Added show="users" option to [groups_group_info] shortcode which lists user logins for users in a group - rather experimental as it doesn't offer any sorting, pagination, linking or other options
454
 
455
  = 1.2.3 =
456
+ * New shortcode [groups_join group="..."] lets a user join the given group
457
  * New shortcode [groups_leave group="..."] lets a user leave the given group
458
 
459
  = 1.2.2 =
488
  * Multisite: Fixed (removed) conditions that would only make Groups act on public and non-mature sites
489
  * Multisite: Adding add/remove to group only on sites', not network users admin screen
490
  * Multisite: Added constraint in user_register hook checking if the user is a member of the blog
491
+
492
  = 1.1.0 =
493
  * Added Groups menu to network admin
494
  * Added option to delete plugin data for all sites on multisite installations; removed option for individual sites
497
 
498
  = 1.0.0-beta-3d =
499
  * Fixed issues caused by an excessively long index for the capability DB table.
500
+ Some installations wouldn't work correctly, showing no capabilities and making it impossible to add new ones.
501
  * Taking into account blog charset/collation on newly created tables.
502
 
503
  = 1.0.0-beta-3c =
509
 
510
  = 1.0.0-beta-3 =
511
  * Groups wouldn't activate due to a fatal error on WP <= 3.2.1 : is_user_member_of_blog() is defined in ms-functions.php
512
+ * Added [groups_group_info] shortcode
513
 
514
  = 1.0.0-beta-2 =
515
  * Increased length of capability.capability, capability.class, capability.object columns to support long capabilities.
groups.php CHANGED
@@ -21,7 +21,7 @@
21
  * Plugin Name: Groups
22
  * Plugin URI: http://www.itthinx.com/plugins/groups
23
  * Description: Groups provides group-based user membership management, group-based capabilities and content access control.
24
- * Version: 2.7.2
25
  * Author: itthinx
26
  * Author URI: http://www.itthinx.com
27
  * Donate-Link: http://www.itthinx.com
@@ -32,7 +32,7 @@
32
  if ( !defined( 'ABSPATH' ) ) {
33
  exit;
34
  }
35
- define( 'GROUPS_CORE_VERSION', '2.7.2' );
36
  define( 'GROUPS_FILE', __FILE__ );
37
  if ( !defined( 'GROUPS_CORE_DIR' ) ) {
38
  define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
@@ -58,11 +58,14 @@ if ( !defined( 'GROUPS_WP_LIB' ) ) {
58
  if ( !defined( 'GROUPS_EXTRA_LIB' ) ) {
59
  define( 'GROUPS_EXTRA_LIB', GROUPS_CORE_DIR . '/lib/extra' );
60
  }
 
 
 
61
  if ( !defined( 'GROUPS_LEGACY_LIB' ) ) {
62
  define( 'GROUPS_LEGACY_LIB', GROUPS_CORE_DIR . '/legacy' );
63
  }
64
  if ( !defined( 'GROUPS_CORE_URL' ) ) {
65
  define( 'GROUPS_CORE_URL', plugins_url( 'groups' ) );
66
  }
67
- require_once( GROUPS_CORE_LIB . '/constants.php' );
68
- require_once( GROUPS_CORE_LIB . '/wp-init.php');
21
  * Plugin Name: Groups
22
  * Plugin URI: http://www.itthinx.com/plugins/groups
23
  * Description: Groups provides group-based user membership management, group-based capabilities and content access control.
24
+ * Version: 2.8.0
25
  * Author: itthinx
26
  * Author URI: http://www.itthinx.com
27
  * Donate-Link: http://www.itthinx.com
32
  if ( !defined( 'ABSPATH' ) ) {
33
  exit;
34
  }
35
+ define( 'GROUPS_CORE_VERSION', '2.8.0' );
36
  define( 'GROUPS_FILE', __FILE__ );
37
  if ( !defined( 'GROUPS_CORE_DIR' ) ) {
38
  define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
58
  if ( !defined( 'GROUPS_EXTRA_LIB' ) ) {
59
  define( 'GROUPS_EXTRA_LIB', GROUPS_CORE_DIR . '/lib/extra' );
60
  }
61
+ if ( !defined( 'GROUPS_BLOCKS_LIB' ) ) {
62
+ define( 'GROUPS_BLOCKS_LIB', GROUPS_CORE_DIR . '/lib/blocks' );
63
+ }
64
  if ( !defined( 'GROUPS_LEGACY_LIB' ) ) {
65
  define( 'GROUPS_LEGACY_LIB', GROUPS_CORE_DIR . '/legacy' );
66
  }
67
  if ( !defined( 'GROUPS_CORE_URL' ) ) {
68
  define( 'GROUPS_CORE_URL', plugins_url( 'groups' ) );
69
  }
70
+ require_once GROUPS_CORE_LIB . '/constants.php';
71
+ require_once GROUPS_CORE_LIB . '/wp-init.php';
languages/groups-de_DE.mo CHANGED
Binary file
languages/groups-de_DE.po CHANGED
@@ -7,8 +7,8 @@ msgid ""
7
  msgstr ""
8
  "Project-Id-Version: \n"
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2019-05-08 21:00+0200\n"
11
- "PO-Revision-Date: 2019-05-08 21:01+0200\n"
12
  "Last-Translator: Karim\n"
13
  "Language-Team: itthinx.com\n"
14
  "Language: de_DE\n"
@@ -16,7 +16,7 @@ msgstr ""
16
  "Content-Type: text/plain; charset=UTF-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
- "X-Generator: Poedit 2.2.1\n"
20
 
21
  #: lib/core/class-groups-pagination.php:140
22
  #, php-format
@@ -228,10 +228,10 @@ msgstr ""
228
  "Weitere Verbesserungen umschließen Gruppenfilter und einen reduzierten "
229
  "Eindruck bei der Benutzerverwaltung."
230
 
231
- #: lib/access/class-groups-access-meta-boxes.php:214
232
- #: lib/access/class-groups-access-meta-boxes.php:215
233
- #: lib/access/class-groups-access-meta-boxes.php:448
234
- #: lib/access/class-groups-access-meta-boxes.php:449
235
  msgid "Anyone &hellip;"
236
  msgstr "Jeder &hellip;"
237
 
@@ -374,7 +374,7 @@ msgstr ""
374
  "Instant-Kästchen verwenden, um eine Gruppe und zugehörige Kapazität spontan "
375
  "zu erstellen."
376
 
377
- #: lib/access/class-groups-access-meta-boxes.php:141
378
  msgid ""
379
  "Choose or enter <em>Premium</em> in the <em>Read</em> field located in the "
380
  "<em>Groups</em> box and save or update the post (or hit Enter)."
@@ -506,7 +506,7 @@ msgstr ""
506
  "Aktualisieren Sie den Beitrag."
507
 
508
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:135
509
- #: lib/access/class-groups-access-meta-boxes.php:135
510
  msgid "Example:"
511
  msgstr "Beispiel:"
512
 
@@ -587,7 +587,7 @@ msgstr "Gruppenname"
587
  msgid "Group Name : %s"
588
  msgstr "Gruppenname : %s"
589
 
590
- #: lib/access/class-groups-access-meta-boxes.php:476
591
  msgctxt "Attachment field label"
592
  msgid "Groups"
593
  msgstr "Gruppen"
@@ -622,12 +622,12 @@ msgctxt "Groups section heading (user profile)"
622
  msgid "Groups"
623
  msgstr "Gruppen"
624
 
625
- #: lib/access/class-groups-access-meta-boxes.php:120
626
  msgctxt "Help heading"
627
  msgid "Groups"
628
  msgstr "Gruppen"
629
 
630
- #: lib/access/class-groups-access-meta-boxes.php:117
631
  msgctxt "Help tab title"
632
  msgid "Groups"
633
  msgstr "Gruppen"
@@ -642,7 +642,7 @@ msgctxt "Help title"
642
  msgid "Groups"
643
  msgstr "Gruppen"
644
 
645
- #: lib/access/class-groups-access-meta-boxes.php:103
646
  msgctxt "Meta box title"
647
  msgid "Groups"
648
  msgstr "Gruppen"
@@ -689,6 +689,14 @@ msgstr "Groups Add-Ons"
689
  msgid "Groups Capabilities"
690
  msgstr "Gruppenkapazitäten"
691
 
 
 
 
 
 
 
 
 
692
  #: lib/admin/groups-admin-options.php:120
693
  msgid "Groups Options"
694
  msgstr "Groups Optionen"
@@ -713,6 +721,10 @@ msgstr ""
713
  "Hier können Sie Gruppen <strong>hinzufügen</strong>, <strong>bearbeiten</"
714
  "strong> und <strong>löschen</strong>."
715
 
 
 
 
 
716
  #: lib/admin/class-groups-admin-notice.php:138
717
  msgid "I have already done that."
718
  msgstr "Das habe ich bereits getan."
@@ -759,7 +771,7 @@ msgstr "Wichtig"
759
  msgid "Improved User Interface"
760
  msgstr "Verbesserte Benutzeroberfläche"
761
 
762
- #: lib/access/class-groups-access-meta-boxes.php:145
763
  msgid ""
764
  "In the same field, you can create a new group and restrict access. Group "
765
  "names are case-sensitive. In order to be able to use the new group, your "
@@ -809,7 +821,7 @@ msgid "Legacy Settings"
809
  msgstr "Legacy Einstellungen"
810
 
811
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:137
812
- #: lib/access/class-groups-access-meta-boxes.php:137
813
  msgid ""
814
  "Let's assume that you want to limit the visibility of a post to members of "
815
  "the <em>Premium</em> group."
@@ -817,16 +829,21 @@ msgstr ""
817
  "Angenommen Sie wollen einen Beitrag nur Mitgliedern der <em>Premium</em> "
818
  "Gruppe sichtbar machen."
819
 
 
 
 
 
 
820
  #: lib/views/class-groups-shortcodes.php:121
821
  msgid "Log out"
822
  msgstr "Abmelden"
823
 
824
  #: lib/admin/class-groups-admin-notice.php:131
825
  msgid "Many thanks for using <strong>Groups</strong>!"
826
- msgstr "Vielen Dank das Sie <strong>Groups</strong> verwenden!"
827
 
828
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:503
829
- #: lib/access/class-groups-access-meta-boxes.php:416
830
  msgid "Media"
831
  msgstr "Medien"
832
 
@@ -905,7 +922,7 @@ msgstr ""
905
  "Beachten Sie, dass Sie Mitglied einer Gruppe die diese Kapazität hat sein "
906
  "müssen."
907
 
908
- #: lib/access/class-groups-access-meta-boxes.php:129
909
  msgid "Note that you must be a member of a group to use it to restrict access."
910
  msgstr ""
911
  "Es ist zu beachten dass man Mitglied einer Gruppe sein muss, um diese zur "
@@ -1036,7 +1053,7 @@ msgstr ""
1036
  "document/groups/\">Dokumentation</a> für Details über die Umstellung und "
1037
  "Benutzung der neuen Zugriffsbeschränkungen."
1038
 
1039
- #: lib/access/class-groups-access-meta-boxes.php:472
1040
  #, php-format
1041
  msgid ""
1042
  "Please use <a href=\"%s\" target=\"_blank\">Groups File Access</a> for files "
@@ -1046,7 +1063,7 @@ msgstr ""
1046
  "target=\"_blank\">Groups File Access</a> verwenden."
1047
 
1048
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:189
1049
- #: lib/access/class-groups-access-meta-boxes.php:171
1050
  msgid "Post"
1051
  msgstr "Beitrag"
1052
 
@@ -1070,8 +1087,8 @@ msgstr "Inhalte Einfach Schützen"
1070
  msgid "Quick-create group &amp; capability"
1071
  msgstr "Instant Gruppe &amp; Kapazität"
1072
 
1073
- #: lib/access/class-groups-access-meta-boxes.php:208
1074
- #: lib/access/class-groups-access-meta-boxes.php:418
1075
  msgid "Read"
1076
  msgstr "Lesen"
1077
 
@@ -1147,13 +1164,13 @@ msgstr "Beschränkung entfernen"
1147
  msgid "Restrict Access"
1148
  msgstr "Zugang Beschränken"
1149
 
1150
- #: lib/access/class-groups-access-meta-boxes.php:234
1151
  #, php-format
1152
  msgid "Restricts the visibility of this %s to members of the chosen groups."
1153
  msgstr ""
1154
  "Beschränkt die %s-Sichtbarkeit auf Mitglieder der ausgewählten Gruppen."
1155
 
1156
- #: lib/access/class-groups-access-meta-boxes.php:466
1157
  msgid "Restricts the visibility of this entry to members of the chosen groups."
1158
  msgstr ""
1159
  "Beschränkt die Sichtbarkeit dieses Eintrags auf Mitglieder der ausgewählten "
@@ -1180,6 +1197,10 @@ msgstr "Speichern"
1180
  msgid "Show access restrictions for these post types."
1181
  msgstr "Zugangsbeschränkungen für diese Beitragstypen zeigen."
1182
 
 
 
 
 
1183
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:277
1184
  msgid "Show groups"
1185
  msgstr "Gruppen zeigen"
@@ -1279,7 +1300,7 @@ msgstr "Die <em>Kapazität</em> darf nicht leer sein."
1279
  msgid "The <em>Name</em> must not be empty."
1280
  msgstr "Der <em>Name</em> darf nicht leer sein."
1281
 
1282
- #: lib/access/class-groups-access-meta-boxes.php:470
1283
  msgid ""
1284
  "The attachment page is restricted to authorized users, but due to technical "
1285
  "limitations, the file can still be accessed directly via its URL."
@@ -1439,7 +1460,7 @@ msgstr ""
1439
  "Verwenden Sie das Kästchen <em>Zugangsbeschränkungen</em> um die "
1440
  "Sichtbarkeit von Beiträgen, Seiten und anderen Beitragstypen einzuschränken."
1441
 
1442
- #: lib/access/class-groups-access-meta-boxes.php:123
1443
  msgid ""
1444
  "Use the <em>Groups</em> box to limit the visibility of posts, pages and "
1445
  "other post types."
@@ -1579,13 +1600,13 @@ msgstr ""
1579
  "aktiviert. Um die Kapazität verwenden zu können, wird ihr Benutzerkonto der "
1580
  "Gruppe hinzugefügt."
1581
 
1582
- #: lib/access/class-groups-access-meta-boxes.php:201
1583
- #: lib/access/class-groups-access-meta-boxes.php:451
1584
  msgid "You can create a new group by indicating the group's name."
1585
  msgstr ""
1586
  "Eine neue Gruppe kann erstellt werden indem man den Namen der Gruppe eingibt."
1587
 
1588
- #: lib/access/class-groups-access-meta-boxes.php:195
1589
  #, php-format
1590
  msgid ""
1591
  "You can restrict the visibility of this %1$s to group members. Choose one or "
@@ -1596,7 +1617,7 @@ msgstr ""
1596
  "oder mehrere Gruppen auswählen die diese/n/s %2$s lesen dürfen. Werden keine "
1597
  "Gruppen ausgewählt dann ist diese/r/s %3$s für alle sichtbar."
1598
 
1599
- #: lib/access/class-groups-access-meta-boxes.php:450
1600
  msgid ""
1601
  "You can restrict the visibility to group members. Choose one or more groups "
1602
  "to restrict access. If no groups are chosen, this entry is visible to anyone."
@@ -1613,14 +1634,15 @@ msgstr ""
1613
  "Sie können eine oder mehrere Kapazitäten auswählen die zur "
1614
  "Zugriffsbeschränkung aktiviert sind."
1615
 
1616
- #: lib/access/class-groups-access-meta-boxes.php:126
1617
  msgid "You can select one or more groups to restrict access to its members."
1618
  msgstr ""
1619
  "Es kann eine oder mehrere Gruppen ausgewählt werden um den Zugriff auf ihre "
1620
  "Mitglieder einzuschränken."
1621
 
1622
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:290
1623
- #: lib/access/class-groups-access-meta-boxes.php:241
 
1624
  msgid "You cannot set any access restrictions."
1625
  msgstr "Sie können keine Zugriffsbeschränkungen setzen."
1626
 
@@ -1642,7 +1664,7 @@ msgstr ""
1642
  "Sie müssen in einer Gruppe sein die zumindest eine Kapazität hat die zur "
1643
  "Zugriffsbeschränkung aktiviert ist."
1644
 
1645
- #: lib/access/class-groups-access-meta-boxes.php:247
1646
  msgid "You need to have permission to set access restrictions."
1647
  msgstr ""
1648
  "Man benötigt die entsprechenden Rechte um Zugriffsbeschränkungen setzen zu "
@@ -1656,6 +1678,21 @@ msgstr ""
1656
  "Man sollte stattdessen Groups_Post_Access_Legacy::create() verwenden um eine "
1657
  "beschränkende Kapazität weiterzugeben."
1658
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1659
  #~ msgid "Capability Id"
1660
  #~ msgstr "Kapazitäts-Id"
1661
 
7
  msgstr ""
8
  "Project-Id-Version: \n"
9
  "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2019-07-20 22:16+0200\n"
11
+ "PO-Revision-Date: 2019-07-20 22:19+0200\n"
12
  "Last-Translator: Karim\n"
13
  "Language-Team: itthinx.com\n"
14
  "Language: de_DE\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+ "X-Generator: Poedit 2.2.3\n"
20
 
21
  #: lib/core/class-groups-pagination.php:140
22
  #, php-format
228
  "Weitere Verbesserungen umschließen Gruppenfilter und einen reduzierten "
229
  "Eindruck bei der Benutzerverwaltung."
230
 
231
+ #: lib/access/class-groups-access-meta-boxes.php:228
232
+ #: lib/access/class-groups-access-meta-boxes.php:229
233
+ #: lib/access/class-groups-access-meta-boxes.php:462
234
+ #: lib/access/class-groups-access-meta-boxes.php:463
235
  msgid "Anyone &hellip;"
236
  msgstr "Jeder &hellip;"
237
 
374
  "Instant-Kästchen verwenden, um eine Gruppe und zugehörige Kapazität spontan "
375
  "zu erstellen."
376
 
377
+ #: lib/access/class-groups-access-meta-boxes.php:153
378
  msgid ""
379
  "Choose or enter <em>Premium</em> in the <em>Read</em> field located in the "
380
  "<em>Groups</em> box and save or update the post (or hit Enter)."
506
  "Aktualisieren Sie den Beitrag."
507
 
508
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:135
509
+ #: lib/access/class-groups-access-meta-boxes.php:143
510
  msgid "Example:"
511
  msgstr "Beispiel:"
512
 
587
  msgid "Group Name : %s"
588
  msgstr "Gruppenname : %s"
589
 
590
+ #: lib/access/class-groups-access-meta-boxes.php:490
591
  msgctxt "Attachment field label"
592
  msgid "Groups"
593
  msgstr "Gruppen"
622
  msgid "Groups"
623
  msgstr "Gruppen"
624
 
625
+ #: lib/access/class-groups-access-meta-boxes.php:125
626
  msgctxt "Help heading"
627
  msgid "Groups"
628
  msgstr "Gruppen"
629
 
630
+ #: lib/access/class-groups-access-meta-boxes.php:122
631
  msgctxt "Help tab title"
632
  msgid "Groups"
633
  msgstr "Gruppen"
642
  msgid "Groups"
643
  msgstr "Gruppen"
644
 
645
+ #: lib/access/class-groups-access-meta-boxes.php:108
646
  msgctxt "Meta box title"
647
  msgid "Groups"
648
  msgstr "Gruppen"
689
  msgid "Groups Capabilities"
690
  msgstr "Gruppenkapazitäten"
691
 
692
+ #: lib/blocks/src/blocks/groups-member/block.js:173
693
+ msgid "Groups Member Block"
694
+ msgstr "Groups Mitglieder Block"
695
+
696
+ #: lib/blocks/src/blocks/groups-non-member/block.js:133
697
+ msgid "Groups Non-member Block"
698
+ msgstr "Groups nicht-Mitglieder Block"
699
+
700
  #: lib/admin/groups-admin-options.php:120
701
  msgid "Groups Options"
702
  msgstr "Groups Optionen"
721
  "Hier können Sie Gruppen <strong>hinzufügen</strong>, <strong>bearbeiten</"
722
  "strong> und <strong>löschen</strong>."
723
 
724
+ #: lib/blocks/src/blocks/groups-non-member/block.js:134
725
+ msgid "Hide content from group members"
726
+ msgstr "Inhalt vor Gruppenmitgliedern verbergen"
727
+
728
  #: lib/admin/class-groups-admin-notice.php:138
729
  msgid "I have already done that."
730
  msgstr "Das habe ich bereits getan."
771
  msgid "Improved User Interface"
772
  msgstr "Verbesserte Benutzeroberfläche"
773
 
774
+ #: lib/access/class-groups-access-meta-boxes.php:159
775
  msgid ""
776
  "In the same field, you can create a new group and restrict access. Group "
777
  "names are case-sensitive. In order to be able to use the new group, your "
821
  msgstr "Legacy Einstellungen"
822
 
823
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:137
824
+ #: lib/access/class-groups-access-meta-boxes.php:146
825
  msgid ""
826
  "Let's assume that you want to limit the visibility of a post to members of "
827
  "the <em>Premium</em> group."
829
  "Angenommen Sie wollen einen Beitrag nur Mitgliedern der <em>Premium</em> "
830
  "Gruppe sichtbar machen."
831
 
832
+ #: lib/blocks/src/blocks/groups-member/block.js:240
833
+ #: lib/blocks/src/blocks/groups-non-member/block.js:177
834
+ msgid "Loading..."
835
+ msgstr "Lade..."
836
+
837
  #: lib/views/class-groups-shortcodes.php:121
838
  msgid "Log out"
839
  msgstr "Abmelden"
840
 
841
  #: lib/admin/class-groups-admin-notice.php:131
842
  msgid "Many thanks for using <strong>Groups</strong>!"
843
+ msgstr "Vielen Dank, dass Sie <strong>Groups</strong> verwenden!"
844
 
845
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:503
846
+ #: lib/access/class-groups-access-meta-boxes.php:430
847
  msgid "Media"
848
  msgstr "Medien"
849
 
922
  "Beachten Sie, dass Sie Mitglied einer Gruppe die diese Kapazität hat sein "
923
  "müssen."
924
 
925
+ #: lib/access/class-groups-access-meta-boxes.php:137
926
  msgid "Note that you must be a member of a group to use it to restrict access."
927
  msgstr ""
928
  "Es ist zu beachten dass man Mitglied einer Gruppe sein muss, um diese zur "
1053
  "document/groups/\">Dokumentation</a> für Details über die Umstellung und "
1054
  "Benutzung der neuen Zugriffsbeschränkungen."
1055
 
1056
+ #: lib/access/class-groups-access-meta-boxes.php:486
1057
  #, php-format
1058
  msgid ""
1059
  "Please use <a href=\"%s\" target=\"_blank\">Groups File Access</a> for files "
1063
  "target=\"_blank\">Groups File Access</a> verwenden."
1064
 
1065
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:189
1066
+ #: lib/access/class-groups-access-meta-boxes.php:185
1067
  msgid "Post"
1068
  msgstr "Beitrag"
1069
 
1087
  msgid "Quick-create group &amp; capability"
1088
  msgstr "Instant Gruppe &amp; Kapazität"
1089
 
1090
+ #: lib/access/class-groups-access-meta-boxes.php:222
1091
+ #: lib/access/class-groups-access-meta-boxes.php:432
1092
  msgid "Read"
1093
  msgstr "Lesen"
1094
 
1164
  msgid "Restrict Access"
1165
  msgstr "Zugang Beschränken"
1166
 
1167
+ #: lib/access/class-groups-access-meta-boxes.php:248
1168
  #, php-format
1169
  msgid "Restricts the visibility of this %s to members of the chosen groups."
1170
  msgstr ""
1171
  "Beschränkt die %s-Sichtbarkeit auf Mitglieder der ausgewählten Gruppen."
1172
 
1173
+ #: lib/access/class-groups-access-meta-boxes.php:480
1174
  msgid "Restricts the visibility of this entry to members of the chosen groups."
1175
  msgstr ""
1176
  "Beschränkt die Sichtbarkeit dieses Eintrags auf Mitglieder der ausgewählten "
1197
  msgid "Show access restrictions for these post types."
1198
  msgstr "Zugangsbeschränkungen für diese Beitragstypen zeigen."
1199
 
1200
+ #: lib/blocks/src/blocks/groups-member/block.js:174
1201
+ msgid "Show content for group members"
1202
+ msgstr "Inhalt Gruppenmitgliedern anzeigen"
1203
+
1204
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:277
1205
  msgid "Show groups"
1206
  msgstr "Gruppen zeigen"
1300
  msgid "The <em>Name</em> must not be empty."
1301
  msgstr "Der <em>Name</em> darf nicht leer sein."
1302
 
1303
+ #: lib/access/class-groups-access-meta-boxes.php:484
1304
  msgid ""
1305
  "The attachment page is restricted to authorized users, but due to technical "
1306
  "limitations, the file can still be accessed directly via its URL."
1460
  "Verwenden Sie das Kästchen <em>Zugangsbeschränkungen</em> um die "
1461
  "Sichtbarkeit von Beiträgen, Seiten und anderen Beitragstypen einzuschränken."
1462
 
1463
+ #: lib/access/class-groups-access-meta-boxes.php:129
1464
  msgid ""
1465
  "Use the <em>Groups</em> box to limit the visibility of posts, pages and "
1466
  "other post types."
1600
  "aktiviert. Um die Kapazität verwenden zu können, wird ihr Benutzerkonto der "
1601
  "Gruppe hinzugefügt."
1602
 
1603
+ #: lib/access/class-groups-access-meta-boxes.php:215
1604
+ #: lib/access/class-groups-access-meta-boxes.php:465
1605
  msgid "You can create a new group by indicating the group's name."
1606
  msgstr ""
1607
  "Eine neue Gruppe kann erstellt werden indem man den Namen der Gruppe eingibt."
1608
 
1609
+ #: lib/access/class-groups-access-meta-boxes.php:209
1610
  #, php-format
1611
  msgid ""
1612
  "You can restrict the visibility of this %1$s to group members. Choose one or "
1617
  "oder mehrere Gruppen auswählen die diese/n/s %2$s lesen dürfen. Werden keine "
1618
  "Gruppen ausgewählt dann ist diese/r/s %3$s für alle sichtbar."
1619
 
1620
+ #: lib/access/class-groups-access-meta-boxes.php:464
1621
  msgid ""
1622
  "You can restrict the visibility to group members. Choose one or more groups "
1623
  "to restrict access. If no groups are chosen, this entry is visible to anyone."
1634
  "Sie können eine oder mehrere Kapazitäten auswählen die zur "
1635
  "Zugriffsbeschränkung aktiviert sind."
1636
 
1637
+ #: lib/access/class-groups-access-meta-boxes.php:134
1638
  msgid "You can select one or more groups to restrict access to its members."
1639
  msgstr ""
1640
  "Es kann eine oder mehrere Gruppen ausgewählt werden um den Zugriff auf ihre "
1641
  "Mitglieder einzuschränken."
1642
 
1643
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:290
1644
+ #: lib/access/class-groups-access-meta-boxes.php:255
1645
+ #: lib/blocks/src/class-groups-blocks.php:79
1646
  msgid "You cannot set any access restrictions."
1647
  msgstr "Sie können keine Zugriffsbeschränkungen setzen."
1648
 
1664
  "Sie müssen in einer Gruppe sein die zumindest eine Kapazität hat die zur "
1665
  "Zugriffsbeschränkung aktiviert ist."
1666
 
1667
+ #: lib/access/class-groups-access-meta-boxes.php:261
1668
  msgid "You need to have permission to set access restrictions."
1669
  msgstr ""
1670
  "Man benötigt die entsprechenden Rechte um Zugriffsbeschränkungen setzen zu "
1678
  "Man sollte stattdessen Groups_Post_Access_Legacy::create() verwenden um eine "
1679
  "beschränkende Kapazität weiterzugeben."
1680
 
1681
+ #: lib/blocks/src/blocks/groups-member/block.js:177
1682
+ #: lib/blocks/src/blocks/groups-non-member/block.js:137
1683
+ msgid "access"
1684
+ msgstr "Zugang"
1685
+
1686
+ #: lib/blocks/src/blocks/groups-member/block.js:177
1687
+ #: lib/blocks/src/blocks/groups-non-member/block.js:137
1688
+ msgid "groups"
1689
+ msgstr "Gruppen"
1690
+
1691
+ #: lib/blocks/src/blocks/groups-member/block.js:177
1692
+ #: lib/blocks/src/blocks/groups-non-member/block.js:137
1693
+ msgid "members"
1694
+ msgstr "Mitglieder"
1695
+
1696
  #~ msgid "Capability Id"
1697
  #~ msgstr "Kapazitäts-Id"
1698
 
languages/groups.pot CHANGED
@@ -7,7 +7,7 @@
7
  msgid ""
8
  msgstr "Project-Id-Version: PACKAGE VERSION\n"
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2019-05-08 21:00+0200\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -212,10 +212,10 @@ msgid "Another improvement is better filtering by groups and a reduced "
212
  "footprint on the Users admin screen."
213
  msgstr ""
214
 
215
- #: lib/access/class-groups-access-meta-boxes.php:214
216
- #: lib/access/class-groups-access-meta-boxes.php:215
217
- #: lib/access/class-groups-access-meta-boxes.php:448
218
- #: lib/access/class-groups-access-meta-boxes.php:449
219
  msgid "Anyone &hellip;"
220
  msgstr ""
221
 
@@ -336,7 +336,7 @@ msgid "Choose one or more capabilities to restrict access. Groups that "
336
  "the fly."
337
  msgstr ""
338
 
339
- #: lib/access/class-groups-access-meta-boxes.php:141
340
  msgid "Choose or enter <em>Premium</em> in the <em>Read</em> field located "
341
  "in the <em>Groups</em> box and save or update the post (or hit "
342
  "Enter)."
@@ -446,7 +446,7 @@ msgid "Enter <em>Premium</em> in the quick-create field located in the "
446
  msgstr ""
447
 
448
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:135
449
- #: lib/access/class-groups-access-meta-boxes.php:135
450
  msgid "Example:"
451
  msgstr ""
452
 
@@ -516,7 +516,7 @@ msgstr ""
516
  msgid "Group Name : %s"
517
  msgstr ""
518
 
519
- #: lib/access/class-groups-access-meta-boxes.php:476
520
  msgctxt "Attachment field label"
521
  msgid "Groups"
522
  msgstr ""
@@ -551,12 +551,12 @@ msgctxt "Groups section heading (user profile)"
551
  msgid "Groups"
552
  msgstr ""
553
 
554
- #: lib/access/class-groups-access-meta-boxes.php:120
555
  msgctxt "Help heading"
556
  msgid "Groups"
557
  msgstr ""
558
 
559
- #: lib/access/class-groups-access-meta-boxes.php:117
560
  msgctxt "Help tab title"
561
  msgid "Groups"
562
  msgstr ""
@@ -571,7 +571,7 @@ msgctxt "Help title"
571
  msgid "Groups"
572
  msgstr ""
573
 
574
- #: lib/access/class-groups-access-meta-boxes.php:103
575
  msgctxt "Meta box title"
576
  msgid "Groups"
577
  msgstr ""
@@ -615,6 +615,14 @@ msgstr ""
615
  msgid "Groups Capabilities"
616
  msgstr ""
617
 
 
 
 
 
 
 
 
 
618
  #: lib/admin/groups-admin-options.php:120
619
  msgid "Groups Options"
620
  msgstr ""
@@ -636,6 +644,10 @@ msgid "Here you can <strong>add</strong>, <strong>edit</strong> and "
636
  "<strong>remove</strong> groups."
637
  msgstr ""
638
 
 
 
 
 
639
  #: lib/admin/class-groups-admin-notice.php:138
640
  msgid "I have already done that."
641
  msgstr ""
@@ -671,7 +683,7 @@ msgstr ""
671
  msgid "Improved User Interface"
672
  msgstr ""
673
 
674
- #: lib/access/class-groups-access-meta-boxes.php:145
675
  msgid "In the same field, you can create a new group and restrict access. "
676
  "Group names are case-sensitive. In order to be able to use the new "
677
  "group, your user account will be assigned to it."
@@ -710,11 +722,16 @@ msgid "Legacy Settings"
710
  msgstr ""
711
 
712
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:137
713
- #: lib/access/class-groups-access-meta-boxes.php:137
714
  msgid "Let's assume that you want to limit the visibility of a post to "
715
  "members of the <em>Premium</em> group."
716
  msgstr ""
717
 
 
 
 
 
 
718
  #: lib/views/class-groups-shortcodes.php:121
719
  msgid "Log out"
720
  msgstr ""
@@ -724,7 +741,7 @@ msgid "Many thanks for using <strong>Groups</strong>!"
724
  msgstr ""
725
 
726
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:503
727
- #: lib/access/class-groups-access-meta-boxes.php:416
728
  msgid "Media"
729
  msgstr ""
730
 
@@ -793,7 +810,7 @@ msgid "Note that you must be a member of a group that has such a capability "
793
  "assigned."
794
  msgstr ""
795
 
796
- #: lib/access/class-groups-access-meta-boxes.php:129
797
  msgid "Note that you must be a member of a group to use it to restrict "
798
  "access."
799
  msgstr ""
@@ -895,14 +912,14 @@ msgid "Please refer to the <a target=\"_blank\" href=\"http://docs.itthinx."
895
  "switch to and use the new access restrictions."
896
  msgstr ""
897
 
898
- #: lib/access/class-groups-access-meta-boxes.php:472
899
  #, php-format
900
  msgid "Please use <a href=\"%s\" target=\"_blank\">Groups File Access</a> "
901
  "for files that require complete protection."
902
  msgstr ""
903
 
904
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:189
905
- #: lib/access/class-groups-access-meta-boxes.php:171
906
  msgid "Post"
907
  msgstr ""
908
 
@@ -923,8 +940,8 @@ msgstr ""
923
  msgid "Quick-create group &amp; capability"
924
  msgstr ""
925
 
926
- #: lib/access/class-groups-access-meta-boxes.php:208
927
- #: lib/access/class-groups-access-meta-boxes.php:418
928
  msgid "Read"
929
  msgstr ""
930
 
@@ -1000,12 +1017,12 @@ msgstr ""
1000
  msgid "Restrict Access"
1001
  msgstr ""
1002
 
1003
- #: lib/access/class-groups-access-meta-boxes.php:234
1004
  #, php-format
1005
  msgid "Restricts the visibility of this %s to members of the chosen groups."
1006
  msgstr ""
1007
 
1008
- #: lib/access/class-groups-access-meta-boxes.php:466
1009
  msgid "Restricts the visibility of this entry to members of the chosen "
1010
  "groups."
1011
  msgstr ""
@@ -1031,6 +1048,10 @@ msgstr ""
1031
  msgid "Show access restrictions for these post types."
1032
  msgstr ""
1033
 
 
 
 
 
1034
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:277
1035
  msgid "Show groups"
1036
  msgstr ""
@@ -1119,7 +1140,7 @@ msgstr ""
1119
  msgid "The <em>Name</em> must not be empty."
1120
  msgstr ""
1121
 
1122
- #: lib/access/class-groups-access-meta-boxes.php:470
1123
  msgid "The attachment page is restricted to authorized users, but due to "
1124
  "technical limitations, the file can still be accessed directly via "
1125
  "its URL."
@@ -1246,7 +1267,7 @@ msgid "Use the <em>Access restrictions</em> box to limit the visibility of "
1246
  "posts, pages and other post types."
1247
  msgstr ""
1248
 
1249
- #: lib/access/class-groups-access-meta-boxes.php:123
1250
  msgid "Use the <em>Groups</em> box to limit the visibility of posts, pages "
1251
  "and other post types."
1252
  msgstr ""
@@ -1351,19 +1372,19 @@ msgid "You can create a new group and capability here. The capability will "
1351
  "will be assigned to the group."
1352
  msgstr ""
1353
 
1354
- #: lib/access/class-groups-access-meta-boxes.php:201
1355
- #: lib/access/class-groups-access-meta-boxes.php:451
1356
  msgid "You can create a new group by indicating the group's name."
1357
  msgstr ""
1358
 
1359
- #: lib/access/class-groups-access-meta-boxes.php:195
1360
  #, php-format
1361
  msgid "You can restrict the visibility of this %1$s to group members. "
1362
  "Choose one or more groups that are allowed to read this %2$s. If no "
1363
  "groups are chosen, the %3$s is visible to anyone."
1364
  msgstr ""
1365
 
1366
- #: lib/access/class-groups-access-meta-boxes.php:450
1367
  msgid "You can restrict the visibility to group members. Choose one or more "
1368
  "groups to restrict access. If no groups are chosen, this entry is "
1369
  "visible to anyone."
@@ -1374,12 +1395,13 @@ msgid "You can select one or more capabilities that are enabled for access "
1374
  "restriction."
1375
  msgstr ""
1376
 
1377
- #: lib/access/class-groups-access-meta-boxes.php:126
1378
  msgid "You can select one or more groups to restrict access to its members."
1379
  msgstr ""
1380
 
1381
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:290
1382
- #: lib/access/class-groups-access-meta-boxes.php:241
 
1383
  msgid "You cannot set any access restrictions."
1384
  msgstr ""
1385
 
@@ -1398,7 +1420,7 @@ msgid "You must be in a group that has at least one capability enabled to "
1398
  "enforce read access."
1399
  msgstr ""
1400
 
1401
- #: lib/access/class-groups-access-meta-boxes.php:247
1402
  msgid "You need to have permission to set access restrictions."
1403
  msgstr ""
1404
 
@@ -1406,3 +1428,18 @@ msgstr ""
1406
  msgid "You should use Groups_Post_Access_Legacy::create() to pass a "
1407
  "capability restriction instead."
1408
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  msgid ""
8
  msgstr "Project-Id-Version: PACKAGE VERSION\n"
9
  "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2019-07-20 22:16+0200\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
212
  "footprint on the Users admin screen."
213
  msgstr ""
214
 
215
+ #: lib/access/class-groups-access-meta-boxes.php:228
216
+ #: lib/access/class-groups-access-meta-boxes.php:229
217
+ #: lib/access/class-groups-access-meta-boxes.php:462
218
+ #: lib/access/class-groups-access-meta-boxes.php:463
219
  msgid "Anyone &hellip;"
220
  msgstr ""
221
 
336
  "the fly."
337
  msgstr ""
338
 
339
+ #: lib/access/class-groups-access-meta-boxes.php:153
340
  msgid "Choose or enter <em>Premium</em> in the <em>Read</em> field located "
341
  "in the <em>Groups</em> box and save or update the post (or hit "
342
  "Enter)."
446
  msgstr ""
447
 
448
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:135
449
+ #: lib/access/class-groups-access-meta-boxes.php:143
450
  msgid "Example:"
451
  msgstr ""
452
 
516
  msgid "Group Name : %s"
517
  msgstr ""
518
 
519
+ #: lib/access/class-groups-access-meta-boxes.php:490
520
  msgctxt "Attachment field label"
521
  msgid "Groups"
522
  msgstr ""
551
  msgid "Groups"
552
  msgstr ""
553
 
554
+ #: lib/access/class-groups-access-meta-boxes.php:125
555
  msgctxt "Help heading"
556
  msgid "Groups"
557
  msgstr ""
558
 
559
+ #: lib/access/class-groups-access-meta-boxes.php:122
560
  msgctxt "Help tab title"
561
  msgid "Groups"
562
  msgstr ""
571
  msgid "Groups"
572
  msgstr ""
573
 
574
+ #: lib/access/class-groups-access-meta-boxes.php:108
575
  msgctxt "Meta box title"
576
  msgid "Groups"
577
  msgstr ""
615
  msgid "Groups Capabilities"
616
  msgstr ""
617
 
618
+ #: lib/blocks/src/blocks/groups-member/block.js:173
619
+ msgid "Groups Member Block"
620
+ msgstr ""
621
+
622
+ #: lib/blocks/src/blocks/groups-non-member/block.js:133
623
+ msgid "Groups Non-member Block"
624
+ msgstr ""
625
+
626
  #: lib/admin/groups-admin-options.php:120
627
  msgid "Groups Options"
628
  msgstr ""
644
  "<strong>remove</strong> groups."
645
  msgstr ""
646
 
647
+ #: lib/blocks/src/blocks/groups-non-member/block.js:134
648
+ msgid "Hide content from group members"
649
+ msgstr ""
650
+
651
  #: lib/admin/class-groups-admin-notice.php:138
652
  msgid "I have already done that."
653
  msgstr ""
683
  msgid "Improved User Interface"
684
  msgstr ""
685
 
686
+ #: lib/access/class-groups-access-meta-boxes.php:159
687
  msgid "In the same field, you can create a new group and restrict access. "
688
  "Group names are case-sensitive. In order to be able to use the new "
689
  "group, your user account will be assigned to it."
722
  msgstr ""
723
 
724
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:137
725
+ #: lib/access/class-groups-access-meta-boxes.php:146
726
  msgid "Let's assume that you want to limit the visibility of a post to "
727
  "members of the <em>Premium</em> group."
728
  msgstr ""
729
 
730
+ #: lib/blocks/src/blocks/groups-member/block.js:240
731
+ #: lib/blocks/src/blocks/groups-non-member/block.js:177
732
+ msgid "Loading..."
733
+ msgstr ""
734
+
735
  #: lib/views/class-groups-shortcodes.php:121
736
  msgid "Log out"
737
  msgstr ""
741
  msgstr ""
742
 
743
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:503
744
+ #: lib/access/class-groups-access-meta-boxes.php:430
745
  msgid "Media"
746
  msgstr ""
747
 
810
  "assigned."
811
  msgstr ""
812
 
813
+ #: lib/access/class-groups-access-meta-boxes.php:137
814
  msgid "Note that you must be a member of a group to use it to restrict "
815
  "access."
816
  msgstr ""
912
  "switch to and use the new access restrictions."
913
  msgstr ""
914
 
915
+ #: lib/access/class-groups-access-meta-boxes.php:486
916
  #, php-format
917
  msgid "Please use <a href=\"%s\" target=\"_blank\">Groups File Access</a> "
918
  "for files that require complete protection."
919
  msgstr ""
920
 
921
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:189
922
+ #: lib/access/class-groups-access-meta-boxes.php:185
923
  msgid "Post"
924
  msgstr ""
925
 
940
  msgid "Quick-create group &amp; capability"
941
  msgstr ""
942
 
943
+ #: lib/access/class-groups-access-meta-boxes.php:222
944
+ #: lib/access/class-groups-access-meta-boxes.php:432
945
  msgid "Read"
946
  msgstr ""
947
 
1017
  msgid "Restrict Access"
1018
  msgstr ""
1019
 
1020
+ #: lib/access/class-groups-access-meta-boxes.php:248
1021
  #, php-format
1022
  msgid "Restricts the visibility of this %s to members of the chosen groups."
1023
  msgstr ""
1024
 
1025
+ #: lib/access/class-groups-access-meta-boxes.php:480
1026
  msgid "Restricts the visibility of this entry to members of the chosen "
1027
  "groups."
1028
  msgstr ""
1048
  msgid "Show access restrictions for these post types."
1049
  msgstr ""
1050
 
1051
+ #: lib/blocks/src/blocks/groups-member/block.js:174
1052
+ msgid "Show content for group members"
1053
+ msgstr ""
1054
+
1055
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:277
1056
  msgid "Show groups"
1057
  msgstr ""
1140
  msgid "The <em>Name</em> must not be empty."
1141
  msgstr ""
1142
 
1143
+ #: lib/access/class-groups-access-meta-boxes.php:484
1144
  msgid "The attachment page is restricted to authorized users, but due to "
1145
  "technical limitations, the file can still be accessed directly via "
1146
  "its URL."
1267
  "posts, pages and other post types."
1268
  msgstr ""
1269
 
1270
+ #: lib/access/class-groups-access-meta-boxes.php:129
1271
  msgid "Use the <em>Groups</em> box to limit the visibility of posts, pages "
1272
  "and other post types."
1273
  msgstr ""
1372
  "will be assigned to the group."
1373
  msgstr ""
1374
 
1375
+ #: lib/access/class-groups-access-meta-boxes.php:215
1376
+ #: lib/access/class-groups-access-meta-boxes.php:465
1377
  msgid "You can create a new group by indicating the group's name."
1378
  msgstr ""
1379
 
1380
+ #: lib/access/class-groups-access-meta-boxes.php:209
1381
  #, php-format
1382
  msgid "You can restrict the visibility of this %1$s to group members. "
1383
  "Choose one or more groups that are allowed to read this %2$s. If no "
1384
  "groups are chosen, the %3$s is visible to anyone."
1385
  msgstr ""
1386
 
1387
+ #: lib/access/class-groups-access-meta-boxes.php:464
1388
  msgid "You can restrict the visibility to group members. Choose one or more "
1389
  "groups to restrict access. If no groups are chosen, this entry is "
1390
  "visible to anyone."
1395
  "restriction."
1396
  msgstr ""
1397
 
1398
+ #: lib/access/class-groups-access-meta-boxes.php:134
1399
  msgid "You can select one or more groups to restrict access to its members."
1400
  msgstr ""
1401
 
1402
  #: legacy/access/class-groups-access-meta-boxes-legacy.php:290
1403
+ #: lib/access/class-groups-access-meta-boxes.php:255
1404
+ #: lib/blocks/src/class-groups-blocks.php:79
1405
  msgid "You cannot set any access restrictions."
1406
  msgstr ""
1407
 
1420
  "enforce read access."
1421
  msgstr ""
1422
 
1423
+ #: lib/access/class-groups-access-meta-boxes.php:261
1424
  msgid "You need to have permission to set access restrictions."
1425
  msgstr ""
1426
 
1428
  msgid "You should use Groups_Post_Access_Legacy::create() to pass a "
1429
  "capability restriction instead."
1430
  msgstr ""
1431
+
1432
+ #: lib/blocks/src/blocks/groups-member/block.js:177
1433
+ #: lib/blocks/src/blocks/groups-non-member/block.js:137
1434
+ msgid "access"
1435
+ msgstr ""
1436
+
1437
+ #: lib/blocks/src/blocks/groups-member/block.js:177
1438
+ #: lib/blocks/src/blocks/groups-non-member/block.js:137
1439
+ msgid "groups"
1440
+ msgstr ""
1441
+
1442
+ #: lib/blocks/src/blocks/groups-member/block.js:177
1443
+ #: lib/blocks/src/blocks/groups-non-member/block.js:137
1444
+ msgid "members"
1445
+ msgstr ""
legacy/access/class-groups-access-meta-boxes-legacy.php CHANGED
@@ -23,7 +23,7 @@ if ( !defined( 'ABSPATH' ) ) {
23
  exit;
24
  }
25
 
26
- require_once( GROUPS_LEGACY_LIB . '/access/class-groups-post-access-legacy.php' );
27
 
28
  /**
29
  * Adds meta boxes to edit screens.
23
  exit;
24
  }
25
 
26
+ require_once GROUPS_LEGACY_LIB . '/access/class-groups-post-access-legacy.php';
27
 
28
  /**
29
  * Adds meta boxes to edit screens.
lib/access/class-groups-access-meta-boxes.php CHANGED
@@ -603,7 +603,7 @@ class Groups_Access_Meta_Boxes {
603
  * @return array of valid read capabilities for the current or given user
604
  */
605
  public static function get_valid_read_caps_for_user( $user_id = null ) {
606
- require_once( GROUPS_LEGACY_LIB . '/access/class-groups-access-meta-boxes-legacy.php' );
607
  return Groups_Access_Meta_Boxes_Legacy::get_valid_read_caps_for_user( $user_id );
608
  }
609
  }
603
  * @return array of valid read capabilities for the current or given user
604
  */
605
  public static function get_valid_read_caps_for_user( $user_id = null ) {
606
+ require_once GROUPS_LEGACY_LIB . '/access/class-groups-access-meta-boxes-legacy.php';
607
  return Groups_Access_Meta_Boxes_Legacy::get_valid_read_caps_for_user( $user_id );
608
  }
609
  }
lib/access/class-groups-post-access.php CHANGED
@@ -637,7 +637,7 @@ class Groups_Post_Access {
637
  '2.0.0'
638
  );
639
 
640
- require_once( GROUPS_LEGACY_LIB . '/access/class-groups-post-access-legacy.php' );
641
  return Groups_Post_Access_Legacy::get_read_post_capabilities( $post_id );
642
  }
643
 
637
  '2.0.0'
638
  );
639
 
640
+ require_once GROUPS_LEGACY_LIB . '/access/class-groups-post-access-legacy.php';
641
  return Groups_Post_Access_Legacy::get_read_post_capabilities( $post_id );
642
  }
643
 
lib/admin/class-groups-admin.php CHANGED
@@ -147,10 +147,10 @@ class Groups_Admin {
147
  */
148
  public static function admin_menu() {
149
 
150
- include_once( GROUPS_ADMIN_LIB . '/groups-admin-groups.php');
151
- include_once( GROUPS_ADMIN_LIB . '/groups-admin-capabilities.php');
152
- include_once( GROUPS_ADMIN_LIB . '/groups-admin-options.php');
153
- include_once( GROUPS_ADMIN_LIB . '/groups-admin-add-ons.php');
154
 
155
  $pages = array();
156
 
@@ -175,7 +175,7 @@ class Groups_Admin {
175
  }
176
 
177
  if ( $show_tree_view ) {
178
- include_once( GROUPS_ADMIN_LIB . '/groups-admin-tree-view.php');
179
  $page = add_submenu_page(
180
  'groups-admin',
181
  __( 'Tree', 'groups' ),
@@ -236,7 +236,7 @@ class Groups_Admin {
236
  */
237
  public static function network_admin_menu() {
238
 
239
- include_once( GROUPS_ADMIN_LIB . '/groups-admin-options.php');
240
 
241
  $pages = array();
242
 
147
  */
148
  public static function admin_menu() {
149
 
150
+ include_once GROUPS_ADMIN_LIB . '/groups-admin-groups.php';
151
+ include_once GROUPS_ADMIN_LIB . '/groups-admin-capabilities.php';
152
+ include_once GROUPS_ADMIN_LIB . '/groups-admin-options.php';
153
+ include_once GROUPS_ADMIN_LIB . '/groups-admin-add-ons.php';
154
 
155
  $pages = array();
156
 
175
  }
176
 
177
  if ( $show_tree_view ) {
178
+ include_once GROUPS_ADMIN_LIB . '/groups-admin-tree-view.php';
179
  $page = add_submenu_page(
180
  'groups-admin',
181
  __( 'Tree', 'groups' ),
236
  */
237
  public static function network_admin_menu() {
238
 
239
+ include_once GROUPS_ADMIN_LIB . '/groups-admin-options.php';
240
 
241
  $pages = array();
242
 
lib/admin/groups-admin-capabilities.php CHANGED
@@ -29,10 +29,10 @@ define( 'GROUPS_ADMIN_CAPABILITIES_NONCE_2', 'groups-cap-nonce-2');
29
  define( 'GROUPS_ADMIN_CAPABILITIES_ACTION_NONCE', 'groups-cap-action-nonce');
30
  define( 'GROUPS_ADMIN_CAPABILITIES_FILTER_NONCE', 'groups-cap-filter-nonce' );
31
 
32
- require_once( GROUPS_CORE_LIB . '/class-groups-pagination.php' );
33
- require_once( GROUPS_ADMIN_LIB . '/groups-admin-capabilities-add.php');
34
- require_once( GROUPS_ADMIN_LIB . '/groups-admin-capabilities-edit.php');
35
- require_once( GROUPS_ADMIN_LIB . '/groups-admin-capabilities-remove.php');
36
 
37
  /**
38
  * Manage capabilities: table of capabilities and add, edit, remove actions.
@@ -339,7 +339,7 @@ function groups_admin_capabilities() {
339
  '</div>';
340
 
341
  if ( $paginate ) {
342
- require_once( GROUPS_CORE_LIB . '/class-groups-pagination.php' );
343
  $pagination = new Groups_Pagination( $count, null, $row_count );
344
  $output .= '<form id="posts-filter" method="post" action="">';
345
  $output .= '<div>';
@@ -492,7 +492,7 @@ function groups_admin_capabilities() {
492
  $output .= '</form>'; // #groups-action
493
 
494
  if ( $paginate ) {
495
- require_once( GROUPS_CORE_LIB . '/class-groups-pagination.php' );
496
  $pagination = new Groups_Pagination($count, null, $row_count);
497
  $output .= '<div class="tablenav bottom">';
498
  $output .= $pagination->pagination( 'bottom' );
29
  define( 'GROUPS_ADMIN_CAPABILITIES_ACTION_NONCE', 'groups-cap-action-nonce');
30
  define( 'GROUPS_ADMIN_CAPABILITIES_FILTER_NONCE', 'groups-cap-filter-nonce' );
31
 
32
+ require_once GROUPS_CORE_LIB . '/class-groups-pagination.php';
33
+ require_once GROUPS_ADMIN_LIB . '/groups-admin-capabilities-add.php';
34
+ require_once GROUPS_ADMIN_LIB . '/groups-admin-capabilities-edit.php';
35
+ require_once GROUPS_ADMIN_LIB . '/groups-admin-capabilities-remove.php';
36
 
37
  /**
38
  * Manage capabilities: table of capabilities and add, edit, remove actions.
339
  '</div>';
340
 
341
  if ( $paginate ) {
342
+ require_once GROUPS_CORE_LIB . '/class-groups-pagination.php';
343
  $pagination = new Groups_Pagination( $count, null, $row_count );
344
  $output .= '<form id="posts-filter" method="post" action="">';
345
  $output .= '<div>';
492
  $output .= '</form>'; // #groups-action
493
 
494
  if ( $paginate ) {
495
+ require_once GROUPS_CORE_LIB . '/class-groups-pagination.php';
496
  $pagination = new Groups_Pagination($count, null, $row_count);
497
  $output .= '<div class="tablenav bottom">';
498
  $output .= $pagination->pagination( 'bottom' );
lib/admin/groups-admin-groups.php CHANGED
@@ -30,10 +30,10 @@ define( 'GROUPS_ADMIN_GROUPS_NONCE_2', 'groups-nonce-2');
30
  define( 'GROUPS_ADMIN_GROUPS_ACTION_NONCE', 'groups-action-nonce');
31
  define( 'GROUPS_ADMIN_GROUPS_FILTER_NONCE', 'groups-filter-nonce' );
32
 
33
- require_once( GROUPS_CORE_LIB . '/class-groups-pagination.php' );
34
- require_once( GROUPS_ADMIN_LIB . '/groups-admin-groups-add.php');
35
- require_once( GROUPS_ADMIN_LIB . '/groups-admin-groups-edit.php');
36
- require_once( GROUPS_ADMIN_LIB . '/groups-admin-groups-remove.php');
37
 
38
  /**
39
  * Manage Groups: table of groups and add, edit, remove actions.
@@ -328,7 +328,7 @@ function groups_admin_groups() {
328
  '</div>';
329
 
330
  if ( $paginate ) {
331
- require_once( GROUPS_CORE_LIB . '/class-groups-pagination.php' );
332
  $pagination = new Groups_Pagination( $count, null, $row_count );
333
  $output .= '<form id="posts-filter" method="post" action="">';
334
  $output .= '<div>';
@@ -531,7 +531,7 @@ function groups_admin_groups() {
531
  $output .= '</form>'; // #groups-action
532
 
533
  if ( $paginate ) {
534
- require_once( GROUPS_CORE_LIB . '/class-groups-pagination.php' );
535
  $pagination = new Groups_Pagination($count, null, $row_count);
536
  $output .= '<div class="tablenav bottom">';
537
  $output .= $pagination->pagination( 'bottom' );
30
  define( 'GROUPS_ADMIN_GROUPS_ACTION_NONCE', 'groups-action-nonce');
31
  define( 'GROUPS_ADMIN_GROUPS_FILTER_NONCE', 'groups-filter-nonce' );
32
 
33
+ require_once GROUPS_CORE_LIB . '/class-groups-pagination.php';
34
+ require_once GROUPS_ADMIN_LIB . '/groups-admin-groups-add.php';
35
+ require_once GROUPS_ADMIN_LIB . '/groups-admin-groups-edit.php';
36
+ require_once GROUPS_ADMIN_LIB . '/groups-admin-groups-remove.php';
37
 
38
  /**
39
  * Manage Groups: table of groups and add, edit, remove actions.
328
  '</div>';
329
 
330
  if ( $paginate ) {
331
+ require_once GROUPS_CORE_LIB . '/class-groups-pagination.php';
332
  $pagination = new Groups_Pagination( $count, null, $row_count );
333
  $output .= '<form id="posts-filter" method="post" action="">';
334
  $output .= '<div>';
531
  $output .= '</form>'; // #groups-action
532
 
533
  if ( $paginate ) {
534
+ require_once GROUPS_CORE_LIB . '/class-groups-pagination.php';
535
  $pagination = new Groups_Pagination($count, null, $row_count);
536
  $output .= '<div class="tablenav bottom">';
537
  $output .= $pagination->pagination( 'bottom' );
lib/blocks/.gitignore ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ node_modules/
2
+ package.json
3
+ package-lock.json
4
+ src/common.scss
5
+ blocks.style.build.css
6
+
7
+ ## Uncomment line below if you prefer to
8
+ ## keep compiled files out of version control
9
+ # dist/
lib/blocks/dist/blocks.build.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=14)}([function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):g=-1,h.length&&u())}function u(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++g<t;)d&&d[g].run();g=-1,t=h.length}d=null,m=!1,i(e)}}function s(e,t){this.fun=e,this.array=t}function l(){}var c,p,f=e.exports={};!function(){try{c="function"===typeof setTimeout?setTimeout:n}catch(e){c=n}try{p="function"===typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,h=[],m=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new s(e,t)),1!==h.length||m||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.prependListener=l,f.prependOnceListener=l,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t){e.exports=React},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r=n(8);e.exports=n(28)(r.isElement,!0)}else e.exports=n(31)()}).call(t,n(0))},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){e.exports=n(16)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return s=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},s.apply(this,arguments)}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){u(e,t,n[t])})}return e}function c(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&&f(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(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 h(e,t){if(null==e)return{};var n,r,o=d(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 m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?m(e):t}function v(e){return b(e)||y(e)||E()}function b(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function y(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function O(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function w(e,t,n,r){var o=[t,r];if(n&&e)for(var i in n)n.hasOwnProperty(i)&&n[i]&&o.push("".concat(O(e,i)));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}function C(e,t,n){if(n){var r=n(e,t);if("string"===typeof r)return r}return e}function x(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function S(e){return x(e)?window.pageYOffset:e.scrollTop}function A(e,t){if(x(e))return void window.scrollTo(0,t);e.scrollTop=t}function k(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}function F(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function D(e,t){function n(){s+=u;var t=F(s,i,a,r);A(e,t),s<r?Z()(n):o(e)}var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Q,i=S(e),a=t-i,u=10,s=0;n()}function M(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?A(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&A(e,Math.max(t.offsetTop-o,0))}function P(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function N(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function I(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,u=e.theme,s=u.spacing,l=k(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var p=l.getBoundingClientRect(),f=p.height,d=n.getBoundingClientRect(),h=d.bottom,m=d.height,g=d.top,v=n.offsetParent.getBoundingClientRect(),b=v.top,y=window.innerHeight,E=S(l),O=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),C=b-w,x=y-g,F=C+E,M=f-E-g,P=h-y+E+O,N=E+g-w;switch(o){case"auto":case"bottom":if(x>=m)return{placement:"bottom",maxHeight:t};if(M>=m&&!a)return i&&D(l,P,160),{placement:"bottom",maxHeight:t};if(!a&&M>=r||a&&x>=r){i&&D(l,P,160);return{placement:"bottom",maxHeight:a?x-O:M-O}}if("auto"===o||a){var I=t,T=a?C:F;return T>=r&&(I=Math.min(T-O-s.controlHeight,t)),{placement:"top",maxHeight:I}}if("bottom"===o)return A(l,P),{placement:"bottom",maxHeight:t};break;case"top":if(C>=m)return{placement:"top",maxHeight:t};if(F>=m&&!a)return i&&D(l,N,160),{placement:"top",maxHeight:t};if(!a&&F>=r||a&&C>=r){var L=t;return(!a&&F>=r||a&&C>=r)&&(L=a?C-w:F-w),i&&D(l,N,160),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}function T(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}function L(e,t){if(e===t)return!0;if(e&&t&&"object"==r(e)&&"object"==r(t)){var n,o,i,a=he(e),u=he(t);if(a&&u){if((o=e.length)!=t.length)return!1;for(n=o;0!==n--;)if(!L(e[n],t[n]))return!1;return!0}if(a!=u)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,p=t instanceof RegExp;if(c!=p)return!1;if(c&&p)return e.toString()==t.toString();var f=me(e);if((o=f.length)!==me(t).length)return!1;for(n=o;0!==n--;)if(!ge.call(t,f[n]))return!1;for(n=o;0!==n--;)if(("_owner"!==(i=f[n])||!e.$$typeof)&&!L(e[i],t[i]))return!1;return!0}return e!==e&&t!==t}function _(e,t){try{return L(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}function V(e){e.preventDefault()}function R(e){e.stopPropagation()}function j(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function B(){return"ontouchstart"in window||navigator.maxTouchPoints}var U=n(1),W=n.n(U),H=n(18),z=n(19),G=n(3),$=(n.n(G),n(2)),q=n.n($),Y=n(32),Z=n.n(Y),X=n(34),J=n.n(X),K=n(35),Q=(n.n(K),function(){}),ee=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===r(e)&&null!==e?[e]:[]},te=function(e){return"auto"===e?"bottom":e},ne=function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return t={label:"menu"},u(t,T(n),"100%"),u(t,"backgroundColor",a.neutral0),u(t,"borderRadius",o),u(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),u(t,"marginBottom",i.menuGutter),u(t,"marginTop",i.menuGutter),u(t,"position","absolute"),u(t,"width","100%"),u(t,"zIndex",1),t},re=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"state",{maxHeight:n.props.maxMenuHeight,placement:null}),u(m(m(n)),"getPlacement",function(e){var t=n.props,r=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,a=t.menuPosition,u=t.menuShouldScrollIntoView,s=t.theme,l=n.context.getPortalPlacement;if(e){var c="fixed"===a,p=u&&!c,f=I({maxHeight:o,menuEl:e,minHeight:r,placement:i,shouldScroll:p,isFixedPosition:c,theme:s});l&&l(f),n.setState(f)}}),u(m(m(n)),"getUpdatedProps",function(){var e=n.props.menuPlacement,t=n.state.placement||te(e);return l({},n.props,{placement:t,maxHeight:n.state.maxHeight})}),n}return c(t,e),a(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(U.Component);u(re,"contextTypes",{getPortalPlacement:q.a.func});var oe=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps,u=r(Object(z.a)(o("menu",e)),{menu:!0},n);return W.a.createElement("div",s({className:u},a,{ref:i}),t)},ie=function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},ae=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isMulti,a=e.innerRef;return W.a.createElement("div",{className:r(Object(z.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},n),ref:a},t)},ue=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},se=ue,le=ue,ce=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({className:r(Object(z.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};ce.defaultProps={children:"No options"};var pe=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({className:r(Object(z.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};pe.defaultProps={children:"Loading..."};var fe=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},de=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"state",{placement:null}),u(m(m(n)),"getPortalPlacement",function(e){var t=e.placement;t!==te(n.props.menuPlacement)&&n.setState({placement:t})}),n}return c(t,e),a(t,[{key:"getChildContext",value:function(){return{getPortalPlacement:this.getPortalPlacement}}},{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,o=e.menuPlacement,i=e.menuPosition,a=e.getStyles,u="fixed"===i;if(!t&&!u||!r)return null;var s=this.state.placement||te(o),l=P(r),c=u?0:window.pageYOffset,p=l[s]+c,f={offset:p,position:i,rect:l},d=W.a.createElement("div",{className:Object(z.a)(a("menuPortal",f))},n);return t?Object(G.createPortal)(d,t):d}}]),t}(U.Component);u(de,"childContextTypes",{getPortalPlacement:q.a.func});var he=Array.isArray,me=Object.keys,ge=Object.prototype.hasOwnProperty,ve=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],be=function(e){for(var t=0;t<ve.length;t++)e=e.replace(ve[t].letters,ve[t].base);return e},ye=function(e){return e.replace(/^\s+|\s+$/g,"")},Ee=function(e){return"".concat(e.label," ").concat(e.value)},Oe=function(e){return W.a.createElement("span",s({className:Object(z.a)({label:"a11yText",zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},we=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),n=(e.emotion,h(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return W.a.createElement("input",s({ref:t},n,{className:Object(z.a)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(U.Component),Ce=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(G.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(U.Component),xe=["boxSizing","height","overflow","paddingRight","position"],Se={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"},Ae=!("undefined"===typeof window||!window.document||!window.document.createElement),ke=0,Fe=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"originalStyles",{}),u(m(m(n)),"listenerOptions",{capture:!1,passive:!1}),n}return c(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this;if(Ae){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;if(n&&xe.forEach(function(t){var n=i&&i[t];e.originalStyles[t]=n}),n&&ke<1){var a=parseInt(this.originalStyles.paddingRight,10)||0,u=document.body?document.body.clientWidth:0,s=window.innerWidth-u+a||0;Object.keys(Se).forEach(function(e){var t=Se[e];i&&(i[e]=t)}),i&&(i.paddingRight="".concat(s,"px"))}o&&B()&&(o.addEventListener("touchmove",V,this.listenerOptions),r&&(r.addEventListener("touchstart",j,this.listenerOptions),r.addEventListener("touchmove",R,this.listenerOptions))),ke+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(Ae){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;ke=Math.max(ke-1,0),n&&ke<1&&xe.forEach(function(t){var n=e.originalStyles[t];i&&(i[t]=n)}),o&&B()&&(o.removeEventListener("touchmove",V,this.listenerOptions),r&&(r.removeEventListener("touchstart",j,this.listenerOptions),r.removeEventListener("touchmove",R,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}(U.Component);u(Fe,"defaultProps",{accountForScrollbars:!0});var De=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"state",{touchScrollTarget:null}),u(m(m(n)),"getScrollTarget",function(e){e!==n.state.touchScrollTarget&&n.setState({touchScrollTarget:e})}),u(m(m(n)),"blurSelectInput",function(){document.activeElement&&document.activeElement.blur()}),n}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?W.a.createElement("div",null,W.a.createElement("div",{onClick:this.blurSelectInput,className:Object(z.a)({position:"fixed",left:0,bottom:0,right:0,top:0})}),W.a.createElement(Ce,{innerRef:this.getScrollTarget},t),r?W.a.createElement(Fe,{touchScrollTarget:r}):null):t}}]),t}(U.PureComponent),Me=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"isBottom",!1),u(m(m(n)),"isTop",!1),u(m(m(n)),"scrollTarget",void 0),u(m(m(n)),"touchStart",void 0),u(m(m(n)),"cancelScroll",function(e){e.preventDefault(),e.stopPropagation()}),u(m(m(n)),"handleEventDelta",function(e,t){var r=n.props,o=r.onBottomArrive,i=r.onBottomLeave,a=r.onTopArrive,u=r.onTopLeave,s=n.scrollTarget,l=s.scrollTop,c=s.scrollHeight,p=s.clientHeight,f=n.scrollTarget,d=t>0,h=c-p-l,m=!1;h>t&&n.isBottom&&(i&&i(e),n.isBottom=!1),d&&n.isTop&&(u&&u(e),n.isTop=!1),d&&t>h?(o&&!n.isBottom&&o(e),f.scrollTop=c,m=!0,n.isBottom=!0):!d&&-t>l&&(a&&!n.isTop&&a(e),f.scrollTop=0,m=!0,n.isTop=!0),m&&n.cancelScroll(e)}),u(m(m(n)),"onWheel",function(e){n.handleEventDelta(e,e.deltaY)}),u(m(m(n)),"onTouchStart",function(e){n.touchStart=e.changedTouches[0].clientY}),u(m(m(n)),"onTouchMove",function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)}),u(m(m(n)),"getScrollTarget",function(e){n.scrollTarget=e}),n}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&(e.scrollHeight<=e.clientHeight||("function"===typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"===typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"===typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"===typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"===typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"===typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return W.a.createElement(Ce,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(U.Component),Pe=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=h(e,["isEnabled"]);return t?W.a.createElement(Me,n):this.props.children}}]),t}(U.Component);u(Pe,"defaultProps",{isEnabled:!0});var Ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,i=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},Ie=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return r?"option ".concat(n," is disabled. Select another option."):"option ".concat(n,", selected.")}},Te=function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")},Le=function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")},_e=function(e){var t=e.inputValue;return"".concat(e.screenReaderMessage).concat(t?" for search term "+t:"",".")},Ve=function(e){return e.label},Re=function(e){return e.label},je=function(e){return e.value},Be=function(e){return!!e.isDisabled},Ue=function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},We=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,u=e.isRtl;return W.a.createElement("div",s({className:r(Object(z.a)(o("container",e)),{"--is-disabled":a,"--is-rtl":u},n)},i),t)},He=function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},ze=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return W.a.createElement("div",{className:r(Object(z.a)(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}}]),t}(U.Component),Ge=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},$e=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return W.a.createElement("div",{className:r(Object(z.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},qe=function(e){var t=e.size,n=h(e,["size"]);return W.a.createElement("svg",s({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(z.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},Ye=function(e){return W.a.createElement(qe,s({size:20},e),W.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ze=function(e){return W.a.createElement(qe,s({size:20},e),W.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Xe=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},Je=Xe,Ke=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({},i,{className:r(Object(z.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t||W.a.createElement(Ze,null))},Qe=Xe,et=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({},i,{className:r(Object(z.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t||W.a.createElement(Ye,null))},tt=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},nt=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return W.a.createElement("span",s({},o,{className:n(Object(z.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},rt=!1,ot=function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},it=function(e){var t=e.color,n=e.delay,r=e.offset;return W.a.createElement("span",{className:Object(z.a)({animationDuration:"1s",animationDelay:"".concat(n,"ms"),animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},at=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isFocused,a=e.isRtl,u=e.theme.colors,l=i?u.neutral80:u.neutral20;return rt||(Object(z.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),rt=!0),W.a.createElement("div",s({},o,{className:n(Object(z.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),W.a.createElement(it,{color:l,delay:0,offset:a}),W.a.createElement(it,{color:l,delay:160,offset:!0}),W.a.createElement(it,{color:l,delay:320,offset:!a}))};at.defaultProps={size:4};var ut=function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},st=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,u=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return W.a.createElement("div",s({ref:u,className:n(Object(z.a)(r("control",e)),{control:!0,"control--is-disabled":i,"control--is-focused":a,"control--menu-is-open":c},o)},l),t)},lt=function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},ct=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,u=e.label,l=e.theme,c=e.selectProps;return W.a.createElement("div",{className:r(Object(z.a)(o("group",e)),{group:!0},n)},W.a.createElement(i,s({},a,{selectProps:c,theme:l,getStyles:o,cx:r}),u),W.a.createElement("div",null,t))},pt=function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},ft=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,i=(e.selectProps,h(e,["className","cx","getStyles","theme","selectProps"]));return W.a.createElement("div",s({className:n(Object(z.a)(r("groupHeading",l({theme:o},i))),{"group-heading":!0},t)},i))},dt=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},ht=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},mt=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,i=e.isHidden,a=e.isDisabled,u=e.theme,c=(e.selectProps,h(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return W.a.createElement("div",{className:Object(z.a)(r("input",l({theme:u},c)))},W.a.createElement(J.a,s({className:n(null,{input:!0},t),inputRef:o,inputStyle:ht(i),disabled:a},c)))},gt=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},vt=function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},bt=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},yt=function(e){var t=e.children,n=e.innerProps;return W.a.createElement("div",n,t)},Et=yt,Ot=yt,wt=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return W.a.createElement("div",n,t||W.a.createElement(Ye,{size:14}))}}]),t}(U.Component),Ct=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,u=e.innerProps,s=e.isDisabled,c=e.removeProps,p=e.selectProps,f=r.Container,d=r.Label,h=r.Remove,m=l({className:o(Object(z.a)(a("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),g={className:o(Object(z.a)(a("multiValueLabel",this.props)),{"multi-value__label":!0},n)},v=l({className:o(Object(z.a)(a("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},c);return W.a.createElement(f,{data:i,innerProps:m,selectProps:p},W.a.createElement(d,{data:i,innerProps:g,selectProps:p},t),W.a.createElement(h,{data:i,innerProps:v,selectProps:p}))}}]),t}(U.Component);u(Ct,"defaultProps",{cropWithEllipsis:!0});var xt=function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},St=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,u=e.isSelected,l=e.innerRef,c=e.innerProps;return W.a.createElement("div",s({ref:l,className:r(Object(z.a)(o("option",e)),{option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":u},n)},c),t)},At=function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},kt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({className:r(Object(z.a)(o("placeholder",e)),{placeholder:!0},n)},i),t)},Ft=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},Dt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return W.a.createElement("div",s({className:r(Object(z.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":i},n)},a),t)},Mt={ClearIndicator:et,Control:st,DropdownIndicator:Ke,DownChevron:Ze,CrossIcon:Ye,Group:ct,GroupHeading:ft,IndicatorsContainer:$e,IndicatorSeparator:nt,Input:mt,LoadingIndicator:at,Menu:oe,MenuList:ae,MenuPortal:de,LoadingMessage:pe,NoOptionsMessage:ce,MultiValue:Ct,MultiValueContainer:Et,MultiValueLabel:Ot,MultiValueRemove:wt,Option:St,Placeholder:kt,SelectContainer:We,SingleValue:Dt,ValueContainer:ze},Pt=function(e){return l({},Mt,e.components)},Nt={clearIndicator:Qe,container:Ue,control:ut,dropdownIndicator:Je,group:lt,groupHeading:pt,indicatorsContainer:Ge,indicatorSeparator:tt,input:dt,loadingIndicator:ot,loadingMessage:le,menu:ne,menuList:ie,menuPortal:fe,multiValue:gt,multiValueLabel:vt,multiValueRemove:bt,noOptionsMessage:se,option:xt,placeholder:At,singleValue:Ft,valueContainer:He},It={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},Tt={baseUnit:4,controlHeight:38,menuGutter:8},Lt={borderRadius:4,colors:It,spacing:Tt},_t={backspaceRemovesValue:!0,blurInputOnSelect:N(),captureMenuScroll:!N(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){var r=l({ignoreCase:!0,ignoreAccents:!0,stringify:Ee,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,u=r.trim,s=r.matchFrom,c=u?ye(n):n,p=u?ye(a(t)):a(t);return o&&(c=c.toLowerCase(),p=p.toLowerCase()),i&&(c=be(c),p=be(p)),"start"===s?p.substr(0,c.length)===c:p.indexOf(c)>-1}}(),formatGroupLabel:Ve,getOptionLabel:Re,getOptionValue:je,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Be,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},Vt=1,Rt=function(e){function t(e){var n;o(this,t),n=g(this,p(t).call(this,e)),u(m(m(n)),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),u(m(m(n)),"blockOptionHover",!1),u(m(m(n)),"isComposing",!1),u(m(m(n)),"clearFocusValueOnUpdate",!1),u(m(m(n)),"commonProps",void 0),u(m(m(n)),"components",void 0),u(m(m(n)),"hasGroups",!1),u(m(m(n)),"initialTouchX",0),u(m(m(n)),"initialTouchY",0),u(m(m(n)),"inputIsHiddenAfterUpdate",void 0),u(m(m(n)),"instancePrefix",""),u(m(m(n)),"openAfterFocus",!1),u(m(m(n)),"scrollToFocusedOptionOnUpdate",!1),u(m(m(n)),"userIsDragging",void 0),u(m(m(n)),"controlRef",null),u(m(m(n)),"getControlRef",function(e){n.controlRef=e}),u(m(m(n)),"focusedOptionRef",null),u(m(m(n)),"getFocusedOptionRef",function(e){n.focusedOptionRef=e}),u(m(m(n)),"menuListRef",null),u(m(m(n)),"getMenuListRef",function(e){n.menuListRef=e}),u(m(m(n)),"inputRef",null),u(m(m(n)),"getInputRef",function(e){n.inputRef=e}),u(m(m(n)),"cacheComponents",function(e){n.components=Pt({components:e})}),u(m(m(n)),"focus",n.focusInput),u(m(m(n)),"blur",n.blurInput),u(m(m(n)),"onChange",function(e,t){var r=n.props;(0,r.onChange)(e,l({},t,{name:r.name}))}),u(m(m(n)),"setValue",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,o=n.props,i=o.closeMenuOnSelect,a=o.isMulti;n.onInputChange("",{action:"set-value"}),i&&(n.inputIsHiddenAfterUpdate=!a,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})}),u(m(m(n)),"selectOption",function(e){var t=n.props,r=t.blurInputOnSelect,o=t.isMulti,i=n.state.selectValue;if(o)if(n.isOptionSelected(e,i)){var a=n.getOptionValue(e);n.setValue(i.filter(function(e){return n.getOptionValue(e)!==a}),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,i)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(v(i),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,i)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));r&&n.blurInput()}),u(m(m(n)),"removeValue",function(e){var t=n.state.selectValue,r=n.getOptionValue(e);n.onChange(t.filter(function(e){return n.getOptionValue(e)!==r}),{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()}),u(m(m(n)),"clearValue",function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})}),u(m(m(n)),"popValue",function(){var e=n.state.selectValue,t=e[e.length-1];n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(e.slice(0,e.length-1),{action:"pop-value",removedValue:t})}),u(m(m(n)),"getOptionLabel",function(e){return n.props.getOptionLabel(e)}),u(m(m(n)),"getOptionValue",function(e){return n.props.getOptionValue(e)}),u(m(m(n)),"getStyles",function(e,t){var r=Nt[e](t);r.boxSizing="border-box";var o=n.props.styles[e];return o?o(r,t):r}),u(m(m(n)),"getElementId",function(e){return"".concat(n.instancePrefix,"-").concat(e)}),u(m(m(n)),"getActiveDescendentId",function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,o=t.focusedOption;if(o&&e){var i=r.focusable.indexOf(o),a=r.render[i];return a&&a.key}}),u(m(m(n)),"announceAriaLiveSelection",function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:Ie(t,r)})}),u(m(m(n)),"announceAriaLiveContext",function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:Ne(t,l({},r,{label:n.props["aria-label"]}))})}),u(m(m(n)),"onMenuMouseDown",function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())}),u(m(m(n)),"onMenuMouseMove",function(e){n.blockOptionHover=!1}),u(m(m(n)),"onControlMouseDown",function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()}),u(m(m(n)),"onDropdownIndicatorMouseDown",function(e){if((!e||"mousedown"!==e.type||0===e.button)&&!n.props.isDisabled){var t=n.props,r=t.isMulti,o=t.menuIsOpen;n.focusInput(),o?(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}}),u(m(m(n)),"onClearIndicatorMouseDown",function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout(function(){return n.focusInput()}))}),u(m(m(n)),"onScroll",function(e){"boolean"===typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&x(e.target)&&n.props.onMenuClose():"function"===typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()}),u(m(m(n)),"onCompositionStart",function(){n.isComposing=!0}),u(m(m(n)),"onCompositionEnd",function(){n.isComposing=!1}),u(m(m(n)),"onTouchStart",function(e){var t=e.touches,r=t.item(0);r&&(n.initialTouchX=r.clientX,n.initialTouchY=r.clientY,n.userIsDragging=!1)}),u(m(m(n)),"onTouchMove",function(e){var t=e.touches,r=t.item(0);if(r){var o=Math.abs(r.clientX-n.initialTouchX),i=Math.abs(r.clientY-n.initialTouchY);n.userIsDragging=o>5||i>5}}),u(m(m(n)),"onTouchEnd",function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)}),u(m(m(n)),"onControlTouchEnd",function(e){n.userIsDragging||n.onControlMouseDown(e)}),u(m(m(n)),"onClearIndicatorTouchEnd",function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)}),u(m(m(n)),"onDropdownIndicatorTouchEnd",function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)}),u(m(m(n)),"handleInputChange",function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()}),u(m(m(n)),"onInputFocus",function(e){var t=n.props,r=t.isSearchable,o=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1}),u(m(m(n)),"onInputBlur",function(e){if(n.menuListRef&&n.menuListRef.contains(document.activeElement))return void n.inputRef.focus();n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1})}),u(m(m(n)),"onOptionHover",function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})}),u(m(m(n)),"shouldHideSelectedOptions",function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t}),u(m(m(n)),"onKeyDown",function(e){var t=n.props,r=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,u=t.isClearable,s=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,f=t.openMenuOnFocus,d=n.state,h=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!s&&("function"!==typeof c||(c(e),!e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;n.focusValue("previous");break;case"ArrowRight":if(!r||a)return;n.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)n.removeValue(m);else{if(!o)return;r?n.popValue():u&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!l||!p||!h||f&&n.isOptionSelected(h,g))return;n.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(n.isComposing)return;n.selectOption(h);break}return;case"Escape":l?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):u&&i&&n.clearValue();break;case" ":if(a)return;if(!l){n.openMenu("first");break}if(!h)return;n.selectOption(h);break;case"ArrowUp":l?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":l?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!l)return;n.focusOption("pageup");break;case"PageDown":if(!l)return;n.focusOption("pagedown");break;case"Home":if(!l)return;n.focusOption("first");break;case"End":if(!l)return;n.focusOption("last");break;default:return}e.preventDefault()}});var r=e.value;n.cacheComponents=Object(H.a)(n.cacheComponents,_).bind(m(m(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Vt);var i=ee(r),a=n.buildMenuOptions(e,i);return n.state.menuOptions=a,n.state.selectValue=i,n}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var i=ee(e.value),a=this.buildMenuOptions(e,i),u=this.getNextFocusedValue(i),s=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:i,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&M(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this.state,n=t.menuOptions,r=t.selectValue,o=t.isFocused,i=this.props.isMulti,a="first"===e?0:n.focusable.length-1;if(!i){var u=n.focusable.indexOf(r[0]);u>-1&&(a=u)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var u=i.indexOf(a);a||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=i.length-1,l=-1;if(i.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u<s&&(l=u+1)}-1===l&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==l,focusedValue:i[l]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions,i=o.focusable;if(i.length){var a=0,u=i.indexOf(r);r||(u=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=u>0?u-1:i.length-1:"down"===e?a=(u+1)%i.length:"pageup"===e?(a=u-t)<0&&(a=0):"pagedown"===e?(a=u+t)>i.length-1&&(a=i.length-1):"last"===e&&(a=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[a],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:Be(i[a])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Lt):l({},Lt,this.props.theme):Lt}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,i=o.classNamePrefix,a=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue(),p=function(){return l};return{cx:w.bind(null,i),clearValue:e,getStyles:t,getValue:p,hasValue:c,isMulti:a,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue,o=r.indexOf(n);if(o>-1){if(e.indexOf(n)>-1)return n;if(o<e.length)return e[o]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"===typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"===typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,i=e.options,a=function(e,r){var i=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:u,value:s,data:e},o))){var l=i?void 0:function(){return n.onOptionHover(e)},c=i?void 0:function(){return n.selectOption(e)},p="".concat(n.getElementId("option"),"-").concat(r);return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:p,label:u,type:"option",value:s}}};return i.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options,i=o.map(function(t,n){var o=a(t,"".concat(r,"-").concat(n));return o&&e.focusable.push(t),o}).filter(Boolean);if(i.length){var u="".concat(n.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:u,data:t,options:i})}}else{var s=a(t,"".concat(r));s&&(e.render.push(s),e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,u=i.menuIsOpen,s=i.inputValue,l=i.screenReaderStatus,c=r?Te({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",p=o&&u?Le({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"",f=_e({inputValue:s,screenReaderMessage:l({count:this.countOptions()})});return"".concat(c," ").concat(p," ").concat(f," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=this.components.Input,u=this.state.inputIsHidden,l=r||this.getElementId("input");if(!n)return W.a.createElement(we,{id:l,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Q,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:i,value:""});var c={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},p=this.commonProps,f=p.cx,d=p.theme,h=p.selectProps;return W.a.createElement(a,s({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:f,getStyles:this.getStyles,id:l,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:h,spellCheck:"false",tabIndex:i,theme:d,type:"text",value:o},c))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,u=t.Placeholder,l=this.commonProps,c=this.props,p=c.controlShouldRenderValue,f=c.isDisabled,d=c.isMulti,h=c.inputValue,m=c.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue,y=g.isFocused;if(!this.hasValue()||!p)return h?null:W.a.createElement(u,s({},l,{key:"placeholder",isDisabled:f,isFocused:y}),m);if(d){return v.map(function(t){var a=t===b;return W.a.createElement(n,s({},l,{components:{Container:r,Label:o,Remove:i},isFocused:a,isDisabled:f,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))})}if(h)return null;var E=v[0];return W.a.createElement(a,s({},l,{data:E,isDisabled:f}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return W.a.createElement(e,s({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;var a={"aria-hidden":"true"};return W.a.createElement(e,s({},t,{innerProps:a,isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return W.a.createElement(n,s({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return W.a.createElement(e,s({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,u=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,p=this.commonProps,f=this.state,d=f.focusedOption,m=f.menuOptions,g=this.props,v=g.captureMenuScroll,b=g.inputValue,y=g.isLoading,E=g.loadingMessage,O=g.minMenuHeight,w=g.maxMenuHeight,C=g.menuIsOpen,x=g.menuPlacement,S=g.menuPosition,A=g.menuPortalTarget,k=g.menuShouldBlockScroll,F=g.menuShouldScrollIntoView,D=g.noOptionsMessage,M=g.onMenuScrollToTop,P=g.onMenuScrollToBottom;if(!C)return null;var N,I=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,W.a.createElement(c,s({},p,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())N=m.render.map(function(t){if("group"===t.type){var o=(t.type,h(t,["type"])),i="".concat(t.key,"-heading");return W.a.createElement(n,s({},p,o,{Heading:r,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return I(e)}))}if("option"===t.type)return I(t)});else if(y){var T=E({inputValue:b});if(null===T)return null;N=W.a.createElement(u,p,T)}else{var L=D({inputValue:b});if(null===L)return null;N=W.a.createElement(l,p,L)}var _={minMenuHeight:O,maxMenuHeight:w,menuPlacement:x,menuPosition:S,menuShouldScrollIntoView:F},V=W.a.createElement(re,s({},p,_),function(t){var n=t.ref,r=t.placerProps,a=r.placement,u=r.maxHeight;return W.a.createElement(o,s({},p,_,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:y,placement:a}),W.a.createElement(Pe,{isEnabled:v,onTopArrive:M,onBottomArrive:P},W.a.createElement(De,{isEnabled:k},W.a.createElement(i,s({},p,{innerRef:e.getMenuListRef,isLoading:y,maxHeight:u}),N))))});return A||"fixed"===S?W.a.createElement(a,s({},p,{appendTo:A,controlElement:this.controlRef,menuPlacement:x,menuPosition:S}),V):V}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var u=a.map(function(t){return e.getOptionValue(t)}).join(n);return W.a.createElement("input",{name:i,type:"hidden",value:u})}var s=a.length>0?a.map(function(t,n){return W.a.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):W.a.createElement("input",{name:i,type:"hidden"});return W.a.createElement("div",null,s)}var l=a[0]?this.getOptionValue(a[0]):"";return W.a.createElement("input",{name:i,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?W.a.createElement(Oe,{"aria-live":"assertive"},W.a.createElement("p",{id:"aria-selection-event"},"\xa0",this.state.ariaLiveSelection),W.a.createElement("p",{id:"aria-context"},"\xa0",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,u=i.id,l=i.isDisabled,c=i.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return W.a.createElement(r,s({},f,{className:a,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:p}),this.renderLiveRegion(),W.a.createElement(t,s({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:p,menuIsOpen:c}),W.a.createElement(o,s({},f,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),W.a.createElement(n,s({},f,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(U.Component);u(Rt,"defaultProps",_t);var jt={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Bt=function(e){var t,n;return n=t=function(t){function n(){var e,t;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=g(this,(e=p(n)).call.apply(e,[this].concat(i))),u(m(m(t)),"select",void 0),u(m(m(t)),"state",{inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue}),u(m(m(t)),"onChange",function(e,n){t.callProp("onChange",e,n),t.setState({value:e})}),u(m(m(t)),"onInputChange",function(e,n){var r=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==r?r:e})}),u(m(m(t)),"onMenuOpen",function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})}),u(m(m(t)),"onMenuClose",function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})}),t}return c(n,t),a(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"===typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var t=this,n=this.props,r=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,h(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return W.a.createElement(e,s({},r,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(U.Component),u(t,"defaultProps",jt),n},Ut={cacheOptions:!1,defaultOptions:!1,filterOption:null},Wt=function(e){var t,n;return n=t=function(t){function n(e){var t;return o(this,n),t=g(this,p(n).call(this)),u(m(m(t)),"select",void 0),u(m(m(t)),"lastRequest",void 0),u(m(m(t)),"mounted",!1),u(m(m(t)),"optionsCache",{}),u(m(m(t)),"handleInputChange",function(e,n){var r=t.props,o=r.cacheOptions,i=r.onInputChange,a=C(e,n,i);if(!a)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[a])t.setState({inputValue:a,loadedInputValue:a,loadedOptions:t.optionsCache[a],isLoading:!1,passEmptyOptions:!1});else{var u=t.lastRequest={};t.setState({inputValue:a,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},function(){t.loadOptions(a,function(e){t.mounted&&(e&&(t.optionsCache[a]=e),u===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:a,loadedOptions:e||[],passEmptyOptions:!1})))})})}return a}),t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:"undefined"!==typeof e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return c(n,t),a(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}})}},{key:"componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"===typeof r.then&&r.then(t,function(){return t()})}},{key:"render",value:function(){var t=this,n=this.props,r=(n.loadOptions,h(n,["loadOptions"])),o=this.state,i=o.defaultOptions,a=o.inputValue,u=o.isLoading,l=o.loadedInputValue,c=o.loadedOptions,p=o.passEmptyOptions,f=p?[]:a&&l?c:i||[];return W.a.createElement(e,s({},r,{ref:function(e){t.select=e},options:f,isLoading:u,onInputChange:this.handleInputChange}))}}]),n}(U.Component),u(t,"defaultProps",Ut),n},Ht=Bt(Rt),zt=(Wt(Ht),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e).toLowerCase(),r=String(t.value).toLowerCase(),o=String(t.label).toLowerCase();return r===n||o===n}),Gt={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some(function(t){return zt(e,t)})||n.some(function(t){return zt(e,t)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}},$t=l({allowCreateWhileLoading:!1,createOptionPosition:"last"},Gt),qt=function(e){var t,n;return n=t=function(t){function n(e){var t;o(this,n),t=g(this,p(n).call(this,e)),u(m(m(t)),"select",void 0),u(m(m(t)),"onChange",function(e,n){var r=t.props,o=r.getNewOptionData,i=r.inputValue,a=r.isMulti,u=r.onChange,s=r.onCreateOption,l=r.value;if("select-option"!==n.action)return u(e,n);var c=t.state.newOption,p=Array.isArray(e)?e:[e];if(p[p.length-1]!==c)u(e,n);else if(s)s(i);else{var f=o(i,i),d={action:"create-option"};a?u([].concat(v(ee(l)),[f]),d):u(f,d)}});var r=e.options||[];return t.state={newOption:void 0,options:r},t}return c(n,t),a(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,o=e.getNewOptionData,i=e.inputValue,a=e.isLoading,u=e.isValidNewOption,s=e.value,l=e.options||[],c=this.state.newOption;c=u(i,ee(s),l)?o(i,r(i)):void 0,this.setState({newOption:c,options:!t&&a||!c?l:"first"===n?[c].concat(v(l)):[].concat(v(l),[c])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=s({},this.props),r=this.state.options;return W.a.createElement(e,s({},n,{ref:function(e){t.select=e},options:r,onChange:this.onChange}))}}]),n}(U.Component),u(t,"defaultProps",$t),n},Yt=qt(Rt),Zt=(Bt(Yt),qt(Rt)),Xt=Bt(Zt),Jt=(Wt(Xt),function(e){return function(t){var n=(t.in,t.onExited,t.appear,t.enter,t.exit,h(t,["in","onExited","appear","enter","exit"]));return W.a.createElement(e,n)}}),Kt=function(e){var t=e.component,n=e.duration,r=void 0===n?1:n,o=e.in,i=(e.onExited,h(e,["component","duration","in","onExited"])),a={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(r,"ms")},exiting:{opacity:0},exited:{opacity:0}};return W.a.createElement(K.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:r},function(e){var n={style:l({},a[e])};return W.a.createElement(t,s({innerProps:n},i))})},Qt=260,en=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"duration",Qt),u(m(m(n)),"rafID",void 0),u(m(m(n)),"state",{width:"auto"}),u(m(m(n)),"transition",{exiting:{width:0,transition:"width ".concat(n.duration,"ms ease-out")},exited:{width:0}}),u(m(m(n)),"getWidth",function(e){e&&isNaN(n.state.width)&&(n.rafID=window.requestAnimationFrame(function(){var t=e.getBoundingClientRect(),r=t.width;n.setState({width:r})}))}),u(m(m(n)),"getStyle",function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}}),u(m(m(n)),"getTransition",function(e){return n.transition[e]}),n}return c(t,e),a(t,[{key:"componentWillUnmount",value:function(){this.rafID&&window.cancelAnimationFrame(this.rafID)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.in,o=this.state.width;return W.a.createElement(K.Transition,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,timeout:this.duration},function(t){var r=l({},e.getStyle(o),e.getTransition(t));return W.a.createElement("div",{ref:e.getWidth,style:r},n)})}}]),t}(U.Component),tn=function(e){return function(t){var n=t.in,r=t.onExited,o=h(t,["in","onExited"]);return W.a.createElement(en,{in:n,onExited:r},W.a.createElement(e,s({cropWithEllipsis:n},o)))}},nn=function(e){return function(t){return W.a.createElement(Kt,s({component:e,duration:t.isMulti?Qt:1},t))}},rn=function(e){return function(t){return W.a.createElement(Kt,s({component:e},t))}},on=function(e){return function(t){return W.a.createElement(K.TransitionGroup,s({component:e},t))}},an=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Pt({components:e}),n=t.Input,r=t.MultiValue,o=t.Placeholder,i=t.SingleValue,a=t.ValueContainer,u=h(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return l({Input:Jt(n),MultiValue:tn(r),Placeholder:nn(o),SingleValue:rn(i),ValueContainer:on(a)},u)},un=an(),sn=(un.Input,un.MultiValue,un.Placeholder,un.SingleValue,un.ValueContainer,Object(H.a)(an,_),Bt(Rt));t.a=sn},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(t){"production"===t.env.NODE_ENV?e.exports=n(26):e.exports=n(27)}).call(t,n(0))},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function o(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 i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(){}t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2)),s=r(n(1)),l=r(n(3)),c=n(10),p=n(11),f="unmounted";t.UNMOUNTED=f;var d="exited";t.EXITED=d;var h="entering";t.ENTERING=h;var m="entered";t.ENTERED=m;t.EXITING="exiting";var g=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=d,r.appearStatus=h):o=m:o=t.unmountOnExit||t.mountOnEnter?f:d,r.state={status:o},r.nextCallback=null,r}i(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===f?{status:d}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==m&&(t=h):n!==h&&n!==m||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=l.default.findDOMNode(this);t===h?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===d&&this.setState({status:f})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;if(!t&&!r)return void this.safeSetState({status:m},function(){n.props.onEntered(e)});this.props.onEnter(e,o),this.safeSetState({status:h},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,function(){n.safeSetState({status:m},function(){n.props.onEntered(e,o)})})})},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();if(!n)return void this.safeSetState({status:d},function(){t.props.onExited(e)});this.props.onExit(e),this.safeSetState({status:"exiting"},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:d},function(){t.props.onExited(e)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;if(!e||r)return void setTimeout(this.nextCallback,0);this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)},n.render=function(){var e=this.state.status;if(e===f)return null;var t=this.props,n=t.children,r=o(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return n(e,r);var i=s.default.Children.only(n);return s.default.cloneElement(i,r)},t}(s.default.Component);g.contextTypes={transitionGroup:u.object},g.childContextTypes={transitionGroup:function(){}},g.propTypes="production"!==e.env.NODE_ENV?{children:u.oneOfType([u.func.isRequired,u.element.isRequired]).isRequired,in:u.bool,mountOnEnter:u.bool,unmountOnExit:u.bool,appear:u.bool,enter:u.bool,exit:u.bool,timeout:function(e){var t=p.timeoutsShape;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.apply(void 0,[e].concat(r))},addEndListener:u.func,onEnter:u.func,onEntering:u.func,onEntered:u.func,onExit:u.func,onExiting:u.func,onExited:u.func}:{},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:a,onEntering:a,onEntered:a,onExit:a,onExiting:a,onExited:a},g.UNMOUNTED=0,g.EXITED=1,g.ENTERING=2,g.ENTERED=3,g.EXITING=4;var v=(0,c.polyfill)(g);t.default=v}).call(t,n(0))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){function t(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}this.setState(t.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,u=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?u="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==u){var s=e.displayName||e.name,l="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(2)),o="production"!==e.env.NODE_ENV?r.default.oneOfType([r.default.number,r.default.shape({enter:r.default.number,exit:r.default.number,appear:r.default.number}).isRequired]):null;t.timeoutsShape=o;var i="production"!==e.env.NODE_ENV?r.default.oneOfType([r.default.string,r.default.shape({enter:r.default.string,exit:r.default.string,active:r.default.string}),r.default.shape({enter:r.default.string,enterDone:r.default.string,enterActive:r.default.string,exit:r.default.string,exitDone:r.default.string,exitActive:r.default.string})]):null;t.classNamesShape=i}).call(t,n(0))},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(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 a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.__esModule=!0,t.default=void 0;var l=o(n(2)),c=o(n(1)),p=n(10),f=n(42),d=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},h={component:"div",childFactory:function(e){return e}},m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o=r.handleExited.bind(s(s(r)));return r.state={handleExited:o,firstRender:!0},r}u(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},n.componentDidMount=function(){this.appeared=!0,this.mounted=!0},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,f.getInitialChildMapping)(e,r):(0,f.getNextChildMapping)(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=(0,f.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=a({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=i(e,["component","childFactory"]),o=d(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o:c.default.createElement(t,r,o)},t}(c.default.Component);m.childContextTypes={transitionGroup:l.default.object.isRequired},m.propTypes="production"!==r.env.NODE_ENV?{component:l.default.any,children:l.default.node,appear:l.default.bool,enter:l.default.bool,exit:l.default.bool,childFactory:l.default.func}:{},m.defaultProps=h;var g=(0,p.polyfill)(m);t.default=g,e.exports=t.default}).call(t,n(0))},function(e,t,n){var r,o;!function(){"use strict";function n(){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=n.apply(null,r);a&&e.push(a)}else if("object"===o)for(var u in r)i.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?(n.default=n,e.exports=n):(r=[],void 0!==(o=function(){return n}.apply(t,r))&&(e.exports=o))}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(15),n(44);wp.blocks.updateCategory("groups",{icon:wp.element.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#7392cf"},wp.element.createElement("path",{d:"M 5.14,2.85 C 5.11,2.85 5.09,2.87 5.09,2.90 5.09,2.93 5.11,2.96 5.14,2.96 5.17,2.96 5.19,2.93 5.19,2.90 5.19,2.87 5.17,2.85 5.14,2.85 Z M 1.53,1.64 C 1.49,1.64 1.45,1.68 1.45,1.72 1.45,1.76 1.49,1.80 1.53,1.80 1.58,1.80 1.61,1.76 1.61,1.72 1.61,1.68 1.58,1.64 1.53,1.64 Z M 4.17,1.24 C 4.09,1.24 4.03,1.30 4.03,1.37 4.03,1.44 4.09,1.50 4.17,1.50 4.24,1.50 4.30,1.44 4.30,1.37 4.30,1.30 4.24,1.24 4.17,1.24 Z M 16.67,16.32 C 16.55,16.32 16.45,16.41 16.45,16.53 16.45,16.65 16.55,16.74 16.67,16.74 16.79,16.74 16.88,16.65 16.88,16.53 16.88,16.41 16.79,16.32 16.67,16.32 Z M 3.97,4.68 C 3.78,4.68 3.63,4.83 3.63,5.02 3.63,5.21 3.78,5.37 3.97,5.37 4.16,5.37 4.32,5.21 4.32,5.02 4.32,4.83 4.16,4.68 3.97,4.68 Z M 13.28,8.84 C 12.97,8.84 12.72,9.09 12.72,9.40 12.72,9.71 12.97,9.96 13.28,9.96 13.59,9.96 13.84,9.71 13.84,9.40 13.84,9.09 13.59,8.84 13.28,8.84 Z M 16.63,11.50 C 16.13,11.50 15.73,11.90 15.73,12.40 15.73,12.90 16.13,13.30 16.63,13.30 17.13,13.30 17.53,12.90 17.53,12.40 17.53,11.90 17.13,11.50 16.63,11.50 Z M 8.57,1.55 C 7.26,1.55 6.21,2.60 6.21,3.91 6.21,5.21 7.26,6.27 8.57,6.27 9.87,6.27 10.93,5.21 10.93,3.91 10.93,2.60 9.87,1.55 8.57,1.55 Z M 15.30,1.07 C 13.19,1.07 11.48,2.78 11.48,4.89 11.48,7.00 13.19,8.71 15.30,8.71 17.41,8.71 19.12,7.00 19.12,4.89 19.12,2.78 17.41,1.07 15.30,1.07 Z M 7.25,6.76 C 3.84,6.76 1.07,9.52 1.07,12.94 1.07,16.35 3.84,19.12 7.25,19.12 10.66,19.12 13.43,16.35 13.43,12.94 13.43,9.52 10.66,6.76 7.25,6.76 Z"}))})},function(e,t,n){"use strict";var r=n(5),o=n.n(r),i=n(6),a=n(13),u=n.n(a),s=n(43),l=(n.n(s),wp),c=l.apiFetch,p=wp.i18n.__,f=wp.data,d=f.registerStore,h=f.withSelect,m=wp.blocks.registerBlockType,g=wp.editor,v=g.InspectorControls,b=g.InnerBlocks,y=wp.components,E=y.PanelBody,O=y.PanelRow,w=y.Spinner,C={groups:{}},x={setGroups:function(e){return{type:"SET_GROUPS",groups:e}},receiveGroups:function(e){return{type:"RECEIVE_GROUPS",path:e}}},S=(d("groups/groups-blocks",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments[1];switch(t.type){case"SET_GROUPS":return Object.assign({},e,{groups:t.groups})}return e},actions:x,selectors:{receiveGroups:function(e){return e.groups}},controls:{RECEIVE_GROUPS:function(e){return c({path:e.path})}},resolvers:{receiveGroups:o.a.mark(function e(t){var n;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.receiveGroups("/groups/groups-blocks/groups/");case 2:return n=e.sent,e.abrupt("return",x.setGroups(n));case 4:case"end":return e.stop()}},e,this)})}}),wp.element.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24"},wp.element.createElement("path",{d:"M 14.42,9.58 C 13.75,8.91 12.95,8.57 12.00,8.57 11.05,8.57 10.25,8.91 9.58,9.58 8.91,10.25 8.57,11.05 8.57,12.00 8.57,12.95 8.91,13.75 9.58,14.42 10.25,15.09 11.05,15.43 12.00,15.43 12.95,15.43 13.75,15.09 14.42,14.42 15.09,13.75 15.43,12.95 15.43,12.00 15.43,11.05 15.09,10.25 14.42,9.58 Z M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "})));m("groups/groups-member",{title:p("Groups Member Block","groups"),description:p("Show content for group members","groups"),icon:S,category:"groups",keywords:[p("groups","groups"),p("access","groups"),p("members","groups")],attributes:{groups_select:{type:"string",default:null}},edit:h(function(e){return{groups:e("groups/groups-blocks").receiveGroups()}})(function(e){var t=e.attributes.groups_select,n=e.groups,r=e.className,o=e.setAttributes,a=e.isSelected,s=function(e){return o({groups_select:JSON.stringify(e)})},l=[];return null!==t&&(l=JSON.parse(t)),n.length?[wp.element.createElement(v,null,wp.element.createElement(E,{title:p("Select Groups","groups"),className:"block-inspector"},wp.element.createElement(O,null,wp.element.createElement("label",{htmlFor:"block-groups",className:"groups-inspector__label"},p("Content will be shown to users that are members of these groups:","groups")," ")," ")," ",wp.element.createElement(O,null,wp.element.createElement(i.a,{className:"groups-inspector__control",name:"block-groups",value:l,onChange:s,options:n,isClearable:!0,isMulti:"true"}))," ")," "),wp.element.createElement("div",{className:a?u()(r)+"__selected":e.className},wp.element.createElement("div",{className:u()(r)+"__inner-block"},wp.element.createElement(b,null))," ")]:wp.element.createElement("p",{className:r},wp.element.createElement(w,null),p("Loading...","groups")," ")}),save:function(e){return wp.element.createElement("div",null,wp.element.createElement(b.Content,null))}})},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(17),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var i=t&&t.prototype instanceof o?t:o,a=Object.create(i.prototype),u=new d(r||[]);return a._invoke=l(e,n,u),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function i(){}function a(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function s(e){function t(n,o,i,a){var u=r(e[n],e,o);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"===typeof l&&b.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(l).then(function(e){s.value=e,i(s)},a)}a(u.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function l(e,t,n){var o=S;return function(i,a){if(o===k)throw new Error("Generator is already running");if(o===F){if("throw"===i)throw a;return m()}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=c(u,n);if(s){if(s===D)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===S)throw o=F,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=k;var l=r(e,t,n);if("normal"===l.type){if(o=n.done?F:A,l.arg===D)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=F,n.method="throw",n.arg=l.arg)}}}function c(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,c(e,t),"throw"===t.method))return D;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return D}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,D;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,D):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,D)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function h(e){if(e){var t=e[E];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:m}}function m(){return{value:g,done:!0}}var g,v=Object.prototype,b=v.hasOwnProperty,y="function"===typeof Symbol?Symbol:{},E=y.iterator||"@@iterator",O=y.asyncIterator||"@@asyncIterator",w=y.toStringTag||"@@toStringTag",C="object"===typeof e,x=t.regeneratorRuntime;if(x)return void(C&&(e.exports=x));x=t.regeneratorRuntime=C?e.exports:{},x.wrap=n;var S="suspendedStart",A="suspendedYield",k="executing",F="completed",D={},M={};M[E]=function(){return this};var P=Object.getPrototypeOf,N=P&&P(P(h([])));N&&N!==v&&b.call(N,E)&&(M=N);var I=a.prototype=o.prototype=Object.create(M);i.prototype=I.constructor=a,a.constructor=i,a[w]=i.displayName="GeneratorFunction",x.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===i||"GeneratorFunction"===(t.displayName||t.name))},x.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,w in e||(e[w]="GeneratorFunction")),e.prototype=Object.create(I),e},x.awrap=function(e){return{__await:e}},u(s.prototype),s.prototype[O]=function(){return this},x.AsyncIterator=s,x.async=function(e,t,r,o){var i=new s(n(e,t,r,o));return x.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},u(I),I[w]="Generator",I[E]=function(){return this},I.toString=function(){return"[object Generator]"},x.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},x.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(f),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=b.call(o,"catchLoc"),u=b.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,D):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),D},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),D}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;f(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),D}}}(function(){return this}()||Function("return this")())},function(e,t,n){"use strict";function r(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function o(e,t){void 0===t&&(t=r);var n,o,i=[],a=!1;return function(){for(var r=arguments.length,u=new Array(r),s=0;s<r;s++)u[s]=arguments[s];return a&&n===this&&t(u,i)?o:(o=e.apply(this,u),a=!0,n=this,i=u,o)}}t.a=o},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return a}),n.d(t,"a",function(){return u});var r=n(20),o="undefined"!==typeof e?e:{},i=Object(r.a)(o),a=(i.flush,i.hydrate,i.cx,i.merge,i.getRegisteredStyles,i.injectGlobal),u=(i.keyframes,i.css);i.sheet,i.caches}).call(t,n(7))},function(e,t,n){"use strict";(function(e){function r(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function o(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}function i(t,n){function r(e){w+=e,y&&A.insert(e,M)}function o(t,n){if(null==t)return"";switch(typeof t){case"boolean":return"";case"function":if(void 0!==t.__emotion_styles){var r=t.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==e.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");return r}return void 0===this&&"production"!==e.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),o.call(this,void 0===this?t():t(this.mergedProps,this.context),n);case"object":return i.call(this,t);default:var a=S.registered[t];return!1===n&&void 0!==a?a:t}}function i(t){if(P.has(t))return P.get(t);var n="";return Array.isArray(t)?t.forEach(function(e){n+=o.call(this,e,!1)},this):Object.keys(t).forEach(function(r){if("object"!==typeof t[r])void 0!==S.registered[t[r]]?n+=r+"{"+S.registered[t[r]]+"}":n+=d(r)+":"+h(r,t[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==e.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");Array.isArray(t[r])&&"string"===typeof t[r][0]&&void 0===S.registered[t[r][0]]?t[r].forEach(function(e){n+=d(r)+":"+h(r,e)+";"}):n+=r+"{"+o.call(this,t[r],!1)+"}"}},this),P.set(t,n),n}function a(e,t){void 0===S.inserted[F]&&(w="",k(e,t),S.inserted[F]=w)}function u(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==S.registered[t]?e.push(t):n+=t+" "}),n}function c(e,t){var n=[],r=u(n,e);return n.length<2?e:r+R(n,t)}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(b(t))}function m(e){S.inserted[e]=!0}function g(e){e.forEach(m)}function v(){y&&(A.flush(),A.inject()),S.inserted={},S.registered={}}if(void 0!==t.__SECRET_EMOTION__)return t.__SECRET_EMOTION__;void 0===n&&(n={});var O=n.key||"css";if("production"!==e.env.NODE_ENV&&/[^a-z-]/.test(O))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+O+'" was passed');var w,C,x=p()(r);void 0!==n.prefix&&(C={prefix:n.prefix});var S={registered:{},inserted:{},nonce:n.nonce,key:O},A=new E(n);y&&A.inject();var k=new l.a(C);k.use(n.stylisPlugins)(x);var F,D,M="",P=new WeakMap,N=/label:\s*([^\s;\n{]+)\s*;/g,I=function(e,t){return Object(s.a)(e+t)+t};if("production"!==e.env.NODE_ENV){var T=I,L=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;I=function(e,t){return T(e.replace(L,function(e){return M=e,""}),t)}}var _=function(e){var t=!0,n="",r="";null==e||void 0===e.raw?(t=!1,n+=o.call(this,e,!1)):n+=e[0];for(var i=arguments.length,a=new Array(i>1?i-1:0),u=1;u<i;u++)a[u-1]=arguments[u];return a.forEach(function(r,i){n+=o.call(this,r,46===n.charCodeAt(n.length-1)),!0===t&&void 0!==e[i+1]&&(n+=e[i+1])},this),D=n,n=n.replace(N,function(e,t){return r+="-"+t,""}),F=I(n,r),n};if("production"!==e.env.NODE_ENV){var V=k;k=function(e,t){V(e,t),M=""}}var R=function(){var e=_.apply(this,arguments),t=O+"-"+F;return void 0===S.registered[t]&&(S.registered[t]=D),a("."+t,e),t},j=function(){var e=_.apply(this,arguments),t="animation-"+F;return a("","@keyframes "+t+"{"+e+"}"),t},B=function(){a("",_.apply(this,arguments))};if(y){var U=document.querySelectorAll("[data-emotion-"+O+"]");Array.prototype.forEach.call(U,function(e){A.tags[0].parentNode.insertBefore(e,A.tags[0]),e.getAttribute("data-emotion-"+O).split(" ").forEach(m)})}var W={flush:v,hydrate:g,cx:f,merge:c,getRegisteredStyles:u,injectGlobal:B,keyframes:j,css:R,sheet:A,caches:S};return t.__SECRET_EMOTION__=W,W}var a=n(21),u=n(22),s=n(23),l=n(24),c=n(25),p=n.n(c),f=/[A-Z]|^ms/g,d=Object(a.a)(function(e){return e.replace(f,"-$&").toLowerCase()}),h=function(e,t){return null==t||"boolean"===typeof t?"":1===u.a[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==e.env.NODE_ENV){var m=/(attr|calc|counters?|url)\(/,g=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],v=h;h=function(e,t){return"content"===e&&("string"!==typeof t||-1===g.indexOf(t)&&!m.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),v(e,t)}}var b=function t(n){for(var r=n.length,o=0,i="";o<r;o++){var a=n[o];if(null!=a){var u=void 0;switch(typeof a){case"boolean":break;case"function":"production"!==e.env.NODE_ENV&&console.error("Passing functions to cx is deprecated and will be removed in the next major version of Emotion.\nPlease call the function before passing it to cx."),u=t([a()]);break;case"object":if(Array.isArray(a))u=t(a);else{u="";for(var s in a)a[s]&&s&&(u&&(u+=" "),u+=s)}break;default:u=a}u&&(i&&(i+=" "),i+=u)}}return i},y="undefined"!==typeof document,E=function(){function t(t){this.isSpeedy="production"===e.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=t}var n=t.prototype;return n.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=o(this.opts),this.injected=!0},n.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},n.insert=function(t,n){if(this.isSpeedy){var i=this.tags[this.tags.length-1],a=r(i);try{a.insertRule(t,a.cssRules.length)}catch(n){"production"!==e.env.NODE_ENV&&console.warn("illegal rule",t)}}else{var u=o(this.opts);this.tags.push(u),u.appendChild(document.createTextNode(t+(n||"")))}++this.ctr%65e3===0&&this.tags.push(o(this.opts))},n.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1},t}();t.a=i}).call(t,n(0))},function(e,t,n){"use strict";function r(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}t.a=r},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};t.a=r},function(e,t,n){"use strict";function r(e){for(var t,n=e.length,r=n^n,o=0;n>=4;)t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24,t=1540483477*(65535&t)+((1540483477*(t>>>16)&65535)<<16),t^=t>>>24,t=1540483477*(65535&t)+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^t,n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r^=255&e.charCodeAt(o),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)}return r^=r>>>13,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>15,(r>>>0).toString(36)}t.a=r},function(e,t,n){"use strict";function r(e){function t(e,r,s,l,c){for(var d,h,m,g,v,O=0,C=0,x=0,S=0,A=0,k=0,I=m=d=0,L=0,V=0,R=0,j=0,B=s.length,U=B-1,W="",H="",z="",G="";L<B;){if(h=s.charCodeAt(L),L===U&&0!==C+S+x+O&&(0!==C&&(h=47===C?10:47),S=x=O=0,B++,U++),0===C+S+x+O){if(L===U&&(0<V&&(W=W.replace(f,"")),0<W.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:W+=s.charAt(L)}h=59}switch(h){case 123:for(W=W.trim(),d=W.charCodeAt(0),m=1,j=++L;L<B;){switch(h=s.charCodeAt(L)){case 123:m++;break;case 125:m--;break;case 47:switch(h=s.charCodeAt(L+1)){case 42:case 47:e:{for(I=L+1;I<U;++I)switch(s.charCodeAt(I)){case 47:if(42===h&&42===s.charCodeAt(I-1)&&L+2!==I){L=I+1;break e}break;case 10:if(47===h){L=I+1;break e}}L=I}}break;case 91:h++;case 40:h++;case 34:case 39:for(;L++<U&&s.charCodeAt(L)!==h;);}if(0===m)break;L++}switch(m=s.substring(j,L),0===d&&(d=(W=W.replace(p,"").trim()).charCodeAt(0)),d){case 64:switch(0<V&&(W=W.replace(f,"")),h=W.charCodeAt(1)){case 100:case 109:case 115:case 45:V=r;break;default:V=N}if(m=t(r,V,m,h,c+1),j=m.length,0<T&&(V=n(N,W,R),v=u(3,m,V,r,D,F,j,h,c,l),W=V.join(""),void 0!==v&&0===(j=(m=v.trim()).length)&&(h=0,m="")),0<j)switch(h){case 115:W=W.replace(w,a);case 100:case 109:case 45:m=W+"{"+m+"}";break;case 107:W=W.replace(b,"$1 $2"),m=W+"{"+m+"}",m=1===P||2===P&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=W+m,112===l&&(H+=m,m="")}else m="";break;default:m=t(r,n(r,W,R),m,l,c+1)}z+=m,m=R=V=I=d=0,W="",h=s.charCodeAt(++L);break;case 125:case 59:if(W=(0<V?W.replace(f,""):W).trim(),1<(j=W.length))switch(0===I&&(45===(d=W.charCodeAt(0))||96<d&&123>d)&&(j=(W=W.replace(" ",":")).length),0<T&&void 0!==(v=u(1,W,r,e,D,F,H.length,l,c,l))&&0===(j=(W=v.trim()).length)&&(W="\0\0"),d=W.charCodeAt(0),h=W.charCodeAt(1),d){case 0:break;case 64:if(105===h||99===h){G+=W+s.charAt(L);break}default:58!==W.charCodeAt(j-1)&&(H+=o(W,d,h,W.charCodeAt(2)))}R=V=I=d=0,W="",h=s.charCodeAt(++L)}}switch(h){case 13:case 10:47===C?C=0:0===1+d&&107!==l&&0<W.length&&(V=1,W+="\0"),0<T*_&&u(0,W,r,e,D,F,H.length,l,c,l),F=1,D++;break;case 59:case 125:if(0===C+S+x+O){F++;break}default:switch(F++,g=s.charAt(L),h){case 9:case 32:if(0===S+O+C)switch(A){case 44:case 58:case 9:case 32:g="";break;default:32!==h&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===S+C+O&&(V=R=1,g="\f"+g);break;case 108:if(0===S+C+O+M&&0<I)switch(L-I){case 2:112===A&&58===s.charCodeAt(L-3)&&(M=A);case 8:111===k&&(M=k)}break;case 58:0===S+C+O&&(I=L);break;case 44:0===C+x+S+O&&(V=1,g+="\r");break;case 34:case 39:0===C&&(S=S===h?0:0===S?h:S);break;case 91:0===S+C+x&&O++;break;case 93:0===S+C+x&&O--;break;case 41:0===S+C+O&&x--;break;case 40:if(0===S+C+O){if(0===d)switch(2*A+3*k){case 533:break;default:d=1}x++}break;case 64:0===C+x+S+O+I+m&&(m=1);break;case 42:case 47:if(!(0<S+O+x))switch(C){case 0:switch(2*h+3*s.charCodeAt(L+1)){case 235:C=47;break;case 220:j=L,C=42}break;case 42:47===h&&42===A&&j+2!==L&&(33===s.charCodeAt(j+2)&&(H+=s.substring(j,L+1)),g="",C=0)}}0===C&&(W+=g)}k=A,A=h,L++}if(0<(j=H.length)){if(V=r,0<T&&void 0!==(v=u(2,H,V,e,D,F,j,l,c,l))&&0===(H=v).length)return G+H+z;if(H=V.join(",")+"{"+H+"}",0!==P*M){switch(2!==P||i(H,2)||(M=0),M){case 111:H=H.replace(E,":-moz-$1")+H;break;case 112:H=H.replace(y,"::-webkit-input-$1")+H.replace(y,"::-moz-$1")+H.replace(y,":-ms-input-$1")+H}M=0}}return G+H+z}function n(e,t,n){var o=t.trim().split(g);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var u=0;for(e=0===a?"":e[0]+" ";u<i;++u)t[u]=r(e,t[u],n).trim();break;default:var s=u=0;for(t=[];u<i;++u)for(var l=0;l<a;++l)t[s++]=r(e[l]+" ",o[u],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var a=e+";",u=2*t+3*n+4*r;if(944===u){e=a.indexOf(":",9)+1;var s=a.substring(e,a.length-1).trim();return s=a.substring(0,e).trim()+s+";",1===P||2===P&&i(s,1)?"-webkit-"+s+s:s}if(0===P||2===P&&!i(a,1))return a;switch(u){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(k,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(s=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+s+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(s=a.substring(13).trim(),t=s.indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(t)){case 226:s=a.replace(O,"tb");break;case 232:s=a.replace(O,"tb-rl");break;case 220:s=a.replace(O,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+s+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim(),u=s.charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(111>s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102<u?"inline-":"")+"box")+";"+a.replace(s,"-webkit-"+s)+";"+a.replace(s,"-ms-"+s+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return s=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+s+"-ms-flex-"+s+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(x,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(x,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===A.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(s,"-webkit-"+s)+a.replace(s,"-moz-"+s.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+a}return a}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),L(2!==t?r:r.replace(S,"$1"),n,t)}function a(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(C," or ($1)").substring(4):"("+t+")"}function u(e,t,n,r,o,i,a,u,s,l){for(var p,f=0,d=t;f<T;++f)switch(p=I[f].call(c,e,d,n,r,o,i,a,u,s,l)){case void 0:case!1:case!0:case null:break;default:d=p}if(d!==t)return d}function s(e){switch(e){case void 0:case null:T=I.length=0;break;default:switch(e.constructor){case Array:for(var t=0,n=e.length;t<n;++t)s(e[t]);break;case Function:I[T++]=e;break;case Boolean:_=0|!!e}}return s}function l(e){return e=e.prefix,void 0!==e&&(L=null,e?"function"!==typeof e?P=1:(P=2,L=e):P=0),l}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),V=r,r=[V],0<T){var o=u(-1,n,r,r,D,F,0,0,0,0);void 0!==o&&"string"===typeof o&&(n=o)}var i=t(N,r,n,0,0);return 0<T&&void 0!==(o=u(-2,i,r,r,D,F,i.length,0,0,0))&&(i=o),V="",M=0,F=D=1,i}var p=/^\0+/g,f=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,m=/([,: ])(transform)/g,g=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,E=/:(read-only)/g,O=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,x=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,F=1,D=1,M=0,P=1,N=[],I=[],T=0,L=null,_=0,V="";return c.use=s,c.set=l,void 0!==e&&l(e),c}t.a=r},function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,u,s,l,c,p){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===p?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}})},function(e,t,n){"use strict";function r(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case d:case h:case s:case c:case l:case g:return e;default:switch(e=e&&e.$$typeof){case f:case m:case p:return e;default:return t}}case b:case v:case u:return t}}}function o(e){return r(e)===h}Object.defineProperty(t,"__esModule",{value:!0});var i="function"===typeof Symbol&&Symbol.for,a=i?Symbol.for("react.element"):60103,u=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,p=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.concurrent_mode"):60111,m=i?Symbol.for("react.forward_ref"):60112,g=i?Symbol.for("react.suspense"):60113,v=i?Symbol.for("react.memo"):60115,b=i?Symbol.for("react.lazy"):60116;t.typeOf=r,t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=f,t.ContextProvider=p,t.Element=a,t.ForwardRef=m,t.Fragment=s,t.Lazy=b,t.Memo=v,t.Portal=u,t.Profiler=c,t.StrictMode=l,t.Suspense=g,t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===s||e===h||e===c||e===l||e===g||"object"===typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===v||e.$$typeof===p||e.$$typeof===f||e.$$typeof===m)},t.isAsyncMode=function(e){return o(e)||r(e)===d},t.isConcurrentMode=o,t.isContextConsumer=function(e){return r(e)===f},t.isContextProvider=function(e){return r(e)===p},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return r(e)===m},t.isFragment=function(e){return r(e)===s},t.isLazy=function(e){return r(e)===b},t.isMemo=function(e){return r(e)===v},t.isPortal=function(e){return r(e)===u},t.isProfiler=function(e){return r(e)===c},t.isStrictMode=function(e){return r(e)===l},t.isSuspense=function(e){return r(e)===g}},function(e,t,n){"use strict";(function(e){"production"!==e.env.NODE_ENV&&function(){function e(e){return"string"===typeof e||"function"===typeof e||e===y||e===S||e===O||e===E||e===k||"object"===typeof e&&null!==e&&(e.$$typeof===D||e.$$typeof===F||e.$$typeof===w||e.$$typeof===C||e.$$typeof===A)}function n(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case v:var n=e.type;switch(n){case x:case S:case y:case O:case E:case k:return n;default:var r=n&&n.$$typeof;switch(r){case C:case A:case w:return r;default:return t}}case D:case F:case b:return t}}}function r(e){return $||($=!0,N(!1,"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),o(e)||n(e)===x}function o(e){return n(e)===S}function i(e){return n(e)===C}function a(e){return n(e)===w}function u(e){return"object"===typeof e&&null!==e&&e.$$typeof===v}function s(e){return n(e)===A}function l(e){return n(e)===y}function c(e){return n(e)===D}function p(e){return n(e)===F}function f(e){return n(e)===b}function d(e){return n(e)===O}function h(e){return n(e)===E}function m(e){return n(e)===k}Object.defineProperty(t,"__esModule",{value:!0});var g="function"===typeof Symbol&&Symbol.for,v=g?Symbol.for("react.element"):60103,b=g?Symbol.for("react.portal"):60106,y=g?Symbol.for("react.fragment"):60107,E=g?Symbol.for("react.strict_mode"):60108,O=g?Symbol.for("react.profiler"):60114,w=g?Symbol.for("react.provider"):60109,C=g?Symbol.for("react.context"):60110,x=g?Symbol.for("react.async_mode"):60111,S=g?Symbol.for("react.concurrent_mode"):60111,A=g?Symbol.for("react.forward_ref"):60112,k=g?Symbol.for("react.suspense"):60113,F=g?Symbol.for("react.memo"):60115,D=g?Symbol.for("react.lazy"):60116,M=function(){},P=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!==typeof console&&console.warn(i);try{throw new Error(i)}catch(e){}};M=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];P.apply(void 0,[t].concat(r))}};var N=M,I=x,T=S,L=C,_=w,V=v,R=A,j=y,B=D,U=F,W=b,H=O,z=E,G=k,$=!1;t.typeOf=n,t.AsyncMode=I,t.ConcurrentMode=T,t.ContextConsumer=L,t.ContextProvider=_,t.Element=V,t.ForwardRef=R,t.Fragment=j,t.Lazy=B,t.Memo=U,t.Portal=W,t.Profiler=H,t.StrictMode=z,t.Suspense=G,t.isValidElementType=e,t.isAsyncMode=r,t.isConcurrentMode=o,t.isContextConsumer=i,t.isContextProvider=a,t.isElement=u,t.isForwardRef=s,t.isFragment=l,t.isLazy=c,t.isMemo=p,t.isPortal=f,t.isProfiler=d,t.isStrictMode=h,t.isSuspense=m}()}).call(t,n(0))},function(e,t,n){"use strict";(function(t){function r(){return null}var o=n(8),i=n(29),a=n(4),u=n(30),s=Function.call.bind(Object.prototype.hasOwnProperty),l=function(){};"production"!==t.env.NODE_ENV&&(l=function(e){var t="Warning: "+e;"undefined"!==typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),e.exports=function(e,n){function c(e){var t=e&&(F&&e[F]||e[D]);if("function"===typeof t)return t}function p(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function f(e){this.message=e,this.stack=""}function d(e){function r(r,u,s,c,p,d,h){if(c=c||M,d=d||s,h!==a){if(n){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==t.env.NODE_ENV&&"undefined"!==typeof console){var g=c+":"+s;!o[g]&&i<3&&(l("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),o[g]=!0,i++)}}return null==u[s]?r?new f(null===u[s]?"The "+p+" `"+d+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+p+" `"+d+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(u,s,c,p,d)}if("production"!==t.env.NODE_ENV)var o={},i=0;var u=r.bind(null,!1);return u.isRequired=r.bind(null,!0),u}function h(e){function t(t,n,r,o,i,a){var u=t[n];if(x(u)!==e)return new f("Invalid "+o+" `"+i+"` of type `"+S(u)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return d(t)}function m(e){function t(t,n,r,o,i){if("function"!==typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u)){return new f("Invalid "+o+" `"+i+"` of type `"+x(u)+"` supplied to `"+r+"`, expected an array.")}for(var s=0;s<u.length;s++){var l=e(u,s,r,o,i+"["+s+"]",a);if(l instanceof Error)return l}return null}return d(t)}function g(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||M;return new f("Invalid "+o+" `"+i+"` of type `"+k(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}return d(t)}function v(e){function n(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(p(a,e[u]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===S(t)?String(t):t});return new f("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+s+".")}return Array.isArray(e)?d(n):("production"!==t.env.NODE_ENV&&l(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),r)}function b(e){function t(t,n,r,o,i){if("function"!==typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],l=x(u);if("object"!==l)return new f("Invalid "+o+" `"+i+"` of type `"+l+"` supplied to `"+r+"`, expected an object.");for(var c in u)if(s(u,c)){var p=e(u,c,r,o,i+"."+c,a);if(p instanceof Error)return p}return null}return d(t)}function y(e){function n(t,n,r,o,i){for(var u=0;u<e.length;u++){if(null==(0,e[u])(t,n,r,o,i,a))return null}return new f("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV&&l("Invalid argument supplied to oneOfType, expected an instance of array."),r;for(var o=0;o<e.length;o++){var i=e[o];if("function"!==typeof i)return l("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+A(i)+" at index "+o+"."),r}return d(n)}function E(e){function t(t,n,r,o,i){var u=t[n],s=x(u);if("object"!==s)return new f("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var c=e[l];if(c){var p=c(u,l,r,o,i+"."+l,a);if(p)return p}}return null}return d(t)}function O(e){function t(t,n,r,o,u){var s=t[n],l=x(s);if("object"!==l)return new f("Invalid "+o+" `"+u+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");var c=i({},t[n],e);for(var p in c){var d=e[p];if(!d)return new f("Invalid "+o+" `"+u+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=d(s,p,r,o,u+"."+p,a);if(h)return h}return null}return d(t)}function w(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(w);if(null===t||e(t))return!0;var n=c(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!w(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!w(i[1]))return!1}return!0;default:return!1}}function C(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"===typeof Symbol&&t instanceof Symbol)}function x(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":C(t,e)?"symbol":t}function S(e){if("undefined"===typeof e||null===e)return""+e;var t=x(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function A(e){var t=S(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function k(e){return e.constructor&&e.constructor.name?e.constructor.name:M}var F="function"===typeof Symbol&&Symbol.iterator,D="@@iterator",M="<<anonymous>>",P={array:h("array"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:function(){return d(r)}(),arrayOf:m,element:function(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){return new f("Invalid "+o+" `"+i+"` of type `"+x(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return d(t)}(),elementType:function(){function e(e,t,n,r,i){var a=e[t];if(!o.isValidElementType(a)){return new f("Invalid "+r+" `"+i+"` of type `"+x(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")}return null}return d(e)}(),instanceOf:g,node:function(){function e(e,t,n,r,o){return w(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return d(e)}(),objectOf:b,oneOf:v,oneOfType:y,shape:E,exact:O};return f.prototype=Error.prototype,P.checkPropTypes=u,P.resetWarningCache=u.resetWarningCache,P.PropTypes=P,P}}).call(t,n(0))},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;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(e){return!1}}()?Object.assign:function(e,t){for(var n,u,s=r(e),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var c in n)i.call(n,c)&&(s[c]=n[c]);if(o){u=o(n);for(var p=0;p<u.length;p++)a.call(n,u[p])&&(s[u[p]]=n[u[p]])}}return s}},function(e,t,n){"use strict";(function(t){function r(e,n,r,s,l){if("production"!==t.env.NODE_ENV)for(var c in e)if(u(e,c)){var p;try{if("function"!==typeof e[c]){var f=Error((s||"React class")+": "+r+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.");throw f.name="Invariant Violation",f}p=e[c](n,c,s,r,null,i)}catch(e){p=e}if(!p||p instanceof Error||o((s||"React class")+": type specification of "+r+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in a)){a[p.message]=!0;var d=l?l():"";o("Failed "+r+" type: "+p.message+(null!=d?d:""))}}}var o=function(){};if("production"!==t.env.NODE_ENV){var i=n(4),a={},u=Function.call.bind(Object.prototype.hasOwnProperty);o=function(e){var t="Warning: "+e;"undefined"!==typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}r.resetWarningCache=function(){"production"!==t.env.NODE_ENV&&(a={})},e.exports=r}).call(t,n(0))},function(e,t,n){"use strict";function r(){}function o(){}var i=n(4);o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){(function(t){for(var r=n(33),o="undefined"===typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",u=o["request"+a],s=o["cancel"+a]||o["cancelRequest"+a],l=0;!u&&l<i.length;l++)u=o[i[l]+"Request"+a],s=o[i[l]+"Cancel"+a]||o[i[l]+"CancelRequest"+a];if(!u||!s){var c=0,p=0,f=[];u=function(e){if(0===f.length){var t=r(),n=Math.max(0,1e3/60-(t-c));c=n+t,setTimeout(function(){var e=f.slice(0);f.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout(function(){throw e},0)}},Math.round(n))}return f.push({handle:++p,callback:e,cancelled:!1}),p},s=function(e){for(var t=0;t<f.length;t++)f[t].handle===e&&(f[t].cancelled=!0)}}e.exports=function(e){return u.call(o,e)},e.exports.cancel=function(){s.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=u,e.cancelAnimationFrame=s}}).call(t,n(7))},function(e,t,n){(function(t){(function(){var n,r,o,i,a,u;"undefined"!==typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!==typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,n=function(){var e;return e=r(),1e9*e[0]+e[1]},i=n(),u=1e9*t.uptime(),a=i-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(t,n(0))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=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},l=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(2),d=r(f),h={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},m=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],g=function(e){return m.forEach(function(t){return delete e[t]}),e},v=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},b=!("undefined"===typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),y=function(){return b?"_"+Math.random().toString(36).substr(2,12):void 0},E=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"===typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||y()},n}return u(t,e),l(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||y()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"===typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(v(e,this.sizer),this.placeHolderSizer&&v(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&"undefined"!==typeof this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2;e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0,e<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return b&&e?p.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce(function(e,t){return null!==e&&void 0!==e?e:t}),t=s({},this.props.style);t.display||(t.display="inline-block");var n=s({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=o(this.props,[]);return g(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,p.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),p.default.createElement("input",s({},r,{ref:this.inputRef})),p.default.createElement("div",{ref:this.sizerRef,style:h},e),this.props.placeholder?p.default.createElement("div",{ref:this.placeHolderSizerRef,style:h},this.props.placeholder):null)}}]),t}(c.Component);E.propTypes={className:d.default.string,defaultValue:d.default.any,extraWidth:d.default.oneOfType([d.default.number,d.default.string]),id:d.default.string,injectStyles:d.default.bool,inputClassName:d.default.string,inputRef:d.default.func,inputStyle:d.default.object,minWidth:d.default.oneOfType([d.default.number,d.default.string]),onAutosize:d.default.func,onChange:d.default.func,placeholder:d.default.string,placeholderIsMinWidth:d.default.bool,style:d.default.object,value:d.default.any},E.defaultProps={minWidth:1,injectStyles:!0},t.default=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=r(n(36)),i=r(n(41)),a=r(n(12)),u=r(n(9));e.exports={Transition:u.default,TransitionGroup:a.default,ReplaceTransition:i.default,CSSTransition:o.default}},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(){return i=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},i.apply(this,arguments)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}t.__esModule=!0,t.default=void 0;var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2)),s=o(n(37)),l=o(n(40)),c=o(n(1)),p=o(n(9)),f=n(11),d=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,s.default)(e,t)})},h=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,l.default)(e,t)})},m=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r))||this,t.onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter"),o=r.className;t.removeClasses(e,"exit"),d(e,o),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter"),o=r.activeClassName;t.reflowAndAddClass(e,o),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName,i=n?r+" "+o:o;t.removeClasses(e,n?"appear":"enter"),d(e,i),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit"),r=n.className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),d(e,r),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit"),r=n.activeClassName;t.reflowAndAddClass(e,r),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit"),r=n.doneClassName;t.removeClasses(e,"exit"),d(e,r),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"===typeof n,o=r&&n?n+"-":"",i=r?o+e:n[e];return{className:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}a(t,e);var n=t.prototype;return n.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,i=n.doneClassName;r&&h(e,r),o&&h(e,o),i&&h(e,i)},n.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,d(e,t))},n.render=function(){var e=i({},this.props);return delete e.classNames,c.default.createElement(p.default,i({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(c.default.Component);m.defaultProps={classNames:""},m.propTypes="production"!==r.env.NODE_ENV?i({},p.default.propTypes,{classNames:f.classNamesShape,onEnter:u.func,onEntering:u.func,onEntered:u.func,onExit:u.func,onExiting:u.func,onExited:u.func}):{};var g=m;t.default=g,e.exports=t.default}).call(t,n(0))},function(e,t,n){"use strict";function r(e,t){e.classList?e.classList.add(t):(0,i.default)(e,t)||("string"===typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}var o=n(38);t.__esModule=!0,t.default=r;var i=o(n(39));e.exports=t.default},function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}e.exports=n},function(e,t,n){"use strict";function r(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}t.__esModule=!0,t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"===typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(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 a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}t.__esModule=!0,t.default=void 0;var u=o(n(2)),s=o(n(1)),l=n(3),c=o(n(12)),p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r))||this,t.handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}a(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var r,o=this.props.children,i=s.default.Children.toArray(o)[t];i.props[e]&&(r=i.props)[e].apply(r,n),this.props[e]&&this.props[e]((0,l.findDOMNode)(this))},n.render=function(){var e=this.props,t=e.children,n=e.in,r=i(e,["children","in"]),o=s.default.Children.toArray(t),a=o[0],u=o[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,s.default.createElement(c.default,r,n?s.default.cloneElement(a,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):s.default.cloneElement(u,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(s.default.Component);p.propTypes="production"!==r.env.NODE_ENV?{in:u.default.bool.isRequired,children:function(e,t){return 2!==s.default.Children.count(e[t])?new Error('"'+t+'" must be exactly two transition components.'):null}}:{};var f=p;t.default=f,e.exports=t.default}).call(t,n(0))},function(e,t,n){"use strict";function r(e,t){var n=function(e){return t&&(0,s.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&s.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function o(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,u={};for(var s in t){if(r[s])for(a=0;a<r[s].length;a++){var l=r[s][a];u[r[s][a]]=n(l)}u[s]=n(s)}for(a=0;a<o.length;a++)u[o[a]]=n(o[a]);return u}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}function a(e,t){return r(e.children,function(n){return(0,s.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})}function u(e,t,n){var a=r(e.children),u=o(t,a);return Object.keys(u).forEach(function(r){var o=u[r];if((0,s.isValidElement)(o)){var l=r in t,c=r in a,p=t[r],f=(0,s.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,s.isValidElement)(p)&&(u[r]=(0,s.cloneElement)(o,{onExited:n.bind(null,o),in:p.props.in,exit:i(o,"exit",e),enter:i(o,"enter",e)})):u[r]=(0,s.cloneElement)(o,{in:!1}):u[r]=(0,s.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:i(o,"exit",e),enter:i(o,"enter",e)})}}),u}t.__esModule=!0,t.getChildMapping=r,t.mergeChildMappings=o,t.getInitialChildMapping=a,t.getNextChildMapping=u;var s=n(1)},function(e,t){},function(e,t,n){"use strict";var r=n(5),o=n.n(r),i=n(6),a=n(13),u=n.n(a),s=n(45),l=(n.n(s),wp),c=l.apiFetch,p=wp.i18n.__,f=wp.data,d=f.registerStore,h=f.withSelect,m=wp.blocks.registerBlockType,g=wp.editor,v=g.InspectorControls,b=g.InnerBlocks,y=wp.components,E=y.PanelBody,O=y.PanelRow,w=y.Spinner,C={groups:{}},x={setGroups:function(e){return{type:"SET_GROUPS",groups:e}},receiveGroups:function(e){return{type:"RECEIVE_GROUPS",path:e}}},S=(d("groups/groups-blocks",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments[1];switch(t.type){case"SET_GROUPS":return Object.assign({},e,{groups:t.groups})}return e},actions:x,selectors:{receiveGroups:function(e){return e.groups}},controls:{RECEIVE_GROUPS:function(e){return c({path:e.path})}},resolvers:{receiveGroups:o.a.mark(function e(t){var n;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.receiveGroups("/groups/groups-blocks/groups/");case 2:return n=e.sent,e.abrupt("return",x.setGroups(n));case 4:case"end":return e.stop()}},e,this)})}}),wp.element.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24"},wp.element.createElement("path",{d:"M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "})));m("groups/groups-non-member",{title:p("Groups Non-member Block","groups"),description:p("Hide content from group members","groups"),icon:S,category:"groups",keywords:[p("groups","groups"),p("access","groups"),p("members","groups")],attributes:{groups_select:{type:"string",default:null}},edit:h(function(e){return{groups:e("groups/groups-blocks").receiveGroups()}})(function(e){var t=e.attributes.groups_select,n=e.groups,r=e.className,o=e.setAttributes,a=e.isSelected,s=function(e){return o({groups_select:JSON.stringify(e)})},l=[];return null!==t&&(l=JSON.parse(t)),n.length?[wp.element.createElement(v,null,wp.element.createElement(E,{title:p("Select Groups","groups"),className:"block-inspector"},wp.element.createElement(O,null,wp.element.createElement("label",{htmlFor:"block-groups",className:"groups-inspector__label"},p("Content will be shown to users that are not members of these groups:","groups"))),wp.element.createElement(O,null,wp.element.createElement(i.a,{className:"groups-inspector__control",name:"block-groups",value:l,onChange:s,options:n,isClearable:!0,isMulti:"true"})))),wp.element.createElement("div",{className:a?u()(r)+"__selected":e.className},wp.element.createElement("div",{className:u()(r)+"__inner-block"},wp.element.createElement(b,null)))]:wp.element.createElement("p",{className:r},wp.element.createElement(w,null),p("Loading...","groups"))}),save:function(e){return wp.element.createElement("div",null,wp.element.createElement(b.Content,null))}})},function(e,t){}]);
lib/blocks/dist/blocks.editor.build.css ADDED
@@ -0,0 +1,2 @@
 
 
1
+ .groups-inspector__control{width:100%}.groups-inspector__control>div>div{margin-top:0px}.wp-block-groups-groups-member{border:1px dashed #33333333;border-radius:2px;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;margin:-1px}.wp-block-groups-groups-member:before{font-size:1.618em;content:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='black'><path d='M 14.42,9.58 C 13.75,8.91 12.95,8.57 12.00,8.57 11.05,8.57 10.25,8.91 9.58,9.58 8.91,10.25 8.57,11.05 8.57,12.00 8.57,12.95 8.91,13.75 9.58,14.42 10.25,15.09 11.05,15.43 12.00,15.43 12.95,15.43 13.75,15.09 14.42,14.42 15.09,13.75 15.43,12.95 15.43,12.00 15.43,11.05 15.09,10.25 14.42,9.58 Z M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z ' /></svg>");display:block;position:absolute;top:2px;right:4px;opacity:0.3}body.rtl .wp-block-groups-groups-member::before{left:4px;right:unset}.wp-block-groups-groups-member__inner-block{padding-left:5px}.wp-block-groups-groups-member__selected{border:none;padding:unset;-webkit-box-sizing:unset;box-sizing:unset;margin:unset}.wp-block-groups-groups-member__selected:before{content:''}
2
+ .groups-inspector__control{width:100%}.groups-inspector__control>div>div{margin-top:0px}.wp-block-groups-groups-non-member{border:1px dashed #33333333;border-radius:2px;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;margin:-1px}.wp-block-groups-groups-non-member:before{font-size:1.618em;content:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='black'><path d='M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z ' /></svg>");display:block;position:absolute;top:2px;right:4px;opacity:0.3}body.rtl .wp-block-groups-groups-non-member::before{left:4px;right:unset}.wp-block-groups-groups-non-member__inner-block{padding-left:5px}.wp-block-groups-groups-non-member__selected{border:none;padding:unset;-webkit-box-sizing:unset;box-sizing:unset;margin:unset}.wp-block-groups-groups-non-member__selected:before{content:''}
lib/blocks/src/blocks.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * blocks.js
3
+ *
4
+ * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
5
+ *
6
+ * This code is released under the GNU General Public License.
7
+ * See COPYRIGHT.txt and LICENSE.txt.
8
+ *
9
+ * This code is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * This header and all notices must be kept intact.
15
+ *
16
+ * @author Denitsa Slavcheva
17
+ * @package groups
18
+ * @since groups 2.8.0
19
+ */
20
+
21
+ import './blocks/groups-member/block.js';
22
+ import './blocks/groups-non-member/block.js';
23
+
24
+ // Change the 'groups' category icon in the block editor.
25
+ wp.blocks.updateCategory(
26
+ 'groups',
27
+ {
28
+ icon : wp.element.createElement(
29
+ 'svg',
30
+ {
31
+ width : 20,
32
+ height : 20,
33
+ viewBox: '0 0 20 20',
34
+ fill: '#7392cf'
35
+
36
+ },
37
+ wp.element.createElement( 'path',
38
+ {
39
+ d:"M 5.14,2.85 C 5.11,2.85 5.09,2.87 5.09,2.90 5.09,2.93 5.11,2.96 5.14,2.96 5.17,2.96 5.19,2.93 5.19,2.90 5.19,2.87 5.17,2.85 5.14,2.85 Z M 1.53,1.64 C 1.49,1.64 1.45,1.68 1.45,1.72 1.45,1.76 1.49,1.80 1.53,1.80 1.58,1.80 1.61,1.76 1.61,1.72 1.61,1.68 1.58,1.64 1.53,1.64 Z M 4.17,1.24 C 4.09,1.24 4.03,1.30 4.03,1.37 4.03,1.44 4.09,1.50 4.17,1.50 4.24,1.50 4.30,1.44 4.30,1.37 4.30,1.30 4.24,1.24 4.17,1.24 Z M 16.67,16.32 C 16.55,16.32 16.45,16.41 16.45,16.53 16.45,16.65 16.55,16.74 16.67,16.74 16.79,16.74 16.88,16.65 16.88,16.53 16.88,16.41 16.79,16.32 16.67,16.32 Z M 3.97,4.68 C 3.78,4.68 3.63,4.83 3.63,5.02 3.63,5.21 3.78,5.37 3.97,5.37 4.16,5.37 4.32,5.21 4.32,5.02 4.32,4.83 4.16,4.68 3.97,4.68 Z M 13.28,8.84 C 12.97,8.84 12.72,9.09 12.72,9.40 12.72,9.71 12.97,9.96 13.28,9.96 13.59,9.96 13.84,9.71 13.84,9.40 13.84,9.09 13.59,8.84 13.28,8.84 Z M 16.63,11.50 C 16.13,11.50 15.73,11.90 15.73,12.40 15.73,12.90 16.13,13.30 16.63,13.30 17.13,13.30 17.53,12.90 17.53,12.40 17.53,11.90 17.13,11.50 16.63,11.50 Z M 8.57,1.55 C 7.26,1.55 6.21,2.60 6.21,3.91 6.21,5.21 7.26,6.27 8.57,6.27 9.87,6.27 10.93,5.21 10.93,3.91 10.93,2.60 9.87,1.55 8.57,1.55 Z M 15.30,1.07 C 13.19,1.07 11.48,2.78 11.48,4.89 11.48,7.00 13.19,8.71 15.30,8.71 17.41,8.71 19.12,7.00 19.12,4.89 19.12,2.78 17.41,1.07 15.30,1.07 Z M 7.25,6.76 C 3.84,6.76 1.07,9.52 1.07,12.94 1.07,16.35 3.84,19.12 7.25,19.12 10.66,19.12 13.43,16.35 13.43,12.94 13.43,9.52 10.66,6.76 7.25,6.76 Z" }
40
+ )
41
+ )
42
+ }
43
+ );
lib/blocks/src/blocks/groups-member/block.js ADDED
@@ -0,0 +1,319 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * groups-member/block.js
3
+ *
4
+ * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
5
+ *
6
+ * This code is released under the GNU General Public License.
7
+ * See COPYRIGHT.txt and LICENSE.txt.
8
+ *
9
+ * This code is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * This header and all notices must be kept intact.
15
+ *
16
+ * @author Denitsa Slavcheva
17
+ * @package groups
18
+ * @since groups 2.8.0
19
+ */
20
+
21
+ import Select from 'react-select';
22
+ import classnames from 'classnames';
23
+
24
+ // Import CSS.
25
+ import './editor.scss';
26
+
27
+ const
28
+ {
29
+ apiFetch
30
+ } = wp;
31
+ const
32
+ {
33
+ __
34
+ } = wp.i18n; // Import __() from wp.i18n.
35
+ const
36
+ {
37
+ registerStore,
38
+ withSelect
39
+ } = wp.data; // Import registerStore, withSelect from wp.data.
40
+ const
41
+ {
42
+ registerBlockType
43
+ } = wp.blocks; // Import registerBlockType() from wp.blocks.
44
+ const
45
+ {
46
+ InspectorControls,
47
+ InnerBlocks
48
+ } = wp.editor; // Import InspectorControls, InnerBlocks from wp.editor.
49
+ const
50
+ {
51
+ PanelBody,
52
+ PanelRow,
53
+ Spinner
54
+ } = wp.components; // Import PanelBody, SelectControl from wp.components.
55
+
56
+ // Default state - no groups selected.
57
+ const DEFAULT_STATE = {
58
+ groups:
59
+ {},
60
+ };
61
+ /**
62
+ * Actions object. Actions are payloads of information that send data from the application to the store. Plain JavaScript objects.
63
+ */
64
+ const actions = {
65
+ // Action creator for the action called when settng a group by choosing from the options list.
66
+ setGroups( groups )
67
+ {
68
+ return {
69
+ type: 'SET_GROUPS',
70
+ groups,
71
+ };
72
+ },
73
+
74
+ receiveGroups( path )
75
+ {
76
+ return {
77
+ type: 'RECEIVE_GROUPS',
78
+ path,
79
+ };
80
+ },
81
+ };
82
+
83
+ /**
84
+ * Store
85
+ */
86
+ const store = registerStore(
87
+ 'groups/groups-blocks',
88
+ {
89
+ // The reducer is a pure function that takes the previous state and an action, and returns the next state.
90
+ reducer( state = DEFAULT_STATE, action )
91
+ {
92
+ switch ( action.type )
93
+ {
94
+ case 'SET_GROUPS':
95
+ return {
96
+ // To keep the reducer pure, state should not be mutated.
97
+ // Use object state operator to copy enumerabale properties into a new object instead of Object.assign().
98
+ ...state,
99
+ groups: action.groups,
100
+ };
101
+ }
102
+ // Return the previous state - for when there's an unknown action.
103
+ return state;
104
+ },
105
+
106
+ actions,
107
+ // A selector accepts state and optional arguments and returns some value from state.
108
+ selectors:
109
+ {
110
+ receiveGroups( state )
111
+ {
112
+ const
113
+ {
114
+ groups
115
+ } = state;
116
+ return groups;
117
+ },
118
+ },
119
+ // Defines the execution flow behavior associated with a specific action type.
120
+ controls:
121
+ {
122
+ RECEIVE_GROUPS( action )
123
+ {
124
+ return apiFetch(
125
+ {
126
+ path: action.path
127
+ } );
128
+ },
129
+ },
130
+ // Side-effects for a selector. Used with data from an extrnal source.
131
+ resolvers:
132
+ {
133
+ * receiveGroups( state )
134
+ {
135
+ const groups = yield actions.receiveGroups( '/groups/groups-blocks/groups/' );
136
+ return actions.setGroups( groups );
137
+ },
138
+ },
139
+ }
140
+ );
141
+
142
+
143
+ // SVG for the block icon.
144
+ const memberIcon = wp.element.createElement( 'svg',
145
+ {
146
+ width: 24,
147
+ height: 24,
148
+ viewBox: '0 0 24 24'
149
+ },
150
+ wp.element.createElement( 'path',
151
+ {
152
+ d: "M 14.42,9.58 C 13.75,8.91 12.95,8.57 12.00,8.57 11.05,8.57 10.25,8.91 9.58,9.58 8.91,10.25 8.57,11.05 8.57,12.00 8.57,12.95 8.91,13.75 9.58,14.42 10.25,15.09 11.05,15.43 12.00,15.43 12.95,15.43 13.75,15.09 14.42,14.42 15.09,13.75 15.43,12.95 15.43,12.00 15.43,11.05 15.09,10.25 14.42,9.58 Z M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "
153
+ } )
154
+ );
155
+
156
+ /**
157
+ * Register: Groups Member Gutenberg Block.
158
+ *
159
+ * Registers a new block provided a unique name and an object defining its
160
+ * behavior. Once registered, the block is made editor as an option to any
161
+ * editor interface where blocks are implemented.
162
+ *
163
+ * @link https://wordpress.org/gutenberg/handbook/block-api/
164
+ * @param {string} name Block name.
165
+ * @param {Object} settings Block settings.
166
+ * @return {?WPBlock} The block, if it has been successfully
167
+ * registered; otherwise `undefined`.
168
+ */
169
+ registerBlockType(
170
+ 'groups/groups-member',
171
+ {
172
+ // Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
173
+ title: __( 'Groups Member Block', 'groups' ), // Block title.
174
+ description: __( 'Show content for group members', 'groups' ),
175
+ icon: memberIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
176
+ category: 'groups', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
177
+ keywords: [ __( 'groups', 'groups' ), __( 'access', 'groups' ), __( 'members', 'groups' ) ],
178
+ attributes:
179
+ {
180
+ groups_select:
181
+ {
182
+ type: 'string',
183
+ default: null
184
+ },
185
+ },
186
+
187
+ /**
188
+ * The edit function describes the structure of the block in the context of the editor.
189
+ * This represents what the editor will render when the block is used.
190
+ *
191
+ * The "edit" property must be a valid function.
192
+ *
193
+ * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
194
+ */
195
+
196
+ // Use withSelect to inject state-derived props into a component.
197
+ edit: withSelect(
198
+ ( select ) =>
199
+ {
200
+ return {
201
+ // Uses select() to return an object of the store's selectors. Pre-bound to pass the current state automatically.
202
+ groups: select( 'groups/groups-blocks' ).receiveGroups(),
203
+ };
204
+ }
205
+ )
206
+
207
+ (
208
+ props =>
209
+ {
210
+ const
211
+ {
212
+ attributes:
213
+ {
214
+ groups_select
215
+ },
216
+ groups,
217
+ className,
218
+ setAttributes,
219
+ isSelected
220
+ } = props;
221
+ const handleGroupsChange = ( groups_select ) => setAttributes(
222
+ {
223
+ groups_select: JSON.stringify( groups_select )
224
+ } );
225
+ let selectedGroups = [];
226
+ if ( null !== groups_select )
227
+ {
228
+ selectedGroups = JSON.parse( groups_select );
229
+ }
230
+ // Show if the data is not loaded yet.
231
+ if ( !groups.length )
232
+ {
233
+ return ( <
234
+ p className = {
235
+ className
236
+ } >
237
+ <
238
+ Spinner / >
239
+ {
240
+ __( 'Loading...', 'groups' )
241
+ } <
242
+ / p >
243
+ );
244
+ }
245
+
246
+ return [ <
247
+ InspectorControls >
248
+ <
249
+ PanelBody title = {
250
+ __( 'Select Groups', 'groups' )
251
+ }
252
+ className = "block-inspector" >
253
+ <
254
+ PanelRow >
255
+ <
256
+ label htmlFor = "block-groups"
257
+ className = "groups-inspector__label" >
258
+ {
259
+ __( 'Content will be shown to users that are members of these groups:', 'groups' )
260
+ } <
261
+ / label > <
262
+ / PanelRow > <
263
+ PanelRow >
264
+ <
265
+ Select
266
+ className = "groups-inspector__control"
267
+ name = 'block-groups'
268
+ value = {
269
+ selectedGroups
270
+ }
271
+ onChange = {
272
+ handleGroupsChange
273
+ }
274
+ options = {
275
+ groups
276
+ }
277
+ isClearable
278
+ isMulti = 'true' /
279
+ >
280
+ <
281
+ / PanelRow > <
282
+ / PanelBody > <
283
+ / InspectorControls > , <
284
+ div className = {
285
+ isSelected ? ( classnames( className ) + '__selected' ) : props.className
286
+ } >
287
+ <
288
+ div className = {
289
+ classnames( className ) + '__inner-block'
290
+ } >
291
+ <
292
+ InnerBlocks / >
293
+ <
294
+ / div > <
295
+ / div >
296
+ ];
297
+ }
298
+ ),
299
+
300
+ /**
301
+ * The save function defines the way in which the different attributes should be combined
302
+ * into the final markup, which is then serialized by Gutenberg into post_content.
303
+ *
304
+ * The "save" property must be specified and must be a valid function.
305
+ *
306
+ * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
307
+ */
308
+ save: props =>
309
+ {
310
+ return ( <
311
+ div >
312
+ <
313
+ InnerBlocks.Content / >
314
+ <
315
+ / div >
316
+ );
317
+ },
318
+ }
319
+ );
lib/blocks/src/blocks/groups-member/editor.scss ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * groups-member/editor.scss
3
+ *
4
+ * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
5
+ *
6
+ * This code is released under the GNU General Public License.
7
+ * See COPYRIGHT.txt and LICENSE.txt.
8
+ *
9
+ * This code is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * This header and all notices must be kept intact.
15
+ *
16
+ * @author Denitsa Slavcheva
17
+ * @package groups
18
+ * @since groups 2.8.0
19
+ */
20
+
21
+ .groups-inspector__control {
22
+ width: 100%;
23
+
24
+ > div > div {
25
+ margin-top: 0px;
26
+ }
27
+ }
28
+
29
+ .wp-block-groups-groups-member {
30
+ border: 1px dashed #33333333;
31
+ border-radius: 2px;
32
+ padding: 0;
33
+ box-sizing: border-box;
34
+ margin: -1px;
35
+
36
+ &:before {
37
+ font-size: 1.618em;
38
+ content:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='black'><path d='M 14.42,9.58 C 13.75,8.91 12.95,8.57 12.00,8.57 11.05,8.57 10.25,8.91 9.58,9.58 8.91,10.25 8.57,11.05 8.57,12.00 8.57,12.95 8.91,13.75 9.58,14.42 10.25,15.09 11.05,15.43 12.00,15.43 12.95,15.43 13.75,15.09 14.42,14.42 15.09,13.75 15.43,12.95 15.43,12.00 15.43,11.05 15.09,10.25 14.42,9.58 Z M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z ' /></svg>");
39
+ display: block;
40
+ position: absolute;
41
+ top: 2px;
42
+ right: 4px;
43
+ opacity: 0.3;
44
+ }
45
+ }
46
+
47
+ body.rtl .wp-block-groups-groups-member::before {
48
+ left: 4px;
49
+ right: unset;
50
+ }
51
+
52
+ .wp-block-groups-groups-member__inner-block {
53
+ padding-left: 5px;
54
+ }
55
+
56
+ .wp-block-groups-groups-member__selected {
57
+ border: none;
58
+ padding: unset;
59
+ box-sizing: unset;
60
+ margin: unset;
61
+
62
+ &:before {
63
+ content: '';
64
+ }
65
+ }
lib/blocks/src/blocks/groups-non-member/block.js ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * groups-non-member/block.js
3
+ *
4
+ * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
5
+ *
6
+ * This code is released under the GNU General Public License.
7
+ * See COPYRIGHT.txt and LICENSE.txt.
8
+ *
9
+ * This code is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * This header and all notices must be kept intact.
15
+ *
16
+ * @author Denitsa Slavcheva
17
+ * @package groups
18
+ * @since groups 2.8.0
19
+ */
20
+
21
+ import Select from 'react-select';
22
+ import classnames from 'classnames';
23
+
24
+ // Import CSS.
25
+ import './editor.scss';
26
+
27
+ const { apiFetch } = wp;
28
+ const { __ } = wp.i18n; // Import __() from wp.i18n.
29
+ const { registerStore, withSelect } = wp.data; // Import registerStore, withSelect from wp.data.
30
+ const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks.
31
+ const { InspectorControls, InnerBlocks } = wp.editor; // Import InspectorControls, InnerBlocks from wp.editor.
32
+ const { PanelBody, PanelRow, Spinner } = wp.components; // Import PanelBody, SelectControl from wp.components.
33
+
34
+ // Default state - no groups selected.
35
+ const DEFAULT_STATE = {
36
+ groups: {},
37
+ };
38
+ /**
39
+ * Actions object. Actions are payloads of information that send data from the application to the store. Plain JavaScript objects.
40
+ */
41
+ const actions = {
42
+ // Action creator for the action called when settng a group by choosing from the options list.
43
+ setGroups( groups ) {
44
+ return {
45
+ type: 'SET_GROUPS',
46
+ groups,
47
+ };
48
+ },
49
+
50
+ receiveGroups( path ) {
51
+ return {
52
+ type: 'RECEIVE_GROUPS',
53
+ path,
54
+ };
55
+ },
56
+ };
57
+
58
+ /**
59
+ * Store
60
+ */
61
+ const store = registerStore(
62
+ 'groups/groups-blocks',
63
+ {
64
+ // The reducer is a pure function that takes the previous state and an action, and returns the next state.
65
+ reducer( state = DEFAULT_STATE, action ) {
66
+ switch ( action.type ) {
67
+ case 'SET_GROUPS':
68
+ return {
69
+ // To keep the reducer pure, state should not be mutated.
70
+ // Use object state operator to copy enumerabale properties into a new object instead of Object.assign().
71
+ ...state,
72
+ groups: action.groups,
73
+ };
74
+ }
75
+ // Return the previous state - for when there's an unknown action.
76
+ return state;
77
+ },
78
+
79
+ actions,
80
+ // A selector accepts state and optional arguments and returns some value from state.
81
+ selectors: {
82
+ receiveGroups( state ) {
83
+ const { groups } = state;
84
+ return groups;
85
+ },
86
+ },
87
+ // Defines the execution flow behavior associated with a specific action type.
88
+ controls: {
89
+ RECEIVE_GROUPS( action ) {
90
+ return apiFetch( { path: action.path } );
91
+ },
92
+ },
93
+ // Side-effects for a selector. Used with data from an extrnal source.
94
+ resolvers: {
95
+ * receiveGroups( state ) {
96
+ const groups = yield actions.receiveGroups( '/groups/groups-blocks/groups/' );
97
+ return actions.setGroups( groups );
98
+ },
99
+ },
100
+ }
101
+ );
102
+
103
+
104
+ const nonMemberIcon = wp.element.createElement('svg',
105
+ {
106
+ width: 24,
107
+ height: 24,
108
+ viewBox: '0 0 24 24'
109
+ },
110
+ wp.element.createElement( 'path',
111
+ {
112
+ d:"M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "}
113
+ )
114
+ );
115
+
116
+ /**
117
+ * Register: Groups-Non-member Gutenberg Block.
118
+ *
119
+ * Registers a new block provided a unique name and an object defining its
120
+ * behavior. Once registered, the block is made editor as an option to any
121
+ * editor interface where blocks are implemented.
122
+ *
123
+ * @link https://wordpress.org/gutenberg/handbook/block-api/
124
+ * @param {string} name Block name.
125
+ * @param {Object} settings Block settings.
126
+ * @return {?WPBlock} The block, if it has been successfully
127
+ * registered; otherwise `undefined`.
128
+ */
129
+ registerBlockType(
130
+ 'groups/groups-non-member',
131
+ {
132
+ // Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
133
+ title: __( 'Groups Non-member Block','groups' ), // Block title.
134
+ description: __( 'Hide content from group members', 'groups' ),
135
+ icon: nonMemberIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
136
+ category: 'groups', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
137
+ keywords: [__( 'groups', 'groups' ), __( 'access', 'groups' ), __( 'members', 'groups' ) ],
138
+ attributes: {
139
+ groups_select: {
140
+ type: 'string',
141
+ default: null
142
+ },
143
+ },
144
+
145
+ /**
146
+ * The edit function describes the structure of the block in the context of the editor.
147
+ * This represents what the editor will render when the block is used.
148
+ *
149
+ * The "edit" property must be a valid function.
150
+ *
151
+ * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
152
+ */
153
+
154
+ // Use withSelect to inject state-derived props into a component.
155
+ edit: withSelect(
156
+ ( select ) => {
157
+ return {
158
+ // Uses select() to return an object of the store's selectors. Pre-bound to pass the current state automatically.
159
+ groups: select( 'groups/groups-blocks' ).receiveGroups(),
160
+ };
161
+ }
162
+ )
163
+
164
+ (
165
+ props => {
166
+ const { attributes: { groups_select }, groups, className, setAttributes, isSelected } = props;
167
+ const handleGroupsChange = ( groups_select ) => setAttributes( { groups_select: JSON.stringify( groups_select ) } );
168
+ let selectedGroups = [];
169
+ if ( null !== groups_select ) {
170
+ selectedGroups = JSON.parse( groups_select );
171
+ }
172
+ // Show if the data is not loaded yet.
173
+ if ( ! groups.length ) {
174
+ return (
175
+ < p className = {className} >
176
+ < Spinner / >
177
+ { __( 'Loading...', 'groups' ) }
178
+ < / p >
179
+ );
180
+ }
181
+
182
+ return [
183
+ < InspectorControls >
184
+ < PanelBody title = { __( 'Select Groups', 'groups' ) } className = "block-inspector" >
185
+ < PanelRow >
186
+ < label htmlFor = "block-groups" className = "groups-inspector__label" >
187
+ { __( 'Content will be shown to users that are not members of these groups:', 'groups' ) }
188
+ < / label >
189
+ < / PanelRow >
190
+ < PanelRow >
191
+ < Select
192
+ className = "groups-inspector__control"
193
+ name = 'block-groups'
194
+ value = { selectedGroups }
195
+ onChange = { handleGroupsChange }
196
+ options = { groups }
197
+ isClearable
198
+ isMulti = 'true'
199
+ / >
200
+ < / PanelRow >
201
+ < / PanelBody >
202
+ < / InspectorControls > ,
203
+ < div className = { isSelected ? ( classnames( className ) + '__selected' ) : props.className } >
204
+ < div className = { classnames( className ) + '__inner-block' } >
205
+ < InnerBlocks / >
206
+ < / div >
207
+ < / div >
208
+ ];
209
+ }
210
+ ),
211
+
212
+ /**
213
+ * The save function defines the way in which the different attributes should be combined
214
+ * into the final markup, which is then serialized by Gutenberg into post_content.
215
+ *
216
+ * The "save" property must be specified and must be a valid function.
217
+ *
218
+ * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
219
+ */
220
+ save: props => {
221
+ return (
222
+ < div >
223
+ < InnerBlocks.Content / >
224
+ < / div >
225
+ );
226
+ },
227
+ }
228
+ );
lib/blocks/src/blocks/groups-non-member/editor.scss ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * groups-non-member/editor.scss
3
+ *
4
+ * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
5
+ *
6
+ * This code is released under the GNU General Public License.
7
+ * See COPYRIGHT.txt and LICENSE.txt.
8
+ *
9
+ * This code is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * This header and all notices must be kept intact.
15
+ *
16
+ * @author Denitsa Slavcheva
17
+ * @package groups
18
+ * @since groups 2.8.0
19
+ */
20
+
21
+ .groups-inspector__control {
22
+ width: 100%;
23
+
24
+ > div > div {
25
+ margin-top: 0px;
26
+ }
27
+ }
28
+
29
+ .wp-block-groups-groups-non-member {
30
+ border: 1px dashed #33333333;
31
+ border-radius: 2px;
32
+ padding: 0;
33
+ box-sizing: border-box;
34
+ margin: -1px;
35
+
36
+ &:before {
37
+ font-size: 1.618em;
38
+ content:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='black'><path d='M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z ' /></svg>");
39
+ display: block;
40
+ position: absolute;
41
+ top: 2px;
42
+ right: 4px;
43
+ opacity: 0.3;
44
+ }
45
+ }
46
+
47
+ body.rtl .wp-block-groups-groups-non-member::before {
48
+ left: 4px;
49
+ right: unset;
50
+ }
51
+
52
+ .wp-block-groups-groups-non-member__inner-block {
53
+ padding-left: 5px;
54
+ }
55
+
56
+ .wp-block-groups-groups-non-member__selected {
57
+ border: none;
58
+ padding: unset;
59
+ box-sizing: unset;
60
+ margin: unset;
61
+
62
+ &:before {
63
+ content: '';
64
+ }
65
+ }
lib/blocks/src/class-groups-blocks.php ADDED
@@ -0,0 +1,231 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * class-groups-blocks.php
4
+ *
5
+ * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
6
+ *
7
+ * This code is released under the GNU General Public License.
8
+ * See COPYRIGHT.txt and LICENSE.txt.
9
+ *
10
+ * This code is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * This header and all notices must be kept intact.
16
+ *
17
+ * @author Denitsa Slavcheva
18
+ * @package groups
19
+ * @since groups 2.8.0
20
+ */
21
+
22
+ // Exit if accessed directly.
23
+ if ( ! defined( 'ABSPATH' ) ) {
24
+ exit;
25
+ }
26
+
27
+ require_once GROUPS_ACCESS_LIB . '/class-groups-access-meta-boxes.php';
28
+
29
+ class Groups_Blocks {
30
+
31
+
32
+ public static function init() {
33
+ add_action( 'init', array( __CLASS__, 'groups_blocks_block_init' ) );
34
+ add_action( 'rest_api_init', array( __CLASS__, 'groups_rest' ) );
35
+ add_filter( 'block_categories', array( __CLASS__, 'groups_block_categories' ), 10, 2 );
36
+ }
37
+
38
+ // Create the REST API endpoints.
39
+ public static function groups_rest() {
40
+ register_rest_route(
41
+ // namespace - TODO version portion, change when merging to Groups plugin.
42
+ 'groups/groups-blocks',
43
+ // resource path
44
+ '/groups',
45
+ array(
46
+ // Get the list of existing groups.
47
+ array(
48
+ 'methods' => 'GET',
49
+ 'callback' => array( __CLASS__, 'get_groups' ),
50
+ // Restrict access for the endpoint only to users that can administrate groups restrictions.
51
+ 'permission_callback' => function () {
52
+ return Groups_Access_Meta_Boxes::user_can_restrict();
53
+ },
54
+ ),
55
+ )
56
+ );
57
+ }
58
+
59
+ // Callback function to retrieve existing groups.
60
+ public static function get_groups() {
61
+ $groups_options = array();
62
+
63
+ if ( Groups_Access_Meta_Boxes::user_can_restrict() ) {
64
+ $include = Groups_Access_Meta_Boxes::get_user_can_restrict_group_ids();
65
+ $groups = Groups_Group::get_groups(
66
+ array(
67
+ 'order_by' => 'name',
68
+ 'order' => 'ASC',
69
+ 'include' => $include,
70
+ )
71
+ );
72
+ foreach ( $groups as $key => $group ) {
73
+ $groups_options[] = array(
74
+ 'value' => $group->group_id,
75
+ 'label' => $group->name,
76
+ );
77
+ }
78
+ } else {
79
+ $groups_options = __( 'You cannot set any access restrictions.', 'groups' );
80
+ }
81
+
82
+ return $groups_options;
83
+ }
84
+
85
+ // Add a new block category for 'groups' in the block editor
86
+ public static function groups_block_categories( $categories, $post ) {
87
+ $categories = array_merge(
88
+ $categories,
89
+ array(
90
+ array(
91
+ 'slug' => 'groups',
92
+ 'title' => 'Groups',
93
+ ),
94
+ )
95
+ );
96
+ return $categories;
97
+ }
98
+
99
+ public static function groups_blocks_block_init() {
100
+ // Skip block registration if Gutenberg is not enabled/merged.
101
+ if ( ! function_exists( 'register_block_type' ) ) {
102
+ return;
103
+ }
104
+ // Scripts.
105
+ wp_register_script(
106
+ 'groups_blocks-block-js', // Handle.
107
+ GROUPS_PLUGIN_URL . 'lib/blocks/dist/blocks.build.js',
108
+ array(
109
+ 'wp-blocks',
110
+ 'wp-i18n',
111
+ 'wp-element',
112
+ 'wp-editor',
113
+ ),
114
+ GROUPS_CORE_VERSION
115
+ );
116
+
117
+ wp_set_script_translations(
118
+ 'groups_blocks-block-js',
119
+ 'groups'
120
+ );
121
+
122
+ // Frontend Styles - currently none required.
123
+ // wp_register_style(
124
+ // 'groups_blocks-style-css', // Handle.
125
+ // GROUPS_PLUGIN_URL . 'lib/blocks/dist/blocks.style.build.css',
126
+ // array(), // Dependency to include the CSS after it.
127
+ // GROUPS_CORE_VERSION
128
+ // );
129
+
130
+ // Editor Styles.
131
+ wp_register_style(
132
+ 'groups_blocks-block-editor-css', // Handle.
133
+ GROUPS_PLUGIN_URL . 'lib/blocks/dist/blocks.editor.build.css',
134
+ array( 'wp-edit-blocks' ), // Dependency to include the CSS after it.
135
+ GROUPS_CORE_VERSION
136
+ );
137
+ register_block_type(
138
+ 'groups/groups-member',
139
+ array(
140
+ 'editor_script' => 'groups_blocks-block-js',
141
+ 'editor_style' => 'groups_blocks-block-editor-css',
142
+ 'style' => 'groups_blocks-style-css',
143
+ 'render_callback' => array( __CLASS__, 'groups_member_render_content' ),
144
+ )
145
+ );
146
+ register_block_type(
147
+ 'groups/groups-non-member',
148
+ array(
149
+ 'editor_script' => 'groups_blocks-block-js',
150
+ 'editor_style' => 'groups_blocks-block-editor-css',
151
+ 'style' => 'groups_blocks-style-css',
152
+ 'render_callback' => array( __CLASS__, 'groups_non_member_render_content' ),
153
+ )
154
+ );
155
+ }
156
+
157
+ public static function groups_member_render_content( $attributes, $content ) {
158
+
159
+ $output = '';
160
+ $show_content = false;
161
+ $selected_groups = array();
162
+
163
+ if ( isset( $attributes['groups_select'] ) ) {
164
+ $decoded_groups = json_decode( $attributes['groups_select'] );
165
+ if ( ! empty( $decoded_groups ) ) {
166
+ foreach ( $decoded_groups as $group ) {
167
+ $selected_groups[] = $group->value;
168
+ }
169
+ }
170
+ }
171
+
172
+ $groups_user = new Groups_User( get_current_user_id() );
173
+ foreach ( $selected_groups as $group ) {
174
+ $current_group = Groups_Group::read( $group );
175
+ if ( ! $current_group ) {
176
+ $current_group = Groups_Group::read_by_name( $group );
177
+ }
178
+
179
+ if ( $current_group ) {
180
+ if ( Groups_User_Group::read( $groups_user->user->ID, $current_group->group_id ) ) {
181
+ $show_content = true;
182
+ break;
183
+ }
184
+ }
185
+ }
186
+ if ( $show_content ) {
187
+ $output = '<div>' . $content . '</div>';
188
+ }
189
+
190
+ return $output;
191
+ }
192
+
193
+ public static function groups_non_member_render_content( $attributes, $content ) {
194
+
195
+ $output = '';
196
+ $show_content = true;
197
+ $selected_groups = array();
198
+
199
+ if ( isset( $attributes['groups_select'] ) ) {
200
+ $decoded_groups = json_decode( $attributes['groups_select'] );
201
+ if ( ! empty( $decoded_groups ) ) {
202
+ foreach ( $decoded_groups as $group ) {
203
+ $selected_groups[] = $group->value;
204
+ }
205
+ }
206
+ }
207
+
208
+ $groups_user = new Groups_User( get_current_user_id() );
209
+ foreach ( $selected_groups as $group ) {
210
+ $current_group = Groups_Group::read( $group );
211
+ if ( ! $current_group ) {
212
+ $current_group = Groups_Group::read_by_name( $group );
213
+ }
214
+
215
+ if ( $current_group ) {
216
+ if ( Groups_User_Group::read( $groups_user->user->ID, $current_group->group_id ) ) {
217
+ $show_content = false;
218
+ break;
219
+ }
220
+ }
221
+ }
222
+ if ( $show_content ) {
223
+ $output = '<div>' . $content . '</div>';
224
+ }
225
+
226
+ return $output;
227
+ }
228
+
229
+ }
230
+
231
+ Groups_Blocks::init();
lib/core/class-groups-controller.php CHANGED
@@ -279,7 +279,7 @@ class Groups_Controller {
279
  // For the record ... (and https://core.trac.wordpress.org/ticket/12773 should not be closed)
280
  // dbDelta() fails to handle queries "CREATE TABLE IF NOT EXISTS ..."
281
  // (a regex results in "IF" used as array index holding only last query to create table).
282
- //require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
283
  //dbDelta( $queries );
284
  foreach( $queries as $query ) {
285
  $wpdb->query( $query );
279
  // For the record ... (and https://core.trac.wordpress.org/ticket/12773 should not be closed)
280
  // dbDelta() fails to handle queries "CREATE TABLE IF NOT EXISTS ..."
281
  // (a regex results in "IF" used as array index holding only last query to create table).
282
+ //require_once ABSPATH . 'wp-admin/includes/upgrade.php';
283
  //dbDelta( $queries );
284
  foreach( $queries as $query ) {
285
  $wpdb->query( $query );
lib/core/class-groups-group.php CHANGED
@@ -23,7 +23,7 @@ if ( !defined( 'ABSPATH' ) ) {
23
  exit;
24
  }
25
 
26
- require_once( GROUPS_CORE_LIB . '/interface-i-capable.php' );
27
 
28
  /**
29
  * Group OPM.
23
  exit;
24
  }
25
 
26
+ require_once GROUPS_CORE_LIB . '/interface-i-capable.php';
27
 
28
  /**
29
  * Group OPM.
lib/core/class-groups-help.php CHANGED
@@ -36,7 +36,7 @@ class Groups_Help {
36
  // @todo temporary fix for GFA <= 1.0.11 on localized installations - can be removed when all are updated
37
  if ( defined( 'GFA_VIEWS_LIB' ) ) {
38
  if ( file_exists( GFA_VIEWS_LIB . '/class-gfa-help.php' ) ) {
39
- include_once( GFA_VIEWS_LIB . '/class-gfa-help.php' );
40
  }
41
  }
42
 
36
  // @todo temporary fix for GFA <= 1.0.11 on localized installations - can be removed when all are updated
37
  if ( defined( 'GFA_VIEWS_LIB' ) ) {
38
  if ( file_exists( GFA_VIEWS_LIB . '/class-gfa-help.php' ) ) {
39
+ include_once GFA_VIEWS_LIB . '/class-gfa-help.php';
40
  }
41
  }
42
 
lib/core/class-groups-user.php CHANGED
@@ -23,8 +23,8 @@ if ( !defined( 'ABSPATH' ) ) {
23
  exit;
24
  }
25
 
26
- require_once( GROUPS_CORE_LIB . '/interface-i-capable.php' );
27
- require_once( GROUPS_CORE_LIB . '/class-groups-capability.php' );
28
 
29
  /**
30
  * User OPM.
23
  exit;
24
  }
25
 
26
+ require_once GROUPS_CORE_LIB . '/interface-i-capable.php';
27
+ require_once GROUPS_CORE_LIB . '/class-groups-capability.php';
28
 
29
  /**
30
  * User OPM.
lib/core/wp-init.php CHANGED
@@ -1,19 +1,19 @@
1
  <?php
2
  /**
3
  * wp-init.php
4
- *
5
  * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
6
- *
7
  * This code is released under the GNU General Public License.
8
  * See COPYRIGHT.txt and LICENSE.txt.
9
- *
10
  * This code is distributed in the hope that it will be useful,
11
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
  * GNU General Public License for more details.
14
- *
15
  * This header and all notices must be kept intact.
16
- *
17
  * @author Karim Rahimpur
18
  * @package groups
19
  * @since groups 1.0.0
@@ -48,27 +48,27 @@ if ( !function_exists( 'is_user_member_of_blog' ) ) {
48
  require_once GROUPS_CORE_LIB . '/class-groups-cache.php';
49
  require_once GROUPS_CORE_LIB . '/class-groups-cache-object.php';
50
 
51
- require_once( GROUPS_CORE_LIB . '/class-groups-utility.php' );
52
 
53
  // options
54
- require_once( GROUPS_CORE_LIB . '/class-groups-options.php' );
55
 
56
  // plugin control: activation, deactivation, ...
57
- require_once( GROUPS_CORE_LIB . '/class-groups-controller.php' );
58
 
59
  // legacy enabled?
60
  $groups_legacy_enable = Groups_Options::get_option( GROUPS_LEGACY_ENABLE, GROUPS_LEGACY_ENABLE_DEFAULT );
61
 
62
  // admin
63
  if ( is_admin() ) {
64
- require_once( GROUPS_ADMIN_LIB . '/class-groups-admin.php' );
65
- require_once( GROUPS_ADMIN_LIB . '/class-groups-admin-welcome.php' );
66
  if ( Groups_Options::get_option( GROUPS_SHOW_IN_USER_PROFILE, GROUPS_SHOW_IN_USER_PROFILE_DEFAULT ) ) {
67
- require_once( GROUPS_ADMIN_LIB . '/class-groups-admin-user-profile.php' );
68
  }
69
- require_once( GROUPS_ADMIN_LIB . '/class-groups-admin-users.php' );
70
- require_once( GROUPS_ADMIN_LIB . '/class-groups-admin-posts.php' );
71
- require_once( GROUPS_ADMIN_LIB . '/class-groups-admin-post-columns.php' );
72
  if ( $groups_legacy_enable ) {
73
  require_once GROUPS_LEGACY_LIB . '/admin/class-groups-admin-posts-legacy.php';
74
  require_once GROUPS_LEGACY_LIB . '/admin/class-groups-admin-post-columns-legacy.php';
@@ -77,45 +77,50 @@ if ( is_admin() ) {
77
 
78
  // help
79
  if ( is_admin() ) {
80
- require_once( GROUPS_CORE_LIB . '/class-groups-help.php' );
81
  }
82
 
83
- require_once( GROUPS_CORE_LIB . '/class-groups-capability.php' );
84
- require_once( GROUPS_CORE_LIB . '/class-groups-group.php' );
85
- require_once( GROUPS_CORE_LIB . '/class-groups-group-capability.php' );
86
- require_once( GROUPS_CORE_LIB . '/class-groups-user.php' );
87
- require_once( GROUPS_CORE_LIB . '/class-groups-user-capability.php' );
88
- require_once( GROUPS_CORE_LIB . '/class-groups-user-group.php' );
89
 
90
  /**
91
  * Load auto :
92
  */
93
 
94
- require_once( GROUPS_AUTO_LIB . '/class-groups-registered.php' );
95
 
96
  /**
97
  * Load access :
98
  */
99
 
100
- require_once( GROUPS_ACCESS_LIB . '/class-groups-post-access.php' );
101
  if ( $groups_legacy_enable ) {
102
  require_once GROUPS_LEGACY_LIB . '/access/class-groups-post-access-legacy.php';
103
  }
104
  require_once GROUPS_ACCESS_LIB . '/class-groups-comment-access.php';
105
 
106
  if ( is_admin() ) {
107
- require_once( GROUPS_ACCESS_LIB . '/class-groups-access-meta-boxes.php' );
108
  if ( $groups_legacy_enable ) {
109
- require_once( GROUPS_LEGACY_LIB . '/access/class-groups-access-meta-boxes-legacy.php' );
110
  }
111
  }
112
- require_once( GROUPS_ACCESS_LIB . '/class-groups-access-shortcodes.php' );
113
- require_once( GROUPS_VIEWS_LIB . '/class-groups-shortcodes.php' );
114
 
115
  /**
116
  * Load wp :
117
  */
118
- require_once( GROUPS_WP_LIB . '/class-groups-wordpress.php' );
 
 
 
 
 
119
 
120
  /**
121
  * Extras ...
@@ -123,7 +128,7 @@ require_once( GROUPS_WP_LIB . '/class-groups-wordpress.php' );
123
  require_once GROUPS_EXTRA_LIB . '/class-groups-extra.php';
124
 
125
  // widgets
126
- // include_once( GROUPS_CORE_LIB . '/class-groups-widgets.php' );
127
  // add_action( 'widgets_init', 'groups_widgets_init' );
128
 
129
  /**
@@ -148,11 +153,11 @@ function _groups_get_tablename( $name ) {
148
  * is an administrator, otherwise false.
149
  * To enable admin override (AKA god mode for admins), add this to
150
  * your wp-config.php :
151
- *
152
  * define( 'GROUPS_ADMINISTRATOR_OVERRIDE', true );
153
- *
154
  * Enabling this is NOT recommended for production sites.
155
- *
156
  * @param int $user_id indicate the user ID or omit to check for the current user
157
  * @return boolean
158
  */
1
  <?php
2
  /**
3
  * wp-init.php
4
+ *
5
  * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
6
+ *
7
  * This code is released under the GNU General Public License.
8
  * See COPYRIGHT.txt and LICENSE.txt.
9
+ *
10
  * This code is distributed in the hope that it will be useful,
11
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
  * GNU General Public License for more details.
14
+ *
15
  * This header and all notices must be kept intact.
16
+ *
17
  * @author Karim Rahimpur
18
  * @package groups
19
  * @since groups 1.0.0
48
  require_once GROUPS_CORE_LIB . '/class-groups-cache.php';
49
  require_once GROUPS_CORE_LIB . '/class-groups-cache-object.php';
50
 
51
+ require_once GROUPS_CORE_LIB . '/class-groups-utility.php';
52
 
53
  // options
54
+ require_once GROUPS_CORE_LIB . '/class-groups-options.php';
55
 
56
  // plugin control: activation, deactivation, ...
57
+ require_once GROUPS_CORE_LIB . '/class-groups-controller.php';
58
 
59
  // legacy enabled?
60
  $groups_legacy_enable = Groups_Options::get_option( GROUPS_LEGACY_ENABLE, GROUPS_LEGACY_ENABLE_DEFAULT );
61
 
62
  // admin
63
  if ( is_admin() ) {
64
+ require_once GROUPS_ADMIN_LIB . '/class-groups-admin.php';
65
+ require_once GROUPS_ADMIN_LIB . '/class-groups-admin-welcome.php';
66
  if ( Groups_Options::get_option( GROUPS_SHOW_IN_USER_PROFILE, GROUPS_SHOW_IN_USER_PROFILE_DEFAULT ) ) {
67
+ require_once GROUPS_ADMIN_LIB . '/class-groups-admin-user-profile.php';
68
  }
69
+ require_once GROUPS_ADMIN_LIB . '/class-groups-admin-users.php';
70
+ require_once GROUPS_ADMIN_LIB . '/class-groups-admin-posts.php';
71
+ require_once GROUPS_ADMIN_LIB . '/class-groups-admin-post-columns.php';
72
  if ( $groups_legacy_enable ) {
73
  require_once GROUPS_LEGACY_LIB . '/admin/class-groups-admin-posts-legacy.php';
74
  require_once GROUPS_LEGACY_LIB . '/admin/class-groups-admin-post-columns-legacy.php';
77
 
78
  // help
79
  if ( is_admin() ) {
80
+ require_once GROUPS_CORE_LIB . '/class-groups-help.php';
81
  }
82
 
83
+ require_once GROUPS_CORE_LIB . '/class-groups-capability.php';
84
+ require_once GROUPS_CORE_LIB . '/class-groups-group.php';
85
+ require_once GROUPS_CORE_LIB . '/class-groups-group-capability.php';
86
+ require_once GROUPS_CORE_LIB . '/class-groups-user.php';
87
+ require_once GROUPS_CORE_LIB . '/class-groups-user-capability.php';
88
+ require_once GROUPS_CORE_LIB . '/class-groups-user-group.php';
89
 
90
  /**
91
  * Load auto :
92
  */
93
 
94
+ require_once GROUPS_AUTO_LIB . '/class-groups-registered.php';
95
 
96
  /**
97
  * Load access :
98
  */
99
 
100
+ require_once GROUPS_ACCESS_LIB . '/class-groups-post-access.php';
101
  if ( $groups_legacy_enable ) {
102
  require_once GROUPS_LEGACY_LIB . '/access/class-groups-post-access-legacy.php';
103
  }
104
  require_once GROUPS_ACCESS_LIB . '/class-groups-comment-access.php';
105
 
106
  if ( is_admin() ) {
107
+ require_once GROUPS_ACCESS_LIB . '/class-groups-access-meta-boxes.php';
108
  if ( $groups_legacy_enable ) {
109
+ require_once GROUPS_LEGACY_LIB . '/access/class-groups-access-meta-boxes-legacy.php';
110
  }
111
  }
112
+ require_once GROUPS_ACCESS_LIB . '/class-groups-access-shortcodes.php';
113
+ require_once GROUPS_VIEWS_LIB . '/class-groups-shortcodes.php';
114
 
115
  /**
116
  * Load wp :
117
  */
118
+ require_once GROUPS_WP_LIB . '/class-groups-wordpress.php';
119
+
120
+ /**
121
+ * Load blocks :
122
+ */
123
+ require_once GROUPS_BLOCKS_LIB . '/src/class-groups-blocks.php';
124
 
125
  /**
126
  * Extras ...
128
  require_once GROUPS_EXTRA_LIB . '/class-groups-extra.php';
129
 
130
  // widgets
131
+ // include_once GROUPS_CORE_LIB . '/class-groups-widgets.php';
132
  // add_action( 'widgets_init', 'groups_widgets_init' );
133
 
134
  /**
153
  * is an administrator, otherwise false.
154
  * To enable admin override (AKA god mode for admins), add this to
155
  * your wp-config.php :
156
+ *
157
  * define( 'GROUPS_ADMINISTRATOR_OVERRIDE', true );
158
+ *
159
  * Enabling this is NOT recommended for production sites.
160
+ *
161
  * @param int $user_id indicate the user ID or omit to check for the current user
162
  * @return boolean
163
  */
lib/test/groups-tests.php CHANGED
@@ -308,7 +308,7 @@ if ( defined( 'ABSPATH' ) ) {
308
  assert( 'Groups_User_Group::delete($foo_user_id, $banana_group_id) === false' );
309
 
310
  // delete test users
311
- include_once( ABSPATH . '/wp-admin/includes/user.php' );
312
  if ( $foo_user_id && !( $foo_user_id instanceof WP_Error ) ) {
313
  assert( 'wp_delete_user( $foo_user_id ) === true' );
314
  }
308
  assert( 'Groups_User_Group::delete($foo_user_id, $banana_group_id) === false' );
309
 
310
  // delete test users
311
+ include_once ABSPATH . '/wp-admin/includes/user.php';
312
  if ( $foo_user_id && !( $foo_user_id instanceof WP_Error ) ) {
313
  assert( 'wp_delete_user( $foo_user_id ) === true' );
314
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: groups, access, access control, membership, memberships, member, members,
5
  Requires at least: 4.6
6
  Tested up to: 5.2
7
  Requires PHP: 5.6.0
8
- Stable tag: 2.7.2
9
  License: GPLv3
10
 
11
  Groups is an efficient and powerful solution, providing group-based user membership management, group-based capabilities and content access control.
@@ -57,6 +57,9 @@ Fully supports custom post types, so that access to post types such as products
57
  Shortcodes: [groups_member], [groups_non_member]
58
  - Control access to content by capabilities: show (or do not show) content to users who have certain capabilities -
59
  Shortcodes: [groups_can], [groups_can_not]
 
 
 
60
 
61
  #### Easy user interface ####
62
 
@@ -190,8 +193,13 @@ See also the [Groups Documentation](http://docs.itthinx.com/document/groups/) pa
190
 
191
  == Changelog ==
192
 
 
 
 
 
 
193
  For the full changelog see [changelog.txt](https://github.com/itthinx/groups/blob/master/changelog.txt).
194
 
195
  == Upgrade Notice ==
196
 
197
- This release has been tested with the latest version of WordPress.
5
  Requires at least: 4.6
6
  Tested up to: 5.2
7
  Requires PHP: 5.6.0
8
+ Stable tag: 2.8.0
9
  License: GPLv3
10
 
11
  Groups is an efficient and powerful solution, providing group-based user membership management, group-based capabilities and content access control.
57
  Shortcodes: [groups_member], [groups_non_member]
58
  - Control access to content by capabilities: show (or do not show) content to users who have certain capabilities -
59
  Shortcodes: [groups_can], [groups_can_not]
60
+ - Blocks: The Groups Member block allows to restrict the visibility of its content to members of selected groups.
61
+ The Groups Non-Member block hides its content from members of chosen groups.
62
+ The blocks can be nested to provide multiple layers of access control to content.
63
 
64
  #### Easy user interface ####
65
 
193
 
194
  == Changelog ==
195
 
196
+ = 2.8.0 =
197
+ * Added the Groups Members block: A block whose content is only visible for members of selected groups.
198
+ * Added the Groups Non-Members block: a block whose content is hidden for members of chosen groups.
199
+ * Removed use of parenthesis with require_once and include_once.
200
+
201
  For the full changelog see [changelog.txt](https://github.com/itthinx/groups/blob/master/changelog.txt).
202
 
203
  == Upgrade Notice ==
204
 
205
+ This release has been tested with the latest version of WordPress and adds blocks that can be used to protect content.