UNPKG

react-native

Version:

A framework for building native apps using React

2,624 lines (1,383 loc) • 722 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); 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();}} function _require(moduleId){ var module=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; 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(!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_'+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){ global.console.error('Error: '+e.message+', stack:\n'+e.stack);}; 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];}});} })(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(1 /* ScrollViewTestModule */); require(185 /* PickerAndroidTestModule */); var AppRegistry=require(189 /* AppRegistry */); var apps=[ { appKey:'ScrollViewTestApp', component:function component(){return require(1 /* ScrollViewTestModule */).ScrollViewTestApp;}}, { appKey:'HorizontalScrollViewTestApp', component:function component(){return require(1 /* ScrollViewTestModule */).HorizontalScrollViewTestApp;}}, { appKey:'PickerAndroidTestApp', component:function component(){return require(185 /* PickerAndroidTestModule */).PickerAndroidTestApp;}}]; module.exports=apps; AppRegistry.registerConfig(apps); }); __d(1 /* ScrollViewTestModule */, function(global, require, module, exports) {'use strict';var _jsxFileName='/home/ubuntu/react-native/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js'; var BatchedBridge=require(2 /* BatchedBridge */); var React=require(28 /* React */); var View=require(50 /* View */); var ScrollView=require(128 /* ScrollView */); var Text=require(178 /* Text */); var StyleSheet=require(85 /* StyleSheet */); var TouchableWithoutFeedback=require(183 /* TouchableWithoutFeedback */); var ScrollListener=require(9 /* NativeModules */).ScrollListener; var NUM_ITEMS=100; var scrollViewApp; var Item=React.createClass({displayName:'Item', render:function render(){ return ( React.createElement(TouchableWithoutFeedback,{onPress:this.props.onPress,__source:{fileName:_jsxFileName,lineNumber:32}}, React.createElement(View,{style:styles.item_container,__source:{fileName:_jsxFileName,lineNumber:33}}, React.createElement(Text,{style:styles.item_text,__source:{fileName:_jsxFileName,lineNumber:34}},this.props.text))));}}); var getInitialState=function getInitialState(){ var data=[]; for(var i=0;i<NUM_ITEMS;i++){ data[i]={text:'Item '+i+'!'};} return { data:data};}; var onScroll=function onScroll(e){ ScrollListener.onScroll(e.nativeEvent.contentOffset.x,e.nativeEvent.contentOffset.y);}; var onScrollBeginDrag=function onScrollBeginDrag(e){ ScrollListener.onScrollBeginDrag(e.nativeEvent.contentOffset.x,e.nativeEvent.contentOffset.y);}; var onScrollEndDrag=function onScrollEndDrag(e){ ScrollListener.onScrollEndDrag(e.nativeEvent.contentOffset.x,e.nativeEvent.contentOffset.y);}; var onItemPress=function onItemPress(itemNumber){ ScrollListener.onItemPress(itemNumber);}; var ScrollViewTestApp=React.createClass({displayName:'ScrollViewTestApp', getInitialState:getInitialState, onScroll:onScroll, onItemPress:onItemPress, onScrollBeginDrag:onScrollBeginDrag, onScrollEndDrag:onScrollEndDrag, scrollTo:function scrollTo(destX,destY){ this.refs.scrollView.scrollTo(destY,destX);}, render:function render(){var _this=this; scrollViewApp=this; var children=this.state.data.map(function(item,index){return ( React.createElement(Item,{ key:index,text:item.text, onPress:_this.onItemPress.bind(_this,index),__source:{fileName:_jsxFileName,lineNumber:81}}));}); return ( React.createElement(ScrollView,{onScroll:this.onScroll,onScrollBeginDrag:this.onScrollBeginDrag,onScrollEndDrag:this.onScrollEndDrag,ref:'scrollView',__source:{fileName:_jsxFileName,lineNumber:86}}, children));}}); var HorizontalScrollViewTestApp=React.createClass({displayName:'HorizontalScrollViewTestApp', getInitialState:getInitialState, onScroll:onScroll, onItemPress:onItemPress, scrollTo:function scrollTo(destX,destY){ this.refs.scrollView.scrollTo(destY,destX);}, render:function render(){var _this2=this; scrollViewApp=this; var children=this.state.data.map(function(item,index){return ( React.createElement(Item,{ key:index,text:item.text, onPress:_this2.onItemPress.bind(_this2,index),__source:{fileName:_jsxFileName,lineNumber:105}}));}); return ( React.createElement(ScrollView,{horizontal:true,onScroll:this.onScroll,ref:'scrollView',__source:{fileName:_jsxFileName,lineNumber:110}}, children));}}); var styles=StyleSheet.create({ item_container:{ padding:30, backgroundColor:'#ffffff'}, item_text:{ flex:1, fontSize:18, alignSelf:'center'}}); var ScrollViewTestModule={ ScrollViewTestApp:ScrollViewTestApp, HorizontalScrollViewTestApp:HorizontalScrollViewTestApp, scrollTo:function scrollTo(destX,destY){ scrollViewApp.scrollTo(destX,destY);}}; BatchedBridge.registerCallableModule( 'ScrollViewTestModule', ScrollViewTestModule); module.exports=ScrollViewTestModule; }); __d(2 /* BatchedBridge */, function(global, require, module, exports) {'use strict'; var MessageQueue=require(3 /* MessageQueue */); var BatchedBridge=new MessageQueue( __fbBatchedBridgeConfig.remoteModuleConfig, __fbBatchedBridgeConfig.localModulesConfig); var Systrace=require(4 /* Systrace */); var JSTimersExecution=require(7 /* JSTimersExecution */); BatchedBridge.registerCallableModule('Systrace',Systrace); BatchedBridge.registerCallableModule('JSTimersExecution',JSTimersExecution); BatchedBridge.registerCallableModule('HeapCapture',require(12 /* HeapCapture */)); if(__DEV__){ BatchedBridge.registerCallableModule('HMRClient',require(13 /* HMRClient */));} Object.defineProperty(global,'__fbBatchedBridge',{value:BatchedBridge}); module.exports=BatchedBridge; }); __d(3 /* MessageQueue */, function(global, require, module, exports) {'use strict'; var Systrace=require(4 /* Systrace */); var ErrorUtils=require(6 /* ErrorUtils */); var JSTimersExecution=require(7 /* JSTimersExecution */); var Platform=require(10 /* Platform */); var invariant=require(238 /* fbjs/lib/invariant */); var keyMirror=require(234 /* fbjs/lib/keyMirror */); var stringifySafe=require(11 /* stringifySafe */); var MODULE_IDS=0; var METHOD_IDS=1; var PARAMS=2; var CALL_IDS=3; 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(remoteModules,localModules){var _this=this;babelHelpers.classCallCheck(this,MessageQueue); this.RemoteModules={}; this._callableModules={}; this._queue=[[],[],[],0]; this._moduleTable={}; this._methodTable={}; this._callbacks=[]; this._callbackID=0; this._callID=0; this._lastFlush=0; this._eventLoopStartTime=new Date().getTime(); [ 'invokeCallbackAndReturnFlushedQueue', 'callFunctionReturnFlushedQueue', 'flushedQueue']. forEach(function(fn){return _this[fn]=_this[fn].bind(_this);}); var modulesConfig=this._genModulesConfig(remoteModules); this._genModules(modulesConfig); localModules&&this._genLookupTables( this._genModulesConfig(localModules),this._moduleTable,this._methodTable); this._debugInfo={}; this._remoteModuleTable={}; this._remoteMethodTable={}; this._genLookupTables( modulesConfig,this._remoteModuleTable,this._remoteMethodTable);}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 module=this._genModule(config,moduleID); this._genLookup(config,moduleID,this._remoteModuleTable,this._remoteMethodTable); return 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){ 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; if(isFinite(module)){ method=this._methodTable[module][method]; module=this._moduleTable[module];} 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]; 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)+')'); this._callbacks[cbID&~1]=null; this._callbacks[cbID|1]=null; callback.apply(null,args); 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 _module=[moduleName]; if(moduleConfig.constants){ _module.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){ _module.push(methods); _module.push(asyncMethods); _module.push(syncHooks);}} moduleArray[moduleConfig.moduleID]=_module;} 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; remoteModules.forEach(function(config,moduleID){ _this5._genModule(config,moduleID);});}},{key:'_genModule',value:function _genModule( config,moduleID){var _this6=this; if(!config){ return;} 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;} this.RemoteModules[moduleName]=module; return 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);} module.exports=MessageQueue; }); __d(4 /* 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 _ReactPerf=null; function ReactPerf(){ if(!_ReactPerf){ _ReactPerf=require(5 /* ReactPerf */);} return _ReactPerf;} var Systrace={ setEnabled:function setEnabled(enabled){ if(_enabled!==enabled){ if(enabled){ global.nativeTraceBeginLegacy&&global.nativeTraceBeginLegacy(TRACE_TAG_JSC_CALLS);}else { global.nativeTraceEndLegacy&&global.nativeTraceEndLegacy(TRACE_TAG_JSC_CALLS);}} _enabled=enabled; ReactPerf().enableMeasure=enabled;}, beginEvent:function beginEvent(profileName){ if(_enabled){ profileName=typeof profileName==='function'? profileName():profileName; global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS,profileName);}}, 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);}}, reactPerfMeasure:function reactPerfMeasure(objName,fnName,func){ return function(component){ if(!_enabled){ return func.apply(this,arguments);} var name=objName==='ReactCompositeComponent'&&this.getName()||''; Systrace.beginEvent(objName+'.'+fnName+'('+name+')'); var ret=func.apply(this,arguments); Systrace.endEvent(); return ret;};}, swizzleReactPerf:function swizzleReactPerf(){ ReactPerf().injection.injectMeasure(Systrace.reactPerfMeasure);}, 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;};}}; Systrace.setEnabled(global.__RCTProfileIsProfiling||false); if(__DEV__){ require.Systrace=Systrace;} module.exports=Systrace; }); __d(5 /* ReactPerf */, function(global, require, module, exports) {'use strict'; var ReactPerf={ enableMeasure:false, storedMeasure:_noMeasure, measureMethods:function measureMethods(object,objectName,methodNames){ if(process.env.NODE_ENV!=='production'){ for(var key in methodNames){ if(!methodNames.hasOwnProperty(key)){ continue;} object[key]=ReactPerf.measure(objectName,methodNames[key],object[key]);}}}, measure:function measure(objName,fnName,func){ if(process.env.NODE_ENV!=='production'){ var measuredFunc=null; var wrapper=function wrapper(){ if(ReactPerf.enableMeasure){ if(!measuredFunc){ measuredFunc=ReactPerf.storedMeasure(objName,fnName,func);} return measuredFunc.apply(this,arguments);} return func.apply(this,arguments);}; wrapper.displayName=objName+'_'+fnName; return wrapper;} return func;}, injection:{ injectMeasure:function injectMeasure(measure){ ReactPerf.storedMeasure=measure;}}}; function _noMeasure(objName,fnName,func){ return func;} module.exports=ReactPerf; }); __d(6 /* ErrorUtils */, function(global, require, module, exports) {module. exports=global.ErrorUtils; }); __d(7 /* JSTimersExecution */, function(global, require, module, exports) {'use strict'; var invariant=require(238 /* fbjs/lib/invariant */); var keyMirror=require(234 /* fbjs/lib/keyMirror */); var performanceNow=require(231 /* fbjs/lib/performanceNow */); var warning=require(242 /* fbjs/lib/warning */); var Systrace=require(4 /* Systrace */); var JSTimersExecution={ GUID:1, Type:keyMirror({ setTimeout:null, setInterval:null, requestAnimationFrame:null, setImmediate:null}), callbacks:[], types:[], timerIDs:[], immediates:[], callTimer:function callTimer(timerID){ warning(timerID<=JSTimersExecution.GUID,'Tried to call timer with ID '+timerID+' but no such timer exists'); var timerIndex=JSTimersExecution.timerIDs.indexOf(timerID); if(timerIndex===-1){ return;} var type=JSTimersExecution.types[timerIndex]; var callback=JSTimersExecution.callbacks[timerIndex]; if(type===JSTimersExecution.Type.setTimeout|| type===JSTimersExecution.Type.setImmediate|| type===JSTimersExecution.Type.requestAnimationFrame){ JSTimersExecution._clearIndex(timerIndex);} try{ if(type===JSTimersExecution.Type.setTimeout|| type===JSTimersExecution.Type.setInterval|| type===JSTimersExecution.Type.setImmediate){ callback();}else if(type===JSTimersExecution.Type.requestAnimationFrame){ var currentTime=performanceNow(); callback(currentTime);}else { console.error('Tried to call a callback with invalid type: '+type); return;}} catch(e){ JSTimersExecution.errors=JSTimersExecution.errors||[]; JSTimersExecution.errors.push(e);}}, callTimers:function callTimers(timerIDs){ invariant(timerIDs.length!==0,'Probably shouldn\'t call "callTimers" with no timerIDs'); JSTimersExecution.errors=null; timerIDs.forEach(JSTimersExecution.callTimer); var errors=JSTimersExecution.errors; if(errors){ var errorCount=errors.length; if(errorCount>1){ for(var ii=1;ii<errorCount;ii++){ require(8 /* JSTimers */).setTimeout( function(error){throw error;}.bind(null,errors[ii]), 0);}} throw errors[0];}}, callImmediatesPass:function callImmediatesPass(){ Systrace.beginEvent('JSTimersExecution.callImmediatesPass()'); if(JSTimersExecution.immediates.length>0){ var passImmediates=JSTimersExecution.immediates.slice(); JSTimersExecution.immediates=[]; for(var i=0;i<passImmediates.length;++i){ JSTimersExecution.callTimer(passImmediates[i]);}} Systrace.endEvent(); return JSTimersExecution.immediates.length>0;}, callImmediates:function callImmediates(){ JSTimersExecution.errors=null; while(JSTimersExecution.callImmediatesPass()){} if(JSTimersExecution.errors){ JSTimersExecution.errors.forEach(function(error){return ( require(8 /* JSTimers */).setTimeout(function(){throw error;},0));});}}, _clearIndex:function _clearIndex(i){ JSTimersExecution.timerIDs[i]=null; JSTimersExecution.callbacks[i]=null; JSTimersExecution.types[i]=null;}}; module.exports=JSTimersExecution; }); __d(238 /* fbjs/lib/invariant.js */, function(global, require, module, exports) {'use strict'; function invariant(condition,format,a,b,c,d,e,f){ if(process.env.NODE_ENV!=='production'){ if(format===undefined){ throw new Error('invariant requires an error message argument');}} if(!condition){ var error; if(format===undefined){ error=new Error('Minified exception occurred; use the non-minified dev environment '+'for the full error message and additional helpful warnings.');}else { var args=[a,b,c,d,e,f]; var argIndex=0; error=new Error(format.replace(/%s/g,function(){ return args[argIndex++];})); error.name='Invariant Violation';} error.framesToPop=1; throw error;}} module.exports=invariant; }); __d(234 /* fbjs/lib/keyMirror.js */, function(global, require, module, exports) {'use strict'; var invariant=require(238 /* ./invariant */); var keyMirror=function keyMirror(obj){ var ret={}; var key; !(obj instanceof Object&&!Array.isArray(obj))?process.env.NODE_ENV!=='production'?invariant(false,'keyMirror(...): Argument must be an object.'):invariant(false):void 0; for(key in obj){ if(!obj.hasOwnProperty(key)){ continue;} ret[key]=key;} return ret;}; module.exports=keyMirror; }); __d(231 /* fbjs/lib/performanceNow.js */, functio