{"version":3,"sources":["Shared/Static/js/lib/bluebird.js"],"names":["e","exports","module","define","amd","f","window","global","self","Promise","t","n","r","s","o","u","a","_dereq_","i","Error","code","l","call","length","1","SomePromiseArray","_SomePromiseArray","any","promises","ret","promise","setHowMany","setUnwrap","init","prototype","this","2","firstLineError","schedule","Queue","util","Async","_customScheduler","_isTickUsed","_lateQueue","_normalQueue","_haveDrainedQueues","_trampolineEnabled","drainQueues","_drainQueues","_schedule","AsyncInvokeLater","fn","receiver","arg","push","_queueTick","AsyncInvoke","AsyncSettlePromises","_pushOne","setScheduler","prev","hasCustomScheduler","enableTrampoline","disableTrampolineIfNecessary","hasDevTools","haveItemsQueued","fatalError","isNode","process","stderr","write","stack","exit","throwLater","arguments","setTimeout","invokeLater","invoke","settlePromises","_settlePromises","invokeFirst","unshift","_drainQueue","queue","shift","_reset","./queue","./schedule","./util","3","INTERNAL","tryConvertToPromise","debug","calledBind","rejectThis","_","_reject","targetRejected","context","promiseRejectionQueued","bindingPromise","_then","bindingResolved","thisArg","_bitField","_resolveCallback","target","bindingRejected","bind","_propagateFrom","propagateFromFunction","_boundValue","boundValueFunction","maybePromise","_target","_setBoundTo","undefined","_setOnCancel","obj","_boundTo","_isBound","value","resolve","4","old","bluebird","noConflict","./promise","5","cr","Object","create","callerCache","getterCache","getGetter","canEvaluate","isIdentifier","ensureMethod","methodName","message","classString","toString","TypeError","caller","pop","apply","namedGetter","indexedGetter","index","Math","max","args","slice","get","propertyName","getter","maybeGetter","6","PromiseArray","apiRejection","tryCatch","errorObj","async","_async","cancel","cancellation","_warn","child","isCancellable","_cancelBy","_isFollowing","_followee","_cancelBranched","parent","_cancellationParent","_branchHasCancelled","_branchesRemainingToCancel","_enoughBranchesHaveCancelled","canceller","_invokeOnCancel","_cancel","_setCancelled","_cancelPromises","_length","_unsetOnCancel","_onCancelField","isPending","isCancelled","_doInvokeOnCancel","onCancelCallback","internalOnly","isArray","_attachExtraTrace","_resultCancelled","_onCancel","_invokeInternalOnCancel","7","NEXT_FILTER","getKeys","keys","instances","cb","boundTo","predicateLoop","item","matchesPredicate","isObject","j","key","./es5","8","longStackTraces","contextStack","Context","_trace","CapturedTrace","peekContext","lastIndex","_promiseCreated","_pushContext","_popContext","_peekContext","trace","deactivateLongStackTraces","activateLongStackTraces","Promise_pushContext","Promise_popContext","Promise_PeekContext","Promise_peekContext","Promise_promiseCreated","ctx","9","unhandledRejectionHandled","possiblyUnhandledRejection","printWarning","getDomain","_getDomain","Warning","canAttachTrace","bluebirdFramePattern","stackFramePattern","formatStack","indentStackFrames","debugging","env","warnings","wForgottenReturn","suppressUnhandledRejections","_ensurePossibleRejectionHandled","_setRejectionIsUnhandled","_notifyUnhandledRejection","_notifyUnhandledRejectionIsHandled","fireRejectionEvent","_setReturnedNonUndefined","_returnedNonUndefined","_isRejectionUnhandled","reason","_settledValue","_setUnhandledRejectionIsNotified","_unsetUnhandledRejectionIsNotified","_isUnhandledRejectionNotified","_unsetRejectionIsUnhandled","shouldUseOwnTrace","warn","onPossiblyUnhandledRejection","domain","onUnhandledRejectionHandled","disableLongStackTraces","config","longStackTracesIsSupported","Promise_captureStackTrace","_captureStackTrace","Promise_attachExtraTrace","longStackTracesCaptureStackTrace","longStackTracesAttachExtraTrace","hasLongStackTraces","fireDomEvent","event","document","createEvent","initCustomEvent","dispatchEvent","name","domEvent","toLowerCase","fireGlobalEvent","emit","method","generatePromiseLifecycleEventObject","eventToObjectGenerator","promiseCreated","promiseFulfilled","promiseRejected","promiseResolved","promiseCancelled","promiseChained","warning","unhandledRejection","rejectionHandled","activeFireEvent","globalEventFired","domEventFired","defaultFireEvent","cancellationExecute","executor","reject","onCancel","_attachCancellationCallback","cancellationAttachCancellationCallback","previousOnCancel","cancellationOnCancel","cancellationSetOnCancel","cancellationClearCancellationData","cancellationPropagateFrom","flags","branchesRemainingToCancel","opts","warningsOption","_clearCancellationData","_execute","monitoring","_fireEvent","handler","isFulfilled","error","ignoreSelf","_parent","attachExtraTrace","__stackCleaned__","parsed","parseStackAndMessage","notEnumerableProp","join","formatAndLogError","cleanStack","line","isTraceLine","test","isInternalFrame","shouldIgnore","charAt","replace","split","stackFramesAsArray","title","isSoft","console","String","log","localHandler","localEventFired","formatNonError","str","JSON","stringify","substr","maxChars","snip","captureStackTrace","parseLineInfoRegex","parseLineInfo","matches","match","fileName","parseInt","_promisesCreated","uncycle","inherits","nodes","stackToIndex","node","cycleEdgeNode","currentChildLength","stacks","current","currentLastIndex","currentLastLine","commonRootMeetPoint","removeCommonRoots","splice","removeDuplicateOrEmptyJumps","reconstructStack","v8stackFramePattern","v8stackFormatter","stackTraceLimit","ignoreUntil","hasStackAfterThrow","err","indexOf","isTTY","color","checkForgottenReturns","returnValue","msg","setBounds","lastLineError","firstFileName","lastFileName","firstStackLines","lastStackLines","firstIndex","result","info","deprecated","replacement","./errors","10","returner","thrower","thenReturn","thenThrow","catchThrow","_reason","caught","catchReturn","_value","11","PromiseReduce","reduce","PromiseAll","all","promiseAllThis","PromiseMapSeries","each","mapSeries","12","_TypeError","_RangeError","es5","Objectfreeze","freeze","subError","nameProperty","defaultMessage","SubError","constructor","CancellationError","TimeoutError","AggregateError","RangeError","methods","Array","defineProperty","configurable","writable","enumerable","level","OperationalError","cause","indent","lines","errorTypes","RejectionError","13","isES5","getDescriptor","getOwnPropertyDescriptor","names","getOwnPropertyNames","getPrototypeOf","propertyIsWritable","prop","descriptor","set","has","hasOwnProperty","proto","ObjectKeys","desc","14","PromiseMap","map","filter","options","15","PassThroughHandlerContext","type","called","cancelPromise","FinallyHandlerCancelReaction","finallyHandler","checkCancel","succeed","fail","reasonOrValue","isFinallyHandler","isRejected","_passThrough","success","then","lastly","tap","16","Proxyable","yieldHandlers","PromiseSpawn","generatorFunction","yieldHandler","internal","_finallyPromise","_promise","_stack","_generatorFunction","_receiver","_generator","_yieldHandlers","concat","_yieldedPromise","_cancellationPhase","_isResolved","_cleanup","_fulfill","_promiseCancelled","coroutine","returnSentinel","_continue","_promiseFulfilled","next","_promiseRejected","_run","_rejectCallback","done","traceParent","promiseFromYieldHandler","bitField","_proxy","PromiseSpawn$","generator","spawn","addYieldHandler","17","last","spread","18","EMPTY_ARRAY","MappingPromiseArray","limit","_filter","constructor$","_callback","_preservedValues","_limit","_inFlight","_queue","_init$","concurrency","isFinite","_init","values","_values","preservedValues","callback","_totalResolved","_resolve","booleans","len","19","_resolveFromSyncValue","attempt","20","maybeWrapAsError","rErrorKey","wrapAsOperationalError","isUntypedError","markAsOriginatingFromRejection","multiArgs","wrapped","21","spreadAdapter","val","nodeback","successAdapter","errorAdapter","newReason","asCallback","nodeify","adapter","22","makeSelfResolutionError","reflectHandler","PromiseInspection","UNDEFINED_BINDING","errors","APPLY","createContext","catchFilter","nodebackForPromise","_fulfillmentHandler0","_rejectionHandler0","_promise0","_receiver0","check","_resolveFromExecutor","deferResolve","v","deferReject","fillTypes","p","catchInstances","reflect","didFulfill","didReject","_setIsFinal","toJSON","fulfillmentValue","rejectionReason","originatesFromRejection","is","fromNode","fromCallback","_isFateSealed","_setAsyncGuaranteed","cast","_setFulfilled","fulfilled","rejected","internalData","haveInternalData","settler","_settlePromiseCtx","_settlePromiseLateCancellationObserver","_addCallbacks","_setLength","_setRejected","_setFollowing","_isFinal","_unsetCancelled","_receiverAt","_promiseAt","_fulfillmentHandlerAt","_rejectionHandlerAt","_migrateCallback0","follower","fulfill","_migrateCallbackAt","base","proxyable","shouldBind","_setFollowee","synchronous","ignoreNonErrorWarnings","ensureErrorObject","hasStack","_settlePromiseFromHandler","x","_settlePromise","isPromise","asyncGuaranteed","_settlePromise0","_clearCallbackDataAtIndex","_fulfillPromises","_rejectPromises","defer","pending","toFastProperties","b","c","./any.js","./async","./bind","./call_get.js","./cancel","./catch_filter","./context","./debuggability","./direct_resolve","./each.js","./filter.js","./finally","./generators.js","./join","./map.js","./method","./nodeback","./nodeify.js","./promise_array","./promisify.js","./props.js","./race.js","./reduce.js","./settle.js","./some.js","./synchronous_inspection","./thenables","./timers.js","./using.js","23","resolveValueIfEmpty","asArray","_iterate","_resolveEmptyArray","toResolutionValue","getActualLength","shouldCopyValues","isResolved","24","THIS","withAppended","defaultPromisified","__isPromisified__","noCopyPropsPattern","RegExp","defaultFilter","propsFilter","isPromisified","hasPromisified","suffix","getDataPropertyOrDefault","promisifiableMethods","suffixRegexp","inheritedDataKeys","passesDefaultFilter","keyWithoutAsyncSuffix","checkValid","makeNodePromisifiedEval","escapeIdentRegex","makeNodePromisified","__","defaultThis","promisified","promisifyAll","promisifier","promisifiedKey","promisify","copyDescriptors","isClass","25","Es6Map","Map","mapToEntries","size","extractEntry","forEach","PropertiesPromiseArray","entries","isMap","_isMap","props","castValue","entriesToMap","keyOffset","26","capacity","_capacity","_front","_willBeOverCapacity","_checkCapacity","_unshiftOne","wrapMask","front","_resizeTo","oldCapacity","src","srcIndex","dst","dstIndex","arrayMove","27","raceLater","array","race","28","ReductionPromiseArray","initialValue","_each","_fn","_initialValue","_currentCancellable","_eachValues","completed","valueOrReason","gotAccum","accum","_gotAccum","gotValue","_eachComplete","sender","_resultCancelled$","29","NativePromise","getNativePromise","MutationObserver","GlobalSetImmediate","setImmediate","ProcessNextTick","nextTick","isRecentNode","nativePromise","navigator","standalone","div","createElement","attributes","toggleScheduled","div2","classList","toggle","observe","disconnect","scheduleToggle","30","SettledPromiseArray","_promiseResolved","inspection","_settledValueField","settle","31","CANCELLATION","_howMany","_unwrap","_initialized","some","howMany","isArrayResolved","_canPossiblyFulfill","_getRangeError","count","_addFulfilled","_fulfilled","_addRejected","_checkOutcome","_rejected","32","_isCancelled","33","hasProp","doGetThen","getThen","isAnyBluebirdPromise","doThenable","34","HandleWrapper","handle","clearTimeout","afterValue","delay","ms","successClear","failureClear","timeout","handleWrapper","afterTimeout","35","dispose","resources","iterator","thenable","_isDisposable","_getDisposer","_setDisposable","castPreservingDisposable","tryDispose","Disposer","data","_data","_context","FunctionDisposer","maybeUnwrapDisposer","isDisposer","ResourceList","resource","doDispose","_unsetDisposable","d","using","input","spreadArgs","disposer","reflectedResources","resultPromise","inspections","_disposer","36","tryCatchTarget","globalObject","tryCatcher","Child","Parent","T","isPrimitive","maybeError","safeToString","appendee","defaultValue","excludedPrototypes","Function","isExcludedProto","visitedKeys","enumeration","thisAssignmentPattern","hasMethods","hasMethodsOtherThanConstructor","hasThisAssignmentAndStaticMethods","FakeConstructor","rident","filledRange","prefix","isError","ignore","from","to","Symbol","ArrayFrom","itResult","it","def","chrome","loadTimes","version","versions","Number","P"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CA4BC,SAASA,GAAG,GAAG,iBAAiBC,SAAS,oBAAoBC,OAAOA,OAAOD,QAAQD,SAAS,GAAG,mBAAmBG,QAAQA,OAAOC,IAAID,UAAUH,OAAO,CAAC,IAAIK,EAAE,oBAAoBC,OAAOD,EAAEC,OAAO,oBAAoBC,OAAOF,EAAEE,OAAO,oBAAoBC,OAAOH,EAAEG,MAAMH,EAAEI,QAAQT,KAAlR,CAAwR,WAAW,IAAIG,EAAOD,EAAOD,EAAQ,OAAO,SAAUD,EAAEU,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAkB,mBAATC,SAAqBA,QAAQ,IAAIF,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGI,EAAE,OAAOA,EAAEJ,GAAE,GAAI,IAAIT,EAAE,IAAIc,MAAM,uBAAuBL,EAAE,KAAK,MAAMT,EAAEe,KAAK,mBAAmBf,EAAE,IAAIgB,EAAEV,EAAEG,IAAIb,YAAYS,EAAEI,GAAG,GAAGQ,KAAKD,EAAEpB,QAAQ,SAASD,GAAG,IAAIW,EAAED,EAAEI,GAAG,GAAGd,GAAG,OAAOa,EAAEF,GAAIX,IAAIqB,EAAEA,EAAEpB,QAAQD,EAAEU,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGb,QAAkD,IAA1C,IAAIiB,EAAkB,mBAATD,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,EAAIsvB,aAAetvB,EAAIuC,QAAU,WAC7B,IAAIy0B,EAAUx0B,QAAQy0B,SAAS3hB,KAAK5B,MAAM,KAAKiI,IAAIub,QACnD,OAAuB,IAAfF,EAAQ,IAAYA,EAAQ,GAAK,IAAQA,EAAQ,GAAK,EAFjC,GAK7Bh3B,EAAIuC,QAAQvC,EAAIknB,iBAAiB1kB,SAErC,IAAK,MAAM,IAAIlD,MAAW,MAAOnB,GAAI6B,EAAI+W,cAAgB5Y,EACzDE,EAAOD,QAAU4B,IAEdqL,QAAQ,UAAU,GAx4KgT,CAw4K5S,KACqB,oBAAX5M,QAAqC,OAAXA,OAAiDA,OAAO04B,EAAI14B,OAAOG,QAAwF,oBAATD,MAAiC,OAATA,OAA6CA,KAAKw4B,EAAIx4B,KAAKC","file":"bluebird.js","sourcesContent":["/* @preserve\r\n * The MIT License (MIT)\r\n * \r\n * Copyright (c) 2013-2015 Petka Antonov\r\n * \r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n * \r\n * The above copyright notice and this permission notice shall be included in\r\n * all copies or substantial portions of the Software.\r\n * \r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n * THE SOFTWARE.\r\n * \r\n */\r\n/**\r\n * bluebird build version 3.3.5\r\n * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each\r\n*/\r\n!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{var f;\"undefined\"!=typeof window?f=window:\"undefined\"!=typeof global?f=global:\"undefined\"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_==\"function\"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_==\"function\"&&_dereq_;for(var o=0;o 0) {\r\n var fn = queue.shift();\r\n if (typeof fn !== \"function\") {\r\n fn._settlePromises();\r\n continue;\r\n }\r\n var receiver = queue.shift();\r\n var arg = queue.shift();\r\n fn.call(receiver, arg);\r\n }\r\n};\r\n\r\nAsync.prototype._drainQueues = function () {\r\n this._drainQueue(this._normalQueue);\r\n this._reset();\r\n this._haveDrainedQueues = true;\r\n this._drainQueue(this._lateQueue);\r\n};\r\n\r\nAsync.prototype._queueTick = function () {\r\n if (!this._isTickUsed) {\r\n this._isTickUsed = true;\r\n this._schedule(this.drainQueues);\r\n }\r\n};\r\n\r\nAsync.prototype._reset = function () {\r\n this._isTickUsed = false;\r\n};\r\n\r\nmodule.exports = Async;\r\nmodule.exports.firstLineError = firstLineError;\r\n\r\n},{\"./queue\":26,\"./schedule\":29,\"./util\":36}],3:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {\r\nvar calledBind = false;\r\nvar rejectThis = function(_, e) {\r\n this._reject(e);\r\n};\r\n\r\nvar targetRejected = function(e, context) {\r\n context.promiseRejectionQueued = true;\r\n context.bindingPromise._then(rejectThis, rejectThis, null, this, e);\r\n};\r\n\r\nvar bindingResolved = function(thisArg, context) {\r\n if (((this._bitField & 50397184) === 0)) {\r\n this._resolveCallback(context.target);\r\n }\r\n};\r\n\r\nvar bindingRejected = function(e, context) {\r\n if (!context.promiseRejectionQueued) this._reject(e);\r\n};\r\n\r\nPromise.prototype.bind = function (thisArg) {\r\n if (!calledBind) {\r\n calledBind = true;\r\n Promise.prototype._propagateFrom = debug.propagateFromFunction();\r\n Promise.prototype._boundValue = debug.boundValueFunction();\r\n }\r\n var maybePromise = tryConvertToPromise(thisArg);\r\n var ret = new Promise(INTERNAL);\r\n ret._propagateFrom(this, 1);\r\n var target = this._target();\r\n ret._setBoundTo(maybePromise);\r\n if (maybePromise instanceof Promise) {\r\n var context = {\r\n promiseRejectionQueued: false,\r\n promise: ret,\r\n target: target,\r\n bindingPromise: maybePromise\r\n };\r\n target._then(INTERNAL, targetRejected, undefined, ret, context);\r\n maybePromise._then(\r\n bindingResolved, bindingRejected, undefined, ret, context);\r\n ret._setOnCancel(maybePromise);\r\n } else {\r\n ret._resolveCallback(target);\r\n }\r\n return ret;\r\n};\r\n\r\nPromise.prototype._setBoundTo = function (obj) {\r\n if (obj !== undefined) {\r\n this._bitField = this._bitField | 2097152;\r\n this._boundTo = obj;\r\n } else {\r\n this._bitField = this._bitField & (~2097152);\r\n }\r\n};\r\n\r\nPromise.prototype._isBound = function () {\r\n return (this._bitField & 2097152) === 2097152;\r\n};\r\n\r\nPromise.bind = function (thisArg, value) {\r\n return Promise.resolve(value).bind(thisArg);\r\n};\r\n};\r\n\r\n},{}],4:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nvar old;\r\nif (typeof Promise !== \"undefined\") old = Promise;\r\nfunction noConflict() {\r\n try { if (Promise === bluebird) Promise = old; }\r\n catch (e) {}\r\n return bluebird;\r\n}\r\nvar bluebird = _dereq_(\"./promise\")();\r\nbluebird.noConflict = noConflict;\r\nmodule.exports = bluebird;\r\n\r\n},{\"./promise\":22}],5:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nvar cr = Object.create;\r\nif (cr) {\r\n var callerCache = cr(null);\r\n var getterCache = cr(null);\r\n callerCache[\" size\"] = getterCache[\" size\"] = 0;\r\n}\r\n\r\nmodule.exports = function(Promise) {\r\nvar util = _dereq_(\"./util\");\r\nvar canEvaluate = util.canEvaluate;\r\nvar isIdentifier = util.isIdentifier;\r\n\r\nvar getMethodCaller;\r\nvar getGetter;\r\nif (!true) {\r\nvar makeMethodCaller = function (methodName) {\r\n return new Function(\"ensureMethod\", \" \\n\\\r\n return function(obj) { \\n\\\r\n 'use strict' \\n\\\r\n var len = this.length; \\n\\\r\n ensureMethod(obj, 'methodName'); \\n\\\r\n switch(len) { \\n\\\r\n case 1: return obj.methodName(this[0]); \\n\\\r\n case 2: return obj.methodName(this[0], this[1]); \\n\\\r\n case 3: return obj.methodName(this[0], this[1], this[2]); \\n\\\r\n case 0: return obj.methodName(); \\n\\\r\n default: \\n\\\r\n return obj.methodName.apply(obj, this); \\n\\\r\n } \\n\\\r\n }; \\n\\\r\n \".replace(/methodName/g, methodName))(ensureMethod);\r\n};\r\n\r\nvar makeGetter = function (propertyName) {\r\n return new Function(\"obj\", \" \\n\\\r\n 'use strict'; \\n\\\r\n return obj.propertyName; \\n\\\r\n \".replace(\"propertyName\", propertyName));\r\n};\r\n\r\nvar getCompiled = function(name, compiler, cache) {\r\n var ret = cache[name];\r\n if (typeof ret !== \"function\") {\r\n if (!isIdentifier(name)) {\r\n return null;\r\n }\r\n ret = compiler(name);\r\n cache[name] = ret;\r\n cache[\" size\"]++;\r\n if (cache[\" size\"] > 512) {\r\n var keys = Object.keys(cache);\r\n for (var i = 0; i < 256; ++i) delete cache[keys[i]];\r\n cache[\" size\"] = keys.length - 256;\r\n }\r\n }\r\n return ret;\r\n};\r\n\r\ngetMethodCaller = function(name) {\r\n return getCompiled(name, makeMethodCaller, callerCache);\r\n};\r\n\r\ngetGetter = function(name) {\r\n return getCompiled(name, makeGetter, getterCache);\r\n};\r\n}\r\n\r\nfunction ensureMethod(obj, methodName) {\r\n var fn;\r\n if (obj != null) fn = obj[methodName];\r\n if (typeof fn !== \"function\") {\r\n var message = \"Object \" + util.classString(obj) + \" has no method '\" +\r\n util.toString(methodName) + \"'\";\r\n throw new Promise.TypeError(message);\r\n }\r\n return fn;\r\n}\r\n\r\nfunction caller(obj) {\r\n var methodName = this.pop();\r\n var fn = ensureMethod(obj, methodName);\r\n return fn.apply(obj, this);\r\n}\r\nPromise.prototype.call = function (methodName) {\r\n var args = [].slice.call(arguments, 1);;\r\n if (!true) {\r\n if (canEvaluate) {\r\n var maybeCaller = getMethodCaller(methodName);\r\n if (maybeCaller !== null) {\r\n return this._then(\r\n maybeCaller, undefined, undefined, args, undefined);\r\n }\r\n }\r\n }\r\n args.push(methodName);\r\n return this._then(caller, undefined, undefined, args, undefined);\r\n};\r\n\r\nfunction namedGetter(obj) {\r\n return obj[this];\r\n}\r\nfunction indexedGetter(obj) {\r\n var index = +this;\r\n if (index < 0) index = Math.max(0, index + obj.length);\r\n return obj[index];\r\n}\r\nPromise.prototype.get = function (propertyName) {\r\n var isIndex = (typeof propertyName === \"number\");\r\n var getter;\r\n if (!isIndex) {\r\n if (canEvaluate) {\r\n var maybeGetter = getGetter(propertyName);\r\n getter = maybeGetter !== null ? maybeGetter : namedGetter;\r\n } else {\r\n getter = namedGetter;\r\n }\r\n } else {\r\n getter = indexedGetter;\r\n }\r\n return this._then(getter, undefined, undefined, propertyName, undefined);\r\n};\r\n};\r\n\r\n},{\"./util\":36}],6:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise, PromiseArray, apiRejection, debug) {\r\nvar util = _dereq_(\"./util\");\r\nvar tryCatch = util.tryCatch;\r\nvar errorObj = util.errorObj;\r\nvar async = Promise._async;\r\n\r\nPromise.prototype[\"break\"] = Promise.prototype.cancel = function() {\r\n if (!debug.cancellation()) return this._warn(\"cancellation is disabled\");\r\n\r\n var promise = this;\r\n var child = promise;\r\n while (promise.isCancellable()) {\r\n if (!promise._cancelBy(child)) {\r\n if (child._isFollowing()) {\r\n child._followee().cancel();\r\n } else {\r\n child._cancelBranched();\r\n }\r\n break;\r\n }\r\n\r\n var parent = promise._cancellationParent;\r\n if (parent == null || !parent.isCancellable()) {\r\n if (promise._isFollowing()) {\r\n promise._followee().cancel();\r\n } else {\r\n promise._cancelBranched();\r\n }\r\n break;\r\n } else {\r\n if (promise._isFollowing()) promise._followee().cancel();\r\n child = promise;\r\n promise = parent;\r\n }\r\n }\r\n};\r\n\r\nPromise.prototype._branchHasCancelled = function() {\r\n this._branchesRemainingToCancel--;\r\n};\r\n\r\nPromise.prototype._enoughBranchesHaveCancelled = function() {\r\n return this._branchesRemainingToCancel === undefined ||\r\n this._branchesRemainingToCancel <= 0;\r\n};\r\n\r\nPromise.prototype._cancelBy = function(canceller) {\r\n if (canceller === this) {\r\n this._branchesRemainingToCancel = 0;\r\n this._invokeOnCancel();\r\n return true;\r\n } else {\r\n this._branchHasCancelled();\r\n if (this._enoughBranchesHaveCancelled()) {\r\n this._invokeOnCancel();\r\n return true;\r\n }\r\n }\r\n return false;\r\n};\r\n\r\nPromise.prototype._cancelBranched = function() {\r\n if (this._enoughBranchesHaveCancelled()) {\r\n this._cancel();\r\n }\r\n};\r\n\r\nPromise.prototype._cancel = function() {\r\n if (!this.isCancellable()) return;\r\n\r\n this._setCancelled();\r\n async.invoke(this._cancelPromises, this, undefined);\r\n};\r\n\r\nPromise.prototype._cancelPromises = function() {\r\n if (this._length() > 0) this._settlePromises();\r\n};\r\n\r\nPromise.prototype._unsetOnCancel = function() {\r\n this._onCancelField = undefined;\r\n};\r\n\r\nPromise.prototype.isCancellable = function() {\r\n return this.isPending() && !this.isCancelled();\r\n};\r\n\r\nPromise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {\r\n if (util.isArray(onCancelCallback)) {\r\n for (var i = 0; i < onCancelCallback.length; ++i) {\r\n this._doInvokeOnCancel(onCancelCallback[i], internalOnly);\r\n }\r\n } else if (onCancelCallback !== undefined) {\r\n if (typeof onCancelCallback === \"function\") {\r\n if (!internalOnly) {\r\n var e = tryCatch(onCancelCallback).call(this._boundValue());\r\n if (e === errorObj) {\r\n this._attachExtraTrace(e.e);\r\n async.throwLater(e.e);\r\n }\r\n }\r\n } else {\r\n onCancelCallback._resultCancelled(this);\r\n }\r\n }\r\n};\r\n\r\nPromise.prototype._invokeOnCancel = function() {\r\n var onCancelCallback = this._onCancel();\r\n this._unsetOnCancel();\r\n async.invoke(this._doInvokeOnCancel, this, onCancelCallback);\r\n};\r\n\r\nPromise.prototype._invokeInternalOnCancel = function() {\r\n if (this.isCancellable()) {\r\n this._doInvokeOnCancel(this._onCancel(), true);\r\n this._unsetOnCancel();\r\n }\r\n};\r\n\r\nPromise.prototype._resultCancelled = function() {\r\n this.cancel();\r\n};\r\n\r\n};\r\n\r\n},{\"./util\":36}],7:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(NEXT_FILTER) {\r\nvar util = _dereq_(\"./util\");\r\nvar getKeys = _dereq_(\"./es5\").keys;\r\nvar tryCatch = util.tryCatch;\r\nvar errorObj = util.errorObj;\r\n\r\nfunction catchFilter(instances, cb, promise) {\r\n return function(e) {\r\n var boundTo = promise._boundValue();\r\n predicateLoop: for (var i = 0; i < instances.length; ++i) {\r\n var item = instances[i];\r\n\r\n if (item === Error ||\r\n (item != null && item.prototype instanceof Error)) {\r\n if (e instanceof item) {\r\n return tryCatch(cb).call(boundTo, e);\r\n }\r\n } else if (typeof item === \"function\") {\r\n var matchesPredicate = tryCatch(item).call(boundTo, e);\r\n if (matchesPredicate === errorObj) {\r\n return matchesPredicate;\r\n } else if (matchesPredicate) {\r\n return tryCatch(cb).call(boundTo, e);\r\n }\r\n } else if (util.isObject(e)) {\r\n var keys = getKeys(item);\r\n for (var j = 0; j < keys.length; ++j) {\r\n var key = keys[j];\r\n if (item[key] != e[key]) {\r\n continue predicateLoop;\r\n }\r\n }\r\n return tryCatch(cb).call(boundTo, e);\r\n }\r\n }\r\n return NEXT_FILTER;\r\n };\r\n}\r\n\r\nreturn catchFilter;\r\n};\r\n\r\n},{\"./es5\":13,\"./util\":36}],8:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise) {\r\nvar longStackTraces = false;\r\nvar contextStack = [];\r\n\r\nPromise.prototype._promiseCreated = function() {};\r\nPromise.prototype._pushContext = function() {};\r\nPromise.prototype._popContext = function() {return null;};\r\nPromise._peekContext = Promise.prototype._peekContext = function() {};\r\n\r\nfunction Context() {\r\n this._trace = new Context.CapturedTrace(peekContext());\r\n}\r\nContext.prototype._pushContext = function () {\r\n if (this._trace !== undefined) {\r\n this._trace._promiseCreated = null;\r\n contextStack.push(this._trace);\r\n }\r\n};\r\n\r\nContext.prototype._popContext = function () {\r\n if (this._trace !== undefined) {\r\n var trace = contextStack.pop();\r\n var ret = trace._promiseCreated;\r\n trace._promiseCreated = null;\r\n return ret;\r\n }\r\n return null;\r\n};\r\n\r\nfunction createContext() {\r\n if (longStackTraces) return new Context();\r\n}\r\n\r\nfunction peekContext() {\r\n var lastIndex = contextStack.length - 1;\r\n if (lastIndex >= 0) {\r\n return contextStack[lastIndex];\r\n }\r\n return undefined;\r\n}\r\nContext.CapturedTrace = null;\r\nContext.create = createContext;\r\nContext.deactivateLongStackTraces = function() {};\r\nContext.activateLongStackTraces = function() {\r\n var Promise_pushContext = Promise.prototype._pushContext;\r\n var Promise_popContext = Promise.prototype._popContext;\r\n var Promise_PeekContext = Promise._peekContext;\r\n var Promise_peekContext = Promise.prototype._peekContext;\r\n var Promise_promiseCreated = Promise.prototype._promiseCreated;\r\n Context.deactivateLongStackTraces = function() {\r\n Promise.prototype._pushContext = Promise_pushContext;\r\n Promise.prototype._popContext = Promise_popContext;\r\n Promise._peekContext = Promise_PeekContext;\r\n Promise.prototype._peekContext = Promise_peekContext;\r\n Promise.prototype._promiseCreated = Promise_promiseCreated;\r\n longStackTraces = false;\r\n };\r\n longStackTraces = true;\r\n Promise.prototype._pushContext = Context.prototype._pushContext;\r\n Promise.prototype._popContext = Context.prototype._popContext;\r\n Promise._peekContext = Promise.prototype._peekContext = peekContext;\r\n Promise.prototype._promiseCreated = function() {\r\n var ctx = this._peekContext();\r\n if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;\r\n };\r\n};\r\nreturn Context;\r\n};\r\n\r\n},{}],9:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise, Context) {\r\nvar getDomain = Promise._getDomain;\r\nvar async = Promise._async;\r\nvar Warning = _dereq_(\"./errors\").Warning;\r\nvar util = _dereq_(\"./util\");\r\nvar canAttachTrace = util.canAttachTrace;\r\nvar unhandledRejectionHandled;\r\nvar possiblyUnhandledRejection;\r\nvar bluebirdFramePattern =\r\n /[\\\\\\/]bluebird[\\\\\\/]js[\\\\\\/](release|debug|instrumented)/;\r\nvar stackFramePattern = null;\r\nvar formatStack = null;\r\nvar indentStackFrames = false;\r\nvar printWarning;\r\nvar debugging = !!(util.env(\"BLUEBIRD_DEBUG\") != 0 &&\r\n (true ||\r\n util.env(\"BLUEBIRD_DEBUG\") ||\r\n util.env(\"NODE_ENV\") === \"development\"));\r\n\r\nvar warnings = !!(util.env(\"BLUEBIRD_WARNINGS\") != 0 &&\r\n (debugging || util.env(\"BLUEBIRD_WARNINGS\")));\r\n\r\nvar longStackTraces = !!(util.env(\"BLUEBIRD_LONG_STACK_TRACES\") != 0 &&\r\n (debugging || util.env(\"BLUEBIRD_LONG_STACK_TRACES\")));\r\n\r\nvar wForgottenReturn = util.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\") != 0 &&\r\n (warnings || !!util.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\"));\r\n\r\nPromise.prototype.suppressUnhandledRejections = function() {\r\n var target = this._target();\r\n target._bitField = ((target._bitField & (~1048576)) |\r\n 524288);\r\n};\r\n\r\nPromise.prototype._ensurePossibleRejectionHandled = function () {\r\n if ((this._bitField & 524288) !== 0) return;\r\n this._setRejectionIsUnhandled();\r\n async.invokeLater(this._notifyUnhandledRejection, this, undefined);\r\n};\r\n\r\nPromise.prototype._notifyUnhandledRejectionIsHandled = function () {\r\n fireRejectionEvent(\"rejectionHandled\",\r\n unhandledRejectionHandled, undefined, this);\r\n};\r\n\r\nPromise.prototype._setReturnedNonUndefined = function() {\r\n this._bitField = this._bitField | 268435456;\r\n};\r\n\r\nPromise.prototype._returnedNonUndefined = function() {\r\n return (this._bitField & 268435456) !== 0;\r\n};\r\n\r\nPromise.prototype._notifyUnhandledRejection = function () {\r\n if (this._isRejectionUnhandled()) {\r\n var reason = this._settledValue();\r\n this._setUnhandledRejectionIsNotified();\r\n fireRejectionEvent(\"unhandledRejection\",\r\n possiblyUnhandledRejection, reason, this);\r\n }\r\n};\r\n\r\nPromise.prototype._setUnhandledRejectionIsNotified = function () {\r\n this._bitField = this._bitField | 262144;\r\n};\r\n\r\nPromise.prototype._unsetUnhandledRejectionIsNotified = function () {\r\n this._bitField = this._bitField & (~262144);\r\n};\r\n\r\nPromise.prototype._isUnhandledRejectionNotified = function () {\r\n return (this._bitField & 262144) > 0;\r\n};\r\n\r\nPromise.prototype._setRejectionIsUnhandled = function () {\r\n this._bitField = this._bitField | 1048576;\r\n};\r\n\r\nPromise.prototype._unsetRejectionIsUnhandled = function () {\r\n this._bitField = this._bitField & (~1048576);\r\n if (this._isUnhandledRejectionNotified()) {\r\n this._unsetUnhandledRejectionIsNotified();\r\n this._notifyUnhandledRejectionIsHandled();\r\n }\r\n};\r\n\r\nPromise.prototype._isRejectionUnhandled = function () {\r\n return (this._bitField & 1048576) > 0;\r\n};\r\n\r\nPromise.prototype._warn = function(message, shouldUseOwnTrace, promise) {\r\n return warn(message, shouldUseOwnTrace, promise || this);\r\n};\r\n\r\nPromise.onPossiblyUnhandledRejection = function (fn) {\r\n var domain = getDomain();\r\n possiblyUnhandledRejection =\r\n typeof fn === \"function\" ? (domain === null ? fn : domain.bind(fn))\r\n : undefined;\r\n};\r\n\r\nPromise.onUnhandledRejectionHandled = function (fn) {\r\n var domain = getDomain();\r\n unhandledRejectionHandled =\r\n typeof fn === \"function\" ? (domain === null ? fn : domain.bind(fn))\r\n : undefined;\r\n};\r\n\r\nvar disableLongStackTraces = function() {};\r\nPromise.longStackTraces = function () {\r\n if (async.haveItemsQueued() && !config.longStackTraces) {\r\n throw new Error(\"cannot enable long stack traces after promises have been created\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n }\r\n if (!config.longStackTraces && longStackTracesIsSupported()) {\r\n var Promise_captureStackTrace = Promise.prototype._captureStackTrace;\r\n var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;\r\n config.longStackTraces = true;\r\n disableLongStackTraces = function() {\r\n if (async.haveItemsQueued() && !config.longStackTraces) {\r\n throw new Error(\"cannot enable long stack traces after promises have been created\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n }\r\n Promise.prototype._captureStackTrace = Promise_captureStackTrace;\r\n Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;\r\n Context.deactivateLongStackTraces();\r\n async.enableTrampoline();\r\n config.longStackTraces = false;\r\n };\r\n Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;\r\n Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;\r\n Context.activateLongStackTraces();\r\n async.disableTrampolineIfNecessary();\r\n }\r\n};\r\n\r\nPromise.hasLongStackTraces = function () {\r\n return config.longStackTraces && longStackTracesIsSupported();\r\n};\r\n\r\nvar fireDomEvent = (function() {\r\n try {\r\n var event = document.createEvent(\"CustomEvent\");\r\n event.initCustomEvent(\"testingtheevent\", false, true, {});\r\n util.global.dispatchEvent(event);\r\n return function(name, event) {\r\n var domEvent = document.createEvent(\"CustomEvent\");\r\n domEvent.initCustomEvent(name.toLowerCase(), false, true, event);\r\n return !util.global.dispatchEvent(domEvent);\r\n };\r\n } catch (e) {}\r\n return function() {\r\n return false;\r\n };\r\n})();\r\n\r\nvar fireGlobalEvent = (function() {\r\n if (util.isNode) {\r\n return function() {\r\n return process.emit.apply(process, arguments);\r\n };\r\n } else {\r\n if (!util.global) {\r\n return function() {\r\n return false;\r\n };\r\n }\r\n return function(name) {\r\n var methodName = \"on\" + name.toLowerCase();\r\n var method = util.global[methodName];\r\n if (!method) return false;\r\n method.apply(util.global, [].slice.call(arguments, 1));\r\n return true;\r\n };\r\n }\r\n})();\r\n\r\nfunction generatePromiseLifecycleEventObject(name, promise) {\r\n return {promise: promise};\r\n}\r\n\r\nvar eventToObjectGenerator = {\r\n promiseCreated: generatePromiseLifecycleEventObject,\r\n promiseFulfilled: generatePromiseLifecycleEventObject,\r\n promiseRejected: generatePromiseLifecycleEventObject,\r\n promiseResolved: generatePromiseLifecycleEventObject,\r\n promiseCancelled: generatePromiseLifecycleEventObject,\r\n promiseChained: function(name, promise, child) {\r\n return {promise: promise, child: child};\r\n },\r\n warning: function(name, warning) {\r\n return {warning: warning};\r\n },\r\n unhandledRejection: function (name, reason, promise) {\r\n return {reason: reason, promise: promise};\r\n },\r\n rejectionHandled: generatePromiseLifecycleEventObject\r\n};\r\n\r\nvar activeFireEvent = function (name) {\r\n var globalEventFired = false;\r\n try {\r\n globalEventFired = fireGlobalEvent.apply(null, arguments);\r\n } catch (e) {\r\n async.throwLater(e);\r\n globalEventFired = true;\r\n }\r\n\r\n var domEventFired = false;\r\n try {\r\n domEventFired = fireDomEvent(name,\r\n eventToObjectGenerator[name].apply(null, arguments));\r\n } catch (e) {\r\n async.throwLater(e);\r\n domEventFired = true;\r\n }\r\n\r\n return domEventFired || globalEventFired;\r\n};\r\n\r\nPromise.config = function(opts) {\r\n opts = Object(opts);\r\n if (\"longStackTraces\" in opts) {\r\n if (opts.longStackTraces) {\r\n Promise.longStackTraces();\r\n } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {\r\n disableLongStackTraces();\r\n }\r\n }\r\n if (\"warnings\" in opts) {\r\n var warningsOption = opts.warnings;\r\n config.warnings = !!warningsOption;\r\n wForgottenReturn = config.warnings;\r\n\r\n if (util.isObject(warningsOption)) {\r\n if (\"wForgottenReturn\" in warningsOption) {\r\n wForgottenReturn = !!warningsOption.wForgottenReturn;\r\n }\r\n }\r\n }\r\n if (\"cancellation\" in opts && opts.cancellation && !config.cancellation) {\r\n if (async.haveItemsQueued()) {\r\n throw new Error(\r\n \"cannot enable cancellation after promises are in use\");\r\n }\r\n Promise.prototype._clearCancellationData =\r\n cancellationClearCancellationData;\r\n Promise.prototype._propagateFrom = cancellationPropagateFrom;\r\n Promise.prototype._onCancel = cancellationOnCancel;\r\n Promise.prototype._setOnCancel = cancellationSetOnCancel;\r\n Promise.prototype._attachCancellationCallback =\r\n cancellationAttachCancellationCallback;\r\n Promise.prototype._execute = cancellationExecute;\r\n propagateFromFunction = cancellationPropagateFrom;\r\n config.cancellation = true;\r\n }\r\n if (\"monitoring\" in opts) {\r\n if (opts.monitoring && !config.monitoring) {\r\n config.monitoring = true;\r\n Promise.prototype._fireEvent = activeFireEvent;\r\n } else if (!opts.monitoring && config.monitoring) {\r\n config.monitoring = false;\r\n Promise.prototype._fireEvent = defaultFireEvent;\r\n }\r\n }\r\n};\r\n\r\nfunction defaultFireEvent() { return false; }\r\n\r\nPromise.prototype._fireEvent = defaultFireEvent;\r\nPromise.prototype._execute = function(executor, resolve, reject) {\r\n try {\r\n executor(resolve, reject);\r\n } catch (e) {\r\n return e;\r\n }\r\n};\r\nPromise.prototype._onCancel = function () {};\r\nPromise.prototype._setOnCancel = function (handler) { ; };\r\nPromise.prototype._attachCancellationCallback = function(onCancel) {\r\n ;\r\n};\r\nPromise.prototype._captureStackTrace = function () {};\r\nPromise.prototype._attachExtraTrace = function () {};\r\nPromise.prototype._clearCancellationData = function() {};\r\nPromise.prototype._propagateFrom = function (parent, flags) {\r\n ;\r\n ;\r\n};\r\n\r\nfunction cancellationExecute(executor, resolve, reject) {\r\n var promise = this;\r\n try {\r\n executor(resolve, reject, function(onCancel) {\r\n if (typeof onCancel !== \"function\") {\r\n throw new TypeError(\"onCancel must be a function, got: \" +\r\n util.toString(onCancel));\r\n }\r\n promise._attachCancellationCallback(onCancel);\r\n });\r\n } catch (e) {\r\n return e;\r\n }\r\n}\r\n\r\nfunction cancellationAttachCancellationCallback(onCancel) {\r\n if (!this.isCancellable()) return this;\r\n\r\n var previousOnCancel = this._onCancel();\r\n if (previousOnCancel !== undefined) {\r\n if (util.isArray(previousOnCancel)) {\r\n previousOnCancel.push(onCancel);\r\n } else {\r\n this._setOnCancel([previousOnCancel, onCancel]);\r\n }\r\n } else {\r\n this._setOnCancel(onCancel);\r\n }\r\n}\r\n\r\nfunction cancellationOnCancel() {\r\n return this._onCancelField;\r\n}\r\n\r\nfunction cancellationSetOnCancel(onCancel) {\r\n this._onCancelField = onCancel;\r\n}\r\n\r\nfunction cancellationClearCancellationData() {\r\n this._cancellationParent = undefined;\r\n this._onCancelField = undefined;\r\n}\r\n\r\nfunction cancellationPropagateFrom(parent, flags) {\r\n if ((flags & 1) !== 0) {\r\n this._cancellationParent = parent;\r\n var branchesRemainingToCancel = parent._branchesRemainingToCancel;\r\n if (branchesRemainingToCancel === undefined) {\r\n branchesRemainingToCancel = 0;\r\n }\r\n parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;\r\n }\r\n if ((flags & 2) !== 0 && parent._isBound()) {\r\n this._setBoundTo(parent._boundTo);\r\n }\r\n}\r\n\r\nfunction bindingPropagateFrom(parent, flags) {\r\n if ((flags & 2) !== 0 && parent._isBound()) {\r\n this._setBoundTo(parent._boundTo);\r\n }\r\n}\r\nvar propagateFromFunction = bindingPropagateFrom;\r\n\r\nfunction boundValueFunction() {\r\n var ret = this._boundTo;\r\n if (ret !== undefined) {\r\n if (ret instanceof Promise) {\r\n if (ret.isFulfilled()) {\r\n return ret.value();\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n }\r\n return ret;\r\n}\r\n\r\nfunction longStackTracesCaptureStackTrace() {\r\n this._trace = new CapturedTrace(this._peekContext());\r\n}\r\n\r\nfunction longStackTracesAttachExtraTrace(error, ignoreSelf) {\r\n if (canAttachTrace(error)) {\r\n var trace = this._trace;\r\n if (trace !== undefined) {\r\n if (ignoreSelf) trace = trace._parent;\r\n }\r\n if (trace !== undefined) {\r\n trace.attachExtraTrace(error);\r\n } else if (!error.__stackCleaned__) {\r\n var parsed = parseStackAndMessage(error);\r\n util.notEnumerableProp(error, \"stack\",\r\n parsed.message + \"\\n\" + parsed.stack.join(\"\\n\"));\r\n util.notEnumerableProp(error, \"__stackCleaned__\", true);\r\n }\r\n }\r\n}\r\n\r\nfunction checkForgottenReturns(returnValue, promiseCreated, name, promise,\r\n parent) {\r\n if (returnValue === undefined && promiseCreated !== null &&\r\n wForgottenReturn) {\r\n if (parent !== undefined && parent._returnedNonUndefined()) return;\r\n if ((promise._bitField & 65535) === 0) return;\r\n\r\n if (name) name = name + \" \";\r\n var msg = \"a promise was created in a \" + name +\r\n \"handler but was not returned from it\";\r\n promise._warn(msg, true, promiseCreated);\r\n }\r\n}\r\n\r\nfunction deprecated(name, replacement) {\r\n var message = name +\r\n \" is deprecated and will be removed in a future version.\";\r\n if (replacement) message += \" Use \" + replacement + \" instead.\";\r\n return warn(message);\r\n}\r\n\r\nfunction warn(message, shouldUseOwnTrace, promise) {\r\n if (!config.warnings) return;\r\n var warning = new Warning(message);\r\n var ctx;\r\n if (shouldUseOwnTrace) {\r\n promise._attachExtraTrace(warning);\r\n } else if (config.longStackTraces && (ctx = Promise._peekContext())) {\r\n ctx.attachExtraTrace(warning);\r\n } else {\r\n var parsed = parseStackAndMessage(warning);\r\n warning.stack = parsed.message + \"\\n\" + parsed.stack.join(\"\\n\");\r\n }\r\n\r\n if (!activeFireEvent(\"warning\", warning)) {\r\n formatAndLogError(warning, \"\", true);\r\n }\r\n}\r\n\r\nfunction reconstructStack(message, stacks) {\r\n for (var i = 0; i < stacks.length - 1; ++i) {\r\n stacks[i].push(\"From previous event:\");\r\n stacks[i] = stacks[i].join(\"\\n\");\r\n }\r\n if (i < stacks.length) {\r\n stacks[i] = stacks[i].join(\"\\n\");\r\n }\r\n return message + \"\\n\" + stacks.join(\"\\n\");\r\n}\r\n\r\nfunction removeDuplicateOrEmptyJumps(stacks) {\r\n for (var i = 0; i < stacks.length; ++i) {\r\n if (stacks[i].length === 0 ||\r\n ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {\r\n stacks.splice(i, 1);\r\n i--;\r\n }\r\n }\r\n}\r\n\r\nfunction removeCommonRoots(stacks) {\r\n var current = stacks[0];\r\n for (var i = 1; i < stacks.length; ++i) {\r\n var prev = stacks[i];\r\n var currentLastIndex = current.length - 1;\r\n var currentLastLine = current[currentLastIndex];\r\n var commonRootMeetPoint = -1;\r\n\r\n for (var j = prev.length - 1; j >= 0; --j) {\r\n if (prev[j] === currentLastLine) {\r\n commonRootMeetPoint = j;\r\n break;\r\n }\r\n }\r\n\r\n for (var j = commonRootMeetPoint; j >= 0; --j) {\r\n var line = prev[j];\r\n if (current[currentLastIndex] === line) {\r\n current.pop();\r\n currentLastIndex--;\r\n } else {\r\n break;\r\n }\r\n }\r\n current = prev;\r\n }\r\n}\r\n\r\nfunction cleanStack(stack) {\r\n var ret = [];\r\n for (var i = 0; i < stack.length; ++i) {\r\n var line = stack[i];\r\n var isTraceLine = \" (No stack trace)\" === line ||\r\n stackFramePattern.test(line);\r\n var isInternalFrame = isTraceLine && shouldIgnore(line);\r\n if (isTraceLine && !isInternalFrame) {\r\n if (indentStackFrames && line.charAt(0) !== \" \") {\r\n line = \" \" + line;\r\n }\r\n ret.push(line);\r\n }\r\n }\r\n return ret;\r\n}\r\n\r\nfunction stackFramesAsArray(error) {\r\n var stack = error.stack.replace(/\\s+$/g, \"\").split(\"\\n\");\r\n for (var i = 0; i < stack.length; ++i) {\r\n var line = stack[i];\r\n if (\" (No stack trace)\" === line || stackFramePattern.test(line)) {\r\n break;\r\n }\r\n }\r\n if (i > 0) {\r\n stack = stack.slice(i);\r\n }\r\n return stack;\r\n}\r\n\r\nfunction parseStackAndMessage(error) {\r\n var stack = error.stack;\r\n var message = error.toString();\r\n stack = typeof stack === \"string\" && stack.length > 0\r\n ? stackFramesAsArray(error) : [\" (No stack trace)\"];\r\n return {\r\n message: message,\r\n stack: cleanStack(stack)\r\n };\r\n}\r\n\r\nfunction formatAndLogError(error, title, isSoft) {\r\n if (typeof console !== \"undefined\") {\r\n var message;\r\n if (util.isObject(error)) {\r\n var stack = error.stack;\r\n message = title + formatStack(stack, error);\r\n } else {\r\n message = title + String(error);\r\n }\r\n if (typeof printWarning === \"function\") {\r\n printWarning(message, isSoft);\r\n } else if (typeof console.log === \"function\" ||\r\n typeof console.log === \"object\") {\r\n console.log(message);\r\n }\r\n }\r\n}\r\n\r\nfunction fireRejectionEvent(name, localHandler, reason, promise) {\r\n var localEventFired = false;\r\n try {\r\n if (typeof localHandler === \"function\") {\r\n localEventFired = true;\r\n if (name === \"rejectionHandled\") {\r\n localHandler(promise);\r\n } else {\r\n localHandler(reason, promise);\r\n }\r\n }\r\n } catch (e) {\r\n async.throwLater(e);\r\n }\r\n\r\n if (name === \"unhandledRejection\") {\r\n if (!activeFireEvent(name, reason, promise) && !localEventFired) {\r\n formatAndLogError(reason, \"Unhandled rejection \");\r\n }\r\n } else {\r\n activeFireEvent(name, promise);\r\n }\r\n}\r\n\r\nfunction formatNonError(obj) {\r\n var str;\r\n if (typeof obj === \"function\") {\r\n str = \"[function \" +\r\n (obj.name || \"anonymous\") +\r\n \"]\";\r\n } else {\r\n str = obj && typeof obj.toString === \"function\"\r\n ? obj.toString() : util.toString(obj);\r\n var ruselessToString = /\\[object [a-zA-Z0-9$_]+\\]/;\r\n if (ruselessToString.test(str)) {\r\n try {\r\n var newStr = JSON.stringify(obj);\r\n str = newStr;\r\n }\r\n catch(e) {\r\n\r\n }\r\n }\r\n if (str.length === 0) {\r\n str = \"(empty array)\";\r\n }\r\n }\r\n return (\"(<\" + snip(str) + \">, no stack trace)\");\r\n}\r\n\r\nfunction snip(str) {\r\n var maxChars = 41;\r\n if (str.length < maxChars) {\r\n return str;\r\n }\r\n return str.substr(0, maxChars - 3) + \"...\";\r\n}\r\n\r\nfunction longStackTracesIsSupported() {\r\n return typeof captureStackTrace === \"function\";\r\n}\r\n\r\nvar shouldIgnore = function() { return false; };\r\nvar parseLineInfoRegex = /[\\/<\\(]([^:\\/]+):(\\d+):(?:\\d+)\\)?\\s*$/;\r\nfunction parseLineInfo(line) {\r\n var matches = line.match(parseLineInfoRegex);\r\n if (matches) {\r\n return {\r\n fileName: matches[1],\r\n line: parseInt(matches[2], 10)\r\n };\r\n }\r\n}\r\n\r\nfunction setBounds(firstLineError, lastLineError) {\r\n if (!longStackTracesIsSupported()) return;\r\n var firstStackLines = firstLineError.stack.split(\"\\n\");\r\n var lastStackLines = lastLineError.stack.split(\"\\n\");\r\n var firstIndex = -1;\r\n var lastIndex = -1;\r\n var firstFileName;\r\n var lastFileName;\r\n for (var i = 0; i < firstStackLines.length; ++i) {\r\n var result = parseLineInfo(firstStackLines[i]);\r\n if (result) {\r\n firstFileName = result.fileName;\r\n firstIndex = result.line;\r\n break;\r\n }\r\n }\r\n for (var i = 0; i < lastStackLines.length; ++i) {\r\n var result = parseLineInfo(lastStackLines[i]);\r\n if (result) {\r\n lastFileName = result.fileName;\r\n lastIndex = result.line;\r\n break;\r\n }\r\n }\r\n if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||\r\n firstFileName !== lastFileName || firstIndex >= lastIndex) {\r\n return;\r\n }\r\n\r\n shouldIgnore = function(line) {\r\n if (bluebirdFramePattern.test(line)) return true;\r\n var info = parseLineInfo(line);\r\n if (info) {\r\n if (info.fileName === firstFileName &&\r\n (firstIndex <= info.line && info.line <= lastIndex)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n}\r\n\r\nfunction CapturedTrace(parent) {\r\n this._parent = parent;\r\n this._promisesCreated = 0;\r\n var length = this._length = 1 + (parent === undefined ? 0 : parent._length);\r\n captureStackTrace(this, CapturedTrace);\r\n if (length > 32) this.uncycle();\r\n}\r\nutil.inherits(CapturedTrace, Error);\r\nContext.CapturedTrace = CapturedTrace;\r\n\r\nCapturedTrace.prototype.uncycle = function() {\r\n var length = this._length;\r\n if (length < 2) return;\r\n var nodes = [];\r\n var stackToIndex = {};\r\n\r\n for (var i = 0, node = this; node !== undefined; ++i) {\r\n nodes.push(node);\r\n node = node._parent;\r\n }\r\n length = this._length = i;\r\n for (var i = length - 1; i >= 0; --i) {\r\n var stack = nodes[i].stack;\r\n if (stackToIndex[stack] === undefined) {\r\n stackToIndex[stack] = i;\r\n }\r\n }\r\n for (var i = 0; i < length; ++i) {\r\n var currentStack = nodes[i].stack;\r\n var index = stackToIndex[currentStack];\r\n if (index !== undefined && index !== i) {\r\n if (index > 0) {\r\n nodes[index - 1]._parent = undefined;\r\n nodes[index - 1]._length = 1;\r\n }\r\n nodes[i]._parent = undefined;\r\n nodes[i]._length = 1;\r\n var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;\r\n\r\n if (index < length - 1) {\r\n cycleEdgeNode._parent = nodes[index + 1];\r\n cycleEdgeNode._parent.uncycle();\r\n cycleEdgeNode._length =\r\n cycleEdgeNode._parent._length + 1;\r\n } else {\r\n cycleEdgeNode._parent = undefined;\r\n cycleEdgeNode._length = 1;\r\n }\r\n var currentChildLength = cycleEdgeNode._length + 1;\r\n for (var j = i - 2; j >= 0; --j) {\r\n nodes[j]._length = currentChildLength;\r\n currentChildLength++;\r\n }\r\n return;\r\n }\r\n }\r\n};\r\n\r\nCapturedTrace.prototype.attachExtraTrace = function(error) {\r\n if (error.__stackCleaned__) return;\r\n this.uncycle();\r\n var parsed = parseStackAndMessage(error);\r\n var message = parsed.message;\r\n var stacks = [parsed.stack];\r\n\r\n var trace = this;\r\n while (trace !== undefined) {\r\n stacks.push(cleanStack(trace.stack.split(\"\\n\")));\r\n trace = trace._parent;\r\n }\r\n removeCommonRoots(stacks);\r\n removeDuplicateOrEmptyJumps(stacks);\r\n util.notEnumerableProp(error, \"stack\", reconstructStack(message, stacks));\r\n util.notEnumerableProp(error, \"__stackCleaned__\", true);\r\n};\r\n\r\nvar captureStackTrace = (function stackDetection() {\r\n var v8stackFramePattern = /^\\s*at\\s*/;\r\n var v8stackFormatter = function(stack, error) {\r\n if (typeof stack === \"string\") return stack;\r\n\r\n if (error.name !== undefined &&\r\n error.message !== undefined) {\r\n return error.toString();\r\n }\r\n return formatNonError(error);\r\n };\r\n\r\n if (typeof Error.stackTraceLimit === \"number\" &&\r\n typeof Error.captureStackTrace === \"function\") {\r\n Error.stackTraceLimit += 6;\r\n stackFramePattern = v8stackFramePattern;\r\n formatStack = v8stackFormatter;\r\n var captureStackTrace = Error.captureStackTrace;\r\n\r\n shouldIgnore = function(line) {\r\n return bluebirdFramePattern.test(line);\r\n };\r\n return function(receiver, ignoreUntil) {\r\n Error.stackTraceLimit += 6;\r\n captureStackTrace(receiver, ignoreUntil);\r\n Error.stackTraceLimit -= 6;\r\n };\r\n }\r\n var err = new Error();\r\n\r\n if (typeof err.stack === \"string\" &&\r\n err.stack.split(\"\\n\")[0].indexOf(\"stackDetection@\") >= 0) {\r\n stackFramePattern = /@/;\r\n formatStack = v8stackFormatter;\r\n indentStackFrames = true;\r\n return function captureStackTrace(o) {\r\n o.stack = new Error().stack;\r\n };\r\n }\r\n\r\n var hasStackAfterThrow;\r\n try { throw new Error(); }\r\n catch(e) {\r\n hasStackAfterThrow = (\"stack\" in e);\r\n }\r\n if (!(\"stack\" in err) && hasStackAfterThrow &&\r\n typeof Error.stackTraceLimit === \"number\") {\r\n stackFramePattern = v8stackFramePattern;\r\n formatStack = v8stackFormatter;\r\n return function captureStackTrace(o) {\r\n Error.stackTraceLimit += 6;\r\n try { throw new Error(); }\r\n catch(e) { o.stack = e.stack; }\r\n Error.stackTraceLimit -= 6;\r\n };\r\n }\r\n\r\n formatStack = function(stack, error) {\r\n if (typeof stack === \"string\") return stack;\r\n\r\n if ((typeof error === \"object\" ||\r\n typeof error === \"function\") &&\r\n error.name !== undefined &&\r\n error.message !== undefined) {\r\n return error.toString();\r\n }\r\n return formatNonError(error);\r\n };\r\n\r\n return null;\r\n\r\n})([]);\r\n\r\nif (typeof console !== \"undefined\" && typeof console.warn !== \"undefined\") {\r\n printWarning = function (message) {\r\n console.warn(message);\r\n };\r\n if (util.isNode && process.stderr.isTTY) {\r\n printWarning = function(message, isSoft) {\r\n var color = isSoft ? \"\\u001b[33m\" : \"\\u001b[31m\";\r\n console.warn(color + message + \"\\u001b[0m\\n\");\r\n };\r\n } else if (!util.isNode && typeof (new Error().stack) === \"string\") {\r\n printWarning = function(message, isSoft) {\r\n console.warn(\"%c\" + message,\r\n isSoft ? \"color: darkorange\" : \"color: red\");\r\n };\r\n }\r\n}\r\n\r\nvar config = {\r\n warnings: warnings,\r\n longStackTraces: false,\r\n cancellation: false,\r\n monitoring: false\r\n};\r\n\r\nif (longStackTraces) Promise.longStackTraces();\r\n\r\nreturn {\r\n longStackTraces: function() {\r\n return config.longStackTraces;\r\n },\r\n warnings: function() {\r\n return config.warnings;\r\n },\r\n cancellation: function() {\r\n return config.cancellation;\r\n },\r\n monitoring: function() {\r\n return config.monitoring;\r\n },\r\n propagateFromFunction: function() {\r\n return propagateFromFunction;\r\n },\r\n boundValueFunction: function() {\r\n return boundValueFunction;\r\n },\r\n checkForgottenReturns: checkForgottenReturns,\r\n setBounds: setBounds,\r\n warn: warn,\r\n deprecated: deprecated,\r\n CapturedTrace: CapturedTrace,\r\n fireDomEvent: fireDomEvent,\r\n fireGlobalEvent: fireGlobalEvent\r\n};\r\n};\r\n\r\n},{\"./errors\":12,\"./util\":36}],10:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise) {\r\nfunction returner() {\r\n return this.value;\r\n}\r\nfunction thrower() {\r\n throw this.reason;\r\n}\r\n\r\nPromise.prototype[\"return\"] =\r\nPromise.prototype.thenReturn = function (value) {\r\n if (value instanceof Promise) value.suppressUnhandledRejections();\r\n return this._then(\r\n returner, undefined, undefined, {value: value}, undefined);\r\n};\r\n\r\nPromise.prototype[\"throw\"] =\r\nPromise.prototype.thenThrow = function (reason) {\r\n return this._then(\r\n thrower, undefined, undefined, {reason: reason}, undefined);\r\n};\r\n\r\nPromise.prototype.catchThrow = function (reason) {\r\n if (arguments.length <= 1) {\r\n return this._then(\r\n undefined, thrower, undefined, {reason: reason}, undefined);\r\n } else {\r\n var _reason = arguments[1];\r\n var handler = function() {throw _reason;};\r\n return this.caught(reason, handler);\r\n }\r\n};\r\n\r\nPromise.prototype.catchReturn = function (value) {\r\n if (arguments.length <= 1) {\r\n if (value instanceof Promise) value.suppressUnhandledRejections();\r\n return this._then(\r\n undefined, returner, undefined, {value: value}, undefined);\r\n } else {\r\n var _value = arguments[1];\r\n if (_value instanceof Promise) _value.suppressUnhandledRejections();\r\n var handler = function() {return _value;};\r\n return this.caught(value, handler);\r\n }\r\n};\r\n};\r\n\r\n},{}],11:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise, INTERNAL) {\r\nvar PromiseReduce = Promise.reduce;\r\nvar PromiseAll = Promise.all;\r\n\r\nfunction promiseAllThis() {\r\n return PromiseAll(this);\r\n}\r\n\r\nfunction PromiseMapSeries(promises, fn) {\r\n return PromiseReduce(promises, fn, INTERNAL, INTERNAL);\r\n}\r\n\r\nPromise.prototype.each = function (fn) {\r\n return this.mapSeries(fn)\r\n ._then(promiseAllThis, undefined, undefined, this, undefined);\r\n};\r\n\r\nPromise.prototype.mapSeries = function (fn) {\r\n return PromiseReduce(this, fn, INTERNAL, INTERNAL);\r\n};\r\n\r\nPromise.each = function (promises, fn) {\r\n return PromiseMapSeries(promises, fn)\r\n ._then(promiseAllThis, undefined, undefined, promises, undefined);\r\n};\r\n\r\nPromise.mapSeries = PromiseMapSeries;\r\n};\r\n\r\n},{}],12:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nvar es5 = _dereq_(\"./es5\");\r\nvar Objectfreeze = es5.freeze;\r\nvar util = _dereq_(\"./util\");\r\nvar inherits = util.inherits;\r\nvar notEnumerableProp = util.notEnumerableProp;\r\n\r\nfunction subError(nameProperty, defaultMessage) {\r\n function SubError(message) {\r\n if (!(this instanceof SubError)) return new SubError(message);\r\n notEnumerableProp(this, \"message\",\r\n typeof message === \"string\" ? message : defaultMessage);\r\n notEnumerableProp(this, \"name\", nameProperty);\r\n if (Error.captureStackTrace) {\r\n Error.captureStackTrace(this, this.constructor);\r\n } else {\r\n Error.call(this);\r\n }\r\n }\r\n inherits(SubError, Error);\r\n return SubError;\r\n}\r\n\r\nvar _TypeError, _RangeError;\r\nvar Warning = subError(\"Warning\", \"warning\");\r\nvar CancellationError = subError(\"CancellationError\", \"cancellation error\");\r\nvar TimeoutError = subError(\"TimeoutError\", \"timeout error\");\r\nvar AggregateError = subError(\"AggregateError\", \"aggregate error\");\r\ntry {\r\n _TypeError = TypeError;\r\n _RangeError = RangeError;\r\n} catch(e) {\r\n _TypeError = subError(\"TypeError\", \"type error\");\r\n _RangeError = subError(\"RangeError\", \"range error\");\r\n}\r\n\r\nvar methods = (\"join pop push shift unshift slice filter forEach some \" +\r\n \"every map indexOf lastIndexOf reduce reduceRight sort reverse\").split(\" \");\r\n\r\nfor (var i = 0; i < methods.length; ++i) {\r\n if (typeof Array.prototype[methods[i]] === \"function\") {\r\n AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];\r\n }\r\n}\r\n\r\nes5.defineProperty(AggregateError.prototype, \"length\", {\r\n value: 0,\r\n configurable: false,\r\n writable: true,\r\n enumerable: true\r\n});\r\nAggregateError.prototype[\"isOperational\"] = true;\r\nvar level = 0;\r\nAggregateError.prototype.toString = function() {\r\n var indent = Array(level * 4 + 1).join(\" \");\r\n var ret = \"\\n\" + indent + \"AggregateError of:\" + \"\\n\";\r\n level++;\r\n indent = Array(level * 4 + 1).join(\" \");\r\n for (var i = 0; i < this.length; ++i) {\r\n var str = this[i] === this ? \"[Circular AggregateError]\" : this[i] + \"\";\r\n var lines = str.split(\"\\n\");\r\n for (var j = 0; j < lines.length; ++j) {\r\n lines[j] = indent + lines[j];\r\n }\r\n str = lines.join(\"\\n\");\r\n ret += str + \"\\n\";\r\n }\r\n level--;\r\n return ret;\r\n};\r\n\r\nfunction OperationalError(message) {\r\n if (!(this instanceof OperationalError))\r\n return new OperationalError(message);\r\n notEnumerableProp(this, \"name\", \"OperationalError\");\r\n notEnumerableProp(this, \"message\", message);\r\n this.cause = message;\r\n this[\"isOperational\"] = true;\r\n\r\n if (message instanceof Error) {\r\n notEnumerableProp(this, \"message\", message.message);\r\n notEnumerableProp(this, \"stack\", message.stack);\r\n } else if (Error.captureStackTrace) {\r\n Error.captureStackTrace(this, this.constructor);\r\n }\r\n\r\n}\r\ninherits(OperationalError, Error);\r\n\r\nvar errorTypes = Error[\"__BluebirdErrorTypes__\"];\r\nif (!errorTypes) {\r\n errorTypes = Objectfreeze({\r\n CancellationError: CancellationError,\r\n TimeoutError: TimeoutError,\r\n OperationalError: OperationalError,\r\n RejectionError: OperationalError,\r\n AggregateError: AggregateError\r\n });\r\n es5.defineProperty(Error, \"__BluebirdErrorTypes__\", {\r\n value: errorTypes,\r\n writable: false,\r\n enumerable: false,\r\n configurable: false\r\n });\r\n}\r\n\r\nmodule.exports = {\r\n Error: Error,\r\n TypeError: _TypeError,\r\n RangeError: _RangeError,\r\n CancellationError: errorTypes.CancellationError,\r\n OperationalError: errorTypes.OperationalError,\r\n TimeoutError: errorTypes.TimeoutError,\r\n AggregateError: errorTypes.AggregateError,\r\n Warning: Warning\r\n};\r\n\r\n},{\"./es5\":13,\"./util\":36}],13:[function(_dereq_,module,exports){\r\nvar isES5 = (function(){\r\n \"use strict\";\r\n return this === undefined;\r\n})();\r\n\r\nif (isES5) {\r\n module.exports = {\r\n freeze: Object.freeze,\r\n defineProperty: Object.defineProperty,\r\n getDescriptor: Object.getOwnPropertyDescriptor,\r\n keys: Object.keys,\r\n names: Object.getOwnPropertyNames,\r\n getPrototypeOf: Object.getPrototypeOf,\r\n isArray: Array.isArray,\r\n isES5: isES5,\r\n propertyIsWritable: function(obj, prop) {\r\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop);\r\n return !!(!descriptor || descriptor.writable || descriptor.set);\r\n }\r\n };\r\n} else {\r\n var has = {}.hasOwnProperty;\r\n var str = {}.toString;\r\n var proto = {}.constructor.prototype;\r\n\r\n var ObjectKeys = function (o) {\r\n var ret = [];\r\n for (var key in o) {\r\n if (has.call(o, key)) {\r\n ret.push(key);\r\n }\r\n }\r\n return ret;\r\n };\r\n\r\n var ObjectGetDescriptor = function(o, key) {\r\n return {value: o[key]};\r\n };\r\n\r\n var ObjectDefineProperty = function (o, key, desc) {\r\n o[key] = desc.value;\r\n return o;\r\n };\r\n\r\n var ObjectFreeze = function (obj) {\r\n return obj;\r\n };\r\n\r\n var ObjectGetPrototypeOf = function (obj) {\r\n try {\r\n return Object(obj).constructor.prototype;\r\n }\r\n catch (e) {\r\n return proto;\r\n }\r\n };\r\n\r\n var ArrayIsArray = function (obj) {\r\n try {\r\n return str.call(obj) === \"[object Array]\";\r\n }\r\n catch(e) {\r\n return false;\r\n }\r\n };\r\n\r\n module.exports = {\r\n isArray: ArrayIsArray,\r\n keys: ObjectKeys,\r\n names: ObjectKeys,\r\n defineProperty: ObjectDefineProperty,\r\n getDescriptor: ObjectGetDescriptor,\r\n freeze: ObjectFreeze,\r\n getPrototypeOf: ObjectGetPrototypeOf,\r\n isES5: isES5,\r\n propertyIsWritable: function() {\r\n return true;\r\n }\r\n };\r\n}\r\n\r\n},{}],14:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise, INTERNAL) {\r\nvar PromiseMap = Promise.map;\r\n\r\nPromise.prototype.filter = function (fn, options) {\r\n return PromiseMap(this, fn, options, INTERNAL);\r\n};\r\n\r\nPromise.filter = function (promises, fn, options) {\r\n return PromiseMap(promises, fn, options, INTERNAL);\r\n};\r\n};\r\n\r\n},{}],15:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise, tryConvertToPromise) {\r\nvar util = _dereq_(\"./util\");\r\nvar CancellationError = Promise.CancellationError;\r\nvar errorObj = util.errorObj;\r\n\r\nfunction PassThroughHandlerContext(promise, type, handler) {\r\n this.promise = promise;\r\n this.type = type;\r\n this.handler = handler;\r\n this.called = false;\r\n this.cancelPromise = null;\r\n}\r\n\r\nPassThroughHandlerContext.prototype.isFinallyHandler = function() {\r\n return this.type === 0;\r\n};\r\n\r\nfunction FinallyHandlerCancelReaction(finallyHandler) {\r\n this.finallyHandler = finallyHandler;\r\n}\r\n\r\nFinallyHandlerCancelReaction.prototype._resultCancelled = function() {\r\n checkCancel(this.finallyHandler);\r\n};\r\n\r\nfunction checkCancel(ctx, reason) {\r\n if (ctx.cancelPromise != null) {\r\n if (arguments.length > 1) {\r\n ctx.cancelPromise._reject(reason);\r\n } else {\r\n ctx.cancelPromise._cancel();\r\n }\r\n ctx.cancelPromise = null;\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\nfunction succeed() {\r\n return finallyHandler.call(this, this.promise._target()._settledValue());\r\n}\r\nfunction fail(reason) {\r\n if (checkCancel(this, reason)) return;\r\n errorObj.e = reason;\r\n return errorObj;\r\n}\r\nfunction finallyHandler(reasonOrValue) {\r\n var promise = this.promise;\r\n var handler = this.handler;\r\n\r\n if (!this.called) {\r\n this.called = true;\r\n var ret = this.isFinallyHandler()\r\n ? handler.call(promise._boundValue())\r\n : handler.call(promise._boundValue(), reasonOrValue);\r\n if (ret !== undefined) {\r\n promise._setReturnedNonUndefined();\r\n var maybePromise = tryConvertToPromise(ret, promise);\r\n if (maybePromise instanceof Promise) {\r\n if (this.cancelPromise != null) {\r\n if (maybePromise.isCancelled()) {\r\n var reason =\r\n new CancellationError(\"late cancellation observer\");\r\n promise._attachExtraTrace(reason);\r\n errorObj.e = reason;\r\n return errorObj;\r\n } else if (maybePromise.isPending()) {\r\n maybePromise._attachCancellationCallback(\r\n new FinallyHandlerCancelReaction(this));\r\n }\r\n }\r\n return maybePromise._then(\r\n succeed, fail, undefined, this, undefined);\r\n }\r\n }\r\n }\r\n\r\n if (promise.isRejected()) {\r\n checkCancel(this);\r\n errorObj.e = reasonOrValue;\r\n return errorObj;\r\n } else {\r\n checkCancel(this);\r\n return reasonOrValue;\r\n }\r\n}\r\n\r\nPromise.prototype._passThrough = function(handler, type, success, fail) {\r\n if (typeof handler !== \"function\") return this.then();\r\n return this._then(success,\r\n fail,\r\n undefined,\r\n new PassThroughHandlerContext(this, type, handler),\r\n undefined);\r\n};\r\n\r\nPromise.prototype.lastly =\r\nPromise.prototype[\"finally\"] = function (handler) {\r\n return this._passThrough(handler,\r\n 0,\r\n finallyHandler,\r\n finallyHandler);\r\n};\r\n\r\nPromise.prototype.tap = function (handler) {\r\n return this._passThrough(handler, 1, finallyHandler);\r\n};\r\n\r\nreturn PassThroughHandlerContext;\r\n};\r\n\r\n},{\"./util\":36}],16:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise,\r\n apiRejection,\r\n INTERNAL,\r\n tryConvertToPromise,\r\n Proxyable,\r\n debug) {\r\nvar errors = _dereq_(\"./errors\");\r\nvar TypeError = errors.TypeError;\r\nvar util = _dereq_(\"./util\");\r\nvar errorObj = util.errorObj;\r\nvar tryCatch = util.tryCatch;\r\nvar yieldHandlers = [];\r\n\r\nfunction promiseFromYieldHandler(value, yieldHandlers, traceParent) {\r\n for (var i = 0; i < yieldHandlers.length; ++i) {\r\n traceParent._pushContext();\r\n var result = tryCatch(yieldHandlers[i])(value);\r\n traceParent._popContext();\r\n if (result === errorObj) {\r\n traceParent._pushContext();\r\n var ret = Promise.reject(errorObj.e);\r\n traceParent._popContext();\r\n return ret;\r\n }\r\n var maybePromise = tryConvertToPromise(result, traceParent);\r\n if (maybePromise instanceof Promise) return maybePromise;\r\n }\r\n return null;\r\n}\r\n\r\nfunction PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {\r\n if (debug.cancellation()) {\r\n var internal = new Promise(INTERNAL);\r\n var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);\r\n this._promise = internal.lastly(function() {\r\n return _finallyPromise;\r\n });\r\n internal._captureStackTrace();\r\n internal._setOnCancel(this);\r\n } else {\r\n var promise = this._promise = new Promise(INTERNAL);\r\n promise._captureStackTrace();\r\n }\r\n this._stack = stack;\r\n this._generatorFunction = generatorFunction;\r\n this._receiver = receiver;\r\n this._generator = undefined;\r\n this._yieldHandlers = typeof yieldHandler === \"function\"\r\n ? [yieldHandler].concat(yieldHandlers)\r\n : yieldHandlers;\r\n this._yieldedPromise = null;\r\n this._cancellationPhase = false;\r\n}\r\nutil.inherits(PromiseSpawn, Proxyable);\r\n\r\nPromiseSpawn.prototype._isResolved = function() {\r\n return this._promise === null;\r\n};\r\n\r\nPromiseSpawn.prototype._cleanup = function() {\r\n this._promise = this._generator = null;\r\n if (debug.cancellation() && this._finallyPromise !== null) {\r\n this._finallyPromise._fulfill();\r\n this._finallyPromise = null;\r\n }\r\n};\r\n\r\nPromiseSpawn.prototype._promiseCancelled = function() {\r\n if (this._isResolved()) return;\r\n var implementsReturn = typeof this._generator[\"return\"] !== \"undefined\";\r\n\r\n var result;\r\n if (!implementsReturn) {\r\n var reason = new Promise.CancellationError(\r\n \"generator .return() sentinel\");\r\n Promise.coroutine.returnSentinel = reason;\r\n this._promise._attachExtraTrace(reason);\r\n this._promise._pushContext();\r\n result = tryCatch(this._generator[\"throw\"]).call(this._generator,\r\n reason);\r\n this._promise._popContext();\r\n } else {\r\n this._promise._pushContext();\r\n result = tryCatch(this._generator[\"return\"]).call(this._generator,\r\n undefined);\r\n this._promise._popContext();\r\n }\r\n this._cancellationPhase = true;\r\n this._yieldedPromise = null;\r\n this._continue(result);\r\n};\r\n\r\nPromiseSpawn.prototype._promiseFulfilled = function(value) {\r\n this._yieldedPromise = null;\r\n this._promise._pushContext();\r\n var result = tryCatch(this._generator.next).call(this._generator, value);\r\n this._promise._popContext();\r\n this._continue(result);\r\n};\r\n\r\nPromiseSpawn.prototype._promiseRejected = function(reason) {\r\n this._yieldedPromise = null;\r\n this._promise._attachExtraTrace(reason);\r\n this._promise._pushContext();\r\n var result = tryCatch(this._generator[\"throw\"])\r\n .call(this._generator, reason);\r\n this._promise._popContext();\r\n this._continue(result);\r\n};\r\n\r\nPromiseSpawn.prototype._resultCancelled = function() {\r\n if (this._yieldedPromise instanceof Promise) {\r\n var promise = this._yieldedPromise;\r\n this._yieldedPromise = null;\r\n promise.cancel();\r\n }\r\n};\r\n\r\nPromiseSpawn.prototype.promise = function () {\r\n return this._promise;\r\n};\r\n\r\nPromiseSpawn.prototype._run = function () {\r\n this._generator = this._generatorFunction.call(this._receiver);\r\n this._receiver =\r\n this._generatorFunction = undefined;\r\n this._promiseFulfilled(undefined);\r\n};\r\n\r\nPromiseSpawn.prototype._continue = function (result) {\r\n var promise = this._promise;\r\n if (result === errorObj) {\r\n this._cleanup();\r\n if (this._cancellationPhase) {\r\n return promise.cancel();\r\n } else {\r\n return promise._rejectCallback(result.e, false);\r\n }\r\n }\r\n\r\n var value = result.value;\r\n if (result.done === true) {\r\n this._cleanup();\r\n if (this._cancellationPhase) {\r\n return promise.cancel();\r\n } else {\r\n return promise._resolveCallback(value);\r\n }\r\n } else {\r\n var maybePromise = tryConvertToPromise(value, this._promise);\r\n if (!(maybePromise instanceof Promise)) {\r\n maybePromise =\r\n promiseFromYieldHandler(maybePromise,\r\n this._yieldHandlers,\r\n this._promise);\r\n if (maybePromise === null) {\r\n this._promiseRejected(\r\n new TypeError(\r\n \"A value %s was yielded that could not be treated as a promise\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\\u000a\".replace(\"%s\", value) +\r\n \"From coroutine:\\u000a\" +\r\n this._stack.split(\"\\n\").slice(1, -7).join(\"\\n\")\r\n )\r\n );\r\n return;\r\n }\r\n }\r\n maybePromise = maybePromise._target();\r\n var bitField = maybePromise._bitField;\r\n ;\r\n if (((bitField & 50397184) === 0)) {\r\n this._yieldedPromise = maybePromise;\r\n maybePromise._proxy(this, null);\r\n } else if (((bitField & 33554432) !== 0)) {\r\n this._promiseFulfilled(maybePromise._value());\r\n } else if (((bitField & 16777216) !== 0)) {\r\n this._promiseRejected(maybePromise._reason());\r\n } else {\r\n this._promiseCancelled();\r\n }\r\n }\r\n};\r\n\r\nPromise.coroutine = function (generatorFunction, options) {\r\n if (typeof generatorFunction !== \"function\") {\r\n throw new TypeError(\"generatorFunction must be a function\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n }\r\n var yieldHandler = Object(options).yieldHandler;\r\n var PromiseSpawn$ = PromiseSpawn;\r\n var stack = new Error().stack;\r\n return function () {\r\n var generator = generatorFunction.apply(this, arguments);\r\n var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,\r\n stack);\r\n var ret = spawn.promise();\r\n spawn._generator = generator;\r\n spawn._promiseFulfilled(undefined);\r\n return ret;\r\n };\r\n};\r\n\r\nPromise.coroutine.addYieldHandler = function(fn) {\r\n if (typeof fn !== \"function\") {\r\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\r\n }\r\n yieldHandlers.push(fn);\r\n};\r\n\r\nPromise.spawn = function (generatorFunction) {\r\n debug.deprecated(\"Promise.spawn()\", \"Promise.coroutine()\");\r\n if (typeof generatorFunction !== \"function\") {\r\n return apiRejection(\"generatorFunction must be a function\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n }\r\n var spawn = new PromiseSpawn(generatorFunction, this);\r\n var ret = spawn.promise();\r\n spawn._run(Promise.spawn);\r\n return ret;\r\n};\r\n};\r\n\r\n},{\"./errors\":12,\"./util\":36}],17:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports =\r\nfunction(Promise, PromiseArray, tryConvertToPromise, INTERNAL) {\r\nvar util = _dereq_(\"./util\");\r\nvar canEvaluate = util.canEvaluate;\r\nvar tryCatch = util.tryCatch;\r\nvar errorObj = util.errorObj;\r\nvar reject;\r\n\r\nif (!true) {\r\nif (canEvaluate) {\r\n var thenCallback = function(i) {\r\n return new Function(\"value\", \"holder\", \" \\n\\\r\n 'use strict'; \\n\\\r\n holder.pIndex = value; \\n\\\r\n holder.checkFulfillment(this); \\n\\\r\n \".replace(/Index/g, i));\r\n };\r\n\r\n var promiseSetter = function(i) {\r\n return new Function(\"promise\", \"holder\", \" \\n\\\r\n 'use strict'; \\n\\\r\n holder.pIndex = promise; \\n\\\r\n \".replace(/Index/g, i));\r\n };\r\n\r\n var generateHolderClass = function(total) {\r\n var props = new Array(total);\r\n for (var i = 0; i < props.length; ++i) {\r\n props[i] = \"this.p\" + (i+1);\r\n }\r\n var assignment = props.join(\" = \") + \" = null;\";\r\n var cancellationCode= \"var promise;\\n\" + props.map(function(prop) {\r\n return \" \\n\\\r\n promise = \" + prop + \"; \\n\\\r\n if (promise instanceof Promise) { \\n\\\r\n promise.cancel(); \\n\\\r\n } \\n\\\r\n \";\r\n }).join(\"\\n\");\r\n var passedArguments = props.join(\", \");\r\n var name = \"Holder$\" + total;\r\n\r\n\r\n var code = \"return function(tryCatch, errorObj, Promise) { \\n\\\r\n 'use strict'; \\n\\\r\n function [TheName](fn) { \\n\\\r\n [TheProperties] \\n\\\r\n this.fn = fn; \\n\\\r\n this.now = 0; \\n\\\r\n } \\n\\\r\n [TheName].prototype.checkFulfillment = function(promise) { \\n\\\r\n var now = ++this.now; \\n\\\r\n if (now === [TheTotal]) { \\n\\\r\n promise._pushContext(); \\n\\\r\n var callback = this.fn; \\n\\\r\n var ret = tryCatch(callback)([ThePassedArguments]); \\n\\\r\n promise._popContext(); \\n\\\r\n if (ret === errorObj) { \\n\\\r\n promise._rejectCallback(ret.e, false); \\n\\\r\n } else { \\n\\\r\n promise._resolveCallback(ret); \\n\\\r\n } \\n\\\r\n } \\n\\\r\n }; \\n\\\r\n \\n\\\r\n [TheName].prototype._resultCancelled = function() { \\n\\\r\n [CancellationCode] \\n\\\r\n }; \\n\\\r\n \\n\\\r\n return [TheName]; \\n\\\r\n }(tryCatch, errorObj, Promise); \\n\\\r\n \";\r\n\r\n code = code.replace(/\\[TheName\\]/g, name)\r\n .replace(/\\[TheTotal\\]/g, total)\r\n .replace(/\\[ThePassedArguments\\]/g, passedArguments)\r\n .replace(/\\[TheProperties\\]/g, assignment)\r\n .replace(/\\[CancellationCode\\]/g, cancellationCode);\r\n\r\n return new Function(\"tryCatch\", \"errorObj\", \"Promise\", code)\r\n (tryCatch, errorObj, Promise);\r\n };\r\n\r\n var holderClasses = [];\r\n var thenCallbacks = [];\r\n var promiseSetters = [];\r\n\r\n for (var i = 0; i < 8; ++i) {\r\n holderClasses.push(generateHolderClass(i + 1));\r\n thenCallbacks.push(thenCallback(i + 1));\r\n promiseSetters.push(promiseSetter(i + 1));\r\n }\r\n\r\n reject = function (reason) {\r\n this._reject(reason);\r\n };\r\n}}\r\n\r\nPromise.join = function () {\r\n var last = arguments.length - 1;\r\n var fn;\r\n if (last > 0 && typeof arguments[last] === \"function\") {\r\n fn = arguments[last];\r\n if (!true) {\r\n if (last <= 8 && canEvaluate) {\r\n var ret = new Promise(INTERNAL);\r\n ret._captureStackTrace();\r\n var HolderClass = holderClasses[last - 1];\r\n var holder = new HolderClass(fn);\r\n var callbacks = thenCallbacks;\r\n\r\n for (var i = 0; i < last; ++i) {\r\n var maybePromise = tryConvertToPromise(arguments[i], ret);\r\n if (maybePromise instanceof Promise) {\r\n maybePromise = maybePromise._target();\r\n var bitField = maybePromise._bitField;\r\n ;\r\n if (((bitField & 50397184) === 0)) {\r\n maybePromise._then(callbacks[i], reject,\r\n undefined, ret, holder);\r\n promiseSetters[i](maybePromise, holder);\r\n } else if (((bitField & 33554432) !== 0)) {\r\n callbacks[i].call(ret,\r\n maybePromise._value(), holder);\r\n } else if (((bitField & 16777216) !== 0)) {\r\n ret._reject(maybePromise._reason());\r\n } else {\r\n ret._cancel();\r\n }\r\n } else {\r\n callbacks[i].call(ret, maybePromise, holder);\r\n }\r\n }\r\n if (!ret._isFateSealed()) {\r\n ret._setAsyncGuaranteed();\r\n ret._setOnCancel(holder);\r\n }\r\n return ret;\r\n }\r\n }\r\n }\r\n var args = [].slice.call(arguments);;\r\n if (fn) args.pop();\r\n var ret = new PromiseArray(args).promise();\r\n return fn !== undefined ? ret.spread(fn) : ret;\r\n};\r\n\r\n};\r\n\r\n},{\"./util\":36}],18:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise,\r\n PromiseArray,\r\n apiRejection,\r\n tryConvertToPromise,\r\n INTERNAL,\r\n debug) {\r\nvar getDomain = Promise._getDomain;\r\nvar util = _dereq_(\"./util\");\r\nvar tryCatch = util.tryCatch;\r\nvar errorObj = util.errorObj;\r\nvar EMPTY_ARRAY = [];\r\n\r\nfunction MappingPromiseArray(promises, fn, limit, _filter) {\r\n this.constructor$(promises);\r\n this._promise._captureStackTrace();\r\n var domain = getDomain();\r\n this._callback = domain === null ? fn : domain.bind(fn);\r\n this._preservedValues = _filter === INTERNAL\r\n ? new Array(this.length())\r\n : null;\r\n this._limit = limit;\r\n this._inFlight = 0;\r\n this._queue = limit >= 1 ? [] : EMPTY_ARRAY;\r\n this._init$(undefined, -2);\r\n}\r\nutil.inherits(MappingPromiseArray, PromiseArray);\r\n\r\nMappingPromiseArray.prototype._init = function () {};\r\n\r\nMappingPromiseArray.prototype._promiseFulfilled = function (value, index) {\r\n var values = this._values;\r\n var length = this.length();\r\n var preservedValues = this._preservedValues;\r\n var limit = this._limit;\r\n\r\n if (index < 0) {\r\n index = (index * -1) - 1;\r\n values[index] = value;\r\n if (limit >= 1) {\r\n this._inFlight--;\r\n this._drainQueue();\r\n if (this._isResolved()) return true;\r\n }\r\n } else {\r\n if (limit >= 1 && this._inFlight >= limit) {\r\n values[index] = value;\r\n this._queue.push(index);\r\n return false;\r\n }\r\n if (preservedValues !== null) preservedValues[index] = value;\r\n\r\n var promise = this._promise;\r\n var callback = this._callback;\r\n var receiver = promise._boundValue();\r\n promise._pushContext();\r\n var ret = tryCatch(callback).call(receiver, value, index, length);\r\n var promiseCreated = promise._popContext();\r\n debug.checkForgottenReturns(\r\n ret,\r\n promiseCreated,\r\n preservedValues !== null ? \"Promise.filter\" : \"Promise.map\",\r\n promise\r\n );\r\n if (ret === errorObj) {\r\n this._reject(ret.e);\r\n return true;\r\n }\r\n\r\n var maybePromise = tryConvertToPromise(ret, this._promise);\r\n if (maybePromise instanceof Promise) {\r\n maybePromise = maybePromise._target();\r\n var bitField = maybePromise._bitField;\r\n ;\r\n if (((bitField & 50397184) === 0)) {\r\n if (limit >= 1) this._inFlight++;\r\n values[index] = maybePromise;\r\n maybePromise._proxy(this, (index + 1) * -1);\r\n return false;\r\n } else if (((bitField & 33554432) !== 0)) {\r\n ret = maybePromise._value();\r\n } else if (((bitField & 16777216) !== 0)) {\r\n this._reject(maybePromise._reason());\r\n return true;\r\n } else {\r\n this._cancel();\r\n return true;\r\n }\r\n }\r\n values[index] = ret;\r\n }\r\n var totalResolved = ++this._totalResolved;\r\n if (totalResolved >= length) {\r\n if (preservedValues !== null) {\r\n this._filter(values, preservedValues);\r\n } else {\r\n this._resolve(values);\r\n }\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nMappingPromiseArray.prototype._drainQueue = function () {\r\n var queue = this._queue;\r\n var limit = this._limit;\r\n var values = this._values;\r\n while (queue.length > 0 && this._inFlight < limit) {\r\n if (this._isResolved()) return;\r\n var index = queue.pop();\r\n this._promiseFulfilled(values[index], index);\r\n }\r\n};\r\n\r\nMappingPromiseArray.prototype._filter = function (booleans, values) {\r\n var len = values.length;\r\n var ret = new Array(len);\r\n var j = 0;\r\n for (var i = 0; i < len; ++i) {\r\n if (booleans[i]) ret[j++] = values[i];\r\n }\r\n ret.length = j;\r\n this._resolve(ret);\r\n};\r\n\r\nMappingPromiseArray.prototype.preservedValues = function () {\r\n return this._preservedValues;\r\n};\r\n\r\nfunction map(promises, fn, options, _filter) {\r\n if (typeof fn !== \"function\") {\r\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\r\n }\r\n var limit = typeof options === \"object\" && options !== null\r\n ? options.concurrency\r\n : 0;\r\n limit = typeof limit === \"number\" &&\r\n isFinite(limit) && limit >= 1 ? limit : 0;\r\n return new MappingPromiseArray(promises, fn, limit, _filter).promise();\r\n}\r\n\r\nPromise.prototype.map = function (fn, options) {\r\n return map(this, fn, options, null);\r\n};\r\n\r\nPromise.map = function (promises, fn, options, _filter) {\r\n return map(promises, fn, options, _filter);\r\n};\r\n\r\n\r\n};\r\n\r\n},{\"./util\":36}],19:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports =\r\nfunction(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {\r\nvar util = _dereq_(\"./util\");\r\nvar tryCatch = util.tryCatch;\r\n\r\nPromise.method = function (fn) {\r\n if (typeof fn !== \"function\") {\r\n throw new Promise.TypeError(\"expecting a function but got \" + util.classString(fn));\r\n }\r\n return function () {\r\n var ret = new Promise(INTERNAL);\r\n ret._captureStackTrace();\r\n ret._pushContext();\r\n var value = tryCatch(fn).apply(this, arguments);\r\n var promiseCreated = ret._popContext();\r\n debug.checkForgottenReturns(\r\n value, promiseCreated, \"Promise.method\", ret);\r\n ret._resolveFromSyncValue(value);\r\n return ret;\r\n };\r\n};\r\n\r\nPromise.attempt = Promise[\"try\"] = function (fn) {\r\n if (typeof fn !== \"function\") {\r\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\r\n }\r\n var ret = new Promise(INTERNAL);\r\n ret._captureStackTrace();\r\n ret._pushContext();\r\n var value;\r\n if (arguments.length > 1) {\r\n debug.deprecated(\"calling Promise.try with more than 1 argument\");\r\n var arg = arguments[1];\r\n var ctx = arguments[2];\r\n value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)\r\n : tryCatch(fn).call(ctx, arg);\r\n } else {\r\n value = tryCatch(fn)();\r\n }\r\n var promiseCreated = ret._popContext();\r\n debug.checkForgottenReturns(\r\n value, promiseCreated, \"Promise.try\", ret);\r\n ret._resolveFromSyncValue(value);\r\n return ret;\r\n};\r\n\r\nPromise.prototype._resolveFromSyncValue = function (value) {\r\n if (value === util.errorObj) {\r\n this._rejectCallback(value.e, false);\r\n } else {\r\n this._resolveCallback(value, true);\r\n }\r\n};\r\n};\r\n\r\n},{\"./util\":36}],20:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nvar util = _dereq_(\"./util\");\r\nvar maybeWrapAsError = util.maybeWrapAsError;\r\nvar errors = _dereq_(\"./errors\");\r\nvar OperationalError = errors.OperationalError;\r\nvar es5 = _dereq_(\"./es5\");\r\n\r\nfunction isUntypedError(obj) {\r\n return obj instanceof Error &&\r\n es5.getPrototypeOf(obj) === Error.prototype;\r\n}\r\n\r\nvar rErrorKey = /^(?:name|message|stack|cause)$/;\r\nfunction wrapAsOperationalError(obj) {\r\n var ret;\r\n if (isUntypedError(obj)) {\r\n ret = new OperationalError(obj);\r\n ret.name = obj.name;\r\n ret.message = obj.message;\r\n ret.stack = obj.stack;\r\n var keys = es5.keys(obj);\r\n for (var i = 0; i < keys.length; ++i) {\r\n var key = keys[i];\r\n if (!rErrorKey.test(key)) {\r\n ret[key] = obj[key];\r\n }\r\n }\r\n return ret;\r\n }\r\n util.markAsOriginatingFromRejection(obj);\r\n return obj;\r\n}\r\n\r\nfunction nodebackForPromise(promise, multiArgs) {\r\n return function(err, value) {\r\n if (promise === null) return;\r\n if (err) {\r\n var wrapped = wrapAsOperationalError(maybeWrapAsError(err));\r\n promise._attachExtraTrace(wrapped);\r\n promise._reject(wrapped);\r\n } else if (!multiArgs) {\r\n promise._fulfill(value);\r\n } else {\r\n var args = [].slice.call(arguments, 1);;\r\n promise._fulfill(args);\r\n }\r\n promise = null;\r\n };\r\n}\r\n\r\nmodule.exports = nodebackForPromise;\r\n\r\n},{\"./errors\":12,\"./es5\":13,\"./util\":36}],21:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise) {\r\nvar util = _dereq_(\"./util\");\r\nvar async = Promise._async;\r\nvar tryCatch = util.tryCatch;\r\nvar errorObj = util.errorObj;\r\n\r\nfunction spreadAdapter(val, nodeback) {\r\n var promise = this;\r\n if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);\r\n var ret =\r\n tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));\r\n if (ret === errorObj) {\r\n async.throwLater(ret.e);\r\n }\r\n}\r\n\r\nfunction successAdapter(val, nodeback) {\r\n var promise = this;\r\n var receiver = promise._boundValue();\r\n var ret = val === undefined\r\n ? tryCatch(nodeback).call(receiver, null)\r\n : tryCatch(nodeback).call(receiver, null, val);\r\n if (ret === errorObj) {\r\n async.throwLater(ret.e);\r\n }\r\n}\r\nfunction errorAdapter(reason, nodeback) {\r\n var promise = this;\r\n if (!reason) {\r\n var newReason = new Error(reason + \"\");\r\n newReason.cause = reason;\r\n reason = newReason;\r\n }\r\n var ret = tryCatch(nodeback).call(promise._boundValue(), reason);\r\n if (ret === errorObj) {\r\n async.throwLater(ret.e);\r\n }\r\n}\r\n\r\nPromise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,\r\n options) {\r\n if (typeof nodeback == \"function\") {\r\n var adapter = successAdapter;\r\n if (options !== undefined && Object(options).spread) {\r\n adapter = spreadAdapter;\r\n }\r\n this._then(\r\n adapter,\r\n errorAdapter,\r\n undefined,\r\n this,\r\n nodeback\r\n );\r\n }\r\n return this;\r\n};\r\n};\r\n\r\n},{\"./util\":36}],22:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function() {\r\nvar makeSelfResolutionError = function () {\r\n return new TypeError(\"circular promise resolution chain\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n};\r\nvar reflectHandler = function() {\r\n return new Promise.PromiseInspection(this._target());\r\n};\r\nvar apiRejection = function(msg) {\r\n return Promise.reject(new TypeError(msg));\r\n};\r\nfunction Proxyable() {}\r\nvar UNDEFINED_BINDING = {};\r\nvar util = _dereq_(\"./util\");\r\n\r\nvar getDomain;\r\nif (util.isNode) {\r\n getDomain = function() {\r\n var ret = process.domain;\r\n if (ret === undefined) ret = null;\r\n return ret;\r\n };\r\n} else {\r\n getDomain = function() {\r\n return null;\r\n };\r\n}\r\nutil.notEnumerableProp(Promise, \"_getDomain\", getDomain);\r\n\r\nvar es5 = _dereq_(\"./es5\");\r\nvar Async = _dereq_(\"./async\");\r\nvar async = new Async();\r\nes5.defineProperty(Promise, \"_async\", {value: async});\r\nvar errors = _dereq_(\"./errors\");\r\nvar TypeError = Promise.TypeError = errors.TypeError;\r\nPromise.RangeError = errors.RangeError;\r\nvar CancellationError = Promise.CancellationError = errors.CancellationError;\r\nPromise.TimeoutError = errors.TimeoutError;\r\nPromise.OperationalError = errors.OperationalError;\r\nPromise.RejectionError = errors.OperationalError;\r\nPromise.AggregateError = errors.AggregateError;\r\nvar INTERNAL = function(){};\r\nvar APPLY = {};\r\nvar NEXT_FILTER = {};\r\nvar tryConvertToPromise = _dereq_(\"./thenables\")(Promise, INTERNAL);\r\nvar PromiseArray =\r\n _dereq_(\"./promise_array\")(Promise, INTERNAL,\r\n tryConvertToPromise, apiRejection, Proxyable);\r\nvar Context = _dereq_(\"./context\")(Promise);\r\n /*jshint unused:false*/\r\nvar createContext = Context.create;\r\nvar debug = _dereq_(\"./debuggability\")(Promise, Context);\r\nvar CapturedTrace = debug.CapturedTrace;\r\nvar PassThroughHandlerContext =\r\n _dereq_(\"./finally\")(Promise, tryConvertToPromise);\r\nvar catchFilter = _dereq_(\"./catch_filter\")(NEXT_FILTER);\r\nvar nodebackForPromise = _dereq_(\"./nodeback\");\r\nvar errorObj = util.errorObj;\r\nvar tryCatch = util.tryCatch;\r\nfunction check(self, executor) {\r\n if (typeof executor !== \"function\") {\r\n throw new TypeError(\"expecting a function but got \" + util.classString(executor));\r\n }\r\n if (self.constructor !== Promise) {\r\n throw new TypeError(\"the promise constructor cannot be invoked directly\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n }\r\n}\r\n\r\nfunction Promise(executor) {\r\n this._bitField = 0;\r\n this._fulfillmentHandler0 = undefined;\r\n this._rejectionHandler0 = undefined;\r\n this._promise0 = undefined;\r\n this._receiver0 = undefined;\r\n if (executor !== INTERNAL) {\r\n check(this, executor);\r\n this._resolveFromExecutor(executor);\r\n }\r\n this._promiseCreated();\r\n this._fireEvent(\"promiseCreated\", this);\r\n}\r\n\r\nPromise.prototype.toString = function () {\r\n return \"[object Promise]\";\r\n};\r\n\r\nPromise.prototype.caught = Promise.prototype[\"catch\"] = function (fn) {\r\n var len = arguments.length;\r\n if (len > 1) {\r\n var catchInstances = new Array(len - 1),\r\n j = 0, i;\r\n for (i = 0; i < len - 1; ++i) {\r\n var item = arguments[i];\r\n if (util.isObject(item)) {\r\n catchInstances[j++] = item;\r\n } else {\r\n return apiRejection(\"expecting an object but got \" + util.classString(item));\r\n }\r\n }\r\n catchInstances.length = j;\r\n fn = arguments[i];\r\n return this.then(undefined, catchFilter(catchInstances, fn, this));\r\n }\r\n return this.then(undefined, fn);\r\n};\r\n\r\nPromise.prototype.reflect = function () {\r\n return this._then(reflectHandler,\r\n reflectHandler, undefined, this, undefined);\r\n};\r\n\r\nPromise.prototype.then = function (didFulfill, didReject) {\r\n if (debug.warnings() && arguments.length > 0 &&\r\n typeof didFulfill !== \"function\" &&\r\n typeof didReject !== \"function\") {\r\n var msg = \".then() only accepts functions but was passed: \" +\r\n util.classString(didFulfill);\r\n if (arguments.length > 1) {\r\n msg += \", \" + util.classString(didReject);\r\n }\r\n this._warn(msg);\r\n }\r\n return this._then(didFulfill, didReject, undefined, undefined, undefined);\r\n};\r\n\r\nPromise.prototype.done = function (didFulfill, didReject) {\r\n var promise =\r\n this._then(didFulfill, didReject, undefined, undefined, undefined);\r\n promise._setIsFinal();\r\n};\r\n\r\nPromise.prototype.spread = function (fn) {\r\n if (typeof fn !== \"function\") {\r\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\r\n }\r\n return this.all()._then(fn, undefined, undefined, APPLY, undefined);\r\n};\r\n\r\nPromise.prototype.toJSON = function () {\r\n var ret = {\r\n isFulfilled: false,\r\n isRejected: false,\r\n fulfillmentValue: undefined,\r\n rejectionReason: undefined\r\n };\r\n if (this.isFulfilled()) {\r\n ret.fulfillmentValue = this.value();\r\n ret.isFulfilled = true;\r\n } else if (this.isRejected()) {\r\n ret.rejectionReason = this.reason();\r\n ret.isRejected = true;\r\n }\r\n return ret;\r\n};\r\n\r\nPromise.prototype.all = function () {\r\n if (arguments.length > 0) {\r\n this._warn(\".all() was passed arguments but it does not take any\");\r\n }\r\n return new PromiseArray(this).promise();\r\n};\r\n\r\nPromise.prototype.error = function (fn) {\r\n return this.caught(util.originatesFromRejection, fn);\r\n};\r\n\r\nPromise.is = function (val) {\r\n return val instanceof Promise;\r\n};\r\n\r\nPromise.fromNode = Promise.fromCallback = function(fn) {\r\n var ret = new Promise(INTERNAL);\r\n ret._captureStackTrace();\r\n var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs\r\n : false;\r\n var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));\r\n if (result === errorObj) {\r\n ret._rejectCallback(result.e, true);\r\n }\r\n if (!ret._isFateSealed()) ret._setAsyncGuaranteed();\r\n return ret;\r\n};\r\n\r\nPromise.all = function (promises) {\r\n return new PromiseArray(promises).promise();\r\n};\r\n\r\nPromise.cast = function (obj) {\r\n var ret = tryConvertToPromise(obj);\r\n if (!(ret instanceof Promise)) {\r\n ret = new Promise(INTERNAL);\r\n ret._captureStackTrace();\r\n ret._setFulfilled();\r\n ret._rejectionHandler0 = obj;\r\n }\r\n return ret;\r\n};\r\n\r\nPromise.resolve = Promise.fulfilled = Promise.cast;\r\n\r\nPromise.reject = Promise.rejected = function (reason) {\r\n var ret = new Promise(INTERNAL);\r\n ret._captureStackTrace();\r\n ret._rejectCallback(reason, true);\r\n return ret;\r\n};\r\n\r\nPromise.setScheduler = function(fn) {\r\n if (typeof fn !== \"function\") {\r\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\r\n }\r\n return async.setScheduler(fn);\r\n};\r\n\r\nPromise.prototype._then = function (\r\n didFulfill,\r\n didReject,\r\n _, receiver,\r\n internalData\r\n) {\r\n var haveInternalData = internalData !== undefined;\r\n var promise = haveInternalData ? internalData : new Promise(INTERNAL);\r\n var target = this._target();\r\n var bitField = target._bitField;\r\n\r\n if (!haveInternalData) {\r\n promise._propagateFrom(this, 3);\r\n promise._captureStackTrace();\r\n if (receiver === undefined &&\r\n ((this._bitField & 2097152) !== 0)) {\r\n if (!((bitField & 50397184) === 0)) {\r\n receiver = this._boundValue();\r\n } else {\r\n receiver = target === this ? undefined : this._boundTo;\r\n }\r\n }\r\n this._fireEvent(\"promiseChained\", this, promise);\r\n }\r\n\r\n var domain = getDomain();\r\n if (!((bitField & 50397184) === 0)) {\r\n var handler, value, settler = target._settlePromiseCtx;\r\n if (((bitField & 33554432) !== 0)) {\r\n value = target._rejectionHandler0;\r\n handler = didFulfill;\r\n } else if (((bitField & 16777216) !== 0)) {\r\n value = target._fulfillmentHandler0;\r\n handler = didReject;\r\n target._unsetRejectionIsUnhandled();\r\n } else {\r\n settler = target._settlePromiseLateCancellationObserver;\r\n value = new CancellationError(\"late cancellation observer\");\r\n target._attachExtraTrace(value);\r\n handler = didReject;\r\n }\r\n\r\n async.invoke(settler, target, {\r\n handler: domain === null ? handler\r\n : (typeof handler === \"function\" && domain.bind(handler)),\r\n promise: promise,\r\n receiver: receiver,\r\n value: value\r\n });\r\n } else {\r\n target._addCallbacks(didFulfill, didReject, promise, receiver, domain);\r\n }\r\n\r\n return promise;\r\n};\r\n\r\nPromise.prototype._length = function () {\r\n return this._bitField & 65535;\r\n};\r\n\r\nPromise.prototype._isFateSealed = function () {\r\n return (this._bitField & 117506048) !== 0;\r\n};\r\n\r\nPromise.prototype._isFollowing = function () {\r\n return (this._bitField & 67108864) === 67108864;\r\n};\r\n\r\nPromise.prototype._setLength = function (len) {\r\n this._bitField = (this._bitField & -65536) |\r\n (len & 65535);\r\n};\r\n\r\nPromise.prototype._setFulfilled = function () {\r\n this._bitField = this._bitField | 33554432;\r\n this._fireEvent(\"promiseFulfilled\", this);\r\n};\r\n\r\nPromise.prototype._setRejected = function () {\r\n this._bitField = this._bitField | 16777216;\r\n this._fireEvent(\"promiseRejected\", this);\r\n};\r\n\r\nPromise.prototype._setFollowing = function () {\r\n this._bitField = this._bitField | 67108864;\r\n this._fireEvent(\"promiseResolved\", this);\r\n};\r\n\r\nPromise.prototype._setIsFinal = function () {\r\n this._bitField = this._bitField | 4194304;\r\n};\r\n\r\nPromise.prototype._isFinal = function () {\r\n return (this._bitField & 4194304) > 0;\r\n};\r\n\r\nPromise.prototype._unsetCancelled = function() {\r\n this._bitField = this._bitField & (~65536);\r\n};\r\n\r\nPromise.prototype._setCancelled = function() {\r\n this._bitField = this._bitField | 65536;\r\n this._fireEvent(\"promiseCancelled\", this);\r\n};\r\n\r\nPromise.prototype._setAsyncGuaranteed = function() {\r\n if (async.hasCustomScheduler()) return;\r\n this._bitField = this._bitField | 134217728;\r\n};\r\n\r\nPromise.prototype._receiverAt = function (index) {\r\n var ret = index === 0 ? this._receiver0 : this[\r\n index * 4 - 4 + 3];\r\n if (ret === UNDEFINED_BINDING) {\r\n return undefined;\r\n } else if (ret === undefined && this._isBound()) {\r\n return this._boundValue();\r\n }\r\n return ret;\r\n};\r\n\r\nPromise.prototype._promiseAt = function (index) {\r\n return this[\r\n index * 4 - 4 + 2];\r\n};\r\n\r\nPromise.prototype._fulfillmentHandlerAt = function (index) {\r\n return this[\r\n index * 4 - 4 + 0];\r\n};\r\n\r\nPromise.prototype._rejectionHandlerAt = function (index) {\r\n return this[\r\n index * 4 - 4 + 1];\r\n};\r\n\r\nPromise.prototype._boundValue = function() {};\r\n\r\nPromise.prototype._migrateCallback0 = function (follower) {\r\n var bitField = follower._bitField;\r\n var fulfill = follower._fulfillmentHandler0;\r\n var reject = follower._rejectionHandler0;\r\n var promise = follower._promise0;\r\n var receiver = follower._receiverAt(0);\r\n if (receiver === undefined) receiver = UNDEFINED_BINDING;\r\n this._addCallbacks(fulfill, reject, promise, receiver, null);\r\n};\r\n\r\nPromise.prototype._migrateCallbackAt = function (follower, index) {\r\n var fulfill = follower._fulfillmentHandlerAt(index);\r\n var reject = follower._rejectionHandlerAt(index);\r\n var promise = follower._promiseAt(index);\r\n var receiver = follower._receiverAt(index);\r\n if (receiver === undefined) receiver = UNDEFINED_BINDING;\r\n this._addCallbacks(fulfill, reject, promise, receiver, null);\r\n};\r\n\r\nPromise.prototype._addCallbacks = function (\r\n fulfill,\r\n reject,\r\n promise,\r\n receiver,\r\n domain\r\n) {\r\n var index = this._length();\r\n\r\n if (index >= 65535 - 4) {\r\n index = 0;\r\n this._setLength(0);\r\n }\r\n\r\n if (index === 0) {\r\n this._promise0 = promise;\r\n this._receiver0 = receiver;\r\n if (typeof fulfill === \"function\") {\r\n this._fulfillmentHandler0 =\r\n domain === null ? fulfill : domain.bind(fulfill);\r\n }\r\n if (typeof reject === \"function\") {\r\n this._rejectionHandler0 =\r\n domain === null ? reject : domain.bind(reject);\r\n }\r\n } else {\r\n var base = index * 4 - 4;\r\n this[base + 2] = promise;\r\n this[base + 3] = receiver;\r\n if (typeof fulfill === \"function\") {\r\n this[base + 0] =\r\n domain === null ? fulfill : domain.bind(fulfill);\r\n }\r\n if (typeof reject === \"function\") {\r\n this[base + 1] =\r\n domain === null ? reject : domain.bind(reject);\r\n }\r\n }\r\n this._setLength(index + 1);\r\n return index;\r\n};\r\n\r\nPromise.prototype._proxy = function (proxyable, arg) {\r\n this._addCallbacks(undefined, undefined, arg, proxyable, null);\r\n};\r\n\r\nPromise.prototype._resolveCallback = function(value, shouldBind) {\r\n if (((this._bitField & 117506048) !== 0)) return;\r\n if (value === this)\r\n return this._rejectCallback(makeSelfResolutionError(), false);\r\n var maybePromise = tryConvertToPromise(value, this);\r\n if (!(maybePromise instanceof Promise)) return this._fulfill(value);\r\n\r\n if (shouldBind) this._propagateFrom(maybePromise, 2);\r\n\r\n var promise = maybePromise._target();\r\n\r\n if (promise === this) {\r\n this._reject(makeSelfResolutionError());\r\n return;\r\n }\r\n\r\n var bitField = promise._bitField;\r\n if (((bitField & 50397184) === 0)) {\r\n var len = this._length();\r\n if (len > 0) promise._migrateCallback0(this);\r\n for (var i = 1; i < len; ++i) {\r\n promise._migrateCallbackAt(this, i);\r\n }\r\n this._setFollowing();\r\n this._setLength(0);\r\n this._setFollowee(promise);\r\n } else if (((bitField & 33554432) !== 0)) {\r\n this._fulfill(promise._value());\r\n } else if (((bitField & 16777216) !== 0)) {\r\n this._reject(promise._reason());\r\n } else {\r\n var reason = new CancellationError(\"late cancellation observer\");\r\n promise._attachExtraTrace(reason);\r\n this._reject(reason);\r\n }\r\n};\r\n\r\nPromise.prototype._rejectCallback =\r\nfunction(reason, synchronous, ignoreNonErrorWarnings) {\r\n var trace = util.ensureErrorObject(reason);\r\n var hasStack = trace === reason;\r\n if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {\r\n var message = \"a promise was rejected with a non-error: \" +\r\n util.classString(reason);\r\n this._warn(message, true);\r\n }\r\n this._attachExtraTrace(trace, synchronous ? hasStack : false);\r\n this._reject(reason);\r\n};\r\n\r\nPromise.prototype._resolveFromExecutor = function (executor) {\r\n var promise = this;\r\n this._captureStackTrace();\r\n this._pushContext();\r\n var synchronous = true;\r\n var r = this._execute(executor, function(value) {\r\n promise._resolveCallback(value);\r\n }, function (reason) {\r\n promise._rejectCallback(reason, synchronous);\r\n });\r\n synchronous = false;\r\n this._popContext();\r\n\r\n if (r !== undefined) {\r\n promise._rejectCallback(r, true);\r\n }\r\n};\r\n\r\nPromise.prototype._settlePromiseFromHandler = function (\r\n handler, receiver, value, promise\r\n) {\r\n var bitField = promise._bitField;\r\n if (((bitField & 65536) !== 0)) return;\r\n promise._pushContext();\r\n var x;\r\n if (receiver === APPLY) {\r\n if (!value || typeof value.length !== \"number\") {\r\n x = errorObj;\r\n x.e = new TypeError(\"cannot .spread() a non-array: \" +\r\n util.classString(value));\r\n } else {\r\n x = tryCatch(handler).apply(this._boundValue(), value);\r\n }\r\n } else {\r\n x = tryCatch(handler).call(receiver, value);\r\n }\r\n var promiseCreated = promise._popContext();\r\n bitField = promise._bitField;\r\n if (((bitField & 65536) !== 0)) return;\r\n\r\n if (x === NEXT_FILTER) {\r\n promise._reject(value);\r\n } else if (x === errorObj) {\r\n promise._rejectCallback(x.e, false);\r\n } else {\r\n debug.checkForgottenReturns(x, promiseCreated, \"\", promise, this);\r\n promise._resolveCallback(x);\r\n }\r\n};\r\n\r\nPromise.prototype._target = function() {\r\n var ret = this;\r\n while (ret._isFollowing()) ret = ret._followee();\r\n return ret;\r\n};\r\n\r\nPromise.prototype._followee = function() {\r\n return this._rejectionHandler0;\r\n};\r\n\r\nPromise.prototype._setFollowee = function(promise) {\r\n this._rejectionHandler0 = promise;\r\n};\r\n\r\nPromise.prototype._settlePromise = function(promise, handler, receiver, value) {\r\n var isPromise = promise instanceof Promise;\r\n var bitField = this._bitField;\r\n var asyncGuaranteed = ((bitField & 134217728) !== 0);\r\n if (((bitField & 65536) !== 0)) {\r\n if (isPromise) promise._invokeInternalOnCancel();\r\n\r\n if (receiver instanceof PassThroughHandlerContext &&\r\n receiver.isFinallyHandler()) {\r\n receiver.cancelPromise = promise;\r\n if (tryCatch(handler).call(receiver, value) === errorObj) {\r\n promise._reject(errorObj.e);\r\n }\r\n } else if (handler === reflectHandler) {\r\n promise._fulfill(reflectHandler.call(receiver));\r\n } else if (receiver instanceof Proxyable) {\r\n receiver._promiseCancelled(promise);\r\n } else if (isPromise || promise instanceof PromiseArray) {\r\n promise._cancel();\r\n } else {\r\n receiver.cancel();\r\n }\r\n } else if (typeof handler === \"function\") {\r\n if (!isPromise) {\r\n handler.call(receiver, value, promise);\r\n } else {\r\n if (asyncGuaranteed) promise._setAsyncGuaranteed();\r\n this._settlePromiseFromHandler(handler, receiver, value, promise);\r\n }\r\n } else if (receiver instanceof Proxyable) {\r\n if (!receiver._isResolved()) {\r\n if (((bitField & 33554432) !== 0)) {\r\n receiver._promiseFulfilled(value, promise);\r\n } else {\r\n receiver._promiseRejected(value, promise);\r\n }\r\n }\r\n } else if (isPromise) {\r\n if (asyncGuaranteed) promise._setAsyncGuaranteed();\r\n if (((bitField & 33554432) !== 0)) {\r\n promise._fulfill(value);\r\n } else {\r\n promise._reject(value);\r\n }\r\n }\r\n};\r\n\r\nPromise.prototype._settlePromiseLateCancellationObserver = function(ctx) {\r\n var handler = ctx.handler;\r\n var promise = ctx.promise;\r\n var receiver = ctx.receiver;\r\n var value = ctx.value;\r\n if (typeof handler === \"function\") {\r\n if (!(promise instanceof Promise)) {\r\n handler.call(receiver, value, promise);\r\n } else {\r\n this._settlePromiseFromHandler(handler, receiver, value, promise);\r\n }\r\n } else if (promise instanceof Promise) {\r\n promise._reject(value);\r\n }\r\n};\r\n\r\nPromise.prototype._settlePromiseCtx = function(ctx) {\r\n this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);\r\n};\r\n\r\nPromise.prototype._settlePromise0 = function(handler, value, bitField) {\r\n var promise = this._promise0;\r\n var receiver = this._receiverAt(0);\r\n this._promise0 = undefined;\r\n this._receiver0 = undefined;\r\n this._settlePromise(promise, handler, receiver, value);\r\n};\r\n\r\nPromise.prototype._clearCallbackDataAtIndex = function(index) {\r\n var base = index * 4 - 4;\r\n this[base + 2] =\r\n this[base + 3] =\r\n this[base + 0] =\r\n this[base + 1] = undefined;\r\n};\r\n\r\nPromise.prototype._fulfill = function (value) {\r\n var bitField = this._bitField;\r\n if (((bitField & 117506048) >>> 16)) return;\r\n if (value === this) {\r\n var err = makeSelfResolutionError();\r\n this._attachExtraTrace(err);\r\n return this._reject(err);\r\n }\r\n this._setFulfilled();\r\n this._rejectionHandler0 = value;\r\n\r\n if ((bitField & 65535) > 0) {\r\n if (((bitField & 134217728) !== 0)) {\r\n this._settlePromises();\r\n } else {\r\n async.settlePromises(this);\r\n }\r\n }\r\n};\r\n\r\nPromise.prototype._reject = function (reason) {\r\n var bitField = this._bitField;\r\n if (((bitField & 117506048) >>> 16)) return;\r\n this._setRejected();\r\n this._fulfillmentHandler0 = reason;\r\n\r\n if (this._isFinal()) {\r\n return async.fatalError(reason, util.isNode);\r\n }\r\n\r\n if ((bitField & 65535) > 0) {\r\n async.settlePromises(this);\r\n } else {\r\n this._ensurePossibleRejectionHandled();\r\n }\r\n};\r\n\r\nPromise.prototype._fulfillPromises = function (len, value) {\r\n for (var i = 1; i < len; i++) {\r\n var handler = this._fulfillmentHandlerAt(i);\r\n var promise = this._promiseAt(i);\r\n var receiver = this._receiverAt(i);\r\n this._clearCallbackDataAtIndex(i);\r\n this._settlePromise(promise, handler, receiver, value);\r\n }\r\n};\r\n\r\nPromise.prototype._rejectPromises = function (len, reason) {\r\n for (var i = 1; i < len; i++) {\r\n var handler = this._rejectionHandlerAt(i);\r\n var promise = this._promiseAt(i);\r\n var receiver = this._receiverAt(i);\r\n this._clearCallbackDataAtIndex(i);\r\n this._settlePromise(promise, handler, receiver, reason);\r\n }\r\n};\r\n\r\nPromise.prototype._settlePromises = function () {\r\n var bitField = this._bitField;\r\n var len = (bitField & 65535);\r\n\r\n if (len > 0) {\r\n if (((bitField & 16842752) !== 0)) {\r\n var reason = this._fulfillmentHandler0;\r\n this._settlePromise0(this._rejectionHandler0, reason, bitField);\r\n this._rejectPromises(len, reason);\r\n } else {\r\n var value = this._rejectionHandler0;\r\n this._settlePromise0(this._fulfillmentHandler0, value, bitField);\r\n this._fulfillPromises(len, value);\r\n }\r\n this._setLength(0);\r\n }\r\n this._clearCancellationData();\r\n};\r\n\r\nPromise.prototype._settledValue = function() {\r\n var bitField = this._bitField;\r\n if (((bitField & 33554432) !== 0)) {\r\n return this._rejectionHandler0;\r\n } else if (((bitField & 16777216) !== 0)) {\r\n return this._fulfillmentHandler0;\r\n }\r\n};\r\n\r\nfunction deferResolve(v) {this.promise._resolveCallback(v);}\r\nfunction deferReject(v) {this.promise._rejectCallback(v, false);}\r\n\r\nPromise.defer = Promise.pending = function() {\r\n debug.deprecated(\"Promise.defer\", \"new Promise\");\r\n var promise = new Promise(INTERNAL);\r\n return {\r\n promise: promise,\r\n resolve: deferResolve,\r\n reject: deferReject\r\n };\r\n};\r\n\r\nutil.notEnumerableProp(Promise,\r\n \"_makeSelfResolutionError\",\r\n makeSelfResolutionError);\r\n\r\n_dereq_(\"./method\")(Promise, INTERNAL, tryConvertToPromise, apiRejection,\r\n debug);\r\n_dereq_(\"./bind\")(Promise, INTERNAL, tryConvertToPromise, debug);\r\n_dereq_(\"./cancel\")(Promise, PromiseArray, apiRejection, debug);\r\n_dereq_(\"./direct_resolve\")(Promise);\r\n_dereq_(\"./synchronous_inspection\")(Promise);\r\n_dereq_(\"./join\")(\r\n Promise, PromiseArray, tryConvertToPromise, INTERNAL, debug);\r\nPromise.Promise = Promise;\r\n_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);\r\n_dereq_('./call_get.js')(Promise);\r\n_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);\r\n_dereq_('./timers.js')(Promise, INTERNAL, debug);\r\n_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);\r\n_dereq_('./nodeify.js')(Promise);\r\n_dereq_('./promisify.js')(Promise, INTERNAL);\r\n_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);\r\n_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);\r\n_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);\r\n_dereq_('./settle.js')(Promise, PromiseArray, debug);\r\n_dereq_('./some.js')(Promise, PromiseArray, apiRejection);\r\n_dereq_('./filter.js')(Promise, INTERNAL);\r\n_dereq_('./each.js')(Promise, INTERNAL);\r\n_dereq_('./any.js')(Promise);\r\n \r\n util.toFastProperties(Promise); \r\n util.toFastProperties(Promise.prototype); \r\n function fillTypes(value) { \r\n var p = new Promise(INTERNAL); \r\n p._fulfillmentHandler0 = value; \r\n p._rejectionHandler0 = value; \r\n p._promise0 = value; \r\n p._receiver0 = value; \r\n } \r\n // Complete slack tracking, opt out of field-type tracking and \r\n // stabilize map \r\n fillTypes({a: 1}); \r\n fillTypes({b: 2}); \r\n fillTypes({c: 3}); \r\n fillTypes(1); \r\n fillTypes(function(){}); \r\n fillTypes(undefined); \r\n fillTypes(false); \r\n fillTypes(new Promise(INTERNAL)); \r\n debug.setBounds(Async.firstLineError, util.lastLineError); \r\n return Promise; \r\n\r\n};\r\n\r\n},{\"./any.js\":1,\"./async\":2,\"./bind\":3,\"./call_get.js\":5,\"./cancel\":6,\"./catch_filter\":7,\"./context\":8,\"./debuggability\":9,\"./direct_resolve\":10,\"./each.js\":11,\"./errors\":12,\"./es5\":13,\"./filter.js\":14,\"./finally\":15,\"./generators.js\":16,\"./join\":17,\"./map.js\":18,\"./method\":19,\"./nodeback\":20,\"./nodeify.js\":21,\"./promise_array\":23,\"./promisify.js\":24,\"./props.js\":25,\"./race.js\":27,\"./reduce.js\":28,\"./settle.js\":30,\"./some.js\":31,\"./synchronous_inspection\":32,\"./thenables\":33,\"./timers.js\":34,\"./using.js\":35,\"./util\":36}],23:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise, INTERNAL, tryConvertToPromise,\r\n apiRejection, Proxyable) {\r\nvar util = _dereq_(\"./util\");\r\nvar isArray = util.isArray;\r\n\r\nfunction toResolutionValue(val) {\r\n switch(val) {\r\n case -2: return [];\r\n case -3: return {};\r\n }\r\n}\r\n\r\nfunction PromiseArray(values) {\r\n var promise = this._promise = new Promise(INTERNAL);\r\n if (values instanceof Promise) {\r\n promise._propagateFrom(values, 3);\r\n }\r\n promise._setOnCancel(this);\r\n this._values = values;\r\n this._length = 0;\r\n this._totalResolved = 0;\r\n this._init(undefined, -2);\r\n}\r\nutil.inherits(PromiseArray, Proxyable);\r\n\r\nPromiseArray.prototype.length = function () {\r\n return this._length;\r\n};\r\n\r\nPromiseArray.prototype.promise = function () {\r\n return this._promise;\r\n};\r\n\r\nPromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {\r\n var values = tryConvertToPromise(this._values, this._promise);\r\n if (values instanceof Promise) {\r\n values = values._target();\r\n var bitField = values._bitField;\r\n ;\r\n this._values = values;\r\n\r\n if (((bitField & 50397184) === 0)) {\r\n this._promise._setAsyncGuaranteed();\r\n return values._then(\r\n init,\r\n this._reject,\r\n undefined,\r\n this,\r\n resolveValueIfEmpty\r\n );\r\n } else if (((bitField & 33554432) !== 0)) {\r\n values = values._value();\r\n } else if (((bitField & 16777216) !== 0)) {\r\n return this._reject(values._reason());\r\n } else {\r\n return this._cancel();\r\n }\r\n }\r\n values = util.asArray(values);\r\n if (values === null) {\r\n var err = apiRejection(\r\n \"expecting an array or an iterable object but got \" + util.classString(values)).reason();\r\n this._promise._rejectCallback(err, false);\r\n return;\r\n }\r\n\r\n if (values.length === 0) {\r\n if (resolveValueIfEmpty === -5) {\r\n this._resolveEmptyArray();\r\n }\r\n else {\r\n this._resolve(toResolutionValue(resolveValueIfEmpty));\r\n }\r\n return;\r\n }\r\n this._iterate(values);\r\n};\r\n\r\nPromiseArray.prototype._iterate = function(values) {\r\n var len = this.getActualLength(values.length);\r\n this._length = len;\r\n this._values = this.shouldCopyValues() ? new Array(len) : this._values;\r\n var result = this._promise;\r\n var isResolved = false;\r\n var bitField = null;\r\n for (var i = 0; i < len; ++i) {\r\n var maybePromise = tryConvertToPromise(values[i], result);\r\n\r\n if (maybePromise instanceof Promise) {\r\n maybePromise = maybePromise._target();\r\n bitField = maybePromise._bitField;\r\n } else {\r\n bitField = null;\r\n }\r\n\r\n if (isResolved) {\r\n if (bitField !== null) {\r\n maybePromise.suppressUnhandledRejections();\r\n }\r\n } else if (bitField !== null) {\r\n if (((bitField & 50397184) === 0)) {\r\n maybePromise._proxy(this, i);\r\n this._values[i] = maybePromise;\r\n } else if (((bitField & 33554432) !== 0)) {\r\n isResolved = this._promiseFulfilled(maybePromise._value(), i);\r\n } else if (((bitField & 16777216) !== 0)) {\r\n isResolved = this._promiseRejected(maybePromise._reason(), i);\r\n } else {\r\n isResolved = this._promiseCancelled(i);\r\n }\r\n } else {\r\n isResolved = this._promiseFulfilled(maybePromise, i);\r\n }\r\n }\r\n if (!isResolved) result._setAsyncGuaranteed();\r\n};\r\n\r\nPromiseArray.prototype._isResolved = function () {\r\n return this._values === null;\r\n};\r\n\r\nPromiseArray.prototype._resolve = function (value) {\r\n this._values = null;\r\n this._promise._fulfill(value);\r\n};\r\n\r\nPromiseArray.prototype._cancel = function() {\r\n if (this._isResolved() || !this._promise.isCancellable()) return;\r\n this._values = null;\r\n this._promise._cancel();\r\n};\r\n\r\nPromiseArray.prototype._reject = function (reason) {\r\n this._values = null;\r\n this._promise._rejectCallback(reason, false);\r\n};\r\n\r\nPromiseArray.prototype._promiseFulfilled = function (value, index) {\r\n this._values[index] = value;\r\n var totalResolved = ++this._totalResolved;\r\n if (totalResolved >= this._length) {\r\n this._resolve(this._values);\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nPromiseArray.prototype._promiseCancelled = function() {\r\n this._cancel();\r\n return true;\r\n};\r\n\r\nPromiseArray.prototype._promiseRejected = function (reason) {\r\n this._totalResolved++;\r\n this._reject(reason);\r\n return true;\r\n};\r\n\r\nPromiseArray.prototype._resultCancelled = function() {\r\n if (this._isResolved()) return;\r\n var values = this._values;\r\n this._cancel();\r\n if (values instanceof Promise) {\r\n values.cancel();\r\n } else {\r\n for (var i = 0; i < values.length; ++i) {\r\n if (values[i] instanceof Promise) {\r\n values[i].cancel();\r\n }\r\n }\r\n }\r\n};\r\n\r\nPromiseArray.prototype.shouldCopyValues = function () {\r\n return true;\r\n};\r\n\r\nPromiseArray.prototype.getActualLength = function (len) {\r\n return len;\r\n};\r\n\r\nreturn PromiseArray;\r\n};\r\n\r\n},{\"./util\":36}],24:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise, INTERNAL) {\r\nvar THIS = {};\r\nvar util = _dereq_(\"./util\");\r\nvar nodebackForPromise = _dereq_(\"./nodeback\");\r\nvar withAppended = util.withAppended;\r\nvar maybeWrapAsError = util.maybeWrapAsError;\r\nvar canEvaluate = util.canEvaluate;\r\nvar TypeError = _dereq_(\"./errors\").TypeError;\r\nvar defaultSuffix = \"Async\";\r\nvar defaultPromisified = {__isPromisified__: true};\r\nvar noCopyProps = [\r\n \"arity\", \"length\",\r\n \"name\",\r\n \"arguments\",\r\n \"caller\",\r\n \"callee\",\r\n \"prototype\",\r\n \"__isPromisified__\"\r\n];\r\nvar noCopyPropsPattern = new RegExp(\"^(?:\" + noCopyProps.join(\"|\") + \")$\");\r\n\r\nvar defaultFilter = function(name) {\r\n return util.isIdentifier(name) &&\r\n name.charAt(0) !== \"_\" &&\r\n name !== \"constructor\";\r\n};\r\n\r\nfunction propsFilter(key) {\r\n return !noCopyPropsPattern.test(key);\r\n}\r\n\r\nfunction isPromisified(fn) {\r\n try {\r\n return fn.__isPromisified__ === true;\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasPromisified(obj, key, suffix) {\r\n var val = util.getDataPropertyOrDefault(obj, key + suffix,\r\n defaultPromisified);\r\n return val ? isPromisified(val) : false;\r\n}\r\nfunction checkValid(ret, suffix, suffixRegexp) {\r\n for (var i = 0; i < ret.length; i += 2) {\r\n var key = ret[i];\r\n if (suffixRegexp.test(key)) {\r\n var keyWithoutAsyncSuffix = key.replace(suffixRegexp, \"\");\r\n for (var j = 0; j < ret.length; j += 2) {\r\n if (ret[j] === keyWithoutAsyncSuffix) {\r\n throw new TypeError(\"Cannot promisify an API that has normal methods with '%s'-suffix\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\"\r\n .replace(\"%s\", suffix));\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction promisifiableMethods(obj, suffix, suffixRegexp, filter) {\r\n var keys = util.inheritedDataKeys(obj);\r\n var ret = [];\r\n for (var i = 0; i < keys.length; ++i) {\r\n var key = keys[i];\r\n var value = obj[key];\r\n var passesDefaultFilter = filter === defaultFilter\r\n ? true : defaultFilter(key, value, obj);\r\n if (typeof value === \"function\" &&\r\n !isPromisified(value) &&\r\n !hasPromisified(obj, key, suffix) &&\r\n filter(key, value, obj, passesDefaultFilter)) {\r\n ret.push(key, value);\r\n }\r\n }\r\n checkValid(ret, suffix, suffixRegexp);\r\n return ret;\r\n}\r\n\r\nvar escapeIdentRegex = function(str) {\r\n return str.replace(/([$])/, \"\\\\$\");\r\n};\r\n\r\nvar makeNodePromisifiedEval;\r\nif (!true) {\r\nvar switchCaseArgumentOrder = function(likelyArgumentCount) {\r\n var ret = [likelyArgumentCount];\r\n var min = Math.max(0, likelyArgumentCount - 1 - 3);\r\n for(var i = likelyArgumentCount - 1; i >= min; --i) {\r\n ret.push(i);\r\n }\r\n for(var i = likelyArgumentCount + 1; i <= 3; ++i) {\r\n ret.push(i);\r\n }\r\n return ret;\r\n};\r\n\r\nvar argumentSequence = function(argumentCount) {\r\n return util.filledRange(argumentCount, \"_arg\", \"\");\r\n};\r\n\r\nvar parameterDeclaration = function(parameterCount) {\r\n return util.filledRange(\r\n Math.max(parameterCount, 3), \"_arg\", \"\");\r\n};\r\n\r\nvar parameterCount = function(fn) {\r\n if (typeof fn.length === \"number\") {\r\n return Math.max(Math.min(fn.length, 1023 + 1), 0);\r\n }\r\n return 0;\r\n};\r\n\r\nmakeNodePromisifiedEval =\r\nfunction(callback, receiver, originalName, fn, _, multiArgs) {\r\n var newParameterCount = Math.max(0, parameterCount(fn) - 1);\r\n var argumentOrder = switchCaseArgumentOrder(newParameterCount);\r\n var shouldProxyThis = typeof callback === \"string\" || receiver === THIS;\r\n\r\n function generateCallForArgumentCount(count) {\r\n var args = argumentSequence(count).join(\", \");\r\n var comma = count > 0 ? \", \" : \"\";\r\n var ret;\r\n if (shouldProxyThis) {\r\n ret = \"ret = callback.call(this, {{args}}, nodeback); break;\\n\";\r\n } else {\r\n ret = receiver === undefined\r\n ? \"ret = callback({{args}}, nodeback); break;\\n\"\r\n : \"ret = callback.call(receiver, {{args}}, nodeback); break;\\n\";\r\n }\r\n return ret.replace(\"{{args}}\", args).replace(\", \", comma);\r\n }\r\n\r\n function generateArgumentSwitchCase() {\r\n var ret = \"\";\r\n for (var i = 0; i < argumentOrder.length; ++i) {\r\n ret += \"case \" + argumentOrder[i] +\":\" +\r\n generateCallForArgumentCount(argumentOrder[i]);\r\n }\r\n\r\n ret += \" \\n\\\r\n default: \\n\\\r\n var args = new Array(len + 1); \\n\\\r\n var i = 0; \\n\\\r\n for (var i = 0; i < len; ++i) { \\n\\\r\n args[i] = arguments[i]; \\n\\\r\n } \\n\\\r\n args[i] = nodeback; \\n\\\r\n [CodeForCall] \\n\\\r\n break; \\n\\\r\n \".replace(\"[CodeForCall]\", (shouldProxyThis\r\n ? \"ret = callback.apply(this, args);\\n\"\r\n : \"ret = callback.apply(receiver, args);\\n\"));\r\n return ret;\r\n }\r\n\r\n var getFunctionCode = typeof callback === \"string\"\r\n ? (\"this != null ? this['\"+callback+\"'] : fn\")\r\n : \"fn\";\r\n var body = \"'use strict'; \\n\\\r\n var ret = function (Parameters) { \\n\\\r\n 'use strict'; \\n\\\r\n var len = arguments.length; \\n\\\r\n var promise = new Promise(INTERNAL); \\n\\\r\n promise._captureStackTrace(); \\n\\\r\n var nodeback = nodebackForPromise(promise, \" + multiArgs + \"); \\n\\\r\n var ret; \\n\\\r\n var callback = tryCatch([GetFunctionCode]); \\n\\\r\n switch(len) { \\n\\\r\n [CodeForSwitchCase] \\n\\\r\n } \\n\\\r\n if (ret === errorObj) { \\n\\\r\n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\\n\\\r\n } \\n\\\r\n if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \\n\\\r\n return promise; \\n\\\r\n }; \\n\\\r\n notEnumerableProp(ret, '__isPromisified__', true); \\n\\\r\n return ret; \\n\\\r\n \".replace(\"[CodeForSwitchCase]\", generateArgumentSwitchCase())\r\n .replace(\"[GetFunctionCode]\", getFunctionCode);\r\n body = body.replace(\"Parameters\", parameterDeclaration(newParameterCount));\r\n return new Function(\"Promise\",\r\n \"fn\",\r\n \"receiver\",\r\n \"withAppended\",\r\n \"maybeWrapAsError\",\r\n \"nodebackForPromise\",\r\n \"tryCatch\",\r\n \"errorObj\",\r\n \"notEnumerableProp\",\r\n \"INTERNAL\",\r\n body)(\r\n Promise,\r\n fn,\r\n receiver,\r\n withAppended,\r\n maybeWrapAsError,\r\n nodebackForPromise,\r\n util.tryCatch,\r\n util.errorObj,\r\n util.notEnumerableProp,\r\n INTERNAL);\r\n};\r\n}\r\n\r\nfunction makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {\r\n var defaultThis = (function() {return this;})();\r\n var method = callback;\r\n if (typeof method === \"string\") {\r\n callback = fn;\r\n }\r\n function promisified() {\r\n var _receiver = receiver;\r\n if (receiver === THIS) _receiver = this;\r\n var promise = new Promise(INTERNAL);\r\n promise._captureStackTrace();\r\n var cb = typeof method === \"string\" && this !== defaultThis\r\n ? this[method] : callback;\r\n var fn = nodebackForPromise(promise, multiArgs);\r\n try {\r\n cb.apply(_receiver, withAppended(arguments, fn));\r\n } catch(e) {\r\n promise._rejectCallback(maybeWrapAsError(e), true, true);\r\n }\r\n if (!promise._isFateSealed()) promise._setAsyncGuaranteed();\r\n return promise;\r\n }\r\n util.notEnumerableProp(promisified, \"__isPromisified__\", true);\r\n return promisified;\r\n}\r\n\r\nvar makeNodePromisified = canEvaluate\r\n ? makeNodePromisifiedEval\r\n : makeNodePromisifiedClosure;\r\n\r\nfunction promisifyAll(obj, suffix, filter, promisifier, multiArgs) {\r\n var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + \"$\");\r\n var methods =\r\n promisifiableMethods(obj, suffix, suffixRegexp, filter);\r\n\r\n for (var i = 0, len = methods.length; i < len; i+= 2) {\r\n var key = methods[i];\r\n var fn = methods[i+1];\r\n var promisifiedKey = key + suffix;\r\n if (promisifier === makeNodePromisified) {\r\n obj[promisifiedKey] =\r\n makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);\r\n } else {\r\n var promisified = promisifier(fn, function() {\r\n return makeNodePromisified(key, THIS, key,\r\n fn, suffix, multiArgs);\r\n });\r\n util.notEnumerableProp(promisified, \"__isPromisified__\", true);\r\n obj[promisifiedKey] = promisified;\r\n }\r\n }\r\n util.toFastProperties(obj);\r\n return obj;\r\n}\r\n\r\nfunction promisify(callback, receiver, multiArgs) {\r\n return makeNodePromisified(callback, receiver, undefined,\r\n callback, null, multiArgs);\r\n}\r\n\r\nPromise.promisify = function (fn, options) {\r\n if (typeof fn !== \"function\") {\r\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\r\n }\r\n if (isPromisified(fn)) {\r\n return fn;\r\n }\r\n options = Object(options);\r\n var receiver = options.context === undefined ? THIS : options.context;\r\n var multiArgs = !!options.multiArgs;\r\n var ret = promisify(fn, receiver, multiArgs);\r\n util.copyDescriptors(fn, ret, propsFilter);\r\n return ret;\r\n};\r\n\r\nPromise.promisifyAll = function (target, options) {\r\n if (typeof target !== \"function\" && typeof target !== \"object\") {\r\n throw new TypeError(\"the target of promisifyAll must be an object or a function\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n }\r\n options = Object(options);\r\n var multiArgs = !!options.multiArgs;\r\n var suffix = options.suffix;\r\n if (typeof suffix !== \"string\") suffix = defaultSuffix;\r\n var filter = options.filter;\r\n if (typeof filter !== \"function\") filter = defaultFilter;\r\n var promisifier = options.promisifier;\r\n if (typeof promisifier !== \"function\") promisifier = makeNodePromisified;\r\n\r\n if (!util.isIdentifier(suffix)) {\r\n throw new RangeError(\"suffix must be a valid identifier\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n }\r\n\r\n var keys = util.inheritedDataKeys(target);\r\n for (var i = 0; i < keys.length; ++i) {\r\n var value = target[keys[i]];\r\n if (keys[i] !== \"constructor\" &&\r\n util.isClass(value)) {\r\n promisifyAll(value.prototype, suffix, filter, promisifier,\r\n multiArgs);\r\n promisifyAll(value, suffix, filter, promisifier, multiArgs);\r\n }\r\n }\r\n\r\n return promisifyAll(target, suffix, filter, promisifier, multiArgs);\r\n};\r\n};\r\n\r\n\r\n},{\"./errors\":12,\"./nodeback\":20,\"./util\":36}],25:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(\r\n Promise, PromiseArray, tryConvertToPromise, apiRejection) {\r\nvar util = _dereq_(\"./util\");\r\nvar isObject = util.isObject;\r\nvar es5 = _dereq_(\"./es5\");\r\nvar Es6Map;\r\nif (typeof Map === \"function\") Es6Map = Map;\r\n\r\nvar mapToEntries = (function() {\r\n var index = 0;\r\n var size = 0;\r\n\r\n function extractEntry(value, key) {\r\n this[index] = value;\r\n this[index + size] = key;\r\n index++;\r\n }\r\n\r\n return function mapToEntries(map) {\r\n size = map.size;\r\n index = 0;\r\n var ret = new Array(map.size * 2);\r\n map.forEach(extractEntry, ret);\r\n return ret;\r\n };\r\n})();\r\n\r\nvar entriesToMap = function(entries) {\r\n var ret = new Es6Map();\r\n var length = entries.length / 2 | 0;\r\n for (var i = 0; i < length; ++i) {\r\n var key = entries[length + i];\r\n var value = entries[i];\r\n ret.set(key, value);\r\n }\r\n return ret;\r\n};\r\n\r\nfunction PropertiesPromiseArray(obj) {\r\n var isMap = false;\r\n var entries;\r\n if (Es6Map !== undefined && obj instanceof Es6Map) {\r\n entries = mapToEntries(obj);\r\n isMap = true;\r\n } else {\r\n var keys = es5.keys(obj);\r\n var len = keys.length;\r\n entries = new Array(len * 2);\r\n for (var i = 0; i < len; ++i) {\r\n var key = keys[i];\r\n entries[i] = obj[key];\r\n entries[i + len] = key;\r\n }\r\n }\r\n this.constructor$(entries);\r\n this._isMap = isMap;\r\n this._init$(undefined, -3);\r\n}\r\nutil.inherits(PropertiesPromiseArray, PromiseArray);\r\n\r\nPropertiesPromiseArray.prototype._init = function () {};\r\n\r\nPropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {\r\n this._values[index] = value;\r\n var totalResolved = ++this._totalResolved;\r\n if (totalResolved >= this._length) {\r\n var val;\r\n if (this._isMap) {\r\n val = entriesToMap(this._values);\r\n } else {\r\n val = {};\r\n var keyOffset = this.length();\r\n for (var i = 0, len = this.length(); i < len; ++i) {\r\n val[this._values[i + keyOffset]] = this._values[i];\r\n }\r\n }\r\n this._resolve(val);\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nPropertiesPromiseArray.prototype.shouldCopyValues = function () {\r\n return false;\r\n};\r\n\r\nPropertiesPromiseArray.prototype.getActualLength = function (len) {\r\n return len >> 1;\r\n};\r\n\r\nfunction props(promises) {\r\n var ret;\r\n var castValue = tryConvertToPromise(promises);\r\n\r\n if (!isObject(castValue)) {\r\n return apiRejection(\"cannot await properties of a non-object\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n } else if (castValue instanceof Promise) {\r\n ret = castValue._then(\r\n Promise.props, undefined, undefined, undefined, undefined);\r\n } else {\r\n ret = new PropertiesPromiseArray(castValue).promise();\r\n }\r\n\r\n if (castValue instanceof Promise) {\r\n ret._propagateFrom(castValue, 2);\r\n }\r\n return ret;\r\n}\r\n\r\nPromise.prototype.props = function () {\r\n return props(this);\r\n};\r\n\r\nPromise.props = function (promises) {\r\n return props(promises);\r\n};\r\n};\r\n\r\n},{\"./es5\":13,\"./util\":36}],26:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nfunction arrayMove(src, srcIndex, dst, dstIndex, len) {\r\n for (var j = 0; j < len; ++j) {\r\n dst[j + dstIndex] = src[j + srcIndex];\r\n src[j + srcIndex] = void 0;\r\n }\r\n}\r\n\r\nfunction Queue(capacity) {\r\n this._capacity = capacity;\r\n this._length = 0;\r\n this._front = 0;\r\n}\r\n\r\nQueue.prototype._willBeOverCapacity = function (size) {\r\n return this._capacity < size;\r\n};\r\n\r\nQueue.prototype._pushOne = function (arg) {\r\n var length = this.length();\r\n this._checkCapacity(length + 1);\r\n var i = (this._front + length) & (this._capacity - 1);\r\n this[i] = arg;\r\n this._length = length + 1;\r\n};\r\n\r\nQueue.prototype._unshiftOne = function(value) {\r\n var capacity = this._capacity;\r\n this._checkCapacity(this.length() + 1);\r\n var front = this._front;\r\n var i = (((( front - 1 ) &\r\n ( capacity - 1) ) ^ capacity ) - capacity );\r\n this[i] = value;\r\n this._front = i;\r\n this._length = this.length() + 1;\r\n};\r\n\r\nQueue.prototype.unshift = function(fn, receiver, arg) {\r\n this._unshiftOne(arg);\r\n this._unshiftOne(receiver);\r\n this._unshiftOne(fn);\r\n};\r\n\r\nQueue.prototype.push = function (fn, receiver, arg) {\r\n var length = this.length() + 3;\r\n if (this._willBeOverCapacity(length)) {\r\n this._pushOne(fn);\r\n this._pushOne(receiver);\r\n this._pushOne(arg);\r\n return;\r\n }\r\n var j = this._front + length - 3;\r\n this._checkCapacity(length);\r\n var wrapMask = this._capacity - 1;\r\n this[(j + 0) & wrapMask] = fn;\r\n this[(j + 1) & wrapMask] = receiver;\r\n this[(j + 2) & wrapMask] = arg;\r\n this._length = length;\r\n};\r\n\r\nQueue.prototype.shift = function () {\r\n var front = this._front,\r\n ret = this[front];\r\n\r\n this[front] = undefined;\r\n this._front = (front + 1) & (this._capacity - 1);\r\n this._length--;\r\n return ret;\r\n};\r\n\r\nQueue.prototype.length = function () {\r\n return this._length;\r\n};\r\n\r\nQueue.prototype._checkCapacity = function (size) {\r\n if (this._capacity < size) {\r\n this._resizeTo(this._capacity << 1);\r\n }\r\n};\r\n\r\nQueue.prototype._resizeTo = function (capacity) {\r\n var oldCapacity = this._capacity;\r\n this._capacity = capacity;\r\n var front = this._front;\r\n var length = this._length;\r\n var moveItemsCount = (front + length) & (oldCapacity - 1);\r\n arrayMove(this, 0, this, oldCapacity, moveItemsCount);\r\n};\r\n\r\nmodule.exports = Queue;\r\n\r\n},{}],27:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(\r\n Promise, INTERNAL, tryConvertToPromise, apiRejection) {\r\nvar util = _dereq_(\"./util\");\r\n\r\nvar raceLater = function (promise) {\r\n return promise.then(function(array) {\r\n return race(array, promise);\r\n });\r\n};\r\n\r\nfunction race(promises, parent) {\r\n var maybePromise = tryConvertToPromise(promises);\r\n\r\n if (maybePromise instanceof Promise) {\r\n return raceLater(maybePromise);\r\n } else {\r\n promises = util.asArray(promises);\r\n if (promises === null)\r\n return apiRejection(\"expecting an array or an iterable object but got \" + util.classString(promises));\r\n }\r\n\r\n var ret = new Promise(INTERNAL);\r\n if (parent !== undefined) {\r\n ret._propagateFrom(parent, 3);\r\n }\r\n var fulfill = ret._fulfill;\r\n var reject = ret._reject;\r\n for (var i = 0, len = promises.length; i < len; ++i) {\r\n var val = promises[i];\r\n\r\n if (val === undefined && !(i in promises)) {\r\n continue;\r\n }\r\n\r\n Promise.cast(val)._then(fulfill, reject, undefined, ret, null);\r\n }\r\n return ret;\r\n}\r\n\r\nPromise.race = function (promises) {\r\n return race(promises, undefined);\r\n};\r\n\r\nPromise.prototype.race = function () {\r\n return race(this, undefined);\r\n};\r\n\r\n};\r\n\r\n},{\"./util\":36}],28:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise,\r\n PromiseArray,\r\n apiRejection,\r\n tryConvertToPromise,\r\n INTERNAL,\r\n debug) {\r\nvar getDomain = Promise._getDomain;\r\nvar util = _dereq_(\"./util\");\r\nvar tryCatch = util.tryCatch;\r\n\r\nfunction ReductionPromiseArray(promises, fn, initialValue, _each) {\r\n this.constructor$(promises);\r\n var domain = getDomain();\r\n this._fn = domain === null ? fn : domain.bind(fn);\r\n if (initialValue !== undefined) {\r\n initialValue = Promise.resolve(initialValue);\r\n initialValue._attachCancellationCallback(this);\r\n }\r\n this._initialValue = initialValue;\r\n this._currentCancellable = null;\r\n this._eachValues = _each === INTERNAL ? [] : undefined;\r\n this._promise._captureStackTrace();\r\n this._init$(undefined, -5);\r\n}\r\nutil.inherits(ReductionPromiseArray, PromiseArray);\r\n\r\nReductionPromiseArray.prototype._gotAccum = function(accum) {\r\n if (this._eachValues !== undefined && accum !== INTERNAL) {\r\n this._eachValues.push(accum);\r\n }\r\n};\r\n\r\nReductionPromiseArray.prototype._eachComplete = function(value) {\r\n this._eachValues.push(value);\r\n return this._eachValues;\r\n};\r\n\r\nReductionPromiseArray.prototype._init = function() {};\r\n\r\nReductionPromiseArray.prototype._resolveEmptyArray = function() {\r\n this._resolve(this._eachValues !== undefined ? this._eachValues\r\n : this._initialValue);\r\n};\r\n\r\nReductionPromiseArray.prototype.shouldCopyValues = function () {\r\n return false;\r\n};\r\n\r\nReductionPromiseArray.prototype._resolve = function(value) {\r\n this._promise._resolveCallback(value);\r\n this._values = null;\r\n};\r\n\r\nReductionPromiseArray.prototype._resultCancelled = function(sender) {\r\n if (sender === this._initialValue) return this._cancel();\r\n if (this._isResolved()) return;\r\n this._resultCancelled$();\r\n if (this._currentCancellable instanceof Promise) {\r\n this._currentCancellable.cancel();\r\n }\r\n if (this._initialValue instanceof Promise) {\r\n this._initialValue.cancel();\r\n }\r\n};\r\n\r\nReductionPromiseArray.prototype._iterate = function (values) {\r\n this._values = values;\r\n var value;\r\n var i;\r\n var length = values.length;\r\n if (this._initialValue !== undefined) {\r\n value = this._initialValue;\r\n i = 0;\r\n } else {\r\n value = Promise.resolve(values[0]);\r\n i = 1;\r\n }\r\n\r\n this._currentCancellable = value;\r\n\r\n if (!value.isRejected()) {\r\n for (; i < length; ++i) {\r\n var ctx = {\r\n accum: null,\r\n value: values[i],\r\n index: i,\r\n length: length,\r\n array: this\r\n };\r\n value = value._then(gotAccum, undefined, undefined, ctx, undefined);\r\n }\r\n }\r\n\r\n if (this._eachValues !== undefined) {\r\n value = value\r\n ._then(this._eachComplete, undefined, undefined, this, undefined);\r\n }\r\n value._then(completed, completed, undefined, value, this);\r\n};\r\n\r\nPromise.prototype.reduce = function (fn, initialValue) {\r\n return reduce(this, fn, initialValue, null);\r\n};\r\n\r\nPromise.reduce = function (promises, fn, initialValue, _each) {\r\n return reduce(promises, fn, initialValue, _each);\r\n};\r\n\r\nfunction completed(valueOrReason, array) {\r\n if (this.isFulfilled()) {\r\n array._resolve(valueOrReason);\r\n } else {\r\n array._reject(valueOrReason);\r\n }\r\n}\r\n\r\nfunction reduce(promises, fn, initialValue, _each) {\r\n if (typeof fn !== \"function\") {\r\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\r\n }\r\n var array = new ReductionPromiseArray(promises, fn, initialValue, _each);\r\n return array.promise();\r\n}\r\n\r\nfunction gotAccum(accum) {\r\n this.accum = accum;\r\n this.array._gotAccum(accum);\r\n var value = tryConvertToPromise(this.value, this.array._promise);\r\n if (value instanceof Promise) {\r\n this.array._currentCancellable = value;\r\n return value._then(gotValue, undefined, undefined, this, undefined);\r\n } else {\r\n return gotValue.call(this, value);\r\n }\r\n}\r\n\r\nfunction gotValue(value) {\r\n var array = this.array;\r\n var promise = array._promise;\r\n var fn = tryCatch(array._fn);\r\n promise._pushContext();\r\n var ret;\r\n if (array._eachValues !== undefined) {\r\n ret = fn.call(promise._boundValue(), value, this.index, this.length);\r\n } else {\r\n ret = fn.call(promise._boundValue(),\r\n this.accum, value, this.index, this.length);\r\n }\r\n if (ret instanceof Promise) {\r\n array._currentCancellable = ret;\r\n }\r\n var promiseCreated = promise._popContext();\r\n debug.checkForgottenReturns(\r\n ret,\r\n promiseCreated,\r\n array._eachValues !== undefined ? \"Promise.each\" : \"Promise.reduce\",\r\n promise\r\n );\r\n return ret;\r\n}\r\n};\r\n\r\n},{\"./util\":36}],29:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nvar util = _dereq_(\"./util\");\r\nvar schedule;\r\nvar noAsyncScheduler = function() {\r\n throw new Error(\"No async scheduler available\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n};\r\nvar NativePromise = util.getNativePromise();\r\nif (util.isNode && typeof MutationObserver === \"undefined\") {\r\n var GlobalSetImmediate = global.setImmediate;\r\n var ProcessNextTick = process.nextTick;\r\n schedule = util.isRecentNode\r\n ? function(fn) { GlobalSetImmediate.call(global, fn); }\r\n : function(fn) { ProcessNextTick.call(process, fn); };\r\n} else if (typeof NativePromise === \"function\") {\r\n var nativePromise = NativePromise.resolve();\r\n schedule = function(fn) {\r\n nativePromise.then(fn);\r\n };\r\n} else if ((typeof MutationObserver !== \"undefined\") &&\r\n !(typeof window !== \"undefined\" &&\r\n window.navigator &&\r\n window.navigator.standalone)) {\r\n schedule = (function() {\r\n var div = document.createElement(\"div\");\r\n var opts = {attributes: true};\r\n var toggleScheduled = false;\r\n var div2 = document.createElement(\"div\");\r\n var o2 = new MutationObserver(function() {\r\n div.classList.toggle(\"foo\");\r\n toggleScheduled = false;\r\n });\r\n o2.observe(div2, opts);\r\n\r\n var scheduleToggle = function() {\r\n if (toggleScheduled) return;\r\n toggleScheduled = true;\r\n div2.classList.toggle(\"foo\");\r\n };\r\n\r\n return function schedule(fn) {\r\n var o = new MutationObserver(function() {\r\n o.disconnect();\r\n fn();\r\n });\r\n o.observe(div, opts);\r\n scheduleToggle();\r\n };\r\n })();\r\n} else if (typeof setImmediate !== \"undefined\") {\r\n schedule = function (fn) {\r\n setImmediate(fn);\r\n };\r\n} else if (typeof setTimeout !== \"undefined\") {\r\n schedule = function (fn) {\r\n setTimeout(fn, 0);\r\n };\r\n} else {\r\n schedule = noAsyncScheduler;\r\n}\r\nmodule.exports = schedule;\r\n\r\n},{\"./util\":36}],30:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports =\r\n function(Promise, PromiseArray, debug) {\r\nvar PromiseInspection = Promise.PromiseInspection;\r\nvar util = _dereq_(\"./util\");\r\n\r\nfunction SettledPromiseArray(values) {\r\n this.constructor$(values);\r\n}\r\nutil.inherits(SettledPromiseArray, PromiseArray);\r\n\r\nSettledPromiseArray.prototype._promiseResolved = function (index, inspection) {\r\n this._values[index] = inspection;\r\n var totalResolved = ++this._totalResolved;\r\n if (totalResolved >= this._length) {\r\n this._resolve(this._values);\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nSettledPromiseArray.prototype._promiseFulfilled = function (value, index) {\r\n var ret = new PromiseInspection();\r\n ret._bitField = 33554432;\r\n ret._settledValueField = value;\r\n return this._promiseResolved(index, ret);\r\n};\r\nSettledPromiseArray.prototype._promiseRejected = function (reason, index) {\r\n var ret = new PromiseInspection();\r\n ret._bitField = 16777216;\r\n ret._settledValueField = reason;\r\n return this._promiseResolved(index, ret);\r\n};\r\n\r\nPromise.settle = function (promises) {\r\n debug.deprecated(\".settle()\", \".reflect()\");\r\n return new SettledPromiseArray(promises).promise();\r\n};\r\n\r\nPromise.prototype.settle = function () {\r\n return Promise.settle(this);\r\n};\r\n};\r\n\r\n},{\"./util\":36}],31:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports =\r\nfunction(Promise, PromiseArray, apiRejection) {\r\nvar util = _dereq_(\"./util\");\r\nvar RangeError = _dereq_(\"./errors\").RangeError;\r\nvar AggregateError = _dereq_(\"./errors\").AggregateError;\r\nvar isArray = util.isArray;\r\nvar CANCELLATION = {};\r\n\r\n\r\nfunction SomePromiseArray(values) {\r\n this.constructor$(values);\r\n this._howMany = 0;\r\n this._unwrap = false;\r\n this._initialized = false;\r\n}\r\nutil.inherits(SomePromiseArray, PromiseArray);\r\n\r\nSomePromiseArray.prototype._init = function () {\r\n if (!this._initialized) {\r\n return;\r\n }\r\n if (this._howMany === 0) {\r\n this._resolve([]);\r\n return;\r\n }\r\n this._init$(undefined, -5);\r\n var isArrayResolved = isArray(this._values);\r\n if (!this._isResolved() &&\r\n isArrayResolved &&\r\n this._howMany > this._canPossiblyFulfill()) {\r\n this._reject(this._getRangeError(this.length()));\r\n }\r\n};\r\n\r\nSomePromiseArray.prototype.init = function () {\r\n this._initialized = true;\r\n this._init();\r\n};\r\n\r\nSomePromiseArray.prototype.setUnwrap = function () {\r\n this._unwrap = true;\r\n};\r\n\r\nSomePromiseArray.prototype.howMany = function () {\r\n return this._howMany;\r\n};\r\n\r\nSomePromiseArray.prototype.setHowMany = function (count) {\r\n this._howMany = count;\r\n};\r\n\r\nSomePromiseArray.prototype._promiseFulfilled = function (value) {\r\n this._addFulfilled(value);\r\n if (this._fulfilled() === this.howMany()) {\r\n this._values.length = this.howMany();\r\n if (this.howMany() === 1 && this._unwrap) {\r\n this._resolve(this._values[0]);\r\n } else {\r\n this._resolve(this._values);\r\n }\r\n return true;\r\n }\r\n return false;\r\n\r\n};\r\nSomePromiseArray.prototype._promiseRejected = function (reason) {\r\n this._addRejected(reason);\r\n return this._checkOutcome();\r\n};\r\n\r\nSomePromiseArray.prototype._promiseCancelled = function () {\r\n if (this._values instanceof Promise || this._values == null) {\r\n return this._cancel();\r\n }\r\n this._addRejected(CANCELLATION);\r\n return this._checkOutcome();\r\n};\r\n\r\nSomePromiseArray.prototype._checkOutcome = function() {\r\n if (this.howMany() > this._canPossiblyFulfill()) {\r\n var e = new AggregateError();\r\n for (var i = this.length(); i < this._values.length; ++i) {\r\n if (this._values[i] !== CANCELLATION) {\r\n e.push(this._values[i]);\r\n }\r\n }\r\n if (e.length > 0) {\r\n this._reject(e);\r\n } else {\r\n this._cancel();\r\n }\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nSomePromiseArray.prototype._fulfilled = function () {\r\n return this._totalResolved;\r\n};\r\n\r\nSomePromiseArray.prototype._rejected = function () {\r\n return this._values.length - this.length();\r\n};\r\n\r\nSomePromiseArray.prototype._addRejected = function (reason) {\r\n this._values.push(reason);\r\n};\r\n\r\nSomePromiseArray.prototype._addFulfilled = function (value) {\r\n this._values[this._totalResolved++] = value;\r\n};\r\n\r\nSomePromiseArray.prototype._canPossiblyFulfill = function () {\r\n return this.length() - this._rejected();\r\n};\r\n\r\nSomePromiseArray.prototype._getRangeError = function (count) {\r\n var message = \"Input array must contain at least \" +\r\n this._howMany + \" items but contains only \" + count + \" items\";\r\n return new RangeError(message);\r\n};\r\n\r\nSomePromiseArray.prototype._resolveEmptyArray = function () {\r\n this._reject(this._getRangeError(0));\r\n};\r\n\r\nfunction some(promises, howMany) {\r\n if ((howMany | 0) !== howMany || howMany < 0) {\r\n return apiRejection(\"expecting a positive integer\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n }\r\n var ret = new SomePromiseArray(promises);\r\n var promise = ret.promise();\r\n ret.setHowMany(howMany);\r\n ret.init();\r\n return promise;\r\n}\r\n\r\nPromise.some = function (promises, howMany) {\r\n return some(promises, howMany);\r\n};\r\n\r\nPromise.prototype.some = function (howMany) {\r\n return some(this, howMany);\r\n};\r\n\r\nPromise._SomePromiseArray = SomePromiseArray;\r\n};\r\n\r\n},{\"./errors\":12,\"./util\":36}],32:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise) {\r\nfunction PromiseInspection(promise) {\r\n if (promise !== undefined) {\r\n promise = promise._target();\r\n this._bitField = promise._bitField;\r\n this._settledValueField = promise._isFateSealed()\r\n ? promise._settledValue() : undefined;\r\n }\r\n else {\r\n this._bitField = 0;\r\n this._settledValueField = undefined;\r\n }\r\n}\r\n\r\nPromiseInspection.prototype._settledValue = function() {\r\n return this._settledValueField;\r\n};\r\n\r\nvar value = PromiseInspection.prototype.value = function () {\r\n if (!this.isFulfilled()) {\r\n throw new TypeError(\"cannot get fulfillment value of a non-fulfilled promise\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n }\r\n return this._settledValue();\r\n};\r\n\r\nvar reason = PromiseInspection.prototype.error =\r\nPromiseInspection.prototype.reason = function () {\r\n if (!this.isRejected()) {\r\n throw new TypeError(\"cannot get rejection reason of a non-rejected promise\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\r\n }\r\n return this._settledValue();\r\n};\r\n\r\nvar isFulfilled = PromiseInspection.prototype.isFulfilled = function() {\r\n return (this._bitField & 33554432) !== 0;\r\n};\r\n\r\nvar isRejected = PromiseInspection.prototype.isRejected = function () {\r\n return (this._bitField & 16777216) !== 0;\r\n};\r\n\r\nvar isPending = PromiseInspection.prototype.isPending = function () {\r\n return (this._bitField & 50397184) === 0;\r\n};\r\n\r\nvar isResolved = PromiseInspection.prototype.isResolved = function () {\r\n return (this._bitField & 50331648) !== 0;\r\n};\r\n\r\nPromiseInspection.prototype.isCancelled =\r\nPromise.prototype._isCancelled = function() {\r\n return (this._bitField & 65536) === 65536;\r\n};\r\n\r\nPromise.prototype.isCancelled = function() {\r\n return this._target()._isCancelled();\r\n};\r\n\r\nPromise.prototype.isPending = function() {\r\n return isPending.call(this._target());\r\n};\r\n\r\nPromise.prototype.isRejected = function() {\r\n return isRejected.call(this._target());\r\n};\r\n\r\nPromise.prototype.isFulfilled = function() {\r\n return isFulfilled.call(this._target());\r\n};\r\n\r\nPromise.prototype.isResolved = function() {\r\n return isResolved.call(this._target());\r\n};\r\n\r\nPromise.prototype.value = function() {\r\n return value.call(this._target());\r\n};\r\n\r\nPromise.prototype.reason = function() {\r\n var target = this._target();\r\n target._unsetRejectionIsUnhandled();\r\n return reason.call(target);\r\n};\r\n\r\nPromise.prototype._value = function() {\r\n return this._settledValue();\r\n};\r\n\r\nPromise.prototype._reason = function() {\r\n this._unsetRejectionIsUnhandled();\r\n return this._settledValue();\r\n};\r\n\r\nPromise.PromiseInspection = PromiseInspection;\r\n};\r\n\r\n},{}],33:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise, INTERNAL) {\r\nvar util = _dereq_(\"./util\");\r\nvar errorObj = util.errorObj;\r\nvar isObject = util.isObject;\r\n\r\nfunction tryConvertToPromise(obj, context) {\r\n if (isObject(obj)) {\r\n if (obj instanceof Promise) return obj;\r\n var then = getThen(obj);\r\n if (then === errorObj) {\r\n if (context) context._pushContext();\r\n var ret = Promise.reject(then.e);\r\n if (context) context._popContext();\r\n return ret;\r\n } else if (typeof then === \"function\") {\r\n if (isAnyBluebirdPromise(obj)) {\r\n var ret = new Promise(INTERNAL);\r\n obj._then(\r\n ret._fulfill,\r\n ret._reject,\r\n undefined,\r\n ret,\r\n null\r\n );\r\n return ret;\r\n }\r\n return doThenable(obj, then, context);\r\n }\r\n }\r\n return obj;\r\n}\r\n\r\nfunction doGetThen(obj) {\r\n return obj.then;\r\n}\r\n\r\nfunction getThen(obj) {\r\n try {\r\n return doGetThen(obj);\r\n } catch (e) {\r\n errorObj.e = e;\r\n return errorObj;\r\n }\r\n}\r\n\r\nvar hasProp = {}.hasOwnProperty;\r\nfunction isAnyBluebirdPromise(obj) {\r\n return hasProp.call(obj, \"_promise0\");\r\n}\r\n\r\nfunction doThenable(x, then, context) {\r\n var promise = new Promise(INTERNAL);\r\n var ret = promise;\r\n if (context) context._pushContext();\r\n promise._captureStackTrace();\r\n if (context) context._popContext();\r\n var synchronous = true;\r\n var result = util.tryCatch(then).call(x, resolve, reject);\r\n synchronous = false;\r\n\r\n if (promise && result === errorObj) {\r\n promise._rejectCallback(result.e, true, true);\r\n promise = null;\r\n }\r\n\r\n function resolve(value) {\r\n if (!promise) return;\r\n promise._resolveCallback(value);\r\n promise = null;\r\n }\r\n\r\n function reject(reason) {\r\n if (!promise) return;\r\n promise._rejectCallback(reason, synchronous, true);\r\n promise = null;\r\n }\r\n return ret;\r\n}\r\n\r\nreturn tryConvertToPromise;\r\n};\r\n\r\n},{\"./util\":36}],34:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function(Promise, INTERNAL, debug) {\r\nvar util = _dereq_(\"./util\");\r\nvar TimeoutError = Promise.TimeoutError;\r\n\r\nfunction HandleWrapper(handle) {\r\n this.handle = handle;\r\n}\r\n\r\nHandleWrapper.prototype._resultCancelled = function() {\r\n clearTimeout(this.handle);\r\n};\r\n\r\nvar afterValue = function(value) { return delay(+this).thenReturn(value); };\r\nvar delay = Promise.delay = function (ms, value) {\r\n var ret;\r\n var handle;\r\n if (value !== undefined) {\r\n ret = Promise.resolve(value)\r\n ._then(afterValue, null, null, ms, undefined);\r\n if (debug.cancellation() && value instanceof Promise) {\r\n ret._setOnCancel(value);\r\n }\r\n } else {\r\n ret = new Promise(INTERNAL);\r\n handle = setTimeout(function() { ret._fulfill(); }, +ms);\r\n if (debug.cancellation()) {\r\n ret._setOnCancel(new HandleWrapper(handle));\r\n }\r\n }\r\n ret._setAsyncGuaranteed();\r\n return ret;\r\n};\r\n\r\nPromise.prototype.delay = function (ms) {\r\n return delay(ms, this);\r\n};\r\n\r\nvar afterTimeout = function (promise, message, parent) {\r\n var err;\r\n if (typeof message !== \"string\") {\r\n if (message instanceof Error) {\r\n err = message;\r\n } else {\r\n err = new TimeoutError(\"operation timed out\");\r\n }\r\n } else {\r\n err = new TimeoutError(message);\r\n }\r\n util.markAsOriginatingFromRejection(err);\r\n promise._attachExtraTrace(err);\r\n promise._reject(err);\r\n\r\n if (parent != null) {\r\n parent.cancel();\r\n }\r\n};\r\n\r\nfunction successClear(value) {\r\n clearTimeout(this.handle);\r\n return value;\r\n}\r\n\r\nfunction failureClear(reason) {\r\n clearTimeout(this.handle);\r\n throw reason;\r\n}\r\n\r\nPromise.prototype.timeout = function (ms, message) {\r\n ms = +ms;\r\n var ret, parent;\r\n\r\n var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {\r\n if (ret.isPending()) {\r\n afterTimeout(ret, message, parent);\r\n }\r\n }, ms));\r\n\r\n if (debug.cancellation()) {\r\n parent = this.then();\r\n ret = parent._then(successClear, failureClear,\r\n undefined, handleWrapper, undefined);\r\n ret._setOnCancel(handleWrapper);\r\n } else {\r\n ret = this._then(successClear, failureClear,\r\n undefined, handleWrapper, undefined);\r\n }\r\n\r\n return ret;\r\n};\r\n\r\n};\r\n\r\n},{\"./util\":36}],35:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nmodule.exports = function (Promise, apiRejection, tryConvertToPromise,\r\n createContext, INTERNAL, debug) {\r\n var util = _dereq_(\"./util\");\r\n var TypeError = _dereq_(\"./errors\").TypeError;\r\n var inherits = _dereq_(\"./util\").inherits;\r\n var errorObj = util.errorObj;\r\n var tryCatch = util.tryCatch;\r\n\r\n function thrower(e) {\r\n setTimeout(function(){throw e;}, 0);\r\n }\r\n\r\n function castPreservingDisposable(thenable) {\r\n var maybePromise = tryConvertToPromise(thenable);\r\n if (maybePromise !== thenable &&\r\n typeof thenable._isDisposable === \"function\" &&\r\n typeof thenable._getDisposer === \"function\" &&\r\n thenable._isDisposable()) {\r\n maybePromise._setDisposable(thenable._getDisposer());\r\n }\r\n return maybePromise;\r\n }\r\n function dispose(resources, inspection) {\r\n var i = 0;\r\n\t\tvar len = resources.length;\r\n var ret = new Promise(INTERNAL);\r\n function iterator() {\r\n if (i >= len) return ret._fulfill();\r\n var maybePromise = castPreservingDisposable(resources[i++]);\r\n if (maybePromise instanceof Promise &&\r\n maybePromise._isDisposable()) {\r\n try {\r\n maybePromise = tryConvertToPromise(\r\n maybePromise._getDisposer().tryDispose(inspection),\r\n\t\t\t\t\t\tresources.promise);\r\n } catch (e) {\r\n return thrower(e);\r\n }\r\n if (maybePromise instanceof Promise) {\r\n return maybePromise._then(iterator, thrower,\r\n null, null, null);\r\n }\r\n }\r\n iterator();\r\n }\r\n iterator();\r\n return ret;\r\n }\r\n\r\n function Disposer(data, promise, context) {\r\n this._data = data;\r\n this._promise = promise;\r\n this._context = context;\r\n }\r\n\r\n Disposer.prototype.data = function () {\r\n return this._data;\r\n };\r\n\r\n Disposer.prototype.promise = function () {\r\n return this._promise;\r\n };\r\n\r\n Disposer.prototype.resource = function () {\r\n if (this.promise().isFulfilled()) {\r\n return this.promise().value();\r\n }\r\n return null;\r\n };\r\n\r\n Disposer.prototype.tryDispose = function(inspection) {\r\n var resource = this.resource();\r\n var context = this._context;\r\n if (context !== undefined) context._pushContext();\r\n var ret = resource !== null\r\n ? this.doDispose(resource, inspection) : null;\r\n if (context !== undefined) context._popContext();\r\n this._promise._unsetDisposable();\r\n this._data = null;\r\n return ret;\r\n };\r\n\r\n Disposer.isDisposer = function (d) {\r\n return (d != null &&\r\n typeof d.resource === \"function\" &&\r\n typeof d.tryDispose === \"function\");\r\n };\r\n\r\n function FunctionDisposer(fn, promise, context) {\r\n this.constructor$(fn, promise, context);\r\n }\r\n inherits(FunctionDisposer, Disposer);\r\n\r\n FunctionDisposer.prototype.doDispose = function (resource, inspection) {\r\n var fn = this.data();\r\n return fn.call(resource, resource, inspection);\r\n };\r\n\r\n function maybeUnwrapDisposer(value) {\r\n if (Disposer.isDisposer(value)) {\r\n this.resources[this.index]._setDisposable(value);\r\n return value.promise();\r\n }\r\n return value;\r\n }\r\n\r\n function ResourceList(length) {\r\n this.length = length;\r\n this.promise = null;\r\n this[length-1] = null;\r\n }\r\n\r\n ResourceList.prototype._resultCancelled = function() {\r\n var len = this.length;\r\n for (var i = 0; i < len; ++i) {\r\n var item = this[i];\r\n if (item instanceof Promise) {\r\n item.cancel();\r\n }\r\n }\r\n };\r\n\r\n Promise.using = function () {\r\n var len = arguments.length;\r\n if (len < 2) return apiRejection(\r\n \"you must pass at least 2 arguments to Promise.using\");\r\n var fn = arguments[len - 1];\r\n if (typeof fn !== \"function\") {\r\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\r\n }\r\n var input;\r\n var spreadArgs = true;\r\n if (len === 2 && Array.isArray(arguments[0])) {\r\n input = arguments[0];\r\n len = input.length;\r\n spreadArgs = false;\r\n } else {\r\n input = arguments;\r\n len--;\r\n }\r\n var resources = new ResourceList(len);\r\n for (var i = 0; i < len; ++i) {\r\n var resource = input[i];\r\n if (Disposer.isDisposer(resource)) {\r\n var disposer = resource;\r\n resource = resource.promise();\r\n resource._setDisposable(disposer);\r\n } else {\r\n var maybePromise = tryConvertToPromise(resource);\r\n if (maybePromise instanceof Promise) {\r\n resource =\r\n maybePromise._then(maybeUnwrapDisposer, null, null, {\r\n resources: resources,\r\n index: i\r\n }, undefined);\r\n }\r\n }\r\n resources[i] = resource;\r\n }\r\n\r\n var reflectedResources = new Array(resources.length);\r\n for (var i = 0; i < reflectedResources.length; ++i) {\r\n reflectedResources[i] = Promise.resolve(resources[i]).reflect();\r\n }\r\n\r\n var resultPromise = Promise.all(reflectedResources)\r\n .then(function(inspections) {\r\n for (var i = 0; i < inspections.length; ++i) {\r\n var inspection = inspections[i];\r\n if (inspection.isRejected()) {\r\n errorObj.e = inspection.error();\r\n return errorObj;\r\n } else if (!inspection.isFulfilled()) {\r\n resultPromise.cancel();\r\n return;\r\n }\r\n inspections[i] = inspection.value();\r\n }\r\n promise._pushContext();\r\n\r\n fn = tryCatch(fn);\r\n var ret = spreadArgs\r\n ? fn.apply(undefined, inspections) : fn(inspections);\r\n var promiseCreated = promise._popContext();\r\n debug.checkForgottenReturns(\r\n ret, promiseCreated, \"Promise.using\", promise);\r\n return ret;\r\n });\r\n\r\n var promise = resultPromise.lastly(function() {\r\n var inspection = new Promise.PromiseInspection(resultPromise);\r\n return dispose(resources, inspection);\r\n });\r\n resources.promise = promise;\r\n promise._setOnCancel(resources);\r\n return promise;\r\n };\r\n\r\n Promise.prototype._setDisposable = function (disposer) {\r\n this._bitField = this._bitField | 131072;\r\n this._disposer = disposer;\r\n };\r\n\r\n Promise.prototype._isDisposable = function () {\r\n return (this._bitField & 131072) > 0;\r\n };\r\n\r\n Promise.prototype._getDisposer = function () {\r\n return this._disposer;\r\n };\r\n\r\n Promise.prototype._unsetDisposable = function () {\r\n this._bitField = this._bitField & (~131072);\r\n this._disposer = undefined;\r\n };\r\n\r\n Promise.prototype.disposer = function (fn) {\r\n if (typeof fn === \"function\") {\r\n return new FunctionDisposer(fn, this, createContext());\r\n }\r\n throw new TypeError();\r\n };\r\n\r\n};\r\n\r\n},{\"./errors\":12,\"./util\":36}],36:[function(_dereq_,module,exports){\r\n\"use strict\";\r\nvar es5 = _dereq_(\"./es5\");\r\nvar canEvaluate = typeof navigator == \"undefined\";\r\n\r\nvar errorObj = {e: {}};\r\nvar tryCatchTarget;\r\nvar globalObject = typeof self !== \"undefined\" ? self :\r\n typeof window !== \"undefined\" ? window :\r\n typeof global !== \"undefined\" ? global :\r\n this !== undefined ? this : null;\r\n\r\nfunction tryCatcher() {\r\n try {\r\n var target = tryCatchTarget;\r\n tryCatchTarget = null;\r\n return target.apply(this, arguments);\r\n } catch (e) {\r\n errorObj.e = e;\r\n return errorObj;\r\n }\r\n}\r\nfunction tryCatch(fn) {\r\n tryCatchTarget = fn;\r\n return tryCatcher;\r\n}\r\n\r\nvar inherits = function(Child, Parent) {\r\n var hasProp = {}.hasOwnProperty;\r\n\r\n function T() {\r\n this.constructor = Child;\r\n this.constructor$ = Parent;\r\n for (var propertyName in Parent.prototype) {\r\n if (hasProp.call(Parent.prototype, propertyName) &&\r\n propertyName.charAt(propertyName.length-1) !== \"$\"\r\n ) {\r\n this[propertyName + \"$\"] = Parent.prototype[propertyName];\r\n }\r\n }\r\n }\r\n T.prototype = Parent.prototype;\r\n Child.prototype = new T();\r\n return Child.prototype;\r\n};\r\n\r\n\r\nfunction isPrimitive(val) {\r\n return val == null || val === true || val === false ||\r\n typeof val === \"string\" || typeof val === \"number\";\r\n\r\n}\r\n\r\nfunction isObject(value) {\r\n return typeof value === \"function\" ||\r\n typeof value === \"object\" && value !== null;\r\n}\r\n\r\nfunction maybeWrapAsError(maybeError) {\r\n if (!isPrimitive(maybeError)) return maybeError;\r\n\r\n return new Error(safeToString(maybeError));\r\n}\r\n\r\nfunction withAppended(target, appendee) {\r\n var len = target.length;\r\n var ret = new Array(len + 1);\r\n var i;\r\n for (i = 0; i < len; ++i) {\r\n ret[i] = target[i];\r\n }\r\n ret[i] = appendee;\r\n return ret;\r\n}\r\n\r\nfunction getDataPropertyOrDefault(obj, key, defaultValue) {\r\n if (es5.isES5) {\r\n var desc = Object.getOwnPropertyDescriptor(obj, key);\r\n\r\n if (desc != null) {\r\n return desc.get == null && desc.set == null\r\n ? desc.value\r\n : defaultValue;\r\n }\r\n } else {\r\n return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;\r\n }\r\n}\r\n\r\nfunction notEnumerableProp(obj, name, value) {\r\n if (isPrimitive(obj)) return obj;\r\n var descriptor = {\r\n value: value,\r\n configurable: true,\r\n enumerable: false,\r\n writable: true\r\n };\r\n es5.defineProperty(obj, name, descriptor);\r\n return obj;\r\n}\r\n\r\nfunction thrower(r) {\r\n throw r;\r\n}\r\n\r\nvar inheritedDataKeys = (function() {\r\n var excludedPrototypes = [\r\n Array.prototype,\r\n Object.prototype,\r\n Function.prototype\r\n ];\r\n\r\n var isExcludedProto = function(val) {\r\n for (var i = 0; i < excludedPrototypes.length; ++i) {\r\n if (excludedPrototypes[i] === val) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n if (es5.isES5) {\r\n var getKeys = Object.getOwnPropertyNames;\r\n return function(obj) {\r\n var ret = [];\r\n var visitedKeys = Object.create(null);\r\n while (obj != null && !isExcludedProto(obj)) {\r\n var keys;\r\n try {\r\n keys = getKeys(obj);\r\n } catch (e) {\r\n return ret;\r\n }\r\n for (var i = 0; i < keys.length; ++i) {\r\n var key = keys[i];\r\n if (visitedKeys[key]) continue;\r\n visitedKeys[key] = true;\r\n var desc = Object.getOwnPropertyDescriptor(obj, key);\r\n if (desc != null && desc.get == null && desc.set == null) {\r\n ret.push(key);\r\n }\r\n }\r\n obj = es5.getPrototypeOf(obj);\r\n }\r\n return ret;\r\n };\r\n } else {\r\n var hasProp = {}.hasOwnProperty;\r\n return function(obj) {\r\n if (isExcludedProto(obj)) return [];\r\n var ret = [];\r\n\r\n /*jshint forin:false */\r\n enumeration: for (var key in obj) {\r\n if (hasProp.call(obj, key)) {\r\n ret.push(key);\r\n } else {\r\n for (var i = 0; i < excludedPrototypes.length; ++i) {\r\n if (hasProp.call(excludedPrototypes[i], key)) {\r\n continue enumeration;\r\n }\r\n }\r\n ret.push(key);\r\n }\r\n }\r\n return ret;\r\n };\r\n }\r\n\r\n})();\r\n\r\nvar thisAssignmentPattern = /this\\s*\\.\\s*\\S+\\s*=/;\r\nfunction isClass(fn) {\r\n try {\r\n if (typeof fn === \"function\") {\r\n var keys = es5.names(fn.prototype);\r\n\r\n var hasMethods = es5.isES5 && keys.length > 1;\r\n var hasMethodsOtherThanConstructor = keys.length > 0 &&\r\n !(keys.length === 1 && keys[0] === \"constructor\");\r\n var hasThisAssignmentAndStaticMethods =\r\n thisAssignmentPattern.test(fn + \"\") && es5.names(fn).length > 0;\r\n\r\n if (hasMethods || hasMethodsOtherThanConstructor ||\r\n hasThisAssignmentAndStaticMethods) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n } catch (e) {\r\n return false;\r\n }\r\n}\r\n\r\nfunction toFastProperties(obj) {\r\n /*jshint -W027,-W055,-W031*/\r\n function FakeConstructor() {}\r\n FakeConstructor.prototype = obj;\r\n var l = 8;\r\n while (l--) new FakeConstructor();\r\n return obj;\r\n eval(obj);\r\n}\r\n\r\nvar rident = /^[a-z$_][a-z$_0-9]*$/i;\r\nfunction isIdentifier(str) {\r\n return rident.test(str);\r\n}\r\n\r\nfunction filledRange(count, prefix, suffix) {\r\n var ret = new Array(count);\r\n for(var i = 0; i < count; ++i) {\r\n ret[i] = prefix + i + suffix;\r\n }\r\n return ret;\r\n}\r\n\r\nfunction safeToString(obj) {\r\n try {\r\n return obj + \"\";\r\n } catch (e) {\r\n return \"[no string representation]\";\r\n }\r\n}\r\n\r\nfunction isError(obj) {\r\n return obj !== null &&\r\n typeof obj === \"object\" &&\r\n typeof obj.message === \"string\" &&\r\n typeof obj.name === \"string\";\r\n}\r\n\r\nfunction markAsOriginatingFromRejection(e) {\r\n try {\r\n notEnumerableProp(e, \"isOperational\", true);\r\n }\r\n catch(ignore) {}\r\n}\r\n\r\nfunction originatesFromRejection(e) {\r\n if (e == null) return false;\r\n return ((e instanceof Error[\"__BluebirdErrorTypes__\"].OperationalError) ||\r\n e[\"isOperational\"] === true);\r\n}\r\n\r\nfunction canAttachTrace(obj) {\r\n return isError(obj) && es5.propertyIsWritable(obj, \"stack\");\r\n}\r\n\r\nvar ensureErrorObject = (function() {\r\n if (!(\"stack\" in new Error())) {\r\n return function(value) {\r\n if (canAttachTrace(value)) return value;\r\n try {throw new Error(safeToString(value));}\r\n catch(err) {return err;}\r\n };\r\n } else {\r\n return function(value) {\r\n if (canAttachTrace(value)) return value;\r\n return new Error(safeToString(value));\r\n };\r\n }\r\n})();\r\n\r\nfunction classString(obj) {\r\n return {}.toString.call(obj);\r\n}\r\n\r\nfunction copyDescriptors(from, to, filter) {\r\n var keys = es5.names(from);\r\n for (var i = 0; i < keys.length; ++i) {\r\n var key = keys[i];\r\n if (filter(key)) {\r\n try {\r\n es5.defineProperty(to, key, es5.getDescriptor(from, key));\r\n } catch (ignore) {}\r\n }\r\n }\r\n}\r\n\r\nvar asArray = function(v) {\r\n if (es5.isArray(v)) {\r\n return v;\r\n }\r\n return null;\r\n};\r\n\r\nif (typeof Symbol !== \"undefined\" && Symbol.iterator) {\r\n var ArrayFrom = typeof Array.from === \"function\" ? function(v) {\r\n return Array.from(v);\r\n } : function(v) {\r\n var ret = [];\r\n var it = v[Symbol.iterator]();\r\n var itResult;\r\n while (!((itResult = it.next()).done)) {\r\n ret.push(itResult.value);\r\n }\r\n return ret;\r\n };\r\n\r\n asArray = function(v) {\r\n if (es5.isArray(v)) {\r\n return v;\r\n } else if (v != null && typeof v[Symbol.iterator] === \"function\") {\r\n return ArrayFrom(v);\r\n }\r\n return null;\r\n };\r\n}\r\n\r\nvar isNode = typeof process !== \"undefined\" &&\r\n classString(process).toLowerCase() === \"[object process]\";\r\n\r\nfunction env(key, def) {\r\n return isNode ? process.env[key] : def;\r\n}\r\n\r\nfunction getNativePromise() {\r\n if (typeof Promise === \"function\") {\r\n try {\r\n var promise = new Promise(function(){});\r\n if ({}.toString.call(promise) === \"[object Promise]\") {\r\n return Promise;\r\n }\r\n } catch (e) {}\r\n }\r\n}\r\n\r\nvar ret = {\r\n isClass: isClass,\r\n isIdentifier: isIdentifier,\r\n inheritedDataKeys: inheritedDataKeys,\r\n getDataPropertyOrDefault: getDataPropertyOrDefault,\r\n thrower: thrower,\r\n isArray: es5.isArray,\r\n asArray: asArray,\r\n notEnumerableProp: notEnumerableProp,\r\n isPrimitive: isPrimitive,\r\n isObject: isObject,\r\n isError: isError,\r\n canEvaluate: canEvaluate,\r\n errorObj: errorObj,\r\n tryCatch: tryCatch,\r\n inherits: inherits,\r\n withAppended: withAppended,\r\n maybeWrapAsError: maybeWrapAsError,\r\n toFastProperties: toFastProperties,\r\n filledRange: filledRange,\r\n toString: safeToString,\r\n canAttachTrace: canAttachTrace,\r\n ensureErrorObject: ensureErrorObject,\r\n originatesFromRejection: originatesFromRejection,\r\n markAsOriginatingFromRejection: markAsOriginatingFromRejection,\r\n classString: classString,\r\n copyDescriptors: copyDescriptors,\r\n hasDevTools: typeof chrome !== \"undefined\" && chrome &&\r\n typeof chrome.loadTimes === \"function\",\r\n isNode: isNode,\r\n env: env,\r\n global: globalObject,\r\n getNativePromise: getNativePromise\r\n};\r\nret.isRecentNode = ret.isNode && (function() {\r\n var version = process.versions.node.split(\".\").map(Number);\r\n return (version[0] === 0 && version[1] > 10) || (version[0] > 0);\r\n})();\r\n\r\nif (ret.isNode) ret.toFastProperties(process);\r\n\r\ntry {throw new Error(); } catch (e) {ret.lastLineError = e;}\r\nmodule.exports = ret;\r\n\r\n},{\"./es5\":13}]},{},[4])(4)\r\n}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; }\r\n"]}