UNPKG

@alicloud/mpserverless-core

Version:

MPServerless JavaScript SDK Core

1 lines 42.5 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@alicloud/mpserverless-core"]=e():t["@alicloud/mpserverless-core"]=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};t[n].call(o.exports,o,o.exports,r);o.l=!0;return o.exports}r.m=t;r.c=e;r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})};r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});Object.defineProperty(t,"__esModule",{value:!0})};r.t=function(t,e){1&e&&(t=r(t));if(8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);r.r(n);Object.defineProperty(n,"default",{enumerable:!0,value:t});if(2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n};r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};r.d(e,"a",e);return e};r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};r.p="";return r(r.s="./src/index.ts")}({"../../node_modules/_process@0.11.10@process/browser.js":function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(t){n=u}}();function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout){r=setTimeout;return setTimeout(t,0)}try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}var c,s=[],f=!1,l=-1;function p(){if(f&&c){f=!1;c.length?s=c.concat(s):l=-1;s.length&&y()}}function y(){if(!f){var t=a(p);f=!0;for(var e=s.length;e;){c=s;s=[];for(;++l<e;)c&&c[l].run();l=-1;e=s.length}c=null;f=!1;!function(t){if(n===clearTimeout)return clearTimeout(t);if((n===u||!n)&&clearTimeout){n=clearTimeout;return clearTimeout(t)}try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new h(t,e));1!==s.length||f||a(y)};function h(t,e){this.fun=t;this.array=e}h.prototype.run=function(){this.fun.apply(null,this.array)};o.title="browser";o.browser=!0;o.env={};o.argv=[];o.version="";o.versions={};function d(){}o.on=d;o.addListener=d;o.once=d;o.off=d;o.removeListener=d;o.removeAllListeners=d;o.emit=d;o.prependListener=d;o.prependOnceListener=d;o.listeners=function(t){return[]};o.binding=function(t){throw new Error("process.binding is not supported")};o.cwd=function(){return"/"};o.chdir=function(t){throw new Error("process.chdir is not supported")};o.umask=function(){return 0}},"../../node_modules/_util@0.11.1@util/node_modules/inherits/inherits_browser.js":function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e;t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype;t.prototype=new r;t.prototype.constructor=t}},"../../node_modules/_util@0.11.1@util/support/isBufferBrowser.js":function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},"../../node_modules/_util@0.11.1@util/util.js":function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},o=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,i=n.length,u=String(t).replace(o,(function(t){if("%%"===t)return"%";if(r>=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),c=n[r];r<i;c=n[++r])d(c)||!w(c)?u+=" "+c:u+=" "+a(c);return u};e.deprecate=function(r,n){if(void 0!==t&&!0===t.noDeprecation)return r;if(void 0===t)return function(){return e.deprecate(r,n).apply(this,arguments)};var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n);o=!0}return r.apply(this,arguments)}};var i,u={};e.debuglog=function(r){v(i)&&(i=t.env.NODE_DEBUG||"");r=r.toUpperCase();if(!u[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=t.pid;u[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else u[r]=function(){};return u[r]};function a(t,r){var n={seen:[],stylize:s};arguments.length>=3&&(n.depth=arguments[2]);arguments.length>=4&&(n.colors=arguments[3]);h(r)?n.showHidden=r:r&&e._extend(n,r);v(n.showHidden)&&(n.showHidden=!1);v(n.depth)&&(n.depth=2);v(n.colors)&&(n.colors=!1);v(n.customInspect)&&(n.customInspect=!0);n.colors&&(n.stylize=c);return f(n,t,n.depth)}e.inspect=a;a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function s(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);m(o)||(o=f(t,o,n));return o}var i=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(b(e))return t.stylize(""+e,"number");if(h(e))return t.stylize(""+e,"boolean");if(d(e))return t.stylize("null","null")}(t,r);if(i)return i;var u=Object.keys(r),a=function(t){var e={};t.forEach((function(t,r){e[t]=!0}));return e}(u);t.showHidden&&(u=Object.getOwnPropertyNames(r));if(j(r)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return l(r);if(0===u.length){if(E(r)){var c=r.name?": "+r.name:"";return t.stylize("[Function"+c+"]","special")}if(g(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(O(r))return t.stylize(Date.prototype.toString.call(r),"date");if(j(r))return l(r)}var s,w="",P=!1,T=["{","}"];if(y(r)){P=!0;T=["[","]"]}if(E(r)){w=" [Function"+(r.name?": "+r.name:"")+"]"}g(r)&&(w=" "+RegExp.prototype.toString.call(r));O(r)&&(w=" "+Date.prototype.toUTCString.call(r));j(r)&&(w=" "+l(r));if(0===u.length&&(!P||0==r.length))return T[0]+w+T[1];if(n<0)return g(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);s=P?function(t,e,r,n,o){for(var i=[],u=0,a=e.length;u<a;++u)x(e,String(u))?i.push(p(t,e,r,n,String(u),!0)):i.push("");o.forEach((function(o){o.match(/^\d+$/)||i.push(p(t,e,r,n,o,!0))}));return i}(t,r,n,a,u):u.map((function(e){return p(t,r,n,a,e,P)}));t.seen.pop();return function(t,e,r){if(t.reduce((function(t,e){0;e.indexOf("\n")>=0&&0;return t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(s,w,T)}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,o,i){var u,a,c;(c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special"));x(n,o)||(u="["+o+"]");a||(t.seen.indexOf(c.value)<0?(a=d(r)?f(t,c.value,null):f(t,c.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special"));if(v(u)){if(i&&o.match(/^\d+$/))return a;if((u=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){u=u.substr(1,u.length-2);u=t.stylize(u,"name")}else{u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");u=t.stylize(u,"string")}}return u+": "+a}function y(t){return Array.isArray(t)}e.isArray=y;function h(t){return"boolean"==typeof t}e.isBoolean=h;function d(t){return null===t}e.isNull=d;e.isNullOrUndefined=function(t){return null==t};function b(t){return"number"==typeof t}e.isNumber=b;function m(t){return"string"==typeof t}e.isString=m;e.isSymbol=function(t){return"symbol"==typeof t};function v(t){return void 0===t}e.isUndefined=v;function g(t){return w(t)&&"[object RegExp]"===P(t)}e.isRegExp=g;function w(t){return"object"==typeof t&&null!==t}e.isObject=w;function O(t){return w(t)&&"[object Date]"===P(t)}e.isDate=O;function j(t){return w(t)&&("[object Error]"===P(t)||t instanceof Error)}e.isError=j;function E(t){return"function"==typeof t}e.isFunction=E;e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t};e.isBuffer=r("../../node_modules/_util@0.11.1@util/support/isBufferBrowser.js");function P(t){return Object.prototype.toString.call(t)}function T(t){return t<10?"0"+t.toString(10):t.toString(10)}var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var t=new Date,e=[T(t.getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":");return[t.getDate(),_[t.getMonth()],e].join(" ")}e.log=function(){console.log("%s - %s",S(),e.format.apply(e,arguments))};e.inherits=r("../../node_modules/_util@0.11.1@util/node_modules/inherits/inherits_browser.js");e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(k&&t[k]){var e;if("function"!=typeof(e=t[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0});return e}function e(){for(var e,r,n=new Promise((function(t,n){e=t;r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,o)}catch(t){r(t)}return n}Object.setPrototypeOf(e,Object.getPrototypeOf(t));k&&Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0});return Object.defineProperties(e,n(t))};e.promisify.custom=k;function R(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t;t=r}return e(t)}e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var o=r.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,u=function(){return o.apply(i,arguments)};e.apply(this,r).then((function(e){t.nextTick(u,null,e)}),(function(e){t.nextTick(R,e,u)}))}Object.setPrototypeOf(r,Object.getPrototypeOf(e));Object.defineProperties(r,n(e));return r}}).call(this,r("../../node_modules/_process@0.11.10@process/browser.js"))},"./src/index.ts":function(t,e,r){"use strict";r.r(e);r.d(e,"ErrorClass",(function(){return b}));r.d(e,"MPServerlessErrorClass",(function(){return v}));r.d(e,"bizError",(function(){return g}));r.d(e,"assert",(function(){return w}));r.d(e,"camelToLisp",(function(){return O}));r.d(e,"emptyLogger",(function(){return P}));r.d(e,"HTTPMethod",(function(){return j}));r.d(e,"TransportProtocol",(function(){return E}));r.d(e,"SERVERLESS_HEADER_PREFIX",(function(){return _}));r.d(e,"PREFIX",(function(){return T}));r.d(e,"Validator",(function(){return L}));r.d(e,"BaseEncoder",(function(){return $}));r.d(e,"HTTPRequestEncoder",(function(){return q}));r.d(e,"BaseDecoder",(function(){return rt}));r.d(e,"HTTPResponseDecoder",(function(){return nt}));r.d(e,"HTTPTransport",(function(){return at}));r.d(e,"BaseService",(function(){return st}));r.d(e,"MPServerlessCore",(function(){return pt}));r("./src/thirdParty/runtime.es5.js");function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}});e&&y(t,e)}function a(t){var e=p();return function(){var r,n=h(t);if(e){var o=h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return c(this,r)}}function c(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?s(t):e}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){var e="function"==typeof Map?new Map:void 0;return(f=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return l(t,arguments,h(this).constructor)}r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}});return y(r,t)})(t)}function l(t,e,r){return(l=p()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));r&&y(o,r.prototype);return o}).apply(null,arguments)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){t.__proto__=e;return t})(t,e)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e,r){e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r;return t}var b=function(t){u(r,t);var e=a(r);function r(t,n){var o;i(this,r);d(s(o=e.call(this)),"code",void 0);d(s(o),"message",void 0);Error.captureStackTrace&&Error.captureStackTrace(s(o),o.constructor);o.code=o.constructor.code;o.message=o.constructor.prefix;n&&(o.message+=": ".concat(n));t instanceof Error?o.message="".concat(o.message," << ").concat(t.message):"string"==typeof t&&(o.message="".concat(o.message,": ").concat(t));return o}return r}(f(Error));d(b,"code",void 0);d(b,"prefix",void 0);var m=function(){function t(){i(this,t);d(this,"code",void 0);d(this,"message",void 0)}!function(t,e,r){e&&o(t.prototype,e);r&&o(t,r)}(t,[{key:"setCode",value:function(t){this.code=t;return this}},{key:"setMessage",value:function(t){this.message=t;return this}},{key:"build",value:function(){var t,e,r=this.code,n=this.message;return e=t=function(t){u(r,t);var e=a(r);function r(){i(this,r);return e.apply(this,arguments)}return r}(b),d(t,"code",r),d(t,"prefix",n),e}}]);return t}();function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{code:"MPServerlessError",message:"MPServerless Error"},r=new m;return Object.keys(t).reduce((function(n,o){n[o]=r.setCode(t[o].code||e.code).setMessage(t[o].message||e.message).build();return n}),{})}var g=v({ValidationError:{code:"ValidationFailed",message:"参数校验错误"}});function w(t,e){if(!t)throw new g.ValidationError(e)}function O(t){return t.replace(/[A-Z]/g,(function(t){return"-".concat(t.toLowerCase())}))}var j,E,P={log:function(){},info:function(){},warn:function(){},error:function(){},debug:function(){}};!function(t){t.GET="GET";t.DEL="DELETE";t.POST="POST"}(j||(j={}));!function(t){t.HTTP="HTTP"}(E||(E={}));var T,_="x-serverless-";!function(t){t.CLIENT="/client";t.SERVER="/server";t.ANTCLOUD="/antcloud";t.ANTOPENANTCLOUD="/antopen/antcloud"}(T||(T={}));var S=r("./src/thirdParty/parameter.es5.js"),x=r.n(S);function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(t,n.key,n)}}var L=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);!function(t,e,r){e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(this,"p",void 0);this.p=new x.a(e)}!function(t,e,r){e&&R(t.prototype,e);r&&R(t,r)}(t,[{key:"validate",value:function(t,e){if("object"!==k(e)&&"string"==typeof t){e={field:e};t={field:t}}var r=this.p.validate(t,e);if(!r)return null;var n=r.map((function(t){if(t.field){for(var r=JSON.parse(JSON.stringify(e)),n=t.field.match(/[^\.\[\]]+/g);n.length;){var o=n.shift();if(!r.hasOwnProperty(o))break;r=r[o]}t.value=r}return t}));throw new g.ValidationError(function t(e){return Array.isArray(e)?e.map(t).join("; "):"".concat(e.field," ").concat(e.message)}(n))}}]);return t}();function A(t){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function z(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})));r.push.apply(r,n)}return r}function N(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?z(Object(r),!0).forEach((function(e){B(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function D(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(t,n.key,n)}}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){t.__proto__=e;return t})(t,e)}function H(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function(){var r,n=M(t);if(e){var o=M(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return C(this,r)}}function C(t,e){return!e||"object"!==A(e)&&"function"!=typeof e?F(t):e}function F(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function M(t){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function B(t,e,r){e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r;return t}function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var $=function t(){U(this,t)},q=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}});e&&I(t,e)}(r,t);var e=H(r);function r(t,n){var o;U(this,r);(o=e.call(this)).endpoint=t;B(F(o),"body",{});B(F(o),"query",{});B(F(o),"method",j.POST);B(F(o),"prefix","");B(F(o),"baseHeaders",{});B(F(o),"serviceHeaders",{});B(F(o),"serverlessHeaders",{});B(F(o),"baseUrl",void 0);n&&(o.prefix=n);return o}!function(t,e,r){e&&D(t.prototype,e);r&&D(t,r)}(r,[{key:"encodeAsHTTPRequestObject",value:function(t){return{url:"",data:{},method:j.POST,headers:{}}}},{key:"sign",value:function(t){}},{key:"url",get:function(){return[this.endpoint+this.prefix].filter((function(t){return!!t})).join("?")}},{key:"headers",get:function(){var t=this,e=Object.keys(this.serverlessHeaders).reduce((function(e,r){e["".concat(_).concat(O(r))]=t.serverlessHeaders[r];return e}),{});return N(N({},this.baseHeaders),e)}},{key:"setBodyField",value:function(t){this.body=Object.assign({},this.body,N({},t));return this}},{key:"setUserId",value:function(t){this.setBodyField({userId:t});return this}},{key:"setBaseHeaders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.baseHeaders=N(N({},this.baseHeaders),Object.keys(t).reduce((function(e,r){t[r]&&(e[r]=t[r].toString());return e}),{}));return this}},{key:"setServerlessHeaders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.serverlessHeaders=N(N({},this.serverlessHeaders),Object.keys(t).reduce((function(e,r){t[r]&&(e[r]=t[r].toString());return e}),{}));return this}},{key:"encode",value:function(){this.body.params&&(this.body.params=JSON.stringify(this.body.params));return{url:this.url,data:this.body,method:this.method,headers:this.headers}}}]);return r}($);function G(t){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function J(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})));r.push.apply(r,n)}return r}function V(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?J(Object(r),!0).forEach((function(e){tt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(t,n.key,n)}}function Z(t,e){return(Z=Object.setPrototypeOf||function(t,e){t.__proto__=e;return t})(t,e)}function X(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function(){var r,n=W(t);if(e){var o=W(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return K(this,r)}}function K(t,e){return!e||"object"!==G(e)&&"function"!=typeof e?Q(t):e}function Q(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function W(t){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function tt(t,e,r){e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r;return t}function et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var rt=function t(){et(this,t)},nt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}});e&&Z(t,e)}(r,t);var e=X(r);function r(){var t;et(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];tt(Q(t=e.call.apply(e,[this].concat(o))),"_body",{});tt(Q(t),"_error",void 0);tt(Q(t),"_status",void 0);tt(Q(t),"_headers",{});return t}!function(t,e,r){e&&Y(t.prototype,e);r&&Y(t,r)}(r,[{key:"setHeaders",value:function(t){this._headers=V(V({},this._headers),t)}},{key:"setStatusAndBody",value:function(t,e){this._status=t;this._body=e}},{key:"setErrorMessage",value:function(t){this._error=new Error(t)}},{key:"setErrorObject",value:function(t){this._error=t}},{key:"decode",value:function(){return{body:this._body||{},error:this._error,status:this._status,headers:this._headers}}}]);return r}(rt);function ot(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){r(t);return}a.done?e(c):Promise.resolve(c).then(n,o)}function it(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(t,n.key,n)}}function ut(t,e,r){e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r;return t}var at=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);this.endpoint=e;ut(this,"authType",void 0);ut(this,"protocol",E.HTTP);ut(this,"logger",void 0);ut(this,"appId",void 0);ut(this,"appSecret",void 0);ut(this,"spaceId",void 0);ut(this,"timeout",void 0);ut(this,"ua",void 0)}!function(t,e,r){e&&it(t.prototype,e);r&&it(t,r)}(t,[{key:"getEncoder",value:function(t){return new q(this.endpoint,t)}},{key:"setAppId",value:function(t){this.appId=t}},{key:"setAppSecret",value:function(t){this.appSecret=t;return this}},{key:"setUA",value:function(t){this.ua=t;return this}},{key:"setLogger",value:function(t){this.logger=t}},{key:"setTimeout",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"5s";if("string"==typeof t){if(t.indexOf("ms")>=0){this.timeout=parseInt(t,10);return}if(t.indexOf("s")>=0){this.timeout=1e3*parseInt(t,10);return}}else if("number"==typeof t){this.timeout=t;return}this.timeout=5e3}},{key:"timeoutOption",get:function(){return this.timeout}},{key:"spaceIdOption",get:function(){return this.spaceId}},{key:"setSpaceId",value:function(t){this.spaceId=t}},{key:"request",value:function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(t){ot(i,n,o,u,a,"next",t)}function a(t){ot(i,n,o,u,a,"throw",t)}u(void 0)}))}}(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(new nt).decode());case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]);return t}();function ct(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(t,n.key,n)}}var st=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);this.transport=e}!function(t,e,r){e&&ct(t.prototype,e);r&&ct(t,r)}(t,[{key:"getEncoder",value:function(t){return this.transport.getEncoder(t)}}]);return t}();function ft(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(t,n.key,n)}}function lt(t,e,r){e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r;return t}var pt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);lt(this,"options",void 0);lt(this,"_debug",void 0);lt(this,"_logger",void 0);lt(this,"transport",void 0);w(e,"options is required");w(e.spaceId,"spaceId is required");w(e.endpoint,"endpoint is required");this._debug=!1;this._logger=e.logger||P;this.options=e;this.createTransport(e)}!function(t,e,r){e&&ft(t.prototype,e);r&&ft(t,r)}(t,[{key:"setDebugFlag",value:function(t){this._debug=t;this.transport.setLogger(this.logger)}},{key:"debug",get:function(){return this._debug}},{key:"logger",get:function(){return this._debug?this._logger:P}},{key:"createTransport",value:function(t){var e=t.httpTransport;this.transport=new e(t.endpoint);this.transport.setAppId(t.appId);this.transport.setLogger(this.logger);this.transport.setSpaceId(t.spaceId);this.transport.setTimeout(t.timeout)}}]);return t}()},"./src/thirdParty/parameter.es5.js":function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(t,n.key,n)}}return function(e,r,n){r&&t(e.prototype,r);n&&t(e,n);return e}}();var i=r("../../node_modules/_util@0.11.1@util/util.js"),u=/^\d{4}\-\d{2}\-\d{2}$/,a=/^\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}$/,c=/^\d+$/,s=/^[a-z0-9\!\#\$\%\&\'\*\+\/\=\?\^\_\`\{\|\}\~\-]+(?:\.[a-z0-9\!\#\$\%\&\'\*\+\/\=\?\^\_\`\{\|\}\~\-]+)*@(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?$/i,f=/^[\w\`\~\!\@\#\$\%\^\&\*\(\)\-\_\=\+\[\]\{\}\|\;\:\'\"\,\<\.\>\/\?]+$/,l=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/i,p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);"function"==typeof(e=e||{}).translate&&(this.translate=e.translate);e.validateRoot&&(this.validateRoot=!0);e.convert&&(this.convert=!0);e.widelyUndefined&&(this.widelyUndefined=!0)}o(t,[{key:"t",value:function(){var t=Array.prototype.slice.call(arguments);return"function"==typeof this.translate?this.translate.apply(this,t):i.format.apply(i,t)}},{key:"validate",value:function(t,e){if("object"!==(void 0===t?"undefined":n(t)))throw new TypeError("need object type rule");if(this.validateRoot&&("object"!==(void 0===e?"undefined":n(e))||!e))return[{message:this.t("the validated value should be a object"),code:this.t("invalid"),field:void 0}];var r=[];for(var o in t){var i=d(t[o]),u=e[o];"string"==typeof u&&!0===i.trim&&(u=e[o]=u.trim());var a=this.widelyUndefined;"widelyUndefined"in i&&(a=i.widelyUndefined);a&&(""===u||null===u||Number.isNaN(u))&&(u=e[o]=void 0);if(null!=u){var c=y[i.type];if(!c)throw new TypeError("rule type must be one of "+Object.keys(y).join(", ")+", but the following type was passed: "+i.type);b(i,e,o,this.convert);var s=c.call(this,i,e[o],e);"string"==typeof s&&r.push({message:s,code:this.t("invalid"),field:o});Array.isArray(s)&&s.forEach((function(t){var e="object"===i.type?".":"";t.field=o+e+t.field;r.push(t)}))}else{!1!==i.required&&r.push({message:this.t("required"),field:o,code:this.t("missing_field")});"default"in i&&(e[o]=i.default)}}return r.length?r:void 0}}]);return t}();t.exports=p;p.prototype.addRule=p.addRule=function(t,e,r,n){if(!t)throw new TypeError("`type` required");if("string"==typeof r||"function"==typeof r){n=r;r=!0}"boolean"!=typeof r&&(r=!0);if(!r&&y[t])throw new TypeError("rule `"+t+"` exists");if(n){if("string"!=typeof n&&"function"!=typeof n)throw new TypeError("convertType should be string or function");p.CONVERT_MAP[t]=n}if("function"!=typeof e){if(!(e instanceof RegExp))throw new TypeError("check must be function or regexp");y[t]=function(t,r){return v.call(this,{format:e},r)}}else y[t]=e};var y=p.TYPE_MAP={number:function(t,e){if("number"!=typeof e||isNaN(e))return this.t("should be a number");if(t.hasOwnProperty("max")&&e>t.max)return this.t("should smaller than %s",t.max);if(t.hasOwnProperty("min")&&e<t.min)return this.t("should bigger than %s",t.min)},int:m,integer:m,string:v,id:function(t,e){return v.call(this,{format:c,allowEmpty:t.allowEmpty},e)},date:function(t,e){return v.call(this,{format:u,allowEmpty:t.allowEmpty},e)},dateTime:g,datetime:g,boolean:w,bool:w,array:function(t,e){if(!Array.isArray(e))return this.t("should be an array");if(t.hasOwnProperty("max")&&e.length>t.max)return this.t("length should smaller than %s",t.max);if(t.hasOwnProperty("min")&&e.length<t.min)return this.t("length should bigger than %s",t.min);if(!t.itemType)return;var r=this,n=y[t.itemType];if(!n)throw new TypeError("rule type must be one of "+Object.keys(y).join(", ")+", but the following type was passed: "+t.itemType);var o=[],i="object"===t.itemType?t:t.rule||d(t.itemType);e.forEach((function(t,e){var u="["+e+"]",a=n.call(r,i,t);"string"==typeof a&&o.push({field:u,message:a,code:r.t("invalid")});Array.isArray(a)&&(o=o.concat(a.map((function(t){t.field=u+"."+t.field;t.message=t.message;return t}))))}));return o},object:function(t,e){if("object"!==(void 0===e?"undefined":n(e)))return this.t("should be an object");if(Array.isArray(e))return this.t("should be an object");if(t.rule)return this.validate(t.rule,e)},enum:function(t,e){if(!Array.isArray(t.values))throw new TypeError("check enum need array type values");if(-1===t.values.indexOf(e))return this.t("should be one of %s",t.values.join(", "))},email:function(t,e){return v.call(this,{format:s,message:t.message||this.t("should be an email"),allowEmpty:t.allowEmpty},e)},password:function(t,e,r){t.min||(t.min=6);t.format=f;var n=v.call(this,t,e);if(n)return n;if(t.compare&&r[t.compare]!==e)return this.t("should equal to %s",t.compare)},url:function(t,e){return v.call(this,{format:l,message:t.message||this.t("should be a url"),allowEmpty:t.allowEmpty},e)}},h=p.CONVERT_MAP={number:"number",int:"int",integer:"int",string:"string",id:"string",date:"string",dateTime:"string",datetime:"string",boolean:"bool",bool:"bool",email:"string",password:"string",url:"string"};function d(t){"string"==typeof(t=t||{})?t={type:t}:Array.isArray(t)?t={type:"enum",values:t}:t instanceof RegExp&&(t={type:"string",format:t});if(t.type&&"?"===t.type[t.type.length-1]){t.type=t.type.slice(0,-1);t.required=!1}return t}function b(t,e,r,o){var i;o&&(i=h[t.type]);t.convertType&&(i=t.convertType);if(i){var u=e[r];if("object"!==(void 0===u?"undefined":n(u)))if("function"!=typeof i)switch(i){case"int":e[r]=parseInt(u,10);break;case"string":e[r]=String(u);break;case"number":e[r]=Number(e[r]);break;case"bool":case"boolean":e[r]=!!u;break;default:"function"==typeof h[i]&&(e[r]=h[t.type](e[r]))}else e[r]=i(u,e)}}function m(t,e){return"number"!=typeof e||e%1!=0?this.t("should be an integer"):t.hasOwnProperty("max")&&e>t.max?this.t("should smaller than %s",t.max):t.hasOwnProperty("min")&&e<t.min?this.t("should bigger than %s",t.min):void 0}function v(t,e){if("string"!=typeof e)return this.t("should be a string");t.hasOwnProperty("allowEmpty")||!1!==t.required||(t.allowEmpty=!0);var r=t.hasOwnProperty("allowEmpty")?t.allowEmpty:t.empty;if(!e){if(r)return;return this.t("should not be empty")}return t.hasOwnProperty("max")&&e.length>t.max?this.t("length should smaller than %s",t.max):t.hasOwnProperty("min")&&e.length<t.min?this.t("length should bigger than %s",t.min):t.format&&!t.format.test(e)?t.message||this.t("should match %s",t.format):void 0}function g(t,e){return v.call(this,{format:a,allowEmpty:t.allowEmpty},e)}function w(t,e){if("boolean"!=typeof e)return this.t("should be a boolean")}},"./src/thirdParty/runtime.es5.js":function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",u=n.toStringTag||"@@toStringTag";function a(t,e,r){Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0});return t[e]}try{a({},"")}catch(t){a=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),u=new E(n||[]);i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return T()}r.method=o;r.arg=i;for(;;){var u=r.delegate;if(u){var a=w(u,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n){n="completed";throw r.arg}r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){n=r.done?"completed":"suspendedYield";if(c.arg===f)continue;return{value:c.arg,done:r.done}}if("throw"===c.type){n="completed";r.method="throw";r.arg=c.arg}}}}(t,r,u);return i}t.wrap=c;function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}var f={};function l(){}function p(){}function y(){}var h={};a(h,o,(function(){return this}));var d=Object.getPrototypeOf,b=d&&d(d(P([])));b&&b!==e&&r.call(b,o)&&(h=b);var m=y.prototype=l.prototype=Object.create(h);p.prototype=y;a(m,"constructor",y);a(y,"constructor",p);p.displayName=a(y,u,"GeneratorFunction");function v(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))};t.mark=function(t){if(Object.setPrototypeOf)Object.setPrototypeOf(t,y);else{t.__proto__=y;a(t,u,"GeneratorFunction")}t.prototype=Object.create(m);return t};t.awrap=function(t){return{__await:t}};function g(t,e){var n;this._invoke=function(o,i){function u(){return new e((function(n,u){!function n(o,i,u,a){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){f.value=t;u(f)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}(o,i,n,u)}))}return n=n?n.then(u,u):u()}}v(g.prototype);a(g.prototype,i,(function(){return this}));t.AsyncIterator=g;t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new g(c(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))};function w(t,e){var r=t.iterator[e.method];if(void 0===r){e.delegate=null;if("throw"===e.method){if(t.iterator.return){e.method="return";e.arg=void 0;w(t,e);if("throw"===e.method)return f}e.method="throw";e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type){e.method="throw";e.arg=n.arg;e.delegate=null;return f}var o=n.arg;if(!o){e.method="throw";e.arg=new TypeError("iterator result is not an object");e.delegate=null;return f}if(!o.done)return o;e[t.resultName]=o.value;e.next=t.nextLoc;if("return"!==e.method){e.method="next";e.arg=void 0}e.delegate=null;return f}v(m);a(m,u,"Generator");a(m,o,(function(){return this}));a(m,"toString",(function(){return"[object Generator]"}));function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]);if(2 in t){e.finallyLoc=t[2];e.afterLoc=t[3]}this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal";delete e.arg;t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}];t.forEach(O,this);this.reset(!0)}t.keys=function(t){var e=[];for(var r in t)e.push(r);e.reverse();return function r(){for(;e.length;){var n=e.pop();if(n in t){r.value=n;r.done=!1;return r}}r.done=!0;return r}};function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n)){e.value=t[n];e.done=!1;return e}e.value=void 0;e.done=!0;return e};return i.next=i}}return{next:T}}t.values=P;function T(){return{value:void 0,done:!0}}E.prototype={constructor:E,reset:function(t){this.prev=0;this.next=0;this.sent=this._sent=void 0;this.done=!1;this.delegate=null;this.method="next";this.arg=void 0;this.tryEntries.forEach(j);if(!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){u.type="throw";u.arg=t;e.next=r;if(n){e.method="next";e.arg=void 0}return!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};u.type=t;u.arg=e;if(i){this.method="next";this.next=i.finallyLoc;return f}return this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;if("break"===t.type||"continue"===t.type)this.next=t.arg;else if("return"===t.type){this.rval=this.arg=t.arg;this.method="return";this.next="end"}else"normal"===t.type&&e&&(this.next=e);return f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t){this.complete(r.completion,r.afterLoc);j(r);return f}}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){this.delegate={iterator:P(t),resultName:e,nextLoc:r};"next"===this.method&&(this.arg=void 0);return f}};return t}(t.exports);try{regeneratorRuntime=n}catch(t){}}})}));