Socket
Socket
Sign inDemoInstall

futoin-asyncsteps

Package Overview
Dependencies
1
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.3 to 2.5.0

10

AsyncSteps.js

@@ -566,2 +566,3 @@ "use strict";

* Execute AsyncSteps with Promise interface
* @alias AsyncSteps#promise
* @returns {Promise} - promise wrapper for AsyncSteps

@@ -598,2 +599,11 @@ */

/**
* Create a new instance of AsyncSteps for independent execution
* @alias AsyncSteps#newInstance
* @returns {AsyncSteps} new instance
*/
newInstance() {
return new AsyncSteps( null, this._async_tool );
}
/**
* Not standard API for assertion with multiple instances of the module.

@@ -600,0 +610,0 @@ * @private

1

CHANGELOG.txt
=== (next)
CHANGED: deps maintenance
NEW: FTN12 v1.13 #newInstance() support

@@ -4,0 +5,0 @@ === 2.4.2 (2019-09-27) ===

2

dist/futoin-asyncsteps-lite.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["futoin-asyncsteps"]=t():e.$as=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};["ConnectError","CommError","UnknownInterface","NotSupportedVersion","NotImplemented","Unauthorized","InternalError","InvokerError","InvalidRequest","DefenseRejected","PleaseReauth","SecurityError","Timeout","LoopBreak","LoopCont"].forEach((function(e){return Object.defineProperty(r,e,{enumerable:!0,value:e})})),e.exports=r},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var u,c=e[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var o=n(0),u=(o.InternalError,o.LoopCont),c=o.LoopBreak,s="undefined"==typeof Symbol?function(e){return e}:function(e){return Symbol(e)},a=s("_loop_term_label"),l=function(e,t,n,r,i){i&&i()||e.add((function(e){var o=e.state,s=t._exec_stack,l=s.length,h=[n,function(t,n){!function(e,t,n,r,i){if(t===u){var o=r[a];o&&o!==i||(r.last_exception=null,e._root._handle_success())}else if(t===c){var s=r[a];s&&s!==i||(r.last_exception=null,n._queue.length=0,e._root._handle_success())}}(t,n,e,o,r)}],f=[function(e){i&&i()||(s.length=l,_())},null],_=function(){e._queue=[h,f]};_()}))},h=function(e,t,n,r,i){var o=0,u=n;l(e,t,(function(e){r(e,o++)}),i,(function(){return o>=u}))},f=[];Object.freeze(f);var _=function(){};e.exports=t={noop:_,makeSym:s,loop:l,repeat:h,forEach:function(e,t,n,r,o){if(Array.isArray(n)){var u=n;h(e,t,u.length,(function(e,t){r(e,t,u[t])}),o)}else if("undefined"!=typeof Map&&n instanceof Map){var c=n.entries();l(e,t,(function(e){var t=c.next();t.done&&e.break();var n=i(t.value,2),o=n[0],u=n[1];r(e,o,u)}),o)}else{var s=n,a=Object.keys(s);h(e,t,a.length,(function(e,t){r(e,a[t],s[a[t]])}),o)}},LOOP_TERM_LABEL:a,as_await:function(e,t,n,r){var i,o;n.then((function(e){i?i.state&&t._burst_success([e]):o=function(){t._handle_success([e])}}),(function(e){i?function(e,t,n){var r=e.state;if(r){if(e._on_cancel=null,n instanceof Error)r.last_exception=n,r.error_info=void 0,t._handle_error("PromiseReject");else{var i=n||"PromiseReject";r.last_exception=new Error(i),r.error_info=void 0,t._handle_error(i)}}}(i,t,e):(i=null,o=e instanceof Error?function(){throw e}:function(t){t.error(e||"PromiseReject")})})),e.add((function(e){o?o(e):(i=e,e._on_cancel=function(){if(i){i=null;try{n.cancel()}catch(e){}}})}),r)},EMPTY_ARRAY:f,prev_queue:function(e){var t=e._stack,n=t.length;return n>1?t[n-2]._queue:e._queue}},t.isProduction=!0,t.checkFunc=_,t.checkOnError=_;var v=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"push",value:function(){}},{key:"length",get:function(){return 0},set:function(e){}}])&&r(t.prototype,n),i&&r(t,i),e}());Object.freeze(v),t.newExecStack=function(){return v}},function(e,t,n){"use strict";if(t=e.exports={},"undefined"==typeof setImmediate){t.callLater=function(e,t){return setTimeout(e,t)},t.cancelCall=function(e){return clearTimeout(e)},window._FutoInEventLoopQueue=window._FutoInEventLoopQueue||[];var r=window._FutoInEventLoopQueue,i=window.performance,o=null,u=function(){o&&clearTimeout(o),o=setTimeout(c,0)},c=function(){o=null;for(var e=i.now()+10;r.length;){var t=r.shift();try{t()}catch(e){throw u(),e}if(i.now()>=e){u();break}}};t.callImmediate=function(e){r.length||u();var t=function(){e()};return r.push(t),t},t.cancelImmediate=function(e){var t=r.indexOf(e);t>=0&&r.splice(t,1)}}else t.callLater=function(e,t){return setTimeout(e,t)},t.cancelCall=function(e){clearTimeout(e)},t.callImmediate=function(e){return setImmediate(e)},t.cancelImmediate=function(e){clearImmediate(e)}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(1),o=i.checkFunc,u=i.checkOnError,c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._root=t,this._as=n,this._queue=[],this._psteps=[],this._complete_count=0}var t,n,i;return t=e,(n=[{key:"add",value:function(e,t){return o(this,e),u(this,t),this._queue.push([e,t]),this}},{key:"_complete",value:function(){this._complete_count+=1,this._complete_count===this._psteps.length&&(this._as._root._handle_success(),this._cleanup())}},{key:"_error",value:function(e,t){try{this._as.error(e,t)}catch(e){}}},{key:"executeParallel",value:function(t){var n=this,r=this._queue,i=this._root;if(i!==t._root){var o=new e(t._root,t);return o._queue.push.apply(o._queue,r),void o.executeParallel(t)}if(this._as=t,r.length){t._on_cancel=function(){n.cancel()};var u=this._psteps,c=function(e){n._complete()},s=function(e,t){n._error(t,e.state.error_info)},a=i.constructor;r.forEach((function(e){var n=new a(t.state,i._async_tool);n._queue.push([function(t){t._queue=[[e[0],e[1]]]},s],[c,void 0]),u.push(n)})),u.forEach((function(e){e.execute()}))}else this._complete()}},{key:"cancel",value:function(){this._psteps.forEach((function(e){e.cancel()})),this._cleanup()}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this._as=null,this._psteps=null}}])&&r(t.prototype,n),i&&r(t,i),e}();e.exports=c},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(2),u=n(0).InternalError,c=n(9),s=n(3),a=n(1),l=a.isProduction,h=a.checkFunc,f=a.checkOnError,_=a.noop,v=a.loop,p=a.repeat,y=a.forEach,d=a.as_await,m=a.EMPTY_ARRAY,x=a.newExecStack,k=l?_:function(e){e._stack.length>0&&e.error(u,"Top level add in execution")},g=l?_:function(e,t,n){k(e),h(e,t),f(e,n)},w=100,b=w,E=null,q=function(e){e._post_exec=_,e._execute()},A=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null===n&&(n=function(){return this.state}),this.state=n,this._queue=[],this._stack=[],this._exec_stack=x(),this._in_exec=!1,this._post_exec=_,this._exec_event=null,this._next_args=m,this._async_tool=r;var i=r.callImmediate,u=function(){b=w,E=t,t._exec_event=null,t._execute()};this._scheduleExecute=function(){--b<=0||!t._in_exec||E!==t?t._exec_event=i(u):t._in_exec&&(t._post_exec=q)}}var t,n,a;return t=e,(n=[{key:"add",value:function(e,t){return g(this,e,t),this._queue.push([e,t]),this}},{key:"parallel",value:function(e){k(this),f(this,e);var t=new s(this,this);return this._queue.push([function(e){t.executeParallel(e)},e]),t}},{key:"sync",value:function(e,t,n){return g(this,t,n),e.sync(this,t,n),this}},{key:"error",value:function(e,t){this.state.error_info=t;var n=new Error(e);throw this._in_exec||(this.state.last_exception=n,this._handle_error(e)),n}},{key:"copyFrom",value:function(e){this._queue.push.apply(this._queue,e._queue);var t=e.state,n=this.state;for(var r in t)r in n||(n[r]=t[r]);return this}},{key:"_handle_success",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=this._stack;t.length||this.error(u,"Invalid success completion"),this._next_args=e;for(var n=t[t.length-1];;){var r=n._limit_event;if(r&&(this._async_tool.cancelCall(r),n._limit_event=null),n._cleanup(),t.pop(),!t.length)break;if((n=t[t.length-1])._queue.length)break}(t.length||this._queue.length)&&this._scheduleExecute()}},{key:"_handle_error",value:function(e){if(this._exec_event)this.cancel();else{this._next_args=m;var t=this._stack,n=this._exec_stack;this.state.async_stack=n;for(var r=this._in_exec,i=!0;t.length;){var o=t[t.length-1],u=o._limit_event,c=o._on_cancel,s=o._on_error;if(u&&(this._async_tool.cancelCall(u),o._limit_event=null),c&&(c.call(null,o),o._on_cancel=null),s){var a=t.length;o._queue=null,o._on_error=null,n.push(s);try{if(this._in_exec=!0,s.call(null,o,e),a!==t.length){i=!1;break}if(null!==o._queue){i=!1,this._scheduleExecute();break}}catch(t){this.state.last_exception=t,e=t.message}finally{this._in_exec=r}}o._cleanup(),t.pop()}i?this._queue=[]:r||this._post_exec(this)}}},{key:"cancel",value:function(){this._next_args=m;var e=this._exec_event;e&&(this._async_tool.cancelImmediate(e),this._exec_event=null);for(var t=this._stack,n=this._async_tool;t.length;){var r=t.pop(),i=r._limit_event,o=r._on_cancel;i&&(n.cancelCall(i),r._limit_event=null),o&&(o.call(null,r),r._on_cancel=null),r._cleanup()}return this._queue=[],this}},{key:"execute",value:function(){var e=E;return E=this,this._execute(),E=e,this}},{key:"_execute",value:function(){var e,t=this._stack;if((e=t.length?t[t.length-1]._queue:this._queue).length){var n=e.shift(),i=n[0];this._exec_stack.push(i);var o=this._next_args,u=o.length,s=new c(this,n[1],o);t.push(s);try{var a=t.length;this._in_exec=!0,u?(this._next_args=m,i.apply(void 0,[s].concat(r(o)))):i(s),a===t.length&&(null!==s._queue?this._scheduleExecute():s._on_cancel||s._limit_event||this._handle_success(this._next_args))}catch(e){this.state.last_exception=e,this._handle_error(e.message)}finally{this._in_exec=!1}this._post_exec(this)}}},{key:"_burst_success",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;try{this._in_exec=!0,E=this,this._handle_success(e)}catch(e){this.state.last_exception=e,this._handle_error(e.message)}finally{this._in_exec=!1}this._post_exec(this)}},{key:"loop",value:function(e,t){return g(this,e),v(this,this,e,t),this}},{key:"repeat",value:function(e,t,n){return g(this,t),p(this,this,e,t,n),this}},{key:"forEach",value:function(e,t,n){return g(this,t),y(this,this,e,t,n),this}},{key:"successStep",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];k(this);var i=this._queue;return i.length>0?i.push([function(){e._handle_success(n)},void 0]):this._next_args=n,this}},{key:"await",value:function(e,t){return k(this),d(this,this,e,t),this}},{key:"promise",value:function(){var e=this;return k(this),new Promise((function(t,n){var r=e._queue;e._queue=[[function(e){e._queue=r},function(e,t){n(new Error(t))}],[function(e,n){t(n)},void 0]],E=e,e._execute()}))}},{key:"isAsyncSteps",value:function(){return!0}}])&&i(t.prototype,n),a&&i(t,a),e}();e.exports=A},,function(e,t,n){"use strict";var r=n(2),i=n(7),o=n(0),u=n(4),c=n(1).isProduction;(t=e.exports=function(){return new u(null,t.ActiveAsyncTool)}).ActiveAsyncTool=r,t.AsyncTool=r,t.AsyncToolTest=i,t.FutoInError=o,t.Errors=o,t.AsyncSteps=u,t.isProduction=c,t.installAsyncToolTest=function(e){t.ActiveAsyncTool=!1===e?r:i},t.assertAS=function(e){try{if(e.isAsyncSteps())return}catch(e){}throw new Error("Not an instance of AsyncSteps: ".concat(e))}},function(e,t,n){"use strict";var r=n(8),i=[];(t=e.exports={}).callLater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=1e3*r();t&&(n+=t);for(var o={f:e,t:n},u=0;u<i.length;++u)if(i[u].t>n)return void i.splice(u,0,o);return i.push(o),o},t.cancelCall=function(e){var t=i.indexOf(e);t>=0&&i.splice(t,1)},t.nextEvent=function(){i.shift().f()},t.hasEvents=function(){return i.length>0},t.getEvents=function(){return i},t.resetEvents=function(){i.splice(0,i.length)},t.run=function(){for(;this.hasEvents();)this.nextEvent()},t.callImmediate=t.callLater,t.cancelImmediate=t.cancelCall},function(e,t){(function(){var t,n,r,i,o,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-o)/1e6},n=process.hrtime,i=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),u=1e9*process.uptime(),o=i-u):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(3),o=n(0),u=o.InternalError,c=o.Timeout,s=o.LoopBreak,a=o.LoopCont,l=n(1),h=l.isProduction,f=l.checkFunc,_=l.checkOnError,v=l.noop,p=l.loop,y=l.repeat,d=l.forEach,m=l.LOOP_TERM_LABEL,x=l.as_await,k=h?v:function(e){var t=e._root;if(t){var n=t._stack;if(n){if(n[n.length-1]===e)return;t.error(u,"Invalid call (sanity check)")}}throw new Error("InternalError: Unexpected call, object is out of service")},g=h?v:function(e,t,n){k(e),f(e,t),_(e,n)},w=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._root=t,this.state=t.state,this._queue=null,this._call_args=r,this._on_error=n,this._on_cancel=null,this._limit_event=null}var t,n,o;return t=e,(n=[{key:"add",value:function(e,t){g(this,e,t);var n=[e,t],r=this._queue;return r?r.push(n):this._queue=[n],this}},{key:"parallel",value:function(e){var t=new i(this._root,this);return this.add((function(e){t.executeParallel(e)}),e),t}},{key:"success",value:function(){k(this),null!==this._queue&&this.error(u,"Invalid success() call");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._root._handle_success(t)}},{key:"error",value:function(e,t){k(this),this._root.error(e,t)}},{key:"setTimeout",value:function(e){var t=this;k(this);var n=this._root._async_tool;return null!==this._limit_event&&n.cancelCall(this._limit_event),this._limit_event=n.callLater((function(){!function(e){e._limit_event=null;var t=e.state;t.error_info=void 0,t.last_exception=new Error(c),e._root._handle_error(c)}(t)}),e),this}},{key:"setCancel",value:function(e){return this._on_cancel=e,this}},{key:"waitExternal",value:function(){return this._on_cancel=v,this}},{key:"copyFrom",value:function(e){if(k(this),e._queue.length){var t=this._queue;null===t&&(t=[],this._queue=t),t.push.apply(t,e._queue)}var n=e.state,r=this.state;for(var i in n)void 0===r[i]&&(r[i]=n[i]);return this}},{key:"loop",value:function(e,t){return g(this,e),p(this,this._root,e,t),this}},{key:"repeat",value:function(e,t,n){return g(this,t),y(this,this._root,e,t,n),this}},{key:"forEach",value:function(e,t,n){return g(this,t),d(this,this._root,e,t,n),this}},{key:"break",value:function(e){k(this),this.state[m]=e,this._root.error(s)}},{key:"continue",value:function(e){k(this),this.state[m]=e,this._root.error(a)}},{key:"successStep",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];k(this);var i=this._queue;return i&&i.length?i.push([function(){e._root._handle_success(n)},void 0]):this._root._next_args=n,this}},{key:"await",value:function(e,t){return k(this),x(this,this._root,e,t),this}},{key:"sync",value:function(e,t,n){return g(this,t,n),e.sync(this,t,n),this}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this.state=null}}])&&r(t.prototype,n),o&&r(t,o),e}();e.exports=w},,,,,,,function(e,t,n){"use strict";!function(t){var r=t.FutoIn||t.futoin||{};if(void 0===r.AsyncSteps){var i=n(6);t.$as=i,r.$as=i,t.FutoInError=i.FutoInError,r.AsyncSteps=i.AsyncSteps,t.FutoIn=r,t.futoin=r}e.exports=r.$as}(window)}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["futoin-asyncsteps"]=t():e.$as=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};["ConnectError","CommError","UnknownInterface","NotSupportedVersion","NotImplemented","Unauthorized","InternalError","InvokerError","InvalidRequest","DefenseRejected","PleaseReauth","SecurityError","Timeout","LoopBreak","LoopCont"].forEach((function(e){return Object.defineProperty(r,e,{enumerable:!0,value:e})})),e.exports=r},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var u,c=e[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var o=n(0),u=(o.InternalError,o.LoopCont),c=o.LoopBreak,s="undefined"==typeof Symbol?function(e){return e}:function(e){return Symbol(e)},a=s("_loop_term_label"),l=function(e,t,n,r,i){i&&i()||e.add((function(e){var o=e.state,s=t._exec_stack,l=s.length,h=[n,function(t,n){!function(e,t,n,r,i){if(t===u){var o=r[a];o&&o!==i||(r.last_exception=null,e._root._handle_success())}else if(t===c){var s=r[a];s&&s!==i||(r.last_exception=null,n._queue.length=0,e._root._handle_success())}}(t,n,e,o,r)}],_=[function(e){i&&i()||(s.length=l,f())},null],f=function(){e._queue=[h,_]};f()}))},h=function(e,t,n,r,i){var o=0,u=n;l(e,t,(function(e){r(e,o++)}),i,(function(){return o>=u}))},_=[];Object.freeze(_);var f=function(){};e.exports=t={noop:f,makeSym:s,loop:l,repeat:h,forEach:function(e,t,n,r,o){if(Array.isArray(n)){var u=n;h(e,t,u.length,(function(e,t){r(e,t,u[t])}),o)}else if("undefined"!=typeof Map&&n instanceof Map){var c=n.entries();l(e,t,(function(e){var t=c.next();t.done&&e.break();var n=i(t.value,2),o=n[0],u=n[1];r(e,o,u)}),o)}else{var s=n,a=Object.keys(s);h(e,t,a.length,(function(e,t){r(e,a[t],s[a[t]])}),o)}},LOOP_TERM_LABEL:a,as_await:function(e,t,n,r){var i,o;n.then((function(e){i?i.state&&t._burst_success([e]):o=function(){t._handle_success([e])}}),(function(e){i?function(e,t,n){var r=e.state;if(r){if(e._on_cancel=null,n instanceof Error)r.last_exception=n,r.error_info=void 0,t._handle_error("PromiseReject");else{var i=n||"PromiseReject";r.last_exception=new Error(i),r.error_info=void 0,t._handle_error(i)}}}(i,t,e):(i=null,o=e instanceof Error?function(){throw e}:function(t){t.error(e||"PromiseReject")})})),e.add((function(e){o?o(e):(i=e,e._on_cancel=function(){if(i){i=null;try{n.cancel()}catch(e){}}})}),r)},EMPTY_ARRAY:_,prev_queue:function(e){var t=e._stack,n=t.length;return n>1?t[n-2]._queue:e._queue}},t.isProduction=!0,t.checkFunc=f,t.checkOnError=f;var v=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"push",value:function(){}},{key:"length",get:function(){return 0},set:function(e){}}])&&r(t.prototype,n),i&&r(t,i),e}());Object.freeze(v),t.newExecStack=function(){return v}},function(e,t,n){"use strict";if(t=e.exports={},"undefined"==typeof setImmediate){t.callLater=function(e,t){return setTimeout(e,t)},t.cancelCall=function(e){return clearTimeout(e)},window._FutoInEventLoopQueue=window._FutoInEventLoopQueue||[];var r=window._FutoInEventLoopQueue,i=window.performance,o=null,u=function(){o&&clearTimeout(o),o=setTimeout(c,0)},c=function(){o=null;for(var e=i.now()+10;r.length;){var t=r.shift();try{t()}catch(e){throw u(),e}if(i.now()>=e){u();break}}};t.callImmediate=function(e){r.length||u();var t=function(){e()};return r.push(t),t},t.cancelImmediate=function(e){var t=r.indexOf(e);t>=0&&r.splice(t,1)}}else t.callLater=function(e,t){return setTimeout(e,t)},t.cancelCall=function(e){clearTimeout(e)},t.callImmediate=function(e){return setImmediate(e)},t.cancelImmediate=function(e){clearImmediate(e)}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(1),o=i.checkFunc,u=i.checkOnError,c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._root=t,this._as=n,this._queue=[],this._psteps=[],this._complete_count=0}var t,n,i;return t=e,(n=[{key:"add",value:function(e,t){return o(this,e),u(this,t),this._queue.push([e,t]),this}},{key:"_complete",value:function(){this._complete_count+=1,this._complete_count===this._psteps.length&&(this._as._root._handle_success(),this._cleanup())}},{key:"_error",value:function(e,t){try{this._as.error(e,t)}catch(e){}}},{key:"executeParallel",value:function(t){var n=this,r=this._queue,i=this._root;if(i!==t._root){var o=new e(t._root,t);return o._queue.push.apply(o._queue,r),void o.executeParallel(t)}if(this._as=t,r.length){t._on_cancel=function(){n.cancel()};var u=this._psteps,c=function(e){n._complete()},s=function(e,t){n._error(t,e.state.error_info)},a=i.constructor;r.forEach((function(e){var n=new a(t.state,i._async_tool);n._queue.push([function(t){t._queue=[[e[0],e[1]]]},s],[c,void 0]),u.push(n)})),u.forEach((function(e){e.execute()}))}else this._complete()}},{key:"cancel",value:function(){this._psteps.forEach((function(e){e.cancel()})),this._cleanup()}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this._as=null,this._psteps=null}}])&&r(t.prototype,n),i&&r(t,i),e}();e.exports=c},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=n(2),c=n(0).InternalError,s=n(9),a=n(3),l=n(1),h=l.isProduction,_=l.checkFunc,f=l.checkOnError,v=l.noop,p=l.loop,y=l.repeat,d=l.forEach,m=l.as_await,x=l.EMPTY_ARRAY,k=l.newExecStack,g=h?v:function(e){e._stack.length>0&&e.error(c,"Top level add in execution")},w=h?v:function(e,t,n){g(e),_(e,t),f(e,n)},b=100,E=null,q=function(e){e._post_exec=v,e._execute()},A=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;i(this,e),null===n&&(n=function(){return this.state}),this.state=n,this._queue=[],this._stack=[],this._exec_stack=k(),this._in_exec=!1,this._post_exec=v,this._exec_event=null,this._next_args=x,this._async_tool=r;var o=r.callImmediate,c=function(){b=100,E=t,t._exec_event=null,t._execute()};this._scheduleExecute=function(){--b<=0||!t._in_exec||E!==t?t._exec_event=o(c):t._in_exec&&(t._post_exec=q)}}var t,n,l;return t=e,(n=[{key:"add",value:function(e,t){return w(this,e,t),this._queue.push([e,t]),this}},{key:"parallel",value:function(e){g(this),f(this,e);var t=new a(this,this);return this._queue.push([function(e){t.executeParallel(e)},e]),t}},{key:"sync",value:function(e,t,n){return w(this,t,n),e.sync(this,t,n),this}},{key:"error",value:function(e,t){this.state.error_info=t;var n=new Error(e);throw this._in_exec||(this.state.last_exception=n,this._handle_error(e)),n}},{key:"copyFrom",value:function(e){this._queue.push.apply(this._queue,e._queue);var t=e.state,n=this.state;for(var r in t)r in n||(n[r]=t[r]);return this}},{key:"_handle_success",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=this._stack;t.length||this.error(c,"Invalid success completion"),this._next_args=e;for(var n=t[t.length-1];;){var r=n._limit_event;if(r&&(this._async_tool.cancelCall(r),n._limit_event=null),n._cleanup(),t.pop(),!t.length)break;if((n=t[t.length-1])._queue.length)break}(t.length||this._queue.length)&&this._scheduleExecute()}},{key:"_handle_error",value:function(e){if(this._exec_event)this.cancel();else{this._next_args=x;var t=this._stack,n=this._exec_stack;this.state.async_stack=n;for(var r=this._in_exec,i=!0;t.length;){var o=t[t.length-1],u=o._limit_event,c=o._on_cancel,s=o._on_error;if(u&&(this._async_tool.cancelCall(u),o._limit_event=null),c&&(c.call(null,o),o._on_cancel=null),s){var a=t.length;o._queue=null,o._on_error=null,n.push(s);try{if(this._in_exec=!0,s.call(null,o,e),a!==t.length){i=!1;break}if(null!==o._queue){i=!1,this._scheduleExecute();break}}catch(t){this.state.last_exception=t,e=t.message}finally{this._in_exec=r}}o._cleanup(),t.pop()}i?this._queue=[]:r||this._post_exec(this)}}},{key:"cancel",value:function(){this._next_args=x;var e=this._exec_event;e&&(this._async_tool.cancelImmediate(e),this._exec_event=null);for(var t=this._stack,n=this._async_tool;t.length;){var r=t.pop(),i=r._limit_event,o=r._on_cancel;i&&(n.cancelCall(i),r._limit_event=null),o&&(o.call(null,r),r._on_cancel=null),r._cleanup()}return this._queue=[],this}},{key:"execute",value:function(){var e=E;return E=this,this._execute(),E=e,this}},{key:"_execute",value:function(){var e,t=this._stack;if((e=t.length?t[t.length-1]._queue:this._queue).length){var n=e.shift(),i=n[0];this._exec_stack.push(i);var o=this._next_args,u=o.length,c=new s(this,n[1],o);t.push(c);try{var a=t.length;this._in_exec=!0,u?(this._next_args=x,i.apply(void 0,[c].concat(r(o)))):i(c),a===t.length&&(null!==c._queue?this._scheduleExecute():c._on_cancel||c._limit_event||this._handle_success(this._next_args))}catch(e){this.state.last_exception=e,this._handle_error(e.message)}finally{this._in_exec=!1}this._post_exec(this)}}},{key:"_burst_success",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;try{this._in_exec=!0,E=this,this._handle_success(e)}catch(e){this.state.last_exception=e,this._handle_error(e.message)}finally{this._in_exec=!1}this._post_exec(this)}},{key:"loop",value:function(e,t){return w(this,e),p(this,this,e,t),this}},{key:"repeat",value:function(e,t,n){return w(this,t),y(this,this,e,t,n),this}},{key:"forEach",value:function(e,t,n){return w(this,t),d(this,this,e,t,n),this}},{key:"successStep",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];g(this);var i=this._queue;return i.length>0?i.push([function(){e._handle_success(n)},void 0]):this._next_args=n,this}},{key:"await",value:function(e,t){return g(this),m(this,this,e,t),this}},{key:"promise",value:function(){var e=this;return g(this),new Promise((function(t,n){var r=e._queue;e._queue=[[function(e){e._queue=r},function(e,t){n(new Error(t))}],[function(e,n){t(n)},void 0]],E=e,e._execute()}))}},{key:"newInstance",value:function(){return new e(null,this._async_tool)}},{key:"isAsyncSteps",value:function(){return!0}}])&&o(t.prototype,n),l&&o(t,l),e}();e.exports=A},,function(e,t,n){"use strict";var r=n(2),i=n(7),o=n(0),u=n(4),c=n(1).isProduction;(t=e.exports=function(){return new u(null,t.ActiveAsyncTool)}).ActiveAsyncTool=r,t.AsyncTool=r,t.AsyncToolTest=i,t.FutoInError=o,t.Errors=o,t.AsyncSteps=u,t.isProduction=c,t.installAsyncToolTest=function(e){t.ActiveAsyncTool=!1===e?r:i},t.assertAS=function(e){try{if(e.isAsyncSteps())return}catch(e){}throw new Error("Not an instance of AsyncSteps: ".concat(e))}},function(e,t,n){"use strict";var r=n(8),i=[];(t=e.exports={}).callLater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=1e3*r();t&&(n+=t);for(var o={f:e,t:n},u=0;u<i.length;++u)if(i[u].t>n)return void i.splice(u,0,o);return i.push(o),o},t.cancelCall=function(e){var t=i.indexOf(e);t>=0&&i.splice(t,1)},t.nextEvent=function(){i.shift().f()},t.hasEvents=function(){return i.length>0},t.getEvents=function(){return i},t.resetEvents=function(){i.splice(0,i.length)},t.run=function(){for(;this.hasEvents();)this.nextEvent()},t.callImmediate=t.callLater,t.cancelImmediate=t.cancelCall},function(e,t){(function(){var t,n,r,i,o,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-o)/1e6},n=process.hrtime,i=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),u=1e9*process.uptime(),o=i-u):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(3),o=n(0),u=o.InternalError,c=o.Timeout,s=o.LoopBreak,a=o.LoopCont,l=n(1),h=l.isProduction,_=l.checkFunc,f=l.checkOnError,v=l.noop,p=l.loop,y=l.repeat,d=l.forEach,m=l.LOOP_TERM_LABEL,x=l.as_await,k=h?v:function(e){var t=e._root;if(t){var n=t._stack;if(n){if(n[n.length-1]===e)return;t.error(u,"Invalid call (sanity check)")}}throw new Error("InternalError: Unexpected call, object is out of service")},g=h?v:function(e,t,n){k(e),_(e,t),f(e,n)},w=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._root=t,this.state=t.state,this._queue=null,this._call_args=r,this._on_error=n,this._on_cancel=null,this._limit_event=null}var t,n,o;return t=e,(n=[{key:"add",value:function(e,t){g(this,e,t);var n=[e,t],r=this._queue;return r?r.push(n):this._queue=[n],this}},{key:"parallel",value:function(e){var t=new i(this._root,this);return this.add((function(e){t.executeParallel(e)}),e),t}},{key:"success",value:function(){k(this),null!==this._queue&&this.error(u,"Invalid success() call");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._root._handle_success(t)}},{key:"error",value:function(e,t){k(this),this._root.error(e,t)}},{key:"setTimeout",value:function(e){var t=this;k(this);var n=this._root._async_tool;return null!==this._limit_event&&n.cancelCall(this._limit_event),this._limit_event=n.callLater((function(){!function(e){e._limit_event=null;var t=e.state;t.error_info=void 0,t.last_exception=new Error(c),e._root._handle_error(c)}(t)}),e),this}},{key:"setCancel",value:function(e){return this._on_cancel=e,this}},{key:"waitExternal",value:function(){return this._on_cancel=v,this}},{key:"copyFrom",value:function(e){if(k(this),e._queue.length){var t=this._queue;null===t&&(t=[],this._queue=t),t.push.apply(t,e._queue)}var n=e.state,r=this.state;for(var i in n)void 0===r[i]&&(r[i]=n[i]);return this}},{key:"loop",value:function(e,t){return g(this,e),p(this,this._root,e,t),this}},{key:"repeat",value:function(e,t,n){return g(this,t),y(this,this._root,e,t,n),this}},{key:"forEach",value:function(e,t,n){return g(this,t),d(this,this._root,e,t,n),this}},{key:"break",value:function(e){k(this),this.state[m]=e,this._root.error(s)}},{key:"continue",value:function(e){k(this),this.state[m]=e,this._root.error(a)}},{key:"successStep",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];k(this);var i=this._queue;return i&&i.length?i.push([function(){e._root._handle_success(n)},void 0]):this._root._next_args=n,this}},{key:"await",value:function(e,t){return k(this),x(this,this._root,e,t),this}},{key:"sync",value:function(e,t,n){return g(this,t,n),e.sync(this,t,n),this}},{key:"newInstance",value:function(){return this._root.newInstance()}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this.state=null}}])&&r(t.prototype,n),o&&r(t,o),e}();e.exports=w},,,,,,,function(e,t,n){"use strict";!function(t){var r=t.FutoIn||t.futoin||{};if(void 0===r.AsyncSteps){var i=n(6);t.$as=i,r.$as=i,t.FutoInError=i.FutoInError,r.AsyncSteps=i.AsyncSteps,t.FutoIn=r,t.futoin=r}e.exports=r.$as}(window)}])}));

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["futoin-asyncsteps"]=t():e.$as=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t,n){"use strict";var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};["ConnectError","CommError","UnknownInterface","NotSupportedVersion","NotImplemented","Unauthorized","InternalError","InvokerError","InvalidRequest","DefenseRejected","PleaseReauth","SecurityError","Timeout","LoopBreak","LoopCont"].forEach((function(e){return Object.defineProperty(r,e,{enumerable:!0,value:e})})),e.exports=r},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=e[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var i=n(0),u=(i.InternalError,i.LoopCont),c=i.LoopBreak,s="undefined"==typeof Symbol?function(e){return e}:function(e){return Symbol(e)},a=s("_loop_term_label"),l=function(e,t,n,r,o){o&&o()||e.add((function(e){var i=e.state,s=t._exec_stack,l=s.length,f=[n,function(t,n){!function(e,t,n,r,o){if(t===u){var i=r[a];i&&i!==o||(r.last_exception=null,e._root._handle_success())}else if(t===c){var s=r[a];s&&s!==o||(r.last_exception=null,n._queue.length=0,e._root._handle_success())}}(t,n,e,i,r)}],_=[function(e){o&&o()||(s.length=l,h())},null],h=function(){e._queue=[f,_]};h()}))},f=function(e,t,n,r,o){var i=0,u=n;l(e,t,(function(e){r(e,i++)}),o,(function(){return i>=u}))},_=[];Object.freeze(_);var h=function(){};e.exports=t={noop:h,makeSym:s,loop:l,repeat:f,forEach:function(e,t,n,r,i){if(Array.isArray(n)){var u=n;f(e,t,u.length,(function(e,t){r(e,t,u[t])}),i)}else if("undefined"!=typeof Map&&n instanceof Map){var c=n.entries();l(e,t,(function(e){var t=c.next();t.done&&e.break();var n=o(t.value,2),i=n[0],u=n[1];r(e,i,u)}),i)}else{var s=n,a=Object.keys(s);f(e,t,a.length,(function(e,t){r(e,a[t],s[a[t]])}),i)}},LOOP_TERM_LABEL:a,as_await:function(e,t,n,r){var o,i;n.then((function(e){o?o.state&&t._burst_success([e]):i=function(){t._handle_success([e])}}),(function(e){o?function(e,t,n){var r=e.state;if(r){if(e._on_cancel=null,n instanceof Error)r.last_exception=n,r.error_info=void 0,t._handle_error("PromiseReject");else{var o=n||"PromiseReject";r.last_exception=new Error(o),r.error_info=void 0,t._handle_error(o)}}}(o,t,e):(o=null,i=e instanceof Error?function(){throw e}:function(t){t.error(e||"PromiseReject")})})),e.add((function(e){i?i(e):(o=e,e._on_cancel=function(){if(o){o=null;try{n.cancel()}catch(e){}}})}),r)},EMPTY_ARRAY:_,prev_queue:function(e){var t=e._stack,n=t.length;return n>1?t[n-2]._queue:e._queue}},t.isProduction=!0,t.checkFunc=h,t.checkOnError=h;var p=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,(n=[{key:"push",value:function(){}},{key:"length",get:function(){return 0},set:function(e){}}])&&r(t.prototype,n),o&&r(t,o),e}());Object.freeze(p),t.newExecStack=function(){return p}},function(e,t,n){"use strict";if(t=e.exports={},"undefined"==typeof setImmediate){t.callLater=function(e,t){return setTimeout(e,t)},t.cancelCall=function(e){return clearTimeout(e)},window._FutoInEventLoopQueue=window._FutoInEventLoopQueue||[];var r=window._FutoInEventLoopQueue,o=window.performance,i=null,u=function(){i&&clearTimeout(i),i=setTimeout(c,0)},c=function(){i=null;for(var e=o.now()+10;r.length;){var t=r.shift();try{t()}catch(e){throw u(),e}if(o.now()>=e){u();break}}};t.callImmediate=function(e){r.length||u();var t=function(){e()};return r.push(t),t},t.cancelImmediate=function(e){var t=r.indexOf(e);t>=0&&r.splice(t,1)}}else t.callLater=function(e,t){return setTimeout(e,t)},t.cancelCall=function(e){clearTimeout(e)},t.callImmediate=function(e){return setImmediate(e)},t.cancelImmediate=function(e){clearImmediate(e)}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(1),i=o.checkFunc,u=o.checkOnError,c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._root=t,this._as=n,this._queue=[],this._psteps=[],this._complete_count=0}var t,n,o;return t=e,(n=[{key:"add",value:function(e,t){return i(this,e),u(this,t),this._queue.push([e,t]),this}},{key:"_complete",value:function(){this._complete_count+=1,this._complete_count===this._psteps.length&&(this._as._root._handle_success(),this._cleanup())}},{key:"_error",value:function(e,t){try{this._as.error(e,t)}catch(e){}}},{key:"executeParallel",value:function(t){var n=this,r=this._queue,o=this._root;if(o!==t._root){var i=new e(t._root,t);return i._queue.push.apply(i._queue,r),void i.executeParallel(t)}if(this._as=t,r.length){t._on_cancel=function(){n.cancel()};var u=this._psteps,c=function(e){n._complete()},s=function(e,t){n._error(t,e.state.error_info)},a=o.constructor;r.forEach((function(e){var n=new a(t.state,o._async_tool);n._queue.push([function(t){t._queue=[[e[0],e[1]]]},s],[c,void 0]),u.push(n)})),u.forEach((function(e){e.execute()}))}else this._complete()}},{key:"cancel",value:function(){this._psteps.forEach((function(e){e.cancel()})),this._cleanup()}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this._as=null,this._psteps=null}}])&&r(t.prototype,n),o&&r(t,o),e}();e.exports=c},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(2),u=n(0).InternalError,c=n(9),s=n(3),a=n(1),l=a.isProduction,f=a.checkFunc,_=a.checkOnError,h=a.noop,p=a.loop,v=a.repeat,y=a.forEach,d=a.as_await,m=a.EMPTY_ARRAY,b=a.newExecStack,g=l?h:function(e){e._stack.length>0&&e.error(u,"Top level add in execution")},x=l?h:function(e,t,n){g(e),f(e,t),_(e,n)},w=100,k=w,E=null,O=function(e){e._post_exec=h,e._execute()},q=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null===n&&(n=function(){return this.state}),this.state=n,this._queue=[],this._stack=[],this._exec_stack=b(),this._in_exec=!1,this._post_exec=h,this._exec_event=null,this._next_args=m,this._async_tool=r;var o=r.callImmediate,u=function(){k=w,E=t,t._exec_event=null,t._execute()};this._scheduleExecute=function(){--k<=0||!t._in_exec||E!==t?t._exec_event=o(u):t._in_exec&&(t._post_exec=O)}}var t,n,a;return t=e,(n=[{key:"add",value:function(e,t){return x(this,e,t),this._queue.push([e,t]),this}},{key:"parallel",value:function(e){g(this),_(this,e);var t=new s(this,this);return this._queue.push([function(e){t.executeParallel(e)},e]),t}},{key:"sync",value:function(e,t,n){return x(this,t,n),e.sync(this,t,n),this}},{key:"error",value:function(e,t){this.state.error_info=t;var n=new Error(e);throw this._in_exec||(this.state.last_exception=n,this._handle_error(e)),n}},{key:"copyFrom",value:function(e){this._queue.push.apply(this._queue,e._queue);var t=e.state,n=this.state;for(var r in t)r in n||(n[r]=t[r]);return this}},{key:"_handle_success",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=this._stack;t.length||this.error(u,"Invalid success completion"),this._next_args=e;for(var n=t[t.length-1];;){var r=n._limit_event;if(r&&(this._async_tool.cancelCall(r),n._limit_event=null),n._cleanup(),t.pop(),!t.length)break;if((n=t[t.length-1])._queue.length)break}(t.length||this._queue.length)&&this._scheduleExecute()}},{key:"_handle_error",value:function(e){if(this._exec_event)this.cancel();else{this._next_args=m;var t=this._stack,n=this._exec_stack;this.state.async_stack=n;for(var r=this._in_exec,o=!0;t.length;){var i=t[t.length-1],u=i._limit_event,c=i._on_cancel,s=i._on_error;if(u&&(this._async_tool.cancelCall(u),i._limit_event=null),c&&(c.call(null,i),i._on_cancel=null),s){var a=t.length;i._queue=null,i._on_error=null,n.push(s);try{if(this._in_exec=!0,s.call(null,i,e),a!==t.length){o=!1;break}if(null!==i._queue){o=!1,this._scheduleExecute();break}}catch(t){this.state.last_exception=t,e=t.message}finally{this._in_exec=r}}i._cleanup(),t.pop()}o?this._queue=[]:r||this._post_exec(this)}}},{key:"cancel",value:function(){this._next_args=m;var e=this._exec_event;e&&(this._async_tool.cancelImmediate(e),this._exec_event=null);for(var t=this._stack,n=this._async_tool;t.length;){var r=t.pop(),o=r._limit_event,i=r._on_cancel;o&&(n.cancelCall(o),r._limit_event=null),i&&(i.call(null,r),r._on_cancel=null),r._cleanup()}return this._queue=[],this}},{key:"execute",value:function(){var e=E;return E=this,this._execute(),E=e,this}},{key:"_execute",value:function(){var e,t=this._stack;if((e=t.length?t[t.length-1]._queue:this._queue).length){var n=e.shift(),o=n[0];this._exec_stack.push(o);var i=this._next_args,u=i.length,s=new c(this,n[1],i);t.push(s);try{var a=t.length;this._in_exec=!0,u?(this._next_args=m,o.apply(void 0,[s].concat(r(i)))):o(s),a===t.length&&(null!==s._queue?this._scheduleExecute():s._on_cancel||s._limit_event||this._handle_success(this._next_args))}catch(e){this.state.last_exception=e,this._handle_error(e.message)}finally{this._in_exec=!1}this._post_exec(this)}}},{key:"_burst_success",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;try{this._in_exec=!0,E=this,this._handle_success(e)}catch(e){this.state.last_exception=e,this._handle_error(e.message)}finally{this._in_exec=!1}this._post_exec(this)}},{key:"loop",value:function(e,t){return x(this,e),p(this,this,e,t),this}},{key:"repeat",value:function(e,t,n){return x(this,t),v(this,this,e,t,n),this}},{key:"forEach",value:function(e,t,n){return x(this,t),y(this,this,e,t,n),this}},{key:"successStep",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];g(this);var o=this._queue;return o.length>0?o.push([function(){e._handle_success(n)},void 0]):this._next_args=n,this}},{key:"await",value:function(e,t){return g(this),d(this,this,e,t),this}},{key:"promise",value:function(){var e=this;return g(this),new Promise((function(t,n){var r=e._queue;e._queue=[[function(e){e._queue=r},function(e,t){n(new Error(t))}],[function(e,n){t(n)},void 0]],E=e,e._execute()}))}},{key:"isAsyncSteps",value:function(){return!0}}])&&o(t.prototype,n),a&&o(t,a),e}();e.exports=q},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(0).NotImplemented,i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"sync",value:function(e,t,n){e.error(o,"#sync() API")}}])&&r(t.prototype,n),i&&r(t,i),e}();e.exports=i},function(e,t,n){"use strict";var r=n(2),o=n(7),i=n(0),u=n(4),c=n(1).isProduction;(t=e.exports=function(){return new u(null,t.ActiveAsyncTool)}).ActiveAsyncTool=r,t.AsyncTool=r,t.AsyncToolTest=o,t.FutoInError=i,t.Errors=i,t.AsyncSteps=u,t.isProduction=c,t.installAsyncToolTest=function(e){t.ActiveAsyncTool=!1===e?r:o},t.assertAS=function(e){try{if(e.isAsyncSteps())return}catch(e){}throw new Error("Not an instance of AsyncSteps: ".concat(e))}},function(e,t,n){"use strict";var r=n(8),o=[];(t=e.exports={}).callLater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=1e3*r();t&&(n+=t);for(var i={f:e,t:n},u=0;u<o.length;++u)if(o[u].t>n)return void o.splice(u,0,i);return o.push(i),i},t.cancelCall=function(e){var t=o.indexOf(e);t>=0&&o.splice(t,1)},t.nextEvent=function(){o.shift().f()},t.hasEvents=function(){return o.length>0},t.getEvents=function(){return o},t.resetEvents=function(){o.splice(0,o.length)},t.run=function(){for(;this.hasEvents();)this.nextEvent()},t.callImmediate=t.callLater,t.cancelImmediate=t.cancelCall},function(e,t){(function(){var t,n,r,o,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-i)/1e6},n=process.hrtime,o=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),u=1e9*process.uptime(),i=o-u):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(3),i=n(0),u=i.InternalError,c=i.Timeout,s=i.LoopBreak,a=i.LoopCont,l=n(1),f=l.isProduction,_=l.checkFunc,h=l.checkOnError,p=l.noop,v=l.loop,y=l.repeat,d=l.forEach,m=l.LOOP_TERM_LABEL,b=l.as_await,g=f?p:function(e){var t=e._root;if(t){var n=t._stack;if(n){if(n[n.length-1]===e)return;t.error(u,"Invalid call (sanity check)")}}throw new Error("InternalError: Unexpected call, object is out of service")},x=f?p:function(e,t,n){g(e),_(e,t),h(e,n)},w=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._root=t,this.state=t.state,this._queue=null,this._call_args=r,this._on_error=n,this._on_cancel=null,this._limit_event=null}var t,n,i;return t=e,(n=[{key:"add",value:function(e,t){x(this,e,t);var n=[e,t],r=this._queue;return r?r.push(n):this._queue=[n],this}},{key:"parallel",value:function(e){var t=new o(this._root,this);return this.add((function(e){t.executeParallel(e)}),e),t}},{key:"success",value:function(){g(this),null!==this._queue&&this.error(u,"Invalid success() call");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._root._handle_success(t)}},{key:"error",value:function(e,t){g(this),this._root.error(e,t)}},{key:"setTimeout",value:function(e){var t=this;g(this);var n=this._root._async_tool;return null!==this._limit_event&&n.cancelCall(this._limit_event),this._limit_event=n.callLater((function(){!function(e){e._limit_event=null;var t=e.state;t.error_info=void 0,t.last_exception=new Error(c),e._root._handle_error(c)}(t)}),e),this}},{key:"setCancel",value:function(e){return this._on_cancel=e,this}},{key:"waitExternal",value:function(){return this._on_cancel=p,this}},{key:"copyFrom",value:function(e){if(g(this),e._queue.length){var t=this._queue;null===t&&(t=[],this._queue=t),t.push.apply(t,e._queue)}var n=e.state,r=this.state;for(var o in n)void 0===r[o]&&(r[o]=n[o]);return this}},{key:"loop",value:function(e,t){return x(this,e),v(this,this._root,e,t),this}},{key:"repeat",value:function(e,t,n){return x(this,t),y(this,this._root,e,t,n),this}},{key:"forEach",value:function(e,t,n){return x(this,t),d(this,this._root,e,t,n),this}},{key:"break",value:function(e){g(this),this.state[m]=e,this._root.error(s)}},{key:"continue",value:function(e){g(this),this.state[m]=e,this._root.error(a)}},{key:"successStep",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];g(this);var o=this._queue;return o&&o.length?o.push([function(){e._root._handle_success(n)},void 0]):this._root._next_args=n,this}},{key:"await",value:function(e,t){return g(this),b(this,this._root,e,t),this}},{key:"sync",value:function(e,t,n){return x(this,t,n),e.sync(this,t,n),this}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this.state=null}}])&&r(t.prototype,n),i&&r(t,i),e}();e.exports=w},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=n(5),a=n(0).DefenseRejected,l=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=i(this,u(t).call(this)))._max=n,e._locked=0,e._owners=new WeakMap,e._queue=[],e._max_queue=r,e._release_handler=function(t){e._release(t._root)},e}var n,r,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,e),n=t,(r=[{key:"_lock",value:function(e,t){var n=this._owners,r=n.get(t);if(r)return n.set(t,r+1),!0;if(this._locked>=this._max){var o=this._queue,i=this._max_queue;return null!==i&&o.length>=i&&t.error(a,"Mutex queue limit"),o.push(e),!1}return this._locked+=1,n.set(t,1),!0}},{key:"_release",value:function(e){var t=this._owners,n=t.get(e);if(n){if(n>1)return void t.set(e,n-1);t.delete(e),this._locked-=1;for(var r=this._queue;r.length;){var o=r.shift();if(o.state){var i=o._root;this._lock(o,i),i._handle_success(o._call_args);break}}}else{var u=this._queue.indexOf(e);u>=0&&this._queue.splice(u,1)}}},{key:"sync",value:function(e,t,n){var r=this;e.add((function(e){!function(e,t,n,r){var o=e._root;e._on_cancel=t._release_handler,e._queue=[[function(n){t._lock(e,o)?o._handle_success(e._call_args):(n.waitExternal(),n._call_args=e._call_args)},void 0],[n,r],[function(e){t._release(o),o._handle_success(e._call_args)},void 0]]}(e,r,t,n)}))}}])&&o(n.prototype,r),s&&o(n,s),t}(s);e.exports=l},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var a=n(5),l=n(0).DefenseRejected,f=n(1).prev_queue,_=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=i(this,u(t).call(this)))._max=e,n._current=0;var c=n._queue=[];return n._timer=null,n._period_ms=r,n._max_queue=o,n._cancel_handler=function(e){var t=c.indexOf(e);t>=0&&c.splice(t,1)},n}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,e),n=t,(r=[{key:"_lock",value:function(e){if(this._ensureTimer(),this._current>=this._max){var t=this._queue,n=this._max_queue;return null!==n&&t.length>=n&&e.error(l,"Throttle queue limit"),t.push(e),!1}return this._current+=1,!0}},{key:"_ensureTimer",value:function(){var e=this;this._timer||(this._timer=setInterval((function(){e._resetPeriod()}),this._period_ms))}},{key:"_resetPeriod",value:function(){this._current=0;var e=this._queue;if(!e.length)return clearInterval(this._timer),void(this._timer=null);for(var t=this._max,n=0;e.length&&n<t;){var r=e.shift();if(r.state){++n;var o=r._root;o._handle_success(o._next_args)}}this._current=n}},{key:"sync",value:function(e,t,n){var r=this;e.add((function(e){!function(e,t,n,r){var o=e._root;t._lock(e)?(e._on_error=r,n.apply(void 0,[e].concat(s(e._call_args)))):(e._on_cancel=t._cancel_handler,o._next_args=e._call_args,f(o).unshift([n,r]))}(e,r,t,n)}))}}])&&o(n.prototype,r),a&&o(n,a),t}(a);e.exports=_},function(e,t,n){"use strict";!function(t){var r=t.FutoIn||t.futoin||{};if(void 0===r.AsyncSteps){var o=n(13);t.$as=o,r.$as=o,t.FutoInError=o.FutoInError,r.AsyncSteps=o.AsyncSteps,t.FutoIn=r,t.futoin=r}e.exports=r.$as}(window)},function(e,t,n){"use strict";(t=e.exports=n(6)).ISync=n(5),t.Mutex=n(10),t.Throttle=n(11),t.Limiter=n(14),t.testcase=n(15)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=n(5),a=n(10),l=n(11),f=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=i(this,u(t).call(this)))._mutex=new a(n.concurrent||1,n.max_queue||0),e._throttle=new l(n.rate||1,n.period_ms||1e3,n.burst||0),e}var n,r,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,e),n=t,(r=[{key:"sync",value:function(e,t,n){var r=this;e.sync(this._mutex,(function(e){e._root._next_args=e._call_args,e.sync(r._throttle,t,n)}))}}])&&o(n.prototype,r),s&&o(n,s),t}(s);e.exports=f},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return function(n){var o=this,i=new r;i.add((function(n){n.add((function(n){e.call(o,n),t&&n.add((function(e){e.error("NegativeTestMustThrow")}))}),t)}),(function(e,t){console.log("ERROR: ".concat(t," (").concat(e.state.error_info,")")),n(e.state.last_exception||new Error("Generic Fail"))})),i.add((function(e){return n()})),i.execute()}}}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["futoin-asyncsteps"]=t():e.$as=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t,n){"use strict";var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};["ConnectError","CommError","UnknownInterface","NotSupportedVersion","NotImplemented","Unauthorized","InternalError","InvokerError","InvalidRequest","DefenseRejected","PleaseReauth","SecurityError","Timeout","LoopBreak","LoopCont"].forEach((function(e){return Object.defineProperty(r,e,{enumerable:!0,value:e})})),e.exports=r},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=e[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var i=n(0),u=(i.InternalError,i.LoopCont),c=i.LoopBreak,s="undefined"==typeof Symbol?function(e){return e}:function(e){return Symbol(e)},a=s("_loop_term_label"),l=function(e,t,n,r,o){o&&o()||e.add((function(e){var i=e.state,s=t._exec_stack,l=s.length,f=[n,function(t,n){!function(e,t,n,r,o){if(t===u){var i=r[a];i&&i!==o||(r.last_exception=null,e._root._handle_success())}else if(t===c){var s=r[a];s&&s!==o||(r.last_exception=null,n._queue.length=0,e._root._handle_success())}}(t,n,e,i,r)}],_=[function(e){o&&o()||(s.length=l,h())},null],h=function(){e._queue=[f,_]};h()}))},f=function(e,t,n,r,o){var i=0,u=n;l(e,t,(function(e){r(e,i++)}),o,(function(){return i>=u}))},_=[];Object.freeze(_);var h=function(){};e.exports=t={noop:h,makeSym:s,loop:l,repeat:f,forEach:function(e,t,n,r,i){if(Array.isArray(n)){var u=n;f(e,t,u.length,(function(e,t){r(e,t,u[t])}),i)}else if("undefined"!=typeof Map&&n instanceof Map){var c=n.entries();l(e,t,(function(e){var t=c.next();t.done&&e.break();var n=o(t.value,2),i=n[0],u=n[1];r(e,i,u)}),i)}else{var s=n,a=Object.keys(s);f(e,t,a.length,(function(e,t){r(e,a[t],s[a[t]])}),i)}},LOOP_TERM_LABEL:a,as_await:function(e,t,n,r){var o,i;n.then((function(e){o?o.state&&t._burst_success([e]):i=function(){t._handle_success([e])}}),(function(e){o?function(e,t,n){var r=e.state;if(r){if(e._on_cancel=null,n instanceof Error)r.last_exception=n,r.error_info=void 0,t._handle_error("PromiseReject");else{var o=n||"PromiseReject";r.last_exception=new Error(o),r.error_info=void 0,t._handle_error(o)}}}(o,t,e):(o=null,i=e instanceof Error?function(){throw e}:function(t){t.error(e||"PromiseReject")})})),e.add((function(e){i?i(e):(o=e,e._on_cancel=function(){if(o){o=null;try{n.cancel()}catch(e){}}})}),r)},EMPTY_ARRAY:_,prev_queue:function(e){var t=e._stack,n=t.length;return n>1?t[n-2]._queue:e._queue}},t.isProduction=!0,t.checkFunc=h,t.checkOnError=h;var p=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,(n=[{key:"push",value:function(){}},{key:"length",get:function(){return 0},set:function(e){}}])&&r(t.prototype,n),o&&r(t,o),e}());Object.freeze(p),t.newExecStack=function(){return p}},function(e,t,n){"use strict";if(t=e.exports={},"undefined"==typeof setImmediate){t.callLater=function(e,t){return setTimeout(e,t)},t.cancelCall=function(e){return clearTimeout(e)},window._FutoInEventLoopQueue=window._FutoInEventLoopQueue||[];var r=window._FutoInEventLoopQueue,o=window.performance,i=null,u=function(){i&&clearTimeout(i),i=setTimeout(c,0)},c=function(){i=null;for(var e=o.now()+10;r.length;){var t=r.shift();try{t()}catch(e){throw u(),e}if(o.now()>=e){u();break}}};t.callImmediate=function(e){r.length||u();var t=function(){e()};return r.push(t),t},t.cancelImmediate=function(e){var t=r.indexOf(e);t>=0&&r.splice(t,1)}}else t.callLater=function(e,t){return setTimeout(e,t)},t.cancelCall=function(e){clearTimeout(e)},t.callImmediate=function(e){return setImmediate(e)},t.cancelImmediate=function(e){clearImmediate(e)}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(1),i=o.checkFunc,u=o.checkOnError,c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._root=t,this._as=n,this._queue=[],this._psteps=[],this._complete_count=0}var t,n,o;return t=e,(n=[{key:"add",value:function(e,t){return i(this,e),u(this,t),this._queue.push([e,t]),this}},{key:"_complete",value:function(){this._complete_count+=1,this._complete_count===this._psteps.length&&(this._as._root._handle_success(),this._cleanup())}},{key:"_error",value:function(e,t){try{this._as.error(e,t)}catch(e){}}},{key:"executeParallel",value:function(t){var n=this,r=this._queue,o=this._root;if(o!==t._root){var i=new e(t._root,t);return i._queue.push.apply(i._queue,r),void i.executeParallel(t)}if(this._as=t,r.length){t._on_cancel=function(){n.cancel()};var u=this._psteps,c=function(e){n._complete()},s=function(e,t){n._error(t,e.state.error_info)},a=o.constructor;r.forEach((function(e){var n=new a(t.state,o._async_tool);n._queue.push([function(t){t._queue=[[e[0],e[1]]]},s],[c,void 0]),u.push(n)})),u.forEach((function(e){e.execute()}))}else this._complete()}},{key:"cancel",value:function(){this._psteps.forEach((function(e){e.cancel()})),this._cleanup()}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this._as=null,this._psteps=null}}])&&r(t.prototype,n),o&&r(t,o),e}();e.exports=c},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=n(2),c=n(0).InternalError,s=n(9),a=n(3),l=n(1),f=l.isProduction,_=l.checkFunc,h=l.checkOnError,p=l.noop,v=l.loop,y=l.repeat,d=l.forEach,m=l.as_await,b=l.EMPTY_ARRAY,g=l.newExecStack,x=f?p:function(e){e._stack.length>0&&e.error(c,"Top level add in execution")},w=f?p:function(e,t,n){x(e),_(e,t),h(e,n)},k=100,E=null,O=function(e){e._post_exec=p,e._execute()},q=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;o(this,e),null===n&&(n=function(){return this.state}),this.state=n,this._queue=[],this._stack=[],this._exec_stack=g(),this._in_exec=!1,this._post_exec=p,this._exec_event=null,this._next_args=b,this._async_tool=r;var i=r.callImmediate,c=function(){k=100,E=t,t._exec_event=null,t._execute()};this._scheduleExecute=function(){--k<=0||!t._in_exec||E!==t?t._exec_event=i(c):t._in_exec&&(t._post_exec=O)}}var t,n,l;return t=e,(n=[{key:"add",value:function(e,t){return w(this,e,t),this._queue.push([e,t]),this}},{key:"parallel",value:function(e){x(this),h(this,e);var t=new a(this,this);return this._queue.push([function(e){t.executeParallel(e)},e]),t}},{key:"sync",value:function(e,t,n){return w(this,t,n),e.sync(this,t,n),this}},{key:"error",value:function(e,t){this.state.error_info=t;var n=new Error(e);throw this._in_exec||(this.state.last_exception=n,this._handle_error(e)),n}},{key:"copyFrom",value:function(e){this._queue.push.apply(this._queue,e._queue);var t=e.state,n=this.state;for(var r in t)r in n||(n[r]=t[r]);return this}},{key:"_handle_success",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=this._stack;t.length||this.error(c,"Invalid success completion"),this._next_args=e;for(var n=t[t.length-1];;){var r=n._limit_event;if(r&&(this._async_tool.cancelCall(r),n._limit_event=null),n._cleanup(),t.pop(),!t.length)break;if((n=t[t.length-1])._queue.length)break}(t.length||this._queue.length)&&this._scheduleExecute()}},{key:"_handle_error",value:function(e){if(this._exec_event)this.cancel();else{this._next_args=b;var t=this._stack,n=this._exec_stack;this.state.async_stack=n;for(var r=this._in_exec,o=!0;t.length;){var i=t[t.length-1],u=i._limit_event,c=i._on_cancel,s=i._on_error;if(u&&(this._async_tool.cancelCall(u),i._limit_event=null),c&&(c.call(null,i),i._on_cancel=null),s){var a=t.length;i._queue=null,i._on_error=null,n.push(s);try{if(this._in_exec=!0,s.call(null,i,e),a!==t.length){o=!1;break}if(null!==i._queue){o=!1,this._scheduleExecute();break}}catch(t){this.state.last_exception=t,e=t.message}finally{this._in_exec=r}}i._cleanup(),t.pop()}o?this._queue=[]:r||this._post_exec(this)}}},{key:"cancel",value:function(){this._next_args=b;var e=this._exec_event;e&&(this._async_tool.cancelImmediate(e),this._exec_event=null);for(var t=this._stack,n=this._async_tool;t.length;){var r=t.pop(),o=r._limit_event,i=r._on_cancel;o&&(n.cancelCall(o),r._limit_event=null),i&&(i.call(null,r),r._on_cancel=null),r._cleanup()}return this._queue=[],this}},{key:"execute",value:function(){var e=E;return E=this,this._execute(),E=e,this}},{key:"_execute",value:function(){var e,t=this._stack;if((e=t.length?t[t.length-1]._queue:this._queue).length){var n=e.shift(),o=n[0];this._exec_stack.push(o);var i=this._next_args,u=i.length,c=new s(this,n[1],i);t.push(c);try{var a=t.length;this._in_exec=!0,u?(this._next_args=b,o.apply(void 0,[c].concat(r(i)))):o(c),a===t.length&&(null!==c._queue?this._scheduleExecute():c._on_cancel||c._limit_event||this._handle_success(this._next_args))}catch(e){this.state.last_exception=e,this._handle_error(e.message)}finally{this._in_exec=!1}this._post_exec(this)}}},{key:"_burst_success",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b;try{this._in_exec=!0,E=this,this._handle_success(e)}catch(e){this.state.last_exception=e,this._handle_error(e.message)}finally{this._in_exec=!1}this._post_exec(this)}},{key:"loop",value:function(e,t){return w(this,e),v(this,this,e,t),this}},{key:"repeat",value:function(e,t,n){return w(this,t),y(this,this,e,t,n),this}},{key:"forEach",value:function(e,t,n){return w(this,t),d(this,this,e,t,n),this}},{key:"successStep",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];x(this);var o=this._queue;return o.length>0?o.push([function(){e._handle_success(n)},void 0]):this._next_args=n,this}},{key:"await",value:function(e,t){return x(this),m(this,this,e,t),this}},{key:"promise",value:function(){var e=this;return x(this),new Promise((function(t,n){var r=e._queue;e._queue=[[function(e){e._queue=r},function(e,t){n(new Error(t))}],[function(e,n){t(n)},void 0]],E=e,e._execute()}))}},{key:"newInstance",value:function(){return new e(null,this._async_tool)}},{key:"isAsyncSteps",value:function(){return!0}}])&&i(t.prototype,n),l&&i(t,l),e}();e.exports=q},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(0).NotImplemented,i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"sync",value:function(e,t,n){e.error(o,"#sync() API")}}])&&r(t.prototype,n),i&&r(t,i),e}();e.exports=i},function(e,t,n){"use strict";var r=n(2),o=n(7),i=n(0),u=n(4),c=n(1).isProduction;(t=e.exports=function(){return new u(null,t.ActiveAsyncTool)}).ActiveAsyncTool=r,t.AsyncTool=r,t.AsyncToolTest=o,t.FutoInError=i,t.Errors=i,t.AsyncSteps=u,t.isProduction=c,t.installAsyncToolTest=function(e){t.ActiveAsyncTool=!1===e?r:o},t.assertAS=function(e){try{if(e.isAsyncSteps())return}catch(e){}throw new Error("Not an instance of AsyncSteps: ".concat(e))}},function(e,t,n){"use strict";var r=n(8),o=[];(t=e.exports={}).callLater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=1e3*r();t&&(n+=t);for(var i={f:e,t:n},u=0;u<o.length;++u)if(o[u].t>n)return void o.splice(u,0,i);return o.push(i),i},t.cancelCall=function(e){var t=o.indexOf(e);t>=0&&o.splice(t,1)},t.nextEvent=function(){o.shift().f()},t.hasEvents=function(){return o.length>0},t.getEvents=function(){return o},t.resetEvents=function(){o.splice(0,o.length)},t.run=function(){for(;this.hasEvents();)this.nextEvent()},t.callImmediate=t.callLater,t.cancelImmediate=t.cancelCall},function(e,t){(function(){var t,n,r,o,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-i)/1e6},n=process.hrtime,o=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),u=1e9*process.uptime(),i=o-u):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(3),i=n(0),u=i.InternalError,c=i.Timeout,s=i.LoopBreak,a=i.LoopCont,l=n(1),f=l.isProduction,_=l.checkFunc,h=l.checkOnError,p=l.noop,v=l.loop,y=l.repeat,d=l.forEach,m=l.LOOP_TERM_LABEL,b=l.as_await,g=f?p:function(e){var t=e._root;if(t){var n=t._stack;if(n){if(n[n.length-1]===e)return;t.error(u,"Invalid call (sanity check)")}}throw new Error("InternalError: Unexpected call, object is out of service")},x=f?p:function(e,t,n){g(e),_(e,t),h(e,n)},w=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._root=t,this.state=t.state,this._queue=null,this._call_args=r,this._on_error=n,this._on_cancel=null,this._limit_event=null}var t,n,i;return t=e,(n=[{key:"add",value:function(e,t){x(this,e,t);var n=[e,t],r=this._queue;return r?r.push(n):this._queue=[n],this}},{key:"parallel",value:function(e){var t=new o(this._root,this);return this.add((function(e){t.executeParallel(e)}),e),t}},{key:"success",value:function(){g(this),null!==this._queue&&this.error(u,"Invalid success() call");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._root._handle_success(t)}},{key:"error",value:function(e,t){g(this),this._root.error(e,t)}},{key:"setTimeout",value:function(e){var t=this;g(this);var n=this._root._async_tool;return null!==this._limit_event&&n.cancelCall(this._limit_event),this._limit_event=n.callLater((function(){!function(e){e._limit_event=null;var t=e.state;t.error_info=void 0,t.last_exception=new Error(c),e._root._handle_error(c)}(t)}),e),this}},{key:"setCancel",value:function(e){return this._on_cancel=e,this}},{key:"waitExternal",value:function(){return this._on_cancel=p,this}},{key:"copyFrom",value:function(e){if(g(this),e._queue.length){var t=this._queue;null===t&&(t=[],this._queue=t),t.push.apply(t,e._queue)}var n=e.state,r=this.state;for(var o in n)void 0===r[o]&&(r[o]=n[o]);return this}},{key:"loop",value:function(e,t){return x(this,e),v(this,this._root,e,t),this}},{key:"repeat",value:function(e,t,n){return x(this,t),y(this,this._root,e,t,n),this}},{key:"forEach",value:function(e,t,n){return x(this,t),d(this,this._root,e,t,n),this}},{key:"break",value:function(e){g(this),this.state[m]=e,this._root.error(s)}},{key:"continue",value:function(e){g(this),this.state[m]=e,this._root.error(a)}},{key:"successStep",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];g(this);var o=this._queue;return o&&o.length?o.push([function(){e._root._handle_success(n)},void 0]):this._root._next_args=n,this}},{key:"await",value:function(e,t){return g(this),b(this,this._root,e,t),this}},{key:"sync",value:function(e,t,n){return x(this,t,n),e.sync(this,t,n),this}},{key:"newInstance",value:function(){return this._root.newInstance()}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this.state=null}}])&&r(t.prototype,n),i&&r(t,i),e}();e.exports=w},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=n(5),l=n(0).DefenseRejected,f=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o(this,t),(e=u(this,c(t).call(this)))._max=n,e._locked=0,e._owners=new WeakMap,e._queue=[],e._max_queue=r,e._release_handler=function(t){e._release(t._root)},e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,e),n=t,(r=[{key:"_lock",value:function(e,t){var n=this._owners,r=n.get(t);if(r)return n.set(t,r+1),!0;if(this._locked>=this._max){var o=this._queue,i=this._max_queue;return null!==i&&o.length>=i&&t.error(l,"Mutex queue limit"),o.push(e),!1}return this._locked+=1,n.set(t,1),!0}},{key:"_release",value:function(e){var t=this._owners,n=t.get(e);if(n){if(n>1)return void t.set(e,n-1);t.delete(e),this._locked-=1;for(var r=this._queue;r.length;){var o=r.shift();if(o.state){var i=o._root;this._lock(o,i),i._handle_success(o._call_args);break}}}else{var u=this._queue.indexOf(e);u>=0&&this._queue.splice(u,1)}}},{key:"sync",value:function(e,t,n){var r=this;e.add((function(e){!function(e,t,n,r){var o=e._root;e._on_cancel=t._release_handler,e._queue=[[function(n){t._lock(e,o)?o._handle_success(e._call_args):(n.waitExternal(),n._call_args=e._call_args)},void 0],[n,r],[function(e){t._release(o),o._handle_success(e._call_args)},void 0]]}(e,r,t,n)}))}}])&&i(n.prototype,r),a&&i(n,a),t}(a);e.exports=f},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var l=n(5),f=n(0).DefenseRejected,_=n(1).prev_queue,h=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;o(this,t),(n=u(this,c(t).call(this)))._max=e,n._current=0;var s=n._queue=[];return n._timer=null,n._period_ms=r,n._max_queue=i,n._cancel_handler=function(e){var t=s.indexOf(e);t>=0&&s.splice(t,1)},n}var n,r,l;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,e),n=t,(r=[{key:"_lock",value:function(e){if(this._ensureTimer(),this._current>=this._max){var t=this._queue,n=this._max_queue;return null!==n&&t.length>=n&&e.error(f,"Throttle queue limit"),t.push(e),!1}return this._current+=1,!0}},{key:"_ensureTimer",value:function(){var e=this;this._timer||(this._timer=setInterval((function(){e._resetPeriod()}),this._period_ms))}},{key:"_resetPeriod",value:function(){this._current=0;var e=this._queue;if(!e.length)return clearInterval(this._timer),void(this._timer=null);for(var t=this._max,n=0;e.length&&n<t;){var r=e.shift();if(r.state){++n;var o=r._root;o._handle_success(o._next_args)}}this._current=n}},{key:"sync",value:function(e,t,n){var r=this;e.add((function(e){!function(e,t,n,r){var o=e._root;t._lock(e)?(e._on_error=r,n.apply(void 0,[e].concat(a(e._call_args)))):(e._on_cancel=t._cancel_handler,o._next_args=e._call_args,_(o).unshift([n,r]))}(e,r,t,n)}))}}])&&i(n.prototype,r),l&&i(n,l),t}(l);e.exports=h},function(e,t,n){"use strict";!function(t){var r=t.FutoIn||t.futoin||{};if(void 0===r.AsyncSteps){var o=n(13);t.$as=o,r.$as=o,t.FutoInError=o.FutoInError,r.AsyncSteps=o.AsyncSteps,t.FutoIn=r,t.futoin=r}e.exports=r.$as}(window)},function(e,t,n){"use strict";(t=e.exports=n(6)).ISync=n(5),t.Mutex=n(10),t.Throttle=n(11),t.Limiter=n(14),t.testcase=n(15)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=n(5),l=n(10),f=n(11),_=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,t),(e=u(this,c(t).call(this)))._mutex=new l(n.concurrent||1,n.max_queue||0),e._throttle=new f(n.rate||1,n.period_ms||1e3,n.burst||0),e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,e),n=t,(r=[{key:"sync",value:function(e,t,n){var r=this;e.sync(this._mutex,(function(e){e._root._next_args=e._call_args,e.sync(r._throttle,t,n)}))}}])&&i(n.prototype,r),a&&i(n,a),t}(a);e.exports=_},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return function(n){var o=this,i=new r;i.add((function(n){n.add((function(n){e.call(o,n),t&&n.add((function(e){e.error("NegativeTestMustThrow")}))}),t)}),(function(e,t){console.log("ERROR: ".concat(t," (").concat(e.state.error_info,")")),n(e.state.last_exception||new Error("Generic Fail"))})),i.add((function(e){return n()})),i.execute()}}}])}));

@@ -1,1 +0,1 @@

!function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=62)}([function(t,n){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||Function("return this")()},function(t,n,e){var r=e(0),o=e(17),i=e(26),u=e(67),c=r.Symbol,f=o("wks");t.exports=function(t){return f[t]||(f[t]=u&&c[t]||(u?c:i)("Symbol."+t))}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(2);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(8),o=e(9),i=e(24);t.exports=r?function(t,n,e){return o.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(0),o=e(17),i=e(6),u=e(4),c=e(22),f=e(43),a=e(10),s=a.get,l=a.enforce,p=String(f).split("toString");o("inspectSource",(function(t){return f.call(t)})),(t.exports=function(t,n,e,o){var f=!!o&&!!o.unsafe,a=!!o&&!!o.enumerable,s=!!o&&!!o.noTargetGet;"function"==typeof e&&("string"!=typeof n||u(e,"name")||i(e,"name",n),l(e).source=p.join("string"==typeof n?n:"")),t!==r?(f?!s&&t[n]&&(a=!0):delete t[n],a?t[n]=e:i(t,n,e)):a?t[n]=e:c(n,e)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||f.call(this)}))},function(t,n,e){var r=e(5);t.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(8),o=e(41),i=e(3),u=e(42),c=Object.defineProperty;n.f=r?c:function(t,n,e){if(i(t),n=u(n,!0),i(e),o)try{return c(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r,o,i,u=e(44),c=e(0),f=e(2),a=e(6),s=e(4),l=e(25),p=e(18),v=c.WeakMap;if(u){var h=new v,d=h.get,y=h.has,g=h.set;r=function(t,n){return g.call(h,t,n),n},o=function(t){return d.call(h,t)||{}},i=function(t){return y.call(h,t)}}else{var x=l("state");p[x]=!0,r=function(t,n){return a(t,x,n),n},o=function(t){return s(t,x)?t[x]:{}},i=function(t){return s(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(n){var e;if(!f(n)||(e=o(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}}}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(31),o=e(0),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,n){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][n]||o[t]&&o[t][n]}},function(t,n){t.exports=!1},function(t,n,e){var r=e(0),o=e(29).f,i=e(6),u=e(7),c=e(22),f=e(72),a=e(35);t.exports=function(t,n){var e,s,l,p,v,h=t.target,d=t.global,y=t.stat;if(e=d?r:y?r[h]||c(h,{}):(r[h]||{}).prototype)for(s in n){if(p=n[s],l=t.noTargetGet?(v=o(e,s))&&v.value:e[s],!a(d?s:h+(y?".":"#")+s,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;f(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),u(e,s,p,t)}}},function(t,n){t.exports={}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,n,e){var r=e(13),o=e(65);(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.3.6",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,n){t.exports={}},function(t,n,e){var r=e(46),o=e(30);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(3),o=e(78),i=e(32),u=e(36),c=e(79),f=e(80),a=function(t,n){this.stopped=t,this.result=n};(t.exports=function(t,n,e,s,l){var p,v,h,d,y,g,x,m=u(n,e,s?2:1);if(l)p=t;else{if("function"!=typeof(v=c(t)))throw TypeError("Target is not iterable");if(o(v)){for(h=0,d=i(t.length);d>h;h++)if((y=s?m(r(x=t[h])[0],x[1]):m(t[h]))&&y instanceof a)return y;return new a(!1)}p=v.call(t)}for(g=p.next;!(x=g.call(p)).done;)if("object"==typeof(y=f(p,m,x.value,s))&&y&&y instanceof a)return y;return new a(!1)}).stop=function(t){return new a(!0,t)}},function(t,n,e){var r=e(9).f,o=e(4),i=e(1)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){var r=e(0),o=e(6);t.exports=function(t,n){try{o(r,t,n)}catch(e){r[t]=n}return n}},function(t,n,e){var r=e(0),o=e(2),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(17),o=e(26),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+r).toString(36)}},function(t,n,e){var r=e(7);t.exports=function(t,n,e){for(var o in n)r(t,o,n[o],e);return t}},function(t,n,e){var r=e(18),o=e(2),i=e(4),u=e(9).f,c=e(26),f=e(69),a=c("meta"),s=0,l=Object.isExtensible||function(){return!0},p=function(t){u(t,a,{value:{objectID:"O"+ ++s,weakData:{}}})},v=t.exports={REQUIRED:!1,fastKey:function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,a)){if(!l(t))return"F";if(!n)return"E";p(t)}return t[a].objectID},getWeakData:function(t,n){if(!i(t,a)){if(!l(t))return!0;if(!n)return!1;p(t)}return t[a].weakData},onFreeze:function(t){return f&&v.REQUIRED&&l(t)&&!i(t,a)&&p(t),t}};r[a]=!0},function(t,n,e){var r=e(8),o=e(71),i=e(24),u=e(19),c=e(42),f=e(4),a=e(41),s=Object.getOwnPropertyDescriptor;n.f=r?s:function(t,n){if(t=u(t),n=c(n,!0),a)try{return s(t,n)}catch(t){}if(f(t,n))return i(!o.f.call(t,n),t[n])}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){t.exports=e(0)},function(t,n,e){var r=e(33),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,n,e){var r=e(5),o=/#|\.prototype\./,i=function(t,n){var e=c[u(t)];return e==a||e!=f&&("function"==typeof n?r(n):!!n)},u=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},f=i.NATIVE="N",a=i.POLYFILL="P";t.exports=i},function(t,n,e){var r=e(16);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 0:return function(){return t.call(n)};case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t,n,e){if(!(t instanceof n))throw TypeError("Incorrect "+(e?e+" ":"")+"invocation");return t}},function(t,n,e){var r=e(12);t.exports=r("navigator","userAgent")||""},function(t,n,e){"use strict";var r=e(16),o=function(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=r(n),this.reject=r(e)};t.exports.f=function(t){return new o(t)}},function(t,n,e){var r=e(7),o=e(66),i=Object.prototype;o!==i.toString&&r(i,"toString",o,{unsafe:!0})},function(t,n,e){var r=e(8),o=e(5),i=e(23);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(2);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){var r=e(17);t.exports=r("native-function-to-string",Function.toString)},function(t,n,e){var r=e(0),o=e(43),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o.call(i))},function(t,n,e){var r=e(11),o=e(1)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),o))?e:i?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,e){var r=e(5),o=e(11),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,n,e){var r=e(4),o=e(19),i=e(75).indexOf,u=e(18);t.exports=function(t,n){var e,c=o(t),f=0,a=[];for(e in c)!r(u,e)&&r(c,e)&&a.push(e);for(;n.length>f;)r(c,e=n[f++])&&(~i(a,e)||a.push(e));return a}},function(t,n,e){var r=e(1)("iterator"),o=!1;try{var i=0,u={next:function(){return{done:!!i++}},return:function(){o=!0}};u[r]=function(){return this},Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!o)return!1;var e=!1;try{var i={};i[r]=function(){return{next:function(){return{done:e=!0}}}},t(i)}catch(t){}return e}},function(t,n,e){var r=e(3),o=e(82);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,n=!1,e={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),n=e instanceof Array}catch(t){}return function(e,i){return r(e),o(i),n?t.call(e,i):e.__proto__=i,e}}():void 0)},function(t,n,e){var r=e(30);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(0),o=e(87),i=e(88),u=e(6),c=e(1),f=c("iterator"),a=c("toStringTag"),s=i.values;for(var l in o){var p=r[l],v=p&&p.prototype;if(v){if(v[f]!==s)try{u(v,f,s)}catch(t){v[f]=s}if(v[a]||u(v,a,l),o[l])for(var h in i)if(v[h]!==i[h])try{u(v,h,i[h])}catch(t){v[h]=i[h]}}}},function(t,n,e){var r=e(3),o=e(90),i=e(34),u=e(18),c=e(53),f=e(23),a=e(25)("IE_PROTO"),s=function(){},l=function(){var t,n=f("iframe"),e=i.length;for(n.style.display="none",c.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;e--;)delete l.prototype[i[e]];return l()};t.exports=Object.create||function(t,n){var e;return null!==t?(s.prototype=r(t),e=new s,s.prototype=null,e[a]=t):e=l(),void 0===n?e:o(e,n)},u[a]=!0},function(t,n,e){var r=e(12);t.exports=r("document","documentElement")},function(t,n,e){"use strict";var r=e(14),o=e(92),i=e(56),u=e(49),c=e(21),f=e(6),a=e(7),s=e(1),l=e(13),p=e(15),v=e(55),h=v.IteratorPrototype,d=v.BUGGY_SAFARI_ITERATORS,y=s("iterator"),g=function(){return this};t.exports=function(t,n,e,s,v,x,m){o(e,n,s);var b,j,w,S=function(t){if(t===v&&A)return A;if(!d&&t in P)return P[t];switch(t){case"keys":case"values":case"entries":return function(){return new e(this,t)}}return function(){return new e(this)}},O=n+" Iterator",E=!1,P=t.prototype,T=P[y]||P["@@iterator"]||v&&P[v],A=!d&&T||S(v),_="Array"==n&&P.entries||T;if(_&&(b=i(_.call(new t)),h!==Object.prototype&&b.next&&(l||i(b)===h||(u?u(b,h):"function"!=typeof b[y]&&f(b,y,g)),c(b,O,!0,!0),l&&(p[O]=g))),"values"==v&&T&&"values"!==T.name&&(E=!0,A=function(){return T.call(this)}),l&&!m||P[y]===A||f(P,y,A),p[n]=A,v)if(j={values:S("values"),keys:x?A:S("keys"),entries:S("entries")},m)for(w in j)!d&&!E&&w in P||a(P,w,j[w]);else r({target:n,proto:!0,forced:d||E},j);return j}},function(t,n,e){"use strict";var r,o,i,u=e(56),c=e(6),f=e(4),a=e(1),s=e(13),l=a("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):p=!0),null==r&&(r={}),s||f(r,l)||c(r,l,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(t,n,e){var r=e(4),o=e(50),i=e(25),u=e(93),c=i("IE_PROTO"),f=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){return t=o(t),r(t,c)?t[c]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?f:null}},function(t,n,e){var r=e(0);t.exports=r.Promise},function(t,n,e){var r=e(3),o=e(16),i=e(1)("species");t.exports=function(t,n){var e,u=r(t).constructor;return void 0===u||null==(e=r(u)[i])?n:o(e)}},function(t,n,e){var r,o,i,u=e(0),c=e(5),f=e(11),a=e(36),s=e(53),l=e(23),p=e(38),v=u.location,h=u.setImmediate,d=u.clearImmediate,y=u.process,g=u.MessageChannel,x=u.Dispatch,m=0,b={},j=function(t){if(b.hasOwnProperty(t)){var n=b[t];delete b[t],n()}},w=function(t){return function(){j(t)}},S=function(t){j(t.data)},O=function(t){u.postMessage(t+"",v.protocol+"//"+v.host)};h&&d||(h=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return b[++m]=function(){("function"==typeof t?t:Function(t)).apply(void 0,n)},r(m),m},d=function(t){delete b[t]},"process"==f(y)?r=function(t){y.nextTick(w(t))}:x&&x.now?r=function(t){x.now(w(t))}:g&&!/(iphone|ipod|ipad).*applewebkit/i.test(p)?(i=(o=new g).port2,o.port1.onmessage=S,r=a(i.postMessage,i,1)):!u.addEventListener||"function"!=typeof postMessage||u.importScripts||c(O)?r="onreadystatechange"in l("script")?function(t){s.appendChild(l("script")).onreadystatechange=function(){s.removeChild(this),j(t)}}:function(t){setTimeout(w(t),0)}:(r=O,u.addEventListener("message",S,!1))),t.exports={set:h,clear:d}},function(t,n,e){var r=e(3),o=e(2),i=e(39);t.exports=function(t,n){if(r(t),o(n)&&n.constructor===t)return n;var e=i.f(t);return(0,e.resolve)(n),e.promise}},function(t,n){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,n,e){"use strict";e(63),e(94)},function(t,n,e){t.exports=e(64)},function(t,n,e){e(40),e(68),e(51);var r=e(31);t.exports=r.WeakMap},function(t,n,e){var r=e(0),o=e(22),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,n,e){"use strict";var r=e(45),o={};o[e(1)("toStringTag")]="z",t.exports="[object z]"!==String(o)?function(){return"[object "+r(this)+"]"}:o.toString},function(t,n,e){var r=e(5);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(t,n,e){"use strict";var r,o=e(0),i=e(27),u=e(28),c=e(70),f=e(83),a=e(2),s=e(10).enforce,l=e(44),p=!o.ActiveXObject&&"ActiveXObject"in o,v=Object.isExtensible,h=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},d=t.exports=c("WeakMap",h,f,!0,!0);if(l&&p){r=f.getConstructor(h,"WeakMap",!0),u.REQUIRED=!0;var y=d.prototype,g=y.delete,x=y.has,m=y.get,b=y.set;i(y,{delete:function(t){if(a(t)&&!v(t)){var n=s(this);return n.frozen||(n.frozen=new r),g.call(this,t)||n.frozen.delete(t)}return g.call(this,t)},has:function(t){if(a(t)&&!v(t)){var n=s(this);return n.frozen||(n.frozen=new r),x.call(this,t)||n.frozen.has(t)}return x.call(this,t)},get:function(t){if(a(t)&&!v(t)){var n=s(this);return n.frozen||(n.frozen=new r),x.call(this,t)?m.call(this,t):n.frozen.get(t)}return m.call(this,t)},set:function(t,n){if(a(t)&&!v(t)){var e=s(this);e.frozen||(e.frozen=new r),x.call(this,t)?b.call(this,t,n):e.frozen.set(t,n)}else b.call(this,t,n);return this}})}},function(t,n,e){var r=e(5);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,n,e){"use strict";var r=e(14),o=e(0),i=e(35),u=e(7),c=e(28),f=e(20),a=e(37),s=e(2),l=e(5),p=e(48),v=e(21),h=e(81);t.exports=function(t,n,e,d,y){var g=o[t],x=g&&g.prototype,m=g,b=d?"set":"add",j={},w=function(t){var n=x[t];u(x,t,"add"==t?function(t){return n.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(y&&!s(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!s(t)?void 0:n.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!s(t))&&n.call(this,0===t?0:t)}:function(t,e){return n.call(this,0===t?0:t,e),this})};if(i(t,"function"!=typeof g||!(y||x.forEach&&!l((function(){(new g).entries().next()})))))m=e.getConstructor(n,t,d,b),c.REQUIRED=!0;else if(i(t,!0)){var S=new m,O=S[b](y?{}:-0,1)!=S,E=l((function(){S.has(1)})),P=p((function(t){new g(t)})),T=!y&&l((function(){for(var t=new g,n=5;n--;)t[b](n,n);return!t.has(-0)}));P||((m=n((function(n,e){a(n,m,t);var r=h(new g,n,m);return null!=e&&f(e,r[b],r,d),r}))).prototype=x,x.constructor=m),(E||T)&&(w("delete"),w("has"),d&&w("get")),(T||O)&&w(b),y&&x.clear&&delete x.clear}return j[t]=m,r({global:!0,forced:m!=g},j),v(m,t),y||e.setStrong(m,t,d),m}},function(t,n,e){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);n.f=i?function(t){var n=o(this,t);return!!n&&n.enumerable}:r},function(t,n,e){var r=e(4),o=e(73),i=e(29),u=e(9);t.exports=function(t,n){for(var e=o(n),c=u.f,f=i.f,a=0;a<e.length;a++){var s=e[a];r(t,s)||c(t,s,f(n,s))}}},function(t,n,e){var r=e(12),o=e(74),i=e(77),u=e(3);t.exports=r("Reflect","ownKeys")||function(t){var n=o.f(u(t)),e=i.f;return e?n.concat(e(t)):n}},function(t,n,e){var r=e(47),o=e(34).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n,e){var r=e(19),o=e(32),i=e(76),u=function(t){return function(n,e,u){var c,f=r(n),a=o(f.length),s=i(u,a);if(t&&e!=e){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===e)return t||s||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},function(t,n,e){var r=e(33),o=Math.max,i=Math.min;t.exports=function(t,n){var e=r(t);return e<0?o(e+n,0):i(e,n)}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(1),o=e(15),i=r("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[i]===t)}},function(t,n,e){var r=e(45),o=e(15),i=e(1)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n,e){var r=e(3);t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(n){var i=t.return;throw void 0!==i&&r(i.call(t)),n}}},function(t,n,e){var r=e(2),o=e(49);t.exports=function(t,n,e){var i,u;return o&&"function"==typeof(i=n.constructor)&&i!==e&&r(u=i.prototype)&&u!==e.prototype&&o(t,u),t}},function(t,n,e){var r=e(2);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,n,e){"use strict";var r=e(27),o=e(28).getWeakData,i=e(3),u=e(2),c=e(37),f=e(20),a=e(84),s=e(4),l=e(10),p=l.set,v=l.getterFor,h=a.find,d=a.findIndex,y=0,g=function(t){return t.frozen||(t.frozen=new x)},x=function(){this.entries=[]},m=function(t,n){return h(t.entries,(function(t){return t[0]===n}))};x.prototype={get:function(t){var n=m(this,t);if(n)return n[1]},has:function(t){return!!m(this,t)},set:function(t,n){var e=m(this,t);e?e[1]=n:this.entries.push([t,n])},delete:function(t){var n=d(this.entries,(function(n){return n[0]===t}));return~n&&this.entries.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,a){var l=t((function(t,r){c(t,l,n),p(t,{type:n,id:y++,frozen:void 0}),null!=r&&f(r,t[a],t,e)})),h=v(n),d=function(t,n,e){var r=h(t),u=o(i(n),!0);return!0===u?g(r).set(n,e):u[r.id]=e,t};return r(l.prototype,{delete:function(t){var n=h(this);if(!u(t))return!1;var e=o(t);return!0===e?g(n).delete(t):e&&s(e,n.id)&&delete e[n.id]},has:function(t){var n=h(this);if(!u(t))return!1;var e=o(t);return!0===e?g(n).has(t):e&&s(e,n.id)}}),r(l.prototype,e?{get:function(t){var n=h(this);if(u(t)){var e=o(t);return!0===e?g(n).get(t):e?e[n.id]:void 0}},set:function(t,n){return d(this,t,n)}}:{add:function(t){return d(this,t,!0)}}),l}}},function(t,n,e){var r=e(36),o=e(46),i=e(50),u=e(32),c=e(85),f=[].push,a=function(t){var n=1==t,e=2==t,a=3==t,s=4==t,l=6==t,p=5==t||l;return function(v,h,d,y){for(var g,x,m=i(v),b=o(m),j=r(h,d,3),w=u(b.length),S=0,O=y||c,E=n?O(v,w):e?O(v,0):void 0;w>S;S++)if((p||S in b)&&(x=j(g=b[S],S,m),t))if(n)E[S]=x;else if(x)switch(t){case 3:return!0;case 5:return g;case 6:return S;case 2:f.call(E,g)}else if(s)return!1;return l?-1:a||s?s:E}};t.exports={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6)}},function(t,n,e){var r=e(2),o=e(86),i=e(1)("species");t.exports=function(t,n){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)?r(e)&&null===(e=e[i])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===n?0:n)}},function(t,n,e){var r=e(11);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,n,e){"use strict";var r=e(19),o=e(89),i=e(15),u=e(10),c=e(54),f=u.set,a=u.getterFor("Array Iterator");t.exports=c(Array,"Array",(function(t,n){f(this,{type:"Array Iterator",target:r(t),index:0,kind:n})}),(function(){var t=a(this),n=t.target,e=t.kind,r=t.index++;return!n||r>=n.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:r,done:!1}:"values"==e?{value:n[r],done:!1}:{value:[r,n[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,n,e){var r=e(1),o=e(52),i=e(6),u=r("unscopables"),c=Array.prototype;null==c[u]&&i(c,u,o(null)),t.exports=function(t){c[u][t]=!0}},function(t,n,e){var r=e(8),o=e(9),i=e(3),u=e(91);t.exports=r?Object.defineProperties:function(t,n){i(t);for(var e,r=u(n),c=r.length,f=0;c>f;)o.f(t,e=r[f++],n[e]);return t}},function(t,n,e){var r=e(47),o=e(34);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){"use strict";var r=e(55).IteratorPrototype,o=e(52),i=e(24),u=e(21),c=e(15),f=function(){return this};t.exports=function(t,n,e){var a=n+" Iterator";return t.prototype=o(r,{next:i(1,e)}),u(t,a,!1,!0),c[a]=f,t}},function(t,n,e){var r=e(5);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,n,e){t.exports=e(95)},function(t,n,e){e(40),e(96),e(51),e(98),e(103),e(104);var r=e(31);t.exports=r.Promise},function(t,n,e){"use strict";var r=e(97).charAt,o=e(10),i=e(54),u=o.set,c=o.getterFor("String Iterator");i(String,"String",(function(t){u(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,n=c(this),e=n.string,o=n.index;return o>=e.length?{value:void 0,done:!0}:(t=r(e,o),n.index+=t.length,{value:t,done:!1})}))},function(t,n,e){var r=e(33),o=e(30),i=function(t){return function(n,e){var i,u,c=String(o(n)),f=r(e),a=c.length;return f<0||f>=a?t?"":void 0:(i=c.charCodeAt(f))<55296||i>56319||f+1===a||(u=c.charCodeAt(f+1))<56320||u>57343?t?c.charAt(f):i:t?c.slice(f,f+2):u-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},function(t,n,e){"use strict";var r,o,i,u,c=e(14),f=e(13),a=e(0),s=e(12),l=e(57),p=e(7),v=e(27),h=e(21),d=e(99),y=e(2),g=e(16),x=e(37),m=e(11),b=e(20),j=e(48),w=e(58),S=e(59).set,O=e(100),E=e(60),P=e(101),T=e(39),A=e(61),_=e(10),L=e(35),M=e(1),k=e(102),I=M("species"),R="Promise",z=_.get,C=_.set,D=_.getterFor(R),F=l,G=a.TypeError,N=a.document,W=a.process,U=s("fetch"),V=T.f,H=V,B="process"==m(W),Q=!!(N&&N.createEvent&&a.dispatchEvent),q=L(R,(function(){if(66===k)return!0;if(!B&&"function"!=typeof PromiseRejectionEvent)return!0;if(f&&!F.prototype.finally)return!0;if(k>=51&&/native code/.test(F))return!1;var t=F.resolve(1),n=function(t){t((function(){}),(function(){}))};return(t.constructor={})[I]=n,!(t.then((function(){}))instanceof n)})),K=q||!j((function(t){F.all(t).catch((function(){}))})),Y=function(t){var n;return!(!y(t)||"function"!=typeof(n=t.then))&&n},X=function(t,n,e){if(!n.notified){n.notified=!0;var r=n.reactions;O((function(){for(var o=n.value,i=1==n.state,u=0;r.length>u;){var c,f,a,s=r[u++],l=i?s.ok:s.fail,p=s.resolve,v=s.reject,h=s.domain;try{l?(i||(2===n.rejection&&tt(t,n),n.rejection=1),!0===l?c=o:(h&&h.enter(),c=l(o),h&&(h.exit(),a=!0)),c===s.promise?v(G("Promise-chain cycle")):(f=Y(c))?f.call(c,p,v):p(c)):v(o)}catch(t){h&&!a&&h.exit(),v(t)}}n.reactions=[],n.notified=!1,e&&!n.rejection&&Z(t,n)}))}},J=function(t,n,e){var r,o;Q?((r=N.createEvent("Event")).promise=n,r.reason=e,r.initEvent(t,!1,!0),a.dispatchEvent(r)):r={promise:n,reason:e},(o=a["on"+t])?o(r):"unhandledrejection"===t&&P("Unhandled promise rejection",e)},Z=function(t,n){S.call(a,(function(){var e,r=n.value;if($(n)&&(e=A((function(){B?W.emit("unhandledRejection",r,t):J("unhandledrejection",t,r)})),n.rejection=B||$(n)?2:1,e.error))throw e.value}))},$=function(t){return 1!==t.rejection&&!t.parent},tt=function(t,n){S.call(a,(function(){B?W.emit("rejectionHandled",t):J("rejectionhandled",t,n.value)}))},nt=function(t,n,e,r){return function(o){t(n,e,o,r)}},et=function(t,n,e,r){n.done||(n.done=!0,r&&(n=r),n.value=e,n.state=2,X(t,n,!0))},rt=function(t,n,e,r){if(!n.done){n.done=!0,r&&(n=r);try{if(t===e)throw G("Promise can't be resolved itself");var o=Y(e);o?O((function(){var r={done:!1};try{o.call(e,nt(rt,t,r,n),nt(et,t,r,n))}catch(e){et(t,r,e,n)}})):(n.value=e,n.state=1,X(t,n,!1))}catch(e){et(t,{done:!1},e,n)}}};q&&(F=function(t){x(this,F,R),g(t),r.call(this);var n=z(this);try{t(nt(rt,this,n),nt(et,this,n))}catch(t){et(this,n,t)}},(r=function(t){C(this,{type:R,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=v(F.prototype,{then:function(t,n){var e=D(this),r=V(w(this,F));return r.ok="function"!=typeof t||t,r.fail="function"==typeof n&&n,r.domain=B?W.domain:void 0,e.parent=!0,e.reactions.push(r),0!=e.state&&X(this,e,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,n=z(t);this.promise=t,this.resolve=nt(rt,t,n),this.reject=nt(et,t,n)},T.f=V=function(t){return t===F||t===i?new o(t):H(t)},f||"function"!=typeof l||(u=l.prototype.then,p(l.prototype,"then",(function(t,n){var e=this;return new F((function(t,n){u.call(e,t,n)})).then(t,n)}),{unsafe:!0}),"function"==typeof U&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return E(F,U.apply(a,arguments))}}))),c({global:!0,wrap:!0,forced:q},{Promise:F}),h(F,R,!1,!0),d(R),i=s(R),c({target:R,stat:!0,forced:q},{reject:function(t){var n=V(this);return n.reject.call(void 0,t),n.promise}}),c({target:R,stat:!0,forced:f||q},{resolve:function(t){return E(f&&this===i?F:this,t)}}),c({target:R,stat:!0,forced:K},{all:function(t){var n=this,e=V(n),r=e.resolve,o=e.reject,i=A((function(){var e=g(n.resolve),i=[],u=0,c=1;b(t,(function(t){var f=u++,a=!1;i.push(void 0),c++,e.call(n,t).then((function(t){a||(a=!0,i[f]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),e.promise},race:function(t){var n=this,e=V(n),r=e.reject,o=A((function(){var o=g(n.resolve);b(t,(function(t){o.call(n,t).then(e.resolve,r)}))}));return o.error&&r(o.value),e.promise}})},function(t,n,e){"use strict";var r=e(12),o=e(9),i=e(1),u=e(8),c=i("species");t.exports=function(t){var n=r(t),e=o.f;u&&n&&!n[c]&&e(n,c,{configurable:!0,get:function(){return this}})}},function(t,n,e){var r,o,i,u,c,f,a,s,l=e(0),p=e(29).f,v=e(11),h=e(59).set,d=e(38),y=l.MutationObserver||l.WebKitMutationObserver,g=l.process,x=l.Promise,m="process"==v(g),b=p(l,"queueMicrotask"),j=b&&b.value;j||(r=function(){var t,n;for(m&&(t=g.domain)&&t.exit();o;){n=o.fn,o=o.next;try{n()}catch(t){throw o?u():i=void 0,t}}i=void 0,t&&t.enter()},m?u=function(){g.nextTick(r)}:y&&!/(iphone|ipod|ipad).*applewebkit/i.test(d)?(c=!0,f=document.createTextNode(""),new y(r).observe(f,{characterData:!0}),u=function(){f.data=c=!c}):x&&x.resolve?(a=x.resolve(void 0),s=a.then,u=function(){s.call(a,r)}):u=function(){h.call(l,r)}),t.exports=j||function(t){var n={fn:t,next:void 0};i&&(i.next=n),o||(o=n,u()),i=n}},function(t,n,e){var r=e(0);t.exports=function(t,n){var e=r.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}},function(t,n,e){var r,o,i=e(0),u=e(38),c=i.process,f=c&&c.versions,a=f&&f.v8;a?o=(r=a.split("."))[0]+r[1]:u&&(!(r=u.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=u.match(/Chrome\/(\d+)/))&&(o=r[1]),t.exports=o&&+o},function(t,n,e){"use strict";var r=e(14),o=e(16),i=e(39),u=e(61),c=e(20);r({target:"Promise",stat:!0},{allSettled:function(t){var n=this,e=i.f(n),r=e.resolve,f=e.reject,a=u((function(){var e=o(n.resolve),i=[],u=0,f=1;c(t,(function(t){var o=u++,c=!1;i.push(void 0),f++,e.call(n,t).then((function(t){c||(c=!0,i[o]={status:"fulfilled",value:t},--f||r(i))}),(function(t){c||(c=!0,i[o]={status:"rejected",reason:t},--f||r(i))}))})),--f||r(i)}));return a.error&&f(a.value),e.promise}})},function(t,n,e){"use strict";var r=e(14),o=e(13),i=e(57),u=e(12),c=e(58),f=e(60),a=e(7);r({target:"Promise",proto:!0,real:!0},{finally:function(t){var n=c(this,u("Promise")),e="function"==typeof t;return this.then(e?function(e){return f(n,t()).then((function(){return e}))}:t,e?function(e){return f(n,t()).then((function(){throw e}))}:t)}}),o||"function"!=typeof i||i.prototype.finally||a(i.prototype,"finally",u("Promise").prototype.finally)}]);
!function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=66)}([function(t,n){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||Function("return this")()},function(t,n,e){var r=e(0),o=e(41),i=e(3),u=e(25),c=e(45),f=e(69),a=o("wks"),s=r.Symbol,l=f?s:s&&s.withoutSetter||u;t.exports=function(t){return i(a,t)||(c&&i(s,t)?a[t]=s[t]:a[t]=l("Symbol."+t)),a[t]}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(2);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,n,e){var r=e(9),o=e(7),i=e(24);t.exports=r?function(t,n,e){return o.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(9),o=e(43),i=e(5),u=e(44),c=Object.defineProperty;n.f=r?c:function(t,n,e){if(i(t),n=u(n,!0),i(e),o)try{return c(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(0),o=e(6),i=e(3),u=e(22),c=e(26),f=e(10),a=f.get,s=f.enforce,l=String(String).split("String");(t.exports=function(t,n,e,c){var f=!!c&&!!c.unsafe,a=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof e&&("string"!=typeof n||i(e,"name")||o(e,"name",n),s(e).source=l.join("string"==typeof n?n:"")),t!==r?(f?!p&&t[n]&&(a=!0):delete t[n],a?t[n]=e:o(t,n,e)):a?t[n]=e:u(n,e)})(Function.prototype,"toString",(function(){return"function"==typeof this&&a(this).source||c(this)}))},function(t,n,e){var r=e(4);t.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){var r,o,i,u=e(46),c=e(0),f=e(2),a=e(6),s=e(3),l=e(27),p=e(17),v=c.WeakMap;if(u){var h=new v,d=h.get,y=h.has,g=h.set;r=function(t,n){return g.call(h,t,n),n},o=function(t){return d.call(h,t)||{}},i=function(t){return y.call(h,t)}}else{var x=l("state");p[x]=!0,r=function(t,n){return a(t,x,n),n},o=function(t){return s(t,x)?t[x]:{}},i=function(t){return s(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(n){var e;if(!f(n)||(e=o(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}}}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(32),o=e(0),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,n){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][n]||o[t]&&o[t][n]}},function(t,n){t.exports=!1},function(t,n,e){var r=e(0),o=e(30).f,i=e(6),u=e(8),c=e(22),f=e(75),a=e(36);t.exports=function(t,n){var e,s,l,p,v,h=t.target,d=t.global,y=t.stat;if(e=d?r:y?r[h]||c(h,{}):(r[h]||{}).prototype)for(s in n){if(p=n[s],l=t.noTargetGet?(v=o(e,s))&&v.value:e[s],!a(d?s:h+(y?".":"#")+s,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;f(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),u(e,s,p,t)}}},function(t,n){t.exports={}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,n){t.exports={}},function(t,n,e){var r=e(48),o=e(31);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(5),o=e(81),i=e(33),u=e(37),c=e(82),f=e(83),a=function(t,n){this.stopped=t,this.result=n};(t.exports=function(t,n,e,s,l){var p,v,h,d,y,g,x,m=u(n,e,s?2:1);if(l)p=t;else{if("function"!=typeof(v=c(t)))throw TypeError("Target is not iterable");if(o(v)){for(h=0,d=i(t.length);d>h;h++)if((y=s?m(r(x=t[h])[0],x[1]):m(t[h]))&&y instanceof a)return y;return new a(!1)}p=v.call(t)}for(g=p.next;!(x=g.call(p)).done;)if("object"==typeof(y=f(p,m,x.value,s))&&y&&y instanceof a)return y;return new a(!1)}).stop=function(t){return new a(!0,t)}},function(t,n,e){var r=e(7).f,o=e(3),i=e(1)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){var r={};r[e(1)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,n,e){var r=e(0),o=e(6);t.exports=function(t,n){try{o(r,t,n)}catch(e){r[t]=n}return n}},function(t,n,e){var r=e(0),o=e(2),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+r).toString(36)}},function(t,n,e){var r=e(42),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},function(t,n,e){var r=e(41),o=e(25),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n,e){var r=e(8);t.exports=function(t,n,e){for(var o in n)r(t,o,n[o],e);return t}},function(t,n,e){var r=e(17),o=e(2),i=e(3),u=e(7).f,c=e(25),f=e(72),a=c("meta"),s=0,l=Object.isExtensible||function(){return!0},p=function(t){u(t,a,{value:{objectID:"O"+ ++s,weakData:{}}})},v=t.exports={REQUIRED:!1,fastKey:function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,a)){if(!l(t))return"F";if(!n)return"E";p(t)}return t[a].objectID},getWeakData:function(t,n){if(!i(t,a)){if(!l(t))return!0;if(!n)return!1;p(t)}return t[a].weakData},onFreeze:function(t){return f&&v.REQUIRED&&l(t)&&!i(t,a)&&p(t),t}};r[a]=!0},function(t,n,e){var r=e(9),o=e(74),i=e(24),u=e(18),c=e(44),f=e(3),a=e(43),s=Object.getOwnPropertyDescriptor;n.f=r?s:function(t,n){if(t=u(t),n=c(n,!0),a)try{return s(t,n)}catch(t){}if(f(t,n))return i(!o.f.call(t,n),t[n])}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(0);t.exports=r},function(t,n,e){var r=e(34),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,n,e){var r=e(4),o=/#|\.prototype\./,i=function(t,n){var e=c[u(t)];return e==a||e!=f&&("function"==typeof n?r(n):!!n)},u=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},f=i.NATIVE="N",a=i.POLYFILL="P";t.exports=i},function(t,n,e){var r=e(16);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 0:return function(){return t.call(n)};case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t,n,e){if(!(t instanceof n))throw TypeError("Incorrect "+(e?e+" ":"")+"invocation");return t}},function(t,n,e){"use strict";var r=e(16),o=function(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=r(n),this.reject=r(e)};t.exports.f=function(t){return new o(t)}},function(t,n,e){var r=e(21),o=e(8),i=e(70);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,n,e){var r=e(13),o=e(42);(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.6.1",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,n,e){var r=e(0),o=e(22),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,n,e){var r=e(9),o=e(4),i=e(23);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(2);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){var r=e(4);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(t,n,e){var r=e(0),o=e(26),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},function(t,n,e){var r=e(21),o=e(11),i=e(1)("toStringTag"),u="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var n,e,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),i))?e:u?o(n):"Object"==(r=o(n))&&"function"==typeof n.callee?"Arguments":r}},function(t,n,e){var r=e(4),o=e(11),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,n,e){var r=e(3),o=e(18),i=e(78).indexOf,u=e(17);t.exports=function(t,n){var e,c=o(t),f=0,a=[];for(e in c)!r(u,e)&&r(c,e)&&a.push(e);for(;n.length>f;)r(c,e=n[f++])&&(~i(a,e)||a.push(e));return a}},function(t,n,e){var r=e(1)("iterator"),o=!1;try{var i=0,u={next:function(){return{done:!!i++}},return:function(){o=!0}};u[r]=function(){return this},Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!o)return!1;var e=!1;try{var i={};i[r]=function(){return{next:function(){return{done:e=!0}}}},t(i)}catch(t){}return e}},function(t,n,e){var r=e(5),o=e(85);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,n=!1,e={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),n=e instanceof Array}catch(t){}return function(e,i){return r(e),o(i),n?t.call(e,i):e.__proto__=i,e}}():void 0)},function(t,n,e){var r=e(31);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(0),o=e(90),i=e(91),u=e(6),c=e(1),f=c("iterator"),a=c("toStringTag"),s=i.values;for(var l in o){var p=r[l],v=p&&p.prototype;if(v){if(v[f]!==s)try{u(v,f,s)}catch(t){v[f]=s}if(v[a]||u(v,a,l),o[l])for(var h in i)if(v[h]!==i[h])try{u(v,h,i[h])}catch(t){v[h]=i[h]}}}},function(t,n,e){var r,o=e(5),i=e(93),u=e(35),c=e(17),f=e(55),a=e(23),s=e(27),l=s("IE_PROTO"),p=function(){},v=function(t){return"<script>"+t+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;h=r?function(t){t.write(v("")),t.close();var n=t.parentWindow.Object;return t=null,n}(r):((n=a("iframe")).style.display="none",f.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F);for(var e=u.length;e--;)delete h.prototype[u[e]];return h()};c[l]=!0,t.exports=Object.create||function(t,n){var e;return null!==t?(p.prototype=o(t),e=new p,p.prototype=null,e[l]=t):e=h(),void 0===n?e:i(e,n)}},function(t,n,e){var r=e(12);t.exports=r("document","documentElement")},function(t,n,e){"use strict";var r=e(14),o=e(95),i=e(58),u=e(51),c=e(20),f=e(6),a=e(8),s=e(1),l=e(13),p=e(15),v=e(57),h=v.IteratorPrototype,d=v.BUGGY_SAFARI_ITERATORS,y=s("iterator"),g=function(){return this};t.exports=function(t,n,e,s,v,x,m){o(e,n,s);var b,j,S,w=function(t){if(t===v&&A)return A;if(!d&&t in P)return P[t];switch(t){case"keys":case"values":case"entries":return function(){return new e(this,t)}}return function(){return new e(this)}},O=n+" Iterator",E=!1,P=t.prototype,T=P[y]||P["@@iterator"]||v&&P[v],A=!d&&T||w(v),M="Array"==n&&P.entries||T;if(M&&(b=i(M.call(new t)),h!==Object.prototype&&b.next&&(l||i(b)===h||(u?u(b,h):"function"!=typeof b[y]&&f(b,y,g)),c(b,O,!0,!0),l&&(p[O]=g))),"values"==v&&T&&"values"!==T.name&&(E=!0,A=function(){return T.call(this)}),l&&!m||P[y]===A||f(P,y,A),p[n]=A,v)if(j={values:w("values"),keys:x?A:w("keys"),entries:w("entries")},m)for(S in j)!d&&!E&&S in P||a(P,S,j[S]);else r({target:n,proto:!0,forced:d||E},j);return j}},function(t,n,e){"use strict";var r,o,i,u=e(58),c=e(6),f=e(3),a=e(1),s=e(13),l=a("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):p=!0),null==r&&(r={}),s||f(r,l)||c(r,l,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(t,n,e){var r=e(3),o=e(52),i=e(27),u=e(96),c=i("IE_PROTO"),f=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){return t=o(t),r(t,c)?t[c]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?f:null}},function(t,n,e){var r=e(0);t.exports=r.Promise},function(t,n,e){var r=e(5),o=e(16),i=e(1)("species");t.exports=function(t,n){var e,u=r(t).constructor;return void 0===u||null==(e=r(u)[i])?n:o(e)}},function(t,n,e){var r,o,i,u=e(0),c=e(4),f=e(11),a=e(37),s=e(55),l=e(23),p=e(62),v=u.location,h=u.setImmediate,d=u.clearImmediate,y=u.process,g=u.MessageChannel,x=u.Dispatch,m=0,b={},j=function(t){if(b.hasOwnProperty(t)){var n=b[t];delete b[t],n()}},S=function(t){return function(){j(t)}},w=function(t){j(t.data)},O=function(t){u.postMessage(t+"",v.protocol+"//"+v.host)};h&&d||(h=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return b[++m]=function(){("function"==typeof t?t:Function(t)).apply(void 0,n)},r(m),m},d=function(t){delete b[t]},"process"==f(y)?r=function(t){y.nextTick(S(t))}:x&&x.now?r=function(t){x.now(S(t))}:g&&!p?(i=(o=new g).port2,o.port1.onmessage=w,r=a(i.postMessage,i,1)):!u.addEventListener||"function"!=typeof postMessage||u.importScripts||c(O)?r="onreadystatechange"in l("script")?function(t){s.appendChild(l("script")).onreadystatechange=function(){s.removeChild(this),j(t)}}:function(t){setTimeout(S(t),0)}:(r=O,u.addEventListener("message",w,!1))),t.exports={set:h,clear:d}},function(t,n,e){var r=e(63);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(t,n,e){var r=e(12);t.exports=r("navigator","userAgent")||""},function(t,n,e){var r=e(5),o=e(2),i=e(39);t.exports=function(t,n){if(r(t),o(n)&&n.constructor===t)return n;var e=i.f(t);return(0,e.resolve)(n),e.promise}},function(t,n){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,n,e){"use strict";e(67),e(97)},function(t,n,e){var r=e(68);t.exports=r},function(t,n,e){e(40),e(71),e(53);var r=e(32);t.exports=r.WeakMap},function(t,n,e){var r=e(45);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,n,e){"use strict";var r=e(21),o=e(47);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,n,e){"use strict";var r,o=e(0),i=e(28),u=e(29),c=e(73),f=e(86),a=e(2),s=e(10).enforce,l=e(46),p=!o.ActiveXObject&&"ActiveXObject"in o,v=Object.isExtensible,h=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},d=t.exports=c("WeakMap",h,f);if(l&&p){r=f.getConstructor(h,"WeakMap",!0),u.REQUIRED=!0;var y=d.prototype,g=y.delete,x=y.has,m=y.get,b=y.set;i(y,{delete:function(t){if(a(t)&&!v(t)){var n=s(this);return n.frozen||(n.frozen=new r),g.call(this,t)||n.frozen.delete(t)}return g.call(this,t)},has:function(t){if(a(t)&&!v(t)){var n=s(this);return n.frozen||(n.frozen=new r),x.call(this,t)||n.frozen.has(t)}return x.call(this,t)},get:function(t){if(a(t)&&!v(t)){var n=s(this);return n.frozen||(n.frozen=new r),x.call(this,t)?m.call(this,t):n.frozen.get(t)}return m.call(this,t)},set:function(t,n){if(a(t)&&!v(t)){var e=s(this);e.frozen||(e.frozen=new r),x.call(this,t)?b.call(this,t,n):e.frozen.set(t,n)}else b.call(this,t,n);return this}})}},function(t,n,e){var r=e(4);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,n,e){"use strict";var r=e(14),o=e(0),i=e(36),u=e(8),c=e(29),f=e(19),a=e(38),s=e(2),l=e(4),p=e(50),v=e(20),h=e(84);t.exports=function(t,n,e){var d=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),g=d?"set":"add",x=o[t],m=x&&x.prototype,b=x,j={},S=function(t){var n=m[t];u(m,t,"add"==t?function(t){return n.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(y&&!s(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!s(t)?void 0:n.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!s(t))&&n.call(this,0===t?0:t)}:function(t,e){return n.call(this,0===t?0:t,e),this})};if(i(t,"function"!=typeof x||!(y||m.forEach&&!l((function(){(new x).entries().next()})))))b=e.getConstructor(n,t,d,g),c.REQUIRED=!0;else if(i(t,!0)){var w=new b,O=w[g](y?{}:-0,1)!=w,E=l((function(){w.has(1)})),P=p((function(t){new x(t)})),T=!y&&l((function(){for(var t=new x,n=5;n--;)t[g](n,n);return!t.has(-0)}));P||((b=n((function(n,e){a(n,b,t);var r=h(new x,n,b);return null!=e&&f(e,r[g],r,d),r}))).prototype=m,m.constructor=b),(E||T)&&(S("delete"),S("has"),d&&S("get")),(T||O)&&S(g),y&&m.clear&&delete m.clear}return j[t]=b,r({global:!0,forced:b!=x},j),v(b,t),y||e.setStrong(b,t,d),b}},function(t,n,e){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);n.f=i?function(t){var n=o(this,t);return!!n&&n.enumerable}:r},function(t,n,e){var r=e(3),o=e(76),i=e(30),u=e(7);t.exports=function(t,n){for(var e=o(n),c=u.f,f=i.f,a=0;a<e.length;a++){var s=e[a];r(t,s)||c(t,s,f(n,s))}}},function(t,n,e){var r=e(12),o=e(77),i=e(80),u=e(5);t.exports=r("Reflect","ownKeys")||function(t){var n=o.f(u(t)),e=i.f;return e?n.concat(e(t)):n}},function(t,n,e){var r=e(49),o=e(35).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n,e){var r=e(18),o=e(33),i=e(79),u=function(t){return function(n,e,u){var c,f=r(n),a=o(f.length),s=i(u,a);if(t&&e!=e){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===e)return t||s||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},function(t,n,e){var r=e(34),o=Math.max,i=Math.min;t.exports=function(t,n){var e=r(t);return e<0?o(e+n,0):i(e,n)}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(1),o=e(15),i=r("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[i]===t)}},function(t,n,e){var r=e(47),o=e(15),i=e(1)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n,e){var r=e(5);t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(n){var i=t.return;throw void 0!==i&&r(i.call(t)),n}}},function(t,n,e){var r=e(2),o=e(51);t.exports=function(t,n,e){var i,u;return o&&"function"==typeof(i=n.constructor)&&i!==e&&r(u=i.prototype)&&u!==e.prototype&&o(t,u),t}},function(t,n,e){var r=e(2);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,n,e){"use strict";var r=e(28),o=e(29).getWeakData,i=e(5),u=e(2),c=e(38),f=e(19),a=e(87),s=e(3),l=e(10),p=l.set,v=l.getterFor,h=a.find,d=a.findIndex,y=0,g=function(t){return t.frozen||(t.frozen=new x)},x=function(){this.entries=[]},m=function(t,n){return h(t.entries,(function(t){return t[0]===n}))};x.prototype={get:function(t){var n=m(this,t);if(n)return n[1]},has:function(t){return!!m(this,t)},set:function(t,n){var e=m(this,t);e?e[1]=n:this.entries.push([t,n])},delete:function(t){var n=d(this.entries,(function(n){return n[0]===t}));return~n&&this.entries.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,a){var l=t((function(t,r){c(t,l,n),p(t,{type:n,id:y++,frozen:void 0}),null!=r&&f(r,t[a],t,e)})),h=v(n),d=function(t,n,e){var r=h(t),u=o(i(n),!0);return!0===u?g(r).set(n,e):u[r.id]=e,t};return r(l.prototype,{delete:function(t){var n=h(this);if(!u(t))return!1;var e=o(t);return!0===e?g(n).delete(t):e&&s(e,n.id)&&delete e[n.id]},has:function(t){var n=h(this);if(!u(t))return!1;var e=o(t);return!0===e?g(n).has(t):e&&s(e,n.id)}}),r(l.prototype,e?{get:function(t){var n=h(this);if(u(t)){var e=o(t);return!0===e?g(n).get(t):e?e[n.id]:void 0}},set:function(t,n){return d(this,t,n)}}:{add:function(t){return d(this,t,!0)}}),l}}},function(t,n,e){var r=e(37),o=e(48),i=e(52),u=e(33),c=e(88),f=[].push,a=function(t){var n=1==t,e=2==t,a=3==t,s=4==t,l=6==t,p=5==t||l;return function(v,h,d,y){for(var g,x,m=i(v),b=o(m),j=r(h,d,3),S=u(b.length),w=0,O=y||c,E=n?O(v,S):e?O(v,0):void 0;S>w;w++)if((p||w in b)&&(x=j(g=b[w],w,m),t))if(n)E[w]=x;else if(x)switch(t){case 3:return!0;case 5:return g;case 6:return w;case 2:f.call(E,g)}else if(s)return!1;return l?-1:a||s?s:E}};t.exports={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6)}},function(t,n,e){var r=e(2),o=e(89),i=e(1)("species");t.exports=function(t,n){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)?r(e)&&null===(e=e[i])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===n?0:n)}},function(t,n,e){var r=e(11);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,n,e){"use strict";var r=e(18),o=e(92),i=e(15),u=e(10),c=e(56),f=u.set,a=u.getterFor("Array Iterator");t.exports=c(Array,"Array",(function(t,n){f(this,{type:"Array Iterator",target:r(t),index:0,kind:n})}),(function(){var t=a(this),n=t.target,e=t.kind,r=t.index++;return!n||r>=n.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:r,done:!1}:"values"==e?{value:n[r],done:!1}:{value:[r,n[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,n,e){var r=e(1),o=e(54),i=e(7),u=r("unscopables"),c=Array.prototype;null==c[u]&&i.f(c,u,{configurable:!0,value:o(null)}),t.exports=function(t){c[u][t]=!0}},function(t,n,e){var r=e(9),o=e(7),i=e(5),u=e(94);t.exports=r?Object.defineProperties:function(t,n){i(t);for(var e,r=u(n),c=r.length,f=0;c>f;)o.f(t,e=r[f++],n[e]);return t}},function(t,n,e){var r=e(49),o=e(35);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){"use strict";var r=e(57).IteratorPrototype,o=e(54),i=e(24),u=e(20),c=e(15),f=function(){return this};t.exports=function(t,n,e){var a=n+" Iterator";return t.prototype=o(r,{next:i(1,e)}),u(t,a,!1,!0),c[a]=f,t}},function(t,n,e){var r=e(4);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,n,e){var r=e(98);t.exports=r},function(t,n,e){e(40),e(99),e(53),e(101),e(106),e(107);var r=e(32);t.exports=r.Promise},function(t,n,e){"use strict";var r=e(100).charAt,o=e(10),i=e(56),u=o.set,c=o.getterFor("String Iterator");i(String,"String",(function(t){u(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,n=c(this),e=n.string,o=n.index;return o>=e.length?{value:void 0,done:!0}:(t=r(e,o),n.index+=t.length,{value:t,done:!1})}))},function(t,n,e){var r=e(34),o=e(31),i=function(t){return function(n,e){var i,u,c=String(o(n)),f=r(e),a=c.length;return f<0||f>=a?t?"":void 0:(i=c.charCodeAt(f))<55296||i>56319||f+1===a||(u=c.charCodeAt(f+1))<56320||u>57343?t?c.charAt(f):i:t?c.slice(f,f+2):u-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},function(t,n,e){"use strict";var r,o,i,u,c=e(14),f=e(13),a=e(0),s=e(12),l=e(59),p=e(8),v=e(28),h=e(20),d=e(102),y=e(2),g=e(16),x=e(38),m=e(11),b=e(26),j=e(19),S=e(50),w=e(60),O=e(61).set,E=e(103),P=e(64),T=e(104),A=e(39),M=e(65),_=e(10),L=e(36),k=e(1),I=e(105),R=k("species"),z="Promise",C=_.get,D=_.set,F=_.getterFor(z),G=l,N=a.TypeError,W=a.document,U=a.process,V=s("fetch"),H=A.f,B=H,Q="process"==m(U),q=!!(W&&W.createEvent&&a.dispatchEvent),K=L(z,(function(){if(!(b(G)!==String(G))){if(66===I)return!0;if(!Q&&"function"!=typeof PromiseRejectionEvent)return!0}if(f&&!G.prototype.finally)return!0;if(I>=51&&/native code/.test(G))return!1;var t=G.resolve(1),n=function(t){t((function(){}),(function(){}))};return(t.constructor={})[R]=n,!(t.then((function(){}))instanceof n)})),X=K||!S((function(t){G.all(t).catch((function(){}))})),Y=function(t){var n;return!(!y(t)||"function"!=typeof(n=t.then))&&n},J=function(t,n,e){if(!n.notified){n.notified=!0;var r=n.reactions;E((function(){for(var o=n.value,i=1==n.state,u=0;r.length>u;){var c,f,a,s=r[u++],l=i?s.ok:s.fail,p=s.resolve,v=s.reject,h=s.domain;try{l?(i||(2===n.rejection&&nt(t,n),n.rejection=1),!0===l?c=o:(h&&h.enter(),c=l(o),h&&(h.exit(),a=!0)),c===s.promise?v(N("Promise-chain cycle")):(f=Y(c))?f.call(c,p,v):p(c)):v(o)}catch(t){h&&!a&&h.exit(),v(t)}}n.reactions=[],n.notified=!1,e&&!n.rejection&&$(t,n)}))}},Z=function(t,n,e){var r,o;q?((r=W.createEvent("Event")).promise=n,r.reason=e,r.initEvent(t,!1,!0),a.dispatchEvent(r)):r={promise:n,reason:e},(o=a["on"+t])?o(r):"unhandledrejection"===t&&T("Unhandled promise rejection",e)},$=function(t,n){O.call(a,(function(){var e,r=n.value;if(tt(n)&&(e=M((function(){Q?U.emit("unhandledRejection",r,t):Z("unhandledrejection",t,r)})),n.rejection=Q||tt(n)?2:1,e.error))throw e.value}))},tt=function(t){return 1!==t.rejection&&!t.parent},nt=function(t,n){O.call(a,(function(){Q?U.emit("rejectionHandled",t):Z("rejectionhandled",t,n.value)}))},et=function(t,n,e,r){return function(o){t(n,e,o,r)}},rt=function(t,n,e,r){n.done||(n.done=!0,r&&(n=r),n.value=e,n.state=2,J(t,n,!0))},ot=function(t,n,e,r){if(!n.done){n.done=!0,r&&(n=r);try{if(t===e)throw N("Promise can't be resolved itself");var o=Y(e);o?E((function(){var r={done:!1};try{o.call(e,et(ot,t,r,n),et(rt,t,r,n))}catch(e){rt(t,r,e,n)}})):(n.value=e,n.state=1,J(t,n,!1))}catch(e){rt(t,{done:!1},e,n)}}};K&&(G=function(t){x(this,G,z),g(t),r.call(this);var n=C(this);try{t(et(ot,this,n),et(rt,this,n))}catch(t){rt(this,n,t)}},(r=function(t){D(this,{type:z,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=v(G.prototype,{then:function(t,n){var e=F(this),r=H(w(this,G));return r.ok="function"!=typeof t||t,r.fail="function"==typeof n&&n,r.domain=Q?U.domain:void 0,e.parent=!0,e.reactions.push(r),0!=e.state&&J(this,e,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,n=C(t);this.promise=t,this.resolve=et(ot,t,n),this.reject=et(rt,t,n)},A.f=H=function(t){return t===G||t===i?new o(t):B(t)},f||"function"!=typeof l||(u=l.prototype.then,p(l.prototype,"then",(function(t,n){var e=this;return new G((function(t,n){u.call(e,t,n)})).then(t,n)}),{unsafe:!0}),"function"==typeof V&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return P(G,V.apply(a,arguments))}}))),c({global:!0,wrap:!0,forced:K},{Promise:G}),h(G,z,!1,!0),d(z),i=s(z),c({target:z,stat:!0,forced:K},{reject:function(t){var n=H(this);return n.reject.call(void 0,t),n.promise}}),c({target:z,stat:!0,forced:f||K},{resolve:function(t){return P(f&&this===i?G:this,t)}}),c({target:z,stat:!0,forced:X},{all:function(t){var n=this,e=H(n),r=e.resolve,o=e.reject,i=M((function(){var e=g(n.resolve),i=[],u=0,c=1;j(t,(function(t){var f=u++,a=!1;i.push(void 0),c++,e.call(n,t).then((function(t){a||(a=!0,i[f]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),e.promise},race:function(t){var n=this,e=H(n),r=e.reject,o=M((function(){var o=g(n.resolve);j(t,(function(t){o.call(n,t).then(e.resolve,r)}))}));return o.error&&r(o.value),e.promise}})},function(t,n,e){"use strict";var r=e(12),o=e(7),i=e(1),u=e(9),c=i("species");t.exports=function(t){var n=r(t),e=o.f;u&&n&&!n[c]&&e(n,c,{configurable:!0,get:function(){return this}})}},function(t,n,e){var r,o,i,u,c,f,a,s,l=e(0),p=e(30).f,v=e(11),h=e(61).set,d=e(62),y=l.MutationObserver||l.WebKitMutationObserver,g=l.process,x=l.Promise,m="process"==v(g),b=p(l,"queueMicrotask"),j=b&&b.value;j||(r=function(){var t,n;for(m&&(t=g.domain)&&t.exit();o;){n=o.fn,o=o.next;try{n()}catch(t){throw o?u():i=void 0,t}}i=void 0,t&&t.enter()},m?u=function(){g.nextTick(r)}:y&&!d?(c=!0,f=document.createTextNode(""),new y(r).observe(f,{characterData:!0}),u=function(){f.data=c=!c}):x&&x.resolve?(a=x.resolve(void 0),s=a.then,u=function(){s.call(a,r)}):u=function(){h.call(l,r)}),t.exports=j||function(t){var n={fn:t,next:void 0};i&&(i.next=n),o||(o=n,u()),i=n}},function(t,n,e){var r=e(0);t.exports=function(t,n){var e=r.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}},function(t,n,e){var r,o,i=e(0),u=e(63),c=i.process,f=c&&c.versions,a=f&&f.v8;a?o=(r=a.split("."))[0]+r[1]:u&&(!(r=u.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=u.match(/Chrome\/(\d+)/))&&(o=r[1]),t.exports=o&&+o},function(t,n,e){"use strict";var r=e(14),o=e(16),i=e(39),u=e(65),c=e(19);r({target:"Promise",stat:!0},{allSettled:function(t){var n=this,e=i.f(n),r=e.resolve,f=e.reject,a=u((function(){var e=o(n.resolve),i=[],u=0,f=1;c(t,(function(t){var o=u++,c=!1;i.push(void 0),f++,e.call(n,t).then((function(t){c||(c=!0,i[o]={status:"fulfilled",value:t},--f||r(i))}),(function(t){c||(c=!0,i[o]={status:"rejected",reason:t},--f||r(i))}))})),--f||r(i)}));return a.error&&f(a.value),e.promise}})},function(t,n,e){"use strict";var r=e(14),o=e(13),i=e(59),u=e(4),c=e(12),f=e(60),a=e(64),s=e(8);r({target:"Promise",proto:!0,real:!0,forced:!!i&&u((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var n=f(this,c("Promise")),e="function"==typeof t;return this.then(e?function(e){return a(n,t()).then((function(){return e}))}:t,e?function(e){return a(n,t()).then((function(){throw e}))}:t)}}),o||"function"!=typeof i||i.prototype.finally||s(i.prototype,"finally",c("Promise").prototype.finally)}]);

@@ -633,2 +633,3 @@ "use strict";

* Execute AsyncSteps with Promise interface
* @alias AsyncSteps#promise
* @returns {Promise} - promise wrapper for AsyncSteps

@@ -658,2 +659,13 @@ */

/**
* Create a new instance of AsyncSteps for independent execution
* @alias AsyncSteps#newInstance
* @returns {AsyncSteps} new instance
*/
}, {
key: "newInstance",
value: function newInstance() {
return new AsyncSteps(null, this._async_tool);
}
/**
* Not standard API for assertion with multiple instances of the module.

@@ -660,0 +672,0 @@ * @private

@@ -384,2 +384,12 @@ "use strict";

}, {
key: "newInstance",
value: function newInstance() {
return this._root.newInstance();
}
/**
* @private
* @override
*/
}, {
key: "isAsyncSteps",

@@ -386,0 +396,0 @@ value: function isAsyncSteps() {

@@ -1588,2 +1588,29 @@ 'use strict'; // ensure it works with frozen one

});
describe('#newInstance', function () {
it('should create on root object', function (done) {
var as = async_steps();
var as2 = as.newInstance();
expect(as2).not.equal(as);
expect(as2)["instanceof"](async_steps.AsyncSteps);
as2.add(function (as) {
return done();
}).execute();
});
it('should create on ASP object', function (done) {
var as = async_steps();
as.add(function (as) {
try {
var as2 = as.newInstance();
expect(as2).not.equal(as._root);
expect(as2)["instanceof"](async_steps.AsyncSteps);
as2.add(function (as) {
return done();
}).execute();
} catch (e) {
done(e);
}
});
as.execute();
});
});
}

@@ -1590,0 +1617,0 @@

@@ -339,2 +339,3 @@ "use strict";

/**

@@ -344,2 +345,10 @@ * @private

*/
newInstance() {
return this._root.newInstance();
}
/**
* @private
* @override
*/
isAsyncSteps() {

@@ -346,0 +355,0 @@ return true;

{
"name": "futoin-asyncsteps",
"version": "2.4.3",
"version": "2.5.0",
"description": "Mimic traditional threads in single threaded event loop",

@@ -53,10 +53,10 @@ "main": "lib/main-full.js",

"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/plugin-transform-object-assign": "^7.2.0",
"@babel/preset-env": "^7.6.3",
"@babel/core": "^7.7.7",
"@babel/plugin-transform-object-assign": "^7.7.4",
"@babel/preset-env": "^7.7.7",
"@futoin/optihelp": "^1.2.2",
"babel-loader": "^8.0.6",
"chai": "^4.2.0",
"core-js": "^3.3.6",
"eslint": "^6.6.0",
"core-js": "^3.6.1",
"eslint": "^6.8.0",
"grunt": "^1.0.4",

@@ -67,3 +67,3 @@ "grunt-babel": "^8.0.0",

"grunt-karma": "^3.0.2",
"grunt-simple-nyc": "^3.0.0",
"grunt-simple-nyc": "^3.0.1",
"grunt-text-replace": "^0.4.0",

@@ -75,4 +75,4 @@ "grunt-webpack": "^3.1.3",

"karma-mocha-reporter": "^2.2.5",
"mocha": "^6.2.2",
"webpack": "^4.41.2"
"mocha": "^7.0.0",
"webpack": "^4.41.5"
},

@@ -79,0 +79,0 @@ "dependencies": {

@@ -26,3 +26,3 @@

FTN12: FutoIn Async API
Version: 1.11
Version: 1.13

@@ -753,2 +753,4 @@ Spec: [FTN12: FutoIn Async API v1.x](https://specs.futoin.org/final/preview/ftn12_async_api-1.html)

* [.await(promise, [onerror])](#AsyncSteps+await) ⇒ [<code>AsyncSteps</code>](#AsyncSteps)
* [.promise()](#AsyncSteps+promise) ⇒ <code>Promise</code>
* [.newInstance()](#AsyncSteps+newInstance) ⇒ [<code>AsyncSteps</code>](#AsyncSteps)
* [.success([..._arg])](#AsyncSteps+success)

@@ -927,2 +929,16 @@ * [.setTimeout(timeout_ms)](#AsyncSteps+setTimeout) ⇒ [<code>AsyncSteps</code>](#AsyncSteps)

<a name="AsyncSteps+promise"></a>
### asyncSteps.promise() ⇒ <code>Promise</code>
Execute AsyncSteps with Promise interface
**Kind**: instance method of [<code>AsyncSteps</code>](#AsyncSteps)
**Returns**: <code>Promise</code> - - promise wrapper for AsyncSteps
<a name="AsyncSteps+newInstance"></a>
### asyncSteps.newInstance() ⇒ [<code>AsyncSteps</code>](#AsyncSteps)
Create a new instance of AsyncSteps for independent execution
**Kind**: instance method of [<code>AsyncSteps</code>](#AsyncSteps)
**Returns**: [<code>AsyncSteps</code>](#AsyncSteps) - new instance
<a name="AsyncSteps+success"></a>

@@ -1035,2 +1051,4 @@

* [.await(promise, [onerror])](#AsyncSteps+await) ⇒ [<code>AsyncSteps</code>](#AsyncSteps)
* [.promise()](#AsyncSteps+promise) ⇒ <code>Promise</code>
* [.newInstance()](#AsyncSteps+newInstance) ⇒ [<code>AsyncSteps</code>](#AsyncSteps)
* [.success([..._arg])](#AsyncSteps+success)

@@ -1209,2 +1227,16 @@ * [.setTimeout(timeout_ms)](#AsyncSteps+setTimeout) ⇒ [<code>AsyncSteps</code>](#AsyncSteps)

<a name="AsyncSteps+promise"></a>
### asyncSteps.promise() ⇒ <code>Promise</code>
Execute AsyncSteps with Promise interface
**Kind**: instance method of [<code>AsyncSteps</code>](#AsyncSteps)
**Returns**: <code>Promise</code> - - promise wrapper for AsyncSteps
<a name="AsyncSteps+newInstance"></a>
### asyncSteps.newInstance() ⇒ [<code>AsyncSteps</code>](#AsyncSteps)
Create a new instance of AsyncSteps for independent execution
**Kind**: instance method of [<code>AsyncSteps</code>](#AsyncSteps)
**Returns**: [<code>AsyncSteps</code>](#AsyncSteps) - new instance
<a name="AsyncSteps+success"></a>

@@ -1211,0 +1243,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc