UNPKG

react-native

Version:

A framework for building native apps using React

2,415 lines (1,352 loc) • 874 kB
(function(global) {global. __DEV__=true; global.__BUNDLE_START_TIME__=Date.now(); })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); (function(global) {'use strict'; global.require=_require; global.__d=define; var modules=Object.create(null); if(__DEV__){ var verboseNamesToModuleIds=Object.create(null);} function define(moduleId,factory){ if(moduleId in modules){ return;} modules[moduleId]={ factory:factory, hasError:false, isInitialized:false, exports:undefined}; if(__DEV__){ modules[moduleId].hot=createHotReloadingObject(); var verboseName=modules[moduleId].verboseName=arguments[2]; verboseNamesToModuleIds[verboseName]=moduleId;}} function _require(moduleId){ var module=__DEV__? modules[moduleId]||modules[verboseNamesToModuleIds[moduleId]]: modules[moduleId]; return module&&module.isInitialized? module.exports: guardedLoadModule(moduleId,module);} var inGuard=false; function guardedLoadModule(moduleId,module){ if(!inGuard&&global.ErrorUtils){ inGuard=true; var returnValue=void 0; try{ returnValue=loadModuleImplementation(moduleId,module);} catch(e){ global.ErrorUtils.reportFatalError(e);} inGuard=false; return returnValue;}else { return loadModuleImplementation(moduleId,module);}} function loadModuleImplementation(moduleId,module){ var nativeRequire=global.nativeRequire; if(!module&&nativeRequire){ nativeRequire(moduleId); module=modules[moduleId];} if(__DEV__&&!module){ module=modules[verboseNamesToModuleIds[moduleId]]; if(module){ console.warn( 'Requiring module \''+moduleId+'\' by name is only supported for '+ 'debugging purposes and will break in production');}} if(!module){ throw unknownModuleError(moduleId);} if(module.hasError){ throw moduleThrewError(moduleId);} if(__DEV__){var Systrace=_require.Systrace;} module.isInitialized=true; var exports=module.exports={};var _module= module;var factory=_module.factory; try{ if(__DEV__){ Systrace.beginEvent('JS_require_'+(module.verboseName||moduleId));} var moduleObject={exports:exports}; if(__DEV__&&module.hot){ moduleObject.hot=module.hot;} factory(global,_require,moduleObject,exports); if(!__DEV__){ module.factory=undefined;} if(__DEV__){ Systrace.endEvent();} return module.exports=moduleObject.exports;} catch(e){ module.hasError=true; module.isInitialized=false; module.exports=undefined; throw e;}} function unknownModuleError(id){ var message='Requiring unknown module "'+id+'".'; if(__DEV__){ message+= 'If you are sure the module is there, try restarting the packager or running "npm install".';} return Error(message);} function moduleThrewError(id){ return Error('Requiring module "'+id+'", which threw an exception.');} if(__DEV__){var createHotReloadingObject;(function(){_require.Systrace={beginEvent:function beginEvent(){},endEvent:function endEvent(){}};createHotReloadingObject=function createHotReloadingObject(){ var hot={ acceptCallback:null, accept:function accept(callback){hot.acceptCallback=callback;}}; return hot;}; var acceptAll=function acceptAll(dependentModules,inverseDependencies){ if(!dependentModules||dependentModules.length===0){ return true;} var notAccepted=dependentModules.filter( function(module){return !accept(module,undefined,inverseDependencies);}); var parents=[]; for(var i=0;i<notAccepted.length;i++){ if(inverseDependencies[notAccepted[i]].length===0){ return false;} parents.pushAll(inverseDependencies[notAccepted[i]]);} return acceptAll(parents,inverseDependencies);}; var accept=function accept(id,factory,inverseDependencies){ var mod=modules[id]; if(!mod){ define(id,factory); return true;}var hot=mod.hot; if(!hot){ console.warn( 'Cannot accept module because Hot Module Replacement '+ 'API was not installed.'); return false;} if(factory){ mod.factory=factory;} mod.hasError=false; mod.isInitialized=false; _require(id); if(hot.acceptCallback){ hot.acceptCallback(); return true;}else { if(!inverseDependencies){ throw new Error('Undefined `inverseDependencies`');} return acceptAll(inverseDependencies[id],inverseDependencies);}}; global.__accept=accept;})();} })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); (function(global) {Object. assign=function(target,sources){ if(__DEV__){ if(target==null){ throw new TypeError('Object.assign target cannot be null or undefined');} if(typeof target!=='object'&&typeof target!=='function'){ throw new TypeError( 'In this environment the target of assign MUST be an object.'+ 'This error is a performance optimization and not spec compliant.');}} for(var nextIndex=1;nextIndex<arguments.length;nextIndex++){ var nextSource=arguments[nextIndex]; if(nextSource==null){ continue;} if(__DEV__){ if(typeof nextSource!=='object'&& typeof nextSource!=='function'){ throw new TypeError( 'In this environment the sources for assign MUST be an object.'+ 'This error is a performance optimization and not spec compliant.');}} for(var key in nextSource){ if(__DEV__){ var hasOwnProperty=Object.prototype.hasOwnProperty; if(!hasOwnProperty.call(nextSource,key)){ throw new TypeError( 'One of the sources for assign has an enumerable key on the '+ 'prototype chain. This is an edge case that we do not support. '+ 'This error is a performance optimization and not spec compliant.');}} target[key]=nextSource[key];}} return target;}; })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); (function(global) {var inspect=function(){ function inspect(obj,opts){ var ctx={ seen:[], stylize:stylizeNoColor}; return formatValue(ctx,obj,opts.depth);} function stylizeNoColor(str,styleType){ return str;} function arrayToHash(array){ var hash={}; array.forEach(function(val,idx){ hash[val]=true;}); return hash;} function formatValue(ctx,value,recurseTimes){ var primitive=formatPrimitive(ctx,value); if(primitive){ return primitive;} var keys=Object.keys(value); var visibleKeys=arrayToHash(keys); if(isError(value)&&( keys.indexOf('message')>=0||keys.indexOf('description')>=0)){ return formatError(value);} if(keys.length===0){ if(isFunction(value)){ var name=value.name?': '+value.name:''; return ctx.stylize('[Function'+name+']','special');} if(isRegExp(value)){ return ctx.stylize(RegExp.prototype.toString.call(value),'regexp');} if(isDate(value)){ return ctx.stylize(Date.prototype.toString.call(value),'date');} if(isError(value)){ return formatError(value);}} var base='',array=false,braces=['{','}']; if(isArray(value)){ array=true; braces=['[',']'];} if(isFunction(value)){ var n=value.name?': '+value.name:''; base=' [Function'+n+']';} if(isRegExp(value)){ base=' '+RegExp.prototype.toString.call(value);} if(isDate(value)){ base=' '+Date.prototype.toUTCString.call(value);} if(isError(value)){ base=' '+formatError(value);} if(keys.length===0&&(!array||value.length==0)){ return braces[0]+base+braces[1];} if(recurseTimes<0){ if(isRegExp(value)){ return ctx.stylize(RegExp.prototype.toString.call(value),'regexp');}else { return ctx.stylize('[Object]','special');}} ctx.seen.push(value); var output; if(array){ output=formatArray(ctx,value,recurseTimes,visibleKeys,keys);}else { output=keys.map(function(key){ return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array);});} ctx.seen.pop(); return reduceToSingleString(output,base,braces);} function formatPrimitive(ctx,value){ if(isUndefined(value)) return ctx.stylize('undefined','undefined'); if(isString(value)){ var simple='\''+JSON.stringify(value).replace(/^"|"$/g,''). replace(/'/g,"\\'"). replace(/\\"/g,'"')+'\''; return ctx.stylize(simple,'string');} if(isNumber(value)) return ctx.stylize(''+value,'number'); if(isBoolean(value)) return ctx.stylize(''+value,'boolean'); if(isNull(value)) return ctx.stylize('null','null');} function formatError(value){ return '['+Error.prototype.toString.call(value)+']';} function formatArray(ctx,value,recurseTimes,visibleKeys,keys){ var output=[]; for(var i=0,l=value.length;i<l;++i){ if(hasOwnProperty(value,String(i))){ output.push(formatProperty(ctx,value,recurseTimes,visibleKeys, String(i),true));}else { output.push('');}} keys.forEach(function(key){ if(!key.match(/^\d+$/)){ output.push(formatProperty(ctx,value,recurseTimes,visibleKeys, key,true));}}); return output;} function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){ var name,str,desc; desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]}; if(desc.get){ if(desc.set){ str=ctx.stylize('[Getter/Setter]','special');}else { str=ctx.stylize('[Getter]','special');}}else { if(desc.set){ str=ctx.stylize('[Setter]','special');}} if(!hasOwnProperty(visibleKeys,key)){ name='['+key+']';} if(!str){ if(ctx.seen.indexOf(desc.value)<0){ if(isNull(recurseTimes)){ str=formatValue(ctx,desc.value,null);}else { str=formatValue(ctx,desc.value,recurseTimes-1);} if(str.indexOf('\n')>-1){ if(array){ str=str.split('\n').map(function(line){ return ' '+line;}). join('\n').substr(2);}else { str='\n'+str.split('\n').map(function(line){ return ' '+line;}). join('\n');}}}else { str=ctx.stylize('[Circular]','special');}} if(isUndefined(name)){ if(array&&key.match(/^\d+$/)){ return str;} name=JSON.stringify(''+key); if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){ name=name.substr(1,name.length-2); name=ctx.stylize(name,'name');}else { name=name.replace(/'/g,"\\'"). replace(/\\"/g,'"'). replace(/(^"|"$)/g,"'"); name=ctx.stylize(name,'string');}} return name+': '+str;} function reduceToSingleString(output,base,braces){ var numLinesEst=0; var length=output.reduce(function(prev,cur){ numLinesEst++; if(cur.indexOf('\n')>=0)numLinesEst++; return prev+cur.replace(/\u001b\[\d\d?m/g,'').length+1;}, 0); if(length>60){ return braces[0]+( base===''?'':base+'\n ')+ ' '+ output.join(',\n ')+ ' '+ braces[1];} return braces[0]+base+' '+output.join(', ')+' '+braces[1];} function isArray(ar){ return Array.isArray(ar);} function isBoolean(arg){ return typeof arg==='boolean';} function isNull(arg){ return arg===null;} function isNullOrUndefined(arg){ return arg==null;} function isNumber(arg){ return typeof arg==='number';} function isString(arg){ return typeof arg==='string';} function isSymbol(arg){ return typeof arg==='symbol';} function isUndefined(arg){ return arg===void 0;} function isRegExp(re){ return isObject(re)&&objectToString(re)==='[object RegExp]';} function isObject(arg){ return typeof arg==='object'&&arg!==null;} function isDate(d){ return isObject(d)&&objectToString(d)==='[object Date]';} function isError(e){ return isObject(e)&&( objectToString(e)==='[object Error]'||e instanceof Error);} function isFunction(arg){ return typeof arg==='function';} function isPrimitive(arg){ return arg===null|| typeof arg==='boolean'|| typeof arg==='number'|| typeof arg==='string'|| typeof arg==='symbol'|| typeof arg==='undefined';} function objectToString(o){ return Object.prototype.toString.call(o);} function hasOwnProperty(obj,prop){ return Object.prototype.hasOwnProperty.call(obj,prop);} return inspect;}(); var OBJECT_COLUMN_NAME='(index)'; var LOG_LEVELS={ trace:0, info:1, warn:2, error:3}; function setupConsole(global){ if(!global.nativeLoggingHook){ return;} function getNativeLogFunction(level){ return function(){ var str; if(arguments.length===1&&typeof arguments[0]==='string'){ str=arguments[0];}else { str=Array.prototype.map.call(arguments,function(arg){ return inspect(arg,{depth:10});}). join(', ');} var logLevel=level; if(str.slice(0,9)==='Warning: '&&logLevel>=LOG_LEVELS.error){ logLevel=LOG_LEVELS.warn;} global.nativeLoggingHook(str,logLevel);};} var repeat=function repeat(element,n){ return Array.apply(null,Array(n)).map(function(){return element;});}; function consoleTablePolyfill(rows){ if(!Array.isArray(rows)){ var data=rows; rows=[]; for(var key in data){ if(data.hasOwnProperty(key)){ var row=data[key]; row[OBJECT_COLUMN_NAME]=key; rows.push(row);}}} if(rows.length===0){ global.nativeLoggingHook('',LOG_LEVELS.info); return;} var columns=Object.keys(rows[0]).sort(); var stringRows=[]; var columnWidths=[]; columns.forEach(function(k,i){ columnWidths[i]=k.length; for(var j=0;j<rows.length;j++){ var cellStr=rows[j][k].toString(); stringRows[j]=stringRows[j]||[]; stringRows[j][i]=cellStr; columnWidths[i]=Math.max(columnWidths[i],cellStr.length);}}); var joinRow=function joinRow(row,space){ var cells=row.map(function(cell,i){ var extraSpaces=repeat(' ',columnWidths[i]-cell.length).join(''); return cell+extraSpaces;}); space=space||' '; return cells.join(space+'|'+space);}; var separators=columnWidths.map(function(columnWidth){ return repeat('-',columnWidth).join('');}); var separatorRow=joinRow(separators,'-'); var header=joinRow(columns); var table=[header,separatorRow]; for(var i=0;i<rows.length;i++){ table.push(joinRow(stringRows[i]));} global.nativeLoggingHook('\n'+table.join('\n'),LOG_LEVELS.info);} var originalConsole=global.console; var descriptor=Object.getOwnPropertyDescriptor(global,'console'); if(descriptor){ Object.defineProperty(global,'originalConsole',descriptor);} var console={ error:getNativeLogFunction(LOG_LEVELS.error), info:getNativeLogFunction(LOG_LEVELS.info), log:getNativeLogFunction(LOG_LEVELS.info), warn:getNativeLogFunction(LOG_LEVELS.warn), trace:getNativeLogFunction(LOG_LEVELS.trace), debug:getNativeLogFunction(LOG_LEVELS.trace), table:consoleTablePolyfill}; Object.defineProperty(global,'console',{ value:console, configurable:descriptor?descriptor.configurable:true, enumerable:descriptor?descriptor.enumerable:true, writable:descriptor?descriptor.writable:true}); if(__DEV__&&originalConsole){ Object.keys(console).forEach(function(methodName){ var reactNativeMethod=console[methodName]; if(originalConsole[methodName]){ console[methodName]=function(){ originalConsole[methodName].apply(originalConsole,arguments); reactNativeMethod.apply(console,arguments);};}});}} if(typeof module!=='undefined'){ module.exports=setupConsole;}else { setupConsole(global);} })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); (function(global) {var ErrorUtils={ _inGuard:0, _globalHandler:null, setGlobalHandler:function setGlobalHandler(fun){ ErrorUtils._globalHandler=fun;}, getGlobalHandler:function getGlobalHandler(){ return ErrorUtils._globalHandler;}, reportError:function reportError(error){ ErrorUtils._globalHandler&&ErrorUtils._globalHandler(error);}, reportFatalError:function reportFatalError(error){ ErrorUtils._globalHandler&&ErrorUtils._globalHandler(error,true);}, applyWithGuard:function applyWithGuard(fun,context,args){ try{ ErrorUtils._inGuard++; return fun.apply(context,args);} catch(e){ ErrorUtils.reportError(e);}finally { ErrorUtils._inGuard--;}}, applyWithGuardIfNeeded:function applyWithGuardIfNeeded(fun,context,args){ if(ErrorUtils.inGuard()){ return fun.apply(context,args);}else { ErrorUtils.applyWithGuard(fun,context,args);}}, inGuard:function inGuard(){ return ErrorUtils._inGuard;}, guard:function guard(fun,name,context){ if(typeof fun!=='function'){ console.warn('A function must be passed to ErrorUtils.guard, got ',fun); return null;} name=name||fun.name||'<generated guard>'; function guarded(){ return ( ErrorUtils.applyWithGuard( fun, context||this, arguments, null, name));} return guarded;}}; global.ErrorUtils=ErrorUtils; function setupErrorGuard(){ var onError=function onError(e){ throw e;}; global.ErrorUtils.setGlobalHandler(onError);} setupErrorGuard(); })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); (function(global) {if( Number.EPSILON===undefined){ Object.defineProperty(Number,'EPSILON',{ value:Math.pow(2,-52)});} if(Number.MAX_SAFE_INTEGER===undefined){ Object.defineProperty(Number,'MAX_SAFE_INTEGER',{ value:Math.pow(2,53)-1});} if(Number.MIN_SAFE_INTEGER===undefined){ Object.defineProperty(Number,'MIN_SAFE_INTEGER',{ value:-(Math.pow(2,53)-1)});} if(!Number.isNaN){(function(){ var globalIsNaN=global.isNaN; Object.defineProperty(Number,'isNaN',{ configurable:true, enumerable:false, value:function isNaN(value){ return typeof value==='number'&&globalIsNaN(value);}, writable:true});})();} })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); (function(global) {if( !String.prototype.startsWith){ String.prototype.startsWith=function(search){ 'use strict'; if(this==null){ throw TypeError();} var string=String(this); var pos=arguments.length>1? Number(arguments[1])||0:0; var start=Math.min(Math.max(pos,0),string.length); return string.indexOf(String(search),pos)===start;};} if(!String.prototype.endsWith){ String.prototype.endsWith=function(search){ 'use strict'; if(this==null){ throw TypeError();} var string=String(this); var stringLength=string.length; var searchString=String(search); var pos=arguments.length>1? Number(arguments[1])||0:stringLength; var end=Math.min(Math.max(pos,0),stringLength); var start=end-searchString.length; if(start<0){ return false;} return string.lastIndexOf(searchString,start)===start;};} if(!String.prototype.repeat){ String.prototype.repeat=function(count){ 'use strict'; if(this==null){ throw TypeError();} var string=String(this); count=Number(count)||0; if(count<0||count===Infinity){ throw RangeError();} if(count===1){ return string;} var result=''; while(count){ if(count&1){ result+=string;} if(count>>=1){ string+=string;}} return result;};} if(!String.prototype.includes){ String.prototype.includes=function(search,start){ 'use strict'; if(typeof start!=='number'){ start=0;} if(start+search.length>this.length){ return false;}else { return this.indexOf(search,start)!==-1;}};} })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); (function(global) {function findIndex(predicate,context){ if(this==null){ throw new TypeError( 'Array.prototype.findIndex called on null or undefined');} if(typeof predicate!=='function'){ throw new TypeError('predicate must be a function');} var list=Object(this); var length=list.length>>>0; for(var i=0;i<length;i++){ if(predicate.call(context,list[i],i,list)){ return i;}} return -1;} if(!Array.prototype.findIndex){ Object.defineProperty(Array.prototype,'findIndex',{ enumerable:false, writable:true, configurable:true, value:findIndex});} if(!Array.prototype.find){ Object.defineProperty(Array.prototype,'find',{ enumerable:false, writable:true, configurable:true, value:function value(predicate,context){ if(this==null){ throw new TypeError( 'Array.prototype.find called on null or undefined');} var index=findIndex.call(this,predicate,context); return index===-1?undefined:this[index];}});} if(!Array.prototype.includes){ Object.defineProperty(Array.prototype,'includes',{ enumerable:false, writable:true, configurable:true, value:function value(searchElement){ var O=Object(this); var len=parseInt(O.length)||0; if(len===0){ return false;} var n=parseInt(arguments[1])||0; var k; if(n>=0){ k=n;}else { k=len+n; if(k<0){ k=0;}} var currentElement; while(k<len){ currentElement=O[k]; if(searchElement===currentElement|| searchElement!==searchElement&&currentElement!==currentElement){ return true;} k++;} return false;}});} })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); (function(global) {if( !Array.from){ Array.from=function(arrayLike){ if(arrayLike==null){ throw new TypeError('Object is null or undefined');} var mapFn=arguments[1]; var thisArg=arguments[2]; var C=this; var items=Object(arrayLike); var symbolIterator=typeof Symbol==='function'?typeof Symbol==='function'? Symbol.iterator:'@@iterator': '@@iterator'; var mapping=typeof mapFn==='function'; var usingIterator=typeof items[symbolIterator]==='function'; var key=0; var ret; var value; if(usingIterator){ ret=typeof C==='function'? new C(): []; var it=items[symbolIterator](); var next; while(!(next=it.next()).done){ value=next.value; if(mapping){ value=mapFn.call(thisArg,value,key);} ret[key]=value; key+=1;} ret.length=key; return ret;} var len=items.length; if(isNaN(len)||len<0){ len=0;} ret=typeof C==='function'? new C(len): new Array(len); while(key<len){ value=items[key]; if(mapping){ value=mapFn.call(thisArg,value,key);} ret[key]=value; key+=1;} ret.length=key; return ret;};} })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); (function(global) {( function(){ var hasOwnProperty=Object.prototype.hasOwnProperty; if(typeof Object.entries!=='function'){ Object.entries=function(object){ if(object==null){ throw new TypeError('Object.entries called on non-object');} var entries=[]; for(var key in object){ if(hasOwnProperty.call(object,key)){ entries.push([key,object[key]]);}} return entries;};} if(typeof Object.values!=='function'){ Object.values=function(object){ if(object==null){ throw new TypeError('Object.values called on non-object');} var values=[]; for(var key in object){ if(hasOwnProperty.call(object,key)){ values.push(object[key]);}} return values;};}})(); })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); (function(global) {var babelHelpers=global.babelHelpers={}; babelHelpers.createRawReactElement=function(){ var REACT_ELEMENT_TYPE=typeof Symbol==="function"&&(typeof Symbol==="function"?Symbol.for:"@@for")&&(typeof Symbol==="function"?Symbol.for:"@@for")("react.element")||0xeac7; return function createRawReactElement(type,key,props){ return { $$typeof:REACT_ELEMENT_TYPE, type:type, key:key, ref:null, props:props, _owner:null};};}(); babelHelpers.classCallCheck=function(instance,Constructor){ if(!(instance instanceof Constructor)){ throw new TypeError("Cannot call a class as a function");}}; babelHelpers.createClass=function(){ function defineProperties(target,props){ for(var i=0;i<props.length;i++){ var descriptor=props[i]; descriptor.enumerable=descriptor.enumerable||false; descriptor.configurable=true; if("value" in descriptor)descriptor.writable=true; Object.defineProperty(target,descriptor.key,descriptor);}} return function(Constructor,protoProps,staticProps){ if(protoProps)defineProperties(Constructor.prototype,protoProps); if(staticProps)defineProperties(Constructor,staticProps); return Constructor;};}(); babelHelpers.defineProperty=function(obj,key,value){ if(key in obj){ Object.defineProperty(obj,key,{ value:value, enumerable:true, configurable:true, writable:true});}else { obj[key]=value;} return obj;}; babelHelpers._extends=babelHelpers.extends=Object.assign||function(target){ for(var i=1;i<arguments.length;i++){ var source=arguments[i]; for(var key in source){ if(Object.prototype.hasOwnProperty.call(source,key)){ target[key]=source[key];}}} return target;}; babelHelpers.get=function get(object,property,receiver){ if(object===null)object=Function.prototype; var desc=Object.getOwnPropertyDescriptor(object,property); if(desc===undefined){ var parent=Object.getPrototypeOf(object); if(parent===null){ return undefined;}else { return get(parent,property,receiver);}}else if("value" in desc){ return desc.value;}else { var getter=desc.get; if(getter===undefined){ return undefined;} return getter.call(receiver);}}; babelHelpers.inherits=function(subClass,superClass){ if(typeof superClass!=="function"&&superClass!==null){ throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);} subClass.prototype=Object.create(superClass&&superClass.prototype,{ constructor:{ value:subClass, enumerable:false, writable:true, configurable:true}}); if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}; babelHelpers.interopRequireDefault=function(obj){ return obj&&obj.__esModule?obj:{ default:obj};}; babelHelpers.interopRequireWildcard=function(obj){ if(obj&&obj.__esModule){ return obj;}else { var newObj={}; if(obj!=null){ for(var key in obj){ if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}} newObj.default=obj; return newObj;}}; babelHelpers.objectWithoutProperties=function(obj,keys){ var target={}; for(var i in obj){ if(keys.indexOf(i)>=0)continue; if(!Object.prototype.hasOwnProperty.call(obj,i))continue; target[i]=obj[i];} return target;}; babelHelpers.possibleConstructorReturn=function(self,call){ if(!self){ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");} return call&&(typeof call==="object"||typeof call==="function")?call:self;}; babelHelpers.slicedToArray=function(){ function sliceIterator(arr,i){ var _arr=[]; var _n=true; var _d=false; var _e=undefined; try{ for(var _i=arr[typeof Symbol==="function"?Symbol.iterator:"@@iterator"](),_s;!(_n=(_s=_i.next()).done);_n=true){ _arr.push(_s.value); if(i&&_arr.length===i)break;}} catch(err){ _d=true; _e=err;}finally { try{ if(!_n&&_i["return"])_i["return"]();}finally { if(_d)throw _e;}} return _arr;} return function(arr,i){ if(Array.isArray(arr)){ return arr;}else if((typeof Symbol==="function"?Symbol.iterator:"@@iterator") in Object(arr)){ return sliceIterator(arr,i);}else { throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}(); babelHelpers.taggedTemplateLiteral=function(strings,raw){ return Object.freeze(Object.defineProperties(strings,{ raw:{ value:Object.freeze(raw)}}));}; babelHelpers.toArray=function(arr){ return Array.isArray(arr)?arr:Array.from(arr);}; babelHelpers.toConsumableArray=function(arr){ if(Array.isArray(arr)){ for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i];} return arr2;}else { return Array.from(arr);}}; })(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this); __d(0 /* react-native/ReactAndroid/src/androidTest/js/TestBundle.js */, function(global, require, module, exports) {'use strict'; console.disableYellowBox=true; require(12 /* ProgressBarTestModule */); require(391 /* ViewRenderingTestModule */); require(392 /* TestJavaToJSArgumentsModule */); require(394 /* TestJSLocaleModule */); require(395 /* TestJSToJavaParametersModule */); require(396 /* CatalystRootViewTestModule */); require(397 /* DatePickerDialogTestModule */); require(399 /* MeasureLayoutTestModule */); require(400 /* PickerAndroidTestModule */); require(404 /* ScrollViewTestModule */); require(405 /* SwipeRefreshLayoutTestModule */); require(407 /* TextInputTestModule */); require(415 /* TimePickerDialogTestModule */); var AppRegistry=require(417 /* AppRegistry */); var apps=[ { appKey:'CatalystRootViewTestApp', component:function component(){return require(396 /* CatalystRootViewTestModule */).CatalystRootViewTestApp;}}, { appKey:'DatePickerDialogTestApp', component:function component(){return require(397 /* DatePickerDialogTestModule */).DatePickerDialogTestApp;}}, { appKey:'JSResponderTestApp', component:function component(){return require(423 /* JSResponderTestApp */);}}, { appKey:'HorizontalScrollViewTestApp', component:function component(){return require(404 /* ScrollViewTestModule */).HorizontalScrollViewTestApp;}}, { appKey:'InitialPropsTestApp', component:function component(){return require(429 /* InitialPropsTestApp */);}}, { appKey:'LayoutEventsTestApp', component:function component(){return require(430 /* LayoutEventsTestApp */);}}, { appKey:'MeasureLayoutTestApp', component:function component(){return require(399 /* MeasureLayoutTestModule */).MeasureLayoutTestApp;}}, { appKey:'MultitouchHandlingTestAppModule', component:function component(){return require(431 /* MultitouchHandlingTestAppModule */);}}, { appKey:'PickerAndroidTestApp', component:function component(){return require(400 /* PickerAndroidTestModule */).PickerAndroidTestApp;}}, { appKey:'ScrollViewTestApp', component:function component(){return require(404 /* ScrollViewTestModule */).ScrollViewTestApp;}}, { appKey:'SubviewsClippingTestApp', component:function component(){return require(432 /* SubviewsClippingTestModule */).App;}}, { appKey:'SwipeRefreshLayoutTestApp', component:function component(){return require(405 /* SwipeRefreshLayoutTestModule */).SwipeRefreshLayoutTestApp;}}, { appKey:'TextInputTestApp', component:function component(){return require(407 /* TextInputTestModule */).TextInputTestApp;}}, { appKey:'TestIdTestApp', component:function component(){return require(433 /* TestIdTestModule */).TestIdTestApp;}}, { appKey:'TimePickerDialogTestApp', component:function component(){return require(415 /* TimePickerDialogTestModule */).TimePickerDialogTestApp;}}, { appKey:'TouchBubblingTestAppModule', component:function component(){return require(450 /* TouchBubblingTestAppModule */);}}]; module.exports=apps; AppRegistry.registerConfig(apps); }, "react-native/ReactAndroid/src/androidTest/js/TestBundle.js"); __d(12 /* ProgressBarTestModule */, function(global, require, module, exports) {"use strict";var _jsxFileName='/home/ubuntu/react-native/ReactAndroid/src/androidTest/js/ProgressBarTestModule.js'; var BatchedBridge=require(13 /* BatchedBridge */); var React=require(56 /* React */); var ProgressBar=require(79 /* ProgressBarAndroid */); var View=require(93 /* View */); var renderApplication=require(165 /* renderApplication */); var ProgressBarSampleApp=React.createClass({displayName:'ProgressBarSampleApp', render:function render(){ return ( React.createElement(View,{__source:{fileName:_jsxFileName,lineNumber:24}}, React.createElement(ProgressBar,{styleAttr:'Horizontal',testID:'Horizontal',__source:{fileName:_jsxFileName,lineNumber:25}}), React.createElement(ProgressBar,{styleAttr:'Small',testID:'Small',__source:{fileName:_jsxFileName,lineNumber:26}}), React.createElement(ProgressBar,{styleAttr:'Large',testID:'Large',__source:{fileName:_jsxFileName,lineNumber:27}}), React.createElement(ProgressBar,{styleAttr:'Normal',testID:'Normal',__source:{fileName:_jsxFileName,lineNumber:28}}), React.createElement(ProgressBar,{styleAttr:'Inverse',testID:'Inverse',__source:{fileName:_jsxFileName,lineNumber:29}}), React.createElement(ProgressBar,{styleAttr:'SmallInverse',testID:'SmallInverse',__source:{fileName:_jsxFileName,lineNumber:30}}), React.createElement(ProgressBar,{styleAttr:'LargeInverse',testID:'LargeInverse',__source:{fileName:_jsxFileName,lineNumber:31}}), React.createElement(View,{style:{width:200},__source:{fileName:_jsxFileName,lineNumber:32}}, React.createElement(ProgressBar,{styleAttr:'Horizontal',testID:'Horizontal200',__source:{fileName:_jsxFileName,lineNumber:33}}))));}, getInitialState:function getInitialState(){ return {};}}); var ProgressBarTestModule={ renderProgressBarApplication:function renderProgressBarApplication(rootTag){ renderApplication(ProgressBarSampleApp,{},rootTag);}}; BatchedBridge.registerCallableModule( 'ProgressBarTestModule', ProgressBarTestModule); module.exports=ProgressBarTestModule; }, "ProgressBarTestModule"); __d(13 /* BatchedBridge */, function(global, require, module, exports) {'use strict'; var MessageQueue=require(14 /* MessageQueue */); var BatchedBridge=new MessageQueue( function(){return global.__fbBatchedBridgeConfig;}); var Systrace=require(15 /* Systrace */); var JSTimersExecution=require(29 /* JSTimersExecution */); BatchedBridge.registerCallableModule('Systrace',Systrace); BatchedBridge.registerCallableModule('JSTimersExecution',JSTimersExecution); BatchedBridge.registerCallableModule('HeapCapture',require(34 /* HeapCapture */)); if(__DEV__){ BatchedBridge.registerCallableModule('HMRClient',require(35 /* HMRClient */));} Object.defineProperty(global,'__fbBatchedBridge',{value:BatchedBridge}); module.exports=BatchedBridge; }, "BatchedBridge"); __d(14 /* MessageQueue */, function(global, require, module, exports) {'use strict'; var Systrace=require(15 /* Systrace */); var ErrorUtils=require(28 /* ErrorUtils */); var JSTimersExecution=require(29 /* JSTimersExecution */); var invariant=require(19 /* fbjs/lib/invariant */); var keyMirror=require(30 /* fbjs/lib/keyMirror */); var stringifySafe=require(33 /* stringifySafe */); var MODULE_IDS=0; var METHOD_IDS=1; var PARAMS=2; var MIN_TIME_BETWEEN_FLUSHES_MS=5; var TRACE_TAG_REACT_APPS=1<<17; var SPY_MODE=false; var MethodTypes=keyMirror({ remote:null, remoteAsync:null, syncHook:null}); var guard=function guard(fn){ try{ fn();} catch(error){ ErrorUtils.reportFatalError(error);}};var MessageQueue=function(){ function MessageQueue(configProvider){var _this=this;babelHelpers.classCallCheck(this,MessageQueue); this._callableModules={}; this._queue=[[],[],[],0]; this._callbacks=[]; this._callbackID=0; this._callID=0; this._lastFlush=0; this._eventLoopStartTime=new Date().getTime(); if(__DEV__){ this._debugInfo={}; this._remoteModuleTable={}; this._remoteMethodTable={};} [ 'invokeCallbackAndReturnFlushedQueue', 'callFunctionReturnFlushedQueue', 'flushedQueue']. forEach(function(fn){return _this[fn]=_this[fn].bind(_this);}); lazyProperty(this,'RemoteModules',function(){var _configProvider= configProvider();var remoteModuleConfig=_configProvider.remoteModuleConfig; var modulesConfig=_this._genModulesConfig(remoteModuleConfig); var modules=_this._genModules(modulesConfig); if(__DEV__){ _this._genLookupTables( modulesConfig,_this._remoteModuleTable,_this._remoteMethodTable);} return modules;});}babelHelpers.createClass(MessageQueue,[{key:'callFunctionReturnFlushedQueue',value:function callFunctionReturnFlushedQueue( module,method,args){var _this2=this; guard(function(){ _this2.__callFunction(module,method,args); _this2.__callImmediates();}); return this.flushedQueue();}},{key:'invokeCallbackAndReturnFlushedQueue',value:function invokeCallbackAndReturnFlushedQueue( cbID,args){var _this3=this; guard(function(){ _this3.__invokeCallback(cbID,args); _this3.__callImmediates();}); return this.flushedQueue();}},{key:'flushedQueue',value:function flushedQueue() { this.__callImmediates(); var queue=this._queue; this._queue=[[],[],[],this._callID]; return queue[0].length?queue:null;}},{key:'processModuleConfig',value:function processModuleConfig( config,moduleID){ var info=this._genModule(config,moduleID); this.RemoteModules[info.name]=info.module; if(__DEV__){ this._genLookup(config,moduleID,this._remoteModuleTable,this._remoteMethodTable);} return info.module;}},{key:'getEventLoopRunningTime',value:function getEventLoopRunningTime() { return new Date().getTime()-this._eventLoopStartTime;}},{key:'__callImmediates',value:function __callImmediates() { Systrace.beginEvent('JSTimersExecution.callImmediates()'); guard(function(){return JSTimersExecution.callImmediates();}); Systrace.endEvent();}},{key:'__nativeCall',value:function __nativeCall( module,method,params,onFail,onSucc){ if(onFail||onSucc){ if(__DEV__){ this._callbackID>1<<5&&( this._debugInfo[this._callbackID>>5]=null); this._debugInfo[this._callbackID>>1]=[module,method];} onFail&&params.push(this._callbackID); this._callbacks[this._callbackID++]=onFail; onSucc&&params.push(this._callbackID); this._callbacks[this._callbackID++]=onSucc;} global.nativeTraceBeginAsyncFlow&& global.nativeTraceBeginAsyncFlow(TRACE_TAG_REACT_APPS,'native',this._callID); this._callID++; this._queue[MODULE_IDS].push(module); this._queue[METHOD_IDS].push(method); this._queue[PARAMS].push(params); var now=new Date().getTime(); if(global.nativeFlushQueueImmediate&& now-this._lastFlush>=MIN_TIME_BETWEEN_FLUSHES_MS){ global.nativeFlushQueueImmediate(this._queue); this._queue=[[],[],[],this._callID]; this._lastFlush=now;} Systrace.counterEvent('pending_js_to_native_queue',this._queue[0].length); if(__DEV__&&SPY_MODE&&isFinite(module)){ console.log('JS->N : '+this._remoteModuleTable[module]+'.'+ this._remoteMethodTable[module][method]+'('+JSON.stringify(params)+')');}}},{key:'__callFunction',value:function __callFunction( module,method,args){ this._lastFlush=new Date().getTime(); this._eventLoopStartTime=this._lastFlush; Systrace.beginEvent(module+'.'+method+'()'); if(__DEV__&&SPY_MODE){ console.log('N->JS : '+module+'.'+method+'('+JSON.stringify(args)+')');} var moduleMethods=this._callableModules[module]; invariant( !!moduleMethods, 'Module %s is not a registered callable module.', module); moduleMethods[method].apply(moduleMethods,args); Systrace.endEvent();}},{key:'__invokeCallback',value:function __invokeCallback( cbID,args){ this._lastFlush=new Date().getTime(); this._eventLoopStartTime=this._lastFlush; var callback=this._callbacks[cbID]; if(__DEV__){ var debug=this._debugInfo[cbID>>1]; var _module=debug&&this._remoteModuleTable[debug[0]]; var method=debug&&this._remoteMethodTable[debug[0]][debug[1]]; if(!callback){ var errorMessage='Callback with id '+cbID+': '+_module+'.'+method+'() not found'; if(method){ errorMessage='The callback '+method+'() exists in module '+_module+', '+'but only one callback may be registered to a function in a native module.';} invariant( callback, errorMessage);} var profileName=debug?'<callback for '+_module+'.'+method+'>':cbID; if(callback&&SPY_MODE&&__DEV__){ console.log('N->JS : '+profileName+'('+JSON.stringify(args)+')');} Systrace.beginEvent('MessageQueue.invokeCallback('+ profileName+', '+stringifySafe(args)+')');}else { if(!callback){ return;}} this._callbacks[cbID&~1]=null; this._callbacks[cbID|1]=null; callback.apply(null,args); if(__DEV__){ Systrace.endEvent();}}},{key:'_genModulesConfig',value:function _genModulesConfig( modules){ if(Array.isArray(modules)){ return modules;}else { var moduleArray=[]; var moduleNames=Object.keys(modules); for(var i=0,l=moduleNames.length;i<l;i++){ var moduleName=moduleNames[i]; var moduleConfig=modules[moduleName]; var _module2=[moduleName]; if(moduleConfig.constants){ _module2.push(moduleConfig.constants);} var methodsConfig=moduleConfig.methods; if(methodsConfig){ var methods=[]; var asyncMethods=[]; var syncHooks=[]; var methodNames=Object.keys(methodsConfig); for(var j=0,ll=methodNames.length;j<ll;j++){ var methodName=methodNames[j]; var methodConfig=methodsConfig[methodName]; methods[methodConfig.methodID]=methodName; if(methodConfig.type===MethodTypes.remoteAsync){ asyncMethods.push(methodConfig.methodID);}else if(methodConfig.type===MethodTypes.syncHook){ syncHooks.push(methodConfig.methodID);}} if(methods.length){ _module2.push(methods); _module2.push(asyncMethods); _module2.push(syncHooks);}} moduleArray[moduleConfig.moduleID]=_module2;} return moduleArray;}}},{key:'_genLookupTables',value:function _genLookupTables( modulesConfig,moduleTable,methodTable){var _this4=this; modulesConfig.forEach(function(config,moduleID){ _this4._genLookup(config,moduleID,moduleTable,methodTable);});}},{key:'_genLookup',value:function _genLookup( config,moduleID,moduleTable,methodTable){ if(!config){ return;} var moduleName=void 0,methods=void 0; if(moduleHasConstants(config)){var _config=babelHelpers.slicedToArray( config,3);moduleName=_config[0];methods=_config[2];}else {var _config2=babelHelpers.slicedToArray( config,2);moduleName=_config2[0];methods=_config2[1];} moduleTable[moduleID]=moduleName; methodTable[moduleID]=babelHelpers.extends({},methods);}},{key:'_genModules',value:function _genModules( remoteModules){var _this5=this; var modules={}; remoteModules.forEach(function(config,moduleID){ var info=_this5._genModule(config,moduleID); if(info){ modules[info.name]=info.module;}}); return modules;}},{key:'_genModule',value:function _genModule( config,moduleID){var _this6=this; if(!config){ return null;} var moduleName=void 0,constants=void 0,methods=void 0,asyncMethods=void 0,syncHooks=void 0; if(moduleHasConstants(config)){var _config3=babelHelpers.slicedToArray( config,5);moduleName=_config3[0];constants=_config3[1];methods=_config3[2];asyncMethods=_config3[3];syncHooks=_config3[4];}else {var _config4=babelHelpers.slicedToArray( config,4);moduleName=_config4[0];methods=_config4[1];asyncMethods=_config4[2];syncHooks=_config4[3];} var module={}; methods&&methods.forEach(function(methodName,methodID){ var isAsync=asyncMethods&&arrayContains(asyncMethods,methodID); var isSyncHook=syncHooks&&arrayContains(syncHooks,methodID); invariant(!isAsync||!isSyncHook,'Cannot have a method that is both async and a sync hook'); var methodType=isAsync?MethodTypes.remoteAsync: isSyncHook?MethodTypes.syncHook: MethodTypes.remote; module[methodName]=_this6._genMethod(moduleID,methodID,methodType);}); babelHelpers.extends(module,constants); if(!constants&&!methods&&!asyncMethods){ module.moduleID=moduleID;} return {name:moduleName,module:module};}},{key:'_genMethod',value:function _genMethod( module,method,type){ var fn=null; var self=this; if(type===MethodTypes.remoteAsync){ fn=function fn(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];} return new Promise(function(resolve,reject){ self.__nativeCall( module, method, args, function(data){ resolve(data);}, function(errorData){ var error=createErrorFromErrorData(errorData); reject(error);});});};}else if(type===MethodTypes.syncHook){ return function(){for(var _len2=arguments.length,args=Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];} return global.nativeCallSyncHook(module,method,args);};}else { fn=function fn(){for(var _len3=arguments.length,args=Array(_len3),_key3=0;_key3<_len3;_key3++){args[_key3]=arguments[_key3];} var lastArg=args.length>0?args[args.length-1]:null; var secondLastArg=args.length>1?args[args.length-2]:null; var hasSuccCB=typeof lastArg==='function'; var hasErrorCB=typeof secondLastArg==='function'; hasErrorCB&&invariant( hasSuccCB, 'Cannot have a non-function arg after a function arg.'); var numCBs=hasSuccCB+hasErrorCB; var onSucc=hasSuccCB?lastArg:null; var onFail=hasErrorCB?secondLastArg:null; args=args.slice(0,args.length-numCBs); return self.__nativeCall(module,method,args,onFail,onSucc);};} fn.type=type; return fn;}},{key:'registerCallableModule',value:function registerCallableModule( name,methods){ this._callableModules[name]=methods;}}]);return MessageQueue;}(); function moduleHasConstants(moduleArray){ return !Array.isArray(moduleArray[1]);} function arrayContains(array,value){ return array.indexOf(value)!==-1;} function createErrorFromErrorData(errorData){var message= errorData.message;var extraErrorInfo=babelHelpers.objectWithoutProperties(errorData,['message']); var error=new Error(message); error.framesToPop=1; return babelHelpers.extends(error,extraErrorInfo);} function lazyProperty(target,name,f){ Object.defineProperty(target,name,{ configurable:true, enumerable:true, get:function get(){ var value=f(); Object.defineProperty(target,name,{ configurable:true, enumerable:true, writeable:true, value:value}); return value;}});} module.exports=MessageQueue; }, "MessageQueue"); __d(15 /* Systrace */, function(global, require, module, exports) {'use strict'; var TRACE_TAG_REACT_APPS=1<<17; var TRACE_TAG_JSC_CALLS=1<<27; var _enabled=false; var _asyncCookie=0; var ReactSystraceDevtool=__DEV__?{ onBeginReconcilerTimer:function onBeginReconcilerTimer(debugID,timerType){ var displayName=require(16 /* ReactComponentTreeDevtool */).getDisplayName(debugID); Systrace.beginEvent('ReactReconciler.'+timerType+'('+displayName+')');}, onEndReconcilerTimer:function onEndReconcilerTimer(debugID,timerType){ Systrace.endEvent();}, onBeginLifeCycleTimer:function onBeginLifeCycleTimer(debugID,timerType){ var displayName=require(16 /* ReactComponentTreeDevtool */).getDisplayName(debugID); Systrace.beginEvent(displayName+'.'+timerType+'()');}, onEndLifeCycleTimer:function onEndLifeCycleTimer(debugID,timerType){ Systrace.endEvent();}}: null; var Systrace={ setEnabled:function setEnabled(enabled){ if(_enabled!==enabled){ if(__DEV__){ if(enabled){ global.nativeTraceBeginLegacy&&global.nativeTraceBeginLegacy(TRACE_TAG_JSC_CALLS); require(22 /* ReactDebugTool */).addDevtool(ReactSystraceDevtool);}else { global.nativeTraceEndLegacy&&global.nativeTraceEndLegacy(TRACE_TAG_JSC_CALLS); require(22 /* ReactDebugTool */).removeDevtool(ReactSystraceDevtool);}} _enabled=enabled;}}, beginEvent:function beginEvent(profileName,args){ if(_enabled){ profileName=typeof profileName==='function'? profileName():profileName; global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS,profileName,args);}}, endEvent:function endEvent(){ if(_enabled){ global.nativeTraceEndSection(TRACE_TAG_REACT_APPS);}}, beginAsyncEvent:function beginAsyncEvent(profileName){ var cookie=_asyncCookie; if(_enabled){ _asyncCookie++; profileName=typeof profileName==='function'? profileName():profileName; global.nativeTraceBeginAsyncSection(TRACE_TAG_REACT_APPS,profileName,cookie,0);} return cookie;}, endAsyncEvent:function endAsyncEvent(profileName,cookie){ if(_enabled){ profileName=typeof profileName==='function'? profileName():profileName; global.nativeTraceEndAsyncSection(TRACE_TAG_REACT_APPS,profileName,cookie,0);}}, counterEvent:function counterEvent(profileName,value){ if(_enabled){ profileName=typeof profileName==='function'? profileName():profileName; global.nativeTraceCounter&& global.nativeTraceCounter(TRACE_TAG_REACT_APPS,profileName,value);}}, attachToRelayProfiler:function attachToRelayProfiler(relayProfiler){ relayProfiler.attachProfileHandler('*',function(name){ var cookie=Systrace.beginAsyncEvent(name); return function(){ Systrace.endAsyncEvent(name,cookie);};}); relayProfiler.attachAggregateHandler('*',function(name,callback){ Systrace.beginEvent(name); callback(); Systrace.endEvent();});}, swizzleJSON:function swizzleJSON(){ Systrace.measureMethods(JSON,'JSON',[ 'parse', 'stringify']);}, measureMethods:function measureMethods(object,objectName,methodNames){ if(!__DEV__){ return;} methodNames.forEach(function(methodName){ object[methodName]=Systrace.measure( objectName, methodName, object[methodName]);});}, measure:function measure(objName,fnName,func){ if(!__DEV__){ return func;} var profileName=objName+'.'+fnName; return function(){ if(!_enabled){ return func.apply(this,arguments);} Systrace.beginEvent(profileName); var ret=func.apply(this,arguments); Systrace.endEvent(); return ret;};}}; if(__DEV__){ require.Systrace=Systrace;} module.exports=Systrace; }, "Systrace"); __d(16 /* ReactComponentTreeDevtool */, function(global, require, module, exports) {'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var ReactCurrentOwner=require(18 /* ./ReactCurrentOwner */); var invariant=require(19 /* fbjs/lib/invariant */); var warning=require(20 /* fbjs/lib/warning */); var tree={}; var unmountedIDs={}; var rootIDs={}; function updateTree(id,update){ if(!tree[id]){ tree[id]={ element:null, parentID:null, ownerID:null, text:null, childIDs:[], displayName:'Unknown', isMounted:false, updateCount:0}; unmountedIDs[id]=true;} update(tree[id]);} function purgeDeep(id){ var item=tree[id]; if(item){ var childIDs=item.childIDs; delete tree[id]; childIDs.forEach(purgeDeep);}} function describeComponentFrame(name,source,ownerName){ return '\n in '+name+(source?' (at '+source.fileName.replace(/^.*[\\\/]/,'')+':'+source.lineNumber+')':ownerName?' (created by '+ownerName+')':'');} function describeID(id){ var name=ReactComponentTreeDevtool.getDisplayName(id); var element=ReactComponentTreeDevtool.getElement(id); var ownerID=ReactComponentTreeDevtool.getOwnerID(id); var ownerName; if(ownerID){ ownerName=ReactComponentTreeDevtool.getDisplayName(ownerID);} process.env.NODE_ENV!=='production'?warning(element,'ReactComponentTreeDevtool: Missing React element for debugID %s when '+'building stack',id):void 0; return describeComponentFrame(name,element&&element._source,ownerName);} var ReactComponentTreeDevtool={ onSetDisplayName:function onSetDisplayName(id,displayName){ updateTree(id,function(item){ return item.displayName=displayName;});}, onSetChildren:function onSetChildren(id,nextChildIDs){ updateTree(id,function(item){ item.childIDs=nextChildIDs; nextChildIDs.forEach(function(nextChildID){ var nextChild=tree[nextChildID]; !nextChild?process.env.NODE_ENV!=='production'?invariant(false,'Expected devtool events to fire for the child before its parent includes it in onSetChildren().'):_prodInvariant('68'):void 0; !(nextChild.displayName!=null)?process.env.NODE_ENV!=='production'?invariant(false,'Expected onSetDisplayName() to fire for the child before its parent includes it in onSetChildren().'):_prodInvariant('69'):void 0; !(nextChild.childIDs!=null||nextChild.text!=null)?process.env.NODE_ENV!=='production'?invariant(false,'Expected onSetChildren() or onSetText() to fire for the child before its parent includes it in onSetChildren().'):_prodInvariant('70'):void 0; !nextChild.isMounted?process.env.NODE_ENV!=='production'?invariant(false,'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().'):_prodInvariant('71'):void 0; if(nextChild.parentID==null){ nextChild.parentID=id;} !(nextChild.parentID===id)?process.env.NODE_ENV!=='production'?invariant(false,'Expected onSetParent() and onSetChildren() to be consistent (%s has parents %s and %s).',nextChildID,nextChild.parentID,id):_prodInvariant('72',nextChildID,nextChild.parentID,id):void 0;});});}, onSetOwner:function onSetOwner(id,ownerID){ updateTree(id,function(item){ return item.ownerID=ownerID;});}, onSetParent:function onSetParent(id,parentID){ updateTree(id,function(item){ return item.parentID=parentID;});}