diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..0646383 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v8.4 diff --git a/lib/flajsh.min.js b/lib/flajsh.min.js index 5a096a3..fb3f024 100644 --- a/lib/flajsh.min.js +++ b/lib/flajsh.min.js @@ -154,7 +154,7 @@ function r(e,t){if(t===e)return!0;if(0===e.indexOf(t)){if("/"===t.substr(-1))ret * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ -var s=a(177),c=a(40).extname,u=/^\s*([^;\s]*)(?:;|\s|$)/,p=/^text\//i;t.charset=r,t.charsets={lookup:r},t.contentType=i,t.extension=n,t.extensions=Object.create(null),t.lookup=o,t.types=Object.create(null),function(e,t){var a=["nginx","apache",void 0,"iana"];Object.keys(s).forEach(function(r){var i=s[r],n=i.extensions;if(n&&n.length){e[r]=n;for(var o=0;op||u===p&&"application/"===t[c].substr(0,12)))continue}t[c]=r}}})}(t.extensions,t.types)},function(e,t){e.exports=require("tls")},function(e,t,a){function r(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null}var i=a(3),n=a(14).Stream,o=a(183);e.exports=r,i.inherits(r,n),r.create=function(e){var t=new this;e=e||{};for(var a in e)t[a]=e[a];return t},r.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},r.prototype.append=function(e){if(r.isStreamLike(e)){if(!(e instanceof o)){var t=o.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},r.prototype.pipe=function(e,t){return n.prototype.pipe.call(this,e,t),this.resume(),e},r.prototype._getNext=function(){this._currentStream=null;var e=this._streams.shift();return void 0===e?void this.end():"function"!=typeof e?void this._pipeNext(e):void e(function(e){r.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this))},r.prototype._pipeNext=function(e){if(this._currentStream=e,r.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},r.prototype._handleErrors=function(e){var t=this;e.on("error",function(e){t._emitError(e)})},r.prototype.write=function(e){this.emit("data",e)},r.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},r.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},r.prototype.end=function(){this._reset(),this.emit("end")},r.prototype.destroy=function(){this._reset(),this.emit("close")},r.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},r.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},r.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},r.prototype._emitError=function(e){this._reset(),this.emit("error",e)}},function(e,t){e.exports=require("fs")},function(e,t,a){function r(e,t,a,r){var n=a.keyedList?a.keyedList[a.index]:a.index;a.jobs[n]=i(t,n,e[n],function(e,t){n in a.jobs&&(delete a.jobs[n],e?o(a):a.results[n]=t,r(e,a.results))})}function i(e,t,a,r){return 2==e.length?e(a,n(r)):e(a,t,n(r))}var n=a(77),o=a(78);e.exports=r},function(e,t,a){function r(e){var t=!1;return i(function(){t=!0}),function(a,r){t?e(a,r):i(function(){e(a,r)})}}var i=a(186);e.exports=r},function(e,t){function a(e){Object.keys(e.jobs).forEach(r.bind(e)),e.jobs={}}function r(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}e.exports=a},function(e,t){function a(e,t){var a=!Array.isArray(e),r={index:0,keyedList:a||t?Object.keys(e):null,jobs:{},results:a?{}:[],size:a?Object.keys(e).length:e.length};return t&&r.keyedList.sort(a?t:function(a,r){return t(e[a],e[r])}),r}e.exports=a},function(e,t,a){function r(e){Object.keys(this.jobs).length&&(this.index=this.size,i(this),n(e)(null,this.results))}var i=a(78),n=a(77);e.exports=r},function(e,t,a){function r(e,t,a,r){var i=s(e,a);return o(e,t,i,function a(n,s){return n?void r(n,s):++i.index<(i.keyedList||e).length?void o(e,t,i,a):void r(null,i.results)}),c.bind(i,r)}function i(e,t){return et?1:0}function n(e,t){return-1*i(e,t)}var o=a(76),s=a(79),c=a(80);e.exports=r,e.exports.ascending=i,e.exports.descending=n},function(e,t,a){function r(e){return e instanceof s.Stream}function i(e){return r(e)&&"function"==typeof e._read&&"object"==typeof e._readableState}function n(e){return r(e)&&"function"==typeof e._write&&"object"==typeof e._writableState}function o(e){return i(e)&&n(e)}var s=a(14);e.exports=r,e.exports.isReadable=i,e.exports.isWritable=n,e.exports.isDuplex=o},function(e,t,a){"use strict";var r=a(192),i=a(193),n=a(85);e.exports={formats:n,parse:i,stringify:r}},function(e,t,a){"use strict";var r=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var a=t&&t.plainObjects?Object.create(null):{},r=0;r=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?a+=t.charAt(r):n<128?a+=i[n]:n<2048?a+=i[192|n>>6]+i[128|63&n]:n<55296||n>=57344?a+=i[224|n>>12]+i[128|n>>6&63]+i[128|63&n]:(r+=1,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),a+=i[240|n>>18]+i[128|n>>12&63]+i[128|n>>6&63]+i[128|63&n])}return a},t.compact=function(e,a){if("object"!=typeof e||null===e)return e;var r=a||[],i=r.indexOf(e);if(-1!==i)return r[i];if(r.push(e),Array.isArray(e)){for(var n=[],o=0;o2&&(t=l.call(arguments,1)),a(t)})})}function n(e){return Promise.all(e.map(r,this))}function o(e){for(var t=new e.constructor,a=Object.keys(e),i=[],n=0;n",y=m?">":"<";if(g){var b=e.util.getData(d.$data,o,e.dataPathArr),k="exclusive"+n,x="op"+n,w="' + "+x+" + '";i+=" var schemaExcl"+n+" = "+b+"; ",b="schemaExcl"+n,i+=" var exclusive"+n+"; if (typeof "+b+" != 'boolean' && typeof "+b+" != 'undefined') { ";var a=f,j=j||[];j.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+f+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var _=i;i=j.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if( ",h&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" ((exclusive"+n+" = "+b+" === true) ? "+l+" "+y+"= "+r+" : "+l+" "+y+" "+r+") || "+l+" !== "+l+") { var op"+n+" = exclusive"+n+" ? '"+v+"' : '"+v+"=';"}else{var k=!0===d,w=v;k||(w+="=");var x="'"+w+"'";i+=" if ( ",h&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+l+" "+y,k&&(i+="="),i+=" "+r+" || "+l+" !== "+l+") {"}var a=t,j=j||[];j.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+x+", limit: "+r+", exclusive: "+k+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+w+" ",i+=h?"' + "+r:s+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var _=i;return i=j.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",p&&(i+=" else { "),i}},function(e,t,a){"use strict";e.exports=function(e,t){var a,r,i=" ",n=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,l="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+n+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+n):r=s;var m="maxItems"==t?">":"<";i+="if ( ",h&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+l+".length "+m+" "+r+") { ";var a=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"less",i+=" than ",i+=h?"' + "+r+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var d=i;return i=f.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i}},function(e,t,a){"use strict";e.exports=function(e,t){var a,r,i=" ",n=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,l="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+n+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+n):r=s;var m="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),!1===e.opts.unicode?i+=" "+l+".length ":i+=" ucs2length("+l+") ",i+=" "+m+" "+r+") { ";var a=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+r+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var d=i;return i=f.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i}},function(e,t,a){"use strict";e.exports=function(e,t){var a,r,i=" ",n=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,l="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+n+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+n):r=s;var m="maxProperties"==t?">":"<";i+="if ( ",h&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" Object.keys("+l+").length "+m+" "+r+") { ";var a=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"less",i+=" than ",i+=h?"' + "+r+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var d=i;return i=f.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i}},function(e,t,a){function r(){return i(16)}var i=a(2).randomBytes;e.exports=r},function(e,t){function a(e,t){var a=t||0,i=r;return i[e[a++]]+i[e[a++]]+i[e[a++]]+i[e[a++]]+"-"+i[e[a++]]+i[e[a++]]+"-"+i[e[a++]]+i[e[a++]]+"-"+i[e[a++]]+i[e[a++]]+"-"+i[e[a++]]+i[e[a++]]+i[e[a++]]+i[e[a++]]+i[e[a++]]+i[e[a++]]}for(var r=[],i=0;i<256;++i)r[i]=(i+256).toString(16).substr(1);e.exports=a},function(e,t,a){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a1){var a,r=new Array(t-1),i=0;for(a=0;a0&&"function"!=typeof e&&"function"!=typeof t){var a=".then() only accepts functions but was passed: "+m.classString(e);arguments.length>1&&(a+=", "+m.classString(t)),this._warn(a)}return this._then(e,t,void 0,void 0,void 0)},i.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},i.prototype.spread=function(e){return"function"!=typeof e?l("expecting a function but got "+m.classString(e)):this.all()._then(e,void 0,void 0,x,void 0)},i.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new _(this).promise()},i.prototype.error=function(e){return this.caught(m.originatesFromRejection,e)},i.getNewLibraryCopy=e.exports,i.is=function(e){return e instanceof i},i.fromNode=i.fromCallback=function(e){var t=new i(k);t._captureStackTrace();var a=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=A(e)(q(t,a));return r===C&&t._rejectCallback(r.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},i.all=function(e){return new _(e).promise()},i.cast=function(e){var t=j(e);return t instanceof i||(t=new i(k),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(e){var t=new i(k);return t._captureStackTrace(),t._rejectCallback(e,!0),t},i.setScheduler=function(e){if("function"!=typeof e)throw new y("expecting a function but got "+m.classString(e));return g.setScheduler(e)},i.prototype._then=function(e,t,a,r,n){var o=void 0!==n,s=o?n:new i(k),u=this._target(),p=u._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&p)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var l=c();if(0!=(50397184&p)){var h,f,d=u._settlePromiseCtx;0!=(33554432&p)?(f=u._rejectionHandler0,h=e):0!=(16777216&p)?(f=u._fulfillmentHandler0,h=t,u._unsetRejectionIsUnhandled()):(d=u._settlePromiseLateCancellationObserver,f=new b("late cancellation observer"),u._attachExtraTrace(f),h=t),g.invoke(d,u,{handler:null===l?h:"function"==typeof h&&m.domainBind(l,h),promise:s,receiver:r,value:f})}else u._addCallbacks(e,t,s,r,l);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},i.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){g.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==h)return void 0===t&&this._isBound()?this._boundValue():t},i.prototype._promiseAt=function(e){return this[4*e-4+2]},i.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},i.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),a=e._rejectionHandler0,r=e._promise0,i=e._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(t,a,r,i,null)},i.prototype._migrateCallbackAt=function(e,t){var a=e._fulfillmentHandlerAt(t),r=e._rejectionHandlerAt(t),i=e._promiseAt(t),n=e._receiverAt(t);void 0===n&&(n=h),this._addCallbacks(a,r,i,n,null)},i.prototype._addCallbacks=function(e,t,a,r,i){var n=this._length();if(n>=65531&&(n=0,this._setLength(0)),0===n)this._promise0=a,this._receiver0=r,"function"==typeof e&&(this._fulfillmentHandler0=null===i?e:m.domainBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:m.domainBind(i,t));else{var o=4*n-4;this[o+2]=a,this[o+3]=r,"function"==typeof e&&(this[o+0]=null===i?e:m.domainBind(i,e)),"function"==typeof t&&(this[o+1]=null===i?t:m.domainBind(i,t))}return this._setLength(n+1),n},i.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},i.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(u(),!1);var a=j(e,this);if(!(a instanceof i))return this._fulfill(e);t&&this._propagateFrom(a,2);var r=a._target();if(r===this)return void this._reject(u());var n=r._bitField;if(0==(50397184&n)){var o=this._length();o>0&&r._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var a=u();return this._attachExtraTrace(a),this._reject(a)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():g.settlePromises(this))}},i.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return g.fatalError(e,m.isNode);(65535&t)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled()}},i.prototype._fulfillPromises=function(e,t){for(var a=1;a0){if(0!=(16842752&e)){var a=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,a,e),this._rejectPromises(t,a)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,e),this._fulfillPromises(t,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){return F.deprecated("Promise.defer","new Promise"),{promise:new i(k),resolve:n,reject:o}},m.notEnumerableProp(i,"_makeSelfResolutionError",u),a(113)(i,k,j,l,F),a(114)(i,k,j,F),a(115)(i,_,l,F),a(116)(i),a(117)(i),a(118)(i,_,j,k,g,c),i.Promise=i,i.version="3.5.0",a(119)(i,_,l,j,k,F),a(120)(i),a(121)(i,l,j,S,k,F),a(122)(i,k,F),a(123)(i,l,k,j,t,F),a(124)(i),a(125)(i,k),a(126)(i,_,j,l),a(127)(i,k,j,l),a(128)(i,_,l,j,k,F),a(129)(i,_,F),a(130)(i,_,l),a(131)(i,k),a(132)(i,k),a(133)(i),m.toFastProperties(i),m.toFastProperties(i.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new i(k)),F.setBounds(d.firstLineError,m.lastLineError),i}},function(e,t,a){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new u(16),this._normalQueue=new u(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=c}function i(e,t,a){this._lateQueue.push(e,t,a),this._queueTick()}function n(e,t,a){this._normalQueue.push(e,t,a),this._queueTick()}function o(e){this._normalQueue._pushOne(e),this._queueTick()}var s;try{throw new Error}catch(e){s=e}var c=a(106),u=a(107),p=a(1);r.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){p.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},r.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout(function(){e(t)},0);else try{this._schedule(function(){e(t)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},p.hasDevTools?(r.prototype.invokeLater=function(e,t,a){this._trampolineEnabled?i.call(this,e,t,a):this._schedule(function(){setTimeout(function(){e.call(t,a)},100)})},r.prototype.invoke=function(e,t,a){this._trampolineEnabled?n.call(this,e,t,a):this._schedule(function(){e.call(t,a)})},r.prototype.settlePromises=function(e){this._trampolineEnabled?o.call(this,e):this._schedule(function(){e._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=n,r.prototype.settlePromises=o),r.prototype._drainQueue=function(e){for(;e.length()>0;){var t=e.shift();if("function"==typeof t){var a=e.shift(),r=e.shift();t.call(a,r)}else t._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=s},function(e,t,a){"use strict";var r,i=a(1),n=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},o=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var s=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(e){s.call(global,e)}:function(e){c.call(process,e)}}else if("function"==typeof o&&"function"==typeof o.resolve){var u=o.resolve();r=function(e){u.then(e)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(e){setImmediate(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:n:function(){var e=document.createElement("div"),t={attributes:!0},a=!1,r=document.createElement("div");new MutationObserver(function(){e.classList.toggle("foo"),a=!1}).observe(r,t);var i=function(){a||(a=!0,r.classList.toggle("foo"))};return function(a){var r=new MutationObserver(function(){r.disconnect(),a()});r.observe(e,t),i()}}();e.exports=r},function(e,t,a){"use strict";function r(e,t,a,r,i){for(var n=0;n=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var a=0;a=0)return n[e]}var i=!1,n=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=n.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=a,t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var a=e.prototype._pushContext,n=e.prototype._popContext,o=e._peekContext,s=e.prototype._peekContext,c=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=a,e.prototype._popContext=n,e._peekContext=o,e.prototype._peekContext=s,e.prototype._promiseCreated=c,i=!1},i=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=r,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},function(e,t,a){"use strict";e.exports=function(e,t){function r(e,t){return{promise:t}}function i(){return!1}function n(e,t,a){var r=this;try{e(t,a,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+R.toString(e));r._attachCancellationCallback(e)})}catch(e){return e}}function o(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?R.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function s(){return this._onCancelField}function c(e){this._onCancelField=e}function u(){this._cancellationParent=void 0,this._onCancelField=void 0}function p(e,t){if(0!=(1&t)){this._cancellationParent=e;var a=e._branchesRemainingToCancel;void 0===a&&(a=0),e._branchesRemainingToCancel=a+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function l(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function m(){this._trace=new C(this._peekContext())}function f(e,t){if(H(e)){var a=this._trace;if(void 0!==a&&t&&(a=a._parent),void 0!==a)a.attachExtraTrace(e);else if(!e.__stackCleaned__){var r=j(e);R.notEnumerableProp(e,"stack",r.message+"\n"+r.stack.join("\n")),R.notEnumerableProp(e,"__stackCleaned__",!0)}}}function d(e,t,a,r,i){if(void 0===e&&null!==t&&W){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;a&&(a+=" ");var n="",o="";if(t._trace){for(var s=t._trace.stack.split("\n"),c=x(s),u=c.length-1;u>=0;--u){var p=c[u];if(!N.test(p)){var l=p.match(U);l&&(n="at "+l[1]+":"+l[2]+":"+l[3]+" ");break}}if(c.length>0)for(var h=c[0],u=0;u0&&(o="\n"+s[u-1]);break}}var m="a promise was created in a "+a+"handler "+n+"but was not returned from it, see http://goo.gl/rRqMUw"+o;r._warn(m,!0,t)}}function g(e,t){var a=e+" is deprecated and will be removed in a future version.";return t&&(a+=" Use "+t+" instead."),v(a)}function v(t,a,r){if(ne.warnings){var i,n=new D(t);if(a)r._attachExtraTrace(n);else if(ne.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(n);else{var o=j(n);n.stack=o.message+"\n"+o.stack.join("\n")}ee("warning",n)||_(n,"",!0)}}function y(e,t){for(var a=0;a=0;--s)if(r[s]===n){o=s;break}for(var s=o;s>=0;--s){var c=r[s];if(t[i]!==c)break;t.pop(),i--}t=r}}function x(e){for(var t=[],a=0;a0&&"SyntaxError"!=e.name&&(t=t.slice(a)),t}function j(e){var t=e.stack,a=e.toString();return t="string"==typeof t&&t.length>0?w(e):[" (No stack trace)"],{message:a,stack:"SyntaxError"==e.name?t:x(t)}}function _(e,t,a){if("undefined"!=typeof console){var r;if(R.isObject(e)){var i=e.stack;r=t+$(i,e)}else r=t+String(e);"function"==typeof B?B(r,a):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function E(e,t,a,r){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(r):t(a,r))}catch(e){I.throwLater(e)}"unhandledRejection"===e?ee(e,a,r)||i||_(a,"Unhandled rejection "):ee(e,r)}function S(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():R.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+F(t)+">, no stack trace)"}function F(e){return e.length<41?e:e.substr(0,38)+"..."}function P(){return"function"==typeof ie}function z(e){var t=e.match(re);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function q(e,t){if(P()){for(var a,r,i=e.stack.split("\n"),n=t.stack.split("\n"),o=-1,s=-1,c=0;c=s||(ae=function(e){if(L.test(e))return!0;var t=z(e);return!!(t&&t.fileName===a&&o<=t.line&&t.line<=s)})}}function C(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ie(this,C),t>32&&this.uncycle()}var A,O,B,T=e._getDomain,I=e._async,D=a(11).Warning,R=a(1),H=R.canAttachTrace,L=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,N=/\((?:timers\.js):\d+:\d+\)/,U=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,M=null,$=null,V=!1,K=!(0==R.env("BLUEBIRD_DEBUG")||!R.env("BLUEBIRD_DEBUG")&&"development"!==R.env("NODE_ENV")),Q=!(0==R.env("BLUEBIRD_WARNINGS")||!K&&!R.env("BLUEBIRD_WARNINGS")),G=!(0==R.env("BLUEBIRD_LONG_STACK_TRACES")||!K&&!R.env("BLUEBIRD_LONG_STACK_TRACES")),W=0!=R.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(Q||!!R.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),I.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){E("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),E("unhandledRejection",O,e,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(e,t,a){return v(e,t,a||this)},e.onPossiblyUnhandledRejection=function(e){var t=T();O="function"==typeof e?null===t?e:R.domainBind(t,e):void 0},e.onUnhandledRejectionHandled=function(e){var t=T();A="function"==typeof e?null===t?e:R.domainBind(t,e):void 0};var J=function(){};e.longStackTraces=function(){if(I.haveItemsQueued()&&!ne.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ne.longStackTraces&&P()){var a=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ne.longStackTraces=!0,J=function(){if(I.haveItemsQueued()&&!ne.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=a,e.prototype._attachExtraTrace=r,t.deactivateLongStackTraces(),I.enableTrampoline(),ne.longStackTraces=!1},e.prototype._captureStackTrace=m,e.prototype._attachExtraTrace=f,t.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ne.longStackTraces&&P()};var Y=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return R.global.dispatchEvent(e),function(e,t){var a=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!R.global.dispatchEvent(a)}}if("function"==typeof Event){var e=new Event("CustomEvent");return R.global.dispatchEvent(e),function(e,t){var a=new Event(e.toLowerCase(),{cancelable:!0});return a.detail=t,!R.global.dispatchEvent(a)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),R.global.dispatchEvent(e),function(e,t){var a=document.createEvent("CustomEvent");return a.initCustomEvent(e.toLowerCase(),!1,!0,t),!R.global.dispatchEvent(a)}}catch(e){}return function(){return!1}}(),X=function(){return R.isNode?function(){return process.emit.apply(process,arguments)}:R.global?function(e){var t="on"+e.toLowerCase(),a=R.global[t];return!!a&&(a.apply(R.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(e,t,a){return{promise:t,child:a}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,a){return{reason:t,promise:a}},rejectionHandled:r},ee=function(e){var t=!1;try{t=X.apply(null,arguments)}catch(e){I.throwLater(e),t=!0}var a=!1;try{a=Y(e,Z[e].apply(null,arguments))}catch(e){I.throwLater(e),a=!0}return a||t};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&J()),"warnings"in t){var a=t.warnings;ne.warnings=!!a,W=ne.warnings,R.isObject(a)&&"wForgottenReturn"in a&&(W=!!a.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ne.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=u,e.prototype._propagateFrom=p,e.prototype._onCancel=s,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=o,e.prototype._execute=n,te=p,ne.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ne.monitoring?(ne.monitoring=!0,e.prototype._fireEvent=ee):!t.monitoring&&ne.monitoring&&(ne.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(e,t,a){try{e(t,a)}catch(e){return e}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(e){},e.prototype._attachCancellationCallback=function(e){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(e,t){};var te=l,ae=function(){return!1},re=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;R.inherits(C,Error),t.CapturedTrace=C,C.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],a={},r=0,i=this;void 0!==i;++r)t.push(i),i=i._parent;e=this._length=r;for(var r=e-1;r>=0;--r){var n=t[r].stack;void 0===a[n]&&(a[n]=r)}for(var r=0;r0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[r]._parent=void 0,t[r]._length=1;var c=r>0?t[r-1]:this;s=0;--p)t[p]._length=u,u++;return}}}},C.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=j(e),a=t.message,r=[t.stack],i=this;void 0!==i;)r.push(x(i.stack.split("\n"))),i=i._parent;k(r),b(r),R.notEnumerableProp(e,"stack",y(a,r)),R.notEnumerableProp(e,"__stackCleaned__",!0)}};var ie=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():S(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,M=e,$=t;var a=Error.captureStackTrace;return ae=function(e){return L.test(e)},function(e,t){Error.stackTraceLimit+=6,a(e,t),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return M=/@/,$=t,V=!0,function(e){e.stack=(new Error).stack};var i;try{throw new Error}catch(e){i="stack"in e}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?($=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?S(t):t.toString()},null):(M=e,$=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(B=function(e){console.warn(e)},R.isNode&&process.stderr.isTTY?B=function(e,t){var a=t?"":"";console.warn(a+e+"\n")}:R.isNode||"string"!=typeof(new Error).stack||(B=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ne={warnings:Q,longStackTraces:!1,cancellation:!1,monitoring:!1};return G&&e.longStackTraces(),{longStackTraces:function(){return ne.longStackTraces},warnings:function(){return ne.warnings},cancellation:function(){return ne.cancellation},monitoring:function(){return ne.monitoring},propagateFromFunction:function(){return te},boundValueFunction:function(){return h},checkForgottenReturns:d,setBounds:q,warn:v,deprecated:g,CapturedTrace:C,fireDomEvent:Y,fireGlobalEvent:X}}},function(e,t,a){"use strict";e.exports=function(e,t,r){function i(e,t,a){this.promise=e,this.type=t,this.handler=a,this.called=!1,this.cancelPromise=null}function n(e){this.finallyHandler=e}function o(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function s(){return u.call(this,this.promise._target()._settledValue())}function c(e){if(!o(this,e))return h.e=e,h}function u(a){var i=this.promise,u=this.handler;if(!this.called){this.called=!0;var p=this.isFinallyHandler()?u.call(i._boundValue()):u.call(i._boundValue(),a);if(p===r)return p;if(void 0!==p){i._setReturnedNonUndefined();var m=t(p,i);if(m instanceof e){if(null!=this.cancelPromise){if(m._isCancelled()){var f=new l("late cancellation observer");return i._attachExtraTrace(f),h.e=f,h}m.isPending()&&m._attachCancellationCallback(new n(this))}return m._then(s,c,void 0,this,void 0)}}}return i.isRejected()?(o(this),h.e=a,h):(o(this),a)}var p=a(1),l=e.CancellationError,h=p.errorObj,m=a(49)(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},n.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(e,t,a,r){return"function"!=typeof e?this.then():this._then(a,r,void 0,new i(this,t,e),void 0)},e.prototype.lastly=e.prototype.finally=function(e){return this._passThrough(e,0,u,u)},e.prototype.tap=function(e){return this._passThrough(e,1,u)},e.prototype.tapCatch=function(t){var a=arguments.length;if(1===a)return this._passThrough(t,1,void 0,u);var r,i=new Array(a-1),n=0;for(r=0;r1){n.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],p=arguments[2];c=o.isArray(u)?s(a).apply(p,u):s(a).call(p,u)}else c=s(a)();var l=r._popContext();return n.checkForgottenReturns(c,l,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(e){e===o.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},function(e,t,a){"use strict";e.exports=function(e,t,a,r){var i=!1,n=function(e,t){this._reject(t)},o=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(n,n,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},c=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(n){i||(i=!0,e.prototype._propagateFrom=r.propagateFromFunction(),e.prototype._boundValue=r.boundValueFunction());var u=a(n),p=new e(t);p._propagateFrom(this,1);var l=this._target();if(p._setBoundTo(u),u instanceof e){var h={promiseRejectionQueued:!1,promise:p,target:l,bindingPromise:u};l._then(t,o,void 0,p,h),u._then(s,c,void 0,p,h),p._setOnCancel(u)}else p._resolveCallback(l);return p},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,a){return e.resolve(a).bind(t)}}},function(e,t,a){"use strict";e.exports=function(e,t,r,i){var n=a(1),o=n.tryCatch,s=n.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var a=e._cancellationParent;if(null==a||!a._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=a}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(e,t){if(n.isArray(e))for(var a=0;a0&&"function"==typeof arguments[n]&&(a=arguments[n],n<=8&&u)){var p=new e(i);p._captureStackTrace();for(var l=h[n-1],d=new l(a),g=m,v=0;v=1?o:0,new s(t,a,o,n).promise()}var u=e._getDomain,p=a(1),l=p.tryCatch,h=p.errorObj,m=e._async;p.inherits(s,t),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,a){var r=this._values,n=this.length(),s=this._preservedValues,c=this._limit;if(a<0){if(a=-1*a-1,r[a]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[a]=t,this._queue.push(a),!1;null!==s&&(s[a]=t);var u=this._promise,p=this._callback,m=u._boundValue();u._pushContext();var f=l(p).call(m,t,a,n),d=u._popContext();if(o.checkForgottenReturns(f,d,null!==s?"Promise.filter":"Promise.map",u),f===h)return this._reject(f.e),!0;var g=i(f,this._promise);if(g instanceof e){g=g._target();var v=g._bitField;if(0==(50397184&v))return c>=1&&this._inFlight++,r[a]=g,g._proxy(this,-1*(a+1)),!1;if(0==(33554432&v))return 0!=(16777216&v)?(this._reject(g._reason()),!0):(this._cancel(),!0);f=g._value()}r[a]=f}return++this._totalResolved>=n&&(null!==s?this._filter(r,s):this._resolve(r),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,a=this._values;e.length>0&&this._inFlight512){for(var i=Object.keys(a),n=0;n<256;++n)delete a[i[n]];a[" size"]=i.length-256}}return r};c=function(e){return d(e,m,i)},u=function(e){return d(e,f,n)},e.prototype.call=function(e){for(var t=arguments.length,a=new Array(Math.max(t-1,0)),i=1;i=u)return p._fulfill();var n=c(t[o++]);if(n instanceof e&&n._isDisposable()){try{n=r(n._getDisposer().tryDispose(a),t.promise)}catch(e){return s(e)}if(n instanceof e)return n._then(i,s,null,null,null)}i()}var o=0,u=t.length,p=new e(n);return i(),p}function p(e,t,a){this._data=e,this._promise=t,this._context=a}function l(e,t,a){this.constructor$(e,t,a)}function h(e){return p.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function m(e){this.length=e,this.promise=null,this[e-1]=null}var f=a(1),d=a(11).TypeError,g=a(1).inherits,v=f.errorObj,y=f.tryCatch,b={};p.prototype.data=function(){return this._data},p.prototype.promise=function(){return this._promise},p.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():b},p.prototype.tryDispose=function(e){var t=this.resource(),a=this._context;void 0!==a&&a._pushContext();var r=t!==b?this.doDispose(t,e):null;return void 0!==a&&a._popContext(),this._promise._unsetDisposable(),this._data=null,r},p.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},g(l,p),l.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},m.prototype._resultCancelled=function(){for(var t=this.length,a=0;a0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(e){if("function"==typeof e)return new l(e,this,i());throw new d}}},function(e,t,a){"use strict";e.exports=function(e,t,r){function i(e){this.handle=e}function n(e){return clearTimeout(this.handle),e}function o(e){throw clearTimeout(this.handle),e}var s=a(1),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var u=function(e){return p(+this).thenReturn(e)},p=e.delay=function(a,n){var o,s;return void 0!==n?(o=e.resolve(n)._then(u,null,null,a,void 0),r.cancellation()&&n instanceof e&&o._setOnCancel(n)):(o=new e(t),s=setTimeout(function(){o._fulfill()},+a),r.cancellation()&&o._setOnCancel(new i(s)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};e.prototype.delay=function(e){return p(e,this)};var l=function(e,t,a){var r;r="string"!=typeof t?t instanceof Error?t:new c("operation timed out"):new c(t),s.markAsOriginatingFromRejection(r),e._attachExtraTrace(r),e._reject(r),null!=a&&a.cancel()};e.prototype.timeout=function(e,t){e=+e;var a,s,c=new i(setTimeout(function(){a.isPending()&&l(a,t,s)},e));return r.cancellation()?(s=this.then(),a=s._then(n,o,void 0,c,void 0),a._setOnCancel(c)):a=this._then(n,o,void 0,c,void 0),a}}},function(e,t,a){"use strict";e.exports=function(e,t,r,i,n,o){function s(t,a,r){for(var n=0;n=a;--r)t.push(r);for(var r=e+1;r<=3;++r)t.push(r);return t},E=function(e){return m.filledRange(e,"_arg","")},S=function(e){return m.filledRange(Math.max(e,3),"_arg","")},F=function(e){return"number"==typeof e.length?Math.max(Math.min(e.length,1024),0):0};l=function(a,r,i,n,o,s){function c(e){var t,a=E(e).join(", "),i=e>0?", ":"";return t=l?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===r?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n",t.replace("{{args}}",a).replace(", ",i)}var u=Math.max(0,F(n)-1),p=_(u),l="string"==typeof a||r===h,v="string"==typeof a?"this != null ? this['"+a+"'] : fn":"fn",y="'use strict'; \n var ret = function (Parameters) { \n 'use strict'; \n var len = arguments.length; \n var promise = new Promise(INTERNAL); \n promise._captureStackTrace(); \n var nodeback = nodebackForPromise(promise, "+s+"); \n var ret; \n var callback = tryCatch([GetFunctionCode]); \n switch(len) { \n [CodeForSwitchCase] \n } \n if (ret === errorObj) { \n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n } \n if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n return promise; \n }; \n notEnumerableProp(ret, '__isPromisified__', true); \n return ret; \n ".replace("[CodeForSwitchCase]",function(){for(var e="",t=0;t=this._length){var a;if(this._isMap)a=h(this._values);else{a={};for(var r=this.length(),i=0,n=this.length();i>1},e.prototype.props=function(){return o(this)},e.props=function(e){return o(e)}}},function(e,t,a){"use strict";e.exports=function(e,t,r,i){function n(a,n){var c=r(a);if(c instanceof e)return s(c);if(null===(a=o.asArray(a)))return i("expecting an array or an iterable object but got "+o.classString(a));var u=new e(t);void 0!==n&&u._propagateFrom(n,3);for(var p=u._fulfill,l=u._reject,h=0,m=a.length;h=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(e,t){var a=new n;return a._bitField=33554432,a._settledValueField=e,this._promiseResolved(t,a)},i.prototype._promiseRejected=function(e,t){var a=new n;return a._bitField=16777216,a._settledValueField=e,this._promiseResolved(t,a)},e.settle=function(e){return r.deprecated(".settle()",".reflect()"),new i(e).promise()},e.prototype.settle=function(){return e.settle(this)}}},function(e,t,a){"use strict";e.exports=function(e,t,r){function i(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function n(e,t){if((0|t)!==t||t<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var a=new i(e),n=a.promise();return a.setHowMany(t),a.init(),n}var o=a(1),s=a(11).RangeError,c=a(11).AggregateError,u=o.isArray,p={};o.inherits(i,t),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=u(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(e){this._howMany=e},i.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(p),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new c,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(e){this._values.push(e)},i.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new s(t)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(e,t){return n(e,t)},e.prototype.some=function(e){return n(this,e)},e._SomePromiseArray=i}},function(e,t,a){"use strict";e.exports=function(e,t){var a=e.map;e.prototype.filter=function(e,r){return a(this,e,r,t)},e.filter=function(e,r,i){return a(e,r,i,t)}}},function(e,t,a){"use strict";e.exports=function(e,t){function a(){return n(this)}function r(e,a){return i(e,a,t,t)}var i=e.reduce,n=e.all;e.prototype.each=function(e){return i(this,e,t,0)._then(a,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return i(this,e,t,t)},e.each=function(e,r){return i(e,r,t,0)._then(a,void 0,void 0,e,void 0)},e.mapSeries=r}},function(e,t,a){"use strict";e.exports=function(e){function t(e){var t=new a(e),r=t.promise();return t.setHowMany(1),t.setUnwrap(),t.init(),r}var a=e._SomePromiseArray;e.any=function(e){return t(e)},e.prototype.any=function(){return t(this)}}},function(e,t,a){"use strict";var r=a(135),i=a(54),n=a(51),o=a(36);e.exports=function(e){var t="Please verify options";if(!o(e))throw new TypeError(t);if(!n(e.request))throw new TypeError(t+".request");if(!i(e.expose)||0===e.expose.length)throw new TypeError(t+".expose");var a=r({PromiseImpl:e.PromiseImpl,constructorMixin:e.constructorMixin}),s=e.request.Request.prototype.init;e.request.Request.prototype.init=function(e){return!o(e)||this._callback||this._rp_promise||a.init.call(this,e),s.apply(this,arguments)};for(var c=!1,u=0;up||u===p&&"application/"===t[c].substr(0,12)))continue}t[c]=r}}})}(t.extensions,t.types)},function(e,t){e.exports=require("tls")},function(e,t,a){function r(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null}var i=a(3),n=a(14).Stream,o=a(183);e.exports=r,i.inherits(r,n),r.create=function(e){var t=new this;e=e||{};for(var a in e)t[a]=e[a];return t},r.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},r.prototype.append=function(e){if(r.isStreamLike(e)){if(!(e instanceof o)){var t=o.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},r.prototype.pipe=function(e,t){return n.prototype.pipe.call(this,e,t),this.resume(),e},r.prototype._getNext=function(){this._currentStream=null;var e=this._streams.shift();return void 0===e?void this.end():"function"!=typeof e?void this._pipeNext(e):void e(function(e){r.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this))},r.prototype._pipeNext=function(e){if(this._currentStream=e,r.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},r.prototype._handleErrors=function(e){var t=this;e.on("error",function(e){t._emitError(e)})},r.prototype.write=function(e){this.emit("data",e)},r.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},r.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},r.prototype.end=function(){this._reset(),this.emit("end")},r.prototype.destroy=function(){this._reset(),this.emit("close")},r.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},r.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},r.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},r.prototype._emitError=function(e){this._reset(),this.emit("error",e)}},function(e,t){e.exports=require("fs")},function(e,t,a){function r(e,t,a,r){var n=a.keyedList?a.keyedList[a.index]:a.index;a.jobs[n]=i(t,n,e[n],function(e,t){n in a.jobs&&(delete a.jobs[n],e?o(a):a.results[n]=t,r(e,a.results))})}function i(e,t,a,r){return 2==e.length?e(a,n(r)):e(a,t,n(r))}var n=a(77),o=a(78);e.exports=r},function(e,t,a){function r(e){var t=!1;return i(function(){t=!0}),function(a,r){t?e(a,r):i(function(){e(a,r)})}}var i=a(186);e.exports=r},function(e,t){function a(e){Object.keys(e.jobs).forEach(r.bind(e)),e.jobs={}}function r(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}e.exports=a},function(e,t){function a(e,t){var a=!Array.isArray(e),r={index:0,keyedList:a||t?Object.keys(e):null,jobs:{},results:a?{}:[],size:a?Object.keys(e).length:e.length};return t&&r.keyedList.sort(a?t:function(a,r){return t(e[a],e[r])}),r}e.exports=a},function(e,t,a){function r(e){Object.keys(this.jobs).length&&(this.index=this.size,i(this),n(e)(null,this.results))}var i=a(78),n=a(77);e.exports=r},function(e,t,a){function r(e,t,a,r){var i=s(e,a);return o(e,t,i,function a(n,s){return n?void r(n,s):++i.index<(i.keyedList||e).length?void o(e,t,i,a):void r(null,i.results)}),c.bind(i,r)}function i(e,t){return et?1:0}function n(e,t){return-1*i(e,t)}var o=a(76),s=a(79),c=a(80);e.exports=r,e.exports.ascending=i,e.exports.descending=n},function(e,t,a){function r(e){return e instanceof s.Stream}function i(e){return r(e)&&"function"==typeof e._read&&"object"==typeof e._readableState}function n(e){return r(e)&&"function"==typeof e._write&&"object"==typeof e._writableState}function o(e){return i(e)&&n(e)}var s=a(14);e.exports=r,e.exports.isReadable=i,e.exports.isWritable=n,e.exports.isDuplex=o},function(e,t,a){"use strict";var r=a(192),i=a(193),n=a(85);e.exports={formats:n,parse:i,stringify:r}},function(e,t,a){"use strict";var r=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var a=t&&t.plainObjects?Object.create(null):{},r=0;r=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?a+=t.charAt(r):n<128?a+=i[n]:n<2048?a+=i[192|n>>6]+i[128|63&n]:n<55296||n>=57344?a+=i[224|n>>12]+i[128|n>>6&63]+i[128|63&n]:(r+=1,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),a+=i[240|n>>18]+i[128|n>>12&63]+i[128|n>>6&63]+i[128|63&n])}return a},t.compact=function(e,a){if("object"!=typeof e||null===e)return e;var r=a||[],i=r.indexOf(e);if(-1!==i)return r[i];if(r.push(e),Array.isArray(e)){for(var n=[],o=0;o2&&(t=l.call(arguments,1)),a(t)})})}function n(e){return Promise.all(e.map(r,this))}function o(e){for(var t=new e.constructor,a=Object.keys(e),i=[],n=0;n",y=m?">":"<";if(g){var b=e.util.getData(d.$data,o,e.dataPathArr),k="exclusive"+n,x="op"+n,w="' + "+x+" + '";i+=" var schemaExcl"+n+" = "+b+"; ",b="schemaExcl"+n,i+=" var exclusive"+n+"; if (typeof "+b+" != 'boolean' && typeof "+b+" != 'undefined') { ";var a=f,j=j||[];j.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+f+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var _=i;i=j.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if( ",h&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" ((exclusive"+n+" = "+b+" === true) ? "+l+" "+y+"= "+r+" : "+l+" "+y+" "+r+") || "+l+" !== "+l+") { var op"+n+" = exclusive"+n+" ? '"+v+"' : '"+v+"=';"}else{var k=!0===d,w=v;k||(w+="=");var x="'"+w+"'";i+=" if ( ",h&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+l+" "+y,k&&(i+="="),i+=" "+r+" || "+l+" !== "+l+") {"}var a=t,j=j||[];j.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+x+", limit: "+r+", exclusive: "+k+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+w+" ",i+=h?"' + "+r:s+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var _=i;return i=j.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",p&&(i+=" else { "),i}},function(e,t,a){"use strict";e.exports=function(e,t){var a,r,i=" ",n=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,l="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+n+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+n):r=s;var m="maxItems"==t?">":"<";i+="if ( ",h&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+l+".length "+m+" "+r+") { ";var a=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"less",i+=" than ",i+=h?"' + "+r+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var d=i;return i=f.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i}},function(e,t,a){"use strict";e.exports=function(e,t){var a,r,i=" ",n=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,l="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+n+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+n):r=s;var m="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),!1===e.opts.unicode?i+=" "+l+".length ":i+=" ucs2length("+l+") ",i+=" "+m+" "+r+") { ";var a=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+r+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var d=i;return i=f.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i}},function(e,t,a){"use strict";e.exports=function(e,t){var a,r,i=" ",n=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,l="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+n+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+n):r=s;var m="maxProperties"==t?">":"<";i+="if ( ",h&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" Object.keys("+l+").length "+m+" "+r+") { ";var a=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"less",i+=" than ",i+=h?"' + "+r+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var d=i;return i=f.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i}},function(e,t,a){function r(){return i(16)}var i=a(2).randomBytes;e.exports=r},function(e,t){function a(e,t){var a=t||0,i=r;return i[e[a++]]+i[e[a++]]+i[e[a++]]+i[e[a++]]+"-"+i[e[a++]]+i[e[a++]]+"-"+i[e[a++]]+i[e[a++]]+"-"+i[e[a++]]+i[e[a++]]+"-"+i[e[a++]]+i[e[a++]]+i[e[a++]]+i[e[a++]]+i[e[a++]]+i[e[a++]]}for(var r=[],i=0;i<256;++i)r[i]=(i+256).toString(16).substr(1);e.exports=a},function(e,t,a){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a "+JSON.stringify(n)),n}}};return new Proxy(e,t)}(this)}return n(e,[{key:"getHeaderCredentials",value:function(e,t){if(!this.key||!this.secret)throw new u.default("missing api key or secret");var a=JSON.stringify(this._nonce()),r={request:e,nonce:a};for(var i in t)r[i]=t[i];r=new Buffer(JSON.stringify(r)).toString("base64");var n=crypto.createHmac("sha384",this.secret).update(r).digest("hex");return{"X-BFX-APIKEY":this.key,"X-BFX-PAYLOAD":r,"X-BFX-SIGNATURE":n}}},{key:"authRequest",value:function(e,t){var a={method:"POST",uri:this.url+e,headers:this.getHeaderCredentials(e,t),json:!0};return(0,s.default)(a).then(console.log).then(this.requestCallback).catch(console.log)}},{key:"request",value:function(e){var t={method:"GET",uri:this.url+e,json:!0};return(0,s.default)(t).then(this.requestCallback).catch(console.log)}},{key:"requestCallback",value:function(e,t,a){var r=void 0;try{e||200!==t.statusCode&&400!==t.statusCode?e=e||t.statusCode:(r=JSON.parse(a),r.message&&(e=r.message))}catch(t){e=a.toString()}if(e)throw new u.default(e);return r}}]),e}();t.default=p},function(e,t,a){"use strict";(function(e){var t=a(103).getNewLibraryCopy(),r=a(134),i=a(144);try{var n=i(a.c,function(){return a(145)},function(){a(56)},e)}catch(e){var o=a(261).EOL;throw console.error(o+"###"+o+'### The "request" library is not installed automatically anymore.'+o+'### But required by "request-promise".'+o+"###"+o+"### npm install request --save"+o+"###"+o),e}t.config({cancellation:!0}),r({request:n,PromiseImpl:t,expose:["then","catch","finally","cancel","promise"],constructorMixin:function(e,t,a){var r=this;a(function(){r.abort()})}}),n.bindCLS=function(){throw new Error("CLS support was dropped. To get it back read: https://github.com/request/request-promise/wiki/Getting-Back-Support-for-Continuation-Local-Storage")},e.exports=n}).call(t,a(102)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,a){"use strict";function r(){try{Promise===n&&(Promise=i)}catch(e){}return n}var i;"undefined"!=typeof Promise&&(i=Promise);var n=a(104)();n.noConflict=r,e.exports=n},function(e,t,a){"use strict";e.exports=function(){function t(){}function r(e,t){if(null==e||e.constructor!==i)throw new y("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof t)throw new y("expecting a function but got "+m.classString(t))}function i(e){e!==k&&r(this,e),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(e),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function n(e){this.promise._resolveCallback(e)}function o(e){this.promise._rejectCallback(e,!1)}function s(e){var t=new i(k);t._fulfillmentHandler0=e,t._rejectionHandler0=e,t._promise0=e,t._receiver0=e}var c,u=function(){return new y("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},p=function(){return new i.PromiseInspection(this._target())},l=function(e){return i.reject(new y(e))},h={},m=a(1);c=m.isNode?function(){var e=process.domain;return void 0===e&&(e=null),e}:function(){return null},m.notEnumerableProp(i,"_getDomain",c);var f=a(19),d=a(105),g=new d;f.defineProperty(i,"_async",{value:g});var v=a(11),y=i.TypeError=v.TypeError;i.RangeError=v.RangeError;var b=i.CancellationError=v.CancellationError;i.TimeoutError=v.TimeoutError,i.OperationalError=v.OperationalError,i.RejectionError=v.OperationalError,i.AggregateError=v.AggregateError;var k=function(){},x={},w={},j=a(108)(i,k),_=a(109)(i,k,j,l,t),E=a(110)(i),S=E.create,F=a(111)(i,E),P=(F.CapturedTrace,a(112)(i,j,w)),z=a(49)(w),q=a(50),C=m.errorObj,A=m.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype.catch=function(e){var t=arguments.length;if(t>1){var a,r=new Array(t-1),i=0;for(a=0;a0&&"function"!=typeof e&&"function"!=typeof t){var a=".then() only accepts functions but was passed: "+m.classString(e);arguments.length>1&&(a+=", "+m.classString(t)),this._warn(a)}return this._then(e,t,void 0,void 0,void 0)},i.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},i.prototype.spread=function(e){return"function"!=typeof e?l("expecting a function but got "+m.classString(e)):this.all()._then(e,void 0,void 0,x,void 0)},i.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new _(this).promise()},i.prototype.error=function(e){return this.caught(m.originatesFromRejection,e)},i.getNewLibraryCopy=e.exports,i.is=function(e){return e instanceof i},i.fromNode=i.fromCallback=function(e){var t=new i(k);t._captureStackTrace();var a=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=A(e)(q(t,a));return r===C&&t._rejectCallback(r.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},i.all=function(e){return new _(e).promise()},i.cast=function(e){var t=j(e);return t instanceof i||(t=new i(k),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(e){var t=new i(k);return t._captureStackTrace(),t._rejectCallback(e,!0),t},i.setScheduler=function(e){if("function"!=typeof e)throw new y("expecting a function but got "+m.classString(e));return g.setScheduler(e)},i.prototype._then=function(e,t,a,r,n){var o=void 0!==n,s=o?n:new i(k),u=this._target(),p=u._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&p)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var l=c();if(0!=(50397184&p)){var h,f,d=u._settlePromiseCtx;0!=(33554432&p)?(f=u._rejectionHandler0,h=e):0!=(16777216&p)?(f=u._fulfillmentHandler0,h=t,u._unsetRejectionIsUnhandled()):(d=u._settlePromiseLateCancellationObserver,f=new b("late cancellation observer"),u._attachExtraTrace(f),h=t),g.invoke(d,u,{handler:null===l?h:"function"==typeof h&&m.domainBind(l,h),promise:s,receiver:r,value:f})}else u._addCallbacks(e,t,s,r,l);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},i.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){g.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==h)return void 0===t&&this._isBound()?this._boundValue():t},i.prototype._promiseAt=function(e){return this[4*e-4+2]},i.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},i.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),a=e._rejectionHandler0,r=e._promise0,i=e._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(t,a,r,i,null)},i.prototype._migrateCallbackAt=function(e,t){var a=e._fulfillmentHandlerAt(t),r=e._rejectionHandlerAt(t),i=e._promiseAt(t),n=e._receiverAt(t);void 0===n&&(n=h),this._addCallbacks(a,r,i,n,null)},i.prototype._addCallbacks=function(e,t,a,r,i){var n=this._length();if(n>=65531&&(n=0,this._setLength(0)),0===n)this._promise0=a,this._receiver0=r,"function"==typeof e&&(this._fulfillmentHandler0=null===i?e:m.domainBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:m.domainBind(i,t));else{var o=4*n-4;this[o+2]=a,this[o+3]=r,"function"==typeof e&&(this[o+0]=null===i?e:m.domainBind(i,e)),"function"==typeof t&&(this[o+1]=null===i?t:m.domainBind(i,t))}return this._setLength(n+1),n},i.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},i.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(u(),!1);var a=j(e,this);if(!(a instanceof i))return this._fulfill(e);t&&this._propagateFrom(a,2);var r=a._target();if(r===this)return void this._reject(u());var n=r._bitField;if(0==(50397184&n)){var o=this._length();o>0&&r._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var a=u();return this._attachExtraTrace(a),this._reject(a)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():g.settlePromises(this))}},i.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return g.fatalError(e,m.isNode);(65535&t)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled()}},i.prototype._fulfillPromises=function(e,t){for(var a=1;a0){if(0!=(16842752&e)){var a=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,a,e),this._rejectPromises(t,a)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,e),this._fulfillPromises(t,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){return F.deprecated("Promise.defer","new Promise"),{promise:new i(k),resolve:n,reject:o}},m.notEnumerableProp(i,"_makeSelfResolutionError",u),a(113)(i,k,j,l,F),a(114)(i,k,j,F),a(115)(i,_,l,F),a(116)(i),a(117)(i),a(118)(i,_,j,k,g,c),i.Promise=i,i.version="3.5.0",a(119)(i,_,l,j,k,F),a(120)(i),a(121)(i,l,j,S,k,F),a(122)(i,k,F),a(123)(i,l,k,j,t,F),a(124)(i),a(125)(i,k),a(126)(i,_,j,l),a(127)(i,k,j,l),a(128)(i,_,l,j,k,F),a(129)(i,_,F),a(130)(i,_,l),a(131)(i,k),a(132)(i,k),a(133)(i),m.toFastProperties(i),m.toFastProperties(i.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new i(k)),F.setBounds(d.firstLineError,m.lastLineError),i}},function(e,t,a){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new u(16),this._normalQueue=new u(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=c}function i(e,t,a){this._lateQueue.push(e,t,a),this._queueTick()}function n(e,t,a){this._normalQueue.push(e,t,a),this._queueTick()}function o(e){this._normalQueue._pushOne(e),this._queueTick()}var s;try{throw new Error}catch(e){s=e}var c=a(106),u=a(107),p=a(1);r.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){p.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},r.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout(function(){e(t)},0);else try{this._schedule(function(){e(t)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},p.hasDevTools?(r.prototype.invokeLater=function(e,t,a){this._trampolineEnabled?i.call(this,e,t,a):this._schedule(function(){setTimeout(function(){e.call(t,a)},100)})},r.prototype.invoke=function(e,t,a){this._trampolineEnabled?n.call(this,e,t,a):this._schedule(function(){e.call(t,a)})},r.prototype.settlePromises=function(e){this._trampolineEnabled?o.call(this,e):this._schedule(function(){e._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=n,r.prototype.settlePromises=o),r.prototype._drainQueue=function(e){for(;e.length()>0;){var t=e.shift();if("function"==typeof t){var a=e.shift(),r=e.shift();t.call(a,r)}else t._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=s},function(e,t,a){"use strict";var r,i=a(1),n=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},o=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var s=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(e){s.call(global,e)}:function(e){c.call(process,e)}}else if("function"==typeof o&&"function"==typeof o.resolve){var u=o.resolve();r=function(e){u.then(e)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(e){setImmediate(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:n:function(){var e=document.createElement("div"),t={attributes:!0},a=!1,r=document.createElement("div");new MutationObserver(function(){e.classList.toggle("foo"),a=!1}).observe(r,t);var i=function(){a||(a=!0,r.classList.toggle("foo"))};return function(a){var r=new MutationObserver(function(){r.disconnect(),a()});r.observe(e,t),i()}}();e.exports=r},function(e,t,a){"use strict";function r(e,t,a,r,i){for(var n=0;n=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var a=0;a=0)return n[e]}var i=!1,n=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=n.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=a,t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var a=e.prototype._pushContext,n=e.prototype._popContext,o=e._peekContext,s=e.prototype._peekContext,c=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=a,e.prototype._popContext=n,e._peekContext=o,e.prototype._peekContext=s,e.prototype._promiseCreated=c,i=!1},i=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=r,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},function(e,t,a){"use strict";e.exports=function(e,t){function r(e,t){return{promise:t}}function i(){return!1}function n(e,t,a){var r=this;try{e(t,a,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+R.toString(e));r._attachCancellationCallback(e)})}catch(e){return e}}function o(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?R.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function s(){return this._onCancelField}function c(e){this._onCancelField=e}function u(){this._cancellationParent=void 0,this._onCancelField=void 0}function p(e,t){if(0!=(1&t)){this._cancellationParent=e;var a=e._branchesRemainingToCancel;void 0===a&&(a=0),e._branchesRemainingToCancel=a+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function l(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function m(){this._trace=new C(this._peekContext())}function f(e,t){if(H(e)){var a=this._trace;if(void 0!==a&&t&&(a=a._parent),void 0!==a)a.attachExtraTrace(e);else if(!e.__stackCleaned__){var r=j(e);R.notEnumerableProp(e,"stack",r.message+"\n"+r.stack.join("\n")),R.notEnumerableProp(e,"__stackCleaned__",!0)}}}function d(e,t,a,r,i){if(void 0===e&&null!==t&&W){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;a&&(a+=" ");var n="",o="";if(t._trace){for(var s=t._trace.stack.split("\n"),c=x(s),u=c.length-1;u>=0;--u){var p=c[u];if(!N.test(p)){var l=p.match(U);l&&(n="at "+l[1]+":"+l[2]+":"+l[3]+" ");break}}if(c.length>0)for(var h=c[0],u=0;u0&&(o="\n"+s[u-1]);break}}var m="a promise was created in a "+a+"handler "+n+"but was not returned from it, see http://goo.gl/rRqMUw"+o;r._warn(m,!0,t)}}function g(e,t){var a=e+" is deprecated and will be removed in a future version.";return t&&(a+=" Use "+t+" instead."),v(a)}function v(t,a,r){if(ne.warnings){var i,n=new D(t);if(a)r._attachExtraTrace(n);else if(ne.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(n);else{var o=j(n);n.stack=o.message+"\n"+o.stack.join("\n")}ee("warning",n)||_(n,"",!0)}}function y(e,t){for(var a=0;a=0;--s)if(r[s]===n){o=s;break}for(var s=o;s>=0;--s){var c=r[s];if(t[i]!==c)break;t.pop(),i--}t=r}}function x(e){for(var t=[],a=0;a0&&"SyntaxError"!=e.name&&(t=t.slice(a)),t}function j(e){var t=e.stack,a=e.toString();return t="string"==typeof t&&t.length>0?w(e):[" (No stack trace)"],{message:a,stack:"SyntaxError"==e.name?t:x(t)}}function _(e,t,a){if("undefined"!=typeof console){var r;if(R.isObject(e)){var i=e.stack;r=t+$(i,e)}else r=t+String(e);"function"==typeof B?B(r,a):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function E(e,t,a,r){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(r):t(a,r))}catch(e){I.throwLater(e)}"unhandledRejection"===e?ee(e,a,r)||i||_(a,"Unhandled rejection "):ee(e,r)}function S(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():R.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+F(t)+">, no stack trace)"}function F(e){return e.length<41?e:e.substr(0,38)+"..."}function P(){return"function"==typeof ie}function z(e){var t=e.match(re);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function q(e,t){if(P()){for(var a,r,i=e.stack.split("\n"),n=t.stack.split("\n"),o=-1,s=-1,c=0;c=s||(ae=function(e){if(L.test(e))return!0;var t=z(e);return!!(t&&t.fileName===a&&o<=t.line&&t.line<=s)})}}function C(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ie(this,C),t>32&&this.uncycle()}var A,O,B,T=e._getDomain,I=e._async,D=a(11).Warning,R=a(1),H=R.canAttachTrace,L=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,N=/\((?:timers\.js):\d+:\d+\)/,U=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,M=null,$=null,V=!1,K=!(0==R.env("BLUEBIRD_DEBUG")||!R.env("BLUEBIRD_DEBUG")&&"development"!==R.env("NODE_ENV")),Q=!(0==R.env("BLUEBIRD_WARNINGS")||!K&&!R.env("BLUEBIRD_WARNINGS")),G=!(0==R.env("BLUEBIRD_LONG_STACK_TRACES")||!K&&!R.env("BLUEBIRD_LONG_STACK_TRACES")),W=0!=R.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(Q||!!R.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),I.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){E("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),E("unhandledRejection",O,e,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(e,t,a){return v(e,t,a||this)},e.onPossiblyUnhandledRejection=function(e){var t=T();O="function"==typeof e?null===t?e:R.domainBind(t,e):void 0},e.onUnhandledRejectionHandled=function(e){var t=T();A="function"==typeof e?null===t?e:R.domainBind(t,e):void 0};var J=function(){};e.longStackTraces=function(){if(I.haveItemsQueued()&&!ne.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ne.longStackTraces&&P()){var a=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ne.longStackTraces=!0,J=function(){if(I.haveItemsQueued()&&!ne.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=a,e.prototype._attachExtraTrace=r,t.deactivateLongStackTraces(),I.enableTrampoline(),ne.longStackTraces=!1},e.prototype._captureStackTrace=m,e.prototype._attachExtraTrace=f,t.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ne.longStackTraces&&P()};var Y=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return R.global.dispatchEvent(e),function(e,t){var a=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!R.global.dispatchEvent(a)}}if("function"==typeof Event){var e=new Event("CustomEvent");return R.global.dispatchEvent(e),function(e,t){var a=new Event(e.toLowerCase(),{cancelable:!0});return a.detail=t,!R.global.dispatchEvent(a)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),R.global.dispatchEvent(e),function(e,t){var a=document.createEvent("CustomEvent");return a.initCustomEvent(e.toLowerCase(),!1,!0,t),!R.global.dispatchEvent(a)}}catch(e){}return function(){return!1}}(),X=function(){return R.isNode?function(){return process.emit.apply(process,arguments)}:R.global?function(e){var t="on"+e.toLowerCase(),a=R.global[t];return!!a&&(a.apply(R.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(e,t,a){return{promise:t,child:a}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,a){return{reason:t,promise:a}},rejectionHandled:r},ee=function(e){var t=!1;try{t=X.apply(null,arguments)}catch(e){I.throwLater(e),t=!0}var a=!1;try{a=Y(e,Z[e].apply(null,arguments))}catch(e){I.throwLater(e),a=!0}return a||t};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&J()),"warnings"in t){var a=t.warnings;ne.warnings=!!a,W=ne.warnings,R.isObject(a)&&"wForgottenReturn"in a&&(W=!!a.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ne.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=u,e.prototype._propagateFrom=p,e.prototype._onCancel=s,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=o,e.prototype._execute=n,te=p,ne.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ne.monitoring?(ne.monitoring=!0,e.prototype._fireEvent=ee):!t.monitoring&&ne.monitoring&&(ne.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(e,t,a){try{e(t,a)}catch(e){return e}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(e){},e.prototype._attachCancellationCallback=function(e){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(e,t){};var te=l,ae=function(){return!1},re=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;R.inherits(C,Error),t.CapturedTrace=C,C.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],a={},r=0,i=this;void 0!==i;++r)t.push(i),i=i._parent;e=this._length=r;for(var r=e-1;r>=0;--r){var n=t[r].stack;void 0===a[n]&&(a[n]=r)}for(var r=0;r0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[r]._parent=void 0,t[r]._length=1;var c=r>0?t[r-1]:this;s=0;--p)t[p]._length=u,u++;return}}}},C.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=j(e),a=t.message,r=[t.stack],i=this;void 0!==i;)r.push(x(i.stack.split("\n"))),i=i._parent;k(r),b(r),R.notEnumerableProp(e,"stack",y(a,r)),R.notEnumerableProp(e,"__stackCleaned__",!0)}};var ie=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():S(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,M=e,$=t;var a=Error.captureStackTrace;return ae=function(e){return L.test(e)},function(e,t){Error.stackTraceLimit+=6,a(e,t),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return M=/@/,$=t,V=!0,function(e){e.stack=(new Error).stack};var i;try{throw new Error}catch(e){i="stack"in e}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?($=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?S(t):t.toString()},null):(M=e,$=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(B=function(e){console.warn(e)},R.isNode&&process.stderr.isTTY?B=function(e,t){var a=t?"":"";console.warn(a+e+"\n")}:R.isNode||"string"!=typeof(new Error).stack||(B=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ne={warnings:Q,longStackTraces:!1,cancellation:!1,monitoring:!1};return G&&e.longStackTraces(),{longStackTraces:function(){return ne.longStackTraces},warnings:function(){return ne.warnings},cancellation:function(){return ne.cancellation},monitoring:function(){return ne.monitoring},propagateFromFunction:function(){return te},boundValueFunction:function(){return h},checkForgottenReturns:d,setBounds:q,warn:v,deprecated:g,CapturedTrace:C,fireDomEvent:Y,fireGlobalEvent:X}}},function(e,t,a){"use strict";e.exports=function(e,t,r){function i(e,t,a){this.promise=e,this.type=t,this.handler=a,this.called=!1,this.cancelPromise=null}function n(e){this.finallyHandler=e}function o(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function s(){return u.call(this,this.promise._target()._settledValue())}function c(e){if(!o(this,e))return h.e=e,h}function u(a){var i=this.promise,u=this.handler;if(!this.called){this.called=!0;var p=this.isFinallyHandler()?u.call(i._boundValue()):u.call(i._boundValue(),a);if(p===r)return p;if(void 0!==p){i._setReturnedNonUndefined();var m=t(p,i);if(m instanceof e){if(null!=this.cancelPromise){if(m._isCancelled()){var f=new l("late cancellation observer");return i._attachExtraTrace(f),h.e=f,h}m.isPending()&&m._attachCancellationCallback(new n(this))}return m._then(s,c,void 0,this,void 0)}}}return i.isRejected()?(o(this),h.e=a,h):(o(this),a)}var p=a(1),l=e.CancellationError,h=p.errorObj,m=a(49)(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},n.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(e,t,a,r){return"function"!=typeof e?this.then():this._then(a,r,void 0,new i(this,t,e),void 0)},e.prototype.lastly=e.prototype.finally=function(e){return this._passThrough(e,0,u,u)},e.prototype.tap=function(e){return this._passThrough(e,1,u)},e.prototype.tapCatch=function(t){var a=arguments.length;if(1===a)return this._passThrough(t,1,void 0,u);var r,i=new Array(a-1),n=0;for(r=0;r1){n.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],p=arguments[2];c=o.isArray(u)?s(a).apply(p,u):s(a).call(p,u)}else c=s(a)();var l=r._popContext();return n.checkForgottenReturns(c,l,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(e){e===o.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},function(e,t,a){"use strict";e.exports=function(e,t,a,r){var i=!1,n=function(e,t){this._reject(t)},o=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(n,n,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},c=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(n){i||(i=!0,e.prototype._propagateFrom=r.propagateFromFunction(),e.prototype._boundValue=r.boundValueFunction());var u=a(n),p=new e(t);p._propagateFrom(this,1);var l=this._target();if(p._setBoundTo(u),u instanceof e){var h={promiseRejectionQueued:!1,promise:p,target:l,bindingPromise:u};l._then(t,o,void 0,p,h),u._then(s,c,void 0,p,h),p._setOnCancel(u)}else p._resolveCallback(l);return p},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,a){return e.resolve(a).bind(t)}}},function(e,t,a){"use strict";e.exports=function(e,t,r,i){var n=a(1),o=n.tryCatch,s=n.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var a=e._cancellationParent;if(null==a||!a._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=a}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(e,t){if(n.isArray(e))for(var a=0;a0&&"function"==typeof arguments[n]&&(a=arguments[n],n<=8&&u)){var p=new e(i);p._captureStackTrace();for(var l=h[n-1],d=new l(a),g=m,v=0;v=1?o:0,new s(t,a,o,n).promise()}var u=e._getDomain,p=a(1),l=p.tryCatch,h=p.errorObj,m=e._async;p.inherits(s,t),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,a){var r=this._values,n=this.length(),s=this._preservedValues,c=this._limit;if(a<0){if(a=-1*a-1,r[a]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[a]=t,this._queue.push(a),!1;null!==s&&(s[a]=t);var u=this._promise,p=this._callback,m=u._boundValue();u._pushContext();var f=l(p).call(m,t,a,n),d=u._popContext();if(o.checkForgottenReturns(f,d,null!==s?"Promise.filter":"Promise.map",u),f===h)return this._reject(f.e),!0;var g=i(f,this._promise);if(g instanceof e){g=g._target();var v=g._bitField;if(0==(50397184&v))return c>=1&&this._inFlight++,r[a]=g,g._proxy(this,-1*(a+1)),!1;if(0==(33554432&v))return 0!=(16777216&v)?(this._reject(g._reason()),!0):(this._cancel(),!0);f=g._value()}r[a]=f}return++this._totalResolved>=n&&(null!==s?this._filter(r,s):this._resolve(r),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,a=this._values;e.length>0&&this._inFlight512){for(var i=Object.keys(a),n=0;n<256;++n)delete a[i[n]];a[" size"]=i.length-256}}return r};c=function(e){return d(e,m,i)},u=function(e){return d(e,f,n)},e.prototype.call=function(e){for(var t=arguments.length,a=new Array(Math.max(t-1,0)),i=1;i=u)return p._fulfill();var n=c(t[o++]);if(n instanceof e&&n._isDisposable()){try{n=r(n._getDisposer().tryDispose(a),t.promise)}catch(e){return s(e)}if(n instanceof e)return n._then(i,s,null,null,null)}i()}var o=0,u=t.length,p=new e(n);return i(),p}function p(e,t,a){this._data=e,this._promise=t,this._context=a}function l(e,t,a){this.constructor$(e,t,a)}function h(e){return p.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function m(e){this.length=e,this.promise=null,this[e-1]=null}var f=a(1),d=a(11).TypeError,g=a(1).inherits,v=f.errorObj,y=f.tryCatch,b={};p.prototype.data=function(){return this._data},p.prototype.promise=function(){return this._promise},p.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():b},p.prototype.tryDispose=function(e){var t=this.resource(),a=this._context;void 0!==a&&a._pushContext();var r=t!==b?this.doDispose(t,e):null;return void 0!==a&&a._popContext(),this._promise._unsetDisposable(),this._data=null,r},p.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},g(l,p),l.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},m.prototype._resultCancelled=function(){for(var t=this.length,a=0;a0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(e){if("function"==typeof e)return new l(e,this,i());throw new d}}},function(e,t,a){"use strict";e.exports=function(e,t,r){function i(e){this.handle=e}function n(e){return clearTimeout(this.handle),e}function o(e){throw clearTimeout(this.handle),e}var s=a(1),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var u=function(e){return p(+this).thenReturn(e)},p=e.delay=function(a,n){var o,s;return void 0!==n?(o=e.resolve(n)._then(u,null,null,a,void 0),r.cancellation()&&n instanceof e&&o._setOnCancel(n)):(o=new e(t),s=setTimeout(function(){o._fulfill()},+a),r.cancellation()&&o._setOnCancel(new i(s)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};e.prototype.delay=function(e){return p(e,this)};var l=function(e,t,a){var r;r="string"!=typeof t?t instanceof Error?t:new c("operation timed out"):new c(t),s.markAsOriginatingFromRejection(r),e._attachExtraTrace(r),e._reject(r),null!=a&&a.cancel()};e.prototype.timeout=function(e,t){e=+e;var a,s,c=new i(setTimeout(function(){a.isPending()&&l(a,t,s)},e));return r.cancellation()?(s=this.then(),a=s._then(n,o,void 0,c,void 0),a._setOnCancel(c)):a=this._then(n,o,void 0,c,void 0),a}}},function(e,t,a){"use strict";e.exports=function(e,t,r,i,n,o){function s(t,a,r){for(var n=0;n=a;--r)t.push(r);for(var r=e+1;r<=3;++r)t.push(r);return t},E=function(e){return m.filledRange(e,"_arg","")},S=function(e){return m.filledRange(Math.max(e,3),"_arg","")},F=function(e){return"number"==typeof e.length?Math.max(Math.min(e.length,1024),0):0};l=function(a,r,i,n,o,s){function c(e){var t,a=E(e).join(", "),i=e>0?", ":"";return t=l?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===r?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n",t.replace("{{args}}",a).replace(", ",i)}var u=Math.max(0,F(n)-1),p=_(u),l="string"==typeof a||r===h,v="string"==typeof a?"this != null ? this['"+a+"'] : fn":"fn",y="'use strict'; \n var ret = function (Parameters) { \n 'use strict'; \n var len = arguments.length; \n var promise = new Promise(INTERNAL); \n promise._captureStackTrace(); \n var nodeback = nodebackForPromise(promise, "+s+"); \n var ret; \n var callback = tryCatch([GetFunctionCode]); \n switch(len) { \n [CodeForSwitchCase] \n } \n if (ret === errorObj) { \n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n } \n if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n return promise; \n }; \n notEnumerableProp(ret, '__isPromisified__', true); \n return ret; \n ".replace("[CodeForSwitchCase]",function(){for(var e="",t=0;t=this._length){var a;if(this._isMap)a=h(this._values);else{a={};for(var r=this.length(),i=0,n=this.length();i>1},e.prototype.props=function(){return o(this)},e.props=function(e){return o(e)}}},function(e,t,a){"use strict";e.exports=function(e,t,r,i){function n(a,n){var c=r(a);if(c instanceof e)return s(c);if(null===(a=o.asArray(a)))return i("expecting an array or an iterable object but got "+o.classString(a));var u=new e(t);void 0!==n&&u._propagateFrom(n,3);for(var p=u._fulfill,l=u._reject,h=0,m=a.length;h=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(e,t){var a=new n;return a._bitField=33554432,a._settledValueField=e,this._promiseResolved(t,a)},i.prototype._promiseRejected=function(e,t){var a=new n;return a._bitField=16777216,a._settledValueField=e,this._promiseResolved(t,a)},e.settle=function(e){return r.deprecated(".settle()",".reflect()"),new i(e).promise()},e.prototype.settle=function(){return e.settle(this)}}},function(e,t,a){"use strict";e.exports=function(e,t,r){function i(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function n(e,t){if((0|t)!==t||t<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var a=new i(e),n=a.promise();return a.setHowMany(t),a.init(),n}var o=a(1),s=a(11).RangeError,c=a(11).AggregateError,u=o.isArray,p={};o.inherits(i,t),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=u(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(e){this._howMany=e},i.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(p),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new c,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(e){this._values.push(e)},i.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new s(t)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(e,t){return n(e,t)},e.prototype.some=function(e){return n(this,e)},e._SomePromiseArray=i}},function(e,t,a){"use strict";e.exports=function(e,t){var a=e.map;e.prototype.filter=function(e,r){return a(this,e,r,t)},e.filter=function(e,r,i){return a(e,r,i,t)}}},function(e,t,a){"use strict";e.exports=function(e,t){function a(){return n(this)}function r(e,a){return i(e,a,t,t)}var i=e.reduce,n=e.all;e.prototype.each=function(e){return i(this,e,t,0)._then(a,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return i(this,e,t,t)},e.each=function(e,r){return i(e,r,t,0)._then(a,void 0,void 0,e,void 0)},e.mapSeries=r}},function(e,t,a){"use strict";e.exports=function(e){function t(e){var t=new a(e),r=t.promise();return t.setHowMany(1),t.setUnwrap(),t.init(),r}var a=e._SomePromiseArray;e.any=function(e){return t(e)},e.prototype.any=function(){return t(this)}}},function(e,t,a){"use strict";var r=a(135),i=a(54),n=a(51),o=a(36);e.exports=function(e){var t="Please verify options";if(!o(e))throw new TypeError(t);if(!n(e.request))throw new TypeError(t+".request");if(!i(e.expose)||0===e.expose.length)throw new TypeError(t+".expose");var a=r({PromiseImpl:e.PromiseImpl,constructorMixin:e.constructorMixin}),s=e.request.Request.prototype.init;e.request.Request.prototype.init=function(e){return!o(e)||this._callback||this._rp_promise||a.init.call(this,e),s.apply(this,arguments)};for(var c=!1,u=0;u " + JSON.stringify(result)); + return result; + }; + } + }; + return new Proxy(obj, handler); + } + return traceMethodCalls(this); } getHeaderCredentials(path, params) {