"use strict";function isObject(e){return e===Object(e)}function makeStackTraceLong(e,t){if(hasStacks&&t.stack&&"object"==typeof e&&null!==e&&e.stack&&-1===e.stack.indexOf(STACK_JUMP_SEPARATOR)){for(var r=[],n=t;n&&handlers.get(n);n=handlers.get(n).became)n.stack&&r.unshift(n.stack);r.unshift(e.stack);var o=r.join("\n"+STACK_JUMP_SEPARATOR+"\n");e.stack=filterStackString(o)}}function filterStackString(e){if(Q.isIntrospective)return e;for(var t=e.split("\n"),r=[],n=0;n=qStartingLine&&qEndingLine>=n}function captureLine(){if(hasStacks)try{throw new Error}catch(e){var t=e.stack.split("\n"),r=t[0].indexOf("@")>0?t[1]:t[2],n=getFileNameAndLineNumber(r);if(!n)return;return qFileName=n[0],n[1]}}function deprecate(e,t,r){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&(r?console.warn(t+" is deprecated, use "+r+" instead.",new Error("").stack):console.warn(t+" is deprecated.",new Error("").stack)),e.apply(this,arguments)}}function Q_getHandler(e){var t=handlers.get(e);return t&&t.became?(t=follow(t),handlers.set(e,t),t):t}function follow(e){return e.became?(e.became=follow(e.became),e.became):e}function Q(e){return Q_isPromise(e)?e:isThenable(e)?(thenables.has(e)||thenables.set(e,new Promise(new Thenable(e))),thenables.get(e)):new Promise(new Fulfilled(e))}function Q_reject(e){return new Promise(new Rejected(e))}function defer(){var e=new Pending,t=new Promise(e),r=new Deferred(t);if(Q.longStackSupport&&hasStacks)try{throw new Error}catch(n){t.stack=n.stack.substring(n.stack.indexOf("\n")+1)}return r}function Q_all(e){function t(){a=-1/0;for(var e=0;ea&&(a=s[e])}if(Q_isPromise(e))return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("Q.all no longer directly unwraps a promise. Use Q(array).all()"),Q(e).all();var r,n=0,o=defer(),i=Array(e.length),s=[],a=-1/0;return Array.prototype.forEach.call(e,function(c,l){var p;Q_isPromise(c)&&"fulfilled"===(p=Q_getHandler(c)).state?i[l]=p.value:(++n,c=Q(c),c.then(function(e){i[l]=e,0===--n&&o.resolve(i)},o.reject),c.observeEstimate(function(n){var i=s[l];s[l]=n,n>a?a=n:i===a&&a>=n&&t(),s.length===e.length&&a!==r&&(o.setEstimate(a),r=a)}))}),0===n&&o.resolve(i),o.promise}function Q_allSettled(e){return Q_isPromise(e)?("undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("Q.allSettled no longer directly unwraps a promise. Use Q(array).allSettled()"),Q(e).allSettled()):Q_all(e.map(function(e){function t(){return e.inspect()}return e=Q(e),e.then(t,t)}))}function Q_spread(e,t,r){return Q(e).spread(t,r)}function Q_race(e){return new Promise(function(t){e.forEach(function(e){Q(e).then(t.resolve,t.reject)})})}function Promise_function(e){return function(){for(var t=new Array(arguments.length),r=0;re&&e!==-1/0)throw new Error("Estimate values should be a number of miliseconds in the future");var t=Q_getHandler(promises.get(this));t.setEstimate&&t.setEstimate(e)},Fulfilled.prototype.state="fulfilled",Fulfilled.prototype.inspect=function(){return{state:"fulfilled",value:this.value}},Fulfilled.prototype.dispatch=function(e,t,r){var n;if("then"===t||"get"===t||"call"===t||"invoke"===t||"keys"===t||"iterate"===t||"pull"===t)try{n=this[t].apply(this,r)}catch(o){n=Q_reject(o)}else if("estimate"===t)r[0].call(void 0,this.estimate);else{var i=new Error("Fulfilled promises do not support the "+t+" operator");n=Q_reject(i)}e&&e(n)},Fulfilled.prototype.then=function(){return this.value},Fulfilled.prototype.get=function(e){return this.value[e]},Fulfilled.prototype.call=function(e,t){return this.callInvoke(this.value,e,t)},Fulfilled.prototype.invoke=function(e,t){return this.callInvoke(this.value[e],t,this.value)},Fulfilled.prototype.callInvoke=function(e,t,r){for(var n,o=0;o