/** * @license React * react-dom-test-utils.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ (function(){'use strict';(function(f,q){"object"===typeof exports&&"undefined"!==typeof module?q(exports,require("react-dom")):"function"===typeof define&&define.amd?define(["exports","react","react-dom"],q):(f=f||self,q(f.ReactTestUtils={},f.React,f.ReactDOM))})(this,function(f,q,C){function K(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function L(a){if(K(a)!==a)throw Error("Unable to find node on an unmounted component."); }function V(a){var b=a.alternate;if(!b){b=K(a);if(null===b)throw Error("Unable to find node on an unmounted component.");return b!==a?null:a}for(var c=a,d=b;;){var g=c.return;if(null===g)break;var h=g.alternate;if(null===h){d=g.return;if(null!==d){c=d;continue}break}if(g.child===h.child){for(h=g.child;h;){if(h===c)return L(g),a;if(h===d)return L(g),b;h=h.sibling}throw Error("Unable to find node on an unmounted component.");}if(c.return!==d.return)c=g,d=h;else{for(var e=!1,m=g.child;m;){if(m===c){e= !0;c=g;d=h;break}if(m===d){e=!0;d=g;c=h;break}m=m.sibling}if(!e){for(m=h.child;m;){if(m===c){e=!0;c=h;d=g;break}if(m===d){e=!0;d=h;c=g;break}m=m.sibling}if(!e)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.");}}if(c.alternate!==d)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.");}if(3!==c.tag)throw Error("Unable to find node on an unmounted component."); return c.stateNode.current===c?a:b}function D(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function x(){return!0}function M(){return!1}function n(a){function b(c,b,g,h,e){this._reactName=c;this._targetInst=g;this.type=b;this.nativeEvent=h;this.target=e;this.currentTarget=null;for(var d in a)a.hasOwnProperty(d)&&(c=a[d],this[d]=c?c(h):h[d]);this.isDefaultPrevented=(null!=h.defaultPrevented?h.defaultPrevented:!1===h.returnValue)? x:M;this.isPropagationStopped=M;return this}k(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=x)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=x)},persist:function(){},isPersistent:x});return b}function W(a){var b=this.nativeEvent; return b.getModifierState?b.getModifierState(a):(a=X[a])?!!b[a]:!1}function E(a){return W}function Y(a,b,c,d,g,h,e,f,k){v=!1;y=null;Z.apply(aa,arguments)}function ba(a,b,c,d,g,h,e,f,k){Y.apply(this,arguments);if(v){if(v){var m=y;v=!1;y=null}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.");z||(z=!0,F=m)}}function ca(a){}function da(a,b){if(!a)return[];a=V(a);if(!a)return[];for(var c=a,d=[];;){if(5===c.tag|| 6===c.tag||1===c.tag||0===c.tag){var g=c.stateNode;b(g)&&d.push(g)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return d;for(;!c.sibling;){if(!c.return||c.return===a)return d;c=c.return}c.sibling.return=c.return;c=c.sibling}}}function t(a,b){if(a&&!a._reactInternals){var c=String(a);a=G(a)?"an array":a&&1===a.nodeType&&a.tagName?"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;throw Error(b+"(...): the first argument must be a React class instance. Instead received: "+ (a+"."));}}function A(a){return!(!a||1!==a.nodeType||!a.tagName)}function H(a){return A(a)?!1:null!=a&&"function"===typeof a.render&&"function"===typeof a.setState}function N(a,b){return H(a)?a._reactInternals.type===b:!1}function B(a,b){t(a,"findAllInRenderedTree");return a?da(a._reactInternals,b):[]}function O(a,b){t(a,"scryRenderedDOMComponentsWithClass");return B(a,function(a){if(A(a)){var c=a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var g=c.split(/\s+/);if(!G(b)){if(void 0=== b)throw Error("TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument.");b=b.split(/\s+/)}return b.every(function(a){return-1!==g.indexOf(a)})}return!1})}function P(a,b){t(a,"scryRenderedDOMComponentsWithTag");return B(a,function(a){return A(a)&&a.tagName.toUpperCase()===b.toUpperCase()})}function Q(a,b){t(a,"scryRenderedComponentsWithType");return B(a,function(a){return N(a,b)})}function R(a,b,c){var d=a.type||"unknown-event";a.currentTarget=ea(c);ba(d,b,void 0,a); a.currentTarget=null}function S(a,b,c){for(var d=[];a;){d.push(a);do a=a.return;while(a&&5!==a.tag);a=a?a:null}for(a=d.length;0