TypeSquare Webfonts SAKURA for SAKURA Rental Server - Version 0.9.0

Version Description

Download this release

Release Info

Developer sakurainternet
Plugin Icon 128x128 TypeSquare Webfonts SAKURA for SAKURA Rental Server
Version 0.9.0
Comparing to
See all releases

Version 0.9.0

Files changed (5) hide show
  1. bin/install-wp-tests.sh +120 -0
  2. inc/admin-base.php +49 -0
  3. inc/admin-fonttheme.php +200 -0
  4. inc/admin-root.php +269 -0
  5. inc/app.js +14285 -0
bin/install-wp-tests.sh ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+
3
+ if [ $# -lt 3 ]; then
4
+ echo "usage: $0 <db-name> <db-user> <db-pass> [db-host] [wp-version]"
5
+ exit 1
6
+ fi
7
+
8
+ DB_NAME=$1
9
+ DB_USER=$2
10
+ DB_PASS=$3
11
+ DB_HOST=${4-localhost}
12
+ WP_VERSION=${5-latest}
13
+
14
+ WP_TESTS_DIR=${WP_TESTS_DIR-/tmp/wordpress-tests-lib}
15
+ WP_CORE_DIR=${WP_CORE_DIR-/tmp/wordpress/}
16
+
17
+ download() {
18
+ if [ `which curl` ]; then
19
+ curl -s "$1" > "$2";
20
+ elif [ `which wget` ]; then
21
+ wget -nv -O "$2" "$1"
22
+ fi
23
+ }
24
+
25
+ if [[ $WP_VERSION =~ [0-9]+\.[0-9]+(\.[0-9]+)? ]]; then
26
+ WP_TESTS_TAG="tags/$WP_VERSION"
27
+ elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
28
+ WP_TESTS_TAG="trunk"
29
+ else
30
+ # http serves a single offer, whereas https serves multiple. we only want one
31
+ download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json
32
+ grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json
33
+ LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//')
34
+ if [[ -z "$LATEST_VERSION" ]]; then
35
+ echo "Latest WordPress version could not be found"
36
+ exit 1
37
+ fi
38
+ WP_TESTS_TAG="tags/$LATEST_VERSION"
39
+ fi
40
+
41
+ set -ex
42
+
43
+ install_wp() {
44
+
45
+ if [ -d $WP_CORE_DIR ]; then
46
+ return;
47
+ fi
48
+
49
+ mkdir -p $WP_CORE_DIR
50
+
51
+ if [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
52
+ mkdir -p /tmp/wordpress-nightly
53
+ download https://wordpress.org/nightly-builds/wordpress-latest.zip /tmp/wordpress-nightly/wordpress-nightly.zip
54
+ unzip -q /tmp/wordpress-nightly/wordpress-nightly.zip -d /tmp/wordpress-nightly/
55
+ mv /tmp/wordpress-nightly/wordpress/* $WP_CORE_DIR
56
+ else
57
+ if [ $WP_VERSION == 'latest' ]; then
58
+ local ARCHIVE_NAME='latest'
59
+ else
60
+ local ARCHIVE_NAME="wordpress-$WP_VERSION"
61
+ fi
62
+ download https://wordpress.org/${ARCHIVE_NAME}.tar.gz /tmp/wordpress.tar.gz
63
+ tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR
64
+ fi
65
+
66
+ download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php
67
+ }
68
+
69
+ install_test_suite() {
70
+ # portable in-place argument for both GNU sed and Mac OSX sed
71
+ if [[ $(uname -s) == 'Darwin' ]]; then
72
+ local ioption='-i .bak'
73
+ else
74
+ local ioption='-i'
75
+ fi
76
+
77
+ # set up testing suite if it doesn't yet exist
78
+ if [ ! -d $WP_TESTS_DIR ]; then
79
+ # set up testing suite
80
+ mkdir -p $WP_TESTS_DIR
81
+ svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
82
+ fi
83
+
84
+ cd $WP_TESTS_DIR
85
+
86
+ if [ ! -f wp-tests-config.php ]; then
87
+ download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php
88
+ sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR':" "$WP_TESTS_DIR"/wp-tests-config.php
89
+ sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php
90
+ sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php
91
+ sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php
92
+ sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php
93
+ fi
94
+
95
+ }
96
+
97
+ install_db() {
98
+ # parse DB_HOST for port or socket references
99
+ local PARTS=(${DB_HOST//\:/ })
100
+ local DB_HOSTNAME=${PARTS[0]};
101
+ local DB_SOCK_OR_PORT=${PARTS[1]};
102
+ local EXTRA=""
103
+
104
+ if ! [ -z $DB_HOSTNAME ] ; then
105
+ if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then
106
+ EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp"
107
+ elif ! [ -z $DB_SOCK_OR_PORT ] ; then
108
+ EXTRA=" --socket=$DB_SOCK_OR_PORT"
109
+ elif ! [ -z $DB_HOSTNAME ] ; then
110
+ EXTRA=" --host=$DB_HOSTNAME --protocol=tcp"
111
+ fi
112
+ fi
113
+
114
+ # create database
115
+ mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA
116
+ }
117
+
118
+ install_wp
119
+ install_test_suite
120
+ install_db
inc/admin-base.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class TypeSquare_Admin_Base {
3
+ private static $instance;
4
+
5
+ private static $text_domain;
6
+
7
+ const MENU_ID = 'typesquare-admin-menu';
8
+ const FONT_THEME = 'typesquare_fonttheme';
9
+ const MESSAGE_KEY = 'typesquare-admin-errors';
10
+ const MENU_FONTTHEME = 'typesquare-admin-fonttheme';
11
+ const MENU_FONTGEN = 'typesquare-admin-fontgen';
12
+ const FONT_THEME_MAX = 10;
13
+ private function __construct(){}
14
+
15
+ public static function get_instance() {
16
+ if ( ! isset( self::$instance ) ) {
17
+ $c = __CLASS__;
18
+ self::$instance = new $c();
19
+ }
20
+ return self::$instance;
21
+ }
22
+
23
+ public function get_auth_params() {
24
+ $auth = TypeSquare_ST_Auth::get_instance();
25
+ $param = $auth->get_auth_params();
26
+ return $param;
27
+ }
28
+
29
+ public function set_error_messages( $wp_error ) {
30
+ $msg[] = $wp_error->get_error_message();
31
+ set_transient( self::MESSAGE_KEY , $msg, 10 );
32
+ }
33
+
34
+ public function typesquare_admin_notices() {
35
+ $messages = get_transient( self::MESSAGE_KEY );
36
+ if ( ! $messages ) {
37
+ return;
38
+ }
39
+ ?>
40
+ <div class="error">
41
+ <ul>
42
+ <?php foreach ( $messages as $message ) : ?>
43
+ <li><?php echo esc_html( $message );?></li>
44
+ <?php endforeach;?>
45
+ </ul>
46
+ </div>
47
+ <?php
48
+ }
49
+ }
inc/admin-fonttheme.php ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class TypeSquare_Admin_Fonttheme extends TypeSquare_Admin_Base {
3
+ private static $instance;
4
+ private static $text_domain;
5
+
6
+ private function __construct(){}
7
+
8
+ public static function get_instance() {
9
+ if ( ! isset( self::$instance ) ) {
10
+ $c = __CLASS__;
11
+ self::$instance = new $c();
12
+ }
13
+ return self::$instance;
14
+ }
15
+
16
+ public function fonttheme_setting() {
17
+ $option_name = 'typesquare_auth';
18
+ $nonce_key = TypeSquare_ST::OPTION_NAME;
19
+ echo "<div class='wrap'>";
20
+ echo '<h2>'. __( 'カスタムフォントテーマ' , self::$text_domain ). '</h2>';
21
+ echo '<p>'. __( 'オリジナルのフォントテーマの作成や編集が行えます。' , self::$text_domain ). '</p>';
22
+ do_action( 'typesquare_add_setting_before' );
23
+ $auth_param = $this->get_auth_params();
24
+ if ( false !== $auth_param['typesquare_auth']['auth_status'] ) {
25
+ echo $this->_get_custome_font_theme_list_form();
26
+ }
27
+ do_action( 'typesquare_add_setting_after' );
28
+ }
29
+
30
+ /**
31
+ * @TODO: to use font theme generator
32
+ **/
33
+ public function get_font_select_form() {
34
+ $options = get_option( 'typesquare_custom_theme' );
35
+ $edit_theme = false;
36
+ if ( isset( $_POST['edit_theme'] ) ) {
37
+ $edit_theme = esc_attr( $_POST['edit_theme'] );
38
+ }
39
+ $fonts = TypeSquare_ST_Fonts::get_instance();
40
+ /* @TODO Debug Code
41
+ $option_name = 'typesquare_fonttheme';
42
+ $param = get_option( $option_name );
43
+ unset($param['fonts']);
44
+ update_option( $option_name, $param );
45
+ $param = $fonts->get_fonttheme_options();
46
+ */
47
+ $font_list = $theme_id = $theme_name = '';
48
+ if ( $edit_theme && $options['theme'][ $edit_theme ] ) {
49
+ $theme_name = $options['theme'][ $edit_theme ]['name'];
50
+ $theme_id = $options['theme'][ $edit_theme ]['id'];
51
+ $font_list = $options['fonts'][ $edit_theme ];
52
+ }
53
+
54
+ $html = '';
55
+ $html .= '<hr/>';
56
+ $query = './admin.php?page='. self::MENU_FONTTHEME;
57
+ $html .= "<form method='post' action='{$query}' id='". self::MENU_FONTTHEME. "'>";
58
+ $html .= wp_nonce_field( 'ts_update_font_name_setting', 'ts_update_font_name_setting', true , false );
59
+ if ( $theme_id ) {
60
+ $theme_input = "<input type='hidden' name='typesquare_custom_theme[id]' value='{$theme_id}' />";
61
+ $html .= "<input type='hidden' name='ts_edit_mode' value='update' />";
62
+ $html .= $theme_input;
63
+ } else {
64
+ $theme_id = uniqid();
65
+ $theme_input = false;
66
+ $html .= "<input type='hidden' name='ts_edit_mode' value='new' />";
67
+ $html .= "<input type='hidden' name='typesquare_custom_theme[id]' value='{$theme_id}' maxlength='16' style='width:100%;' pattern='^[0-9A-Za-z]+$' required/>";
68
+ }
69
+ $html .= '<h4>■'. __( 'フォントテーマ名' , self::$text_domain ). '</h4>';
70
+ $html .= '<p>'. __( 'フォントテーマの名称を設定します。(最大16文字まで)' , self::$text_domain ). '</p>';
71
+ $html .= "<input type='text' name='typesquare_custom_theme[name]' value='{$theme_name}' maxlength='16' style='width:100%;' required/>";
72
+ $html .= '<h4>■'. __( 'フォントテーマの設定' , self::$text_domain ). '</h4>';
73
+ $html .= '<p>'. __( '各クラスに設定するフォントを選択します。' , self::$text_domain ). '</p>';
74
+ $html .= "<div id='ts-react-search-font'></div>";
75
+ $html .= get_submit_button( __( 'フォントテーマを設定する', self::$text_domain ) );
76
+ $html .= '</form>';
77
+ $html .= $this->_get_delete_fonttheme_form( $theme_input );
78
+ $html .= $this->_get_script( $font_list );
79
+ return $html;
80
+ }
81
+
82
+ private function _get_script( $font_list ) {
83
+ $vars = "var form_id = '#". self::MENU_FONTTHEME. "';";
84
+ $vars .= "var notify_text = '". __( 'フォントを1種類以上選択してください。', self::$text_domain ). "';";
85
+ $script = <<<EOM
86
+ {$vars}
87
+ jQuery( document ).ready(function() {
88
+ jQuery( form_id ).submit(function() {
89
+ var title = jQuery( 'select[name="typesquare_custom_theme[fonts][title][font]"]' ).val();
90
+ var lead = jQuery( 'select[name="typesquare_custom_theme[fonts][lead][font]"]' ).val();
91
+ var text = jQuery( 'select[name="typesquare_custom_theme[fonts][text][font]"]' ).val();
92
+ var bold = jQuery( 'select[name="typesquare_custom_theme[fonts][bold][font]"]' ).val();
93
+ if (
94
+ title === 'false' &&
95
+ lead === 'false' &&
96
+ text === 'false' &&
97
+ bold === 'false'
98
+ ) {
99
+ alert( notify_text );
100
+ return false;
101
+ }
102
+ });
103
+ });
104
+ EOM;
105
+ $html = '<script>';
106
+ $endpoint = path_join( TS_PLUGIN_URL , 'inc/font.json' );
107
+ $html .= "var json_endpoint = '{$endpoint}';";
108
+ if ( $font_list ) {
109
+ $html .= "var current_font = ". json_encode( $font_list ) .';';
110
+ } else {
111
+ $html .= "var current_font = false;";
112
+ }
113
+ $html .= $script;
114
+ $html .= '</script>';
115
+ return $html;
116
+ }
117
+
118
+ private function _get_delete_fonttheme_form( $theme_input ) {
119
+ $html = '';
120
+ $query = './admin.php?page='. self::MENU_FONTTHEME;
121
+ if ( $theme_input ) {
122
+ $html .= "<form method='post' action='{$query}'>";
123
+ $html .= "<input type='hidden' name='ts_edit_mode' value='delete' />";
124
+ $html .= $theme_input;
125
+ $html .= wp_nonce_field( 'ts_update_font_name_setting', 'ts_update_font_name_setting', true , false );
126
+ $html .= get_submit_button( __( 'フォントテーマを削除する', self::$text_domain ) );
127
+ $html .= '</form>';
128
+ }
129
+ return $html;
130
+ }
131
+
132
+ private function _get_custome_font_theme_list_form() {
133
+ $options = get_option( 'typesquare_custom_theme' );
134
+ $query = './admin.php?page='. self::MENU_FONTGEN;
135
+ $html = '';
136
+ if ( is_array( $options['theme'] ) && ! empty( $options['theme'] ) ) {
137
+ $html .= '<h3>■'. __( 'カスタムフォントテーマ一覧' , self::$text_domain ). '</h3>';
138
+ $html .= "<table class='widefat form-table'>";
139
+ $html .= '<tbody>';
140
+ $html .= '<tr><td>';
141
+ $html .= "<form method='POST' action='{$query}'>";
142
+ $html .= "<select name='edit_theme'>";
143
+ foreach ( $options['theme'] as $option ) {
144
+ $name = $option['name'];
145
+ $id = $option['id'];
146
+ $fonts = $this->_get_font_data( $option['fonts'] );
147
+ $fonts = "( {$fonts} )";
148
+ $html .= "<option value='{$id}'>{$name}{$fonts}</option>";
149
+ }
150
+ $html .= '</select>';
151
+ $html .= "<input type='hidden' name='ts_edit_mode' value='update' />";
152
+ $html .= get_submit_button( __( '編集する', self::$text_domain ) );
153
+ $html .= wp_nonce_field( 'ts_update_font_list' , 'ts_update_font_list' , true , false );
154
+ $html .= '</form>';
155
+ $html .= '</td></tr>';
156
+ $html .= '</tbody>';
157
+ $html .= '</table>';
158
+ }
159
+ if (count($options['theme']) < self::FONT_THEME_MAX) {
160
+ $html .= "<form method='POST' action='{$query}'>";
161
+ $html .= "<input type='hidden' name='ts_edit_mode' value='new' />";
162
+ $html .= get_submit_button( __( '新しいカスタムフォントテーマを作成する', self::$text_domain ) );
163
+ $html .= wp_nonce_field( 'ts_update_font_list' , 'ts_update_font_list' , true , false );
164
+ $html .= '</form>';
165
+ }
166
+ return $html;
167
+ }
168
+
169
+ private function _get_font_data( $fonts ) {
170
+ $text = '';
171
+ if ( isset( $fonts['title'] ) ) {
172
+ $text .= __( '見出し:', self::$text_domain ). $fonts['title']. ',';
173
+ }
174
+ if ( isset( $fonts['lead'] ) ) {
175
+ $text .= __( 'リード:', self::$text_domain ). $fonts['lead']. ',';
176
+ }
177
+ if ( isset( $fonts['text'] ) ) {
178
+ $text .= __( '本文:', self::$text_domain ). $fonts['text']. ',';
179
+ }
180
+ if ( isset( $fonts['bold'] ) ) {
181
+ $text .= __( '太字:', self::$text_domain ). $fonts['bold']. ',';
182
+ }
183
+ $text = rtrim( $text, ',' );
184
+ $text = str_replace( ",", " / ", $text );
185
+ return $text;
186
+ }
187
+
188
+ public function fonttheme_generator() {
189
+ $option_name = 'typesquare_auth';
190
+ $nonce_key = TypeSquare_ST::OPTION_NAME;
191
+ echo "<div class='wrap'>";
192
+ echo '<h2>'. __( 'フォントテーマエディタ' , self::$text_domain ). '</h2>';
193
+ do_action( 'typesquare_add_setting_before' );
194
+ $auth_param = $this->get_auth_params();
195
+ if ( false !== $auth_param['typesquare_auth']['auth_status'] ) {
196
+ echo $this->get_font_select_form();
197
+ }
198
+ echo '</div>';
199
+ }
200
+ }
inc/admin-root.php ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class TypeSquare_Admin_Root extends TypeSquare_Admin_Base {
3
+ private static $instance;
4
+ private static $text_domain;
5
+ private function __construct(){}
6
+
7
+ public static function get_instance() {
8
+ if ( ! isset( self::$instance ) ) {
9
+ $c = __CLASS__;
10
+ self::$instance = new $c();
11
+ }
12
+ return self::$instance;
13
+ }
14
+
15
+ public function typesquare_post_metabox() {
16
+ $fonts = TypeSquare_ST_Fonts::get_instance();
17
+ $param = $fonts->get_fonttheme_params();
18
+ if ( 'false' == $param['typesquare_themes']['show_post_form'] || ! $param['typesquare_themes']['show_post_form'] ) {
19
+ return;
20
+ }
21
+ $post_type = array( 'post', 'page' );
22
+ foreach ( $post_type as $type ) {
23
+ add_meta_box( 'typesquare_post_metabox', __( 'TypeSquare Webfonts for SAKURA RS', self::$text_domain ), array( $this, 'typesquare_post_metabox_inside' ), $type, 'advanced', 'low' );
24
+ }
25
+ }
26
+
27
+ public function typesquare_post_metabox_inside() {
28
+ $html = '';
29
+ $html .= '<p>'. __( 'この記事に適用するフォントを選択してください', self::$text_domain ) . '</p>';
30
+
31
+ $html .= $this->_get_post_font_theme_selector();
32
+ $html .= '<input type="hidden" name="typesquare_nonce_postmeta" id="typesquare_nonce_postmeta" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
33
+ echo $html;
34
+ }
35
+
36
+ private function _get_post_font_theme_selector() {
37
+ $html = '';
38
+ $fonts = TypeSquare_ST_Fonts::get_instance();
39
+ $all_font_theme = $fonts->load_all_font_data( );
40
+ $selected_theme = $fonts->get_selected_post_fonttheme( get_the_ID() );
41
+ $option = '';
42
+ $option .= "<option value='false'>テーマを設定しない</option>";
43
+ foreach ( $all_font_theme as $key => $fonttheme ) {
44
+ $fonttheme_name = $this->get_fonts_text( $fonttheme['name'] );
45
+ $font_text = $this->_get_fonttheme_text( $fonttheme );
46
+ $selected = '';
47
+ if ( $key === $selected_theme ) {
48
+ $selected = 'selected';
49
+ }
50
+ $option .= "<option value='{$key}' {$selected}>";
51
+ $option .= "{$fonttheme_name} ( {$font_text} )";
52
+ $option .= '</option>';
53
+ }
54
+ $html .= '<h4>'. __( 'フォントテーマから選ぶ', self::$text_domain ) . '</h4>';
55
+ $html .= "<select name='typesquare_fonttheme[theme]'>{$option}</select>";
56
+ return $html;
57
+ }
58
+
59
+ public function typesquare_save_post( $post_id ) {
60
+ if ( ! isset( $_POST['typesquare_nonce_postmeta'] ) ) {
61
+ return;
62
+ }
63
+ //Verify
64
+ if ( ! wp_verify_nonce( $_POST['typesquare_nonce_postmeta'], plugin_basename( __FILE__ ) ) ) {
65
+ return $post_id;
66
+ }
67
+ // if auto save
68
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
69
+ return $post_id;
70
+ }
71
+
72
+ // permission check
73
+ if ( 'page' == $_POST['post_type'] ) {
74
+ if ( ! current_user_can( 'edit_page', $post_id ) ) {
75
+ return $post_id;
76
+ }
77
+ } else {
78
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
79
+ return $post_id;
80
+ }
81
+ }
82
+
83
+ // save action
84
+ $fonttheme = $_POST['typesquare_fonttheme'];
85
+ $current_option = get_post_meta( $post_id, 'typesquare_fonttheme' );
86
+ $fonts = TypeSquare_ST_Fonts::get_instance();
87
+ if ( isset( $current_option[0] ) ) {
88
+ $current = $current_option[0];
89
+ } else {
90
+ $current = $fonttheme;
91
+ }
92
+ $font['theme'] = esc_attr( $fonttheme['theme'] );
93
+ update_post_meta( $post_id, 'typesquare_fonttheme', $font );
94
+ return $post_id;
95
+ }
96
+
97
+ private function get_fonts_text( $fonts ) {
98
+ if ( is_array( $fonts ) ) {
99
+ $text_font = '';
100
+ foreach ( $fonts as $key => $font ) {
101
+ $text_font .= esc_attr( $font );
102
+ if ( count( $fonts ) - 1 > $key ) {
103
+ $text_font .= ' + ';
104
+ }
105
+ }
106
+ } else {
107
+ $text_font = esc_attr( $fonts );
108
+ }
109
+ return $text_font;
110
+ }
111
+
112
+ public function typesquare_admin_menu() {
113
+ $param = $this->get_auth_params();
114
+ $option_name = 'typesquare_auth';
115
+ $nonce_key = TypeSquare_ST::OPTION_NAME;
116
+ echo "<div class='wrap'>";
117
+ echo '<h2>'. __( 'TypeSquare Webfonts Plugin for さくらのレンタルサーバ' , self::$text_domain ). '</h2>';
118
+ do_action( 'typesquare_add_setting_before' );
119
+ $autho_param = $this->get_auth_params();
120
+ if ( false !== $autho_param['typesquare_auth']['auth_status'] ) {
121
+ echo $this->get_font_theme_form();
122
+ echo '<hr/>';
123
+ echo "<div class='ts-custome_form_row'>";
124
+ echo '<h3>■'. __( '上級者向けのカスタマイズ', self::$text_domain ). '</h3>';
125
+ echo "<div class='ts-custome_form'>";
126
+ echo $this->get_font_target_form();
127
+ echo $this->_get_post_font_form();
128
+ echo '</div>';
129
+ echo '</div>';
130
+ }
131
+ do_action( 'typesquare_add_setting_after' );
132
+ }
133
+
134
+ private function _get_post_font_form() {
135
+ $option_name = 'typesquare_fonttheme';
136
+ $fonts = TypeSquare_ST_Fonts::get_instance();
137
+ $param = $fonts->get_fonttheme_params();
138
+ $keys = $param['typesquare_themes_keys'];
139
+ $html = '';
140
+ $html .= '<hr/>';
141
+ $html .= "<form method='post' action=''>";
142
+ $html .= '<h4>'. __( 'フォントテーマ個別表示設定' , self::$text_domain ). '</h4>';
143
+ $html .= '<p>'. __( '各画面でフォントテーマを個別に変更できる機能のON/OFFを設定します。' , self::$text_domain ). '</p>';
144
+ $html .= wp_nonce_field( 'ts_update_font_settings' , 'ts_update_font_settings' , true , false );
145
+ $html .= "<table class='widefat form-table'>";
146
+ $html .= '<thead>';
147
+ $html .= "<tr><th> {$keys['show_post_form']}</th></tr>";
148
+ $html .= '</thead>';
149
+ $html .= '<tbody>';
150
+ $value = esc_attr( $param['typesquare_themes']['show_post_form'] );
151
+ if ( ! $value ) {
152
+ $value = 'false';
153
+ }
154
+ $html .= '<td><label>';
155
+ $html .= "<input name='{$option_name}[show_post_form]' type='radio' id='show_post_form' value='true' class='code' ". checked( $value, 'true', false ). '/>';
156
+ $html .= __( '表示する' , self::$text_domain );
157
+ $html .= '</label> ';
158
+ $html .= '<label>';
159
+ $html .= "<input name='{$option_name}[show_post_form]' type='radio' id='show_post_form' value='false' class='code' ". checked( $value, 'false', false ). '/>';
160
+ $html .= __( '表示しない' , self::$text_domain );
161
+ $html .= '</label>';
162
+ $html .= '<p>'. __( 'デフォルトでは非表示となっています。' , self::$text_domain ). '</p>';
163
+ $html .= '</td></tr>';
164
+ $html .= '</tbody>';
165
+ $html .= '</table>';
166
+ $html .= get_submit_button( __( 'フォントテーマ表示設定を更新する', self::$text_domain ) );
167
+ $html .= '</form>';
168
+ return $html;
169
+
170
+ }
171
+
172
+ public function get_font_theme_form() {
173
+ $option_name = 'typesquare_fonttheme';
174
+ $fonts = TypeSquare_ST_Fonts::get_instance();
175
+ $param = $fonts->get_fonttheme_params();
176
+ $all_font_theme = $fonts->load_all_font_data( );
177
+ $html = '';
178
+ $html .= '<hr/>';
179
+ $html .= "<form method='post' action=''>";
180
+ $html .= '<h3>■'. __( 'フォントテーマ設定' , self::$text_domain ). '</h3>';
181
+ $html .= '<p>'. __( 'フォントテーマを選択してください。' , self::$text_domain ). '<br/>';
182
+ $html .= '<strong>'. __( '※カスタムフォントテーマからフォントテーマをカスタマイズ作成することができます。' , self::$text_domain ). '</strong></p>';
183
+ $html .= wp_nonce_field( 'ts_update_font_settings' , 'ts_update_font_settings' , true , false );
184
+ $html .= "<table class='widefat form-table'>";
185
+ $html .= '<thead>';
186
+ $html .= "<tr><th> {$param['typesquare_themes_keys']['font_theme']}</th></tr>";
187
+ $html .= '</thead>';
188
+ $html .= '<tbody>';
189
+ $html .= '<tr><td>';
190
+ $html .= "<select name='{$option_name}[font_theme]'>";
191
+ $html .= "<option value='false'>テーマを設定しない</option>";
192
+ foreach ( $all_font_theme as $fonttheme_key => $fonttheme ) {
193
+ $fonttheme_name = esc_attr( $fonttheme['name'] );
194
+ $font_text = $this->_get_fonttheme_text( $fonttheme );
195
+ $selected = '';
196
+ if ( $fonttheme_key == $param['typesquare_themes']['font_theme'] ) {
197
+ $selected = 'selected';
198
+ }
199
+ $html .= "<option value='{$fonttheme_key}' {$selected}>";
200
+ $html .= "{$fonttheme_name} ( {$font_text} )";
201
+ $html .= '</option>';
202
+ }
203
+ $html .= '</select>';
204
+ $html .= '</td></tr>';
205
+ $html .= '</tbody>';
206
+ $html .= '</table>';
207
+ $html .= get_submit_button( __( 'フォントテーマを更新する', self::$text_domain ) );
208
+ $html .= '</form>';
209
+ return $html;
210
+ }
211
+
212
+ private function _get_fonttheme_text( $fonttheme ) {
213
+ $font_text = '';
214
+ if ( isset( $fonttheme['fonts']['title'] ) ) {
215
+ $font_text .= __( '見出し:', self::$text_domain );
216
+ $font_text .= $this->get_fonts_text( $fonttheme['fonts']['title'] );
217
+ $font_text .= ',';
218
+ }
219
+ if ( isset( $fonttheme['fonts']['lead'] ) ) {
220
+ $font_text .= __( 'リード:', self::$text_domain );
221
+ $font_text .= $this->get_fonts_text( $fonttheme['fonts']['lead'] );
222
+ $font_text .= ',';
223
+ }
224
+ if ( isset( $fonttheme['fonts']['content'] ) ) {
225
+ $font_text .= __( '本文:', self::$text_domain );
226
+ $font_text .= $this->get_fonts_text( $fonttheme['fonts']['content'] );
227
+ $font_text .= ',';
228
+ }
229
+ if ( isset( $fonttheme['fonts']['text'] ) ) {
230
+ $font_text .= __( '本文:', self::$text_domain );
231
+ $font_text .= $this->get_fonts_text( $fonttheme['fonts']['text'] );
232
+ $font_text .= ',';
233
+ }
234
+ if ( isset( $fonttheme['fonts']['bold'] ) ) {
235
+ $font_text .= __( '太字:', self::$text_domain );
236
+ $font_text .= $this->get_fonts_text( $fonttheme['fonts']['bold'] );
237
+ }
238
+ $font_text = rtrim( $font_text, ',' );
239
+ $font_text = str_replace( ",", " / ", $font_text );
240
+ return $font_text;
241
+ }
242
+
243
+ public function get_font_target_form() {
244
+ $fonts = TypeSquare_ST_Fonts::get_instance();
245
+ $param = $fonts->get_fonttheme_params();
246
+ $html = '';
247
+ $html .= "<form method='post' action=''>";
248
+ $html .= '<h4>'. __( 'フォント設定クラス' , self::$text_domain ). '</h4>';
249
+ $html .= '<p>'. __( 'フォントを適用するクラスを指定します。' , self::$text_domain ). '</p>';
250
+ $html .= "<table class='widefat form-table'>";
251
+ $html .= '<thead>';
252
+ $key = $param['typesquare_themes_keys'];
253
+ $html .= "<tr><th> {$key['title_target']}</th><th> {$key['lead_target']}</th><th> {$key['text_target']}</th><th> {$key['bold_target']}</th></tr>";
254
+ $html .= '</thead>';
255
+ $html .= '<tbody>';
256
+ $data = $param['typesquare_themes'];
257
+ $html .= "<tr><td><input type='text' name='typesquare_fonttheme[title_target]' value='{$data['title_target']}' required/></td>";
258
+ $html .= "<td><input type='text' name='typesquare_fonttheme[lead_target]' value='{$data['lead_target']}' required/></td>";
259
+ $html .= "<td><input type='text' name='typesquare_fonttheme[text_target]' value='{$data['text_target']}' required/></td>";
260
+ $html .= "<td><input type='text' name='typesquare_fonttheme[bold_target]' value='{$data['bold_target']}' required/></td></tr>";
261
+ $html .= '</tbody>';
262
+ $html .= '</table>';
263
+ $html .= get_submit_button( __( '設定クラスを更新する', self::$text_domain ) );
264
+ $html .= wp_nonce_field( 'ts_update_font_settings' , 'ts_update_font_settings' , true , false );
265
+ $html .= '</form>';
266
+ return $html;
267
+ }
268
+
269
+ }
inc/app.js ADDED
@@ -0,0 +1,19616 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2
+ // Load Reacts
3
+ 'use strict';
4
+
5
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
6
+
7
+ var _react = require('react');
8
+
9
+ var _react2 = _interopRequireDefault(_react);
10
+
11
+ var _reactDom = require('react-dom');
12
+
13
+ var Thead = _react2['default'].createClass({
14
+ displayName: 'Thead',
15
+
16
+ render: function render() {
17
+ return _react2['default'].createElement(
18
+ 'thead',
19
+ null,
20
+ _react2['default'].createElement(
21
+ 'tr',
22
+ null,
23
+ _react2['default'].createElement(
24
+ 'th',
25
+ null,
26
+ ' 適用箇所'
27
+ ),
28
+ _react2['default'].createElement(
29
+ 'th',
30
+ null,
31
+ ' 書体分類'
32
+ ),
33
+ _react2['default'].createElement(
34
+ 'th',
35
+ null,
36
+ ' フォントファミリー名'
37
+ ),
38
+ _react2['default'].createElement(
39
+ 'th',
40
+ null,
41
+ ' フォント名'
42
+ )
43
+ )
44
+ );
45
+ }
46
+ });
47
+
48
+ var SelectFont = _react2['default'].createClass({
49
+ displayName: 'SelectFont',
50
+
51
+ getInitialState: function getInitialState() {
52
+ return {
53
+ checked: ['unselect']
54
+ };
55
+ },
56
+ handleChange: function handleChange(event) {
57
+ var checked = [];
58
+ var sel = event.target;
59
+ for (var i = 0; i < sel.length; i++) {
60
+ var option = sel.options[i];
61
+ if (option.selected) {
62
+ checked.push(option.value);
63
+ }
64
+ }
65
+ this.setState({
66
+ checked: checked
67
+ });
68
+ },
69
+ getOptions: function getOptions() {
70
+ var i = 0;
71
+ var selectedValue = 'false';
72
+ var optionNodes = [];
73
+ var selected = current_font[this.props.type];
74
+
75
+ if (!this.props.selectedFamily[0]) {
76
+ if (!selected || this.props.selectedType[0]) {
77
+ optionNodes.push(_react2['default'].createElement(
78
+ 'option',
79
+ { key: i, value: 'false' },
80
+ '書体分類・フォントファミリー名を選択してください'
81
+ ));
82
+ var options = {
83
+ selected: selectedValue,
84
+ nodes: optionNodes
85
+ };
86
+ return options;
87
+ }
88
+ }
89
+
90
+ if (selected) {
91
+ var key1 = selected.type;
92
+ var key2 = selected.family;
93
+ var selectedValue = selected.font;
94
+ }
95
+
96
+ if ('unselect' !== this.state.checked[0]) {
97
+ var selectedValue = this.state.checked[0];
98
+ }
99
+
100
+ if (this.props.selectedType[0] || this.props.selectedFamily[0]) {
101
+ if (this.props.selectedType[0]) {
102
+ var key1 = this.props.selectedType[0];
103
+ }
104
+ if (this.props.selectedFamily[0]) {
105
+ var key2 = this.props.selectedFamily[0];
106
+ }
107
+ }
108
+
109
+ var dataCount = Object.keys(this.props.data).length;
110
+ if (0 !== dataCount) {
111
+ console.log();
112
+ if (!this.props.data[key1] || !this.props.data[key1][key2]) {
113
+ i++;
114
+ optionNodes.push(_react2['default'].createElement(
115
+ 'option',
116
+ { key: i, value: 'false' },
117
+ '書体分類・フォントファミリー名を選択してください'
118
+ ));
119
+ } else {
120
+ var font = this.props.data[key1][key2];
121
+ optionNodes.push(_react2['default'].createElement(
122
+ 'option',
123
+ { key: i, value: 'false' },
124
+ '設定しない'
125
+ ));
126
+ Object.keys(font).forEach(function (key) {
127
+ i++;
128
+ var value = this[key];
129
+ optionNodes.push(_react2['default'].createElement(
130
+ 'option',
131
+ { key: i, value: value },
132
+ value
133
+ ));
134
+ }, font);
135
+ }
136
+ }
137
+
138
+ var options = {
139
+ selected: selectedValue,
140
+ nodes: optionNodes
141
+ };
142
+ return options;
143
+ },
144
+ render: function render() {
145
+ var name = 'typesquare_custom_theme[fonts][' + this.props.type + '][font]';
146
+ var options = this.getOptions();
147
+ var selectedValue = options.selected;
148
+ var optionNodes = options.nodes;
149
+ return _react2['default'].createElement(
150
+ 'select',
151
+ { name: name, onChange: this.handleChange, value: selectedValue },
152
+ optionNodes
153
+ );
154
+ }
155
+ });
156
+
157
+ var SelectFamily = _react2['default'].createClass({
158
+ displayName: 'SelectFamily',
159
+
160
+ getInitialState: function getInitialState() {
161
+ return {
162
+ checked: ['unselect']
163
+ };
164
+ },
165
+ handleChange: function handleChange(event) {
166
+ var checked = [];
167
+ var sel = event.target;
168
+ for (var i = 0; i < sel.length; i++) {
169
+ var option = sel.options[i];
170
+ if (option.selected) {
171
+ checked.push(option.value);
172
+ }
173
+ }
174
+ this.props.onChangeFamily(checked);
175
+ this.setState({
176
+ checked: checked
177
+ });
178
+ },
179
+ getOptions: function getOptions() {
180
+ var optionNodes = [];
181
+ var i = 0;
182
+ var selectedValue = 'false';
183
+ var selected = current_font[this.props.type];
184
+ if (!this.props.selected && !selected) {
185
+ optionNodes.push(_react2['default'].createElement(
186
+ 'option',
187
+ { key: i, value: 'false' },
188
+ '設定なし'
189
+ ));
190
+ var options = {
191
+ selected: selectedValue,
192
+ nodes: optionNodes
193
+ };
194
+ return options;
195
+ }
196
+
197
+ if (this.props.selected) {
198
+ var key = this.props.selected[0];
199
+ } else {
200
+ var key = selected.type;
201
+ }
202
+
203
+ if ('unselect' !== this.state.checked[0]) {
204
+ var selectedValue = this.state.checked[0];
205
+ } else if (selected) {
206
+ var selectedValue = selected.family;
207
+ }
208
+
209
+ var dataCount = Object.keys(this.props.data).length;
210
+ if (0 === dataCount) {
211
+ optionNodes.push(_react2['default'].createElement(
212
+ 'option',
213
+ { key: i, value: 'false' },
214
+ 'Loading...'
215
+ ));
216
+ } else {
217
+ var family = this.props.data[key];
218
+ if (!family) {
219
+ optionNodes.push(_react2['default'].createElement(
220
+ 'option',
221
+ { key: i, value: 'false' },
222
+ '設定なし'
223
+ ));
224
+ } else {
225
+ optionNodes.push(_react2['default'].createElement(
226
+ 'option',
227
+ { key: i, value: 'false' },
228
+ 'フォントファミリー名を選択してください'
229
+ ));
230
+ if (!family[selectedValue]) {
231
+ var selectedValue = 'false';
232
+ }
233
+ Object.keys(family).forEach(function (key) {
234
+ i++;
235
+ var value = this[key];
236
+ optionNodes.push(_react2['default'].createElement(
237
+ 'option',
238
+ { key: i, value: key },
239
+ key
240
+ ));
241
+ }, family);
242
+ }
243
+ }
244
+
245
+ var options = {
246
+ selected: selectedValue,
247
+ nodes: optionNodes
248
+ };
249
+ return options;
250
+ },
251
+ render: function render() {
252
+ var name = 'typesquare_custom_theme[fonts][' + this.props.type + '][family]';
253
+ var options = this.getOptions();
254
+ var selectedValue = options.selected;
255
+ var optionNodes = options.nodes;
256
+ return _react2['default'].createElement(
257
+ 'select',
258
+ { name: name, onChange: this.handleChange, value: selectedValue },
259
+ optionNodes
260
+ );
261
+ }
262
+ });
263
+
264
+ var SelectType = _react2['default'].createClass({
265
+ displayName: 'SelectType',
266
+
267
+ getInitialState: function getInitialState() {
268
+ return {
269
+ checked: ['unselect']
270
+ };
271
+ },
272
+ handleChange: function handleChange(event) {
273
+ var checked = [];
274
+ var sel = event.target;
275
+ for (var i = 0; i < sel.length; i++) {
276
+ var option = sel.options[i];
277
+ if (option.selected) {
278
+ checked.push(option.value);
279
+ }
280
+ }
281
+ this.props.onChangeType(checked);
282
+ this.setState({
283
+ checked: checked
284
+ });
285
+ },
286
+ render: function render() {
287
+ var optionNodes = [];
288
+ var i = 0;
289
+ var name = 'typesquare_custom_theme[fonts][' + this.props.type + '][type]';
290
+ var selected = current_font[this.props.type];
291
+ var selectedValue = 'false';
292
+ if (selected) {
293
+ if ('unselect' == this.state.checked[0]) {
294
+ selectedValue = selected.type;
295
+ }
296
+ }
297
+ if ('unselect' != this.state.checked[0]) {
298
+ selectedValue = this.state.checked[0];
299
+ }
300
+
301
+ optionNodes.push(_react2['default'].createElement(
302
+ 'option',
303
+ { key: i, value: 'false' },
304
+ '設定なし'
305
+ ));
306
+ Object.keys(this.props.data).forEach(function (key) {
307
+ i++;
308
+ var value = this[key];
309
+ optionNodes.push(_react2['default'].createElement(
310
+ 'option',
311
+ { key: i, value: key },
312
+ key
313
+ ));
314
+ }, this.props.data);
315
+ return _react2['default'].createElement(
316
+ 'select',
317
+ { name: name, onChange: this.handleChange, value: selectedValue },
318
+ optionNodes
319
+ );
320
+ }
321
+ });
322
+
323
+ var Row = _react2['default'].createClass({
324
+ displayName: 'Row',
325
+
326
+ getInitialState: function getInitialState() {
327
+ return {
328
+ type: '',
329
+ family: '',
330
+ name: ''
331
+ };
332
+ },
333
+ changeType: function changeType(selected) {
334
+ this.setState({
335
+ type: selected
336
+ });
337
+ },
338
+ changeFamily: function changeFamily(selected) {
339
+ this.setState({
340
+ family: selected
341
+ });
342
+ },
343
+ getTotalRow: function getTotalRow() {
344
+ return _react2['default'].createElement(
345
+ 'tr',
346
+ null,
347
+ _react2['default'].createElement(
348
+ 'th',
349
+ null,
350
+ ' ',
351
+ this.props.title
352
+ ),
353
+ _react2['default'].createElement(
354
+ 'td',
355
+ null,
356
+ _react2['default'].createElement(SelectType, {
357
+ onChangeType: this.changeType,
358
+ data: this.props.data,
359
+ type: this.props.type })
360
+ ),
361
+ _react2['default'].createElement(
362
+ 'td',
363
+ null,
364
+ _react2['default'].createElement(SelectFamily, {
365
+ onChangeFamily: this.changeFamily,
366
+ data: this.props.data,
367
+ selected: this.state.type,
368
+ type: this.props.type })
369
+ ),
370
+ _react2['default'].createElement(
371
+ 'td',
372
+ null,
373
+ _react2['default'].createElement(SelectFont, {
374
+ data: this.props.data,
375
+ selectedType: this.state.type,
376
+ selectedFamily: this.state.family,
377
+ selectedName: this.state.name,
378
+ type: this.props.type })
379
+ )
380
+ );
381
+ },
382
+ getPostRow: function getPostRow() {
383
+ return _react2['default'].createElement(
384
+ 'tr',
385
+ null,
386
+ _react2['default'].createElement(
387
+ 'th',
388
+ null,
389
+ ' ',
390
+ this.props.title
391
+ ),
392
+ _react2['default'].createElement(
393
+ 'td',
394
+ null,
395
+ _react2['default'].createElement(
396
+ 'p',
397
+ null,
398
+ _react2['default'].createElement(
399
+ 'label',
400
+ null,
401
+ '書体分類:'
402
+ ),
403
+ _react2['default'].createElement(SelectType, {
404
+ onChangeType: this.changeType,
405
+ data: this.props.data,
406
+ type: this.props.type })
407
+ ),
408
+ _react2['default'].createElement(
409
+ 'p',
410
+ null,
411
+ _react2['default'].createElement(
412
+ 'label',
413
+ null,
414
+ 'フォントファミリー名:'
415
+ ),
416
+ _react2['default'].createElement(SelectFamily, {
417
+ onChangeFamily: this.changeFamily,
418
+ data: this.props.data,
419
+ selected: this.state.type,
420
+ type: this.props.type })
421
+ ),
422
+ _react2['default'].createElement(
423
+ 'p',
424
+ null,
425
+ _react2['default'].createElement(
426
+ 'label',
427
+ null,
428
+ 'フォント名:'
429
+ ),
430
+ _react2['default'].createElement(SelectFont, {
431
+ data: this.props.data,
432
+ selectedType: this.state.type,
433
+ selectedFamily: this.state.family,
434
+ selectedName: this.state.name,
435
+ type: this.props.type })
436
+ )
437
+ )
438
+ );
439
+ },
440
+ render: function render() {
441
+ if ('total' == this.props.pageType) {
442
+ var rowNode = this.getTotalRow();
443
+ } else if ('post' == this.props.pageType) {
444
+ var rowNode = this.getPostRow();
445
+ } else {
446
+ var rowNode = _react2['default'].createElement(
447
+ 'tr',
448
+ null,
449
+ _react2['default'].createElement(
450
+ 'td',
451
+ null,
452
+ 'NoData'
453
+ )
454
+ );
455
+ }
456
+ return rowNode;
457
+ }
458
+
459
+ });
460
+
461
+ var Tbody = _react2['default'].createClass({
462
+ displayName: 'Tbody',
463
+
464
+ loadPostsFromServer: function loadPostsFromServer() {
465
+ jQuery.ajax({
466
+ type: "GET",
467
+ url: json_endpoint,
468
+ dataType: 'json',
469
+ cache: false,
470
+ success: (function (data) {
471
+ this.setState({ data: data });
472
+ }).bind(this),
473
+ error: (function (xhr, status, err) {
474
+ console.error(this.props.url, status, err.toString());
475
+ }).bind(this)
476
+ });
477
+ },
478
+ getInitialState: function getInitialState() {
479
+ return {
480
+ data: []
481
+ };
482
+ },
483
+ componentDidMount: function componentDidMount() {
484
+ this.loadPostsFromServer();
485
+ },
486
+ render: function render() {
487
+ return _react2['default'].createElement(
488
+ 'tbody',
489
+ null,
490
+ _react2['default'].createElement(Row, { title: 'タイトル', type: 'title', data: this.state.data, pageType: this.props.pageType }),
491
+ _react2['default'].createElement(Row, { title: 'リード', type: 'lead', data: this.state.data, pageType: this.props.pageType }),
492
+ _react2['default'].createElement(Row, { title: '本文', type: 'text', data: this.state.data, pageType: this.props.pageType }),
493
+ _react2['default'].createElement(Row, { title: '太字', type: 'bold', data: this.state.data, pageType: this.props.pageType })
494
+ );
495
+ }
496
+ });
497
+
498
+ var App = _react2['default'].createClass({
499
+ displayName: 'App',
500
+
501
+ render: function render() {
502
+ if ('total' == this.props.pageType) {
503
+ var headNode = _react2['default'].createElement(Thead, null);
504
+ }
505
+ return _react2['default'].createElement(
506
+ 'table',
507
+ { className: 'widefat form-table' },
508
+ headNode,
509
+ _react2['default'].createElement(Tbody, { pageType: this.props.pageType })
510
+ );
511
+ }
512
+ });
513
+
514
+ if (document.getElementById("ts-react-search-font") != null) {
515
+ (0, _reactDom.render)(_react2['default'].createElement(App, { pageType: 'total' }), document.getElementById('ts-react-search-font'));
516
+ } else if (document.getElementById("ts-react-post-search-font") != null) {
517
+ (0, _reactDom.render)(_react2['default'].createElement(App, { pageType: 'post' }), document.getElementById('ts-react-post-search-font'));
518
+ }
519
+
520
+ },{"react":159,"react-dom":30}],2:[function(require,module,exports){
521
+ (function (process){
522
+ /**
523
+ * Copyright 2013-2015, Facebook, Inc.
524
+ *
525
+ * Licensed under the Apache License, Version 2.0 (the "License");
526
+ * you may not use this file except in compliance with the License.
527
+ * You may obtain a copy of the License at
528
+ *
529
+ * http://www.apache.org/licenses/LICENSE-2.0
530
+ *
531
+ * Unless required by applicable law or agreed to in writing, software
532
+ * distributed under the License is distributed on an "AS IS" BASIS,
533
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
534
+ * See the License for the specific language governing permissions and
535
+ * limitations under the License.
536
+ *
537
+ * @providesModule EventListener
538
+ * @typechecks
539
+ */
540
+
541
+ 'use strict';
542
+
543
+ var emptyFunction = require('./emptyFunction');
544
+
545
+ /**
546
+ * Upstream version of event listener. Does not take into account specific
547
+ * nature of platform.
548
+ */
549
+ var EventListener = {
550
+ /**
551
+ * Listen to DOM events during the bubble phase.
552
+ *
553
+ * @param {DOMEventTarget} target DOM element to register listener on.
554
+ * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
555
+ * @param {function} callback Callback function.
556
+ * @return {object} Object with a `remove` method.
557
+ */
558
+ listen: function (target, eventType, callback) {
559
+ if (target.addEventListener) {
560
+ target.addEventListener(eventType, callback, false);
561
+ return {
562
+ remove: function () {
563
+ target.removeEventListener(eventType, callback, false);
564
+ }
565
+ };
566
+ } else if (target.attachEvent) {
567
+ target.attachEvent('on' + eventType, callback);
568
+ return {
569
+ remove: function () {
570
+ target.detachEvent('on' + eventType, callback);
571
+ }
572
+ };
573
+ }
574
+ },
575
+
576
+ /**
577
+ * Listen to DOM events during the capture phase.
578
+ *
579
+ * @param {DOMEventTarget} target DOM element to register listener on.
580
+ * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
581
+ * @param {function} callback Callback function.
582
+ * @return {object} Object with a `remove` method.
583
+ */
584
+ capture: function (target, eventType, callback) {
585
+ if (target.addEventListener) {
586
+ target.addEventListener(eventType, callback, true);
587
+ return {
588
+ remove: function () {
589
+ target.removeEventListener(eventType, callback, true);
590
+ }
591
+ };
592
+ } else {
593
+ if (process.env.NODE_ENV !== 'production') {
594
+ console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');
595
+ }
596
+ return {
597
+ remove: emptyFunction
598
+ };
599
+ }
600
+ },
601
+
602
+ registerDefault: function () {}
603
+ };
604
+
605
+ module.exports = EventListener;
606
+ }).call(this,require('_process'))
607
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9mYmpzL2xpYi9FdmVudExpc3RlbmVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0F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1xuICAgIGlmICh0YXJnZXQuYWRkRXZlbnRMaXN0ZW5lcikge1xuICAgICAgdGFyZ2V0LmFkZEV2ZW50TGlzdGVuZXIoZXZlbnRUeXBlLCBjYWxsYmFjaywgdHJ1ZSk7XG4gICAgICByZXR1cm4ge1xuICAgICAgICByZW1vdmU6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICB0YXJnZXQucmVtb3ZlRXZlbnRMaXN0ZW5lcihldmVudFR5cGUsIGNhbGxiYWNrLCB0cnVlKTtcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpIHtcbiAgICAgICAgY29uc29sZS5lcnJvcignQXR0ZW1wdGVkIHRvIGxpc3RlbiB0byBldmVudHMgZHVyaW5nIHRoZSBjYXB0dXJlIHBoYXNlIG9uIGEgJyArICdicm93c2VyIHRoYXQgZG9lcyBub3Qgc3VwcG9ydCB0aGUgY2FwdHVyZSBwaGFzZS4gWW91ciBhcHBsaWNhdGlvbiAnICsgJ3dpbGwgbm90IHJlY2VpdmUgc29tZSBldmVudHMuJyk7XG4gICAgICB9XG4gICAgICByZXR1cm4ge1xuICAgICAgICByZW1vdmU6IGVtcHR5RnVuY3Rpb25cbiAgICAgIH07XG4gICAgfVxuICB9LFxuXG4gIHJlZ2lzdGVyRGVmYXVsdDogZnVuY3Rpb24gKCkge31cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gRXZlbnRMaXN0ZW5lcjsiXX0=
608
+ },{"./emptyFunction":9,"_process":29}],3:[function(require,module,exports){
609
+ /**
610
+ * Copyright 2013-2015, Facebook, Inc.
611
+ * All rights reserved.
612
+ *
613
+ * This source code is licensed under the BSD-style license found in the
614
+ * LICENSE file in the root directory of this source tree. An additional grant
615
+ * of patent rights can be found in the PATENTS file in the same directory.
616
+ *
617
+ * @providesModule ExecutionEnvironment
618
+ */
619
+
620
+ 'use strict';
621
+
622
+ var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
623
+
624
+ /**
625
+ * Simple, lightweight module assisting with the detection and context of
626
+ * Worker. Helps avoid circular dependencies and allows code to reason about
627
+ * whether or not they are in a Worker, even if they never include the main
628
+ * `ReactWorker` dependency.
629
+ */
630
+ var ExecutionEnvironment = {
631
+
632
+ canUseDOM: canUseDOM,
633
+
634
+ canUseWorkers: typeof Worker !== 'undefined',
635
+
636
+ canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
637
+
638
+ canUseViewport: canUseDOM && !!window.screen,
639
+
640
+ isInWorker: !canUseDOM // For now, this is true - might change in the future.
641
+
642
+ };
643
+
644
+ module.exports = ExecutionEnvironment;
645
+ },{}],4:[function(require,module,exports){
646
+ /**
647
+ * Copyright 2013-2015, Facebook, Inc.
648
+ * All rights reserved.
649
+ *
650
+ * This source code is licensed under the BSD-style license found in the
651
+ * LICENSE file in the root directory of this source tree. An additional grant
652
+ * of patent rights can be found in the PATENTS file in the same directory.
653
+ *
654
+ * @providesModule camelize
655
+ * @typechecks
656
+ */
657
+
658
+ "use strict";
659
+
660
+ var _hyphenPattern = /-(.)/g;
661
+
662
+ /**
663
+ * Camelcases a hyphenated string, for example:
664
+ *
665
+ * > camelize('background-color')
666
+ * < "backgroundColor"
667
+ *
668
+ * @param {string} string
669
+ * @return {string}
670
+ */
671
+ function camelize(string) {
672
+ return string.replace(_hyphenPattern, function (_, character) {
673
+ return character.toUpperCase();
674
+ });
675
+ }
676
+
677
+ module.exports = camelize;
678
+ },{}],5:[function(require,module,exports){
679
+ /**
680
+ * Copyright 2013-2015, Facebook, Inc.
681
+ * All rights reserved.
682
+ *
683
+ * This source code is licensed under the BSD-style license found in the
684
+ * LICENSE file in the root directory of this source tree. An additional grant
685
+ * of patent rights can be found in the PATENTS file in the same directory.
686
+ *
687
+ * @providesModule camelizeStyleName
688
+ * @typechecks
689
+ */
690
+
691
+ 'use strict';
692
+
693
+ var camelize = require('./camelize');
694
+
695
+ var msPattern = /^-ms-/;
696
+
697
+ /**
698
+ * Camelcases a hyphenated CSS property name, for example:
699
+ *
700
+ * > camelizeStyleName('background-color')
701
+ * < "backgroundColor"
702
+ * > camelizeStyleName('-moz-transition')
703
+ * < "MozTransition"
704
+ * > camelizeStyleName('-ms-transition')
705
+ * < "msTransition"
706
+ *
707
+ * As Andi Smith suggests
708
+ * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
709
+ * is converted to lowercase `ms`.
710
+ *
711
+ * @param {string} string
712
+ * @return {string}
713
+ */
714
+ function camelizeStyleName(string) {
715
+ return camelize(string.replace(msPattern, 'ms-'));
716
+ }
717
+
718
+ module.exports = camelizeStyleName;
719
+ },{"./camelize":4}],6:[function(require,module,exports){
720
+ /**
721
+ * Copyright 2013-2015, Facebook, Inc.
722
+ * All rights reserved.
723
+ *
724
+ * This source code is licensed under the BSD-style license found in the
725
+ * LICENSE file in the root directory of this source tree. An additional grant
726
+ * of patent rights can be found in the PATENTS file in the same directory.
727
+ *
728
+ * @providesModule containsNode
729
+ * @typechecks
730
+ */
731
+
732
+ 'use strict';
733
+
734
+ var isTextNode = require('./isTextNode');
735
+
736
+ /*eslint-disable no-bitwise */
737
+
738
+ /**
739
+ * Checks if a given DOM node contains or is another DOM node.
740
+ *
741
+ * @param {?DOMNode} outerNode Outer DOM node.
742
+ * @param {?DOMNode} innerNode Inner DOM node.
743
+ * @return {boolean} True if `outerNode` contains or is `innerNode`.
744
+ */
745
+ function containsNode(_x, _x2) {
746
+ var _again = true;
747
+
748
+ _function: while (_again) {
749
+ var outerNode = _x,
750
+ innerNode = _x2;
751
+ _again = false;
752
+
753
+ if (!outerNode || !innerNode) {
754
+ return false;
755
+ } else if (outerNode === innerNode) {
756
+ return true;
757
+ } else if (isTextNode(outerNode)) {
758
+ return false;
759
+ } else if (isTextNode(innerNode)) {
760
+ _x = outerNode;
761
+ _x2 = innerNode.parentNode;
762
+ _again = true;
763
+ continue _function;
764
+ } else if (outerNode.contains) {
765
+ return outerNode.contains(innerNode);
766
+ } else if (outerNode.compareDocumentPosition) {
767
+ return !!(outerNode.compareDocumentPosition(innerNode) & 16);
768
+ } else {
769
+ return false;
770
+ }
771
+ }
772
+ }
773
+
774
+ module.exports = containsNode;
775
+ },{"./isTextNode":19}],7:[function(require,module,exports){
776
+ /**
777
+ * Copyright 2013-2015, Facebook, Inc.
778
+ * All rights reserved.
779
+ *
780
+ * This source code is licensed under the BSD-style license found in the
781
+ * LICENSE file in the root directory of this source tree. An additional grant
782
+ * of patent rights can be found in the PATENTS file in the same directory.
783
+ *
784
+ * @providesModule createArrayFromMixed
785
+ * @typechecks
786
+ */
787
+
788
+ 'use strict';
789
+
790
+ var toArray = require('./toArray');
791
+
792
+ /**
793
+ * Perform a heuristic test to determine if an object is "array-like".
794
+ *
795
+ * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
796
+ * Joshu replied: "Mu."
797
+ *
798
+ * This function determines if its argument has "array nature": it returns
799
+ * true if the argument is an actual array, an `arguments' object, or an
800
+ * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
801
+ *
802
+ * It will return false for other array-like objects like Filelist.
803
+ *
804
+ * @param {*} obj
805
+ * @return {boolean}
806
+ */
807
+ function hasArrayNature(obj) {
808
+ return(
809
+ // not null/false
810
+ !!obj && (
811
+ // arrays are objects, NodeLists are functions in Safari
812
+ typeof obj == 'object' || typeof obj == 'function') &&
813
+ // quacks like an array
814
+ 'length' in obj &&
815
+ // not window
816
+ !('setInterval' in obj) &&
817
+ // no DOM node should be considered an array-like
818
+ // a 'select' element has 'length' and 'item' properties on IE8
819
+ typeof obj.nodeType != 'number' && (
820
+ // a real array
821
+ Array.isArray(obj) ||
822
+ // arguments
823
+ 'callee' in obj ||
824
+ // HTMLCollection/NodeList
825
+ 'item' in obj)
826
+ );
827
+ }
828
+
829
+ /**
830
+ * Ensure that the argument is an array by wrapping it in an array if it is not.
831
+ * Creates a copy of the argument if it is already an array.
832
+ *
833
+ * This is mostly useful idiomatically:
834
+ *
835
+ * var createArrayFromMixed = require('createArrayFromMixed');
836
+ *
837
+ * function takesOneOrMoreThings(things) {
838
+ * things = createArrayFromMixed(things);
839
+ * ...
840
+ * }
841
+ *
842
+ * This allows you to treat `things' as an array, but accept scalars in the API.
843
+ *
844
+ * If you need to convert an array-like object, like `arguments`, into an array
845
+ * use toArray instead.
846
+ *
847
+ * @param {*} obj
848
+ * @return {array}
849
+ */
850
+ function createArrayFromMixed(obj) {
851
+ if (!hasArrayNature(obj)) {
852
+ return [obj];
853
+ } else if (Array.isArray(obj)) {
854
+ return obj.slice();
855
+ } else {
856
+ return toArray(obj);
857
+ }
858
+ }
859
+
860
+ module.exports = createArrayFromMixed;
861
+ },{"./toArray":27}],8:[function(require,module,exports){
862
+ (function (process){
863
+ /**
864
+ * Copyright 2013-2015, Facebook, Inc.
865
+ * All rights reserved.
866
+ *
867
+ * This source code is licensed under the BSD-style license found in the
868
+ * LICENSE file in the root directory of this source tree. An additional grant
869
+ * of patent rights can be found in the PATENTS file in the same directory.
870
+ *
871
+ * @providesModule createNodesFromMarkup
872
+ * @typechecks
873
+ */
874
+
875
+ /*eslint-disable fb-www/unsafe-html*/
876
+
877
+ 'use strict';
878
+
879
+ var ExecutionEnvironment = require('./ExecutionEnvironment');
880
+
881
+ var createArrayFromMixed = require('./createArrayFromMixed');
882
+ var getMarkupWrap = require('./getMarkupWrap');
883
+ var invariant = require('./invariant');
884
+
885
+ /**
886
+ * Dummy container used to render all markup.
887
+ */
888
+ var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
889
+
890
+ /**
891
+ * Pattern used by `getNodeName`.
892
+ */
893
+ var nodeNamePattern = /^\s*<(\w+)/;
894
+
895
+ /**
896
+ * Extracts the `nodeName` of the first element in a string of markup.
897
+ *
898
+ * @param {string} markup String of markup.
899
+ * @return {?string} Node name of the supplied markup.
900
+ */
901
+ function getNodeName(markup) {
902
+ var nodeNameMatch = markup.match(nodeNamePattern);
903
+ return nodeNameMatch && nodeNameMatch[1].toLowerCase();
904
+ }
905
+
906
+ /**
907
+ * Creates an array containing the nodes rendered from the supplied markup. The
908
+ * optionally supplied `handleScript` function will be invoked once for each
909
+ * <script> element that is rendered. If no `handleScript` function is supplied,
910
+ * an exception is thrown if any <script> elements are rendered.
911
+ *
912
+ * @param {string} markup A string of valid HTML markup.
913
+ * @param {?function} handleScript Invoked once for each rendered <script>.
914
+ * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
915
+ */
916
+ function createNodesFromMarkup(markup, handleScript) {
917
+ var node = dummyNode;
918
+ !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : undefined;
919
+ var nodeName = getNodeName(markup);
920
+
921
+ var wrap = nodeName && getMarkupWrap(nodeName);
922
+ if (wrap) {
923
+ node.innerHTML = wrap[1] + markup + wrap[2];
924
+
925
+ var wrapDepth = wrap[0];
926
+ while (wrapDepth--) {
927
+ node = node.lastChild;
928
+ }
929
+ } else {
930
+ node.innerHTML = markup;
931
+ }
932
+
933
+ var scripts = node.getElementsByTagName('script');
934
+ if (scripts.length) {
935
+ !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : undefined;
936
+ createArrayFromMixed(scripts).forEach(handleScript);
937
+ }
938
+
939
+ var nodes = createArrayFromMixed(node.childNodes);
940
+ while (node.lastChild) {
941
+ node.removeChild(node.lastChild);
942
+ }
943
+ return nodes;
944
+ }
945
+
946
+ module.exports = createNodesFromMarkup;
947
+ }).call(this,require('_process'))
948
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9mYmpzL2xpYi9jcmVhdGVOb2Rlc0Zyb21NYXJrdXAuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QU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xkKG5vZGUubGFzdENoaWxkKTtcbiAgfVxuICByZXR1cm4gbm9kZXM7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gY3JlYXRlTm9kZXNGcm9tTWFya3VwOyJdfQ==
949
+ },{"./ExecutionEnvironment":3,"./createArrayFromMixed":7,"./getMarkupWrap":13,"./invariant":17,"_process":29}],9:[function(require,module,exports){
950
+ /**
951
+ * Copyright 2013-2015, Facebook, Inc.
952
+ * All rights reserved.
953
+ *
954
+ * This source code is licensed under the BSD-style license found in the
955
+ * LICENSE file in the root directory of this source tree. An additional grant
956
+ * of patent rights can be found in the PATENTS file in the same directory.
957
+ *
958
+ * @providesModule emptyFunction
959
+ */
960
+
961
+ "use strict";
962
+
963
+ function makeEmptyFunction(arg) {
964
+ return function () {
965
+ return arg;
966
+ };
967
+ }
968
+
969
+ /**
970
+ * This function accepts and discards inputs; it has no side effects. This is
971
+ * primarily useful idiomatically for overridable function endpoints which
972
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
973
+ */
974
+ function emptyFunction() {}
975
+
976
+ emptyFunction.thatReturns = makeEmptyFunction;
977
+ emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
978
+ emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
979
+ emptyFunction.thatReturnsNull = makeEmptyFunction(null);
980
+ emptyFunction.thatReturnsThis = function () {
981
+ return this;
982
+ };
983
+ emptyFunction.thatReturnsArgument = function (arg) {
984
+ return arg;
985
+ };
986
+
987
+ module.exports = emptyFunction;
988
+ },{}],10:[function(require,module,exports){
989
+ (function (process){
990
+ /**
991
+ * Copyright 2013-2015, Facebook, Inc.
992
+ * All rights reserved.
993
+ *
994
+ * This source code is licensed under the BSD-style license found in the
995
+ * LICENSE file in the root directory of this source tree. An additional grant
996
+ * of patent rights can be found in the PATENTS file in the same directory.
997
+ *
998
+ * @providesModule emptyObject
999
+ */
1000
+
1001
+ 'use strict';
1002
+
1003
+ var emptyObject = {};
1004
+
1005
+ if (process.env.NODE_ENV !== 'production') {
1006
+ Object.freeze(emptyObject);
1007
+ }
1008
+
1009
+ module.exports = emptyObject;
1010
+ }).call(this,require('_process'))
1011
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9mYmpzL2xpYi9lbXB0eU9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgMjAxMy0yMDE1LCBGYWNlYm9vaywgSW5jLlxuICogQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqXG4gKiBUaGlzIHNvdXJjZSBjb2RlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBCU0Qtc3R5bGUgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS4gQW4gYWRkaXRpb25hbCBncmFudFxuICogb2YgcGF0ZW50IHJpZ2h0cyBjYW4gYmUgZm91bmQgaW4gdGhlIFBBVEVOVFMgZmlsZSBpbiB0aGUgc2FtZSBkaXJlY3RvcnkuXG4gKlxuICogQHByb3ZpZGVzTW9kdWxlIGVtcHR5T2JqZWN0XG4gKi9cblxuJ3VzZSBzdHJpY3QnO1xuXG52YXIgZW1wdHlPYmplY3QgPSB7fTtcblxuaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpIHtcbiAgT2JqZWN0LmZyZWV6ZShlbXB0eU9iamVjdCk7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gZW1wdHlPYmplY3Q7Il19
1012
+ },{"_process":29}],11:[function(require,module,exports){
1013
+ /**
1014
+ * Copyright 2013-2015, Facebook, Inc.
1015
+ * All rights reserved.
1016
+ *
1017
+ * This source code is licensed under the BSD-style license found in the
1018
+ * LICENSE file in the root directory of this source tree. An additional grant
1019
+ * of patent rights can be found in the PATENTS file in the same directory.
1020
+ *
1021
+ * @providesModule focusNode
1022
+ */
1023
+
1024
+ 'use strict';
1025
+
1026
+ /**
1027
+ * @param {DOMElement} node input/textarea to focus
1028
+ */
1029
+ function focusNode(node) {
1030
+ // IE8 can throw "Can't move focus to the control because it is invisible,
1031
+ // not enabled, or of a type that does not accept the focus." for all kinds of
1032
+ // reasons that are too expensive and fragile to test.
1033
+ try {
1034
+ node.focus();
1035
+ } catch (e) {}
1036
+ }
1037
+
1038
+ module.exports = focusNode;
1039
+ },{}],12:[function(require,module,exports){
1040
+ /**
1041
+ * Copyright 2013-2015, Facebook, Inc.
1042
+ * All rights reserved.
1043
+ *
1044
+ * This source code is licensed under the BSD-style license found in the
1045
+ * LICENSE file in the root directory of this source tree. An additional grant
1046
+ * of patent rights can be found in the PATENTS file in the same directory.
1047
+ *
1048
+ * @providesModule getActiveElement
1049
+ * @typechecks
1050
+ */
1051
+
1052
+ /* eslint-disable fb-www/typeof-undefined */
1053
+
1054
+ /**
1055
+ * Same as document.activeElement but wraps in a try-catch block. In IE it is
1056
+ * not safe to call document.activeElement if there is nothing focused.
1057
+ *
1058
+ * The activeElement will be null only if the document or document body is not
1059
+ * yet defined.
1060
+ */
1061
+ 'use strict';
1062
+
1063
+ function getActiveElement() /*?DOMElement*/{
1064
+ if (typeof document === 'undefined') {
1065
+ return null;
1066
+ }
1067
+ try {
1068
+ return document.activeElement || document.body;
1069
+ } catch (e) {
1070
+ return document.body;
1071
+ }
1072
+ }
1073
+
1074
+ module.exports = getActiveElement;
1075
+ },{}],13:[function(require,module,exports){
1076
+ (function (process){
1077
+ /**
1078
+ * Copyright 2013-2015, Facebook, Inc.
1079
+ * All rights reserved.
1080
+ *
1081
+ * This source code is licensed under the BSD-style license found in the
1082
+ * LICENSE file in the root directory of this source tree. An additional grant
1083
+ * of patent rights can be found in the PATENTS file in the same directory.
1084
+ *
1085
+ * @providesModule getMarkupWrap
1086
+ */
1087
+
1088
+ /*eslint-disable fb-www/unsafe-html */
1089
+
1090
+ 'use strict';
1091
+
1092
+ var ExecutionEnvironment = require('./ExecutionEnvironment');
1093
+
1094
+ var invariant = require('./invariant');
1095
+
1096
+ /**
1097
+ * Dummy container used to detect which wraps are necessary.
1098
+ */
1099
+ var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
1100
+
1101
+ /**
1102
+ * Some browsers cannot use `innerHTML` to render certain elements standalone,
1103
+ * so we wrap them, render the wrapped nodes, then extract the desired node.
1104
+ *
1105
+ * In IE8, certain elements cannot render alone, so wrap all elements ('*').
1106
+ */
1107
+
1108
+ var shouldWrap = {};
1109
+
1110
+ var selectWrap = [1, '<select multiple="true">', '</select>'];
1111
+ var tableWrap = [1, '<table>', '</table>'];
1112
+ var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
1113
+
1114
+ var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
1115
+
1116
+ var markupWrap = {
1117
+ '*': [1, '?<div>', '</div>'],
1118
+
1119
+ 'area': [1, '<map>', '</map>'],
1120
+ 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
1121
+ 'legend': [1, '<fieldset>', '</fieldset>'],
1122
+ 'param': [1, '<object>', '</object>'],
1123
+ 'tr': [2, '<table><tbody>', '</tbody></table>'],
1124
+
1125
+ 'optgroup': selectWrap,
1126
+ 'option': selectWrap,
1127
+
1128
+ 'caption': tableWrap,
1129
+ 'colgroup': tableWrap,
1130
+ 'tbody': tableWrap,
1131
+ 'tfoot': tableWrap,
1132
+ 'thead': tableWrap,
1133
+
1134
+ 'td': trWrap,
1135
+ 'th': trWrap
1136
+ };
1137
+
1138
+ // Initialize the SVG elements since we know they'll always need to be wrapped
1139
+ // consistently. If they are created inside a <div> they will be initialized in
1140
+ // the wrong namespace (and will not display).
1141
+ var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
1142
+ svgElements.forEach(function (nodeName) {
1143
+ markupWrap[nodeName] = svgWrap;
1144
+ shouldWrap[nodeName] = true;
1145
+ });
1146
+
1147
+ /**
1148
+ * Gets the markup wrap configuration for the supplied `nodeName`.
1149
+ *
1150
+ * NOTE: This lazily detects which wraps are necessary for the current browser.
1151
+ *
1152
+ * @param {string} nodeName Lowercase `nodeName`.
1153
+ * @return {?array} Markup wrap configuration, if applicable.
1154
+ */
1155
+ function getMarkupWrap(nodeName) {
1156
+ !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : undefined;
1157
+ if (!markupWrap.hasOwnProperty(nodeName)) {
1158
+ nodeName = '*';
1159
+ }
1160
+ if (!shouldWrap.hasOwnProperty(nodeName)) {
1161
+ if (nodeName === '*') {
1162
+ dummyNode.innerHTML = '<link />';
1163
+ } else {
1164
+ dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
1165
+ }
1166
+ shouldWrap[nodeName] = !dummyNode.firstChild;
1167
+ }
1168
+ return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
1169
+ }
1170
+
1171
+ module.exports = getMarkupWrap;
1172
+ }).call(this,require('_process'))
1173
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9mYmpzL2xpYi9nZXRNYXJrdXBXcmFwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUN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ICdNYXJrdXAgd3JhcHBpbmcgbm9kZSBub3QgaW5pdGlhbGl6ZWQnKSA6IGludmFyaWFudChmYWxzZSkgOiB1bmRlZmluZWQ7XG4gIGlmICghbWFya3VwV3JhcC5oYXNPd25Qcm9wZXJ0eShub2RlTmFtZSkpIHtcbiAgICBub2RlTmFtZSA9ICcqJztcbiAgfVxuICBpZiAoIXNob3VsZFdyYXAuaGFzT3duUHJvcGVydHkobm9kZU5hbWUpKSB7XG4gICAgaWYgKG5vZGVOYW1lID09PSAnKicpIHtcbiAgICAgIGR1bW15Tm9kZS5pbm5lckhUTUwgPSAnPGxpbmsgLz4nO1xuICAgIH0gZWxzZSB7XG4gICAgICBkdW1teU5vZGUuaW5uZXJIVE1MID0gJzwnICsgbm9kZU5hbWUgKyAnPjwvJyArIG5vZGVOYW1lICsgJz4nO1xuICAgIH1cbiAgICBzaG91bGRXcmFwW25vZGVOYW1lXSA9ICFkdW1teU5vZGUuZmlyc3RDaGlsZDtcbiAgfVxuICByZXR1cm4gc2hvdWxkV3JhcFtub2RlTmFtZV0gPyBtYXJrdXBXcmFwW25vZGVOYW1lXSA6IG51bGw7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gZ2V0TWFya3VwV3JhcDsiXX0=
1174
+ },{"./ExecutionEnvironment":3,"./invariant":17,"_process":29}],14:[function(require,module,exports){
1175
+ /**
1176
+ * Copyright 2013-2015, Facebook, Inc.
1177
+ * All rights reserved.
1178
+ *
1179
+ * This source code is licensed under the BSD-style license found in the
1180
+ * LICENSE file in the root directory of this source tree. An additional grant
1181
+ * of patent rights can be found in the PATENTS file in the same directory.
1182
+ *
1183
+ * @providesModule getUnboundedScrollPosition
1184
+ * @typechecks
1185
+ */
1186
+
1187
+ 'use strict';
1188
+
1189
+ /**
1190
+ * Gets the scroll position of the supplied element or window.
1191
+ *
1192
+ * The return values are unbounded, unlike `getScrollPosition`. This means they
1193
+ * may be negative or exceed the element boundaries (which is possible using
1194
+ * inertial scrolling).
1195
+ *
1196
+ * @param {DOMWindow|DOMElement} scrollable
1197
+ * @return {object} Map with `x` and `y` keys.
1198
+ */
1199
+ function getUnboundedScrollPosition(scrollable) {
1200
+ if (scrollable === window) {
1201
+ return {
1202
+ x: window.pageXOffset || document.documentElement.scrollLeft,
1203
+ y: window.pageYOffset || document.documentElement.scrollTop
1204
+ };
1205
+ }
1206
+ return {
1207
+ x: scrollable.scrollLeft,
1208
+ y: scrollable.scrollTop
1209
+ };
1210
+ }
1211
+
1212
+ module.exports = getUnboundedScrollPosition;
1213
+ },{}],15:[function(require,module,exports){
1214
+ /**
1215
+ * Copyright 2013-2015, Facebook, Inc.
1216
+ * All rights reserved.
1217
+ *
1218
+ * This source code is licensed under the BSD-style license found in the
1219
+ * LICENSE file in the root directory of this source tree. An additional grant
1220
+ * of patent rights can be found in the PATENTS file in the same directory.
1221
+ *
1222
+ * @providesModule hyphenate
1223
+ * @typechecks
1224
+ */
1225
+
1226
+ 'use strict';
1227
+
1228
+ var _uppercasePattern = /([A-Z])/g;
1229
+
1230
+ /**
1231
+ * Hyphenates a camelcased string, for example:
1232
+ *
1233
+ * > hyphenate('backgroundColor')
1234
+ * < "background-color"
1235
+ *
1236
+ * For CSS style names, use `hyphenateStyleName` instead which works properly
1237
+ * with all vendor prefixes, including `ms`.
1238
+ *
1239
+ * @param {string} string
1240
+ * @return {string}
1241
+ */
1242
+ function hyphenate(string) {
1243
+ return string.replace(_uppercasePattern, '-$1').toLowerCase();
1244
+ }
1245
+
1246
+ module.exports = hyphenate;
1247
+ },{}],16:[function(require,module,exports){
1248
+ /**
1249
+ * Copyright 2013-2015, Facebook, Inc.
1250
+ * All rights reserved.
1251
+ *
1252
+ * This source code is licensed under the BSD-style license found in the
1253
+ * LICENSE file in the root directory of this source tree. An additional grant
1254
+ * of patent rights can be found in the PATENTS file in the same directory.
1255
+ *
1256
+ * @providesModule hyphenateStyleName
1257
+ * @typechecks
1258
+ */
1259
+
1260
+ 'use strict';
1261
+
1262
+ var hyphenate = require('./hyphenate');
1263
+
1264
+ var msPattern = /^ms-/;
1265
+
1266
+ /**
1267
+ * Hyphenates a camelcased CSS property name, for example:
1268
+ *
1269
+ * > hyphenateStyleName('backgroundColor')
1270
+ * < "background-color"
1271
+ * > hyphenateStyleName('MozTransition')
1272
+ * < "-moz-transition"
1273
+ * > hyphenateStyleName('msTransition')
1274
+ * < "-ms-transition"
1275
+ *
1276
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
1277
+ * is converted to `-ms-`.
1278
+ *
1279
+ * @param {string} string
1280
+ * @return {string}
1281
+ */
1282
+ function hyphenateStyleName(string) {
1283
+ return hyphenate(string).replace(msPattern, '-ms-');
1284
+ }
1285
+
1286
+ module.exports = hyphenateStyleName;
1287
+ },{"./hyphenate":15}],17:[function(require,module,exports){
1288
+ (function (process){
1289
+ /**
1290
+ * Copyright 2013-2015, Facebook, Inc.
1291
+ * All rights reserved.
1292
+ *
1293
+ * This source code is licensed under the BSD-style license found in the
1294
+ * LICENSE file in the root directory of this source tree. An additional grant
1295
+ * of patent rights can be found in the PATENTS file in the same directory.
1296
+ *
1297
+ * @providesModule invariant
1298
+ */
1299
+
1300
+ 'use strict';
1301
+
1302
+ /**
1303
+ * Use invariant() to assert state which your program assumes to be true.
1304
+ *
1305
+ * Provide sprintf-style format (only %s is supported) and arguments
1306
+ * to provide information about what broke and what you were
1307
+ * expecting.
1308
+ *
1309
+ * The invariant message will be stripped in production, but the invariant
1310
+ * will remain to ensure logic does not differ in production.
1311
+ */
1312
+
1313
+ function invariant(condition, format, a, b, c, d, e, f) {
1314
+ if (process.env.NODE_ENV !== 'production') {
1315
+ if (format === undefined) {
1316
+ throw new Error('invariant requires an error message argument');
1317
+ }
1318
+ }
1319
+
1320
+ if (!condition) {
1321
+ var error;
1322
+ if (format === undefined) {
1323
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
1324
+ } else {
1325
+ var args = [a, b, c, d, e, f];
1326
+ var argIndex = 0;
1327
+ error = new Error(format.replace(/%s/g, function () {
1328
+ return args[argIndex++];
1329
+ }));
1330
+ error.name = 'Invariant Violation';
1331
+ }
1332
+
1333
+ error.framesToPop = 1; // we don't care about invariant's own frame
1334
+ throw error;
1335
+ }
1336
+ }
1337
+
1338
+ module.exports = invariant;
1339
+ }).call(this,require('_process'))
1340
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9mYmpzL2xpYi9pbnZhcmlhbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IDIwMTMtMjAxNSwgRmFjZWJvb2ssIEluYy5cbiAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgQlNELXN0eWxlIGxpY2Vuc2UgZm91bmQgaW4gdGhlXG4gKiBMSUNFTlNFIGZpbGUgaW4gdGhlIHJvb3QgZGlyZWN0b3J5IG9mIHRoaXMgc291cmNlIHRyZWUuIEFuIGFkZGl0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aW5lZCkge1xuICAgICAgZXJyb3IgPSBuZXcgRXJyb3IoJ01pbmlmaWVkIGV4Y2VwdGlvbiBvY2N1cnJlZDsgdXNlIHRoZSBub24tbWluaWZpZWQgZGV2IGVudmlyb25tZW50ICcgKyAnZm9yIHRoZSBmdWxsIGVycm9yIG1lc3NhZ2UgYW5kIGFkZGl0aW9uYWwgaGVscGZ1bCB3YXJuaW5ncy4nKTtcbiAgICB9IGVsc2Uge1xuICAgICAgdmFyIGFyZ3MgPSBbYSwgYiwgYywgZCwgZSwgZl07XG4gICAgICB2YXIgYXJnSW5kZXggPSAwO1xuICAgICAgZXJyb3IgPSBuZXcgRXJyb3IoZm9ybWF0LnJlcGxhY2UoLyVzL2csIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIGFyZ3NbYXJnSW5kZXgrK107XG4gICAgICB9KSk7XG4gICAgICBlcnJvci5uYW1lID0gJ0ludmFyaWFudCBWaW9sYXRpb24nO1xuICAgIH1cblxuICAgIGVycm9yLmZyYW1lc1RvUG9wID0gMTsgLy8gd2UgZG9uJ3QgY2FyZSBhYm91dCBpbnZhcmlhbnQncyBvd24gZnJhbWVcbiAgICB0aHJvdyBlcnJvcjtcbiAgfVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGludmFyaWFudDsiXX0=
1341
+ },{"_process":29}],18:[function(require,module,exports){
1342
+ /**
1343
+ * Copyright 2013-2015, Facebook, Inc.
1344
+ * All rights reserved.
1345
+ *
1346
+ * This source code is licensed under the BSD-style license found in the
1347
+ * LICENSE file in the root directory of this source tree. An additional grant
1348
+ * of patent rights can be found in the PATENTS file in the same directory.
1349
+ *
1350
+ * @providesModule isNode
1351
+ * @typechecks
1352
+ */
1353
+
1354
+ /**
1355
+ * @param {*} object The object to check.
1356
+ * @return {boolean} Whether or not the object is a DOM node.
1357
+ */
1358
+ 'use strict';
1359
+
1360
+ function isNode(object) {
1361
+ return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
1362
+ }
1363
+
1364
+ module.exports = isNode;
1365
+ },{}],19:[function(require,module,exports){
1366
+ /**
1367
+ * Copyright 2013-2015, Facebook, Inc.
1368
+ * All rights reserved.
1369
+ *
1370
+ * This source code is licensed under the BSD-style license found in the
1371
+ * LICENSE file in the root directory of this source tree. An additional grant
1372
+ * of patent rights can be found in the PATENTS file in the same directory.
1373
+ *
1374
+ * @providesModule isTextNode
1375
+ * @typechecks
1376
+ */
1377
+
1378
+ 'use strict';
1379
+
1380
+ var isNode = require('./isNode');
1381
+
1382
+ /**
1383
+ * @param {*} object The object to check.
1384
+ * @return {boolean} Whether or not the object is a DOM text node.
1385
+ */
1386
+ function isTextNode(object) {
1387
+ return isNode(object) && object.nodeType == 3;
1388
+ }
1389
+
1390
+ module.exports = isTextNode;
1391
+ },{"./isNode":18}],20:[function(require,module,exports){
1392
+ (function (process){
1393
+ /**
1394
+ * Copyright 2013-2015, Facebook, Inc.
1395
+ * All rights reserved.
1396
+ *
1397
+ * This source code is licensed under the BSD-style license found in the
1398
+ * LICENSE file in the root directory of this source tree. An additional grant
1399
+ * of patent rights can be found in the PATENTS file in the same directory.
1400
+ *
1401
+ * @providesModule keyMirror
1402
+ * @typechecks static-only
1403
+ */
1404
+
1405
+ 'use strict';
1406
+
1407
+ var invariant = require('./invariant');
1408
+
1409
+ /**
1410
+ * Constructs an enumeration with keys equal to their value.
1411
+ *
1412
+ * For example:
1413
+ *
1414
+ * var COLORS = keyMirror({blue: null, red: null});
1415
+ * var myColor = COLORS.blue;
1416
+ * var isColorValid = !!COLORS[myColor];
1417
+ *
1418
+ * The last line could not be performed if the values of the generated enum were
1419
+ * not equal to their keys.
1420
+ *
1421
+ * Input: {key1: val1, key2: val2}
1422
+ * Output: {key1: key1, key2: key2}
1423
+ *
1424
+ * @param {object} obj
1425
+ * @return {object}
1426
+ */
1427
+ var keyMirror = function (obj) {
1428
+ var ret = {};
1429
+ var key;
1430
+ !(obj instanceof Object && !Array.isArray(obj)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'keyMirror(...): Argument must be an object.') : invariant(false) : undefined;
1431
+ for (key in obj) {
1432
+ if (!obj.hasOwnProperty(key)) {
1433
+ continue;
1434
+ }
1435
+ ret[key] = key;
1436
+ }
1437
+ return ret;
1438
+ };
1439
+
1440
+ module.exports = keyMirror;
1441
+ }).call(this,require('_process'))
1442
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9mYmpzL2xpYi9rZXlNaXJyb3IuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgMjAxMy0yMDE1LCBGYWNlYm9vaywgSW5jLlxuICogQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqXG4gKiBUaGlzIHNvdXJjZSBjb2RlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBCU0Qtc3R5bGUgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBz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XkuaXNBcnJheShvYmopKSA/IHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicgPyBpbnZhcmlhbnQoZmFsc2UsICdrZXlNaXJyb3IoLi4uKTogQXJndW1lbnQgbXVzdCBiZSBhbiBvYmplY3QuJykgOiBpbnZhcmlhbnQoZmFsc2UpIDogdW5kZWZpbmVkO1xuICBmb3IgKGtleSBpbiBvYmopIHtcbiAgICBpZiAoIW9iai5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICBjb250aW51ZTtcbiAgICB9XG4gICAgcmV0W2tleV0gPSBrZXk7XG4gIH1cbiAgcmV0dXJuIHJldDtcbn07XG5cbm1vZHVsZS5leHBvcnRzID0ga2V5TWlycm9yOyJdfQ==
1443
+ },{"./invariant":17,"_process":29}],21:[function(require,module,exports){
1444
+ /**
1445
+ * Copyright 2013-2015, Facebook, Inc.
1446
+ * All rights reserved.
1447
+ *
1448
+ * This source code is licensed under the BSD-style license found in the
1449
+ * LICENSE file in the root directory of this source tree. An additional grant
1450
+ * of patent rights can be found in the PATENTS file in the same directory.
1451
+ *
1452
+ * @providesModule keyOf
1453
+ */
1454
+
1455
+ /**
1456
+ * Allows extraction of a minified key. Let's the build system minify keys
1457
+ * without losing the ability to dynamically use key strings as values
1458
+ * themselves. Pass in an object with a single key/val pair and it will return
1459
+ * you the string key of that single record. Suppose you want to grab the
1460
+ * value for a key 'className' inside of an object. Key/val minification may
1461
+ * have aliased that key to be 'xa12'. keyOf({className: null}) will return
1462
+ * 'xa12' in that case. Resolve keys you want to use once at startup time, then
1463
+ * reuse those resolutions.
1464
+ */
1465
+ "use strict";
1466
+
1467
+ var keyOf = function (oneKeyObj) {
1468
+ var key;
1469
+ for (key in oneKeyObj) {
1470
+ if (!oneKeyObj.hasOwnProperty(key)) {
1471
+ continue;
1472
+ }
1473
+ return key;
1474
+ }
1475
+ return null;
1476
+ };
1477
+
1478
+ module.exports = keyOf;
1479
+ },{}],22:[function(require,module,exports){
1480
+ /**
1481
+ * Copyright 2013-2015, Facebook, Inc.
1482
+ * All rights reserved.
1483
+ *
1484
+ * This source code is licensed under the BSD-style license found in the
1485
+ * LICENSE file in the root directory of this source tree. An additional grant
1486
+ * of patent rights can be found in the PATENTS file in the same directory.
1487
+ *
1488
+ * @providesModule mapObject
1489
+ */
1490
+
1491
+ 'use strict';
1492
+
1493
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1494
+
1495
+ /**
1496
+ * Executes the provided `callback` once for each enumerable own property in the
1497
+ * object and constructs a new object from the results. The `callback` is
1498
+ * invoked with three arguments:
1499
+ *
1500
+ * - the property value
1501
+ * - the property name
1502
+ * - the object being traversed
1503
+ *
1504
+ * Properties that are added after the call to `mapObject` will not be visited
1505
+ * by `callback`. If the values of existing properties are changed, the value
1506
+ * passed to `callback` will be the value at the time `mapObject` visits them.
1507
+ * Properties that are deleted before being visited are not visited.
1508
+ *
1509
+ * @grep function objectMap()
1510
+ * @grep function objMap()
1511
+ *
1512
+ * @param {?object} object
1513
+ * @param {function} callback
1514
+ * @param {*} context
1515
+ * @return {?object}
1516
+ */
1517
+ function mapObject(object, callback, context) {
1518
+ if (!object) {
1519
+ return null;
1520
+ }
1521
+ var result = {};
1522
+ for (var name in object) {
1523
+ if (hasOwnProperty.call(object, name)) {
1524
+ result[name] = callback.call(context, object[name], name, object);
1525
+ }
1526
+ }
1527
+ return result;
1528
+ }
1529
+
1530
+ module.exports = mapObject;
1531
+ },{}],23:[function(require,module,exports){
1532
+ /**
1533
+ * Copyright 2013-2015, Facebook, Inc.
1534
+ * All rights reserved.
1535
+ *
1536
+ * This source code is licensed under the BSD-style license found in the
1537
+ * LICENSE file in the root directory of this source tree. An additional grant
1538
+ * of patent rights can be found in the PATENTS file in the same directory.
1539
+ *
1540
+ * @providesModule memoizeStringOnly
1541
+ * @typechecks static-only
1542
+ */
1543
+
1544
+ 'use strict';
1545
+
1546
+ /**
1547
+ * Memoizes the return value of a function that accepts one string argument.
1548
+ *
1549
+ * @param {function} callback
1550
+ * @return {function}
1551
+ */
1552
+ function memoizeStringOnly(callback) {
1553
+ var cache = {};
1554
+ return function (string) {
1555
+ if (!cache.hasOwnProperty(string)) {
1556
+ cache[string] = callback.call(this, string);
1557
+ }
1558
+ return cache[string];
1559
+ };
1560
+ }
1561
+
1562
+ module.exports = memoizeStringOnly;
1563
+ },{}],24:[function(require,module,exports){
1564
+ /**
1565
+ * Copyright 2013-2015, Facebook, Inc.
1566
+ * All rights reserved.
1567
+ *
1568
+ * This source code is licensed under the BSD-style license found in the
1569
+ * LICENSE file in the root directory of this source tree. An additional grant
1570
+ * of patent rights can be found in the PATENTS file in the same directory.
1571
+ *
1572
+ * @providesModule performance
1573
+ * @typechecks
1574
+ */
1575
+
1576
+ 'use strict';
1577
+
1578
+ var ExecutionEnvironment = require('./ExecutionEnvironment');
1579
+
1580
+ var performance;
1581
+
1582
+ if (ExecutionEnvironment.canUseDOM) {
1583
+ performance = window.performance || window.msPerformance || window.webkitPerformance;
1584
+ }
1585
+
1586
+ module.exports = performance || {};
1587
+ },{"./ExecutionEnvironment":3}],25:[function(require,module,exports){
1588
+ /**
1589
+ * Copyright 2013-2015, Facebook, Inc.
1590
+ * All rights reserved.
1591
+ *
1592
+ * This source code is licensed under the BSD-style license found in the
1593
+ * LICENSE file in the root directory of this source tree. An additional grant
1594
+ * of patent rights can be found in the PATENTS file in the same directory.
1595
+ *
1596
+ * @providesModule performanceNow
1597
+ * @typechecks
1598
+ */
1599
+
1600
+ 'use strict';
1601
+
1602
+ var performance = require('./performance');
1603
+
1604
+ var performanceNow;
1605
+
1606
+ /**
1607
+ * Detect if we can use `window.performance.now()` and gracefully fallback to
1608
+ * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
1609
+ * because of Facebook's testing infrastructure.
1610
+ */
1611
+ if (performance.now) {
1612
+ performanceNow = function () {
1613
+ return performance.now();
1614
+ };
1615
+ } else {
1616
+ performanceNow = function () {
1617
+ return Date.now();
1618
+ };
1619
+ }
1620
+
1621
+ module.exports = performanceNow;
1622
+ },{"./performance":24}],26:[function(require,module,exports){
1623
+ /**
1624
+ * Copyright 2013-2015, Facebook, Inc.
1625
+ * All rights reserved.
1626
+ *
1627
+ * This source code is licensed under the BSD-style license found in the
1628
+ * LICENSE file in the root directory of this source tree. An additional grant
1629
+ * of patent rights can be found in the PATENTS file in the same directory.
1630
+ *
1631
+ * @providesModule shallowEqual
1632
+ * @typechecks
1633
+ *
1634
+ */
1635
+
1636
+ 'use strict';
1637
+
1638
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1639
+
1640
+ /**
1641
+ * Performs equality by iterating through keys on an object and returning false
1642
+ * when any key has values which are not strictly equal between the arguments.
1643
+ * Returns true when the values of all keys are strictly equal.
1644
+ */
1645
+ function shallowEqual(objA, objB) {
1646
+ if (objA === objB) {
1647
+ return true;
1648
+ }
1649
+
1650
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
1651
+ return false;
1652
+ }
1653
+
1654
+ var keysA = Object.keys(objA);
1655
+ var keysB = Object.keys(objB);
1656
+
1657
+ if (keysA.length !== keysB.length) {
1658
+ return false;
1659
+ }
1660
+
1661
+ // Test for A's keys different from B.
1662
+ var bHasOwnProperty = hasOwnProperty.bind(objB);
1663
+ for (var i = 0; i < keysA.length; i++) {
1664
+ if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
1665
+ return false;
1666
+ }
1667
+ }
1668
+
1669
+ return true;
1670
+ }
1671
+
1672
+ module.exports = shallowEqual;
1673
+ },{}],27:[function(require,module,exports){
1674
+ (function (process){
1675
+ /**
1676
+ * Copyright 2013-2015, Facebook, Inc.
1677
+ * All rights reserved.
1678
+ *
1679
+ * This source code is licensed under the BSD-style license found in the
1680
+ * LICENSE file in the root directory of this source tree. An additional grant
1681
+ * of patent rights can be found in the PATENTS file in the same directory.
1682
+ *
1683
+ * @providesModule toArray
1684
+ * @typechecks
1685
+ */
1686
+
1687
+ 'use strict';
1688
+
1689
+ var invariant = require('./invariant');
1690
+
1691
+ /**
1692
+ * Convert array-like objects to arrays.
1693
+ *
1694
+ * This API assumes the caller knows the contents of the data type. For less
1695
+ * well defined inputs use createArrayFromMixed.
1696
+ *
1697
+ * @param {object|function|filelist} obj
1698
+ * @return {array}
1699
+ */
1700
+ function toArray(obj) {
1701
+ var length = obj.length;
1702
+
1703
+ // Some browse builtin objects can report typeof 'function' (e.g. NodeList in
1704
+ // old versions of Safari).
1705
+ !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : undefined;
1706
+
1707
+ !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : undefined;
1708
+
1709
+ !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : undefined;
1710
+
1711
+ // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
1712
+ // without method will throw during the slice call and skip straight to the
1713
+ // fallback.
1714
+ if (obj.hasOwnProperty) {
1715
+ try {
1716
+ return Array.prototype.slice.call(obj);
1717
+ } catch (e) {
1718
+ // IE < 9 does not support Array#slice on collections objects
1719
+ }
1720
+ }
1721
+
1722
+ // Fall back to copying key by key. This assumes all keys have a value,
1723
+ // so will not preserve sparsely populated inputs.
1724
+ var ret = Array(length);
1725
+ for (var ii = 0; ii < length; ii++) {
1726
+ ret[ii] = obj[ii];
1727
+ }
1728
+ return ret;
1729
+ }
1730
+
1731
+ module.exports = toArray;
1732
+ }).call(this,require('_process'))
1733
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9mYmpzL2xpYi90b0FycmF5LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QU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Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicgPyBpbnZhcmlhbnQoZmFsc2UsICd0b0FycmF5OiBPYmplY3Qgc2hvdWxkIGhhdmUga2V5cyBmb3IgaW5kaWNlcycpIDogaW52YXJpYW50KGZhbHNlKSA6IHVuZGVmaW5lZDtcblxuICAvLyBPbGQgSUUgZG9lc24ndCBnaXZlIGNvbGxlY3Rpb25zIGFjY2VzcyB0byBoYXNPd25Qcm9wZXJ0eS4gQXNzdW1lIGlucHV0c1xuICAvLyB3aXRob3V0IG1ldGhvZCB3aWxsIHRocm93IGR1cmluZyB0aGUgc2xpY2UgY2FsbCBhbmQgc2tpcCBzdHJhaWdodCB0byB0aGVcbiAgLy8gZmFsbGJhY2suXG4gIGlmIChvYmouaGFzT3duUHJvcGVydHkpIHtcbiAgICB0cnkge1xuICAgICAgcmV0dXJuIEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKG9iaik7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgLy8gSUUgPCA5IGRvZXMgbm90IHN1cHBvcnQgQXJyYXkjc2xpY2Ugb24gY29sbGVjdGlvbnMgb2JqZWN0c1xuICAgIH1cbiAgfVxuXG4gIC8vIEZhbGwgYmFjayB0byBjb3B5aW5nIGtleSBieSBrZXkuIFRoaXMgYXNzdW1lcyBhbGwga2V5cyBoYXZlIGEgdmFsdWUsXG4gIC8vIHNvIHdpbGwgbm90IHByZXNlcnZlIHNwYXJzZWx5IHBvcHVsYXRlZCBpbnB1dHMuXG4gIHZhciByZXQgPSBBcnJheShsZW5ndGgpO1xuICBmb3IgKHZhciBpaSA9IDA7IGlpIDwgbGVuZ3RoOyBpaSsrKSB7XG4gICAgcmV0W2lpXSA9IG9ialtpaV07XG4gIH1cbiAgcmV0dXJuIHJldDtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSB0b0FycmF5OyJdfQ==
1734
+ },{"./invariant":17,"_process":29}],28:[function(require,module,exports){
1735
+ (function (process){
1736
+ /**
1737
+ * Copyright 2014-2015, Facebook, Inc.
1738
+ * All rights reserved.
1739
+ *
1740
+ * This source code is licensed under the BSD-style license found in the
1741
+ * LICENSE file in the root directory of this source tree. An additional grant
1742
+ * of patent rights can be found in the PATENTS file in the same directory.
1743
+ *
1744
+ * @providesModule warning
1745
+ */
1746
+
1747
+ 'use strict';
1748
+
1749
+ var emptyFunction = require('./emptyFunction');
1750
+
1751
+ /**
1752
+ * Similar to invariant but only logs a warning if the condition is not met.
1753
+ * This can be used to log issues in development environments in critical
1754
+ * paths. Removing the logging code for production environments will keep the
1755
+ * same logic and follow the same code paths.
1756
+ */
1757
+
1758
+ var warning = emptyFunction;
1759
+
1760
+ if (process.env.NODE_ENV !== 'production') {
1761
+ warning = function (condition, format) {
1762
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1763
+ args[_key - 2] = arguments[_key];
1764
+ }
1765
+
1766
+ if (format === undefined) {
1767
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
1768
+ }
1769
+
1770
+ if (format.indexOf('Failed Composite propType: ') === 0) {
1771
+ return; // Ignore CompositeComponent proptype check.
1772
+ }
1773
+
1774
+ if (!condition) {
1775
+ var argIndex = 0;
1776
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
1777
+ return args[argIndex++];
1778
+ });
1779
+ if (typeof console !== 'undefined') {
1780
+ console.error(message);
1781
+ }
1782
+ try {
1783
+ // --- Welcome to debugging React ---
1784
+ // This error was thrown as a convenience so that you can use this stack
1785
+ // to find the callsite that caused this warning to fire.
1786
+ throw new Error(message);
1787
+ } catch (x) {}
1788
+ }
1789
+ };
1790
+ }
1791
+
1792
+ module.exports = warning;
1793
+ }).call(this,require('_process'))
1794
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9mYmpzL2xpYi93YXJuaW5nLmpzIl0sIm5h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SBDb21wb3NpdGVDb21wb25lbnQgcHJvcHR5cGUgY2hlY2suXG4gICAgfVxuXG4gICAgaWYgKCFjb25kaXRpb24pIHtcbiAgICAgIHZhciBhcmdJbmRleCA9IDA7XG4gICAgICB2YXIgbWVzc2FnZSA9ICdXYXJuaW5nOiAnICsgZm9ybWF0LnJlcGxhY2UoLyVzL2csIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIGFyZ3NbYXJnSW5kZXgrK107XG4gICAgICB9KTtcbiAgICAgIGlmICh0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgY29uc29sZS5lcnJvcihtZXNzYWdlKTtcbiAgICAgIH1cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIC0tLSBXZWxjb21lIHRvIGRlYnVnZ2luZyBSZWFjdCAtLS1cbiAgICAgICAgLy8gVGhpcyBlcnJvciB3YXMgdGhyb3duIGFzIGEgY29udmVuaWVuY2Ugc28gdGhhdCB5b3UgY2FuIHVzZSB0aGlzIHN0YWNrXG4gICAgICAgIC8vIHRvIGZpbmQgdGhlIGNhbGxzaXRlIHRoYXQgY2F1c2VkIHRoaXMgd2FybmluZyB0byBmaXJlLlxuICAgICAgICB0aHJvdyBuZXcgRXJyb3IobWVzc2FnZSk7XG4gICAgICB9IGNhdGNoICh4KSB7fVxuICAgIH1cbiAgfTtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSB3YXJuaW5nOyJdfQ==
1795
+ },{"./emptyFunction":9,"_process":29}],29:[function(require,module,exports){
1796
+ // shim for using process in browser
1797
+
1798
+ var process = module.exports = {};
1799
+ var queue = [];
1800
+ var draining = false;
1801
+ var currentQueue;
1802
+ var queueIndex = -1;
1803
+
1804
+ function cleanUpNextTick() {
1805
+ draining = false;
1806
+ if (currentQueue.length) {
1807
+ queue = currentQueue.concat(queue);
1808
+ } else {
1809
+ queueIndex = -1;
1810
+ }
1811
+ if (queue.length) {
1812
+ drainQueue();
1813
+ }
1814
+ }
1815
+
1816
+ function drainQueue() {
1817
+ if (draining) {
1818
+ return;
1819
+ }
1820
+ var timeout = setTimeout(cleanUpNextTick);
1821
+ draining = true;
1822
+
1823
+ var len = queue.length;
1824
+ while(len) {
1825
+ currentQueue = queue;
1826
+ queue = [];
1827
+ while (++queueIndex < len) {
1828
+ if (currentQueue) {
1829
+ currentQueue[queueIndex].run();
1830
+ }
1831
+ }
1832
+ queueIndex = -1;
1833
+ len = queue.length;
1834
+ }
1835
+ currentQueue = null;
1836
+ draining = false;
1837
+ clearTimeout(timeout);
1838
+ }
1839
+
1840
+ process.nextTick = function (fun) {
1841
+ var args = new Array(arguments.length - 1);
1842
+ if (arguments.length > 1) {
1843
+ for (var i = 1; i < arguments.length; i++) {
1844
+ args[i - 1] = arguments[i];
1845
+ }
1846
+ }
1847
+ queue.push(new Item(fun, args));
1848
+ if (queue.length === 1 && !draining) {
1849
+ setTimeout(drainQueue, 0);
1850
+ }
1851
+ };
1852
+
1853
+ // v8 likes predictible objects
1854
+ function Item(fun, array) {
1855
+ this.fun = fun;
1856
+ this.array = array;
1857
+ }
1858
+ Item.prototype.run = function () {
1859
+ this.fun.apply(null, this.array);
1860
+ };
1861
+ process.title = 'browser';
1862
+ process.browser = true;
1863
+ process.env = {};
1864
+ process.argv = [];
1865
+ process.version = ''; // empty string to avoid regexp issues
1866
+ process.versions = {};
1867
+
1868
+ function noop() {}
1869
+
1870
+ process.on = noop;
1871
+ process.addListener = noop;
1872
+ process.once = noop;
1873
+ process.off = noop;
1874
+ process.removeListener = noop;
1875
+ process.removeAllListeners = noop;
1876
+ process.emit = noop;
1877
+
1878
+ process.binding = function (name) {
1879
+ throw new Error('process.binding is not supported');
1880
+ };
1881
+
1882
+ process.cwd = function () { return '/' };
1883
+ process.chdir = function (dir) {
1884
+ throw new Error('process.chdir is not supported');
1885
+ };
1886
+ process.umask = function() { return 0; };
1887
+
1888
+ },{}],30:[function(require,module,exports){
1889
+ 'use strict';
1890
+
1891
+ module.exports = require('react/lib/ReactDOM');
1892
+
1893
+ },{"react/lib/ReactDOM":65}],31:[function(require,module,exports){
1894
+ /**
1895
+ * Copyright 2013-2015, Facebook, Inc.
1896
+ * All rights reserved.
1897
+ *
1898
+ * This source code is licensed under the BSD-style license found in the
1899
+ * LICENSE file in the root directory of this source tree. An additional grant
1900
+ * of patent rights can be found in the PATENTS file in the same directory.
1901
+ *
1902
+ * @providesModule AutoFocusUtils
1903
+ * @typechecks static-only
1904
+ */
1905
+
1906
+ 'use strict';
1907
+
1908
+ var ReactMount = require('./ReactMount');
1909
+
1910
+ var findDOMNode = require('./findDOMNode');
1911
+ var focusNode = require('fbjs/lib/focusNode');
1912
+
1913
+ var Mixin = {
1914
+ componentDidMount: function () {
1915
+ if (this.props.autoFocus) {
1916
+ focusNode(findDOMNode(this));
1917
+ }
1918
+ }
1919
+ };
1920
+
1921
+ var AutoFocusUtils = {
1922
+ Mixin: Mixin,
1923
+
1924
+ focusDOMComponent: function () {
1925
+ focusNode(ReactMount.getNode(this._rootNodeID));
1926
+ }
1927
+ };
1928
+
1929
+ module.exports = AutoFocusUtils;
1930
+ },{"./ReactMount":95,"./findDOMNode":138,"fbjs/lib/focusNode":11}],32:[function(require,module,exports){
1931
+ /**
1932
+ * Copyright 2013-2015 Facebook, Inc.
1933
+ * All rights reserved.
1934
+ *
1935
+ * This source code is licensed under the BSD-style license found in the
1936
+ * LICENSE file in the root directory of this source tree. An additional grant
1937
+ * of patent rights can be found in the PATENTS file in the same directory.
1938
+ *
1939
+ * @providesModule BeforeInputEventPlugin
1940
+ * @typechecks static-only
1941
+ */
1942
+
1943
+ 'use strict';
1944
+
1945
+ var EventConstants = require('./EventConstants');
1946
+ var EventPropagators = require('./EventPropagators');
1947
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
1948
+ var FallbackCompositionState = require('./FallbackCompositionState');
1949
+ var SyntheticCompositionEvent = require('./SyntheticCompositionEvent');
1950
+ var SyntheticInputEvent = require('./SyntheticInputEvent');
1951
+
1952
+ var keyOf = require('fbjs/lib/keyOf');
1953
+
1954
+ var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
1955
+ var START_KEYCODE = 229;
1956
+
1957
+ var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
1958
+
1959
+ var documentMode = null;
1960
+ if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
1961
+ documentMode = document.documentMode;
1962
+ }
1963
+
1964
+ // Webkit offers a very useful `textInput` event that can be used to
1965
+ // directly represent `beforeInput`. The IE `textinput` event is not as
1966
+ // useful, so we don't use it.
1967
+ var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
1968
+
1969
+ // In IE9+, we have access to composition events, but the data supplied
1970
+ // by the native compositionend event may be incorrect. Japanese ideographic
1971
+ // spaces, for instance (\u3000) are not recorded correctly.
1972
+ var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
1973
+
1974
+ /**
1975
+ * Opera <= 12 includes TextEvent in window, but does not fire
1976
+ * text input events. Rely on keypress instead.
1977
+ */
1978
+ function isPresto() {
1979
+ var opera = window.opera;
1980
+ return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
1981
+ }
1982
+
1983
+ var SPACEBAR_CODE = 32;
1984
+ var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
1985
+
1986
+ var topLevelTypes = EventConstants.topLevelTypes;
1987
+
1988
+ // Events and their corresponding property names.
1989
+ var eventTypes = {
1990
+ beforeInput: {
1991
+ phasedRegistrationNames: {
1992
+ bubbled: keyOf({ onBeforeInput: null }),
1993
+ captured: keyOf({ onBeforeInputCapture: null })
1994
+ },
1995
+ dependencies: [topLevelTypes.topCompositionEnd, topLevelTypes.topKeyPress, topLevelTypes.topTextInput, topLevelTypes.topPaste]
1996
+ },
1997
+ compositionEnd: {
1998
+ phasedRegistrationNames: {
1999
+ bubbled: keyOf({ onCompositionEnd: null }),
2000
+ captured: keyOf({ onCompositionEndCapture: null })
2001
+ },
2002
+ dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionEnd, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
2003
+ },
2004
+ compositionStart: {
2005
+ phasedRegistrationNames: {
2006
+ bubbled: keyOf({ onCompositionStart: null }),
2007
+ captured: keyOf({ onCompositionStartCapture: null })
2008
+ },
2009
+ dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionStart, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
2010
+ },
2011
+ compositionUpdate: {
2012
+ phasedRegistrationNames: {
2013
+ bubbled: keyOf({ onCompositionUpdate: null }),
2014
+ captured: keyOf({ onCompositionUpdateCapture: null })
2015
+ },
2016
+ dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionUpdate, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
2017
+ }
2018
+ };
2019
+
2020
+ // Track whether we've ever handled a keypress on the space key.
2021
+ var hasSpaceKeypress = false;
2022
+
2023
+ /**
2024
+ * Return whether a native keypress event is assumed to be a command.
2025
+ * This is required because Firefox fires `keypress` events for key commands
2026
+ * (cut, copy, select-all, etc.) even though no character is inserted.
2027
+ */
2028
+ function isKeypressCommand(nativeEvent) {
2029
+ return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
2030
+ // ctrlKey && altKey is equivalent to AltGr, and is not a command.
2031
+ !(nativeEvent.ctrlKey && nativeEvent.altKey);
2032
+ }
2033
+
2034
+ /**
2035
+ * Translate native top level events into event types.
2036
+ *
2037
+ * @param {string} topLevelType
2038
+ * @return {object}
2039
+ */
2040
+ function getCompositionEventType(topLevelType) {
2041
+ switch (topLevelType) {
2042
+ case topLevelTypes.topCompositionStart:
2043
+ return eventTypes.compositionStart;
2044
+ case topLevelTypes.topCompositionEnd:
2045
+ return eventTypes.compositionEnd;
2046
+ case topLevelTypes.topCompositionUpdate:
2047
+ return eventTypes.compositionUpdate;
2048
+ }
2049
+ }
2050
+
2051
+ /**
2052
+ * Does our fallback best-guess model think this event signifies that
2053
+ * composition has begun?
2054
+ *
2055
+ * @param {string} topLevelType
2056
+ * @param {object} nativeEvent
2057
+ * @return {boolean}
2058
+ */
2059
+ function isFallbackCompositionStart(topLevelType, nativeEvent) {
2060
+ return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE;
2061
+ }
2062
+
2063
+ /**
2064
+ * Does our fallback mode think that this event is the end of composition?
2065
+ *
2066
+ * @param {string} topLevelType
2067
+ * @param {object} nativeEvent
2068
+ * @return {boolean}
2069
+ */
2070
+ function isFallbackCompositionEnd(topLevelType, nativeEvent) {
2071
+ switch (topLevelType) {
2072
+ case topLevelTypes.topKeyUp:
2073
+ // Command keys insert or clear IME input.
2074
+ return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
2075
+ case topLevelTypes.topKeyDown:
2076
+ // Expect IME keyCode on each keydown. If we get any other
2077
+ // code we must have exited earlier.
2078
+ return nativeEvent.keyCode !== START_KEYCODE;
2079
+ case topLevelTypes.topKeyPress:
2080
+ case topLevelTypes.topMouseDown:
2081
+ case topLevelTypes.topBlur:
2082
+ // Events are not possible without cancelling IME.
2083
+ return true;
2084
+ default:
2085
+ return false;
2086
+ }
2087
+ }
2088
+
2089
+ /**
2090
+ * Google Input Tools provides composition data via a CustomEvent,
2091
+ * with the `data` property populated in the `detail` object. If this
2092
+ * is available on the event object, use it. If not, this is a plain
2093
+ * composition event and we have nothing special to extract.
2094
+ *
2095
+ * @param {object} nativeEvent
2096
+ * @return {?string}
2097
+ */
2098
+ function getDataFromCustomEvent(nativeEvent) {
2099
+ var detail = nativeEvent.detail;
2100
+ if (typeof detail === 'object' && 'data' in detail) {
2101
+ return detail.data;
2102
+ }
2103
+ return null;
2104
+ }
2105
+
2106
+ // Track the current IME composition fallback object, if any.
2107
+ var currentComposition = null;
2108
+
2109
+ /**
2110
+ * @param {string} topLevelType Record from `EventConstants`.
2111
+ * @param {DOMEventTarget} topLevelTarget The listening component root node.
2112
+ * @param {string} topLevelTargetID ID of `topLevelTarget`.
2113
+ * @param {object} nativeEvent Native browser event.
2114
+ * @return {?object} A SyntheticCompositionEvent.
2115
+ */
2116
+ function extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
2117
+ var eventType;
2118
+ var fallbackData;
2119
+
2120
+ if (canUseCompositionEvent) {
2121
+ eventType = getCompositionEventType(topLevelType);
2122
+ } else if (!currentComposition) {
2123
+ if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
2124
+ eventType = eventTypes.compositionStart;
2125
+ }
2126
+ } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
2127
+ eventType = eventTypes.compositionEnd;
2128
+ }
2129
+
2130
+ if (!eventType) {
2131
+ return null;
2132
+ }
2133
+
2134
+ if (useFallbackCompositionData) {
2135
+ // The current composition is stored statically and must not be
2136
+ // overwritten while composition continues.
2137
+ if (!currentComposition && eventType === eventTypes.compositionStart) {
2138
+ currentComposition = FallbackCompositionState.getPooled(topLevelTarget);
2139
+ } else if (eventType === eventTypes.compositionEnd) {
2140
+ if (currentComposition) {
2141
+ fallbackData = currentComposition.getData();
2142
+ }
2143
+ }
2144
+ }
2145
+
2146
+ var event = SyntheticCompositionEvent.getPooled(eventType, topLevelTargetID, nativeEvent, nativeEventTarget);
2147
+
2148
+ if (fallbackData) {
2149
+ // Inject data generated from fallback path into the synthetic event.
2150
+ // This matches the property of native CompositionEventInterface.
2151
+ event.data = fallbackData;
2152
+ } else {
2153
+ var customData = getDataFromCustomEvent(nativeEvent);
2154
+ if (customData !== null) {
2155
+ event.data = customData;
2156
+ }
2157
+ }
2158
+
2159
+ EventPropagators.accumulateTwoPhaseDispatches(event);
2160
+ return event;
2161
+ }
2162
+
2163
+ /**
2164
+ * @param {string} topLevelType Record from `EventConstants`.
2165
+ * @param {object} nativeEvent Native browser event.
2166
+ * @return {?string} The string corresponding to this `beforeInput` event.
2167
+ */
2168
+ function getNativeBeforeInputChars(topLevelType, nativeEvent) {
2169
+ switch (topLevelType) {
2170
+ case topLevelTypes.topCompositionEnd:
2171
+ return getDataFromCustomEvent(nativeEvent);
2172
+ case topLevelTypes.topKeyPress:
2173
+ /**
2174
+ * If native `textInput` events are available, our goal is to make
2175
+ * use of them. However, there is a special case: the spacebar key.
2176
+ * In Webkit, preventing default on a spacebar `textInput` event
2177
+ * cancels character insertion, but it *also* causes the browser
2178
+ * to fall back to its default spacebar behavior of scrolling the
2179
+ * page.
2180
+ *
2181
+ * Tracking at:
2182
+ * https://code.google.com/p/chromium/issues/detail?id=355103
2183
+ *
2184
+ * To avoid this issue, use the keypress event as if no `textInput`
2185
+ * event is available.
2186
+ */
2187
+ var which = nativeEvent.which;
2188
+ if (which !== SPACEBAR_CODE) {
2189
+ return null;
2190
+ }
2191
+
2192
+ hasSpaceKeypress = true;
2193
+ return SPACEBAR_CHAR;
2194
+
2195
+ case topLevelTypes.topTextInput:
2196
+ // Record the characters to be added to the DOM.
2197
+ var chars = nativeEvent.data;
2198
+
2199
+ // If it's a spacebar character, assume that we have already handled
2200
+ // it at the keypress level and bail immediately. Android Chrome
2201
+ // doesn't give us keycodes, so we need to blacklist it.
2202
+ if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
2203
+ return null;
2204
+ }
2205
+
2206
+ return chars;
2207
+
2208
+ default:
2209
+ // For other native event types, do nothing.
2210
+ return null;
2211
+ }
2212
+ }
2213
+
2214
+ /**
2215
+ * For browsers that do not provide the `textInput` event, extract the
2216
+ * appropriate string to use for SyntheticInputEvent.
2217
+ *
2218
+ * @param {string} topLevelType Record from `EventConstants`.
2219
+ * @param {object} nativeEvent Native browser event.
2220
+ * @return {?string} The fallback string for this `beforeInput` event.
2221
+ */
2222
+ function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
2223
+ // If we are currently composing (IME) and using a fallback to do so,
2224
+ // try to extract the composed characters from the fallback object.
2225
+ if (currentComposition) {
2226
+ if (topLevelType === topLevelTypes.topCompositionEnd || isFallbackCompositionEnd(topLevelType, nativeEvent)) {
2227
+ var chars = currentComposition.getData();
2228
+ FallbackCompositionState.release(currentComposition);
2229
+ currentComposition = null;
2230
+ return chars;
2231
+ }
2232
+ return null;
2233
+ }
2234
+
2235
+ switch (topLevelType) {
2236
+ case topLevelTypes.topPaste:
2237
+ // If a paste event occurs after a keypress, throw out the input
2238
+ // chars. Paste events should not lead to BeforeInput events.
2239
+ return null;
2240
+ case topLevelTypes.topKeyPress:
2241
+ /**
2242
+ * As of v27, Firefox may fire keypress events even when no character
2243
+ * will be inserted. A few possibilities:
2244
+ *
2245
+ * - `which` is `0`. Arrow keys, Esc key, etc.
2246
+ *
2247
+ * - `which` is the pressed key code, but no char is available.
2248
+ * Ex: 'AltGr + d` in Polish. There is no modified character for
2249
+ * this key combination and no character is inserted into the
2250
+ * document, but FF fires the keypress for char code `100` anyway.
2251
+ * No `input` event will occur.
2252
+ *
2253
+ * - `which` is the pressed key code, but a command combination is
2254
+ * being used. Ex: `Cmd+C`. No character is inserted, and no
2255
+ * `input` event will occur.
2256
+ */
2257
+ if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
2258
+ return String.fromCharCode(nativeEvent.which);
2259
+ }
2260
+ return null;
2261
+ case topLevelTypes.topCompositionEnd:
2262
+ return useFallbackCompositionData ? null : nativeEvent.data;
2263
+ default:
2264
+ return null;
2265
+ }
2266
+ }
2267
+
2268
+ /**
2269
+ * Extract a SyntheticInputEvent for `beforeInput`, based on either native
2270
+ * `textInput` or fallback behavior.
2271
+ *
2272
+ * @param {string} topLevelType Record from `EventConstants`.
2273
+ * @param {DOMEventTarget} topLevelTarget The listening component root node.
2274
+ * @param {string} topLevelTargetID ID of `topLevelTarget`.
2275
+ * @param {object} nativeEvent Native browser event.
2276
+ * @return {?object} A SyntheticInputEvent.
2277
+ */
2278
+ function extractBeforeInputEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
2279
+ var chars;
2280
+
2281
+ if (canUseTextInputEvent) {
2282
+ chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
2283
+ } else {
2284
+ chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
2285
+ }
2286
+
2287
+ // If no characters are being inserted, no BeforeInput event should
2288
+ // be fired.
2289
+ if (!chars) {
2290
+ return null;
2291
+ }
2292
+
2293
+ var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, topLevelTargetID, nativeEvent, nativeEventTarget);
2294
+
2295
+ event.data = chars;
2296
+ EventPropagators.accumulateTwoPhaseDispatches(event);
2297
+ return event;
2298
+ }
2299
+
2300
+ /**
2301
+ * Create an `onBeforeInput` event to match
2302
+ * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
2303
+ *
2304
+ * This event plugin is based on the native `textInput` event
2305
+ * available in Chrome, Safari, Opera, and IE. This event fires after
2306
+ * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
2307
+ *
2308
+ * `beforeInput` is spec'd but not implemented in any browsers, and
2309
+ * the `input` event does not provide any useful information about what has
2310
+ * actually been added, contrary to the spec. Thus, `textInput` is the best
2311
+ * available event to identify the characters that have actually been inserted
2312
+ * into the target node.
2313
+ *
2314
+ * This plugin is also responsible for emitting `composition` events, thus
2315
+ * allowing us to share composition fallback code for both `beforeInput` and
2316
+ * `composition` event types.
2317
+ */
2318
+ var BeforeInputEventPlugin = {
2319
+
2320
+ eventTypes: eventTypes,
2321
+
2322
+ /**
2323
+ * @param {string} topLevelType Record from `EventConstants`.
2324
+ * @param {DOMEventTarget} topLevelTarget The listening component root node.
2325
+ * @param {string} topLevelTargetID ID of `topLevelTarget`.
2326
+ * @param {object} nativeEvent Native browser event.
2327
+ * @return {*} An accumulation of synthetic events.
2328
+ * @see {EventPluginHub.extractEvents}
2329
+ */
2330
+ extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
2331
+ return [extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget)];
2332
+ }
2333
+ };
2334
+
2335
+ module.exports = BeforeInputEventPlugin;
2336
+ },{"./EventConstants":44,"./EventPropagators":48,"./FallbackCompositionState":49,"./SyntheticCompositionEvent":120,"./SyntheticInputEvent":124,"fbjs/lib/ExecutionEnvironment":3,"fbjs/lib/keyOf":21}],33:[function(require,module,exports){
2337
+ /**
2338
+ * Copyright 2013-2015, Facebook, Inc.
2339
+ * All rights reserved.
2340
+ *
2341
+ * This source code is licensed under the BSD-style license found in the
2342
+ * LICENSE file in the root directory of this source tree. An additional grant
2343
+ * of patent rights can be found in the PATENTS file in the same directory.
2344
+ *
2345
+ * @providesModule CSSProperty
2346
+ */
2347
+
2348
+ 'use strict';
2349
+
2350
+ /**
2351
+ * CSS properties which accept numbers but are not in units of "px".
2352
+ */
2353
+ var isUnitlessNumber = {
2354
+ animationIterationCount: true,
2355
+ boxFlex: true,
2356
+ boxFlexGroup: true,
2357
+ boxOrdinalGroup: true,
2358
+ columnCount: true,
2359
+ flex: true,
2360
+ flexGrow: true,
2361
+ flexPositive: true,
2362
+ flexShrink: true,
2363
+ flexNegative: true,
2364
+ flexOrder: true,
2365
+ fontWeight: true,
2366
+ lineClamp: true,
2367
+ lineHeight: true,
2368
+ opacity: true,
2369
+ order: true,
2370
+ orphans: true,
2371
+ tabSize: true,
2372
+ widows: true,
2373
+ zIndex: true,
2374
+ zoom: true,
2375
+
2376
+ // SVG-related properties
2377
+ fillOpacity: true,
2378
+ stopOpacity: true,
2379
+ strokeDashoffset: true,
2380
+ strokeOpacity: true,
2381
+ strokeWidth: true
2382
+ };
2383
+
2384
+ /**
2385
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
2386
+ * @param {string} key style name, eg: transitionDuration
2387
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
2388
+ * WebkitTransitionDuration
2389
+ */
2390
+ function prefixKey(prefix, key) {
2391
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
2392
+ }
2393
+
2394
+ /**
2395
+ * Support style names that may come passed in prefixed by adding permutations
2396
+ * of vendor prefixes.
2397
+ */
2398
+ var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
2399
+
2400
+ // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
2401
+ // infinite loop, because it iterates over the newly added props too.
2402
+ Object.keys(isUnitlessNumber).forEach(function (prop) {
2403
+ prefixes.forEach(function (prefix) {
2404
+ isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
2405
+ });
2406
+ });
2407
+
2408
+ /**
2409
+ * Most style properties can be unset by doing .style[prop] = '' but IE8
2410
+ * doesn't like doing that with shorthand properties so for the properties that
2411
+ * IE8 breaks on, which are listed here, we instead unset each of the
2412
+ * individual properties. See http://bugs.jquery.com/ticket/12385.
2413
+ * The 4-value 'clock' properties like margin, padding, border-width seem to
2414
+ * behave without any problems. Curiously, list-style works too without any
2415
+ * special prodding.
2416
+ */
2417
+ var shorthandPropertyExpansions = {
2418
+ background: {
2419
+ backgroundAttachment: true,
2420
+ backgroundColor: true,
2421
+ backgroundImage: true,
2422
+ backgroundPositionX: true,
2423
+ backgroundPositionY: true,
2424
+ backgroundRepeat: true
2425
+ },
2426
+ backgroundPosition: {
2427
+ backgroundPositionX: true,
2428
+ backgroundPositionY: true
2429
+ },
2430
+ border: {
2431
+ borderWidth: true,
2432
+ borderStyle: true,
2433
+ borderColor: true
2434
+ },
2435
+ borderBottom: {
2436
+ borderBottomWidth: true,
2437
+ borderBottomStyle: true,
2438
+ borderBottomColor: true
2439
+ },
2440
+ borderLeft: {
2441
+ borderLeftWidth: true,
2442
+ borderLeftStyle: true,
2443
+ borderLeftColor: true
2444
+ },
2445
+ borderRight: {
2446
+ borderRightWidth: true,
2447
+ borderRightStyle: true,
2448
+ borderRightColor: true
2449
+ },
2450
+ borderTop: {
2451
+ borderTopWidth: true,
2452
+ borderTopStyle: true,
2453
+ borderTopColor: true
2454
+ },
2455
+ font: {
2456
+ fontStyle: true,
2457
+ fontVariant: true,
2458
+ fontWeight: true,
2459
+ fontSize: true,
2460
+ lineHeight: true,
2461
+ fontFamily: true
2462
+ },
2463
+ outline: {
2464
+ outlineWidth: true,
2465
+ outlineStyle: true,
2466
+ outlineColor: true
2467
+ }
2468
+ };
2469
+
2470
+ var CSSProperty = {
2471
+ isUnitlessNumber: isUnitlessNumber,
2472
+ shorthandPropertyExpansions: shorthandPropertyExpansions
2473
+ };
2474
+
2475
+ module.exports = CSSProperty;
2476
+ },{}],34:[function(require,module,exports){
2477
+ (function (process){
2478
+ /**
2479
+ * Copyright 2013-2015, Facebook, Inc.
2480
+ * All rights reserved.
2481
+ *
2482
+ * This source code is licensed under the BSD-style license found in the
2483
+ * LICENSE file in the root directory of this source tree. An additional grant
2484
+ * of patent rights can be found in the PATENTS file in the same directory.
2485
+ *
2486
+ * @providesModule CSSPropertyOperations
2487
+ * @typechecks static-only
2488
+ */
2489
+
2490
+ 'use strict';
2491
+
2492
+ var CSSProperty = require('./CSSProperty');
2493
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
2494
+ var ReactPerf = require('./ReactPerf');
2495
+
2496
+ var camelizeStyleName = require('fbjs/lib/camelizeStyleName');
2497
+ var dangerousStyleValue = require('./dangerousStyleValue');
2498
+ var hyphenateStyleName = require('fbjs/lib/hyphenateStyleName');
2499
+ var memoizeStringOnly = require('fbjs/lib/memoizeStringOnly');
2500
+ var warning = require('fbjs/lib/warning');
2501
+
2502
+ var processStyleName = memoizeStringOnly(function (styleName) {
2503
+ return hyphenateStyleName(styleName);
2504
+ });
2505
+
2506
+ var hasShorthandPropertyBug = false;
2507
+ var styleFloatAccessor = 'cssFloat';
2508
+ if (ExecutionEnvironment.canUseDOM) {
2509
+ var tempStyle = document.createElement('div').style;
2510
+ try {
2511
+ // IE8 throws "Invalid argument." if resetting shorthand style properties.
2512
+ tempStyle.font = '';
2513
+ } catch (e) {
2514
+ hasShorthandPropertyBug = true;
2515
+ }
2516
+ // IE8 only supports accessing cssFloat (standard) as styleFloat
2517
+ if (document.documentElement.style.cssFloat === undefined) {
2518
+ styleFloatAccessor = 'styleFloat';
2519
+ }
2520
+ }
2521
+
2522
+ if (process.env.NODE_ENV !== 'production') {
2523
+ // 'msTransform' is correct, but the other prefixes should be capitalized
2524
+ var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
2525
+
2526
+ // style values shouldn't contain a semicolon
2527
+ var badStyleValueWithSemicolonPattern = /;\s*$/;
2528
+
2529
+ var warnedStyleNames = {};
2530
+ var warnedStyleValues = {};
2531
+
2532
+ var warnHyphenatedStyleName = function (name) {
2533
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
2534
+ return;
2535
+ }
2536
+
2537
+ warnedStyleNames[name] = true;
2538
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?', name, camelizeStyleName(name)) : undefined;
2539
+ };
2540
+
2541
+ var warnBadVendoredStyleName = function (name) {
2542
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
2543
+ return;
2544
+ }
2545
+
2546
+ warnedStyleNames[name] = true;
2547
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)) : undefined;
2548
+ };
2549
+
2550
+ var warnStyleValueWithSemicolon = function (name, value) {
2551
+ if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
2552
+ return;
2553
+ }
2554
+
2555
+ warnedStyleValues[value] = true;
2556
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon. ' + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')) : undefined;
2557
+ };
2558
+
2559
+ /**
2560
+ * @param {string} name
2561
+ * @param {*} value
2562
+ */
2563
+ var warnValidStyle = function (name, value) {
2564
+ if (name.indexOf('-') > -1) {
2565
+ warnHyphenatedStyleName(name);
2566
+ } else if (badVendoredStyleNamePattern.test(name)) {
2567
+ warnBadVendoredStyleName(name);
2568
+ } else if (badStyleValueWithSemicolonPattern.test(value)) {
2569
+ warnStyleValueWithSemicolon(name, value);
2570
+ }
2571
+ };
2572
+ }
2573
+
2574
+ /**
2575
+ * Operations for dealing with CSS properties.
2576
+ */
2577
+ var CSSPropertyOperations = {
2578
+
2579
+ /**
2580
+ * Serializes a mapping of style properties for use as inline styles:
2581
+ *
2582
+ * > createMarkupForStyles({width: '200px', height: 0})
2583
+ * "width:200px;height:0;"
2584
+ *
2585
+ * Undefined values are ignored so that declarative programming is easier.
2586
+ * The result should be HTML-escaped before insertion into the DOM.
2587
+ *
2588
+ * @param {object} styles
2589
+ * @return {?string}
2590
+ */
2591
+ createMarkupForStyles: function (styles) {
2592
+ var serialized = '';
2593
+ for (var styleName in styles) {
2594
+ if (!styles.hasOwnProperty(styleName)) {
2595
+ continue;
2596
+ }
2597
+ var styleValue = styles[styleName];
2598
+ if (process.env.NODE_ENV !== 'production') {
2599
+ warnValidStyle(styleName, styleValue);
2600
+ }
2601
+ if (styleValue != null) {
2602
+ serialized += processStyleName(styleName) + ':';
2603
+ serialized += dangerousStyleValue(styleName, styleValue) + ';';
2604
+ }
2605
+ }
2606
+ return serialized || null;
2607
+ },
2608
+
2609
+ /**
2610
+ * Sets the value for multiple styles on a node. If a value is specified as
2611
+ * '' (empty string), the corresponding style property will be unset.
2612
+ *
2613
+ * @param {DOMElement} node
2614
+ * @param {object} styles
2615
+ */
2616
+ setValueForStyles: function (node, styles) {
2617
+ var style = node.style;
2618
+ for (var styleName in styles) {
2619
+ if (!styles.hasOwnProperty(styleName)) {
2620
+ continue;
2621
+ }
2622
+ if (process.env.NODE_ENV !== 'production') {
2623
+ warnValidStyle(styleName, styles[styleName]);
2624
+ }
2625
+ var styleValue = dangerousStyleValue(styleName, styles[styleName]);
2626
+ if (styleName === 'float') {
2627
+ styleName = styleFloatAccessor;
2628
+ }
2629
+ if (styleValue) {
2630
+ style[styleName] = styleValue;
2631
+ } else {
2632
+ var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
2633
+ if (expansion) {
2634
+ // Shorthand property that IE8 won't like unsetting, so unset each
2635
+ // component to placate it
2636
+ for (var individualStyleName in expansion) {
2637
+ style[individualStyleName] = '';
2638
+ }
2639
+ } else {
2640
+ style[styleName] = '';
2641
+ }
2642
+ }
2643
+ }
2644
+ }
2645
+
2646
+ };
2647
+
2648
+ ReactPerf.measureMethods(CSSPropertyOperations, 'CSSPropertyOperations', {
2649
+ setValueForStyles: 'setValueForStyles'
2650
+ });
2651
+
2652
+ module.exports = CSSPropertyOperations;
2653
+ }).call(this,require('_process'))
2654
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvQ1NTUHJvcGVydHlPcGVyYXRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO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Vbc3R5bGVOYW1lXSA9ICcnO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG5cbn07XG5cblJlYWN0UGVyZi5tZWFzdXJlTWV0aG9kcyhDU1NQcm9wZXJ0eU9wZXJhdGlvbnMsICdDU1NQcm9wZXJ0eU9wZXJhdGlvbnMnLCB7XG4gIHNldFZhbHVlRm9yU3R5bGVzOiAnc2V0VmFsdWVGb3JTdHlsZXMnXG59KTtcblxubW9kdWxlLmV4cG9ydHMgPSBDU1NQcm9wZXJ0eU9wZXJhdGlvbnM7Il19
2655
+ },{"./CSSProperty":33,"./ReactPerf":101,"./dangerousStyleValue":135,"_process":29,"fbjs/lib/ExecutionEnvironment":3,"fbjs/lib/camelizeStyleName":5,"fbjs/lib/hyphenateStyleName":16,"fbjs/lib/memoizeStringOnly":23,"fbjs/lib/warning":28}],35:[function(require,module,exports){
2656
+ (function (process){
2657
+ /**
2658
+ * Copyright 2013-2015, Facebook, Inc.
2659
+ * All rights reserved.
2660
+ *
2661
+ * This source code is licensed under the BSD-style license found in the
2662
+ * LICENSE file in the root directory of this source tree. An additional grant
2663
+ * of patent rights can be found in the PATENTS file in the same directory.
2664
+ *
2665
+ * @providesModule CallbackQueue
2666
+ */
2667
+
2668
+ 'use strict';
2669
+
2670
+ var PooledClass = require('./PooledClass');
2671
+
2672
+ var assign = require('./Object.assign');
2673
+ var invariant = require('fbjs/lib/invariant');
2674
+
2675
+ /**
2676
+ * A specialized pseudo-event module to help keep track of components waiting to
2677
+ * be notified when their DOM representations are available for use.
2678
+ *
2679
+ * This implements `PooledClass`, so you should never need to instantiate this.
2680
+ * Instead, use `CallbackQueue.getPooled()`.
2681
+ *
2682
+ * @class ReactMountReady
2683
+ * @implements PooledClass
2684
+ * @internal
2685
+ */
2686
+ function CallbackQueue() {
2687
+ this._callbacks = null;
2688
+ this._contexts = null;
2689
+ }
2690
+
2691
+ assign(CallbackQueue.prototype, {
2692
+
2693
+ /**
2694
+ * Enqueues a callback to be invoked when `notifyAll` is invoked.
2695
+ *
2696
+ * @param {function} callback Invoked when `notifyAll` is invoked.
2697
+ * @param {?object} context Context to call `callback` with.
2698
+ * @internal
2699
+ */
2700
+ enqueue: function (callback, context) {
2701
+ this._callbacks = this._callbacks || [];
2702
+ this._contexts = this._contexts || [];
2703
+ this._callbacks.push(callback);
2704
+ this._contexts.push(context);
2705
+ },
2706
+
2707
+ /**
2708
+ * Invokes all enqueued callbacks and clears the queue. This is invoked after
2709
+ * the DOM representation of a component has been created or updated.
2710
+ *
2711
+ * @internal
2712
+ */
2713
+ notifyAll: function () {
2714
+ var callbacks = this._callbacks;
2715
+ var contexts = this._contexts;
2716
+ if (callbacks) {
2717
+ !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : invariant(false) : undefined;
2718
+ this._callbacks = null;
2719
+ this._contexts = null;
2720
+ for (var i = 0; i < callbacks.length; i++) {
2721
+ callbacks[i].call(contexts[i]);
2722
+ }
2723
+ callbacks.length = 0;
2724
+ contexts.length = 0;
2725
+ }
2726
+ },
2727
+
2728
+ /**
2729
+ * Resets the internal queue.
2730
+ *
2731
+ * @internal
2732
+ */
2733
+ reset: function () {
2734
+ this._callbacks = null;
2735
+ this._contexts = null;
2736
+ },
2737
+
2738
+ /**
2739
+ * `PooledClass` looks for this.
2740
+ */
2741
+ destructor: function () {
2742
+ this.reset();
2743
+ }
2744
+
2745
+ });
2746
+
2747
+ PooledClass.addPoolingTo(CallbackQueue);
2748
+
2749
+ module.exports = CallbackQueue;
2750
+ }).call(this,require('_process'))
2751
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvQ2FsbGJhY2tRdWV1ZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QU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HF1ZXVlJykgOiBpbnZhcmlhbnQoZmFsc2UpIDogdW5kZWZpbmVkO1xuICAgICAgdGhpcy5fY2FsbGJhY2tzID0gbnVsbDtcbiAgICAgIHRoaXMuX2NvbnRleHRzID0gbnVsbDtcbiAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgY2FsbGJhY2tzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIGNhbGxiYWNrc1tpXS5jYWxsKGNvbnRleHRzW2ldKTtcbiAgICAgIH1cbiAgICAgIGNhbGxiYWNrcy5sZW5ndGggPSAwO1xuICAgICAgY29udGV4dHMubGVuZ3RoID0gMDtcbiAgICB9XG4gIH0sXG5cbiAgLyoqXG4gICAqIFJlc2V0cyB0aGUgaW50ZXJuYWwgcXVldWUuXG4gICAqXG4gICAqIEBpbnRlcm5hbFxuICAgKi9cbiAgcmVzZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICB0aGlzLl9jYWxsYmFja3MgPSBudWxsO1xuICAgIHRoaXMuX2NvbnRleHRzID0gbnVsbDtcbiAgfSxcblxuICAvKipcbiAgICogYFBvb2xlZENsYXNzYCBsb29rcyBmb3IgdGhpcy5cbiAgICovXG4gIGRlc3RydWN0b3I6IGZ1bmN0aW9uICgpIHtcbiAgICB0aGlzLnJlc2V0KCk7XG4gIH1cblxufSk7XG5cblBvb2xlZENsYXNzLmFkZFBvb2xpbmdUbyhDYWxsYmFja1F1ZXVlKTtcblxubW9kdWxlLmV4cG9ydHMgPSBDYWxsYmFja1F1ZXVlOyJdfQ==
2752
+ },{"./Object.assign":52,"./PooledClass":53,"_process":29,"fbjs/lib/invariant":17}],36:[function(require,module,exports){
2753
+ /**
2754
+ * Copyright 2013-2015, Facebook, Inc.
2755
+ * All rights reserved.
2756
+ *
2757
+ * This source code is licensed under the BSD-style license found in the
2758
+ * LICENSE file in the root directory of this source tree. An additional grant
2759
+ * of patent rights can be found in the PATENTS file in the same directory.
2760
+ *
2761
+ * @providesModule ChangeEventPlugin
2762
+ */
2763
+
2764
+ 'use strict';
2765
+
2766
+ var EventConstants = require('./EventConstants');
2767
+ var EventPluginHub = require('./EventPluginHub');
2768
+ var EventPropagators = require('./EventPropagators');
2769
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
2770
+ var ReactUpdates = require('./ReactUpdates');
2771
+ var SyntheticEvent = require('./SyntheticEvent');
2772
+
2773
+ var getEventTarget = require('./getEventTarget');
2774
+ var isEventSupported = require('./isEventSupported');
2775
+ var isTextInputElement = require('./isTextInputElement');
2776
+ var keyOf = require('fbjs/lib/keyOf');
2777
+
2778
+ var topLevelTypes = EventConstants.topLevelTypes;
2779
+
2780
+ var eventTypes = {
2781
+ change: {
2782
+ phasedRegistrationNames: {
2783
+ bubbled: keyOf({ onChange: null }),
2784
+ captured: keyOf({ onChangeCapture: null })
2785
+ },
2786
+ dependencies: [topLevelTypes.topBlur, topLevelTypes.topChange, topLevelTypes.topClick, topLevelTypes.topFocus, topLevelTypes.topInput, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topSelectionChange]
2787
+ }
2788
+ };
2789
+
2790
+ /**
2791
+ * For IE shims
2792
+ */
2793
+ var activeElement = null;
2794
+ var activeElementID = null;
2795
+ var activeElementValue = null;
2796
+ var activeElementValueProp = null;
2797
+
2798
+ /**
2799
+ * SECTION: handle `change` event
2800
+ */
2801
+ function shouldUseChangeEvent(elem) {
2802
+ var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
2803
+ return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
2804
+ }
2805
+
2806
+ var doesChangeEventBubble = false;
2807
+ if (ExecutionEnvironment.canUseDOM) {
2808
+ // See `handleChange` comment below
2809
+ doesChangeEventBubble = isEventSupported('change') && (!('documentMode' in document) || document.documentMode > 8);
2810
+ }
2811
+
2812
+ function manualDispatchChangeEvent(nativeEvent) {
2813
+ var event = SyntheticEvent.getPooled(eventTypes.change, activeElementID, nativeEvent, getEventTarget(nativeEvent));
2814
+ EventPropagators.accumulateTwoPhaseDispatches(event);
2815
+
2816
+ // If change and propertychange bubbled, we'd just bind to it like all the
2817
+ // other events and have it go through ReactBrowserEventEmitter. Since it
2818
+ // doesn't, we manually listen for the events and so we have to enqueue and
2819
+ // process the abstract event manually.
2820
+ //
2821
+ // Batching is necessary here in order to ensure that all event handlers run
2822
+ // before the next rerender (including event handlers attached to ancestor
2823
+ // elements instead of directly on the input). Without this, controlled
2824
+ // components don't work properly in conjunction with event bubbling because
2825
+ // the component is rerendered and the value reverted before all the event
2826
+ // handlers can run. See https://github.com/facebook/react/issues/708.
2827
+ ReactUpdates.batchedUpdates(runEventInBatch, event);
2828
+ }
2829
+
2830
+ function runEventInBatch(event) {
2831
+ EventPluginHub.enqueueEvents(event);
2832
+ EventPluginHub.processEventQueue(false);
2833
+ }
2834
+
2835
+ function startWatchingForChangeEventIE8(target, targetID) {
2836
+ activeElement = target;
2837
+ activeElementID = targetID;
2838
+ activeElement.attachEvent('onchange', manualDispatchChangeEvent);
2839
+ }
2840
+
2841
+ function stopWatchingForChangeEventIE8() {
2842
+ if (!activeElement) {
2843
+ return;
2844
+ }
2845
+ activeElement.detachEvent('onchange', manualDispatchChangeEvent);
2846
+ activeElement = null;
2847
+ activeElementID = null;
2848
+ }
2849
+
2850
+ function getTargetIDForChangeEvent(topLevelType, topLevelTarget, topLevelTargetID) {
2851
+ if (topLevelType === topLevelTypes.topChange) {
2852
+ return topLevelTargetID;
2853
+ }
2854
+ }
2855
+ function handleEventsForChangeEventIE8(topLevelType, topLevelTarget, topLevelTargetID) {
2856
+ if (topLevelType === topLevelTypes.topFocus) {
2857
+ // stopWatching() should be a noop here but we call it just in case we
2858
+ // missed a blur event somehow.
2859
+ stopWatchingForChangeEventIE8();
2860
+ startWatchingForChangeEventIE8(topLevelTarget, topLevelTargetID);
2861
+ } else if (topLevelType === topLevelTypes.topBlur) {
2862
+ stopWatchingForChangeEventIE8();
2863
+ }
2864
+ }
2865
+
2866
+ /**
2867
+ * SECTION: handle `input` event
2868
+ */
2869
+ var isInputEventSupported = false;
2870
+ if (ExecutionEnvironment.canUseDOM) {
2871
+ // IE9 claims to support the input event but fails to trigger it when
2872
+ // deleting text, so we ignore its input events
2873
+ isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9);
2874
+ }
2875
+
2876
+ /**
2877
+ * (For old IE.) Replacement getter/setter for the `value` property that gets
2878
+ * set on the active element.
2879
+ */
2880
+ var newValueProp = {
2881
+ get: function () {
2882
+ return activeElementValueProp.get.call(this);
2883
+ },
2884
+ set: function (val) {
2885
+ // Cast to a string so we can do equality checks.
2886
+ activeElementValue = '' + val;
2887
+ activeElementValueProp.set.call(this, val);
2888
+ }
2889
+ };
2890
+
2891
+ /**
2892
+ * (For old IE.) Starts tracking propertychange events on the passed-in element
2893
+ * and override the value property so that we can distinguish user events from
2894
+ * value changes in JS.
2895
+ */
2896
+ function startWatchingForValueChange(target, targetID) {
2897
+ activeElement = target;
2898
+ activeElementID = targetID;
2899
+ activeElementValue = target.value;
2900
+ activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');
2901
+
2902
+ // Not guarded in a canDefineProperty check: IE8 supports defineProperty only
2903
+ // on DOM elements
2904
+ Object.defineProperty(activeElement, 'value', newValueProp);
2905
+ activeElement.attachEvent('onpropertychange', handlePropertyChange);
2906
+ }
2907
+
2908
+ /**
2909
+ * (For old IE.) Removes the event listeners from the currently-tracked element,
2910
+ * if any exists.
2911
+ */
2912
+ function stopWatchingForValueChange() {
2913
+ if (!activeElement) {
2914
+ return;
2915
+ }
2916
+
2917
+ // delete restores the original property definition
2918
+ delete activeElement.value;
2919
+ activeElement.detachEvent('onpropertychange', handlePropertyChange);
2920
+
2921
+ activeElement = null;
2922
+ activeElementID = null;
2923
+ activeElementValue = null;
2924
+ activeElementValueProp = null;
2925
+ }
2926
+
2927
+ /**
2928
+ * (For old IE.) Handles a propertychange event, sending a `change` event if
2929
+ * the value of the active element has changed.
2930
+ */
2931
+ function handlePropertyChange(nativeEvent) {
2932
+ if (nativeEvent.propertyName !== 'value') {
2933
+ return;
2934
+ }
2935
+ var value = nativeEvent.srcElement.value;
2936
+ if (value === activeElementValue) {
2937
+ return;
2938
+ }
2939
+ activeElementValue = value;
2940
+
2941
+ manualDispatchChangeEvent(nativeEvent);
2942
+ }
2943
+
2944
+ /**
2945
+ * If a `change` event should be fired, returns the target's ID.
2946
+ */
2947
+ function getTargetIDForInputEvent(topLevelType, topLevelTarget, topLevelTargetID) {
2948
+ if (topLevelType === topLevelTypes.topInput) {
2949
+ // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
2950
+ // what we want so fall through here and trigger an abstract event
2951
+ return topLevelTargetID;
2952
+ }
2953
+ }
2954
+
2955
+ // For IE8 and IE9.
2956
+ function handleEventsForInputEventIE(topLevelType, topLevelTarget, topLevelTargetID) {
2957
+ if (topLevelType === topLevelTypes.topFocus) {
2958
+ // In IE8, we can capture almost all .value changes by adding a
2959
+ // propertychange handler and looking for events with propertyName
2960
+ // equal to 'value'
2961
+ // In IE9, propertychange fires for most input events but is buggy and
2962
+ // doesn't fire when text is deleted, but conveniently, selectionchange
2963
+ // appears to fire in all of the remaining cases so we catch those and
2964
+ // forward the event if the value has changed
2965
+ // In either case, we don't want to call the event handler if the value
2966
+ // is changed from JS so we redefine a setter for `.value` that updates
2967
+ // our activeElementValue variable, allowing us to ignore those changes
2968
+ //
2969
+ // stopWatching() should be a noop here but we call it just in case we
2970
+ // missed a blur event somehow.
2971
+ stopWatchingForValueChange();
2972
+ startWatchingForValueChange(topLevelTarget, topLevelTargetID);
2973
+ } else if (topLevelType === topLevelTypes.topBlur) {
2974
+ stopWatchingForValueChange();
2975
+ }
2976
+ }
2977
+
2978
+ // For IE8 and IE9.
2979
+ function getTargetIDForInputEventIE(topLevelType, topLevelTarget, topLevelTargetID) {
2980
+ if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) {
2981
+ // On the selectionchange event, the target is just document which isn't
2982
+ // helpful for us so just check activeElement instead.
2983
+ //
2984
+ // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
2985
+ // propertychange on the first input event after setting `value` from a
2986
+ // script and fires only keydown, keypress, keyup. Catching keyup usually
2987
+ // gets it and catching keydown lets us fire an event for the first
2988
+ // keystroke if user does a key repeat (it'll be a little delayed: right
2989
+ // before the second keystroke). Other input methods (e.g., paste) seem to
2990
+ // fire selectionchange normally.
2991
+ if (activeElement && activeElement.value !== activeElementValue) {
2992
+ activeElementValue = activeElement.value;
2993
+ return activeElementID;
2994
+ }
2995
+ }
2996
+ }
2997
+
2998
+ /**
2999
+ * SECTION: handle `click` event
3000
+ */
3001
+ function shouldUseClickEvent(elem) {
3002
+ // Use the `click` event to detect changes to checkbox and radio inputs.
3003
+ // This approach works across all browsers, whereas `change` does not fire
3004
+ // until `blur` in IE8.
3005
+ return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
3006
+ }
3007
+
3008
+ function getTargetIDForClickEvent(topLevelType, topLevelTarget, topLevelTargetID) {
3009
+ if (topLevelType === topLevelTypes.topClick) {
3010
+ return topLevelTargetID;
3011
+ }
3012
+ }
3013
+
3014
+ /**
3015
+ * This plugin creates an `onChange` event that normalizes change events
3016
+ * across form elements. This event fires at a time when it's possible to
3017
+ * change the element's value without seeing a flicker.
3018
+ *
3019
+ * Supported elements are:
3020
+ * - input (see `isTextInputElement`)
3021
+ * - textarea
3022
+ * - select
3023
+ */
3024
+ var ChangeEventPlugin = {
3025
+
3026
+ eventTypes: eventTypes,
3027
+
3028
+ /**
3029
+ * @param {string} topLevelType Record from `EventConstants`.
3030
+ * @param {DOMEventTarget} topLevelTarget The listening component root node.
3031
+ * @param {string} topLevelTargetID ID of `topLevelTarget`.
3032
+ * @param {object} nativeEvent Native browser event.
3033
+ * @return {*} An accumulation of synthetic events.
3034
+ * @see {EventPluginHub.extractEvents}
3035
+ */
3036
+ extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
3037
+
3038
+ var getTargetIDFunc, handleEventFunc;
3039
+ if (shouldUseChangeEvent(topLevelTarget)) {
3040
+ if (doesChangeEventBubble) {
3041
+ getTargetIDFunc = getTargetIDForChangeEvent;
3042
+ } else {
3043
+ handleEventFunc = handleEventsForChangeEventIE8;
3044
+ }
3045
+ } else if (isTextInputElement(topLevelTarget)) {
3046
+ if (isInputEventSupported) {
3047
+ getTargetIDFunc = getTargetIDForInputEvent;
3048
+ } else {
3049
+ getTargetIDFunc = getTargetIDForInputEventIE;
3050
+ handleEventFunc = handleEventsForInputEventIE;
3051
+ }
3052
+ } else if (shouldUseClickEvent(topLevelTarget)) {
3053
+ getTargetIDFunc = getTargetIDForClickEvent;
3054
+ }
3055
+
3056
+ if (getTargetIDFunc) {
3057
+ var targetID = getTargetIDFunc(topLevelType, topLevelTarget, topLevelTargetID);
3058
+ if (targetID) {
3059
+ var event = SyntheticEvent.getPooled(eventTypes.change, targetID, nativeEvent, nativeEventTarget);
3060
+ event.type = 'change';
3061
+ EventPropagators.accumulateTwoPhaseDispatches(event);
3062
+ return event;
3063
+ }
3064
+ }
3065
+
3066
+ if (handleEventFunc) {
3067
+ handleEventFunc(topLevelType, topLevelTarget, topLevelTargetID);
3068
+ }
3069
+ }
3070
+
3071
+ };
3072
+
3073
+ module.exports = ChangeEventPlugin;
3074
+ },{"./EventConstants":44,"./EventPluginHub":45,"./EventPropagators":48,"./ReactUpdates":113,"./SyntheticEvent":122,"./getEventTarget":144,"./isEventSupported":149,"./isTextInputElement":150,"fbjs/lib/ExecutionEnvironment":3,"fbjs/lib/keyOf":21}],37:[function(require,module,exports){
3075
+ /**
3076
+ * Copyright 2013-2015, Facebook, Inc.
3077
+ * All rights reserved.
3078
+ *
3079
+ * This source code is licensed under the BSD-style license found in the
3080
+ * LICENSE file in the root directory of this source tree. An additional grant
3081
+ * of patent rights can be found in the PATENTS file in the same directory.
3082
+ *
3083
+ * @providesModule ClientReactRootIndex
3084
+ * @typechecks
3085
+ */
3086
+
3087
+ 'use strict';
3088
+
3089
+ var nextReactRootIndex = 0;
3090
+
3091
+ var ClientReactRootIndex = {
3092
+ createReactRootIndex: function () {
3093
+ return nextReactRootIndex++;
3094
+ }
3095
+ };
3096
+
3097
+ module.exports = ClientReactRootIndex;
3098
+ },{}],38:[function(require,module,exports){
3099
+ (function (process){
3100
+ /**
3101
+ * Copyright 2013-2015, Facebook, Inc.
3102
+ * All rights reserved.
3103
+ *
3104
+ * This source code is licensed under the BSD-style license found in the
3105
+ * LICENSE file in the root directory of this source tree. An additional grant
3106
+ * of patent rights can be found in the PATENTS file in the same directory.
3107
+ *
3108
+ * @providesModule DOMChildrenOperations
3109
+ * @typechecks static-only
3110
+ */
3111
+
3112
+ 'use strict';
3113
+
3114
+ var Danger = require('./Danger');
3115
+ var ReactMultiChildUpdateTypes = require('./ReactMultiChildUpdateTypes');
3116
+ var ReactPerf = require('./ReactPerf');
3117
+
3118
+ var setInnerHTML = require('./setInnerHTML');
3119
+ var setTextContent = require('./setTextContent');
3120
+ var invariant = require('fbjs/lib/invariant');
3121
+
3122
+ /**
3123
+ * Inserts `childNode` as a child of `parentNode` at the `index`.
3124
+ *
3125
+ * @param {DOMElement} parentNode Parent node in which to insert.
3126
+ * @param {DOMElement} childNode Child node to insert.
3127
+ * @param {number} index Index at which to insert the child.
3128
+ * @internal
3129
+ */
3130
+ function insertChildAt(parentNode, childNode, index) {
3131
+ // By exploiting arrays returning `undefined` for an undefined index, we can
3132
+ // rely exclusively on `insertBefore(node, null)` instead of also using
3133
+ // `appendChild(node)`. However, using `undefined` is not allowed by all
3134
+ // browsers so we must replace it with `null`.
3135
+
3136
+ // fix render order error in safari
3137
+ // IE8 will throw error when index out of list size.
3138
+ var beforeChild = index >= parentNode.childNodes.length ? null : parentNode.childNodes.item(index);
3139
+
3140
+ parentNode.insertBefore(childNode, beforeChild);
3141
+ }
3142
+
3143
+ /**
3144
+ * Operations for updating with DOM children.
3145
+ */
3146
+ var DOMChildrenOperations = {
3147
+
3148
+ dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup,
3149
+
3150
+ updateTextContent: setTextContent,
3151
+
3152
+ /**
3153
+ * Updates a component's children by processing a series of updates. The
3154
+ * update configurations are each expected to have a `parentNode` property.
3155
+ *
3156
+ * @param {array<object>} updates List of update configurations.
3157
+ * @param {array<string>} markupList List of markup strings.
3158
+ * @internal
3159
+ */
3160
+ processUpdates: function (updates, markupList) {
3161
+ var update;
3162
+ // Mapping from parent IDs to initial child orderings.
3163
+ var initialChildren = null;
3164
+ // List of children that will be moved or removed.
3165
+ var updatedChildren = null;
3166
+
3167
+ for (var i = 0; i < updates.length; i++) {
3168
+ update = updates[i];
3169
+ if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) {
3170
+ var updatedIndex = update.fromIndex;
3171
+ var updatedChild = update.parentNode.childNodes[updatedIndex];
3172
+ var parentID = update.parentID;
3173
+
3174
+ !updatedChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processUpdates(): Unable to find child %s of element. This ' + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + 'browser), usually due to forgetting a <tbody> when using tables, ' + 'nesting tags like <form>, <p>, or <a>, or using non-SVG elements ' + 'in an <svg> parent. Try inspecting the child nodes of the element ' + 'with React ID `%s`.', updatedIndex, parentID) : invariant(false) : undefined;
3175
+
3176
+ initialChildren = initialChildren || {};
3177
+ initialChildren[parentID] = initialChildren[parentID] || [];
3178
+ initialChildren[parentID][updatedIndex] = updatedChild;
3179
+
3180
+ updatedChildren = updatedChildren || [];
3181
+ updatedChildren.push(updatedChild);
3182
+ }
3183
+ }
3184
+
3185
+ var renderedMarkup;
3186
+ // markupList is either a list of markup or just a list of elements
3187
+ if (markupList.length && typeof markupList[0] === 'string') {
3188
+ renderedMarkup = Danger.dangerouslyRenderMarkup(markupList);
3189
+ } else {
3190
+ renderedMarkup = markupList;
3191
+ }
3192
+
3193
+ // Remove updated children first so that `toIndex` is consistent.
3194
+ if (updatedChildren) {
3195
+ for (var j = 0; j < updatedChildren.length; j++) {
3196
+ updatedChildren[j].parentNode.removeChild(updatedChildren[j]);
3197
+ }
3198
+ }
3199
+
3200
+ for (var k = 0; k < updates.length; k++) {
3201
+ update = updates[k];
3202
+ switch (update.type) {
3203
+ case ReactMultiChildUpdateTypes.INSERT_MARKUP:
3204
+ insertChildAt(update.parentNode, renderedMarkup[update.markupIndex], update.toIndex);
3205
+ break;
3206
+ case ReactMultiChildUpdateTypes.MOVE_EXISTING:
3207
+ insertChildAt(update.parentNode, initialChildren[update.parentID][update.fromIndex], update.toIndex);
3208
+ break;
3209
+ case ReactMultiChildUpdateTypes.SET_MARKUP:
3210
+ setInnerHTML(update.parentNode, update.content);
3211
+ break;
3212
+ case ReactMultiChildUpdateTypes.TEXT_CONTENT:
3213
+ setTextContent(update.parentNode, update.content);
3214
+ break;
3215
+ case ReactMultiChildUpdateTypes.REMOVE_NODE:
3216
+ // Already removed by the for-loop above.
3217
+ break;
3218
+ }
3219
+ }
3220
+ }
3221
+
3222
+ };
3223
+
3224
+ ReactPerf.measureMethods(DOMChildrenOperations, 'DOMChildrenOperations', {
3225
+ updateTextContent: 'updateTextContent'
3226
+ });
3227
+
3228
+ module.exports = DOMChildrenOperations;
3229
+ }).call(this,require('_process'))
3230
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvRE9NQ2hpbGRyZW5PcGVyYXRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0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YXRpb25zLCAnRE9NQ2hpbGRyZW5PcGVyYXRpb25zJywge1xuICB1cGRhdGVUZXh0Q29udGVudDogJ3VwZGF0ZVRleHRDb250ZW50J1xufSk7XG5cbm1vZHVsZS5leHBvcnRzID0gRE9NQ2hpbGRyZW5PcGVyYXRpb25zOyJdfQ==
3231
+ },{"./Danger":41,"./ReactMultiChildUpdateTypes":97,"./ReactPerf":101,"./setInnerHTML":154,"./setTextContent":155,"_process":29,"fbjs/lib/invariant":17}],39:[function(require,module,exports){
3232
+ (function (process){
3233
+ /**
3234
+ * Copyright 2013-2015, Facebook, Inc.
3235
+ * All rights reserved.
3236
+ *
3237
+ * This source code is licensed under the BSD-style license found in the
3238
+ * LICENSE file in the root directory of this source tree. An additional grant
3239
+ * of patent rights can be found in the PATENTS file in the same directory.
3240
+ *
3241
+ * @providesModule DOMProperty
3242
+ * @typechecks static-only
3243
+ */
3244
+
3245
+ 'use strict';
3246
+
3247
+ var invariant = require('fbjs/lib/invariant');
3248
+
3249
+ function checkMask(value, bitmask) {
3250
+ return (value & bitmask) === bitmask;
3251
+ }
3252
+
3253
+ var DOMPropertyInjection = {
3254
+ /**
3255
+ * Mapping from normalized, camelcased property names to a configuration that
3256
+ * specifies how the associated DOM property should be accessed or rendered.
3257
+ */
3258
+ MUST_USE_ATTRIBUTE: 0x1,
3259
+ MUST_USE_PROPERTY: 0x2,
3260
+ HAS_SIDE_EFFECTS: 0x4,
3261
+ HAS_BOOLEAN_VALUE: 0x8,
3262
+ HAS_NUMERIC_VALUE: 0x10,
3263
+ HAS_POSITIVE_NUMERIC_VALUE: 0x20 | 0x10,
3264
+ HAS_OVERLOADED_BOOLEAN_VALUE: 0x40,
3265
+
3266
+ /**
3267
+ * Inject some specialized knowledge about the DOM. This takes a config object
3268
+ * with the following properties:
3269
+ *
3270
+ * isCustomAttribute: function that given an attribute name will return true
3271
+ * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
3272
+ * attributes where it's impossible to enumerate all of the possible
3273
+ * attribute names,
3274
+ *
3275
+ * Properties: object mapping DOM property name to one of the
3276
+ * DOMPropertyInjection constants or null. If your attribute isn't in here,
3277
+ * it won't get written to the DOM.
3278
+ *
3279
+ * DOMAttributeNames: object mapping React attribute name to the DOM
3280
+ * attribute name. Attribute names not specified use the **lowercase**
3281
+ * normalized name.
3282
+ *
3283
+ * DOMAttributeNamespaces: object mapping React attribute name to the DOM
3284
+ * attribute namespace URL. (Attribute names not specified use no namespace.)
3285
+ *
3286
+ * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
3287
+ * Property names not specified use the normalized name.
3288
+ *
3289
+ * DOMMutationMethods: Properties that require special mutation methods. If
3290
+ * `value` is undefined, the mutation method should unset the property.
3291
+ *
3292
+ * @param {object} domPropertyConfig the config as described above.
3293
+ */
3294
+ injectDOMPropertyConfig: function (domPropertyConfig) {
3295
+ var Injection = DOMPropertyInjection;
3296
+ var Properties = domPropertyConfig.Properties || {};
3297
+ var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
3298
+ var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
3299
+ var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
3300
+ var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
3301
+
3302
+ if (domPropertyConfig.isCustomAttribute) {
3303
+ DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
3304
+ }
3305
+
3306
+ for (var propName in Properties) {
3307
+ !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + '\'%s\' which has already been injected. You may be accidentally ' + 'injecting the same DOM property config twice, or you may be ' + 'injecting two configs that have conflicting property names.', propName) : invariant(false) : undefined;
3308
+
3309
+ var lowerCased = propName.toLowerCase();
3310
+ var propConfig = Properties[propName];
3311
+
3312
+ var propertyInfo = {
3313
+ attributeName: lowerCased,
3314
+ attributeNamespace: null,
3315
+ propertyName: propName,
3316
+ mutationMethod: null,
3317
+
3318
+ mustUseAttribute: checkMask(propConfig, Injection.MUST_USE_ATTRIBUTE),
3319
+ mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
3320
+ hasSideEffects: checkMask(propConfig, Injection.HAS_SIDE_EFFECTS),
3321
+ hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
3322
+ hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
3323
+ hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
3324
+ hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
3325
+ };
3326
+
3327
+ !(!propertyInfo.mustUseAttribute || !propertyInfo.mustUseProperty) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Cannot require using both attribute and property: %s', propName) : invariant(false) : undefined;
3328
+ !(propertyInfo.mustUseProperty || !propertyInfo.hasSideEffects) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Properties that have side effects must use property: %s', propName) : invariant(false) : undefined;
3329
+ !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + 'numeric value, but not a combination: %s', propName) : invariant(false) : undefined;
3330
+
3331
+ if (process.env.NODE_ENV !== 'production') {
3332
+ DOMProperty.getPossibleStandardName[lowerCased] = propName;
3333
+ }
3334
+
3335
+ if (DOMAttributeNames.hasOwnProperty(propName)) {
3336
+ var attributeName = DOMAttributeNames[propName];
3337
+ propertyInfo.attributeName = attributeName;
3338
+ if (process.env.NODE_ENV !== 'production') {
3339
+ DOMProperty.getPossibleStandardName[attributeName] = propName;
3340
+ }
3341
+ }
3342
+
3343
+ if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
3344
+ propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
3345
+ }
3346
+
3347
+ if (DOMPropertyNames.hasOwnProperty(propName)) {
3348
+ propertyInfo.propertyName = DOMPropertyNames[propName];
3349
+ }
3350
+
3351
+ if (DOMMutationMethods.hasOwnProperty(propName)) {
3352
+ propertyInfo.mutationMethod = DOMMutationMethods[propName];
3353
+ }
3354
+
3355
+ DOMProperty.properties[propName] = propertyInfo;
3356
+ }
3357
+ }
3358
+ };
3359
+ var defaultValueCache = {};
3360
+
3361
+ /**
3362
+ * DOMProperty exports lookup objects that can be used like functions:
3363
+ *
3364
+ * > DOMProperty.isValid['id']
3365
+ * true
3366
+ * > DOMProperty.isValid['foobar']
3367
+ * undefined
3368
+ *
3369
+ * Although this may be confusing, it performs better in general.
3370
+ *
3371
+ * @see http://jsperf.com/key-exists
3372
+ * @see http://jsperf.com/key-missing
3373
+ */
3374
+ var DOMProperty = {
3375
+
3376
+ ID_ATTRIBUTE_NAME: 'data-reactid',
3377
+
3378
+ /**
3379
+ * Map from property "standard name" to an object with info about how to set
3380
+ * the property in the DOM. Each object contains:
3381
+ *
3382
+ * attributeName:
3383
+ * Used when rendering markup or with `*Attribute()`.
3384
+ * attributeNamespace
3385
+ * propertyName:
3386
+ * Used on DOM node instances. (This includes properties that mutate due to
3387
+ * external factors.)
3388
+ * mutationMethod:
3389
+ * If non-null, used instead of the property or `setAttribute()` after
3390
+ * initial render.
3391
+ * mustUseAttribute:
3392
+ * Whether the property must be accessed and mutated using `*Attribute()`.
3393
+ * (This includes anything that fails `<propName> in <element>`.)
3394
+ * mustUseProperty:
3395
+ * Whether the property must be accessed and mutated as an object property.
3396
+ * hasSideEffects:
3397
+ * Whether or not setting a value causes side effects such as triggering
3398
+ * resources to be loaded or text selection changes. If true, we read from
3399
+ * the DOM before updating to ensure that the value is only set if it has
3400
+ * changed.
3401
+ * hasBooleanValue:
3402
+ * Whether the property should be removed when set to a falsey value.
3403
+ * hasNumericValue:
3404
+ * Whether the property must be numeric or parse as a numeric and should be
3405
+ * removed when set to a falsey value.
3406
+ * hasPositiveNumericValue:
3407
+ * Whether the property must be positive numeric or parse as a positive
3408
+ * numeric and should be removed when set to a falsey value.
3409
+ * hasOverloadedBooleanValue:
3410
+ * Whether the property can be used as a flag as well as with a value.
3411
+ * Removed when strictly equal to false; present without a value when
3412
+ * strictly equal to true; present with a value otherwise.
3413
+ */
3414
+ properties: {},
3415
+
3416
+ /**
3417
+ * Mapping from lowercase property names to the properly cased version, used
3418
+ * to warn in the case of missing properties. Available only in __DEV__.
3419
+ * @type {Object}
3420
+ */
3421
+ getPossibleStandardName: process.env.NODE_ENV !== 'production' ? {} : null,
3422
+
3423
+ /**
3424
+ * All of the isCustomAttribute() functions that have been injected.
3425
+ */
3426
+ _isCustomAttributeFunctions: [],
3427
+
3428
+ /**
3429
+ * Checks whether a property name is a custom attribute.
3430
+ * @method
3431
+ */
3432
+ isCustomAttribute: function (attributeName) {
3433
+ for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
3434
+ var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
3435
+ if (isCustomAttributeFn(attributeName)) {
3436
+ return true;
3437
+ }
3438
+ }
3439
+ return false;
3440
+ },
3441
+
3442
+ /**
3443
+ * Returns the default property value for a DOM property (i.e., not an
3444
+ * attribute). Most default values are '' or false, but not all. Worse yet,
3445
+ * some (in particular, `type`) vary depending on the type of element.
3446
+ *
3447
+ * TODO: Is it better to grab all the possible properties when creating an
3448
+ * element to avoid having to create the same element twice?
3449
+ */
3450
+ getDefaultValueForProperty: function (nodeName, prop) {
3451
+ var nodeDefaults = defaultValueCache[nodeName];
3452
+ var testElement;
3453
+ if (!nodeDefaults) {
3454
+ defaultValueCache[nodeName] = nodeDefaults = {};
3455
+ }
3456
+ if (!(prop in nodeDefaults)) {
3457
+ testElement = document.createElement(nodeName);
3458
+ nodeDefaults[prop] = testElement[prop];
3459
+ }
3460
+ return nodeDefaults[prop];
3461
+ },
3462
+
3463
+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469
+ },{"_process":29,"fbjs/lib/invariant":17}],40:[function(require,module,exports){
3470
+ (function (process){
3471
+ /**
3472
+ * Copyright 2013-2015, Facebook, Inc.
3473
+ * All rights reserved.
3474
+ *
3475
+ * This source code is licensed under the BSD-style license found in the
3476
+ * LICENSE file in the root directory of this source tree. An additional grant
3477
+ * of patent rights can be found in the PATENTS file in the same directory.
3478
+ *
3479
+ * @providesModule DOMPropertyOperations
3480
+ * @typechecks static-only
3481
+ */
3482
+
3483
+ 'use strict';
3484
+
3485
+ var DOMProperty = require('./DOMProperty');
3486
+ var ReactPerf = require('./ReactPerf');
3487
+
3488
+ var quoteAttributeValueForBrowser = require('./quoteAttributeValueForBrowser');
3489
+ var warning = require('fbjs/lib/warning');
3490
+
3491
+ // Simplified subset
3492
+ var VALID_ATTRIBUTE_NAME_REGEX = /^[a-zA-Z_][\w\.\-]*$/;
3493
+ var illegalAttributeNameCache = {};
3494
+ var validatedAttributeNameCache = {};
3495
+
3496
+ function isAttributeNameSafe(attributeName) {
3497
+ if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
3498
+ return true;
3499
+ }
3500
+ if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
3501
+ return false;
3502
+ }
3503
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
3504
+ validatedAttributeNameCache[attributeName] = true;
3505
+ return true;
3506
+ }
3507
+ illegalAttributeNameCache[attributeName] = true;
3508
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : undefined;
3509
+ return false;
3510
+ }
3511
+
3512
+ function shouldIgnoreValue(propertyInfo, value) {
3513
+ return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
3514
+ }
3515
+
3516
+ if (process.env.NODE_ENV !== 'production') {
3517
+ var reactProps = {
3518
+ children: true,
3519
+ dangerouslySetInnerHTML: true,
3520
+ key: true,
3521
+ ref: true
3522
+ };
3523
+ var warnedProperties = {};
3524
+
3525
+ var warnUnknownProperty = function (name) {
3526
+ if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
3527
+ return;
3528
+ }
3529
+
3530
+ warnedProperties[name] = true;
3531
+ var lowerCasedName = name.toLowerCase();
3532
+
3533
+ // data-* attributes should be lowercase; suggest the lowercase version
3534
+ var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
3535
+
3536
+ // For now, only warn when we have a suggested correction. This prevents
3537
+ // logging too much when using transferPropsTo.
3538
+ process.env.NODE_ENV !== 'production' ? warning(standardName == null, 'Unknown DOM property %s. Did you mean %s?', name, standardName) : undefined;
3539
+ };
3540
+ }
3541
+
3542
+ /**
3543
+ * Operations for dealing with DOM properties.
3544
+ */
3545
+ var DOMPropertyOperations = {
3546
+
3547
+ /**
3548
+ * Creates markup for the ID property.
3549
+ *
3550
+ * @param {string} id Unescaped ID.
3551
+ * @return {string} Markup string.
3552
+ */
3553
+ createMarkupForID: function (id) {
3554
+ return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
3555
+ },
3556
+
3557
+ setAttributeForID: function (node, id) {
3558
+ node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
3559
+ },
3560
+
3561
+ /**
3562
+ * Creates markup for a property.
3563
+ *
3564
+ * @param {string} name
3565
+ * @param {*} value
3566
+ * @return {?string} Markup string, or null if the property was invalid.
3567
+ */
3568
+ createMarkupForProperty: function (name, value) {
3569
+ var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
3570
+ if (propertyInfo) {
3571
+ if (shouldIgnoreValue(propertyInfo, value)) {
3572
+ return '';
3573
+ }
3574
+ var attributeName = propertyInfo.attributeName;
3575
+ if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
3576
+ return attributeName + '=""';
3577
+ }
3578
+ return attributeName + '=' + quoteAttributeValueForBrowser(value);
3579
+ } else if (DOMProperty.isCustomAttribute(name)) {
3580
+ if (value == null) {
3581
+ return '';
3582
+ }
3583
+ return name + '=' + quoteAttributeValueForBrowser(value);
3584
+ } else if (process.env.NODE_ENV !== 'production') {
3585
+ warnUnknownProperty(name);
3586
+ }
3587
+ return null;
3588
+ },
3589
+
3590
+ /**
3591
+ * Creates markup for a custom property.
3592
+ *
3593
+ * @param {string} name
3594
+ * @param {*} value
3595
+ * @return {string} Markup string, or empty string if the property was invalid.
3596
+ */
3597
+ createMarkupForCustomAttribute: function (name, value) {
3598
+ if (!isAttributeNameSafe(name) || value == null) {
3599
+ return '';
3600
+ }
3601
+ return name + '=' + quoteAttributeValueForBrowser(value);
3602
+ },
3603
+
3604
+ /**
3605
+ * Sets the value for a property on a node.
3606
+ *
3607
+ * @param {DOMElement} node
3608
+ * @param {string} name
3609
+ * @param {*} value
3610
+ */
3611
+ setValueForProperty: function (node, name, value) {
3612
+ var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
3613
+ if (propertyInfo) {
3614
+ var mutationMethod = propertyInfo.mutationMethod;
3615
+ if (mutationMethod) {
3616
+ mutationMethod(node, value);
3617
+ } else if (shouldIgnoreValue(propertyInfo, value)) {
3618
+ this.deleteValueForProperty(node, name);
3619
+ } else if (propertyInfo.mustUseAttribute) {
3620
+ var attributeName = propertyInfo.attributeName;
3621
+ var namespace = propertyInfo.attributeNamespace;
3622
+ // `setAttribute` with objects becomes only `[object]` in IE8/9,
3623
+ // ('' + value) makes it output the correct toString()-value.
3624
+ if (namespace) {
3625
+ node.setAttributeNS(namespace, attributeName, '' + value);
3626
+ } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
3627
+ node.setAttribute(attributeName, '');
3628
+ } else {
3629
+ node.setAttribute(attributeName, '' + value);
3630
+ }
3631
+ } else {
3632
+ var propName = propertyInfo.propertyName;
3633
+ // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the
3634
+ // property type before comparing; only `value` does and is string.
3635
+ if (!propertyInfo.hasSideEffects || '' + node[propName] !== '' + value) {
3636
+ // Contrary to `setAttribute`, object properties are properly
3637
+ // `toString`ed by IE8/9.
3638
+ node[propName] = value;
3639
+ }
3640
+ }
3641
+ } else if (DOMProperty.isCustomAttribute(name)) {
3642
+ DOMPropertyOperations.setValueForAttribute(node, name, value);
3643
+ } else if (process.env.NODE_ENV !== 'production') {
3644
+ warnUnknownProperty(name);
3645
+ }
3646
+ },
3647
+
3648
+ setValueForAttribute: function (node, name, value) {
3649
+ if (!isAttributeNameSafe(name)) {
3650
+ return;
3651
+ }
3652
+ if (value == null) {
3653
+ node.removeAttribute(name);
3654
+ } else {
3655
+ node.setAttribute(name, '' + value);
3656
+ }
3657
+ },
3658
+
3659
+ /**
3660
+ * Deletes the value for a property on a node.
3661
+ *
3662
+ * @param {DOMElement} node
3663
+ * @param {string} name
3664
+ */
3665
+ deleteValueForProperty: function (node, name) {
3666
+ var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
3667
+ if (propertyInfo) {
3668
+ var mutationMethod = propertyInfo.mutationMethod;
3669
+ if (mutationMethod) {
3670
+ mutationMethod(node, undefined);
3671
+ } else if (propertyInfo.mustUseAttribute) {
3672
+ node.removeAttribute(propertyInfo.attributeName);
3673
+ } else {
3674
+ var propName = propertyInfo.propertyName;
3675
+ var defaultValue = DOMProperty.getDefaultValueForProperty(node.nodeName, propName);
3676
+ if (!propertyInfo.hasSideEffects || '' + node[propName] !== defaultValue) {
3677
+ node[propName] = defaultValue;
3678
+ }
3679
+ }
3680
+ } else if (DOMProperty.isCustomAttribute(name)) {
3681
+ node.removeAttribute(name);
3682
+ } else if (process.env.NODE_ENV !== 'production') {
3683
+ warnUnknownProperty(name);
3684
+ }
3685
+ }
3686
+
3687
+ };
3688
+
3689
+ ReactPerf.measureMethods(DOMPropertyOperations, 'DOMPropertyOperations', {
3690
+ setValueForProperty: 'setValueForProperty',
3691
+ setValueForAttribute: 'setValueForAttribute',
3692
+ deleteValueForProperty: 'deleteValueForProperty'
3693
+ });
3694
+
3695
+ module.exports = DOMPropertyOperations;
3696
+ }).call(this,require('_process'))
3697
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvRE9NUHJvcGVydHlPcGVyYXRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Q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fQ==
3698
+ },{"./DOMProperty":39,"./ReactPerf":101,"./quoteAttributeValueForBrowser":152,"_process":29,"fbjs/lib/warning":28}],41:[function(require,module,exports){
3699
+ (function (process){
3700
+ /**
3701
+ * Copyright 2013-2015, Facebook, Inc.
3702
+ * All rights reserved.
3703
+ *
3704
+ * This source code is licensed under the BSD-style license found in the
3705
+ * LICENSE file in the root directory of this source tree. An additional grant
3706
+ * of patent rights can be found in the PATENTS file in the same directory.
3707
+ *
3708
+ * @providesModule Danger
3709
+ * @typechecks static-only
3710
+ */
3711
+
3712
+ 'use strict';
3713
+
3714
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
3715
+
3716
+ var createNodesFromMarkup = require('fbjs/lib/createNodesFromMarkup');
3717
+ var emptyFunction = require('fbjs/lib/emptyFunction');
3718
+ var getMarkupWrap = require('fbjs/lib/getMarkupWrap');
3719
+ var invariant = require('fbjs/lib/invariant');
3720
+
3721
+ var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/;
3722
+ var RESULT_INDEX_ATTR = 'data-danger-index';
3723
+
3724
+ /**
3725
+ * Extracts the `nodeName` from a string of markup.
3726
+ *
3727
+ * NOTE: Extracting the `nodeName` does not require a regular expression match
3728
+ * because we make assumptions about React-generated markup (i.e. there are no
3729
+ * spaces surrounding the opening tag and there is at least one attribute).
3730
+ *
3731
+ * @param {string} markup String of markup.
3732
+ * @return {string} Node name of the supplied markup.
3733
+ * @see http://jsperf.com/extract-nodename
3734
+ */
3735
+ function getNodeName(markup) {
3736
+ return markup.substring(1, markup.indexOf(' '));
3737
+ }
3738
+
3739
+ var Danger = {
3740
+
3741
+ /**
3742
+ * Renders markup into an array of nodes. The markup is expected to render
3743
+ * into a list of root nodes. Also, the length of `resultList` and
3744
+ * `markupList` should be the same.
3745
+ *
3746
+ * @param {array<string>} markupList List of markup strings to render.
3747
+ * @return {array<DOMElement>} List of rendered nodes.
3748
+ * @internal
3749
+ */
3750
+ dangerouslyRenderMarkup: function (markupList) {
3751
+ !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString for server rendering.') : invariant(false) : undefined;
3752
+ var nodeName;
3753
+ var markupByNodeName = {};
3754
+ // Group markup by `nodeName` if a wrap is necessary, else by '*'.
3755
+ for (var i = 0; i < markupList.length; i++) {
3756
+ !markupList[i] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(false) : undefined;
3757
+ nodeName = getNodeName(markupList[i]);
3758
+ nodeName = getMarkupWrap(nodeName) ? nodeName : '*';
3759
+ markupByNodeName[nodeName] = markupByNodeName[nodeName] || [];
3760
+ markupByNodeName[nodeName][i] = markupList[i];
3761
+ }
3762
+ var resultList = [];
3763
+ var resultListAssignmentCount = 0;
3764
+ for (nodeName in markupByNodeName) {
3765
+ if (!markupByNodeName.hasOwnProperty(nodeName)) {
3766
+ continue;
3767
+ }
3768
+ var markupListByNodeName = markupByNodeName[nodeName];
3769
+
3770
+ // This for-in loop skips the holes of the sparse array. The order of
3771
+ // iteration should follow the order of assignment, which happens to match
3772
+ // numerical index order, but we don't rely on that.
3773
+ var resultIndex;
3774
+ for (resultIndex in markupListByNodeName) {
3775
+ if (markupListByNodeName.hasOwnProperty(resultIndex)) {
3776
+ var markup = markupListByNodeName[resultIndex];
3777
+
3778
+ // Push the requested markup with an additional RESULT_INDEX_ATTR
3779
+ // attribute. If the markup does not start with a < character, it
3780
+ // will be discarded below (with an appropriate console.error).
3781
+ markupListByNodeName[resultIndex] = markup.replace(OPEN_TAG_NAME_EXP,
3782
+ // This index will be parsed back out below.
3783
+ '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ');
3784
+ }
3785
+ }
3786
+
3787
+ // Render each group of markup with similar wrapping `nodeName`.
3788
+ var renderNodes = createNodesFromMarkup(markupListByNodeName.join(''), emptyFunction // Do nothing special with <script> tags.
3789
+ );
3790
+
3791
+ for (var j = 0; j < renderNodes.length; ++j) {
3792
+ var renderNode = renderNodes[j];
3793
+ if (renderNode.hasAttribute && renderNode.hasAttribute(RESULT_INDEX_ATTR)) {
3794
+
3795
+ resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR);
3796
+ renderNode.removeAttribute(RESULT_INDEX_ATTR);
3797
+
3798
+ !!resultList.hasOwnProperty(resultIndex) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Danger: Assigning to an already-occupied result index.') : invariant(false) : undefined;
3799
+
3800
+ resultList[resultIndex] = renderNode;
3801
+
3802
+ // This should match resultList.length and markupList.length when
3803
+ // we're done.
3804
+ resultListAssignmentCount += 1;
3805
+ } else if (process.env.NODE_ENV !== 'production') {
3806
+ console.error('Danger: Discarding unexpected node:', renderNode);
3807
+ }
3808
+ }
3809
+ }
3810
+
3811
+ // Although resultList was populated out of order, it should now be a dense
3812
+ // array.
3813
+ !(resultListAssignmentCount === resultList.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Danger: Did not assign to every index of resultList.') : invariant(false) : undefined;
3814
+
3815
+ !(resultList.length === markupList.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Danger: Expected markup to render %s nodes, but rendered %s.', markupList.length, resultList.length) : invariant(false) : undefined;
3816
+
3817
+ return resultList;
3818
+ },
3819
+
3820
+ /**
3821
+ * Replaces a node with a string of markup at its current position within its
3822
+ * parent. The markup must render into a single root node.
3823
+ *
3824
+ * @param {DOMElement} oldChild Child node to replace.
3825
+ * @param {string} markup Markup to render in place of the child node.
3826
+ * @internal
3827
+ */
3828
+ dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
3829
+ !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' + 'worker thread. Make sure `window` and `document` are available ' + 'globally before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString() for server rendering.') : invariant(false) : undefined;
3830
+ !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(false) : undefined;
3831
+ !(oldChild.tagName.toLowerCase() !== 'html') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' + '<html> node. This is because browser quirks make this unreliable ' + 'and/or slow. If you want to render to the root you must use ' + 'server rendering. See ReactDOMServer.renderToString().') : invariant(false) : undefined;
3832
+
3833
+ var newChild;
3834
+ if (typeof markup === 'string') {
3835
+ newChild = createNodesFromMarkup(markup, emptyFunction)[0];
3836
+ } else {
3837
+ newChild = markup;
3838
+ }
3839
+ oldChild.parentNode.replaceChild(newChild, oldChild);
3840
+ }
3841
+
3842
+ };
3843
+
3844
+ module.exports = Danger;
3845
+ }).call(this,require('_process'))
3846
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvRGFuZ2VyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7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J2ZXIgcmVuZGVyaW5nLiBTZWUgUmVhY3RET01TZXJ2ZXIucmVuZGVyVG9TdHJpbmcoKS4nKSA6IGludmFyaWFudChmYWxzZSkgOiB1bmRlZmluZWQ7XG5cbiAgICB2YXIgbmV3Q2hpbGQ7XG4gICAgaWYgKHR5cGVvZiBtYXJrdXAgPT09ICdzdHJpbmcnKSB7XG4gICAgICBuZXdDaGlsZCA9IGNyZWF0ZU5vZGVzRnJvbU1hcmt1cChtYXJrdXAsIGVtcHR5RnVuY3Rpb24pWzBdO1xuICAgIH0gZWxzZSB7XG4gICAgICBuZXdDaGlsZCA9IG1hcmt1cDtcbiAgICB9XG4gICAgb2xkQ2hpbGQucGFyZW50Tm9kZS5yZXBsYWNlQ2hpbGQobmV3Q2hpbGQsIG9sZENoaWxkKTtcbiAgfVxuXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IERhbmdlcjsiXX0=
3847
+ },{"_process":29,"fbjs/lib/ExecutionEnvironment":3,"fbjs/lib/createNodesFromMarkup":8,"fbjs/lib/emptyFunction":9,"fbjs/lib/getMarkupWrap":13,"fbjs/lib/invariant":17}],42:[function(require,module,exports){
3848
+ /**
3849
+ * Copyright 2013-2015, Facebook, Inc.
3850
+ * All rights reserved.
3851
+ *
3852
+ * This source code is licensed under the BSD-style license found in the
3853
+ * LICENSE file in the root directory of this source tree. An additional grant
3854
+ * of patent rights can be found in the PATENTS file in the same directory.
3855
+ *
3856
+ * @providesModule DefaultEventPluginOrder
3857
+ */
3858
+
3859
+ 'use strict';
3860
+
3861
+ var keyOf = require('fbjs/lib/keyOf');
3862
+
3863
+ /**
3864
+ * Module that is injectable into `EventPluginHub`, that specifies a
3865
+ * deterministic ordering of `EventPlugin`s. A convenient way to reason about
3866
+ * plugins, without having to package every one of them. This is better than
3867
+ * having plugins be ordered in the same order that they are injected because
3868
+ * that ordering would be influenced by the packaging order.
3869
+ * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
3870
+ * preventing default on events is convenient in `SimpleEventPlugin` handlers.
3871
+ */
3872
+ var DefaultEventPluginOrder = [keyOf({ ResponderEventPlugin: null }), keyOf({ SimpleEventPlugin: null }), keyOf({ TapEventPlugin: null }), keyOf({ EnterLeaveEventPlugin: null }), keyOf({ ChangeEventPlugin: null }), keyOf({ SelectEventPlugin: null }), keyOf({ BeforeInputEventPlugin: null })];
3873
+
3874
+ module.exports = DefaultEventPluginOrder;
3875
+ },{"fbjs/lib/keyOf":21}],43:[function(require,module,exports){
3876
+ /**
3877
+ * Copyright 2013-2015, Facebook, Inc.
3878
+ * All rights reserved.
3879
+ *
3880
+ * This source code is licensed under the BSD-style license found in the
3881
+ * LICENSE file in the root directory of this source tree. An additional grant
3882
+ * of patent rights can be found in the PATENTS file in the same directory.
3883
+ *
3884
+ * @providesModule EnterLeaveEventPlugin
3885
+ * @typechecks static-only
3886
+ */
3887
+
3888
+ 'use strict';
3889
+
3890
+ var EventConstants = require('./EventConstants');
3891
+ var EventPropagators = require('./EventPropagators');
3892
+ var SyntheticMouseEvent = require('./SyntheticMouseEvent');
3893
+
3894
+ var ReactMount = require('./ReactMount');
3895
+ var keyOf = require('fbjs/lib/keyOf');
3896
+
3897
+ var topLevelTypes = EventConstants.topLevelTypes;
3898
+ var getFirstReactDOM = ReactMount.getFirstReactDOM;
3899
+
3900
+ var eventTypes = {
3901
+ mouseEnter: {
3902
+ registrationName: keyOf({ onMouseEnter: null }),
3903
+ dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver]
3904
+ },
3905
+ mouseLeave: {
3906
+ registrationName: keyOf({ onMouseLeave: null }),
3907
+ dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver]
3908
+ }
3909
+ };
3910
+
3911
+ var extractedEvents = [null, null];
3912
+
3913
+ var EnterLeaveEventPlugin = {
3914
+
3915
+ eventTypes: eventTypes,
3916
+
3917
+ /**
3918
+ * For almost every interaction we care about, there will be both a top-level
3919
+ * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
3920
+ * we do not extract duplicate events. However, moving the mouse into the
3921
+ * browser from outside will not fire a `mouseout` event. In this case, we use
3922
+ * the `mouseover` top-level event.
3923
+ *
3924
+ * @param {string} topLevelType Record from `EventConstants`.
3925
+ * @param {DOMEventTarget} topLevelTarget The listening component root node.
3926
+ * @param {string} topLevelTargetID ID of `topLevelTarget`.
3927
+ * @param {object} nativeEvent Native browser event.
3928
+ * @return {*} An accumulation of synthetic events.
3929
+ * @see {EventPluginHub.extractEvents}
3930
+ */
3931
+ extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
3932
+ if (topLevelType === topLevelTypes.topMouseOver && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
3933
+ return null;
3934
+ }
3935
+ if (topLevelType !== topLevelTypes.topMouseOut && topLevelType !== topLevelTypes.topMouseOver) {
3936
+ // Must not be a mouse in or mouse out - ignoring.
3937
+ return null;
3938
+ }
3939
+
3940
+ var win;
3941
+ if (topLevelTarget.window === topLevelTarget) {
3942
+ // `topLevelTarget` is probably a window object.
3943
+ win = topLevelTarget;
3944
+ } else {
3945
+ // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
3946
+ var doc = topLevelTarget.ownerDocument;
3947
+ if (doc) {
3948
+ win = doc.defaultView || doc.parentWindow;
3949
+ } else {
3950
+ win = window;
3951
+ }
3952
+ }
3953
+
3954
+ var from;
3955
+ var to;
3956
+ var fromID = '';
3957
+ var toID = '';
3958
+ if (topLevelType === topLevelTypes.topMouseOut) {
3959
+ from = topLevelTarget;
3960
+ fromID = topLevelTargetID;
3961
+ to = getFirstReactDOM(nativeEvent.relatedTarget || nativeEvent.toElement);
3962
+ if (to) {
3963
+ toID = ReactMount.getID(to);
3964
+ } else {
3965
+ to = win;
3966
+ }
3967
+ to = to || win;
3968
+ } else {
3969
+ from = win;
3970
+ to = topLevelTarget;
3971
+ toID = topLevelTargetID;
3972
+ }
3973
+
3974
+ if (from === to) {
3975
+ // Nothing pertains to our managed components.
3976
+ return null;
3977
+ }
3978
+
3979
+ var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, fromID, nativeEvent, nativeEventTarget);
3980
+ leave.type = 'mouseleave';
3981
+ leave.target = from;
3982
+ leave.relatedTarget = to;
3983
+
3984
+ var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, toID, nativeEvent, nativeEventTarget);
3985
+ enter.type = 'mouseenter';
3986
+ enter.target = to;
3987
+ enter.relatedTarget = from;
3988
+
3989
+ EventPropagators.accumulateEnterLeaveDispatches(leave, enter, fromID, toID);
3990
+
3991
+ extractedEvents[0] = leave;
3992
+ extractedEvents[1] = enter;
3993
+
3994
+ return extractedEvents;
3995
+ }
3996
+
3997
+ };
3998
+
3999
+ module.exports = EnterLeaveEventPlugin;
4000
+ },{"./EventConstants":44,"./EventPropagators":48,"./ReactMount":95,"./SyntheticMouseEvent":126,"fbjs/lib/keyOf":21}],44:[function(require,module,exports){
4001
+ /**
4002
+ * Copyright 2013-2015, Facebook, Inc.
4003
+ * All rights reserved.
4004
+ *
4005
+ * This source code is licensed under the BSD-style license found in the
4006
+ * LICENSE file in the root directory of this source tree. An additional grant
4007
+ * of patent rights can be found in the PATENTS file in the same directory.
4008
+ *
4009
+ * @providesModule EventConstants
4010
+ */
4011
+
4012
+ 'use strict';
4013
+
4014
+ var keyMirror = require('fbjs/lib/keyMirror');
4015
+
4016
+ var PropagationPhases = keyMirror({ bubbled: null, captured: null });
4017
+
4018
+ /**
4019
+ * Types of raw signals from the browser caught at the top level.
4020
+ */
4021
+ var topLevelTypes = keyMirror({
4022
+ topAbort: null,
4023
+ topBlur: null,
4024
+ topCanPlay: null,
4025
+ topCanPlayThrough: null,
4026
+ topChange: null,
4027
+ topClick: null,
4028
+ topCompositionEnd: null,
4029
+ topCompositionStart: null,
4030
+ topCompositionUpdate: null,
4031
+ topContextMenu: null,
4032
+ topCopy: null,
4033
+ topCut: null,
4034
+ topDoubleClick: null,
4035
+ topDrag: null,
4036
+ topDragEnd: null,
4037
+ topDragEnter: null,
4038
+ topDragExit: null,
4039
+ topDragLeave: null,
4040
+ topDragOver: null,
4041
+ topDragStart: null,
4042
+ topDrop: null,
4043
+ topDurationChange: null,
4044
+ topEmptied: null,
4045
+ topEncrypted: null,
4046
+ topEnded: null,
4047
+ topError: null,
4048
+ topFocus: null,
4049
+ topInput: null,
4050
+ topKeyDown: null,
4051
+ topKeyPress: null,
4052
+ topKeyUp: null,
4053
+ topLoad: null,
4054
+ topLoadedData: null,
4055
+ topLoadedMetadata: null,
4056
+ topLoadStart: null,
4057
+ topMouseDown: null,
4058
+ topMouseMove: null,
4059
+ topMouseOut: null,
4060
+ topMouseOver: null,
4061
+ topMouseUp: null,
4062
+ topPaste: null,
4063
+ topPause: null,
4064
+ topPlay: null,
4065
+ topPlaying: null,
4066
+ topProgress: null,
4067
+ topRateChange: null,
4068
+ topReset: null,
4069
+ topScroll: null,
4070
+ topSeeked: null,
4071
+ topSeeking: null,
4072
+ topSelectionChange: null,
4073
+ topStalled: null,
4074
+ topSubmit: null,
4075
+ topSuspend: null,
4076
+ topTextInput: null,
4077
+ topTimeUpdate: null,
4078
+ topTouchCancel: null,
4079
+ topTouchEnd: null,
4080
+ topTouchMove: null,
4081
+ topTouchStart: null,
4082
+ topVolumeChange: null,
4083
+ topWaiting: null,
4084
+ topWheel: null
4085
+ });
4086
+
4087
+ var EventConstants = {
4088
+ topLevelTypes: topLevelTypes,
4089
+ PropagationPhases: PropagationPhases
4090
+ };
4091
+
4092
+ module.exports = EventConstants;
4093
+ },{"fbjs/lib/keyMirror":20}],45:[function(require,module,exports){
4094
+ (function (process){
4095
+ /**
4096
+ * Copyright 2013-2015, Facebook, Inc.
4097
+ * All rights reserved.
4098
+ *
4099
+ * This source code is licensed under the BSD-style license found in the
4100
+ * LICENSE file in the root directory of this source tree. An additional grant
4101
+ * of patent rights can be found in the PATENTS file in the same directory.
4102
+ *
4103
+ * @providesModule EventPluginHub
4104
+ */
4105
+
4106
+ 'use strict';
4107
+
4108
+ var EventPluginRegistry = require('./EventPluginRegistry');
4109
+ var EventPluginUtils = require('./EventPluginUtils');
4110
+ var ReactErrorUtils = require('./ReactErrorUtils');
4111
+
4112
+ var accumulateInto = require('./accumulateInto');
4113
+ var forEachAccumulated = require('./forEachAccumulated');
4114
+ var invariant = require('fbjs/lib/invariant');
4115
+ var warning = require('fbjs/lib/warning');
4116
+
4117
+ /**
4118
+ * Internal store for event listeners
4119
+ */
4120
+ var listenerBank = {};
4121
+
4122
+ /**
4123
+ * Internal queue of events that have accumulated their dispatches and are
4124
+ * waiting to have their dispatches executed.
4125
+ */
4126
+ var eventQueue = null;
4127
+
4128
+ /**
4129
+ * Dispatches an event and releases it back into the pool, unless persistent.
4130
+ *
4131
+ * @param {?object} event Synthetic event to be dispatched.
4132
+ * @param {boolean} simulated If the event is simulated (changes exn behavior)
4133
+ * @private
4134
+ */
4135
+ var executeDispatchesAndRelease = function (event, simulated) {
4136
+ if (event) {
4137
+ EventPluginUtils.executeDispatchesInOrder(event, simulated);
4138
+
4139
+ if (!event.isPersistent()) {
4140
+ event.constructor.release(event);
4141
+ }
4142
+ }
4143
+ };
4144
+ var executeDispatchesAndReleaseSimulated = function (e) {
4145
+ return executeDispatchesAndRelease(e, true);
4146
+ };
4147
+ var executeDispatchesAndReleaseTopLevel = function (e) {
4148
+ return executeDispatchesAndRelease(e, false);
4149
+ };
4150
+
4151
+ /**
4152
+ * - `InstanceHandle`: [required] Module that performs logical traversals of DOM
4153
+ * hierarchy given ids of the logical DOM elements involved.
4154
+ */
4155
+ var InstanceHandle = null;
4156
+
4157
+ function validateInstanceHandle() {
4158
+ var valid = InstanceHandle && InstanceHandle.traverseTwoPhase && InstanceHandle.traverseEnterLeave;
4159
+ process.env.NODE_ENV !== 'production' ? warning(valid, 'InstanceHandle not injected before use!') : undefined;
4160
+ }
4161
+
4162
+ /**
4163
+ * This is a unified interface for event plugins to be installed and configured.
4164
+ *
4165
+ * Event plugins can implement the following properties:
4166
+ *
4167
+ * `extractEvents` {function(string, DOMEventTarget, string, object): *}
4168
+ * Required. When a top-level event is fired, this method is expected to
4169
+ * extract synthetic events that will in turn be queued and dispatched.
4170
+ *
4171
+ * `eventTypes` {object}
4172
+ * Optional, plugins that fire events must publish a mapping of registration
4173
+ * names that are used to register listeners. Values of this mapping must
4174
+ * be objects that contain `registrationName` or `phasedRegistrationNames`.
4175
+ *
4176
+ * `executeDispatch` {function(object, function, string)}
4177
+ * Optional, allows plugins to override how an event gets dispatched. By
4178
+ * default, the listener is simply invoked.
4179
+ *
4180
+ * Each plugin that is injected into `EventsPluginHub` is immediately operable.
4181
+ *
4182
+ * @public
4183
+ */
4184
+ var EventPluginHub = {
4185
+
4186
+ /**
4187
+ * Methods for injecting dependencies.
4188
+ */
4189
+ injection: {
4190
+
4191
+ /**
4192
+ * @param {object} InjectedMount
4193
+ * @public
4194
+ */
4195
+ injectMount: EventPluginUtils.injection.injectMount,
4196
+
4197
+ /**
4198
+ * @param {object} InjectedInstanceHandle
4199
+ * @public
4200
+ */
4201
+ injectInstanceHandle: function (InjectedInstanceHandle) {
4202
+ InstanceHandle = InjectedInstanceHandle;
4203
+ if (process.env.NODE_ENV !== 'production') {
4204
+ validateInstanceHandle();
4205
+ }
4206
+ },
4207
+
4208
+ getInstanceHandle: function () {
4209
+ if (process.env.NODE_ENV !== 'production') {
4210
+ validateInstanceHandle();
4211
+ }
4212
+ return InstanceHandle;
4213
+ },
4214
+
4215
+ /**
4216
+ * @param {array} InjectedEventPluginOrder
4217
+ * @public
4218
+ */
4219
+ injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
4220
+
4221
+ /**
4222
+ * @param {object} injectedNamesToPlugins Map from names to plugin modules.
4223
+ */
4224
+ injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
4225
+
4226
+ },
4227
+
4228
+ eventNameDispatchConfigs: EventPluginRegistry.eventNameDispatchConfigs,
4229
+
4230
+ registrationNameModules: EventPluginRegistry.registrationNameModules,
4231
+
4232
+ /**
4233
+ * Stores `listener` at `listenerBank[registrationName][id]`. Is idempotent.
4234
+ *
4235
+ * @param {string} id ID of the DOM element.
4236
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
4237
+ * @param {?function} listener The callback to store.
4238
+ */
4239
+ putListener: function (id, registrationName, listener) {
4240
+ !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : invariant(false) : undefined;
4241
+
4242
+ var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
4243
+ bankForRegistrationName[id] = listener;
4244
+
4245
+ var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
4246
+ if (PluginModule && PluginModule.didPutListener) {
4247
+ PluginModule.didPutListener(id, registrationName, listener);
4248
+ }
4249
+ },
4250
+
4251
+ /**
4252
+ * @param {string} id ID of the DOM element.
4253
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
4254
+ * @return {?function} The stored callback.
4255
+ */
4256
+ getListener: function (id, registrationName) {
4257
+ var bankForRegistrationName = listenerBank[registrationName];
4258
+ return bankForRegistrationName && bankForRegistrationName[id];
4259
+ },
4260
+
4261
+ /**
4262
+ * Deletes a listener from the registration bank.
4263
+ *
4264
+ * @param {string} id ID of the DOM element.
4265
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
4266
+ */
4267
+ deleteListener: function (id, registrationName) {
4268
+ var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
4269
+ if (PluginModule && PluginModule.willDeleteListener) {
4270
+ PluginModule.willDeleteListener(id, registrationName);
4271
+ }
4272
+
4273
+ var bankForRegistrationName = listenerBank[registrationName];
4274
+ // TODO: This should never be null -- when is it?
4275
+ if (bankForRegistrationName) {
4276
+ delete bankForRegistrationName[id];
4277
+ }
4278
+ },
4279
+
4280
+ /**
4281
+ * Deletes all listeners for the DOM element with the supplied ID.
4282
+ *
4283
+ * @param {string} id ID of the DOM element.
4284
+ */
4285
+ deleteAllListeners: function (id) {
4286
+ for (var registrationName in listenerBank) {
4287
+ if (!listenerBank[registrationName][id]) {
4288
+ continue;
4289
+ }
4290
+
4291
+ var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
4292
+ if (PluginModule && PluginModule.willDeleteListener) {
4293
+ PluginModule.willDeleteListener(id, registrationName);
4294
+ }
4295
+
4296
+ delete listenerBank[registrationName][id];
4297
+ }
4298
+ },
4299
+
4300
+ /**
4301
+ * Allows registered plugins an opportunity to extract events from top-level
4302
+ * native browser events.
4303
+ *
4304
+ * @param {string} topLevelType Record from `EventConstants`.
4305
+ * @param {DOMEventTarget} topLevelTarget The listening component root node.
4306
+ * @param {string} topLevelTargetID ID of `topLevelTarget`.
4307
+ * @param {object} nativeEvent Native browser event.
4308
+ * @return {*} An accumulation of synthetic events.
4309
+ * @internal
4310
+ */
4311
+ extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
4312
+ var events;
4313
+ var plugins = EventPluginRegistry.plugins;
4314
+ for (var i = 0; i < plugins.length; i++) {
4315
+ // Not every plugin in the ordering may be loaded at runtime.
4316
+ var possiblePlugin = plugins[i];
4317
+ if (possiblePlugin) {
4318
+ var extractedEvents = possiblePlugin.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget);
4319
+ if (extractedEvents) {
4320
+ events = accumulateInto(events, extractedEvents);
4321
+ }
4322
+ }
4323
+ }
4324
+ return events;
4325
+ },
4326
+
4327
+ /**
4328
+ * Enqueues a synthetic event that should be dispatched when
4329
+ * `processEventQueue` is invoked.
4330
+ *
4331
+ * @param {*} events An accumulation of synthetic events.
4332
+ * @internal
4333
+ */
4334
+ enqueueEvents: function (events) {
4335
+ if (events) {
4336
+ eventQueue = accumulateInto(eventQueue, events);
4337
+ }
4338
+ },
4339
+
4340
+ /**
4341
+ * Dispatches all synthetic events on the event queue.
4342
+ *
4343
+ * @internal
4344
+ */
4345
+ processEventQueue: function (simulated) {
4346
+ // Set `eventQueue` to null before processing it so that we can tell if more
4347
+ // events get enqueued while processing.
4348
+ var processingEventQueue = eventQueue;
4349
+ eventQueue = null;
4350
+ if (simulated) {
4351
+ forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
4352
+ } else {
4353
+ forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
4354
+ }
4355
+ !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing ' + 'an event queue. Support for this has not yet been implemented.') : invariant(false) : undefined;
4356
+ // This would be a good time to rethrow if any of the event handlers threw.
4357
+ ReactErrorUtils.rethrowCaughtError();
4358
+ },
4359
+
4360
+ /**
4361
+ * These are needed for tests only. Do not use!
4362
+ */
4363
+ __purge: function () {
4364
+ listenerBank = {};
4365
+ },
4366
+
4367
+ __getListenerBank: function () {
4368
+ return listenerBank;
4369
+ }
4370
+
4371
+ };
4372
+
4373
+ module.exports = EventPluginHub;
4374
+ }).call(this,require('_process'))
4375
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvRXZlbnRQbHVnaW5IdWIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ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kgOiB1bmRlZmluZWQ7XG4gICAgLy8gVGhpcyB3b3VsZCBiZSBhIGdvb2QgdGltZSB0byByZXRocm93IGlmIGFueSBvZiB0aGUgZXZlbnQgaGFuZGxlcnMgdGhyZXcuXG4gICAgUmVhY3RFcnJvclV0aWxzLnJldGhyb3dDYXVnaHRFcnJvcigpO1xuICB9LFxuXG4gIC8qKlxuICAgKiBUaGVzZSBhcmUgbmVlZGVkIGZvciB0ZXN0cyBvbmx5LiBEbyBub3QgdXNlIVxuICAgKi9cbiAgX19wdXJnZTogZnVuY3Rpb24gKCkge1xuICAgIGxpc3RlbmVyQmFuayA9IHt9O1xuICB9LFxuXG4gIF9fZ2V0TGlzdGVuZXJCYW5rOiBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIGxpc3RlbmVyQmFuaztcbiAgfVxuXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IEV2ZW50UGx1Z2luSHViOyJdfQ==
4376
+ },{"./EventPluginRegistry":46,"./EventPluginUtils":47,"./ReactErrorUtils":86,"./accumulateInto":132,"./forEachAccumulated":140,"_process":29,"fbjs/lib/invariant":17,"fbjs/lib/warning":28}],46:[function(require,module,exports){
4377
+ (function (process){
4378
+ /**
4379
+ * Copyright 2013-2015, Facebook, Inc.
4380
+ * All rights reserved.
4381
+ *
4382
+ * This source code is licensed under the BSD-style license found in the
4383
+ * LICENSE file in the root directory of this source tree. An additional grant
4384
+ * of patent rights can be found in the PATENTS file in the same directory.
4385
+ *
4386
+ * @providesModule EventPluginRegistry
4387
+ * @typechecks static-only
4388
+ */
4389
+
4390
+ 'use strict';
4391
+
4392
+ var invariant = require('fbjs/lib/invariant');
4393
+
4394
+ /**
4395
+ * Injectable ordering of event plugins.
4396
+ */
4397
+ var EventPluginOrder = null;
4398
+
4399
+ /**
4400
+ * Injectable mapping from names to event plugin modules.
4401
+ */
4402
+ var namesToPlugins = {};
4403
+
4404
+ /**
4405
+ * Recomputes the plugin list using the injected plugins and plugin ordering.
4406
+ *
4407
+ * @private
4408
+ */
4409
+ function recomputePluginOrdering() {
4410
+ if (!EventPluginOrder) {
4411
+ // Wait until an `EventPluginOrder` is injected.
4412
+ return;
4413
+ }
4414
+ for (var pluginName in namesToPlugins) {
4415
+ var PluginModule = namesToPlugins[pluginName];
4416
+ var pluginIndex = EventPluginOrder.indexOf(pluginName);
4417
+ !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName) : invariant(false) : undefined;
4418
+ if (EventPluginRegistry.plugins[pluginIndex]) {
4419
+ continue;
4420
+ }
4421
+ !PluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName) : invariant(false) : undefined;
4422
+ EventPluginRegistry.plugins[pluginIndex] = PluginModule;
4423
+ var publishedEvents = PluginModule.eventTypes;
4424
+ for (var eventName in publishedEvents) {
4425
+ !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : invariant(false) : undefined;
4426
+ }
4427
+ }
4428
+ }
4429
+
4430
+ /**
4431
+ * Publishes an event so that it can be dispatched by the supplied plugin.
4432
+ *
4433
+ * @param {object} dispatchConfig Dispatch configuration for the event.
4434
+ * @param {object} PluginModule Plugin publishing the event.
4435
+ * @return {boolean} True if the event was successfully published.
4436
+ * @private
4437
+ */
4438
+ function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
4439
+ !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName) : invariant(false) : undefined;
4440
+ EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
4441
+
4442
+ var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
4443
+ if (phasedRegistrationNames) {
4444
+ for (var phaseName in phasedRegistrationNames) {
4445
+ if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
4446
+ var phasedRegistrationName = phasedRegistrationNames[phaseName];
4447
+ publishRegistrationName(phasedRegistrationName, PluginModule, eventName);
4448
+ }
4449
+ }
4450
+ return true;
4451
+ } else if (dispatchConfig.registrationName) {
4452
+ publishRegistrationName(dispatchConfig.registrationName, PluginModule, eventName);
4453
+ return true;
4454
+ }
4455
+ return false;
4456
+ }
4457
+
4458
+ /**
4459
+ * Publishes a registration name that is used to identify dispatched events and
4460
+ * can be used with `EventPluginHub.putListener` to register listeners.
4461
+ *
4462
+ * @param {string} registrationName Registration name to add.
4463
+ * @param {object} PluginModule Plugin publishing the event.
4464
+ * @private
4465
+ */
4466
+ function publishRegistrationName(registrationName, PluginModule, eventName) {
4467
+ !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName) : invariant(false) : undefined;
4468
+ EventPluginRegistry.registrationNameModules[registrationName] = PluginModule;
4469
+ EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies;
4470
+ }
4471
+
4472
+ /**
4473
+ * Registers plugins so that they can extract and dispatch events.
4474
+ *
4475
+ * @see {EventPluginHub}
4476
+ */
4477
+ var EventPluginRegistry = {
4478
+
4479
+ /**
4480
+ * Ordered list of injected plugins.
4481
+ */
4482
+ plugins: [],
4483
+
4484
+ /**
4485
+ * Mapping from event name to dispatch config
4486
+ */
4487
+ eventNameDispatchConfigs: {},
4488
+
4489
+ /**
4490
+ * Mapping from registration name to plugin module
4491
+ */
4492
+ registrationNameModules: {},
4493
+
4494
+ /**
4495
+ * Mapping from registration name to event name
4496
+ */
4497
+ registrationNameDependencies: {},
4498
+
4499
+ /**
4500
+ * Injects an ordering of plugins (by plugin name). This allows the ordering
4501
+ * to be decoupled from injection of the actual plugins so that ordering is
4502
+ * always deterministic regardless of packaging, on-the-fly injection, etc.
4503
+ *
4504
+ * @param {array} InjectedEventPluginOrder
4505
+ * @internal
4506
+ * @see {EventPluginHub.injection.injectEventPluginOrder}
4507
+ */
4508
+ injectEventPluginOrder: function (InjectedEventPluginOrder) {
4509
+ !!EventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.') : invariant(false) : undefined;
4510
+ // Clone the ordering so it cannot be dynamically mutated.
4511
+ EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
4512
+ recomputePluginOrdering();
4513
+ },
4514
+
4515
+ /**
4516
+ * Injects plugins to be used by `EventPluginHub`. The plugin names must be
4517
+ * in the ordering injected by `injectEventPluginOrder`.
4518
+ *
4519
+ * Plugins can be injected as part of page initialization or on-the-fly.
4520
+ *
4521
+ * @param {object} injectedNamesToPlugins Map from names to plugin modules.
4522
+ * @internal
4523
+ * @see {EventPluginHub.injection.injectEventPluginsByName}
4524
+ */
4525
+ injectEventPluginsByName: function (injectedNamesToPlugins) {
4526
+ var isOrderingDirty = false;
4527
+ for (var pluginName in injectedNamesToPlugins) {
4528
+ if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
4529
+ continue;
4530
+ }
4531
+ var PluginModule = injectedNamesToPlugins[pluginName];
4532
+ if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) {
4533
+ !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName) : invariant(false) : undefined;
4534
+ namesToPlugins[pluginName] = PluginModule;
4535
+ isOrderingDirty = true;
4536
+ }
4537
+ }
4538
+ if (isOrderingDirty) {
4539
+ recomputePluginOrdering();
4540
+ }
4541
+ },
4542
+
4543
+ /**
4544
+ * Looks up the plugin for the supplied event.
4545
+ *
4546
+ * @param {object} event A synthetic event.
4547
+ * @return {?object} The plugin that created the supplied event.
4548
+ * @internal
4549
+ */
4550
+ getPluginModuleForEvent: function (event) {
4551
+ var dispatchConfig = event.dispatchConfig;
4552
+ if (dispatchConfig.registrationName) {
4553
+ return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
4554
+ }
4555
+ for (var phase in dispatchConfig.phasedRegistrationNames) {
4556
+ if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) {
4557
+ continue;
4558
+ }
4559
+ var PluginModule = EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]];
4560
+ if (PluginModule) {
4561
+ return PluginModule;
4562
+ }
4563
+ }
4564
+ return null;
4565
+ },
4566
+
4567
+ /**
4568
+ * Exposed for unit testing.
4569
+ * @private
4570
+ */
4571
+ _resetEventPlugins: function () {
4572
+ EventPluginOrder = null;
4573
+ for (var pluginName in namesToPlugins) {
4574
+ if (namesToPlugins.hasOwnProperty(pluginName)) {
4575
+ delete namesToPlugins[pluginName];
4576
+ }
4577
+ }
4578
+ EventPluginRegistry.plugins.length = 0;
4579
+
4580
+ var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
4581
+ for (var eventName in eventNameDispatchConfigs) {
4582
+ if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
4583
+ delete eventNameDispatchConfigs[eventName];
4584
+ }
4585
+ }
4586
+
4587
+ var registrationNameModules = EventPluginRegistry.registrationNameModules;
4588
+ for (var registrationName in registrationNameModules) {
4589
+ if (registrationNameModules.hasOwnProperty(registrationName)) {
4590
+ delete registrationNameModules[registrationName];
4591
+ }
4592
+ }
4593
+ }
4594
+
4595
+ };
4596
+
4597
+ module.exports = EventPluginRegistry;
4598
+ }).call(this,require('_process'))
4599
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5v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gRXZlbnRQbHVnaW5SZWdpc3RyeS5yZWdpc3RyYXRpb25OYW1lTW9kdWxlcztcbiAgICBmb3IgKHZhciByZWdpc3RyYXRpb25OYW1lIGluIHJlZ2lzdHJhdGlvbk5hbWVNb2R1bGVzKSB7XG4gICAgICBpZiAocmVnaXN0cmF0aW9uTmFtZU1vZHVsZXMuaGFzT3duUHJvcGVydHkocmVnaXN0cmF0aW9uTmFtZSkpIHtcbiAgICAgICAgZGVsZXRlIHJlZ2lzdHJhdGlvbk5hbWVNb2R1bGVzW3JlZ2lzdHJhdGlvbk5hbWVdO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IEV2ZW50UGx1Z2luUmVnaXN0cnk7Il19
4600
+ },{"_process":29,"fbjs/lib/invariant":17}],47:[function(require,module,exports){
4601
+ (function (process){
4602
+ /**
4603
+ * Copyright 2013-2015, Facebook, Inc.
4604
+ * All rights reserved.
4605
+ *
4606
+ * This source code is licensed under the BSD-style license found in the
4607
+ * LICENSE file in the root directory of this source tree. An additional grant
4608
+ * of patent rights can be found in the PATENTS file in the same directory.
4609
+ *
4610
+ * @providesModule EventPluginUtils
4611
+ */
4612
+
4613
+ 'use strict';
4614
+
4615
+ var EventConstants = require('./EventConstants');
4616
+ var ReactErrorUtils = require('./ReactErrorUtils');
4617
+
4618
+ var invariant = require('fbjs/lib/invariant');
4619
+ var warning = require('fbjs/lib/warning');
4620
+
4621
+ /**
4622
+ * Injected dependencies:
4623
+ */
4624
+
4625
+ /**
4626
+ * - `Mount`: [required] Module that can convert between React dom IDs and
4627
+ * actual node references.
4628
+ */
4629
+ var injection = {
4630
+ Mount: null,
4631
+ injectMount: function (InjectedMount) {
4632
+ injection.Mount = InjectedMount;
4633
+ if (process.env.NODE_ENV !== 'production') {
4634
+ process.env.NODE_ENV !== 'production' ? warning(InjectedMount && InjectedMount.getNode && InjectedMount.getID, 'EventPluginUtils.injection.injectMount(...): Injected Mount ' + 'module is missing getNode or getID.') : undefined;
4635
+ }
4636
+ }
4637
+ };
4638
+
4639
+ var topLevelTypes = EventConstants.topLevelTypes;
4640
+
4641
+ function isEndish(topLevelType) {
4642
+ return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel;
4643
+ }
4644
+
4645
+ function isMoveish(topLevelType) {
4646
+ return topLevelType === topLevelTypes.topMouseMove || topLevelType === topLevelTypes.topTouchMove;
4647
+ }
4648
+ function isStartish(topLevelType) {
4649
+ return topLevelType === topLevelTypes.topMouseDown || topLevelType === topLevelTypes.topTouchStart;
4650
+ }
4651
+
4652
+ var validateEventDispatches;
4653
+ if (process.env.NODE_ENV !== 'production') {
4654
+ validateEventDispatches = function (event) {
4655
+ var dispatchListeners = event._dispatchListeners;
4656
+ var dispatchIDs = event._dispatchIDs;
4657
+
4658
+ var listenersIsArr = Array.isArray(dispatchListeners);
4659
+ var idsIsArr = Array.isArray(dispatchIDs);
4660
+ var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0;
4661
+ var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
4662
+
4663
+ process.env.NODE_ENV !== 'production' ? warning(idsIsArr === listenersIsArr && IDsLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : undefined;
4664
+ };
4665
+ }
4666
+
4667
+ /**
4668
+ * Dispatch the event to the listener.
4669
+ * @param {SyntheticEvent} event SyntheticEvent to handle
4670
+ * @param {boolean} simulated If the event is simulated (changes exn behavior)
4671
+ * @param {function} listener Application-level callback
4672
+ * @param {string} domID DOM id to pass to the callback.
4673
+ */
4674
+ function executeDispatch(event, simulated, listener, domID) {
4675
+ var type = event.type || 'unknown-event';
4676
+ event.currentTarget = injection.Mount.getNode(domID);
4677
+ if (simulated) {
4678
+ ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event, domID);
4679
+ } else {
4680
+ ReactErrorUtils.invokeGuardedCallback(type, listener, event, domID);
4681
+ }
4682
+ event.currentTarget = null;
4683
+ }
4684
+
4685
+ /**
4686
+ * Standard/simple iteration through an event's collected dispatches.
4687
+ */
4688
+ function executeDispatchesInOrder(event, simulated) {
4689
+ var dispatchListeners = event._dispatchListeners;
4690
+ var dispatchIDs = event._dispatchIDs;
4691
+ if (process.env.NODE_ENV !== 'production') {
4692
+ validateEventDispatches(event);
4693
+ }
4694
+ if (Array.isArray(dispatchListeners)) {
4695
+ for (var i = 0; i < dispatchListeners.length; i++) {
4696
+ if (event.isPropagationStopped()) {
4697
+ break;
4698
+ }
4699
+ // Listeners and IDs are two parallel arrays that are always in sync.
4700
+ executeDispatch(event, simulated, dispatchListeners[i], dispatchIDs[i]);
4701
+ }
4702
+ } else if (dispatchListeners) {
4703
+ executeDispatch(event, simulated, dispatchListeners, dispatchIDs);
4704
+ }
4705
+ event._dispatchListeners = null;
4706
+ event._dispatchIDs = null;
4707
+ }
4708
+
4709
+ /**
4710
+ * Standard/simple iteration through an event's collected dispatches, but stops
4711
+ * at the first dispatch execution returning true, and returns that id.
4712
+ *
4713
+ * @return {?string} id of the first dispatch execution who's listener returns
4714
+ * true, or null if no listener returned true.
4715
+ */
4716
+ function executeDispatchesInOrderStopAtTrueImpl(event) {
4717
+ var dispatchListeners = event._dispatchListeners;
4718
+ var dispatchIDs = event._dispatchIDs;
4719
+ if (process.env.NODE_ENV !== 'production') {
4720
+ validateEventDispatches(event);
4721
+ }
4722
+ if (Array.isArray(dispatchListeners)) {
4723
+ for (var i = 0; i < dispatchListeners.length; i++) {
4724
+ if (event.isPropagationStopped()) {
4725
+ break;
4726
+ }
4727
+ // Listeners and IDs are two parallel arrays that are always in sync.
4728
+ if (dispatchListeners[i](event, dispatchIDs[i])) {
4729
+ return dispatchIDs[i];
4730
+ }
4731
+ }
4732
+ } else if (dispatchListeners) {
4733
+ if (dispatchListeners(event, dispatchIDs)) {
4734
+ return dispatchIDs;
4735
+ }
4736
+ }
4737
+ return null;
4738
+ }
4739
+
4740
+ /**
4741
+ * @see executeDispatchesInOrderStopAtTrueImpl
4742
+ */
4743
+ function executeDispatchesInOrderStopAtTrue(event) {
4744
+ var ret = executeDispatchesInOrderStopAtTrueImpl(event);
4745
+ event._dispatchIDs = null;
4746
+ event._dispatchListeners = null;
4747
+ return ret;
4748
+ }
4749
+
4750
+ /**
4751
+ * Execution of a "direct" dispatch - there must be at most one dispatch
4752
+ * accumulated on the event or it is considered an error. It doesn't really make
4753
+ * sense for an event with multiple dispatches (bubbled) to keep track of the
4754
+ * return values at each dispatch execution, but it does tend to make sense when
4755
+ * dealing with "direct" dispatches.
4756
+ *
4757
+ * @return {*} The return value of executing the single dispatch.
4758
+ */
4759
+ function executeDirectDispatch(event) {
4760
+ if (process.env.NODE_ENV !== 'production') {
4761
+ validateEventDispatches(event);
4762
+ }
4763
+ var dispatchListener = event._dispatchListeners;
4764
+ var dispatchID = event._dispatchIDs;
4765
+ !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : invariant(false) : undefined;
4766
+ var res = dispatchListener ? dispatchListener(event, dispatchID) : null;
4767
+ event._dispatchListeners = null;
4768
+ event._dispatchIDs = null;
4769
+ return res;
4770
+ }
4771
+
4772
+ /**
4773
+ * @param {SyntheticEvent} event
4774
+ * @return {boolean} True iff number of dispatches accumulated is greater than 0.
4775
+ */
4776
+ function hasDispatches(event) {
4777
+ return !!event._dispatchListeners;
4778
+ }
4779
+
4780
+ /**
4781
+ * General utilities that are useful in creating custom Event Plugins.
4782
+ */
4783
+ var EventPluginUtils = {
4784
+ isEndish: isEndish,
4785
+ isMoveish: isMoveish,
4786
+ isStartish: isStartish,
4787
+
4788
+ executeDirectDispatch: executeDirectDispatch,
4789
+ executeDispatchesInOrder: executeDispatchesInOrder,
4790
+ executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
4791
+ hasDispatches: hasDispatches,
4792
+
4793
+ getNode: function (id) {
4794
+ return injection.Mount.getNode(id);
4795
+ },
4796
+ getID: function (node) {
4797
+ return injection.Mount.getID(node);
4798
+ },
4799
+
4800
+ injection: injection
4801
+ };
4802
+
4803
+ module.exports = EventPluginUtils;
4804
+ }).call(this,require('_process'))
4805
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvRXZlbnRQbHVnaW5VdGlscy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0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GVyOiBleGVjdXRlRGlzcGF0Y2hlc0luT3JkZXIsXG4gIGV4ZWN1dGVEaXNwYXRjaGVzSW5PcmRlclN0b3BBdFRydWU6IGV4ZWN1dGVEaXNwYXRjaGVzSW5PcmRlclN0b3BBdFRydWUsXG4gIGhhc0Rpc3BhdGNoZXM6IGhhc0Rpc3BhdGNoZXMsXG5cbiAgZ2V0Tm9kZTogZnVuY3Rpb24gKGlkKSB7XG4gICAgcmV0dXJuIGluamVjdGlvbi5Nb3VudC5nZXROb2RlKGlkKTtcbiAgfSxcbiAgZ2V0SUQ6IGZ1bmN0aW9uIChub2RlKSB7XG4gICAgcmV0dXJuIGluamVjdGlvbi5Nb3VudC5nZXRJRChub2RlKTtcbiAgfSxcblxuICBpbmplY3Rpb246IGluamVjdGlvblxufTtcblxubW9kdWxlLmV4cG9ydHMgPSBFdmVudFBsdWdpblV0aWxzOyJdfQ==
4806
+ },{"./EventConstants":44,"./ReactErrorUtils":86,"_process":29,"fbjs/lib/invariant":17,"fbjs/lib/warning":28}],48:[function(require,module,exports){
4807
+ (function (process){
4808
+ /**
4809
+ * Copyright 2013-2015, Facebook, Inc.
4810
+ * All rights reserved.
4811
+ *
4812
+ * This source code is licensed under the BSD-style license found in the
4813
+ * LICENSE file in the root directory of this source tree. An additional grant
4814
+ * of patent rights can be found in the PATENTS file in the same directory.
4815
+ *
4816
+ * @providesModule EventPropagators
4817
+ */
4818
+
4819
+ 'use strict';
4820
+
4821
+ var EventConstants = require('./EventConstants');
4822
+ var EventPluginHub = require('./EventPluginHub');
4823
+
4824
+ var warning = require('fbjs/lib/warning');
4825
+
4826
+ var accumulateInto = require('./accumulateInto');
4827
+ var forEachAccumulated = require('./forEachAccumulated');
4828
+
4829
+ var PropagationPhases = EventConstants.PropagationPhases;
4830
+ var getListener = EventPluginHub.getListener;
4831
+
4832
+ /**
4833
+ * Some event types have a notion of different registration names for different
4834
+ * "phases" of propagation. This finds listeners by a given phase.
4835
+ */
4836
+ function listenerAtPhase(id, event, propagationPhase) {
4837
+ var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
4838
+ return getListener(id, registrationName);
4839
+ }
4840
+
4841
+ /**
4842
+ * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
4843
+ * here, allows us to not have to bind or create functions for each event.
4844
+ * Mutating the event's members allows us to not have to create a wrapping
4845
+ * "dispatch" object that pairs the event with the listener.
4846
+ */
4847
+ function accumulateDirectionalDispatches(domID, upwards, event) {
4848
+ if (process.env.NODE_ENV !== 'production') {
4849
+ process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;
4850
+ }
4851
+ var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;
4852
+ var listener = listenerAtPhase(domID, event, phase);
4853
+ if (listener) {
4854
+ event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
4855
+ event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);
4856
+ }
4857
+ }
4858
+
4859
+ /**
4860
+ * Collect dispatches (must be entirely collected before dispatching - see unit
4861
+ * tests). Lazily allocate the array to conserve memory. We must loop through
4862
+ * each event and perform the traversal for each one. We cannot perform a
4863
+ * single traversal for the entire collection of events because each event may
4864
+ * have a different target.
4865
+ */
4866
+ function accumulateTwoPhaseDispatchesSingle(event) {
4867
+ if (event && event.dispatchConfig.phasedRegistrationNames) {
4868
+ EventPluginHub.injection.getInstanceHandle().traverseTwoPhase(event.dispatchMarker, accumulateDirectionalDispatches, event);
4869
+ }
4870
+ }
4871
+
4872
+ /**
4873
+ * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
4874
+ */
4875
+ function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
4876
+ if (event && event.dispatchConfig.phasedRegistrationNames) {
4877
+ EventPluginHub.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(event.dispatchMarker, accumulateDirectionalDispatches, event);
4878
+ }
4879
+ }
4880
+
4881
+ /**
4882
+ * Accumulates without regard to direction, does not look for phased
4883
+ * registration names. Same as `accumulateDirectDispatchesSingle` but without
4884
+ * requiring that the `dispatchMarker` be the same as the dispatched ID.
4885
+ */
4886
+ function accumulateDispatches(id, ignoredDirection, event) {
4887
+ if (event && event.dispatchConfig.registrationName) {
4888
+ var registrationName = event.dispatchConfig.registrationName;
4889
+ var listener = getListener(id, registrationName);
4890
+ if (listener) {
4891
+ event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
4892
+ event._dispatchIDs = accumulateInto(event._dispatchIDs, id);
4893
+ }
4894
+ }
4895
+ }
4896
+
4897
+ /**
4898
+ * Accumulates dispatches on an `SyntheticEvent`, but only for the
4899
+ * `dispatchMarker`.
4900
+ * @param {SyntheticEvent} event
4901
+ */
4902
+ function accumulateDirectDispatchesSingle(event) {
4903
+ if (event && event.dispatchConfig.registrationName) {
4904
+ accumulateDispatches(event.dispatchMarker, null, event);
4905
+ }
4906
+ }
4907
+
4908
+ function accumulateTwoPhaseDispatches(events) {
4909
+ forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
4910
+ }
4911
+
4912
+ function accumulateTwoPhaseDispatchesSkipTarget(events) {
4913
+ forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
4914
+ }
4915
+
4916
+ function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) {
4917
+ EventPluginHub.injection.getInstanceHandle().traverseEnterLeave(fromID, toID, accumulateDispatches, leave, enter);
4918
+ }
4919
+
4920
+ function accumulateDirectDispatches(events) {
4921
+ forEachAccumulated(events, accumulateDirectDispatchesSingle);
4922
+ }
4923
+
4924
+ /**
4925
+ * A small set of propagation patterns, each of which will accept a small amount
4926
+ * of information, and generate a set of "dispatch ready event objects" - which
4927
+ * are sets of events that have already been annotated with a set of dispatched
4928
+ * listener functions/ids. The API is designed this way to discourage these
4929
+ * propagation strategies from actually executing the dispatches, since we
4930
+ * always want to collect the entire set of dispatches before executing event a
4931
+ * single one.
4932
+ *
4933
+ * @constructor EventPropagators
4934
+ */
4935
+ var EventPropagators = {
4936
+ accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
4937
+ accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
4938
+ accumulateDirectDispatches: accumulateDirectDispatches,
4939
+ accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
4940
+ };
4941
+
4942
+ module.exports = EventPropagators;
4943
+ }).call(this,require('_process'))
4944
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvRXZlbnRQcm9wYWdhdG9ycy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0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aGVzOiBhY2N1bXVsYXRlRW50ZXJMZWF2ZURpc3BhdGNoZXNcbn07XG5cbm1vZHVsZS5leHBvcnRzID0gRXZlbnRQcm9wYWdhdG9yczsiXX0=
4945
+ },{"./EventConstants":44,"./EventPluginHub":45,"./accumulateInto":132,"./forEachAccumulated":140,"_process":29,"fbjs/lib/warning":28}],49:[function(require,module,exports){
4946
+ /**
4947
+ * Copyright 2013-2015, Facebook, Inc.
4948
+ * All rights reserved.
4949
+ *
4950
+ * This source code is licensed under the BSD-style license found in the
4951
+ * LICENSE file in the root directory of this source tree. An additional grant
4952
+ * of patent rights can be found in the PATENTS file in the same directory.
4953
+ *
4954
+ * @providesModule FallbackCompositionState
4955
+ * @typechecks static-only
4956
+ */
4957
+
4958
+ 'use strict';
4959
+
4960
+ var PooledClass = require('./PooledClass');
4961
+
4962
+ var assign = require('./Object.assign');
4963
+ var getTextContentAccessor = require('./getTextContentAccessor');
4964
+
4965
+ /**
4966
+ * This helper class stores information about text content of a target node,
4967
+ * allowing comparison of content before and after a given event.
4968
+ *
4969
+ * Identify the node where selection currently begins, then observe
4970
+ * both its text content and its current position in the DOM. Since the
4971
+ * browser may natively replace the target node during composition, we can
4972
+ * use its position to find its replacement.
4973
+ *
4974
+ * @param {DOMEventTarget} root
4975
+ */
4976
+ function FallbackCompositionState(root) {
4977
+ this._root = root;
4978
+ this._startText = this.getText();
4979
+ this._fallbackText = null;
4980
+ }
4981
+
4982
+ assign(FallbackCompositionState.prototype, {
4983
+ destructor: function () {
4984
+ this._root = null;
4985
+ this._startText = null;
4986
+ this._fallbackText = null;
4987
+ },
4988
+
4989
+ /**
4990
+ * Get current text of input.
4991
+ *
4992
+ * @return {string}
4993
+ */
4994
+ getText: function () {
4995
+ if ('value' in this._root) {
4996
+ return this._root.value;
4997
+ }
4998
+ return this._root[getTextContentAccessor()];
4999
+ },
5000
+
5001
+ /**
5002
+ * Determine the differing substring between the initially stored
5003
+ * text content and the current content.
5004
+ *
5005
+ * @return {string}
5006
+ */
5007
+ getData: function () {
5008
+ if (this._fallbackText) {
5009
+ return this._fallbackText;
5010
+ }
5011
+
5012
+ var start;
5013
+ var startValue = this._startText;
5014
+ var startLength = startValue.length;
5015
+ var end;
5016
+ var endValue = this.getText();
5017
+ var endLength = endValue.length;
5018
+
5019
+ for (start = 0; start < startLength; start++) {
5020
+ if (startValue[start] !== endValue[start]) {
5021
+ break;
5022
+ }
5023
+ }
5024
+
5025
+ var minEnd = startLength - start;
5026
+ for (end = 1; end <= minEnd; end++) {
5027
+ if (startValue[startLength - end] !== endValue[endLength - end]) {
5028
+ break;
5029
+ }
5030
+ }
5031
+
5032
+ var sliceTail = end > 1 ? 1 - end : undefined;
5033
+ this._fallbackText = endValue.slice(start, sliceTail);
5034
+ return this._fallbackText;
5035
+ }
5036
+ });
5037
+
5038
+ PooledClass.addPoolingTo(FallbackCompositionState);
5039
+
5040
+ module.exports = FallbackCompositionState;
5041
+ },{"./Object.assign":52,"./PooledClass":53,"./getTextContentAccessor":147}],50:[function(require,module,exports){
5042
+ /**
5043
+ * Copyright 2013-2015, Facebook, Inc.
5044
+ * All rights reserved.
5045
+ *
5046
+ * This source code is licensed under the BSD-style license found in the
5047
+ * LICENSE file in the root directory of this source tree. An additional grant
5048
+ * of patent rights can be found in the PATENTS file in the same directory.
5049
+ *
5050
+ * @providesModule HTMLDOMPropertyConfig
5051
+ */
5052
+
5053
+ 'use strict';
5054
+
5055
+ var DOMProperty = require('./DOMProperty');
5056
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
5057
+
5058
+ var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
5059
+ var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
5060
+ var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
5061
+ var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS;
5062
+ var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
5063
+ var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
5064
+ var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
5065
+
5066
+ var hasSVG;
5067
+ if (ExecutionEnvironment.canUseDOM) {
5068
+ var implementation = document.implementation;
5069
+ hasSVG = implementation && implementation.hasFeature && implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1');
5070
+ }
5071
+
5072
+ var HTMLDOMPropertyConfig = {
5073
+ isCustomAttribute: RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),
5074
+ Properties: {
5075
+ /**
5076
+ * Standard Properties
5077
+ */
5078
+ accept: null,
5079
+ acceptCharset: null,
5080
+ accessKey: null,
5081
+ action: null,
5082
+ allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
5083
+ allowTransparency: MUST_USE_ATTRIBUTE,
5084
+ alt: null,
5085
+ async: HAS_BOOLEAN_VALUE,
5086
+ autoComplete: null,
5087
+ // autoFocus is polyfilled/normalized by AutoFocusUtils
5088
+ // autoFocus: HAS_BOOLEAN_VALUE,
5089
+ autoPlay: HAS_BOOLEAN_VALUE,
5090
+ capture: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
5091
+ cellPadding: null,
5092
+ cellSpacing: null,
5093
+ charSet: MUST_USE_ATTRIBUTE,
5094
+ challenge: MUST_USE_ATTRIBUTE,
5095
+ checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
5096
+ classID: MUST_USE_ATTRIBUTE,
5097
+ // To set className on SVG elements, it's necessary to use .setAttribute;
5098
+ // this works on HTML elements too in all browsers except IE8. Conveniently,
5099
+ // IE8 doesn't support SVG and so we can simply use the attribute in
5100
+ // browsers that support SVG and the property in browsers that don't,
5101
+ // regardless of whether the element is HTML or SVG.
5102
+ className: hasSVG ? MUST_USE_ATTRIBUTE : MUST_USE_PROPERTY,
5103
+ cols: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
5104
+ colSpan: null,
5105
+ content: null,
5106
+ contentEditable: null,
5107
+ contextMenu: MUST_USE_ATTRIBUTE,
5108
+ controls: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
5109
+ coords: null,
5110
+ crossOrigin: null,
5111
+ data: null, // For `<object />` acts as `src`.
5112
+ dateTime: MUST_USE_ATTRIBUTE,
5113
+ 'default': HAS_BOOLEAN_VALUE,
5114
+ defer: HAS_BOOLEAN_VALUE,
5115
+ dir: null,
5116
+ disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
5117
+ download: HAS_OVERLOADED_BOOLEAN_VALUE,
5118
+ draggable: null,
5119
+ encType: null,
5120
+ form: MUST_USE_ATTRIBUTE,
5121
+ formAction: MUST_USE_ATTRIBUTE,
5122
+ formEncType: MUST_USE_ATTRIBUTE,
5123
+ formMethod: MUST_USE_ATTRIBUTE,
5124
+ formNoValidate: HAS_BOOLEAN_VALUE,
5125
+ formTarget: MUST_USE_ATTRIBUTE,
5126
+ frameBorder: MUST_USE_ATTRIBUTE,
5127
+ headers: null,
5128
+ height: MUST_USE_ATTRIBUTE,
5129
+ hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
5130
+ high: null,
5131
+ href: null,
5132
+ hrefLang: null,
5133
+ htmlFor: null,
5134
+ httpEquiv: null,
5135
+ icon: null,
5136
+ id: MUST_USE_PROPERTY,
5137
+ inputMode: MUST_USE_ATTRIBUTE,
5138
+ integrity: null,
5139
+ is: MUST_USE_ATTRIBUTE,
5140
+ keyParams: MUST_USE_ATTRIBUTE,
5141
+ keyType: MUST_USE_ATTRIBUTE,
5142
+ kind: null,
5143
+ label: null,
5144
+ lang: null,
5145
+ list: MUST_USE_ATTRIBUTE,
5146
+ loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
5147
+ low: null,
5148
+ manifest: MUST_USE_ATTRIBUTE,
5149
+ marginHeight: null,
5150
+ marginWidth: null,
5151
+ max: null,
5152
+ maxLength: MUST_USE_ATTRIBUTE,
5153
+ media: MUST_USE_ATTRIBUTE,
5154
+ mediaGroup: null,
5155
+ method: null,
5156
+ min: null,
5157
+ minLength: MUST_USE_ATTRIBUTE,
5158
+ multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
5159
+ muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
5160
+ name: null,
5161
+ nonce: MUST_USE_ATTRIBUTE,
5162
+ noValidate: HAS_BOOLEAN_VALUE,
5163
+ open: HAS_BOOLEAN_VALUE,
5164
+ optimum: null,
5165
+ pattern: null,
5166
+ placeholder: null,
5167
+ poster: null,
5168
+ preload: null,
5169
+ radioGroup: null,
5170
+ readOnly: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
5171
+ rel: null,
5172
+ required: HAS_BOOLEAN_VALUE,
5173
+ reversed: HAS_BOOLEAN_VALUE,
5174
+ role: MUST_USE_ATTRIBUTE,
5175
+ rows: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
5176
+ rowSpan: null,
5177
+ sandbox: null,
5178
+ scope: null,
5179
+ scoped: HAS_BOOLEAN_VALUE,
5180
+ scrolling: null,
5181
+ seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
5182
+ selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
5183
+ shape: null,
5184
+ size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
5185
+ sizes: MUST_USE_ATTRIBUTE,
5186
+ span: HAS_POSITIVE_NUMERIC_VALUE,
5187
+ spellCheck: null,
5188
+ src: null,
5189
+ srcDoc: MUST_USE_PROPERTY,
5190
+ srcLang: null,
5191
+ srcSet: MUST_USE_ATTRIBUTE,
5192
+ start: HAS_NUMERIC_VALUE,
5193
+ step: null,
5194
+ style: null,
5195
+ summary: null,
5196
+ tabIndex: null,
5197
+ target: null,
5198
+ title: null,
5199
+ type: null,
5200
+ useMap: null,
5201
+ value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS,
5202
+ width: MUST_USE_ATTRIBUTE,
5203
+ wmode: MUST_USE_ATTRIBUTE,
5204
+ wrap: null,
5205
+
5206
+ /**
5207
+ * RDFa Properties
5208
+ */
5209
+ about: MUST_USE_ATTRIBUTE,
5210
+ datatype: MUST_USE_ATTRIBUTE,
5211
+ inlist: MUST_USE_ATTRIBUTE,
5212
+ prefix: MUST_USE_ATTRIBUTE,
5213
+ // property is also supported for OpenGraph in meta tags.
5214
+ property: MUST_USE_ATTRIBUTE,
5215
+ resource: MUST_USE_ATTRIBUTE,
5216
+ 'typeof': MUST_USE_ATTRIBUTE,
5217
+ vocab: MUST_USE_ATTRIBUTE,
5218
+
5219
+ /**
5220
+ * Non-standard Properties
5221
+ */
5222
+ // autoCapitalize and autoCorrect are supported in Mobile Safari for
5223
+ // keyboard hints.
5224
+ autoCapitalize: MUST_USE_ATTRIBUTE,
5225
+ autoCorrect: MUST_USE_ATTRIBUTE,
5226
+ // autoSave allows WebKit/Blink to persist values of input fields on page reloads
5227
+ autoSave: null,
5228
+ // color is for Safari mask-icon link
5229
+ color: null,
5230
+ // itemProp, itemScope, itemType are for
5231
+ // Microdata support. See http://schema.org/docs/gs.html
5232
+ itemProp: MUST_USE_ATTRIBUTE,
5233
+ itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
5234
+ itemType: MUST_USE_ATTRIBUTE,
5235
+ // itemID and itemRef are for Microdata support as well but
5236
+ // only specified in the the WHATWG spec document. See
5237
+ // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
5238
+ itemID: MUST_USE_ATTRIBUTE,
5239
+ itemRef: MUST_USE_ATTRIBUTE,
5240
+ // results show looking glass icon and recent searches on input
5241
+ // search fields in WebKit/Blink
5242
+ results: null,
5243
+ // IE-only attribute that specifies security restrictions on an iframe
5244
+ // as an alternative to the sandbox attribute on IE<10
5245
+ security: MUST_USE_ATTRIBUTE,
5246
+ // IE-only attribute that controls focus behavior
5247
+ unselectable: MUST_USE_ATTRIBUTE
5248
+ },
5249
+ DOMAttributeNames: {
5250
+ acceptCharset: 'accept-charset',
5251
+ className: 'class',
5252
+ htmlFor: 'for',
5253
+ httpEquiv: 'http-equiv'
5254
+ },
5255
+ DOMPropertyNames: {
5256
+ autoComplete: 'autocomplete',
5257
+ autoFocus: 'autofocus',
5258
+ autoPlay: 'autoplay',
5259
+ autoSave: 'autosave',
5260
+ // `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter.
5261
+ // http://www.w3.org/TR/html5/forms.html#dom-fs-encoding
5262
+ encType: 'encoding',
5263
+ hrefLang: 'hreflang',
5264
+ radioGroup: 'radiogroup',
5265
+ spellCheck: 'spellcheck',
5266
+ srcDoc: 'srcdoc',
5267
+ srcSet: 'srcset'
5268
+ }
5269
+ };
5270
+
5271
+ module.exports = HTMLDOMPropertyConfig;
5272
+ },{"./DOMProperty":39,"fbjs/lib/ExecutionEnvironment":3}],51:[function(require,module,exports){
5273
+ (function (process){
5274
+ /**
5275
+ * Copyright 2013-2015, Facebook, Inc.
5276
+ * All rights reserved.
5277
+ *
5278
+ * This source code is licensed under the BSD-style license found in the
5279
+ * LICENSE file in the root directory of this source tree. An additional grant
5280
+ * of patent rights can be found in the PATENTS file in the same directory.
5281
+ *
5282
+ * @providesModule LinkedValueUtils
5283
+ * @typechecks static-only
5284
+ */
5285
+
5286
+ 'use strict';
5287
+
5288
+ var ReactPropTypes = require('./ReactPropTypes');
5289
+ var ReactPropTypeLocations = require('./ReactPropTypeLocations');
5290
+
5291
+ var invariant = require('fbjs/lib/invariant');
5292
+ var warning = require('fbjs/lib/warning');
5293
+
5294
+ var hasReadOnlyValue = {
5295
+ 'button': true,
5296
+ 'checkbox': true,
5297
+ 'image': true,
5298
+ 'hidden': true,
5299
+ 'radio': true,
5300
+ 'reset': true,
5301
+ 'submit': true
5302
+ };
5303
+
5304
+ function _assertSingleLink(inputProps) {
5305
+ !(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use ' + 'checkedLink, you probably don\'t want to use valueLink and vice versa.') : invariant(false) : undefined;
5306
+ }
5307
+ function _assertValueLink(inputProps) {
5308
+ _assertSingleLink(inputProps);
5309
+ !(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want ' + 'to use value or onChange, you probably don\'t want to use valueLink.') : invariant(false) : undefined;
5310
+ }
5311
+
5312
+ function _assertCheckedLink(inputProps) {
5313
+ _assertSingleLink(inputProps);
5314
+ !(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. ' + 'If you want to use checked or onChange, you probably don\'t want to ' + 'use checkedLink') : invariant(false) : undefined;
5315
+ }
5316
+
5317
+ var propTypes = {
5318
+ value: function (props, propName, componentName) {
5319
+ if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
5320
+ return null;
5321
+ }
5322
+ return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
5323
+ },
5324
+ checked: function (props, propName, componentName) {
5325
+ if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
5326
+ return null;
5327
+ }
5328
+ return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
5329
+ },
5330
+ onChange: ReactPropTypes.func
5331
+ };
5332
+
5333
+ var loggedTypeFailures = {};
5334
+ function getDeclarationErrorAddendum(owner) {
5335
+ if (owner) {
5336
+ var name = owner.getName();
5337
+ if (name) {
5338
+ return ' Check the render method of `' + name + '`.';
5339
+ }
5340
+ }
5341
+ return '';
5342
+ }
5343
+
5344
+ /**
5345
+ * Provide a linked `value` attribute for controlled forms. You should not use
5346
+ * this outside of the ReactDOM controlled form components.
5347
+ */
5348
+ var LinkedValueUtils = {
5349
+ checkPropTypes: function (tagName, props, owner) {
5350
+ for (var propName in propTypes) {
5351
+ if (propTypes.hasOwnProperty(propName)) {
5352
+ var error = propTypes[propName](props, propName, tagName, ReactPropTypeLocations.prop);
5353
+ }
5354
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
5355
+ // Only monitor this failure once because there tends to be a lot of the
5356
+ // same error.
5357
+ loggedTypeFailures[error.message] = true;
5358
+
5359
+ var addendum = getDeclarationErrorAddendum(owner);
5360
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : undefined;
5361
+ }
5362
+ }
5363
+ },
5364
+
5365
+ /**
5366
+ * @param {object} inputProps Props for form component
5367
+ * @return {*} current value of the input either from value prop or link.
5368
+ */
5369
+ getValue: function (inputProps) {
5370
+ if (inputProps.valueLink) {
5371
+ _assertValueLink(inputProps);
5372
+ return inputProps.valueLink.value;
5373
+ }
5374
+ return inputProps.value;
5375
+ },
5376
+
5377
+ /**
5378
+ * @param {object} inputProps Props for form component
5379
+ * @return {*} current checked status of the input either from checked prop
5380
+ * or link.
5381
+ */
5382
+ getChecked: function (inputProps) {
5383
+ if (inputProps.checkedLink) {
5384
+ _assertCheckedLink(inputProps);
5385
+ return inputProps.checkedLink.value;
5386
+ }
5387
+ return inputProps.checked;
5388
+ },
5389
+
5390
+ /**
5391
+ * @param {object} inputProps Props for form component
5392
+ * @param {SyntheticEvent} event change event to handle
5393
+ */
5394
+ executeOnChange: function (inputProps, event) {
5395
+ if (inputProps.valueLink) {
5396
+ _assertValueLink(inputProps);
5397
+ return inputProps.valueLink.requestChange(event.target.value);
5398
+ } else if (inputProps.checkedLink) {
5399
+ _assertCheckedLink(inputProps);
5400
+ return inputProps.checkedLink.requestChange(event.target.checked);
5401
+ } else if (inputProps.onChange) {
5402
+ return inputProps.onChange.call(undefined, event);
5403
+ }
5404
+ }
5405
+ };
5406
+
5407
+ module.exports = LinkedValueUtils;
5408
+ }).call(this,require('_process'))
5409
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvTGlua2VkVmFsdWVVdGlscy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0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cyk7XG4gICAgICByZXR1cm4gaW5wdXRQcm9wcy5jaGVja2VkTGluay52YWx1ZTtcbiAgICB9XG4gICAgcmV0dXJuIGlucHV0UHJvcHMuY2hlY2tlZDtcbiAgfSxcblxuICAvKipcbiAgICogQHBhcmFtIHtvYmplY3R9IGlucHV0UHJvcHMgUHJvcHMgZm9yIGZvcm0gY29tcG9uZW50XG4gICAqIEBwYXJhbSB7U3ludGhldGljRXZlbnR9IGV2ZW50IGNoYW5nZSBldmVudCB0byBoYW5kbGVcbiAgICovXG4gIGV4ZWN1dGVPbkNoYW5nZTogZnVuY3Rpb24gKGlucHV0UHJvcHMsIGV2ZW50KSB7XG4gICAgaWYgKGlucHV0UHJvcHMudmFsdWVMaW5rKSB7XG4gICAgICBfYXNzZXJ0VmFsdWVMaW5rKGlucHV0UHJvcHMpO1xuICAgICAgcmV0dXJuIGlucHV0UHJvcHMudmFsdWVMaW5rLnJlcXVlc3RDaGFuZ2UoZXZlbnQudGFyZ2V0LnZhbHVlKTtcbiAgICB9IGVsc2UgaWYgKGlucHV0UHJvcHMuY2hlY2tlZExpbmspIHtcbiAgICAgIF9hc3NlcnRDaGVja2VkTGluayhpbnB1dFByb3BzKTtcbiAgICAgIHJldHVybiBpbnB1dFByb3BzLmNoZWNrZWRMaW5rLnJlcXVlc3RDaGFuZ2UoZXZlbnQudGFyZ2V0LmNoZWNrZWQpO1xuICAgIH0gZWxzZSBpZiAoaW5wdXRQcm9wcy5vbkNoYW5nZSkge1xuICAgICAgcmV0dXJuIGlucHV0UHJvcHMub25DaGFuZ2UuY2FsbCh1bmRlZmluZWQsIGV2ZW50KTtcbiAgICB9XG4gIH1cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gTGlua2VkVmFsdWVVdGlsczsiXX0=
5410
+ },{"./ReactPropTypeLocations":103,"./ReactPropTypes":104,"_process":29,"fbjs/lib/invariant":17,"fbjs/lib/warning":28}],52:[function(require,module,exports){
5411
+ /**
5412
+ * Copyright 2014-2015, Facebook, Inc.
5413
+ * All rights reserved.
5414
+ *
5415
+ * This source code is licensed under the BSD-style license found in the
5416
+ * LICENSE file in the root directory of this source tree. An additional grant
5417
+ * of patent rights can be found in the PATENTS file in the same directory.
5418
+ *
5419
+ * @providesModule Object.assign
5420
+ */
5421
+
5422
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign
5423
+
5424
+ 'use strict';
5425
+
5426
+ function assign(target, sources) {
5427
+ if (target == null) {
5428
+ throw new TypeError('Object.assign target cannot be null or undefined');
5429
+ }
5430
+
5431
+ var to = Object(target);
5432
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
5433
+
5434
+ for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
5435
+ var nextSource = arguments[nextIndex];
5436
+ if (nextSource == null) {
5437
+ continue;
5438
+ }
5439
+
5440
+ var from = Object(nextSource);
5441
+
5442
+ // We don't currently support accessors nor proxies. Therefore this
5443
+ // copy cannot throw. If we ever supported this then we must handle
5444
+ // exceptions and side-effects. We don't support symbols so they won't
5445
+ // be transferred.
5446
+
5447
+ for (var key in from) {
5448
+ if (hasOwnProperty.call(from, key)) {
5449
+ to[key] = from[key];
5450
+ }
5451
+ }
5452
+ }
5453
+
5454
+ return to;
5455
+ }
5456
+
5457
+ module.exports = assign;
5458
+ },{}],53:[function(require,module,exports){
5459
+ (function (process){
5460
+ /**
5461
+ * Copyright 2013-2015, Facebook, Inc.
5462
+ * All rights reserved.
5463
+ *
5464
+ * This source code is licensed under the BSD-style license found in the
5465
+ * LICENSE file in the root directory of this source tree. An additional grant
5466
+ * of patent rights can be found in the PATENTS file in the same directory.
5467
+ *
5468
+ * @providesModule PooledClass
5469
+ */
5470
+
5471
+ 'use strict';
5472
+
5473
+ var invariant = require('fbjs/lib/invariant');
5474
+
5475
+ /**
5476
+ * Static poolers. Several custom versions for each potential number of
5477
+ * arguments. A completely generic pooler is easy to implement, but would
5478
+ * require accessing the `arguments` object. In each of these, `this` refers to
5479
+ * the Class itself, not an instance. If any others are needed, simply add them
5480
+ * here, or in their own files.
5481
+ */
5482
+ var oneArgumentPooler = function (copyFieldsFrom) {
5483
+ var Klass = this;
5484
+ if (Klass.instancePool.length) {
5485
+ var instance = Klass.instancePool.pop();
5486
+ Klass.call(instance, copyFieldsFrom);
5487
+ return instance;
5488
+ } else {
5489
+ return new Klass(copyFieldsFrom);
5490
+ }
5491
+ };
5492
+
5493
+ var twoArgumentPooler = function (a1, a2) {
5494
+ var Klass = this;
5495
+ if (Klass.instancePool.length) {
5496
+ var instance = Klass.instancePool.pop();
5497
+ Klass.call(instance, a1, a2);
5498
+ return instance;
5499
+ } else {
5500
+ return new Klass(a1, a2);
5501
+ }
5502
+ };
5503
+
5504
+ var threeArgumentPooler = function (a1, a2, a3) {
5505
+ var Klass = this;
5506
+ if (Klass.instancePool.length) {
5507
+ var instance = Klass.instancePool.pop();
5508
+ Klass.call(instance, a1, a2, a3);
5509
+ return instance;
5510
+ } else {
5511
+ return new Klass(a1, a2, a3);
5512
+ }
5513
+ };
5514
+
5515
+ var fourArgumentPooler = function (a1, a2, a3, a4) {
5516
+ var Klass = this;
5517
+ if (Klass.instancePool.length) {
5518
+ var instance = Klass.instancePool.pop();
5519
+ Klass.call(instance, a1, a2, a3, a4);
5520
+ return instance;
5521
+ } else {
5522
+ return new Klass(a1, a2, a3, a4);
5523
+ }
5524
+ };
5525
+
5526
+ var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
5527
+ var Klass = this;
5528
+ if (Klass.instancePool.length) {
5529
+ var instance = Klass.instancePool.pop();
5530
+ Klass.call(instance, a1, a2, a3, a4, a5);
5531
+ return instance;
5532
+ } else {
5533
+ return new Klass(a1, a2, a3, a4, a5);
5534
+ }
5535
+ };
5536
+
5537
+ var standardReleaser = function (instance) {
5538
+ var Klass = this;
5539
+ !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : invariant(false) : undefined;
5540
+ instance.destructor();
5541
+ if (Klass.instancePool.length < Klass.poolSize) {
5542
+ Klass.instancePool.push(instance);
5543
+ }
5544
+ };
5545
+
5546
+ var DEFAULT_POOL_SIZE = 10;
5547
+ var DEFAULT_POOLER = oneArgumentPooler;
5548
+
5549
+ /**
5550
+ * Augments `CopyConstructor` to be a poolable class, augmenting only the class
5551
+ * itself (statically) not adding any prototypical fields. Any CopyConstructor
5552
+ * you give this may have a `poolSize` property, and will look for a
5553
+ * prototypical `destructor` on instances (optional).
5554
+ *
5555
+ * @param {Function} CopyConstructor Constructor that can be used to reset.
5556
+ * @param {Function} pooler Customizable pooler.
5557
+ */
5558
+ var addPoolingTo = function (CopyConstructor, pooler) {
5559
+ var NewKlass = CopyConstructor;
5560
+ NewKlass.instancePool = [];
5561
+ NewKlass.getPooled = pooler || DEFAULT_POOLER;
5562
+ if (!NewKlass.poolSize) {
5563
+ NewKlass.poolSize = DEFAULT_POOL_SIZE;
5564
+ }
5565
+ NewKlass.release = standardReleaser;
5566
+ return NewKlass;
5567
+ };
5568
+
5569
+ var PooledClass = {
5570
+ addPoolingTo: addPoolingTo,
5571
+ oneArgumentPooler: oneArgumentPooler,
5572
+ twoArgumentPooler: twoArgumentPooler,
5573
+ threeArgumentPooler: threeArgumentPooler,
5574
+ fourArgumentPooler: fourArgumentPooler,
5575
+ fiveArgumentPooler: fiveArgumentPooler
5576
+ };
5577
+
5578
+ module.exports = PooledClass;
5579
+ }).call(this,require('_process'))
5580
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUG9vbGVkQ2xhc3MuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0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UFyZ3VtZW50UG9vbGVyLFxuICB0d29Bcmd1bWVudFBvb2xlcjogdHdvQXJndW1lbnRQb29sZXIsXG4gIHRocmVlQXJndW1lbnRQb29sZXI6IHRocmVlQXJndW1lbnRQb29sZXIsXG4gIGZvdXJBcmd1bWVudFBvb2xlcjogZm91ckFyZ3VtZW50UG9vbGVyLFxuICBmaXZlQXJndW1lbnRQb29sZXI6IGZpdmVBcmd1bWVudFBvb2xlclxufTtcblxubW9kdWxlLmV4cG9ydHMgPSBQb29sZWRDbGFzczsiXX0=
5581
+ },{"_process":29,"fbjs/lib/invariant":17}],54:[function(require,module,exports){
5582
+ /**
5583
+ * Copyright 2013-2015, Facebook, Inc.
5584
+ * All rights reserved.
5585
+ *
5586
+ * This source code is licensed under the BSD-style license found in the
5587
+ * LICENSE file in the root directory of this source tree. An additional grant
5588
+ * of patent rights can be found in the PATENTS file in the same directory.
5589
+ *
5590
+ * @providesModule React
5591
+ */
5592
+
5593
+ 'use strict';
5594
+
5595
+ var ReactDOM = require('./ReactDOM');
5596
+ var ReactDOMServer = require('./ReactDOMServer');
5597
+ var ReactIsomorphic = require('./ReactIsomorphic');
5598
+
5599
+ var assign = require('./Object.assign');
5600
+ var deprecated = require('./deprecated');
5601
+
5602
+ // `version` will be added here by ReactIsomorphic.
5603
+ var React = {};
5604
+
5605
+ assign(React, ReactIsomorphic);
5606
+
5607
+ assign(React, {
5608
+ // ReactDOM
5609
+ findDOMNode: deprecated('findDOMNode', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.findDOMNode),
5610
+ render: deprecated('render', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.render),
5611
+ unmountComponentAtNode: deprecated('unmountComponentAtNode', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.unmountComponentAtNode),
5612
+
5613
+ // ReactDOMServer
5614
+ renderToString: deprecated('renderToString', 'ReactDOMServer', 'react-dom/server', ReactDOMServer, ReactDOMServer.renderToString),
5615
+ renderToStaticMarkup: deprecated('renderToStaticMarkup', 'ReactDOMServer', 'react-dom/server', ReactDOMServer, ReactDOMServer.renderToStaticMarkup)
5616
+ });
5617
+
5618
+ React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOM;
5619
+ React.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOMServer;
5620
+
5621
+ module.exports = React;
5622
+ },{"./Object.assign":52,"./ReactDOM":65,"./ReactDOMServer":75,"./ReactIsomorphic":93,"./deprecated":136}],55:[function(require,module,exports){
5623
+ (function (process){
5624
+ /**
5625
+ * Copyright 2013-2015, Facebook, Inc.
5626
+ * All rights reserved.
5627
+ *
5628
+ * This source code is licensed under the BSD-style license found in the
5629
+ * LICENSE file in the root directory of this source tree. An additional grant
5630
+ * of patent rights can be found in the PATENTS file in the same directory.
5631
+ *
5632
+ * @providesModule ReactBrowserComponentMixin
5633
+ */
5634
+
5635
+ 'use strict';
5636
+
5637
+ var ReactInstanceMap = require('./ReactInstanceMap');
5638
+
5639
+ var findDOMNode = require('./findDOMNode');
5640
+ var warning = require('fbjs/lib/warning');
5641
+
5642
+ var didWarnKey = '_getDOMNodeDidWarn';
5643
+
5644
+ var ReactBrowserComponentMixin = {
5645
+ /**
5646
+ * Returns the DOM node rendered by this component.
5647
+ *
5648
+ * @return {DOMElement} The root node of this component.
5649
+ * @final
5650
+ * @protected
5651
+ */
5652
+ getDOMNode: function () {
5653
+ process.env.NODE_ENV !== 'production' ? warning(this.constructor[didWarnKey], '%s.getDOMNode(...) is deprecated. Please use ' + 'ReactDOM.findDOMNode(instance) instead.', ReactInstanceMap.get(this).getName() || this.tagName || 'Unknown') : undefined;
5654
+ this.constructor[didWarnKey] = true;
5655
+ return findDOMNode(this);
5656
+ }
5657
+ };
5658
+
5659
+ module.exports = ReactBrowserComponentMixin;
5660
+ }).call(this,require('_process'))
5661
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2Vz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XJlKCcuL2ZpbmRET01Ob2RlJyk7XG52YXIgd2FybmluZyA9IHJlcXVpcmUoJ2ZianMvbGliL3dhcm5pbmcnKTtcblxudmFyIGRpZFdhcm5LZXkgPSAnX2dldERPTU5vZGVEaWRXYXJuJztcblxudmFyIFJlYWN0QnJvd3NlckNvbXBvbmVudE1peGluID0ge1xuICAvKipcbiAgICogUmV0dXJucyB0aGUgRE9NIG5vZGUgcmVuZGVyZWQgYnkgdGhpcyBjb21wb25lbnQuXG4gICAqXG4gICAqIEByZXR1cm4ge0RPTUVsZW1lbnR9IFRoZSByb290IG5vZGUgb2YgdGhpcyBjb21wb25lbnQuXG4gICAqIEBmaW5hbFxuICAgKiBAcHJvdGVjdGVkXG4gICAqL1xuICBnZXRET01Ob2RlOiBmdW5jdGlvbiAoKSB7XG4gICAgcHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdwcm9kdWN0aW9uJyA/IHdhcm5pbmcodGhpcy5jb25zdHJ1Y3RvcltkaWRXYXJuS2V5XSwgJyVzLmdldERPTU5vZGUoLi4uKSBpcyBkZXByZWNhdGVkLiBQbGVhc2UgdXNlICcgKyAnUmVhY3RET00uZmluZERPTU5vZGUoaW5zdGFuY2UpIGluc3RlYWQuJywgUmVhY3RJbnN0YW5jZU1hcC5nZXQodGhpcykuZ2V0TmFtZSgpIHx8IHRoaXMudGFnTmFtZSB8fCAnVW5rbm93bicpIDogdW5kZWZpbmVkO1xuICAgIHRoaXMuY29uc3RydWN0b3JbZGlkV2FybktleV0gPSB0cnVlO1xuICAgIHJldHVybiBmaW5kRE9NTm9kZSh0aGlzKTtcbiAgfVxufTtcblxubW9kdWxlLmV4cG9ydHMgPSBSZWFjdEJyb3dzZXJDb21wb25lbnRNaXhpbjsiXX0=
5662
+ },{"./ReactInstanceMap":92,"./findDOMNode":138,"_process":29,"fbjs/lib/warning":28}],56:[function(require,module,exports){
5663
+ /**
5664
+ * Copyright 2013-2015, Facebook, Inc.
5665
+ * All rights reserved.
5666
+ *
5667
+ * This source code is licensed under the BSD-style license found in the
5668
+ * LICENSE file in the root directory of this source tree. An additional grant
5669
+ * of patent rights can be found in the PATENTS file in the same directory.
5670
+ *
5671
+ * @providesModule ReactBrowserEventEmitter
5672
+ * @typechecks static-only
5673
+ */
5674
+
5675
+ 'use strict';
5676
+
5677
+ var EventConstants = require('./EventConstants');
5678
+ var EventPluginHub = require('./EventPluginHub');
5679
+ var EventPluginRegistry = require('./EventPluginRegistry');
5680
+ var ReactEventEmitterMixin = require('./ReactEventEmitterMixin');
5681
+ var ReactPerf = require('./ReactPerf');
5682
+ var ViewportMetrics = require('./ViewportMetrics');
5683
+
5684
+ var assign = require('./Object.assign');
5685
+ var isEventSupported = require('./isEventSupported');
5686
+
5687
+ /**
5688
+ * Summary of `ReactBrowserEventEmitter` event handling:
5689
+ *
5690
+ * - Top-level delegation is used to trap most native browser events. This
5691
+ * may only occur in the main thread and is the responsibility of
5692
+ * ReactEventListener, which is injected and can therefore support pluggable
5693
+ * event sources. This is the only work that occurs in the main thread.
5694
+ *
5695
+ * - We normalize and de-duplicate events to account for browser quirks. This
5696
+ * may be done in the worker thread.
5697
+ *
5698
+ * - Forward these native events (with the associated top-level type used to
5699
+ * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
5700
+ * to extract any synthetic events.
5701
+ *
5702
+ * - The `EventPluginHub` will then process each event by annotating them with
5703
+ * "dispatches", a sequence of listeners and IDs that care about that event.
5704
+ *
5705
+ * - The `EventPluginHub` then dispatches the events.
5706
+ *
5707
+ * Overview of React and the event system:
5708
+ *
5709
+ * +------------+ .
5710
+ * | DOM | .
5711
+ * +------------+ .
5712
+ * | .
5713
+ * v .
5714
+ * +------------+ .
5715
+ * | ReactEvent | .
5716
+ * | Listener | .
5717
+ * +------------+ . +-----------+
5718
+ * | . +--------+|SimpleEvent|
5719
+ * | . | |Plugin |
5720
+ * +-----|------+ . v +-----------+
5721
+ * | | | . +--------------+ +------------+
5722
+ * | +-----------.--->|EventPluginHub| | Event |
5723
+ * | | . | | +-----------+ | Propagators|
5724
+ * | ReactEvent | . | | |TapEvent | |------------|
5725
+ * | Emitter | . | |<---+|Plugin | |other plugin|
5726
+ * | | . | | +-----------+ | utilities |
5727
+ * | +-----------.--->| | +------------+
5728
+ * | | | . +--------------+
5729
+ * +-----|------+ . ^ +-----------+
5730
+ * | . | |Enter/Leave|
5731
+ * + . +-------+|Plugin |
5732
+ * +-------------+ . +-----------+
5733
+ * | application | .
5734
+ * |-------------| .
5735
+ * | | .
5736
+ * | | .
5737
+ * +-------------+ .
5738
+ * .
5739
+ * React Core . General Purpose Event Plugin System
5740
+ */
5741
+
5742
+ var alreadyListeningTo = {};
5743
+ var isMonitoringScrollValue = false;
5744
+ var reactTopListenersCounter = 0;
5745
+
5746
+ // For events like 'submit' which don't consistently bubble (which we trap at a
5747
+ // lower node than `document`), binding at `document` would cause duplicate
5748
+ // events so we don't include them here
5749
+ var topEventMapping = {
5750
+ topAbort: 'abort',
5751
+ topBlur: 'blur',
5752
+ topCanPlay: 'canplay',
5753
+ topCanPlayThrough: 'canplaythrough',
5754
+ topChange: 'change',
5755
+ topClick: 'click',
5756
+ topCompositionEnd: 'compositionend',
5757
+ topCompositionStart: 'compositionstart',
5758
+ topCompositionUpdate: 'compositionupdate',
5759
+ topContextMenu: 'contextmenu',
5760
+ topCopy: 'copy',
5761
+ topCut: 'cut',
5762
+ topDoubleClick: 'dblclick',
5763
+ topDrag: 'drag',
5764
+ topDragEnd: 'dragend',
5765
+ topDragEnter: 'dragenter',
5766
+ topDragExit: 'dragexit',
5767
+ topDragLeave: 'dragleave',
5768
+ topDragOver: 'dragover',
5769
+ topDragStart: 'dragstart',
5770
+ topDrop: 'drop',
5771
+ topDurationChange: 'durationchange',
5772
+ topEmptied: 'emptied',
5773
+ topEncrypted: 'encrypted',
5774
+ topEnded: 'ended',
5775
+ topError: 'error',
5776
+ topFocus: 'focus',
5777
+ topInput: 'input',
5778
+ topKeyDown: 'keydown',
5779
+ topKeyPress: 'keypress',
5780
+ topKeyUp: 'keyup',
5781
+ topLoadedData: 'loadeddata',
5782
+ topLoadedMetadata: 'loadedmetadata',
5783
+ topLoadStart: 'loadstart',
5784
+ topMouseDown: 'mousedown',
5785
+ topMouseMove: 'mousemove',
5786
+ topMouseOut: 'mouseout',
5787
+ topMouseOver: 'mouseover',
5788
+ topMouseUp: 'mouseup',
5789
+ topPaste: 'paste',
5790
+ topPause: 'pause',
5791
+ topPlay: 'play',
5792
+ topPlaying: 'playing',
5793
+ topProgress: 'progress',
5794
+ topRateChange: 'ratechange',
5795
+ topScroll: 'scroll',
5796
+ topSeeked: 'seeked',
5797
+ topSeeking: 'seeking',
5798
+ topSelectionChange: 'selectionchange',
5799
+ topStalled: 'stalled',
5800
+ topSuspend: 'suspend',
5801
+ topTextInput: 'textInput',
5802
+ topTimeUpdate: 'timeupdate',
5803
+ topTouchCancel: 'touchcancel',
5804
+ topTouchEnd: 'touchend',
5805
+ topTouchMove: 'touchmove',
5806
+ topTouchStart: 'touchstart',
5807
+ topVolumeChange: 'volumechange',
5808
+ topWaiting: 'waiting',
5809
+ topWheel: 'wheel'
5810
+ };
5811
+
5812
+ /**
5813
+ * To ensure no conflicts with other potential React instances on the page
5814
+ */
5815
+ var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
5816
+
5817
+ function getListeningForDocument(mountAt) {
5818
+ // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
5819
+ // directly.
5820
+ if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
5821
+ mountAt[topListenersIDKey] = reactTopListenersCounter++;
5822
+ alreadyListeningTo[mountAt[topListenersIDKey]] = {};
5823
+ }
5824
+ return alreadyListeningTo[mountAt[topListenersIDKey]];
5825
+ }
5826
+
5827
+ /**
5828
+ * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
5829
+ * example:
5830
+ *
5831
+ * ReactBrowserEventEmitter.putListener('myID', 'onClick', myFunction);
5832
+ *
5833
+ * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
5834
+ *
5835
+ * @internal
5836
+ */
5837
+ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
5838
+
5839
+ /**
5840
+ * Injectable event backend
5841
+ */
5842
+ ReactEventListener: null,
5843
+
5844
+ injection: {
5845
+ /**
5846
+ * @param {object} ReactEventListener
5847
+ */
5848
+ injectReactEventListener: function (ReactEventListener) {
5849
+ ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
5850
+ ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
5851
+ }
5852
+ },
5853
+
5854
+ /**
5855
+ * Sets whether or not any created callbacks should be enabled.
5856
+ *
5857
+ * @param {boolean} enabled True if callbacks should be enabled.
5858
+ */
5859
+ setEnabled: function (enabled) {
5860
+ if (ReactBrowserEventEmitter.ReactEventListener) {
5861
+ ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
5862
+ }
5863
+ },
5864
+
5865
+ /**
5866
+ * @return {boolean} True if callbacks are enabled.
5867
+ */
5868
+ isEnabled: function () {
5869
+ return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
5870
+ },
5871
+
5872
+ /**
5873
+ * We listen for bubbled touch events on the document object.
5874
+ *
5875
+ * Firefox v8.01 (and possibly others) exhibited strange behavior when
5876
+ * mounting `onmousemove` events at some node that was not the document
5877
+ * element. The symptoms were that if your mouse is not moving over something
5878
+ * contained within that mount point (for example on the background) the
5879
+ * top-level listeners for `onmousemove` won't be called. However, if you
5880
+ * register the `mousemove` on the document object, then it will of course
5881
+ * catch all `mousemove`s. This along with iOS quirks, justifies restricting
5882
+ * top-level listeners to the document object only, at least for these
5883
+ * movement types of events and possibly all events.
5884
+ *
5885
+ * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
5886
+ *
5887
+ * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
5888
+ * they bubble to document.
5889
+ *
5890
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
5891
+ * @param {object} contentDocumentHandle Document which owns the container
5892
+ */
5893
+ listenTo: function (registrationName, contentDocumentHandle) {
5894
+ var mountAt = contentDocumentHandle;
5895
+ var isListening = getListeningForDocument(mountAt);
5896
+ var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
5897
+
5898
+ var topLevelTypes = EventConstants.topLevelTypes;
5899
+ for (var i = 0; i < dependencies.length; i++) {
5900
+ var dependency = dependencies[i];
5901
+ if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
5902
+ if (dependency === topLevelTypes.topWheel) {
5903
+ if (isEventSupported('wheel')) {
5904
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'wheel', mountAt);
5905
+ } else if (isEventSupported('mousewheel')) {
5906
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'mousewheel', mountAt);
5907
+ } else {
5908
+ // Firefox needs to capture a different mouse scroll event.
5909
+ // @see http://www.quirksmode.org/dom/events/tests/scroll.html
5910
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'DOMMouseScroll', mountAt);
5911
+ }
5912
+ } else if (dependency === topLevelTypes.topScroll) {
5913
+
5914
+ if (isEventSupported('scroll', true)) {
5915
+ ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll, 'scroll', mountAt);
5916
+ } else {
5917
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll, 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
5918
+ }
5919
+ } else if (dependency === topLevelTypes.topFocus || dependency === topLevelTypes.topBlur) {
5920
+
5921
+ if (isEventSupported('focus', true)) {
5922
+ ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus, 'focus', mountAt);
5923
+ ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur, 'blur', mountAt);
5924
+ } else if (isEventSupported('focusin')) {
5925
+ // IE has `focusin` and `focusout` events which bubble.
5926
+ // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
5927
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus, 'focusin', mountAt);
5928
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur, 'focusout', mountAt);
5929
+ }
5930
+
5931
+ // to make sure blur and focus event listeners are only attached once
5932
+ isListening[topLevelTypes.topBlur] = true;
5933
+ isListening[topLevelTypes.topFocus] = true;
5934
+ } else if (topEventMapping.hasOwnProperty(dependency)) {
5935
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
5936
+ }
5937
+
5938
+ isListening[dependency] = true;
5939
+ }
5940
+ }
5941
+ },
5942
+
5943
+ trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
5944
+ return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
5945
+ },
5946
+
5947
+ trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
5948
+ return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
5949
+ },
5950
+
5951
+ /**
5952
+ * Listens to window scroll and resize events. We cache scroll values so that
5953
+ * application code can access them without triggering reflows.
5954
+ *
5955
+ * NOTE: Scroll events do not bubble.
5956
+ *
5957
+ * @see http://www.quirksmode.org/dom/events/scroll.html
5958
+ */
5959
+ ensureScrollValueMonitoring: function () {
5960
+ if (!isMonitoringScrollValue) {
5961
+ var refresh = ViewportMetrics.refreshScrollValues;
5962
+ ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
5963
+ isMonitoringScrollValue = true;
5964
+ }
5965
+ },
5966
+
5967
+ eventNameDispatchConfigs: EventPluginHub.eventNameDispatchConfigs,
5968
+
5969
+ registrationNameModules: EventPluginHub.registrationNameModules,
5970
+
5971
+ putListener: EventPluginHub.putListener,
5972
+
5973
+ getListener: EventPluginHub.getListener,
5974
+
5975
+ deleteListener: EventPluginHub.deleteListener,
5976
+
5977
+ deleteAllListeners: EventPluginHub.deleteAllListeners
5978
+
5979
+ });
5980
+
5981
+ ReactPerf.measureMethods(ReactBrowserEventEmitter, 'ReactBrowserEventEmitter', {
5982
+ putListener: 'putListener',
5983
+ deleteListener: 'deleteListener'
5984
+ });
5985
+
5986
+ module.exports = ReactBrowserEventEmitter;
5987
+ },{"./EventConstants":44,"./EventPluginHub":45,"./EventPluginRegistry":46,"./Object.assign":52,"./ReactEventEmitterMixin":87,"./ReactPerf":101,"./ViewportMetrics":131,"./isEventSupported":149}],57:[function(require,module,exports){
5988
+ (function (process){
5989
+ /**
5990
+ * Copyright 2014-2015, Facebook, Inc.
5991
+ * All rights reserved.
5992
+ *
5993
+ * This source code is licensed under the BSD-style license found in the
5994
+ * LICENSE file in the root directory of this source tree. An additional grant
5995
+ * of patent rights can be found in the PATENTS file in the same directory.
5996
+ *
5997
+ * @providesModule ReactChildReconciler
5998
+ * @typechecks static-only
5999
+ */
6000
+
6001
+ 'use strict';
6002
+
6003
+ var ReactReconciler = require('./ReactReconciler');
6004
+
6005
+ var instantiateReactComponent = require('./instantiateReactComponent');
6006
+ var shouldUpdateReactComponent = require('./shouldUpdateReactComponent');
6007
+ var traverseAllChildren = require('./traverseAllChildren');
6008
+ var warning = require('fbjs/lib/warning');
6009
+
6010
+ function instantiateChild(childInstances, child, name) {
6011
+ // We found a component instance.
6012
+ var keyUnique = childInstances[name] === undefined;
6013
+ if (process.env.NODE_ENV !== 'production') {
6014
+ process.env.NODE_ENV !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.', name) : undefined;
6015
+ }
6016
+ if (child != null && keyUnique) {
6017
+ childInstances[name] = instantiateReactComponent(child, null);
6018
+ }
6019
+ }
6020
+
6021
+ /**
6022
+ * ReactChildReconciler provides helpers for initializing or updating a set of
6023
+ * children. Its output is suitable for passing it onto ReactMultiChild which
6024
+ * does diffed reordering and insertion.
6025
+ */
6026
+ var ReactChildReconciler = {
6027
+ /**
6028
+ * Generates a "mount image" for each of the supplied children. In the case
6029
+ * of `ReactDOMComponent`, a mount image is a string of markup.
6030
+ *
6031
+ * @param {?object} nestedChildNodes Nested child maps.
6032
+ * @return {?object} A set of child instances.
6033
+ * @internal
6034
+ */
6035
+ instantiateChildren: function (nestedChildNodes, transaction, context) {
6036
+ if (nestedChildNodes == null) {
6037
+ return null;
6038
+ }
6039
+ var childInstances = {};
6040
+ traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
6041
+ return childInstances;
6042
+ },
6043
+
6044
+ /**
6045
+ * Updates the rendered children and returns a new set of children.
6046
+ *
6047
+ * @param {?object} prevChildren Previously initialized set of children.
6048
+ * @param {?object} nextChildren Flat child element maps.
6049
+ * @param {ReactReconcileTransaction} transaction
6050
+ * @param {object} context
6051
+ * @return {?object} A new set of child instances.
6052
+ * @internal
6053
+ */
6054
+ updateChildren: function (prevChildren, nextChildren, transaction, context) {
6055
+ // We currently don't have a way to track moves here but if we use iterators
6056
+ // instead of for..in we can zip the iterators and check if an item has
6057
+ // moved.
6058
+ // TODO: If nothing has changed, return the prevChildren object so that we
6059
+ // can quickly bailout if nothing has changed.
6060
+ if (!nextChildren && !prevChildren) {
6061
+ return null;
6062
+ }
6063
+ var name;
6064
+ for (name in nextChildren) {
6065
+ if (!nextChildren.hasOwnProperty(name)) {
6066
+ continue;
6067
+ }
6068
+ var prevChild = prevChildren && prevChildren[name];
6069
+ var prevElement = prevChild && prevChild._currentElement;
6070
+ var nextElement = nextChildren[name];
6071
+ if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
6072
+ ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
6073
+ nextChildren[name] = prevChild;
6074
+ } else {
6075
+ if (prevChild) {
6076
+ ReactReconciler.unmountComponent(prevChild, name);
6077
+ }
6078
+ // The child must be instantiated before it's mounted.
6079
+ var nextChildInstance = instantiateReactComponent(nextElement, null);
6080
+ nextChildren[name] = nextChildInstance;
6081
+ }
6082
+ }
6083
+ // Unmount children that are no longer present.
6084
+ for (name in prevChildren) {
6085
+ if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
6086
+ ReactReconciler.unmountComponent(prevChildren[name]);
6087
+ }
6088
+ }
6089
+ return nextChildren;
6090
+ },
6091
+
6092
+ /**
6093
+ * Unmounts all rendered children. This should be used to clean up children
6094
+ * when this component is unmounted.
6095
+ *
6096
+ * @param {?object} renderedChildren Previously initialized set of children.
6097
+ * @internal
6098
+ */
6099
+ unmountChildren: function (renderedChildren) {
6100
+ for (var name in renderedChildren) {
6101
+ if (renderedChildren.hasOwnProperty(name)) {
6102
+ var renderedChild = renderedChildren[name];
6103
+ ReactReconciler.unmountComponent(renderedChild);
6104
+ }
6105
+ }
6106
+ }
6107
+
6108
+ };
6109
+
6110
+ module.exports = ReactChildReconciler;
6111
+ }).call(this,require('_process'))
6112
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RDaGlsZFJlY29uY2lsZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtB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lZENoaWxkcmVuKSB7XG4gICAgZm9yICh2YXIgbmFtZSBpbiByZW5kZXJlZENoaWxkcmVuKSB7XG4gICAgICBpZiAocmVuZGVyZWRDaGlsZHJlbi5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xuICAgICAgICB2YXIgcmVuZGVyZWRDaGlsZCA9IHJlbmRlcmVkQ2hpbGRyZW5bbmFtZV07XG4gICAgICAgIFJlYWN0UmVjb25jaWxlci51bm1vdW50Q29tcG9uZW50KHJlbmRlcmVkQ2hpbGQpO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IFJlYWN0Q2hpbGRSZWNvbmNpbGVyOyJdfQ==
6113
+ },{"./ReactReconciler":106,"./instantiateReactComponent":148,"./shouldUpdateReactComponent":156,"./traverseAllChildren":157,"_process":29,"fbjs/lib/warning":28}],58:[function(require,module,exports){
6114
+ /**
6115
+ * Copyright 2013-2015, Facebook, Inc.
6116
+ * All rights reserved.
6117
+ *
6118
+ * This source code is licensed under the BSD-style license found in the
6119
+ * LICENSE file in the root directory of this source tree. An additional grant
6120
+ * of patent rights can be found in the PATENTS file in the same directory.
6121
+ *
6122
+ * @providesModule ReactChildren
6123
+ */
6124
+
6125
+ 'use strict';
6126
+
6127
+ var PooledClass = require('./PooledClass');
6128
+ var ReactElement = require('./ReactElement');
6129
+
6130
+ var emptyFunction = require('fbjs/lib/emptyFunction');
6131
+ var traverseAllChildren = require('./traverseAllChildren');
6132
+
6133
+ var twoArgumentPooler = PooledClass.twoArgumentPooler;
6134
+ var fourArgumentPooler = PooledClass.fourArgumentPooler;
6135
+
6136
+ var userProvidedKeyEscapeRegex = /\/(?!\/)/g;
6137
+ function escapeUserProvidedKey(text) {
6138
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '//');
6139
+ }
6140
+
6141
+ /**
6142
+ * PooledClass representing the bookkeeping associated with performing a child
6143
+ * traversal. Allows avoiding binding callbacks.
6144
+ *
6145
+ * @constructor ForEachBookKeeping
6146
+ * @param {!function} forEachFunction Function to perform traversal with.
6147
+ * @param {?*} forEachContext Context to perform context with.
6148
+ */
6149
+ function ForEachBookKeeping(forEachFunction, forEachContext) {
6150
+ this.func = forEachFunction;
6151
+ this.context = forEachContext;
6152
+ this.count = 0;
6153
+ }
6154
+ ForEachBookKeeping.prototype.destructor = function () {
6155
+ this.func = null;
6156
+ this.context = null;
6157
+ this.count = 0;
6158
+ };
6159
+ PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
6160
+
6161
+ function forEachSingleChild(bookKeeping, child, name) {
6162
+ var func = bookKeeping.func;
6163
+ var context = bookKeeping.context;
6164
+
6165
+ func.call(context, child, bookKeeping.count++);
6166
+ }
6167
+
6168
+ /**
6169
+ * Iterates through children that are typically specified as `props.children`.
6170
+ *
6171
+ * The provided forEachFunc(child, index) will be called for each
6172
+ * leaf child.
6173
+ *
6174
+ * @param {?*} children Children tree container.
6175
+ * @param {function(*, int)} forEachFunc
6176
+ * @param {*} forEachContext Context for forEachContext.
6177
+ */
6178
+ function forEachChildren(children, forEachFunc, forEachContext) {
6179
+ if (children == null) {
6180
+ return children;
6181
+ }
6182
+ var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
6183
+ traverseAllChildren(children, forEachSingleChild, traverseContext);
6184
+ ForEachBookKeeping.release(traverseContext);
6185
+ }
6186
+
6187
+ /**
6188
+ * PooledClass representing the bookkeeping associated with performing a child
6189
+ * mapping. Allows avoiding binding callbacks.
6190
+ *
6191
+ * @constructor MapBookKeeping
6192
+ * @param {!*} mapResult Object containing the ordered map of results.
6193
+ * @param {!function} mapFunction Function to perform mapping with.
6194
+ * @param {?*} mapContext Context to perform mapping with.
6195
+ */
6196
+ function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
6197
+ this.result = mapResult;
6198
+ this.keyPrefix = keyPrefix;
6199
+ this.func = mapFunction;
6200
+ this.context = mapContext;
6201
+ this.count = 0;
6202
+ }
6203
+ MapBookKeeping.prototype.destructor = function () {
6204
+ this.result = null;
6205
+ this.keyPrefix = null;
6206
+ this.func = null;
6207
+ this.context = null;
6208
+ this.count = 0;
6209
+ };
6210
+ PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
6211
+
6212
+ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
6213
+ var result = bookKeeping.result;
6214
+ var keyPrefix = bookKeeping.keyPrefix;
6215
+ var func = bookKeeping.func;
6216
+ var context = bookKeeping.context;
6217
+
6218
+ var mappedChild = func.call(context, child, bookKeeping.count++);
6219
+ if (Array.isArray(mappedChild)) {
6220
+ mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
6221
+ } else if (mappedChild != null) {
6222
+ if (ReactElement.isValidElement(mappedChild)) {
6223
+ mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
6224
+ // Keep both the (mapped) and old keys if they differ, just as
6225
+ // traverseAllChildren used to do for objects as children
6226
+ keyPrefix + (mappedChild !== child ? escapeUserProvidedKey(mappedChild.key || '') + '/' : '') + childKey);
6227
+ }
6228
+ result.push(mappedChild);
6229
+ }
6230
+ }
6231
+
6232
+ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
6233
+ var escapedPrefix = '';
6234
+ if (prefix != null) {
6235
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
6236
+ }
6237
+ var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
6238
+ traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
6239
+ MapBookKeeping.release(traverseContext);
6240
+ }
6241
+
6242
+ /**
6243
+ * Maps children that are typically specified as `props.children`.
6244
+ *
6245
+ * The provided mapFunction(child, key, index) will be called for each
6246
+ * leaf child.
6247
+ *
6248
+ * @param {?*} children Children tree container.
6249
+ * @param {function(*, int)} func The map function.
6250
+ * @param {*} context Context for mapFunction.
6251
+ * @return {object} Object containing the ordered map of results.
6252
+ */
6253
+ function mapChildren(children, func, context) {
6254
+ if (children == null) {
6255
+ return children;
6256
+ }
6257
+ var result = [];
6258
+ mapIntoWithKeyPrefixInternal(children, result, null, func, context);
6259
+ return result;
6260
+ }
6261
+
6262
+ function forEachSingleChildDummy(traverseContext, child, name) {
6263
+ return null;
6264
+ }
6265
+
6266
+ /**
6267
+ * Count the number of children that are typically specified as
6268
+ * `props.children`.
6269
+ *
6270
+ * @param {?*} children Children tree container.
6271
+ * @return {number} The number of children.
6272
+ */
6273
+ function countChildren(children, context) {
6274
+ return traverseAllChildren(children, forEachSingleChildDummy, null);
6275
+ }
6276
+
6277
+ /**
6278
+ * Flatten a children object (typically specified as `props.children`) and
6279
+ * return an array with appropriately re-keyed children.
6280
+ */
6281
+ function toArray(children) {
6282
+ var result = [];
6283
+ mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
6284
+ return result;
6285
+ }
6286
+
6287
+ var ReactChildren = {
6288
+ forEach: forEachChildren,
6289
+ map: mapChildren,
6290
+ mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
6291
+ count: countChildren,
6292
+ toArray: toArray
6293
+ };
6294
+
6295
+ module.exports = ReactChildren;
6296
+ },{"./PooledClass":53,"./ReactElement":82,"./traverseAllChildren":157,"fbjs/lib/emptyFunction":9}],59:[function(require,module,exports){
6297
+ (function (process){
6298
+ /**
6299
+ * Copyright 2013-2015, Facebook, Inc.
6300
+ * All rights reserved.
6301
+ *
6302
+ * This source code is licensed under the BSD-style license found in the
6303
+ * LICENSE file in the root directory of this source tree. An additional grant
6304
+ * of patent rights can be found in the PATENTS file in the same directory.
6305
+ *
6306
+ * @providesModule ReactClass
6307
+ */
6308
+
6309
+ 'use strict';
6310
+
6311
+ var ReactComponent = require('./ReactComponent');
6312
+ var ReactElement = require('./ReactElement');
6313
+ var ReactPropTypeLocations = require('./ReactPropTypeLocations');
6314
+ var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames');
6315
+ var ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');
6316
+
6317
+ var assign = require('./Object.assign');
6318
+ var emptyObject = require('fbjs/lib/emptyObject');
6319
+ var invariant = require('fbjs/lib/invariant');
6320
+ var keyMirror = require('fbjs/lib/keyMirror');
6321
+ var keyOf = require('fbjs/lib/keyOf');
6322
+ var warning = require('fbjs/lib/warning');
6323
+
6324
+ var MIXINS_KEY = keyOf({ mixins: null });
6325
+
6326
+ /**
6327
+ * Policies that describe methods in `ReactClassInterface`.
6328
+ */
6329
+ var SpecPolicy = keyMirror({
6330
+ /**
6331
+ * These methods may be defined only once by the class specification or mixin.
6332
+ */
6333
+ DEFINE_ONCE: null,
6334
+ /**
6335
+ * These methods may be defined by both the class specification and mixins.
6336
+ * Subsequent definitions will be chained. These methods must return void.
6337
+ */
6338
+ DEFINE_MANY: null,
6339
+ /**
6340
+ * These methods are overriding the base class.
6341
+ */
6342
+ OVERRIDE_BASE: null,
6343
+ /**
6344
+ * These methods are similar to DEFINE_MANY, except we assume they return
6345
+ * objects. We try to merge the keys of the return values of all the mixed in
6346
+ * functions. If there is a key conflict we throw.
6347
+ */
6348
+ DEFINE_MANY_MERGED: null
6349
+ });
6350
+
6351
+ var injectedMixins = [];
6352
+
6353
+ var warnedSetProps = false;
6354
+ function warnSetProps() {
6355
+ if (!warnedSetProps) {
6356
+ warnedSetProps = true;
6357
+ process.env.NODE_ENV !== 'production' ? warning(false, 'setProps(...) and replaceProps(...) are deprecated. ' + 'Instead, call render again at the top level.') : undefined;
6358
+ }
6359
+ }
6360
+
6361
+ /**
6362
+ * Composite components are higher-level components that compose other composite
6363
+ * or native components.
6364
+ *
6365
+ * To create a new type of `ReactClass`, pass a specification of
6366
+ * your new class to `React.createClass`. The only requirement of your class
6367
+ * specification is that you implement a `render` method.
6368
+ *
6369
+ * var MyComponent = React.createClass({
6370
+ * render: function() {
6371
+ * return <div>Hello World</div>;
6372
+ * }
6373
+ * });
6374
+ *
6375
+ * The class specification supports a specific protocol of methods that have
6376
+ * special meaning (e.g. `render`). See `ReactClassInterface` for
6377
+ * more the comprehensive protocol. Any other properties and methods in the
6378
+ * class specification will be available on the prototype.
6379
+ *
6380
+ * @interface ReactClassInterface
6381
+ * @internal
6382
+ */
6383
+ var ReactClassInterface = {
6384
+
6385
+ /**
6386
+ * An array of Mixin objects to include when defining your component.
6387
+ *
6388
+ * @type {array}
6389
+ * @optional
6390
+ */
6391
+ mixins: SpecPolicy.DEFINE_MANY,
6392
+
6393
+ /**
6394
+ * An object containing properties and methods that should be defined on
6395
+ * the component's constructor instead of its prototype (static methods).
6396
+ *
6397
+ * @type {object}
6398
+ * @optional
6399
+ */
6400
+ statics: SpecPolicy.DEFINE_MANY,
6401
+
6402
+ /**
6403
+ * Definition of prop types for this component.
6404
+ *
6405
+ * @type {object}
6406
+ * @optional
6407
+ */
6408
+ propTypes: SpecPolicy.DEFINE_MANY,
6409
+
6410
+ /**
6411
+ * Definition of context types for this component.
6412
+ *
6413
+ * @type {object}
6414
+ * @optional
6415
+ */
6416
+ contextTypes: SpecPolicy.DEFINE_MANY,
6417
+
6418
+ /**
6419
+ * Definition of context types this component sets for its children.
6420
+ *
6421
+ * @type {object}
6422
+ * @optional
6423
+ */
6424
+ childContextTypes: SpecPolicy.DEFINE_MANY,
6425
+
6426
+ // ==== Definition methods ====
6427
+
6428
+ /**
6429
+ * Invoked when the component is mounted. Values in the mapping will be set on
6430
+ * `this.props` if that prop is not specified (i.e. using an `in` check).
6431
+ *
6432
+ * This method is invoked before `getInitialState` and therefore cannot rely
6433
+ * on `this.state` or use `this.setState`.
6434
+ *
6435
+ * @return {object}
6436
+ * @optional
6437
+ */
6438
+ getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED,
6439
+
6440
+ /**
6441
+ * Invoked once before the component is mounted. The return value will be used
6442
+ * as the initial value of `this.state`.
6443
+ *
6444
+ * getInitialState: function() {
6445
+ * return {
6446
+ * isOn: false,
6447
+ * fooBaz: new BazFoo()
6448
+ * }
6449
+ * }
6450
+ *
6451
+ * @return {object}
6452
+ * @optional
6453
+ */
6454
+ getInitialState: SpecPolicy.DEFINE_MANY_MERGED,
6455
+
6456
+ /**
6457
+ * @return {object}
6458
+ * @optional
6459
+ */
6460
+ getChildContext: SpecPolicy.DEFINE_MANY_MERGED,
6461
+
6462
+ /**
6463
+ * Uses props from `this.props` and state from `this.state` to render the
6464
+ * structure of the component.
6465
+ *
6466
+ * No guarantees are made about when or how often this method is invoked, so
6467
+ * it must not have side effects.
6468
+ *
6469
+ * render: function() {
6470
+ * var name = this.props.name;
6471
+ * return <div>Hello, {name}!</div>;
6472
+ * }
6473
+ *
6474
+ * @return {ReactComponent}
6475
+ * @nosideeffects
6476
+ * @required
6477
+ */
6478
+ render: SpecPolicy.DEFINE_ONCE,
6479
+
6480
+ // ==== Delegate methods ====
6481
+
6482
+ /**
6483
+ * Invoked when the component is initially created and about to be mounted.
6484
+ * This may have side effects, but any external subscriptions or data created
6485
+ * by this method must be cleaned up in `componentWillUnmount`.
6486
+ *
6487
+ * @optional
6488
+ */
6489
+ componentWillMount: SpecPolicy.DEFINE_MANY,
6490
+
6491
+ /**
6492
+ * Invoked when the component has been mounted and has a DOM representation.
6493
+ * However, there is no guarantee that the DOM node is in the document.
6494
+ *
6495
+ * Use this as an opportunity to operate on the DOM when the component has
6496
+ * been mounted (initialized and rendered) for the first time.
6497
+ *
6498
+ * @param {DOMElement} rootNode DOM element representing the component.
6499
+ * @optional
6500
+ */
6501
+ componentDidMount: SpecPolicy.DEFINE_MANY,
6502
+
6503
+ /**
6504
+ * Invoked before the component receives new props.
6505
+ *
6506
+ * Use this as an opportunity to react to a prop transition by updating the
6507
+ * state using `this.setState`. Current props are accessed via `this.props`.
6508
+ *
6509
+ * componentWillReceiveProps: function(nextProps, nextContext) {
6510
+ * this.setState({
6511
+ * likesIncreasing: nextProps.likeCount > this.props.likeCount
6512
+ * });
6513
+ * }
6514
+ *
6515
+ * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
6516
+ * transition may cause a state change, but the opposite is not true. If you
6517
+ * need it, you are probably looking for `componentWillUpdate`.
6518
+ *
6519
+ * @param {object} nextProps
6520
+ * @optional
6521
+ */
6522
+ componentWillReceiveProps: SpecPolicy.DEFINE_MANY,
6523
+
6524
+ /**
6525
+ * Invoked while deciding if the component should be updated as a result of
6526
+ * receiving new props, state and/or context.
6527
+ *
6528
+ * Use this as an opportunity to `return false` when you're certain that the
6529
+ * transition to the new props/state/context will not require a component
6530
+ * update.
6531
+ *
6532
+ * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
6533
+ * return !equal(nextProps, this.props) ||
6534
+ * !equal(nextState, this.state) ||
6535
+ * !equal(nextContext, this.context);
6536
+ * }
6537
+ *
6538
+ * @param {object} nextProps
6539
+ * @param {?object} nextState
6540
+ * @param {?object} nextContext
6541
+ * @return {boolean} True if the component should update.
6542
+ * @optional
6543
+ */
6544
+ shouldComponentUpdate: SpecPolicy.DEFINE_ONCE,
6545
+
6546
+ /**
6547
+ * Invoked when the component is about to update due to a transition from
6548
+ * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
6549
+ * and `nextContext`.
6550
+ *
6551
+ * Use this as an opportunity to perform preparation before an update occurs.
6552
+ *
6553
+ * NOTE: You **cannot** use `this.setState()` in this method.
6554
+ *
6555
+ * @param {object} nextProps
6556
+ * @param {?object} nextState
6557
+ * @param {?object} nextContext
6558
+ * @param {ReactReconcileTransaction} transaction
6559
+ * @optional
6560
+ */
6561
+ componentWillUpdate: SpecPolicy.DEFINE_MANY,
6562
+
6563
+ /**
6564
+ * Invoked when the component's DOM representation has been updated.
6565
+ *
6566
+ * Use this as an opportunity to operate on the DOM when the component has
6567
+ * been updated.
6568
+ *
6569
+ * @param {object} prevProps
6570
+ * @param {?object} prevState
6571
+ * @param {?object} prevContext
6572
+ * @param {DOMElement} rootNode DOM element representing the component.
6573
+ * @optional
6574
+ */
6575
+ componentDidUpdate: SpecPolicy.DEFINE_MANY,
6576
+
6577
+ /**
6578
+ * Invoked when the component is about to be removed from its parent and have
6579
+ * its DOM representation destroyed.
6580
+ *
6581
+ * Use this as an opportunity to deallocate any external resources.
6582
+ *
6583
+ * NOTE: There is no `componentDidUnmount` since your component will have been
6584
+ * destroyed by that point.
6585
+ *
6586
+ * @optional
6587
+ */
6588
+ componentWillUnmount: SpecPolicy.DEFINE_MANY,
6589
+
6590
+ // ==== Advanced methods ====
6591
+
6592
+ /**
6593
+ * Updates the component's currently mounted DOM representation.
6594
+ *
6595
+ * By default, this implements React's rendering and reconciliation algorithm.
6596
+ * Sophisticated clients may wish to override this.
6597
+ *
6598
+ * @param {ReactReconcileTransaction} transaction
6599
+ * @internal
6600
+ * @overridable
6601
+ */
6602
+ updateComponent: SpecPolicy.OVERRIDE_BASE
6603
+
6604
+ };
6605
+
6606
+ /**
6607
+ * Mapping from class specification keys to special processing functions.
6608
+ *
6609
+ * Although these are declared like instance properties in the specification
6610
+ * when defining classes using `React.createClass`, they are actually static
6611
+ * and are accessible on the constructor instead of the prototype. Despite
6612
+ * being static, they must be defined outside of the "statics" key under
6613
+ * which all other static methods are defined.
6614
+ */
6615
+ var RESERVED_SPEC_KEYS = {
6616
+ displayName: function (Constructor, displayName) {
6617
+ Constructor.displayName = displayName;
6618
+ },
6619
+ mixins: function (Constructor, mixins) {
6620
+ if (mixins) {
6621
+ for (var i = 0; i < mixins.length; i++) {
6622
+ mixSpecIntoComponent(Constructor, mixins[i]);
6623
+ }
6624
+ }
6625
+ },
6626
+ childContextTypes: function (Constructor, childContextTypes) {
6627
+ if (process.env.NODE_ENV !== 'production') {
6628
+ validateTypeDef(Constructor, childContextTypes, ReactPropTypeLocations.childContext);
6629
+ }
6630
+ Constructor.childContextTypes = assign({}, Constructor.childContextTypes, childContextTypes);
6631
+ },
6632
+ contextTypes: function (Constructor, contextTypes) {
6633
+ if (process.env.NODE_ENV !== 'production') {
6634
+ validateTypeDef(Constructor, contextTypes, ReactPropTypeLocations.context);
6635
+ }
6636
+ Constructor.contextTypes = assign({}, Constructor.contextTypes, contextTypes);
6637
+ },
6638
+ /**
6639
+ * Special case getDefaultProps which should move into statics but requires
6640
+ * automatic merging.
6641
+ */
6642
+ getDefaultProps: function (Constructor, getDefaultProps) {
6643
+ if (Constructor.getDefaultProps) {
6644
+ Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
6645
+ } else {
6646
+ Constructor.getDefaultProps = getDefaultProps;
6647
+ }
6648
+ },
6649
+ propTypes: function (Constructor, propTypes) {
6650
+ if (process.env.NODE_ENV !== 'production') {
6651
+ validateTypeDef(Constructor, propTypes, ReactPropTypeLocations.prop);
6652
+ }
6653
+ Constructor.propTypes = assign({}, Constructor.propTypes, propTypes);
6654
+ },
6655
+ statics: function (Constructor, statics) {
6656
+ mixStaticSpecIntoComponent(Constructor, statics);
6657
+ },
6658
+ autobind: function () {} };
6659
+
6660
+ // noop
6661
+ function validateTypeDef(Constructor, typeDef, location) {
6662
+ for (var propName in typeDef) {
6663
+ if (typeDef.hasOwnProperty(propName)) {
6664
+ // use a warning instead of an invariant so components
6665
+ // don't show up in prod but not in __DEV__
6666
+ process.env.NODE_ENV !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : undefined;
6667
+ }
6668
+ }
6669
+ }
6670
+
6671
+ function validateMethodOverride(proto, name) {
6672
+ var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
6673
+
6674
+ // Disallow overriding of base class methods unless explicitly allowed.
6675
+ if (ReactClassMixin.hasOwnProperty(name)) {
6676
+ !(specPolicy === SpecPolicy.OVERRIDE_BASE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name) : invariant(false) : undefined;
6677
+ }
6678
+
6679
+ // Disallow defining methods more than once unless explicitly allowed.
6680
+ if (proto.hasOwnProperty(name)) {
6681
+ !(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name) : invariant(false) : undefined;
6682
+ }
6683
+ }
6684
+
6685
+ /**
6686
+ * Mixin helper which handles policy validation and reserved
6687
+ * specification keys when building React classses.
6688
+ */
6689
+ function mixSpecIntoComponent(Constructor, spec) {
6690
+ if (!spec) {
6691
+ return;
6692
+ }
6693
+
6694
+ !(typeof spec !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component class as a mixin. Instead, just use a regular object.') : invariant(false) : undefined;
6695
+ !!ReactElement.isValidElement(spec) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.') : invariant(false) : undefined;
6696
+
6697
+ var proto = Constructor.prototype;
6698
+
6699
+ // By handling mixins before any other properties, we ensure the same
6700
+ // chaining order is applied to methods with DEFINE_MANY policy, whether
6701
+ // mixins are listed before or after these methods in the spec.
6702
+ if (spec.hasOwnProperty(MIXINS_KEY)) {
6703
+ RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
6704
+ }
6705
+
6706
+ for (var name in spec) {
6707
+ if (!spec.hasOwnProperty(name)) {
6708
+ continue;
6709
+ }
6710
+
6711
+ if (name === MIXINS_KEY) {
6712
+ // We have already handled mixins in a special case above.
6713
+ continue;
6714
+ }
6715
+
6716
+ var property = spec[name];
6717
+ validateMethodOverride(proto, name);
6718
+
6719
+ if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
6720
+ RESERVED_SPEC_KEYS[name](Constructor, property);
6721
+ } else {
6722
+ // Setup methods on prototype:
6723
+ // The following member methods should not be automatically bound:
6724
+ // 1. Expected ReactClass methods (in the "interface").
6725
+ // 2. Overridden methods (that were mixed in).
6726
+ var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
6727
+ var isAlreadyDefined = proto.hasOwnProperty(name);
6728
+ var isFunction = typeof property === 'function';
6729
+ var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
6730
+
6731
+ if (shouldAutoBind) {
6732
+ if (!proto.__reactAutoBindMap) {
6733
+ proto.__reactAutoBindMap = {};
6734
+ }
6735
+ proto.__reactAutoBindMap[name] = property;
6736
+ proto[name] = property;
6737
+ } else {
6738
+ if (isAlreadyDefined) {
6739
+ var specPolicy = ReactClassInterface[name];
6740
+
6741
+ // These cases should already be caught by validateMethodOverride.
6742
+ !(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name) : invariant(false) : undefined;
6743
+
6744
+ // For methods which are defined more than once, call the existing
6745
+ // methods before calling the new property, merging if appropriate.
6746
+ if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) {
6747
+ proto[name] = createMergedResultFunction(proto[name], property);
6748
+ } else if (specPolicy === SpecPolicy.DEFINE_MANY) {
6749
+ proto[name] = createChainedFunction(proto[name], property);
6750
+ }
6751
+ } else {
6752
+ proto[name] = property;
6753
+ if (process.env.NODE_ENV !== 'production') {
6754
+ // Add verbose displayName to the function, which helps when looking
6755
+ // at profiling tools.
6756
+ if (typeof property === 'function' && spec.displayName) {
6757
+ proto[name].displayName = spec.displayName + '_' + name;
6758
+ }
6759
+ }
6760
+ }
6761
+ }
6762
+ }
6763
+ }
6764
+ }
6765
+
6766
+ function mixStaticSpecIntoComponent(Constructor, statics) {
6767
+ if (!statics) {
6768
+ return;
6769
+ }
6770
+ for (var name in statics) {
6771
+ var property = statics[name];
6772
+ if (!statics.hasOwnProperty(name)) {
6773
+ continue;
6774
+ }
6775
+
6776
+ var isReserved = (name in RESERVED_SPEC_KEYS);
6777
+ !!isReserved ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name) : invariant(false) : undefined;
6778
+
6779
+ var isInherited = (name in Constructor);
6780
+ !!isInherited ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name) : invariant(false) : undefined;
6781
+ Constructor[name] = property;
6782
+ }
6783
+ }
6784
+
6785
+ /**
6786
+ * Merge two objects, but throw if both contain the same key.
6787
+ *
6788
+ * @param {object} one The first object, which is mutated.
6789
+ * @param {object} two The second object
6790
+ * @return {object} one after it has been mutated to contain everything in two.
6791
+ */
6792
+ function mergeIntoWithNoDuplicateKeys(one, two) {
6793
+ !(one && two && typeof one === 'object' && typeof two === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : invariant(false) : undefined;
6794
+
6795
+ for (var key in two) {
6796
+ if (two.hasOwnProperty(key)) {
6797
+ !(one[key] === undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key) : invariant(false) : undefined;
6798
+ one[key] = two[key];
6799
+ }
6800
+ }
6801
+ return one;
6802
+ }
6803
+
6804
+ /**
6805
+ * Creates a function that invokes two functions and merges their return values.
6806
+ *
6807
+ * @param {function} one Function to invoke first.
6808
+ * @param {function} two Function to invoke second.
6809
+ * @return {function} Function that invokes the two argument functions.
6810
+ * @private
6811
+ */
6812
+ function createMergedResultFunction(one, two) {
6813
+ return function mergedResult() {
6814
+ var a = one.apply(this, arguments);
6815
+ var b = two.apply(this, arguments);
6816
+ if (a == null) {
6817
+ return b;
6818
+ } else if (b == null) {
6819
+ return a;
6820
+ }
6821
+ var c = {};
6822
+ mergeIntoWithNoDuplicateKeys(c, a);
6823
+ mergeIntoWithNoDuplicateKeys(c, b);
6824
+ return c;
6825
+ };
6826
+ }
6827
+
6828
+ /**
6829
+ * Creates a function that invokes two functions and ignores their return vales.
6830
+ *
6831
+ * @param {function} one Function to invoke first.
6832
+ * @param {function} two Function to invoke second.
6833
+ * @return {function} Function that invokes the two argument functions.
6834
+ * @private
6835
+ */
6836
+ function createChainedFunction(one, two) {
6837
+ return function chainedFunction() {
6838
+ one.apply(this, arguments);
6839
+ two.apply(this, arguments);
6840
+ };
6841
+ }
6842
+
6843
+ /**
6844
+ * Binds a method to the component.
6845
+ *
6846
+ * @param {object} component Component whose method is going to be bound.
6847
+ * @param {function} method Method to be bound.
6848
+ * @return {function} The bound method.
6849
+ */
6850
+ function bindAutoBindMethod(component, method) {
6851
+ var boundMethod = method.bind(component);
6852
+ if (process.env.NODE_ENV !== 'production') {
6853
+ boundMethod.__reactBoundContext = component;
6854
+ boundMethod.__reactBoundMethod = method;
6855
+ boundMethod.__reactBoundArguments = null;
6856
+ var componentName = component.constructor.displayName;
6857
+ var _bind = boundMethod.bind;
6858
+ /* eslint-disable block-scoped-var, no-undef */
6859
+ boundMethod.bind = function (newThis) {
6860
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
6861
+ args[_key - 1] = arguments[_key];
6862
+ }
6863
+
6864
+ // User is trying to bind() an autobound method; we effectively will
6865
+ // ignore the value of "this" that the user is trying to use, so
6866
+ // let's warn.
6867
+ if (newThis !== component && newThis !== null) {
6868
+ process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : undefined;
6869
+ } else if (!args.length) {
6870
+ process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : undefined;
6871
+ return boundMethod;
6872
+ }
6873
+ var reboundMethod = _bind.apply(boundMethod, arguments);
6874
+ reboundMethod.__reactBoundContext = component;
6875
+ reboundMethod.__reactBoundMethod = method;
6876
+ reboundMethod.__reactBoundArguments = args;
6877
+ return reboundMethod;
6878
+ /* eslint-enable */
6879
+ };
6880
+ }
6881
+ return boundMethod;
6882
+ }
6883
+
6884
+ /**
6885
+ * Binds all auto-bound methods in a component.
6886
+ *
6887
+ * @param {object} component Component whose method is going to be bound.
6888
+ */
6889
+ function bindAutoBindMethods(component) {
6890
+ for (var autoBindKey in component.__reactAutoBindMap) {
6891
+ if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) {
6892
+ var method = component.__reactAutoBindMap[autoBindKey];
6893
+ component[autoBindKey] = bindAutoBindMethod(component, method);
6894
+ }
6895
+ }
6896
+ }
6897
+
6898
+ /**
6899
+ * Add more to the ReactClass base class. These are all legacy features and
6900
+ * therefore not already part of the modern ReactComponent.
6901
+ */
6902
+ var ReactClassMixin = {
6903
+
6904
+ /**
6905
+ * TODO: This will be deprecated because state should always keep a consistent
6906
+ * type signature and the only use case for this, is to avoid that.
6907
+ */
6908
+ replaceState: function (newState, callback) {
6909
+ this.updater.enqueueReplaceState(this, newState);
6910
+ if (callback) {
6911
+ this.updater.enqueueCallback(this, callback);
6912
+ }
6913
+ },
6914
+
6915
+ /**
6916
+ * Checks whether or not this composite component is mounted.
6917
+ * @return {boolean} True if mounted, false otherwise.
6918
+ * @protected
6919
+ * @final
6920
+ */
6921
+ isMounted: function () {
6922
+ return this.updater.isMounted(this);
6923
+ },
6924
+
6925
+ /**
6926
+ * Sets a subset of the props.
6927
+ *
6928
+ * @param {object} partialProps Subset of the next props.
6929
+ * @param {?function} callback Called after props are updated.
6930
+ * @final
6931
+ * @public
6932
+ * @deprecated
6933
+ */
6934
+ setProps: function (partialProps, callback) {
6935
+ if (process.env.NODE_ENV !== 'production') {
6936
+ warnSetProps();
6937
+ }
6938
+ this.updater.enqueueSetProps(this, partialProps);
6939
+ if (callback) {
6940
+ this.updater.enqueueCallback(this, callback);
6941
+ }
6942
+ },
6943
+
6944
+ /**
6945
+ * Replace all the props.
6946
+ *
6947
+ * @param {object} newProps Subset of the next props.
6948
+ * @param {?function} callback Called after props are updated.
6949
+ * @final
6950
+ * @public
6951
+ * @deprecated
6952
+ */
6953
+ replaceProps: function (newProps, callback) {
6954
+ if (process.env.NODE_ENV !== 'production') {
6955
+ warnSetProps();
6956
+ }
6957
+ this.updater.enqueueReplaceProps(this, newProps);
6958
+ if (callback) {
6959
+ this.updater.enqueueCallback(this, callback);
6960
+ }
6961
+ }
6962
+ };
6963
+
6964
+ var ReactClassComponent = function () {};
6965
+ assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
6966
+
6967
+ /**
6968
+ * Module for creating composite components.
6969
+ *
6970
+ * @class ReactClass
6971
+ */
6972
+ var ReactClass = {
6973
+
6974
+ /**
6975
+ * Creates a composite component class given a class specification.
6976
+ *
6977
+ * @param {object} spec Class specification (which must define `render`).
6978
+ * @return {function} Component constructor function.
6979
+ * @public
6980
+ */
6981
+ createClass: function (spec) {
6982
+ var Constructor = function (props, context, updater) {
6983
+ // This constructor is overridden by mocks. The argument is used
6984
+ // by mocks to assert on what gets mounted.
6985
+
6986
+ if (process.env.NODE_ENV !== 'production') {
6987
+ process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : undefined;
6988
+ }
6989
+
6990
+ // Wire up auto-binding
6991
+ if (this.__reactAutoBindMap) {
6992
+ bindAutoBindMethods(this);
6993
+ }
6994
+
6995
+ this.props = props;
6996
+ this.context = context;
6997
+ this.refs = emptyObject;
6998
+ this.updater = updater || ReactNoopUpdateQueue;
6999
+
7000
+ this.state = null;
7001
+
7002
+ // ReactClasses doesn't have constructors. Instead, they use the
7003
+ // getInitialState and componentWillMount methods for initialization.
7004
+
7005
+ var initialState = this.getInitialState ? this.getInitialState() : null;
7006
+ if (process.env.NODE_ENV !== 'production') {
7007
+ // We allow auto-mocks to proceed as if they're returning null.
7008
+ if (typeof initialState === 'undefined' && this.getInitialState._isMockFunction) {
7009
+ // This is probably bad practice. Consider warning here and
7010
+ // deprecating this convenience.
7011
+ initialState = null;
7012
+ }
7013
+ }
7014
+ !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : invariant(false) : undefined;
7015
+
7016
+ this.state = initialState;
7017
+ };
7018
+ Constructor.prototype = new ReactClassComponent();
7019
+ Constructor.prototype.constructor = Constructor;
7020
+
7021
+ injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
7022
+
7023
+ mixSpecIntoComponent(Constructor, spec);
7024
+
7025
+ // Initialize the defaultProps property after all mixins have been merged.
7026
+ if (Constructor.getDefaultProps) {
7027
+ Constructor.defaultProps = Constructor.getDefaultProps();
7028
+ }
7029
+
7030
+ if (process.env.NODE_ENV !== 'production') {
7031
+ // This is a tag to indicate that the use of these method names is ok,
7032
+ // since it's used with createClass. If it's not, then it's likely a
7033
+ // mistake so we'll warn you to use the static property, property
7034
+ // initializer or constructor respectively.
7035
+ if (Constructor.getDefaultProps) {
7036
+ Constructor.getDefaultProps.isReactClassApproved = {};
7037
+ }
7038
+ if (Constructor.prototype.getInitialState) {
7039
+ Constructor.prototype.getInitialState.isReactClassApproved = {};
7040
+ }
7041
+ }
7042
+
7043
+ !Constructor.prototype.render ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : invariant(false) : undefined;
7044
+
7045
+ if (process.env.NODE_ENV !== 'production') {
7046
+ process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : undefined;
7047
+ process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : undefined;
7048
+ }
7049
+
7050
+ // Reduce time spent doing lookups by setting these on the prototype.
7051
+ for (var methodName in ReactClassInterface) {
7052
+ if (!Constructor.prototype[methodName]) {
7053
+ Constructor.prototype[methodName] = null;
7054
+ }
7055
+ }
7056
+
7057
+ return Constructor;
7058
+ },
7059
+
7060
+ injection: {
7061
+ injectMixin: function (mixin) {
7062
+ injectedMixins.push(mixin);
7063
+ }
7064
+ }
7065
+
7066
+ };
7067
+
7068
+ module.exports = ReactClass;
7069
+ }).call(this,require('_process'))
7070
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RDbGFzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQ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W5jdGlvbiBpcyAnICsgJ2V4cGVjdGVkIHRvIHJldHVybiBhIHZhbHVlLicsIHNwZWMuZGlzcGxheU5hbWUgfHwgJ0EgY29tcG9uZW50JykgOiB1bmRlZmluZWQ7XG4gICAgICBwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nID8gd2FybmluZyghQ29uc3RydWN0b3IucHJvdG90eXBlLmNvbXBvbmVudFdpbGxSZWNpZXZlUHJvcHMsICclcyBoYXMgYSBtZXRob2QgY2FsbGVkICcgKyAnY29tcG9uZW50V2lsbFJlY2lldmVQcm9wcygpLiBEaWQgeW91IG1lYW4gY29tcG9uZW50V2lsbFJlY2VpdmVQcm9wcygpPycsIHNwZWMuZGlzcGxheU5hbWUgfHwgJ0EgY29tcG9uZW50JykgOiB1bmRlZmluZWQ7XG4gICAgfVxuXG4gICAgLy8gUmVkdWNlIHRpbWUgc3BlbnQgZG9pbmcgbG9va3VwcyBieSBzZXR0aW5nIHRoZXNlIG9uIHRoZSBwcm90b3R5cGUuXG4gICAgZm9yICh2YXIgbWV0aG9kTmFtZSBpbiBSZWFjdENsYXNzSW50ZXJmYWNlKSB7XG4gICAgICBpZiAoIUNvbnN0cnVjdG9yLnByb3RvdHlwZVttZXRob2ROYW1lXSkge1xuICAgICAgICBDb25zdHJ1Y3Rvci5wcm90b3R5cGVbbWV0aG9kTmFtZV0gPSBudWxsO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBDb25zdHJ1Y3RvcjtcbiAgfSxcblxuICBpbmplY3Rpb246IHtcbiAgICBpbmplY3RNaXhpbjogZnVuY3Rpb24gKG1peGluKSB7XG4gICAgICBpbmplY3RlZE1peGlucy5wdXNoKG1peGluKTtcbiAgICB9XG4gIH1cblxufTtcblxubW9kdWxlLmV4cG9ydHMgPSBSZWFjdENsYXNzOyJdfQ==
7071
+ },{"./Object.assign":52,"./ReactComponent":60,"./ReactElement":82,"./ReactNoopUpdateQueue":99,"./ReactPropTypeLocationNames":102,"./ReactPropTypeLocations":103,"_process":29,"fbjs/lib/emptyObject":10,"fbjs/lib/invariant":17,"fbjs/lib/keyMirror":20,"fbjs/lib/keyOf":21,"fbjs/lib/warning":28}],60:[function(require,module,exports){
7072
+ (function (process){
7073
+ /**
7074
+ * Copyright 2013-2015, Facebook, Inc.
7075
+ * All rights reserved.
7076
+ *
7077
+ * This source code is licensed under the BSD-style license found in the
7078
+ * LICENSE file in the root directory of this source tree. An additional grant
7079
+ * of patent rights can be found in the PATENTS file in the same directory.
7080
+ *
7081
+ * @providesModule ReactComponent
7082
+ */
7083
+
7084
+ 'use strict';
7085
+
7086
+ var ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');
7087
+
7088
+ var canDefineProperty = require('./canDefineProperty');
7089
+ var emptyObject = require('fbjs/lib/emptyObject');
7090
+ var invariant = require('fbjs/lib/invariant');
7091
+ var warning = require('fbjs/lib/warning');
7092
+
7093
+ /**
7094
+ * Base class helpers for the updating state of a component.
7095
+ */
7096
+ function ReactComponent(props, context, updater) {
7097
+ this.props = props;
7098
+ this.context = context;
7099
+ this.refs = emptyObject;
7100
+ // We initialize the default updater but the real one gets injected by the
7101
+ // renderer.
7102
+ this.updater = updater || ReactNoopUpdateQueue;
7103
+ }
7104
+
7105
+ ReactComponent.prototype.isReactComponent = {};
7106
+
7107
+ /**
7108
+ * Sets a subset of the state. Always use this to mutate
7109
+ * state. You should treat `this.state` as immutable.
7110
+ *
7111
+ * There is no guarantee that `this.state` will be immediately updated, so
7112
+ * accessing `this.state` after calling this method may return the old value.
7113
+ *
7114
+ * There is no guarantee that calls to `setState` will run synchronously,
7115
+ * as they may eventually be batched together. You can provide an optional
7116
+ * callback that will be executed when the call to setState is actually
7117
+ * completed.
7118
+ *
7119
+ * When a function is provided to setState, it will be called at some point in
7120
+ * the future (not synchronously). It will be called with the up to date
7121
+ * component arguments (state, props, context). These values can be different
7122
+ * from this.* because your function may be called after receiveProps but before
7123
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
7124
+ * assigned to this.
7125
+ *
7126
+ * @param {object|function} partialState Next partial state or function to
7127
+ * produce next partial state to be merged with current state.
7128
+ * @param {?function} callback Called after state is updated.
7129
+ * @final
7130
+ * @protected
7131
+ */
7132
+ ReactComponent.prototype.setState = function (partialState, callback) {
7133
+ !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.') : invariant(false) : undefined;
7134
+ if (process.env.NODE_ENV !== 'production') {
7135
+ process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : undefined;
7136
+ }
7137
+ this.updater.enqueueSetState(this, partialState);
7138
+ if (callback) {
7139
+ this.updater.enqueueCallback(this, callback);
7140
+ }
7141
+ };
7142
+
7143
+ /**
7144
+ * Forces an update. This should only be invoked when it is known with
7145
+ * certainty that we are **not** in a DOM transaction.
7146
+ *
7147
+ * You may want to call this when you know that some deeper aspect of the
7148
+ * component's state has changed but `setState` was not called.
7149
+ *
7150
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
7151
+ * `componentWillUpdate` and `componentDidUpdate`.
7152
+ *
7153
+ * @param {?function} callback Called after update is complete.
7154
+ * @final
7155
+ * @protected
7156
+ */
7157
+ ReactComponent.prototype.forceUpdate = function (callback) {
7158
+ this.updater.enqueueForceUpdate(this);
7159
+ if (callback) {
7160
+ this.updater.enqueueCallback(this, callback);
7161
+ }
7162
+ };
7163
+
7164
+ /**
7165
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
7166
+ * we would like to deprecate them, we're not going to move them over to this
7167
+ * modern base class. Instead, we define a getter that warns if it's accessed.
7168
+ */
7169
+ if (process.env.NODE_ENV !== 'production') {
7170
+ var deprecatedAPIs = {
7171
+ getDOMNode: ['getDOMNode', 'Use ReactDOM.findDOMNode(component) instead.'],
7172
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
7173
+ replaceProps: ['replaceProps', 'Instead, call render again at the top level.'],
7174
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'],
7175
+ setProps: ['setProps', 'Instead, call render again at the top level.']
7176
+ };
7177
+ var defineDeprecationWarning = function (methodName, info) {
7178
+ if (canDefineProperty) {
7179
+ Object.defineProperty(ReactComponent.prototype, methodName, {
7180
+ get: function () {
7181
+ process.env.NODE_ENV !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : undefined;
7182
+ return undefined;
7183
+ }
7184
+ });
7185
+ }
7186
+ };
7187
+ for (var fnName in deprecatedAPIs) {
7188
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
7189
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
7190
+ }
7191
+ }
7192
+ }
7193
+
7194
+ module.exports = ReactComponent;
7195
+ }).call(this,require('_process'))
7196
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RDb21wb25lbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E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7197
+ },{"./ReactNoopUpdateQueue":99,"./canDefineProperty":134,"_process":29,"fbjs/lib/emptyObject":10,"fbjs/lib/invariant":17,"fbjs/lib/warning":28}],61:[function(require,module,exports){
7198
+ /**
7199
+ * Copyright 2013-2015, Facebook, Inc.
7200
+ * All rights reserved.
7201
+ *
7202
+ * This source code is licensed under the BSD-style license found in the
7203
+ * LICENSE file in the root directory of this source tree. An additional grant
7204
+ * of patent rights can be found in the PATENTS file in the same directory.
7205
+ *
7206
+ * @providesModule ReactComponentBrowserEnvironment
7207
+ */
7208
+
7209
+ 'use strict';
7210
+
7211
+ var ReactDOMIDOperations = require('./ReactDOMIDOperations');
7212
+ var ReactMount = require('./ReactMount');
7213
+
7214
+ /**
7215
+ * Abstracts away all functionality of the reconciler that requires knowledge of
7216
+ * the browser context. TODO: These callers should be refactored to avoid the
7217
+ * need for this injection.
7218
+ */
7219
+ var ReactComponentBrowserEnvironment = {
7220
+
7221
+ processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
7222
+
7223
+ replaceNodeWithMarkupByID: ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID,
7224
+
7225
+ /**
7226
+ * If a particular environment requires that some resources be cleaned up,
7227
+ * specify this in the injected Mixin. In the DOM, we would likely want to
7228
+ * purge any cached node ID lookups.
7229
+ *
7230
+ * @private
7231
+ */
7232
+ unmountIDFromEnvironment: function (rootNodeID) {
7233
+ ReactMount.purgeID(rootNodeID);
7234
+ }
7235
+
7236
+ };
7237
+
7238
+ module.exports = ReactComponentBrowserEnvironment;
7239
+ },{"./ReactDOMIDOperations":70,"./ReactMount":95}],62:[function(require,module,exports){
7240
+ (function (process){
7241
+ /**
7242
+ * Copyright 2014-2015, Facebook, Inc.
7243
+ * All rights reserved.
7244
+ *
7245
+ * This source code is licensed under the BSD-style license found in the
7246
+ * LICENSE file in the root directory of this source tree. An additional grant
7247
+ * of patent rights can be found in the PATENTS file in the same directory.
7248
+ *
7249
+ * @providesModule ReactComponentEnvironment
7250
+ */
7251
+
7252
+ 'use strict';
7253
+
7254
+ var invariant = require('fbjs/lib/invariant');
7255
+
7256
+ var injected = false;
7257
+
7258
+ var ReactComponentEnvironment = {
7259
+
7260
+ /**
7261
+ * Optionally injectable environment dependent cleanup hook. (server vs.
7262
+ * browser etc). Example: A browser system caches DOM nodes based on component
7263
+ * ID and must remove that cache entry when this instance is unmounted.
7264
+ */
7265
+ unmountIDFromEnvironment: null,
7266
+
7267
+ /**
7268
+ * Optionally injectable hook for swapping out mount images in the middle of
7269
+ * the tree.
7270
+ */
7271
+ replaceNodeWithMarkupByID: null,
7272
+
7273
+ /**
7274
+ * Optionally injectable hook for processing a queue of child updates. Will
7275
+ * later move into MultiChildComponents.
7276
+ */
7277
+ processChildrenUpdates: null,
7278
+
7279
+ injection: {
7280
+ injectEnvironment: function (environment) {
7281
+ !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : invariant(false) : undefined;
7282
+ ReactComponentEnvironment.unmountIDFromEnvironment = environment.unmountIDFromEnvironment;
7283
+ ReactComponentEnvironment.replaceNodeWithMarkupByID = environment.replaceNodeWithMarkupByID;
7284
+ ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
7285
+ injected = true;
7286
+ }
7287
+ }
7288
+
7289
+ };
7290
+
7291
+ module.exports = ReactComponentEnvironment;
7292
+ }).call(this,require('_process'))
7293
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RDb21wb25lbnRFbnZpcm9ubWVudC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQ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1lbnQgPSBlbnZpcm9ubWVudC51bm1vdW50SURGcm9tRW52aXJvbm1lbnQ7XG4gICAgICBSZWFjdENvbXBvbmVudEVudmlyb25tZW50LnJlcGxhY2VOb2RlV2l0aE1hcmt1cEJ5SUQgPSBlbnZpcm9ubWVudC5yZXBsYWNlTm9kZVdpdGhNYXJrdXBCeUlEO1xuICAgICAgUmVhY3RDb21wb25lbnRFbnZpcm9ubWVudC5wcm9jZXNzQ2hpbGRyZW5VcGRhdGVzID0gZW52aXJvbm1lbnQucHJvY2Vzc0NoaWxkcmVuVXBkYXRlcztcbiAgICAgIGluamVjdGVkID0gdHJ1ZTtcbiAgICB9XG4gIH1cblxufTtcblxubW9kdWxlLmV4cG9ydHMgPSBSZWFjdENvbXBvbmVudEVudmlyb25tZW50OyJdfQ==
7294
+ },{"_process":29,"fbjs/lib/invariant":17}],63:[function(require,module,exports){
7295
+ (function (process){
7296
+ /**
7297
+ * Copyright 2013-2015, Facebook, Inc.
7298
+ * All rights reserved.
7299
+ *
7300
+ * This source code is licensed under the BSD-style license found in the
7301
+ * LICENSE file in the root directory of this source tree. An additional grant
7302
+ * of patent rights can be found in the PATENTS file in the same directory.
7303
+ *
7304
+ * @providesModule ReactCompositeComponent
7305
+ */
7306
+
7307
+ 'use strict';
7308
+
7309
+ var ReactComponentEnvironment = require('./ReactComponentEnvironment');
7310
+ var ReactCurrentOwner = require('./ReactCurrentOwner');
7311
+ var ReactElement = require('./ReactElement');
7312
+ var ReactInstanceMap = require('./ReactInstanceMap');
7313
+ var ReactPerf = require('./ReactPerf');
7314
+ var ReactPropTypeLocations = require('./ReactPropTypeLocations');
7315
+ var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames');
7316
+ var ReactReconciler = require('./ReactReconciler');
7317
+ var ReactUpdateQueue = require('./ReactUpdateQueue');
7318
+
7319
+ var assign = require('./Object.assign');
7320
+ var emptyObject = require('fbjs/lib/emptyObject');
7321
+ var invariant = require('fbjs/lib/invariant');
7322
+ var shouldUpdateReactComponent = require('./shouldUpdateReactComponent');
7323
+ var warning = require('fbjs/lib/warning');
7324
+
7325
+ function getDeclarationErrorAddendum(component) {
7326
+ var owner = component._currentElement._owner || null;
7327
+ if (owner) {
7328
+ var name = owner.getName();
7329
+ if (name) {
7330
+ return ' Check the render method of `' + name + '`.';
7331
+ }
7332
+ }
7333
+ return '';
7334
+ }
7335
+
7336
+ function StatelessComponent(Component) {}
7337
+ StatelessComponent.prototype.render = function () {
7338
+ var Component = ReactInstanceMap.get(this)._currentElement.type;
7339
+ return Component(this.props, this.context, this.updater);
7340
+ };
7341
+
7342
+ /**
7343
+ * ------------------ The Life-Cycle of a Composite Component ------------------
7344
+ *
7345
+ * - constructor: Initialization of state. The instance is now retained.
7346
+ * - componentWillMount
7347
+ * - render
7348
+ * - [children's constructors]
7349
+ * - [children's componentWillMount and render]
7350
+ * - [children's componentDidMount]
7351
+ * - componentDidMount
7352
+ *
7353
+ * Update Phases:
7354
+ * - componentWillReceiveProps (only called if parent updated)
7355
+ * - shouldComponentUpdate
7356
+ * - componentWillUpdate
7357
+ * - render
7358
+ * - [children's constructors or receive props phases]
7359
+ * - componentDidUpdate
7360
+ *
7361
+ * - componentWillUnmount
7362
+ * - [children's componentWillUnmount]
7363
+ * - [children destroyed]
7364
+ * - (destroyed): The instance is now blank, released by React and ready for GC.
7365
+ *
7366
+ * -----------------------------------------------------------------------------
7367
+ */
7368
+
7369
+ /**
7370
+ * An incrementing ID assigned to each component when it is mounted. This is
7371
+ * used to enforce the order in which `ReactUpdates` updates dirty components.
7372
+ *
7373
+ * @private
7374
+ */
7375
+ var nextMountID = 1;
7376
+
7377
+ /**
7378
+ * @lends {ReactCompositeComponent.prototype}
7379
+ */
7380
+ var ReactCompositeComponentMixin = {
7381
+
7382
+ /**
7383
+ * Base constructor for all composite component.
7384
+ *
7385
+ * @param {ReactElement} element
7386
+ * @final
7387
+ * @internal
7388
+ */
7389
+ construct: function (element) {
7390
+ this._currentElement = element;
7391
+ this._rootNodeID = null;
7392
+ this._instance = null;
7393
+
7394
+ // See ReactUpdateQueue
7395
+ this._pendingElement = null;
7396
+ this._pendingStateQueue = null;
7397
+ this._pendingReplaceState = false;
7398
+ this._pendingForceUpdate = false;
7399
+
7400
+ this._renderedComponent = null;
7401
+
7402
+ this._context = null;
7403
+ this._mountOrder = 0;
7404
+ this._topLevelWrapper = null;
7405
+
7406
+ // See ReactUpdates and ReactUpdateQueue.
7407
+ this._pendingCallbacks = null;
7408
+ },
7409
+
7410
+ /**
7411
+ * Initializes the component, renders markup, and registers event listeners.
7412
+ *
7413
+ * @param {string} rootID DOM ID of the root node.
7414
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
7415
+ * @return {?string} Rendered markup to be inserted into the DOM.
7416
+ * @final
7417
+ * @internal
7418
+ */
7419
+ mountComponent: function (rootID, transaction, context) {
7420
+ this._context = context;
7421
+ this._mountOrder = nextMountID++;
7422
+ this._rootNodeID = rootID;
7423
+
7424
+ var publicProps = this._processProps(this._currentElement.props);
7425
+ var publicContext = this._processContext(context);
7426
+
7427
+ var Component = this._currentElement.type;
7428
+
7429
+ // Initialize the public class
7430
+ var inst;
7431
+ var renderedElement;
7432
+
7433
+ // This is a way to detect if Component is a stateless arrow function
7434
+ // component, which is not newable. It might not be 100% reliable but is
7435
+ // something we can do until we start detecting that Component extends
7436
+ // React.Component. We already assume that typeof Component === 'function'.
7437
+ var canInstantiate = ('prototype' in Component);
7438
+
7439
+ if (canInstantiate) {
7440
+ if (process.env.NODE_ENV !== 'production') {
7441
+ ReactCurrentOwner.current = this;
7442
+ try {
7443
+ inst = new Component(publicProps, publicContext, ReactUpdateQueue);
7444
+ } finally {
7445
+ ReactCurrentOwner.current = null;
7446
+ }
7447
+ } else {
7448
+ inst = new Component(publicProps, publicContext, ReactUpdateQueue);
7449
+ }
7450
+ }
7451
+
7452
+ if (!canInstantiate || inst === null || inst === false || ReactElement.isValidElement(inst)) {
7453
+ renderedElement = inst;
7454
+ inst = new StatelessComponent(Component);
7455
+ }
7456
+
7457
+ if (process.env.NODE_ENV !== 'production') {
7458
+ // This will throw later in _renderValidatedComponent, but add an early
7459
+ // warning now to help debugging
7460
+ if (inst.render == null) {
7461
+ process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`, returned ' + 'null/false from a stateless component, or tried to render an ' + 'element whose type is a function that isn\'t a React component.', Component.displayName || Component.name || 'Component') : undefined;
7462
+ } else {
7463
+ // We support ES6 inheriting from React.Component, the module pattern,
7464
+ // and stateless components, but not ES6 classes that don't extend
7465
+ process.env.NODE_ENV !== 'production' ? warning(Component.prototype && Component.prototype.isReactComponent || !canInstantiate || !(inst instanceof Component), '%s(...): React component classes must extend React.Component.', Component.displayName || Component.name || 'Component') : undefined;
7466
+ }
7467
+ }
7468
+
7469
+ // These should be set up in the constructor, but as a convenience for
7470
+ // simpler class abstractions, we set them up after the fact.
7471
+ inst.props = publicProps;
7472
+ inst.context = publicContext;
7473
+ inst.refs = emptyObject;
7474
+ inst.updater = ReactUpdateQueue;
7475
+
7476
+ this._instance = inst;
7477
+
7478
+ // Store a reference from the instance back to the internal representation
7479
+ ReactInstanceMap.set(inst, this);
7480
+
7481
+ if (process.env.NODE_ENV !== 'production') {
7482
+ // Since plain JS classes are defined without any special initialization
7483
+ // logic, we can not catch common errors early. Therefore, we have to
7484
+ // catch them here, at initialization time, instead.
7485
+ process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : undefined;
7486
+ process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : undefined;
7487
+ process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : undefined;
7488
+ process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : undefined;
7489
+ process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : undefined;
7490
+ process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : undefined;
7491
+ process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : undefined;
7492
+ }
7493
+
7494
+ var initialState = inst.state;
7495
+ if (initialState === undefined) {
7496
+ inst.state = initialState = null;
7497
+ }
7498
+ !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined;
7499
+
7500
+ this._pendingStateQueue = null;
7501
+ this._pendingReplaceState = false;
7502
+ this._pendingForceUpdate = false;
7503
+
7504
+ if (inst.componentWillMount) {
7505
+ inst.componentWillMount();
7506
+ // When mounting, calls to `setState` by `componentWillMount` will set
7507
+ // `this._pendingStateQueue` without triggering a re-render.
7508
+ if (this._pendingStateQueue) {
7509
+ inst.state = this._processPendingState(inst.props, inst.context);
7510
+ }
7511
+ }
7512
+
7513
+ // If not a stateless component, we now render
7514
+ if (renderedElement === undefined) {
7515
+ renderedElement = this._renderValidatedComponent();
7516
+ }
7517
+
7518
+ this._renderedComponent = this._instantiateReactComponent(renderedElement);
7519
+
7520
+ var markup = ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, this._processChildContext(context));
7521
+ if (inst.componentDidMount) {
7522
+ transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
7523
+ }
7524
+
7525
+ return markup;
7526
+ },
7527
+
7528
+ /**
7529
+ * Releases any resources allocated by `mountComponent`.
7530
+ *
7531
+ * @final
7532
+ * @internal
7533
+ */
7534
+ unmountComponent: function () {
7535
+ var inst = this._instance;
7536
+
7537
+ if (inst.componentWillUnmount) {
7538
+ inst.componentWillUnmount();
7539
+ }
7540
+
7541
+ ReactReconciler.unmountComponent(this._renderedComponent);
7542
+ this._renderedComponent = null;
7543
+ this._instance = null;
7544
+
7545
+ // Reset pending fields
7546
+ // Even if this component is scheduled for another update in ReactUpdates,
7547
+ // it would still be ignored because these fields are reset.
7548
+ this._pendingStateQueue = null;
7549
+ this._pendingReplaceState = false;
7550
+ this._pendingForceUpdate = false;
7551
+ this._pendingCallbacks = null;
7552
+ this._pendingElement = null;
7553
+
7554
+ // These fields do not really need to be reset since this object is no
7555
+ // longer accessible.
7556
+ this._context = null;
7557
+ this._rootNodeID = null;
7558
+ this._topLevelWrapper = null;
7559
+
7560
+ // Delete the reference from the instance to this internal representation
7561
+ // which allow the internals to be properly cleaned up even if the user
7562
+ // leaks a reference to the public instance.
7563
+ ReactInstanceMap.remove(inst);
7564
+
7565
+ // Some existing components rely on inst.props even after they've been
7566
+ // destroyed (in event handlers).
7567
+ // TODO: inst.props = null;
7568
+ // TODO: inst.state = null;
7569
+ // TODO: inst.context = null;
7570
+ },
7571
+
7572
+ /**
7573
+ * Filters the context object to only contain keys specified in
7574
+ * `contextTypes`
7575
+ *
7576
+ * @param {object} context
7577
+ * @return {?object}
7578
+ * @private
7579
+ */
7580
+ _maskContext: function (context) {
7581
+ var maskedContext = null;
7582
+ var Component = this._currentElement.type;
7583
+ var contextTypes = Component.contextTypes;
7584
+ if (!contextTypes) {
7585
+ return emptyObject;
7586
+ }
7587
+ maskedContext = {};
7588
+ for (var contextName in contextTypes) {
7589
+ maskedContext[contextName] = context[contextName];
7590
+ }
7591
+ return maskedContext;
7592
+ },
7593
+
7594
+ /**
7595
+ * Filters the context object to only contain keys specified in
7596
+ * `contextTypes`, and asserts that they are valid.
7597
+ *
7598
+ * @param {object} context
7599
+ * @return {?object}
7600
+ * @private
7601
+ */
7602
+ _processContext: function (context) {
7603
+ var maskedContext = this._maskContext(context);
7604
+ if (process.env.NODE_ENV !== 'production') {
7605
+ var Component = this._currentElement.type;
7606
+ if (Component.contextTypes) {
7607
+ this._checkPropTypes(Component.contextTypes, maskedContext, ReactPropTypeLocations.context);
7608
+ }
7609
+ }
7610
+ return maskedContext;
7611
+ },
7612
+
7613
+ /**
7614
+ * @param {object} currentContext
7615
+ * @return {object}
7616
+ * @private
7617
+ */
7618
+ _processChildContext: function (currentContext) {
7619
+ var Component = this._currentElement.type;
7620
+ var inst = this._instance;
7621
+ var childContext = inst.getChildContext && inst.getChildContext();
7622
+ if (childContext) {
7623
+ !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined;
7624
+ if (process.env.NODE_ENV !== 'production') {
7625
+ this._checkPropTypes(Component.childContextTypes, childContext, ReactPropTypeLocations.childContext);
7626
+ }
7627
+ for (var name in childContext) {
7628
+ !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : invariant(false) : undefined;
7629
+ }
7630
+ return assign({}, currentContext, childContext);
7631
+ }
7632
+ return currentContext;
7633
+ },
7634
+
7635
+ /**
7636
+ * Processes props by setting default values for unspecified props and
7637
+ * asserting that the props are valid. Does not mutate its argument; returns
7638
+ * a new props object with defaults merged in.
7639
+ *
7640
+ * @param {object} newProps
7641
+ * @return {object}
7642
+ * @private
7643
+ */
7644
+ _processProps: function (newProps) {
7645
+ if (process.env.NODE_ENV !== 'production') {
7646
+ var Component = this._currentElement.type;
7647
+ if (Component.propTypes) {
7648
+ this._checkPropTypes(Component.propTypes, newProps, ReactPropTypeLocations.prop);
7649
+ }
7650
+ }
7651
+ return newProps;
7652
+ },
7653
+
7654
+ /**
7655
+ * Assert that the props are valid
7656
+ *
7657
+ * @param {object} propTypes Map of prop name to a ReactPropType
7658
+ * @param {object} props
7659
+ * @param {string} location e.g. "prop", "context", "child context"
7660
+ * @private
7661
+ */
7662
+ _checkPropTypes: function (propTypes, props, location) {
7663
+ // TODO: Stop validating prop types here and only use the element
7664
+ // validation.
7665
+ var componentName = this.getName();
7666
+ for (var propName in propTypes) {
7667
+ if (propTypes.hasOwnProperty(propName)) {
7668
+ var error;
7669
+ try {
7670
+ // This is intentionally an invariant that gets caught. It's the same
7671
+ // behavior as without this statement except with a better message.
7672
+ !(typeof propTypes[propName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually ' + 'from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(false) : undefined;
7673
+ error = propTypes[propName](props, propName, componentName, location);
7674
+ } catch (ex) {
7675
+ error = ex;
7676
+ }
7677
+ if (error instanceof Error) {
7678
+ // We may want to extend this logic for similar errors in
7679
+ // top-level render calls, so I'm abstracting it away into
7680
+ // a function to minimize refactoring in the future
7681
+ var addendum = getDeclarationErrorAddendum(this);
7682
+
7683
+ if (location === ReactPropTypeLocations.prop) {
7684
+ // Preface gives us something to blacklist in warning module
7685
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Failed Composite propType: %s%s', error.message, addendum) : undefined;
7686
+ } else {
7687
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Failed Context Types: %s%s', error.message, addendum) : undefined;
7688
+ }
7689
+ }
7690
+ }
7691
+ }
7692
+ },
7693
+
7694
+ receiveComponent: function (nextElement, transaction, nextContext) {
7695
+ var prevElement = this._currentElement;
7696
+ var prevContext = this._context;
7697
+
7698
+ this._pendingElement = null;
7699
+
7700
+ this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
7701
+ },
7702
+
7703
+ /**
7704
+ * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
7705
+ * is set, update the component.
7706
+ *
7707
+ * @param {ReactReconcileTransaction} transaction
7708
+ * @internal
7709
+ */
7710
+ performUpdateIfNecessary: function (transaction) {
7711
+ if (this._pendingElement != null) {
7712
+ ReactReconciler.receiveComponent(this, this._pendingElement || this._currentElement, transaction, this._context);
7713
+ }
7714
+
7715
+ if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
7716
+ this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
7717
+ }
7718
+ },
7719
+
7720
+ /**
7721
+ * Perform an update to a mounted component. The componentWillReceiveProps and
7722
+ * shouldComponentUpdate methods are called, then (assuming the update isn't
7723
+ * skipped) the remaining update lifecycle methods are called and the DOM
7724
+ * representation is updated.
7725
+ *
7726
+ * By default, this implements React's rendering and reconciliation algorithm.
7727
+ * Sophisticated clients may wish to override this.
7728
+ *
7729
+ * @param {ReactReconcileTransaction} transaction
7730
+ * @param {ReactElement} prevParentElement
7731
+ * @param {ReactElement} nextParentElement
7732
+ * @internal
7733
+ * @overridable
7734
+ */
7735
+ updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
7736
+ var inst = this._instance;
7737
+
7738
+ var nextContext = this._context === nextUnmaskedContext ? inst.context : this._processContext(nextUnmaskedContext);
7739
+ var nextProps;
7740
+
7741
+ // Distinguish between a props update versus a simple state update
7742
+ if (prevParentElement === nextParentElement) {
7743
+ // Skip checking prop types again -- we don't read inst.props to avoid
7744
+ // warning for DOM component props in this upgrade
7745
+ nextProps = nextParentElement.props;
7746
+ } else {
7747
+ nextProps = this._processProps(nextParentElement.props);
7748
+ // An update here will schedule an update but immediately set
7749
+ // _pendingStateQueue which will ensure that any state updates gets
7750
+ // immediately reconciled instead of waiting for the next batch.
7751
+
7752
+ if (inst.componentWillReceiveProps) {
7753
+ inst.componentWillReceiveProps(nextProps, nextContext);
7754
+ }
7755
+ }
7756
+
7757
+ var nextState = this._processPendingState(nextProps, nextContext);
7758
+
7759
+ var shouldUpdate = this._pendingForceUpdate || !inst.shouldComponentUpdate || inst.shouldComponentUpdate(nextProps, nextState, nextContext);
7760
+
7761
+ if (process.env.NODE_ENV !== 'production') {
7762
+ process.env.NODE_ENV !== 'production' ? warning(typeof shouldUpdate !== 'undefined', '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : undefined;
7763
+ }
7764
+
7765
+ if (shouldUpdate) {
7766
+ this._pendingForceUpdate = false;
7767
+ // Will set `this.props`, `this.state` and `this.context`.
7768
+ this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
7769
+ } else {
7770
+ // If it's determined that a component should not update, we still want
7771
+ // to set props and state but we shortcut the rest of the update.
7772
+ this._currentElement = nextParentElement;
7773
+ this._context = nextUnmaskedContext;
7774
+ inst.props = nextProps;
7775
+ inst.state = nextState;
7776
+ inst.context = nextContext;
7777
+ }
7778
+ },
7779
+
7780
+ _processPendingState: function (props, context) {
7781
+ var inst = this._instance;
7782
+ var queue = this._pendingStateQueue;
7783
+ var replace = this._pendingReplaceState;
7784
+ this._pendingReplaceState = false;
7785
+ this._pendingStateQueue = null;
7786
+
7787
+ if (!queue) {
7788
+ return inst.state;
7789
+ }
7790
+
7791
+ if (replace && queue.length === 1) {
7792
+ return queue[0];
7793
+ }
7794
+
7795
+ var nextState = assign({}, replace ? queue[0] : inst.state);
7796
+ for (var i = replace ? 1 : 0; i < queue.length; i++) {
7797
+ var partial = queue[i];
7798
+ assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
7799
+ }
7800
+
7801
+ return nextState;
7802
+ },
7803
+
7804
+ /**
7805
+ * Merges new props and state, notifies delegate methods of update and
7806
+ * performs update.
7807
+ *
7808
+ * @param {ReactElement} nextElement Next element
7809
+ * @param {object} nextProps Next public object to set as properties.
7810
+ * @param {?object} nextState Next object to set as state.
7811
+ * @param {?object} nextContext Next public object to set as context.
7812
+ * @param {ReactReconcileTransaction} transaction
7813
+ * @param {?object} unmaskedContext
7814
+ * @private
7815
+ */
7816
+ _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
7817
+ var inst = this._instance;
7818
+
7819
+ var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
7820
+ var prevProps;
7821
+ var prevState;
7822
+ var prevContext;
7823
+ if (hasComponentDidUpdate) {
7824
+ prevProps = inst.props;
7825
+ prevState = inst.state;
7826
+ prevContext = inst.context;
7827
+ }
7828
+
7829
+ if (inst.componentWillUpdate) {
7830
+ inst.componentWillUpdate(nextProps, nextState, nextContext);
7831
+ }
7832
+
7833
+ this._currentElement = nextElement;
7834
+ this._context = unmaskedContext;
7835
+ inst.props = nextProps;
7836
+ inst.state = nextState;
7837
+ inst.context = nextContext;
7838
+
7839
+ this._updateRenderedComponent(transaction, unmaskedContext);
7840
+
7841
+ if (hasComponentDidUpdate) {
7842
+ transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
7843
+ }
7844
+ },
7845
+
7846
+ /**
7847
+ * Call the component's `render` method and update the DOM accordingly.
7848
+ *
7849
+ * @param {ReactReconcileTransaction} transaction
7850
+ * @internal
7851
+ */
7852
+ _updateRenderedComponent: function (transaction, context) {
7853
+ var prevComponentInstance = this._renderedComponent;
7854
+ var prevRenderedElement = prevComponentInstance._currentElement;
7855
+ var nextRenderedElement = this._renderValidatedComponent();
7856
+ if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
7857
+ ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
7858
+ } else {
7859
+ // These two IDs are actually the same! But nothing should rely on that.
7860
+ var thisID = this._rootNodeID;
7861
+ var prevComponentID = prevComponentInstance._rootNodeID;
7862
+ ReactReconciler.unmountComponent(prevComponentInstance);
7863
+
7864
+ this._renderedComponent = this._instantiateReactComponent(nextRenderedElement);
7865
+ var nextMarkup = ReactReconciler.mountComponent(this._renderedComponent, thisID, transaction, this._processChildContext(context));
7866
+ this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup);
7867
+ }
7868
+ },
7869
+
7870
+ /**
7871
+ * @protected
7872
+ */
7873
+ _replaceNodeWithMarkupByID: function (prevComponentID, nextMarkup) {
7874
+ ReactComponentEnvironment.replaceNodeWithMarkupByID(prevComponentID, nextMarkup);
7875
+ },
7876
+
7877
+ /**
7878
+ * @protected
7879
+ */
7880
+ _renderValidatedComponentWithoutOwnerOrContext: function () {
7881
+ var inst = this._instance;
7882
+ var renderedComponent = inst.render();
7883
+ if (process.env.NODE_ENV !== 'production') {
7884
+ // We allow auto-mocks to proceed as if they're returning null.
7885
+ if (typeof renderedComponent === 'undefined' && inst.render._isMockFunction) {
7886
+ // This is probably bad practice. Consider warning here and
7887
+ // deprecating this convenience.
7888
+ renderedComponent = null;
7889
+ }
7890
+ }
7891
+
7892
+ return renderedComponent;
7893
+ },
7894
+
7895
+ /**
7896
+ * @private
7897
+ */
7898
+ _renderValidatedComponent: function () {
7899
+ var renderedComponent;
7900
+ ReactCurrentOwner.current = this;
7901
+ try {
7902
+ renderedComponent = this._renderValidatedComponentWithoutOwnerOrContext();
7903
+ } finally {
7904
+ ReactCurrentOwner.current = null;
7905
+ }
7906
+ !(
7907
+ // TODO: An `isValidNode` function would probably be more appropriate
7908
+ renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid ReactComponent must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined;
7909
+ return renderedComponent;
7910
+ },
7911
+
7912
+ /**
7913
+ * Lazily allocates the refs object and stores `component` as `ref`.
7914
+ *
7915
+ * @param {string} ref Reference name.
7916
+ * @param {component} component Component to store as `ref`.
7917
+ * @final
7918
+ * @private
7919
+ */
7920
+ attachRef: function (ref, component) {
7921
+ var inst = this.getPublicInstance();
7922
+ !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : invariant(false) : undefined;
7923
+ var publicComponentInstance = component.getPublicInstance();
7924
+ if (process.env.NODE_ENV !== 'production') {
7925
+ var componentName = component && component.getName ? component.getName() : 'a component';
7926
+ process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : undefined;
7927
+ }
7928
+ var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
7929
+ refs[ref] = publicComponentInstance;
7930
+ },
7931
+
7932
+ /**
7933
+ * Detaches a reference name.
7934
+ *
7935
+ * @param {string} ref Name to dereference.
7936
+ * @final
7937
+ * @private
7938
+ */
7939
+ detachRef: function (ref) {
7940
+ var refs = this.getPublicInstance().refs;
7941
+ delete refs[ref];
7942
+ },
7943
+
7944
+ /**
7945
+ * Get a text description of the component that can be used to identify it
7946
+ * in error messages.
7947
+ * @return {string} The name or null.
7948
+ * @internal
7949
+ */
7950
+ getName: function () {
7951
+ var type = this._currentElement.type;
7952
+ var constructor = this._instance && this._instance.constructor;
7953
+ return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
7954
+ },
7955
+
7956
+ /**
7957
+ * Get the publicly accessible representation of this component - i.e. what
7958
+ * is exposed by refs and returned by render. Can be null for stateless
7959
+ * components.
7960
+ *
7961
+ * @return {ReactComponent} the public component instance.
7962
+ * @internal
7963
+ */
7964
+ getPublicInstance: function () {
7965
+ var inst = this._instance;
7966
+ if (inst instanceof StatelessComponent) {
7967
+ return null;
7968
+ }
7969
+ return inst;
7970
+ },
7971
+
7972
+ // Stub
7973
+ _instantiateReactComponent: null
7974
+
7975
+ };
7976
+
7977
+ ReactPerf.measureMethods(ReactCompositeComponentMixin, 'ReactCompositeComponent', {
7978
+ mountComponent: 'mountComponent',
7979
+ updateComponent: 'updateComponent',
7980
+ _renderValidatedComponent: '_renderValidatedComponent'
7981
+ });
7982
+
7983
+ var ReactCompositeComponent = {
7984
+
7985
+ Mixin: ReactCompositeComponentMixin
7986
+
7987
+ };
7988
+
7989
+ module.exports = ReactCompositeComponent;
7990
+ }).call(this,require('_process'))
7991
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RDb21wb3NpdGVDb21wb25lbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQU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0dXJuIHtSZWFjdENvbXBvbmVudH0gdGhlIHB1YmxpYyBjb21wb25lbnQgaW5zdGFuY2UuXG4gICAqIEBpbnRlcm5hbFxuICAgKi9cbiAgZ2V0UHVibGljSW5zdGFuY2U6IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgaW5zdCA9IHRoaXMuX2luc3RhbmNlO1xuICAgIGlmIChpbnN0IGluc3RhbmNlb2YgU3RhdGVsZXNzQ29tcG9uZW50KSB7XG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG4gICAgcmV0dXJuIGluc3Q7XG4gIH0sXG5cbiAgLy8gU3R1YlxuICBfaW5zdGFudGlhdGVSZWFjdENvbXBvbmVudDogbnVsbFxuXG59O1xuXG5SZWFjdFBlcmYubWVhc3VyZU1ldGhvZHMoUmVhY3RDb21wb3NpdGVDb21wb25lbnRNaXhpbiwgJ1JlYWN0Q29tcG9zaXRlQ29tcG9uZW50Jywge1xuICBtb3VudENvbXBvbmVudDogJ21vdW50Q29tcG9uZW50JyxcbiAgdXBkYXRlQ29tcG9uZW50OiAndXBkYXRlQ29tcG9uZW50JyxcbiAgX3JlbmRlclZhbGlkYXRlZENvbXBvbmVudDogJ19yZW5kZXJWYWxpZGF0ZWRDb21wb25lbnQnXG59KTtcblxudmFyIFJlYWN0Q29tcG9zaXRlQ29tcG9uZW50ID0ge1xuXG4gIE1peGluOiBSZWFjdENvbXBvc2l0ZUNvbXBvbmVudE1peGluXG5cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gUmVhY3RDb21wb3NpdGVDb21wb25lbnQ7Il19
7992
+ },{"./Object.assign":52,"./ReactComponentEnvironment":62,"./ReactCurrentOwner":64,"./ReactElement":82,"./ReactInstanceMap":92,"./ReactPerf":101,"./ReactPropTypeLocationNames":102,"./ReactPropTypeLocations":103,"./ReactReconciler":106,"./ReactUpdateQueue":112,"./shouldUpdateReactComponent":156,"_process":29,"fbjs/lib/emptyObject":10,"fbjs/lib/invariant":17,"fbjs/lib/warning":28}],64:[function(require,module,exports){
7993
+ /**
7994
+ * Copyright 2013-2015, Facebook, Inc.
7995
+ * All rights reserved.
7996
+ *
7997
+ * This source code is licensed under the BSD-style license found in the
7998
+ * LICENSE file in the root directory of this source tree. An additional grant
7999
+ * of patent rights can be found in the PATENTS file in the same directory.
8000
+ *
8001
+ * @providesModule ReactCurrentOwner
8002
+ */
8003
+
8004
+ 'use strict';
8005
+
8006
+ /**
8007
+ * Keeps track of the current owner.
8008
+ *
8009
+ * The current owner is the component who should own any components that are
8010
+ * currently being constructed.
8011
+ */
8012
+ var ReactCurrentOwner = {
8013
+
8014
+ /**
8015
+ * @internal
8016
+ * @type {ReactComponent}
8017
+ */
8018
+ current: null
8019
+
8020
+ };
8021
+
8022
+ module.exports = ReactCurrentOwner;
8023
+ },{}],65:[function(require,module,exports){
8024
+ (function (process){
8025
+ /**
8026
+ * Copyright 2013-2015, Facebook, Inc.
8027
+ * All rights reserved.
8028
+ *
8029
+ * This source code is licensed under the BSD-style license found in the
8030
+ * LICENSE file in the root directory of this source tree. An additional grant
8031
+ * of patent rights can be found in the PATENTS file in the same directory.
8032
+ *
8033
+ * @providesModule ReactDOM
8034
+ */
8035
+
8036
+ /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/
8037
+
8038
+ 'use strict';
8039
+
8040
+ var ReactCurrentOwner = require('./ReactCurrentOwner');
8041
+ var ReactDOMTextComponent = require('./ReactDOMTextComponent');
8042
+ var ReactDefaultInjection = require('./ReactDefaultInjection');
8043
+ var ReactInstanceHandles = require('./ReactInstanceHandles');
8044
+ var ReactMount = require('./ReactMount');
8045
+ var ReactPerf = require('./ReactPerf');
8046
+ var ReactReconciler = require('./ReactReconciler');
8047
+ var ReactUpdates = require('./ReactUpdates');
8048
+ var ReactVersion = require('./ReactVersion');
8049
+
8050
+ var findDOMNode = require('./findDOMNode');
8051
+ var renderSubtreeIntoContainer = require('./renderSubtreeIntoContainer');
8052
+ var warning = require('fbjs/lib/warning');
8053
+
8054
+ ReactDefaultInjection.inject();
8055
+
8056
+ var render = ReactPerf.measure('React', 'render', ReactMount.render);
8057
+
8058
+ var React = {
8059
+ findDOMNode: findDOMNode,
8060
+ render: render,
8061
+ unmountComponentAtNode: ReactMount.unmountComponentAtNode,
8062
+ version: ReactVersion,
8063
+
8064
+ /* eslint-disable camelcase */
8065
+ unstable_batchedUpdates: ReactUpdates.batchedUpdates,
8066
+ unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
8067
+ };
8068
+
8069
+ // Inject the runtime into a devtools global hook regardless of browser.
8070
+ // Allows for debugging when the hook is injected on the page.
8071
+ /* eslint-enable camelcase */
8072
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
8073
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
8074
+ CurrentOwner: ReactCurrentOwner,
8075
+ InstanceHandles: ReactInstanceHandles,
8076
+ Mount: ReactMount,
8077
+ Reconciler: ReactReconciler,
8078
+ TextComponent: ReactDOMTextComponent
8079
+ });
8080
+ }
8081
+
8082
+ if (process.env.NODE_ENV !== 'production') {
8083
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
8084
+ if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
8085
+
8086
+ // First check if devtools is not installed
8087
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
8088
+ // If we're in Chrome or Firefox, provide a download link if not installed.
8089
+ if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
8090
+ console.debug('Download the React DevTools for a better development experience: ' + 'https://fb.me/react-devtools');
8091
+ }
8092
+ }
8093
+
8094
+ // If we're in IE8, check to see if we are in compatibility mode and provide
8095
+ // information on preventing compatibility mode
8096
+ var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
8097
+
8098
+ process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : undefined;
8099
+
8100
+ var expectedFeatures = [
8101
+ // shims
8102
+ Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim,
8103
+
8104
+ // shams
8105
+ Object.create, Object.freeze];
8106
+
8107
+ for (var i = 0; i < expectedFeatures.length; i++) {
8108
+ if (!expectedFeatures[i]) {
8109
+ console.error('One or more ES5 shim/shams expected by React are not available: ' + 'https://fb.me/react-warning-polyfills');
8110
+ break;
8111
+ }
8112
+ }
8113
+ }
8114
+ }
8115
+
8116
+ module.exports = React;
8117
+ }).call(this,require('_process'))
8118
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RET00uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNB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InstanceHandles":91,"./ReactMount":95,"./ReactPerf":101,"./ReactReconciler":106,"./ReactUpdates":113,"./ReactVersion":114,"./findDOMNode":138,"./renderSubtreeIntoContainer":153,"_process":29,"fbjs/lib/ExecutionEnvironment":3,"fbjs/lib/warning":28}],66:[function(require,module,exports){
8120
+ /**
8121
+ * Copyright 2013-2015, Facebook, Inc.
8122
+ * All rights reserved.
8123
+ *
8124
+ * This source code is licensed under the BSD-style license found in the
8125
+ * LICENSE file in the root directory of this source tree. An additional grant
8126
+ * of patent rights can be found in the PATENTS file in the same directory.
8127
+ *
8128
+ * @providesModule ReactDOMButton
8129
+ */
8130
+
8131
+ 'use strict';
8132
+
8133
+ var mouseListenerNames = {
8134
+ onClick: true,
8135
+ onDoubleClick: true,
8136
+ onMouseDown: true,
8137
+ onMouseMove: true,
8138
+ onMouseUp: true,
8139
+
8140
+ onClickCapture: true,
8141
+ onDoubleClickCapture: true,
8142
+ onMouseDownCapture: true,
8143
+ onMouseMoveCapture: true,
8144
+ onMouseUpCapture: true
8145
+ };
8146
+
8147
+ /**
8148
+ * Implements a <button> native component that does not receive mouse events
8149
+ * when `disabled` is set.
8150
+ */
8151
+ var ReactDOMButton = {
8152
+ getNativeProps: function (inst, props, context) {
8153
+ if (!props.disabled) {
8154
+ return props;
8155
+ }
8156
+
8157
+ // Copy the props, except the mouse listeners
8158
+ var nativeProps = {};
8159
+ for (var key in props) {
8160
+ if (props.hasOwnProperty(key) && !mouseListenerNames[key]) {
8161
+ nativeProps[key] = props[key];
8162
+ }
8163
+ }
8164
+
8165
+ return nativeProps;
8166
+ }
8167
+ };
8168
+
8169
+ module.exports = ReactDOMButton;
8170
+ },{}],67:[function(require,module,exports){
8171
+ (function (process){
8172
+ /**
8173
+ * Copyright 2013-2015, Facebook, Inc.
8174
+ * All rights reserved.
8175
+ *
8176
+ * This source code is licensed under the BSD-style license found in the
8177
+ * LICENSE file in the root directory of this source tree. An additional grant
8178
+ * of patent rights can be found in the PATENTS file in the same directory.
8179
+ *
8180
+ * @providesModule ReactDOMComponent
8181
+ * @typechecks static-only
8182
+ */
8183
+
8184
+ /* global hasOwnProperty:true */
8185
+
8186
+ 'use strict';
8187
+
8188
+ var AutoFocusUtils = require('./AutoFocusUtils');
8189
+ var CSSPropertyOperations = require('./CSSPropertyOperations');
8190
+ var DOMProperty = require('./DOMProperty');
8191
+ var DOMPropertyOperations = require('./DOMPropertyOperations');
8192
+ var EventConstants = require('./EventConstants');
8193
+ var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
8194
+ var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');
8195
+ var ReactDOMButton = require('./ReactDOMButton');
8196
+ var ReactDOMInput = require('./ReactDOMInput');
8197
+ var ReactDOMOption = require('./ReactDOMOption');
8198
+ var ReactDOMSelect = require('./ReactDOMSelect');
8199
+ var ReactDOMTextarea = require('./ReactDOMTextarea');
8200
+ var ReactMount = require('./ReactMount');
8201
+ var ReactMultiChild = require('./ReactMultiChild');
8202
+ var ReactPerf = require('./ReactPerf');
8203
+ var ReactUpdateQueue = require('./ReactUpdateQueue');
8204
+
8205
+ var assign = require('./Object.assign');
8206
+ var canDefineProperty = require('./canDefineProperty');
8207
+ var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');
8208
+ var invariant = require('fbjs/lib/invariant');
8209
+ var isEventSupported = require('./isEventSupported');
8210
+ var keyOf = require('fbjs/lib/keyOf');
8211
+ var setInnerHTML = require('./setInnerHTML');
8212
+ var setTextContent = require('./setTextContent');
8213
+ var shallowEqual = require('fbjs/lib/shallowEqual');
8214
+ var validateDOMNesting = require('./validateDOMNesting');
8215
+ var warning = require('fbjs/lib/warning');
8216
+
8217
+ var deleteListener = ReactBrowserEventEmitter.deleteListener;
8218
+ var listenTo = ReactBrowserEventEmitter.listenTo;
8219
+ var registrationNameModules = ReactBrowserEventEmitter.registrationNameModules;
8220
+
8221
+ // For quickly matching children type, to test if can be treated as content.
8222
+ var CONTENT_TYPES = { 'string': true, 'number': true };
8223
+
8224
+ var CHILDREN = keyOf({ children: null });
8225
+ var STYLE = keyOf({ style: null });
8226
+ var HTML = keyOf({ __html: null });
8227
+
8228
+ var ELEMENT_NODE_TYPE = 1;
8229
+
8230
+ function getDeclarationErrorAddendum(internalInstance) {
8231
+ if (internalInstance) {
8232
+ var owner = internalInstance._currentElement._owner || null;
8233
+ if (owner) {
8234
+ var name = owner.getName();
8235
+ if (name) {
8236
+ return ' This DOM node was rendered by `' + name + '`.';
8237
+ }
8238
+ }
8239
+ }
8240
+ return '';
8241
+ }
8242
+
8243
+ var legacyPropsDescriptor;
8244
+ if (process.env.NODE_ENV !== 'production') {
8245
+ legacyPropsDescriptor = {
8246
+ props: {
8247
+ enumerable: false,
8248
+ get: function () {
8249
+ var component = this._reactInternalComponent;
8250
+ process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .props of a DOM node; instead, ' + 'recreate the props as `render` did originally or read the DOM ' + 'properties/attributes directly from this node (e.g., ' + 'this.refs.box.className).%s', getDeclarationErrorAddendum(component)) : undefined;
8251
+ return component._currentElement.props;
8252
+ }
8253
+ }
8254
+ };
8255
+ }
8256
+
8257
+ function legacyGetDOMNode() {
8258
+ if (process.env.NODE_ENV !== 'production') {
8259
+ var component = this._reactInternalComponent;
8260
+ process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .getDOMNode() of a DOM node; ' + 'instead, use the node directly.%s', getDeclarationErrorAddendum(component)) : undefined;
8261
+ }
8262
+ return this;
8263
+ }
8264
+
8265
+ function legacyIsMounted() {
8266
+ var component = this._reactInternalComponent;
8267
+ if (process.env.NODE_ENV !== 'production') {
8268
+ process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .isMounted() of a DOM node.%s', getDeclarationErrorAddendum(component)) : undefined;
8269
+ }
8270
+ return !!component;
8271
+ }
8272
+
8273
+ function legacySetStateEtc() {
8274
+ if (process.env.NODE_ENV !== 'production') {
8275
+ var component = this._reactInternalComponent;
8276
+ process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .setState(), .replaceState(), or ' + '.forceUpdate() of a DOM node. This is a no-op.%s', getDeclarationErrorAddendum(component)) : undefined;
8277
+ }
8278
+ }
8279
+
8280
+ function legacySetProps(partialProps, callback) {
8281
+ var component = this._reactInternalComponent;
8282
+ if (process.env.NODE_ENV !== 'production') {
8283
+ process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .setProps() of a DOM node. ' + 'Instead, call ReactDOM.render again at the top level.%s', getDeclarationErrorAddendum(component)) : undefined;
8284
+ }
8285
+ if (!component) {
8286
+ return;
8287
+ }
8288
+ ReactUpdateQueue.enqueueSetPropsInternal(component, partialProps);
8289
+ if (callback) {
8290
+ ReactUpdateQueue.enqueueCallbackInternal(component, callback);
8291
+ }
8292
+ }
8293
+
8294
+ function legacyReplaceProps(partialProps, callback) {
8295
+ var component = this._reactInternalComponent;
8296
+ if (process.env.NODE_ENV !== 'production') {
8297
+ process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .replaceProps() of a DOM node. ' + 'Instead, call ReactDOM.render again at the top level.%s', getDeclarationErrorAddendum(component)) : undefined;
8298
+ }
8299
+ if (!component) {
8300
+ return;
8301
+ }
8302
+ ReactUpdateQueue.enqueueReplacePropsInternal(component, partialProps);
8303
+ if (callback) {
8304
+ ReactUpdateQueue.enqueueCallbackInternal(component, callback);
8305
+ }
8306
+ }
8307
+
8308
+ function friendlyStringify(obj) {
8309
+ if (typeof obj === 'object') {
8310
+ if (Array.isArray(obj)) {
8311
+ return '[' + obj.map(friendlyStringify).join(', ') + ']';
8312
+ } else {
8313
+ var pairs = [];
8314
+ for (var key in obj) {
8315
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
8316
+ var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
8317
+ pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
8318
+ }
8319
+ }
8320
+ return '{' + pairs.join(', ') + '}';
8321
+ }
8322
+ } else if (typeof obj === 'string') {
8323
+ return JSON.stringify(obj);
8324
+ } else if (typeof obj === 'function') {
8325
+ return '[function object]';
8326
+ }
8327
+ // Differs from JSON.stringify in that undefined becauses undefined and that
8328
+ // inf and nan don't become null
8329
+ return String(obj);
8330
+ }
8331
+
8332
+ var styleMutationWarning = {};
8333
+
8334
+ function checkAndWarnForMutatedStyle(style1, style2, component) {
8335
+ if (style1 == null || style2 == null) {
8336
+ return;
8337
+ }
8338
+ if (shallowEqual(style1, style2)) {
8339
+ return;
8340
+ }
8341
+
8342
+ var componentName = component._tag;
8343
+ var owner = component._currentElement._owner;
8344
+ var ownerName;
8345
+ if (owner) {
8346
+ ownerName = owner.getName();
8347
+ }
8348
+
8349
+ var hash = ownerName + '|' + componentName;
8350
+
8351
+ if (styleMutationWarning.hasOwnProperty(hash)) {
8352
+ return;
8353
+ }
8354
+
8355
+ styleMutationWarning[hash] = true;
8356
+
8357
+ process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : undefined;
8358
+ }
8359
+
8360
+ /**
8361
+ * @param {object} component
8362
+ * @param {?object} props
8363
+ */
8364
+ function assertValidProps(component, props) {
8365
+ if (!props) {
8366
+ return;
8367
+ }
8368
+ // Note the use of `==` which checks for null or undefined.
8369
+ if (process.env.NODE_ENV !== 'production') {
8370
+ if (voidElementTags[component._tag]) {
8371
+ process.env.NODE_ENV !== 'production' ? warning(props.children == null && props.dangerouslySetInnerHTML == null, '%s is a void element tag and must not have `children` or ' + 'use `props.dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : undefined;
8372
+ }
8373
+ }
8374
+ if (props.dangerouslySetInnerHTML != null) {
8375
+ !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : invariant(false) : undefined;
8376
+ !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + 'for more information.') : invariant(false) : undefined;
8377
+ }
8378
+ if (process.env.NODE_ENV !== 'production') {
8379
+ process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : undefined;
8380
+ process.env.NODE_ENV !== 'production' ? warning(!props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : undefined;
8381
+ }
8382
+ !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, ' + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + 'using JSX.%s', getDeclarationErrorAddendum(component)) : invariant(false) : undefined;
8383
+ }
8384
+
8385
+ function enqueuePutListener(id, registrationName, listener, transaction) {
8386
+ if (process.env.NODE_ENV !== 'production') {
8387
+ // IE8 has no API for event capturing and the `onScroll` event doesn't
8388
+ // bubble.
8389
+ process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : undefined;
8390
+ }
8391
+ var container = ReactMount.findReactContainerForID(id);
8392
+ if (container) {
8393
+ var doc = container.nodeType === ELEMENT_NODE_TYPE ? container.ownerDocument : container;
8394
+ listenTo(registrationName, doc);
8395
+ }
8396
+ transaction.getReactMountReady().enqueue(putListener, {
8397
+ id: id,
8398
+ registrationName: registrationName,
8399
+ listener: listener
8400
+ });
8401
+ }
8402
+
8403
+ function putListener() {
8404
+ var listenerToPut = this;
8405
+ ReactBrowserEventEmitter.putListener(listenerToPut.id, listenerToPut.registrationName, listenerToPut.listener);
8406
+ }
8407
+
8408
+ // There are so many media events, it makes sense to just
8409
+ // maintain a list rather than create a `trapBubbledEvent` for each
8410
+ var mediaEvents = {
8411
+ topAbort: 'abort',
8412
+ topCanPlay: 'canplay',
8413
+ topCanPlayThrough: 'canplaythrough',
8414
+ topDurationChange: 'durationchange',
8415
+ topEmptied: 'emptied',
8416
+ topEncrypted: 'encrypted',
8417
+ topEnded: 'ended',
8418
+ topError: 'error',
8419
+ topLoadedData: 'loadeddata',
8420
+ topLoadedMetadata: 'loadedmetadata',
8421
+ topLoadStart: 'loadstart',
8422
+ topPause: 'pause',
8423
+ topPlay: 'play',
8424
+ topPlaying: 'playing',
8425
+ topProgress: 'progress',
8426
+ topRateChange: 'ratechange',
8427
+ topSeeked: 'seeked',
8428
+ topSeeking: 'seeking',
8429
+ topStalled: 'stalled',
8430
+ topSuspend: 'suspend',
8431
+ topTimeUpdate: 'timeupdate',
8432
+ topVolumeChange: 'volumechange',
8433
+ topWaiting: 'waiting'
8434
+ };
8435
+
8436
+ function trapBubbledEventsLocal() {
8437
+ var inst = this;
8438
+ // If a component renders to null or if another component fatals and causes
8439
+ // the state of the tree to be corrupted, `node` here can be null.
8440
+ !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : invariant(false) : undefined;
8441
+ var node = ReactMount.getNode(inst._rootNodeID);
8442
+ !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : invariant(false) : undefined;
8443
+
8444
+ switch (inst._tag) {
8445
+ case 'iframe':
8446
+ inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
8447
+ break;
8448
+ case 'video':
8449
+ case 'audio':
8450
+
8451
+ inst._wrapperState.listeners = [];
8452
+ // create listener for each media event
8453
+ for (var event in mediaEvents) {
8454
+ if (mediaEvents.hasOwnProperty(event)) {
8455
+ inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes[event], mediaEvents[event], node));
8456
+ }
8457
+ }
8458
+
8459
+ break;
8460
+ case 'img':
8461
+ inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
8462
+ break;
8463
+ case 'form':
8464
+ inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit', node)];
8465
+ break;
8466
+ }
8467
+ }
8468
+
8469
+ function mountReadyInputWrapper() {
8470
+ ReactDOMInput.mountReadyWrapper(this);
8471
+ }
8472
+
8473
+ function postUpdateSelectWrapper() {
8474
+ ReactDOMSelect.postUpdateWrapper(this);
8475
+ }
8476
+
8477
+ // For HTML, certain tags should omit their close tag. We keep a whitelist for
8478
+ // those special cased tags.
8479
+
8480
+ var omittedCloseTags = {
8481
+ 'area': true,
8482
+ 'base': true,
8483
+ 'br': true,
8484
+ 'col': true,
8485
+ 'embed': true,
8486
+ 'hr': true,
8487
+ 'img': true,
8488
+ 'input': true,
8489
+ 'keygen': true,
8490
+ 'link': true,
8491
+ 'meta': true,
8492
+ 'param': true,
8493
+ 'source': true,
8494
+ 'track': true,
8495
+ 'wbr': true
8496
+ };
8497
+
8498
+ // NOTE: menuitem's close tag should be omitted, but that causes problems.
8499
+ var newlineEatingTags = {
8500
+ 'listing': true,
8501
+ 'pre': true,
8502
+ 'textarea': true
8503
+ };
8504
+
8505
+ // For HTML, certain tags cannot have children. This has the same purpose as
8506
+ // `omittedCloseTags` except that `menuitem` should still have its closing tag.
8507
+
8508
+ var voidElementTags = assign({
8509
+ 'menuitem': true
8510
+ }, omittedCloseTags);
8511
+
8512
+ // We accept any tag to be rendered but since this gets injected into arbitrary
8513
+ // HTML, we want to make sure that it's a safe tag.
8514
+ // http://www.w3.org/TR/REC-xml/#NT-Name
8515
+
8516
+ var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
8517
+ var validatedTagCache = {};
8518
+ var hasOwnProperty = ({}).hasOwnProperty;
8519
+
8520
+ function validateDangerousTag(tag) {
8521
+ if (!hasOwnProperty.call(validatedTagCache, tag)) {
8522
+ !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : invariant(false) : undefined;
8523
+ validatedTagCache[tag] = true;
8524
+ }
8525
+ }
8526
+
8527
+ function processChildContextDev(context, inst) {
8528
+ // Pass down our tag name to child components for validation purposes
8529
+ context = assign({}, context);
8530
+ var info = context[validateDOMNesting.ancestorInfoContextKey];
8531
+ context[validateDOMNesting.ancestorInfoContextKey] = validateDOMNesting.updatedAncestorInfo(info, inst._tag, inst);
8532
+ return context;
8533
+ }
8534
+
8535
+ function isCustomComponent(tagName, props) {
8536
+ return tagName.indexOf('-') >= 0 || props.is != null;
8537
+ }
8538
+
8539
+ /**
8540
+ * Creates a new React class that is idempotent and capable of containing other
8541
+ * React components. It accepts event listeners and DOM properties that are
8542
+ * valid according to `DOMProperty`.
8543
+ *
8544
+ * - Event listeners: `onClick`, `onMouseDown`, etc.
8545
+ * - DOM properties: `className`, `name`, `title`, etc.
8546
+ *
8547
+ * The `style` property functions differently from the DOM API. It accepts an
8548
+ * object mapping of style properties to values.
8549
+ *
8550
+ * @constructor ReactDOMComponent
8551
+ * @extends ReactMultiChild
8552
+ */
8553
+ function ReactDOMComponent(tag) {
8554
+ validateDangerousTag(tag);
8555
+ this._tag = tag.toLowerCase();
8556
+ this._renderedChildren = null;
8557
+ this._previousStyle = null;
8558
+ this._previousStyleCopy = null;
8559
+ this._rootNodeID = null;
8560
+ this._wrapperState = null;
8561
+ this._topLevelWrapper = null;
8562
+ this._nodeWithLegacyProperties = null;
8563
+ if (process.env.NODE_ENV !== 'production') {
8564
+ this._unprocessedContextDev = null;
8565
+ this._processedContextDev = null;
8566
+ }
8567
+ }
8568
+
8569
+ ReactDOMComponent.displayName = 'ReactDOMComponent';
8570
+
8571
+ ReactDOMComponent.Mixin = {
8572
+
8573
+ construct: function (element) {
8574
+ this._currentElement = element;
8575
+ },
8576
+
8577
+ /**
8578
+ * Generates root tag markup then recurses. This method has side effects and
8579
+ * is not idempotent.
8580
+ *
8581
+ * @internal
8582
+ * @param {string} rootID The root DOM ID for this node.
8583
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
8584
+ * @param {object} context
8585
+ * @return {string} The computed markup.
8586
+ */
8587
+ mountComponent: function (rootID, transaction, context) {
8588
+ this._rootNodeID = rootID;
8589
+
8590
+ var props = this._currentElement.props;
8591
+
8592
+ switch (this._tag) {
8593
+ case 'iframe':
8594
+ case 'img':
8595
+ case 'form':
8596
+ case 'video':
8597
+ case 'audio':
8598
+ this._wrapperState = {
8599
+ listeners: null
8600
+ };
8601
+ transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
8602
+ break;
8603
+ case 'button':
8604
+ props = ReactDOMButton.getNativeProps(this, props, context);
8605
+ break;
8606
+ case 'input':
8607
+ ReactDOMInput.mountWrapper(this, props, context);
8608
+ props = ReactDOMInput.getNativeProps(this, props, context);
8609
+ break;
8610
+ case 'option':
8611
+ ReactDOMOption.mountWrapper(this, props, context);
8612
+ props = ReactDOMOption.getNativeProps(this, props, context);
8613
+ break;
8614
+ case 'select':
8615
+ ReactDOMSelect.mountWrapper(this, props, context);
8616
+ props = ReactDOMSelect.getNativeProps(this, props, context);
8617
+ context = ReactDOMSelect.processChildContext(this, props, context);
8618
+ break;
8619
+ case 'textarea':
8620
+ ReactDOMTextarea.mountWrapper(this, props, context);
8621
+ props = ReactDOMTextarea.getNativeProps(this, props, context);
8622
+ break;
8623
+ }
8624
+
8625
+ assertValidProps(this, props);
8626
+ if (process.env.NODE_ENV !== 'production') {
8627
+ if (context[validateDOMNesting.ancestorInfoContextKey]) {
8628
+ validateDOMNesting(this._tag, this, context[validateDOMNesting.ancestorInfoContextKey]);
8629
+ }
8630
+ }
8631
+
8632
+ if (process.env.NODE_ENV !== 'production') {
8633
+ this._unprocessedContextDev = context;
8634
+ this._processedContextDev = processChildContextDev(context, this);
8635
+ context = this._processedContextDev;
8636
+ }
8637
+
8638
+ var mountImage;
8639
+ if (transaction.useCreateElement) {
8640
+ var ownerDocument = context[ReactMount.ownerDocumentContextKey];
8641
+ var el = ownerDocument.createElement(this._currentElement.type);
8642
+ DOMPropertyOperations.setAttributeForID(el, this._rootNodeID);
8643
+ // Populate node cache
8644
+ ReactMount.getID(el);
8645
+ this._updateDOMProperties({}, props, transaction, el);
8646
+ this._createInitialChildren(transaction, props, context, el);
8647
+ mountImage = el;
8648
+ } else {
8649
+ var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
8650
+ var tagContent = this._createContentMarkup(transaction, props, context);
8651
+ if (!tagContent && omittedCloseTags[this._tag]) {
8652
+ mountImage = tagOpen + '/>';
8653
+ } else {
8654
+ mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
8655
+ }
8656
+ }
8657
+
8658
+ switch (this._tag) {
8659
+ case 'input':
8660
+ transaction.getReactMountReady().enqueue(mountReadyInputWrapper, this);
8661
+ // falls through
8662
+ case 'button':
8663
+ case 'select':
8664
+ case 'textarea':
8665
+ if (props.autoFocus) {
8666
+ transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
8667
+ }
8668
+ break;
8669
+ }
8670
+
8671
+ return mountImage;
8672
+ },
8673
+
8674
+ /**
8675
+ * Creates markup for the open tag and all attributes.
8676
+ *
8677
+ * This method has side effects because events get registered.
8678
+ *
8679
+ * Iterating over object properties is faster than iterating over arrays.
8680
+ * @see http://jsperf.com/obj-vs-arr-iteration
8681
+ *
8682
+ * @private
8683
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
8684
+ * @param {object} props
8685
+ * @return {string} Markup of opening tag.
8686
+ */
8687
+ _createOpenTagMarkupAndPutListeners: function (transaction, props) {
8688
+ var ret = '<' + this._currentElement.type;
8689
+
8690
+ for (var propKey in props) {
8691
+ if (!props.hasOwnProperty(propKey)) {
8692
+ continue;
8693
+ }
8694
+ var propValue = props[propKey];
8695
+ if (propValue == null) {
8696
+ continue;
8697
+ }
8698
+ if (registrationNameModules.hasOwnProperty(propKey)) {
8699
+ if (propValue) {
8700
+ enqueuePutListener(this._rootNodeID, propKey, propValue, transaction);
8701
+ }
8702
+ } else {
8703
+ if (propKey === STYLE) {
8704
+ if (propValue) {
8705
+ if (process.env.NODE_ENV !== 'production') {
8706
+ // See `_updateDOMProperties`. style block
8707
+ this._previousStyle = propValue;
8708
+ }
8709
+ propValue = this._previousStyleCopy = assign({}, props.style);
8710
+ }
8711
+ propValue = CSSPropertyOperations.createMarkupForStyles(propValue);
8712
+ }
8713
+ var markup = null;
8714
+ if (this._tag != null && isCustomComponent(this._tag, props)) {
8715
+ if (propKey !== CHILDREN) {
8716
+ markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
8717
+ }
8718
+ } else {
8719
+ markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
8720
+ }
8721
+ if (markup) {
8722
+ ret += ' ' + markup;
8723
+ }
8724
+ }
8725
+ }
8726
+
8727
+ // For static pages, no need to put React ID and checksum. Saves lots of
8728
+ // bytes.
8729
+ if (transaction.renderToStaticMarkup) {
8730
+ return ret;
8731
+ }
8732
+
8733
+ var markupForID = DOMPropertyOperations.createMarkupForID(this._rootNodeID);
8734
+ return ret + ' ' + markupForID;
8735
+ },
8736
+
8737
+ /**
8738
+ * Creates markup for the content between the tags.
8739
+ *
8740
+ * @private
8741
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
8742
+ * @param {object} props
8743
+ * @param {object} context
8744
+ * @return {string} Content markup.
8745
+ */
8746
+ _createContentMarkup: function (transaction, props, context) {
8747
+ var ret = '';
8748
+
8749
+ // Intentional use of != to avoid catching zero/false.
8750
+ var innerHTML = props.dangerouslySetInnerHTML;
8751
+ if (innerHTML != null) {
8752
+ if (innerHTML.__html != null) {
8753
+ ret = innerHTML.__html;
8754
+ }
8755
+ } else {
8756
+ var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
8757
+ var childrenToUse = contentToUse != null ? null : props.children;
8758
+ if (contentToUse != null) {
8759
+ // TODO: Validate that text is allowed as a child of this node
8760
+ ret = escapeTextContentForBrowser(contentToUse);
8761
+ } else if (childrenToUse != null) {
8762
+ var mountImages = this.mountChildren(childrenToUse, transaction, context);
8763
+ ret = mountImages.join('');
8764
+ }
8765
+ }
8766
+ if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
8767
+ // text/html ignores the first character in these tags if it's a newline
8768
+ // Prefer to break application/xml over text/html (for now) by adding
8769
+ // a newline specifically to get eaten by the parser. (Alternately for
8770
+ // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
8771
+ // \r is normalized out by HTMLTextAreaElement#value.)
8772
+ // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
8773
+ // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
8774
+ // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
8775
+ // See: Parsing of "textarea" "listing" and "pre" elements
8776
+ // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
8777
+ return '\n' + ret;
8778
+ } else {
8779
+ return ret;
8780
+ }
8781
+ },
8782
+
8783
+ _createInitialChildren: function (transaction, props, context, el) {
8784
+ // Intentional use of != to avoid catching zero/false.
8785
+ var innerHTML = props.dangerouslySetInnerHTML;
8786
+ if (innerHTML != null) {
8787
+ if (innerHTML.__html != null) {
8788
+ setInnerHTML(el, innerHTML.__html);
8789
+ }
8790
+ } else {
8791
+ var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
8792
+ var childrenToUse = contentToUse != null ? null : props.children;
8793
+ if (contentToUse != null) {
8794
+ // TODO: Validate that text is allowed as a child of this node
8795
+ setTextContent(el, contentToUse);
8796
+ } else if (childrenToUse != null) {
8797
+ var mountImages = this.mountChildren(childrenToUse, transaction, context);
8798
+ for (var i = 0; i < mountImages.length; i++) {
8799
+ el.appendChild(mountImages[i]);
8800
+ }
8801
+ }
8802
+ }
8803
+ },
8804
+
8805
+ /**
8806
+ * Receives a next element and updates the component.
8807
+ *
8808
+ * @internal
8809
+ * @param {ReactElement} nextElement
8810
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
8811
+ * @param {object} context
8812
+ */
8813
+ receiveComponent: function (nextElement, transaction, context) {
8814
+ var prevElement = this._currentElement;
8815
+ this._currentElement = nextElement;
8816
+ this.updateComponent(transaction, prevElement, nextElement, context);
8817
+ },
8818
+
8819
+ /**
8820
+ * Updates a native DOM component after it has already been allocated and
8821
+ * attached to the DOM. Reconciles the root DOM node, then recurses.
8822
+ *
8823
+ * @param {ReactReconcileTransaction} transaction
8824
+ * @param {ReactElement} prevElement
8825
+ * @param {ReactElement} nextElement
8826
+ * @internal
8827
+ * @overridable
8828
+ */
8829
+ updateComponent: function (transaction, prevElement, nextElement, context) {
8830
+ var lastProps = prevElement.props;
8831
+ var nextProps = this._currentElement.props;
8832
+
8833
+ switch (this._tag) {
8834
+ case 'button':
8835
+ lastProps = ReactDOMButton.getNativeProps(this, lastProps);
8836
+ nextProps = ReactDOMButton.getNativeProps(this, nextProps);
8837
+ break;
8838
+ case 'input':
8839
+ ReactDOMInput.updateWrapper(this);
8840
+ lastProps = ReactDOMInput.getNativeProps(this, lastProps);
8841
+ nextProps = ReactDOMInput.getNativeProps(this, nextProps);
8842
+ break;
8843
+ case 'option':
8844
+ lastProps = ReactDOMOption.getNativeProps(this, lastProps);
8845
+ nextProps = ReactDOMOption.getNativeProps(this, nextProps);
8846
+ break;
8847
+ case 'select':
8848
+ lastProps = ReactDOMSelect.getNativeProps(this, lastProps);
8849
+ nextProps = ReactDOMSelect.getNativeProps(this, nextProps);
8850
+ break;
8851
+ case 'textarea':
8852
+ ReactDOMTextarea.updateWrapper(this);
8853
+ lastProps = ReactDOMTextarea.getNativeProps(this, lastProps);
8854
+ nextProps = ReactDOMTextarea.getNativeProps(this, nextProps);
8855
+ break;
8856
+ }
8857
+
8858
+ if (process.env.NODE_ENV !== 'production') {
8859
+ // If the context is reference-equal to the old one, pass down the same
8860
+ // processed object so the update bailout in ReactReconciler behaves
8861
+ // correctly (and identically in dev and prod). See #5005.
8862
+ if (this._unprocessedContextDev !== context) {
8863
+ this._unprocessedContextDev = context;
8864
+ this._processedContextDev = processChildContextDev(context, this);
8865
+ }
8866
+ context = this._processedContextDev;
8867
+ }
8868
+
8869
+ assertValidProps(this, nextProps);
8870
+ this._updateDOMProperties(lastProps, nextProps, transaction, null);
8871
+ this._updateDOMChildren(lastProps, nextProps, transaction, context);
8872
+
8873
+ if (!canDefineProperty && this._nodeWithLegacyProperties) {
8874
+ this._nodeWithLegacyProperties.props = nextProps;
8875
+ }
8876
+
8877
+ if (this._tag === 'select') {
8878
+ // <select> value update needs to occur after <option> children
8879
+ // reconciliation
8880
+ transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
8881
+ }
8882
+ },
8883
+
8884
+ /**
8885
+ * Reconciles the properties by detecting differences in property values and
8886
+ * updating the DOM as necessary. This function is probably the single most
8887
+ * critical path for performance optimization.
8888
+ *
8889
+ * TODO: Benchmark whether checking for changed values in memory actually
8890
+ * improves performance (especially statically positioned elements).
8891
+ * TODO: Benchmark the effects of putting this at the top since 99% of props
8892
+ * do not change for a given reconciliation.
8893
+ * TODO: Benchmark areas that can be improved with caching.
8894
+ *
8895
+ * @private
8896
+ * @param {object} lastProps
8897
+ * @param {object} nextProps
8898
+ * @param {ReactReconcileTransaction} transaction
8899
+ * @param {?DOMElement} node
8900
+ */
8901
+ _updateDOMProperties: function (lastProps, nextProps, transaction, node) {
8902
+ var propKey;
8903
+ var styleName;
8904
+ var styleUpdates;
8905
+ for (propKey in lastProps) {
8906
+ if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey)) {
8907
+ continue;
8908
+ }
8909
+ if (propKey === STYLE) {
8910
+ var lastStyle = this._previousStyleCopy;
8911
+ for (styleName in lastStyle) {
8912
+ if (lastStyle.hasOwnProperty(styleName)) {
8913
+ styleUpdates = styleUpdates || {};
8914
+ styleUpdates[styleName] = '';
8915
+ }
8916
+ }
8917
+ this._previousStyleCopy = null;
8918
+ } else if (registrationNameModules.hasOwnProperty(propKey)) {
8919
+ if (lastProps[propKey]) {
8920
+ // Only call deleteListener if there was a listener previously or
8921
+ // else willDeleteListener gets called when there wasn't actually a
8922
+ // listener (e.g., onClick={null})
8923
+ deleteListener(this._rootNodeID, propKey);
8924
+ }
8925
+ } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
8926
+ if (!node) {
8927
+ node = ReactMount.getNode(this._rootNodeID);
8928
+ }
8929
+ DOMPropertyOperations.deleteValueForProperty(node, propKey);
8930
+ }
8931
+ }
8932
+ for (propKey in nextProps) {
8933
+ var nextProp = nextProps[propKey];
8934
+ var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps[propKey];
8935
+ if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp) {
8936
+ continue;
8937
+ }
8938
+ if (propKey === STYLE) {
8939
+ if (nextProp) {
8940
+ if (process.env.NODE_ENV !== 'production') {
8941
+ checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
8942
+ this._previousStyle = nextProp;
8943
+ }
8944
+ nextProp = this._previousStyleCopy = assign({}, nextProp);
8945
+ } else {
8946
+ this._previousStyleCopy = null;
8947
+ }
8948
+ if (lastProp) {
8949
+ // Unset styles on `lastProp` but not on `nextProp`.
8950
+ for (styleName in lastProp) {
8951
+ if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
8952
+ styleUpdates = styleUpdates || {};
8953
+ styleUpdates[styleName] = '';
8954
+ }
8955
+ }
8956
+ // Update styles that changed since `lastProp`.
8957
+ for (styleName in nextProp) {
8958
+ if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
8959
+ styleUpdates = styleUpdates || {};
8960
+ styleUpdates[styleName] = nextProp[styleName];
8961
+ }
8962
+ }
8963
+ } else {
8964
+ // Relies on `updateStylesByID` not mutating `styleUpdates`.
8965
+ styleUpdates = nextProp;
8966
+ }
8967
+ } else if (registrationNameModules.hasOwnProperty(propKey)) {
8968
+ if (nextProp) {
8969
+ enqueuePutListener(this._rootNodeID, propKey, nextProp, transaction);
8970
+ } else if (lastProp) {
8971
+ deleteListener(this._rootNodeID, propKey);
8972
+ }
8973
+ } else if (isCustomComponent(this._tag, nextProps)) {
8974
+ if (!node) {
8975
+ node = ReactMount.getNode(this._rootNodeID);
8976
+ }
8977
+ if (propKey === CHILDREN) {
8978
+ nextProp = null;
8979
+ }
8980
+ DOMPropertyOperations.setValueForAttribute(node, propKey, nextProp);
8981
+ } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
8982
+ if (!node) {
8983
+ node = ReactMount.getNode(this._rootNodeID);
8984
+ }
8985
+ // If we're updating to null or undefined, we should remove the property
8986
+ // from the DOM node instead of inadvertantly setting to a string. This
8987
+ // brings us in line with the same behavior we have on initial render.
8988
+ if (nextProp != null) {
8989
+ DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
8990
+ } else {
8991
+ DOMPropertyOperations.deleteValueForProperty(node, propKey);
8992
+ }
8993
+ }
8994
+ }
8995
+ if (styleUpdates) {
8996
+ if (!node) {
8997
+ node = ReactMount.getNode(this._rootNodeID);
8998
+ }
8999
+ CSSPropertyOperations.setValueForStyles(node, styleUpdates);
9000
+ }
9001
+ },
9002
+
9003
+ /**
9004
+ * Reconciles the children with the various properties that affect the
9005
+ * children content.
9006
+ *
9007
+ * @param {object} lastProps
9008
+ * @param {object} nextProps
9009
+ * @param {ReactReconcileTransaction} transaction
9010
+ * @param {object} context
9011
+ */
9012
+ _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
9013
+ var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
9014
+ var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
9015
+
9016
+ var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
9017
+ var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
9018
+
9019
+ // Note the use of `!=` which checks for null or undefined.
9020
+ var lastChildren = lastContent != null ? null : lastProps.children;
9021
+ var nextChildren = nextContent != null ? null : nextProps.children;
9022
+
9023
+ // If we're switching from children to content/html or vice versa, remove
9024
+ // the old content
9025
+ var lastHasContentOrHtml = lastContent != null || lastHtml != null;
9026
+ var nextHasContentOrHtml = nextContent != null || nextHtml != null;
9027
+ if (lastChildren != null && nextChildren == null) {
9028
+ this.updateChildren(null, transaction, context);
9029
+ } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
9030
+ this.updateTextContent('');
9031
+ }
9032
+
9033
+ if (nextContent != null) {
9034
+ if (lastContent !== nextContent) {
9035
+ this.updateTextContent('' + nextContent);
9036
+ }
9037
+ } else if (nextHtml != null) {
9038
+ if (lastHtml !== nextHtml) {
9039
+ this.updateMarkup('' + nextHtml);
9040
+ }
9041
+ } else if (nextChildren != null) {
9042
+ this.updateChildren(nextChildren, transaction, context);
9043
+ }
9044
+ },
9045
+
9046
+ /**
9047
+ * Destroys all event registrations for this instance. Does not remove from
9048
+ * the DOM. That must be done by the parent.
9049
+ *
9050
+ * @internal
9051
+ */
9052
+ unmountComponent: function () {
9053
+ switch (this._tag) {
9054
+ case 'iframe':
9055
+ case 'img':
9056
+ case 'form':
9057
+ case 'video':
9058
+ case 'audio':
9059
+ var listeners = this._wrapperState.listeners;
9060
+ if (listeners) {
9061
+ for (var i = 0; i < listeners.length; i++) {
9062
+ listeners[i].remove();
9063
+ }
9064
+ }
9065
+ break;
9066
+ case 'input':
9067
+ ReactDOMInput.unmountWrapper(this);
9068
+ break;
9069
+ case 'html':
9070
+ case 'head':
9071
+ case 'body':
9072
+ /**
9073
+ * Components like <html> <head> and <body> can't be removed or added
9074
+ * easily in a cross-browser way, however it's valuable to be able to
9075
+ * take advantage of React's reconciliation for styling and <title>
9076
+ * management. So we just document it and throw in dangerous cases.
9077
+ */
9078
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is ' + 'impossible to unmount some top-level components (eg <html>, ' + '<head>, and <body>) reliably and efficiently. To fix this, have a ' + 'single top-level component that never unmounts render these ' + 'elements.', this._tag) : invariant(false) : undefined;
9079
+ break;
9080
+ }
9081
+
9082
+ this.unmountChildren();
9083
+ ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);
9084
+ ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
9085
+ this._rootNodeID = null;
9086
+ this._wrapperState = null;
9087
+ if (this._nodeWithLegacyProperties) {
9088
+ var node = this._nodeWithLegacyProperties;
9089
+ node._reactInternalComponent = null;
9090
+ this._nodeWithLegacyProperties = null;
9091
+ }
9092
+ },
9093
+
9094
+ getPublicInstance: function () {
9095
+ if (!this._nodeWithLegacyProperties) {
9096
+ var node = ReactMount.getNode(this._rootNodeID);
9097
+
9098
+ node._reactInternalComponent = this;
9099
+ node.getDOMNode = legacyGetDOMNode;
9100
+ node.isMounted = legacyIsMounted;
9101
+ node.setState = legacySetStateEtc;
9102
+ node.replaceState = legacySetStateEtc;
9103
+ node.forceUpdate = legacySetStateEtc;
9104
+ node.setProps = legacySetProps;
9105
+ node.replaceProps = legacyReplaceProps;
9106
+
9107
+ if (process.env.NODE_ENV !== 'production') {
9108
+ if (canDefineProperty) {
9109
+ Object.defineProperties(node, legacyPropsDescriptor);
9110
+ } else {
9111
+ // updateComponent will update this property on subsequent renders
9112
+ node.props = this._currentElement.props;
9113
+ }
9114
+ } else {
9115
+ // updateComponent will update this property on subsequent renders
9116
+ node.props = this._currentElement.props;
9117
+ }
9118
+
9119
+ this._nodeWithLegacyProperties = node;
9120
+ }
9121
+ return this._nodeWithLegacyProperties;
9122
+ }
9123
+
9124
+ };
9125
+
9126
+ ReactPerf.measureMethods(ReactDOMComponent, 'ReactDOMComponent', {
9127
+ mountComponent: 'mountComponent',
9128
+ updateComponent: 'updateComponent'
9129
+ });
9130
+
9131
+ assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
9132
+
9133
+ module.exports = ReactDOMComponent;
9134
+ }).call(this,require('_process'))
9135
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RET01Db21wb25lbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0F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vIHVwZGF0ZUNvbXBvbmVudCB3aWxsIHVwZGF0ZSB0aGlzIHByb3BlcnR5IG9uIHN1YnNlcXVlbnQgcmVuZGVyc1xuICAgICAgICBub2RlLnByb3BzID0gdGhpcy5fY3VycmVudEVsZW1lbnQucHJvcHM7XG4gICAgICB9XG5cbiAgICAgIHRoaXMuX25vZGVXaXRoTGVnYWN5UHJvcGVydGllcyA9IG5vZGU7XG4gICAgfVxuICAgIHJldHVybiB0aGlzLl9ub2RlV2l0aExlZ2FjeVByb3BlcnRpZXM7XG4gIH1cblxufTtcblxuUmVhY3RQZXJmLm1lYXN1cmVNZXRob2RzKFJlYWN0RE9NQ29tcG9uZW50LCAnUmVhY3RET01Db21wb25lbnQnLCB7XG4gIG1vdW50Q29tcG9uZW50OiAnbW91bnRDb21wb25lbnQnLFxuICB1cGRhdGVDb21wb25lbnQ6ICd1cGRhdGVDb21wb25lbnQnXG59KTtcblxuYXNzaWduKFJlYWN0RE9NQ29tcG9uZW50LnByb3RvdHlwZSwgUmVhY3RET01Db21wb25lbnQuTWl4aW4sIFJlYWN0TXVsdGlDaGlsZC5NaXhpbik7XG5cbm1vZHVsZS5leHBvcnRzID0gUmVhY3RET01Db21wb25lbnQ7Il19
9136
+ },{"./AutoFocusUtils":31,"./CSSPropertyOperations":34,"./DOMProperty":39,"./DOMPropertyOperations":40,"./EventConstants":44,"./Object.assign":52,"./ReactBrowserEventEmitter":56,"./ReactComponentBrowserEnvironment":61,"./ReactDOMButton":66,"./ReactDOMInput":71,"./ReactDOMOption":72,"./ReactDOMSelect":73,"./ReactDOMTextarea":77,"./ReactMount":95,"./ReactMultiChild":96,"./ReactPerf":101,"./ReactUpdateQueue":112,"./canDefineProperty":134,"./escapeTextContentForBrowser":137,"./isEventSupported":149,"./setInnerHTML":154,"./setTextContent":155,"./validateDOMNesting":158,"_process":29,"fbjs/lib/invariant":17,"fbjs/lib/keyOf":21,"fbjs/lib/shallowEqual":26,"fbjs/lib/warning":28}],68:[function(require,module,exports){
9137
+ (function (process){
9138
+ /**
9139
+ * Copyright 2013-2015, Facebook, Inc.
9140
+ * All rights reserved.
9141
+ *
9142
+ * This source code is licensed under the BSD-style license found in the
9143
+ * LICENSE file in the root directory of this source tree. An additional grant
9144
+ * of patent rights can be found in the PATENTS file in the same directory.
9145
+ *
9146
+ * @providesModule ReactDOMFactories
9147
+ * @typechecks static-only
9148
+ */
9149
+
9150
+ 'use strict';
9151
+
9152
+ var ReactElement = require('./ReactElement');
9153
+ var ReactElementValidator = require('./ReactElementValidator');
9154
+
9155
+ var mapObject = require('fbjs/lib/mapObject');
9156
+
9157
+ /**
9158
+ * Create a factory that creates HTML tag elements.
9159
+ *
9160
+ * @param {string} tag Tag name (e.g. `div`).
9161
+ * @private
9162
+ */
9163
+ function createDOMFactory(tag) {
9164
+ if (process.env.NODE_ENV !== 'production') {
9165
+ return ReactElementValidator.createFactory(tag);
9166
+ }
9167
+ return ReactElement.createFactory(tag);
9168
+ }
9169
+
9170
+ /**
9171
+ * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
9172
+ * This is also accessible via `React.DOM`.
9173
+ *
9174
+ * @public
9175
+ */
9176
+ var ReactDOMFactories = mapObject({
9177
+ a: 'a',
9178
+ abbr: 'abbr',
9179
+ address: 'address',
9180
+ area: 'area',
9181
+ article: 'article',
9182
+ aside: 'aside',
9183
+ audio: 'audio',
9184
+ b: 'b',
9185
+ base: 'base',
9186
+ bdi: 'bdi',
9187
+ bdo: 'bdo',
9188
+ big: 'big',
9189
+ blockquote: 'blockquote',
9190
+ body: 'body',
9191
+ br: 'br',
9192
+ button: 'button',
9193
+ canvas: 'canvas',
9194
+ caption: 'caption',
9195
+ cite: 'cite',
9196
+ code: 'code',
9197
+ col: 'col',
9198
+ colgroup: 'colgroup',
9199
+ data: 'data',
9200
+ datalist: 'datalist',
9201
+ dd: 'dd',
9202
+ del: 'del',
9203
+ details: 'details',
9204
+ dfn: 'dfn',
9205
+ dialog: 'dialog',
9206
+ div: 'div',
9207
+ dl: 'dl',
9208
+ dt: 'dt',
9209
+ em: 'em',
9210
+ embed: 'embed',
9211
+ fieldset: 'fieldset',
9212
+ figcaption: 'figcaption',
9213
+ figure: 'figure',
9214
+ footer: 'footer',
9215
+ form: 'form',
9216
+ h1: 'h1',
9217
+ h2: 'h2',
9218
+ h3: 'h3',
9219
+ h4: 'h4',
9220
+ h5: 'h5',
9221
+ h6: 'h6',
9222
+ head: 'head',
9223
+ header: 'header',
9224
+ hgroup: 'hgroup',
9225
+ hr: 'hr',
9226
+ html: 'html',
9227
+ i: 'i',
9228
+ iframe: 'iframe',
9229
+ img: 'img',
9230
+ input: 'input',
9231
+ ins: 'ins',
9232
+ kbd: 'kbd',
9233
+ keygen: 'keygen',
9234
+ label: 'label',
9235
+ legend: 'legend',
9236
+ li: 'li',
9237
+ link: 'link',
9238
+ main: 'main',
9239
+ map: 'map',
9240
+ mark: 'mark',
9241
+ menu: 'menu',
9242
+ menuitem: 'menuitem',
9243
+ meta: 'meta',
9244
+ meter: 'meter',
9245
+ nav: 'nav',
9246
+ noscript: 'noscript',
9247
+ object: 'object',
9248
+ ol: 'ol',
9249
+ optgroup: 'optgroup',
9250
+ option: 'option',
9251
+ output: 'output',
9252
+ p: 'p',
9253
+ param: 'param',
9254
+ picture: 'picture',
9255
+ pre: 'pre',
9256
+ progress: 'progress',
9257
+ q: 'q',
9258
+ rp: 'rp',
9259
+ rt: 'rt',
9260
+ ruby: 'ruby',
9261
+ s: 's',
9262
+ samp: 'samp',
9263
+ script: 'script',
9264
+ section: 'section',
9265
+ select: 'select',
9266
+ small: 'small',
9267
+ source: 'source',
9268
+ span: 'span',
9269
+ strong: 'strong',
9270
+ style: 'style',
9271
+ sub: 'sub',
9272
+ summary: 'summary',
9273
+ sup: 'sup',
9274
+ table: 'table',
9275
+ tbody: 'tbody',
9276
+ td: 'td',
9277
+ textarea: 'textarea',
9278
+ tfoot: 'tfoot',
9279
+ th: 'th',
9280
+ thead: 'thead',
9281
+ time: 'time',
9282
+ title: 'title',
9283
+ tr: 'tr',
9284
+ track: 'track',
9285
+ u: 'u',
9286
+ ul: 'ul',
9287
+ 'var': 'var',
9288
+ video: 'video',
9289
+ wbr: 'wbr',
9290
+
9291
+ // SVG
9292
+ circle: 'circle',
9293
+ clipPath: 'clipPath',
9294
+ defs: 'defs',
9295
+ ellipse: 'ellipse',
9296
+ g: 'g',
9297
+ image: 'image',
9298
+ line: 'line',
9299
+ linearGradient: 'linearGradient',
9300
+ mask: 'mask',
9301
+ path: 'path',
9302
+ pattern: 'pattern',
9303
+ polygon: 'polygon',
9304
+ polyline: 'polyline',
9305
+ radialGradient: 'radialGradient',
9306
+ rect: 'rect',
9307
+ stop: 'stop',
9308
+ svg: 'svg',
9309
+ text: 'text',
9310
+ tspan: 'tspan'
9311
+
9312
+ }, createDOMFactory);
9313
+
9314
+ module.exports = ReactDOMFactories;
9315
+ }).call(this,require('_process'))
9316
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RET01GYWN0b3JpZXMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQT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AncGF0dGVybicsXG4gIHBvbHlnb246ICdwb2x5Z29uJyxcbiAgcG9seWxpbmU6ICdwb2x5bGluZScsXG4gIHJhZGlhbEdyYWRpZW50OiAncmFkaWFsR3JhZGllbnQnLFxuICByZWN0OiAncmVjdCcsXG4gIHN0b3A6ICdzdG9wJyxcbiAgc3ZnOiAnc3ZnJyxcbiAgdGV4dDogJ3RleHQnLFxuICB0c3BhbjogJ3RzcGFuJ1xuXG59LCBjcmVhdGVET01GYWN0b3J5KTtcblxubW9kdWxlLmV4cG9ydHMgPSBSZWFjdERPTUZhY3RvcmllczsiXX0=
9317
+ },{"./ReactElement":82,"./ReactElementValidator":83,"_process":29,"fbjs/lib/mapObject":22}],69:[function(require,module,exports){
9318
+ /**
9319
+ * Copyright 2013-2015, Facebook, Inc.
9320
+ * All rights reserved.
9321
+ *
9322
+ * This source code is licensed under the BSD-style license found in the
9323
+ * LICENSE file in the root directory of this source tree. An additional grant
9324
+ * of patent rights can be found in the PATENTS file in the same directory.
9325
+ *
9326
+ * @providesModule ReactDOMFeatureFlags
9327
+ */
9328
+
9329
+ 'use strict';
9330
+
9331
+ var ReactDOMFeatureFlags = {
9332
+ useCreateElement: false
9333
+ };
9334
+
9335
+ module.exports = ReactDOMFeatureFlags;
9336
+ },{}],70:[function(require,module,exports){
9337
+ (function (process){
9338
+ /**
9339
+ * Copyright 2013-2015, Facebook, Inc.
9340
+ * All rights reserved.
9341
+ *
9342
+ * This source code is licensed under the BSD-style license found in the
9343
+ * LICENSE file in the root directory of this source tree. An additional grant
9344
+ * of patent rights can be found in the PATENTS file in the same directory.
9345
+ *
9346
+ * @providesModule ReactDOMIDOperations
9347
+ * @typechecks static-only
9348
+ */
9349
+
9350
+ 'use strict';
9351
+
9352
+ var DOMChildrenOperations = require('./DOMChildrenOperations');
9353
+ var DOMPropertyOperations = require('./DOMPropertyOperations');
9354
+ var ReactMount = require('./ReactMount');
9355
+ var ReactPerf = require('./ReactPerf');
9356
+
9357
+ var invariant = require('fbjs/lib/invariant');
9358
+
9359
+ /**
9360
+ * Errors for properties that should not be updated with `updatePropertyByID()`.
9361
+ *
9362
+ * @type {object}
9363
+ * @private
9364
+ */
9365
+ var INVALID_PROPERTY_ERRORS = {
9366
+ dangerouslySetInnerHTML: '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.',
9367
+ style: '`style` must be set using `updateStylesByID()`.'
9368
+ };
9369
+
9370
+ /**
9371
+ * Operations used to process updates to DOM nodes.
9372
+ */
9373
+ var ReactDOMIDOperations = {
9374
+
9375
+ /**
9376
+ * Updates a DOM node with new property values. This should only be used to
9377
+ * update DOM properties in `DOMProperty`.
9378
+ *
9379
+ * @param {string} id ID of the node to update.
9380
+ * @param {string} name A valid property name, see `DOMProperty`.
9381
+ * @param {*} value New value of the property.
9382
+ * @internal
9383
+ */
9384
+ updatePropertyByID: function (id, name, value) {
9385
+ var node = ReactMount.getNode(id);
9386
+ !!INVALID_PROPERTY_ERRORS.hasOwnProperty(name) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(false) : undefined;
9387
+
9388
+ // If we're updating to null or undefined, we should remove the property
9389
+ // from the DOM node instead of inadvertantly setting to a string. This
9390
+ // brings us in line with the same behavior we have on initial render.
9391
+ if (value != null) {
9392
+ DOMPropertyOperations.setValueForProperty(node, name, value);
9393
+ } else {
9394
+ DOMPropertyOperations.deleteValueForProperty(node, name);
9395
+ }
9396
+ },
9397
+
9398
+ /**
9399
+ * Replaces a DOM node that exists in the document with markup.
9400
+ *
9401
+ * @param {string} id ID of child to be replaced.
9402
+ * @param {string} markup Dangerous markup to inject in place of child.
9403
+ * @internal
9404
+ * @see {Danger.dangerouslyReplaceNodeWithMarkup}
9405
+ */
9406
+ dangerouslyReplaceNodeWithMarkupByID: function (id, markup) {
9407
+ var node = ReactMount.getNode(id);
9408
+ DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup);
9409
+ },
9410
+
9411
+ /**
9412
+ * Updates a component's children by processing a series of updates.
9413
+ *
9414
+ * @param {array<object>} updates List of update configurations.
9415
+ * @param {array<string>} markup List of markup strings.
9416
+ * @internal
9417
+ */
9418
+ dangerouslyProcessChildrenUpdates: function (updates, markup) {
9419
+ for (var i = 0; i < updates.length; i++) {
9420
+ updates[i].parentNode = ReactMount.getNode(updates[i].parentID);
9421
+ }
9422
+ DOMChildrenOperations.processUpdates(updates, markup);
9423
+ }
9424
+ };
9425
+
9426
+ ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', {
9427
+ dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID',
9428
+ dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates'
9429
+ });
9430
+
9431
+ module.exports = ReactDOMIDOperations;
9432
+ }).call(this,require('_process'))
9433
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RET01JRE9wZXJhdGlvbnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFD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50Tm9kZSA9IFJlYWN0TW91bnQuZ2V0Tm9kZSh1cGRhdGVzW2ldLnBhcmVudElEKTtcbiAgICB9XG4gICAgRE9NQ2hpbGRyZW5PcGVyYXRpb25zLnByb2Nlc3NVcGRhdGVzKHVwZGF0ZXMsIG1hcmt1cCk7XG4gIH1cbn07XG5cblJlYWN0UGVyZi5tZWFzdXJlTWV0aG9kcyhSZWFjdERPTUlET3BlcmF0aW9ucywgJ1JlYWN0RE9NSURPcGVyYXRpb25zJywge1xuICBkYW5nZXJvdXNseVJlcGxhY2VOb2RlV2l0aE1hcmt1cEJ5SUQ6ICdkYW5nZXJvdXNseVJlcGxhY2VOb2RlV2l0aE1hcmt1cEJ5SUQnLFxuICBkYW5nZXJvdXNseVByb2Nlc3NDaGlsZHJlblVwZGF0ZXM6ICdkYW5nZXJvdXNseVByb2Nlc3NDaGlsZHJlblVwZGF0ZXMnXG59KTtcblxubW9kdWxlLmV4cG9ydHMgPSBSZWFjdERPTUlET3BlcmF0aW9uczsiXX0=
9434
+ },{"./DOMChildrenOperations":38,"./DOMPropertyOperations":40,"./ReactMount":95,"./ReactPerf":101,"_process":29,"fbjs/lib/invariant":17}],71:[function(require,module,exports){
9435
+ (function (process){
9436
+ /**
9437
+ * Copyright 2013-2015, Facebook, Inc.
9438
+ * All rights reserved.
9439
+ *
9440
+ * This source code is licensed under the BSD-style license found in the
9441
+ * LICENSE file in the root directory of this source tree. An additional grant
9442
+ * of patent rights can be found in the PATENTS file in the same directory.
9443
+ *
9444
+ * @providesModule ReactDOMInput
9445
+ */
9446
+
9447
+ 'use strict';
9448
+
9449
+ var ReactDOMIDOperations = require('./ReactDOMIDOperations');
9450
+ var LinkedValueUtils = require('./LinkedValueUtils');
9451
+ var ReactMount = require('./ReactMount');
9452
+ var ReactUpdates = require('./ReactUpdates');
9453
+
9454
+ var assign = require('./Object.assign');
9455
+ var invariant = require('fbjs/lib/invariant');
9456
+
9457
+ var instancesByReactID = {};
9458
+
9459
+ function forceUpdateIfMounted() {
9460
+ if (this._rootNodeID) {
9461
+ // DOM component is still mounted; update
9462
+ ReactDOMInput.updateWrapper(this);
9463
+ }
9464
+ }
9465
+
9466
+ /**
9467
+ * Implements an <input> native component that allows setting these optional
9468
+ * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
9469
+ *
9470
+ * If `checked` or `value` are not supplied (or null/undefined), user actions
9471
+ * that affect the checked state or value will trigger updates to the element.
9472
+ *
9473
+ * If they are supplied (and not null/undefined), the rendered element will not
9474
+ * trigger updates to the element. Instead, the props must change in order for
9475
+ * the rendered element to be updated.
9476
+ *
9477
+ * The rendered element will be initialized as unchecked (or `defaultChecked`)
9478
+ * with an empty value (or `defaultValue`).
9479
+ *
9480
+ * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
9481
+ */
9482
+ var ReactDOMInput = {
9483
+ getNativeProps: function (inst, props, context) {
9484
+ var value = LinkedValueUtils.getValue(props);
9485
+ var checked = LinkedValueUtils.getChecked(props);
9486
+
9487
+ var nativeProps = assign({}, props, {
9488
+ defaultChecked: undefined,
9489
+ defaultValue: undefined,
9490
+ value: value != null ? value : inst._wrapperState.initialValue,
9491
+ checked: checked != null ? checked : inst._wrapperState.initialChecked,
9492
+ onChange: inst._wrapperState.onChange
9493
+ });
9494
+
9495
+ return nativeProps;
9496
+ },
9497
+
9498
+ mountWrapper: function (inst, props) {
9499
+ if (process.env.NODE_ENV !== 'production') {
9500
+ LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
9501
+ }
9502
+
9503
+ var defaultValue = props.defaultValue;
9504
+ inst._wrapperState = {
9505
+ initialChecked: props.defaultChecked || false,
9506
+ initialValue: defaultValue != null ? defaultValue : null,
9507
+ onChange: _handleChange.bind(inst)
9508
+ };
9509
+ },
9510
+
9511
+ mountReadyWrapper: function (inst) {
9512
+ // Can't be in mountWrapper or else server rendering leaks.
9513
+ instancesByReactID[inst._rootNodeID] = inst;
9514
+ },
9515
+
9516
+ unmountWrapper: function (inst) {
9517
+ delete instancesByReactID[inst._rootNodeID];
9518
+ },
9519
+
9520
+ updateWrapper: function (inst) {
9521
+ var props = inst._currentElement.props;
9522
+
9523
+ // TODO: Shouldn't this be getChecked(props)?
9524
+ var checked = props.checked;
9525
+ if (checked != null) {
9526
+ ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID, 'checked', checked || false);
9527
+ }
9528
+
9529
+ var value = LinkedValueUtils.getValue(props);
9530
+ if (value != null) {
9531
+ // Cast `value` to a string to ensure the value is set correctly. While
9532
+ // browsers typically do this as necessary, jsdom doesn't.
9533
+ ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID, 'value', '' + value);
9534
+ }
9535
+ }
9536
+ };
9537
+
9538
+ function _handleChange(event) {
9539
+ var props = this._currentElement.props;
9540
+
9541
+ var returnValue = LinkedValueUtils.executeOnChange(props, event);
9542
+
9543
+ // Here we use asap to wait until all updates have propagated, which
9544
+ // is important when using controlled components within layers:
9545
+ // https://github.com/facebook/react/issues/1698
9546
+ ReactUpdates.asap(forceUpdateIfMounted, this);
9547
+
9548
+ var name = props.name;
9549
+ if (props.type === 'radio' && name != null) {
9550
+ var rootNode = ReactMount.getNode(this._rootNodeID);
9551
+ var queryRoot = rootNode;
9552
+
9553
+ while (queryRoot.parentNode) {
9554
+ queryRoot = queryRoot.parentNode;
9555
+ }
9556
+
9557
+ // If `rootNode.form` was non-null, then we could try `form.elements`,
9558
+ // but that sometimes behaves strangely in IE8. We could also try using
9559
+ // `form.getElementsByName`, but that will only return direct children
9560
+ // and won't include inputs that use the HTML5 `form=` attribute. Since
9561
+ // the input might not even be in a form, let's just use the global
9562
+ // `querySelectorAll` to ensure we don't miss anything.
9563
+ var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
9564
+
9565
+ for (var i = 0; i < group.length; i++) {
9566
+ var otherNode = group[i];
9567
+ if (otherNode === rootNode || otherNode.form !== rootNode.form) {
9568
+ continue;
9569
+ }
9570
+ // This will throw if radio buttons rendered by different copies of React
9571
+ // and the same name are rendered into the same form (same as #1939).
9572
+ // That's probably okay; we don't support it just as we don't support
9573
+ // mixing React with non-React.
9574
+ var otherID = ReactMount.getID(otherNode);
9575
+ !otherID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.') : invariant(false) : undefined;
9576
+ var otherInstance = instancesByReactID[otherID];
9577
+ !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Unknown radio button ID %s.', otherID) : invariant(false) : undefined;
9578
+ // If this is a controlled radio button group, forcing the input that
9579
+ // was previously checked to update will cause it to be come re-checked
9580
+ // as appropriate.
9581
+ ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
9582
+ }
9583
+ }
9584
+
9585
+ return returnValue;
9586
+ }
9587
+
9588
+ module.exports = ReactDOMInput;
9589
+ }).call(this,require('_process'))
9590
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RET01JbnB1dC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO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gPSBSZWFjdERPTUlucHV0OyJdfQ==
9591
+ },{"./LinkedValueUtils":51,"./Object.assign":52,"./ReactDOMIDOperations":70,"./ReactMount":95,"./ReactUpdates":113,"_process":29,"fbjs/lib/invariant":17}],72:[function(require,module,exports){
9592
+ (function (process){
9593
+ /**
9594
+ * Copyright 2013-2015, Facebook, Inc.
9595
+ * All rights reserved.
9596
+ *
9597
+ * This source code is licensed under the BSD-style license found in the
9598
+ * LICENSE file in the root directory of this source tree. An additional grant
9599
+ * of patent rights can be found in the PATENTS file in the same directory.
9600
+ *
9601
+ * @providesModule ReactDOMOption
9602
+ */
9603
+
9604
+ 'use strict';
9605
+
9606
+ var ReactChildren = require('./ReactChildren');
9607
+ var ReactDOMSelect = require('./ReactDOMSelect');
9608
+
9609
+ var assign = require('./Object.assign');
9610
+ var warning = require('fbjs/lib/warning');
9611
+
9612
+ var valueContextKey = ReactDOMSelect.valueContextKey;
9613
+
9614
+ /**
9615
+ * Implements an <option> native component that warns when `selected` is set.
9616
+ */
9617
+ var ReactDOMOption = {
9618
+ mountWrapper: function (inst, props, context) {
9619
+ // TODO (yungsters): Remove support for `selected` in <option>.
9620
+ if (process.env.NODE_ENV !== 'production') {
9621
+ process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : undefined;
9622
+ }
9623
+
9624
+ // Look up whether this option is 'selected' via context
9625
+ var selectValue = context[valueContextKey];
9626
+
9627
+ // If context key is null (e.g., no specified value or after initial mount)
9628
+ // or missing (e.g., for <datalist>), we don't change props.selected
9629
+ var selected = null;
9630
+ if (selectValue != null) {
9631
+ selected = false;
9632
+ if (Array.isArray(selectValue)) {
9633
+ // multiple
9634
+ for (var i = 0; i < selectValue.length; i++) {
9635
+ if ('' + selectValue[i] === '' + props.value) {
9636
+ selected = true;
9637
+ break;
9638
+ }
9639
+ }
9640
+ } else {
9641
+ selected = '' + selectValue === '' + props.value;
9642
+ }
9643
+ }
9644
+
9645
+ inst._wrapperState = { selected: selected };
9646
+ },
9647
+
9648
+ getNativeProps: function (inst, props, context) {
9649
+ var nativeProps = assign({ selected: undefined, children: undefined }, props);
9650
+
9651
+ // Read state only from initial mount because <select> updates value
9652
+ // manually; we need the initial state only for server rendering
9653
+ if (inst._wrapperState.selected != null) {
9654
+ nativeProps.selected = inst._wrapperState.selected;
9655
+ }
9656
+
9657
+ var content = '';
9658
+
9659
+ // Flatten children and warn if they aren't strings or numbers;
9660
+ // invalid types are ignored.
9661
+ ReactChildren.forEach(props.children, function (child) {
9662
+ if (child == null) {
9663
+ return;
9664
+ }
9665
+ if (typeof child === 'string' || typeof child === 'number') {
9666
+ content += child;
9667
+ } else {
9668
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : undefined;
9669
+ }
9670
+ });
9671
+
9672
+ if (content) {
9673
+ nativeProps.children = content;
9674
+ }
9675
+
9676
+ return nativeProps;
9677
+ }
9678
+
9679
+ };
9680
+
9681
+ module.exports = ReactDOMOption;
9682
+ }).call(this,require('_process'))
9683
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RET01PcHRpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO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fbjs/lib/warning":28}],73:[function(require,module,exports){
9685
+ (function (process){
9686
+ /**
9687
+ * Copyright 2013-2015, Facebook, Inc.
9688
+ * All rights reserved.
9689
+ *
9690
+ * This source code is licensed under the BSD-style license found in the
9691
+ * LICENSE file in the root directory of this source tree. An additional grant
9692
+ * of patent rights can be found in the PATENTS file in the same directory.
9693
+ *
9694
+ * @providesModule ReactDOMSelect
9695
+ */
9696
+
9697
+ 'use strict';
9698
+
9699
+ var LinkedValueUtils = require('./LinkedValueUtils');
9700
+ var ReactMount = require('./ReactMount');
9701
+ var ReactUpdates = require('./ReactUpdates');
9702
+
9703
+ var assign = require('./Object.assign');
9704
+ var warning = require('fbjs/lib/warning');
9705
+
9706
+ var valueContextKey = '__ReactDOMSelect_value$' + Math.random().toString(36).slice(2);
9707
+
9708
+ function updateOptionsIfPendingUpdateAndMounted() {
9709
+ if (this._rootNodeID && this._wrapperState.pendingUpdate) {
9710
+ this._wrapperState.pendingUpdate = false;
9711
+
9712
+ var props = this._currentElement.props;
9713
+ var value = LinkedValueUtils.getValue(props);
9714
+
9715
+ if (value != null) {
9716
+ updateOptions(this, Boolean(props.multiple), value);
9717
+ }
9718
+ }
9719
+ }
9720
+
9721
+ function getDeclarationErrorAddendum(owner) {
9722
+ if (owner) {
9723
+ var name = owner.getName();
9724
+ if (name) {
9725
+ return ' Check the render method of `' + name + '`.';
9726
+ }
9727
+ }
9728
+ return '';
9729
+ }
9730
+
9731
+ var valuePropNames = ['value', 'defaultValue'];
9732
+
9733
+ /**
9734
+ * Validation function for `value` and `defaultValue`.
9735
+ * @private
9736
+ */
9737
+ function checkSelectPropTypes(inst, props) {
9738
+ var owner = inst._currentElement._owner;
9739
+ LinkedValueUtils.checkPropTypes('select', props, owner);
9740
+
9741
+ for (var i = 0; i < valuePropNames.length; i++) {
9742
+ var propName = valuePropNames[i];
9743
+ if (props[propName] == null) {
9744
+ continue;
9745
+ }
9746
+ if (props.multiple) {
9747
+ process.env.NODE_ENV !== 'production' ? warning(Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : undefined;
9748
+ } else {
9749
+ process.env.NODE_ENV !== 'production' ? warning(!Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : undefined;
9750
+ }
9751
+ }
9752
+ }
9753
+
9754
+ /**
9755
+ * @param {ReactDOMComponent} inst
9756
+ * @param {boolean} multiple
9757
+ * @param {*} propValue A stringable (with `multiple`, a list of stringables).
9758
+ * @private
9759
+ */
9760
+ function updateOptions(inst, multiple, propValue) {
9761
+ var selectedValue, i;
9762
+ var options = ReactMount.getNode(inst._rootNodeID).options;
9763
+
9764
+ if (multiple) {
9765
+ selectedValue = {};
9766
+ for (i = 0; i < propValue.length; i++) {
9767
+ selectedValue['' + propValue[i]] = true;
9768
+ }
9769
+ for (i = 0; i < options.length; i++) {
9770
+ var selected = selectedValue.hasOwnProperty(options[i].value);
9771
+ if (options[i].selected !== selected) {
9772
+ options[i].selected = selected;
9773
+ }
9774
+ }
9775
+ } else {
9776
+ // Do not set `select.value` as exact behavior isn't consistent across all
9777
+ // browsers for all cases.
9778
+ selectedValue = '' + propValue;
9779
+ for (i = 0; i < options.length; i++) {
9780
+ if (options[i].value === selectedValue) {
9781
+ options[i].selected = true;
9782
+ return;
9783
+ }
9784
+ }
9785
+ if (options.length) {
9786
+ options[0].selected = true;
9787
+ }
9788
+ }
9789
+ }
9790
+
9791
+ /**
9792
+ * Implements a <select> native component that allows optionally setting the
9793
+ * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
9794
+ * stringable. If `multiple` is true, the prop must be an array of stringables.
9795
+ *
9796
+ * If `value` is not supplied (or null/undefined), user actions that change the
9797
+ * selected option will trigger updates to the rendered options.
9798
+ *
9799
+ * If it is supplied (and not null/undefined), the rendered options will not
9800
+ * update in response to user actions. Instead, the `value` prop must change in
9801
+ * order for the rendered options to update.
9802
+ *
9803
+ * If `defaultValue` is provided, any options with the supplied values will be
9804
+ * selected.
9805
+ */
9806
+ var ReactDOMSelect = {
9807
+ valueContextKey: valueContextKey,
9808
+
9809
+ getNativeProps: function (inst, props, context) {
9810
+ return assign({}, props, {
9811
+ onChange: inst._wrapperState.onChange,
9812
+ value: undefined
9813
+ });
9814
+ },
9815
+
9816
+ mountWrapper: function (inst, props) {
9817
+ if (process.env.NODE_ENV !== 'production') {
9818
+ checkSelectPropTypes(inst, props);
9819
+ }
9820
+
9821
+ var value = LinkedValueUtils.getValue(props);
9822
+ inst._wrapperState = {
9823
+ pendingUpdate: false,
9824
+ initialValue: value != null ? value : props.defaultValue,
9825
+ onChange: _handleChange.bind(inst),
9826
+ wasMultiple: Boolean(props.multiple)
9827
+ };
9828
+ },
9829
+
9830
+ processChildContext: function (inst, props, context) {
9831
+ // Pass down initial value so initial generated markup has correct
9832
+ // `selected` attributes
9833
+ var childContext = assign({}, context);
9834
+ childContext[valueContextKey] = inst._wrapperState.initialValue;
9835
+ return childContext;
9836
+ },
9837
+
9838
+ postUpdateWrapper: function (inst) {
9839
+ var props = inst._currentElement.props;
9840
+
9841
+ // After the initial mount, we control selected-ness manually so don't pass
9842
+ // the context value down
9843
+ inst._wrapperState.initialValue = undefined;
9844
+
9845
+ var wasMultiple = inst._wrapperState.wasMultiple;
9846
+ inst._wrapperState.wasMultiple = Boolean(props.multiple);
9847
+
9848
+ var value = LinkedValueUtils.getValue(props);
9849
+ if (value != null) {
9850
+ inst._wrapperState.pendingUpdate = false;
9851
+ updateOptions(inst, Boolean(props.multiple), value);
9852
+ } else if (wasMultiple !== Boolean(props.multiple)) {
9853
+ // For simplicity, reapply `defaultValue` if `multiple` is toggled.
9854
+ if (props.defaultValue != null) {
9855
+ updateOptions(inst, Boolean(props.multiple), props.defaultValue);
9856
+ } else {
9857
+ // Revert the select back to its default unselected state.
9858
+ updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
9859
+ }
9860
+ }
9861
+ }
9862
+ };
9863
+
9864
+ function _handleChange(event) {
9865
+ var props = this._currentElement.props;
9866
+ var returnValue = LinkedValueUtils.executeOnChange(props, event);
9867
+
9868
+ this._wrapperState.pendingUpdate = true;
9869
+ ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
9870
+ return returnValue;
9871
+ }
9872
+
9873
+ module.exports = ReactDOMSelect;
9874
+ }).call(this,require('_process'))
9875
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RET01TZWxlY3QuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTt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ZWQgc3RhdGUuXG4gICAgICAgIHVwZGF0ZU9wdGlvbnMoaW5zdCwgQm9vbGVhbihwcm9wcy5tdWx0aXBsZSksIHByb3BzLm11bHRpcGxlID8gW10gOiAnJyk7XG4gICAgICB9XG4gICAgfVxuICB9XG59O1xuXG5mdW5jdGlvbiBfaGFuZGxlQ2hhbmdlKGV2ZW50KSB7XG4gIHZhciBwcm9wcyA9IHRoaXMuX2N1cnJlbnRFbGVtZW50LnByb3BzO1xuICB2YXIgcmV0dXJuVmFsdWUgPSBMaW5rZWRWYWx1ZVV0aWxzLmV4ZWN1dGVPbkNoYW5nZShwcm9wcywgZXZlbnQpO1xuXG4gIHRoaXMuX3dyYXBwZXJTdGF0ZS5wZW5kaW5nVXBkYXRlID0gdHJ1ZTtcbiAgUmVhY3RVcGRhdGVzLmFzYXAodXBkYXRlT3B0aW9uc0lmUGVuZGluZ1VwZGF0ZUFuZE1vdW50ZWQsIHRoaXMpO1xuICByZXR1cm4gcmV0dXJuVmFsdWU7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gUmVhY3RET01TZWxlY3Q7Il19
9876
+ },{"./LinkedValueUtils":51,"./Object.assign":52,"./ReactMount":95,"./ReactUpdates":113,"_process":29,"fbjs/lib/warning":28}],74:[function(require,module,exports){
9877
+ /**
9878
+ * Copyright 2013-2015, Facebook, Inc.
9879
+ * All rights reserved.
9880
+ *
9881
+ * This source code is licensed under the BSD-style license found in the
9882
+ * LICENSE file in the root directory of this source tree. An additional grant
9883
+ * of patent rights can be found in the PATENTS file in the same directory.
9884
+ *
9885
+ * @providesModule ReactDOMSelection
9886
+ */
9887
+
9888
+ 'use strict';
9889
+
9890
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
9891
+
9892
+ var getNodeForCharacterOffset = require('./getNodeForCharacterOffset');
9893
+ var getTextContentAccessor = require('./getTextContentAccessor');
9894
+
9895
+ /**
9896
+ * While `isCollapsed` is available on the Selection object and `collapsed`
9897
+ * is available on the Range object, IE11 sometimes gets them wrong.
9898
+ * If the anchor/focus nodes and offsets are the same, the range is collapsed.
9899
+ */
9900
+ function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
9901
+ return anchorNode === focusNode && anchorOffset === focusOffset;
9902
+ }
9903
+
9904
+ /**
9905
+ * Get the appropriate anchor and focus node/offset pairs for IE.
9906
+ *
9907
+ * The catch here is that IE's selection API doesn't provide information
9908
+ * about whether the selection is forward or backward, so we have to
9909
+ * behave as though it's always forward.
9910
+ *
9911
+ * IE text differs from modern selection in that it behaves as though
9912
+ * block elements end with a new line. This means character offsets will
9913
+ * differ between the two APIs.
9914
+ *
9915
+ * @param {DOMElement} node
9916
+ * @return {object}
9917
+ */
9918
+ function getIEOffsets(node) {
9919
+ var selection = document.selection;
9920
+ var selectedRange = selection.createRange();
9921
+ var selectedLength = selectedRange.text.length;
9922
+
9923
+ // Duplicate selection so we can move range without breaking user selection.
9924
+ var fromStart = selectedRange.duplicate();
9925
+ fromStart.moveToElementText(node);
9926
+ fromStart.setEndPoint('EndToStart', selectedRange);
9927
+
9928
+ var startOffset = fromStart.text.length;
9929
+ var endOffset = startOffset + selectedLength;
9930
+
9931
+ return {
9932
+ start: startOffset,
9933
+ end: endOffset
9934
+ };
9935
+ }
9936
+
9937
+ /**
9938
+ * @param {DOMElement} node
9939
+ * @return {?object}
9940
+ */
9941
+ function getModernOffsets(node) {
9942
+ var selection = window.getSelection && window.getSelection();
9943
+
9944
+ if (!selection || selection.rangeCount === 0) {
9945
+ return null;
9946
+ }
9947
+
9948
+ var anchorNode = selection.anchorNode;
9949
+ var anchorOffset = selection.anchorOffset;
9950
+ var focusNode = selection.focusNode;
9951
+ var focusOffset = selection.focusOffset;
9952
+
9953
+ var currentRange = selection.getRangeAt(0);
9954
+
9955
+ // In Firefox, range.startContainer and range.endContainer can be "anonymous
9956
+ // divs", e.g. the up/down buttons on an <input type="number">. Anonymous
9957
+ // divs do not seem to expose properties, triggering a "Permission denied
9958
+ // error" if any of its properties are accessed. The only seemingly possible
9959
+ // way to avoid erroring is to access a property that typically works for
9960
+ // non-anonymous divs and catch any error that may otherwise arise. See
9961
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
9962
+ try {
9963
+ /* eslint-disable no-unused-expressions */
9964
+ currentRange.startContainer.nodeType;
9965
+ currentRange.endContainer.nodeType;
9966
+ /* eslint-enable no-unused-expressions */
9967
+ } catch (e) {
9968
+ return null;
9969
+ }
9970
+
9971
+ // If the node and offset values are the same, the selection is collapsed.
9972
+ // `Selection.isCollapsed` is available natively, but IE sometimes gets
9973
+ // this value wrong.
9974
+ var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
9975
+
9976
+ var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
9977
+
9978
+ var tempRange = currentRange.cloneRange();
9979
+ tempRange.selectNodeContents(node);
9980
+ tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
9981
+
9982
+ var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
9983
+
9984
+ var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
9985
+ var end = start + rangeLength;
9986
+
9987
+ // Detect whether the selection is backward.
9988
+ var detectionRange = document.createRange();
9989
+ detectionRange.setStart(anchorNode, anchorOffset);
9990
+ detectionRange.setEnd(focusNode, focusOffset);
9991
+ var isBackward = detectionRange.collapsed;
9992
+
9993
+ return {
9994
+ start: isBackward ? end : start,
9995
+ end: isBackward ? start : end
9996
+ };
9997
+ }
9998
+
9999
+ /**
10000
+ * @param {DOMElement|DOMTextNode} node
10001
+ * @param {object} offsets
10002
+ */
10003
+ function setIEOffsets(node, offsets) {
10004
+ var range = document.selection.createRange().duplicate();
10005
+ var start, end;
10006
+
10007
+ if (typeof offsets.end === 'undefined') {
10008
+ start = offsets.start;
10009
+ end = start;
10010
+ } else if (offsets.start > offsets.end) {
10011
+ start = offsets.end;
10012
+ end = offsets.start;
10013
+ } else {
10014
+ start = offsets.start;
10015
+ end = offsets.end;
10016
+ }
10017
+
10018
+ range.moveToElementText(node);
10019
+ range.moveStart('character', start);
10020
+ range.setEndPoint('EndToStart', range);
10021
+ range.moveEnd('character', end - start);
10022
+ range.select();
10023
+ }
10024
+
10025
+ /**
10026
+ * In modern non-IE browsers, we can support both forward and backward
10027
+ * selections.
10028
+ *
10029
+ * Note: IE10+ supports the Selection object, but it does not support
10030
+ * the `extend` method, which means that even in modern IE, it's not possible
10031
+ * to programatically create a backward selection. Thus, for all IE
10032
+ * versions, we use the old IE API to create our selections.
10033
+ *
10034
+ * @param {DOMElement|DOMTextNode} node
10035
+ * @param {object} offsets
10036
+ */
10037
+ function setModernOffsets(node, offsets) {
10038
+ if (!window.getSelection) {
10039
+ return;
10040
+ }
10041
+
10042
+ var selection = window.getSelection();
10043
+ var length = node[getTextContentAccessor()].length;
10044
+ var start = Math.min(offsets.start, length);
10045
+ var end = typeof offsets.end === 'undefined' ? start : Math.min(offsets.end, length);
10046
+
10047
+ // IE 11 uses modern selection, but doesn't support the extend method.
10048
+ // Flip backward selections, so we can set with a single range.
10049
+ if (!selection.extend && start > end) {
10050
+ var temp = end;
10051
+ end = start;
10052
+ start = temp;
10053
+ }
10054
+
10055
+ var startMarker = getNodeForCharacterOffset(node, start);
10056
+ var endMarker = getNodeForCharacterOffset(node, end);
10057
+
10058
+ if (startMarker && endMarker) {
10059
+ var range = document.createRange();
10060
+ range.setStart(startMarker.node, startMarker.offset);
10061
+ selection.removeAllRanges();
10062
+
10063
+ if (start > end) {
10064
+ selection.addRange(range);
10065
+ selection.extend(endMarker.node, endMarker.offset);
10066
+ } else {
10067
+ range.setEnd(endMarker.node, endMarker.offset);
10068
+ selection.addRange(range);
10069
+ }
10070
+ }
10071
+ }
10072
+
10073
+ var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
10074
+
10075
+ var ReactDOMSelection = {
10076
+ /**
10077
+ * @param {DOMElement} node
10078
+ */
10079
+ getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
10080
+
10081
+ /**
10082
+ * @param {DOMElement|DOMTextNode} node
10083
+ * @param {object} offsets
10084
+ */
10085
+ setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
10086
+ };
10087
+
10088
+ module.exports = ReactDOMSelection;
10089
+ },{"./getNodeForCharacterOffset":146,"./getTextContentAccessor":147,"fbjs/lib/ExecutionEnvironment":3}],75:[function(require,module,exports){
10090
+ /**
10091
+ * Copyright 2013-2015, Facebook, Inc.
10092
+ * All rights reserved.
10093
+ *
10094
+ * This source code is licensed under the BSD-style license found in the
10095
+ * LICENSE file in the root directory of this source tree. An additional grant
10096
+ * of patent rights can be found in the PATENTS file in the same directory.
10097
+ *
10098
+ * @providesModule ReactDOMServer
10099
+ */
10100
+
10101
+ 'use strict';
10102
+
10103
+ var ReactDefaultInjection = require('./ReactDefaultInjection');
10104
+ var ReactServerRendering = require('./ReactServerRendering');
10105
+ var ReactVersion = require('./ReactVersion');
10106
+
10107
+ ReactDefaultInjection.inject();
10108
+
10109
+ var ReactDOMServer = {
10110
+ renderToString: ReactServerRendering.renderToString,
10111
+ renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
10112
+ version: ReactVersion
10113
+ };
10114
+
10115
+ module.exports = ReactDOMServer;
10116
+ },{"./ReactDefaultInjection":79,"./ReactServerRendering":110,"./ReactVersion":114}],76:[function(require,module,exports){
10117
+ (function (process){
10118
+ /**
10119
+ * Copyright 2013-2015, Facebook, Inc.
10120
+ * All rights reserved.
10121
+ *
10122
+ * This source code is licensed under the BSD-style license found in the
10123
+ * LICENSE file in the root directory of this source tree. An additional grant
10124
+ * of patent rights can be found in the PATENTS file in the same directory.
10125
+ *
10126
+ * @providesModule ReactDOMTextComponent
10127
+ * @typechecks static-only
10128
+ */
10129
+
10130
+ 'use strict';
10131
+
10132
+ var DOMChildrenOperations = require('./DOMChildrenOperations');
10133
+ var DOMPropertyOperations = require('./DOMPropertyOperations');
10134
+ var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');
10135
+ var ReactMount = require('./ReactMount');
10136
+
10137
+ var assign = require('./Object.assign');
10138
+ var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');
10139
+ var setTextContent = require('./setTextContent');
10140
+ var validateDOMNesting = require('./validateDOMNesting');
10141
+
10142
+ /**
10143
+ * Text nodes violate a couple assumptions that React makes about components:
10144
+ *
10145
+ * - When mounting text into the DOM, adjacent text nodes are merged.
10146
+ * - Text nodes cannot be assigned a React root ID.
10147
+ *
10148
+ * This component is used to wrap strings in elements so that they can undergo
10149
+ * the same reconciliation that is applied to elements.
10150
+ *
10151
+ * TODO: Investigate representing React components in the DOM with text nodes.
10152
+ *
10153
+ * @class ReactDOMTextComponent
10154
+ * @extends ReactComponent
10155
+ * @internal
10156
+ */
10157
+ var ReactDOMTextComponent = function (props) {
10158
+ // This constructor and its argument is currently used by mocks.
10159
+ };
10160
+
10161
+ assign(ReactDOMTextComponent.prototype, {
10162
+
10163
+ /**
10164
+ * @param {ReactText} text
10165
+ * @internal
10166
+ */
10167
+ construct: function (text) {
10168
+ // TODO: This is really a ReactText (ReactNode), not a ReactElement
10169
+ this._currentElement = text;
10170
+ this._stringText = '' + text;
10171
+
10172
+ // Properties
10173
+ this._rootNodeID = null;
10174
+ this._mountIndex = 0;
10175
+ },
10176
+
10177
+ /**
10178
+ * Creates the markup for this text node. This node is not intended to have
10179
+ * any features besides containing text content.
10180
+ *
10181
+ * @param {string} rootID DOM ID of the root node.
10182
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
10183
+ * @return {string} Markup for this text node.
10184
+ * @internal
10185
+ */
10186
+ mountComponent: function (rootID, transaction, context) {
10187
+ if (process.env.NODE_ENV !== 'production') {
10188
+ if (context[validateDOMNesting.ancestorInfoContextKey]) {
10189
+ validateDOMNesting('span', null, context[validateDOMNesting.ancestorInfoContextKey]);
10190
+ }
10191
+ }
10192
+
10193
+ this._rootNodeID = rootID;
10194
+ if (transaction.useCreateElement) {
10195
+ var ownerDocument = context[ReactMount.ownerDocumentContextKey];
10196
+ var el = ownerDocument.createElement('span');
10197
+ DOMPropertyOperations.setAttributeForID(el, rootID);
10198
+ // Populate node cache
10199
+ ReactMount.getID(el);
10200
+ setTextContent(el, this._stringText);
10201
+ return el;
10202
+ } else {
10203
+ var escapedText = escapeTextContentForBrowser(this._stringText);
10204
+
10205
+ if (transaction.renderToStaticMarkup) {
10206
+ // Normally we'd wrap this in a `span` for the reasons stated above, but
10207
+ // since this is a situation where React won't take over (static pages),
10208
+ // we can simply return the text as it is.
10209
+ return escapedText;
10210
+ }
10211
+
10212
+ return '<span ' + DOMPropertyOperations.createMarkupForID(rootID) + '>' + escapedText + '</span>';
10213
+ }
10214
+ },
10215
+
10216
+ /**
10217
+ * Updates this component by updating the text content.
10218
+ *
10219
+ * @param {ReactText} nextText The next text content
10220
+ * @param {ReactReconcileTransaction} transaction
10221
+ * @internal
10222
+ */
10223
+ receiveComponent: function (nextText, transaction) {
10224
+ if (nextText !== this._currentElement) {
10225
+ this._currentElement = nextText;
10226
+ var nextStringText = '' + nextText;
10227
+ if (nextStringText !== this._stringText) {
10228
+ // TODO: Save this as pending props and use performUpdateIfNecessary
10229
+ // and/or updateComponent to do the actual update for consistency with
10230
+ // other component types?
10231
+ this._stringText = nextStringText;
10232
+ var node = ReactMount.getNode(this._rootNodeID);
10233
+ DOMChildrenOperations.updateTextContent(node, nextStringText);
10234
+ }
10235
+ }
10236
+ },
10237
+
10238
+ unmountComponent: function () {
10239
+ ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
10240
+ }
10241
+
10242
+ });
10243
+
10244
+ module.exports = ReactDOMTextComponent;
10245
+ }).call(this,require('_process'))
10246
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RET01UZXh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pcy5fc3RyaW5nVGV4dCA9IG5leHRTdHJpbmdUZXh0O1xuICAgICAgICB2YXIgbm9kZSA9IFJlYWN0TW91bnQuZ2V0Tm9kZSh0aGlzLl9yb290Tm9kZUlEKTtcbiAgICAgICAgRE9NQ2hpbGRyZW5PcGVyYXRpb25zLnVwZGF0ZVRleHRDb250ZW50KG5vZGUsIG5leHRTdHJpbmdUZXh0KTtcbiAgICAgIH1cbiAgICB9XG4gIH0sXG5cbiAgdW5tb3VudENvbXBvbmVudDogZnVuY3Rpb24gKCkge1xuICAgIFJlYWN0Q29tcG9uZW50QnJvd3NlckVudmlyb25tZW50LnVubW91bnRJREZyb21FbnZpcm9ubWVudCh0aGlzLl9yb290Tm9kZUlEKTtcbiAgfVxuXG59KTtcblxubW9kdWxlLmV4cG9ydHMgPSBSZWFjdERPTVRleHRDb21wb25lbnQ7Il19
10247
+ },{"./DOMChildrenOperations":38,"./DOMPropertyOperations":40,"./Object.assign":52,"./ReactComponentBrowserEnvironment":61,"./ReactMount":95,"./escapeTextContentForBrowser":137,"./setTextContent":155,"./validateDOMNesting":158,"_process":29}],77:[function(require,module,exports){
10248
+ (function (process){
10249
+ /**
10250
+ * Copyright 2013-2015, Facebook, Inc.
10251
+ * All rights reserved.
10252
+ *
10253
+ * This source code is licensed under the BSD-style license found in the
10254
+ * LICENSE file in the root directory of this source tree. An additional grant
10255
+ * of patent rights can be found in the PATENTS file in the same directory.
10256
+ *
10257
+ * @providesModule ReactDOMTextarea
10258
+ */
10259
+
10260
+ 'use strict';
10261
+
10262
+ var LinkedValueUtils = require('./LinkedValueUtils');
10263
+ var ReactDOMIDOperations = require('./ReactDOMIDOperations');
10264
+ var ReactUpdates = require('./ReactUpdates');
10265
+
10266
+ var assign = require('./Object.assign');
10267
+ var invariant = require('fbjs/lib/invariant');
10268
+ var warning = require('fbjs/lib/warning');
10269
+
10270
+ function forceUpdateIfMounted() {
10271
+ if (this._rootNodeID) {
10272
+ // DOM component is still mounted; update
10273
+ ReactDOMTextarea.updateWrapper(this);
10274
+ }
10275
+ }
10276
+
10277
+ /**
10278
+ * Implements a <textarea> native component that allows setting `value`, and
10279
+ * `defaultValue`. This differs from the traditional DOM API because value is
10280
+ * usually set as PCDATA children.
10281
+ *
10282
+ * If `value` is not supplied (or null/undefined), user actions that affect the
10283
+ * value will trigger updates to the element.
10284
+ *
10285
+ * If `value` is supplied (and not null/undefined), the rendered element will
10286
+ * not trigger updates to the element. Instead, the `value` prop must change in
10287
+ * order for the rendered element to be updated.
10288
+ *
10289
+ * The rendered element will be initialized with an empty value, the prop
10290
+ * `defaultValue` if specified, or the children content (deprecated).
10291
+ */
10292
+ var ReactDOMTextarea = {
10293
+ getNativeProps: function (inst, props, context) {
10294
+ !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : invariant(false) : undefined;
10295
+
10296
+ // Always set children to the same thing. In IE9, the selection range will
10297
+ // get reset if `textContent` is mutated.
10298
+ var nativeProps = assign({}, props, {
10299
+ defaultValue: undefined,
10300
+ value: undefined,
10301
+ children: inst._wrapperState.initialValue,
10302
+ onChange: inst._wrapperState.onChange
10303
+ });
10304
+
10305
+ return nativeProps;
10306
+ },
10307
+
10308
+ mountWrapper: function (inst, props) {
10309
+ if (process.env.NODE_ENV !== 'production') {
10310
+ LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
10311
+ }
10312
+
10313
+ var defaultValue = props.defaultValue;
10314
+ // TODO (yungsters): Remove support for children content in <textarea>.
10315
+ var children = props.children;
10316
+ if (children != null) {
10317
+ if (process.env.NODE_ENV !== 'production') {
10318
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : undefined;
10319
+ }
10320
+ !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : invariant(false) : undefined;
10321
+ if (Array.isArray(children)) {
10322
+ !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : invariant(false) : undefined;
10323
+ children = children[0];
10324
+ }
10325
+
10326
+ defaultValue = '' + children;
10327
+ }
10328
+ if (defaultValue == null) {
10329
+ defaultValue = '';
10330
+ }
10331
+ var value = LinkedValueUtils.getValue(props);
10332
+
10333
+ inst._wrapperState = {
10334
+ // We save the initial value so that `ReactDOMComponent` doesn't update
10335
+ // `textContent` (unnecessary since we update value).
10336
+ // The initial value can be a boolean or object so that's why it's
10337
+ // forced to be a string.
10338
+ initialValue: '' + (value != null ? value : defaultValue),
10339
+ onChange: _handleChange.bind(inst)
10340
+ };
10341
+ },
10342
+
10343
+ updateWrapper: function (inst) {
10344
+ var props = inst._currentElement.props;
10345
+ var value = LinkedValueUtils.getValue(props);
10346
+ if (value != null) {
10347
+ // Cast `value` to a string to ensure the value is set correctly. While
10348
+ // browsers typically do this as necessary, jsdom doesn't.
10349
+ ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID, 'value', '' + value);
10350
+ }
10351
+ }
10352
+ };
10353
+
10354
+ function _handleChange(event) {
10355
+ var props = this._currentElement.props;
10356
+ var returnValue = LinkedValueUtils.executeOnChange(props, event);
10357
+ ReactUpdates.asap(forceUpdateIfMounted, this);
10358
+ return returnValue;
10359
+ }
10360
+
10361
+ module.exports = ReactDOMTextarea;
10362
+ }).call(this,require('_process'))
10363
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RET01UZXh0YXJlYS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ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2N1cnJlbnRFbGVtZW50LnByb3BzO1xuICB2YXIgcmV0dXJuVmFsdWUgPSBMaW5rZWRWYWx1ZVV0aWxzLmV4ZWN1dGVPbkNoYW5nZShwcm9wcywgZXZlbnQpO1xuICBSZWFjdFVwZGF0ZXMuYXNhcChmb3JjZVVwZGF0ZUlmTW91bnRlZCwgdGhpcyk7XG4gIHJldHVybiByZXR1cm5WYWx1ZTtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBSZWFjdERPTVRleHRhcmVhOyJdfQ==
10364
+ },{"./LinkedValueUtils":51,"./Object.assign":52,"./ReactDOMIDOperations":70,"./ReactUpdates":113,"_process":29,"fbjs/lib/invariant":17,"fbjs/lib/warning":28}],78:[function(require,module,exports){
10365
+ /**
10366
+ * Copyright 2013-2015, Facebook, Inc.
10367
+ * All rights reserved.
10368
+ *
10369
+ * This source code is licensed under the BSD-style license found in the
10370
+ * LICENSE file in the root directory of this source tree. An additional grant
10371
+ * of patent rights can be found in the PATENTS file in the same directory.
10372
+ *
10373
+ * @providesModule ReactDefaultBatchingStrategy
10374
+ */
10375
+
10376
+ 'use strict';
10377
+
10378
+ var ReactUpdates = require('./ReactUpdates');
10379
+ var Transaction = require('./Transaction');
10380
+
10381
+ var assign = require('./Object.assign');
10382
+ var emptyFunction = require('fbjs/lib/emptyFunction');
10383
+
10384
+ var RESET_BATCHED_UPDATES = {
10385
+ initialize: emptyFunction,
10386
+ close: function () {
10387
+ ReactDefaultBatchingStrategy.isBatchingUpdates = false;
10388
+ }
10389
+ };
10390
+
10391
+ var FLUSH_BATCHED_UPDATES = {
10392
+ initialize: emptyFunction,
10393
+ close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
10394
+ };
10395
+
10396
+ var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
10397
+
10398
+ function ReactDefaultBatchingStrategyTransaction() {
10399
+ this.reinitializeTransaction();
10400
+ }
10401
+
10402
+ assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction.Mixin, {
10403
+ getTransactionWrappers: function () {
10404
+ return TRANSACTION_WRAPPERS;
10405
+ }
10406
+ });
10407
+
10408
+ var transaction = new ReactDefaultBatchingStrategyTransaction();
10409
+
10410
+ var ReactDefaultBatchingStrategy = {
10411
+ isBatchingUpdates: false,
10412
+
10413
+ /**
10414
+ * Call the provided function in a context within which calls to `setState`
10415
+ * and friends are batched such that components aren't updated unnecessarily.
10416
+ */
10417
+ batchedUpdates: function (callback, a, b, c, d, e) {
10418
+ var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
10419
+
10420
+ ReactDefaultBatchingStrategy.isBatchingUpdates = true;
10421
+
10422
+ // The code is written this way to avoid extra allocations
10423
+ if (alreadyBatchingUpdates) {
10424
+ callback(a, b, c, d, e);
10425
+ } else {
10426
+ transaction.perform(callback, null, a, b, c, d, e);
10427
+ }
10428
+ }
10429
+ };
10430
+
10431
+ module.exports = ReactDefaultBatchingStrategy;
10432
+ },{"./Object.assign":52,"./ReactUpdates":113,"./Transaction":130,"fbjs/lib/emptyFunction":9}],79:[function(require,module,exports){
10433
+ (function (process){
10434
+ /**
10435
+ * Copyright 2013-2015, Facebook, Inc.
10436
+ * All rights reserved.
10437
+ *
10438
+ * This source code is licensed under the BSD-style license found in the
10439
+ * LICENSE file in the root directory of this source tree. An additional grant
10440
+ * of patent rights can be found in the PATENTS file in the same directory.
10441
+ *
10442
+ * @providesModule ReactDefaultInjection
10443
+ */
10444
+
10445
+ 'use strict';
10446
+
10447
+ var BeforeInputEventPlugin = require('./BeforeInputEventPlugin');
10448
+ var ChangeEventPlugin = require('./ChangeEventPlugin');
10449
+ var ClientReactRootIndex = require('./ClientReactRootIndex');
10450
+ var DefaultEventPluginOrder = require('./DefaultEventPluginOrder');
10451
+ var EnterLeaveEventPlugin = require('./EnterLeaveEventPlugin');
10452
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
10453
+ var HTMLDOMPropertyConfig = require('./HTMLDOMPropertyConfig');
10454
+ var ReactBrowserComponentMixin = require('./ReactBrowserComponentMixin');
10455
+ var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');
10456
+ var ReactDefaultBatchingStrategy = require('./ReactDefaultBatchingStrategy');
10457
+ var ReactDOMComponent = require('./ReactDOMComponent');
10458
+ var ReactDOMTextComponent = require('./ReactDOMTextComponent');
10459
+ var ReactEventListener = require('./ReactEventListener');
10460
+ var ReactInjection = require('./ReactInjection');
10461
+ var ReactInstanceHandles = require('./ReactInstanceHandles');
10462
+ var ReactMount = require('./ReactMount');
10463
+ var ReactReconcileTransaction = require('./ReactReconcileTransaction');
10464
+ var SelectEventPlugin = require('./SelectEventPlugin');
10465
+ var ServerReactRootIndex = require('./ServerReactRootIndex');
10466
+ var SimpleEventPlugin = require('./SimpleEventPlugin');
10467
+ var SVGDOMPropertyConfig = require('./SVGDOMPropertyConfig');
10468
+
10469
+ var alreadyInjected = false;
10470
+
10471
+ function inject() {
10472
+ if (alreadyInjected) {
10473
+ // TODO: This is currently true because these injections are shared between
10474
+ // the client and the server package. They should be built independently
10475
+ // and not share any injection state. Then this problem will be solved.
10476
+ return;
10477
+ }
10478
+ alreadyInjected = true;
10479
+
10480
+ ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
10481
+
10482
+ /**
10483
+ * Inject modules for resolving DOM hierarchy and plugin ordering.
10484
+ */
10485
+ ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
10486
+ ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles);
10487
+ ReactInjection.EventPluginHub.injectMount(ReactMount);
10488
+
10489
+ /**
10490
+ * Some important event plugins included by default (without having to require
10491
+ * them).
10492
+ */
10493
+ ReactInjection.EventPluginHub.injectEventPluginsByName({
10494
+ SimpleEventPlugin: SimpleEventPlugin,
10495
+ EnterLeaveEventPlugin: EnterLeaveEventPlugin,
10496
+ ChangeEventPlugin: ChangeEventPlugin,
10497
+ SelectEventPlugin: SelectEventPlugin,
10498
+ BeforeInputEventPlugin: BeforeInputEventPlugin
10499
+ });
10500
+
10501
+ ReactInjection.NativeComponent.injectGenericComponentClass(ReactDOMComponent);
10502
+
10503
+ ReactInjection.NativeComponent.injectTextComponentClass(ReactDOMTextComponent);
10504
+
10505
+ ReactInjection.Class.injectMixin(ReactBrowserComponentMixin);
10506
+
10507
+ ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
10508
+ ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
10509
+
10510
+ ReactInjection.EmptyComponent.injectEmptyComponent('noscript');
10511
+
10512
+ ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
10513
+ ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
10514
+
10515
+ ReactInjection.RootIndex.injectCreateReactRootIndex(ExecutionEnvironment.canUseDOM ? ClientReactRootIndex.createReactRootIndex : ServerReactRootIndex.createReactRootIndex);
10516
+
10517
+ ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
10518
+
10519
+ if (process.env.NODE_ENV !== 'production') {
10520
+ var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
10521
+ if (/[?&]react_perf\b/.test(url)) {
10522
+ var ReactDefaultPerf = require('./ReactDefaultPerf');
10523
+ ReactDefaultPerf.start();
10524
+ }
10525
+ }
10526
+ }
10527
+
10528
+ module.exports = {
10529
+ inject: inject
10530
+ };
10531
+ }).call(this,require('_process'))
10532
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3REZWZhdWx0SW5qZWN0aW9uLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7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uICBSZWFjdEluamVjdGlvbi5Sb290SW5kZXguaW5qZWN0Q3JlYXRlUmVhY3RSb290SW5kZXgoRXhlY3V0aW9uRW52aXJvbm1lbnQuY2FuVXNlRE9NID8gQ2xpZW50UmVhY3RSb290SW5kZXguY3JlYXRlUmVhY3RSb290SW5kZXggOiBTZXJ2ZXJSZWFjdFJvb3RJbmRleC5jcmVhdGVSZWFjdFJvb3RJbmRleCk7XG5cbiAgUmVhY3RJbmplY3Rpb24uQ29tcG9uZW50LmluamVjdEVudmlyb25tZW50KFJlYWN0Q29tcG9uZW50QnJvd3NlckVudmlyb25tZW50KTtcblxuICBpZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdwcm9kdWN0aW9uJykge1xuICAgIHZhciB1cmwgPSBFeGVjdXRpb25FbnZpcm9ubWVudC5jYW5Vc2VET00gJiYgd2luZG93LmxvY2F0aW9uLmhyZWYgfHwgJyc7XG4gICAgaWYgKC9bPyZdcmVhY3RfcGVyZlxcYi8udGVzdCh1cmwpKSB7XG4gICAgICB2YXIgUmVhY3REZWZhdWx0UGVyZiA9IHJlcXVpcmUoJy4vUmVhY3REZWZhdWx0UGVyZicpO1xuICAgICAgUmVhY3REZWZhdWx0UGVyZi5zdGFydCgpO1xuICAgIH1cbiAgfVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgaW5qZWN0OiBpbmplY3Rcbn07Il19
10533
+ },{"./BeforeInputEventPlugin":32,"./ChangeEventPlugin":36,"./ClientReactRootIndex":37,"./DefaultEventPluginOrder":42,"./EnterLeaveEventPlugin":43,"./HTMLDOMPropertyConfig":50,"./ReactBrowserComponentMixin":55,"./ReactComponentBrowserEnvironment":61,"./ReactDOMComponent":67,"./ReactDOMTextComponent":76,"./ReactDefaultBatchingStrategy":78,"./ReactDefaultPerf":80,"./ReactEventListener":88,"./ReactInjection":89,"./ReactInstanceHandles":91,"./ReactMount":95,"./ReactReconcileTransaction":105,"./SVGDOMPropertyConfig":115,"./SelectEventPlugin":116,"./ServerReactRootIndex":117,"./SimpleEventPlugin":118,"_process":29,"fbjs/lib/ExecutionEnvironment":3}],80:[function(require,module,exports){
10534
+ /**
10535
+ * Copyright 2013-2015, Facebook, Inc.
10536
+ * All rights reserved.
10537
+ *
10538
+ * This source code is licensed under the BSD-style license found in the
10539
+ * LICENSE file in the root directory of this source tree. An additional grant
10540
+ * of patent rights can be found in the PATENTS file in the same directory.
10541
+ *
10542
+ * @providesModule ReactDefaultPerf
10543
+ * @typechecks static-only
10544
+ */
10545
+
10546
+ 'use strict';
10547
+
10548
+ var DOMProperty = require('./DOMProperty');
10549
+ var ReactDefaultPerfAnalysis = require('./ReactDefaultPerfAnalysis');
10550
+ var ReactMount = require('./ReactMount');
10551
+ var ReactPerf = require('./ReactPerf');
10552
+
10553
+ var performanceNow = require('fbjs/lib/performanceNow');
10554
+
10555
+ function roundFloat(val) {
10556
+ return Math.floor(val * 100) / 100;
10557
+ }
10558
+
10559
+ function addValue(obj, key, val) {
10560
+ obj[key] = (obj[key] || 0) + val;
10561
+ }
10562
+
10563
+ var ReactDefaultPerf = {
10564
+ _allMeasurements: [], // last item in the list is the current one
10565
+ _mountStack: [0],
10566
+ _injected: false,
10567
+
10568
+ start: function () {
10569
+ if (!ReactDefaultPerf._injected) {
10570
+ ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure);
10571
+ }
10572
+
10573
+ ReactDefaultPerf._allMeasurements.length = 0;
10574
+ ReactPerf.enableMeasure = true;
10575
+ },
10576
+
10577
+ stop: function () {
10578
+ ReactPerf.enableMeasure = false;
10579
+ },
10580
+
10581
+ getLastMeasurements: function () {
10582
+ return ReactDefaultPerf._allMeasurements;
10583
+ },
10584
+
10585
+ printExclusive: function (measurements) {
10586
+ measurements = measurements || ReactDefaultPerf._allMeasurements;
10587
+ var summary = ReactDefaultPerfAnalysis.getExclusiveSummary(measurements);
10588
+ console.table(summary.map(function (item) {
10589
+ return {
10590
+ 'Component class name': item.componentName,
10591
+ 'Total inclusive time (ms)': roundFloat(item.inclusive),
10592
+ 'Exclusive mount time (ms)': roundFloat(item.exclusive),
10593
+ 'Exclusive render time (ms)': roundFloat(item.render),
10594
+ 'Mount time per instance (ms)': roundFloat(item.exclusive / item.count),
10595
+ 'Render time per instance (ms)': roundFloat(item.render / item.count),
10596
+ 'Instances': item.count
10597
+ };
10598
+ }));
10599
+ // TODO: ReactDefaultPerfAnalysis.getTotalTime() does not return the correct
10600
+ // number.
10601
+ },
10602
+
10603
+ printInclusive: function (measurements) {
10604
+ measurements = measurements || ReactDefaultPerf._allMeasurements;
10605
+ var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements);
10606
+ console.table(summary.map(function (item) {
10607
+ return {
10608
+ 'Owner > component': item.componentName,
10609
+ 'Inclusive time (ms)': roundFloat(item.time),
10610
+ 'Instances': item.count
10611
+ };
10612
+ }));
10613
+ console.log('Total time:', ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms');
10614
+ },
10615
+
10616
+ getMeasurementsSummaryMap: function (measurements) {
10617
+ var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements, true);
10618
+ return summary.map(function (item) {
10619
+ return {
10620
+ 'Owner > component': item.componentName,
10621
+ 'Wasted time (ms)': item.time,
10622
+ 'Instances': item.count
10623
+ };
10624
+ });
10625
+ },
10626
+
10627
+ printWasted: function (measurements) {
10628
+ measurements = measurements || ReactDefaultPerf._allMeasurements;
10629
+ console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements));
10630
+ console.log('Total time:', ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms');
10631
+ },
10632
+
10633
+ printDOM: function (measurements) {
10634
+ measurements = measurements || ReactDefaultPerf._allMeasurements;
10635
+ var summary = ReactDefaultPerfAnalysis.getDOMSummary(measurements);
10636
+ console.table(summary.map(function (item) {
10637
+ var result = {};
10638
+ result[DOMProperty.ID_ATTRIBUTE_NAME] = item.id;
10639
+ result.type = item.type;
10640
+ result.args = JSON.stringify(item.args);
10641
+ return result;
10642
+ }));
10643
+ console.log('Total time:', ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms');
10644
+ },
10645
+
10646
+ _recordWrite: function (id, fnName, totalTime, args) {
10647
+ // TODO: totalTime isn't that useful since it doesn't count paints/reflows
10648
+ var writes = ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1].writes;
10649
+ writes[id] = writes[id] || [];
10650
+ writes[id].push({
10651
+ type: fnName,
10652
+ time: totalTime,
10653
+ args: args
10654
+ });
10655
+ },
10656
+
10657
+ measure: function (moduleName, fnName, func) {
10658
+ return function () {
10659
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
10660
+ args[_key] = arguments[_key];
10661
+ }
10662
+
10663
+ var totalTime;
10664
+ var rv;
10665
+ var start;
10666
+
10667
+ if (fnName === '_renderNewRootComponent' || fnName === 'flushBatchedUpdates') {
10668
+ // A "measurement" is a set of metrics recorded for each flush. We want
10669
+ // to group the metrics for a given flush together so we can look at the
10670
+ // components that rendered and the DOM operations that actually
10671
+ // happened to determine the amount of "wasted work" performed.
10672
+ ReactDefaultPerf._allMeasurements.push({
10673
+ exclusive: {},
10674
+ inclusive: {},
10675
+ render: {},
10676
+ counts: {},
10677
+ writes: {},
10678
+ displayNames: {},
10679
+ totalTime: 0,
10680
+ created: {}
10681
+ });
10682
+ start = performanceNow();
10683
+ rv = func.apply(this, args);
10684
+ ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1].totalTime = performanceNow() - start;
10685
+ return rv;
10686
+ } else if (fnName === '_mountImageIntoNode' || moduleName === 'ReactBrowserEventEmitter' || moduleName === 'ReactDOMIDOperations' || moduleName === 'CSSPropertyOperations' || moduleName === 'DOMChildrenOperations' || moduleName === 'DOMPropertyOperations') {
10687
+ start = performanceNow();
10688
+ rv = func.apply(this, args);
10689
+ totalTime = performanceNow() - start;
10690
+
10691
+ if (fnName === '_mountImageIntoNode') {
10692
+ var mountID = ReactMount.getID(args[1]);
10693
+ ReactDefaultPerf._recordWrite(mountID, fnName, totalTime, args[0]);
10694
+ } else if (fnName === 'dangerouslyProcessChildrenUpdates') {
10695
+ // special format
10696
+ args[0].forEach(function (update) {
10697
+ var writeArgs = {};
10698
+ if (update.fromIndex !== null) {
10699
+ writeArgs.fromIndex = update.fromIndex;
10700
+ }
10701
+ if (update.toIndex !== null) {
10702
+ writeArgs.toIndex = update.toIndex;
10703
+ }
10704
+ if (update.textContent !== null) {
10705
+ writeArgs.textContent = update.textContent;
10706
+ }
10707
+ if (update.markupIndex !== null) {
10708
+ writeArgs.markup = args[1][update.markupIndex];
10709
+ }
10710
+ ReactDefaultPerf._recordWrite(update.parentID, update.type, totalTime, writeArgs);
10711
+ });
10712
+ } else {
10713
+ // basic format
10714
+ var id = args[0];
10715
+ if (typeof id === 'object') {
10716
+ id = ReactMount.getID(args[0]);
10717
+ }
10718
+ ReactDefaultPerf._recordWrite(id, fnName, totalTime, Array.prototype.slice.call(args, 1));
10719
+ }
10720
+ return rv;
10721
+ } else if (moduleName === 'ReactCompositeComponent' && (fnName === 'mountComponent' || fnName === 'updateComponent' || // TODO: receiveComponent()?
10722
+ fnName === '_renderValidatedComponent')) {
10723
+
10724
+ if (this._currentElement.type === ReactMount.TopLevelWrapper) {
10725
+ return func.apply(this, args);
10726
+ }
10727
+
10728
+ var rootNodeID = fnName === 'mountComponent' ? args[0] : this._rootNodeID;
10729
+ var isRender = fnName === '_renderValidatedComponent';
10730
+ var isMount = fnName === 'mountComponent';
10731
+
10732
+ var mountStack = ReactDefaultPerf._mountStack;
10733
+ var entry = ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1];
10734
+
10735
+ if (isRender) {
10736
+ addValue(entry.counts, rootNodeID, 1);
10737
+ } else if (isMount) {
10738
+ entry.created[rootNodeID] = true;
10739
+ mountStack.push(0);
10740
+ }
10741
+
10742
+ start = performanceNow();
10743
+ rv = func.apply(this, args);
10744
+ totalTime = performanceNow() - start;
10745
+
10746
+ if (isRender) {
10747
+ addValue(entry.render, rootNodeID, totalTime);
10748
+ } else if (isMount) {
10749
+ var subMountTime = mountStack.pop();
10750
+ mountStack[mountStack.length - 1] += totalTime;
10751
+ addValue(entry.exclusive, rootNodeID, totalTime - subMountTime);
10752
+ addValue(entry.inclusive, rootNodeID, totalTime);
10753
+ } else {
10754
+ addValue(entry.inclusive, rootNodeID, totalTime);
10755
+ }
10756
+
10757
+ entry.displayNames[rootNodeID] = {
10758
+ current: this.getName(),
10759
+ owner: this._currentElement._owner ? this._currentElement._owner.getName() : '<root>'
10760
+ };
10761
+
10762
+ return rv;
10763
+ } else {
10764
+ return func.apply(this, args);
10765
+ }
10766
+ };
10767
+ }
10768
+ };
10769
+
10770
+ module.exports = ReactDefaultPerf;
10771
+ },{"./DOMProperty":39,"./ReactDefaultPerfAnalysis":81,"./ReactMount":95,"./ReactPerf":101,"fbjs/lib/performanceNow":25}],81:[function(require,module,exports){
10772
+ /**
10773
+ * Copyright 2013-2015, Facebook, Inc.
10774
+ * All rights reserved.
10775
+ *
10776
+ * This source code is licensed under the BSD-style license found in the
10777
+ * LICENSE file in the root directory of this source tree. An additional grant
10778
+ * of patent rights can be found in the PATENTS file in the same directory.
10779
+ *
10780
+ * @providesModule ReactDefaultPerfAnalysis
10781
+ */
10782
+
10783
+ 'use strict';
10784
+
10785
+ var assign = require('./Object.assign');
10786
+
10787
+ // Don't try to save users less than 1.2ms (a number I made up)
10788
+ var DONT_CARE_THRESHOLD = 1.2;
10789
+ var DOM_OPERATION_TYPES = {
10790
+ '_mountImageIntoNode': 'set innerHTML',
10791
+ INSERT_MARKUP: 'set innerHTML',
10792
+ MOVE_EXISTING: 'move',
10793
+ REMOVE_NODE: 'remove',
10794
+ SET_MARKUP: 'set innerHTML',
10795
+ TEXT_CONTENT: 'set textContent',
10796
+ 'setValueForProperty': 'update attribute',
10797
+ 'setValueForAttribute': 'update attribute',
10798
+ 'deleteValueForProperty': 'remove attribute',
10799
+ 'setValueForStyles': 'update styles',
10800
+ 'replaceNodeWithMarkup': 'replace',
10801
+ 'updateTextContent': 'set textContent'
10802
+ };
10803
+
10804
+ function getTotalTime(measurements) {
10805
+ // TODO: return number of DOM ops? could be misleading.
10806
+ // TODO: measure dropped frames after reconcile?
10807
+ // TODO: log total time of each reconcile and the top-level component
10808
+ // class that triggered it.
10809
+ var totalTime = 0;
10810
+ for (var i = 0; i < measurements.length; i++) {
10811
+ var measurement = measurements[i];
10812
+ totalTime += measurement.totalTime;
10813
+ }
10814
+ return totalTime;
10815
+ }
10816
+
10817
+ function getDOMSummary(measurements) {
10818
+ var items = [];
10819
+ measurements.forEach(function (measurement) {
10820
+ Object.keys(measurement.writes).forEach(function (id) {
10821
+ measurement.writes[id].forEach(function (write) {
10822
+ items.push({
10823
+ id: id,
10824
+ type: DOM_OPERATION_TYPES[write.type] || write.type,
10825
+ args: write.args
10826
+ });
10827
+ });
10828
+ });
10829
+ });
10830
+ return items;
10831
+ }
10832
+
10833
+ function getExclusiveSummary(measurements) {
10834
+ var candidates = {};
10835
+ var displayName;
10836
+
10837
+ for (var i = 0; i < measurements.length; i++) {
10838
+ var measurement = measurements[i];
10839
+ var allIDs = assign({}, measurement.exclusive, measurement.inclusive);
10840
+
10841
+ for (var id in allIDs) {
10842
+ displayName = measurement.displayNames[id].current;
10843
+
10844
+ candidates[displayName] = candidates[displayName] || {
10845
+ componentName: displayName,
10846
+ inclusive: 0,
10847
+ exclusive: 0,
10848
+ render: 0,
10849
+ count: 0
10850
+ };
10851
+ if (measurement.render[id]) {
10852
+ candidates[displayName].render += measurement.render[id];
10853
+ }
10854
+ if (measurement.exclusive[id]) {
10855
+ candidates[displayName].exclusive += measurement.exclusive[id];
10856
+ }
10857
+ if (measurement.inclusive[id]) {
10858
+ candidates[displayName].inclusive += measurement.inclusive[id];
10859
+ }
10860
+ if (measurement.counts[id]) {
10861
+ candidates[displayName].count += measurement.counts[id];
10862
+ }
10863
+ }
10864
+ }
10865
+
10866
+ // Now make a sorted array with the results.
10867
+ var arr = [];
10868
+ for (displayName in candidates) {
10869
+ if (candidates[displayName].exclusive >= DONT_CARE_THRESHOLD) {
10870
+ arr.push(candidates[displayName]);
10871
+ }
10872
+ }
10873
+
10874
+ arr.sort(function (a, b) {
10875
+ return b.exclusive - a.exclusive;
10876
+ });
10877
+
10878
+ return arr;
10879
+ }
10880
+
10881
+ function getInclusiveSummary(measurements, onlyClean) {
10882
+ var candidates = {};
10883
+ var inclusiveKey;
10884
+
10885
+ for (var i = 0; i < measurements.length; i++) {
10886
+ var measurement = measurements[i];
10887
+ var allIDs = assign({}, measurement.exclusive, measurement.inclusive);
10888
+ var cleanComponents;
10889
+
10890
+ if (onlyClean) {
10891
+ cleanComponents = getUnchangedComponents(measurement);
10892
+ }
10893
+
10894
+ for (var id in allIDs) {
10895
+ if (onlyClean && !cleanComponents[id]) {
10896
+ continue;
10897
+ }
10898
+
10899
+ var displayName = measurement.displayNames[id];
10900
+
10901
+ // Inclusive time is not useful for many components without knowing where
10902
+ // they are instantiated. So we aggregate inclusive time with both the
10903
+ // owner and current displayName as the key.
10904
+ inclusiveKey = displayName.owner + ' > ' + displayName.current;
10905
+
10906
+ candidates[inclusiveKey] = candidates[inclusiveKey] || {
10907
+ componentName: inclusiveKey,
10908
+ time: 0,
10909
+ count: 0
10910
+ };
10911
+
10912
+ if (measurement.inclusive[id]) {
10913
+ candidates[inclusiveKey].time += measurement.inclusive[id];
10914
+ }
10915
+ if (measurement.counts[id]) {
10916
+ candidates[inclusiveKey].count += measurement.counts[id];
10917
+ }
10918
+ }
10919
+ }
10920
+
10921
+ // Now make a sorted array with the results.
10922
+ var arr = [];
10923
+ for (inclusiveKey in candidates) {
10924
+ if (candidates[inclusiveKey].time >= DONT_CARE_THRESHOLD) {
10925
+ arr.push(candidates[inclusiveKey]);
10926
+ }
10927
+ }
10928
+
10929
+ arr.sort(function (a, b) {
10930
+ return b.time - a.time;
10931
+ });
10932
+
10933
+ return arr;
10934
+ }
10935
+
10936
+ function getUnchangedComponents(measurement) {
10937
+ // For a given reconcile, look at which components did not actually
10938
+ // render anything to the DOM and return a mapping of their ID to
10939
+ // the amount of time it took to render the entire subtree.
10940
+ var cleanComponents = {};
10941
+ var dirtyLeafIDs = Object.keys(measurement.writes);
10942
+ var allIDs = assign({}, measurement.exclusive, measurement.inclusive);
10943
+
10944
+ for (var id in allIDs) {
10945
+ var isDirty = false;
10946
+ // For each component that rendered, see if a component that triggered
10947
+ // a DOM op is in its subtree.
10948
+ for (var i = 0; i < dirtyLeafIDs.length; i++) {
10949
+ if (dirtyLeafIDs[i].indexOf(id) === 0) {
10950
+ isDirty = true;
10951
+ break;
10952
+ }
10953
+ }
10954
+ // check if component newly created
10955
+ if (measurement.created[id]) {
10956
+ isDirty = true;
10957
+ }
10958
+ if (!isDirty && measurement.counts[id] > 0) {
10959
+ cleanComponents[id] = true;
10960
+ }
10961
+ }
10962
+ return cleanComponents;
10963
+ }
10964
+
10965
+ var ReactDefaultPerfAnalysis = {
10966
+ getExclusiveSummary: getExclusiveSummary,
10967
+ getInclusiveSummary: getInclusiveSummary,
10968
+ getDOMSummary: getDOMSummary,
10969
+ getTotalTime: getTotalTime
10970
+ };
10971
+
10972
+ module.exports = ReactDefaultPerfAnalysis;
10973
+ },{"./Object.assign":52}],82:[function(require,module,exports){
10974
+ (function (process){
10975
+ /**
10976
+ * Copyright 2014-2015, Facebook, Inc.
10977
+ * All rights reserved.
10978
+ *
10979
+ * This source code is licensed under the BSD-style license found in the
10980
+ * LICENSE file in the root directory of this source tree. An additional grant
10981
+ * of patent rights can be found in the PATENTS file in the same directory.
10982
+ *
10983
+ * @providesModule ReactElement
10984
+ */
10985
+
10986
+ 'use strict';
10987
+
10988
+ var ReactCurrentOwner = require('./ReactCurrentOwner');
10989
+
10990
+ var assign = require('./Object.assign');
10991
+ var canDefineProperty = require('./canDefineProperty');
10992
+
10993
+ // The Symbol used to tag the ReactElement type. If there is no native Symbol
10994
+ // nor polyfill, then a plain number is used for performance.
10995
+ var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
10996
+
10997
+ var RESERVED_PROPS = {
10998
+ key: true,
10999
+ ref: true,
11000
+ __self: true,
11001
+ __source: true
11002
+ };
11003
+
11004
+ /**
11005
+ * Base constructor for all React elements. This is only used to make this
11006
+ * work with a dynamic instanceof check. Nothing should live on this prototype.
11007
+ *
11008
+ * @param {*} type
11009
+ * @param {*} key
11010
+ * @param {string|object} ref
11011
+ * @param {*} self A *temporary* helper to detect places where `this` is
11012
+ * different from the `owner` when React.createElement is called, so that we
11013
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
11014
+ * functions, and as long as `this` and owner are the same, there will be no
11015
+ * change in behavior.
11016
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
11017
+ * indicating filename, line number, and/or other information.
11018
+ * @param {*} owner
11019
+ * @param {*} props
11020
+ * @internal
11021
+ */
11022
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
11023
+ var element = {
11024
+ // This tag allow us to uniquely identify this as a React Element
11025
+ $$typeof: REACT_ELEMENT_TYPE,
11026
+
11027
+ // Built-in properties that belong on the element
11028
+ type: type,
11029
+ key: key,
11030
+ ref: ref,
11031
+ props: props,
11032
+
11033
+ // Record the component responsible for creating this element.
11034
+ _owner: owner
11035
+ };
11036
+
11037
+ if (process.env.NODE_ENV !== 'production') {
11038
+ // The validation flag is currently mutative. We put it on
11039
+ // an external backing store so that we can freeze the whole object.
11040
+ // This can be replaced with a WeakMap once they are implemented in
11041
+ // commonly used development environments.
11042
+ element._store = {};
11043
+
11044
+ // To make comparing ReactElements easier for testing purposes, we make
11045
+ // the validation flag non-enumerable (where possible, which should
11046
+ // include every environment we run tests in), so the test framework
11047
+ // ignores it.
11048
+ if (canDefineProperty) {
11049
+ Object.defineProperty(element._store, 'validated', {
11050
+ configurable: false,
11051
+ enumerable: false,
11052
+ writable: true,
11053
+ value: false
11054
+ });
11055
+ // self and source are DEV only properties.
11056
+ Object.defineProperty(element, '_self', {
11057
+ configurable: false,
11058
+ enumerable: false,
11059
+ writable: false,
11060
+ value: self
11061
+ });
11062
+ // Two elements created in two different places should be considered
11063
+ // equal for testing purposes and therefore we hide it from enumeration.
11064
+ Object.defineProperty(element, '_source', {
11065
+ configurable: false,
11066
+ enumerable: false,
11067
+ writable: false,
11068
+ value: source
11069
+ });
11070
+ } else {
11071
+ element._store.validated = false;
11072
+ element._self = self;
11073
+ element._source = source;
11074
+ }
11075
+ Object.freeze(element.props);
11076
+ Object.freeze(element);
11077
+ }
11078
+
11079
+ return element;
11080
+ };
11081
+
11082
+ ReactElement.createElement = function (type, config, children) {
11083
+ var propName;
11084
+
11085
+ // Reserved names are extracted
11086
+ var props = {};
11087
+
11088
+ var key = null;
11089
+ var ref = null;
11090
+ var self = null;
11091
+ var source = null;
11092
+
11093
+ if (config != null) {
11094
+ ref = config.ref === undefined ? null : config.ref;
11095
+ key = config.key === undefined ? null : '' + config.key;
11096
+ self = config.__self === undefined ? null : config.__self;
11097
+ source = config.__source === undefined ? null : config.__source;
11098
+ // Remaining properties are added to a new props object
11099
+ for (propName in config) {
11100
+ if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
11101
+ props[propName] = config[propName];
11102
+ }
11103
+ }
11104
+ }
11105
+
11106
+ // Children can be more than one argument, and those are transferred onto
11107
+ // the newly allocated props object.
11108
+ var childrenLength = arguments.length - 2;
11109
+ if (childrenLength === 1) {
11110
+ props.children = children;
11111
+ } else if (childrenLength > 1) {
11112
+ var childArray = Array(childrenLength);
11113
+ for (var i = 0; i < childrenLength; i++) {
11114
+ childArray[i] = arguments[i + 2];
11115
+ }
11116
+ props.children = childArray;
11117
+ }
11118
+
11119
+ // Resolve default props
11120
+ if (type && type.defaultProps) {
11121
+ var defaultProps = type.defaultProps;
11122
+ for (propName in defaultProps) {
11123
+ if (typeof props[propName] === 'undefined') {
11124
+ props[propName] = defaultProps[propName];
11125
+ }
11126
+ }
11127
+ }
11128
+
11129
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
11130
+ };
11131
+
11132
+ ReactElement.createFactory = function (type) {
11133
+ var factory = ReactElement.createElement.bind(null, type);
11134
+ // Expose the type on the factory and the prototype so that it can be
11135
+ // easily accessed on elements. E.g. `<Foo />.type === Foo`.
11136
+ // This should not be named `constructor` since this may not be the function
11137
+ // that created the element, and it may not even be a constructor.
11138
+ // Legacy hook TODO: Warn if this is accessed
11139
+ factory.type = type;
11140
+ return factory;
11141
+ };
11142
+
11143
+ ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
11144
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
11145
+
11146
+ return newElement;
11147
+ };
11148
+
11149
+ ReactElement.cloneAndReplaceProps = function (oldElement, newProps) {
11150
+ var newElement = ReactElement(oldElement.type, oldElement.key, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, newProps);
11151
+
11152
+ if (process.env.NODE_ENV !== 'production') {
11153
+ // If the key on the original is valid, then the clone is valid
11154
+ newElement._store.validated = oldElement._store.validated;
11155
+ }
11156
+
11157
+ return newElement;
11158
+ };
11159
+
11160
+ ReactElement.cloneElement = function (element, config, children) {
11161
+ var propName;
11162
+
11163
+ // Original props are copied
11164
+ var props = assign({}, element.props);
11165
+
11166
+ // Reserved names are extracted
11167
+ var key = element.key;
11168
+ var ref = element.ref;
11169
+ // Self is preserved since the owner is preserved.
11170
+ var self = element._self;
11171
+ // Source is preserved since cloneElement is unlikely to be targeted by a
11172
+ // transpiler, and the original source is probably a better indicator of the
11173
+ // true owner.
11174
+ var source = element._source;
11175
+
11176
+ // Owner will be preserved, unless ref is overridden
11177
+ var owner = element._owner;
11178
+
11179
+ if (config != null) {
11180
+ if (config.ref !== undefined) {
11181
+ // Silently steal the ref from the parent.
11182
+ ref = config.ref;
11183
+ owner = ReactCurrentOwner.current;
11184
+ }
11185
+ if (config.key !== undefined) {
11186
+ key = '' + config.key;
11187
+ }
11188
+ // Remaining properties override existing props
11189
+ for (propName in config) {
11190
+ if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
11191
+ props[propName] = config[propName];
11192
+ }
11193
+ }
11194
+ }
11195
+
11196
+ // Children can be more than one argument, and those are transferred onto
11197
+ // the newly allocated props object.
11198
+ var childrenLength = arguments.length - 2;
11199
+ if (childrenLength === 1) {
11200
+ props.children = children;
11201
+ } else if (childrenLength > 1) {
11202
+ var childArray = Array(childrenLength);
11203
+ for (var i = 0; i < childrenLength; i++) {
11204
+ childArray[i] = arguments[i + 2];
11205
+ }
11206
+ props.children = childArray;
11207
+ }
11208
+
11209
+ return ReactElement(element.type, key, ref, self, source, owner, props);
11210
+ };
11211
+
11212
+ /**
11213
+ * @param {?object} object
11214
+ * @return {boolean} True if `object` is a valid component.
11215
+ * @final
11216
+ */
11217
+ ReactElement.isValidElement = function (object) {
11218
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
11219
+ };
11220
+
11221
+ module.exports = ReactElement;
11222
+ }).call(this,require('_process'))
11223
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RFbGVtZW50LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0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5jaGlsZHJlbiA9IGNoaWxkcmVuO1xuICB9IGVsc2UgaWYgKGNoaWxkcmVuTGVuZ3RoID4gMSkge1xuICAgIHZhciBjaGlsZEFycmF5ID0gQXJyYXkoY2hpbGRyZW5MZW5ndGgpO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgY2hpbGRyZW5MZW5ndGg7IGkrKykge1xuICAgICAgY2hpbGRBcnJheVtpXSA9IGFyZ3VtZW50c1tpICsgMl07XG4gICAgfVxuICAgIHByb3BzLmNoaWxkcmVuID0gY2hpbGRBcnJheTtcbiAgfVxuXG4gIHJldHVybiBSZWFjdEVsZW1lbnQoZWxlbWVudC50eXBlLCBrZXksIHJlZiwgc2VsZiwgc291cmNlLCBvd25lciwgcHJvcHMpO1xufTtcblxuLyoqXG4gKiBAcGFyYW0gez9vYmplY3R9IG9iamVjdFxuICogQHJldHVybiB7Ym9vbGVhbn0gVHJ1ZSBpZiBgb2JqZWN0YCBpcyBhIHZhbGlkIGNvbXBvbmVudC5cbiAqIEBmaW5hbFxuICovXG5SZWFjdEVsZW1lbnQuaXNWYWxpZEVsZW1lbnQgPSBmdW5jdGlvbiAob2JqZWN0KSB7XG4gIHJldHVybiB0eXBlb2Ygb2JqZWN0ID09PSAnb2JqZWN0JyAmJiBvYmplY3QgIT09IG51bGwgJiYgb2JqZWN0LiQkdHlwZW9mID09PSBSRUFDVF9FTEVNRU5UX1RZUEU7XG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IFJlYWN0RWxlbWVudDsiXX0=
11224
+ },{"./Object.assign":52,"./ReactCurrentOwner":64,"./canDefineProperty":134,"_process":29}],83:[function(require,module,exports){
11225
+ (function (process){
11226
+ /**
11227
+ * Copyright 2014-2015, Facebook, Inc.
11228
+ * All rights reserved.
11229
+ *
11230
+ * This source code is licensed under the BSD-style license found in the
11231
+ * LICENSE file in the root directory of this source tree. An additional grant
11232
+ * of patent rights can be found in the PATENTS file in the same directory.
11233
+ *
11234
+ * @providesModule ReactElementValidator
11235
+ */
11236
+
11237
+ /**
11238
+ * ReactElementValidator provides a wrapper around a element factory
11239
+ * which validates the props passed to the element. This is intended to be
11240
+ * used only in DEV and could be replaced by a static type checker for languages
11241
+ * that support it.
11242
+ */
11243
+
11244
+ 'use strict';
11245
+
11246
+ var ReactElement = require('./ReactElement');
11247
+ var ReactPropTypeLocations = require('./ReactPropTypeLocations');
11248
+ var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames');
11249
+ var ReactCurrentOwner = require('./ReactCurrentOwner');
11250
+
11251
+ var canDefineProperty = require('./canDefineProperty');
11252
+ var getIteratorFn = require('./getIteratorFn');
11253
+ var invariant = require('fbjs/lib/invariant');
11254
+ var warning = require('fbjs/lib/warning');
11255
+
11256
+ function getDeclarationErrorAddendum() {
11257
+ if (ReactCurrentOwner.current) {
11258
+ var name = ReactCurrentOwner.current.getName();
11259
+ if (name) {
11260
+ return ' Check the render method of `' + name + '`.';
11261
+ }
11262
+ }
11263
+ return '';
11264
+ }
11265
+
11266
+ /**
11267
+ * Warn if there's no key explicitly set on dynamic arrays of children or
11268
+ * object keys are not valid. This allows us to keep track of children between
11269
+ * updates.
11270
+ */
11271
+ var ownerHasKeyUseWarning = {};
11272
+
11273
+ var loggedTypeFailures = {};
11274
+
11275
+ /**
11276
+ * Warn if the element doesn't have an explicit key assigned to it.
11277
+ * This element is in an array. The array could grow and shrink or be
11278
+ * reordered. All children that haven't already been validated are required to
11279
+ * have a "key" property assigned to it.
11280
+ *
11281
+ * @internal
11282
+ * @param {ReactElement} element Element that requires a key.
11283
+ * @param {*} parentType element's parent's type.
11284
+ */
11285
+ function validateExplicitKey(element, parentType) {
11286
+ if (!element._store || element._store.validated || element.key != null) {
11287
+ return;
11288
+ }
11289
+ element._store.validated = true;
11290
+
11291
+ var addenda = getAddendaForKeyUse('uniqueKey', element, parentType);
11292
+ if (addenda === null) {
11293
+ // we already showed the warning
11294
+ return;
11295
+ }
11296
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s%s', addenda.parentOrOwner || '', addenda.childOwner || '', addenda.url || '') : undefined;
11297
+ }
11298
+
11299
+ /**
11300
+ * Shared warning and monitoring code for the key warnings.
11301
+ *
11302
+ * @internal
11303
+ * @param {string} messageType A key used for de-duping warnings.
11304
+ * @param {ReactElement} element Component that requires a key.
11305
+ * @param {*} parentType element's parent's type.
11306
+ * @returns {?object} A set of addenda to use in the warning message, or null
11307
+ * if the warning has already been shown before (and shouldn't be shown again).
11308
+ */
11309
+ function getAddendaForKeyUse(messageType, element, parentType) {
11310
+ var addendum = getDeclarationErrorAddendum();
11311
+ if (!addendum) {
11312
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
11313
+ if (parentName) {
11314
+ addendum = ' Check the top-level render call using <' + parentName + '>.';
11315
+ }
11316
+ }
11317
+
11318
+ var memoizer = ownerHasKeyUseWarning[messageType] || (ownerHasKeyUseWarning[messageType] = {});
11319
+ if (memoizer[addendum]) {
11320
+ return null;
11321
+ }
11322
+ memoizer[addendum] = true;
11323
+
11324
+ var addenda = {
11325
+ parentOrOwner: addendum,
11326
+ url: ' See https://fb.me/react-warning-keys for more information.',
11327
+ childOwner: null
11328
+ };
11329
+
11330
+ // Usually the current owner is the offender, but if it accepts children as a
11331
+ // property, it may be the creator of the child that's responsible for
11332
+ // assigning it a key.
11333
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
11334
+ // Give the component that originally created this child.
11335
+ addenda.childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
11336
+ }
11337
+
11338
+ return addenda;
11339
+ }
11340
+
11341
+ /**
11342
+ * Ensure that every element either is passed in a static location, in an
11343
+ * array with an explicit keys property defined, or in an object literal
11344
+ * with valid key property.
11345
+ *
11346
+ * @internal
11347
+ * @param {ReactNode} node Statically passed child of any type.
11348
+ * @param {*} parentType node's parent's type.
11349
+ */
11350
+ function validateChildKeys(node, parentType) {
11351
+ if (typeof node !== 'object') {
11352
+ return;
11353
+ }
11354
+ if (Array.isArray(node)) {
11355
+ for (var i = 0; i < node.length; i++) {
11356
+ var child = node[i];
11357
+ if (ReactElement.isValidElement(child)) {
11358
+ validateExplicitKey(child, parentType);
11359
+ }
11360
+ }
11361
+ } else if (ReactElement.isValidElement(node)) {
11362
+ // This element was passed in a valid location.
11363
+ if (node._store) {
11364
+ node._store.validated = true;
11365
+ }
11366
+ } else if (node) {
11367
+ var iteratorFn = getIteratorFn(node);
11368
+ // Entry iterators provide implicit keys.
11369
+ if (iteratorFn) {
11370
+ if (iteratorFn !== node.entries) {
11371
+ var iterator = iteratorFn.call(node);
11372
+ var step;
11373
+ while (!(step = iterator.next()).done) {
11374
+ if (ReactElement.isValidElement(step.value)) {
11375
+ validateExplicitKey(step.value, parentType);
11376
+ }
11377
+ }
11378
+ }
11379
+ }
11380
+ }
11381
+ }
11382
+
11383
+ /**
11384
+ * Assert that the props are valid
11385
+ *
11386
+ * @param {string} componentName Name of the component for error messages.
11387
+ * @param {object} propTypes Map of prop name to a ReactPropType
11388
+ * @param {object} props
11389
+ * @param {string} location e.g. "prop", "context", "child context"
11390
+ * @private
11391
+ */
11392
+ function checkPropTypes(componentName, propTypes, props, location) {
11393
+ for (var propName in propTypes) {
11394
+ if (propTypes.hasOwnProperty(propName)) {
11395
+ var error;
11396
+ // Prop type validation may throw. In case they do, we don't want to
11397
+ // fail the render phase where it didn't fail before. So we log it.
11398
+ // After these have been cleaned up, we'll let them throw.
11399
+ try {
11400
+ // This is intentionally an invariant that gets caught. It's the same
11401
+ // behavior as without this statement except with a better message.
11402
+ !(typeof propTypes[propName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(false) : undefined;
11403
+ error = propTypes[propName](props, propName, componentName, location);
11404
+ } catch (ex) {
11405
+ error = ex;
11406
+ }
11407
+ process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], propName, typeof error) : undefined;
11408
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
11409
+ // Only monitor this failure once because there tends to be a lot of the
11410
+ // same error.
11411
+ loggedTypeFailures[error.message] = true;
11412
+
11413
+ var addendum = getDeclarationErrorAddendum();
11414
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Failed propType: %s%s', error.message, addendum) : undefined;
11415
+ }
11416
+ }
11417
+ }
11418
+ }
11419
+
11420
+ /**
11421
+ * Given an element, validate that its props follow the propTypes definition,
11422
+ * provided by the type.
11423
+ *
11424
+ * @param {ReactElement} element
11425
+ */
11426
+ function validatePropTypes(element) {
11427
+ var componentClass = element.type;
11428
+ if (typeof componentClass !== 'function') {
11429
+ return;
11430
+ }
11431
+ var name = componentClass.displayName || componentClass.name;
11432
+ if (componentClass.propTypes) {
11433
+ checkPropTypes(name, componentClass.propTypes, element.props, ReactPropTypeLocations.prop);
11434
+ }
11435
+ if (typeof componentClass.getDefaultProps === 'function') {
11436
+ process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : undefined;
11437
+ }
11438
+ }
11439
+
11440
+ var ReactElementValidator = {
11441
+
11442
+ createElement: function (type, props, children) {
11443
+ var validType = typeof type === 'string' || typeof type === 'function';
11444
+ // We warn in this case but don't throw. We expect the element creation to
11445
+ // succeed and there will likely be errors in render.
11446
+ process.env.NODE_ENV !== 'production' ? warning(validType, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : undefined;
11447
+
11448
+ var element = ReactElement.createElement.apply(this, arguments);
11449
+
11450
+ // The result can be nullish if a mock or a custom function is used.
11451
+ // TODO: Drop this when these are no longer allowed as the type argument.
11452
+ if (element == null) {
11453
+ return element;
11454
+ }
11455
+
11456
+ // Skip key warning if the type isn't valid since our key validation logic
11457
+ // doesn't expect a non-string/function type and can throw confusing errors.
11458
+ // We don't want exception behavior to differ between dev and prod.
11459
+ // (Rendering will throw with a helpful message and as soon as the type is
11460
+ // fixed, the key warnings will appear.)
11461
+ if (validType) {
11462
+ for (var i = 2; i < arguments.length; i++) {
11463
+ validateChildKeys(arguments[i], type);
11464
+ }
11465
+ }
11466
+
11467
+ validatePropTypes(element);
11468
+
11469
+ return element;
11470
+ },
11471
+
11472
+ createFactory: function (type) {
11473
+ var validatedFactory = ReactElementValidator.createElement.bind(null, type);
11474
+ // Legacy hook TODO: Warn if this is accessed
11475
+ validatedFactory.type = type;
11476
+
11477
+ if (process.env.NODE_ENV !== 'production') {
11478
+ if (canDefineProperty) {
11479
+ Object.defineProperty(validatedFactory, 'type', {
11480
+ enumerable: false,
11481
+ get: function () {
11482
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : undefined;
11483
+ Object.defineProperty(this, 'type', {
11484
+ value: type
11485
+ });
11486
+ return type;
11487
+ }
11488
+ });
11489
+ }
11490
+ }
11491
+
11492
+ return validatedFactory;
11493
+ },
11494
+
11495
+ cloneElement: function (element, props, children) {
11496
+ var newElement = ReactElement.cloneElement.apply(this, arguments);
11497
+ for (var i = 2; i < arguments.length; i++) {
11498
+ validateChildKeys(arguments[i], newElement.type);
11499
+ }
11500
+ validatePropTypes(newElement);
11501
+ return newElement;
11502
+ }
11503
+
11504
+ };
11505
+
11506
+ module.exports = ReactElementValidator;
11507
+ }).call(this,require('_process'))
11508
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy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cgKyAnYmVmb3JlIHBhc3NpbmcgaXQgdG8gY3JlYXRlRmFjdG9yeS4nKSA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0aGlzLCAndHlwZScsIHtcbiAgICAgICAgICAgICAgdmFsdWU6IHR5cGVcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgcmV0dXJuIHR5cGU7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gdmFsaWRhdGVkRmFjdG9yeTtcbiAgfSxcblxuICBjbG9uZUVsZW1lbnQ6IGZ1bmN0aW9uIChlbGVtZW50LCBwcm9wcywgY2hpbGRyZW4pIHtcbiAgICB2YXIgbmV3RWxlbWVudCA9IFJlYWN0RWxlbWVudC5jbG9uZUVsZW1lbnQuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICBmb3IgKHZhciBpID0gMjsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFsaWRhdGVDaGlsZEtleXMoYXJndW1lbnRzW2ldLCBuZXdFbGVtZW50LnR5cGUpO1xuICAgIH1cbiAgICB2YWxpZGF0ZVByb3BUeXBlcyhuZXdFbGVtZW50KTtcbiAgICByZXR1cm4gbmV3RWxlbWVudDtcbiAgfVxuXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IFJlYWN0RWxlbWVudFZhbGlkYXRvcjsiXX0=
11509
+ },{"./ReactCurrentOwner":64,"./ReactElement":82,"./ReactPropTypeLocationNames":102,"./ReactPropTypeLocations":103,"./canDefineProperty":134,"./getIteratorFn":145,"_process":29,"fbjs/lib/invariant":17,"fbjs/lib/warning":28}],84:[function(require,module,exports){
11510
+ /**
11511
+ * Copyright 2014-2015, Facebook, Inc.
11512
+ * All rights reserved.
11513
+ *
11514
+ * This source code is licensed under the BSD-style license found in the
11515
+ * LICENSE file in the root directory of this source tree. An additional grant
11516
+ * of patent rights can be found in the PATENTS file in the same directory.
11517
+ *
11518
+ * @providesModule ReactEmptyComponent
11519
+ */
11520
+
11521
+ 'use strict';
11522
+
11523
+ var ReactElement = require('./ReactElement');
11524
+ var ReactEmptyComponentRegistry = require('./ReactEmptyComponentRegistry');
11525
+ var ReactReconciler = require('./ReactReconciler');
11526
+
11527
+ var assign = require('./Object.assign');
11528
+
11529
+ var placeholderElement;
11530
+
11531
+ var ReactEmptyComponentInjection = {
11532
+ injectEmptyComponent: function (component) {
11533
+ placeholderElement = ReactElement.createElement(component);
11534
+ }
11535
+ };
11536
+
11537
+ var ReactEmptyComponent = function (instantiate) {
11538
+ this._currentElement = null;
11539
+ this._rootNodeID = null;
11540
+ this._renderedComponent = instantiate(placeholderElement);
11541
+ };
11542
+ assign(ReactEmptyComponent.prototype, {
11543
+ construct: function (element) {},
11544
+ mountComponent: function (rootID, transaction, context) {
11545
+ ReactEmptyComponentRegistry.registerNullComponentID(rootID);
11546
+ this._rootNodeID = rootID;
11547
+ return ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, context);
11548
+ },
11549
+ receiveComponent: function () {},
11550
+ unmountComponent: function (rootID, transaction, context) {
11551
+ ReactReconciler.unmountComponent(this._renderedComponent);
11552
+ ReactEmptyComponentRegistry.deregisterNullComponentID(this._rootNodeID);
11553
+ this._rootNodeID = null;
11554
+ this._renderedComponent = null;
11555
+ }
11556
+ });
11557
+
11558
+ ReactEmptyComponent.injection = ReactEmptyComponentInjection;
11559
+
11560
+ module.exports = ReactEmptyComponent;
11561
+ },{"./Object.assign":52,"./ReactElement":82,"./ReactEmptyComponentRegistry":85,"./ReactReconciler":106}],85:[function(require,module,exports){
11562
+ /**
11563
+ * Copyright 2014-2015, Facebook, Inc.
11564
+ * All rights reserved.
11565
+ *
11566
+ * This source code is licensed under the BSD-style license found in the
11567
+ * LICENSE file in the root directory of this source tree. An additional grant
11568
+ * of patent rights can be found in the PATENTS file in the same directory.
11569
+ *
11570
+ * @providesModule ReactEmptyComponentRegistry
11571
+ */
11572
+
11573
+ 'use strict';
11574
+
11575
+ // This registry keeps track of the React IDs of the components that rendered to
11576
+ // `null` (in reality a placeholder such as `noscript`)
11577
+ var nullComponentIDsRegistry = {};
11578
+
11579
+ /**
11580
+ * @param {string} id Component's `_rootNodeID`.
11581
+ * @return {boolean} True if the component is rendered to null.
11582
+ */
11583
+ function isNullComponentID(id) {
11584
+ return !!nullComponentIDsRegistry[id];
11585
+ }
11586
+
11587
+ /**
11588
+ * Mark the component as having rendered to null.
11589
+ * @param {string} id Component's `_rootNodeID`.
11590
+ */
11591
+ function registerNullComponentID(id) {
11592
+ nullComponentIDsRegistry[id] = true;
11593
+ }
11594
+
11595
+ /**
11596
+ * Unmark the component as having rendered to null: it renders to something now.
11597
+ * @param {string} id Component's `_rootNodeID`.
11598
+ */
11599
+ function deregisterNullComponentID(id) {
11600
+ delete nullComponentIDsRegistry[id];
11601
+ }
11602
+
11603
+ var ReactEmptyComponentRegistry = {
11604
+ isNullComponentID: isNullComponentID,
11605
+ registerNullComponentID: registerNullComponentID,
11606
+ deregisterNullComponentID: deregisterNullComponentID
11607
+ };
11608
+
11609
+ module.exports = ReactEmptyComponentRegistry;
11610
+ },{}],86:[function(require,module,exports){
11611
+ (function (process){
11612
+ /**
11613
+ * Copyright 2013-2015, Facebook, Inc.
11614
+ * All rights reserved.
11615
+ *
11616
+ * This source code is licensed under the BSD-style license found in the
11617
+ * LICENSE file in the root directory of this source tree. An additional grant
11618
+ * of patent rights can be found in the PATENTS file in the same directory.
11619
+ *
11620
+ * @providesModule ReactErrorUtils
11621
+ * @typechecks
11622
+ */
11623
+
11624
+ 'use strict';
11625
+
11626
+ var caughtError = null;
11627
+
11628
+ /**
11629
+ * Call a function while guarding against errors that happens within it.
11630
+ *
11631
+ * @param {?String} name of the guard to use for logging or debugging
11632
+ * @param {Function} func The function to invoke
11633
+ * @param {*} a First argument
11634
+ * @param {*} b Second argument
11635
+ */
11636
+ function invokeGuardedCallback(name, func, a, b) {
11637
+ try {
11638
+ return func(a, b);
11639
+ } catch (x) {
11640
+ if (caughtError === null) {
11641
+ caughtError = x;
11642
+ }
11643
+ return undefined;
11644
+ }
11645
+ }
11646
+
11647
+ var ReactErrorUtils = {
11648
+ invokeGuardedCallback: invokeGuardedCallback,
11649
+
11650
+ /**
11651
+ * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event
11652
+ * handler are sure to be rethrown by rethrowCaughtError.
11653
+ */
11654
+ invokeGuardedCallbackWithCatch: invokeGuardedCallback,
11655
+
11656
+ /**
11657
+ * During execution of guarded functions we will capture the first error which
11658
+ * we will rethrow to be handled by the top level error handler.
11659
+ */
11660
+ rethrowCaughtError: function () {
11661
+ if (caughtError) {
11662
+ var error = caughtError;
11663
+ caughtError = null;
11664
+ throw error;
11665
+ }
11666
+ }
11667
+ };
11668
+
11669
+ if (process.env.NODE_ENV !== 'production') {
11670
+ /**
11671
+ * To help development we can get better devtools integration by simulating a
11672
+ * real browser event.
11673
+ */
11674
+ if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
11675
+ var fakeNode = document.createElement('react');
11676
+ ReactErrorUtils.invokeGuardedCallback = function (name, func, a, b) {
11677
+ var boundFunc = func.bind(null, a, b);
11678
+ var evtType = 'react-' + name;
11679
+ fakeNode.addEventListener(evtType, boundFunc, false);
11680
+ var evt = document.createEvent('Event');
11681
+ evt.initEvent(evtType, false, false);
11682
+ fakeNode.dispatchEvent(evt);
11683
+ fakeNode.removeEventListener(evtType, boundFunc, false);
11684
+ };
11685
+ }
11686
+ }
11687
+
11688
+ module.exports = ReactErrorUtils;
11689
+ }).call(this,require('_process'))
11690
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RFcnJvclV0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiO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AobmFtZSwgZnVuYywgYSwgYikge1xuICAgICAgdmFyIGJvdW5kRnVuYyA9IGZ1bmMuYmluZChudWxsLCBhLCBiKTtcbiAgICAgIHZhciBldnRUeXBlID0gJ3JlYWN0LScgKyBuYW1lO1xuICAgICAgZmFrZU5vZGUuYWRkRXZlbnRMaXN0ZW5lcihldnRUeXBlLCBib3VuZEZ1bmMsIGZhbHNlKTtcbiAgICAgIHZhciBldnQgPSBkb2N1bWVudC5jcmVhdGVFdmVudCgnRXZlbnQnKTtcbiAgICAgIGV2dC5pbml0RXZlbnQoZXZ0VHlwZSwgZmFsc2UsIGZhbHNlKTtcbiAgICAgIGZha2VOb2RlLmRpc3BhdGNoRXZlbnQoZXZ0KTtcbiAgICAgIGZha2VOb2RlLnJlbW92ZUV2ZW50TGlzdGVuZXIoZXZ0VHlwZSwgYm91bmRGdW5jLCBmYWxzZSk7XG4gICAgfTtcbiAgfVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IFJlYWN0RXJyb3JVdGlsczsiXX0=
11691
+ },{"_process":29}],87:[function(require,module,exports){
11692
+ /**
11693
+ * Copyright 2013-2015, Facebook, Inc.
11694
+ * All rights reserved.
11695
+ *
11696
+ * This source code is licensed under the BSD-style license found in the
11697
+ * LICENSE file in the root directory of this source tree. An additional grant
11698
+ * of patent rights can be found in the PATENTS file in the same directory.
11699
+ *
11700
+ * @providesModule ReactEventEmitterMixin
11701
+ */
11702
+
11703
+ 'use strict';
11704
+
11705
+ var EventPluginHub = require('./EventPluginHub');
11706
+
11707
+ function runEventQueueInBatch(events) {
11708
+ EventPluginHub.enqueueEvents(events);
11709
+ EventPluginHub.processEventQueue(false);
11710
+ }
11711
+
11712
+ var ReactEventEmitterMixin = {
11713
+
11714
+ /**
11715
+ * Streams a fired top-level event to `EventPluginHub` where plugins have the
11716
+ * opportunity to create `ReactEvent`s to be dispatched.
11717
+ *
11718
+ * @param {string} topLevelType Record from `EventConstants`.
11719
+ * @param {object} topLevelTarget The listening component root node.
11720
+ * @param {string} topLevelTargetID ID of `topLevelTarget`.
11721
+ * @param {object} nativeEvent Native environment event.
11722
+ */
11723
+ handleTopLevel: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
11724
+ var events = EventPluginHub.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget);
11725
+ runEventQueueInBatch(events);
11726
+ }
11727
+ };
11728
+
11729
+ module.exports = ReactEventEmitterMixin;
11730
+ },{"./EventPluginHub":45}],88:[function(require,module,exports){
11731
+ /**
11732
+ * Copyright 2013-2015, Facebook, Inc.
11733
+ * All rights reserved.
11734
+ *
11735
+ * This source code is licensed under the BSD-style license found in the
11736
+ * LICENSE file in the root directory of this source tree. An additional grant
11737
+ * of patent rights can be found in the PATENTS file in the same directory.
11738
+ *
11739
+ * @providesModule ReactEventListener
11740
+ * @typechecks static-only
11741
+ */
11742
+
11743
+ 'use strict';
11744
+
11745
+ var EventListener = require('fbjs/lib/EventListener');
11746
+ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
11747
+ var PooledClass = require('./PooledClass');
11748
+ var ReactInstanceHandles = require('./ReactInstanceHandles');
11749
+ var ReactMount = require('./ReactMount');
11750
+ var ReactUpdates = require('./ReactUpdates');
11751
+
11752
+ var assign = require('./Object.assign');
11753
+ var getEventTarget = require('./getEventTarget');
11754
+ var getUnboundedScrollPosition = require('fbjs/lib/getUnboundedScrollPosition');
11755
+
11756
+ var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
11757
+
11758
+ /**
11759
+ * Finds the parent React component of `node`.
11760
+ *
11761
+ * @param {*} node
11762
+ * @return {?DOMEventTarget} Parent container, or `null` if the specified node
11763
+ * is not nested.
11764
+ */
11765
+ function findParent(node) {
11766
+ // TODO: It may be a good idea to cache this to prevent unnecessary DOM
11767
+ // traversal, but caching is difficult to do correctly without using a
11768
+ // mutation observer to listen for all DOM changes.
11769
+ var nodeID = ReactMount.getID(node);
11770
+ var rootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);
11771
+ var container = ReactMount.findReactContainerForID(rootID);
11772
+ var parent = ReactMount.getFirstReactDOM(container);
11773
+ return parent;
11774
+ }
11775
+
11776
+ // Used to store ancestor hierarchy in top level callback
11777
+ function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
11778
+ this.topLevelType = topLevelType;
11779
+ this.nativeEvent = nativeEvent;
11780
+ this.ancestors = [];
11781
+ }
11782
+ assign(TopLevelCallbackBookKeeping.prototype, {
11783
+ destructor: function () {
11784
+ this.topLevelType = null;
11785
+ this.nativeEvent = null;
11786
+ this.ancestors.length = 0;
11787
+ }
11788
+ });
11789
+ PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
11790
+
11791
+ function handleTopLevelImpl(bookKeeping) {
11792
+ // TODO: Re-enable event.path handling
11793
+ //
11794
+ // if (bookKeeping.nativeEvent.path && bookKeeping.nativeEvent.path.length > 1) {
11795
+ // // New browsers have a path attribute on native events
11796
+ // handleTopLevelWithPath(bookKeeping);
11797
+ // } else {
11798
+ // // Legacy browsers don't have a path attribute on native events
11799
+ // handleTopLevelWithoutPath(bookKeeping);
11800
+ // }
11801
+
11802
+ void handleTopLevelWithPath; // temporarily unused
11803
+ handleTopLevelWithoutPath(bookKeeping);
11804
+ }
11805
+
11806
+ // Legacy browsers don't have a path attribute on native events
11807
+ function handleTopLevelWithoutPath(bookKeeping) {
11808
+ var topLevelTarget = ReactMount.getFirstReactDOM(getEventTarget(bookKeeping.nativeEvent)) || window;
11809
+
11810
+ // Loop through the hierarchy, in case there's any nested components.
11811
+ // It's important that we build the array of ancestors before calling any
11812
+ // event handlers, because event handlers can modify the DOM, leading to
11813
+ // inconsistencies with ReactMount's node cache. See #1105.
11814
+ var ancestor = topLevelTarget;
11815
+ while (ancestor) {
11816
+ bookKeeping.ancestors.push(ancestor);
11817
+ ancestor = findParent(ancestor);
11818
+ }
11819
+
11820
+ for (var i = 0; i < bookKeeping.ancestors.length; i++) {
11821
+ topLevelTarget = bookKeeping.ancestors[i];
11822
+ var topLevelTargetID = ReactMount.getID(topLevelTarget) || '';
11823
+ ReactEventListener._handleTopLevel(bookKeeping.topLevelType, topLevelTarget, topLevelTargetID, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
11824
+ }
11825
+ }
11826
+
11827
+ // New browsers have a path attribute on native events
11828
+ function handleTopLevelWithPath(bookKeeping) {
11829
+ var path = bookKeeping.nativeEvent.path;
11830
+ var currentNativeTarget = path[0];
11831
+ var eventsFired = 0;
11832
+ for (var i = 0; i < path.length; i++) {
11833
+ var currentPathElement = path[i];
11834
+ if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {
11835
+ currentNativeTarget = path[i + 1];
11836
+ }
11837
+ // TODO: slow
11838
+ var reactParent = ReactMount.getFirstReactDOM(currentPathElement);
11839
+ if (reactParent === currentPathElement) {
11840
+ var currentPathElementID = ReactMount.getID(currentPathElement);
11841
+ var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);
11842
+ bookKeeping.ancestors.push(currentPathElement);
11843
+
11844
+ var topLevelTargetID = ReactMount.getID(currentPathElement) || '';
11845
+ eventsFired++;
11846
+ ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);
11847
+
11848
+ // Jump to the root of this React render tree
11849
+ while (currentPathElementID !== newRootID) {
11850
+ i++;
11851
+ currentPathElement = path[i];
11852
+ currentPathElementID = ReactMount.getID(currentPathElement);
11853
+ }
11854
+ }
11855
+ }
11856
+ if (eventsFired === 0) {
11857
+ ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
11858
+ }
11859
+ }
11860
+
11861
+ function scrollValueMonitor(cb) {
11862
+ var scrollPosition = getUnboundedScrollPosition(window);
11863
+ cb(scrollPosition);
11864
+ }
11865
+
11866
+ var ReactEventListener = {
11867
+ _enabled: true,
11868
+ _handleTopLevel: null,
11869
+
11870
+ WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
11871
+
11872
+ setHandleTopLevel: function (handleTopLevel) {
11873
+ ReactEventListener._handleTopLevel = handleTopLevel;
11874
+ },
11875
+
11876
+ setEnabled: function (enabled) {
11877
+ ReactEventListener._enabled = !!enabled;
11878
+ },
11879
+
11880
+ isEnabled: function () {
11881
+ return ReactEventListener._enabled;
11882
+ },
11883
+
11884
+ /**
11885
+ * Traps top-level events by using event bubbling.
11886
+ *
11887
+ * @param {string} topLevelType Record from `EventConstants`.
11888
+ * @param {string} handlerBaseName Event name (e.g. "click").
11889
+ * @param {object} handle Element on which to attach listener.
11890
+ * @return {?object} An object with a remove function which will forcefully
11891
+ * remove the listener.
11892
+ * @internal
11893
+ */
11894
+ trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
11895
+ var element = handle;
11896
+ if (!element) {
11897
+ return null;
11898
+ }
11899
+ return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
11900
+ },
11901
+
11902
+ /**
11903
+ * Traps a top-level event by using event capturing.
11904
+ *
11905
+ * @param {string} topLevelType Record from `EventConstants`.
11906
+ * @param {string} handlerBaseName Event name (e.g. "click").
11907
+ * @param {object} handle Element on which to attach listener.
11908
+ * @return {?object} An object with a remove function which will forcefully
11909
+ * remove the listener.
11910
+ * @internal
11911
+ */
11912
+ trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
11913
+ var element = handle;
11914
+ if (!element) {
11915
+ return null;
11916
+ }
11917
+ return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
11918
+ },
11919
+
11920
+ monitorScrollValue: function (refresh) {
11921
+ var callback = scrollValueMonitor.bind(null, refresh);
11922
+ EventListener.listen(window, 'scroll', callback);
11923
+ },
11924
+
11925
+ dispatchEvent: function (topLevelType, nativeEvent) {
11926
+ if (!ReactEventListener._enabled) {
11927
+ return;
11928
+ }
11929
+
11930
+ var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
11931
+ try {
11932
+ // Event queue being processed in the same cycle allows
11933
+ // `preventDefault`.
11934
+ ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
11935
+ } finally {
11936
+ TopLevelCallbackBookKeeping.release(bookKeeping);
11937
+ }
11938
+ }
11939
+ };
11940
+
11941
+ module.exports = ReactEventListener;
11942
+ },{"./Object.assign":52,"./PooledClass":53,"./ReactInstanceHandles":91,"./ReactMount":95,"./ReactUpdates":113,"./getEventTarget":144,"fbjs/lib/EventListener":2,"fbjs/lib/ExecutionEnvironment":3,"fbjs/lib/getUnboundedScrollPosition":14}],89:[function(require,module,exports){
11943
+ /**
11944
+ * Copyright 2013-2015, Facebook, Inc.
11945
+ * All rights reserved.
11946
+ *
11947
+ * This source code is licensed under the BSD-style license found in the
11948
+ * LICENSE file in the root directory of this source tree. An additional grant
11949
+ * of patent rights can be found in the PATENTS file in the same directory.
11950
+ *
11951
+ * @providesModule ReactInjection
11952
+ */
11953
+
11954
+ 'use strict';
11955
+
11956
+ var DOMProperty = require('./DOMProperty');
11957
+ var EventPluginHub = require('./EventPluginHub');
11958
+ var ReactComponentEnvironment = require('./ReactComponentEnvironment');
11959
+ var ReactClass = require('./ReactClass');
11960
+ var ReactEmptyComponent = require('./ReactEmptyComponent');
11961
+ var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
11962
+ var ReactNativeComponent = require('./ReactNativeComponent');
11963
+ var ReactPerf = require('./ReactPerf');
11964
+ var ReactRootIndex = require('./ReactRootIndex');
11965
+ var ReactUpdates = require('./ReactUpdates');
11966
+
11967
+ var ReactInjection = {
11968
+ Component: ReactComponentEnvironment.injection,
11969
+ Class: ReactClass.injection,
11970
+ DOMProperty: DOMProperty.injection,
11971
+ EmptyComponent: ReactEmptyComponent.injection,
11972
+ EventPluginHub: EventPluginHub.injection,
11973
+ EventEmitter: ReactBrowserEventEmitter.injection,
11974
+ NativeComponent: ReactNativeComponent.injection,
11975
+ Perf: ReactPerf.injection,
11976
+ RootIndex: ReactRootIndex.injection,
11977
+ Updates: ReactUpdates.injection
11978
+ };
11979
+
11980
+ module.exports = ReactInjection;
11981
+ },{"./DOMProperty":39,"./EventPluginHub":45,"./ReactBrowserEventEmitter":56,"./ReactClass":59,"./ReactComponentEnvironment":62,"./ReactEmptyComponent":84,"./ReactNativeComponent":98,"./ReactPerf":101,"./ReactRootIndex":108,"./ReactUpdates":113}],90:[function(require,module,exports){
11982
+ /**
11983
+ * Copyright 2013-2015, Facebook, Inc.
11984
+ * All rights reserved.
11985
+ *
11986
+ * This source code is licensed under the BSD-style license found in the
11987
+ * LICENSE file in the root directory of this source tree. An additional grant
11988
+ * of patent rights can be found in the PATENTS file in the same directory.
11989
+ *
11990
+ * @providesModule ReactInputSelection
11991
+ */
11992
+
11993
+ 'use strict';
11994
+
11995
+ var ReactDOMSelection = require('./ReactDOMSelection');
11996
+
11997
+ var containsNode = require('fbjs/lib/containsNode');
11998
+ var focusNode = require('fbjs/lib/focusNode');
11999
+ var getActiveElement = require('fbjs/lib/getActiveElement');
12000
+
12001
+ function isInDocument(node) {
12002
+ return containsNode(document.documentElement, node);
12003
+ }
12004
+
12005
+ /**
12006
+ * @ReactInputSelection: React input selection module. Based on Selection.js,
12007
+ * but modified to be suitable for react and has a couple of bug fixes (doesn't
12008
+ * assume buttons have range selections allowed).
12009
+ * Input selection module for React.
12010
+ */
12011
+ var ReactInputSelection = {
12012
+
12013
+ hasSelectionCapabilities: function (elem) {
12014
+ var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
12015
+ return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
12016
+ },
12017
+
12018
+ getSelectionInformation: function () {
12019
+ var focusedElem = getActiveElement();
12020
+ return {
12021
+ focusedElem: focusedElem,
12022
+ selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
12023
+ };
12024
+ },
12025
+
12026
+ /**
12027
+ * @restoreSelection: If any selection information was potentially lost,
12028
+ * restore it. This is useful when performing operations that could remove dom
12029
+ * nodes and place them back in, resulting in focus being lost.
12030
+ */
12031
+ restoreSelection: function (priorSelectionInformation) {
12032
+ var curFocusedElem = getActiveElement();
12033
+ var priorFocusedElem = priorSelectionInformation.focusedElem;
12034
+ var priorSelectionRange = priorSelectionInformation.selectionRange;
12035
+ if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
12036
+ if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
12037
+ ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
12038
+ }
12039
+ focusNode(priorFocusedElem);
12040
+ }
12041
+ },
12042
+
12043
+ /**
12044
+ * @getSelection: Gets the selection bounds of a focused textarea, input or
12045
+ * contentEditable node.
12046
+ * -@input: Look up selection bounds of this input
12047
+ * -@return {start: selectionStart, end: selectionEnd}
12048
+ */
12049
+ getSelection: function (input) {
12050
+ var selection;
12051
+
12052
+ if ('selectionStart' in input) {
12053
+ // Modern browser with input or textarea.
12054
+ selection = {
12055
+ start: input.selectionStart,
12056
+ end: input.selectionEnd
12057
+ };
12058
+ } else if (document.selection && (input.nodeName && input.nodeName.toLowerCase() === 'input')) {
12059
+ // IE8 input.
12060
+ var range = document.selection.createRange();
12061
+ // There can only be one selection per document in IE, so it must
12062
+ // be in our element.
12063
+ if (range.parentElement() === input) {
12064
+ selection = {
12065
+ start: -range.moveStart('character', -input.value.length),
12066
+ end: -range.moveEnd('character', -input.value.length)
12067
+ };
12068
+ }
12069
+ } else {
12070
+ // Content editable or old IE textarea.
12071
+ selection = ReactDOMSelection.getOffsets(input);
12072
+ }
12073
+
12074
+ return selection || { start: 0, end: 0 };
12075
+ },
12076
+
12077
+ /**
12078
+ * @setSelection: Sets the selection bounds of a textarea or input and focuses
12079
+ * the input.
12080
+ * -@input Set selection bounds of this input or textarea
12081
+ * -@offsets Object of same form that is returned from get*
12082
+ */
12083
+ setSelection: function (input, offsets) {
12084
+ var start = offsets.start;
12085
+ var end = offsets.end;
12086
+ if (typeof end === 'undefined') {
12087
+ end = start;
12088
+ }
12089
+
12090
+ if ('selectionStart' in input) {
12091
+ input.selectionStart = start;
12092
+ input.selectionEnd = Math.min(end, input.value.length);
12093
+ } else if (document.selection && (input.nodeName && input.nodeName.toLowerCase() === 'input')) {
12094
+ var range = input.createTextRange();
12095
+ range.collapse(true);
12096
+ range.moveStart('character', start);
12097
+ range.moveEnd('character', end - start);
12098
+ range.select();
12099
+ } else {
12100
+ ReactDOMSelection.setOffsets(input, offsets);
12101
+ }
12102
+ }
12103
+ };
12104
+
12105
+ module.exports = ReactInputSelection;
12106
+ },{"./ReactDOMSelection":74,"fbjs/lib/containsNode":6,"fbjs/lib/focusNode":11,"fbjs/lib/getActiveElement":12}],91:[function(require,module,exports){
12107
+ (function (process){
12108
+ /**
12109
+ * Copyright 2013-2015, Facebook, Inc.
12110
+ * All rights reserved.
12111
+ *
12112
+ * This source code is licensed under the BSD-style license found in the
12113
+ * LICENSE file in the root directory of this source tree. An additional grant
12114
+ * of patent rights can be found in the PATENTS file in the same directory.
12115
+ *
12116
+ * @providesModule ReactInstanceHandles
12117
+ * @typechecks static-only
12118
+ */
12119
+
12120
+ 'use strict';
12121
+
12122
+ var ReactRootIndex = require('./ReactRootIndex');
12123
+
12124
+ var invariant = require('fbjs/lib/invariant');
12125
+
12126
+ var SEPARATOR = '.';
12127
+ var SEPARATOR_LENGTH = SEPARATOR.length;
12128
+
12129
+ /**
12130
+ * Maximum depth of traversals before we consider the possibility of a bad ID.
12131
+ */
12132
+ var MAX_TREE_DEPTH = 10000;
12133
+
12134
+ /**
12135
+ * Creates a DOM ID prefix to use when mounting React components.
12136
+ *
12137
+ * @param {number} index A unique integer
12138
+ * @return {string} React root ID.
12139
+ * @internal
12140
+ */
12141
+ function getReactRootIDString(index) {
12142
+ return SEPARATOR + index.toString(36);
12143
+ }
12144
+
12145
+ /**
12146
+ * Checks if a character in the supplied ID is a separator or the end.
12147
+ *
12148
+ * @param {string} id A React DOM ID.
12149
+ * @param {number} index Index of the character to check.
12150
+ * @return {boolean} True if the character is a separator or end of the ID.
12151
+ * @private
12152
+ */
12153
+ function isBoundary(id, index) {
12154
+ return id.charAt(index) === SEPARATOR || index === id.length;
12155
+ }
12156
+
12157
+ /**
12158
+ * Checks if the supplied string is a valid React DOM ID.
12159
+ *
12160
+ * @param {string} id A React DOM ID, maybe.
12161
+ * @return {boolean} True if the string is a valid React DOM ID.
12162
+ * @private
12163
+ */
12164
+ function isValidID(id) {
12165
+ return id === '' || id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR;
12166
+ }
12167
+
12168
+ /**
12169
+ * Checks if the first ID is an ancestor of or equal to the second ID.
12170
+ *
12171
+ * @param {string} ancestorID
12172
+ * @param {string} descendantID
12173
+ * @return {boolean} True if `ancestorID` is an ancestor of `descendantID`.
12174
+ * @internal
12175
+ */
12176
+ function isAncestorIDOf(ancestorID, descendantID) {
12177
+ return descendantID.indexOf(ancestorID) === 0 && isBoundary(descendantID, ancestorID.length);
12178
+ }
12179
+
12180
+ /**
12181
+ * Gets the parent ID of the supplied React DOM ID, `id`.
12182
+ *
12183
+ * @param {string} id ID of a component.
12184
+ * @return {string} ID of the parent, or an empty string.
12185
+ * @private
12186
+ */
12187
+ function getParentID(id) {
12188
+ return id ? id.substr(0, id.lastIndexOf(SEPARATOR)) : '';
12189
+ }
12190
+
12191
+ /**
12192
+ * Gets the next DOM ID on the tree path from the supplied `ancestorID` to the
12193
+ * supplied `destinationID`. If they are equal, the ID is returned.
12194
+ *
12195
+ * @param {string} ancestorID ID of an ancestor node of `destinationID`.
12196
+ * @param {string} destinationID ID of the destination node.
12197
+ * @return {string} Next ID on the path from `ancestorID` to `destinationID`.
12198
+ * @private
12199
+ */
12200
+ function getNextDescendantID(ancestorID, destinationID) {
12201
+ !(isValidID(ancestorID) && isValidID(destinationID)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', ancestorID, destinationID) : invariant(false) : undefined;
12202
+ !isAncestorIDOf(ancestorID, destinationID) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNextDescendantID(...): React has made an invalid assumption about ' + 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', ancestorID, destinationID) : invariant(false) : undefined;
12203
+ if (ancestorID === destinationID) {
12204
+ return ancestorID;
12205
+ }
12206
+ // Skip over the ancestor and the immediate separator. Traverse until we hit
12207
+ // another separator or we reach the end of `destinationID`.
12208
+ var start = ancestorID.length + SEPARATOR_LENGTH;
12209
+ var i;
12210
+ for (i = start; i < destinationID.length; i++) {
12211
+ if (isBoundary(destinationID, i)) {
12212
+ break;
12213
+ }
12214
+ }
12215
+ return destinationID.substr(0, i);
12216
+ }
12217
+
12218
+ /**
12219
+ * Gets the nearest common ancestor ID of two IDs.
12220
+ *
12221
+ * Using this ID scheme, the nearest common ancestor ID is the longest common
12222
+ * prefix of the two IDs that immediately preceded a "marker" in both strings.
12223
+ *
12224
+ * @param {string} oneID
12225
+ * @param {string} twoID
12226
+ * @return {string} Nearest common ancestor ID, or the empty string if none.
12227
+ * @private
12228
+ */
12229
+ function getFirstCommonAncestorID(oneID, twoID) {
12230
+ var minLength = Math.min(oneID.length, twoID.length);
12231
+ if (minLength === 0) {
12232
+ return '';
12233
+ }
12234
+ var lastCommonMarkerIndex = 0;
12235
+ // Use `<=` to traverse until the "EOL" of the shorter string.
12236
+ for (var i = 0; i <= minLength; i++) {
12237
+ if (isBoundary(oneID, i) && isBoundary(twoID, i)) {
12238
+ lastCommonMarkerIndex = i;
12239
+ } else if (oneID.charAt(i) !== twoID.charAt(i)) {
12240
+ break;
12241
+ }
12242
+ }
12243
+ var longestCommonID = oneID.substr(0, lastCommonMarkerIndex);
12244
+ !isValidID(longestCommonID) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', oneID, twoID, longestCommonID) : invariant(false) : undefined;
12245
+ return longestCommonID;
12246
+ }
12247
+
12248
+ /**
12249
+ * Traverses the parent path between two IDs (either up or down). The IDs must
12250
+ * not be the same, and there must exist a parent path between them. If the
12251
+ * callback returns `false`, traversal is stopped.
12252
+ *
12253
+ * @param {?string} start ID at which to start traversal.
12254
+ * @param {?string} stop ID at which to end traversal.
12255
+ * @param {function} cb Callback to invoke each ID with.
12256
+ * @param {*} arg Argument to invoke the callback with.
12257
+ * @param {?boolean} skipFirst Whether or not to skip the first node.
12258
+ * @param {?boolean} skipLast Whether or not to skip the last node.
12259
+ * @private
12260
+ */
12261
+ function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {
12262
+ start = start || '';
12263
+ stop = stop || '';
12264
+ !(start !== stop) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', start) : invariant(false) : undefined;
12265
+ var traverseUp = isAncestorIDOf(stop, start);
12266
+ !(traverseUp || isAncestorIDOf(start, stop)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + 'not have a parent path.', start, stop) : invariant(false) : undefined;
12267
+ // Traverse from `start` to `stop` one depth at a time.
12268
+ var depth = 0;
12269
+ var traverse = traverseUp ? getParentID : getNextDescendantID;
12270
+ for (var id = start;; /* until break */id = traverse(id, stop)) {
12271
+ var ret;
12272
+ if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) {
12273
+ ret = cb(id, traverseUp, arg);
12274
+ }
12275
+ if (ret === false || id === stop) {
12276
+ // Only break //after// visiting `stop`.
12277
+ break;
12278
+ }
12279
+ !(depth++ < MAX_TREE_DEPTH) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', start, stop, id) : invariant(false) : undefined;
12280
+ }
12281
+ }
12282
+
12283
+ /**
12284
+ * Manages the IDs assigned to DOM representations of React components. This
12285
+ * uses a specific scheme in order to traverse the DOM efficiently (e.g. in
12286
+ * order to simulate events).
12287
+ *
12288
+ * @internal
12289
+ */
12290
+ var ReactInstanceHandles = {
12291
+
12292
+ /**
12293
+ * Constructs a React root ID
12294
+ * @return {string} A React root ID.
12295
+ */
12296
+ createReactRootID: function () {
12297
+ return getReactRootIDString(ReactRootIndex.createReactRootIndex());
12298
+ },
12299
+
12300
+ /**
12301
+ * Constructs a React ID by joining a root ID with a name.
12302
+ *
12303
+ * @param {string} rootID Root ID of a parent component.
12304
+ * @param {string} name A component's name (as flattened children).
12305
+ * @return {string} A React ID.
12306
+ * @internal
12307
+ */
12308
+ createReactID: function (rootID, name) {
12309
+ return rootID + name;
12310
+ },
12311
+
12312
+ /**
12313
+ * Gets the DOM ID of the React component that is the root of the tree that
12314
+ * contains the React component with the supplied DOM ID.
12315
+ *
12316
+ * @param {string} id DOM ID of a React component.
12317
+ * @return {?string} DOM ID of the React component that is the root.
12318
+ * @internal
12319
+ */
12320
+ getReactRootIDFromNodeID: function (id) {
12321
+ if (id && id.charAt(0) === SEPARATOR && id.length > 1) {
12322
+ var index = id.indexOf(SEPARATOR, 1);
12323
+ return index > -1 ? id.substr(0, index) : id;
12324
+ }
12325
+ return null;
12326
+ },
12327
+
12328
+ /**
12329
+ * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
12330
+ * should would receive a `mouseEnter` or `mouseLeave` event.
12331
+ *
12332
+ * NOTE: Does not invoke the callback on the nearest common ancestor because
12333
+ * nothing "entered" or "left" that element.
12334
+ *
12335
+ * @param {string} leaveID ID being left.
12336
+ * @param {string} enterID ID being entered.
12337
+ * @param {function} cb Callback to invoke on each entered/left ID.
12338
+ * @param {*} upArg Argument to invoke the callback with on left IDs.
12339
+ * @param {*} downArg Argument to invoke the callback with on entered IDs.
12340
+ * @internal
12341
+ */
12342
+ traverseEnterLeave: function (leaveID, enterID, cb, upArg, downArg) {
12343
+ var ancestorID = getFirstCommonAncestorID(leaveID, enterID);
12344
+ if (ancestorID !== leaveID) {
12345
+ traverseParentPath(leaveID, ancestorID, cb, upArg, false, true);
12346
+ }
12347
+ if (ancestorID !== enterID) {
12348
+ traverseParentPath(ancestorID, enterID, cb, downArg, true, false);
12349
+ }
12350
+ },
12351
+
12352
+ /**
12353
+ * Simulates the traversal of a two-phase, capture/bubble event dispatch.
12354
+ *
12355
+ * NOTE: This traversal happens on IDs without touching the DOM.
12356
+ *
12357
+ * @param {string} targetID ID of the target node.
12358
+ * @param {function} cb Callback to invoke.
12359
+ * @param {*} arg Argument to invoke the callback with.
12360
+ * @internal
12361
+ */
12362
+ traverseTwoPhase: function (targetID, cb, arg) {
12363
+ if (targetID) {
12364
+ traverseParentPath('', targetID, cb, arg, true, false);
12365
+ traverseParentPath(targetID, '', cb, arg, false, true);
12366
+ }
12367
+ },
12368
+
12369
+ /**
12370
+ * Same as `traverseTwoPhase` but skips the `targetID`.
12371
+ */
12372
+ traverseTwoPhaseSkipTarget: function (targetID, cb, arg) {
12373
+ if (targetID) {
12374
+ traverseParentPath('', targetID, cb, arg, true, true);
12375
+ traverseParentPath(targetID, '', cb, arg, true, true);
12376
+ }
12377
+ },
12378
+
12379
+ /**
12380
+ * Traverse a node ID, calling the supplied `cb` for each ancestor ID. For
12381
+ * example, passing `.0.$row-0.1` would result in `cb` getting called
12382
+ * with `.0`, `.0.$row-0`, and `.0.$row-0.1`.
12383
+ *
12384
+ * NOTE: This traversal happens on IDs without touching the DOM.
12385
+ *
12386
+ * @param {string} targetID ID of the target node.
12387
+ * @param {function} cb Callback to invoke.
12388
+ * @param {*} arg Argument to invoke the callback with.
12389
+ * @internal
12390
+ */
12391
+ traverseAncestors: function (targetID, cb, arg) {
12392
+ traverseParentPath('', targetID, cb, arg, true, false);
12393
+ },
12394
+
12395
+ getFirstCommonAncestorID: getFirstCommonAncestorID,
12396
+
12397
+ /**
12398
+ * Exposed for unit testing.
12399
+ * @private
12400
+ */
12401
+ _getNextDescendantID: getNextDescendantID,
12402
+
12403
+ isAncestorIDOf: isAncestorIDOf,
12404
+
12405
+ SEPARATOR: SEPARATOR
12406
+
12407
+ };
12408
+
12409
+ module.exports = ReactInstanceHandles;
12410
+ }).call(this,require('_process'))
12411
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RJbnN0YW5jZUhhbmRsZXMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0F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ReactRootIndex":108,"_process":29,"fbjs/lib/invariant":17}],92:[function(require,module,exports){
12413
+ /**
12414
+ * Copyright 2013-2015, Facebook, Inc.
12415
+ * All rights reserved.
12416
+ *
12417
+ * This source code is licensed under the BSD-style license found in the
12418
+ * LICENSE file in the root directory of this source tree. An additional grant
12419
+ * of patent rights can be found in the PATENTS file in the same directory.
12420
+ *
12421
+ * @providesModule ReactInstanceMap
12422
+ */
12423
+
12424
+ 'use strict';
12425
+
12426
+ /**
12427
+ * `ReactInstanceMap` maintains a mapping from a public facing stateful
12428
+ * instance (key) and the internal representation (value). This allows public
12429
+ * methods to accept the user facing instance as an argument and map them back
12430
+ * to internal methods.
12431
+ */
12432
+
12433
+ // TODO: Replace this with ES6: var ReactInstanceMap = new Map();
12434
+ var ReactInstanceMap = {
12435
+
12436
+ /**
12437
+ * This API should be called `delete` but we'd have to make sure to always
12438
+ * transform these to strings for IE support. When this transform is fully
12439
+ * supported we can rename it.
12440
+ */
12441
+ remove: function (key) {
12442
+ key._reactInternalInstance = undefined;
12443
+ },
12444
+
12445
+ get: function (key) {
12446
+ return key._reactInternalInstance;
12447
+ },
12448
+
12449
+ has: function (key) {
12450
+ return key._reactInternalInstance !== undefined;
12451
+ },
12452
+
12453
+ set: function (key, value) {
12454
+ key._reactInternalInstance = value;
12455
+ }
12456
+
12457
+ };
12458
+
12459
+ module.exports = ReactInstanceMap;
12460
+ },{}],93:[function(require,module,exports){
12461
+ (function (process){
12462
+ /**
12463
+ * Copyright 2013-2015, Facebook, Inc.
12464
+ * All rights reserved.
12465
+ *
12466
+ * This source code is licensed under the BSD-style license found in the
12467
+ * LICENSE file in the root directory of this source tree. An additional grant
12468
+ * of patent rights can be found in the PATENTS file in the same directory.
12469
+ *
12470
+ * @providesModule ReactIsomorphic
12471
+ */
12472
+
12473
+ 'use strict';
12474
+
12475
+ var ReactChildren = require('./ReactChildren');
12476
+ var ReactComponent = require('./ReactComponent');
12477
+ var ReactClass = require('./ReactClass');
12478
+ var ReactDOMFactories = require('./ReactDOMFactories');
12479
+ var ReactElement = require('./ReactElement');
12480
+ var ReactElementValidator = require('./ReactElementValidator');
12481
+ var ReactPropTypes = require('./ReactPropTypes');
12482
+ var ReactVersion = require('./ReactVersion');
12483
+
12484
+ var assign = require('./Object.assign');
12485
+ var onlyChild = require('./onlyChild');
12486
+
12487
+ var createElement = ReactElement.createElement;
12488
+ var createFactory = ReactElement.createFactory;
12489
+ var cloneElement = ReactElement.cloneElement;
12490
+
12491
+ if (process.env.NODE_ENV !== 'production') {
12492
+ createElement = ReactElementValidator.createElement;
12493
+ createFactory = ReactElementValidator.createFactory;
12494
+ cloneElement = ReactElementValidator.cloneElement;
12495
+ }
12496
+
12497
+ var React = {
12498
+
12499
+ // Modern
12500
+
12501
+ Children: {
12502
+ map: ReactChildren.map,
12503
+ forEach: ReactChildren.forEach,
12504
+ count: ReactChildren.count,
12505
+ toArray: ReactChildren.toArray,
12506
+ only: onlyChild
12507
+ },
12508
+
12509
+ Component: ReactComponent,
12510
+
12511
+ createElement: createElement,
12512
+ cloneElement: cloneElement,
12513
+ isValidElement: ReactElement.isValidElement,
12514
+
12515
+ // Classic
12516
+
12517
+ PropTypes: ReactPropTypes,
12518
+ createClass: ReactClass.createClass,
12519
+ createFactory: createFactory,
12520
+ createMixin: function (mixin) {
12521
+ // Currently a noop. Will be used to validate and trace mixins.
12522
+ return mixin;
12523
+ },
12524
+
12525
+ // This looks DOM specific but these are actually isomorphic helpers
12526
+ // since they are just generating DOM strings.
12527
+ DOM: ReactDOMFactories,
12528
+
12529
+ version: ReactVersion,
12530
+
12531
+ // Hook for JSX spread, don't use this for anything else.
12532
+ __spread: assign
12533
+ };
12534
+
12535
+ module.exports = React;
12536
+ }).call(this,require('_process'))
12537
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RJc29tb3JwaGljLmpzIl0sIm5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luY2UgdGhleSBhcmUganVzdCBnZW5lcmF0aW5nIERPTSBzdHJpbmdzLlxuICBET006IFJlYWN0RE9NRmFjdG9yaWVzLFxuXG4gIHZlcnNpb246IFJlYWN0VmVyc2lvbixcblxuICAvLyBIb29rIGZvciBKU1ggc3ByZWFkLCBkb24ndCB1c2UgdGhpcyBmb3IgYW55dGhpbmcgZWxzZS5cbiAgX19zcHJlYWQ6IGFzc2lnblxufTtcblxubW9kdWxlLmV4cG9ydHMgPSBSZWFjdDsiXX0=
12538
+ },{"./Object.assign":52,"./ReactChildren":58,"./ReactClass":59,"./ReactComponent":60,"./ReactDOMFactories":68,"./ReactElement":82,"./ReactElementValidator":83,"./ReactPropTypes":104,"./ReactVersion":114,"./onlyChild":151,"_process":29}],94:[function(require,module,exports){
12539
+ /**
12540
+ * Copyright 2013-2015, Facebook, Inc.
12541
+ * All rights reserved.
12542
+ *
12543
+ * This source code is licensed under the BSD-style license found in the
12544
+ * LICENSE file in the root directory of this source tree. An additional grant
12545
+ * of patent rights can be found in the PATENTS file in the same directory.
12546
+ *
12547
+ * @providesModule ReactMarkupChecksum
12548
+ */
12549
+
12550
+ 'use strict';
12551
+
12552
+ var adler32 = require('./adler32');
12553
+
12554
+ var TAG_END = /\/?>/;
12555
+
12556
+ var ReactMarkupChecksum = {
12557
+ CHECKSUM_ATTR_NAME: 'data-react-checksum',
12558
+
12559
+ /**
12560
+ * @param {string} markup Markup string
12561
+ * @return {string} Markup string with checksum attribute attached
12562
+ */
12563
+ addChecksumToMarkup: function (markup) {
12564
+ var checksum = adler32(markup);
12565
+
12566
+ // Add checksum (handle both parent tags and self-closing tags)
12567
+ return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
12568
+ },
12569
+
12570
+ /**
12571
+ * @param {string} markup to use
12572
+ * @param {DOMElement} element root React element
12573
+ * @returns {boolean} whether or not the markup is the same
12574
+ */
12575
+ canReuseMarkup: function (markup, element) {
12576
+ var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
12577
+ existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
12578
+ var markupChecksum = adler32(markup);
12579
+ return markupChecksum === existingChecksum;
12580
+ }
12581
+ };
12582
+
12583
+ module.exports = ReactMarkupChecksum;
12584
+ },{"./adler32":133}],95:[function(require,module,exports){
12585
+ (function (process){
12586
+ /**
12587
+ * Copyright 2013-2015, Facebook, Inc.
12588
+ * All rights reserved.
12589
+ *
12590
+ * This source code is licensed under the BSD-style license found in the
12591
+ * LICENSE file in the root directory of this source tree. An additional grant
12592
+ * of patent rights can be found in the PATENTS file in the same directory.
12593
+ *
12594
+ * @providesModule ReactMount
12595
+ */
12596
+
12597
+ 'use strict';
12598
+
12599
+ var DOMProperty = require('./DOMProperty');
12600
+ var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
12601
+ var ReactCurrentOwner = require('./ReactCurrentOwner');
12602
+ var ReactDOMFeatureFlags = require('./ReactDOMFeatureFlags');
12603
+ var ReactElement = require('./ReactElement');
12604
+ var ReactEmptyComponentRegistry = require('./ReactEmptyComponentRegistry');
12605
+ var ReactInstanceHandles = require('./ReactInstanceHandles');
12606
+ var ReactInstanceMap = require('./ReactInstanceMap');
12607
+ var ReactMarkupChecksum = require('./ReactMarkupChecksum');
12608
+ var ReactPerf = require('./ReactPerf');
12609
+ var ReactReconciler = require('./ReactReconciler');
12610
+ var ReactUpdateQueue = require('./ReactUpdateQueue');
12611
+ var ReactUpdates = require('./ReactUpdates');
12612
+
12613
+ var assign = require('./Object.assign');
12614
+ var emptyObject = require('fbjs/lib/emptyObject');
12615
+ var containsNode = require('fbjs/lib/containsNode');
12616
+ var instantiateReactComponent = require('./instantiateReactComponent');
12617
+ var invariant = require('fbjs/lib/invariant');
12618
+ var setInnerHTML = require('./setInnerHTML');
12619
+ var shouldUpdateReactComponent = require('./shouldUpdateReactComponent');
12620
+ var validateDOMNesting = require('./validateDOMNesting');
12621
+ var warning = require('fbjs/lib/warning');
12622
+
12623
+ var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
12624
+ var nodeCache = {};
12625
+
12626
+ var ELEMENT_NODE_TYPE = 1;
12627
+ var DOC_NODE_TYPE = 9;
12628
+ var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
12629
+
12630
+ var ownerDocumentContextKey = '__ReactMount_ownerDocument$' + Math.random().toString(36).slice(2);
12631
+
12632
+ /** Mapping from reactRootID to React component instance. */
12633
+ var instancesByReactRootID = {};
12634
+
12635
+ /** Mapping from reactRootID to `container` nodes. */
12636
+ var containersByReactRootID = {};
12637
+
12638
+ if (process.env.NODE_ENV !== 'production') {
12639
+ /** __DEV__-only mapping from reactRootID to root elements. */
12640
+ var rootElementsByReactRootID = {};
12641
+ }
12642
+
12643
+ // Used to store breadth-first search state in findComponentRoot.
12644
+ var findComponentRootReusableArray = [];
12645
+
12646
+ /**
12647
+ * Finds the index of the first character
12648
+ * that's not common between the two given strings.
12649
+ *
12650
+ * @return {number} the index of the character where the strings diverge
12651
+ */
12652
+ function firstDifferenceIndex(string1, string2) {
12653
+ var minLen = Math.min(string1.length, string2.length);
12654
+ for (var i = 0; i < minLen; i++) {
12655
+ if (string1.charAt(i) !== string2.charAt(i)) {
12656
+ return i;
12657
+ }
12658
+ }
12659
+ return string1.length === string2.length ? -1 : minLen;
12660
+ }
12661
+
12662
+ /**
12663
+ * @param {DOMElement|DOMDocument} container DOM element that may contain
12664
+ * a React component
12665
+ * @return {?*} DOM element that may have the reactRoot ID, or null.
12666
+ */
12667
+ function getReactRootElementInContainer(container) {
12668
+ if (!container) {
12669
+ return null;
12670
+ }
12671
+
12672
+ if (container.nodeType === DOC_NODE_TYPE) {
12673
+ return container.documentElement;
12674
+ } else {
12675
+ return container.firstChild;
12676
+ }
12677
+ }
12678
+
12679
+ /**
12680
+ * @param {DOMElement} container DOM element that may contain a React component.
12681
+ * @return {?string} A "reactRoot" ID, if a React component is rendered.
12682
+ */
12683
+ function getReactRootID(container) {
12684
+ var rootElement = getReactRootElementInContainer(container);
12685
+ return rootElement && ReactMount.getID(rootElement);
12686
+ }
12687
+
12688
+ /**
12689
+ * Accessing node[ATTR_NAME] or calling getAttribute(ATTR_NAME) on a form
12690
+ * element can return its control whose name or ID equals ATTR_NAME. All
12691
+ * DOM nodes support `getAttributeNode` but this can also get called on
12692
+ * other objects so just return '' if we're given something other than a
12693
+ * DOM node (such as window).
12694
+ *
12695
+ * @param {?DOMElement|DOMWindow|DOMDocument|DOMTextNode} node DOM node.
12696
+ * @return {string} ID of the supplied `domNode`.
12697
+ */
12698
+ function getID(node) {
12699
+ var id = internalGetID(node);
12700
+ if (id) {
12701
+ if (nodeCache.hasOwnProperty(id)) {
12702
+ var cached = nodeCache[id];
12703
+ if (cached !== node) {
12704
+ !!isValid(cached, id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactMount: Two valid but unequal nodes with the same `%s`: %s', ATTR_NAME, id) : invariant(false) : undefined;
12705
+
12706
+ nodeCache[id] = node;
12707
+ }
12708
+ } else {
12709
+ nodeCache[id] = node;
12710
+ }
12711
+ }
12712
+
12713
+ return id;
12714
+ }
12715
+
12716
+ function internalGetID(node) {
12717
+ // If node is something like a window, document, or text node, none of
12718
+ // which support attributes or a .getAttribute method, gracefully return
12719
+ // the empty string, as if the attribute were missing.
12720
+ return node && node.getAttribute && node.getAttribute(ATTR_NAME) || '';
12721
+ }
12722
+
12723
+ /**
12724
+ * Sets the React-specific ID of the given node.
12725
+ *
12726
+ * @param {DOMElement} node The DOM node whose ID will be set.
12727
+ * @param {string} id The value of the ID attribute.
12728
+ */
12729
+ function setID(node, id) {
12730
+ var oldID = internalGetID(node);
12731
+ if (oldID !== id) {
12732
+ delete nodeCache[oldID];
12733
+ }
12734
+ node.setAttribute(ATTR_NAME, id);
12735
+ nodeCache[id] = node;
12736
+ }
12737
+
12738
+ /**
12739
+ * Finds the node with the supplied React-generated DOM ID.
12740
+ *
12741
+ * @param {string} id A React-generated DOM ID.
12742
+ * @return {DOMElement} DOM node with the suppled `id`.
12743
+ * @internal
12744
+ */
12745
+ function getNode(id) {
12746
+ if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) {
12747
+ nodeCache[id] = ReactMount.findReactNodeByID(id);
12748
+ }
12749
+ return nodeCache[id];
12750
+ }
12751
+
12752
+ /**
12753
+ * Finds the node with the supplied public React instance.
12754
+ *
12755
+ * @param {*} instance A public React instance.
12756
+ * @return {?DOMElement} DOM node with the suppled `id`.
12757
+ * @internal
12758
+ */
12759
+ function getNodeFromInstance(instance) {
12760
+ var id = ReactInstanceMap.get(instance)._rootNodeID;
12761
+ if (ReactEmptyComponentRegistry.isNullComponentID(id)) {
12762
+ return null;
12763
+ }
12764
+ if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) {
12765
+ nodeCache[id] = ReactMount.findReactNodeByID(id);
12766
+ }
12767
+ return nodeCache[id];
12768
+ }
12769
+
12770
+ /**
12771
+ * A node is "valid" if it is contained by a currently mounted container.
12772
+ *
12773
+ * This means that the node does not have to be contained by a document in
12774
+ * order to be considered valid.
12775
+ *
12776
+ * @param {?DOMElement} node The candidate DOM node.
12777
+ * @param {string} id The expected ID of the node.
12778
+ * @return {boolean} Whether the node is contained by a mounted container.
12779
+ */
12780
+ function isValid(node, id) {
12781
+ if (node) {
12782
+ !(internalGetID(node) === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactMount: Unexpected modification of `%s`', ATTR_NAME) : invariant(false) : undefined;
12783
+
12784
+ var container = ReactMount.findReactContainerForID(id);
12785
+ if (container && containsNode(container, node)) {
12786
+ return true;
12787
+ }
12788
+ }
12789
+
12790
+ return false;
12791
+ }
12792
+
12793
+ /**
12794
+ * Causes the cache to forget about one React-specific ID.
12795
+ *
12796
+ * @param {string} id The ID to forget.
12797
+ */
12798
+ function purgeID(id) {
12799
+ delete nodeCache[id];
12800
+ }
12801
+
12802
+ var deepestNodeSoFar = null;
12803
+ function findDeepestCachedAncestorImpl(ancestorID) {
12804
+ var ancestor = nodeCache[ancestorID];
12805
+ if (ancestor && isValid(ancestor, ancestorID)) {
12806
+ deepestNodeSoFar = ancestor;
12807
+ } else {
12808
+ // This node isn't populated in the cache, so presumably none of its
12809
+ // descendants are. Break out of the loop.
12810
+ return false;
12811
+ }
12812
+ }
12813
+
12814
+ /**
12815
+ * Return the deepest cached node whose ID is a prefix of `targetID`.
12816
+ */
12817
+ function findDeepestCachedAncestor(targetID) {
12818
+ deepestNodeSoFar = null;
12819
+ ReactInstanceHandles.traverseAncestors(targetID, findDeepestCachedAncestorImpl);
12820
+
12821
+ var foundNode = deepestNodeSoFar;
12822
+ deepestNodeSoFar = null;
12823
+ return foundNode;
12824
+ }
12825
+
12826
+ /**
12827
+ * Mounts this component and inserts it into the DOM.
12828
+ *
12829
+ * @param {ReactComponent} componentInstance The instance to mount.
12830
+ * @param {string} rootID DOM ID of the root node.
12831
+ * @param {DOMElement} container DOM element to mount into.
12832
+ * @param {ReactReconcileTransaction} transaction
12833
+ * @param {boolean} shouldReuseMarkup If true, do not insert markup
12834
+ */
12835
+ function mountComponentIntoNode(componentInstance, rootID, container, transaction, shouldReuseMarkup, context) {
12836
+ if (ReactDOMFeatureFlags.useCreateElement) {
12837
+ context = assign({}, context);
12838
+ if (container.nodeType === DOC_NODE_TYPE) {
12839
+ context[ownerDocumentContextKey] = container;
12840
+ } else {
12841
+ context[ownerDocumentContextKey] = container.ownerDocument;
12842
+ }
12843
+ }
12844
+ if (process.env.NODE_ENV !== 'production') {
12845
+ if (context === emptyObject) {
12846
+ context = {};
12847
+ }
12848
+ var tag = container.nodeName.toLowerCase();
12849
+ context[validateDOMNesting.ancestorInfoContextKey] = validateDOMNesting.updatedAncestorInfo(null, tag, null);
12850
+ }
12851
+ var markup = ReactReconciler.mountComponent(componentInstance, rootID, transaction, context);
12852
+ componentInstance._renderedComponent._topLevelWrapper = componentInstance;
12853
+ ReactMount._mountImageIntoNode(markup, container, shouldReuseMarkup, transaction);
12854
+ }
12855
+
12856
+ /**
12857
+ * Batched mount.
12858
+ *
12859
+ * @param {ReactComponent} componentInstance The instance to mount.
12860
+ * @param {string} rootID DOM ID of the root node.
12861
+ * @param {DOMElement} container DOM element to mount into.
12862
+ * @param {boolean} shouldReuseMarkup If true, do not insert markup
12863
+ */
12864
+ function batchedMountComponentIntoNode(componentInstance, rootID, container, shouldReuseMarkup, context) {
12865
+ var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(
12866
+ /* forceHTML */shouldReuseMarkup);
12867
+ transaction.perform(mountComponentIntoNode, null, componentInstance, rootID, container, transaction, shouldReuseMarkup, context);
12868
+ ReactUpdates.ReactReconcileTransaction.release(transaction);
12869
+ }
12870
+
12871
+ /**
12872
+ * Unmounts a component and removes it from the DOM.
12873
+ *
12874
+ * @param {ReactComponent} instance React component instance.
12875
+ * @param {DOMElement} container DOM element to unmount from.
12876
+ * @final
12877
+ * @internal
12878
+ * @see {ReactMount.unmountComponentAtNode}
12879
+ */
12880
+ function unmountComponentFromNode(instance, container) {
12881
+ ReactReconciler.unmountComponent(instance);
12882
+
12883
+ if (container.nodeType === DOC_NODE_TYPE) {
12884
+ container = container.documentElement;
12885
+ }
12886
+
12887
+ // http://jsperf.com/emptying-a-node
12888
+ while (container.lastChild) {
12889
+ container.removeChild(container.lastChild);
12890
+ }
12891
+ }
12892
+
12893
+ /**
12894
+ * True if the supplied DOM node has a direct React-rendered child that is
12895
+ * not a React root element. Useful for warning in `render`,
12896
+ * `unmountComponentAtNode`, etc.
12897
+ *
12898
+ * @param {?DOMElement} node The candidate DOM node.
12899
+ * @return {boolean} True if the DOM element contains a direct child that was
12900
+ * rendered by React but is not a root element.
12901
+ * @internal
12902
+ */
12903
+ function hasNonRootReactChild(node) {
12904
+ var reactRootID = getReactRootID(node);
12905
+ return reactRootID ? reactRootID !== ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID) : false;
12906
+ }
12907
+
12908
+ /**
12909
+ * Returns the first (deepest) ancestor of a node which is rendered by this copy
12910
+ * of React.
12911
+ */
12912
+ function findFirstReactDOMImpl(node) {
12913
+ // This node might be from another React instance, so we make sure not to
12914
+ // examine the node cache here
12915
+ for (; node && node.parentNode !== node; node = node.parentNode) {
12916
+ if (node.nodeType !== 1) {
12917
+ // Not a DOMElement, therefore not a React component
12918
+ continue;
12919
+ }
12920
+ var nodeID = internalGetID(node);
12921
+ if (!nodeID) {
12922
+ continue;
12923
+ }
12924
+ var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);
12925
+
12926
+ // If containersByReactRootID contains the container we find by crawling up
12927
+ // the tree, we know that this instance of React rendered the node.
12928
+ // nb. isValid's strategy (with containsNode) does not work because render
12929
+ // trees may be nested and we don't want a false positive in that case.
12930
+ var current = node;
12931
+ var lastID;
12932
+ do {
12933
+ lastID = internalGetID(current);
12934
+ current = current.parentNode;
12935
+ if (current == null) {
12936
+ // The passed-in node has been detached from the container it was
12937
+ // originally rendered into.
12938
+ return null;
12939
+ }
12940
+ } while (lastID !== reactRootID);
12941
+
12942
+ if (current === containersByReactRootID[reactRootID]) {
12943
+ return node;
12944
+ }
12945
+ }
12946
+ return null;
12947
+ }
12948
+
12949
+ /**
12950
+ * Temporary (?) hack so that we can store all top-level pending updates on
12951
+ * composites instead of having to worry about different types of components
12952
+ * here.
12953
+ */
12954
+ var TopLevelWrapper = function () {};
12955
+ TopLevelWrapper.prototype.isReactComponent = {};
12956
+ if (process.env.NODE_ENV !== 'production') {
12957
+ TopLevelWrapper.displayName = 'TopLevelWrapper';
12958
+ }
12959
+ TopLevelWrapper.prototype.render = function () {
12960
+ // this.props is actually a ReactElement
12961
+ return this.props;
12962
+ };
12963
+
12964
+ /**
12965
+ * Mounting is the process of initializing a React component by creating its
12966
+ * representative DOM elements and inserting them into a supplied `container`.
12967
+ * Any prior content inside `container` is destroyed in the process.
12968
+ *
12969
+ * ReactMount.render(
12970
+ * component,
12971
+ * document.getElementById('container')
12972
+ * );
12973
+ *
12974
+ * <div id="container"> <-- Supplied `container`.
12975
+ * <div data-reactid=".3"> <-- Rendered reactRoot of React
12976
+ * // ... component.
12977
+ * </div>
12978
+ * </div>
12979
+ *
12980
+ * Inside of `container`, the first element rendered is the "reactRoot".
12981
+ */
12982
+ var ReactMount = {
12983
+
12984
+ TopLevelWrapper: TopLevelWrapper,
12985
+
12986
+ /** Exposed for debugging purposes **/
12987
+ _instancesByReactRootID: instancesByReactRootID,
12988
+
12989
+ /**
12990
+ * This is a hook provided to support rendering React components while
12991
+ * ensuring that the apparent scroll position of its `container` does not
12992
+ * change.
12993
+ *
12994
+ * @param {DOMElement} container The `container` being rendered into.
12995
+ * @param {function} renderCallback This must be called once to do the render.
12996
+ */
12997
+ scrollMonitor: function (container, renderCallback) {
12998
+ renderCallback();
12999
+ },
13000
+
13001
+ /**
13002
+ * Take a component that's already mounted into the DOM and replace its props
13003
+ * @param {ReactComponent} prevComponent component instance already in the DOM
13004
+ * @param {ReactElement} nextElement component instance to render
13005
+ * @param {DOMElement} container container to render into
13006
+ * @param {?function} callback function triggered on completion
13007
+ */
13008
+ _updateRootComponent: function (prevComponent, nextElement, container, callback) {
13009
+ ReactMount.scrollMonitor(container, function () {
13010
+ ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement);
13011
+ if (callback) {
13012
+ ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);
13013
+ }
13014
+ });
13015
+
13016
+ if (process.env.NODE_ENV !== 'production') {
13017
+ // Record the root element in case it later gets transplanted.
13018
+ rootElementsByReactRootID[getReactRootID(container)] = getReactRootElementInContainer(container);
13019
+ }
13020
+
13021
+ return prevComponent;
13022
+ },
13023
+
13024
+ /**
13025
+ * Register a component into the instance map and starts scroll value
13026
+ * monitoring
13027
+ * @param {ReactComponent} nextComponent component instance to render
13028
+ * @param {DOMElement} container container to render into
13029
+ * @return {string} reactRoot ID prefix
13030
+ */
13031
+ _registerComponent: function (nextComponent, container) {
13032
+ !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : invariant(false) : undefined;
13033
+
13034
+ ReactBrowserEventEmitter.ensureScrollValueMonitoring();
13035
+
13036
+ var reactRootID = ReactMount.registerContainer(container);
13037
+ instancesByReactRootID[reactRootID] = nextComponent;
13038
+ return reactRootID;
13039
+ },
13040
+
13041
+ /**
13042
+ * Render a new component into the DOM.
13043
+ * @param {ReactElement} nextElement element to render
13044
+ * @param {DOMElement} container container to render into
13045
+ * @param {boolean} shouldReuseMarkup if we should skip the markup insertion
13046
+ * @return {ReactComponent} nextComponent
13047
+ */
13048
+ _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) {
13049
+ // Various parts of our code (such as ReactCompositeComponent's
13050
+ // _renderValidatedComponent) assume that calls to render aren't nested;
13051
+ // verify that that's the case.
13052
+ process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : undefined;
13053
+
13054
+ var componentInstance = instantiateReactComponent(nextElement, null);
13055
+ var reactRootID = ReactMount._registerComponent(componentInstance, container);
13056
+
13057
+ // The initial render is synchronous but any updates that happen during
13058
+ // rendering, in componentWillMount or componentDidMount, will be batched
13059
+ // according to the current batching strategy.
13060
+
13061
+ ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, reactRootID, container, shouldReuseMarkup, context);
13062
+
13063
+ if (process.env.NODE_ENV !== 'production') {
13064
+ // Record the root element in case it later gets transplanted.
13065
+ rootElementsByReactRootID[reactRootID] = getReactRootElementInContainer(container);
13066
+ }
13067
+
13068
+ return componentInstance;
13069
+ },
13070
+
13071
+ /**
13072
+ * Renders a React component into the DOM in the supplied `container`.
13073
+ *
13074
+ * If the React component was previously rendered into `container`, this will
13075
+ * perform an update on it and only mutate the DOM as necessary to reflect the
13076
+ * latest React component.
13077
+ *
13078
+ * @param {ReactComponent} parentComponent The conceptual parent of this render tree.
13079
+ * @param {ReactElement} nextElement Component element to render.
13080
+ * @param {DOMElement} container DOM element to render into.
13081
+ * @param {?function} callback function triggered on completion
13082
+ * @return {ReactComponent} Component instance rendered in `container`.
13083
+ */
13084
+ renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
13085
+ !(parentComponent != null && parentComponent._reactInternalInstance != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : invariant(false) : undefined;
13086
+ return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);
13087
+ },
13088
+
13089
+ _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
13090
+ !ReactElement.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing an element string, make sure to instantiate ' + 'it by passing it to React.createElement.' : typeof nextElement === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' :
13091
+ // Check if it quacks like an element
13092
+ nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : invariant(false) : undefined;
13093
+
13094
+ process.env.NODE_ENV !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : undefined;
13095
+
13096
+ var nextWrappedElement = new ReactElement(TopLevelWrapper, null, null, null, null, null, nextElement);
13097
+
13098
+ var prevComponent = instancesByReactRootID[getReactRootID(container)];
13099
+
13100
+ if (prevComponent) {
13101
+ var prevWrappedElement = prevComponent._currentElement;
13102
+ var prevElement = prevWrappedElement.props;
13103
+ if (shouldUpdateReactComponent(prevElement, nextElement)) {
13104
+ var publicInst = prevComponent._renderedComponent.getPublicInstance();
13105
+ var updatedCallback = callback && function () {
13106
+ callback.call(publicInst);
13107
+ };
13108
+ ReactMount._updateRootComponent(prevComponent, nextWrappedElement, container, updatedCallback);
13109
+ return publicInst;
13110
+ } else {
13111
+ ReactMount.unmountComponentAtNode(container);
13112
+ }
13113
+ }
13114
+
13115
+ var reactRootElement = getReactRootElementInContainer(container);
13116
+ var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);
13117
+ var containerHasNonRootReactChild = hasNonRootReactChild(container);
13118
+
13119
+ if (process.env.NODE_ENV !== 'production') {
13120
+ process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : undefined;
13121
+
13122
+ if (!containerHasReactMarkup || reactRootElement.nextSibling) {
13123
+ var rootElementSibling = reactRootElement;
13124
+ while (rootElementSibling) {
13125
+ if (internalGetID(rootElementSibling)) {
13126
+ process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : undefined;
13127
+ break;
13128
+ }
13129
+ rootElementSibling = rootElementSibling.nextSibling;
13130
+ }
13131
+ }
13132
+ }
13133
+
13134
+ var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;
13135
+ var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, parentComponent != null ? parentComponent._reactInternalInstance._processChildContext(parentComponent._reactInternalInstance._context) : emptyObject)._renderedComponent.getPublicInstance();
13136
+ if (callback) {
13137
+ callback.call(component);
13138
+ }
13139
+ return component;
13140
+ },
13141
+
13142
+ /**
13143
+ * Renders a React component into the DOM in the supplied `container`.
13144
+ *
13145
+ * If the React component was previously rendered into `container`, this will
13146
+ * perform an update on it and only mutate the DOM as necessary to reflect the
13147
+ * latest React component.
13148
+ *
13149
+ * @param {ReactElement} nextElement Component element to render.
13150
+ * @param {DOMElement} container DOM element to render into.
13151
+ * @param {?function} callback function triggered on completion
13152
+ * @return {ReactComponent} Component instance rendered in `container`.
13153
+ */
13154
+ render: function (nextElement, container, callback) {
13155
+ return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);
13156
+ },
13157
+
13158
+ /**
13159
+ * Registers a container node into which React components will be rendered.
13160
+ * This also creates the "reactRoot" ID that will be assigned to the element
13161
+ * rendered within.
13162
+ *
13163
+ * @param {DOMElement} container DOM element to register as a container.
13164
+ * @return {string} The "reactRoot" ID of elements rendered within.
13165
+ */
13166
+ registerContainer: function (container) {
13167
+ var reactRootID = getReactRootID(container);
13168
+ if (reactRootID) {
13169
+ // If one exists, make sure it is a valid "reactRoot" ID.
13170
+ reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID);
13171
+ }
13172
+ if (!reactRootID) {
13173
+ // No valid "reactRoot" ID found, create one.
13174
+ reactRootID = ReactInstanceHandles.createReactRootID();
13175
+ }
13176
+ containersByReactRootID[reactRootID] = container;
13177
+ return reactRootID;
13178
+ },
13179
+
13180
+ /**
13181
+ * Unmounts and destroys the React component rendered in the `container`.
13182
+ *
13183
+ * @param {DOMElement} container DOM element containing a React component.
13184
+ * @return {boolean} True if a component was found in and unmounted from
13185
+ * `container`
13186
+ */
13187
+ unmountComponentAtNode: function (container) {
13188
+ // Various parts of our code (such as ReactCompositeComponent's
13189
+ // _renderValidatedComponent) assume that calls to render aren't nested;
13190
+ // verify that that's the case. (Strictly speaking, unmounting won't cause a
13191
+ // render but we still don't expect to be in a render call here.)
13192
+ process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : undefined;
13193
+
13194
+ !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : invariant(false) : undefined;
13195
+
13196
+ var reactRootID = getReactRootID(container);
13197
+ var component = instancesByReactRootID[reactRootID];
13198
+ if (!component) {
13199
+ // Check if the node being unmounted was rendered by React, but isn't a
13200
+ // root node.
13201
+ var containerHasNonRootReactChild = hasNonRootReactChild(container);
13202
+
13203
+ // Check if the container itself is a React root node.
13204
+ var containerID = internalGetID(container);
13205
+ var isContainerReactRoot = containerID && containerID === ReactInstanceHandles.getReactRootIDFromNodeID(containerID);
13206
+
13207
+ if (process.env.NODE_ENV !== 'production') {
13208
+ process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : undefined;
13209
+ }
13210
+
13211
+ return false;
13212
+ }
13213
+ ReactUpdates.batchedUpdates(unmountComponentFromNode, component, container);
13214
+ delete instancesByReactRootID[reactRootID];
13215
+ delete containersByReactRootID[reactRootID];
13216
+ if (process.env.NODE_ENV !== 'production') {
13217
+ delete rootElementsByReactRootID[reactRootID];
13218
+ }
13219
+ return true;
13220
+ },
13221
+
13222
+ /**
13223
+ * Finds the container DOM element that contains React component to which the
13224
+ * supplied DOM `id` belongs.
13225
+ *
13226
+ * @param {string} id The ID of an element rendered by a React component.
13227
+ * @return {?DOMElement} DOM element that contains the `id`.
13228
+ */
13229
+ findReactContainerForID: function (id) {
13230
+ var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id);
13231
+ var container = containersByReactRootID[reactRootID];
13232
+
13233
+ if (process.env.NODE_ENV !== 'production') {
13234
+ var rootElement = rootElementsByReactRootID[reactRootID];
13235
+ if (rootElement && rootElement.parentNode !== container) {
13236
+ process.env.NODE_ENV !== 'production' ? warning(
13237
+ // Call internalGetID here because getID calls isValid which calls
13238
+ // findReactContainerForID (this function).
13239
+ internalGetID(rootElement) === reactRootID, 'ReactMount: Root element ID differed from reactRootID.') : undefined;
13240
+ var containerChild = container.firstChild;
13241
+ if (containerChild && reactRootID === internalGetID(containerChild)) {
13242
+ // If the container has a new child with the same ID as the old
13243
+ // root element, then rootElementsByReactRootID[reactRootID] is
13244
+ // just stale and needs to be updated. The case that deserves a
13245
+ // warning is when the container is empty.
13246
+ rootElementsByReactRootID[reactRootID] = containerChild;
13247
+ } else {
13248
+ process.env.NODE_ENV !== 'production' ? warning(false, 'ReactMount: Root element has been removed from its original ' + 'container. New container: %s', rootElement.parentNode) : undefined;
13249
+ }
13250
+ }
13251
+ }
13252
+
13253
+ return container;
13254
+ },
13255
+
13256
+ /**
13257
+ * Finds an element rendered by React with the supplied ID.
13258
+ *
13259
+ * @param {string} id ID of a DOM node in the React component.
13260
+ * @return {DOMElement} Root DOM node of the React component.
13261
+ */
13262
+ findReactNodeByID: function (id) {
13263
+ var reactRoot = ReactMount.findReactContainerForID(id);
13264
+ return ReactMount.findComponentRoot(reactRoot, id);
13265
+ },
13266
+
13267
+ /**
13268
+ * Traverses up the ancestors of the supplied node to find a node that is a
13269
+ * DOM representation of a React component rendered by this copy of React.
13270
+ *
13271
+ * @param {*} node
13272
+ * @return {?DOMEventTarget}
13273
+ * @internal
13274
+ */
13275
+ getFirstReactDOM: function (node) {
13276
+ return findFirstReactDOMImpl(node);
13277
+ },
13278
+
13279
+ /**
13280
+ * Finds a node with the supplied `targetID` inside of the supplied
13281
+ * `ancestorNode`. Exploits the ID naming scheme to perform the search
13282
+ * quickly.
13283
+ *
13284
+ * @param {DOMEventTarget} ancestorNode Search from this root.
13285
+ * @pararm {string} targetID ID of the DOM representation of the component.
13286
+ * @return {DOMEventTarget} DOM node with the supplied `targetID`.
13287
+ * @internal
13288
+ */
13289
+ findComponentRoot: function (ancestorNode, targetID) {
13290
+ var firstChildren = findComponentRootReusableArray;
13291
+ var childIndex = 0;
13292
+
13293
+ var deepestAncestor = findDeepestCachedAncestor(targetID) || ancestorNode;
13294
+
13295
+ if (process.env.NODE_ENV !== 'production') {
13296
+ // This will throw on the next line; give an early warning
13297
+ process.env.NODE_ENV !== 'production' ? warning(deepestAncestor != null, 'React can\'t find the root component node for data-reactid value ' + '`%s`. If you\'re seeing this message, it probably means that ' + 'you\'ve loaded two copies of React on the page. At this time, only ' + 'a single copy of React can be loaded at a time.', targetID) : undefined;
13298
+ }
13299
+
13300
+ firstChildren[0] = deepestAncestor.firstChild;
13301
+ firstChildren.length = 1;
13302
+
13303
+ while (childIndex < firstChildren.length) {
13304
+ var child = firstChildren[childIndex++];
13305
+ var targetChild;
13306
+
13307
+ while (child) {
13308
+ var childID = ReactMount.getID(child);
13309
+ if (childID) {
13310
+ // Even if we find the node we're looking for, we finish looping
13311
+ // through its siblings to ensure they're cached so that we don't have
13312
+ // to revisit this node again. Otherwise, we make n^2 calls to getID
13313
+ // when visiting the many children of a single node in order.
13314
+
13315
+ if (targetID === childID) {
13316
+ targetChild = child;
13317
+ } else if (ReactInstanceHandles.isAncestorIDOf(childID, targetID)) {
13318
+ // If we find a child whose ID is an ancestor of the given ID,
13319
+ // then we can be sure that we only want to search the subtree
13320
+ // rooted at this child, so we can throw out the rest of the
13321
+ // search state.
13322
+ firstChildren.length = childIndex = 0;
13323
+ firstChildren.push(child.firstChild);
13324
+ }
13325
+ } else {
13326
+ // If this child had no ID, then there's a chance that it was
13327
+ // injected automatically by the browser, as when a `<table>`
13328
+ // element sprouts an extra `<tbody>` child as a side effect of
13329
+ // `.innerHTML` parsing. Optimistically continue down this
13330
+ // branch, but not before examining the other siblings.
13331
+ firstChildren.push(child.firstChild);
13332
+ }
13333
+
13334
+ child = child.nextSibling;
13335
+ }
13336
+
13337
+ if (targetChild) {
13338
+ // Emptying firstChildren/findComponentRootReusableArray is
13339
+ // not necessary for correctness, but it helps the GC reclaim
13340
+ // any nodes that were left at the end of the search.
13341
+ firstChildren.length = 0;
13342
+
13343
+ return targetChild;
13344
+ }
13345
+ }
13346
+
13347
+ firstChildren.length = 0;
13348
+
13349
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findComponentRoot(..., %s): Unable to find element. This probably ' + 'means the DOM was unexpectedly mutated (e.g., by the browser), ' + 'usually due to forgetting a <tbody> when using tables, nesting tags ' + 'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' + 'parent. ' + 'Try inspecting the child nodes of the element with React ID `%s`.', targetID, ReactMount.getID(ancestorNode)) : invariant(false) : undefined;
13350
+ },
13351
+
13352
+ _mountImageIntoNode: function (markup, container, shouldReuseMarkup, transaction) {
13353
+ !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : invariant(false) : undefined;
13354
+
13355
+ if (shouldReuseMarkup) {
13356
+ var rootElement = getReactRootElementInContainer(container);
13357
+ if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {
13358
+ return;
13359
+ } else {
13360
+ var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
13361
+ rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
13362
+
13363
+ var rootMarkup = rootElement.outerHTML;
13364
+ rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);
13365
+
13366
+ var normalizedMarkup = markup;
13367
+ if (process.env.NODE_ENV !== 'production') {
13368
+ // because rootMarkup is retrieved from the DOM, various normalizations
13369
+ // will have occurred which will not be present in `markup`. Here,
13370
+ // insert markup into a <div> or <iframe> depending on the container
13371
+ // type to perform the same normalizations before comparing.
13372
+ var normalizer;
13373
+ if (container.nodeType === ELEMENT_NODE_TYPE) {
13374
+ normalizer = document.createElement('div');
13375
+ normalizer.innerHTML = markup;
13376
+ normalizedMarkup = normalizer.innerHTML;
13377
+ } else {
13378
+ normalizer = document.createElement('iframe');
13379
+ document.body.appendChild(normalizer);
13380
+ normalizer.contentDocument.write(markup);
13381
+ normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
13382
+ document.body.removeChild(normalizer);
13383
+ }
13384
+ }
13385
+
13386
+ var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);
13387
+ var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
13388
+
13389
+ !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document using ' + 'server rendering but the checksum was invalid. This usually ' + 'means you rendered a different component type or props on ' + 'the client from the one on the server, or your render() ' + 'methods are impure. React cannot handle this case due to ' + 'cross-browser quirks by rendering at the document root. You ' + 'should look for environment dependent code in your components ' + 'and ensure the props are the same client and server side:\n%s', difference) : invariant(false) : undefined;
13390
+
13391
+ if (process.env.NODE_ENV !== 'production') {
13392
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : undefined;
13393
+ }
13394
+ }
13395
+ }
13396
+
13397
+ !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document but ' + 'you didn\'t use server rendering. We can\'t do this ' + 'without using server rendering due to cross-browser quirks. ' + 'See ReactDOMServer.renderToString() for server rendering.') : invariant(false) : undefined;
13398
+
13399
+ if (transaction.useCreateElement) {
13400
+ while (container.lastChild) {
13401
+ container.removeChild(container.lastChild);
13402
+ }
13403
+ container.appendChild(markup);
13404
+ } else {
13405
+ setInnerHTML(container, markup);
13406
+ }
13407
+ },
13408
+
13409
+ ownerDocumentContextKey: ownerDocumentContextKey,
13410
+
13411
+ /**
13412
+ * React ID utilities.
13413
+ */
13414
+
13415
+ getReactRootID: getReactRootID,
13416
+
13417
+ getID: getID,
13418
+
13419
+ setID: setID,
13420
+
13421
+ getNode: getNode,
13422
+
13423
+ getNodeFromInstance: getNodeFromInstance,
13424
+
13425
+ isValid: isValid,
13426
+
13427
+ purgeID: purgeID
13428
+ };
13429
+
13430
+ ReactPerf.measureMethods(ReactMount, 'ReactMount', {
13431
+ _renderNewRootComponent: '_renderNewRootComponent',
13432
+ _mountImageIntoNode: '_mountImageIntoNode'
13433
+ });
13434
+
13435
+ module.exports = ReactMount;
13436
+ }).call(this,require('_process'))
13437
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RNb3VudC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0F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Gcm9tSW5zdGFuY2U6IGdldE5vZGVGcm9tSW5zdGFuY2UsXG5cbiAgaXNWYWxpZDogaXNWYWxpZCxcblxuICBwdXJnZUlEOiBwdXJnZUlEXG59O1xuXG5SZWFjdFBlcmYubWVhc3VyZU1ldGhvZHMoUmVhY3RNb3VudCwgJ1JlYWN0TW91bnQnLCB7XG4gIF9yZW5kZXJOZXdSb290Q29tcG9uZW50OiAnX3JlbmRlck5ld1Jvb3RDb21wb25lbnQnLFxuICBfbW91bnRJbWFnZUludG9Ob2RlOiAnX21vdW50SW1hZ2VJbnRvTm9kZSdcbn0pO1xuXG5tb2R1bGUuZXhwb3J0cyA9IFJlYWN0TW91bnQ7Il19
13438
+ },{"./DOMProperty":39,"./Object.assign":52,"./ReactBrowserEventEmitter":56,"./ReactCurrentOwner":64,"./ReactDOMFeatureFlags":69,"./ReactElement":82,"./ReactEmptyComponentRegistry":85,"./ReactInstanceHandles":91,"./ReactInstanceMap":92,"./ReactMarkupChecksum":94,"./ReactPerf":101,"./ReactReconciler":106,"./ReactUpdateQueue":112,"./ReactUpdates":113,"./instantiateReactComponent":148,"./setInnerHTML":154,"./shouldUpdateReactComponent":156,"./validateDOMNesting":158,"_process":29,"fbjs/lib/containsNode":6,"fbjs/lib/emptyObject":10,"fbjs/lib/invariant":17,"fbjs/lib/warning":28}],96:[function(require,module,exports){
13439
+ (function (process){
13440
+ /**
13441
+ * Copyright 2013-2015, Facebook, Inc.
13442
+ * All rights reserved.
13443
+ *
13444
+ * This source code is licensed under the BSD-style license found in the
13445
+ * LICENSE file in the root directory of this source tree. An additional grant
13446
+ * of patent rights can be found in the PATENTS file in the same directory.
13447
+ *
13448
+ * @providesModule ReactMultiChild
13449
+ * @typechecks static-only
13450
+ */
13451
+
13452
+ 'use strict';
13453
+
13454
+ var ReactComponentEnvironment = require('./ReactComponentEnvironment');
13455
+ var ReactMultiChildUpdateTypes = require('./ReactMultiChildUpdateTypes');
13456
+
13457
+ var ReactCurrentOwner = require('./ReactCurrentOwner');
13458
+ var ReactReconciler = require('./ReactReconciler');
13459
+ var ReactChildReconciler = require('./ReactChildReconciler');
13460
+
13461
+ var flattenChildren = require('./flattenChildren');
13462
+
13463
+ /**
13464
+ * Updating children of a component may trigger recursive updates. The depth is
13465
+ * used to batch recursive updates to render markup more efficiently.
13466
+ *
13467
+ * @type {number}
13468
+ * @private
13469
+ */
13470
+ var updateDepth = 0;
13471
+
13472
+ /**
13473
+ * Queue of update configuration objects.
13474
+ *
13475
+ * Each object has a `type` property that is in `ReactMultiChildUpdateTypes`.
13476
+ *
13477
+ * @type {array<object>}
13478
+ * @private
13479
+ */
13480
+ var updateQueue = [];
13481
+
13482
+ /**
13483
+ * Queue of markup to be rendered.
13484
+ *
13485
+ * @type {array<string>}
13486
+ * @private
13487
+ */
13488
+ var markupQueue = [];
13489
+
13490
+ /**
13491
+ * Enqueues markup to be rendered and inserted at a supplied index.
13492
+ *
13493
+ * @param {string} parentID ID of the parent component.
13494
+ * @param {string} markup Markup that renders into an element.
13495
+ * @param {number} toIndex Destination index.
13496
+ * @private
13497
+ */
13498
+ function enqueueInsertMarkup(parentID, markup, toIndex) {
13499
+ // NOTE: Null values reduce hidden classes.
13500
+ updateQueue.push({
13501
+ parentID: parentID,
13502
+ parentNode: null,
13503
+ type: ReactMultiChildUpdateTypes.INSERT_MARKUP,
13504
+ markupIndex: markupQueue.push(markup) - 1,
13505
+ content: null,
13506
+ fromIndex: null,
13507
+ toIndex: toIndex
13508
+ });
13509
+ }
13510
+
13511
+ /**
13512
+ * Enqueues moving an existing element to another index.
13513
+ *
13514
+ * @param {string} parentID ID of the parent component.
13515
+ * @param {number} fromIndex Source index of the existing element.
13516
+ * @param {number} toIndex Destination index of the element.
13517
+ * @private
13518
+ */
13519
+ function enqueueMove(parentID, fromIndex, toIndex) {
13520
+ // NOTE: Null values reduce hidden classes.
13521
+ updateQueue.push({
13522
+ parentID: parentID,
13523
+ parentNode: null,
13524
+ type: ReactMultiChildUpdateTypes.MOVE_EXISTING,
13525
+ markupIndex: null,
13526
+ content: null,
13527
+ fromIndex: fromIndex,
13528
+ toIndex: toIndex
13529
+ });
13530
+ }
13531
+
13532
+ /**
13533
+ * Enqueues removing an element at an index.
13534
+ *
13535
+ * @param {string} parentID ID of the parent component.
13536
+ * @param {number} fromIndex Index of the element to remove.
13537
+ * @private
13538
+ */
13539
+ function enqueueRemove(parentID, fromIndex) {
13540
+ // NOTE: Null values reduce hidden classes.
13541
+ updateQueue.push({
13542
+ parentID: parentID,
13543
+ parentNode: null,
13544
+ type: ReactMultiChildUpdateTypes.REMOVE_NODE,
13545
+ markupIndex: null,
13546
+ content: null,
13547
+ fromIndex: fromIndex,
13548
+ toIndex: null
13549
+ });
13550
+ }
13551
+
13552
+ /**
13553
+ * Enqueues setting the markup of a node.
13554
+ *
13555
+ * @param {string} parentID ID of the parent component.
13556
+ * @param {string} markup Markup that renders into an element.
13557
+ * @private
13558
+ */
13559
+ function enqueueSetMarkup(parentID, markup) {
13560
+ // NOTE: Null values reduce hidden classes.
13561
+ updateQueue.push({
13562
+ parentID: parentID,
13563
+ parentNode: null,
13564
+ type: ReactMultiChildUpdateTypes.SET_MARKUP,
13565
+ markupIndex: null,
13566
+ content: markup,
13567
+ fromIndex: null,
13568
+ toIndex: null
13569
+ });
13570
+ }
13571
+
13572
+ /**
13573
+ * Enqueues setting the text content.
13574
+ *
13575
+ * @param {string} parentID ID of the parent component.
13576
+ * @param {string} textContent Text content to set.
13577
+ * @private
13578
+ */
13579
+ function enqueueTextContent(parentID, textContent) {
13580
+ // NOTE: Null values reduce hidden classes.
13581
+ updateQueue.push({
13582
+ parentID: parentID,
13583
+ parentNode: null,
13584
+ type: ReactMultiChildUpdateTypes.TEXT_CONTENT,
13585
+ markupIndex: null,
13586
+ content: textContent,
13587
+ fromIndex: null,
13588
+ toIndex: null
13589
+ });
13590
+ }
13591
+
13592
+ /**
13593
+ * Processes any enqueued updates.
13594
+ *
13595
+ * @private
13596
+ */
13597
+ function processQueue() {
13598
+ if (updateQueue.length) {
13599
+ ReactComponentEnvironment.processChildrenUpdates(updateQueue, markupQueue);
13600
+ clearQueue();
13601
+ }
13602
+ }
13603
+
13604
+ /**
13605
+ * Clears any enqueued updates.
13606
+ *
13607
+ * @private
13608
+ */
13609
+ function clearQueue() {
13610
+ updateQueue.length = 0;
13611
+ markupQueue.length = 0;
13612
+ }
13613
+
13614
+ /**
13615
+ * ReactMultiChild are capable of reconciling multiple children.
13616
+ *
13617
+ * @class ReactMultiChild
13618
+ * @internal
13619
+ */
13620
+ var ReactMultiChild = {
13621
+
13622
+ /**
13623
+ * Provides common functionality for components that must reconcile multiple
13624
+ * children. This is used by `ReactDOMComponent` to mount, update, and
13625
+ * unmount child components.
13626
+ *
13627
+ * @lends {ReactMultiChild.prototype}
13628
+ */
13629
+ Mixin: {
13630
+
13631
+ _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
13632
+ if (process.env.NODE_ENV !== 'production') {
13633
+ if (this._currentElement) {
13634
+ try {
13635
+ ReactCurrentOwner.current = this._currentElement._owner;
13636
+ return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
13637
+ } finally {
13638
+ ReactCurrentOwner.current = null;
13639
+ }
13640
+ }
13641
+ }
13642
+ return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
13643
+ },
13644
+
13645
+ _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, transaction, context) {
13646
+ var nextChildren;
13647
+ if (process.env.NODE_ENV !== 'production') {
13648
+ if (this._currentElement) {
13649
+ try {
13650
+ ReactCurrentOwner.current = this._currentElement._owner;
13651
+ nextChildren = flattenChildren(nextNestedChildrenElements);
13652
+ } finally {
13653
+ ReactCurrentOwner.current = null;
13654
+ }
13655
+ return ReactChildReconciler.updateChildren(prevChildren, nextChildren, transaction, context);
13656
+ }
13657
+ }
13658
+ nextChildren = flattenChildren(nextNestedChildrenElements);
13659
+ return ReactChildReconciler.updateChildren(prevChildren, nextChildren, transaction, context);
13660
+ },
13661
+
13662
+ /**
13663
+ * Generates a "mount image" for each of the supplied children. In the case
13664
+ * of `ReactDOMComponent`, a mount image is a string of markup.
13665
+ *
13666
+ * @param {?object} nestedChildren Nested child maps.
13667
+ * @return {array} An array of mounted representations.
13668
+ * @internal
13669
+ */
13670
+ mountChildren: function (nestedChildren, transaction, context) {
13671
+ var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
13672
+ this._renderedChildren = children;
13673
+ var mountImages = [];
13674
+ var index = 0;
13675
+ for (var name in children) {
13676
+ if (children.hasOwnProperty(name)) {
13677
+ var child = children[name];
13678
+ // Inlined for performance, see `ReactInstanceHandles.createReactID`.
13679
+ var rootID = this._rootNodeID + name;
13680
+ var mountImage = ReactReconciler.mountComponent(child, rootID, transaction, context);
13681
+ child._mountIndex = index++;
13682
+ mountImages.push(mountImage);
13683
+ }
13684
+ }
13685
+ return mountImages;
13686
+ },
13687
+
13688
+ /**
13689
+ * Replaces any rendered children with a text content string.
13690
+ *
13691
+ * @param {string} nextContent String of content.
13692
+ * @internal
13693
+ */
13694
+ updateTextContent: function (nextContent) {
13695
+ updateDepth++;
13696
+ var errorThrown = true;
13697
+ try {
13698
+ var prevChildren = this._renderedChildren;
13699
+ // Remove any rendered children.
13700
+ ReactChildReconciler.unmountChildren(prevChildren);
13701
+ // TODO: The setTextContent operation should be enough
13702
+ for (var name in prevChildren) {
13703
+ if (prevChildren.hasOwnProperty(name)) {
13704
+ this._unmountChild(prevChildren[name]);
13705
+ }
13706
+ }
13707
+ // Set new text content.
13708
+ this.setTextContent(nextContent);
13709
+ errorThrown = false;
13710
+ } finally {
13711
+ updateDepth--;
13712
+ if (!updateDepth) {
13713
+ if (errorThrown) {
13714
+ clearQueue();
13715
+ } else {
13716
+ processQueue();
13717
+ }
13718
+ }
13719
+ }
13720
+ },
13721
+
13722
+ /**
13723
+ * Replaces any rendered children with a markup string.
13724
+ *
13725
+ * @param {string} nextMarkup String of markup.
13726
+ * @internal
13727
+ */
13728
+ updateMarkup: function (nextMarkup) {
13729
+ updateDepth++;
13730
+ var errorThrown = true;
13731
+ try {
13732
+ var prevChildren = this._renderedChildren;
13733
+ // Remove any rendered children.
13734
+ ReactChildReconciler.unmountChildren(prevChildren);
13735
+ for (var name in prevChildren) {
13736
+ if (prevChildren.hasOwnProperty(name)) {
13737
+ this._unmountChildByName(prevChildren[name], name);
13738
+ }
13739
+ }
13740
+ this.setMarkup(nextMarkup);
13741
+ errorThrown = false;
13742
+ } finally {
13743
+ updateDepth--;
13744
+ if (!updateDepth) {
13745
+ if (errorThrown) {
13746
+ clearQueue();
13747
+ } else {
13748
+ processQueue();
13749
+ }
13750
+ }
13751
+ }
13752
+ },
13753
+
13754
+ /**
13755
+ * Updates the rendered children with new children.
13756
+ *
13757
+ * @param {?object} nextNestedChildrenElements Nested child element maps.
13758
+ * @param {ReactReconcileTransaction} transaction
13759
+ * @internal
13760
+ */
13761
+ updateChildren: function (nextNestedChildrenElements, transaction, context) {
13762
+ updateDepth++;
13763
+ var errorThrown = true;
13764
+ try {
13765
+ this._updateChildren(nextNestedChildrenElements, transaction, context);
13766
+ errorThrown = false;
13767
+ } finally {
13768
+ updateDepth--;
13769
+ if (!updateDepth) {
13770
+ if (errorThrown) {
13771
+ clearQueue();
13772
+ } else {
13773
+ processQueue();
13774
+ }
13775
+ }
13776
+ }
13777
+ },
13778
+
13779
+ /**
13780
+ * Improve performance by isolating this hot code path from the try/catch
13781
+ * block in `updateChildren`.
13782
+ *
13783
+ * @param {?object} nextNestedChildrenElements Nested child element maps.
13784
+ * @param {ReactReconcileTransaction} transaction
13785
+ * @final
13786
+ * @protected
13787
+ */
13788
+ _updateChildren: function (nextNestedChildrenElements, transaction, context) {
13789
+ var prevChildren = this._renderedChildren;
13790
+ var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, transaction, context);
13791
+ this._renderedChildren = nextChildren;
13792
+ if (!nextChildren && !prevChildren) {
13793
+ return;
13794
+ }
13795
+ var name;
13796
+ // `nextIndex` will increment for each child in `nextChildren`, but
13797
+ // `lastIndex` will be the last index visited in `prevChildren`.
13798
+ var lastIndex = 0;
13799
+ var nextIndex = 0;
13800
+ for (name in nextChildren) {
13801
+ if (!nextChildren.hasOwnProperty(name)) {
13802
+ continue;
13803
+ }
13804
+ var prevChild = prevChildren && prevChildren[name];
13805
+ var nextChild = nextChildren[name];
13806
+ if (prevChild === nextChild) {
13807
+ this.moveChild(prevChild, nextIndex, lastIndex);
13808
+ lastIndex = Math.max(prevChild._mountIndex, lastIndex);
13809
+ prevChild._mountIndex = nextIndex;
13810
+ } else {
13811
+ if (prevChild) {
13812
+ // Update `lastIndex` before `_mountIndex` gets unset by unmounting.
13813
+ lastIndex = Math.max(prevChild._mountIndex, lastIndex);
13814
+ this._unmountChild(prevChild);
13815
+ }
13816
+ // The child must be instantiated before it's mounted.
13817
+ this._mountChildByNameAtIndex(nextChild, name, nextIndex, transaction, context);
13818
+ }
13819
+ nextIndex++;
13820
+ }
13821
+ // Remove children that are no longer present.
13822
+ for (name in prevChildren) {
13823
+ if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
13824
+ this._unmountChild(prevChildren[name]);
13825
+ }
13826
+ }
13827
+ },
13828
+
13829
+ /**
13830
+ * Unmounts all rendered children. This should be used to clean up children
13831
+ * when this component is unmounted.
13832
+ *
13833
+ * @internal
13834
+ */
13835
+ unmountChildren: function () {
13836
+ var renderedChildren = this._renderedChildren;
13837
+ ReactChildReconciler.unmountChildren(renderedChildren);
13838
+ this._renderedChildren = null;
13839
+ },
13840
+
13841
+ /**
13842
+ * Moves a child component to the supplied index.
13843
+ *
13844
+ * @param {ReactComponent} child Component to move.
13845
+ * @param {number} toIndex Destination index of the element.
13846
+ * @param {number} lastIndex Last index visited of the siblings of `child`.
13847
+ * @protected
13848
+ */
13849
+ moveChild: function (child, toIndex, lastIndex) {
13850
+ // If the index of `child` is less than `lastIndex`, then it needs to
13851
+ // be moved. Otherwise, we do not need to move it because a child will be
13852
+ // inserted or moved before `child`.
13853
+ if (child._mountIndex < lastIndex) {
13854
+ enqueueMove(this._rootNodeID, child._mountIndex, toIndex);
13855
+ }
13856
+ },
13857
+
13858
+ /**
13859
+ * Creates a child component.
13860
+ *
13861
+ * @param {ReactComponent} child Component to create.
13862
+ * @param {string} mountImage Markup to insert.
13863
+ * @protected
13864
+ */
13865
+ createChild: function (child, mountImage) {
13866
+ enqueueInsertMarkup(this._rootNodeID, mountImage, child._mountIndex);
13867
+ },
13868
+
13869
+ /**
13870
+ * Removes a child component.
13871
+ *
13872
+ * @param {ReactComponent} child Child to remove.
13873
+ * @protected
13874
+ */
13875
+ removeChild: function (child) {
13876
+ enqueueRemove(this._rootNodeID, child._mountIndex);
13877
+ },
13878
+
13879
+ /**
13880
+ * Sets this text content string.
13881
+ *
13882
+ * @param {string} textContent Text content to set.
13883
+ * @protected
13884
+ */
13885
+ setTextContent: function (textContent) {
13886
+ enqueueTextContent(this._rootNodeID, textContent);
13887
+ },
13888
+
13889
+ /**
13890
+ * Sets this markup string.
13891
+ *
13892
+ * @param {string} markup Markup to set.
13893
+ * @protected
13894
+ */
13895
+ setMarkup: function (markup) {
13896
+ enqueueSetMarkup(this._rootNodeID, markup);
13897
+ },
13898
+
13899
+ /**
13900
+ * Mounts a child with the supplied name.
13901
+ *
13902
+ * NOTE: This is part of `updateChildren` and is here for readability.
13903
+ *
13904
+ * @param {ReactComponent} child Component to mount.
13905
+ * @param {string} name Name of the child.
13906
+ * @param {number} index Index at which to insert the child.
13907
+ * @param {ReactReconcileTransaction} transaction
13908
+ * @private
13909
+ */
13910
+ _mountChildByNameAtIndex: function (child, name, index, transaction, context) {
13911
+ // Inlined for performance, see `ReactInstanceHandles.createReactID`.
13912
+ var rootID = this._rootNodeID + name;
13913
+ var mountImage = ReactReconciler.mountComponent(child, rootID, transaction, context);
13914
+ child._mountIndex = index;
13915
+ this.createChild(child, mountImage);
13916
+ },
13917
+
13918
+ /**
13919
+ * Unmounts a rendered child.
13920
+ *
13921
+ * NOTE: This is part of `updateChildren` and is here for readability.
13922
+ *
13923
+ * @param {ReactComponent} child Component to unmount.
13924
+ * @private
13925
+ */
13926
+ _unmountChild: function (child) {
13927
+ this.removeChild(child);
13928
+ child._mountIndex = null;
13929
+ }
13930
+
13931
+ }
13932
+
13933
+ };
13934
+
13935
+ module.exports = ReactMultiChild;
13936
+ }).call(this,require('_process'))
13937
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RNdWx0aUNoaWxkLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QU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gICAgIHZhciBwcmV2Q2hpbGRyZW4gPSB0aGlzLl9yZW5kZXJlZENoaWxkcmVuO1xuICAgICAgICAvLyBSZW1vdmUgYW55IHJlbmRlcmVkIGNoaWxkcmVuLlxuICAgICAgICBSZWFjdENoaWxkUmVjb25jaWxlci51bm1vdW50Q2hpbGRyZW4ocHJldkNoaWxkcmVuKTtcbiAgICAgICAgLy8gVE9ETzogVGhlIHNldFRleHRDb250ZW50IG9wZXJhdGlvbiBzaG91bGQgYmUgZW5vdWdoXG4gICAgICAgIGZvciAodmFyIG5hbWUgaW4gcHJldkNoaWxkcmVuKSB7XG4gICAgICAgICAgaWYgKHByZXZDaGlsZHJlbi5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xuICAgICAgICAgICAgdGhpcy5fdW5tb3VudENoaWxkKHByZXZDaGlsZHJlbltuYW1lXSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIFNldCBuZXcgdGV4dCBjb250ZW50LlxuICAgICAgICB0aGlzLnNldFRleHRDb250ZW50KG5leHRDb250ZW50KTtcbiAgICAgICAgZXJyb3JUaHJvd24gPSBmYWxzZTtcbiAgICAgIH0gZmluYWxseSB7XG4gICAgICAgIHVwZGF0ZURlcHRoLS07XG4gICAgICAgIGlmICghdXBkYXRlRGVwdGgpIHtcbiAgICAgICAgICBpZiAoZXJyb3JUaHJvd24pIHtcbiAgICAgICAgICAgIGNsZWFyUXVldWUoKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcHJvY2Vzc1F1ZXVlKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJlcGxhY2VzIGFueSByZW5kZXJlZCBjaGlsZHJlbiB3aXRoIGEgbWFya3VwIHN0cmluZy5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBuZXh0TWFya3VwIFN0cmluZyBvZiBtYXJrdXAuXG4gICAgICogQGludGVybmFsXG4gICAgICovXG4gICAgdXBkYXRlTWFya3VwOiBmdW5jdGlvbiAobmV4dE1hcmt1cCkge1xuICAgICAgdXBkYXRlRGVwdGgrKztcbiAgICAgIHZhciBlcnJvclRocm93biA9IHRydWU7XG4gICAgICB0cnkge1xuICAgICAgICB2YXIgcHJldkNoaWxkcmVuID0gdGhpcy5fcmVuZGVyZWRDaGlsZHJlbjtcbiAgICAgICAgLy8gUmVtb3ZlIGFueSByZW5kZXJlZCBjaGlsZHJlbi5cbiAgICAgICAgUmVhY3RDaGlsZFJlY29uY2lsZXIudW5tb3VudENoaWxkcmVuKHByZXZDaGlsZHJlbik7XG4gICAgICAgIGZvciAodmFyIG5hbWUgaW4gcHJldkNoaWxkcmVuKSB7XG4gICAgICAgICAgaWYgKHByZXZDaGlsZHJlbi5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xuICAgICAgICAgICAgdGhpcy5fdW5tb3VudENoaWxkQnlOYW1lKHByZXZDaGlsZHJlbltuYW1lXSwgbmFtZSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2V0TWFya3VwKG5leHRNYXJrdXApO1xuICAgICAgICBlcnJvclRocm93biA9IGZhbHNlO1xuICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgdXBkYXRlRGVwdGgtLTtcbiAgICAgICAgaWYgKCF1cGRhdGVEZXB0aCkge1xuICAgICAgICAgIGlmIChlcnJvclRocm93bikge1xuICAgICAgICAgICAgY2xlYXJRdWV1ZSgpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBwcm9jZXNzUXVldWUoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogVXBkYXRlcyB0aGUgcmVuZGVyZWQgY2hpbGRyZW4gd2l0aCBuZXcgY2hpbGRyZW4uXG4gICAgICpcbiAgICAgKiBAcGFyYW0gez9vYmplY3R9IG5leH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ICAgICovXG4gICAgX3VubW91bnRDaGlsZDogZnVuY3Rpb24gKGNoaWxkKSB7XG4gICAgICB0aGlzLnJlbW92ZUNoaWxkKGNoaWxkKTtcbiAgICAgIGNoaWxkLl9tb3VudEluZGV4ID0gbnVsbDtcbiAgICB9XG5cbiAgfVxuXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IFJlYWN0TXVsdGlDaGlsZDsiXX0=
13938
+ },{"./ReactChildReconciler":57,"./ReactComponentEnvironment":62,"./ReactCurrentOwner":64,"./ReactMultiChildUpdateTypes":97,"./ReactReconciler":106,"./flattenChildren":139,"_process":29}],97:[function(require,module,exports){
13939
+ /**
13940
+ * Copyright 2013-2015, Facebook, Inc.
13941
+ * All rights reserved.
13942
+ *
13943
+ * This source code is licensed under the BSD-style license found in the
13944
+ * LICENSE file in the root directory of this source tree. An additional grant
13945
+ * of patent rights can be found in the PATENTS file in the same directory.
13946
+ *
13947
+ * @providesModule ReactMultiChildUpdateTypes
13948
+ */
13949
+
13950
+ 'use strict';
13951
+
13952
+ var keyMirror = require('fbjs/lib/keyMirror');
13953
+
13954
+ /**
13955
+ * When a component's children are updated, a series of update configuration
13956
+ * objects are created in order to batch and serialize the required changes.
13957
+ *
13958
+ * Enumerates all the possible types of update configurations.
13959
+ *
13960
+ * @internal
13961
+ */
13962
+ var ReactMultiChildUpdateTypes = keyMirror({
13963
+ INSERT_MARKUP: null,
13964
+ MOVE_EXISTING: null,
13965
+ REMOVE_NODE: null,
13966
+ SET_MARKUP: null,
13967
+ TEXT_CONTENT: null
13968
+ });
13969
+
13970
+ module.exports = ReactMultiChildUpdateTypes;
13971
+ },{"fbjs/lib/keyMirror":20}],98:[function(require,module,exports){
13972
+ (function (process){
13973
+ /**
13974
+ * Copyright 2014-2015, Facebook, Inc.
13975
+ * All rights reserved.
13976
+ *
13977
+ * This source code is licensed under the BSD-style license found in the
13978
+ * LICENSE file in the root directory of this source tree. An additional grant
13979
+ * of patent rights can be found in the PATENTS file in the same directory.
13980
+ *
13981
+ * @providesModule ReactNativeComponent
13982
+ */
13983
+
13984
+ 'use strict';
13985
+
13986
+ var assign = require('./Object.assign');
13987
+ var invariant = require('fbjs/lib/invariant');
13988
+
13989
+ var autoGenerateWrapperClass = null;
13990
+ var genericComponentClass = null;
13991
+ // This registry keeps track of wrapper classes around native tags.
13992
+ var tagToComponentClass = {};
13993
+ var textComponentClass = null;
13994
+
13995
+ var ReactNativeComponentInjection = {
13996
+ // This accepts a class that receives the tag string. This is a catch all
13997
+ // that can render any kind of tag.
13998
+ injectGenericComponentClass: function (componentClass) {
13999
+ genericComponentClass = componentClass;
14000
+ },
14001
+ // This accepts a text component class that takes the text string to be
14002
+ // rendered as props.
14003
+ injectTextComponentClass: function (componentClass) {
14004
+ textComponentClass = componentClass;
14005
+ },
14006
+ // This accepts a keyed object with classes as values. Each key represents a
14007
+ // tag. That particular tag will use this class instead of the generic one.
14008
+ injectComponentClasses: function (componentClasses) {
14009
+ assign(tagToComponentClass, componentClasses);
14010
+ }
14011
+ };
14012
+
14013
+ /**
14014
+ * Get a composite component wrapper class for a specific tag.
14015
+ *
14016
+ * @param {ReactElement} element The tag for which to get the class.
14017
+ * @return {function} The React class constructor function.
14018
+ */
14019
+ function getComponentClassForElement(element) {
14020
+ if (typeof element.type === 'function') {
14021
+ return element.type;
14022
+ }
14023
+ var tag = element.type;
14024
+ var componentClass = tagToComponentClass[tag];
14025
+ if (componentClass == null) {
14026
+ tagToComponentClass[tag] = componentClass = autoGenerateWrapperClass(tag);
14027
+ }
14028
+ return componentClass;
14029
+ }
14030
+
14031
+ /**
14032
+ * Get a native internal component class for a specific tag.
14033
+ *
14034
+ * @param {ReactElement} element The element to create.
14035
+ * @return {function} The internal class constructor function.
14036
+ */
14037
+ function createInternalComponent(element) {
14038
+ !genericComponentClass ? process.env.NODE_ENV !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : invariant(false) : undefined;
14039
+ return new genericComponentClass(element.type, element.props);
14040
+ }
14041
+
14042
+ /**
14043
+ * @param {ReactText} text
14044
+ * @return {ReactComponent}
14045
+ */
14046
+ function createInstanceForText(text) {
14047
+ return new textComponentClass(text);
14048
+ }
14049
+
14050
+ /**
14051
+ * @param {ReactComponent} component
14052
+ * @return {boolean}
14053
+ */
14054
+ function isTextComponent(component) {
14055
+ return component instanceof textComponentClass;
14056
+ }
14057
+
14058
+ var ReactNativeComponent = {
14059
+ getComponentClassForElement: getComponentClassForElement,
14060
+ createInternalComponent: createInternalComponent,
14061
+ createInstanceForText: createInstanceForText,
14062
+ isTextComponent: isTextComponent,
14063
+ injection: ReactNativeComponentInjection
14064
+ };
14065
+
14066
+ module.exports = ReactNativeComponent;
14067
+ }).call(this,require('_process'))
14068
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3ROYXRpdmVDb21wb25lbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7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G9uZW50SW5qZWN0aW9uXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IFJlYWN0TmF0aXZlQ29tcG9uZW50OyJdfQ==
14069
+ },{"./Object.assign":52,"_process":29,"fbjs/lib/invariant":17}],99:[function(require,module,exports){
14070
+ (function (process){
14071
+ /**
14072
+ * Copyright 2015, Facebook, Inc.
14073
+ * All rights reserved.
14074
+ *
14075
+ * This source code is licensed under the BSD-style license found in the
14076
+ * LICENSE file in the root directory of this source tree. An additional grant
14077
+ * of patent rights can be found in the PATENTS file in the same directory.
14078
+ *
14079
+ * @providesModule ReactNoopUpdateQueue
14080
+ */
14081
+
14082
+ 'use strict';
14083
+
14084
+ var warning = require('fbjs/lib/warning');
14085
+
14086
+ function warnTDZ(publicInstance, callerName) {
14087
+ if (process.env.NODE_ENV !== 'production') {
14088
+ process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, publicInstance.constructor && publicInstance.constructor.displayName || '') : undefined;
14089
+ }
14090
+ }
14091
+
14092
+ /**
14093
+ * This is the abstract API for an update queue.
14094
+ */
14095
+ var ReactNoopUpdateQueue = {
14096
+
14097
+ /**
14098
+ * Checks whether or not this composite component is mounted.
14099
+ * @param {ReactClass} publicInstance The instance we want to test.
14100
+ * @return {boolean} True if mounted, false otherwise.
14101
+ * @protected
14102
+ * @final
14103
+ */
14104
+ isMounted: function (publicInstance) {
14105
+ return false;
14106
+ },
14107
+
14108
+ /**
14109
+ * Enqueue a callback that will be executed after all the pending updates
14110
+ * have processed.
14111
+ *
14112
+ * @param {ReactClass} publicInstance The instance to use as `this` context.
14113
+ * @param {?function} callback Called after state is updated.
14114
+ * @internal
14115
+ */
14116
+ enqueueCallback: function (publicInstance, callback) {},
14117
+
14118
+ /**
14119
+ * Forces an update. This should only be invoked when it is known with
14120
+ * certainty that we are **not** in a DOM transaction.
14121
+ *
14122
+ * You may want to call this when you know that some deeper aspect of the
14123
+ * component's state has changed but `setState` was not called.
14124
+ *
14125
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
14126
+ * `componentWillUpdate` and `componentDidUpdate`.
14127
+ *
14128
+ * @param {ReactClass} publicInstance The instance that should rerender.
14129
+ * @internal
14130
+ */
14131
+ enqueueForceUpdate: function (publicInstance) {
14132
+ warnTDZ(publicInstance, 'forceUpdate');
14133
+ },
14134
+
14135
+ /**
14136
+ * Replaces all of the state. Always use this or `setState` to mutate state.
14137
+ * You should treat `this.state` as immutable.
14138
+ *
14139
+ * There is no guarantee that `this.state` will be immediately updated, so
14140
+ * accessing `this.state` after calling this method may return the old value.
14141
+ *
14142
+ * @param {ReactClass} publicInstance The instance that should rerender.
14143
+ * @param {object} completeState Next state.
14144
+ * @internal
14145
+ */
14146
+ enqueueReplaceState: function (publicInstance, completeState) {
14147
+ warnTDZ(publicInstance, 'replaceState');
14148
+ },
14149
+
14150
+ /**
14151
+ * Sets a subset of the state. This only exists because _pendingState is
14152
+ * internal. This provides a merging strategy that is not available to deep
14153
+ * properties which is confusing. TODO: Expose pendingState or don't use it
14154
+ * during the merge.
14155
+ *
14156
+ * @param {ReactClass} publicInstance The instance that should rerender.
14157
+ * @param {object} partialState Next partial state to be merged with state.
14158
+ * @internal
14159
+ */
14160
+ enqueueSetState: function (publicInstance, partialState) {
14161
+ warnTDZ(publicInstance, 'setState');
14162
+ },
14163
+
14164
+ /**
14165
+ * Sets a subset of the props.
14166
+ *
14167
+ * @param {ReactClass} publicInstance The instance that should rerender.
14168
+ * @param {object} partialProps Subset of the next props.
14169
+ * @internal
14170
+ */
14171
+ enqueueSetProps: function (publicInstance, partialProps) {
14172
+ warnTDZ(publicInstance, 'setProps');
14173
+ },
14174
+
14175
+ /**
14176
+ * Replaces all of the props.
14177
+ *
14178
+ * @param {ReactClass} publicInstance The instance that should rerender.
14179
+ * @param {object} props New props.
14180
+ * @internal
14181
+ */
14182
+ enqueueReplaceProps: function (publicInstance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Byb3BzOiBmdW5jdGlvbiAocHVibGljSW5zdGFuY2UsIHByb3BzKSB7XG4gICAgd2FyblREWihwdWJsaWNJbnN0YW5jZSwgJ3JlcGxhY2VQcm9wcycpO1xuICB9XG5cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gUmVhY3ROb29wVXBkYXRlUXVldWU7Il19
14191
+ },{"_process":29,"fbjs/lib/warning":28}],100:[function(require,module,exports){
14192
+ (function (process){
14193
+ /**
14194
+ * Copyright 2013-2015, Facebook, Inc.
14195
+ * All rights reserved.
14196
+ *
14197
+ * This source code is licensed under the BSD-style license found in the
14198
+ * LICENSE file in the root directory of this source tree. An additional grant
14199
+ * of patent rights can be found in the PATENTS file in the same directory.
14200
+ *
14201
+ * @providesModule ReactOwner
14202
+ */
14203
+
14204
+ 'use strict';
14205
+
14206
+ var invariant = require('fbjs/lib/invariant');
14207
+
14208
+ /**
14209
+ * ReactOwners are capable of storing references to owned components.
14210
+ *
14211
+ * All components are capable of //being// referenced by owner components, but
14212
+ * only ReactOwner components are capable of //referencing// owned components.
14213
+ * The named reference is known as a "ref".
14214
+ *
14215
+ * Refs are available when mounted and updated during reconciliation.
14216
+ *
14217
+ * var MyComponent = React.createClass({
14218
+ * render: function() {
14219
+ * return (
14220
+ * <div onClick={this.handleClick}>
14221
+ * <CustomComponent ref="custom" />
14222
+ * </div>
14223
+ * );
14224
+ * },
14225
+ * handleClick: function() {
14226
+ * this.refs.custom.handleClick();
14227
+ * },
14228
+ * componentDidMount: function() {
14229
+ * this.refs.custom.initialize();
14230
+ * }
14231
+ * });
14232
+ *
14233
+ * Refs should rarely be used. When refs are used, they should only be done to
14234
+ * control data that is not handled by React's data flow.
14235
+ *
14236
+ * @class ReactOwner
14237
+ */
14238
+ var ReactOwner = {
14239
+
14240
+ /**
14241
+ * @param {?object} object
14242
+ * @return {boolean} True if `object` is a valid owner.
14243
+ * @final
14244
+ */
14245
+ isValidOwner: function (object) {
14246
+ return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
14247
+ },
14248
+
14249
+ /**
14250
+ * Adds a component by ref to an owner component.
14251
+ *
14252
+ * @param {ReactComponent} component Component to reference.
14253
+ * @param {string} ref Name by which to refer to the component.
14254
+ * @param {ReactOwner} owner Component on which to record the ref.
14255
+ * @final
14256
+ * @internal
14257
+ */
14258
+ addComponentAsRefTo: function (component, ref, owner) {
14259
+ !ReactOwner.isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might ' + 'be adding a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).') : invariant(false) : undefined;
14260
+ owner.attachRef(ref, component);
14261
+ },
14262
+
14263
+ /**
14264
+ * Removes a component by ref from an owner component.
14265
+ *
14266
+ * @param {ReactComponent} component Component to dereference.
14267
+ * @param {string} ref Name of the ref to remove.
14268
+ * @param {ReactOwner} owner Component on which the ref is recorded.
14269
+ * @final
14270
+ * @internal
14271
+ */
14272
+ removeComponentAsRefFrom: function (component, ref, owner) {
14273
+ !ReactOwner.isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might ' + 'be removing a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).') : invariant(false) : undefined;
14274
+ // Check that `component` is still the current ref because we do not want to
14275
+ // detach the ref if another component stole it.
14276
+ if (owner.getPublicInstance().refs[ref] === component.getPublicInstance()) {
14277
+ owner.detachRef(ref);
14278
+ }
14279
+ }
14280
+
14281
+ };
14282
+
14283
+ module.exports = ReactOwner;
14284
+ }).call(this,require('_process'))
14285
+ //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC9saWIvUmVhY3RPd25lci5qcyJdLCJuYW1lcyI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