react-dom 16.4.0-alpha.7926752 → 16.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /** @license React v16.4.0-alpha.7926752
1
+ /** @license React v16.4.0
2
2
  * react-dom-server.browser.production.min.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -6,30 +6,30 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- 'use strict';(function(u,p){"object"===typeof exports&&"undefined"!==typeof module?module.exports=p(require("react")):"function"===typeof define&&define.amd?define(["react"],p):u.ReactDOMServer=p(u.React)})(this,function(u){function p(a){for(var b=arguments.length-1,e="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,c=0;c<b;c++)e+="\x26args[]\x3d"+encodeURIComponent(arguments[c+1]);b=Error(e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");
10
- b.name="Invariant Violation";b.framesToPop=1;throw b;}function D(a){return function(){return a}}function S(a){if(G.hasOwnProperty(a))return!0;if(H.hasOwnProperty(a))return!1;if(T.test(a))return G[a]=!0;H[a]=!0;return!1}function U(a,b,e,c){if(null!==e&&0===e.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(c)return!1;if(null!==e)return!e.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function V(a,b,e,c){if(null===
11
- b||"undefined"===typeof b||U(a,b,e,c))return!0;if(null!==e)switch(e.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function t(a,b,e,c,r){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=r;this.mustUseProperty=e;this.propertyName=a;this.type=b}function A(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=W.exec(a);if(b){var e="",c,r=0;for(c=b.index;c<a.length;c++){switch(a.charCodeAt(c)){case 34:b=
12
- "\x26quot;";break;case 38:b="\x26amp;";break;case 39:b="\x26#x27;";break;case 60:b="\x26lt;";break;case 62:b="\x26gt;";break;default:continue}r!==c&&(e+=a.substring(r,c));r=c+1;e+=b}a=r!==c?e+a.substring(r,c):e}return a}function I(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function J(a){return"string"===typeof a?a:"function"===typeof a?a.displayName||a.name:null}function X(a){var b=
13
- "";u.Children.forEach(a,function(a){null==a||"string"!==typeof a&&"number"!==typeof a||(b+=a)});return b}function Y(a,b){if(a=a.contextTypes){var e={},c;for(c in a)e[c]=b[c];b=e}else b=K;return b}function L(a,b){void 0===a&&p("152",J(b)||"Component")}function Z(a,b){for(var e=void 0,c=void 0,r=void 0,d=void 0,f=void 0,g=void 0,v=void 0,l=v=v=void 0,h=void 0,n=void 0,k=l=l=void 0,q=e=void 0;u.isValidElement(a);){e=a;c=e.type;if("function"!==typeof c)break;r=Y(c,b);f=[];g=!1;v={isMounted:function(a){return!1},
14
- enqueueForceUpdate:function(a){if(null===f)return null},enqueueReplaceState:function(a,b){g=!0;f=[b]},enqueueSetState:function(a,b){if(null===f)return null;f.push(b)}};if(c.prototype&&c.prototype.isReactComponent)d=new c(e.props,r,v),"function"===typeof c.getDerivedStateFromProps&&(l=c.getDerivedStateFromProps.call(null,e.props,d.state),null!=l&&(d.state=z({},d.state,l)));else if(d=c(e.props,r,v),null==d||null==d.render){a=d;L(a,c);continue}d.props=e.props;d.context=r;d.updater=v;v=d.state;void 0===
15
- v&&(d.state=v=null);if("function"===typeof d.UNSAFE_componentWillMount||"function"===typeof d.componentWillMount)if("function"===typeof d.componentWillMount&&"function"!==typeof c.getDerivedStateFromProps&&d.componentWillMount(),"function"===typeof d.UNSAFE_componentWillMount&&"function"!==typeof c.getDerivedStateFromProps&&d.UNSAFE_componentWillMount(),f.length)if(v=f,l=g,f=null,g=!1,l&&1===v.length)d.state=v[0];else{h=l?v[0]:d.state;n=!0;for(a=l?1:0;a<v.length;a++)l=v[a],l="function"===typeof l?
16
- l.call(d,h,e.props,r):l,null!=l&&(n?(n=!1,h=z({},h,l)):z(h,l));d.state=h}else f=null;a=d.render();L(a,c);if("function"===typeof d.getChildContext&&(e=c.childContextTypes,"object"===typeof e))for(q in k=d.getChildContext(),k)q in e?void 0:p("108",J(c)||"Unknown",q);k&&(b=z({},b,k))}return{child:a,context:b}}var z=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,k=function(){};k.thatReturns=D;k.thatReturnsFalse=D(!1);k.thatReturnsTrue=D(!0);k.thatReturnsNull=D(null);k.thatReturnsThis=function(){return this};
17
- k.thatReturnsArgument=function(a){return a};var K={},aa=/([A-Z])/g,ba=/^ms-/,y="function"===typeof Symbol&&Symbol["for"],ca=y?Symbol["for"]("react.call"):60104,da=y?Symbol["for"]("react.return"):60105,ea=y?Symbol["for"]("react.portal"):60106,M=y?Symbol["for"]("react.fragment"):60107,fa=y?Symbol["for"]("react.strict_mode"):60108,N=y?Symbol["for"]("react.provider"):60109,ha=y?Symbol["for"]("react.context"):60110,ia=y?Symbol["for"]("react.async_mode"):60111,T=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
18
- H={},G={},q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){q[a]=new t(a,0,!1,a,null)});(new Map([["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]])).forEach(function(a,b){q[b]=new t(b,1,!1,a,null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){q[a]=new t(a,2,!1,a.toLowerCase(),null)});["autoReverse",
19
- "externalResourcesRequired","preserveAlpha"].forEach(function(a){q[a]=new t(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){q[a]=new t(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){q[a]=new t(a,3,!0,a.toLowerCase(),null)});["capture","download"].forEach(function(a){q[a]=
20
- new t(a,4,!1,a.toLowerCase(),null)});["cols","rows","size","span"].forEach(function(a){q[a]=new t(a,6,!1,a.toLowerCase(),null)});["rowSpan","start"].forEach(function(a){q[a]=new t(a,5,!1,a.toLowerCase(),null)});var E=/[\-\:]([a-z])/g,F=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
21
- a.replace(E,F);q[b]=new t(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(E,F);q[b]=new t(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(E,F);q[b]=new t(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});q.tabIndex=new t("tabIndex",1,!1,"tabindex",null);var W=/["'&<>]/,O={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,
22
- keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ja=z({menuitem:!0},O),C={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,
23
- order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ka=["Webkit","ms","Moz","O"];Object.keys(C).forEach(function(a){ka.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);C[b]=C[a]})});var B=u.Children.toArray,P=k.thatReturns("");k.thatReturns("");var la={listing:!0,pre:!0,textarea:!0},ma=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Q={},na=function(a){var b=
24
- {};return function(e){b.hasOwnProperty(e)||(b[e]=a.call(this,e));return b[e]}}(function(a){return a.replace(aa,"-$1").toLowerCase().replace(ba,"-ms-")}),oa={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},R=function(){function a(b,e){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");u.isValidElement(b)?b.type!==M?b=[b]:(b=b.props.children,b=u.isValidElement(b)?[b]:B(b)):b=B(b);this.stack=[{type:null,domNamespace:"http://www.w3.org/1999/xhtml",
25
- children:b,childIndex:0,context:K,footer:""}];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=e;this.providerStack=[];this.providerIndex=-1}a.prototype.pushProvider=function(a){this.providerIndex+=1;this.providerStack[this.providerIndex]=a;a.type.context.currentValue=a.props.value};a.prototype.popProvider=function(a){this.providerStack[this.providerIndex]=null;--this.providerIndex;a=a.type.context;a.currentValue=0>this.providerIndex?a.defaultValue:
26
- this.providerStack[this.providerIndex].props.value};a.prototype.read=function(a){if(this.exhausted)return null;for(var b="";b.length<a;){if(0===this.stack.length){this.exhausted=!0;break}var c=this.stack[this.stack.length-1];if(c.childIndex>=c.children.length){var r=c.footer;b+=r;""!==r&&(this.previousWasTextNode=!1);this.stack.pop();"select"===c.type?this.currentSelectValue=null:null!=c.type&&null!=c.type.type&&c.type.type.$$typeof===N&&this.popProvider(c.type)}else r=c.children[c.childIndex++],
27
- b+=this.render(r,c.context,c.domNamespace)}return b};a.prototype.render=function(a,e,c){if("string"===typeof a||"number"===typeof a){c=""+a;if(""===c)return"";if(this.makeStaticMarkup)return A(c);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+A(c);this.previousWasTextNode=!0;return A(c)}e=Z(a,e);a=e.child;e=e.context;if(null===a||!1===a)return"";if(!u.isValidElement(a)){if(null!=a&&null!=a.$$typeof){var b=a.$$typeof;b===ea?p("257"):void 0;p("258",b.toString())}a=B(a);this.stack.push({type:null,
28
- domNamespace:c,children:a,childIndex:0,context:e,footer:""});return""}b=a.type;if("string"===typeof b)return this.renderDOM(a,e,c);switch(b){case fa:case ia:case M:return a=B(a.props.children),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:e,footer:""}),"";case ca:case da:p("259")}if("object"===typeof b&&null!==b)switch(b.$$typeof){case N:return b=B(a.props.children),c={type:a,domNamespace:c,children:b,childIndex:0,context:e,footer:""},this.pushProvider(a),this.stack.push(c),
29
- "";case ha:return b=B(a.props.children(a.type.currentValue)),this.stack.push({type:a,domNamespace:c,children:b,childIndex:0,context:e,footer:""}),""}p("130",null==b?b:typeof b,"")};a.prototype.renderDOM=function(a,e,c){var b=a.type.toLowerCase();"http://www.w3.org/1999/xhtml"===c&&I(b);Q.hasOwnProperty(b)||(ma.test(b)?void 0:p("65",b),Q[b]=!0);var d=a.props;if("input"===b)d=z({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?
30
- d.checked:d.defaultChecked});else if("textarea"===b){var f=d.value;if(null==f){f=d.defaultValue;var g=d.children;null!=g&&(null!=f?p("92"):void 0,Array.isArray(g)&&(1>=g.length?void 0:p("93"),g=g[0]),f=""+g);null==f&&(f="")}d=z({},d,{value:void 0,children:""+f})}else if("select"===b)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=z({},d,{value:void 0});else if("option"===b){g=this.currentSelectValue;var k=X(d.children);if(null!=g){var l=null!=d.value?d.value+"":k;f=!1;if(Array.isArray(g))for(var h=
31
- 0;h<g.length;h++){if(""+g[h]===l){f=!0;break}}else f=""+g===l;d=z({selected:void 0,children:void 0},d,{selected:f,children:k})}}if(f=d)ja[b]&&(null!=f.children||null!=f.dangerouslySetInnerHTML?p("137",b,P()):void 0),null!=f.dangerouslySetInnerHTML&&(null!=f.children?p("60"):void 0,"object"===typeof f.dangerouslySetInnerHTML&&"__html"in f.dangerouslySetInnerHTML?void 0:p("61")),null!=f.style&&"object"!==typeof f.style?p("62",P()):void 0;f=d;g=this.makeStaticMarkup;k=1===this.stack.length;l="\x3c"+
32
- a.type;for(x in f)if(f.hasOwnProperty(x)){var n=f[x];if(null!=n){if("style"===x){h=void 0;var t="",u="";for(h in n)if(n.hasOwnProperty(h)){var m=0===h.indexOf("--"),w=n[h];null!=w&&(t+=u+na(h)+":",u=h,m=null==w||"boolean"===typeof w||""===w?"":m||"number"!==typeof w||0===w||C.hasOwnProperty(u)&&C[u]?(""+w).trim():w+"px",t+=m,u=";")}n=t||null}h=null;b:if(m=b,w=f,-1===m.indexOf("-"))m="string"===typeof w.is;else switch(m){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":m=
33
- !1;break b;default:m=!0}if(m)oa.hasOwnProperty(x)||(h=x,h=S(h)&&null!=n?h+"\x3d"+('"'+A(n)+'"'):"");else{m=x;h=n;n=q.hasOwnProperty(m)?q[m]:null;if(w="style"!==m)w=null!==n?0===n.type:!(2<m.length)||"o"!==m[0]&&"O"!==m[0]||"n"!==m[1]&&"N"!==m[1]?!1:!0;w||V(m,h,n,!1)?h="":null!==n?(m=n.attributeName,n=n.type,h=3===n||4===n&&!0===h?m+'\x3d""':m+"\x3d"+('"'+A(h)+'"')):h=m+"\x3d"+('"'+A(h)+'"')}h&&(l+=" "+h)}}g||k&&(l+=' data-reactroot\x3d""');var x=l;f="";O.hasOwnProperty(b)?x+="/\x3e":(x+="\x3e",f=
34
- "\x3c/"+a.type+"\x3e");a:{g=d.dangerouslySetInnerHTML;if(null!=g){if(null!=g.__html){g=g.__html;break a}}else if(g=d.children,"string"===typeof g||"number"===typeof g){g=A(g);break a}g=null}null!=g?(d=[],la[b]&&"\n"===g.charAt(0)&&(x+="\n"),x+=g):d=B(d.children);a=a.type;c=null==c||"http://www.w3.org/1999/xhtml"===c?I(a):"http://www.w3.org/2000/svg"===c&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":c;this.stack.push({domNamespace:c,type:b,children:d,childIndex:0,context:e,footer:f});this.previousWasTextNode=
35
- !1;return x};return a}();k={renderToString:function(a){return(new R(a,!1)).read(Infinity)},renderToStaticMarkup:function(a){return(new R(a,!0)).read(Infinity)},renderToNodeStream:function(){p("207")},renderToStaticNodeStream:function(){p("208")},version:"16.4.0-alpha.7926752"};k=(y=Object.freeze({default:k}))&&k||y;return k["default"]?k["default"]:k});
9
+ 'use strict';(function(w,t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t(require("react")):"function"===typeof define&&define.amd?define(["react"],t):w.ReactDOMServer=t(w.React)})(this,function(w){function t(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);Q(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",
10
+ d)}function B(a){return function(){return a}}function R(a){if(E.hasOwnProperty(a))return!0;if(F.hasOwnProperty(a))return!1;if(S.test(a))return E[a]=!0;F[a]=!0;return!1}function T(a,b,d,c){if(null!==d&&0===d.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(c)return!1;if(null!==d)return!d.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function U(a,b,d,c){if(null===b||"undefined"===typeof b||T(a,b,d,c))return!0;if(c)return!1;
11
+ if(null!==d)switch(d.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function r(a,b,d,c,n){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=n;this.mustUseProperty=d;this.propertyName=a;this.type=b}function z(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=V.exec(a);if(b){var d="",c,n=0;for(c=b.index;c<a.length;c++){switch(a.charCodeAt(c)){case 34:b="&quot;";break;case 38:b="&amp;";break;
12
+ case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}n!==c&&(d+=a.substring(n,c));n=c+1;d+=b}a=n!==c?d+a.substring(n,c):d}return a}function G(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function H(a){return"string"===typeof a?a:"function"===typeof a?a.displayName||a.name:null}function W(a){var b="";w.Children.forEach(a,function(a){null==a||"string"!==
13
+ typeof a&&"number"!==typeof a||(b+=a)});return b}function X(a,b){if(a=a.contextTypes){var d={},c;for(c in a)d[c]=b[c];b=d}else b=I;return b}function J(a,b){void 0===a&&t("152",H(b)||"Component")}function Y(a,b){function d(c,d){var n=X(d,b),f=[],h=!1,g={isMounted:function(a){return!1},enqueueForceUpdate:function(a){if(null===f)return null},enqueueReplaceState:function(a,b){h=!0;f=[b]},enqueueSetState:function(a,b){if(null===f)return null;f.push(b)}},e=void 0;if(d.prototype&&d.prototype.isReactComponent){if(e=
14
+ new d(c.props,n,g),"function"===typeof d.getDerivedStateFromProps){var k=d.getDerivedStateFromProps.call(null,c.props,e.state);null!=k&&(e.state=x({},e.state,k))}}else if(e=d(c.props,n,g),null==e||null==e.render){a=e;J(a,d);return}e.props=c.props;e.context=n;e.updater=g;g=e.state;void 0===g&&(e.state=g=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof d.getDerivedStateFromProps&&e.componentWillMount(),
15
+ "function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof d.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),f.length){g=f;var p=h;f=null;h=!1;if(p&&1===g.length)e.state=g[0];else{k=p?g[0]:e.state;var m=!0;for(p=p?1:0;p<g.length;p++){var q=g[p];q="function"===typeof q?q.call(e,k,c.props,n):q;null!=q&&(m?(m=!1,k=x({},k,q)):x(k,q))}e.state=k}}else f=null;a=e.render();J(a,d);c=void 0;if("function"===typeof e.getChildContext&&(n=d.childContextTypes,"object"===typeof n)){c=e.getChildContext();
16
+ for(var v in c)v in n?void 0:t("108",H(d)||"Unknown",v)}c&&(b=x({},b,c))}for(;w.isValidElement(a);){var c=a,n=c.type;if("function"!==typeof n)break;d(c,n)}return{child:a,context:b}}var Q=function(a,b,d,c,n,f,h,l){if(!a){if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[d,c,n,f,h,l],p=0;a=Error(b.replace(/%s/g,function(){return k[p++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;
17
+ }},x=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,k=function(){};k.thatReturns=B;k.thatReturnsFalse=B(!1);k.thatReturnsTrue=B(!0);k.thatReturnsNull=B(null);k.thatReturnsThis=function(){return this};k.thatReturnsArgument=function(a){return a};var I={},Z=/([A-Z])/g,aa=/^ms-/,u="function"===typeof Symbol&&Symbol.for,ba=u?Symbol.for("react.portal"):60106,K=u?Symbol.for("react.fragment"):60107,ca=u?Symbol.for("react.strict_mode"):60108,da=u?Symbol.for("react.profiler"):60114,L=u?Symbol.for("react.provider"):
18
+ 60109,ea=u?Symbol.for("react.context"):60110,fa=u?Symbol.for("react.async_mode"):60111,ha=u?Symbol.for("react.forward_ref"):60112,S=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,F={},E={},p={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){p[a]=
19
+ new r(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];p[b]=new r(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){p[a]=new r(a,2,!1,a.toLowerCase(),null)});["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(a){p[a]=new r(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){p[a]=
20
+ new r(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){p[a]=new r(a,3,!0,a.toLowerCase(),null)});["capture","download"].forEach(function(a){p[a]=new r(a,4,!1,a.toLowerCase(),null)});["cols","rows","size","span"].forEach(function(a){p[a]=new r(a,6,!1,a.toLowerCase(),null)});["rowSpan","start"].forEach(function(a){p[a]=new r(a,5,!1,a.toLowerCase(),null)});var C=/[\-:]([a-z])/g,D=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
21
+ a.replace(C,D);p[b]=new r(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(C,D);p[b]=new r(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(C,D);p[b]=new r(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});p.tabIndex=new r("tabIndex",1,!1,"tabindex",null);var V=/["'&<>]/,M={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,
22
+ keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ia=x({menuitem:!0},M),A={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,
23
+ order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ja=["Webkit","ms","Moz","O"];Object.keys(A).forEach(function(a){ja.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);A[b]=A[a]})});var y=w.Children.toArray,N=k.thatReturns("");k.thatReturns("");var ka={listing:!0,pre:!0,textarea:!0},la=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,O={},ma=function(a){var b=
24
+ {};return function(d){b.hasOwnProperty(d)||(b[d]=a.call(this,d));return b[d]}}(function(a){return a.replace(Z,"-$1").toLowerCase().replace(aa,"-ms-")}),na={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},P=function(){function a(b,d){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");w.isValidElement(b)?b.type!==K?b=[b]:(b=b.props.children,b=w.isValidElement(b)?[b]:y(b)):b=y(b);this.stack=[{type:null,domNamespace:"http://www.w3.org/1999/xhtml",
25
+ children:b,childIndex:0,context:I,footer:""}];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=d;this.providerStack=[];this.providerIndex=-1}a.prototype.pushProvider=function(a){this.providerIndex+=1;this.providerStack[this.providerIndex]=a;a.type._context._currentValue=a.props.value};a.prototype.popProvider=function(a){this.providerStack[this.providerIndex]=null;--this.providerIndex;a=a.type._context;a._currentValue=0>this.providerIndex?a._defaultValue:
26
+ this.providerStack[this.providerIndex].props.value};a.prototype.read=function(a){if(this.exhausted)return null;for(var b="";b.length<a;){if(0===this.stack.length){this.exhausted=!0;break}var c=this.stack[this.stack.length-1];if(c.childIndex>=c.children.length){var n=c.footer;b+=n;""!==n&&(this.previousWasTextNode=!1);this.stack.pop();"select"===c.type?this.currentSelectValue=null:null!=c.type&&null!=c.type.type&&c.type.type.$$typeof===L&&this.popProvider(c.type)}else n=c.children[c.childIndex++],
27
+ b+=this.render(n,c.context,c.domNamespace)}return b};a.prototype.render=function(a,d,c){if("string"===typeof a||"number"===typeof a){c=""+a;if(""===c)return"";if(this.makeStaticMarkup)return z(c);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+z(c);this.previousWasTextNode=!0;return z(c)}d=Y(a,d);a=d.child;d=d.context;if(null===a||!1===a)return"";if(!w.isValidElement(a)){if(null!=a&&null!=a.$$typeof){var b=a.$$typeof;b===ba?t("257"):void 0;t("258",b.toString())}a=y(a);this.stack.push({type:null,
28
+ domNamespace:c,children:a,childIndex:0,context:d,footer:""});return""}b=a.type;if("string"===typeof b)return this.renderDOM(a,d,c);switch(b){case ca:case fa:case da:case K:return a=y(a.props.children),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""}),""}if("object"===typeof b&&null!==b)switch(b.$$typeof){case ha:return a=y(b.render(a.props,a.ref)),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""}),"";case L:return b=y(a.props.children),
29
+ c={type:a,domNamespace:c,children:b,childIndex:0,context:d,footer:""},this.pushProvider(a),this.stack.push(c),"";case ea:return b=y(a.props.children(a.type._currentValue)),this.stack.push({type:a,domNamespace:c,children:b,childIndex:0,context:d,footer:""}),""}t("130",null==b?b:typeof b,"")};a.prototype.renderDOM=function(a,d,c){var b=a.type.toLowerCase();"http://www.w3.org/1999/xhtml"===c&&G(b);O.hasOwnProperty(b)||(la.test(b)?void 0:t("65",b),O[b]=!0);var f=a.props;if("input"===b)f=x({type:void 0},
30
+ f,{defaultChecked:void 0,defaultValue:void 0,value:null!=f.value?f.value:f.defaultValue,checked:null!=f.checked?f.checked:f.defaultChecked});else if("textarea"===b){var h=f.value;if(null==h){h=f.defaultValue;var l=f.children;null!=l&&(null!=h?t("92"):void 0,Array.isArray(l)&&(1>=l.length?void 0:t("93"),l=l[0]),h=""+l);null==h&&(h="")}f=x({},f,{value:void 0,children:""+h})}else if("select"===b)this.currentSelectValue=null!=f.value?f.value:f.defaultValue,f=x({},f,{value:void 0});else if("option"===
31
+ b){l=this.currentSelectValue;var k=W(f.children);if(null!=l){var r=null!=f.value?f.value+"":k;h=!1;if(Array.isArray(l))for(var g=0;g<l.length;g++){if(""+l[g]===r){h=!0;break}}else h=""+l===r;f=x({selected:void 0,children:void 0},f,{selected:h,children:k})}}if(h=f)ia[b]&&(null!=h.children||null!=h.dangerouslySetInnerHTML?t("137",b,N()):void 0),null!=h.dangerouslySetInnerHTML&&(null!=h.children?t("60"):void 0,"object"===typeof h.dangerouslySetInnerHTML&&"__html"in h.dangerouslySetInnerHTML?void 0:t("61")),
32
+ null!=h.style&&"object"!==typeof h.style?t("62",N()):void 0;h=f;l=this.makeStaticMarkup;k=1===this.stack.length;r="<"+a.type;for(v in h)if(h.hasOwnProperty(v)){var e=h[v];if(null!=e){if("style"===v){g=void 0;var w="",u="";for(g in e)if(e.hasOwnProperty(g)){var m=0===g.indexOf("--"),q=e[g];null!=q&&(w+=u+ma(g)+":",u=g,m=null==q||"boolean"===typeof q||""===q?"":m||"number"!==typeof q||0===q||A.hasOwnProperty(u)&&A[u]?(""+q).trim():q+"px",w+=m,u=";")}e=w||null}g=null;b:if(m=b,q=h,-1===m.indexOf("-"))m=
33
+ "string"===typeof q.is;else switch(m){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":m=!1;break b;default:m=!0}if(m)na.hasOwnProperty(v)||(g=v,g=R(g)&&null!=e?g+"="+('"'+z(e)+'"'):"");else{m=v;g=e;e=p.hasOwnProperty(m)?p[m]:null;if(q="style"!==m)q=null!==e?0===e.type:!(2<m.length)||"o"!==m[0]&&"O"!==m[0]||"n"!==m[1]&&"N"!==m[1]?!1:!0;q||U(m,g,e,!1)?g="":null!==e?(m=e.attributeName,
34
+ e=e.type,g=3===e||4===e&&!0===g?m+'=""':m+"="+('"'+z(g)+'"')):g=m+"="+('"'+z(g)+'"')}g&&(r+=" "+g)}}l||k&&(r+=' data-reactroot=""');var v=r;h="";M.hasOwnProperty(b)?v+="/>":(v+=">",h="</"+a.type+">");a:{l=f.dangerouslySetInnerHTML;if(null!=l){if(null!=l.__html){l=l.__html;break a}}else if(l=f.children,"string"===typeof l||"number"===typeof l){l=z(l);break a}l=null}null!=l?(f=[],ka[b]&&"\n"===l.charAt(0)&&(v+="\n"),v+=l):f=y(f.children);a=a.type;c=null==c||"http://www.w3.org/1999/xhtml"===c?G(a):"http://www.w3.org/2000/svg"===
35
+ c&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":c;this.stack.push({domNamespace:c,type:b,children:f,childIndex:0,context:d,footer:h});this.previousWasTextNode=!1;return v};return a}();k={renderToString:function(a){return(new P(a,!1)).read(Infinity)},renderToStaticMarkup:function(a){return(new P(a,!0)).read(Infinity)},renderToNodeStream:function(){t("207")},renderToStaticNodeStream:function(){t("208")},version:"16.4.0"};k=(u={default:k},k)||u;return k.default?k.default:k});
@@ -1,4 +1,4 @@
1
- /** @license React v16.4.0-alpha.7926752
1
+ /** @license React v16.4.0
2
2
  * react-dom-test-utils.development.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -19,13 +19,6 @@ var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
19
19
 
20
20
  var _assign = ReactInternals.assign;
21
21
 
22
- /**
23
- * WARNING: DO NOT manually require this module.
24
- * This is a replacement for `invariant(...)` used by the error code system
25
- * and will _only_ be required by the corresponding babel pass.
26
- * It always throws.
27
- */
28
-
29
22
  /**
30
23
  * Copyright (c) 2013-present, Facebook, Inc.
31
24
  *
@@ -80,6 +73,9 @@ function invariant(condition, format, a, b, c, d, e, f) {
80
73
 
81
74
  var invariant_1 = invariant;
82
75
 
76
+ // Relying on the `invariant()` implementation lets us
77
+ // have preserve the format and params in the www builds.
78
+
83
79
  /**
84
80
  * Copyright (c) 2013-present, Facebook, Inc.
85
81
  *
@@ -232,20 +228,6 @@ var Placement = /* */2;
232
228
 
233
229
  // Union of all host effects
234
230
 
235
-
236
- // This indicates we exited the fiber without completing it.
237
-
238
-
239
- // Bits greater than Incomplete are used to identify fibers that threw. These
240
- // are like algebraic effects. These bits are mutually exclusive.
241
-
242
-
243
-
244
-
245
-
246
-
247
- // Union of all algebraic effects
248
-
249
231
  var MOUNTING = 1;
250
232
  var MOUNTED = 2;
251
233
  var UNMOUNTED = 3;
@@ -258,15 +240,15 @@ function isFiberMountedImpl(fiber) {
258
240
  if ((node.effectTag & Placement) !== NoEffect) {
259
241
  return MOUNTING;
260
242
  }
261
- while (node['return']) {
262
- node = node['return'];
243
+ while (node.return) {
244
+ node = node.return;
263
245
  if ((node.effectTag & Placement) !== NoEffect) {
264
246
  return MOUNTING;
265
247
  }
266
248
  }
267
249
  } else {
268
- while (node['return']) {
269
- node = node['return'];
250
+ while (node.return) {
251
+ node = node.return;
270
252
  }
271
253
  }
272
254
  if (node.tag === HostRoot) {
@@ -304,7 +286,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
304
286
  var a = fiber;
305
287
  var b = alternate;
306
288
  while (true) {
307
- var parentA = a['return'];
289
+ var parentA = a.return;
308
290
  var parentB = parentA ? parentA.alternate : null;
309
291
  if (!parentA || !parentB) {
310
292
  // We're at the root.
@@ -334,7 +316,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
334
316
  invariant_1(false, 'Unable to find node on an unmounted component.');
335
317
  }
336
318
 
337
- if (a['return'] !== b['return']) {
319
+ if (a.return !== b.return) {
338
320
  // The return pointer of A and the return pointer of B point to different
339
321
  // fibers. We assume that return pointers never criss-cross, so A must
340
322
  // belong to the child set of A.return, and B must belong to the child
@@ -603,7 +585,7 @@ SyntheticEvent.extend = function (Interface) {
603
585
  return new Proxy(constructor.apply(that, args), {
604
586
  set: function (target, prop, value) {
605
587
  if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
606
- warning_1(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.');
588
+ !(didWarnForAddedNewProperty || target.isPersistent()) ? warning_1(false, "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
607
589
  didWarnForAddedNewProperty = true;
608
590
  }
609
591
  target[prop] = value;
@@ -648,7 +630,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
648
630
 
649
631
  function warn(action, result) {
650
632
  var warningCondition = false;
651
- warning_1(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
633
+ !warningCondition ? warning_1(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
652
634
  }
653
635
  }
654
636
 
@@ -679,6 +661,14 @@ function addEventPoolingTo(EventConstructor) {
679
661
 
680
662
  var SyntheticEvent$1 = SyntheticEvent;
681
663
 
664
+ // Do not uses the below two methods directly!
665
+ // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
666
+ // (It is the only module that is allowed to access these methods.)
667
+
668
+ function unsafeCastStringToDOMTopLevelType(topLevelType) {
669
+ return topLevelType;
670
+ }
671
+
682
672
  /**
683
673
  * Copyright (c) 2013-present, Facebook, Inc.
684
674
  *
@@ -799,91 +789,97 @@ function getVendorPrefixedEventName(eventName) {
799
789
  }
800
790
 
801
791
  /**
802
- * Types of raw signals from the browser caught at the top level.
803
- *
804
- * For events like 'submit' or audio/video events which don't consistently
805
- * bubble (which we trap at a lower node than `document`), binding
806
- * at `document` would cause duplicate events so we don't include them here.
792
+ * To identify top level events in ReactDOM, we use constants defined by this
793
+ * module. This is the only module that uses the unsafe* methods to express
794
+ * that the constants actually correspond to the browser event names. This lets
795
+ * us save some bundle size by avoiding a top level type -> event name map.
796
+ * The rest of ReactDOM code should import top level types from this file.
807
797
  */
808
- var topLevelTypes = {
809
- topAnimationEnd: getVendorPrefixedEventName('animationend'),
810
- topAnimationIteration: getVendorPrefixedEventName('animationiteration'),
811
- topAnimationStart: getVendorPrefixedEventName('animationstart'),
812
- topBlur: 'blur',
813
- topCancel: 'cancel',
814
- topChange: 'change',
815
- topClick: 'click',
816
- topClose: 'close',
817
- topCompositionEnd: 'compositionend',
818
- topCompositionStart: 'compositionstart',
819
- topCompositionUpdate: 'compositionupdate',
820
- topContextMenu: 'contextmenu',
821
- topCopy: 'copy',
822
- topCut: 'cut',
823
- topDoubleClick: 'dblclick',
824
- topDrag: 'drag',
825
- topDragEnd: 'dragend',
826
- topDragEnter: 'dragenter',
827
- topDragExit: 'dragexit',
828
- topDragLeave: 'dragleave',
829
- topDragOver: 'dragover',
830
- topDragStart: 'dragstart',
831
- topDrop: 'drop',
832
- topFocus: 'focus',
833
- topInput: 'input',
834
- topKeyDown: 'keydown',
835
- topKeyPress: 'keypress',
836
- topKeyUp: 'keyup',
837
- topLoad: 'load',
838
- topLoadStart: 'loadstart',
839
- topMouseDown: 'mousedown',
840
- topMouseMove: 'mousemove',
841
- topMouseOut: 'mouseout',
842
- topMouseOver: 'mouseover',
843
- topMouseUp: 'mouseup',
844
- topPaste: 'paste',
845
- topScroll: 'scroll',
846
- topSelectionChange: 'selectionchange',
847
- topTextInput: 'textInput',
848
- topToggle: 'toggle',
849
- topTouchCancel: 'touchcancel',
850
- topTouchEnd: 'touchend',
851
- topTouchMove: 'touchmove',
852
- topTouchStart: 'touchstart',
853
- topTransitionEnd: getVendorPrefixedEventName('transitionend'),
854
- topWheel: 'wheel'
855
- };
856
-
857
- // There are so many media events, it makes sense to just
858
- // maintain a list of them. Note these aren't technically
859
- // "top-level" since they don't bubble. We should come up
860
- // with a better naming convention if we come to refactoring
861
- // the event system.
862
- var mediaEventTypes = {
863
- topAbort: 'abort',
864
- topCanPlay: 'canplay',
865
- topCanPlayThrough: 'canplaythrough',
866
- topDurationChange: 'durationchange',
867
- topEmptied: 'emptied',
868
- topEncrypted: 'encrypted',
869
- topEnded: 'ended',
870
- topError: 'error',
871
- topLoadedData: 'loadeddata',
872
- topLoadedMetadata: 'loadedmetadata',
873
- topLoadStart: 'loadstart',
874
- topPause: 'pause',
875
- topPlay: 'play',
876
- topPlaying: 'playing',
877
- topProgress: 'progress',
878
- topRateChange: 'ratechange',
879
- topSeeked: 'seeked',
880
- topSeeking: 'seeking',
881
- topStalled: 'stalled',
882
- topSuspend: 'suspend',
883
- topTimeUpdate: 'timeupdate',
884
- topVolumeChange: 'volumechange',
885
- topWaiting: 'waiting'
886
- };
798
+ var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
799
+ var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
800
+ var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
801
+ var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
802
+ var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
803
+ var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
804
+ var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
805
+ var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
806
+ var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
807
+ var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
808
+ var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
809
+ var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
810
+ var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
811
+ var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
812
+ var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
813
+ var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
814
+ var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
815
+ var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
816
+ var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
817
+ var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
818
+ var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
819
+ var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
820
+ var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
821
+ var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
822
+ var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
823
+ var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
824
+ var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
825
+ var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
826
+ var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
827
+ var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
828
+ var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
829
+ var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
830
+
831
+ var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
832
+
833
+ var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
834
+ var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
835
+ var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
836
+ var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
837
+ var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
838
+ var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
839
+ var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
840
+
841
+ var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
842
+ var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
843
+ var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
844
+ var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
845
+ var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
846
+ var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
847
+ var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
848
+ var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
849
+ var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
850
+
851
+
852
+
853
+
854
+
855
+
856
+
857
+
858
+ var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
859
+ var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
860
+
861
+ var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
862
+ var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
863
+ var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
864
+ var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
865
+ var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
866
+
867
+ var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
868
+ var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
869
+ var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
870
+ var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
871
+ var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
872
+ var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
873
+ var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
874
+ var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
875
+ var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
876
+ var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
877
+ var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
878
+ var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel');
879
+
880
+ // List of events that need to be individually attached to media elements.
881
+ // Note that events in this list will *not* be listened to at the top level
882
+ // unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
887
883
 
888
884
  var findDOMNode = ReactDOM.findDOMNode;
889
885
  var _ReactDOM$__SECRET_IN = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -901,6 +897,29 @@ function Event(suffix) {}
901
897
  * @class ReactTestUtils
902
898
  */
903
899
 
900
+ /**
901
+ * Simulates a top level event being dispatched from a raw event that occurred
902
+ * on an `Element` node.
903
+ * @param {number} topLevelType A number from `TopLevelEventTypes`
904
+ * @param {!Element} node The dom to simulate an event occurring on.
905
+ * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
906
+ */
907
+ function simulateNativeEventOnNode(topLevelType, node, fakeNativeEvent) {
908
+ fakeNativeEvent.target = node;
909
+ ReactDOMEventListener.dispatchEvent(topLevelType, fakeNativeEvent);
910
+ }
911
+
912
+ /**
913
+ * Simulates a top level event being dispatched from a raw event that occurred
914
+ * on the `ReactDOMComponent` `comp`.
915
+ * @param {Object} topLevelType A type from `BrowserEventConstants.topLevelTypes`.
916
+ * @param {!ReactDOMComponent} comp
917
+ * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
918
+ */
919
+ function simulateNativeEventOnDOMComponent(topLevelType, comp, fakeNativeEvent) {
920
+ simulateNativeEventOnNode(topLevelType, findDOMNode(comp), fakeNativeEvent);
921
+ }
922
+
904
923
  function findAllInRenderedFiberTreeInternal(fiber, test) {
905
924
  if (!fiber) {
906
925
  return [];
@@ -919,7 +938,7 @@ function findAllInRenderedFiberTreeInternal(fiber, test) {
919
938
  }
920
939
  }
921
940
  if (node.child) {
922
- node.child['return'] = node;
941
+ node.child.return = node;
923
942
  node = node.child;
924
943
  continue;
925
944
  }
@@ -927,12 +946,12 @@ function findAllInRenderedFiberTreeInternal(fiber, test) {
927
946
  return ret;
928
947
  }
929
948
  while (!node.sibling) {
930
- if (!node['return'] || node['return'] === currentParent) {
949
+ if (!node.return || node.return === currentParent) {
931
950
  return ret;
932
951
  }
933
- node = node['return'];
952
+ node = node.return;
934
953
  }
935
- node.sibling['return'] = node['return'];
954
+ node.sibling.return = node.return;
936
955
  node = node.sibling;
937
956
  }
938
957
  }
@@ -1113,29 +1132,6 @@ var ReactTestUtils = {
1113
1132
  return this;
1114
1133
  },
1115
1134
 
1116
- /**
1117
- * Simulates a top level event being dispatched from a raw event that occurred
1118
- * on an `Element` node.
1119
- * @param {Object} topLevelType A type from `BrowserEventConstants.topLevelTypes`
1120
- * @param {!Element} node The dom to simulate an event occurring on.
1121
- * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
1122
- */
1123
- simulateNativeEventOnNode: function (topLevelType, node, fakeNativeEvent) {
1124
- fakeNativeEvent.target = node;
1125
- ReactDOMEventListener.dispatchEvent(topLevelType, fakeNativeEvent);
1126
- },
1127
-
1128
- /**
1129
- * Simulates a top level event being dispatched from a raw event that occurred
1130
- * on the `ReactDOMComponent` `comp`.
1131
- * @param {Object} topLevelType A type from `BrowserEventConstants.topLevelTypes`.
1132
- * @param {!ReactDOMComponent} comp
1133
- * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
1134
- */
1135
- simulateNativeEventOnDOMComponent: function (topLevelType, comp, fakeNativeEvent) {
1136
- ReactTestUtils.simulateNativeEventOnNode(topLevelType, findDOMNode(comp), fakeNativeEvent);
1137
- },
1138
-
1139
1135
  nativeTouchData: function (x, y) {
1140
1136
  return {
1141
1137
  touches: [{ pageX: x, pageY: y }]
@@ -1234,29 +1230,28 @@ buildSimulators();
1234
1230
  * to dispatch synthetic events.
1235
1231
  */
1236
1232
 
1237
- function makeNativeSimulator(eventType) {
1233
+ function makeNativeSimulator(eventType, topLevelType) {
1238
1234
  return function (domComponentOrNode, nativeEventData) {
1239
1235
  var fakeNativeEvent = new Event(eventType);
1240
1236
  _assign(fakeNativeEvent, nativeEventData);
1241
1237
  if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {
1242
- ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent);
1238
+ simulateNativeEventOnDOMComponent(topLevelType, domComponentOrNode, fakeNativeEvent);
1243
1239
  } else if (domComponentOrNode.tagName) {
1244
1240
  // Will allow on actual dom nodes.
1245
- ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent);
1241
+ simulateNativeEventOnNode(topLevelType, domComponentOrNode, fakeNativeEvent);
1246
1242
  }
1247
1243
  };
1248
1244
  }
1249
1245
 
1250
- var eventKeys = [].concat(Object.keys(topLevelTypes), Object.keys(mediaEventTypes));
1246
+ [[TOP_ABORT, 'abort'], [TOP_ANIMATION_END, 'animationEnd'], [TOP_ANIMATION_ITERATION, 'animationIteration'], [TOP_ANIMATION_START, 'animationStart'], [TOP_BLUR, 'blur'], [TOP_CAN_PLAY_THROUGH, 'canPlayThrough'], [TOP_CAN_PLAY, 'canPlay'], [TOP_CANCEL, 'cancel'], [TOP_CHANGE, 'change'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_COMPOSITION_END, 'compositionEnd'], [TOP_COMPOSITION_START, 'compositionStart'], [TOP_COMPOSITION_UPDATE, 'compositionUpdate'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_ENTER, 'dragEnter'], [TOP_DRAG_EXIT, 'dragExit'], [TOP_DRAG_LEAVE, 'dragLeave'], [TOP_DRAG_OVER, 'dragOver'], [TOP_DRAG_START, 'dragStart'], [TOP_DRAG, 'drag'], [TOP_DROP, 'drop'], [TOP_DURATION_CHANGE, 'durationChange'], [TOP_EMPTIED, 'emptied'], [TOP_ENCRYPTED, 'encrypted'], [TOP_ENDED, 'ended'], [TOP_ERROR, 'error'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_LOAD_START, 'loadStart'], [TOP_LOAD_START, 'loadStart'], [TOP_LOAD, 'load'], [TOP_LOADED_DATA, 'loadedData'], [TOP_LOADED_METADATA, 'loadedMetadata'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_MOVE, 'mouseMove'], [TOP_MOUSE_OUT, 'mouseOut'], [TOP_MOUSE_OVER, 'mouseOver'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_PLAYING, 'playing'], [TOP_PROGRESS, 'progress'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_SCROLL, 'scroll'], [TOP_SEEKED, 'seeked'], [TOP_SEEKING, 'seeking'], [TOP_SELECTION_CHANGE, 'selectionChange'], [TOP_STALLED, 'stalled'], [TOP_SUSPEND, 'suspend'], [TOP_TEXT_INPUT, 'textInput'], [TOP_TIME_UPDATE, 'timeUpdate'], [TOP_TOGGLE, 'toggle'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_MOVE, 'touchMove'], [TOP_TOUCH_START, 'touchStart'], [TOP_TRANSITION_END, 'transitionEnd'], [TOP_VOLUME_CHANGE, 'volumeChange'], [TOP_WAITING, 'waiting'], [TOP_WHEEL, 'wheel']].forEach(function (_ref) {
1247
+ var topLevelType = _ref[0],
1248
+ eventType = _ref[1];
1251
1249
 
1252
- eventKeys.forEach(function (eventType) {
1253
- // Event type is stored as 'topClick' - we transform that to 'click'
1254
- var convenienceName = eventType.indexOf('top') === 0 ? eventType.charAt(3).toLowerCase() + eventType.substr(4) : eventType;
1255
1250
  /**
1256
1251
  * @param {!Element|ReactDOMComponent} domComponentOrNode
1257
1252
  * @param {?Event} nativeEventData Fake native event to use in SyntheticEvent.
1258
1253
  */
1259
- ReactTestUtils.SimulateNative[convenienceName] = makeNativeSimulator(eventType);
1254
+ ReactTestUtils.SimulateNative[eventType] = makeNativeSimulator(eventType, topLevelType);
1260
1255
  });
1261
1256
 
1262
1257
 
@@ -1269,7 +1264,7 @@ var ReactTestUtils$3 = ( ReactTestUtils$2 && ReactTestUtils ) || ReactTestUtils$
1269
1264
 
1270
1265
  // TODO: decide on the top-level export form.
1271
1266
  // This is hacky but makes it work with both Rollup and Jest.
1272
- var testUtils = ReactTestUtils$3['default'] ? ReactTestUtils$3['default'] : ReactTestUtils$3;
1267
+ var testUtils = ReactTestUtils$3.default ? ReactTestUtils$3.default : ReactTestUtils$3;
1273
1268
 
1274
1269
  return testUtils;
1275
1270