module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=429)}([function(e,t,r){"use strict";(function(e){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
var n=r(257),o=r(258),i=r(259);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(t,r),o=(e=s(e,n)).write(t,r);o!==n&&(e=e.slice(0,o));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|f(t.length);return 0===(e=s(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?s(e,0):h(e,t);if("Buffer"===t.type&&i(t.data))return h(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t){if(l(t),e=s(e,t<0?0:0|f(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|f(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function f(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(n)return j(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){var i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var p=!0,h=0;h<u;h++)if(c(e,i+h)!==c(t,h)){p=!1;break}if(p)return i}return-1}function v(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function b(e,t,r,n){return z(j(t,e.length-r),e,r,n)}function S(e,t,r,n){return z(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function w(e,t,r,n){return S(e,t,r,n)}function _(e,t,r,n){return z(F(t),e,r,n)}function k(e,t,r,n){return z(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function E(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,a,s,u,c=e[o],l=null,p=c>239?4:c>223?3:c>191?2:1;if(o+p<=r)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=p}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return p(null,e)},u.allocUnsafeSlow=function(e){return p(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,o),o+=a.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return E(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var i=o-n,a=r-t,s=Math.min(i,a),c=this.slice(n,o),l=e.slice(t,r),p=0;p<s;++p)if(c[p]!==l[p]){i=c[p],a=l[p];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function A(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function I(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function P(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=L(e[i]);return o}function T(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function N(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function D(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o<i;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function U(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o<i;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function O(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,i){return i||O(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,i){return i||O(e,0,r,8),o.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var o=t-e;r=new u(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);R(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);R(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o,i=n-r;if(this===e&&r<t&&t<n)for(o=i-1;o>=0;--o)e[o+t]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=u.isBuffer(e)?e:j(new u(e,n).toString()),s=a.length;for(i=0;i<r-t;++i)this[i+t]=a[i%s]}return this};var q=/[^+\/0-9A-Za-z-_]/g;function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function j(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function F(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}}).call(this,r(30))},function(e,t,r){e.exports=function(){var e=e||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},o=n.lib={},i=o.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var a=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8}else for(var i=0;i<o;i+=4)t[n+i>>>2]=r[i>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],o=function(t){var t=t,r=987654321,n=4294967295;return function(){var o=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return o/=4294967296,(o+=.5)*(e.random()>.5?1:-1)}},i=0;i<t;i+=4){var s=o(4294967296*(r||e.random()));r=987654071*s(),n.push(4294967296*s()|0)}return new a.init(n,t)}}),s=n.enc={},u=s.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},p=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,o=r.sigBytes,i=this.blockSize,s=4*i,u=o/s,c=(u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0))*i,l=e.min(4*c,o);if(c){for(var p=0;p<c;p+=i)this._doProcessBlock(n,p);var h=n.splice(0,c);r.sigBytes-=l}return new a.init(h,l)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),h=(o.Hasher=p.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new h.HMAC.init(e,r).finalize(t)}}}),n.algo={});return n}(Math);return e}()},function(e,t,r){var n;
/** @license
 * JS Signals <http://millermedeiros.github.com/js-signals/>
 * Released under the MIT license
 * Author: Miller Medeiros
 * Version: 1.0.0 - Build: 268 (2012/11/29 05:48 PM)
 */
/** @license
 * JS Signals <http://millermedeiros.github.com/js-signals/>
 * Released under the MIT license
 * Author: Miller Medeiros
 * Version: 1.0.0 - Build: 268 (2012/11/29 05:48 PM)
 */
!function(o){function i(e,t,r,n,o){this._listener=t,this._isOnce=r,this.context=n,this._signal=e,this._priority=o||0}function a(e,t){if("function"!=typeof e)throw new Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",t))}function s(){this._bindings=[],this._prevParams=null;var e=this;this.dispatch=function(){s.prototype.dispatch.apply(e,arguments)}}i.prototype={active:!0,params:null,execute:function(e){var t,r;return this.active&&this._listener&&(r=this.params?this.params.concat(e):e,t=this._listener.apply(this.context,r),this._isOnce&&this.detach()),t},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}},s.prototype={VERSION:"1.0.0",memorize:!1,_shouldPropagate:!0,active:!0,_registerListener:function(e,t,r,n){var o,a=this._indexOfListener(e,r);if(-1!==a){if((o=this._bindings[a]).isOnce()!==t)throw new Error("You cannot add"+(t?"":"Once")+"() then add"+(t?"Once":"")+"() the same listener without removing the relationship first.")}else o=new i(this,e,t,r,n),this._addBinding(o);return this.memorize&&this._prevParams&&o.execute(this._prevParams),o},_addBinding:function(e){var t=this._bindings.length;do{--t}while(this._bindings[t]&&e._priority<=this._bindings[t]._priority);this._bindings.splice(t+1,0,e)},_indexOfListener:function(e,t){for(var r,n=this._bindings.length;n--;)if((r=this._bindings[n])._listener===e&&r.context===t)return n;return-1},has:function(e,t){return-1!==this._indexOfListener(e,t)},add:function(e,t,r){return a(e,"add"),this._registerListener(e,!1,t,r)},addOnce:function(e,t,r){return a(e,"addOnce"),this._registerListener(e,!0,t,r)},remove:function(e,t){a(e,"remove");var r=this._indexOfListener(e,t);return-1!==r&&(this._bindings[r]._destroy(),this._bindings.splice(r,1)),e},removeAll:function(){for(var e=this._bindings.length;e--;)this._bindings[e]._destroy();this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(e){if(this.active){var t,r=Array.prototype.slice.call(arguments),n=this._bindings.length;if(this.memorize&&(this._prevParams=r),n){t=this._bindings.slice(),this._shouldPropagate=!0;do{n--}while(t[n]&&this._shouldPropagate&&!1!==t[n].execute(r))}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}};var u=s;u.Signal=s,void 0===(n=function(){return u}.call(t,r,t,e))||(e.exports=n)}()},function(e,t){var r=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=r)},function(e,t,r){r(401),r(402),e.exports=window.AWS},function(e,t,r){"use strict";var n=r(49),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new n('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})}),t}(t.styleAliases||null),-1===i.indexOf(this.kind))throw new n('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,r){e.exports=function(e){return e}(r(1),r(70),r(406),r(407),r(34),r(35),r(109),r(163),r(408),r(164),r(409),r(410),r(411),r(110),r(412),r(25),r(7),r(413),r(414),r(415),r(416),r(417),r(418),r(419),r(420),r(421),r(422),r(423),r(424),r(425),r(426),r(427),r(428))},function(e,t,r){e.exports=function(e){e.lib.Cipher||function(t){var r=e,n=r.lib,o=n.Base,i=n.WordArray,a=n.BufferedBlockAlgorithm,s=r.enc,u=(s.Utf8,s.Base64),c=r.algo,l=c.EvpKDF,p=n.Cipher=a.extend({cfg:o.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?k:S}return function(t){return{encrypt:function(r,n,o){return e(n).encrypt(t,r,n,o)},decrypt:function(r,n,o){return e(n).decrypt(t,r,n,o)}}}}()}),h=(n.StreamCipher=p.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),r.mode={}),f=n.BlockCipherMode=o.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),d=h.CBC=function(){var e=f.extend();function r(e,r,n){var o=this._iv;if(o){var i=o;this._iv=t}else var i=this._prevBlock;for(var a=0;a<n;a++)e[r+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,o=n.blockSize;r.call(this,e,t,o),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+o)}}),e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher,o=n.blockSize,i=e.slice(t,t+o);n.decryptBlock(e,t),r.call(this,e,t,o),this._prevBlock=i}}),e}(),m=r.pad={},y=m.Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,o=n<<24|n<<16|n<<8|n,a=[],s=0;s<n;s+=4)a.push(o);var u=i.create(a,n);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},g=(n.BlockCipher=p.extend({cfg:p.cfg.extend({mode:d,padding:y}),reset:function(){p.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else{var n=r.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==n?this._mode.init(this,t&&t.words):(this._mode=n.call(r,this,t&&t.words),this._mode.__creator=n)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),n.CipherParams=o.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),v=r.format={},b=v.OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var n=i.create([1398893684,1701076831]).concat(r).concat(t);else var n=t;return n.toString(u)},parse:function(e){var t=u.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var n=i.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return g.create({ciphertext:t,salt:n})}},S=n.SerializableCipher=o.extend({cfg:o.extend({format:b}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var o=e.createEncryptor(r,n),i=o.finalize(t),a=o.cfg;return g.create({ciphertext:i,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var o=e.createDecryptor(r,n).finalize(t.ciphertext);return o},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),w=r.kdf={},_=w.OpenSSL={execute:function(e,t,r,n){n||(n=i.random(8));var o=l.create({keySize:t+r}).compute(e,n),a=i.create(o.words.slice(t),4*r);return o.sigBytes=4*t,g.create({key:o,iv:a,salt:n})}},k=n.PasswordBasedCipher=S.extend({cfg:S.cfg.extend({kdf:_}),encrypt:function(e,t,r,n){var o=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=o.iv;var i=S.encrypt.call(this,e,t,o.key,n);return i.mixIn(o),i},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var o=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);n.iv=o.iv;var i=S.decrypt.call(this,e,t,o.key,n);return i}})}()}(r(1),r(25))},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(76)("wks"),o=r(53),i=r(8).Symbol,a="function"==typeof i;(e.exports=function(e){return n[e]||(n[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=n},function(e,t,r){var n=r(8),o=r(3),i=r(22),a=r(20),s=r(19),u=function(e,t,r){var c,l,p,h=e&u.F,f=e&u.G,d=e&u.S,m=e&u.P,y=e&u.B,g=e&u.W,v=f?o:o[t]||(o[t]={}),b=v.prototype,S=f?n:d?n[t]:(n[t]||{}).prototype;for(c in f&&(r=t),r)(l=!h&&S&&void 0!==S[c])&&s(v,c)||(p=l?S[c]:r[c],v[c]=f&&"function"!=typeof S[c]?r[c]:y&&l?i(p,n):g&&S[c]==p?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(p):m&&"function"==typeof p?i(Function.call,p):p,m&&((v.virtual||(v.virtual={}))[c]=p,e&u.R&&b&&!b[c]&&a(b,c,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){var n=r(14),o=r(112),i=r(79),a=Object.defineProperty;t.f=r(17)?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(11);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){var n=r(122),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){e.exports=!r(21)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(13),o=r(42);e.exports=r(17)?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){var n=r(41);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){var n=r(199),o=r(204);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},function(e,t,r){var n=r(29),o=r(200),i=r(201),a="[object Null]",s="[object Undefined]",u=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?s:a:u&&u in Object(e)?o(e):i(e)}},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib,n=r.Base,o=r.WordArray,i=t.algo,a=i.MD5,s=i.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),i=o.create(),a=i.words,s=r.keySize,u=r.iterations;a.length<s;){c&&n.update(c);var c=n.update(e).finalize(t);n.reset();for(var l=1;l<u;l++)c=n.finalize(c),n.reset();i.concat(c)}return i.sigBytes=4*s,i}});t.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)}}(),e.EvpKDF}(r(1),r(109),r(110))},function(e,t,r){var n,o;
/*!
 * JavaScript Cookie v2.2.0
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */!function(i){if(void 0===(o="function"==typeof(n=i)?n.call(t,r,t,e):n)||(e.exports=o),!0,e.exports=i(),!!0){var a=window.Cookies,s=window.Cookies=i();s.noConflict=function(){return window.Cookies=a,s}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}return function t(r){function n(t,o,i){var a;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},n.defaults,i)).expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}i.expires=i.expires?i.expires.toUTCString():"";try{a=JSON.stringify(o),/^[\{\[]/.test(a)&&(o=a)}catch(e){}o=r.write?r.write(o,t):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var u="";for(var c in i)i[c]&&(u+="; "+c,!0!==i[c]&&(u+="="+i[c]));return document.cookie=t+"="+o+u}t||(a={});for(var l=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,h=0;h<l.length;h++){var f=l[h].split("="),d=f.slice(1).join("=");this.json||'"'!==d.charAt(0)||(d=d.slice(1,-1));try{var m=f[0].replace(p,decodeURIComponent);if(d=r.read?r.read(d,m):r(d,m)||d.replace(p,decodeURIComponent),this.json)try{d=JSON.parse(d)}catch(e){}if(t===m){a=d;break}t||(a[m]=d)}catch(e){}}return a}}return n.set=n,n.get=function(e){return n.call(n,e)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(t,r){n(t,"",e(r,{expires:-1}))},n.withConverter=t,n}(function(){})})},function(e,t,r){var n=r(73),o=r(72);e.exports=function(e){return n(o(e))}},function(e,t){e.exports={}},function(e,t,r){var n=r(15).Symbol;e.exports=n},function(e,t){window.global=window.global||window,e.exports=window.global},function(e,t,r){var n=r(126),o=r(216),i=r(47);e.exports=function(e){return i(e)?n(e):o(e)}},function(e,t,r){"use strict";function n(e){return void 0===e||null===e}e.exports.isNothing=n,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:n(e)?[]:[e]},e.exports.repeat=function(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var r,n,o,i;if(t)for(r=0,n=(i=Object.keys(t)).length;r<n;r+=1)e[o=i[r]]=t[o];return e}},function(e,t,r){"use strict";var n=r(32),o=r(49),i=r(5);function a(e,t,r){var n=[];return e.include.forEach(function(e){r=a(e,t,r)}),e[t].forEach(function(e){r.forEach(function(t,r){t.tag===e.tag&&t.kind===e.kind&&n.push(r)}),r.push(e)}),r.filter(function(e,t){return-1===n.indexOf(t)})}function s(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{}};function n(e){r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}(this.compiledImplicit,this.compiledExplicit)}s.DEFAULT=null,s.create=function(){var e,t;switch(arguments.length){case 1:e=s.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new o("Wrong number of arguments for Schema.create function")}if(e=n.toArray(e),t=n.toArray(t),!e.every(function(e){return e instanceof s}))throw new o("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof i}))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new s({include:e,explicit:t})},e.exports=s},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib.WordArray;t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var o=[],i=0;i<r;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<r;s++)o.push(n.charAt(a>>>6*(3-s)&63));var u=n.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(e){var t=e.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<n.length;i++)o[n.charCodeAt(i)]=i}var a=n.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return function(e,t,n){for(var o=[],i=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2,u=n[e.charCodeAt(a)]>>>6-a%4*2;o[i>>>2]|=(s|u)<<24-i%4*8,i++}return r.create(o,i)}(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64}(r(1))},function(e,t,r){e.exports=function(e){return function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,a=r.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=a.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,a=e[t+0],u=e[t+1],f=e[t+2],d=e[t+3],m=e[t+4],y=e[t+5],g=e[t+6],v=e[t+7],b=e[t+8],S=e[t+9],w=e[t+10],_=e[t+11],k=e[t+12],C=e[t+13],E=e[t+14],x=e[t+15],A=i[0],I=i[1],P=i[2],T=i[3];I=h(I=h(I=h(I=h(I=p(I=p(I=p(I=p(I=l(I=l(I=l(I=l(I=c(I=c(I=c(I=c(I,P=c(P,T=c(T,A=c(A,I,P,T,a,7,s[0]),I,P,u,12,s[1]),A,I,f,17,s[2]),T,A,d,22,s[3]),P=c(P,T=c(T,A=c(A,I,P,T,m,7,s[4]),I,P,y,12,s[5]),A,I,g,17,s[6]),T,A,v,22,s[7]),P=c(P,T=c(T,A=c(A,I,P,T,b,7,s[8]),I,P,S,12,s[9]),A,I,w,17,s[10]),T,A,_,22,s[11]),P=c(P,T=c(T,A=c(A,I,P,T,k,7,s[12]),I,P,C,12,s[13]),A,I,E,17,s[14]),T,A,x,22,s[15]),P=l(P,T=l(T,A=l(A,I,P,T,u,5,s[16]),I,P,g,9,s[17]),A,I,_,14,s[18]),T,A,a,20,s[19]),P=l(P,T=l(T,A=l(A,I,P,T,y,5,s[20]),I,P,w,9,s[21]),A,I,x,14,s[22]),T,A,m,20,s[23]),P=l(P,T=l(T,A=l(A,I,P,T,S,5,s[24]),I,P,E,9,s[25]),A,I,d,14,s[26]),T,A,b,20,s[27]),P=l(P,T=l(T,A=l(A,I,P,T,C,5,s[28]),I,P,f,9,s[29]),A,I,v,14,s[30]),T,A,k,20,s[31]),P=p(P,T=p(T,A=p(A,I,P,T,y,4,s[32]),I,P,b,11,s[33]),A,I,_,16,s[34]),T,A,E,23,s[35]),P=p(P,T=p(T,A=p(A,I,P,T,u,4,s[36]),I,P,m,11,s[37]),A,I,v,16,s[38]),T,A,w,23,s[39]),P=p(P,T=p(T,A=p(A,I,P,T,C,4,s[40]),I,P,a,11,s[41]),A,I,d,16,s[42]),T,A,g,23,s[43]),P=p(P,T=p(T,A=p(A,I,P,T,S,4,s[44]),I,P,k,11,s[45]),A,I,x,16,s[46]),T,A,f,23,s[47]),P=h(P,T=h(T,A=h(A,I,P,T,a,6,s[48]),I,P,v,10,s[49]),A,I,E,15,s[50]),T,A,y,21,s[51]),P=h(P,T=h(T,A=h(A,I,P,T,k,6,s[52]),I,P,d,10,s[53]),A,I,w,15,s[54]),T,A,u,21,s[55]),P=h(P,T=h(T,A=h(A,I,P,T,b,6,s[56]),I,P,x,10,s[57]),A,I,g,15,s[58]),T,A,C,21,s[59]),P=h(P,T=h(T,A=h(A,I,P,T,m,6,s[60]),I,P,_,10,s[61]),A,I,f,15,s[62]),T,A,S,21,s[63]),i[0]=i[0]+A|0,i[1]=i[1]+I|0,i[2]=i[2]+P|0,i[3]=i[3]+T|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,o=8*e.sigBytes;r[o>>>5]|=128<<24-o%32;var i=t.floor(n/4294967296),a=n;r[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),r[14+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,o,i,a){var s=e+(t&r|~t&n)+o+a;return(s<<i|s>>>32-i)+t}function l(e,t,r,n,o,i,a){var s=e+(t&n|r&~n)+o+a;return(s<<i|s>>>32-i)+t}function p(e,t,r,n,o,i,a){var s=e+(t^r^n)+o+a;return(s<<i|s>>>32-i)+t}function h(e,t,r,n,o,i,a){var s=e+(r^(t|~n))+o+a;return(s<<i|s>>>32-i)+t}r.MD5=i._createHelper(u),r.HmacMD5=i._createHmacHelper(u)}(Math),e.MD5}(r(1))},function(e,t,r){var n=r(399),o=r(400);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}},function(e,t,r){var n=r(72);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(111),o=r(77);e.exports=Object.keys||function(e){return n(e,o)}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){"use strict";var n=r(177)(!0);r(113)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r){var n=r(13).f,o=r(19),i=r(9)("toStringTag");e.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t,r){r(181);for(var n=r(8),o=r(20),i=r(28),a=r(9)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var c=s[u],l=n[c],p=l&&l.prototype;p&&!p[a]&&o(p,a,c),i[c]=i.Array}},function(e,t,r){var n=r(56),o=r(119);e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(r[c],e[c],c,r,e):void 0;void 0===l&&(l=e[c]),a?o(r,c,l):n(r,c,l)}return r}},function(e,t,r){var n=r(121),o=r(87);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},function(e,t,r){var n=r(63),o=1/0;e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}},function(e,t,r){"use strict";function n(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=n},function(e,t,r){"use strict";var n=r(33);e.exports=new n({include:[r(141)],implicit:[r(275),r(276)],explicit:[r(277),r(278),r(279),r(280)]})},function(e,t,r){!function(t,r){var n={version:"2.3.2",areas:{},apis:{},inherit:function(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r]);return t},stringify:function(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)},parse:function(e){try{return JSON.parse(e)}catch(t){return e}},fn:function(e,t){for(var r in n.storeAPI[e]=t,n.apis)n.apis[r][e]=t},get:function(e,t){return e.getItem(t)},set:function(e,t,r){e.setItem(t,r)},remove:function(e,t){e.removeItem(t)},key:function(e,t){return e.key(t)},length:function(e){return e.length},clear:function(e){e.clear()},Store:function(e,t,r){var o=n.inherit(n.storeAPI,function(e,t,r){return 0===arguments.length?o.getAll():void 0!==t?o.set(e,t,r):"string"==typeof e||"number"==typeof e?o.get(e):e?o.setAll(e,t):o.clear()});o._id=e;try{t.setItem("_safariPrivate_","sucks"),o._area=t,t.removeItem("_safariPrivate_")}catch(e){}return o._area||(o._area=n.inherit(n.storageAPI,{items:{},name:"fake"})),o._ns=r||"",n.areas[e]||(n.areas[e]=o._area),n.apis[o._ns+o._id]||(n.apis[o._ns+o._id]=o),o},storeAPI:{area:function(e,t){var r=this[e];return r&&r.area||(r=n.Store(e,t,this._ns),this[e]||(this[e]=r)),r},namespace:function(e,t){if(!e)return this._ns?this._ns.substring(0,this._ns.length-1):"";var r=e,o=this[r];return o&&o.namespace||(o=n.Store(this._id,this._area,this._ns+r+"."),this[r]||(this[r]=o),t||o.area("session",n.areas.session)),o},isFake:function(){return"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(e){return this._area.has?this._area.has(this._in(e)):!!(this._in(e)in this._area)},size:function(){return this.keys().length},each:function(e,t){for(var r=0,o=n.length(this._area);r<o;r++){var i=this._out(n.key(this._area,r));if(void 0!==i&&!1===e.call(this,i,t||this.get(i)))break;o>n.length(this._area)&&(o--,r--)}return t||this},keys:function(){return this.each(function(e,t){t.push(e)},[])},get:function(e,t){var r=n.get(this._area,this._in(e));return null!==r?n.parse(r):t||r},getAll:function(){return this.each(function(e,t){t[e]=this.get(e)},{})},set:function(e,t,r){var o=this.get(e);return null!=o&&!1===r?t:n.set(this._area,this._in(e),n.stringify(t),r)||o},setAll:function(e,t){var r,n;for(var o in e)n=e[o],this.set(o,n,t)!==n&&(r=!0);return r},remove:function(e){var t=this.get(e);return n.remove(this._area,this._in(e)),t},clear:function(){return this._ns?this.each(function(e){n.remove(this._area,this._in(e))},1):n.clear(this._area),this},clearAll:function(){var e=this._area;for(var t in n.areas)n.areas.hasOwnProperty(t)&&(this._area=n.areas[t],this.clear());return this._area=e,this},_in:function(e){return"string"!=typeof e&&(e=n.stringify(e)),this._ns?this._ns+e:e},_out:function(e){return this._ns?e&&0===e.indexOf(this._ns)?e.substring(this._ns.length):void 0:e}},storageAPI:{length:0,has:function(e){return this.items.hasOwnProperty(e)},key:function(e){var t=0;for(var r in this.items)if(this.has(r)&&e===t++)return r},setItem:function(e,t){this.has(e)||this.length++,this.items[e]=t},removeItem:function(e){this.has(e)&&(delete this.items[e],this.length--)},getItem:function(e){return this.has(e)?this.items[e]:null},clear:function(){for(var e in this.list)this.removeItem(e)},toString:function(){return this.length+" items in "+this.name+"Storage"}}};t.store&&(n.conflict=t.store);var o=n.Store("local",function(){try{return localStorage}catch(e){}}());o.local=o,o._=n,o.area("session",function(){try{return sessionStorage}catch(e){}}()),t.store=o,"function"==typeof r&&void 0!==r.amd?r(function(){return o}):e.exports&&(e.exports=o)}(this,this.define)},function(e,t,r){var n=r(74),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){var n=r(53)("meta"),o=r(11),i=r(19),a=r(13).f,s=0,u=Object.isExtensible||function(){return!0},c=!r(21)(function(){return u(Object.preventExtensions({}))}),l=function(e){a(e,n,{value:{i:"O"+ ++s,w:{}}})},p=e.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,n)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[n].i},getWeak:function(e,t){if(!i(e,n)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[n].w},onFreeze:function(e){return c&&p.NEED&&u(e)&&!i(e,n)&&l(e),e}}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){var n=r(119),o=r(57),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t){var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=typeof e;return!!(t=null==t?r:t)&&("number"==o||"symbol"!=o&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){var r=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(22),o=r(130),i=r(131),a=r(14),s=r(52),u=r(94),c={},l={};(t=e.exports=function(e,t,r,p,h){var f,d,m,y,g=h?function(){return e}:u(e),v=n(r,p,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(f=s(e.length);f>b;b++)if((y=t?v(a(d=e[b])[0],d[1]):v(e[b]))===c||y===l)return y}else for(m=g.call(e);!(d=m.next()).done;)if((y=o(m,v,d.value,t))===c||y===l)return y}).BREAK=c,t.RETURN=l},function(e,t,r){var n=r(12),o=r(98),i=r(235),a=r(138);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,r){var n=r(24),o=r(18),i="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&n(e)==i}},function(e,t,r){var n=r(23)(Object,"create");e.exports=n},function(e,t,r){var n=r(245),o=r(246),i=r(247),a=r(248),s=r(249);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,r){var n=r(57);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},function(e,t,r){var n=r(251);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},function(e,t,r){"use strict";var n=r(33);e.exports=n.DEFAULT=new n({include:[r(50)],explicit:[r(281),r(282),r(283)]})},function(e,t,r){var n=r(309),o=r(100),i=r(310),a=r(311),s=r(312),u=r(24),c=r(123),l=c(n),p=c(o),h=c(i),f=c(a),d=c(s),m=u;(n&&"[object DataView]"!=m(new n(new ArrayBuffer(1)))||o&&"[object Map]"!=m(new o)||i&&"[object Promise]"!=m(i.resolve())||a&&"[object Set]"!=m(new a)||s&&"[object WeakMap]"!=m(new s))&&(m=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case l:return"[object DataView]";case p:return"[object Map]";case h:return"[object Promise]";case f:return"[object Set]";case d:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,r){e.exports=function(e){return function(t){var r=e,n=r.lib,o=n.Base,i=n.WordArray,a=r.x64={};a.Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n<t;n++){var o=e[n];r.push(o.high),r.push(o.low)}return i.create(r,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),r=t.length,n=0;n<r;n++)t[n]=t[n].clone();return e}})}(),e}(r(1))},function(e,t,r){"use strict";var n=r(403),o=r(405);e.exports=function(e){if(!e)throw new Error("Invalid token specified");return o(n(e.split(".")[1]))}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t,r){var n=r(39);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(76)("keys"),o=r(53);e.exports=function(e){return n[e]||(n[e]=o(e))}},function(e,t,r){var n=r(3),o=r(8),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:r(40)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){var n=r(11),o=r(8).document,i=n(o)&&n(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,r){var n=r(11);e.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){e.exports=r(20)},function(e,t,r){var n=r(14),o=r(179),i=r(77),a=r(75)("IE_PROTO"),s=function(){},u=function(){var e,t=r(78)("iframe"),n=i.length;for(t.style.display="none",r(114).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;n--;)delete u.prototype[i[n]];return u()};e.exports=Object.create||function(e,t){var r;return null!==e?(s.prototype=n(e),r=new s,s.prototype=null,r[a]=e):r=u(),void 0===t?r:o(r,t)}},function(e,t,r){t.f=r(9)},function(e,t,r){var n=r(8),o=r(3),i=r(40),a=r(82),s=r(13).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){},function(e,t){e.exports=function(e){return e}},function(e,t){var r=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}},function(e,t,r){var n=r(213),o=r(18),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,r){(function(e){var n=r(15),o=r(214),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;e.exports=u}).call(this,r(60)(e))},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,r){(function(e){var n=r(122),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,r(60)(e))},function(e,t,r){var n=r(39),o=r(9)("toStringTag"),i="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:i?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){var n=r(92),o=r(9)("iterator"),i=r(28);e.exports=r(3).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[n(e)]}},function(e,t,r){"use strict";var n=r(41);e.exports.f=function(e){return new function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)}(e)}},function(e,t,r){var n=r(20);e.exports=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:n(e,o,t[o]);return e}},function(e,t,r){var n=r(62),o=r(48);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r<i;)e=e[o(t[r++])];return r&&r==i?e:void 0}},function(e,t,r){var n=r(12),o=r(63),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},function(e,t,r){var n=r(238),o=r(250),i=r(252),a=r(253),s=r(254);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,r){var n=r(23)(r(15),"Map");e.exports=n},function(e,t,r){"use strict";var n=r(33);e.exports=new n({explicit:[r(268),r(269),r(270)]})},function(e,t,r){var n=r(65),o=r(293),i=r(294),a=r(295),s=r(296),u=r(297);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t,r){var n=r(306),o=r(146),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:o;e.exports=s},function(e,t){e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},function(e,t,r){var n=r(128)(Object.getPrototypeOf,Object);e.exports=n},function(e,t,r){var n=r(150);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},function(e,t){var r=this&&this.__extends||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);function n(){this.constructor=e}e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},n=Object.prototype.hasOwnProperty;
/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017 Joachim Wester
 * MIT license
 */function o(e,t){return n.call(e,t)}function i(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r<t.length;r++)t[r]=""+r;return t}if(Object.keys)return Object.keys(e);t=[];for(var n in e)o(e,n)&&t.push(n);return t}function a(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function s(e,t){var r;for(var n in e)if(o(e,n)){if(e[n]===t)return a(n)+"/";if("object"==typeof e[n]&&""!=(r=s(e[n],t)))return a(n)+"/"+r}return""}t.hasOwnProperty=o,t._objectKeys=i,t._deepClone=function(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}},t.isInteger=function(e){for(var t,r=0,n=e.length;r<n;){if(!((t=e.charCodeAt(r))>=48&&t<=57))return!1;r++}return!0},t.escapePathComponent=a,t.unescapePathComponent=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},t._getPathRecursive=s,t.getPath=function(e,t){if(e===t)return"/";var r=s(e,t);if(""===r)throw new Error("Object not found in root");return"/"+r},t.hasUndefined=function e(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var r=0,n=t.length;r<n;r++)if(e(t[r]))return!0}else if("object"==typeof t){var o=i(t),a=o.length;for(r=0;r<a;r++)if(e(t[o[r]]))return!0}return!1};var u=function(e){function t(t,r,n,o,i){e.call(this,t),this.message=t,this.name=r,this.index=n,this.operation=o,this.tree=i}return r(t,e),t}(Error);t.PatchError=u},function(e,t,r){var n=r(22),o=r(73),i=r(37),a=r(52),s=r(375);e.exports=function(e,t){var r=1==e,u=2==e,c=3==e,l=4==e,p=6==e,h=5==e||p,f=t||s;return function(t,s,d){for(var m,y,g=i(t),v=o(g),b=n(s,d,3),S=a(v.length),w=0,_=r?f(t,S):u?f(t,0):void 0;S>w;w++)if((h||w in v)&&(y=b(m=v[w],w,g),e))if(r)_[w]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return w;case 2:_.push(m)}else if(l)return!1;return p?-1:c||l?l:_}}},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=[],a=t.algo.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],o=r[1],a=r[2],s=r[3],u=r[4],c=0;c<80;c++){if(c<16)i[c]=0|e[t+c];else{var l=i[c-3]^i[c-8]^i[c-14]^i[c-16];i[c]=l<<1|l>>>31}var p=(n<<5|n>>>27)+u+i[c];p+=c<20?1518500249+(o&a|~o&s):c<40?1859775393+(o^a^s):c<60?(o&a|o&s|a&s)-1894007588:(o^a^s)-899497514,u=s,s=a,a=o<<30|o>>>2,o=n,n=p}r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=o._createHelper(a),t.HmacSHA1=o._createHmacHelper(a)}(),e.SHA1}(r(1))},function(e,t,r){e.exports=function(e){!function(){var t=e,r=t.lib,n=r.Base,o=t.enc,i=o.Utf8,a=t.algo;a.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,u=a.words,c=0;c<r;c++)s[c]^=1549556828,u[c]^=909522486;o.sigBytes=a.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);t.reset();var n=t.finalize(this._oKey.clone().concat(r));return n}})}()}(r(1))},function(e,t,r){var n=r(19),o=r(27),i=r(171)(!1),a=r(75)("IE_PROTO");e.exports=function(e,t){var r,s=o(e),u=0,c=[];for(r in s)r!=a&&n(s,r)&&c.push(r);for(;t.length>u;)n(s,r=t[u++])&&(~i(c,r)||c.push(r));return c}},function(e,t,r){e.exports=!r(17)&&!r(21)(function(){return 7!=Object.defineProperty(r(78)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";var n=r(40),o=r(10),i=r(80),a=r(20),s=r(28),u=r(178),c=r(44),l=r(180),p=r(9)("iterator"),h=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,r,d,m,y,g){u(r,t,d);var v,b,S,w=function(e){if(!h&&e in E)return E[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},_=t+" Iterator",k="values"==m,C=!1,E=e.prototype,x=E[p]||E["@@iterator"]||m&&E[m],A=x||w(m),I=m?k?w("entries"):A:void 0,P="Array"==t&&E.entries||x;if(P&&(S=l(P.call(new e)))!==Object.prototype&&S.next&&(c(S,_,!0),n||"function"==typeof S[p]||a(S,p,f)),k&&x&&"values"!==x.name&&(C=!0,A=function(){return x.call(this)}),n&&!g||!h&&!C&&E[p]||a(E,p,A),s[t]=A,s[_]=f,m)if(v={values:k?A:w("values"),keys:y?A:w("keys"),entries:I},g)for(b in v)b in E||i(E,b,v[b]);else o(o.P+o.F*(h||C),t,v);return v}},function(e,t,r){var n=r(8).document;e.exports=n&&n.documentElement},function(e,t,r){var n=r(39);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){var n=r(111),o=r(77).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},function(e,t,r){e.exports={default:r(192),__esModule:!0}},function(e,t,r){"use strict";var n=r(38),o=r(84),i=r(55),a=r(37),s=r(73),u=Object.assign;e.exports=!u||r(21)(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,c=1,l=o.f,p=i.f;u>c;)for(var h,f=s(arguments[c++]),d=l?n(f).concat(l(f)):n(f),m=d.length,y=0;m>y;)p.call(f,h=d[y++])&&(r[h]=f[h]);return r}:u},function(e,t,r){var n=r(120);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},function(e,t,r){var n=r(23),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,r){var n=r(24),o=r(16),i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";e.exports=function(e){if(!o(e))return!1;var t=n(e);return t==a||t==s||t==i||t==u}},function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(this,r(30))},function(e,t){var r=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,r){var n=r(207),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=r(u),n(e,this,c)}}},function(e,t,r){var n=r(208),o=r(210)(n);e.exports=o},function(e,t,r){var n=r(212),o=r(88),i=r(12),a=r(89),s=r(58),u=r(127),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),l=!r&&o(e),p=!r&&!l&&a(e),h=!r&&!l&&!p&&u(e),f=r||l||p||h,d=f?n(e.length,String):[],m=d.length;for(var y in e)!t&&!c.call(e,y)||f&&("length"==y||p&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,m))||d.push(y);return d}},function(e,t,r){var n=r(215),o=r(90),i=r(91),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},function(e,t){e.exports=function(e,t){return function(r){return e(t(r))}}},function(e,t,r){e.exports={default:r(227),__esModule:!0}},function(e,t,r){var n=r(14);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){var n=r(28),o=r(9)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||i[o]===e)}},function(e,t,r){var n=r(14),o=r(41),i=r(9)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||void 0==(r=n(a)[i])?t:o(r)}},function(e,t,r){var n,o,i,a=r(22),s=r(229),u=r(114),c=r(78),l=r(8),p=l.process,h=l.setImmediate,f=l.clearImmediate,d=l.MessageChannel,m=l.Dispatch,y=0,g={},v=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){v.call(e.data)};h&&f||(h=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return g[++y]=function(){s("function"==typeof e?e:Function(e),t)},n(y),y},f=function(e){delete g[e]},"process"==r(39)(p)?n=function(e){p.nextTick(a(v,e,1))}:m&&m.now?n=function(e){m.now(a(v,e,1))}:d?(i=(o=new d).port2,o.port1.onmessage=b,n=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(n=function(e){l.postMessage(e+"","*")},l.addEventListener("message",b,!1)):n="onreadystatechange"in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}),e.exports={set:h,clear:f}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,r){var n=r(14),o=r(11),i=r(95);e.exports=function(e,t){if(n(e),o(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},function(e,t,r){var n=r(9)("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},e(i)}catch(e){}return r}},function(e,t,r){var n=r(97);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},function(e,t,r){var n=r(139);e.exports=function(e){return null==e?"":n(e)}},function(e,t,r){var n=r(29),o=r(255),i=r(12),a=r(63),s=1/0,u=n?n.prototype:void 0,c=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-s?"-0":r}},function(e,t,r){var n=r(262);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},function(e,t,r){"use strict";var n=r(33);e.exports=new n({include:[r(142)]})},function(e,t,r){"use strict";var n=r(33);e.exports=new n({include:[r(101)],implicit:[r(271),r(272),r(273),r(274)]})},function(e,t,r){e.exports={default:r(285),__esModule:!0}},function(e,t,r){e.exports={default:r(289),__esModule:!0}},function(e,t,r){var n=r(126),o=r(301),i=r(47);e.exports=function(e){return i(e)?n(e,!0):o(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,r){var n=r(104),o=r(105),i=r(103),a=r(146),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:a;e.exports=s},function(e,t,r){var n=r(149),o=r(103),i=r(31);e.exports=function(e){return n(e,i,o)}},function(e,t,r){var n=r(104),o=r(12);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},function(e,t,r){var n=r(15).Uint8Array;e.exports=n},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),i=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:i,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var u=a[s],c=i[u];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t.push({obj:i,prop:u}),r.push(c))}return function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],o=0;o<t.length;++o)void 0!==t[o]&&n.push(t[o]);r.obj[r.prop]=n}}return t}(t)},decode:function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},encode:function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",n=0;n<t.length;++n){var i=t.charCodeAt(n);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(n):i<128?r+=o[i]:i<2048?r+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?r+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return r},isBuffer:function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,r,o){if(!r)return t;if("object"!=typeof r){if(Array.isArray(t))t.push(r);else{if("object"!=typeof t)return[t,r];(o.plainObjects||o.allowPrototypes||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if("object"!=typeof t)return[t].concat(r);var a=t;return Array.isArray(t)&&!Array.isArray(r)&&(a=i(t,o)),Array.isArray(t)&&Array.isArray(r)?(r.forEach(function(r,i){n.call(t,i)?t[i]&&"object"==typeof t[i]?t[i]=e(t[i],r,o):t.push(r):t[i]=r}),t):Object.keys(r).reduce(function(t,i){var a=r[i];return n.call(t,i)?t[i]=e(t[i],a,o):t[i]=a,t},a)}}},function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){var n=r(340),o=r(353),i=r(86),a=r(12),s=r(356);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):n(e):s(e)}},function(e,t,r){var n=r(342),o=r(18);e.exports=function e(t,r,i,a,s){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,a,e,s))}},function(e,t,r){var n=r(343),o=r(346),i=r(347),a=1,s=2;e.exports=function(e,t,r,u,c,l){var p=r&a,h=e.length,f=t.length;if(h!=f&&!(p&&f>h))return!1;var d=l.get(e);if(d&&l.get(t))return d==t;var m=-1,y=!0,g=r&s?new n:void 0;for(l.set(e,t),l.set(t,e);++m<h;){var v=e[m],b=t[m];if(u)var S=p?u(b,v,m,t,e,l):u(v,b,m,e,t,l);if(void 0!==S){if(S)continue;y=!1;break}if(g){if(!o(t,function(e,t){if(!i(g,t)&&(v===e||c(v,e,r,u,l)))return g.push(t)})){y=!1;break}}else if(v!==b&&!c(v,b,r,u,l)){y=!1;break}}return l.delete(e),l.delete(t),y}},function(e,t,r){var n=r(16);e.exports=function(e){return e==e&&!n(e)}},function(e,t){e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},function(e,t,r){var n=r(354),o=r(355);e.exports=function(e,t){return null!=e&&o(e,t,n)}},function(e,t,r){var n=Array.prototype.slice,o=r(368),i=r(369),a=e.exports=function(e,t,r){return r||(r={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?r.strict?e===t:e==t:function(e,t,r){var c,l;if(s(e)||s(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e))return!!i(t)&&(e=n.call(e),t=n.call(t),a(e,t,r));if(u(e)){if(!u(t))return!1;if(e.length!==t.length)return!1;for(c=0;c<e.length;c++)if(e[c]!==t[c])return!1;return!0}try{var p=o(e),h=o(t)}catch(e){return!1}if(p.length!=h.length)return!1;for(p.sort(),h.sort(),c=p.length-1;c>=0;c--)if(p[c]!=h[c])return!1;for(c=p.length-1;c>=0;c--)if(l=p[c],!a(e[l],t[l],r))return!1;return typeof e==typeof t}(e,t,r))};function s(e){return null===e||void 0===e}function u(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}},function(e,t,r){var n={strict:!0},o=r(159),i=function(e,t){return o(e,t,n)},a=r(107);t.JsonPatchError=a.PatchError,t.deepClone=a._deepClone;var s={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var n=e[t];return delete e[t],{newDocument:r,removed:n}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:function(e,t,r){var n=c(r,this.path);n&&(n=a._deepClone(n));var o=l(r,{op:"remove",path:this.from}).removed;return l(r,{op:"add",path:this.path,value:o}),{newDocument:r,removed:n}},copy:function(e,t,r){var n=c(r,this.from);return l(r,{op:"add",path:this.path,value:a._deepClone(n)}),{newDocument:r}},test:function(e,t,r){return{newDocument:r,test:i(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},u={add:function(e,t,r){return a.isInteger(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){return{newDocument:r,removed:e.splice(t,1)[0]}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:s.move,copy:s.copy,test:s.test,_get:s._get};function c(e,t){if(""==t)return e;var r={op:"_get",path:t};return l(e,r),r.value}function l(e,r,n,o){if(void 0===n&&(n=!1),void 0===o&&(o=!0),n&&("function"==typeof n?n(r,0,e,r.path):h(r,0)),""===r.path){var l={newDocument:e};if("add"===r.op)return l.newDocument=r.value,l;if("replace"===r.op)return l.newDocument=r.value,l.removed=e,l;if("move"===r.op||"copy"===r.op)return l.newDocument=c(e,r.from),"move"===r.op&&(l.removed=e),l;if("test"===r.op){if(l.test=i(e,r.value),!1===l.test)throw new t.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",0,r,e);return l.newDocument=e,l}if("remove"===r.op)return l.removed=e,l.newDocument=null,l;if("_get"===r.op)return r.value=e,l;if(n)throw new t.JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",0,r,e);return l}o||(e=a._deepClone(e));var p=(r.path||"").split("/"),f=e,d=1,m=p.length,y=void 0,g=void 0,v=void 0;for(v="function"==typeof n?n:h;;){if(g=p[d],n&&void 0===y&&(void 0===f[g]?y=p.slice(0,d).join("/"):d==m-1&&(y=r.path),void 0!==y&&v(r,0,e,y)),d++,Array.isArray(f)){if("-"===g)g=f.length;else{if(n&&!a.isInteger(g))throw new t.JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",0,r.path,r);a.isInteger(g)&&(g=~~g)}if(d>=m){if(n&&"add"===r.op&&g>f.length)throw new t.JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",0,r.path,r);if(!1===(l=u[r.op].call(r,f,g,e)).test)throw new t.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",0,r,e);return l}}else if(g&&-1!=g.indexOf("~")&&(g=a.unescapePathComponent(g)),d>=m){if(!1===(l=s[r.op].call(r,f,g,e)).test)throw new t.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",0,r,e);return l}f=f[g]}}function p(e,r,n,o){if(void 0===o&&(o=!0),n&&!Array.isArray(r))throw new t.JsonPatchError("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");o||(e=a._deepClone(e));for(var i=new Array(r.length),s=0,u=r.length;s<u;s++)i[s]=l(e,r[s],n),e=i[s].newDocument;return i.newDocument=e,i}function h(e,r,n,o){if("object"!=typeof e||null===e||Array.isArray(e))throw new t.JsonPatchError("Operation is not an object","OPERATION_NOT_AN_OBJECT",r,e,n);if(!s[e.op])throw new t.JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",r,e,n);if("string"!=typeof e.path)throw new t.JsonPatchError("Operation `path` property is not a string","OPERATION_PATH_INVALID",r,e,n);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new t.JsonPatchError('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",r,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new t.JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",r,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new t.JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",r,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&a.hasUndefined(e.value))throw new t.JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",r,e,n);if(n)if("add"==e.op){var i=e.path.split("/").length,u=o.split("/").length;if(i!==u+1&&i!==u)throw new t.JsonPatchError("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",r,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==o)throw new t.JsonPatchError("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",r,e,n)}else if("move"===e.op||"copy"===e.op){var c=f([{op:"_get",path:e.from,value:void 0}],n);if(c&&"OPERATION_PATH_UNRESOLVABLE"===c.name)throw new t.JsonPatchError("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",r,e,n)}}function f(e,r,n){try{if(!Array.isArray(e))throw new t.JsonPatchError("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(r)p(a._deepClone(r),a._deepClone(e),n||!0);else{n=n||h;for(var o=0;o<e.length;o++)n(e[o],o,r,void 0)}}catch(e){if(e instanceof t.JsonPatchError)return e;throw e}}t.getValueByPointer=c,t.applyOperation=l,t.applyPatch=p,t.applyReducer=function(e,r){var n=l(e,r);if(!1===n.test)throw new t.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",0,r,e);return n.newDocument},t.validator=h,t.validate=f},function(e,t,r){var n=r(11);e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){e.exports=function(e){return function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,a=r.algo,s=[],u=[];!function(){function e(e){for(var r=t.sqrt(e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,o=0;o<64;)e(n)&&(o<8&&(s[o]=r(t.pow(n,.5))),u[o]=r(t.pow(n,1/3)),o++),n++}();var c=[],l=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],l=r[5],p=r[6],h=r[7],f=0;f<64;f++){if(f<16)c[f]=0|e[t+f];else{var d=c[f-15],m=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,y=c[f-2],g=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;c[f]=m+c[f-7]+g+c[f-16]}var v=n&o^n&i^o&i,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),S=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&p)+u[f]+c[f];h=p,p=l,l=s,s=a+S|0,a=i,i=o,o=n,n=S+(b+v)|0}r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+i|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+l|0,r[6]=r[6]+p|0,r[7]=r[7]+h|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,o=8*e.sigBytes;return r[o>>>5]|=128<<24-o%32,r[14+(o+64>>>9<<4)]=t.floor(n/4294967296),r[15+(o+64>>>9<<4)]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});r.SHA256=i._createHelper(l),r.HmacSHA256=i._createHmacHelper(l)}(Math),e.SHA256}(r(1))},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib.Hasher,n=t.x64,o=n.Word,i=n.WordArray,a=t.algo;function s(){return o.create.apply(o,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var l=a.SHA512=r.extend({_doReset:function(){this._hash=new i.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],l=r[5],p=r[6],h=r[7],f=n.high,d=n.low,m=o.high,y=o.low,g=i.high,v=i.low,b=a.high,S=a.low,w=s.high,_=s.low,k=l.high,C=l.low,E=p.high,x=p.low,A=h.high,I=h.low,P=f,T=d,N=m,R=y,D=g,U=v,O=b,B=S,M=w,q=_,L=k,j=C,F=E,z=x,K=A,V=I,H=0;H<80;H++){var G=c[H];if(H<16)var W=G.high=0|e[t+2*H],J=G.low=0|e[t+2*H+1];else{var Y=c[H-15],X=Y.high,$=Y.low,Q=(X>>>1|$<<31)^(X>>>8|$<<24)^X>>>7,Z=($>>>1|X<<31)^($>>>8|X<<24)^($>>>7|X<<25),ee=c[H-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,oe=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),ie=c[H-7],ae=ie.high,se=ie.low,ue=c[H-16],ce=ue.high,le=ue.low;W=(W=(W=Q+ae+((J=Z+se)>>>0<Z>>>0?1:0))+ne+((J+=oe)>>>0<oe>>>0?1:0))+ce+((J+=le)>>>0<le>>>0?1:0),G.high=W,G.low=J}var pe,he=M&L^~M&F,fe=q&j^~q&z,de=P&N^P&D^N&D,me=T&R^T&U^R&U,ye=(P>>>28|T<<4)^(P<<30|T>>>2)^(P<<25|T>>>7),ge=(T>>>28|P<<4)^(T<<30|P>>>2)^(T<<25|P>>>7),ve=(M>>>14|q<<18)^(M>>>18|q<<14)^(M<<23|q>>>9),be=(q>>>14|M<<18)^(q>>>18|M<<14)^(q<<23|M>>>9),Se=u[H],we=Se.high,_e=Se.low,ke=K+ve+((pe=V+be)>>>0<V>>>0?1:0),Ce=ge+me;K=F,V=z,F=L,z=j,L=M,j=q,M=O+(ke=(ke=(ke=ke+he+((pe+=fe)>>>0<fe>>>0?1:0))+we+((pe+=_e)>>>0<_e>>>0?1:0))+W+((pe+=J)>>>0<J>>>0?1:0))+((q=B+pe|0)>>>0<B>>>0?1:0)|0,O=D,B=U,D=N,U=R,N=P,R=T,P=ke+(ye+de+(Ce>>>0<ge>>>0?1:0))+((T=pe+Ce|0)>>>0<pe>>>0?1:0)|0}d=n.low=d+T,n.high=f+P+(d>>>0<T>>>0?1:0),y=o.low=y+R,o.high=m+N+(y>>>0<R>>>0?1:0),v=i.low=v+U,i.high=g+D+(v>>>0<U>>>0?1:0),S=a.low=S+B,a.high=b+O+(S>>>0<B>>>0?1:0),_=s.low=_+q,s.high=w+M+(_>>>0<q>>>0?1:0),C=l.low=C+j,l.high=k+L+(C>>>0<j>>>0?1:0),x=p.low=x+z,p.high=E+F+(x>>>0<z>>>0?1:0),I=h.low=I+V,h.high=A+K+(I>>>0<V>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=r._createHelper(l),t.HmacSHA512=r._createHmacHelper(l)}(),e.SHA512}(r(1),r(70))},function(e,t){e.exports.getHostUrl=function(e){var t="";return e.host&&(e.protocol?t+="".concat(e.protocol,"://"):e.secure?t+="https://":"undefined"!=typeof window?"file:"===window.location.protocol?t+="http://":window.location.protocol?t+="".concat(location.protocol,"//"):t+="//":t+="https://",t+=e.host,e.port&&(t+=":"+e.port)),e.path&&(e.host&&!e.path.startsWith("/")&&(t+="/"),t+=e.path),t.length>0&&!t.endsWith("/")&&(t+="/"),t}},function(e,t,r){(function(t){var r;e.exports=function e(t,n,o){function i(s,u){if(!n[s]){if(!t[s]){var c="function"==typeof r&&r;if(!u&&c)return r(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=n[s]={exports:{}};t[s][0].call(p.exports,function(e){return i(t[s][1][e]||e)},p,p.exports,e,t,n,o)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(e,t){var r=e("./lib/scclientsocket"),n=e("./lib/factory");t.exports.factory=n,t.exports.SCClientSocket=r,t.exports.Emitter=e("component-emitter"),t.exports.create=function(e){return n.create(e)},t.exports.connect=t.exports.create,t.exports.destroy=function(e){return n.destroy(e)},t.exports.clients=n.clients,t.exports.version="14.2.2"},{"./lib/factory":3,"./lib/scclientsocket":5,"component-emitter":11}],2:[function(e,r){(function(e){var t=function(){this._internalStorage={},this.isLocalStorageEnabled=this._checkLocalStorageEnabled()};t.prototype._checkLocalStorageEnabled=function(){var t;try{e.localStorage,e.localStorage.setItem("__scLocalStorageTest",1),e.localStorage.removeItem("__scLocalStorageTest")}catch(e){t=e}return!t},t.prototype.saveToken=function(t,r,n,o){this.isLocalStorageEnabled&&e.localStorage?e.localStorage.setItem(t,r):this._internalStorage[t]=r,o&&o(null,r)},t.prototype.removeToken=function(t,r){var n;this.loadToken(t,function(e,t){n=t}),this.isLocalStorageEnabled&&e.localStorage?e.localStorage.removeItem(t):delete this._internalStorage[t],r&&r(null,n)},t.prototype.loadToken=function(t,r){r(null,this.isLocalStorageEnabled&&e.localStorage?e.localStorage.getItem(t):this._internalStorage[t]||null)},r.exports.AuthEngine=t}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,r){(function(t){var n=e("./scclientsocket"),o=e("sc-errors"),i=e("uuid"),a=o.InvalidArgumentsError,s={};r.exports={create:function(e){if((e=e||{}).host&&!e.host.match(/[^:]+:\d{2,5}/))throw new a('The host option should include both the hostname and the port number in the format "hostname:port"');if(e.host&&e.hostname)throw new a('The host option should already include the hostname and the port number in the format "hostname:port" - Because of this, you should never use host and hostname options together');if(e.host&&e.port)throw new a('The host option should already include the hostname and the port number in the format "hostname:port" - Because of this, you should never use host and port options together');var r,o,u,c=t.location&&"https:"===location.protocol,l={port:(r=e,o=c,u=null==r.secure?o:r.secure,r.port||(t.location&&location.port?location.port:u?443:80)),hostname:t.location&&location.hostname||"localhost",path:"/socketcluster/",secure:c,autoConnect:!0,autoReconnect:!0,autoSubscribeOnConnect:!0,connectTimeout:2e4,ackTimeout:1e4,timestampRequests:!1,timestampParam:"t",authEngine:null,authTokenName:"socketCluster.authToken",binaryType:"arraybuffer",multiplex:!0,pubSubBatchDuration:null,cloneData:!1};for(var p in e)e.hasOwnProperty(p)&&(l[p]=e[p]);if(l.clientMap=s,!1!==l.multiplex)return l.clientId=function(e){var t=e.secure?"https://":"http://",r="";if(e.query)if("string"==typeof e.query)r=e.query;else{var n=[],o=e.query;for(var i in o)o.hasOwnProperty(i)&&n.push(i+"="+o[i]);n.length&&(r="?"+n.join("&"))}return t+(e.host?e.host:e.hostname+":"+e.port)+e.path+r}(l),s[l.clientId]?l.autoConnect&&s[l.clientId].connect():s[l.clientId]=new n(l),s[l.clientId];l.clientId=i.v4();var h=new n(l);return s[l.clientId]=h},destroy:function(e){e.destroy()},clients:s}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./scclientsocket":5,"sc-errors":20,uuid:22}],4:[function(e,t){var r=e("sc-errors"),n=r.InvalidActionError,o=function(e,t){this.socket=e,this.id=t,this.sent=!1};o.prototype._respond=function(e){if(this.sent)throw new n("Response "+this.id+" has already been sent");this.sent=!0,this.socket.send(this.socket.encode(e))},o.prototype.end=function(e){if(this.id){var t={rid:this.id};void 0!==e&&(t.data=e),this._respond(t)}},o.prototype.error=function(e,t){if(this.id){var n=r.dehydrateError(e),o={rid:this.id,error:n};void 0!==t&&(o.data=t),this._respond(o)}},o.prototype.callback=function(e,t){e?this.error(e,t):this.end(t)},t.exports.Response=o},{"sc-errors":20}],5:[function(e,r){(function(t){var n=e("component-emitter"),o=e("sc-channel").SCChannel;e("./response").Response;var i=e("./auth").AuthEngine,a=e("sc-formatter"),s=e("./sctransport").SCTransport,u=e("querystring"),c=e("linked-list"),l=e("buffer/").Buffer,p=e("clone"),h=e("sc-errors"),f=h.InvalidArgumentsError,d=h.InvalidMessageError,m=h.InvalidActionError,y=h.SocketProtocolError,g=h.TimeoutError,v=h.BadConnectionError,b="undefined"!=typeof window,S=function(e){var r=this;n.call(this),this.id=null,this.state=this.CLOSED,this.authState=this.UNAUTHENTICATED,this.signedAuthToken=null,this.authToken=null,this.pendingReconnect=!1,this.pendingReconnectTimeout=null,this.preparingPendingSubscriptions=!1,this.clientId=e.clientId,this.connectTimeout=e.connectTimeout,this.ackTimeout=e.ackTimeout,this.channelPrefix=e.channelPrefix||null,this.disconnectOnUnload=null==e.disconnectOnUnload||e.disconnectOnUnload,this.authTokenName=e.authTokenName,this.pingTimeout=this.ackTimeout,this.pingTimeoutDisabled=!!e.pingTimeoutDisabled,this.active=!0,this._clientMap=e.clientMap||{};var o=Math.pow(2,31)-1,s=function(e){if(r[e]>o)throw new f("The "+e+" value provided exceeded the maximum amount allowed")};if(s("connectTimeout"),s("ackTimeout"),this._localEvents={connect:1,connectAbort:1,close:1,disconnect:1,message:1,error:1,raw:1,kickOut:1,subscribe:1,unsubscribe:1,subscribeStateChange:1,authStateChange:1,authenticate:1,deauthenticate:1,removeAuthToken:1,subscribeRequest:1},this.connectAttempts=0,this._emitBuffer=new c,this.channels={},this.options=e,this._cid=1,this.options.callIdGenerator=function(){return r._cid++},this.options.autoReconnect){null==this.options.autoReconnectOptions&&(this.options.autoReconnectOptions={});var l=this.options.autoReconnectOptions;null==l.initialDelay&&(l.initialDelay=1e4),null==l.randomness&&(l.randomness=1e4),null==l.multiplier&&(l.multiplier=1.5),null==l.maxDelay&&(l.maxDelay=6e4)}if(null==this.options.subscriptionRetryOptions&&(this.options.subscriptionRetryOptions={}),this.options.authEngine?this.auth=this.options.authEngine:this.auth=new i,this.options.codecEngine?this.codec=this.options.codecEngine:this.codec=a,this.options.protocol){var p=new f('The "protocol" option does not affect socketcluster-client. If you want to utilize SSL/TLS - use "secure" option instead');this._onSCError(p)}this.options.path=this.options.path.replace(/\/$/,"")+"/",this.options.query=e.query||{},"string"==typeof this.options.query&&(this.options.query=u.parse(this.options.query)),this._channelEmitter=new n,this._unloadHandler=function(){r.disconnect()},b&&this.disconnectOnUnload&&t.addEventListener&&t.addEventListener("beforeunload",this._unloadHandler,!1),(this._clientMap[this.clientId]=this).options.autoConnect&&this.connect()};S.prototype=Object.create(n.prototype),S.CONNECTING=S.prototype.CONNECTING=s.prototype.CONNECTING,S.OPEN=S.prototype.OPEN=s.prototype.OPEN,S.CLOSED=S.prototype.CLOSED=s.prototype.CLOSED,S.AUTHENTICATED=S.prototype.AUTHENTICATED="authenticated",S.UNAUTHENTICATED=S.prototype.UNAUTHENTICATED="unauthenticated",S.PENDING=S.prototype.PENDING="pending",S.ignoreStatuses=h.socketProtocolIgnoreStatuses,S.errorStatuses=h.socketProtocolErrorStatuses,S.prototype._privateEventHandlerMap={"#publish":function(e){var t=this._undecorateChannelName(e.channel);this.isSubscribed(t,!0)&&this._channelEmitter.emit(t,e.data)},"#kickOut":function(e){var t=this._undecorateChannelName(e.channel),r=this.channels[t];r&&(n.prototype.emit.call(this,"kickOut",e.message,t),r.emit("kickOut",e.message,t),this._triggerChannelUnsubscribe(r))},"#setAuthToken":function(e,t){var r=this;e?this.auth.saveToken(this.authTokenName,e.token,{},function(n){n?(t.error(n),r._onSCError(n)):(r._changeToAuthenticatedState(e.token),t.end())}):t.error(new d("No token data provided by #setAuthToken event"))},"#removeAuthToken":function(e,t){var r=this;this.auth.removeToken(this.authTokenName,function(e,o){e?(t.error(e),r._onSCError(e)):(n.prototype.emit.call(r,"removeAuthToken",o),r._changeToUnauthenticatedStateAndClearTokens(),t.end())})},"#disconnect":function(e){this.transport.close(e.code,e.data)}},S.prototype.getState=function(){return this.state},S.prototype.getBytesReceived=function(){return this.transport.getBytesReceived()},S.prototype.deauthenticate=function(e){var t=this;this.auth.removeToken(this.authTokenName,function(r,o){r?t._onSCError(r):(n.prototype.emit.call(t,"removeAuthToken",o),t.state!==t.CLOSED&&t.emit("#removeAuthToken"),t._changeToUnauthenticatedStateAndClearTokens()),e&&e(r)})},S.prototype.connect=S.prototype.open=function(){var e=this;if(this.active)this.state===this.CLOSED&&(this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this.state=this.CONNECTING,n.prototype.emit.call(this,"connecting"),this.transport&&this.transport.off(),this.transport=new s(this.auth,this.codec,this.options),this.transport.on("open",function(t){e.state=e.OPEN,e._onSCOpen(t)}),this.transport.on("error",function(t){e._onSCError(t)}),this.transport.on("close",function(t,r){e.state=e.CLOSED,e._onSCClose(t,r)}),this.transport.on("openAbort",function(t,r){e.state=e.CLOSED,e._onSCClose(t,r,!0)}),this.transport.on("event",function(t,r,n){e._onSCEvent(t,r,n)}));else{var t=new m("Cannot connect a destroyed client");this._onSCError(t)}},S.prototype.reconnect=function(e,t){this.disconnect(e,t),this.connect()},S.prototype.disconnect=function(e,t){if("number"!=typeof(e=e||1e3))throw new f("If specified, the code argument must be a number");this.state===this.OPEN||this.state===this.CONNECTING?this.transport.close(e,t):(this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef))},S.prototype.destroy=function(e,r){b&&t.removeEventListener&&t.removeEventListener("beforeunload",this._unloadHandler,!1),this.active=!1,this.disconnect(e,r),delete this._clientMap[this.clientId]},S.prototype._changeToUnauthenticatedStateAndClearTokens=function(){if(this.authState!==this.UNAUTHENTICATED){var e=this.authState,t=this.signedAuthToken;this.authState=this.UNAUTHENTICATED,this.signedAuthToken=null,this.authToken=null;var r={oldState:e,newState:this.authState};n.prototype.emit.call(this,"authStateChange",r),n.prototype.emit.call(this,"deauthenticate",t)}},S.prototype._changeToAuthenticatedState=function(e){if(this.signedAuthToken=e,this.authToken=this._extractAuthTokenData(e),this.authState!==this.AUTHENTICATED){var t=this.authState;this.authState=this.AUTHENTICATED;var r={oldState:t,newState:this.authState,signedAuthToken:e,authToken:this.authToken};this.preparingPendingSubscriptions||this.processPendingSubscriptions(),n.prototype.emit.call(this,"authStateChange",r)}n.prototype.emit.call(this,"authenticate",e)},S.prototype.decodeBase64=function(e){return l.from(e,"base64").toString("utf8")},S.prototype.encodeBase64=function(e){return l.from(e,"utf8").toString("base64")},S.prototype._extractAuthTokenData=function(e){var t=(e||"").split(".")[1];if(null!=t){var r=t;try{return r=this.decodeBase64(r),JSON.parse(r)}catch(e){return r}}return null},S.prototype.getAuthToken=function(){return this.authToken},S.prototype.getSignedAuthToken=function(){return this.signedAuthToken},S.prototype.authenticate=function(e,t){var r=this;this.emit("#authenticate",e,function(n,o){o&&null!=o.isAuthenticated?o.authError&&(o.authError=h.hydrateError(o.authError)):o={isAuthenticated:r.authState,authError:null},n?("BadConnectionError"!==n.name&&"TimeoutError"!==n.name&&r._changeToUnauthenticatedStateAndClearTokens(),t&&t(n,o)):r.auth.saveToken(r.authTokenName,e,{},function(n){n&&r._onSCError(n),o.isAuthenticated?r._changeToAuthenticatedState(e):r._changeToUnauthenticatedStateAndClearTokens(),t&&t(n,o)})})},S.prototype._tryReconnect=function(e){var t,r=this,n=this.connectAttempts++,o=this.options.autoReconnectOptions;if(null==e||0<n){var i=Math.round(o.initialDelay+(o.randomness||0)*Math.random());t=Math.round(i*Math.pow(o.multiplier,n))}else t=e;t>o.maxDelay&&(t=o.maxDelay),clearTimeout(this._reconnectTimeoutRef),this.pendingReconnect=!0,this.pendingReconnectTimeout=t,this._reconnectTimeoutRef=setTimeout(function(){r.connect()},t)},S.prototype._onSCOpen=function(e){var t=this;this.preparingPendingSubscriptions=!0,e?(this.id=e.id,this.pingTimeout=e.pingTimeout,this.transport.pingTimeout=this.pingTimeout,e.isAuthenticated?this._changeToAuthenticatedState(e.authToken):this._changeToUnauthenticatedStateAndClearTokens()):this._changeToUnauthenticatedStateAndClearTokens(),this.connectAttempts=0,this.options.autoSubscribeOnConnect&&this.processPendingSubscriptions(),n.prototype.emit.call(this,"connect",e,function(){t.processPendingSubscriptions()}),this.state===this.OPEN&&this._flushEmitBuffer()},S.prototype._onSCError=function(e){var t=this;setTimeout(function(){if(t.listeners("error").length<1)throw e;n.prototype.emit.call(t,"error",e)},0)},S.prototype._suspendSubscriptions=function(){var e,t;for(var r in this.channels)this.channels.hasOwnProperty(r)&&(t=(e=this.channels[r]).state===e.SUBSCRIBED||e.state===e.PENDING?e.PENDING:e.UNSUBSCRIBED,this._triggerChannelUnsubscribe(e,t))},S.prototype._abortAllPendingEventsDueToBadConnection=function(e){for(var t,r=this._emitBuffer.head;r;){t=r.next;var n=r.data;clearTimeout(n.timeout),delete n.timeout,r.detach(),r=t;var o=n.callback;if(o){delete n.callback;var i="Event '"+n.event+"' was aborted due to a bad connection",a=new v(i,e);o.call(n,a,n)}n.cid&&this.transport.cancelPendingResponse(n.cid)}},S.prototype._onSCClose=function(e,t,r){if(this.id=null,this.transport&&this.transport.off(),this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this._suspendSubscriptions(),this._abortAllPendingEventsDueToBadConnection(r?"connectAbort":"disconnect"),this.options.autoReconnect&&(4e3===e||4001===e||1005===e?this._tryReconnect(0):1e3!==e&&e<4500&&this._tryReconnect()),r?n.prototype.emit.call(this,"connectAbort",e,t):n.prototype.emit.call(this,"disconnect",e,t),n.prototype.emit.call(this,"close",e,t),!S.ignoreStatuses[e]){var o;o=t?"Socket connection closed with status code "+e+" and reason: "+t:"Socket connection closed with status code "+e;var i=new y(S.errorStatuses[e]||o,e);this._onSCError(i)}},S.prototype._onSCEvent=function(e,t,r){var o=this._privateEventHandlerMap[e];o?o.call(this,t,r):n.prototype.emit.call(this,e,t,function(){r&&r.callback.apply(r,arguments)})},S.prototype.decode=function(e){return this.transport.decode(e)},S.prototype.encode=function(e){return this.transport.encode(e)},S.prototype._flushEmitBuffer=function(){for(var e,t=this._emitBuffer.head;t;){e=t.next;var r=t.data;t.detach(),this.transport.emitObject(r),t=e}},S.prototype._handleEventAckTimeout=function(e,t){t&&t.detach(),delete e.timeout;var r=e.callback;if(r){delete e.callback;var n=new g("Event response for '"+e.event+"' timed out");r.call(e,n,e)}e.cid&&this.transport.cancelPendingResponse(e.cid)},S.prototype._emit=function(e,t,r){var n=this;this.state===this.CLOSED&&this.connect();var o={event:e,callback:r},i=new c.Item;this.options.cloneData?o.data=p(t):o.data=t,(i.data=o).timeout=setTimeout(function(){n._handleEventAckTimeout(o,i)},this.ackTimeout),this._emitBuffer.append(i),this.state===this.OPEN&&this._flushEmitBuffer()},S.prototype.send=function(e){this.transport.send(e)},S.prototype.emit=function(e,t,r){if(null==this._localEvents[e])this._emit(e,t,r);else if("error"===e)n.prototype.emit.call(this,e,t);else{var o=new m('The "'+e+'" event is reserved and cannot be emitted on a client socket');this._onSCError(o)}},S.prototype.publish=function(e,t,r){var n={channel:this._decorateChannelName(e),data:t};this.emit("#publish",n,r)},S.prototype._triggerChannelSubscribe=function(e,t){var r=e.name;if(e.state!==e.SUBSCRIBED){var o=e.state;e.state=e.SUBSCRIBED;var i={channel:r,oldState:o,newState:e.state,subscriptionOptions:t};e.emit("subscribeStateChange",i),e.emit("subscribe",r,t),n.prototype.emit.call(this,"subscribeStateChange",i),n.prototype.emit.call(this,"subscribe",r,t)}},S.prototype._triggerChannelSubscribeFail=function(e,t,r){var o=t.name,i=!t.waitForAuth||this.authState===this.AUTHENTICATED;t.state!==t.UNSUBSCRIBED&&i&&(t.state=t.UNSUBSCRIBED,t.emit("subscribeFail",e,o,r),n.prototype.emit.call(this,"subscribeFail",e,o,r))},S.prototype._cancelPendingSubscribeCallback=function(e){null!=e._pendingSubscriptionCid&&(this.transport.cancelPendingResponse(e._pendingSubscriptionCid),delete e._pendingSubscriptionCid)},S.prototype._decorateChannelName=function(e){return this.channelPrefix&&(e=this.channelPrefix+e),e},S.prototype._undecorateChannelName=function(e){return this.channelPrefix&&0===e.indexOf(this.channelPrefix)?e.replace(this.channelPrefix,""):e},S.prototype._trySubscribe=function(e){var t=this,r=!e.waitForAuth||this.authState===this.AUTHENTICATED;if(this.state===this.OPEN&&!this.preparingPendingSubscriptions&&null==e._pendingSubscriptionCid&&r){var o={noTimeout:!0},i={channel:this._decorateChannelName(e.name)};e.waitForAuth&&(o.waitForAuth=!0,i.waitForAuth=o.waitForAuth),e.data&&(i.data=e.data),e.batch&&(o.batch=!0,i.batch=!0),e._pendingSubscriptionCid=this.transport.emit("#subscribe",i,o,function(r){delete e._pendingSubscriptionCid,r?t._triggerChannelSubscribeFail(r,e,i):t._triggerChannelSubscribe(e,i)}),n.prototype.emit.call(this,"subscribeRequest",e.name,i)}},S.prototype.subscribe=function(e,t){var r=this.channels[e];return r?t&&r.setOptions(t):(r=new o(e,this,t),this.channels[e]=r),r.state===r.UNSUBSCRIBED&&(r.state=r.PENDING,this._trySubscribe(r)),r},S.prototype._triggerChannelUnsubscribe=function(e,t){var r=e.name,o=e.state;if(e.state=t||e.UNSUBSCRIBED,this._cancelPendingSubscribeCallback(e),o===e.SUBSCRIBED){var i={channel:r,oldState:o,newState:e.state};e.emit("subscribeStateChange",i),e.emit("unsubscribe",r),n.prototype.emit.call(this,"subscribeStateChange",i),n.prototype.emit.call(this,"unsubscribe",r)}},S.prototype._tryUnsubscribe=function(e){if(this.state===this.OPEN){var t={noTimeout:!0};e.batch&&(t.batch=!0),this._cancelPendingSubscribeCallback(e);var r=this._decorateChannelName(e.name);this.transport.emit("#unsubscribe",r,t)}},S.prototype.unsubscribe=function(e){var t=this.channels[e];t&&t.state!==t.UNSUBSCRIBED&&(this._triggerChannelUnsubscribe(t),this._tryUnsubscribe(t))},S.prototype.channel=function(e,t){var r=this.channels[e];return r||(r=new o(e,this,t),this.channels[e]=r),r},S.prototype.destroyChannel=function(e){var t=this.channels[e];t&&(t.unwatch(),t.unsubscribe(),delete this.channels[e])},S.prototype.subscriptions=function(e){var t,r=[];for(var n in this.channels)this.channels.hasOwnProperty(n)&&(t=this.channels[n],(e?t&&(t.state===t.SUBSCRIBED||t.state===t.PENDING):t&&t.state===t.SUBSCRIBED)&&r.push(n));return r},S.prototype.isSubscribed=function(e,t){var r=this.channels[e];return t?!!r&&(r.state===r.SUBSCRIBED||r.state===r.PENDING):!!r&&r.state===r.SUBSCRIBED},S.prototype.processPendingSubscriptions=function(){var e=this;this.preparingPendingSubscriptions=!1;var t=[];for(var r in this.channels)if(this.channels.hasOwnProperty(r)){var n=this.channels[r];n.state===n.PENDING&&t.push(n)}t.sort(function(e,t){var r=e.priority||0,n=t.priority||0;return n<r?-1:r<n?1:0}),t.forEach(function(t){e._trySubscribe(t)})},S.prototype.watch=function(e,t){if("function"!=typeof t)throw new f("No handler function was provided");this._channelEmitter.on(e,t)},S.prototype.unwatch=function(e,t){t?this._channelEmitter.removeListener(e,t):this._channelEmitter.removeAllListeners(e)},S.prototype.watchers=function(e){return this._channelEmitter.listeners(e)},r.exports=S}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./auth":2,"./response":4,"./sctransport":6,"buffer/":9,clone:10,"component-emitter":11,"linked-list":14,querystring:17,"sc-channel":18,"sc-errors":20,"sc-formatter":21}],6:[function(e,r){(function(t){var n,o,i=e("component-emitter"),a=e("./response").Response,s=e("querystring");o=t.WebSocket?(n=t.WebSocket,function(e){return new n(e)}):(n=e("ws"),function(e,t){return new n(e,null,t)});var u=e("sc-errors"),c=u.TimeoutError,l=u.BadConnectionError,p=function(e,t,r){var n=this;this.state=this.CLOSED,this.auth=e,this.codec=t,this.options=r,this.connectTimeout=r.connectTimeout,this.pingTimeout=r.ackTimeout,this.pingTimeoutDisabled=!!r.pingTimeoutDisabled,this.callIdGenerator=r.callIdGenerator,this.authTokenName=r.authTokenName,this._pingTimeoutTicker=null,this._callbackMap={},this._batchSendList=[],this.state=this.CONNECTING;var i=this.uri(),a=o(i,this.options);a.binaryType=this.options.binaryType,(this.socket=a).onopen=function(){n._onOpen()},a.onclose=function(e){var t;t=null==e.code?1005:e.code,n._onClose(t,e.reason)},a.onmessage=function(e){n._onMessage(e.data)},a.onerror=function(){n.state===n.CONNECTING&&n._onClose(1006)},this._connectTimeoutRef=setTimeout(function(){n._onClose(4007),n.socket.close(4007)},this.connectTimeout)};p.prototype=Object.create(i.prototype),p.CONNECTING=p.prototype.CONNECTING="connecting",p.OPEN=p.prototype.OPEN="open",p.CLOSED=p.prototype.CLOSED="closed",p.prototype.uri=function(){var e,t=this.options.query||{},r=this.options.secure?"wss":"ws";if(this.options.timestampRequests&&(t[this.options.timestampParam]=(new Date).getTime()),(t=s.encode(t)).length&&(t="?"+t),this.options.host)e=this.options.host;else{var n="";this.options.port&&("wss"===r&&443!==this.options.port||"ws"===r&&80!==this.options.port)&&(n=":"+this.options.port),e=this.options.hostname+n}return r+"://"+e+this.options.path+t},p.prototype._onOpen=function(){var e=this;clearTimeout(this._connectTimeoutRef),this._resetPingTimeout(),this._handshake(function(t,r){var n;t?(n=r&&r.code?r.code:4003,e._onError(t),e._onClose(n,t.toString()),e.socket.close(n)):(e.state=e.OPEN,i.prototype.emit.call(e,"open",r),e._resetPingTimeout())})},p.prototype._handshake=function(e){var t=this;this.auth.loadToken(this.authTokenName,function(r,n){r?e(r):t.emit("#handshake",{authToken:n},{force:!0},function(t,r){r&&(r.authToken=n,r.authError&&(r.authError=u.hydrateError(r.authError))),e(t,r)})})},p.prototype._abortAllPendingEventsDueToBadConnection=function(e){for(var t in this._callbackMap)if(this._callbackMap.hasOwnProperty(t)){var r=this._callbackMap[t];delete this._callbackMap[t],clearTimeout(r.timeout),delete r.timeout;var n="Event '"+r.event+"' was aborted due to a bad connection",o=new l(n,e),i=r.callback;delete r.callback,i.call(r,o,r)}},p.prototype._onClose=function(e,t){delete this.socket.onopen,delete this.socket.onclose,delete this.socket.onmessage,delete this.socket.onerror,clearTimeout(this._connectTimeoutRef),clearTimeout(this._pingTimeoutTicker),clearTimeout(this._batchTimeout),this.state===this.OPEN?(this.state=this.CLOSED,i.prototype.emit.call(this,"close",e,t),this._abortAllPendingEventsDueToBadConnection("disconnect")):this.state===this.CONNECTING&&(this.state=this.CLOSED,i.prototype.emit.call(this,"openAbort",e,t),this._abortAllPendingEventsDueToBadConnection("connectAbort"))},p.prototype._handleEventObject=function(e,t){if(e&&null!=e.event){var r=new a(this,e.cid);i.prototype.emit.call(this,"event",e.event,e.data,r)}else if(e&&null!=e.rid){var n=this._callbackMap[e.rid];if(n&&(clearTimeout(n.timeout),delete n.timeout,delete this._callbackMap[e.rid],n.callback)){var o=u.hydrateError(e.error);n.callback(o,e.data)}}else i.prototype.emit.call(this,"event","raw",t)},p.prototype._onMessage=function(e){i.prototype.emit.call(this,"event","message",e);var t=this.decode(e);if("#1"===t)this._resetPingTimeout(),this.socket.readyState===this.socket.OPEN&&this.sendObject("#2");else if(Array.isArray(t))for(var r=t.length,n=0;n<r;n++)this._handleEventObject(t[n],e);else this._handleEventObject(t,e)},p.prototype._onError=function(e){i.prototype.emit.call(this,"error",e)},p.prototype._resetPingTimeout=function(){if(!this.pingTimeoutDisabled){var e=this;(new Date).getTime(),clearTimeout(this._pingTimeoutTicker),this._pingTimeoutTicker=setTimeout(function(){e._onClose(4e3),e.socket.close(4e3)},this.pingTimeout)}},p.prototype.getBytesReceived=function(){return this.socket.bytesReceived},p.prototype.close=function(e,t){if(e=e||1e3,this.state===this.OPEN){var r={code:e,data:t};this.emit("#disconnect",r),this._onClose(e,t),this.socket.close(e)}else this.state===this.CONNECTING&&(this._onClose(e,t),this.socket.close(e))},p.prototype.emitObject=function(e,t){var r={event:e.event,data:e.data};return e.callback&&(r.cid=e.cid=this.callIdGenerator(),this._callbackMap[e.cid]=e),this.sendObject(r,t),e.cid||null},p.prototype._handleEventAckTimeout=function(e){e.cid&&delete this._callbackMap[e.cid],delete e.timeout;var t=e.callback;if(t){delete e.callback;var r=new c("Event response for '"+e.event+"' timed out");t.call(e,r,e)}},p.prototype.emit=function(e,t,r,n){var o,i,a=this;n?(i=r,o=n):r instanceof Function?(i={},o=r):i=r;var s={event:e,data:t,callback:o};o&&!i.noTimeout&&(s.timeout=setTimeout(function(){a._handleEventAckTimeout(s)},this.options.ackTimeout));var u=null;return(this.state===this.OPEN||i.force)&&(u=this.emitObject(s,i)),u},p.prototype.cancelPendingResponse=function(e){delete this._callbackMap[e]},p.prototype.decode=function(e){return this.codec.decode(e)},p.prototype.encode=function(e){return this.codec.encode(e)},p.prototype.send=function(e){this.socket.readyState!==this.socket.OPEN?this._onClose(1005):this.socket.send(e)},p.prototype.serializeObject=function(e){var t,r;try{t=this.encode(e)}catch(e){r=e,this._onError(r)}return r?null:t},p.prototype.sendObjectBatch=function(e){var t=this;this._batchSendList.push(e),this._batchTimeout||(this._batchTimeout=setTimeout(function(){if(delete t._batchTimeout,t._batchSendList.length){var e=t.serializeObject(t._batchSendList);null!=e&&t.send(e),t._batchSendList=[]}},this.options.pubSubBatchDuration||0))},p.prototype.sendObjectSingle=function(e){var t=this.serializeObject(e);null!=t&&this.send(t)},p.prototype.sendObject=function(e,t){t&&t.batch?this.sendObjectBatch(e):this.sendObjectSingle(e)},r.exports.SCTransport=p}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./response":4,"component-emitter":11,querystring:17,"sc-errors":20,ws:7}],7:[function(e,t){var r,n=(r="undefined"!=typeof WorkerGlobalScope?self:"undefined"!=typeof window&&window||function(){return this}()).WebSocket||r.MozWebSocket;function o(e,t){return t?new n(e,t):new n(e)}n&&(o.prototype=n.prototype),t.exports=n?o:null},{}],8:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){for(var t,r=c(e),n=r[0],a=r[1],s=new i(3*(n+(h=a))/4-h),u=0,l=0<a?n-4:n,p=0;p<l;p+=4)t=o[e.charCodeAt(p)]<<18|o[e.charCodeAt(p+1)]<<12|o[e.charCodeAt(p+2)]<<6|o[e.charCodeAt(p+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=255&t;var h;return 2===a&&(t=o[e.charCodeAt(p)]<<2|o[e.charCodeAt(p+1)]>>4,s[u++]=255&t),1===a&&(t=o[e.charCodeAt(p)]<<10|o[e.charCodeAt(p+1)]<<4|o[e.charCodeAt(p+2)]>>2,s[u++]=t>>8&255,s[u++]=255&t),s},r.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=0,s=r-o;a<s;a+=16383)i.push(l(e,a,s<a+16383?s:a+16383));return 1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var o,i,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],9:[function(e,t,r){(function(t){"use strict";var n=e("base64-js"),o=e("ieee754");r.Buffer=t,r.SlowBuffer=function(e){return+e!=e&&(e=0),t.alloc(+e)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function a(e){if(i<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return r.__proto__=t.prototype,r}function t(e,t,r){if("number"!=typeof e)return s(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}function s(e,r,n){if("string"==typeof e)return function(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!t.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|h(e,r),o=a(n),i=o.write(e,r);return i!==n&&(o=o.slice(0,i)),o}(e,r);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer))return function(e,r,n){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(n||0))throw new RangeError('"length" is outside of buffer bounds');var o;return(o=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n)).__proto__=t.prototype,o}(e,r,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return t.from(o,r,n);var i=function(e){if(t.isBuffer(e)){var r=0|p(e.length),n=a(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||B(e.length)?a(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|p(e))}function l(e){for(var t=e.length<0?0:0|p(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e){if(i<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function h(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,o=2<arguments.length&&!0===arguments[2];if(!o&&0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return D(e).length;default:if(i)return o?-1:R(e).length;r=(""+r).toLowerCase(),i=!0}}function f(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function d(e,r,n,o,i){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),B(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof r&&(r=t.from(r,o)),t.isBuffer(r))return 0===r.length?-1:m(e,r,n,o,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):m(e,[r],n,o,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,o){var i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s/=a=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(s<r+u&&(r=s-u),i=r;0<=i;i--){for(var p=!0,h=0;h<u;h++)if(c(e,i+h)!==c(t,h)){p=!1;break}if(p)return i}return-1}function y(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?o<(n=Number(n))&&(n=o):n=o;var i=t.length;i/2<n&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(B(s))return a;e[r+a]=s}return a}function g(e,t,r,n){return U(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function b(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,a,s,u,c=e[o],l=null,p=239<c?4:223<c?3:191<c?2:1;if(o+p<=r)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&127<(u=(31&c)<<6|63&i)&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&2047<(u=(15&c)<<12|(63&i)<<6|63&a)&&(u<55296||57343<u)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&65535<(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)&&u<1114112&&(l=u)}null===l?(l=65533,p=1):65535<l&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=p}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=S));return r}(n)}r.kMaxLength=i,(t.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),t.poolSize=8192,t.from=function(e,t,r){return s(e,t,r)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(e,t,r){return o=t,i=r,u(n=e),n<=0?a(n):void 0!==o?"string"==typeof i?a(n).fill(o,i):a(n).fill(o):a(n);var n,o,i},t.allocUnsafe=function(e){return c(e)},t.allocUnsafeSlow=function(e){return c(e)},t.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==t.prototype},t.compare=function(e,r){if(O(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),O(r,Uint8Array)&&(r=t.from(r,r.offset,r.byteLength)),!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var n=e.length,o=r.length,i=0,a=Math.min(n,o);i<a;++i)if(e[i]!==r[i]){n=e[i],o=r[i];break}return n<o?-1:o<n?1:0},t.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(n=r=0;n<e.length;++n)r+=e[n].length;var o=t.allocUnsafe(r),i=0;for(n=0;n<e.length;++n){var a=e[n];if(O(a,Uint8Array)&&(a=t.from(a)),!t.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(o,i),i+=a.length}return o},t.byteLength=h,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},t.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},t.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},t.prototype.toLocaleString=t.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?b(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return w(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return v(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},t.prototype.compare=function(e,r,n,o,i){if(O(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),r<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(i<=o&&n<=r)return 0;if(i<=o)return-1;if(n<=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(o>>>=0),s=(n>>>=0)-(r>>>=0),u=Math.min(a,s),c=this.slice(o,i),l=e.slice(r,n),p=0;p<u;++p)if(c[p]!==l[p]){a=c[p],s=l[p];break}return a<s?-1:s<a?1:0},t.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},t.prototype.indexOf=function(e,t,r){return d(this,e,t,r,!0)},t.prototype.lastIndexOf=function(e,t,r){return d(this,e,t,r,!1)},t.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||o<r)&&(r=o),0<e.length&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i,a,s,u,c,l,p,h,f,d=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return h=t,f=r,U(R(e,(p=this).length-h),p,h,f);case"ascii":return g(this,e,t,r);case"latin1":case"binary":return g(this,e,t,r);case"base64":return u=this,c=t,l=r,U(D(e),u,c,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=t,s=r,U(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,(i=this).length-a),i,a,s);default:if(d)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function w(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function _(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function k(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||n<r)&&(r=n);for(var o="",i=t;i<r;++i)o+=N(e[i]);return o}function C(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function E(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function x(e,r,n,o,i,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<r||r<a)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}function A(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(e,t,r,n,i){return t=+t,r>>>=0,i||A(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function P(e,t,r,n,i){return t=+t,r>>>=0,i||A(e,0,r,8),o.write(e,t,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):n<r&&(r=n),r<e&&(r=e);var o=this.subarray(e,r);return o.__proto__=t.prototype,o},t.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},t.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e+--t],o=1;0<t&&(o*=256);)n+=this[e+--t]*o;return n},t.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return(o*=128)<=n&&(n-=Math.pow(2,8*t)),n},t.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=t,o=1,i=this[e+--n];0<n&&(o*=256);)i+=this[e+--n]*o;return(o*=128)<=i&&(i-=Math.pow(2,8*t)),i},t.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),o.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),o.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),o.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),o.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},t.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;0<=--o&&(i*=256);)this[t+o]=e/i&255;return t+r},t.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);x(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},t.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);x(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;0<=--i&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},t.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},t.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},t.prototype.writeDoubleLE=function(e,t,r){return P(this,e,t,!0,r)},t.prototype.writeDoubleBE=function(e,t,r){return P(this,e,t,!1,r)},t.prototype.copy=function(e,r,n,o){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),o||0===o||(o=this.length),r>=e.length&&(r=e.length),r||(r=0),0<o&&o<n&&(o=n),o===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);var i=o-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,n,o);else if(this===e&&n<r&&r<o)for(var a=i-1;0<=a;--a)e[a+r]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,o),r);return i},t.prototype.fill=function(e,r,n,o){if("string"==typeof e){if("string"==typeof r?(o=r,r=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!t.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===e.length){var i=e.charCodeAt(0);("utf8"===o&&i<128||"latin1"===o)&&(e=i)}}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var a;if(r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=r;a<n;++a)this[a]=e;else{var s=t.isBuffer(e)?e:t.from(e,o),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-r;++a)this[a+r]=s[a%u]}return this};var T=/[^+/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function R(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if(55295<(r=e.charCodeAt(a))&&r<57344){if(!o){if(56319<r){-1<(t-=3)&&i.push(239,191,189);continue}if(a+1===n){-1<(t-=3)&&i.push(239,191,189);continue}o=r;continue}if(r<56320){-1<(t-=3)&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&-1<(t-=3)&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function D(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function O(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function B(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":8,buffer:9,ieee754:12}],10:[function(e,t){(function(e){var r=function(){"use strict";function t(e,t){return null!=t&&e instanceof t}var r,n,o;try{r=Map}catch(e){r=function(){}}try{n=Set}catch(e){n=function(){}}try{o=Promise}catch(e){o=function(){}}function i(a,u,c,l,p){"object"==typeof u&&(c=u.depth,l=u.prototype,p=u.includeNonEnumerable,u=u.circular);var h=[],f=[];return void 0===u&&(u=!0),void 0===c&&(c=1/0),function a(c,d){if(null===c)return null;if(0===d)return c;var m,y;if("object"!=typeof c)return c;if(t(c,r))m=new r;else if(t(c,n))m=new n;else if(t(c,o))m=new o(function(e,t){c.then(function(t){e(a(t,d-1))},function(e){t(a(e,d-1))})});else if(i.__isArray(c))m=[];else if(i.__isRegExp(c))m=new RegExp(c.source,s(c)),c.lastIndex&&(m.lastIndex=c.lastIndex);else if(i.__isDate(c))m=new Date(c.getTime());else{if(void 0!==e&&e.isBuffer(c))return m=new e(c.length),c.copy(m),m;t(c,Error)?m=Object.create(c):void 0===l?(y=Object.getPrototypeOf(c),m=Object.create(y)):(m=Object.create(l),y=l)}if(u){var g=h.indexOf(c);if(-1!=g)return f[g];h.push(c),f.push(m)}for(var v in t(c,r)&&c.forEach(function(e,t){var r=a(t,d-1),n=a(e,d-1);m.set(r,n)}),t(c,n)&&c.forEach(function(e){var t=a(e,d-1);m.add(t)}),c){var b;y&&(b=Object.getOwnPropertyDescriptor(y,v)),b&&null==b.set||(m[v]=a(c[v],d-1))}if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(c);for(v=0;v<S.length;v++){var w=S[v];(!(k=Object.getOwnPropertyDescriptor(c,w))||k.enumerable||p)&&(m[w]=a(c[w],d-1),k.enumerable||Object.defineProperty(m,w,{enumerable:!1}))}}if(p){var _=Object.getOwnPropertyNames(c);for(v=0;v<_.length;v++){var k,C=_[v];(k=Object.getOwnPropertyDescriptor(c,C))&&k.enumerable||(m[C]=a(c[C],d-1),Object.defineProperty(m,C,{enumerable:!1}))}}return m}(a,c)}function a(e){return Object.prototype.toString.call(e)}function s(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return i.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},i.__objToStr=a,i.__isDate=function(e){return"object"==typeof e&&"[object Date]"===a(e)},i.__isArray=function(e){return"object"==typeof e&&"[object Array]"===a(e)},i.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===a(e)},i.__getRegExpFlags=s,i}();"object"==typeof t&&t.exports&&(t.exports=r)}).call(this,e("buffer").Buffer)},{buffer:9}],11:[function(e,t){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}void 0!==t&&(t.exports=r),r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<n.length;o++)if((r=n[o])===t||r.fn===t){n.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),r=this._callbacks["$"+e];if(r)for(var n=0,o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],12:[function(e,t,r){r.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,p=r?o-1:0,h=r?-1:1,f=e[t+p];for(p+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;0<l;i=256*i+e[t+p],p+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;0<l;a=256*a+e[t+p],p+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),i-=c}return(f?-1:1)*a*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,p=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),2<=(t+=1<=a+p?h/u:h*Math.pow(2,1-p))*u&&(a++,u/=2),l<=a+p?(s=0,a=l):1<=a+p?(s=(t*u-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));8<=o;e[r+f]=255&s,f+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;0<c;e[r+f]=255&a,f+=d,a/=256,c-=8);e[r+f-d]|=128*m}},{}],13:[function(e,t){"use strict";var r="An argument without append, prepend, or detach methods was given to `List";function n(){if(arguments.length)return n.from(arguments)}var o=n.prototype;n.of=function(){return n.from.call(this,arguments)},n.from=function(e){var t,r,n,o=new this;if(e&&(t=e.length))for(r=-1;++r<t;)null!=(n=e[r])&&o.append(n);return o},o.head=null,o.tail=null,o.toArray=function(){for(var e=this.head,t=[];e;)t.push(e),e=e.next;return t},o.prepend=function(e){if(!e)return!1;if(!e.append||!e.prepend||!e.detach)throw new Error(r+"#prepend`.");var t;return(t=this.head)?t.prepend(e):(e.detach(),(e.list=this).head=e)},o.append=function(e){if(!e)return!1;if(!e.append||!e.prepend||!e.detach)throw new Error(r+"#append`.");var t,n;return(n=this.tail)?n.append(e):(t=this.head)?t.append(e):(e.detach(),(e.list=this).head=e)};var i=(n.Item=function(){}).prototype;i.next=null,i.prev=null,i.list=null,i.detach=function(){var e=this,t=e.list,r=e.prev,n=e.next;return t&&(t.tail===e&&(t.tail=r),t.head===e&&(t.head=n),t.tail===t.head&&(t.tail=null),r&&(r.next=n),n&&(n.prev=r),e.prev=e.next=e.list=null),e},i.prepend=function(e){if(!(e&&e.append&&e.prepend&&e.detach))throw new Error(r+"Item#prepend`.");var t=this,n=t.list,o=t.prev;return!!n&&(e.detach(),o&&((e.prev=o).next=e),e.next=t,e.list=n,t.prev=e,t===n.head&&(n.head=e),n.tail||(n.tail=t),e)},i.append=function(e){if(!(e&&e.append&&e.prepend&&e.detach))throw new Error(r+"Item#append`.");var t=this,n=t.list,o=t.next;return!!n&&(e.detach(),o&&((e.next=o).prev=e),e.prev=t,e.list=n,t.next=e,t!==n.tail&&n.tail||(n.tail=e),e)},t.exports=n},{}],14:[function(e,t){"use strict";t.exports=e("./_source/linked-list.js")},{"./_source/linked-list.js":13}],15:[function(e,t){"use strict";t.exports=function(e,t,n,o){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(t);var s=1e3;o&&"number"==typeof o.maxKeys&&(s=o.maxKeys);var u,c,l=e.length;0<s&&s<l&&(l=s);for(var p=0;p<l;++p){var h,f,d,m,y=e[p].replace(a,"%20"),g=y.indexOf(n);f=0<=g?(h=y.substr(0,g),y.substr(g+1)):(h=y,""),d=decodeURIComponent(h),m=decodeURIComponent(f),u=i,c=d,Object.prototype.hasOwnProperty.call(u,c)?r(i[d])?i[d].push(m):i[d]=[i[d],m]:i[d]=m}return i};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],16:[function(e,t){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,a,s){return t=t||"&",a=a||"=",null===e&&(e=void 0),"object"==typeof e?o(i(e),function(i){var s=encodeURIComponent(r(i))+a;return n(e[i])?o(e[i],function(e){return s+encodeURIComponent(r(e))}).join(t):s+encodeURIComponent(r(e[i]))}).join(t):s?encodeURIComponent(r(s))+a+encodeURIComponent(r(e)):""};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],17:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":15,"./encode":16}],18:[function(e,t){var r=e("component-emitter"),n=function(e,t,n){r.call(this),this.PENDING="pending",this.SUBSCRIBED="subscribed",this.UNSUBSCRIBED="unsubscribed",this.name=e,this.state=this.UNSUBSCRIBED,this.client=t,this.options=n||{},this.setOptions(this.options)};(n.prototype=Object.create(r.prototype)).setOptions=function(e){e||(e={}),this.waitForAuth=e.waitForAuth||!1,this.batch=e.batch||!1,void 0!==e.data&&(this.data=e.data)},n.prototype.getState=function(){return this.state},n.prototype.subscribe=function(e){this.client.subscribe(this.name,e)},n.prototype.unsubscribe=function(){this.client.unsubscribe(this.name)},n.prototype.isSubscribed=function(e){return this.client.isSubscribed(this.name,e)},n.prototype.publish=function(e,t){this.client.publish(this.name,e,t)},n.prototype.watch=function(e){this.client.watch(this.name,e)},n.prototype.unwatch=function(e){this.client.unwatch(this.name,e)},n.prototype.watchers=function(){return this.client.watchers(this.name)},n.prototype.destroy=function(){this.client.destroyChannel(this.name)},t.exports.SCChannel=n},{"component-emitter":11}],19:[function(e,t){t.exports=function(e){var t=[],r=[];return function e(n,o){var i,a,s;if("object"!=typeof n||null===n||n instanceof Boolean||n instanceof Date||n instanceof Number||n instanceof RegExp||n instanceof String)return n;for(i=0;i<t.length;i+=1)if(t[i]===n)return{$ref:r[i]};if(t.push(n),r.push(o),"[object Array]"===Object.prototype.toString.apply(n))for(s=[],i=0;i<n.length;i+=1)s[i]=e(n[i],o+"["+i+"]");else for(a in s={},n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=e(n[a],o+"["+JSON.stringify(a)+"]"));return s}(e,"$")}},{}],20:[function(e,t){var r=e("./decycle"),n=function(){return!this}();function o(e,t){this.name="AuthTokenExpiredError",this.message=e,this.expiry=t,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function i(e){this.name="AuthTokenInvalidError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function a(e,t){this.name="AuthTokenNotBeforeError",this.message=e,this.date=t,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function s(e){this.name="AuthTokenError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function u(e,t){this.name="SilentMiddlewareBlockedError",this.message=e,this.type=t,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function c(e){this.name="InvalidActionError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function l(e){this.name="InvalidArgumentsError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function p(e){this.name="InvalidOptionsError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function h(e){this.name="InvalidMessageError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function f(e,t){this.name="SocketProtocolError",this.message=e,this.code=t,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function d(e){this.name="ServerProtocolError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function m(e){this.name="HTTPServerError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function y(e){this.name="ResourceLimitError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function g(e){this.name="TimeoutError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function v(e,t){this.name="BadConnectionError",this.message=e,this.type=t,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function b(e){this.name="BrokerError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function S(e,t){this.name="ProcessExitError",this.message=e,this.code=t,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function w(e){this.name="UnknownError",this.message=e,Error.captureStackTrace&&!n?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}o.prototype=Object.create(Error.prototype),i.prototype=Object.create(Error.prototype),a.prototype=Object.create(Error.prototype),s.prototype=Object.create(Error.prototype),u.prototype=Object.create(Error.prototype),c.prototype=Object.create(Error.prototype),l.prototype=Object.create(Error.prototype),p.prototype=Object.create(Error.prototype),h.prototype=Object.create(Error.prototype),f.prototype=Object.create(Error.prototype),d.prototype=Object.create(Error.prototype),m.prototype=Object.create(Error.prototype),y.prototype=Object.create(Error.prototype),g.prototype=Object.create(Error.prototype),v.prototype=Object.create(Error.prototype),b.prototype=Object.create(Error.prototype),S.prototype=Object.create(Error.prototype),w.prototype=Object.create(Error.prototype),t.exports={AuthTokenExpiredError:o,AuthTokenInvalidError:i,AuthTokenNotBeforeError:a,AuthTokenError:s,SilentMiddlewareBlockedError:u,InvalidActionError:c,InvalidArgumentsError:l,InvalidOptionsError:p,InvalidMessageError:h,SocketProtocolError:f,ServerProtocolError:d,HTTPServerError:m,ResourceLimitError:y,TimeoutError:g,BadConnectionError:v,BrokerError:b,ProcessExitError:S,UnknownError:w},t.exports.socketProtocolErrorStatuses={1001:"Socket was disconnected",1002:"A WebSocket protocol error was encountered",1003:"Server terminated socket because it received invalid data",1005:"Socket closed without status code",1006:"Socket hung up",1007:"Message format was incorrect",1008:"Encountered a policy violation",1009:"Message was too big to process",1010:"Client ended the connection because the server did not comply with extension requirements",1011:"Server encountered an unexpected fatal condition",4000:"Server ping timed out",4001:"Client pong timed out",4002:"Server failed to sign auth token",4003:"Failed to complete handshake",4004:"Client failed to save auth token",4005:"Did not receive #handshake from client before timeout",4006:"Failed to bind socket to message broker",4007:"Client connection establishment timed out",4008:"Server rejected handshake from client"},t.exports.socketProtocolIgnoreStatuses={1000:"Socket closed normally",1001:"Socket hung up"};var _={domain:1,domainEmitter:1,domainThrown:1};t.exports.dehydrateError=function(e,t){var n;if(e&&"object"==typeof e)for(var o in n={message:e.message},t&&(n.stack=e.stack),e)_[o]||(n[o]=e[o]);else n="function"==typeof e?"[function "+(e.name||"anonymous")+"]":e;return r(n)},t.exports.hydrateError=function(e){var t=null;if(null!=e)if("object"==typeof e)for(var r in t=new Error(e.message),e)e.hasOwnProperty(r)&&(t[r]=e[r]);else t=e;return t},t.exports.decycle=r},{"./decycle":19}],21:[function(e,r){(function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=/^[ \n\r\t]*[{\[]/,o=function(r,n){if(e.ArrayBuffer&&n instanceof e.ArrayBuffer)return{base64:!0,data:function(e){for(var r=new Uint8Array(e),n=r.length,o="",i=0;i<n;i+=3)o+=t[r[i]>>2],o+=t[(3&r[i])<<4|r[i+1]>>4],o+=t[(15&r[i+1])<<2|r[i+2]>>6],o+=t[63&r[i+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(n)};if(e.Buffer){if(n instanceof e.Buffer)return{base64:!0,data:n.toString("base64")};if(n&&"Buffer"===n.type&&Array.isArray(n.data))return{base64:!0,data:(e.Buffer.from?e.Buffer.from(n.data):new e.Buffer(n.data)).toString("base64")}}return n};r.exports.decode=function(e){if(null==e)return null;if("#1"===e||"#2"===e)return e;var t=e.toString();if(!n.test(t))return t;try{return JSON.parse(t)}catch(e){}return t},r.exports.encode=function(e){return"#1"===e||"#2"===e?e:JSON.stringify(e,o)}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(e,t){var r=e("./v1"),n=e("./v4"),o=n;o.v1=r,o.v4=n,t.exports=o},{"./v1":25,"./v4":26}],23:[function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);t.exports=function(e,t){var n=t||0,o=r;return o[e[n++]]+o[e[n++]]+o[e[n++]]+o[e[n++]]+"-"+o[e[n++]]+o[e[n++]]+"-"+o[e[n++]]+o[e[n++]]+"-"+o[e[n++]]+o[e[n++]]+"-"+o[e[n++]]+o[e[n++]]+o[e[n++]]+o[e[n++]]+o[e[n++]]+o[e[n++]]}},{}],24:[function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);t.exports=function(){return r(n),n}}else{var o=new Array(16);t.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},{}],25:[function(e,t){var r,n,o=e("./lib/rng"),i=e("./lib/bytesToUuid"),a=0,s=0;t.exports=function(e,t,u){var c=t&&u||0,l=t||[],p=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:n;if(null==p||null==h){var f=o();null==p&&(p=r=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==h&&(h=n=16383&(f[6]<<8|f[7]))}var d=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:s+1,y=d-a+(m-s)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||a<d)&&void 0===e.nsecs&&(m=0),1e4<=m)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=d,n=h;var g=(1e4*(268435455&(d+=122192928e5))+(s=m))%4294967296;l[c++]=g>>>24&255,l[c++]=g>>>16&255,l[c++]=g>>>8&255,l[c++]=255&g;var v=d/4294967296*1e4&268435455;l[c++]=v>>>8&255,l[c++]=255&v,l[c++]=v>>>24&15|16,l[c++]=v>>>16&255,l[c++]=h>>>8|128,l[c++]=255&h;for(var b=0;b<6;++b)l[c+b]=p[b];return t||i(l)}},{"./lib/bytesToUuid":23,"./lib/rng":24}],26:[function(e,t){var r=e("./lib/rng"),n=e("./lib/bytesToUuid");t.exports=function(e,t,o){var i=t&&o||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||n(a)}},{"./lib/bytesToUuid":23,"./lib/rng":24}]},{},[1])(1)}).call(this,r(30))},function(e,t,r){e.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=23)}([function(e,t){e.exports=r(168)},function(e,t){e.exports=r(174)},function(e,t){e.exports=r(117)},function(e,t){e.exports=r(194)},function(e,t){e.exports=r(195)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).v2OperationIdCompatibilityMode;return e&&"object"===(void 0===e?"undefined":(0,l.default)(e))?(e.operationId||"").replace(/\s/g,"").length?d(e.operationId):i(t,r,{v2OperationIdCompatibilityMode:n}):null}function i(e,t){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).v2OperationIdCompatibilityMode){var r=(t.toLowerCase()+"_"+e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|.\/?,\\'""-]/g,"_");return(r=r||e.substring(1)+"_"+t).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return""+f(t)+d(e)}function a(e,t){return f(t)+"-"+e}function s(e,t){return u(e,t,!0)||null}function u(e,t,r){if(!e||"object"!==(void 0===e?"undefined":(0,l.default)(e))||!e.paths||"object"!==(0,l.default)(e.paths))return null;var n=e.paths;for(var o in n)for(var i in n[o])if("PARAMETERS"!==i.toUpperCase()){var a=n[o][i];if(a&&"object"===(void 0===a?"undefined":(0,l.default)(a))){var s={spec:e,pathName:o,method:i.toUpperCase(),operation:a},u=t(s);if(r&&u)return s}}}Object.defineProperty(t,"__esModule",{value:!0});var c=n(r(18)),l=n(r(1));t.isOAS3=function(e){var t=e.openapi;return!!t&&(0,h.default)(t,"3")},t.isSwagger2=function(e){var t=e.swagger;return!!t&&(0,h.default)(t,"2")},t.opId=o,t.idFromPathMethod=i,t.legacyIdFromPathMethod=a,t.getOperationRaw=function(e,t){return e&&e.paths?s(e,function(e){var r=e.pathName,n=e.method,i=e.operation;if(!i||"object"!==(void 0===i?"undefined":(0,l.default)(i)))return!1;var s=i.operationId;return[o(i,r,n),a(r,n),s].some(function(e){return e&&e===t})}):null},t.findOperation=s,t.eachOperation=u,t.normalizeSwagger=function(e){var t=e.spec,r=t.paths,n={};if(!r||t.$$normalized)return e;for(var i in r){var a=r[i];if((0,p.default)(a)){var s=a.parameters;for(var u in a)!function(e){var r=a[e];if(!(0,p.default)(r))return"continue";var u=o(r,i,e);if(u){n[u]?n[u].push(r):n[u]=[r];var l=n[u];if(l.length>1)l.forEach(function(e,t){e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId=""+u+(t+1)});else if(void 0!==r.operationId){var h=l[0];h.__originalOperationId=h.__originalOperationId||r.operationId,h.operationId=u}}if("parameters"!==e){var f=[],d={};for(var m in t)"produces"!==m&&"consumes"!==m&&"security"!==m||(d[m]=t[m],f.push(d));if(s&&(d.parameters=s,f.push(d)),f.length){var y=!0,g=!1,v=void 0;try{for(var b,S=(0,c.default)(f);!(y=(b=S.next()).done);y=!0){var w=b.value;for(var _ in w)if(r[_]){if("parameters"===_){var k=!0,C=!1,E=void 0;try{for(var x,A=(0,c.default)(w[_]);!(k=(x=A.next()).done);k=!0)!function(){var e=x.value;r[_].some(function(t){return t.name&&t.name===e.name||t.$ref&&t.$ref===e.$ref||t.$$ref&&t.$$ref===e.$$ref||t===e})||r[_].push(e)}()}catch(e){C=!0,E=e}finally{try{!k&&A.return&&A.return()}finally{if(C)throw E}}}}else r[_]=w[_]}}catch(e){g=!0,v=e}finally{try{!y&&S.return&&S.return()}finally{if(g)throw v}}}}}(u)}}return t.$$normalized=!0,e};var p=n(r(47)),h=n(r(14)),f=function(e){return String.prototype.toLowerCase.call(e)},d=function(e){return e.replace(/[^\w]/gi,"_")}},function(e,t){e.exports=r(198)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).loadSpec,n=void 0!==r&&r,o={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:i(e.headers)},a=o.headers["content-type"],s=n||S(a);return(s?e.text:e.blob||e.buffer).call(e).then(function(e){if(o.text=e,o.data=e,s)try{var t=function(e,t){return"application/json"===t?JSON.parse(e):g.default.safeLoad(e)}(e,a);o.body=t,o.obj=t}catch(e){o.parseError=e}return o})}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,r){void 0!==t[r]?(t[r]=Array.isArray(t[r])?t[r]:[t[r]],t[r].push(e)):t[r]=e}),t):t}function a(e,t){return t||"undefined"==typeof navigator||(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!==(void 0===e?"undefined":(0,d.default)(e))||"string"!=typeof e.uri):"undefined"!=typeof File?e instanceof File:null!==e&&"object"===(void 0===e?"undefined":(0,d.default)(e))&&"function"==typeof e.pipe}function s(e,t){var r=e.collectionFormat,n=e.allowEmptyValue,o="object"===(void 0===e?"undefined":(0,d.default)(e))?e.value:e;if(void 0===o&&n)return"";if(a(o)||"boolean"==typeof o)return o;var i=encodeURIComponent;return t&&(i=(0,v.default)(o)?function(e){return e}:function(e){return(0,h.default)(e)}),"object"!==(void 0===o?"undefined":(0,d.default)(o))||Array.isArray(o)?Array.isArray(o)?Array.isArray(o)&&!r?o.map(i).join(","):"multi"===r?o.map(i):o.map(i).join({csv:",",ssv:"%20",tsv:"%09",pipes:"|"}[r]):i(o):""}function u(e){var t=(0,p.default)(e).reduce(function(t,r){var n=e[r],o=!!n.skipEncoding,i=o?r:encodeURIComponent(r),a=function(e){return e&&"object"===(void 0===e?"undefined":(0,d.default)(e))}(n)&&!Array.isArray(n);return t[i]=s(a?n:{value:n},o),t},{});return y.default.stringify(t,{encode:!1,indices:!1})||""}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=void 0===t?"":t,o=e.query,i=e.form;if(i){var c=(0,p.default)(i).some(function(e){return a(i[e].value)}),h=e.headers["content-type"]||e.headers["Content-Type"];if(c||/multipart\/form-data/i.test(h)){var f=r(30);e.body=new f,(0,p.default)(i).forEach(function(t){e.body.append(t,s(i[t],!0))})}else e.body=u(i);delete e.form}if(o){var d=n.split("?"),m=(0,l.default)(d,2),g=m[0],v=m[1],b="";if(v){var S=y.default.parse(v);(0,p.default)(o).forEach(function(e){return delete S[e]}),b=y.default.stringify(S,{encode:!0})}var w=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(function(e){return e}).join("&");return n?"?"+n:""}(b,u(o));e.url=g+w,delete e.query}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldDownloadAsText=t.self=void 0;var l=n(r(26)),p=n(r(0)),h=n(r(8)),f=n(r(4)),d=n(r(1)),m=n(r(11));t.serializeRes=o,t.serializeHeaders=i,t.isFile=a,t.encodeFormOrQuery=u,t.mergeInQueryOrForm=c,t.makeHttp=function(e,t,r){return r=r||function(e){return e},t=t||function(e){return e},function(n){return"string"==typeof n&&(n={url:n}),b.mergeInQueryOrForm(n),n=t(n),r(e(n))}},r(27);var y=n(r(28)),g=n(r(15)),v=n(r(29)),b=t.self={serializeRes:o,mergeInQueryOrForm:c};t.default=function(){var e=(0,m.default)(f.default.mark(function e(t){var r,n,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("object"===(void 0===t?"undefined":(0,d.default)(t))&&(t=(a=t).url),a.headers=a.headers||{},b.mergeInQueryOrForm(a),!a.requestInterceptor){e.next=10;break}return e.next=6,a.requestInterceptor(a);case 6:if(e.t0=e.sent,e.t0){e.next=9;break}e.t0=a;case 9:a=e.t0;case 10:return r=a.headers["content-type"]||a.headers["Content-Type"],/multipart\/form-data/i.test(r)&&(delete a.headers["content-type"],delete a.headers["Content-Type"]),n=void 0,e.prev=13,e.next=16,(a.userFetch||fetch)(a.url,a);case 16:return n=e.sent,e.next=19,b.serializeRes(n,t,a);case 19:if(n=e.sent,!a.responseInterceptor){e.next=27;break}return e.next=23,a.responseInterceptor(n);case 23:if(e.t1=e.sent,e.t1){e.next=26;break}e.t1=n;case 26:n=e.t1;case 27:e.next=37;break;case 29:if(e.prev=29,e.t2=e.catch(13),n){e.next=33;break}throw e.t2;case 33:throw(o=new Error(n.statusText)).statusCode=o.status=n.status,o.responseError=e.t2,o;case 37:if(n.ok){e.next=42;break}throw(i=new Error(n.statusText)).statusCode=i.status=n.status,i.response=n,i;case 42:return e.abrupt("return",n);case 43:case"end":return e.stop()}},e,this,[[13,29]])}));return function(t){return e.apply(this,arguments)}}();var S=t.shouldDownloadAsText=function(){return/(json|xml|yaml|text)\b/.test(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},function(e,t){e.exports=r(218)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return Array.isArray(e)?e.length<1?"":"/"+e.map(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/"):e}function i(e,t,r){return{op:"replace",path:e,value:t,meta:r}}function a(e,t,r){return p(l(e.filter(y).map(function(e){return t(e.value,r,e.path)})||[]))}function s(e,t,r){return r=r||[],Array.isArray(e)?e.map(function(e,n){return s(e,t,r.concat(n))}):h(e)?(0,w.default)(e).map(function(n){return s(e[n],t,r.concat(n))}):t(e,r[r.length-1],r)}function u(e,t,r){var n=[];if((r=r||[]).length>0){var o=t(e,r[r.length-1],r);o&&(n=n.concat(o))}if(Array.isArray(e)){var i=e.map(function(e,n){return u(e,t,r.concat(n))});i&&(n=n.concat(i))}else if(h(e)){var a=(0,w.default)(e).map(function(n){return u(e[n],t,r.concat(n))});a&&(n=n.concat(a))}return l(n)}function c(e){return Array.isArray(e)?e:[e]}function l(e){var t;return(t=[]).concat.apply(t,(0,S.default)(e.map(function(e){return Array.isArray(e)?l(e):e})))}function p(e){return e.filter(function(e){return void 0!==e})}function h(e){return e&&"object"===(void 0===e?"undefined":(0,b.default)(e))}function f(e){return e&&"function"==typeof e}function d(e){if(g(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function m(e){return d(e)||g(e)&&"mutation"===e.type}function y(e){return m(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function g(e){return e&&"object"===(void 0===e?"undefined":(0,b.default)(e))}function v(e,t){try{return C.default.getValueByPointer(e,t)}catch(e){return console.error(e),{}}}Object.defineProperty(t,"__esModule",{value:!0});var b=n(r(1)),S=n(r(34)),w=n(r(0)),_=n(r(35)),k=n(r(2)),C=n(r(36)),E=n(r(4)),x=n(r(37)),A=n(r(38));t.default={add:function(e,t){return{op:"add",path:e,value:t}},replace:i,remove:function(e,t){return{op:"remove",path:e}},merge:function(e,t){return{type:"mutation",op:"merge",path:e,value:t}},mergeDeep:function(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}},context:function(e,t){return{type:"context",path:e,value:t}},getIn:function(e,t){return t.reduce(function(e,t){return void 0!==t&&e?e[t]:e},e)},applyPatch:function(e,t,r){if(r=r||{},"merge"===(t=(0,k.default)({},t,{path:t.path&&o(t.path)})).op){var n=v(e,t.path);(0,k.default)(n,t.value),C.default.applyPatch(e,[i(t.path,n)])}else if("mergeDeep"===t.op){var a=v(e,t.path);for(var s in t.value){var u=t.value[s],c=Array.isArray(u);if(c){var l=a[s]||[];a[s]=l.concat(u)}else if(h(u)&&!c){var p=(0,k.default)({},a[s]);for(var f in u){if(Object.prototype.hasOwnProperty.call(p,f)){p=(0,x.default)((0,A.default)({},p),u);break}(0,k.default)(p,(0,_.default)({},f,u[f]))}a[s]=p}else a[s]=u}}else if("add"===t.op&&""===t.path&&h(t.value)){var d=(0,w.default)(t.value).reduce(function(e,r){return e.push({op:"add",path:"/"+o(r),value:t.value[r]}),e},[]);C.default.applyPatch(e,d)}else if("replace"===t.op&&""===t.path){var m=t.value;r.allowMetaPatches&&t.meta&&y(t)&&(Array.isArray(t.value)||h(t.value))&&(m=(0,k.default)({},m,t.meta)),e=m}else if(C.default.applyPatch(e,[t]),r.allowMetaPatches&&t.meta&&y(t)&&(Array.isArray(t.value)||h(t.value))){var g=v(e,t.path),b=(0,k.default)({},g,t.meta);C.default.applyPatch(e,[i(t.path,b)])}return e},parentPathMatch:function(e,t){if(!Array.isArray(t))return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0},flatten:l,fullyNormalizeArray:function(e){return p(l(c(e)))},normalizeArray:c,isPromise:function(e){return h(e)&&f(e.then)},forEachNew:function(e,t){try{return a(e,u,t)}catch(e){return e}},forEachNewPrimitive:function(e,t){try{return a(e,s,t)}catch(e){return e}},isJsonPatch:d,isContextPatch:function(e){return g(e)&&"context"===e.type},isPatch:g,isMutation:m,isAdditiveMutation:y,isGenerator:function(e){return E.default.isGeneratorFunction(e)},isFunction:f,isObject:h,isError:function(e){return e instanceof Error}},e.exports=t.default},function(e,t){e.exports=r(220)},function(e,t){e.exports=r(226)},function(e,t){e.exports=r(137)},function(e,t){e.exports=r(256)},function(e,t){e.exports=r(260)},function(e,t){e.exports=r(264)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requestInterceptor,n=t.responseInterceptor,o=e.withCredentials?"include":"same-origin";return function(t){return e({url:t,loadSpec:!0,requestInterceptor:r,responseInterceptor:n,headers:{Accept:"application/json"},credentials:o}).then(function(e){return e.body})}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(4)),a=n(r(11));t.makeFetchJSON=o,t.clearCache=function(){u.plugins.refs.clearCache()},t.default=function(e){function t(e){var t=this;_&&(u.plugins.refs.docCache[_]=e),u.plugins.refs.fetchJSON=o(w,{requestInterceptor:v,responseInterceptor:b});var r=[u.plugins.refs];return"function"==typeof g&&r.push(u.plugins.parameters),"function"==typeof y&&r.push(u.plugins.properties),"strict"!==h&&r.push(u.plugins.allOf),(0,c.default)({spec:e,context:{baseDoc:_},plugins:r,allowMetaPatches:d,pathDiscriminator:m,parameterMacro:g,modelPropertyMacro:y}).then(S?function(){var e=(0,a.default)(i.default.mark(function e(r){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r);case 1:case"end":return e.stop()}},e,t)}));return function(t){return e.apply(this,arguments)}}():l.normalizeSwagger)}var r=e.fetch,n=e.spec,p=e.url,h=e.mode,f=e.allowMetaPatches,d=void 0===f||f,m=e.pathDiscriminator,y=e.modelPropertyMacro,g=e.parameterMacro,v=e.requestInterceptor,b=e.responseInterceptor,S=e.skipNormalization,w=e.http,_=e.baseDoc;return _=_||p,w=r||w||s.default,n?t(n):o(w,{requestInterceptor:v,responseInterceptor:b})(_).then(t)};var s=n(r(7)),u=r(31),c=n(u),l=r(5)},function(e,t){e.exports=r(129)},function(e,t){e.exports=r(143)},function(e,t){e.exports=r(287)},function(e,t){e.exports=r(288)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){function r(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack;for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];this.message=r[0],t&&t.apply(this,r)}return r.prototype=new Error,r.prototype.name=e,r.prototype.constructor=r,r},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFreelyNamed=function(e){var t=e[e.length-1],r=e[e.length-2],s=e.join("/");return n.indexOf(t)>-1&&-1===o.indexOf(r)||i.indexOf(s)>-1||a.some(function(e){return s.indexOf(e)>-1})};var n=["properties"],o=["properties"],i=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],a=["schema/example"]},function(e,t,r){e.exports=r(24)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?r.url=e:r=e,!(this instanceof o))return new o(r);(0,a.default)(this,r);var n=this.resolve().then(function(){return t.disableInterfaces||(0,a.default)(t,o.makeApisTagOperation(t)),t});return n.client=this,n}Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(3)),a=n((n(r(25)),r(6))),s=n(r(14)),u=n(r(10)),c=r(7),l=n(c),p=r(16),h=n(p),f=n(r(48)),d=r(49),m=r(51),y=r(5);o.http=l.default,o.makeHttp=c.makeHttp.bind(null,o.http),o.resolve=h.default,o.resolveSubtree=f.default,o.execute=m.execute,o.serializeRes=c.serializeRes,o.serializeHeaders=c.serializeHeaders,o.clearCache=p.clearCache,o.parameterBuilders=m.PARAMETER_BUILDERS,o.makeApisTagOperation=d.makeApisTagOperation,o.buildRequest=m.buildRequest,o.helpers={opId:y.opId},o.prototype={http:l.default,execute:function(e){return this.applyDefaults(),o.execute((0,i.default)({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:"string"==typeof this.url?this.url:void 0},e))},resolve:function(){var e=this;return o.resolve({spec:this.spec,url:this.url,allowMetaPatches:this.allowMetaPatches,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null}).then(function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e})}},o.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&(0,s.default)(t,"http")){var r=u.default.parse(t);e.host||(e.host=r.host),e.schemes||(e.schemes=[r.protocol.replace(":","")]),e.basePath||(e.basePath="/")}},t.default=o,e.exports=t.default},function(e,t){e.exports=r(291)},function(e,t){e.exports=r(325)},function(e,t){e.exports=r(329)},function(e,t){e.exports=r(330)},function(e,t){e.exports=r(333)},function(e,t){e.exports=r(334)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=t.SpecMap=void 0;var o=n(r(8)),i=n(r(1)),a=n(r(17)),s=n(r(4)),u=n(r(0)),c=n(r(18)),l=n(r(32)),p=n(r(2)),h=n(r(19)),f=n(r(20));t.default=function(e){return new w(e).dispatch()};var d=n(r(33)),m=n(r(9)),y=n(r(39)),g=n(r(43)),v=n(r(44)),b=n(r(45)),S=n(r(46)),w=function(){function e(t){(0,h.default)(this,e),(0,p.default)(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new S.default,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:(0,p.default)((0,l.default)(this),m.default),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(m.default.isFunction),this.patches.push(m.default.add([],this.spec)),this.patches.push(m.default.context([],this.context)),this.updatePatches(this.patches)}return(0,f.default)(e,[{key:"debug",value:function(e){if(this.debugLevel===e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(t=console).log.apply(t,n)}}},{key:"verbose",value:function(e){if("verbose"===this.debugLevel){for(var t,r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(t=console).log.apply(t,["["+e+"]   "].concat(n))}}},{key:"wrapPlugin",value:function(e,t){var r=this.pathDiscriminator,n=null,o=void 0;return e[this.pluginProp]?(n=e,o=e[this.pluginProp]):m.default.isFunction(e)?o=e:m.default.isObject(e)&&(o=function(e){var t=function(e,t){return!Array.isArray(e)||e.every(function(e,r){return e===t[r]})};return s.default.mark(function n(o,i){var a,l,p,h,f,d,y,g,v;return s.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:v=function n(o,p,h){var f,d,y,g,v,b,S,w,_,k,C,E,x,A,I,P;return s.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(m.default.isObject(o)){a.next=6;break}if(e.key!==p[p.length-1]){a.next=4;break}return a.next=4,e.plugin(o,e.key,p,i);case 4:a.next=48;break;case 6:f=p.length-1,d=p[f],y=p.indexOf("properties"),g="properties"===d&&f===y,v=i.allowMetaPatches&&l[o.$$ref],b=!0,S=!1,w=void 0,a.prev=14,_=(0,c.default)((0,u.default)(o));case 16:if(b=(k=_.next()).done){a.next=34;break}if(C=k.value,E=o[C],x=p.concat(C),A=m.default.isObject(E),I=o.$$ref,v){a.next=26;break}if(!A){a.next=26;break}return i.allowMetaPatches&&I&&(l[I]=!0),a.delegateYield(n(E,x,h),"t0",26);case 26:if(g||C!==e.key){a.next=31;break}if(P=t(r,p),r&&!P){a.next=31;break}return a.next=31,e.plugin(E,C,x,i,h);case 31:b=!0,a.next=16;break;case 34:a.next=40;break;case 36:a.prev=36,a.t1=a.catch(14),S=!0,w=a.t1;case 40:a.prev=40,a.prev=41,!b&&_.return&&_.return();case 43:if(a.prev=43,!S){a.next=46;break}throw w;case 46:return a.finish(43);case 47:return a.finish(40);case 48:case"end":return a.stop()}},a,this,[[14,36,40,48],[41,,43,47]])},a=s.default.mark(v),l={},p=!0,h=!1,f=void 0,n.prev=6,d=(0,c.default)(o.filter(m.default.isAdditiveMutation));case 8:if(p=(y=d.next()).done){n.next=14;break}return g=y.value,n.delegateYield(v(g.value,g.path,g),"t0",11);case 11:p=!0,n.next=8;break;case 14:n.next=20;break;case 16:n.prev=16,n.t1=n.catch(6),h=!0,f=n.t1;case 20:n.prev=20,n.prev=21,!p&&d.return&&d.return();case 23:if(n.prev=23,!h){n.next=26;break}throw f;case 26:return n.finish(23);case 27:return n.finish(20);case 28:case"end":return n.stop()}},n,this,[[6,16,20,28],[21,,23,27]])})}(e)),(0,p.default)(o.bind(n),{pluginName:e.name||t,isGenerator:m.default.isGenerator(o)})}},{key:"nextPlugin",value:function(){var e=this;return(0,d.default)(this.wrappedPlugins,function(t){return e.getMutationsForPlugin(t).length>0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return a.default.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var r=this.getPluginName(e);(this.pluginHistory[r]=this.pluginHistory[r]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var r=this;m.default.normalizeArray(e).forEach(function(e){if(e instanceof Error)r.errors.push(e);else try{if(!m.default.isObject(e))return void r.debug("updatePatches","Got a non-object patch",e);if(r.showDebug&&r.allPatches.push(e),m.default.isPromise(e.value))return r.promisedPatches.push(e),void r.promisedPatchThen(e);if(m.default.isContextPatch(e))return void r.setContext(e.path,e.value);if(m.default.isMutation(e))return void r.updateMutations(e)}catch(e){console.error(e),r.errors.push(e)}})}},{key:"updateMutations",value:function(e){"object"===(0,i.default)(e.value)&&!Array.isArray(e.value)&&this.allowMetaPatches&&(e.value=(0,p.default)({},e.value));var t=m.default.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches});t&&(this.mutations.push(e),this.state=t)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);t<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(r){var n=(0,p.default)({},e,{value:r});t.removePromisedPatch(e),t.updatePatches(n)}).catch(function(r){t.removePromisedPatch(e),t.updatePatches(r)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return m.default.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse((0,o.default)(e))}},{key:"dispatch",value:function(){function e(e){e&&(e=m.default.fullyNormalizeArray(e),r.updatePatches(e,n))}var t=this,r=this,n=this.nextPlugin();if(!n){var o=this.nextPromisedPatch();if(o)return o.then(function(){return t.dispatch()}).catch(function(){return t.dispatch()});var i={spec:this.state,errors:this.errors};return this.showDebug&&(i.patches=this.allPatches),a.default.resolve(i)}if(r.pluginCount=r.pluginCount||{},r.pluginCount[n]=(r.pluginCount[n]||0)+1,r.pluginCount[n]>100)return a.default.resolve({spec:r.state,errors:r.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(n!==this.currentPlugin&&this.promisedPatches.length){var s=this.promisedPatches.map(function(e){return e.value});return a.default.all(s.map(function(e){return e.then(Function,Function)})).then(function(){return t.dispatch()})}return function(){r.currentPlugin=n;var t=r.getCurrentMutations(),o=r.mutations.length-1;try{if(n.isGenerator){var i=!0,a=!1,s=void 0;try{for(var u,h=(0,c.default)(n(t,r.getLib()));!(i=(u=h.next()).done);i=!0)e(u.value)}catch(e){a=!0,s=e}finally{try{!i&&h.return&&h.return()}finally{if(a)throw s}}}else e(n(t,r.getLib()))}catch(t){console.error(t),e([(0,p.default)((0,l.default)(t),{plugin:n})])}finally{r.updatePluginHistory(n,{mutationIndex:o})}return r.dispatch()}()}}]),e}(),_={refs:y.default,allOf:g.default,parameters:v.default,properties:b.default};t.SpecMap=w,t.plugins=_},function(e,t){e.exports=r(335)},function(e,t){e.exports=r(338)},function(e,t){e.exports=r(361)},function(e,t){e.exports=r(366)},function(e,t){e.exports=r(367)},function(e,t){e.exports=r(370)},function(e,t){e.exports=r(371)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!A.test(e)){if(!t)throw new I("Tried to resolve a relative URL, without having a basePath. path: '"+e+"' basePath: '"+t+"'");return k.default.resolve(t,e)}return e}function i(e,t){return new I("Could not resolve reference because of: "+e.message,t,e)}function a(e){return(e+"").split("#")}function s(e,t){var r=P[e];if(r&&!C.default.isPromise(r))try{var n=c(t,r);return(0,b.default)(g.default.resolve(n),{__value:n})}catch(e){return g.default.reject(e)}return u(e).then(function(e){return c(t,e)})}function u(e){var t=P[e];return t?C.default.isPromise(t)?t:g.default.resolve(t):(P[e]=R.fetchJSON(e).then(function(t){return P[e]=t,t}),P[e])}function c(e,t){var r=l(e);if(r.length<1)return t;var n=C.default.getIn(t,r);if(void 0===n)throw new I("Could not resolve pointer: "+e+" does not exist in document",{pointer:e});return n}function l(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a "+(void 0===e?"undefined":(0,m.default)(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(p)}function p(e){return"string"!=typeof e?e:_.default.unescape(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function h(e){return _.default.escape(e.replace(/~/g,"~0").replace(/\//g,"~1"))}function f(e,t){if(D(t))return!0;var r=e.charAt(t.length),n=t.slice(-1);return 0===e.indexOf(t)&&(!r||"/"===r||"#"===r)&&"#"!==n}function d(e,t,r,n){var o=T.get(n);o||(o={},T.set(n,o));var i=function(e){return 0===e.length?"":"/"+e.map(h).join("/")}(r),a=(t||"<specmap-base>")+"#"+e;if(t==n.contextTree.get([]).baseDoc&&f(i,e))return!0;var s="";if(r.some(function(e){return s=s+"/"+h(e),o[s]&&o[s].some(function(e){return f(e,a)||f(a,e)})}))return!0;o[i]=(o[i]||[]).concat(a)}Object.defineProperty(t,"__esModule",{value:!0});var m=n(r(1)),y=n(r(0)),g=n(r(17)),v=n(r(40)),b=n(r(2)),S=r(41),w=n(r(15)),_=n(r(42)),k=n(r(10)),C=n(r(9)),E=n(r(21)),x=r(22),A=new RegExp("^([a-z]+://|//)","i"),I=(0,E.default)("JSONRefError",function(e,t,r){this.originalError=r,(0,b.default)(this,t||{})}),P={},T=new v.default,N={key:"$ref",plugin:function(e,t,r,n){var u=r.slice(0,-1);if(!(0,x.isFreelyNamed)(u)){var c=n.getContext(r).baseDoc;if("string"!=typeof e)return new I("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:c,fullPath:r});var p=a(e),h=p[0],f=p[1]||"",m=void 0;try{m=c||h?o(h,c):null}catch(t){return i(t,{pointer:f,$ref:e,basePath:m,fullPath:r})}var g=void 0,v=void 0;if(!d(f,m,u,n)){if(null==m?(v=l(f),void 0===(g=n.get(v))&&(g=new I("Could not resolve reference: "+e,{pointer:f,$ref:e,baseDoc:c,fullPath:r}))):g=null!=(g=s(m,f)).__value?g.__value:g.catch(function(t){throw i(t,{pointer:f,$ref:e,baseDoc:c,fullPath:r})}),g instanceof Error)return[C.default.remove(r),g];var b=C.default.replace(u,g,{$$ref:e});if(m&&m!==c)return[b,C.default.context(u,{baseDoc:m})];try{if(!function(e,t){var r=[e];return t.path.reduce(function(e,t){return r.push(e[t]),e[t]},e),function e(t){return C.default.isObject(t)&&(r.indexOf(t)>=0||(0,y.default)(t).some(function(r){return e(t[r])}))}(t.value)}(n.state,b))return b}catch(e){return null}}}}},R=(0,b.default)(N,{docCache:P,absoluteify:o,clearCache:function(e){void 0!==e?delete P[e]:(0,y.default)(P).forEach(function(e){delete P[e]})},JSONRefError:I,wrapError:i,getDoc:u,split:a,extractFromDoc:s,fetchJSON:function(e){return(0,S.fetch)(e,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then(function(e){return e.text()}).then(function(e){return w.default.safeLoad(e)})},extract:c,jsonPointerToArray:l,unescapeJsonPointerToken:p});t.default=R;var D=function(e){return!e||"/"===e||"#"===e};e.exports=t.default},function(e,t){e.exports=r(372)},function(e,t){e.exports=r(383)},function(e,t){e.exports=r(384)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(22);t.default={key:"allOf",plugin:function(e,t,r,i,a){if(!a.meta||!a.meta.$$ref){var s=r.slice(0,-1);if(!(0,o.isFreelyNamed)(s)){if(!Array.isArray(e)){var u=new TypeError("allOf must be an array");return u.fullPath=r,u}var c=!1,l=a.value;s.forEach(function(e){l&&(l=l[e])}),delete(l=(0,n.default)({},l)).allOf;var p=[i.replace(s,{})].concat(e.map(function(e,t){if(!i.isObject(e)){if(c)return null;c=!0;var n=new TypeError("Elements in allOf must be objects");return n.fullPath=r,n}return i.mergeDeep(s,e)}));return p.push(i.mergeDeep(s,l)),l.$$ref||p.push(i.remove([].concat(s,"$$ref"))),p}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(2)),i=n(r(9));t.default={key:"parameters",plugin:function(e,t,r,n,a){if(Array.isArray(e)&&e.length){var s=(0,o.default)([],e),u=r.slice(0,-1),c=(0,o.default)({},i.default.getIn(n.spec,u));return e.forEach(function(e,t){try{s[t].default=n.parameterMacro(c,e)}catch(e){var o=new Error(e);return o.fullPath=r,o}}),i.default.replace(r,s)}return i.default.replace(r,e)}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(2)),i=n(r(9));t.default={key:"properties",plugin:function(e,t,r,n){var a=(0,o.default)({},e);for(var s in e)try{a[s].default=n.modelPropertyMacro(a[s])}catch(e){var u=new Error(e);return u.fullPath=r,u}return i.default.replace(r,a)}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return i({children:{}},e,t)}function i(e,t,r){return e.value=t||{},e.protoValue=r?(0,s.default)({},r.protoValue,e.value):e.value,(0,a.default)(e.children).forEach(function(t){var r=e.children[t];e.children[t]=i(r,r.value,e)}),e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(r(0)),s=n(r(3)),u=n(r(19)),c=n(r(20)),l=function(){function e(t){(0,u.default)(this,e),this.root=o(t||{})}return(0,c.default)(e,[{key:"set",value:function(e,t){var r=this.getParent(e,!0);if(r){var n=e[e.length-1],a=r.children;a[n]?i(a[n],t,r):a[n]=o(t,r)}else i(this.root,t,null)}},{key:"get",value:function(e){if((e=e||[]).length<1)return this.root.value;for(var t=this.root,r=void 0,n=void 0,o=0;o<e.length&&(n=e[o],(r=t.children)[n]);o++)t=r[n];return t&&t.protoValue}},{key:"getParent",value:function(e,t){return!e||e.length<1?null:e.length<2?this.root:e.slice(0,-1).reduce(function(e,r){if(!e)return e;var n=e.children;return!n[r]&&t&&(n[r]=o(null,e)),n[r]},this.root)}}]),e}();t.default=l,e.exports=t.default},function(e,t){e.exports=r(16)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(4)),i=n(r(3)),a=n(r(11)),s=n(r(12)),u=n(r(16)),c=r(5);t.default=function(){var e=(0,a.default)(o.default.mark(function e(t,r){var n,a,l,p,h,f,d,m,y,g,v=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=v.returnEntireTree,a=v.baseDoc,l=v.requestInterceptor,p=v.responseInterceptor,h=v.parameterMacro,f=v.modelPropertyMacro,d={pathDiscriminator:r,baseDoc:a,requestInterceptor:l,responseInterceptor:p,parameterMacro:h,modelPropertyMacro:f},m=(0,c.normalizeSwagger)({spec:t}),y=m.spec,e.next=5,(0,u.default)((0,i.default)({},d,{spec:y,allowMetaPatches:!0,skipNormalization:!0}));case 5:return g=e.sent,!n&&Array.isArray(r)&&r.length&&(g.spec=(0,s.default)(g.spec,r)||null),e.abrupt("return",g);case 8:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=t.pathName,n=t.method,o=t.operationId;return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute((0,a.default)({spec:e.spec},(0,s.default)(e,"requestInterceptor","responseInterceptor","userFetch"),{pathName:r,method:n,parameters:t,operationId:o},i))}}}function i(e){var t=e.spec,r=e.cb,n=void 0===r?c:r,o=e.defaultTag,i=void 0===o?"default":o,a=e.v2OperationIdCompatibilityMode,s={},p={};return(0,u.eachOperation)(t,function(e){var r=e.pathName,o=e.method,c=e.operation;(c.tags?l(c.tags):[i]).forEach(function(e){if("string"==typeof e){var i=p[e]=p[e]||{},l=(0,u.opId)(c,r,o,{v2OperationIdCompatibilityMode:a}),h=n({spec:t,pathName:r,method:o,operation:c,operationId:l});if(s[l])s[l]++,i[""+l+s[l]]=h;else if(void 0!==i[l]){var f=s[l]||1;s[l]=f+1,i[""+l+s[l]]=h;var d=i[l];delete i[l],i[""+l+f]=d}else i[l]=h}})}),p}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var a=n(r(3));t.makeExecute=o,t.makeApisTagOperationsOperationExecute=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=p.makeExecute(e),r=p.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t}),n={};for(var o in r)for(var i in n[o]={operations:{}},r[o])n[o].operations[i]={execute:r[o][i]};return{apis:n}},t.makeApisTagOperation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=p.makeExecute(e);return{apis:p.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}},t.mapTagOperations=i;var s=n(r(50)),u=r(5),c=function(){return null},l=function(e){return Array.isArray(e)?e:[e]},p=t.self={mapTagOperations:i,makeExecute:o}},function(e,t){e.exports=r(385)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.spec,r=e.operationId,n=(e.securities,e.requestContentType,e.responseContentType),o=e.scheme,a=e.requestInterceptor,u=e.responseInterceptor,l=e.contextUrl,p=e.userFetch,h=(e.requestBody,e.server),f=e.serverVariables,d=e.http,g=e.parameters,v=e.parameterBuilders,I=(0,k.isOAS3)(t);v||(v=I?S.default:b.default);var P={url:"",credentials:d&&d.withCredentials?"include":"same-origin",headers:{},cookies:{}};a&&(P.requestInterceptor=a),u&&(P.responseInterceptor=u),p&&(P.userFetch=p);var T=(0,k.getOperationRaw)(t,r);if(!T)throw new E("Operation "+r+" not found");var N=T.operation,R=void 0===N?{}:N,D=T.method,U=T.pathName;if(P.url+=i({spec:t,scheme:o,contextUrl:l,server:h,serverVariables:f,pathName:U,method:D}),!r)return delete P.cookies,P;P.url+=U,P.method=(""+D).toUpperCase(),g=g||{};var O=t.paths[U]||{};n&&(P.headers.accept=n);var B=A([].concat(C(R.parameters)).concat(C(O.parameters)));B.forEach(function(e){var r=v[e.in],n=void 0;if("body"===e.in&&e.schema&&e.schema.properties&&(n=g),void 0===(n=e&&e.name&&g[e.name])?n=e&&e.name&&g[e.in+"."+e.name]:x(e.name,B).length>1&&console.warn("Parameter '"+e.name+"' is ambiguous because the defined spec has more than one parameter with the name: '"+e.name+"' and the passed-in parameter values did not define an 'in' value."),null!==n){if(void 0!==e.default&&void 0===n&&(n=e.default),void 0===n&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter "+e.name+" is not provided");if(I&&e.schema&&"object"===e.schema.type&&"string"==typeof n)try{n=JSON.parse(n)}catch(e){throw new Error("Could not parse object parameter value string as JSON")}r&&r({req:P,parameter:e,value:n,operation:R,spec:t})}});var M=(0,s.default)({},e,{operation:R});if((P=I?(0,w.default)(M,P):(0,_.default)(M,P)).cookies&&(0,c.default)(P.cookies).length){var q=(0,c.default)(P.cookies).reduce(function(e,t){var r=P.cookies[t];return e+(e?"&":"")+m.default.serialize(t,r)},"");P.headers.Cookie=q}return P.cookies&&delete P.cookies,(0,y.mergeInQueryOrForm)(P),P}function i(e){return(0,k.isOAS3)(e.spec)?function(e){var t=e.spec,r=e.pathName,n=e.method,o=e.server,i=e.contextUrl,a=e.serverVariables,s=void 0===a?{}:a,u=(0,p.default)(t,["paths",r,(n||"").toLowerCase(),"servers"])||(0,p.default)(t,["paths",r,"servers"])||(0,p.default)(t,["servers"]),c="",l=null;if(o&&u&&u.length){var h=u.map(function(e){return e.url});h.indexOf(o)>-1&&(c=o,l=u[h.indexOf(o)])}!c&&u&&u.length&&(c=u[0].url,l=u[0]),c.indexOf("{")>-1&&function(e){for(var t=[],r=/{([^}]+)}/g,n=void 0;n=r.exec(e);)t.push(n[1]);return t}(c).forEach(function(e){if(l.variables&&l.variables[e]){var t=l.variables[e],r=s[e]||t.default,n=new RegExp("{"+e+"}","g");c=c.replace(n,r)}});return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=d.default.parse(e),n=d.default.parse(t),o=P(r.protocol)||P(n.protocol)||"",i=r.host||n.host,a=r.pathname||"",s=void 0;return"/"===(s=o&&i?o+"://"+(i+a):a)[s.length-1]?s.slice(0,-1):s}(c,i)}(e):function(e){var t=e.spec,r=e.scheme,n=e.contextUrl,o=void 0===n?"":n,i=d.default.parse(o),a=Array.isArray(t.schemes)?t.schemes[0]:null,s=r||a||P(i.protocol)||"http",u=t.host||i.host||"",c=t.basePath||"",l=void 0;return"/"===(l=s&&u?s+"://"+(u+c):c)[l.length-1]?l.slice(0,-1):l}(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var a=n(r(8)),s=n(r(3)),u=n(r(52)),c=n(r(0)),l=n(r(2));t.execute=function(e){var t=e.http,r=e.fetch,n=e.spec,o=e.operationId,i=e.pathName,c=e.method,l=e.parameters,p=e.securities,d=(0,u.default)(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),m=t||r||g.default;i&&c&&!o&&(o=(0,k.legacyIdFromPathMethod)(i,c));var y=I.buildRequest((0,s.default)({spec:n,operationId:o,parameters:l,securities:p,http:m},d));return y.body&&((0,h.default)(y.body)||(0,f.default)(y.body))&&(y.body=(0,a.default)(y.body)),m(y)},t.buildRequest=o,t.baseUrl=i;var p=n((n(r(6)),r(12))),h=n(r(53)),f=n(r(54)),d=n((n(r(13)),r(10))),m=n(r(55)),y=r(7),g=n(y),v=n(r(21)),b=n(r(56)),S=n(r(57)),w=n(r(62)),_=n(r(64)),k=r(5),C=function(e){return Array.isArray(e)?e:[]},E=(0,v.default)("OperationNotFoundError",function(e,t,r){this.originalError=r,(0,l.default)(this,t||{})}),x=function(e,t){return t.filter(function(t){return t.name===e})},A=function(e){var t={};e.forEach(function(e){t[e.in]||(t[e.in]={}),t[e.in][e.name]=e});var r=[];return(0,c.default)(t).forEach(function(e){(0,c.default)(t[e]).forEach(function(n){r.push(t[e][n])})}),r},I=t.self={buildRequest:o},P=function(e){return e?e.replace(/\W/g,""):null}},function(e,t){e.exports=r(393)},function(e,t){e.exports=r(394)},function(e,t){e.exports=r(12)},function(e,t){e.exports=r(395)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={body:function(e){var t=e.req,r=e.value;t.body=r},header:function(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{},void 0!==n&&(t.headers[r.name]=n)},query:function(e){var t=e.req,r=e.value,n=e.parameter;if(t.query=t.query||{},!1===r&&"boolean"===n.type&&(r="false"),0===r&&["number","integer"].indexOf(n.type)>-1&&(r="0"),r)t.query[n.name]={collectionFormat:n.collectionFormat,value:r};else if(n.allowEmptyValue&&void 0!==r){var o=n.name;t.query[o]=t.query[o]||{},t.query[o].allowEmptyValue=!0}},path:function(e){var t=e.req,r=e.value,n=e.parameter;t.url=t.url.replace("{"+n.name+"}",encodeURIComponent(r))},formData:function(e){var t=e.req,r=e.value,n=e.parameter;(r||n.allowEmptyValue)&&(t.form=t.form||{},t.form[n.name]={value:r,allowEmptyValue:n.allowEmptyValue,collectionFormat:n.collectionFormat})}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(0)),i=n(r(1)),a=n(r(58));t.default={path:function(e){var t=e.req,r=e.value,n=e.parameter,o=n.name,i=n.style,s=n.explode,u=(0,a.default)({key:n.name,value:r,style:i||"simple",explode:s||!1,escape:!0});t.url=t.url.replace("{"+o+"}",u)},query:function(e){var t=e.req,r=e.value,n=e.parameter;if(t.query=t.query||{},!1===r&&(r="false"),0===r&&(r="0"),r){var s=void 0===r?"undefined":(0,i.default)(r);"deepObject"===n.style?(0,o.default)(r).forEach(function(e){var o=r[e];t.query[n.name+"["+e+"]"]={value:(0,a.default)({key:e,value:o,style:"deepObject",escape:n.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}}):"object"!==s||Array.isArray(r)||"form"!==n.style&&n.style||!n.explode&&void 0!==n.explode?t.query[n.name]={value:(0,a.default)({key:n.name,value:r,style:n.style||"form",explode:void 0===n.explode||n.explode,escape:n.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}:(0,o.default)(r).forEach(function(e){var o=r[e];t.query[e]={value:(0,a.default)({key:e,value:o,style:n.style||"form",escape:n.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}})}else if(n.allowEmptyValue&&void 0!==r){var u=n.name;t.query[u]=t.query[u]||{},t.query[u].allowEmptyValue=!0}},header:function(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{},s.indexOf(r.name.toLowerCase())>-1||void 0!==n&&(t.headers[r.name]=(0,a.default)({key:r.name,value:n,style:r.style||"simple",explode:void 0!==r.explode&&r.explode,escape:!1}))},cookie:function(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{};var o=void 0===n?"undefined":(0,i.default)(n);if("undefined"!==o){var s="object"===o&&!Array.isArray(n)&&r.explode?"":r.name+"=";t.headers.Cookie=s+(0,a.default)({key:r.name,value:n,escape:!1,style:r.style||"form",explode:void 0!==r.explode&&r.explode})}}};var s=["accept","authorization","content-type"];e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).escape,r=arguments[2];return"number"==typeof e&&(e=e.toString()),"string"==typeof e&&e.length&&t?r?JSON.parse(e):(0,u.stringToCharArray)(e).map(function(e){return l(e)?e:c(e)&&"unsafe"===t?e:((0,s.default)(e)||[]).map(function(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}).map(function(e){return"%"+e}).join("")}).join(""):e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(0)),a=n(r(1));t.encodeDisallowedCharacters=o,t.default=function(e){var t=e.value;return Array.isArray(t)?function(e){var t=e.key,r=e.value,n=e.style,i=e.explode,a=e.escape,s=function(e){return o(e,{escape:a})};if("simple"===n)return r.map(function(e){return s(e)}).join(",");if("label"===n)return"."+r.map(function(e){return s(e)}).join(".");if("matrix"===n)return r.map(function(e){return s(e)}).reduce(function(e,r){return!e||i?(e||"")+";"+t+"="+r:e+","+r},"");if("form"===n){var u=i?"&"+t+"=":",";return r.map(function(e){return s(e)}).join(u)}if("spaceDelimited"===n){var c=i?t+"=":"";return r.map(function(e){return s(e)}).join(" "+c)}if("pipeDelimited"===n){var l=i?t+"=":"";return r.map(function(e){return s(e)}).join("|"+l)}}(e):"object"===(void 0===t?"undefined":(0,a.default)(t))?function(e){var t=e.key,r=e.value,n=e.style,a=e.explode,s=e.escape,u=function(e){return o(e,{escape:s})},c=(0,i.default)(r);return"simple"===n?c.reduce(function(e,t){var n=u(r[t]);return(e?e+",":"")+t+(a?"=":",")+n},""):"label"===n?c.reduce(function(e,t){var n=u(r[t]);return(e?e+".":".")+t+(a?"=":".")+n},""):"matrix"===n&&a?c.reduce(function(e,t){var n=u(r[t]);return(e?e+";":";")+t+"="+n},""):"matrix"===n?c.reduce(function(e,n){var o=u(r[n]);return(e?e+",":";"+t+"=")+n+","+o},""):"form"===n?c.reduce(function(e,t){var n=u(r[t]);return(e?e+(a?"&":","):"")+t+(a?"=":",")+n},""):void 0}(e):function(e){var t=e.key,r=e.value,n=e.style,i=e.escape,a=function(e){return o(e,{escape:i})};return"simple"===n?a(r):"label"===n?"."+a(r):"matrix"===n?";"+t+"="+a(r):"form"===n?a(r):"deepObject"===n?a(r):void 0}(e)};var s=n((n(r(59)),r(60))),u=r(61),c=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},l=function(e){return/^[a-z0-9\-._~]+$/i.test(e)}},function(e,t){e.exports=r(396)},function(e,t){e.exports=r(397)},function(e,t){e.exports=r(398)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.request,r=e.securities,n=void 0===r?{}:r,o=e.operation,i=void 0===o?{}:o,a=e.spec,p=(0,u.default)({},t),h=n.authorized,f=void 0===h?{}:h,d=i.security||a.security||[],m=f&&!!(0,s.default)(f).length,y=(0,c.default)(a,["components","securitySchemes"])||{};return p.headers=p.headers||{},p.query=p.query||{},(0,s.default)(n).length&&m&&d&&(!Array.isArray(i.security)||i.security.length)?(d.forEach(function(e,t){for(var r in e){var n=f[r],o=y[r];if(n){var i=n.value||n,a=o.type;if(n)if("apiKey"===a)"query"===o.in&&(p.query[o.name]=i),"header"===o.in&&(p.headers[o.name]=i),"cookie"===o.in&&(p.cookies[o.name]=i);else if("http"===a){if("basic"===o.scheme){var s=i.username,u=i.password,c=(0,l.default)(s+":"+u);p.headers.Authorization="Basic "+c}"bearer"===o.scheme&&(p.headers.Authorization="Bearer "+i)}else if("oauth2"===a){var h=n.token||{},d=h.access_token,m=h.token_type;m&&"bearer"!==m.toLowerCase()||(m="Bearer"),p.headers.Authorization=m+" "+d}}}}),p):t}Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(8)),a=n(r(1)),s=n(r(0));t.default=function(e,t){var r=e.operation,n=e.requestBody,u=e.securities,c=e.spec,l=e.attachContentTypeForEmptyPayload,h=e.requestContentType;t=o({request:t,securities:u,operation:r,spec:c});var f=r.requestBody||{},d=(0,s.default)(f.content||{}),m=h&&d.indexOf(h)>-1;if(n||l){if(h&&m)t.headers["Content-Type"]=h;else if(!h){var y=d[0];y&&(t.headers["Content-Type"]=y,h=y)}}else h&&m&&(t.headers["Content-Type"]=h);return n&&(h?d.indexOf(h)>-1&&("application/x-www-form-urlencoded"===h||0===h.indexOf("multipart/")?"object"===(void 0===n?"undefined":(0,a.default)(n))?(t.form={},(0,s.default)(n).forEach(function(e){var r,o=n[e],s=void 0;"undefined"!=typeof File&&(s=o instanceof File),"undefined"!=typeof Blob&&(s=s||o instanceof Blob),void 0!==p.Buffer&&(s=s||p.Buffer.isBuffer(o)),r="object"!==(void 0===o?"undefined":(0,a.default)(o))||s?o:Array.isArray(o)?o.toString():(0,i.default)(o),t.form[e]={value:r}})):t.form=n:t.body=n):t.body=n),t},t.applySecurities=o;var u=n(r(6)),c=n(r(12)),l=n(r(13)),p=r(63)},function(e,t){e.exports=r(0)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.request,r=e.securities,n=void 0===r?{}:r,o=e.operation,u=void 0===o?{}:o,c=e.spec,l=(0,s.default)({},t),p=n.authorized,h=void 0===p?{}:p,f=n.specSecurity,d=void 0===f?[]:f,m=u.security||d,y=h&&!!(0,i.default)(h).length,g=c.securityDefinitions;return l.headers=l.headers||{},l.query=l.query||{},(0,i.default)(n).length&&y&&m&&(!Array.isArray(u.security)||u.security.length)?(m.forEach(function(e,t){for(var r in e){var n=h[r];if(n){var o=n.token,i=n.value||n,s=g[r],u=s.type,c=s["x-tokenName"]||"access_token",p=o&&o[c],f=o&&o.token_type;if(n)if("apiKey"===u){var d="query"===s.in?"query":"headers";l[d]=l[d]||{},l[d][s.name]=i}else"basic"===u?i.header?l.headers.authorization=i.header:(i.base64=(0,a.default)(i.username+":"+i.password),l.headers.authorization="Basic "+i.base64):"oauth2"===u&&p&&(f=f&&"bearer"!==f.toLowerCase()?f:"Bearer",l.headers.authorization=f+" "+p)}}}),l):t}Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(0));t.default=function(e,t){var r=e.spec,n=e.operation,i=e.securities,a=e.requestContentType,s=e.attachContentTypeForEmptyPayload;if((t=o({request:t,securities:i,operation:n,spec:r})).body||t.form||s)a?t.headers["Content-Type"]=a:Array.isArray(n.consumes)?t.headers["Content-Type"]=n.consumes[0]:Array.isArray(r.consumes)?t.headers["Content-Type"]=r.consumes[0]:n.parameters&&n.parameters.filter(function(e){return"file"===e.type}).length?t.headers["Content-Type"]="multipart/form-data":n.parameters&&n.parameters.filter(function(e){return"formData"===e.in}).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded");else if(a){var u=n.parameters&&n.parameters.filter(function(e){return"body"===e.in}).length>0,c=n.parameters&&n.parameters.filter(function(e){return"formData"===e.in}).length>0;(u||c)&&(t.headers["Content-Type"]=a)}return t},t.applySecurities=o;var a=n(r(13)),s=n(r(6));n(r(7))}])},function(e,t,r){e.exports={default:r(169),__esModule:!0}},function(e,t,r){r(170),e.exports=r(3).Object.keys},function(e,t,r){var n=r(37),o=r(38);r(173)("keys",function(){return function(e){return o(n(e))}})},function(e,t,r){var n=r(27),o=r(52),i=r(172);e.exports=function(e){return function(t,r,a){var s,u=n(t),c=o(u.length),l=i(a,c);if(e&&r!=r){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===r)return e||l||0;return!e&&-1}}},function(e,t,r){var n=r(74),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=n(e))<0?o(e+t,0):i(e,t)}},function(e,t,r){var n=r(10),o=r(3),i=r(21);e.exports=function(e,t){var r=(o.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*i(function(){r(1)}),"Object",a)}},function(e,t,r){"use strict";t.__esModule=!0;var n=a(r(175)),o=a(r(184)),i="function"==typeof o.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof o.default&&"symbol"===i(n.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":i(e)}},function(e,t,r){e.exports={default:r(176),__esModule:!0}},function(e,t,r){r(43),r(45),e.exports=r(82).f("iterator")},function(e,t,r){var n=r(74),o=r(72);e.exports=function(e){return function(t,r){var i,a,s=String(o(t)),u=n(r),c=s.length;return u<0||u>=c?e?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):i:e?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(e,t,r){"use strict";var n=r(81),o=r(42),i=r(44),a={};r(20)(a,r(9)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=n(a,{next:o(1,r)}),i(e,t+" Iterator")}},function(e,t,r){var n=r(13),o=r(14),i=r(38);e.exports=r(17)?Object.defineProperties:function(e,t){o(e);for(var r,a=i(t),s=a.length,u=0;s>u;)n.f(e,r=a[u++],t[r]);return e}},function(e,t,r){var n=r(19),o=r(37),i=r(75)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,r){"use strict";var n=r(182),o=r(183),i=r(28),a=r(27);e.exports=r(113)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){e.exports={default:r(185),__esModule:!0}},function(e,t,r){r(186),r(85),r(190),r(191),e.exports=r(3).Symbol},function(e,t,r){"use strict";var n=r(8),o=r(19),i=r(17),a=r(10),s=r(80),u=r(54).KEY,c=r(21),l=r(76),p=r(44),h=r(53),f=r(9),d=r(82),m=r(83),y=r(187),g=r(115),v=r(14),b=r(11),S=r(27),w=r(79),_=r(42),k=r(81),C=r(188),E=r(189),x=r(13),A=r(38),I=E.f,P=x.f,T=C.f,N=n.Symbol,R=n.JSON,D=R&&R.stringify,U=f("_hidden"),O=f("toPrimitive"),B={}.propertyIsEnumerable,M=l("symbol-registry"),q=l("symbols"),L=l("op-symbols"),j=Object.prototype,F="function"==typeof N,z=n.QObject,K=!z||!z.prototype||!z.prototype.findChild,V=i&&c(function(){return 7!=k(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=I(j,t);n&&delete j[t],P(e,t,r),n&&e!==j&&P(j,t,n)}:P,H=function(e){var t=q[e]=k(N.prototype);return t._k=e,t},G=F&&"symbol"==typeof N.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof N},W=function(e,t,r){return e===j&&W(L,t,r),v(e),t=w(t,!0),v(r),o(q,t)?(r.enumerable?(o(e,U)&&e[U][t]&&(e[U][t]=!1),r=k(r,{enumerable:_(0,!1)})):(o(e,U)||P(e,U,_(1,{})),e[U][t]=!0),V(e,t,r)):P(e,t,r)},J=function(e,t){v(e);for(var r,n=y(t=S(t)),o=0,i=n.length;i>o;)W(e,r=n[o++],t[r]);return e},Y=function(e){var t=B.call(this,e=w(e,!0));return!(this===j&&o(q,e)&&!o(L,e))&&(!(t||!o(this,e)||!o(q,e)||o(this,U)&&this[U][e])||t)},X=function(e,t){if(e=S(e),t=w(t,!0),e!==j||!o(q,t)||o(L,t)){var r=I(e,t);return!r||!o(q,t)||o(e,U)&&e[U][t]||(r.enumerable=!0),r}},$=function(e){for(var t,r=T(S(e)),n=[],i=0;r.length>i;)o(q,t=r[i++])||t==U||t==u||n.push(t);return n},Q=function(e){for(var t,r=e===j,n=T(r?L:S(e)),i=[],a=0;n.length>a;)!o(q,t=n[a++])||r&&!o(j,t)||i.push(q[t]);return i};F||(s((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(r){this===j&&t.call(L,r),o(this,U)&&o(this[U],e)&&(this[U][e]=!1),V(this,e,_(1,r))};return i&&K&&V(j,e,{configurable:!0,set:t}),H(e)}).prototype,"toString",function(){return this._k}),E.f=X,x.f=W,r(116).f=C.f=$,r(55).f=Y,r(84).f=Q,i&&!r(40)&&s(j,"propertyIsEnumerable",Y,!0),d.f=function(e){return H(f(e))}),a(a.G+a.W+a.F*!F,{Symbol:N});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Z.length>ee;)f(Z[ee++]);for(var te=A(f.store),re=0;te.length>re;)m(te[re++]);a(a.S+a.F*!F,"Symbol",{for:function(e){return o(M,e+="")?M[e]:M[e]=N(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in M)if(M[t]===e)return t},useSetter:function(){K=!0},useSimple:function(){K=!1}}),a(a.S+a.F*!F,"Object",{create:function(e,t){return void 0===t?k(e):J(k(e),t)},defineProperty:W,defineProperties:J,getOwnPropertyDescriptor:X,getOwnPropertyNames:$,getOwnPropertySymbols:Q}),R&&a(a.S+a.F*(!F||c(function(){var e=N();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))})),"JSON",{stringify:function(e){for(var t,r,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);if(r=t=n[1],(b(t)||void 0!==e)&&!G(e))return g(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!G(t))return t}),n[1]=t,D.apply(R,n)}}),N.prototype[O]||r(20)(N.prototype,O,N.prototype.valueOf),p(N,"Symbol"),p(Math,"Math",!0),p(n.JSON,"JSON",!0)},function(e,t,r){var n=r(38),o=r(84),i=r(55);e.exports=function(e){var t=n(e),r=o.f;if(r)for(var a,s=r(e),u=i.f,c=0;s.length>c;)u.call(e,a=s[c++])&&t.push(a);return t}},function(e,t,r){var n=r(27),o=r(116).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(n(e))}},function(e,t,r){var n=r(55),o=r(42),i=r(27),a=r(79),s=r(19),u=r(112),c=Object.getOwnPropertyDescriptor;t.f=r(17)?c:function(e,t){if(e=i(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return o(!n.f.call(e,t),e[t])}},function(e,t,r){r(83)("asyncIterator")},function(e,t,r){r(83)("observable")},function(e,t,r){r(193),e.exports=r(3).Object.assign},function(e,t,r){var n=r(10);n(n.S+n.F,"Object",{assign:r(118)})},function(e,t,r){"use strict";t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(117));t.default=n.default||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}},function(e,t,r){e.exports=r(196)},function(e,t,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,e.exports=r(197),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag",c="object"==typeof e,l=t.regeneratorRuntime;if(l)c&&(e.exports=l);else{(l=t.regeneratorRuntime=c?e.exports:{}).wrap=S;var p="suspendedStart",h="suspendedYield",f="executing",d="completed",m={},y={};y[a]=function(){return this};var g=Object.getPrototypeOf,v=g&&g(g(N([])));v&&v!==n&&o.call(v,a)&&(y=v);var b=C.prototype=_.prototype=Object.create(y);k.prototype=b.constructor=C,C.constructor=k,C[u]=k.displayName="GeneratorFunction",l.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,C):(e.__proto__=C,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(b),e},l.awrap=function(e){return{__await:e}},E(x.prototype),x.prototype[s]=function(){return this},l.AsyncIterator=x,l.async=function(e,t,r,n){var o=new x(S(e,t,r,n));return l.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},E(b),b[u]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},l.values=N,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(P),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return s.type="throw",s.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:N(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),m}}}function S(e,t,r,n){var o=t&&t.prototype instanceof _?t:_,i=Object.create(o.prototype),a=new T(n||[]);return i._invoke=function(e,t,r){var n=p;return function(o,i){if(n===f)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=A(a,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===p)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var u=w(e,t,r);if("normal"===u.type){if(n=r.done?d:h,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(e,r,a),i}function w(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function _(){}function k(){}function C(){}function E(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function x(e){var t;this._invoke=function(r,n){function i(){return new Promise(function(t,i){!function t(r,n,i,a){var s=w(e[r],e,n);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(c).then(function(e){u.value=e,i(u)},a)}a(s.arg)}(r,n,t,i)})}return t=t?t.then(i,i):i()}}function A(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,A(e,t),"throw"===t.method))return m;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=w(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,m;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,m):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function N(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}return{next:R}}function R(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},function(e,t,r){var n=r(56),o=r(46),i=r(205),a=r(47),s=r(59),u=r(31),c=Object.prototype.hasOwnProperty,l=i(function(e,t){if(s(t)||a(t))o(t,u(t),e);else for(var r in t)c.call(t,r)&&n(e,r,t[r])});e.exports=l},function(e,t,r){var n=r(121),o=r(202),i=r(16),a=r(123),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,p=c.hasOwnProperty,h=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?h:s).test(a(e))}},function(e,t,r){var n=r(29),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t,r){var n=r(203),o=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!o&&o in e}},function(e,t,r){var n=r(15)["__core-js_shared__"];e.exports=n},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,r){var n=r(206),o=r(211);e.exports=function(e){return n(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,a)}return t})}},function(e,t,r){var n=r(86),o=r(124),i=r(125);e.exports=function(e,t){return i(o(e,t,n),e+"")}},function(e,t){e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},function(e,t,r){var n=r(209),o=r(120),i=r(86),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var r=800,n=16,o=Date.now;e.exports=function(e){var t=0,i=0;return function(){var a=o(),s=n-(a-i);if(i=a,s>0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,r){var n=r(57),o=r(47),i=r(58),a=r(16);e.exports=function(e,t,r){if(!a(r))return!1;var s=typeof t;return!!("number"==s?o(r)&&i(t,r.length):"string"==s&&t in r)&&n(r[t],e)}},function(e,t){e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},function(e,t,r){var n=r(24),o=r(18),i="[object Arguments]";e.exports=function(e){return o(e)&&n(e)==i}},function(e,t){e.exports=function(){return!1}},function(e,t,r){var n=r(24),o=r(87),i=r(18),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},function(e,t,r){var n=r(59),o=r(217),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},function(e,t,r){var n=r(128)(Object.keys,Object);e.exports=n},function(e,t,r){e.exports={default:r(219),__esModule:!0}},function(e,t,r){var n=r(3),o=n.JSON||(n.JSON={stringify:JSON.stringify});e.exports=function(e){return o.stringify.apply(o,arguments)}},function(e,t,r){"use strict";var n=r(221),o=r(222);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),p=["%","/","?",";","#"].concat(l),h=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(223);function b(e,t,r){if(e&&o.isObject(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(s);if(b=b.trim(),!r&&1===e.split("#").length){var S=u.exec(b);if(S)return this.path=b,this.href=b,this.pathname=S[1],S[2]?(this.search=S[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=a.exec(b);if(w){var _=(w=w[0]).toLowerCase();this.protocol=_,b=b.substr(w.length)}if(r||w||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===b.substr(0,2);!k||w&&y[w]||(b=b.substr(2),this.slashes=!0)}if(!y[w]&&(k||w&&!g[w])){for(var C,E,x=-1,A=0;A<h.length;A++){-1!==(I=b.indexOf(h[A]))&&(-1===x||I<x)&&(x=I)}-1!==(E=-1===x?b.lastIndexOf("@"):b.lastIndexOf("@",x))&&(C=b.slice(0,E),b=b.slice(E+1),this.auth=decodeURIComponent(C)),x=-1;for(A=0;A<p.length;A++){var I;-1!==(I=b.indexOf(p[A]))&&(-1===x||I<x)&&(x=I)}-1===x&&(x=b.length),this.host=b.slice(0,x),b=b.slice(x),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var T=this.hostname.split(/\./),N=(A=0,T.length);A<N;A++){var R=T[A];if(R&&!R.match(f)){for(var D="",U=0,O=R.length;U<O;U++)R.charCodeAt(U)>127?D+="x":D+=R[U];if(!D.match(f)){var B=T.slice(0,A),M=T.slice(A+1),q=R.match(d);q&&(B.push(q[1]),M.unshift(q[2])),M.length&&(b="/"+M.join(".")+b),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var L=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+L,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[_])for(A=0,N=l.length;A<N;A++){var F=l[A];if(-1!==b.indexOf(F)){var z=encodeURIComponent(F);z===F&&(z=escape(F)),b=b.split(F).join(z)}}var K=b.indexOf("#");-1!==K&&(this.hash=b.substr(K),b=b.slice(0,K));var V=b.indexOf("?");if(-1!==V?(this.search=b.substr(V),this.query=b.substr(V+1),t&&(this.query=v.parse(this.query)),b=b.slice(0,V)):t&&(this.search="",this.query={}),b&&(this.pathname=b),g[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){L=this.pathname||"";var H=this.search||"";this.path=L+H}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=v.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(s=s.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var r=new i,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(r[l]=e[l])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol]){for(var p=Object.keys(e),h=0;h<p.length;h++){var f=p[h];r[f]=e[f]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||y[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",v=r.search||"";r.path=m+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),S=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=S||b||r.host&&e.pathname,_=w,k=r.pathname&&r.pathname.split("/")||[],C=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(C&&(r.hostname="",r.port=null,r.host&&(""===k[0]?k[0]=r.host:k.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),w=w&&(""===d[0]||""===k[0])),S)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,k=d;else if(d.length)k||(k=[]),k.pop(),k=k.concat(d),r.search=e.search,r.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(C)r.hostname=r.host=k.shift(),(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift());return r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!k.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=k.slice(-1)[0],x=(r.host||e.host||k.length>1)&&("."===E||".."===E)||""===E,A=0,I=k.length;I>=0;I--)"."===(E=k[I])?k.splice(I,1):".."===E?(k.splice(I,1),A++):A&&(k.splice(I,1),A--);if(!w&&!_)for(;A--;A)k.unshift("..");!w||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),x&&"/"!==k.join("/").substr(-1)&&k.push("");var P,T=""===k[0]||k[0]&&"/"===k[0].charAt(0);C&&(r.hostname=r.host=T?"":k.length?k.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift()));return(w=w||r.host&&k.length)&&!T&&k.unshift(""),k.length?r.pathname=k.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){(function(e,n){var o;/*! https://mths.be/punycode v1.3.2 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=36,l=1,p=26,h=38,f=700,d=72,m=128,y="-",g=/^xn--/,v=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=c-l,_=Math.floor,k=String.fromCharCode;function C(e){throw RangeError(S[e])}function E(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function x(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+E((e=e.replace(b,".")).split("."),t).join(".")}function A(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function I(e){return E(e,function(e){var t="";return e>65535&&(t+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=k(e)}).join("")}function P(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function T(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function N(e,t,r){var n=0;for(e=r?_(e/f):e>>1,e+=_(e/t);e>w*p>>1;n+=c)e=_(e/w);return _(n+(w+1)*e/(e+h))}function R(e){var t,r,n,o,i,a,s,h,f,g,v=[],b=e.length,S=0,w=m,k=d;for((r=e.lastIndexOf(y))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&C("not-basic"),v.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<b;){for(i=S,a=1,s=c;o>=b&&C("invalid-input"),((h=P(e.charCodeAt(o++)))>=c||h>_((u-S)/a))&&C("overflow"),S+=h*a,!(h<(f=s<=k?l:s>=k+p?p:s-k));s+=c)a>_(u/(g=c-f))&&C("overflow"),a*=g;k=N(S-i,t=v.length+1,0==i),_(S/t)>u-w&&C("overflow"),w+=_(S/t),S%=t,v.splice(S++,0,w)}return I(v)}function D(e){var t,r,n,o,i,a,s,h,f,g,v,b,S,w,E,x=[];for(b=(e=A(e)).length,t=m,r=0,i=d,a=0;a<b;++a)(v=e[a])<128&&x.push(k(v));for(n=o=x.length,o&&x.push(y);n<b;){for(s=u,a=0;a<b;++a)(v=e[a])>=t&&v<s&&(s=v);for(s-t>_((u-r)/(S=n+1))&&C("overflow"),r+=(s-t)*S,t=s,a=0;a<b;++a)if((v=e[a])<t&&++r>u&&C("overflow"),v==t){for(h=r,f=c;!(h<(g=f<=i?l:f>=i+p?p:f-i));f+=c)E=h-g,w=c-g,x.push(k(T(g+E%w,0))),h=_(E/w);x.push(k(T(h,0))),i=N(r,S,n==o),r=0,++n}++r,++t}return x.join("")}s={version:"1.3.2",ucs2:{decode:A,encode:I},decode:R,encode:D,toASCII:function(e){return x(e,function(e){return v.test(e)?"xn--"+D(e):e})},toUnicode:function(e){return x(e,function(e){return g.test(e)?R(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return s}.call(t,r,t,e))||(e.exports=o)}()}).call(this,r(60)(e),r(30))},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(224),t.encode=t.stringify=r(225)},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var p,h,f,d,m=e[l].replace(s,"%20"),y=m.indexOf(r);y>=0?(p=m.substr(0,y),h=m.substr(y+1)):(p=m,h=""),f=decodeURIComponent(p),d=decodeURIComponent(h),n(a,f)?o(a[f])?a[f].push(d):a[f]=[a[f],d]:a[f]=d}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),function(a){var s=encodeURIComponent(n(a))+r;return o(e[a])?i(e[a],function(e){return s+encodeURIComponent(n(e))}).join(t):s+encodeURIComponent(n(e[a]))}).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},function(e,t,r){"use strict";t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(129));t.default=function(e){return function(){var t=e.apply(this,arguments);return new n.default(function(e,r){return function o(i,a){try{var s=t[i](a),u=s.value}catch(e){return void r(e)}if(!s.done)return n.default.resolve(u).then(function(e){o("next",e)},function(e){o("throw",e)});e(u)}("next")})}}},function(e,t,r){r(85),r(43),r(45),r(228),r(233),r(234),e.exports=r(3).Promise},function(e,t,r){"use strict";var n,o,i,a,s=r(40),u=r(8),c=r(22),l=r(92),p=r(10),h=r(11),f=r(41),d=r(93),m=r(61),y=r(132),g=r(133).set,v=r(230)(),b=r(95),S=r(134),w=r(231),_=r(135),k=u.TypeError,C=u.process,E=C&&C.versions,x=E&&E.v8||"",A=u.Promise,I="process"==l(C),P=function(){},T=o=b.f,N=!!function(){try{var e=A.resolve(1),t=(e.constructor={})[r(9)("species")]=function(e){e(P,P)};return(I||"function"==typeof PromiseRejectionEvent)&&e.then(P)instanceof t&&0!==x.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),R=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},D=function(e,t){if(!e._n){e._n=!0;var r=e._c;v(function(){for(var n=e._v,o=1==e._s,i=0,a=function(t){var r,i,a,s=o?t.ok:t.fail,u=t.resolve,c=t.reject,l=t.domain;try{s?(o||(2==e._h&&B(e),e._h=1),!0===s?r=n:(l&&l.enter(),r=s(n),l&&(l.exit(),a=!0)),r===t.promise?c(k("Promise-chain cycle")):(i=R(r))?i.call(r,u,c):u(r)):c(n)}catch(e){l&&!a&&l.exit(),c(e)}};r.length>i;)a(r[i++]);e._c=[],e._n=!1,t&&!e._h&&U(e)})}},U=function(e){g.call(u,function(){var t,r,n,o=e._v,i=O(e);if(i&&(t=S(function(){I?C.emit("unhandledRejection",o,e):(r=u.onunhandledrejection)?r({promise:e,reason:o}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",o)}),e._h=I||O(e)?2:1),e._a=void 0,i&&t.e)throw t.v})},O=function(e){return 1!==e._h&&0===(e._a||e._c).length},B=function(e){g.call(u,function(){var t;I?C.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},M=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),D(t,!0))},q=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw k("Promise can't be resolved itself");(t=R(e))?v(function(){var n={_w:r,_d:!1};try{t.call(e,c(q,n,1),c(M,n,1))}catch(e){M.call(n,e)}}):(r._v=e,r._s=1,D(r,!1))}catch(e){M.call({_w:r,_d:!1},e)}}};N||(A=function(e){d(this,A,"Promise","_h"),f(e),n.call(this);try{e(c(q,this,1),c(M,this,1))}catch(e){M.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(96)(A.prototype,{then:function(e,t){var r=T(y(this,A));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=I?C.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&D(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new n;this.promise=e,this.resolve=c(q,e,1),this.reject=c(M,e,1)},b.f=T=function(e){return e===A||e===a?new i(e):o(e)}),p(p.G+p.W+p.F*!N,{Promise:A}),r(44)(A,"Promise"),r(232)("Promise"),a=r(3).Promise,p(p.S+p.F*!N,"Promise",{reject:function(e){var t=T(this);return(0,t.reject)(e),t.promise}}),p(p.S+p.F*(s||!N),"Promise",{resolve:function(e){return _(s&&this===a?A:this,e)}}),p(p.S+p.F*!(N&&r(136)(function(e){A.all(e).catch(P)})),"Promise",{all:function(e){var t=this,r=T(t),n=r.resolve,o=r.reject,i=S(function(){var r=[],i=0,a=1;m(e,!1,function(e){var s=i++,u=!1;r.push(void 0),a++,t.resolve(e).then(function(e){u||(u=!0,r[s]=e,--a||n(r))},o)}),--a||n(r)});return i.e&&o(i.v),r.promise},race:function(e){var t=this,r=T(t),n=r.reject,o=S(function(){m(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return o.e&&n(o.v),r.promise}})},function(e,t){e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){var n=r(8),o=r(133).set,i=n.MutationObserver||n.WebKitMutationObserver,a=n.process,s=n.Promise,u="process"==r(39)(a);e.exports=function(){var e,t,r,c=function(){var n,o;for(u&&(n=a.domain)&&n.exit();e;){o=e.fn,e=e.next;try{o()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(u)r=function(){a.nextTick(c)};else if(!i||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);r=function(){l.then(c)}}else r=function(){o.call(n,c)};else{var p=!0,h=document.createTextNode("");new i(c).observe(h,{characterData:!0}),r=function(){h.data=p=!p}}return function(n){var o={fn:n,next:void 0};t&&(t.next=o),e||(e=o,r()),t=o}}},function(e,t,r){var n=r(8).navigator;e.exports=n&&n.userAgent||""},function(e,t,r){"use strict";var n=r(8),o=r(3),i=r(13),a=r(17),s=r(9)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:n[e];a&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,r){"use strict";var n=r(10),o=r(3),i=r(8),a=r(132),s=r(135);n(n.P+n.R,"Promise",{finally:function(e){var t=a(this,o.Promise||i.Promise),r="function"==typeof e;return this.then(r?function(r){return s(t,e()).then(function(){return r})}:e,r?function(r){return s(t,e()).then(function(){throw r})}:e)}})},function(e,t,r){"use strict";var n=r(10),o=r(95),i=r(134);n(n.S,"Promise",{try:function(e){var t=o.f(this),r=i(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}})},function(e,t,r){var n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,i=r(236)(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(n,function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)}),t});e.exports=i},function(e,t,r){var n=r(237),o=500;e.exports=function(e){var t=n(e,function(e){return r.size===o&&r.clear(),e}),r=t.cache;return t}},function(e,t,r){var n=r(99),o="Expected a function";function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},function(e,t,r){var n=r(239),o=r(65),i=r(100);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},function(e,t,r){var n=r(240),o=r(241),i=r(242),a=r(243),s=r(244);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,r){var n=r(64);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,r){var n=r(64),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return r===o?void 0:r}return i.call(t,e)?t[e]:void 0}},function(e,t,r){var n=r(64),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},function(e,t,r){var n=r(64),o="__lodash_hash_undefined__";e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?o:t,this}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,r){var n=r(66),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():o.call(t,r,1),--this.size,0))}},function(e,t,r){var n=r(66);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},function(e,t,r){var n=r(66);e.exports=function(e){return n(this.__data__,e)>-1}},function(e,t,r){var n=r(66);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},function(e,t,r){var n=r(67);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,r){var n=r(67);e.exports=function(e){return n(this,e).get(e)}},function(e,t,r){var n=r(67);e.exports=function(e){return n(this,e).has(e)}},function(e,t,r){var n=r(67);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},function(e,t,r){(function(t){!function(){"use strict";e.exports=function(e){return(e instanceof t?e:new t(e.toString(),"binary")).toString("base64")}}()}).call(this,r(0).Buffer)},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=c(e),n=r[0],a=r[1],s=new i(function(e,t,r){return 3*(t+r)/4-r}(0,n,a)),u=0,l=a>0?n-4:n,p=0;p<l;p+=4)t=o[e.charCodeAt(p)]<<18|o[e.charCodeAt(p+1)]<<12|o[e.charCodeAt(p+2)]<<6|o[e.charCodeAt(p+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=255&t;2===a&&(t=o[e.charCodeAt(p)]<<2|o[e.charCodeAt(p+1)]>>4,s[u++]=255&t);1===a&&(t=o[e.charCodeAt(p)]<<10|o[e.charCodeAt(p+1)]<<4|o[e.charCodeAt(p+2)]>>2,s[u++]=t>>8&255,s[u++]=255&t);return s},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=0,s=r-o;a<s;a+=16383)i.push(p(e,a,a+16383>s?s:a+16383));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function p(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(n));return o.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,p=r?o-1:0,h=r?-1:1,f=e[t+p];for(p+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+e[t+p],p+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+p],p+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),i-=c}return(f?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,p=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(a++,u/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(t*u-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[r+f]=255&s,f+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+f]=255&a,f+=d,a/=256,c-=8);e[r+f-d]|=128*m}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){var n=r(261),o=r(139),i=r(140),a=r(138);e.exports=function(e,t,r){return e=a(e),r=null==r?0:n(i(r),0,e.length),t=o(t),e.slice(r,r+t.length)==t}},function(e,t){e.exports=function(e,t,r){return e==e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}},function(e,t,r){var n=r(263),o=1/0,i=1.7976931348623157e308;e.exports=function(e){return e?(e=n(e))===o||e===-o?(e<0?-1:1)*i:e==e?e:0:0===e?e:0}},function(e,t,r){var n=r(16),o=r(63),i=NaN,a=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return i;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var r=u.test(e);return r||c.test(e)?l(e.slice(2),r?2:8):s.test(e)?i:+e}},function(e,t,r){"use strict";var n=r(265);e.exports=n},function(e,t,r){"use strict";var n=r(266),o=r(284);function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=r(5),e.exports.Schema=r(33),e.exports.FAILSAFE_SCHEMA=r(101),e.exports.JSON_SCHEMA=r(142),e.exports.CORE_SCHEMA=r(141),e.exports.DEFAULT_SAFE_SCHEMA=r(50),e.exports.DEFAULT_FULL_SCHEMA=r(68),e.exports.load=n.load,e.exports.loadAll=n.loadAll,e.exports.safeLoad=n.safeLoad,e.exports.safeLoadAll=n.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=r(49),e.exports.MINIMAL_SCHEMA=r(101),e.exports.SAFE_SCHEMA=r(50),e.exports.DEFAULT_SCHEMA=r(68),e.exports.scan=i("scan"),e.exports.parse=i("parse"),e.exports.compose=i("compose"),e.exports.addConstructor=i("addConstructor")},function(e,t,r){"use strict";var n=r(32),o=r(49),i=r(267),a=r(50),s=r(68),u=Object.prototype.hasOwnProperty,c=1,l=2,p=3,h=4,f=1,d=2,m=3,y=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,v=/[,\[\]\{\}]/,b=/^(?:!|!!|![a-z\-]+!)$/i,S=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function w(e){return 10===e||13===e}function _(e){return 9===e||32===e}function k(e){return 9===e||32===e||10===e||13===e}function C(e){return 44===e||91===e||93===e||123===e||125===e}function E(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function x(e){return 120===e?2:117===e?4:85===e?8:0}function A(e){return 48<=e&&e<=57?e-48:-1}function I(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function P(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var T=new Array(256),N=new Array(256),R=0;R<256;R++)T[R]=I(R)?1:0,N[R]=I(R);function D(e,t){return new o(t,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function U(e,t){throw D(e,t)}function O(e,t){e.onWarning&&e.onWarning.call(null,D(e,t))}var B={YAML:function(e,t,r){var n,o,i;null!==e.version&&U(e,"duplication of %YAML directive"),1!==r.length&&U(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&U(e,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),i=parseInt(n[2],10),1!==o&&U(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&O(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,o;2!==r.length&&U(e,"TAG directive accepts exactly two arguments"),n=r[0],o=r[1],b.test(n)||U(e,"ill-formed tag handle (first argument) of the TAG directive"),u.call(e.tagMap,n)&&U(e,'there is a previously declared suffix for "'+n+'" tag handle'),S.test(o)||U(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=o}};function M(e,t,r,n){var o,i,a,s;if(t<r){if(s=e.input.slice(t,r),n)for(o=0,i=s.length;o<i;o+=1)9===(a=s.charCodeAt(o))||32<=a&&a<=1114111||U(e,"expected valid JSON character");else y.test(s)&&U(e,"the stream contains non-printable characters");e.result+=s}}function q(e,t,r,o){var i,a,s,c;for(n.isObject(r)||U(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,c=(i=Object.keys(r)).length;s<c;s+=1)a=i[s],u.call(t,a)||(t[a]=r[a],o[a]=!0)}function L(e,t,r,n,o,i,a,s){var c,l;if(o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(i))for(c=0,l=i.length;c<l;c+=1)q(e,t,i[c],r);else q(e,t,i,r);else e.json||u.call(r,o)||!u.call(t,o)||(e.line=a||e.line,e.position=s||e.position,U(e,"duplicated mapping key")),t[o]=i,delete r[o];return t}function j(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):U(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function F(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);0!==o;){for(;_(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!w(o))break;for(j(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&O(e,"deficient indentation"),n}function z(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!k(t)))}function K(e,t){1===t?e.result+=" ":t>1&&(e.result+=n.repeat("\n",t-1))}function V(e,t){var r,n,o=e.tag,i=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),n=e.input.charCodeAt(e.position);0!==n&&45===n&&k(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,F(e,!0,-1)&&e.lineIndent<=t)a.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,W(e,t,p,!1,!0),a.push(e.result),F(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)U(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=o,e.anchor=i,e.kind="sequence",e.result=a,!0)}function H(e){var t,r,n,o,i=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&U(e,"duplication of a tag property"),60===(o=e.input.charCodeAt(++e.position))?(i=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,r="!!",o=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(n=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):U(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!k(o);)33===o&&(a?U(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),b.test(r)||U(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),v.test(n)&&U(e,"tag suffix cannot contain flow indicator characters")}return n&&!S.test(n)&&U(e,"tag name cannot contain such characters: "+n),i?e.tag=n:u.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:U(e,'undeclared tag handle "'+r+'"'),!0}function G(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&U(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!k(r)&&!C(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&U(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function W(e,t,r,o,i){var a,s,y,g,v,b,S,I,R=1,D=!1,O=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=y=h===r||p===r,o&&F(e,!0,-1)&&(D=!0,e.lineIndent>t?R=1:e.lineIndent===t?R=0:e.lineIndent<t&&(R=-1)),1===R)for(;H(e)||G(e);)F(e,!0,-1)?(D=!0,y=a,e.lineIndent>t?R=1:e.lineIndent===t?R=0:e.lineIndent<t&&(R=-1)):y=!1;if(y&&(y=D||i),1!==R&&h!==r||(S=c===r||l===r?t:t+1,I=e.position-e.lineStart,1===R?y&&(V(e,I)||function(e,t,r){var n,o,i,a,s,u=e.tag,c=e.anchor,p={},f={},d=null,m=null,y=null,g=!1,v=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),s=e.input.charCodeAt(e.position);0!==s;){if(n=e.input.charCodeAt(e.position+1),i=e.line,a=e.position,63!==s&&58!==s||!k(n)){if(!W(e,r,l,!1,!0))break;if(e.line===i){for(s=e.input.charCodeAt(e.position);_(s);)s=e.input.charCodeAt(++e.position);if(58===s)k(s=e.input.charCodeAt(++e.position))||U(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(L(e,p,f,d,m,null),d=m=y=null),v=!0,g=!1,o=!1,d=e.tag,m=e.result;else{if(!v)return e.tag=u,e.anchor=c,!0;U(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=u,e.anchor=c,!0;U(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(g&&(L(e,p,f,d,m,null),d=m=y=null),v=!0,g=!0,o=!0):g?(g=!1,o=!0):U(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=n;if((e.line===i||e.lineIndent>t)&&(W(e,t,h,!0,o)&&(g?m=e.result:y=e.result),g||(L(e,p,f,d,m,y,i,a),d=m=y=null),F(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)U(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return g&&L(e,p,f,d,m,null),v&&(e.tag=u,e.anchor=c,e.kind="mapping",e.result=p),v}(e,I,S))||function(e,t){var r,n,o,i,a,s,u,l,p,h,f=!0,d=e.tag,m=e.anchor,y={};if(91===(h=e.input.charCodeAt(e.position)))o=93,s=!1,n=[];else{if(123!==h)return!1;o=125,s=!0,n={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=n),h=e.input.charCodeAt(++e.position);0!==h;){if(F(e,!0,t),(h=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=d,e.anchor=m,e.kind=s?"mapping":"sequence",e.result=n,!0;f||U(e,"missed comma between flow collection entries"),l=u=p=null,i=a=!1,63===h&&k(e.input.charCodeAt(e.position+1))&&(i=a=!0,e.position++,F(e,!0,t)),r=e.line,W(e,t,c,!1,!0),l=e.tag,u=e.result,F(e,!0,t),h=e.input.charCodeAt(e.position),!a&&e.line!==r||58!==h||(i=!0,h=e.input.charCodeAt(++e.position),F(e,!0,t),W(e,t,c,!1,!0),p=e.result),s?L(e,n,y,l,u,p):i?n.push(L(e,null,y,l,u,p)):n.push(u),F(e,!0,t),44===(h=e.input.charCodeAt(e.position))?(f=!0,h=e.input.charCodeAt(++e.position)):f=!1}U(e,"unexpected end of the stream within a flow collection")}(e,S)?O=!0:(s&&function(e,t){var r,o,i,a,s=f,u=!1,c=!1,l=t,p=0,h=!1;if(124===(a=e.input.charCodeAt(e.position)))o=!1;else{if(62!==a)return!1;o=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)f===s?s=43===a?m:d:U(e,"repeat of a chomping mode identifier");else{if(!((i=A(a))>=0))break;0===i?U(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?U(e,"repeat of an indentation width identifier"):(l=t+i-1,c=!0)}if(_(a)){do{a=e.input.charCodeAt(++e.position)}while(_(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!w(a)&&0!==a)}for(;0!==a;){for(j(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!c||e.lineIndent<l)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>l&&(l=e.lineIndent),w(a))p++;else{if(e.lineIndent<l){s===m?e.result+=n.repeat("\n",u?1+p:p):s===f&&u&&(e.result+="\n");break}for(o?_(a)?(h=!0,e.result+=n.repeat("\n",u?1+p:p)):h?(h=!1,e.result+=n.repeat("\n",p+1)):0===p?u&&(e.result+=" "):e.result+=n.repeat("\n",p):e.result+=n.repeat("\n",u?1+p:p),u=!0,c=!0,p=0,r=e.position;!w(a)&&0!==a;)a=e.input.charCodeAt(++e.position);M(e,r,e.position,!1)}}return!0}(e,S)||function(e,t){var r,n,o;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(M(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,o=e.position}else w(r)?(M(e,n,o,!0),K(e,F(e,!1,t)),n=o=e.position):e.position===e.lineStart&&z(e)?U(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);U(e,"unexpected end of the stream within a single quoted scalar")}(e,S)||function(e,t){var r,n,o,i,a,s;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return M(e,r,e.position,!0),e.position++,!0;if(92===s){if(M(e,r,e.position,!0),w(s=e.input.charCodeAt(++e.position)))F(e,!1,t);else if(s<256&&T[s])e.result+=N[s],e.position++;else if((a=x(s))>0){for(o=a,i=0;o>0;o--)(a=E(s=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+a:U(e,"expected hexadecimal character");e.result+=P(i),e.position++}else U(e,"unknown escape sequence");r=n=e.position}else w(s)?(M(e,r,n,!0),K(e,F(e,!1,t)),r=n=e.position):e.position===e.lineStart&&z(e)?U(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}U(e,"unexpected end of the stream within a double quoted scalar")}(e,S)?O=!0:!function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!k(n)&&!C(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&U(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(r)||U(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],F(e,!0,-1),!0}(e)?function(e,t,r){var n,o,i,a,s,u,c,l,p=e.kind,h=e.result;if(k(l=e.input.charCodeAt(e.position))||C(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(k(n=e.input.charCodeAt(e.position+1))||r&&C(n)))return!1;for(e.kind="scalar",e.result="",o=i=e.position,a=!1;0!==l;){if(58===l){if(k(n=e.input.charCodeAt(e.position+1))||r&&C(n))break}else if(35===l){if(k(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&z(e)||r&&C(l))break;if(w(l)){if(s=e.line,u=e.lineStart,c=e.lineIndent,F(e,!1,-1),e.lineIndent>=t){a=!0,l=e.input.charCodeAt(e.position);continue}e.position=i,e.line=s,e.lineStart=u,e.lineIndent=c;break}}a&&(M(e,o,i,!1),K(e,e.line-s),o=i=e.position,a=!1),_(l)||(i=e.position+1),l=e.input.charCodeAt(++e.position)}return M(e,o,i,!1),!!e.result||(e.kind=p,e.result=h,!1)}(e,S,c===r)&&(O=!0,null===e.tag&&(e.tag="?")):(O=!0,null===e.tag&&null===e.anchor||U(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===R&&(O=y&&V(e,I))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(g=0,v=e.implicitTypes.length;g<v;g+=1)if((b=e.implicitTypes[g]).resolve(e.result)){e.result=b.construct(e.result),e.tag=b.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else u.call(e.typeMap[e.kind||"fallback"],e.tag)?(b=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&b.kind!==e.kind&&U(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"'),b.resolve(e.result)?(e.result=b.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):U(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):U(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||O}function J(e){var t,r,n,o,i=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(o=e.input.charCodeAt(e.position))&&(F(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!k(o);)o=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&U(e,"directive name must not be less than one character in length");0!==o;){for(;_(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!w(o));break}if(w(o))break;for(t=e.position;0!==o&&!k(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==o&&j(e),u.call(B,r)?B[r](e,r,n):O(e,'unknown document directive "'+r+'"')}F(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,F(e,!0,-1)):a&&U(e,"directives end mark is expected"),W(e,e.lineIndent-1,h,!1,!0),F(e,!0,-1),e.checkLineBreaks&&g.test(e.input.slice(i,e.position))&&O(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&z(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,F(e,!0,-1)):e.position<e.length-1&&U(e,"end of the stream or a document separator is expected")}function Y(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new function(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}(e,t);for(r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)J(r);return r.documents}function X(e,t,r){var n,o,i=Y(e,r);if("function"!=typeof t)return i;for(n=0,o=i.length;n<o;n+=1)t(i[n])}function $(e,t){var r=Y(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new o("expected a single document in the stream, but found more")}}e.exports.loadAll=X,e.exports.load=$,e.exports.safeLoadAll=function(e,t,r){if("function"!=typeof t)return X(e,n.extend({schema:a},r));X(e,t,n.extend({schema:a},r))},e.exports.safeLoad=function(e,t){return $(e,n.extend({schema:a},t))}},function(e,t,r){"use strict";var n=r(32);function o(e,t,r,n,o){this.name=e,this.buffer=t,this.position=r,this.line=n,this.column=o}o.prototype.getSnippet=function(e,t){var r,o,i,a,s;if(!this.buffer)return null;for(e=e||4,t=t||75,r="",o=this.position;o>0&&-1==="\0\r\n\u2028\u2029".indexOf(this.buffer.charAt(o-1));)if(o-=1,this.position-o>t/2-1){r=" ... ",o+=5;break}for(i="",a=this.position;a<this.buffer.length&&-1==="\0\r\n\u2028\u2029".indexOf(this.buffer.charAt(a));)if((a+=1)-this.position>t/2-1){i=" ... ",a-=5;break}return s=this.buffer.slice(o,a),n.repeat(" ",e)+r+s+i+"\n"+n.repeat(" ",e+this.position-o+r.length)+"^"},o.prototype.toString=function(e){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(r+=":\n"+t),r},e.exports=o},function(e,t,r){"use strict";var n=r(5);e.exports=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,r){"use strict";var n=r(5);e.exports=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,r){"use strict";var n=r(5);e.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,r){"use strict";var n=r(5);e.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,r){"use strict";var n=r(5);e.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,r){"use strict";var n=r(32),o=r(5);function i(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function a(e){return 48<=e&&e<=55}function s(e){return 48<=e&&e<=57}e.exports=new o("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r=e.length,n=0,o=!1;if(!r)return!1;if("-"!==(t=e[n])&&"+"!==t||(t=e[++n]),"0"===t){if(n+1===r)return!0;if("b"===(t=e[++n])){for(n++;n<r;n++)if("_"!==(t=e[n])){if("0"!==t&&"1"!==t)return!1;o=!0}return o&&"_"!==t}if("x"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!i(e.charCodeAt(n)))return!1;o=!0}return o&&"_"!==t}for(;n<r;n++)if("_"!==(t=e[n])){if(!a(e.charCodeAt(n)))return!1;o=!0}return o&&"_"!==t}if("_"===t)return!1;for(;n<r;n++)if("_"!==(t=e[n])){if(":"===t)break;if(!s(e.charCodeAt(n)))return!1;o=!0}return!(!o||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(n)))},construct:function(e){var t,r,n=e,o=1,i=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(o=-1),t=(n=n.slice(1))[0]),"0"===n?0:"0"===t?"b"===n[1]?o*parseInt(n.slice(2),2):"x"===n[1]?o*parseInt(n,16):o*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach(function(e){i.unshift(parseInt(e,10))}),n=0,r=1,i.forEach(function(e){n+=e*r,r*=60}),o*n):o*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!n.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,r){"use strict";var n=r(32),o=r(5),i=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;e.exports=new o("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!i.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r,n,o;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,o=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){o.unshift(parseFloat(e,10))}),t=0,n=1,o.forEach(function(e){t+=e*n,n*=60}),r*t):r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return r=e.toString(10),a.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"})},function(e,t,r){"use strict";var n=r(5),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new n("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==o.exec(e)||null!==i.exec(e))},construct:function(e){var t,r,n,a,s,u,c,l,p=0,h=null;if(null===(t=o.exec(e))&&(t=i.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,n,a));if(s=+t[4],u=+t[5],c=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(h=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(h=-h)),l=new Date(Date.UTC(r,n,a,s,u,c,p)),h&&l.setTime(l.getTime()-h),l},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,r){"use strict";var n=r(5);e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,r){"use strict";var n;try{n=r(0).Buffer}catch(e){}var o=r(5),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new o("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=0,o=e.length,a=i;for(r=0;r<o;r++)if(!((t=a.indexOf(e.charAt(r)))>64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,o=e.replace(/[\r\n=]/g,""),a=o.length,s=i,u=0,c=[];for(t=0;t<a;t++)t%4==0&&t&&(c.push(u>>16&255),c.push(u>>8&255),c.push(255&u)),u=u<<6|s.indexOf(o.charAt(t));return 0==(r=a%4*6)?(c.push(u>>16&255),c.push(u>>8&255),c.push(255&u)):18===r?(c.push(u>>10&255),c.push(u>>2&255)):12===r&&c.push(u>>4&255),n?n.from?n.from(c):new n(c):c},predicate:function(e){return n&&n.isBuffer(e)},represent:function(e){var t,r,n="",o=0,a=e.length,s=i;for(t=0;t<a;t++)t%3==0&&t&&(n+=s[o>>18&63],n+=s[o>>12&63],n+=s[o>>6&63],n+=s[63&o]),o=(o<<8)+e[t];return 0==(r=a%3)?(n+=s[o>>18&63],n+=s[o>>12&63],n+=s[o>>6&63],n+=s[63&o]):2===r?(n+=s[o>>10&63],n+=s[o>>4&63],n+=s[o<<2&63],n+=s[64]):1===r&&(n+=s[o>>2&63],n+=s[o<<4&63],n+=s[64],n+=s[64]),n}})},function(e,t,r){"use strict";var n=r(5),o=Object.prototype.hasOwnProperty,i=Object.prototype.toString;e.exports=new n("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,a,s,u=[],c=e;for(t=0,r=c.length;t<r;t+=1){if(n=c[t],s=!1,"[object Object]"!==i.call(n))return!1;for(a in n)if(o.call(n,a)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==u.indexOf(a))return!1;u.push(a)}return!0},construct:function(e){return null!==e?e:[]}})},function(e,t,r){"use strict";var n=r(5),o=Object.prototype.toString;e.exports=new n("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,i,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(n=s[t],"[object Object]"!==o.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;a[t]=[i[0],n[i[0]]]}return!0},construct:function(e){if(null===e)return[];var t,r,n,o,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],o=Object.keys(n),i[t]=[o[0],n[o[0]]];return i}})},function(e,t,r){"use strict";var n=r(5),o=Object.prototype.hasOwnProperty;e.exports=new n("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,r=e;for(t in r)if(o.call(r,t)&&null!==r[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},function(e,t,r){"use strict";var n=r(5);e.exports=new n("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},function(e,t,r){"use strict";var n=r(5);e.exports=new n("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,r=/\/([gim]*)$/.exec(e),n="";if("/"===t[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==t[t.length-n.length-1])return!1}return!0},construct:function(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";return"/"===t[0]&&(r&&(n=r[1]),t=t.slice(1,t.length-n.length-1)),new RegExp(t,n)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,r){"use strict";var n;"undefined"!=typeof window&&(n=window.esprima);var o=r(5);e.exports=new o("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",r=n.parse(t,{range:!0});return"Program"===r.type&&1===r.body.length&&"ExpressionStatement"===r.body[0].type&&("ArrowFunctionExpression"===r.body[0].expression.type||"FunctionExpression"===r.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,r="("+e+")",o=n.parse(r,{range:!0}),i=[];if("Program"!==o.type||1!==o.body.length||"ExpressionStatement"!==o.body[0].type||"ArrowFunctionExpression"!==o.body[0].expression.type&&"FunctionExpression"!==o.body[0].expression.type)throw new Error("Failed to resolve function");return o.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=o.body[0].expression.body.range,"BlockStatement"===o.body[0].expression.body.type?new Function(i,r.slice(t[0]+1,t[1]-1)):new Function(i,"return "+r.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,r){"use strict";var n=r(32),o=r(49),i=r(68),a=r(50),s=Object.prototype.toString,u=Object.prototype.hasOwnProperty,c=9,l=10,p=32,h=33,f=34,d=35,m=37,y=38,g=39,v=42,b=44,S=45,w=58,_=62,k=63,C=64,E=91,x=93,A=96,I=123,P=124,T=125,N={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},R=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function D(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else{if(!(e<=4294967295))throw new o("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+n.repeat("0",i-t.length)+t}function U(e){this.schema=e.schema||i,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=n.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,n,o,i,a,s,c;if(null===t)return{};for(r={},o=0,i=(n=Object.keys(t)).length;o<i;o+=1)a=n[o],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&u.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[a]=s;return r}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function O(e,t){for(var r,o=n.repeat(" ",t),i=0,a=-1,s="",u=e.length;i<u;)-1===(a=e.indexOf("\n",i))?(r=e.slice(i),i=u):(r=e.slice(i,a+1),i=a+1),r.length&&"\n"!==r&&(s+=o),s+=r;return s}function B(e,t){return"\n"+n.repeat(" ",e.indent*t)}function M(e){return e===p||e===c}function q(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function L(e){return q(e)&&65279!==e&&e!==b&&e!==E&&e!==x&&e!==I&&e!==T&&e!==w&&e!==d}function j(e){return/^\n* /.test(e)}var F=1,z=2,K=3,V=4,H=5;function G(e,t,r,n,o){var i,a,s=!1,u=!1,c=-1!==n,p=-1,N=function(e){return q(e)&&65279!==e&&!M(e)&&e!==S&&e!==k&&e!==w&&e!==b&&e!==E&&e!==x&&e!==I&&e!==T&&e!==d&&e!==y&&e!==v&&e!==h&&e!==P&&e!==_&&e!==g&&e!==f&&e!==m&&e!==C&&e!==A}(e.charCodeAt(0))&&!M(e.charCodeAt(e.length-1));if(t)for(i=0;i<e.length;i++){if(!q(a=e.charCodeAt(i)))return H;N=N&&L(a)}else{for(i=0;i<e.length;i++){if((a=e.charCodeAt(i))===l)s=!0,c&&(u=u||i-p-1>n&&" "!==e[p+1],p=i);else if(!q(a))return H;N=N&&L(a)}u=u||c&&i-p-1>n&&" "!==e[p+1]}return s||u?r>9&&j(e)?H:u?V:K:N&&!o(e)?F:z}function W(e,t,r,n){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==R.indexOf(t))return"'"+t+"'";var i=e.indent*Math.max(1,r),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=n||e.flowLevel>-1&&r>=e.flowLevel;switch(G(t,s,e.indent,a,function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)})){case F:return t;case z:return"'"+t.replace(/'/g,"''")+"'";case K:return"|"+J(t,e.indent)+Y(O(t,i));case V:return">"+J(t,e.indent)+Y(O(function(e,t){var r,n,o=/(\n+)([^\n]*)/g,i=function(){var r=e.indexOf("\n");return r=-1!==r?r:e.length,o.lastIndex=r,X(e.slice(0,r),t)}(),a="\n"===e[0]||" "===e[0];for(;n=o.exec(e);){var s=n[1],u=n[2];r=" "===u[0],i+=s+(a||r||""===u?"":"\n")+X(u,t),a=r}return i}(t,a),i));case H:return'"'+function(e){for(var t,r,n,o="",i=0;i<e.length;i++)(t=e.charCodeAt(i))>=55296&&t<=56319&&(r=e.charCodeAt(i+1))>=56320&&r<=57343?(o+=D(1024*(t-55296)+r-56320+65536),i++):(n=N[t],o+=!n&&q(t)?e[i]:n||D(t));return o}(t)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function J(e,t){var r=j(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function Y(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function X(e,t){if(""===e||" "===e[0])return e;for(var r,n,o=/ [^ ]/g,i=0,a=0,s=0,u="";r=o.exec(e);)(s=r.index)-i>t&&(n=a>i?a:s,u+="\n"+e.slice(i,n),i=n+1),a=s;return u+="\n",e.length-i>t&&a>i?u+=e.slice(i,a)+"\n"+e.slice(a+1):u+=e.slice(i),u.slice(1)}function $(e,t,r){var n,i,a,c,l,p;for(a=0,c=(i=r?e.explicitTypes:e.implicitTypes).length;a<c;a+=1)if(((l=i[a]).instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof t&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(e.tag=r?l.tag:"?",l.represent){if(p=e.styleMap[l.tag]||l.defaultStyle,"[object Function]"===s.call(l.represent))n=l.represent(t,p);else{if(!u.call(l.represent,p))throw new o("!<"+l.tag+'> tag resolver accepts not "'+p+'" style');n=l.represent[p](t,p)}e.dump=n}return!0}return!1}function Q(e,t,r,n,i,a){e.tag=null,e.dump=r,$(e,r,!1)||$(e,r,!0);var u=s.call(e.dump);n&&(n=e.flowLevel<0||e.flowLevel>t);var c,p,h="[object Object]"===u||"[object Array]"===u;if(h&&(p=-1!==(c=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||p||2!==e.indent&&t>0)&&(i=!1),p&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(h&&p&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===u)n&&0!==Object.keys(e.dump).length?(!function(e,t,r,n){var i,a,s,u,c,p,h="",f=e.tag,d=Object.keys(r);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(i=0,a=d.length;i<a;i+=1)p="",n&&0===i||(p+=B(e,t)),u=r[s=d[i]],Q(e,t+1,s,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&l===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,c&&(p+=B(e,t)),Q(e,t+1,u,!0,c)&&(e.dump&&l===e.dump.charCodeAt(0)?p+=":":p+=": ",h+=p+=e.dump));e.tag=f,e.dump=h||"{}"}(e,t,e.dump,i),p&&(e.dump="&ref_"+c+e.dump)):(!function(e,t,r){var n,o,i,a,s,u="",c=e.tag,l=Object.keys(r);for(n=0,o=l.length;n<o;n+=1)s=e.condenseFlow?'"':"",0!==n&&(s+=", "),a=r[i=l[n]],Q(e,t,i,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Q(e,t,a,!1,!1)&&(u+=s+=e.dump));e.tag=c,e.dump="{"+u+"}"}(e,t,e.dump),p&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===u)n&&0!==e.dump.length?(!function(e,t,r,n){var o,i,a="",s=e.tag;for(o=0,i=r.length;o<i;o+=1)Q(e,t+1,r[o],!0,!0)&&(n&&0===o||(a+=B(e,t)),e.dump&&l===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}(e,t,e.dump,i),p&&(e.dump="&ref_"+c+e.dump)):(!function(e,t,r){var n,o,i="",a=e.tag;for(n=0,o=r.length;n<o;n+=1)Q(e,t,r[n],!1,!1)&&(0!==n&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}(e,t,e.dump),p&&(e.dump="&ref_"+c+" "+e.dump));else{if("[object String]"!==u){if(e.skipInvalid)return!1;throw new o("unacceptable kind of an object to dump "+u)}"?"!==e.tag&&W(e,e.dump,t,a)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function Z(e,t){var r,n,o=[],i=[];for(function e(t,r,n){var o,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=r.indexOf(t)))-1===n.indexOf(i)&&n.push(i);else if(r.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)e(t[i],r,n);else for(o=Object.keys(t),i=0,a=o.length;i<a;i+=1)e(t[o[i]],r,n)}(e,o,i),r=0,n=i.length;r<n;r+=1)t.duplicates.push(o[i[r]]);t.usedDuplicates=new Array(n)}function ee(e,t){var r=new U(t=t||{});return r.noRefs||Z(e,r),Q(r,0,e,!0,!0)?r.dump+"\n":""}e.exports.dump=ee,e.exports.safeDump=function(e,t){return ee(e,n.extend({schema:a},t))}},function(e,t,r){r(45),r(43),e.exports=r(286)},function(e,t,r){var n=r(14),o=r(94);e.exports=r(3).getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){"use strict";t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(144));t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,n.default)(e,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()},function(e,t,r){r(290);var n=r(3).Object;e.exports=function(e,t,r){return n.defineProperty(e,t,r)}},function(e,t,r){var n=r(10);n(n.S+n.F*!r(17),"Object",{defineProperty:r(13).f})},function(e,t,r){var n=r(292),o=1,i=4;e.exports=function(e){return n(e,o|i)}},function(e,t,r){var n=r(102),o=r(298),i=r(56),a=r(299),s=r(300),u=r(303),c=r(304),l=r(305),p=r(307),h=r(148),f=r(308),d=r(69),m=r(313),y=r(314),g=r(319),v=r(12),b=r(89),S=r(321),w=r(16),_=r(323),k=r(31),C=1,E=2,x=4,A="[object Arguments]",I="[object Function]",P="[object GeneratorFunction]",T="[object Object]",N={};N[A]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object DataView]"]=N["[object Boolean]"]=N["[object Date]"]=N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Map]"]=N["[object Number]"]=N[T]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object Symbol]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Error]"]=N[I]=N["[object WeakMap]"]=!1,e.exports=function e(t,r,R,D,U,O){var B,M=r&C,q=r&E,L=r&x;if(R&&(B=U?R(t,D,U,O):R(t)),void 0!==B)return B;if(!w(t))return t;var j=v(t);if(j){if(B=m(t),!M)return c(t,B)}else{var F=d(t),z=F==I||F==P;if(b(t))return u(t,M);if(F==T||F==A||z&&!U){if(B=q||z?{}:g(t),!M)return q?p(t,s(B,t)):l(t,a(B,t))}else{if(!N[F])return U?t:{};B=y(t,F,M)}}O||(O=new n);var K=O.get(t);if(K)return K;if(O.set(t,B),_(t))return t.forEach(function(n){B.add(e(n,r,R,n,t,O))}),B;if(S(t))return t.forEach(function(n,o){B.set(o,e(n,r,R,o,t,O))}),B;var V=L?q?f:h:q?keysIn:k,H=j?void 0:V(t);return o(H||t,function(n,o){H&&(n=t[o=n]),i(B,o,e(n,r,R,o,t,O))}),B}},function(e,t,r){var n=r(65);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(65),o=r(100),i=r(99),a=200;e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!o||s.length<a-1)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(s)}return r.set(e,t),this.size=r.size,this}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},function(e,t,r){var n=r(46),o=r(31);e.exports=function(e,t){return e&&n(t,o(t),e)}},function(e,t,r){var n=r(46),o=r(145);e.exports=function(e,t){return e&&n(t,o(t),e)}},function(e,t,r){var n=r(16),o=r(59),i=r(302),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},function(e,t,r){(function(e){var n=r(15),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}}).call(this,r(60)(e))},function(e,t){e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},function(e,t,r){var n=r(46),o=r(103);e.exports=function(e,t){return n(e,o(e),t)}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}},function(e,t,r){var n=r(46),o=r(147);e.exports=function(e,t){return n(e,o(e),t)}},function(e,t,r){var n=r(149),o=r(147),i=r(145);e.exports=function(e){return n(e,i,o)}},function(e,t,r){var n=r(23)(r(15),"DataView");e.exports=n},function(e,t,r){var n=r(23)(r(15),"Promise");e.exports=n},function(e,t,r){var n=r(23)(r(15),"Set");e.exports=n},function(e,t,r){var n=r(23)(r(15),"WeakMap");e.exports=n},function(e,t){var r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&r.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},function(e,t,r){var n=r(106),o=r(315),i=r(316),a=r(317),s=r(318),u="[object Boolean]",c="[object Date]",l="[object Map]",p="[object Number]",h="[object RegExp]",f="[object Set]",d="[object String]",m="[object Symbol]",y="[object ArrayBuffer]",g="[object DataView]",v="[object Float32Array]",b="[object Float64Array]",S="[object Int8Array]",w="[object Int16Array]",_="[object Int32Array]",k="[object Uint8Array]",C="[object Uint8ClampedArray]",E="[object Uint16Array]",x="[object Uint32Array]";e.exports=function(e,t,r){var A=e.constructor;switch(t){case y:return n(e);case u:case c:return new A(+e);case g:return o(e,r);case v:case b:case S:case w:case _:case k:case C:case E:case x:return s(e,r);case l:return new A;case p:case d:return new A(e);case h:return i(e);case f:return new A;case m:return a(e)}}},function(e,t,r){var n=r(106);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},function(e,t){var r=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,r.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,r){var n=r(29),o=n?n.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,r){var n=r(106);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},function(e,t,r){var n=r(320),o=r(105),i=r(59);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},function(e,t,r){var n=r(16),o=Object.create,i=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=i},function(e,t,r){var n=r(322),o=r(90),i=r(91),a=i&&i.isMap,s=a?o(a):n;e.exports=s},function(e,t,r){var n=r(69),o=r(18),i="[object Map]";e.exports=function(e){return o(e)&&n(e)==i}},function(e,t,r){var n=r(324),o=r(90),i=r(91),a=i&&i.isSet,s=a?o(a):n;e.exports=s},function(e,t,r){var n=r(69),o=r(18),i="[object Set]";e.exports=function(e){return o(e)&&n(e)==i}},function(e,t,r){"use strict";t.__esModule=!0;var n=i(r(326)),o=i(r(143));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){return function(e,t){if(Array.isArray(e))return e;if((0,n.default)(Object(e)))return function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var s,u=(0,o.default)(e);!(n=(s=u.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{!n&&u.return&&u.return()}finally{if(i)throw a}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,r){e.exports={default:r(327),__esModule:!0}},function(e,t,r){r(45),r(43),e.exports=r(328)},function(e,t,r){var n=r(92),o=r(9)("iterator"),i=r(28);e.exports=r(3).isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(n(t))}},function(e,t){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function n(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return d.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function a(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function s(e){var t=new FileReader,r=a(t);return t.readAsArrayBuffer(e),r}function u(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(d.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(d.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(d.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(d.arrayBuffer&&d.blob&&y(e))this._bodyArrayBuffer=u(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!d.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!g(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=u(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):d.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},d.blob&&(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,r=a(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},d.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function l(e,t){var r=(t=t||{}).body;if(e instanceof l){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=function(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function h(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();t.append(n,o)}}),t}function f(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var d={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(d.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],y=function(e){return e&&DataView.prototype.isPrototypeOf(e)},g=ArrayBuffer.isView||function(e){return e&&m.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,n){e=t(e),n=r(n);var o=this.map[e];this.map[e]=o?o+","+n:n},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,n){this.map[t(e)]=r(n)},o.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),n(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),n(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),n(e)},d.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this,{body:this._bodyInit})},c.call(l.prototype),c.call(f.prototype),f.prototype.clone=function(){return new f(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},f.error=function(){var e=new f(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];f.redirect=function(e,t){if(-1===b.indexOf(t))throw new RangeError("Invalid status code");return new f(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=l,e.Response=f,e.fetch=function(e,t){return new Promise(function(r,n){var o=new l(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:h(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;r(new f(t,e))},i.onerror=function(){n(new TypeError("Network request failed"))},i.ontimeout=function(){n(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&d.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,r){"use strict";var n=r(331),o=r(332),i=r(152);e.exports={formats:i,parse:o,stringify:n}},function(e,t,r){"use strict";var n=r(151),o=r(152),i={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},u=function e(t,r,o,i,a,u,c,l,p,h,f,d){var m=t;if("function"==typeof c)m=c(r,m);else if(m instanceof Date)m=h(m);else if(null===m){if(i)return u&&!d?u(r,s.encoder):r;m=""}if("string"==typeof m||"number"==typeof m||"boolean"==typeof m||n.isBuffer(m))return u?[f(d?r:u(r,s.encoder))+"="+f(u(m,s.encoder))]:[f(r)+"="+f(String(m))];var y,g=[];if(void 0===m)return g;if(Array.isArray(c))y=c;else{var v=Object.keys(m);y=l?v.sort(l):v}for(var b=0;b<y.length;++b){var S=y[b];a&&null===m[S]||(g=Array.isArray(m)?g.concat(e(m[S],o(r,S),o,i,a,u,c,l,p,h,f,d)):g.concat(e(m[S],r+(p?"."+S:"["+S+"]"),o,i,a,u,c,l,p,h,f,d)))}return g};e.exports=function(e,t){var r=e,a=t?n.assign({},t):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!=typeof a.encoder)throw new TypeError("Encoder has to be a function.");var c=void 0===a.delimiter?s.delimiter:a.delimiter,l="boolean"==typeof a.strictNullHandling?a.strictNullHandling:s.strictNullHandling,p="boolean"==typeof a.skipNulls?a.skipNulls:s.skipNulls,h="boolean"==typeof a.encode?a.encode:s.encode,f="function"==typeof a.encoder?a.encoder:s.encoder,d="function"==typeof a.sort?a.sort:null,m=void 0!==a.allowDots&&a.allowDots,y="function"==typeof a.serializeDate?a.serializeDate:s.serializeDate,g="boolean"==typeof a.encodeValuesOnly?a.encodeValuesOnly:s.encodeValuesOnly;if(void 0===a.format)a.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,a.format))throw new TypeError("Unknown format option provided.");var v,b,S=o.formatters[a.format];"function"==typeof a.filter?r=(b=a.filter)("",r):Array.isArray(a.filter)&&(v=b=a.filter);var w,_=[];if("object"!=typeof r||null===r)return"";w=a.arrayFormat in i?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var k=i[w];v||(v=Object.keys(r)),d&&v.sort(d);for(var C=0;C<v.length;++C){var E=v[C];p&&null===r[E]||(_=_.concat(u(r[E],E,k,l,p,h?f:null,b,d,m,y,S,g)))}var x=_.join(c),A=!0===a.addQueryPrefix?"?":"";return x.length>0?A+x:""}},function(e,t,r){"use strict";var n=r(151),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(n),s=a?n.slice(0,a.index):n,u=[];if(s){if(!r.plainObjects&&o.call(Object.prototype,s)&&!r.allowPrototypes)return;u.push(s)}for(var c=0;null!==(a=i.exec(n))&&c<r.depth;){if(c+=1,!r.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(a[1])}return a&&u.push("["+n.slice(a.index)+"]"),function(e,t,r){for(var n=t,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a)i=(i=[]).concat(n);else{i=r.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(s,10);!isNaN(u)&&a!==s&&String(u)===s&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(i=[])[u]=n:i[s]=n}n=i}return n}(u,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,s=n.split(t.delimiter,a),u=0;u<s.length;++u){var c,l,p=s[u],h=p.indexOf("]="),f=-1===h?p.indexOf("="):h+1;-1===f?(c=t.decoder(p,i.decoder),l=t.strictNullHandling?null:""):(c=t.decoder(p.slice(0,f),i.decoder),l=t.decoder(p.slice(f+1),i.decoder)),o.call(r,c)?r[c]=[].concat(r[c]).concat(l):r[c]=l}return r}(e,r):e,u=r.plainObjects?Object.create(null):{},c=Object.keys(s),l=0;l<c.length;++l){var p=c[l],h=a(p,s[p],r);u=n.merge(u,h,r)}return n.compact(u)}},function(e,t,r){var n=r(24),o=r(12),i=r(18),a="[object String]";e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&n(e)==a}},function(e,t){e.exports=FormData},function(e,t,r){e.exports={default:r(336),__esModule:!0}},function(e,t,r){r(337);var n=r(3).Object;e.exports=function(e,t){return n.create(e,t)}},function(e,t,r){var n=r(10);n(n.S,"Object",{create:r(81)})},function(e,t,r){var n=r(339)(r(359));e.exports=n},function(e,t,r){var n=r(153),o=r(47),i=r(31);e.exports=function(e){return function(t,r,a){var s=Object(t);if(!o(t)){var u=n(r,3);t=i(t),r=function(e){return u(s[e],e,s)}}var c=e(t,r,a);return c>-1?s[u?t[c]:c]:void 0}}},function(e,t,r){var n=r(341),o=r(352),i=r(157);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},function(e,t,r){var n=r(102),o=r(154),i=1,a=2;e.exports=function(e,t,r,s){var u=r.length,c=u,l=!s;if(null==e)return!c;for(e=Object(e);u--;){var p=r[u];if(l&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++u<c;){var h=(p=r[u])[0],f=e[h],d=p[1];if(l&&p[2]){if(void 0===f&&!(h in e))return!1}else{var m=new n;if(s)var y=s(f,d,h,e,t,m);if(!(void 0===y?o(d,f,i|a,s,m):y))return!1}}return!0}},function(e,t,r){var n=r(102),o=r(155),i=r(348),a=r(351),s=r(69),u=r(12),c=r(89),l=r(127),p=1,h="[object Arguments]",f="[object Array]",d="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,y,g,v){var b=u(e),S=u(t),w=b?f:s(e),_=S?f:s(t),k=(w=w==h?d:w)==d,C=(_=_==h?d:_)==d,E=w==_;if(E&&c(e)){if(!c(t))return!1;b=!0,k=!1}if(E&&!k)return v||(v=new n),b||l(e)?o(e,t,r,y,g,v):i(e,t,w,r,y,g,v);if(!(r&p)){var x=k&&m.call(e,"__wrapped__"),A=C&&m.call(t,"__wrapped__");if(x||A){var I=x?e.value():e,P=A?t.value():t;return v||(v=new n),g(I,P,r,y,v)}}return!!E&&(v||(v=new n),a(e,t,r,y,g,v))}},function(e,t,r){var n=r(99),o=r(344),i=r(345);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){var r="__lodash_hash_undefined__";e.exports=function(e){return this.__data__.set(e,r),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,r){var n=r(29),o=r(150),i=r(57),a=r(155),s=r(349),u=r(350),c=1,l=2,p="[object Boolean]",h="[object Date]",f="[object Error]",d="[object Map]",m="[object Number]",y="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",S="[object ArrayBuffer]",w="[object DataView]",_=n?n.prototype:void 0,k=_?_.valueOf:void 0;e.exports=function(e,t,r,n,_,C,E){switch(r){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!C(new o(e),new o(t)));case p:case h:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case y:case v:return e==t+"";case d:var x=s;case g:var A=n&c;if(x||(x=u),e.size!=t.size&&!A)return!1;var I=E.get(e);if(I)return I==t;n|=l,E.set(e,t);var P=a(x(e),x(t),n,_,C,E);return E.delete(e),P;case b:if(k)return k.call(e)==k.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},function(e,t){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},function(e,t,r){var n=r(148),o=1,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,a,s,u){var c=r&o,l=n(e),p=l.length;if(p!=n(t).length&&!c)return!1;for(var h=p;h--;){var f=l[h];if(!(c?f in t:i.call(t,f)))return!1}var d=u.get(e);if(d&&u.get(t))return d==t;var m=!0;u.set(e,t),u.set(t,e);for(var y=c;++h<p;){var g=e[f=l[h]],v=t[f];if(a)var b=c?a(v,g,f,t,e,u):a(g,v,f,e,t,u);if(!(void 0===b?g===v||s(g,v,r,a,u):b)){m=!1;break}y||(y="constructor"==f)}if(m&&!y){var S=e.constructor,w=t.constructor;S!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof S&&S instanceof S&&"function"==typeof w&&w instanceof w)&&(m=!1)}return u.delete(e),u.delete(t),m}},function(e,t,r){var n=r(156),o=r(31);e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],a=e[i];t[r]=[i,a,n(a)]}return t}},function(e,t,r){var n=r(154),o=r(137),i=r(158),a=r(98),s=r(156),u=r(157),c=r(48),l=1,p=2;e.exports=function(e,t){return a(e)&&s(t)?u(c(e),t):function(r){var a=o(r,e);return void 0===a&&a===t?i(r,e):n(t,a,l|p)}}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,r){var n=r(62),o=r(88),i=r(12),a=r(58),s=r(87),u=r(48);e.exports=function(e,t,r){for(var c=-1,l=(t=n(t,e)).length,p=!1;++c<l;){var h=u(t[c]);if(!(p=null!=e&&r(e,h)))break;e=e[h]}return p||++c!=l?p:!!(l=null==e?0:e.length)&&s(l)&&a(h,l)&&(i(e)||o(e))}},function(e,t,r){var n=r(357),o=r(358),i=r(98),a=r(48);e.exports=function(e){return i(e)?n(a(e)):o(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,r){var n=r(97);e.exports=function(e){return function(t){return n(t,e)}}},function(e,t,r){var n=r(360),o=r(153),i=r(140),a=Math.max;e.exports=function(e,t,r){var s=null==e?0:e.length;if(!s)return-1;var u=null==r?0:i(r);return u<0&&(u=a(s+u,0)),n(e,o(t,3),u)}},function(e,t){e.exports=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},function(e,t,r){"use strict";t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(362));t.default=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return(0,n.default)(e)}},function(e,t,r){e.exports={default:r(363),__esModule:!0}},function(e,t,r){r(43),r(364),e.exports=r(3).Array.from},function(e,t,r){"use strict";var n=r(22),o=r(10),i=r(37),a=r(130),s=r(131),u=r(52),c=r(365),l=r(94);o(o.S+o.F*!r(136)(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,o,p,h=i(e),f="function"==typeof this?this:Array,d=arguments.length,m=d>1?arguments[1]:void 0,y=void 0!==m,g=0,v=l(h);if(y&&(m=n(m,d>2?arguments[2]:void 0,2)),void 0==v||f==Array&&s(v))for(r=new f(t=u(h.length));t>g;g++)c(r,g,y?m(h[g],g):h[g]);else for(p=v.call(h),r=new f;!(o=p.next()).done;g++)c(r,g,y?a(p,m,[o.value,g],!0):o.value);return r.length=g,r}})},function(e,t,r){"use strict";var n=r(13),o=r(42);e.exports=function(e,t,r){t in e?n.f(e,t,o(0,r)):e[t]=r}},function(e,t,r){"use strict";t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(144));t.default=function(e,t,r){return t in e?(0,n.default)(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){r(159);var n=r(107),o=r(160),i=r(160);t.applyOperation=i.applyOperation,t.applyPatch=i.applyPatch,t.applyReducer=i.applyReducer,t.getValueByPointer=i.getValueByPointer,t.validate=i.validate,t.validator=i.validator;var a=r(107);t.JsonPatchError=a.PatchError,t.deepClone=a._deepClone,t.escapePathComponent=a.escapePathComponent,t.unescapePathComponent=a.unescapePathComponent;var s=new WeakMap,u=function(){return function(e){this.observers=new Map,this.obj=e}}(),c=function(){return function(e,t){this.callback=e,this.observer=t}}();function l(e){var t=s.get(e.object);p(t.value,e.object,e.patches,""),e.patches.length&&o.applyPatch(t.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function p(e,t,r,o){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var i=n._objectKeys(t),a=n._objectKeys(e),s=!1,u=a.length-1;u>=0;u--){var c=e[h=a[u]];if(!n.hasOwnProperty(t,h)||void 0===t[h]&&void 0!==c&&!1===Array.isArray(t))r.push({op:"remove",path:o+"/"+n.escapePathComponent(h)}),s=!0;else{var l=t[h];"object"==typeof c&&null!=c&&"object"==typeof l&&null!=l?p(c,l,r,o+"/"+n.escapePathComponent(h)):c!==l&&(!0,r.push({op:"replace",path:o+"/"+n.escapePathComponent(h),value:n._deepClone(l)}))}}if(s||i.length!=a.length)for(u=0;u<i.length;u++){var h=i[u];n.hasOwnProperty(e,h)||void 0===t[h]||r.push({op:"add",path:o+"/"+n.escapePathComponent(h),value:n._deepClone(t[h])})}}}t.unobserve=function(e,t){t.unobserve()},t.observe=function(e,t){var r,o=function(e){return s.get(e)}(e);if(o){var i=function(e,t){return e.observers.get(t)}(o,t);r=i&&i.observer}else o=new u(e),s.set(e,o);if(r)return r;if(r={},o.value=n._deepClone(e),t){r.callback=t,r.next=null;var a=function(){l(r)},p=function(){clearTimeout(r.next),r.next=setTimeout(a)};"undefined"!=typeof window&&(window.addEventListener?(window.addEventListener("mouseup",p),window.addEventListener("keyup",p),window.addEventListener("mousedown",p),window.addEventListener("keydown",p),window.addEventListener("change",p)):(document.documentElement.attachEvent("onmouseup",p),document.documentElement.attachEvent("onkeyup",p),document.documentElement.attachEvent("onmousedown",p),document.documentElement.attachEvent("onkeydown",p),document.documentElement.attachEvent("onchange",p)))}return r.patches=[],r.object=e,r.unobserve=function(){l(r),clearTimeout(r.next),function(e,t){e.observers.delete(t.callback)}(o,r),"undefined"!=typeof window&&(window.removeEventListener?(window.removeEventListener("mouseup",p),window.removeEventListener("keyup",p),window.removeEventListener("mousedown",p),window.removeEventListener("keydown",p)):(document.documentElement.detachEvent("onmouseup",p),document.documentElement.detachEvent("onkeyup",p),document.documentElement.detachEvent("onmousedown",p),document.documentElement.detachEvent("onkeydown",p)))},o.observers.set(t,new c(t,r)),r},t.generate=l,t.compare=function(e,t){var r=[];return p(e,t,r,""),r}},function(e,t){function r(e){var t=[];for(var r in e)t.push(r);return t}(e.exports="function"==typeof Object.keys?Object.keys:r).shim=r},function(e,t){var r="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function o(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=r?n:o).supported=n,t.unsupported=o},function(e,t,r){"use strict";(function(t){
/*!
 * @description Recursive object extending
 * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
 * @license MIT
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2013-2018 Viacheslav Lotsmanov
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
function r(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function n(e){if(e instanceof t){var r=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(r),r}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e,t){return"__proto__"===t?void 0:e[t]}var i=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0];return Array.prototype.slice.call(arguments,1).forEach(function(s){"object"!=typeof s||null===s||Array.isArray(s)||Object.keys(s).forEach(function(u){return t=o(a,u),(e=o(s,u))===a?void 0:"object"!=typeof e||null===e?void(a[u]=e):Array.isArray(e)?void(a[u]=function e(t){var o=[];return t.forEach(function(t,a){"object"==typeof t&&null!==t?Array.isArray(t)?o[a]=e(t):r(t)?o[a]=n(t):o[a]=i({},t):o[a]=t}),o}(e)):r(e)?void(a[u]=n(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[u]=i({},e)):void(a[u]=i(t,e))})}),a}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n="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};function o(e){return null===e?"null":void 0===e?"undefined":"object"===(void 0===e?"undefined":n(e))?Array.isArray(e)?"array":"object":void 0===e?"undefined":n(e)}function i(e){return"object"===o(e)?s(e):"array"===o(e)?a(e):e}function a(e){return e.map(i)}function s(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=i(e[r]));return t}function u(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r={arrayBehaviour:(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).arrayBehaviour||"replace"},n=t.map(function(e){return e||{}}),i=e||{},c=0;c<n.length;c++)for(var l=n[c],p=Object.keys(l),h=0;h<p.length;h++){var f=p[h],d=l[f],m=o(d),y=o(i[f]);if("object"===m)if("undefined"!==y){var g="object"===y?i[f]:{};i[f]=u({},[g,s(d)],r)}else i[f]=s(d);else if("array"===m)if("array"===y){var v=a(d);i[f]="merge"===r.arrayBehaviour?i[f].concat(v):v}else i[f]=a(d);else i[f]=d}return i}e.exports=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return u(e,r)},e.exports.noMutate=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return u({},t)},e.exports.withOptions=function(e,t,r){return u(e,t,r)}},function(e,t,r){e.exports={default:r(373),__esModule:!0}},function(e,t,r){r(85),r(45),r(374),r(379),r(381),e.exports=r(3).WeakMap},function(e,t,r){"use strict";var n,o=r(108)(0),i=r(80),a=r(54),s=r(118),u=r(377),c=r(11),l=r(21),p=r(161),h=a.getWeak,f=Object.isExtensible,d=u.ufstore,m={},y=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(e){if(c(e)){var t=h(e);return!0===t?d(p(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(p(this,"WeakMap"),e,t)}},v=e.exports=r(378)("WeakMap",y,g,u,!0,!0);l(function(){return 7!=(new v).set((Object.freeze||Object)(m),7).get(m)})&&(s((n=u.getConstructor(y,"WeakMap")).prototype,g),a.NEED=!0,o(["delete","has","get","set"],function(e){var t=v.prototype,r=t[e];i(t,e,function(t,o){if(c(t)&&!f(t)){this._f||(this._f=new n);var i=this._f[e](t,o);return"set"==e?this:i}return r.call(this,t,o)})}))},function(e,t,r){var n=r(376);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,r){var n=r(11),o=r(115),i=r(9)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),n(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,r){"use strict";var n=r(96),o=r(54).getWeak,i=r(14),a=r(11),s=r(93),u=r(61),c=r(108),l=r(19),p=r(161),h=c(5),f=c(6),d=0,m=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,t){return h(e.a,function(e){return e[0]===t})};y.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var r=g(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,i){var c=e(function(e,n){s(e,c,t,"_i"),e._t=t,e._i=d++,e._l=void 0,void 0!=n&&u(n,r,e[i],e)});return n(c.prototype,{delete:function(e){if(!a(e))return!1;var r=o(e);return!0===r?m(p(this,t)).delete(e):r&&l(r,this._i)&&delete r[this._i]},has:function(e){if(!a(e))return!1;var r=o(e);return!0===r?m(p(this,t)).has(e):r&&l(r,this._i)}}),c},def:function(e,t,r){var n=o(i(t),!0);return!0===n?m(e).set(t,r):n[e._i]=r,e},ufstore:m}},function(e,t,r){"use strict";var n=r(8),o=r(10),i=r(54),a=r(21),s=r(20),u=r(96),c=r(61),l=r(93),p=r(11),h=r(44),f=r(13).f,d=r(108)(0),m=r(17);e.exports=function(e,t,r,y,g,v){var b=n[e],S=b,w=g?"set":"add",_=S&&S.prototype,k={};return m&&"function"==typeof S&&(v||_.forEach&&!a(function(){(new S).entries().next()}))?(S=t(function(t,r){l(t,S,e,"_c"),t._c=new b,void 0!=r&&c(r,g,t[w],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in _&&(!v||"clear"!=e)&&s(S.prototype,e,function(r,n){if(l(this,S,e),!t&&v&&!p(r))return"get"==e&&void 0;var o=this._c[e](0===r?0:r,n);return t?this:o})}),v||f(S.prototype,"size",{get:function(){return this._c.size}})):(S=y.getConstructor(t,e,g,w),u(S.prototype,r),i.NEED=!0),h(S,e),k[e]=S,o(o.G+o.W+o.F,k),v||y.setStrong(S,e,g),S}},function(e,t,r){r(380)("WeakMap")},function(e,t,r){"use strict";var n=r(10);e.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,r){r(382)("WeakMap")},function(e,t,r){"use strict";var n=r(10),o=r(41),i=r(22),a=r(61);e.exports=function(e){n(n.S,e,{from:function(e){var t,r,n,s,u=arguments[1];return o(this),(t=void 0!==u)&&o(u),void 0==e?new this:(r=[],t?(n=0,s=i(u,arguments[2],2),a(e,!1,function(e){r.push(s(e,n++))})):a(e,!1,r.push,r),new this(r))}})}},function(e,t){var r={};!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function n(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return d.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function a(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function s(e){var t=new FileReader,r=a(t);return t.readAsArrayBuffer(e),r}function u(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(d.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(d.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(d.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(d.arrayBuffer&&d.blob&&y(e))this._bodyArrayBuffer=u(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!d.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!g(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=u(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):d.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},d.blob&&(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,r=a(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},d.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function l(e,t){var r=(t=t||{}).body;if(e instanceof l){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=function(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function h(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();t.append(n,o)}}),t}function f(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var d={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(d.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],y=function(e){return e&&DataView.prototype.isPrototypeOf(e)},g=ArrayBuffer.isView||function(e){return e&&m.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,n){e=t(e),n=r(n);var o=this.map[e];this.map[e]=o?o+","+n:n},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,n){this.map[t(e)]=r(n)},o.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),n(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),n(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),n(e)},d.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this,{body:this._bodyInit})},c.call(l.prototype),c.call(f.prototype),f.prototype.clone=function(){return new f(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},f.error=function(){var e=new f(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];f.redirect=function(e,t){if(-1===b.indexOf(t))throw new RangeError("Invalid status code");return new f(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=l,e.Response=f,e.fetch=function(e,t){return new Promise(function(r,n){var o=new l(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:h(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;r(new f(t,e))},i.onerror=function(){n(new TypeError("Network request failed"))},i.ontimeout=function(){n(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&d.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}(void 0!==r?r:this),e.exports=r},function(e,t,r){"use strict";var n=t,o=r(0).Buffer;function i(e,t){try{return decodeURIComponent(e)}catch(r){return n.unescapeBuffer(e,t).toString()}}n.unescapeBuffer=function(e,t){for(var r,n,i,a=new o(e.length),s=0,u=0,c=0;u<=e.length;u++){var l=u<e.length?e.charCodeAt(u):NaN;switch(s){case 0:switch(l){case 37:r=0,n=0,s=1;break;case 43:t&&(l=32);default:a[c++]=l}break;case 1:if(i=l,l>=48&&l<=57)r=l-48;else if(l>=65&&l<=70)r=l-65+10;else{if(!(l>=97&&l<=102)){a[c++]=37,a[c++]=l,s=0;break}r=l-97+10}s=2;break;case 2:if(s=0,l>=48&&l<=57)n=l-48;else if(l>=65&&l<=70)n=l-65+10;else{if(!(l>=97&&l<=102)){a[c++]=37,a[c++]=i,a[c++]=l;break}n=l-97+10}a[c++]=16*r+n}}return a.slice(0,c-1)},n.unescape=i;for(var a=new Array(256),s=0;s<256;++s)a[s]="%"+((s<16?"0":"")+s.toString(16)).toUpperCase();n.escape=function(e){"string"!=typeof e&&(e+="");for(var t="",r=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);if(!(33===o||45===o||46===o||95===o||126===o||o>=39&&o<=42||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122))if(n-r>0&&(t+=e.slice(r,n)),o<128)r=n+1,t+=a[o];else if(o<2048)r=n+1,t+=a[192|o>>6]+a[128|63&o];else if(o<55296||o>=57344)r=n+1,t+=a[224|o>>12]+a[128|o>>6&63]+a[128|63&o];else{var i;if(!(++n<e.length))throw new URIError("URI malformed");i=1023&e.charCodeAt(n),r=n+1,t+=a[240|(o=65536+((1023&o)<<10|i))>>18]+a[128|o>>12&63]+a[128|o>>6&63]+a[128|63&o]}}return 0===r?e:r<e.length?t+e.slice(r):t};var u=function(e){return"string"==typeof e?e:"number"==typeof e&&isFinite(e)?""+e:"boolean"==typeof e?e?"true":"false":""};function c(e,t){try{return t(e)}catch(t){return n.unescape(e,!0)}}n.stringify=n.encode=function(e,t,r,o){t=t||"&",r=r||"=";var i=n.escape;if(o&&"function"==typeof o.encodeURIComponent&&(i=o.encodeURIComponent),null!==e&&"object"==typeof e){for(var a=Object.keys(e),s=a.length,c=s-1,l="",p=0;p<s;++p){var h=a[p],f=e[h],d=i(u(h))+r;if(Array.isArray(f)){for(var m=f.length,y=m-1,g=0;g<m;++g)l+=d+i(u(f[g])),g<y&&(l+=t);m&&p<c&&(l+=t)}else l+=d+i(u(f)),p<c&&(l+=t)}return l}return""},n.parse=n.decode=function(e,t,r,o){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;"string"!=typeof t&&(t+="");var s=r.length,u=t.length,l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var p=1/0;l>0&&(p=l);var h=n.unescape;o&&"function"==typeof o.decodeURIComponent&&(h=o.decodeURIComponent);for(var f=h!==i,d=[],m=0,y=0,g=0,v="",b="",S=f,w=f,_=0,k=0;k<e.length;++k){var C=e.charCodeAt(k);if(C!==t.charCodeAt(y)){if(y=0,w||(37===C?_=1:_>0&&(C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102)?3==++_&&(w=!0):_=0),g<s){if(C===r.charCodeAt(g)){if(++g===s)m<(x=k-g+1)&&(v+=e.slice(m,x)),_=0,m=k+1;continue}g=0,S||(37===C?_=1:_>0&&(C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102)?3==++_&&(S=!0):_=0)}43===C&&(g<s?(k-m>0&&(v+=e.slice(m,k)),v+="%20",S=!0):(k-m>0&&(b+=e.slice(m,k)),b+="%20",w=!0),m=k+1)}else if(++y===u){var E,x=k-y+1;if(g<s?m<x&&(v+=e.slice(m,x)):m<x&&(b+=e.slice(m,x)),S&&(v=c(v,h)),w&&(b=c(b,h)),-1===d.indexOf(v))a[v]=b,d[d.length]=v;else(E=a[v])instanceof Array?E[E.length]=b:a[v]=[E,b];if(0==--p)break;S=w=f,_=0,v=b="",m=k+1,y=g=0}}p>0&&(m<e.length||g>0)&&(m<e.length&&(g<s?v+=e.slice(m):y<u&&(b+=e.slice(m))),S&&(v=c(v,h)),w&&(b=c(b,h)),-1===d.indexOf(v)?(a[v]=b,d[d.length]=v):(E=a[v])instanceof Array?E[E.length]=b:a[v]=[E,b]);return a}},function(e,t,r){var n=r(386),o=r(389)(function(e,t){return null==e?{}:n(e,t)});e.exports=o},function(e,t,r){var n=r(387),o=r(158);e.exports=function(e,t){return n(e,t,function(t,r){return o(e,r)})}},function(e,t,r){var n=r(97),o=r(388),i=r(62);e.exports=function(e,t,r){for(var a=-1,s=t.length,u={};++a<s;){var c=t[a],l=n(e,c);r(l,c)&&o(u,i(c,e),l)}return u}},function(e,t,r){var n=r(56),o=r(62),i=r(58),a=r(16),s=r(48);e.exports=function(e,t,r,u){if(!a(e))return e;for(var c=-1,l=(t=o(t,e)).length,p=l-1,h=e;null!=h&&++c<l;){var f=s(t[c]),d=r;if(c!=p){var m=h[f];void 0===(d=u?u(m,f,h):void 0)&&(d=a(m)?m:i(t[c+1])?[]:{})}n(h,f,d),h=h[f]}return e}},function(e,t,r){var n=r(390),o=r(124),i=r(125);e.exports=function(e){return i(o(e,void 0,n),e+"")}},function(e,t,r){var n=r(391);e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},function(e,t,r){var n=r(104),o=r(392);e.exports=function e(t,r,i,a,s){var u=-1,c=t.length;for(i||(i=o),s||(s=[]);++u<c;){var l=t[u];r>0&&i(l)?r>1?e(l,r-1,i,a,s):n(s,l):a||(s[s.length]=l)}return s}},function(e,t,r){var n=r(29),o=r(88),i=r(12),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},function(e,t,r){var n=r(24),o=r(105),i=r(18),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,p=c.call(Object);e.exports=function(e){if(!i(e)||n(e)!=a)return!1;var t=o(e);if(null===t)return!0;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==p}},function(e,t,r){"use strict";
/*!
 * cookie
 * Copyright(c) 2012-2014 Roman Shtylman
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},o=t||{},a=e.split(i),u=o.decode||n,c=0;c<a.length;c++){var l=a[c],p=l.indexOf("=");if(!(p<0)){var h=l.substr(0,p).trim(),f=l.substr(++p,l.length).trim();'"'==f[0]&&(f=f.slice(1,-1)),void 0==r[h]&&(r[h]=s(f,u))}}return r},t.serialize=function(e,t,r){var n=r||{},i=n.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var s=i(t);if(s&&!a.test(s))throw new TypeError("argument val is invalid");var u=e+"="+s;if(null!=n.maxAge){var c=n.maxAge-0;if(isNaN(c))throw new Error("maxAge should be a Number");u+="; Max-Age="+Math.floor(c)}if(n.domain){if(!a.test(n.domain))throw new TypeError("option domain is invalid");u+="; Domain="+n.domain}if(n.path){if(!a.test(n.path))throw new TypeError("option path is invalid");u+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+n.expires.toUTCString()}n.httpOnly&&(u+="; HttpOnly");n.secure&&(u+="; Secure");if(n.sameSite){var l="string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite;switch(l){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;default:throw new TypeError("option sameSite is invalid")}}return u};var n=decodeURIComponent,o=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(t){return e}}},function(e,t,r){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){e.exports=function(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n>=55296&&n<=56319&&r+1<e.length){var o=e.charCodeAt(r+1);if(o>=56320&&o<=57343){var i=1024*(n-55296)+o-56320+65536;t.push(240+Math.floor(i/64/64/64),128+Math.floor(i/64/64)%64,128+Math.floor(i/64)%64,128+i%64),r+=1;continue}}n>=2048?t.push(224+Math.floor(n/64/64),128+Math.floor(n/64)%64,128+n%64):n>=128?t.push(192+Math.floor(n/64),128+n%64):t.push(n)}return t}},function(e,t,r){!function(){var e;function r(e,t){function r(e,t,r){if(!n(e))return r;var o=0,i=0;do{var a=t.exec(e);if(null===a)break;if(!(i<r))break;o+=a[0].length,i++}while(null!==a);return o>=e.length?-1:o}function n(e){return a.test(e)}function o(e,r){void 0==e&&(e=["[^]"]),void 0==r&&(r="g");var n=[];return t.forEach(function(e){n.push(e.source)}),n.push(i.source),n=n.concat(e),new RegExp(n.join("|"),r)}e.findCharIndex=function(e,t){if(t>=e.length)return-1;if(!n(e))return t;for(var r=o(),i=0;null!==r.exec(e)&&!(r.lastIndex>t);)i++;return i},e.findByteIndex=function(e,t){return t>=this.length(e)?-1:r(e,o(),t)},e.charAt=function(e,t){var r=this.findByteIndex(e,t);if(r<0||r>=e.length)return"";var n=e.slice(r,r+8),o=a.exec(n);return null===o?n[0]:o[0]},e.charCodeAt=function(e,t){var n=function(e,t){return r(e,new RegExp(i.source,"g"),t)}(e,t);if(n<0)return NaN;var o=e.charCodeAt(n);return 55296<=o&&o<=56319?1024*(o-55296)+(e.charCodeAt(n+1)-56320)+65536:o},e.fromCharCode=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):String.fromCharCode(e)},e.indexOf=function(e,t,r){void 0!==r&&null!==r||(r=0);var n=this.findByteIndex(e,r),o=e.indexOf(t,n);return o<0?-1:this.findCharIndex(e,o)},e.lastIndexOf=function(e,t,r){var n;if(void 0===r||null===r)n=e.lastIndexOf(t);else{var o=this.findByteIndex(e,r);n=e.lastIndexOf(t,o)}return n<0?-1:this.findCharIndex(e,n)},e.slice=function(e,t,r){var n,o=this.findByteIndex(e,t);return o<0&&(o=e.length),void 0===r||null===r?n=e.length:(n=this.findByteIndex(e,r))<0&&(n=e.length),e.slice(o,n)},e.substr=function(e,t,r){return t<0&&(t=this.length(e)+t),void 0===r||null===r?this.slice(e,t):this.slice(e,t,t+r)},e.substring=e.slice,e.length=function(e){return this.findCharIndex(e,e.length-1)+1},e.stringToCodePoints=function(e){for(var t=[],r=0;r<e.length&&(codePoint=this.charCodeAt(e,r),codePoint);r++)t.push(codePoint);return t},e.codePointsToString=function(e){for(var t=[],r=0;r<e.length;r++)t.push(this.fromCharCode(e[r]));return t.join("")},e.stringToBytes=function(e){for(var t=[],r=0;r<e.length;r++){for(var n=e.charCodeAt(r),o=[];n>0;)o.push(255&n),n>>=8;1==o.length&&o.push(0),t=t.concat(o.reverse())}return t},e.bytesToString=function(e){for(var t=[],r=0;r<e.length;r+=2){var n=e[r]<<8|e[r+1];t.push(String.fromCharCode(n))}return t.join("")},e.stringToCharArray=function(e){var t=[],r=o();do{var n=r.exec(e);if(null===n)break;t.push(n[0])}while(null!==n);return t};var i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,a=o([],"")}null!==t?e=t:"undefined"!=typeof window&&null!==window&&(void 0!==window.UtfString&&null!==window.UtfString||(window.UtfString={}),e=window.UtfString);e.visual={},r(e,[]),r(e.visual,[/\uD83C[\uDDE6-\uDDFF]\uD83C[\uDDE6-\uDDFF]/])}()},function(e,t,r){(function(t){var r,n=t.crypto||t.msCrypto;if(n&&n.getRandomValues){var o=new Uint8Array(16);r=function(){return n.getRandomValues(o),o}}if(!r){var i=new Array(16);r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}e.exports=r}).call(this,r(30))},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=r;return o[e[n++]]+o[e[n++]]+o[e[n++]]+o[e[n++]]+"-"+o[e[n++]]+o[e[n++]]+"-"+o[e[n++]]+o[e[n++]]+"-"+o[e[n++]]+o[e[n++]]+"-"+o[e[n++]]+o[e[n++]]+o[e[n++]]+o[e[n++]]+o[e[n++]]+o[e[n++]]}},function(e,t,r){(function(n){var o,i;function a(e){return(a="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)}var s=function(){return function e(t,r,n){function i(s,u){if(!r[s]){if(!t[s]){if(!u&&"function"==typeof o&&o)return o(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){return i(t[s][1][e]||e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var a="function"==typeof o&&o,s=0;s<n.length;s++)i(n[s]);return i}}()({38:[function(e,t,r){var n={util:e("./util")};({}).toString(),t.exports=n,n.util.update(n,{VERSION:"2.348.0",Signers:{},Protocol:{Json:e("./protocol/json"),Query:e("./protocol/query"),Rest:e("./protocol/rest"),RestJson:e("./protocol/rest_json"),RestXml:e("./protocol/rest_xml")},XML:{Builder:e("./xml/builder"),Parser:null},JSON:{Builder:e("./json/builder"),Parser:e("./json/parser")},Model:{Api:e("./model/api"),Operation:e("./model/operation"),Shape:e("./model/shape"),Paginator:e("./model/paginator"),ResourceWaiter:e("./model/resource_waiter")},apiLoader:e("./api_loader")}),e("./sequential_executor"),e("./service"),e("./config"),e("./http"),e("./event_listeners"),e("./request"),e("./response"),e("./resource_waiter"),e("./signers/request_signer"),e("./param_validator"),n.events=new n.SequentialExecutor},{"./api_loader":27,"./config":37,"./event_listeners":58,"./http":59,"./json/builder":61,"./json/parser":62,"./model/api":63,"./model/operation":65,"./model/paginator":66,"./model/resource_waiter":67,"./model/shape":68,"./param_validator":69,"./protocol/json":71,"./protocol/query":72,"./protocol/rest":73,"./protocol/rest_json":74,"./protocol/rest_xml":75,"./request":81,"./resource_waiter":82,"./response":83,"./sequential_executor":85,"./service":86,"./signers/request_signer":105,"./util":113,"./xml/builder":115}],115:[function(e,t,r){function n(){}function o(e,t,r){switch(r.type){case"structure":return function(e,t,r){a.arrayEach(r.memberNames,function(n){var a=r.members[n];if("body"===a.location){var u=t[n],c=a.name;if(void 0!==u&&null!==u)if(a.isXmlAttribute)e.addAttribute(c,u);else if(a.flattened)o(e,u,a);else{var l=new s(c);e.addChildNode(l),i(l,a),o(l,u,a)}}})}(e,t,r);case"map":return function(e,t,r){var n=r.key.name||"key",i=r.value.name||"value";a.each(t,function(t,a){var u=new s(r.flattened?r.name:"entry");e.addChildNode(u);var c=new s(n),l=new s(i);u.addChildNode(c),u.addChildNode(l),o(c,t,r.key),o(l,a,r.value)})}(e,t,r);case"list":return function(e,t,r){r.flattened?a.arrayEach(t,function(t){var n=r.member.name||r.name,i=new s(n);e.addChildNode(i),o(i,t,r.member)}):a.arrayEach(t,function(t){var n=r.member.name||"member",i=new s(n);e.addChildNode(i),o(i,t,r.member)})}(e,t,r);default:return function(e,t,r){e.addChildNode(new u(r.toWireFormat(t)))}(e,t,r)}}function i(e,t,r){var n,o="xmlns";t.xmlNamespaceUri?(n=t.xmlNamespaceUri,t.xmlNamespacePrefix&&(o+=":"+t.xmlNamespacePrefix)):r&&t.api.xmlNamespaceUri&&(n=t.api.xmlNamespaceUri),n&&e.addAttribute(o,n)}var a=e("../util"),s=e("./xml-node").XmlNode,u=e("./xml-text").XmlText;n.prototype.toXML=function(e,t,r,n){var a=new s(r);return i(a,t,!0),o(a,e,t),a.children.length>0||n?a.toString():""},t.exports=n},{"../util":113,"./xml-node":118,"./xml-text":119}],119:[function(e,t,r){function n(e){this.value=e}var o=e("./escape-element").escapeElement;n.prototype.toString=function(){return o(""+this.value)},t.exports={XmlText:n}},{"./escape-element":117}],117:[function(e,t,r){t.exports={escapeElement:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}},{}],118:[function(e,t,r){function n(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}var o=e("./escape-attribute").escapeAttribute;n.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},n.prototype.addChildNode=function(e){return this.children.push(e),this},n.prototype.removeAttribute=function(e){return delete this.attributes[e],this},n.prototype.toString=function(){for(var e=Boolean(this.children.length),t="<"+this.name,r=this.attributes,n=0,i=Object.keys(r);n<i.length;n++){var a=i[n],s=r[a];void 0!==s&&null!==s&&(t+=" "+a+'="'+o(""+s)+'"')}return t+(e?">"+this.children.map(function(e){return e.toString()}).join("")+"</"+this.name+">":"/>")},t.exports={XmlNode:n}},{"./escape-attribute":116}],116:[function(e,t,r){t.exports={escapeAttribute:function(e){return e.replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}},{}],105:[function(e,t,r){var n=e("../core"),o=n.util.inherit;n.Signers.RequestSigner=o({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),n.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return n.Signers.V2;case"v3":return n.Signers.V3;case"v4":return n.Signers.V4;case"s3":return n.Signers.S3;case"v3https":return n.Signers.V3Https}throw new Error("Unknown signing version "+e)},e("./v2"),e("./v3"),e("./v3https"),e("./v4"),e("./s3"),e("./presign")},{"../core":38,"./presign":104,"./s3":106,"./v2":107,"./v3":108,"./v3https":109,"./v4":110}],110:[function(e,t,r){var n=e("../core"),o=e("./v4_credentials"),i=n.util.inherit;n.Signers.V4=i(n.Signers.RequestSigner,{constructor:function(e,t,r){n.Signers.RequestSigner.call(this,e),this.serviceName=t,r=r||{},this.signatureCache="boolean"!=typeof r.signatureCache||r.signatureCache,this.operation=r.operation},algorithm:"AWS4-HMAC-SHA256",addAuthorization:function(e,t){var r=n.util.date.iso8601(t).replace(/[:\-]|\.\d{3}/g,"");this.isPresigned()?this.updateForPresigned(e,r):this.addHeaders(e,r),this.request.headers.Authorization=this.authorization(e,r)},addHeaders:function(e,t){this.request.headers["X-Amz-Date"]=t,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken)},updateForPresigned:function(e,t){var r=this.credentialString(t),o={"X-Amz-Date":t,"X-Amz-Algorithm":this.algorithm,"X-Amz-Credential":e.accessKeyId+"/"+r,"X-Amz-Expires":this.request.headers["presigned-expires"],"X-Amz-SignedHeaders":this.signedHeaders()};e.sessionToken&&(o["X-Amz-Security-Token"]=e.sessionToken),this.request.headers["Content-Type"]&&(o["Content-Type"]=this.request.headers["Content-Type"]),this.request.headers["Content-MD5"]&&(o["Content-MD5"]=this.request.headers["Content-MD5"]),this.request.headers["Cache-Control"]&&(o["Cache-Control"]=this.request.headers["Cache-Control"]),n.util.each.call(this,this.request.headers,function(e,t){if("presigned-expires"!==e&&this.isSignableHeader(e)){var r=e.toLowerCase();0===r.indexOf("x-amz-meta-")?o[r]=t:0===r.indexOf("x-amz-")&&(o[e]=t)}});var i=this.request.path.indexOf("?")>=0?"&":"?";this.request.path+=i+n.util.queryParamsToString(o)},authorization:function(e,t){var r=[],n=this.credentialString(t);return r.push(this.algorithm+" Credential="+e.accessKeyId+"/"+n),r.push("SignedHeaders="+this.signedHeaders()),r.push("Signature="+this.signature(e,t)),r.join(", ")},signature:function(e,t){var r=o.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return n.util.crypto.hmac(r,this.stringToSign(t),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var e=[],t=this.request.pathname();return"s3"!==this.serviceName&&(t=n.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var e=[];n.util.each.call(this,this.request.headers,function(t,r){e.push([t,r])}),e.sort(function(e,t){return e[0].toLowerCase()<t[0].toLowerCase()?-1:1});var t=[];return n.util.arrayEach.call(this,e,function(e){var r=e[0].toLowerCase();if(this.isSignableHeader(r)){var o=e[1];if(void 0===o||null===o||"function"!=typeof o.toString)throw n.util.error(new Error("Header "+r+" contains invalid value"),{code:"InvalidHeader"});t.push(r+":"+this.canonicalHeaderValues(o.toString()))}}),t.join("\n")},canonicalHeaderValues:function(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")},signedHeaders:function(){var e=[];return n.util.each.call(this,this.request.headers,function(t){t=t.toLowerCase(),this.isSignableHeader(t)&&e.push(t)}),e.sort().join(";")},credentialString:function(e){return o.createScope(e.substr(0,8),this.request.region,this.serviceName)},hexEncodedHash:function(e){return n.util.crypto.sha256(e,"hex")},hexEncodedBodyHash:function(){var e=this.request;return this.isPresigned()&&"s3"===this.serviceName&&!e.body?"UNSIGNED-PAYLOAD":e.headers["X-Amz-Content-Sha256"]?e.headers["X-Amz-Content-Sha256"]:this.hexEncodedHash(this.request.body||"")},unsignableHeaders:["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id"],isSignableHeader:function(e){return 0===e.toLowerCase().indexOf("x-amz-")||this.unsignableHeaders.indexOf(e)<0},isPresigned:function(){return!!this.request.headers["presigned-expires"]}}),t.exports=n.Signers.V4},{"../core":38,"./v4_credentials":111}],111:[function(e,t,r){var n=e("../core"),o={},i=[];t.exports={createScope:function(e,t,r){return[e.substr(0,8),t,r,"aws4_request"].join("/")},getSigningKey:function(e,t,r,a,s){var u=[n.util.crypto.hmac(e.secretAccessKey,e.accessKeyId,"base64"),t,r,a].join("_");if((s=!1!==s)&&u in o)return o[u];var c=n.util.crypto.hmac("AWS4"+e.secretAccessKey,t,"buffer"),l=n.util.crypto.hmac(c,r,"buffer"),p=n.util.crypto.hmac(l,a,"buffer"),h=n.util.crypto.hmac(p,"aws4_request","buffer");return s&&(o[u]=h,i.push(u),i.length>50&&delete o[i.shift()]),h},emptyCache:function(){o={},i=[]}}},{"../core":38}],109:[function(e,t,r){var n=e("../core"),o=n.util.inherit;e("./v3"),n.Signers.V3Https=o(n.Signers.V3,{authorization:function(e){return"AWS3-HTTPS AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,Signature="+this.signature(e)},stringToSign:function(){return this.request.headers["X-Amz-Date"]}}),t.exports=n.Signers.V3Https},{"../core":38,"./v3":108}],108:[function(e,t,r){var n=e("../core"),o=n.util.inherit;n.Signers.V3=o(n.Signers.RequestSigner,{addAuthorization:function(e,t){var r=n.util.date.rfc822(t);this.request.headers["X-Amz-Date"]=r,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(e,r)},authorization:function(e){return"AWS3 AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(e)},signedHeaders:function(){var e=[];return n.util.arrayEach(this.headersToSign(),function(t){e.push(t.toLowerCase())}),e.sort().join(";")},canonicalHeaders:function(){var e=this.request.headers,t=[];return n.util.arrayEach(this.headersToSign(),function(r){t.push(r.toLowerCase().trim()+":"+String(e[r]).trim())}),t.sort().join("\n")+"\n"},headersToSign:function(){var e=[];return n.util.each(this.request.headers,function(t){("Host"===t||"Content-Encoding"===t||t.match(/^X-Amz/i))&&e.push(t)}),e},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push("/"),e.push(""),e.push(this.canonicalHeaders()),e.push(this.request.body),n.util.crypto.sha256(e.join("\n"))}}),t.exports=n.Signers.V3},{"../core":38}],107:[function(e,t,r){var n=e("../core"),o=n.util.inherit;n.Signers.V2=o(n.Signers.RequestSigner,{addAuthorization:function(e,t){t||(t=n.util.date.getDate());var r=this.request;r.params.Timestamp=n.util.date.iso8601(t),r.params.SignatureVersion="2",r.params.SignatureMethod="HmacSHA256",r.params.AWSAccessKeyId=e.accessKeyId,e.sessionToken&&(r.params.SecurityToken=e.sessionToken),delete r.params.Signature,r.params.Signature=this.signature(e),r.body=n.util.queryParamsToString(r.params),r.headers["Content-Length"]=r.body.length},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push(this.request.endpoint.host.toLowerCase()),e.push(this.request.pathname()),e.push(n.util.queryParamsToString(this.request.params)),e.join("\n")}}),t.exports=n.Signers.V2},{"../core":38}],106:[function(e,t,r){var n=e("../core"),o=n.util.inherit;n.Signers.S3=o(n.Signers.RequestSigner,{subResources:{acl:1,accelerate:1,analytics:1,cors:1,lifecycle:1,delete:1,inventory:1,location:1,logging:1,metrics:1,notification:1,partNumber:1,policy:1,requestPayment:1,replication:1,restore:1,tagging:1,torrent:1,uploadId:1,uploads:1,versionId:1,versioning:1,versions:1,website:1},responseHeaders:{"response-content-type":1,"response-content-language":1,"response-expires":1,"response-cache-control":1,"response-content-disposition":1,"response-content-encoding":1},addAuthorization:function(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=n.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var r=this.sign(e.secretAccessKey,this.stringToSign()),o="AWS "+e.accessKeyId+":"+r;this.request.headers.Authorization=o},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var r=this.canonicalizedAmzHeaders();return r&&t.push(r),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];n.util.each(this.request.headers,function(t){t.match(/^x-amz-/i)&&e.push(t)}),e.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:1});var t=[];return n.util.arrayEach.call(this,e,function(e){t.push(e.toLowerCase()+":"+String(this.request.headers[e]))}),t.join("\n")},canonicalizedResource:function(){var e=this.request,t=e.path.split("?"),r=t[0],o=t[1],i="";if(e.virtualHostedBucket&&(i+="/"+e.virtualHostedBucket),i+=r,o){var a=[];n.util.arrayEach.call(this,o.split("&"),function(e){var t=e.split("=")[0],r=e.split("=")[1];if(this.subResources[t]||this.responseHeaders[t]){var n={name:t};void 0!==r&&(this.subResources[t]?n.value=r:n.value=decodeURIComponent(r)),a.push(n)}}),a.sort(function(e,t){return e.name<t.name?-1:1}),a.length&&(o=[],n.util.arrayEach(a,function(e){void 0===e.value?o.push(e.name):o.push(e.name+"="+e.value)}),i+="?"+o.join("&"))}return i},sign:function(e,t){return n.util.crypto.hmac(e,t,"base64","sha1")}}),t.exports=n.Signers.S3},{"../core":38}],104:[function(e,t,r){function n(e){var t=e.httpRequest.headers[s],r=e.service.getSignerClass(e);if(delete e.httpRequest.headers["User-Agent"],delete e.httpRequest.headers["X-Amz-User-Agent"],r===i.Signers.V4){if(t>604800)throw i.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1});e.httpRequest.headers[s]=t}else{if(r!==i.Signers.S3)throw i.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});var n=e.service?e.service.getSkewCorrectedDate():i.util.date.getDate();e.httpRequest.headers[s]=parseInt(i.util.date.unixTimestamp(n)+t,10).toString()}}function o(e){var t=e.httpRequest.endpoint,r=i.util.urlParse(e.httpRequest.path),n={};r.search&&(n=i.util.queryStringParse(r.search.substr(1)));var o=e.httpRequest.headers.Authorization.split(" ");if("AWS"===o[0])o=o[1].split(":"),n.AWSAccessKeyId=o[0],n.Signature=o[1],i.util.each(e.httpRequest.headers,function(e,t){e===s&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete n[e],e=e.toLowerCase()),n[e]=t}),delete e.httpRequest.headers[s],delete n.Authorization,delete n.Host;else if("AWS4-HMAC-SHA256"===o[0]){o.shift();var a=o.join(" ").match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];n["X-Amz-Signature"]=a,delete n.Expires}t.pathname=r.pathname,t.search=i.util.queryParamsToString(n)}var i=e("../core"),a=i.util.inherit,s="presigned-expires";i.Signers.Presign=a({sign:function(e,t,r){if(e.httpRequest.headers[s]=t||3600,e.on("build",n),e.on("sign",o),e.removeListener("afterBuild",i.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",i.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!r){if(e.build(),e.response.error)throw e.response.error;return i.util.urlFormat(e.httpRequest.endpoint)}e.build(function(){this.response.error?r(this.response.error):r(null,i.util.urlFormat(e.httpRequest.endpoint))})}}),t.exports=i.Signers.Presign},{"../core":38}],86:[function(e,t,r){(function(r){var n=e("./core"),o=e("./model/api"),i=e("./region_config"),s=n.util.inherit,u=0;n.Service=s({constructor:function(e){if(!this.loadServiceClass)throw n.util.error(new Error,"Service must be constructed with `new' operator");var t=this.loadServiceClass(e||{});if(t){var r=n.util.copy(e),o=new t(e);return Object.defineProperty(o,"_originalConfig",{get:function(){return r},enumerable:!1,configurable:!0}),o._clientId=++u,o}this.initialize(e)},initialize:function(e){var t=n.config[this.serviceIdentifier];if(this.config=new n.Config(n.config),t&&this.config.update(t,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||i(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint),n.SequentialExecutor.call(this),n.Service.addDefaultMonitoringListeners(this),this.config.clientSideMonitoring&&this.publisher){var o=this.publisher;this.addNamedListener("PUBLISH_API_CALL","apiCall",function(e){r.nextTick(function(){o.eventHandler(e)})}),this.addNamedListener("PUBLISH_API_ATTEMPT","apiCallAttempt",function(e){r.nextTick(function(){o.eventHandler(e)})})}},validateService:function(){},loadServiceClass:function(e){var t=e;if(n.util.isEmpty(this.api)){if(t.apiConfig)return n.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){(t=new n.Config(n.config)).update(e,!0);var r=t.apiVersions[this.constructor.serviceIdentifier];return r=r||t.apiVersion,this.getLatestServiceClass(r)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&n.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e?n.util.isType(e,Date)&&(e=n.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(),r=null,o=t.length-1;o>=0;o--)if("*"!==t[o][t[o].length-1]&&(r=t[o]),t[o].substr(0,10)<=e)return r;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,customizeRequests:function(e){if(e){if("function"!=typeof e)throw new Error("Invalid callback type '"+a(e)+"' provided in customizeRequests");this.customRequestHandler=e}else this.customRequestHandler=null},makeRequest:function(e,t,r){if("function"==typeof t&&(r=t,t=null),t=t||{},this.config.params){var o=this.api.operations[e];o&&(t=n.util.copy(t),n.util.each(this.config.params,function(e,r){o.input.members[e]&&(void 0!==t[e]&&null!==t[e]||(t[e]=r))}))}var i=new n.Request(this,e,t);return this.addAllRequestListeners(i),this.attachMonitoringEmitter(i),r&&i.send(r),i},makeUnauthenticatedRequest:function(e,t,r){"function"==typeof t&&(r=t,t={});var n=this.makeRequest(e,t).toUnauthenticated();return r?n.send(r):n},waitFor:function(e,t,r){return new n.ResourceWaiter(this,e).wait(t,r)},addAllRequestListeners:function(e){for(var t=[n.events,n.EventListeners.Core,this.serviceInterface(),n.EventListeners.CorePost],r=0;r<t.length;r++)t[r]&&e.addListeners(t[r]);this.config.paramValidation||e.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),this.config.logger&&e.addListeners(n.EventListeners.Logger),this.setupRequestListeners(e),"function"==typeof this.constructor.prototype.customRequestHandler&&this.constructor.prototype.customRequestHandler(e),Object.prototype.hasOwnProperty.call(this,"customRequestHandler")&&"function"==typeof this.customRequestHandler&&this.customRequestHandler(e)},apiCallEvent:function(e){var t=e.service.api.operations[e.operation];return{Type:"ApiCall",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Region:e.httpRequest.region,MaxRetriesExceeded:0}},apiAttemptEvent:function(e){var t=e.service.api.operations[e.operation],r={Type:"ApiCallAttempt",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Fqdn:e.httpRequest.endpoint.hostname,UserAgent:e.httpRequest.getUserAgent()},n=e.response;return n.httpResponse.headers?(e.httpRequest.headers["x-amz-security-token"]&&(r.SessionToken=e.httpRequest.headers["x-amz-security-token"]),n.httpResponse.headers["x-amzn-requestid"]&&(r.XAmznRequestId=n.httpResponse.headers["x-amzn-requestid"]),n.httpResponse.headers["x-amz-request-id"]&&(r.XAmzRequestId=n.httpResponse.headers["x-amz-request-id"]),n.httpResponse.headers["x-amz-id-2"]&&(r.XAmzId2=n.httpResponse.headers["x-amz-id-2"]),n.httpResponse.statusCode&&(r.HttpStatusCode=n.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials.accessKeyId&&(r.AccessKey=e.service.config.credentials.accessKeyId),r):r},attemptFailEvent:function(e){var t=this.apiAttemptEvent(e),r=e.response;return r.httpResponse.statusCode>299?(t.AwsException=r.error.code,t.AwsExceptionMessage=r.error.message):(t.SdkException=r.error.code||r.error.name,t.SdkExceptionMessage=r.error.message),t},attachMonitoringEmitter:function(e){var t,r,o,i,a,s,u=0,c=this;e.on("validate",function(){i=n.util.realClock.now(),s=Date.now()},!0),e.on("sign",function(){r=n.util.realClock.now(),t=Date.now(),a=e.httpRequest.region,u++},!0),e.on("validateResponse",function(){o=Math.round(n.util.realClock.now()-r)}),e.addNamedListener("API_CALL_ATTEMPT","success",function(){var r=c.apiAttemptEvent(e);r.Timestamp=t,r.AttemptLatency=o>=0?o:0,r.Region=a,c.emit("apiCallAttempt",[r])}),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",function(){var i=c.attemptFailEvent(e);i.Timestamp=t,o=o||Math.round(n.util.realClock.now()-r),i.AttemptLatency=o>=0?o:0,i.Region=a,c.emit("apiCallAttempt",[i])}),e.addNamedListener("API_CALL","complete",function(){var t=c.apiCallEvent(e);if(t.AttemptCount=u,!(t.AttemptCount<=0)){t.Timestamp=s;var r=Math.round(n.util.realClock.now()-i);t.Latency=r>=0?r:0;var o=e.response;"number"==typeof o.retryCount&&"number"==typeof o.maxRetries&&o.retryCount>=o.maxRetries&&(t.MaxRetriesExceeded=1),c.emit("apiCall",[t])}})},setupRequestListeners:function(e){},getSignerClass:function(e){var t,r=null,o="";return e&&(o=(r=(e.service.api.operations||{})[e.operation]||null)?r.authtype:""),t=this.config.signatureVersion?this.config.signatureVersion:"v4"===o||"v4-unsigned-body"===o?"v4":this.api.signatureVersion,n.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return n.EventListeners.Query;case"json":return n.EventListeners.Json;case"rest-json":return n.EventListeners.RestJson;case"rest-xml":return n.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e){return n.util.calculateRetryDelay(e,this.config.retryDelayOptions)},retryableError:function(e){return!!this.timeoutError(e)||!!this.networkingError(e)||!!this.expiredCredentialsError(e)||!!this.throttledError(e)||e.statusCode>=500},networkingError:function(e){return"NetworkingError"===e.code},timeoutError:function(e){return"TimeoutError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(e){e&&(this.config.systemClockOffset=e-Date.now())},isClockSkewed:function(e){if(e)return Math.abs(this.getSkewCorrectedDate().getTime()-e)>=3e4},throttledError:function(e){switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"TooManyRequestsException":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return(t=(t=t.replace(/\{service\}/g,this.api.endpointPrefix)).replace(/\{region\}/g,this.config.region)).replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new n.Endpoint(e,this.config)},paginationConfig:function(e,t){var r=this.api.operations[e].paginator;if(!r){if(t){var o=new Error;throw n.util.error(o,"No pagination configuration for "+e)}return null}return r}}),n.util.update(n.Service,{defineMethods:function(e){n.util.each(e.prototype.api.operations,function(t){e.prototype[t]||("none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,r){return this.makeUnauthenticatedRequest(t,e,r)}:e.prototype[t]=function(e,r){return this.makeRequest(t,e,r)})})},defineService:function(e,t,r){n.Service._serviceMap[e]=!0,Array.isArray(t)||(r=t,t=[]);var o=s(n.Service,r||{});if("string"==typeof e){n.Service.addVersions(o,t);var i=o.serviceIdentifier||e;o.serviceIdentifier=i}else o.prototype.api=e,n.Service.defineMethods(o);if(n.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&n.util.clientSideMonitoring){var a=n.util.clientSideMonitoring.Publisher,u=n.util.clientSideMonitoring.configProvider;this.prototype.publisher=new a(u())}return n.SequentialExecutor.call(o.prototype),n.Service.addDefaultMonitoringListeners(o.prototype),o},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var r=0;r<t.length;r++)void 0===e.services[t[r]]&&(e.services[t[r]]=null);e.apiVersions=Object.keys(e.services).sort()},defineServiceApi:function(e,t,r){function i(e){e.isApi?a.prototype.api=e:a.prototype.api=new o(e)}var a=s(e,{serviceIdentifier:e.serviceIdentifier});if("string"==typeof t){if(r)i(r);else try{i(n.apiLoader(e.serviceIdentifier,t))}catch(r){throw n.util.error(r,{message:"Could not find API configuration "+e.serviceIdentifier+"-"+t})}Object.prototype.hasOwnProperty.call(e.services,t)||(e.apiVersions=e.apiVersions.concat(t).sort()),e.services[t]=a}else i(t);return n.Service.defineMethods(a),a},hasService:function(e){return Object.prototype.hasOwnProperty.call(n.Service._serviceMap,e)},addDefaultMonitoringListeners:function(e){e.addNamedListener("MONITOR_EVENTS_BUBBLE","apiCallAttempt",function(t){var r=Object.getPrototypeOf(e);r._events&&r.emit("apiCallAttempt",[t])}),e.addNamedListener("CALL_EVENTS_BUBBLE","apiCall",function(t){var r=Object.getPrototypeOf(e);r._events&&r.emit("apiCall",[t])})},_serviceMap:{}}),n.util.mixin(n.Service,n.SequentialExecutor),t.exports=n.Service}).call(this,e("_process"))},{"./core":38,"./model/api":63,"./region_config":79,_process:9}],79:[function(e,t,r){function n(e,t){o.each(t,function(t,r){"globalEndpoint"!==t&&(void 0!==e.config[t]&&null!==e.config[t]||(e.config[t]=r))})}var o=e("./util"),i=e("./region_config_data.json");t.exports=function(e){for(var t=function(e){var t=e.config.region,r=function(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}(t),n=e.api.endpointPrefix;return[[t,n],[r,n],[t,"*"],[r,"*"],["*",n],["*","*"]].map(function(e){return e[0]&&e[1]?e.join("/"):null})}(e),r=0;r<t.length;r++){var a=t[r];if(a&&Object.prototype.hasOwnProperty.call(i.rules,a)){var s=i.rules[a];return"string"==typeof s&&(s=i.patterns[s]),e.config.useDualstack&&o.isDualstackAvailable(e)&&((s=o.copy(s)).endpoint="{service}.dualstack.{region}.amazonaws.com"),e.isGlobalEndpoint=!!s.globalEndpoint,s.signatureVersion||(s.signatureVersion="v4"),void n(e,s)}}}},{"./region_config_data.json":80,"./util":113}],80:[function(e,t,r){t.exports={rules:{"*/*":{endpoint:"{service}.{region}.amazonaws.com"},"cn-*/*":{endpoint:"{service}.{region}.amazonaws.com.cn"},"*/budgets":"globalSSL","*/cloudfront":"globalSSL","*/iam":"globalSSL","*/sts":"globalSSL","*/importexport":{endpoint:"{service}.amazonaws.com",signatureVersion:"v2",globalEndpoint:!0},"*/route53":{endpoint:"https://{service}.amazonaws.com",signatureVersion:"v3https",globalEndpoint:!0},"*/waf":"globalSSL","us-gov-*/iam":"globalGovCloud","us-gov-*/sts":{endpoint:"{service}.{region}.amazonaws.com"},"us-gov-west-1/s3":"s3signature","us-west-1/s3":"s3signature","us-west-2/s3":"s3signature","eu-west-1/s3":"s3signature","ap-southeast-1/s3":"s3signature","ap-southeast-2/s3":"s3signature","ap-northeast-1/s3":"s3signature","sa-east-1/s3":"s3signature","us-east-1/s3":{endpoint:"{service}.amazonaws.com",signatureVersion:"s3"},"us-east-1/sdb":{endpoint:"{service}.amazonaws.com",signatureVersion:"v2"},"*/sdb":{endpoint:"{service}.{region}.amazonaws.com",signatureVersion:"v2"}},patterns:{globalSSL:{endpoint:"https://{service}.amazonaws.com",globalEndpoint:!0},globalGovCloud:{endpoint:"{service}.us-gov.amazonaws.com"},s3signature:{endpoint:"{service}.{region}.amazonaws.com",signatureVersion:"s3"}}}},{}],83:[function(e,t,r){var n=e("./core"),o=n.util.inherit,i=e("jmespath");n.Response=o({constructor:function(e){this.request=e,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new n.HttpResponse,e&&(this.maxRetries=e.service.numRetries(),this.maxRedirects=e.service.config.maxRedirects)},nextPage:function(e){var t,r=this.request.service,o=this.request.operation;try{t=r.paginationConfig(o,!0)}catch(e){this.error=e}if(!this.hasNextPage()){if(e)e(this.error,null);else if(this.error)throw this.error;return null}var i=n.util.copy(this.request.params);if(this.nextPageTokens){var a=t.inputToken;"string"==typeof a&&(a=[a]);for(var s=0;s<a.length;s++)i[a[s]]=this.nextPageTokens[s];return r.makeRequest(this.request.operation,i,e)}return e?e(null,null):null},hasNextPage:function(){return this.cacheNextPageTokens(),!!this.nextPageTokens||void 0===this.nextPageTokens&&void 0},cacheNextPageTokens:function(){if(Object.prototype.hasOwnProperty.call(this,"nextPageTokens"))return this.nextPageTokens;this.nextPageTokens=void 0;var e=this.request.service.paginationConfig(this.request.operation);if(!e)return this.nextPageTokens;if(this.nextPageTokens=null,e.moreResults&&!i.search(this.data,e.moreResults))return this.nextPageTokens;var t=e.outputToken;return"string"==typeof t&&(t=[t]),n.util.arrayEach.call(this,t,function(e){var t=i.search(this.data,e);t&&(this.nextPageTokens=this.nextPageTokens||[],this.nextPageTokens.push(t))}),this.nextPageTokens}})},{"./core":38,jmespath:8}],82:[function(e,t,r){function n(e){var t=e.request._waiter,r=!1,n="retry";t.config.acceptors.forEach(function(o){if(!r){var i=t.matchers[o.matcher];i&&i(e,o.expected,o.argument)&&(r=!0,n=o.state)}}),!r&&e.error&&(n="failure"),"success"===n?t.setSuccess(e):t.setError(e,"retry"===n)}var o=e("./core"),i=o.util.inherit,a=e("jmespath");o.ResourceWaiter=i({constructor:function(e,t){this.service=e,this.state=t,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,r){try{var n=a.search(e.data,r)}catch(e){return!1}return a.strictDeepEqual(n,t)},pathAll:function(e,t,r){try{var n=a.search(e.data,r)}catch(e){return!1}Array.isArray(n)||(n=[n]);var o=n.length;if(!o)return!1;for(var i=0;i<o;i++)if(!a.strictDeepEqual(n[i],t))return!1;return!0},pathAny:function(e,t,r){try{var n=a.search(e.data,r)}catch(e){return!1}Array.isArray(n)||(n=[n]);for(var o=n.length,i=0;i<o;i++)if(a.strictDeepEqual(n[i],t))return!0;return!1},status:function(e,t){var r=e.httpResponse.statusCode;return"number"==typeof r&&r===t},error:function(e,t){return"string"==typeof t&&e.error?t===e.error.code:t===!!e.error}},listeners:(new o.SequentialExecutor).addNamedListeners(function(e){e("RETRY_CHECK","retry",function(e){var t=e.request._waiter;e.error&&"ResourceNotReady"===e.error.code&&(e.error.retryDelay=1e3*(t.config.delay||0))}),e("CHECK_OUTPUT","extractData",n),e("CHECK_ERROR","extractError",n)}),wait:function(e,t){"function"==typeof e&&(t=e,e=void 0),e&&e.$waiter&&("number"==typeof(e=o.util.copy(e)).$waiter.delay&&(this.config.delay=e.$waiter.delay),"number"==typeof e.$waiter.maxAttempts&&(this.config.maxAttempts=e.$waiter.maxAttempts),delete e.$waiter);var r=this.service.makeRequest(this.config.operation,e);return r._waiter=this,r.response.maxRetries=this.config.maxAttempts,r.addListeners(this.listeners),t&&r.send(t),r},setSuccess:function(e){e.error=null,e.data=e.data||{},e.request.removeAllListeners("extractData")},setError:function(e,t){e.data=null,e.error=o.util.error(e.error||new Error,{code:"ResourceNotReady",message:"Resource is not in the state "+this.state,retryable:t})},loadWaiterConfig:function(e){if(!this.service.api.waiters[e])throw new o.util.error(new Error,{code:"StateNotFoundError",message:"State "+e+" not found."});this.config=o.util.copy(this.service.api.waiters[e])}})},{"./core":38,jmespath:8}],81:[function(e,t,r){(function(t){var r=e("./core"),n=e("./state_machine"),o=r.util.inherit,i=r.util.domain,a=e("jmespath"),s={success:1,error:1,complete:1},u=new n;u.setupStates=function(){var e=function(e,t){var r=this;r._haltHandlersOnError=!1,r.emit(r._asm.currentState,function(e){if(e)if(function(e){return Object.prototype.hasOwnProperty.call(s,e._asm.currentState)}(r)){if(!(i&&r.domain instanceof i.Domain))throw e;e.domainEmitter=r,e.domain=r.domain,e.domainThrown=!1,r.domain.emit("error",e)}else r.response.error=e,t(e);else t(r.response.error)})};this.addState("validate","build","error",e),this.addState("build","afterBuild","restart",e),this.addState("afterBuild","sign","restart",e),this.addState("sign","send","retry",e),this.addState("retry","afterRetry","afterRetry",e),this.addState("afterRetry","sign","error",e),this.addState("send","validateResponse","retry",e),this.addState("validateResponse","extractData","extractError",e),this.addState("extractError","extractData","retry",e),this.addState("extractData","success","retry",e),this.addState("restart","build","error",e),this.addState("success","complete","complete",e),this.addState("error","complete","complete",e),this.addState("complete",null,null,e)},u.setupStates(),r.Request=o({constructor:function(e,t,o){var a=e.endpoint,s=e.config.region,c=e.config.customUserAgent;e.isGlobalEndpoint&&(s="us-east-1"),this.domain=i&&i.active,this.service=e,this.operation=t,this.params=o||{},this.httpRequest=new r.HttpRequest(a,s),this.httpRequest.appendToUserAgent(c),this.startTime=e.getSkewCorrectedDate(),this.response=new r.Response(this),this._asm=new n(u.states,"validate"),this._haltHandlersOnError=!1,r.SequentialExecutor.call(this),this.emit=this.emitEvent},send:function(e){return e&&(this.httpRequest.appendToUserAgent("callback"),this.on("complete",function(t){e.call(t,t.error,t.data)})),this.runTo(),this.response},build:function(e){return this.runTo("send",e)},runTo:function(e,t){return this._asm.runTo(e,t,this),this},abort:function(){return this.removeAllListeners("validateResponse"),this.removeAllListeners("extractError"),this.on("validateResponse",function(e){e.error=r.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1})}),this.httpRequest.stream&&!this.httpRequest.stream.didCallback&&(this.httpRequest.stream.abort(),this.httpRequest._abortCallback?this.httpRequest._abortCallback():this.removeAllListeners("send")),this},eachPage:function(e){e=r.util.fn.makeAsync(e,3),this.on("complete",function t(n){e.call(n,n.error,n.data,function(o){!1!==o&&(n.hasNextPage()?n.nextPage().on("complete",t).send():e.call(n,null,null,r.util.fn.noop))})}).send()},eachItem:function(e){var t=this;this.eachPage(function(n,o){if(n)return e(n,null);if(null===o)return e(null,null);var i=t.service.paginationConfig(t.operation).resultKey;Array.isArray(i)&&(i=i[0]);var s=a.search(o,i),u=!0;return r.util.arrayEach(s,function(t){if(!1===(u=e(null,t)))return r.util.abort}),u})},isPageable:function(){return!!this.service.paginationConfig(this.operation)},createReadStream:function(){var e=r.util.stream,n=this,o=null;return 2===r.HttpClient.streamsApiVersion?(o=new e.PassThrough,t.nextTick(function(){n.send()})):((o=new e.Stream).readable=!0,o.sent=!1,o.on("newListener",function(e){o.sent||"data"!==e||(o.sent=!0,t.nextTick(function(){n.send()}))})),this.on("error",function(e){o.emit("error",e)}),this.on("httpHeaders",function(t,i,a){if(t<300){n.removeListener("httpData",r.EventListeners.Core.HTTP_DATA),n.removeListener("httpError",r.EventListeners.Core.HTTP_ERROR),n.on("httpError",function(e){a.error=e,a.error.retryable=!1});var s,u=!1;if("HEAD"!==n.httpRequest.method&&(s=parseInt(i["content-length"],10)),void 0!==s&&!isNaN(s)&&s>=0){u=!0;var c=0}var l=function(){u&&c!==s?o.emit("error",r.util.error(new Error("Stream content length mismatch. Received "+c+" of "+s+" bytes."),{code:"StreamContentLengthMismatch"})):2===r.HttpClient.streamsApiVersion?o.end():o.emit("end")},p=a.httpResponse.createUnbufferedStream();if(2===r.HttpClient.streamsApiVersion)if(u){var h=new e.PassThrough;h._write=function(t){return t&&t.length&&(c+=t.length),e.PassThrough.prototype._write.apply(this,arguments)},h.on("end",l),o.on("error",function(e){u=!1,p.unpipe(h),h.emit("end"),h.end()}),p.pipe(h).pipe(o,{end:!1})}else p.pipe(o);else u&&p.on("data",function(e){e&&e.length&&(c+=e.length)}),p.on("data",function(e){o.emit("data",e)}),p.on("end",l);p.on("error",function(e){u=!1,o.emit("error",e)})}}),o},emitEvent:function(e,t,n){"function"==typeof t&&(n=t,t=null),n||(n=function(){}),t||(t=this.eventParameters(e,this.response)),r.SequentialExecutor.prototype.emit.call(this,e,t,function(e){e&&(this.response.error=e),n.call(this,e)})},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,t){return t||"function"!=typeof e||(t=e,e=null),(new r.Signers.Presign).sign(this.toGet(),e,t)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",r.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",r.EventListeners.Core.SIGN),this},toGet:function(){return"query"!==this.service.api.protocol&&"ec2"!==this.service.api.protocol||(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),r.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return this.httpRequest.appendToUserAgent("promise"),new e(function(e,r){t.on("complete",function(t){t.error?r(t.error):e(Object.defineProperty(t.data||{},"$response",{value:t}))}),t.runTo()})}},r.Request.deletePromisesFromClass=function(){delete this.prototype.promise},r.util.addPromises(r.Request),r.util.mixin(r.Request,r.SequentialExecutor)}).call(this,e("_process"))},{"./core":38,"./state_machine":112,_process:9,jmespath:8}],112:[function(e,t,r){function n(e,t){this.currentState=t||null,this.states=e||{}}n.prototype.runTo=function(e,t,r,n){"function"==typeof e&&(n=r,r=t,t=e,e=null);var o=this,i=o.states[o.currentState];i.fn.call(r||o,n,function(n){if(n){if(!i.fail)return t?t.call(r,n):null;o.currentState=i.fail}else{if(!i.accept)return t?t.call(r):null;o.currentState=i.accept}if(o.currentState===e)return t?t.call(r,n):null;o.runTo(e,t,r,n)})},n.prototype.addState=function(e,t,r,n){return"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:r,fn:n},this},t.exports=n},{}],69:[function(e,t,r){var n=e("./core");n.ParamValidator=n.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(e,t,r){if(this.errors=[],this.validateMember(e,t||{},r||"params"),this.errors.length>1){var o=this.errors.join("\n* ");throw o="There were "+this.errors.length+" validation errors:\n* "+o,n.util.error(new Error(o),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(e,t){this.errors.push(n.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,r){this.validateType(t,r,["object"],"structure");for(var n,o=0;e.required&&o<e.required.length;o++){var i=t[n=e.required[o]];void 0!==i&&null!==i||this.fail("MissingRequiredParameter","Missing required key '"+n+"' in "+r)}for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var a=t[n],s=e.members[n];if(void 0!==s){var u=[r,n].join(".");this.validateMember(s,a,u)}else this.fail("UnexpectedParameter","Unexpected key '"+n+"' found in "+r)}return!0},validateMember:function(e,t,r){switch(e.type){case"structure":return this.validateStructure(e,t,r);case"list":return this.validateList(e,t,r);case"map":return this.validateMap(e,t,r);default:return this.validateScalar(e,t,r)}},validateList:function(e,t,r){if(this.validateType(t,r,[Array])){this.validateRange(e,t.length,r,"list member count");for(var n=0;n<t.length;n++)this.validateMember(e.member,t[n],r+"["+n+"]")}},validateMap:function(e,t,r){if(this.validateType(t,r,["object"],"map")){var n=0;for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(this.validateMember(e.key,o,r+"[key='"+o+"']"),this.validateMember(e.value,t[o],r+"['"+o+"']"),n++);this.validateRange(e,n,r,"map member count")}},validateScalar:function(e,t,r){switch(e.type){case null:case void 0:case"string":return this.validateString(e,t,r);case"base64":case"binary":return this.validatePayload(t,r);case"integer":case"float":return this.validateNumber(e,t,r);case"boolean":return this.validateType(t,r,["boolean"]);case"timestamp":return this.validateType(t,r,[Date,/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/,"number"],"Date object, ISO-8601 string, or a UNIX timestamp");default:return this.fail("UnkownType","Unhandled type "+e.type+" for "+r)}},validateString:function(e,t,r){var n=["string"];e.isJsonValue&&(n=n.concat(["number","object","boolean"])),null!==t&&this.validateType(t,r,n)&&(this.validateEnum(e,t,r),this.validateRange(e,t.length,r,"string length"),this.validatePattern(e,t,r),this.validateUri(e,t,r))},validateUri:function(e,t,r){"uri"===e.location&&0===t.length&&this.fail("UriParameterError",'Expected uri parameter to have length >= 1, but found "'+t+'" for '+r)},validatePattern:function(e,t,r){this.validation.pattern&&void 0!==e.pattern&&(new RegExp(e.pattern).test(t)||this.fail("PatternMatchError",'Provided value "'+t+'" does not match regex pattern /'+e.pattern+"/ for "+r))},validateRange:function(e,t,r,n){this.validation.min&&void 0!==e.min&&t<e.min&&this.fail("MinRangeError","Expected "+n+" >= "+e.min+", but found "+t+" for "+r),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+n+" <= "+e.max+", but found "+t+" for "+r)},validateEnum:function(e,t,r){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+r)},validateType:function(e,t,r,o){if(null===e||void 0===e)return!1;for(var i=!1,s=0;s<r.length;s++){if("string"==typeof r[s]){if(a(e)===r[s])return!0}else if(r[s]instanceof RegExp){if((e||"").toString().match(r[s]))return!0}else{if(e instanceof r[s])return!0;if(n.util.isType(e,r[s]))return!0;o||i||(r=r.slice()),r[s]=n.util.typeName(r[s])}i=!0}var u=o;u||(u=r.join(", ").replace(/,([^,]+)$/,", or$1"));var c=u.match(/^[aeiou]/i)?"n":"";return this.fail("InvalidParameterType","Expected "+t+" to be a"+c+" "+u),!1},validateNumber:function(e,t,r){if(null!==t&&void 0!==t){if("string"==typeof t){var n=parseFloat(t);n.toString()===t&&(t=n)}this.validateType(t,r,["number"])&&this.validateRange(e,t,r,"numeric value")}},validatePayload:function(e,t){if(null!==e&&void 0!==e&&"string"!=typeof e&&(!e||"number"!=typeof e.byteLength)){if(n.util.isNode()){var r=n.util.stream.Stream;if(n.util.Buffer.isBuffer(e)||e instanceof r)return}else if(void 0!==("undefined"==typeof Blob?"undefined":a(Blob))&&e instanceof Blob)return;var o=["Buffer","Stream","File","Blob","ArrayBuffer","DataView"];if(e)for(var i=0;i<o.length;i++){if(n.util.isType(e,o[i]))return;if(n.util.typeName(e.constructor)===o[i])return}this.fail("InvalidParameterType","Expected "+t+" to be a string, Buffer, Stream, Blob, or typed array object")}}})},{"./core":38}],63:[function(e,t,r){var n=e("./collection"),o=e("./operation"),i=e("./shape"),a=e("./paginator"),s=e("./resource_waiter"),u=e("../util"),c=u.property,l=u.memoizedProperty;t.exports=function(e,t){e=e||{},(t=t||{}).api=this,e.metadata=e.metadata||{},c(this,"isApi",!0,!1),c(this,"apiVersion",e.metadata.apiVersion),c(this,"endpointPrefix",e.metadata.endpointPrefix),c(this,"signingName",e.metadata.signingName),c(this,"globalEndpoint",e.metadata.globalEndpoint),c(this,"signatureVersion",e.metadata.signatureVersion),c(this,"jsonVersion",e.metadata.jsonVersion),c(this,"targetPrefix",e.metadata.targetPrefix),c(this,"protocol",e.metadata.protocol),c(this,"timestampFormat",e.metadata.timestampFormat),c(this,"xmlNamespaceUri",e.metadata.xmlNamespace),c(this,"abbreviation",e.metadata.serviceAbbreviation),c(this,"fullName",e.metadata.serviceFullName),c(this,"serviceId",e.metadata.serviceId),l(this,"className",function(){var t=e.metadata.serviceAbbreviation||e.metadata.serviceFullName;return t?("ElasticLoadBalancing"===(t=t.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g,""))&&(t="ELB"),t):null}),c(this,"operations",new n(e.operations,t,function(e,r){return new o(e,r,t)},u.string.lowerFirst)),c(this,"shapes",new n(e.shapes,t,function(e,r){return i.create(r,t)})),c(this,"paginators",new n(e.paginators,t,function(e,r){return new a(e,r,t)})),c(this,"waiters",new n(e.waiters,t,function(e,r){return new s(e,r,t)},u.string.lowerFirst)),t.documentation&&(c(this,"documentation",e.documentation),c(this,"documentationUrl",e.documentationUrl))}},{"../util":113,"./collection":64,"./operation":65,"./paginator":66,"./resource_waiter":67,"./shape":68}],67:[function(e,t,r){var n=e("../util"),o=n.property;t.exports=function(e,t,r){r=r||{},o(this,"name",e),o(this,"api",r.api,!1),t.operation&&o(this,"operation",n.string.lowerFirst(t.operation));var i=this;["type","description","delay","maxAttempts","acceptors"].forEach(function(e){var r=t[e];r&&o(i,e,r)})}},{"../util":113}],66:[function(e,t,r){var n=e("../util").property;t.exports=function(e,t){n(this,"inputToken",t.input_token),n(this,"limitKey",t.limit_key),n(this,"moreResults",t.more_results),n(this,"outputToken",t.output_token),n(this,"resultKey",t.result_key)}},{"../util":113}],65:[function(e,t,r){var n=e("./shape"),o=e("../util"),i=o.property,a=o.memoizedProperty;t.exports=function(e,t,r){var o=this;r=r||{},i(this,"name",t.name||e),i(this,"api",r.api,!1),t.http=t.http||{},i(this,"httpMethod",t.http.method||"POST"),i(this,"httpPath",t.http.requestUri||"/"),i(this,"authtype",t.authtype||""),a(this,"input",function(){return t.input?n.create(t.input,r):new n.create({type:"structure"},r)}),a(this,"output",function(){return t.output?n.create(t.output,r):new n.create({type:"structure"},r)}),a(this,"errors",function(){var e=[];if(!t.errors)return null;for(var o=0;o<t.errors.length;o++)e.push(n.create(t.errors[o],r));return e}),a(this,"paginator",function(){return r.api.paginators[e]}),r.documentation&&(i(this,"documentation",t.documentation),i(this,"documentationUrl",t.documentationUrl)),a(this,"idempotentMembers",function(){var e=[],t=o.input,r=t.members;if(!t.members)return e;for(var n in r)r.hasOwnProperty(n)&&!0===r[n].isIdempotent&&e.push(n);return e}),a(this,"hasEventOutput",function(){return function(e){var t=e.members,r=e.payload;if(!e.members)return!1;if(r)return t[r].isEventStream;for(var n in t)if(!t.hasOwnProperty(n)&&!0===t[n].isEventStream)return!0;return!1}(o.output)})}},{"../util":113,"./shape":68}],59:[function(e,t,r){var n=e("./core"),o=n.util.inherit;n.Endpoint=o({constructor:function(e,t){if(n.util.hideProperties(this,["slashes","auth","hash","search","query"]),void 0===e||null===e)throw new Error("Invalid endpoint: "+e);if("string"!=typeof e)return n.util.copy(e);e.match(/^http/)||(e=((t&&void 0!==t.sslEnabled?t.sslEnabled:n.config.sslEnabled)?"https":"http")+"://"+e),n.util.update(this,n.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),n.HttpRequest=o({constructor:function(e,t){e=new n.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=t,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=n.util.userAgent()},getUserAgentHeaderName:function(){return(n.util.isBrowser()?"X-Amz-":"")+"User-Agent"},appendToUserAgent:function(e){"string"==typeof e&&e&&(this._userAgent+=" "+e),this.headers[this.getUserAgentHeaderName()]=this._userAgent},getUserAgent:function(){return this._userAgent},pathname:function(){return this.path.split("?",1)[0]},search:function(){var e=this.path.split("?",2)[1];return e?(e=n.util.queryStringParse(e),n.util.queryParamsToString(e)):""}}),n.HttpResponse=o({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}}),n.HttpClient=o({}),n.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}},{"./core":38}],58:[function(e,t,r){var n=e("./core"),o=e("./sequential_executor");n.EventListeners={Core:{}},n.EventListeners={Core:(new o).addNamedListeners(function(e,t){t("VALIDATE_CREDENTIALS","validate",function(e,t){if(!e.service.api.signatureVersion)return t();e.service.config.getCredentials(function(r){r&&(e.response.error=n.util.error(r,{code:"CredentialsError",message:"Missing credentials in config"})),t()})}),e("VALIDATE_REGION","validate",function(e){e.service.config.region||e.service.isGlobalEndpoint||(e.response.error=n.util.error(new Error,{code:"ConfigError",message:"Missing region in config"}))}),e("BUILD_IDEMPOTENCY_TOKENS","validate",function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation];if(t){var r=t.idempotentMembers;if(r.length){for(var o=n.util.copy(e.params),i=0,a=r.length;i<a;i++)o[r[i]]||(o[r[i]]=n.util.uuid.v4());e.params=o}}}}),e("VALIDATE_PARAMETERS","validate",function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation].input,r=e.service.config.paramValidation;new n.ParamValidator(r).validate(t,e.params)}}),t("COMPUTE_SHA256","afterBuild",function(e,t){if(e.haltHandlersOnError(),e.service.api.operations){var r=e.service.api.operations[e.operation],o=r?r.authtype:"";if(!e.service.api.signatureVersion&&!o)return t();if(e.service.getSignerClass(e)===n.Signers.V4){var i=e.httpRequest.body||"";if(o.indexOf("unsigned-body")>=0)return e.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",t();n.util.computeSha256(i,function(r,n){r?t(r):(e.httpRequest.headers["X-Amz-Content-Sha256"]=n,t())})}else t()}}),e("SET_CONTENT_LENGTH","afterBuild",function(e){var t=function(e){if(!e.service.api.operations)return"";var t=e.service.api.operations[e.operation];return t?t.authtype:""}(e);if(void 0===e.httpRequest.headers["Content-Length"])try{var r=n.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=r}catch(e){if(-1===t.indexOf("unsigned-body"))throw e;return}}),e("SET_HTTP_HOST","afterBuild",function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host}),e("RESTART","restart",function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new n.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount<this.service.config.maxRetries?this.response.retryCount++:this.response.error=null)}),t("SIGN","sign",function(e,t){var r=e.service,n=(e.service.api.operations||{})[e.operation],o=n?n.authtype:"";if(!r.api.signatureVersion&&!o)return t();r.config.getCredentials(function(o,i){if(o)return e.response.error=o,t();try{var a=r.getSkewCorrectedDate(),s=new(r.getSignerClass(e))(e.httpRequest,r.api.signingName||r.api.endpointPrefix,{signatureCache:r.config.signatureCache,operation:n});s.setServiceClientId(r._clientId),delete e.httpRequest.headers.Authorization,delete e.httpRequest.headers.Date,delete e.httpRequest.headers["X-Amz-Date"],s.addAuthorization(i,a),e.signedAt=a}catch(t){e.response.error=t}t()})}),e("VALIDATE_RESPONSE","validateResponse",function(e){this.service.successfulResponse(e,this)?(e.data={},e.error=null):(e.data=null,e.error=n.util.error(new Error,{code:"UnknownError",message:"An unknown error occurred."}))}),t("SEND","send",function(e,t){function r(r){e.httpResponse.stream=r;var o=e.request.httpRequest.stream,i=e.request.service,a=i.api,s=e.request.operation,u=a.operations[s]||{};r.on("headers",function(o,a,s){if(e.request.emit("httpHeaders",[o,a,e,s]),!e.httpResponse.streaming)if(2===n.HttpClient.streamsApiVersion){if(u.hasEventOutput&&i.successfulResponse(e))return e.request.emit("httpDone"),void t();r.on("readable",function(){var t=r.read();null!==t&&e.request.emit("httpData",[t,e])})}else r.on("data",function(t){e.request.emit("httpData",[t,e])})}),r.on("end",function(){if(!o||!o.didCallback){if(2===n.HttpClient.streamsApiVersion&&u.hasEventOutput&&i.successfulResponse(e))return;e.request.emit("httpDone"),t()}})}function o(r){if("RequestAbortedError"!==r.code){var o="TimeoutError"===r.code?r.code:"NetworkingError";r=n.util.error(r,{code:o,region:e.request.httpRequest.region,hostname:e.request.httpRequest.endpoint.hostname,retryable:!0})}e.error=r,e.request.emit("httpError",[e.error,e],function(){t()})}function i(){var t=n.HttpClient.getInstance(),i=e.request.service.config.httpOptions||{};try{!function(t){t.on("sendProgress",function(t){e.request.emit("httpUploadProgress",[t,e])}),t.on("receiveProgress",function(t){e.request.emit("httpDownloadProgress",[t,e])})}(t.handleRequest(e.request.httpRequest,i,r,o))}catch(e){o(e)}}e.httpResponse._abortCallback=t,e.error=null,e.data=null,(e.request.service.getSkewCorrectedDate()-this.signedAt)/1e3>=600?this.emit("sign",[this],function(e){e?t(e):i()}):i()}),e("HTTP_HEADERS","httpHeaders",function(e,t,r,o){r.httpResponse.statusCode=e,r.httpResponse.statusMessage=o,r.httpResponse.headers=t,r.httpResponse.body=new n.util.Buffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var i=t.date||t.Date,a=r.request.service;if(i){var s=Date.parse(i);a.config.correctClockSkew&&a.isClockSkewed(s)&&a.applyClockOffset(s)}}),e("HTTP_DATA","httpData",function(e,t){if(e){if(n.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],o={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[o,t])}t.httpResponse.buffers.push(new n.util.Buffer(e))}}),e("HTTP_DONE","httpDone",function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=n.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers}),e("FINALIZE_ERROR","retry",function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))}),e("INVALIDATE_CREDENTIALS","retry",function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}}),e("EXPIRED_SIGNATURE","retry",function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)}),e("CLOCK_SKEWED","retry",function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&(e.error.retryable=!0)}),e("REDIRECT","retry",function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new n.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)}),e("RETRY_CHECK","retry",function(e){e.error&&(e.error.redirect&&e.redirectCount<e.maxRedirects?e.error.retryDelay=0:e.retryCount<e.maxRetries&&(e.error.retryDelay=this.service.retryDelays(e.retryCount)||0))}),t("RESET_RETRY_STATE","afterRetry",function(e,t){var r,n=!1;e.error&&(r=e.error.retryDelay||0,e.error.retryable&&e.retryCount<e.maxRetries?(e.retryCount++,n=!0):e.error.redirect&&e.redirectCount<e.maxRedirects&&(e.redirectCount++,n=!0)),n?(e.error=null,setTimeout(t,r)):t()})}),CorePost:(new o).addNamedListeners(function(e){e("EXTRACT_REQUEST_ID","extractData",n.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",n.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",function(e){if("NetworkingError"===e.code&&"ENOTFOUND"===e.errno){var t="Inaccessible host: `"+e.hostname+"'. This service may not be available in the `"+e.region+"' region.";this.response.error=n.util.error(new Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}})}),Logger:(new o).addNamedListeners(function(t){t("LOG_REQUEST","complete",function(t){var r=t.request,o=r.service.config.logger;if(o){var i=function(){var i=(t.request.service.getSkewCorrectedDate().getTime()-r.startTime.getTime())/1e3,a=!!o.isTTY,s=t.httpResponse.statusCode,u=r.params;r.service.api.operations&&r.service.api.operations[r.operation]&&r.service.api.operations[r.operation].input&&(u=function e(t,r){if(!r)return r;switch(t.type){case"structure":var o={};return n.util.each(r,function(r,n){Object.prototype.hasOwnProperty.call(t.members,r)?o[r]=e(t.members[r],n):o[r]=n}),o;case"list":var i=[];return n.util.arrayEach(r,function(r,n){i.push(e(t.member,r))}),i;case"map":var a={};return n.util.each(r,function(r,n){a[r]=e(t.value,n)}),a;default:return t.isSensitive?"***SensitiveInformation***":r}}(r.service.api.operations[r.operation].input,r.params));var c=e("util").inspect(u,!0,null),l="";return a&&(l+="[33m"),l+="[AWS "+r.service.serviceIdentifier+" "+s,l+=" "+i.toString()+"s "+t.retryCount+" retries]",a&&(l+="[0;1m"),l+=" "+n.util.string.lowerFirst(r.operation),l+="("+c+")",a&&(l+="[0m"),l}();"function"==typeof o.log?o.log(i):"function"==typeof o.write&&o.write(i+"\n")}})}),Json:(new o).addNamedListeners(function(t){var r=e("./protocol/json");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),Rest:(new o).addNamedListeners(function(t){var r=e("./protocol/rest");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),RestJson:(new o).addNamedListeners(function(t){var r=e("./protocol/rest_json");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),RestXml:(new o).addNamedListeners(function(t){var r=e("./protocol/rest_xml");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),Query:(new o).addNamedListeners(function(t){var r=e("./protocol/query");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)})}},{"./core":38,"./protocol/json":71,"./protocol/query":72,"./protocol/rest":73,"./protocol/rest_json":74,"./protocol/rest_xml":75,"./sequential_executor":85,util:20}],85:[function(e,t,r){var n=e("./core");n.SequentialExecutor=n.util.inherit({constructor:function(){this._events={}},listeners:function(e){return this._events[e]?this._events[e].slice(0):[]},on:function(e,t,r){return this._events[e]?r?this._events[e].unshift(t):this._events[e].push(t):this._events[e]=[t],this},onAsync:function(e,t,r){return t._isAsync=!0,this.on(e,t,r)},removeListener:function(e,t){var r=this._events[e];if(r){for(var n=r.length,o=-1,i=0;i<n;++i)r[i]===t&&(o=i);o>-1&&r.splice(o,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,r){r||(r=function(){});var n=this.listeners(e),o=n.length;return this.callListeners(n,t,r),o>0},callListeners:function(e,t,r,o){function i(o){if(o&&(s=n.util.error(s||new Error,o),a._haltHandlersOnError))return r.call(a,s);a.callListeners(e,t,r,s)}for(var a=this,s=o||null;e.length>0;){var u=e.shift();if(u._isAsync)return void u.apply(a,t.concat([i]));try{u.apply(a,t)}catch(e){s=n.util.error(s||new Error,e)}if(s&&a._haltHandlersOnError)return void r.call(a,s)}r.call(a,s)},addListeners:function(e){var t=this;return e._events&&(e=e._events),n.util.each(e,function(e,r){"function"==typeof r&&(r=[r]),n.util.arrayEach(r,function(r){t.on(e,r)})}),t},addNamedListener:function(e,t,r,n){return this[e]=r,this.addListener(t,r,n),this},addNamedAsyncListener:function(e,t,r){return r._isAsync=!0,this.addNamedListener(e,t,r)},addNamedListeners:function(e){var t=this;return e(function(){t.addNamedListener.apply(t,arguments)},function(){t.addNamedAsyncListener.apply(t,arguments)}),this}}),n.SequentialExecutor.prototype.addListener=n.SequentialExecutor.prototype.on,t.exports=n.SequentialExecutor},{"./core":38}],75:[function(e,t,r){var n=e("../core"),o=e("../util"),i=e("./rest");t.exports={buildRequest:function(e){i.buildRequest(e),["GET","HEAD"].indexOf(e.httpRequest.method)<0&&function(e){var t=e.service.api.operations[e.operation].input,r=new n.XML.Builder,i=e.params,a=t.payload;if(a){var s=t.members[a];if(void 0===(i=i[a]))return;if("structure"===s.type){var u=s.name;e.httpRequest.body=r.toXML(i,s,u,!0)}else e.httpRequest.body=i}else e.httpRequest.body=r.toXML(i,t,t.name||t.shape||o.string.upperFirst(e.operation)+"Request")}(e)},extractError:function(e){var t;i.extractError(e);try{t=(new n.XML.Parser).parse(e.httpResponse.body.toString())}catch(r){t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=o.error(new Error,{code:t.Code,message:t.Message}):e.error=o.error(new Error,{code:e.httpResponse.statusCode,message:null})},extractData:function(e){i.extractData(e);var t,r=e.request,a=e.httpResponse.body,s=r.service.api.operations[r.operation],u=s.output,c=(s.hasEventOutput,u.payload);if(c){var l=u.members[c];l.isEventStream?(t=new n.XML.Parser,e.data[c]=o.createEventStream(2===n.HttpClient.streamsApiVersion?e.httpResponse.stream:e.httpResponse.body,t,l)):"structure"===l.type?(t=new n.XML.Parser,e.data[c]=t.parse(a.toString(),l)):"binary"===l.type||l.isStreaming?e.data[c]=a:e.data[c]=l.toType(a)}else if(a.length>0){var p=(t=new n.XML.Parser).parse(a.toString(),u);o.update(e.data,p)}}}},{"../core":38,"../util":113,"./rest":73}],74:[function(e,t,r){function n(e,t){if(e.service.api.operations[e.operation].input,!e.httpRequest.headers["Content-Type"]){var r=t?"binary/octet-stream":"application/json";e.httpRequest.headers["Content-Type"]=r}}var o=e("../util"),i=e("./rest"),a=e("./json"),s=e("../json/builder"),u=e("../json/parser");t.exports={buildRequest:function(e){i.buildRequest(e),["GET","HEAD","DELETE"].indexOf(e.httpRequest.method)<0&&function(e){var t=new s,r=e.service.api.operations[e.operation].input;if(r.payload){var o,i=r.members[r.payload];if(void 0===(o=e.params[r.payload]))return;"structure"===i.type?(e.httpRequest.body=t.build(o,i),n(e)):(e.httpRequest.body=o,("binary"===i.type||i.isStreaming)&&n(e,!0))}else e.httpRequest.body=t.build(e.params,r),n(e)}(e)},extractError:function(e){a.extractError(e)},extractData:function(e){i.extractData(e);var t=e.request,r=t.service.api.operations[t.operation],n=t.service.api.operations[t.operation].output||{};if(r.hasEventOutput,n.payload){var s=n.members[n.payload],c=e.httpResponse.body;if(s.isEventStream)l=new u,e.data[payload]=o.createEventStream(2===AWS.HttpClient.streamsApiVersion?e.httpResponse.stream:c,l,s);else if("structure"===s.type||"list"===s.type){var l=new u;e.data[n.payload]=l.parse(c,s)}else"binary"===s.type||s.isStreaming?e.data[n.payload]=c:e.data[n.payload]=s.toType(c)}else{var p=e.data;a.extractData(e),e.data=o.merge(p,e.data)}}}},{"../json/builder":61,"../json/parser":62,"../util":113,"./json":71,"./rest":73}],73:[function(e,t,r){function n(e,t,r,n){var i=[e,t].join("/");i=i.replace(/\/+/g,"/");var a={},s=!1;if(o.each(r.members,function(e,t){var r=n[e];if(null!==r&&void 0!==r)if("uri"===t.location){var u=new RegExp("\\{"+t.name+"(\\+)?\\}");i=i.replace(u,function(e,t){return(t?o.uriEscapePath:o.uriEscape)(String(r))})}else"querystring"===t.location&&(s=!0,"list"===t.type?a[t.name]=r.map(function(e){return o.uriEscape(t.member.toWireFormat(e).toString())}):"map"===t.type?o.each(r,function(e,t){Array.isArray(t)?a[e]=t.map(function(e){return o.uriEscape(String(e))}):a[e]=o.uriEscape(String(t))}):a[t.name]=o.uriEscape(t.toWireFormat(r).toString()))}),s){i+=i.indexOf("?")>=0?"&":"?";var u=[];o.arrayEach(Object.keys(a).sort(),function(e){Array.isArray(a[e])||(a[e]=[a[e]]);for(var t=0;t<a[e].length;t++)u.push(o.uriEscape(String(e))+"="+a[e][t])}),i+=u.join("&")}return i}var o=e("../util");t.exports={buildRequest:function(e){(function(e){e.httpRequest.method=e.service.api.operations[e.operation].httpMethod})(e),function(e){var t=e.service.api.operations[e.operation],r=t.input,o=n(e.httpRequest.endpoint.path,t.httpPath,r,e.params);e.httpRequest.path=o}(e),function(e){var t=e.service.api.operations[e.operation];o.each(t.input.members,function(t,r){var n=e.params[t];null!==n&&void 0!==n&&("headers"===r.location&&"map"===r.type?o.each(n,function(t,n){e.httpRequest.headers[r.name+t]=n}):"header"===r.location&&(n=r.toWireFormat(n).toString(),r.isJsonValue&&(n=o.base64.encode(n)),e.httpRequest.headers[r.name]=n))})}(e)},extractError:function(){},extractData:function(e){var t=e.request,r={},n=e.httpResponse,i=t.service.api.operations[t.operation].output,a={};o.each(n.headers,function(e,t){a[e.toLowerCase()]=t}),o.each(i.members,function(e,t){var i=(t.name||e).toLowerCase();if("headers"===t.location&&"map"===t.type){r[e]={};var s=t.isLocationName?t.name:"",u=new RegExp("^"+s+"(.+)","i");o.each(n.headers,function(t,n){var o=t.match(u);null!==o&&(r[e][o[1]]=n)})}else if("header"===t.location){if(void 0!==a[i]){var c=t.isJsonValue?o.base64.decode(a[i]):a[i];r[e]=t.toType(c)}}else"statusCode"===t.location&&(r[e]=parseInt(n.statusCode,10))}),e.data=r},generateURI:n}},{"../util":113}],72:[function(e,t,r){var n=e("../core"),o=e("../util"),i=e("../query/query_param_serializer"),a=e("../model/shape");t.exports={buildRequest:function(e){var t=e.service.api.operations[e.operation],r=e.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:e.service.api.apiVersion,Action:t.name},(new i).serialize(e.params,t.input,function(e,t){r.params[e]=t}),r.body=o.queryParamsToString(r.params)},extractError:function(e){var t,r=e.httpResponse.body.toString();if(r.match("<UnknownOperationException"))t={Code:"UnknownOperation",Message:"Unknown operation "+e.request.operation};else try{t=(new n.XML.Parser).parse(r)}catch(r){t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.requestId&&!e.requestId&&(e.requestId=t.requestId),t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=o.error(new Error,{code:t.Code,message:t.Message}):e.error=o.error(new Error,{code:e.httpResponse.statusCode,message:null})},extractData:function(e){var t=e.request,r=t.service.api.operations[t.operation].output||{},i=r;if(i.resultWrapper){var s=a.create({type:"structure"});s.members[i.resultWrapper]=r,s.memberNames=[i.resultWrapper],o.property(r,"name",r.resultWrapper),r=s}var u=new n.XML.Parser;if(r&&r.members&&!r.members._XAMZRequestId){var c=a.create({type:"string"},{api:{protocol:"query"}},"requestId");r.members._XAMZRequestId=c}var l=u.parse(e.httpResponse.body.toString(),r);e.requestId=l._XAMZRequestId||l.requestId,l._XAMZRequestId&&delete l._XAMZRequestId,i.resultWrapper&&l[i.resultWrapper]&&(o.update(l,l[i.resultWrapper]),delete l[i.resultWrapper]),e.data=l}}},{"../core":38,"../model/shape":68,"../query/query_param_serializer":76,"../util":113}],76:[function(e,t,r){function n(){}function o(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function i(e,t,r,n){s.each(r.members,function(r,i){var s=t[r];if(null!==s&&void 0!==s){var u=o(i);a(u=e?e+"."+u:u,s,i,n)}})}function a(e,t,r,n){null!==t&&void 0!==t&&("structure"===r.type?i(e,t,r,n):"list"===r.type?function(e,t,r,n){var i=r.member||{};0!==t.length?s.arrayEach(t,function(t,s){var u="."+(s+1);if("ec2"===r.api.protocol)u+="";else if(r.flattened){if(i.name){var c=e.split(".");c.pop(),c.push(o(i)),e=c.join(".")}}else u="."+(i.name?i.name:"member")+u;a(e+u,t,i,n)}):n.call(this,e,null)}(e,t,r,n):"map"===r.type?function(e,t,r,n){var o=1;s.each(t,function(t,i){var s=(r.flattened?".":".entry.")+o+++".",u=s+(r.key.name||"key"),c=s+(r.value.name||"value");a(e+u,t,r.key,n),a(e+c,i,r.value,n)})}(e,t,r,n):n(e,r.toWireFormat(t).toString()))}var s=e("../util");n.prototype.serialize=function(e,t,r){i("",e,t,r)},t.exports=n},{"../util":113}],68:[function(e,t,r){function n(e,t,r){null!==r&&void 0!==r&&y.property.apply(this,arguments)}function o(e,t){e.constructor.prototype[t]||y.memoizedProperty.apply(this,arguments)}function i(e,t,r){t=t||{},n(this,"shape",e.shape),n(this,"api",t.api,!1),n(this,"type",e.type),n(this,"enum",e.enum),n(this,"min",e.min),n(this,"max",e.max),n(this,"pattern",e.pattern),n(this,"location",e.location||this.location||"body"),n(this,"name",this.name||e.xmlName||e.queryName||e.locationName||r),n(this,"isStreaming",e.streaming||this.isStreaming||!1),n(this,"isComposite",e.isComposite||!1),n(this,"isShape",!0,!1),n(this,"isQueryName",Boolean(e.queryName),!1),n(this,"isLocationName",Boolean(e.locationName),!1),n(this,"isIdempotent",!0===e.idempotencyToken),n(this,"isJsonValue",!0===e.jsonvalue),n(this,"isSensitive",!0===e.sensitive||e.prototype&&!0===e.prototype.sensitive),n(this,"isEventStream",Boolean(e.eventstream),!1),n(this,"isEvent",Boolean(e.event),!1),n(this,"isEventPayload",Boolean(e.eventpayload),!1),n(this,"isEventHeader",Boolean(e.eventheader),!1),n(this,"isTimestampFormatSet",Boolean(e.timestampFormat)||e.prototype&&!0===e.prototype.isTimestampFormatSet,!1),t.documentation&&(n(this,"documentation",e.documentation),n(this,"documentationUrl",e.documentationUrl)),e.xmlAttribute&&n(this,"isXmlAttribute",e.xmlAttribute||!1),n(this,"defaultValue",null),this.toWireFormat=function(e){return null===e||void 0===e?"":e},this.toType=function(e){return e}}function s(e){i.apply(this,arguments),n(this,"isComposite",!0),e.flattened&&n(this,"flattened",e.flattened||!1)}function u(e,t){var r=this,u=null,c=!this.isShape;s.apply(this,arguments),c&&(n(this,"defaultValue",function(){return{}}),n(this,"members",{}),n(this,"memberNames",[]),n(this,"required",[]),n(this,"isRequired",function(){return!1})),e.members&&(n(this,"members",new m(e.members,t,function(e,r){return i.create(r,t,e)})),o(this,"memberNames",function(){return e.xmlOrder||Object.keys(e.members)}),e.event&&(o(this,"eventPayloadMemberName",function(){for(var e=r.members,t=r.memberNames,n=0,o=t.length;n<o;n++)if(e[t[n]].isEventPayload)return t[n]}),o(this,"eventHeaderMemberNames",function(){for(var e=r.members,t=r.memberNames,n=[],o=0,i=t.length;o<i;o++)e[t[o]].isEventHeader&&n.push(t[o]);return n}))),e.required&&(n(this,"required",e.required),n(this,"isRequired",function(t){if(!u){u={};for(var r=0;r<e.required.length;r++)u[e.required[r]]=!0}return u[t]},!1,!0)),n(this,"resultWrapper",e.resultWrapper||null),e.payload&&n(this,"payload",e.payload),"string"==typeof e.xmlNamespace?n(this,"xmlNamespaceUri",e.xmlNamespace):"object"==a(e.xmlNamespace)&&(n(this,"xmlNamespacePrefix",e.xmlNamespace.prefix),n(this,"xmlNamespaceUri",e.xmlNamespace.uri))}function c(e,t){var r=this,a=!this.isShape;if(s.apply(this,arguments),a&&n(this,"defaultValue",function(){return[]}),e.member&&o(this,"member",function(){return i.create(e.member,t)}),this.flattened){var u=this.name;o(this,"name",function(){return r.member.name||u})}}function l(e,t){var r=!this.isShape;s.apply(this,arguments),r&&(n(this,"defaultValue",function(){return{}}),n(this,"key",i.create({type:"string"},t)),n(this,"value",i.create({type:"string"},t))),e.key&&o(this,"key",function(){return i.create(e.key,t)}),e.value&&o(this,"value",function(){return i.create(e.value,t)})}function p(){i.apply(this,arguments);var e=["rest-xml","query","ec2"];this.toType=function(t){return t=this.api&&e.indexOf(this.api.protocol)>-1?t||"":t,this.isJsonValue?JSON.parse(t):t&&"function"==typeof t.toString?t.toString():t},this.toWireFormat=function(e){return this.isJsonValue?JSON.stringify(e):e}}function h(){i.apply(this,arguments),this.toType=y.base64.decode,this.toWireFormat=y.base64.encode}function f(){h.apply(this,arguments)}function d(){i.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null===e||void 0===e?null:"true"===e}}var m=e("./collection"),y=e("../util");i.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},i.types={structure:u,list:c,map:l,boolean:d,timestamp:function(e){var t=this;if(i.apply(this,arguments),e.timestampFormat)n(this,"timestampFormat",e.timestampFormat);else if(t.isTimestampFormatSet&&this.timestampFormat)n(this,"timestampFormat",this.timestampFormat);else if("header"===this.location)n(this,"timestampFormat","rfc822");else if("querystring"===this.location)n(this,"timestampFormat","iso8601");else if(this.api)switch(this.api.protocol){case"json":case"rest-json":n(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":n(this,"timestampFormat","iso8601")}this.toType=function(e){return null===e||void 0===e?null:"function"==typeof e.toUTCString?e:"string"==typeof e||"number"==typeof e?y.date.parseTimestamp(e):null},this.toWireFormat=function(e){return y.date.format(e,t.timestampFormat)}},float:function(){i.apply(this,arguments),this.toType=function(e){return null===e||void 0===e?null:parseFloat(e)},this.toWireFormat=this.toType},integer:function(){i.apply(this,arguments),this.toType=function(e){return null===e||void 0===e?null:parseInt(e,10)},this.toWireFormat=this.toType},string:p,base64:f,binary:h},i.resolve=function(e,t){if(e.shape){var r=t.api.shapes[e.shape];if(!r)throw new Error("Cannot find shape reference: "+e.shape);return r}return null},i.create=function(e,t,r){if(e.isShape)return e;var n=i.resolve(e,t);if(n){var o=Object.keys(e);t.documentation||(o=o.filter(function(e){return!e.match(/documentation/)}));var a=function(){n.constructor.call(this,e,t,r)};return a.prototype=n,new a}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var s=e.type;if(i.normalizedTypes[e.type]&&(e.type=i.normalizedTypes[e.type]),i.types[e.type])return new i.types[e.type](e,t,r);throw new Error("Unrecognized shape type: "+s)},i.shapes={StructureShape:u,ListShape:c,MapShape:l,StringShape:p,BooleanShape:d,Base64Shape:f},t.exports=i},{"../util":113,"./collection":64}],64:[function(e,t,r){function n(e,t,r,n){o(this,n(e),function(){return r(e,t)})}var o=e("../util").memoizedProperty;t.exports=function(e,t,r,o){for(var i in o=o||String,e)Object.prototype.hasOwnProperty.call(e,i)&&n.call(this,i,e[i],r,o)}},{"../util":113}],71:[function(e,t,r){var n=e("../util"),o=e("../json/builder"),i=e("../json/parser");t.exports={buildRequest:function(e){var t=e.httpRequest,r=e.service.api,n=r.targetPrefix+"."+r.operations[e.operation].name,i=r.jsonVersion||"1.0",a=r.operations[e.operation].input,s=new o;1===i&&(i="1.0"),t.body=s.build(e.params||{},a),t.headers["Content-Type"]="application/x-amz-json-"+i,t.headers["X-Amz-Target"]=n},extractError:function(e){var t={},r=e.httpResponse;if(t.code=r.headers["x-amzn-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),r.body.length>0)try{var o=JSON.parse(r.body.toString());(o.__type||o.code)&&(t.code=(o.__type||o.code).split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=o.message||o.Message||null}catch(o){t.statusCode=r.statusCode,t.message=r.statusMessage}else t.statusCode=r.statusCode,t.message=r.statusCode.toString();e.error=n.error(new Error,t)},extractData:function(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var r=e.request.service.api.operations[e.request.operation].output||{},n=new i;e.data=n.parse(t,r)}}}},{"../json/builder":61,"../json/parser":62,"../util":113}],62:[function(e,t,r){function n(){}function o(e,t){if(t&&void 0!==e)switch(t.type){case"structure":return function(e,t){if(null!=e){var r={},n=t.members;return i.each(n,function(t,n){var i=n.isLocationName?n.name:t;if(Object.prototype.hasOwnProperty.call(e,i)){var a=e[i],s=o(a,n);void 0!==s&&(r[t]=s)}}),r}}(e,t);case"map":return function(e,t){if(null!=e){var r={};return i.each(e,function(e,n){var i=o(n,t.value);r[e]=void 0===i?null:i}),r}}(e,t);case"list":return function(e,t){if(null!=e){var r=[];return i.arrayEach(e,function(e){var n=o(e,t.member);void 0===n?r.push(null):r.push(n)}),r}}(e,t);default:return function(e,t){return t.toType(e)}(e,t)}}var i=e("../util");n.prototype.parse=function(e,t){return o(JSON.parse(e),t)},t.exports=n},{"../util":113}],61:[function(e,t,r){function n(){}function o(e,t){if(t&&void 0!==e&&null!==e)switch(t.type){case"structure":return function(e,t){var r={};return i.each(e,function(e,n){var i=t.members[e];if(i){if("body"!==i.location)return;var a=i.isLocationName?i.name:e,s=o(n,i);void 0!==s&&(r[a]=s)}}),r}(e,t);case"map":return function(e,t){var r={};return i.each(e,function(e,n){var i=o(n,t.value);void 0!==i&&(r[e]=i)}),r}(e,t);case"list":return function(e,t){var r=[];return i.arrayEach(e,function(e){var n=o(e,t.member);void 0!==n&&r.push(n)}),r}(e,t);default:return function(e,t){return t.toWireFormat(e)}(e,t)}}var i=e("../util");n.prototype.build=function(e,t){return JSON.stringify(o(e,t))},t.exports=n},{"../util":113}],113:[function(e,t,r){(function(r,n){var o,i={environment:"nodejs",engine:function(){if(i.isBrowser()&&"undefined"!=typeof navigator)return navigator.userAgent;var e=r.platform+"/"+r.version;return r.env.AWS_EXECUTION_ENV&&(e+=" exec-env/"+r.env.AWS_EXECUTION_ENV),e},userAgent:function(){var t=i.environment,r="aws-sdk-"+t+"/"+e("./core").VERSION;return"nodejs"===t&&(r+=" "+i.engine()),r},isBrowser:function(){return r&&r.browser},isNode:function(){return!i.isBrowser()},uriEscape:function(e){var t=encodeURIComponent(e);return(t=t.replace(/[^A-Za-z0-9_.~\-%]+/g,escape)).replace(/[*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},uriEscapePath:function(e){var t=[];return i.arrayEach(e.split("/"),function(e){t.push(i.uriEscape(e))}),t.join("/")},urlParse:function(e){return i.url.parse(e)},urlFormat:function(e){return i.url.format(e)},queryStringParse:function(e){return i.querystring.parse(e)},queryParamsToString:function(e){var t=[],r=i.uriEscape,n=Object.keys(e).sort();return i.arrayEach(n,function(n){var o=e[n],a=r(n),s=a+"=";if(Array.isArray(o)){var u=[];i.arrayEach(o,function(e){u.push(r(e))}),s=a+"="+u.sort().join("&"+a+"=")}else void 0!==o&&null!==o&&(s=a+"="+r(o));t.push(s)}),t.join("&")},readFileSync:function(t){return i.isBrowser()?null:e("fs").readFileSync(t,"utf-8")},base64:{encode:function(e){if("number"==typeof e)throw i.error(new Error("Cannot base64 encode number "+e));return null===e||void 0===e?e:("function"==typeof i.Buffer.from&&i.Buffer.from!==Uint8Array.from?i.Buffer.from(e):new i.Buffer(e)).toString("base64")},decode:function(e){if("number"==typeof e)throw i.error(new Error("Cannot base64 decode number "+e));return null===e||void 0===e?e:"function"==typeof i.Buffer.from&&i.Buffer.from!==Uint8Array.from?i.Buffer.from(e,"base64"):new i.Buffer(e,"base64")}},buffer:{toStream:function(e){i.Buffer.isBuffer(e)||(e=new i.Buffer(e));var t=new i.stream.Readable,r=0;return t._read=function(n){if(r>=e.length)return t.push(null);var o=r+n;o>e.length&&(o=e.length),t.push(e.slice(r,o)),r=o},t},concat:function(e){var t,r,n=0,o=0;for(t=0;t<e.length;t++)n+=e[t].length;for(r=new i.Buffer(n),t=0;t<e.length;t++)e[t].copy(r,o),o+=e[t].length;return r}},string:{byteLength:function(t){if(null===t||void 0===t)return 0;if("string"==typeof t&&(t=new i.Buffer(t)),"number"==typeof t.byteLength)return t.byteLength;if("number"==typeof t.length)return t.length;if("number"==typeof t.size)return t.size;if("string"==typeof t.path)return e("fs").lstatSync(t.path).size;throw i.error(new Error("Cannot determine length of "+t),{object:t})},upperFirst:function(e){return e[0].toUpperCase()+e.substr(1)},lowerFirst:function(e){return e[0].toLowerCase()+e.substr(1)}},ini:{parse:function(e){var t,r={};return i.arrayEach(e.split(/\r?\n/),function(e){var n=(e=e.split(/(^|\s)[;#]/)[0]).match(/^\s*\[([^\[\]]+)\]\s*$/);if(n)t=n[1];else if(t){var o=e.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);o&&(r[t]=r[t]||{},r[t][o[1]]=o[2])}}),r}},fn:{noop:function(){},makeAsync:function(e,t){return t&&t<=e.length?e:function(){var t=Array.prototype.slice.call(arguments,0);t.pop()(e.apply(null,t))}}},date:{getDate:function(){return o||(o=e("./core")),o.config.systemClockOffset?new Date((new Date).getTime()+o.config.systemClockOffset):new Date},iso8601:function(e){return void 0===e&&(e=i.date.getDate()),e.toISOString().replace(/\.\d{3}Z$/,"Z")},rfc822:function(e){return void 0===e&&(e=i.date.getDate()),e.toUTCString()},unixTimestamp:function(e){return void 0===e&&(e=i.date.getDate()),e.getTime()/1e3},from:function(e){return"number"==typeof e?new Date(1e3*e):new Date(e)},format:function(e,t){return t||(t="iso8601"),i.date[t](i.date.from(e))},parseTimestamp:function(e){if("number"==typeof e)return new Date(1e3*e);if(e.match(/^\d+$/))return new Date(1e3*e);if(e.match(/^\d{4}/))return new Date(e);if(e.match(/^\w{3},/))return new Date(e);throw i.error(new Error("unhandled timestamp format: "+e),{code:"TimestampParserError"})}},crypto:{crc32Table:[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],crc32:function(e){var t=i.crypto.crc32Table,r=-1;"string"==typeof e&&(e=new i.Buffer(e));for(var n=0;n<e.length;n++)r=r>>>8^t[255&(r^e.readUInt8(n))];return(-1^r)>>>0},hmac:function(e,t,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"==typeof t&&(t=new i.Buffer(t)),i.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return i.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return i.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var o=i.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=new i.Buffer(t));var s=i.arraySliceFn(t),u=i.Buffer.isBuffer(t);if(i.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(u=!0),n&&"object"==a(t)&&"function"==typeof t.on&&!u)t.on("data",function(e){o.update(e)}),t.on("error",function(e){n(e)}),t.on("end",function(){n(null,o.digest(r))});else{if(!n||!s||u||"undefined"==typeof FileReader){i.isBrowser()&&"object"==a(t)&&!u&&(t=new i.Buffer(new Uint8Array(t)));var c=o.update(t).digest(r);return n&&n(null,c),c}var l=0,p=new FileReader;p.onerror=function(){n(new Error("Failed to read data."))},p.onload=function(){var e=new i.Buffer(new Uint8Array(p.result));o.update(e),l+=e.length,p._continueReading()},p._continueReading=function(){if(l>=t.size)n(null,o.digest(r));else{var e=l+524288;e>t.size&&(e=t.size),p.readAsArrayBuffer(s.call(t,l,e))}},p._continueReading()}},toHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push(("0"+e.charCodeAt(r).toString(16)).substr(-2,2));return t.join("")},createHash:function(e){return i.crypto.lib.createHash(e)}},abort:{},each:function(e,t){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))if(t.call(this,r,e[r])===i.abort)break}},arrayEach:function(e,t){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))if(t.call(this,e[r],parseInt(r,10))===i.abort)break}},update:function(e,t){return i.each(t,function(t,r){e[t]=r}),e},merge:function(e,t){return i.update(i.copy(e),t)},copy:function(e){if(null===e||void 0===e)return e;var t={};for(var r in e)t[r]=e[r];return t},isEmpty:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},arraySliceFn:function(e){var t=e.slice||e.webkitSlice||e.mozSlice;return"function"==typeof t?t:null},isType:function(e,t){return"function"==typeof t&&(t=i.typeName(t)),Object.prototype.toString.call(e)==="[object "+t+"]"},typeName:function(e){if(Object.prototype.hasOwnProperty.call(e,"name"))return e.name;var t=e.toString(),r=t.match(/^\s*function (.+)\(/);return r?r[1]:t},error:function(e,t){var r=null;return"string"==typeof e.message&&""!==e.message&&("string"==typeof t||t&&t.message)&&((r=i.copy(e)).message=e.message),e.message=e.message||null,"string"==typeof t?e.message=t:"object"==a(t)&&null!==t&&(i.update(e,t),t.message&&(e.message=t.message),(t.code||t.name)&&(e.code=t.code||t.name),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.time=new Date,r&&(e.originalError=r),e},inherit:function(e,t){var r=null;if(void 0===t)t=e,e=Object,r={};else{var n=function(){};n.prototype=e.prototype,r=new n}return t.constructor===Object&&(t.constructor=function(){if(e!==Object)return e.apply(this,arguments)}),t.constructor.prototype=r,i.update(t.constructor.prototype,t),t.constructor.__super__=e,t.constructor},mixin:function(){for(var e=arguments[0],t=1;t<arguments.length;t++)for(var r in arguments[t].prototype){var n=arguments[t].prototype[r];"constructor"!==r&&(e.prototype[r]=n)}return e},hideProperties:function(e,t){"function"==typeof Object.defineProperty&&i.arrayEach(t,function(t){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0})})},property:function(e,t,r,n,o){var i={configurable:!0,enumerable:void 0===n||n};"function"!=typeof r||o?(i.value=r,i.writable=!0):i.get=r,Object.defineProperty(e,t,i)},memoizedProperty:function(e,t,r,n){var o=null;i.property(e,t,function(){return null===o&&(o=r()),o},n)},hoistPayloadMember:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r],o=n.output;if(o.payload&&!n.hasEventOutput){var a=o.members[o.payload],s=e.data[o.payload];"structure"===a.type&&i.each(s,function(t,r){i.property(e.data,t,r,!1)})}},computeSha256:function(t,r){if(i.isNode()){var n=i.stream.Stream,o=e("fs");if(t instanceof n){if("string"!=typeof t.path)return r(new Error("Non-file stream objects are not supported with SigV4"));var a={};"number"==typeof t.start&&(a.start=t.start),"number"==typeof t.end&&(a.end=t.end),t=o.createReadStream(t.path,a)}}i.crypto.sha256(t,"hex",function(e,t){e?r(e):r(null,t)})},isClockSkewed:function(e){if(e)return i.property(o.config,"isClockSkewed",Math.abs((new Date).getTime()-e)>=3e5,!1),o.config.isClockSkewed},applyClockOffset:function(e){e&&(o.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){var r=!1;void 0===t&&o&&o.config&&(t=o.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(r=!0),Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++){var i=e[n];r?i.deletePromisesFromClass&&i.deletePromisesFromClass():i.addPromisesToClass&&i.addPromisesToClass(t)}},promisifyMethod:function(e,t){return function(){var r=this;return new t(function(t,n){r[e](function(e,r){e?n(e):t(r)})})}},isDualstackAvailable:function(t){if(!t)return!1;var r=e("../apis/metadata.json");return"string"!=typeof t&&(t=t.serviceIdentifier),!("string"!=typeof t||!r.hasOwnProperty(t)||!r[t].dualstackAvailable)},calculateRetryDelay:function(e,t){t||(t={});var r=t.customBackoff||null;if("function"==typeof r)return r(e);var n="number"==typeof t.base?t.base:100;return Math.random()*(Math.pow(2,e)*n)},handleRequestWithRetries:function(e,t,r){t||(t={});var n=o.HttpClient.getInstance(),a=t.httpOptions||{},s=0,u=function(e){var n=t.maxRetries||0;if(e&&"TimeoutError"===e.code&&(e.retryable=!0),e&&e.retryable&&s<n){s++;var o=i.calculateRetryDelay(s,t.retryDelayOptions);setTimeout(c,o+(e.retryAfter||0))}else r(e)},c=function(){var t="";n.handleRequest(e,a,function(e){e.on("data",function(e){t+=e.toString()}),e.on("end",function(){var n=e.statusCode;if(n<300)r(null,t);else{var o=1e3*parseInt(e.headers["retry-after"],10)||0,a=i.error(new Error,{retryable:n>=500||429===n});o&&a.retryable&&(a.retryAfter=o),u(a)}})},u)};o.util.defer(c)},uuid:{v4:function(){return e("uuid").v4()}},convertPayloadToString:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){"object"==a(r)&&"function"==typeof r.nextTick?r.nextTick(e):"function"==typeof n?n(e):setTimeout(e,0)},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};t.exports=i}).call(this,e("_process"),e("timers").setImmediate)},{"../apis/metadata.json":26,"./core":38,_process:9,fs:2,timers:17,uuid:21}],37:[function(e,t,r){var n,o=e("./core");e("./credentials"),e("./credentials/credential_provider_chain"),o.Config=o.util.inherit({constructor:function(e){void 0===e&&(e={}),e=this.extractCredentials(e),o.util.each.call(this,this.keys,function(t,r){this.set(t,e[t],r)})},getCredentials:function(e){function t(t){e(t,t?null:n.credentials)}function r(e,t){return new o.util.error(t||new Error,{code:"CredentialsError",message:e,name:"CredentialsError"})}var n=this;n.credentials?"function"==typeof n.credentials.get?n.credentials.get(function(e){e&&(e=r("Could not load credentials from "+n.credentials.constructor.name,e)),t(e)}):function(){var e=null;n.credentials.accessKeyId&&n.credentials.secretAccessKey||(e=r("Missing credentials")),t(e)}():n.credentialProvider?n.credentialProvider.resolve(function(e,o){e&&(e=r("Could not load credentials from any providers",e)),n.credentials=o,t(e)}):t(r("No credentials to load"))},update:function(e,t){t=t||!1,e=this.extractCredentials(e),o.util.each.call(this,e,function(e,r){(t||Object.prototype.hasOwnProperty.call(this.keys,e)||o.Service.hasService(e))&&this.set(e,r)})},loadFromPath:function(e){this.clear();var t=JSON.parse(o.util.readFileSync(e)),r=new o.FileSystemCredentials(e),n=new o.CredentialProviderChain;return n.providers.unshift(r),n.resolve(function(e,r){if(e)throw e;t.credentials=r}),this.constructor(t),this},clear:function(){o.util.each.call(this,this.keys,function(e){delete this[e]}),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,t,r){void 0===t?(void 0===r&&(r=this.keys[e]),this[e]="function"==typeof r?r.call(this):r):"httpOptions"===e&&this[e]?this[e]=o.util.merge(this[e],t):this[e]=t},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{},useAccelerateEndpoint:!1,clientSideMonitoring:!1},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&((e=o.util.copy(e)).credentials=new o.Credentials(e)),e},setPromisesDependency:function(e){n=e,null===e&&"function"==typeof Promise&&(n=Promise);var t=[o.Request,o.Credentials,o.CredentialProviderChain];o.S3&&o.S3.ManagedUpload&&t.push(o.S3.ManagedUpload),o.util.addPromises(t,n)},getPromisesDependency:function(){return n}}),o.config=new o.Config},{"./core":38,"./credentials":39,"./credentials/credential_provider_chain":41}],41:[function(e,t,r){var n=e("../core");n.CredentialProviderChain=n.util.inherit(n.Credentials,{constructor:function(e){this.providers=e||n.CredentialProviderChain.defaultProviders.slice(0)},resolve:function(e){if(0===this.providers.length)return e(new Error("No providers")),this;var t=0,r=this.providers.slice(0);return function n(o,i){if(!o&&i||t===r.length)e(o,i);else{var a=r[t++];(i="function"==typeof a?a.call():a).get?i.get(function(e){n(e,e?null:i)}):n(null,i)}}(),this}}),n.CredentialProviderChain.defaultProviders=[],n.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=n.util.promisifyMethod("resolve",e)},n.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},n.util.addPromises(n.CredentialProviderChain)},{"../core":38}],39:[function(e,t,r){var n=e("./core");n.Credentials=n.util.inherit({constructor:function(){if(n.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,1===arguments.length&&"object"==a(arguments[0])){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=n.util.date.getDate().getTime(),t=new Date(e+1e3*this.expiryWindow);return!!(this.expireTime&&t>this.expireTime)||this.expired||!this.accessKeyId||!this.secretAccessKey},get:function(e){var t=this;this.needsRefresh()?this.refresh(function(r){r||(t.expired=!1),e&&e(r)}):e&&e()},refresh:function(e){this.expired=!1,e()}}),n.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=n.util.promisifyMethod("get",e),this.prototype.refreshPromise=n.util.promisifyMethod("refresh",e)},n.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},n.util.addPromises(n.Credentials)},{"./core":38}],27:[function(e,t,r){function n(e,t){if(!n.services.hasOwnProperty(e))throw new Error("InvalidService: Failed to load api for "+e);return n.services[e][t]}n.services={},t.exports=n},{}],26:[function(e,t,r){t.exports={acm:{name:"ACM",cors:!0},apigateway:{name:"APIGateway",cors:!0},applicationautoscaling:{prefix:"application-autoscaling",name:"ApplicationAutoScaling",cors:!0},appstream:{name:"AppStream"},autoscaling:{name:"AutoScaling",cors:!0},batch:{name:"Batch"},budgets:{name:"Budgets"},clouddirectory:{name:"CloudDirectory",versions:["2016-05-10*"]},cloudformation:{name:"CloudFormation",cors:!0},cloudfront:{name:"CloudFront",versions:["2013-05-12*","2013-11-11*","2014-05-31*","2014-10-21*","2014-11-06*","2015-04-17*","2015-07-27*","2015-09-17*","2016-01-13*","2016-01-28*","2016-08-01*","2016-08-20*","2016-09-07*","2016-09-29*","2016-11-25*","2017-03-25*","2017-10-30*"],cors:!0},cloudhsm:{name:"CloudHSM",cors:!0},cloudsearch:{name:"CloudSearch"},cloudsearchdomain:{name:"CloudSearchDomain"},cloudtrail:{name:"CloudTrail",cors:!0},cloudwatch:{prefix:"monitoring",name:"CloudWatch",cors:!0},cloudwatchevents:{prefix:"events",name:"CloudWatchEvents",versions:["2014-02-03*"],cors:!0},cloudwatchlogs:{prefix:"logs",name:"CloudWatchLogs",cors:!0},codebuild:{name:"CodeBuild",cors:!0},codecommit:{name:"CodeCommit",cors:!0},codedeploy:{name:"CodeDeploy",cors:!0},codepipeline:{name:"CodePipeline",cors:!0},cognitoidentity:{prefix:"cognito-identity",name:"CognitoIdentity",cors:!0},cognitoidentityserviceprovider:{prefix:"cognito-idp",name:"CognitoIdentityServiceProvider",cors:!0},cognitosync:{prefix:"cognito-sync",name:"CognitoSync",cors:!0},configservice:{prefix:"config",name:"ConfigService",cors:!0},cur:{name:"CUR",cors:!0},datapipeline:{name:"DataPipeline"},devicefarm:{name:"DeviceFarm",cors:!0},directconnect:{name:"DirectConnect",cors:!0},directoryservice:{prefix:"ds",name:"DirectoryService"},discovery:{name:"Discovery"},dms:{name:"DMS"},dynamodb:{name:"DynamoDB",cors:!0},dynamodbstreams:{prefix:"streams.dynamodb",name:"DynamoDBStreams",cors:!0},ec2:{name:"EC2",versions:["2013-06-15*","2013-10-15*","2014-02-01*","2014-05-01*","2014-06-15*","2014-09-01*","2014-10-01*","2015-03-01*","2015-04-15*","2015-10-01*","2016-04-01*","2016-09-15*"],cors:!0},ecr:{name:"ECR",cors:!0},ecs:{name:"ECS",cors:!0},efs:{prefix:"elasticfilesystem",name:"EFS",cors:!0},elasticache:{name:"ElastiCache",versions:["2012-11-15*","2014-03-24*","2014-07-15*","2014-09-30*"],cors:!0},elasticbeanstalk:{name:"ElasticBeanstalk",cors:!0},elb:{prefix:"elasticloadbalancing",name:"ELB",cors:!0},elbv2:{prefix:"elasticloadbalancingv2",name:"ELBv2",cors:!0},emr:{prefix:"elasticmapreduce",name:"EMR",cors:!0},es:{name:"ES"},elastictranscoder:{name:"ElasticTranscoder",cors:!0},firehose:{name:"Firehose",cors:!0},gamelift:{name:"GameLift",cors:!0},glacier:{name:"Glacier"},health:{name:"Health"},iam:{name:"IAM"},importexport:{name:"ImportExport"},inspector:{name:"Inspector",versions:["2015-08-18*"],cors:!0},iot:{name:"Iot",cors:!0},iotdata:{prefix:"iot-data",name:"IotData",cors:!0},kinesis:{name:"Kinesis",cors:!0},kinesisanalytics:{name:"KinesisAnalytics"},kms:{name:"KMS",cors:!0},lambda:{name:"Lambda",cors:!0},lexruntime:{prefix:"runtime.lex",name:"LexRuntime",cors:!0},lightsail:{name:"Lightsail"},machinelearning:{name:"MachineLearning",cors:!0},marketplacecommerceanalytics:{name:"MarketplaceCommerceAnalytics",cors:!0},marketplacemetering:{prefix:"meteringmarketplace",name:"MarketplaceMetering"},mturk:{prefix:"mturk-requester",name:"MTurk",cors:!0},mobileanalytics:{name:"MobileAnalytics",cors:!0},opsworks:{name:"OpsWorks",cors:!0},opsworkscm:{name:"OpsWorksCM"},organizations:{name:"Organizations"},pinpoint:{name:"Pinpoint"},polly:{name:"Polly",cors:!0},rds:{name:"RDS",versions:["2014-09-01*"],cors:!0},redshift:{name:"Redshift",cors:!0},rekognition:{name:"Rekognition",cors:!0},resourcegroupstaggingapi:{name:"ResourceGroupsTaggingAPI"},route53:{name:"Route53",cors:!0},route53domains:{name:"Route53Domains",cors:!0},s3:{name:"S3",dualstackAvailable:!0,cors:!0},servicecatalog:{name:"ServiceCatalog",cors:!0},ses:{prefix:"email",name:"SES",cors:!0},shield:{name:"Shield"},simpledb:{prefix:"sdb",name:"SimpleDB"},sms:{name:"SMS"},snowball:{name:"Snowball"},sns:{name:"SNS",cors:!0},sqs:{name:"SQS",cors:!0},ssm:{name:"SSM",cors:!0},storagegateway:{name:"StorageGateway",cors:!0},stepfunctions:{prefix:"states",name:"StepFunctions"},sts:{name:"STS",cors:!0},support:{name:"Support"},swf:{name:"SWF"},xray:{name:"XRay"},waf:{name:"WAF",cors:!0},wafregional:{prefix:"waf-regional",name:"WAFRegional"},workdocs:{name:"WorkDocs",cors:!0},workspaces:{name:"WorkSpaces"},codestar:{name:"CodeStar"},lexmodelbuildingservice:{prefix:"lex-models",name:"LexModelBuildingService",cors:!0},marketplaceentitlementservice:{prefix:"entitlement.marketplace",name:"MarketplaceEntitlementService"},athena:{name:"Athena"},greengrass:{name:"Greengrass"},dax:{name:"DAX"},migrationhub:{prefix:"AWSMigrationHub",name:"MigrationHub"},cloudhsmv2:{name:"CloudHSMV2"},glue:{name:"Glue"},mobile:{name:"Mobile"},pricing:{name:"Pricing",cors:!0},costexplorer:{prefix:"ce",name:"CostExplorer"},mediaconvert:{name:"MediaConvert"},medialive:{name:"MediaLive"},mediapackage:{name:"MediaPackage"},mediastore:{name:"MediaStore"},mediastoredata:{prefix:"mediastore-data",name:"MediaStoreData"},appsync:{name:"AppSync"},guardduty:{name:"GuardDuty"},mq:{name:"MQ"},comprehend:{name:"Comprehend"},iotjobsdataplane:{prefix:"iot-jobs-data",name:"IoTJobsDataPlane"},kinesisvideoarchivedmedia:{prefix:"kinesis-video-archived-media",name:"KinesisVideoArchivedMedia",cors:!0},kinesisvideomedia:{prefix:"kinesis-video-media",name:"KinesisVideoMedia"},kinesisvideo:{name:"KinesisVideo",cors:!0},sagemakerruntime:{prefix:"runtime.sagemaker",name:"SageMakerRuntime"},sagemaker:{name:"SageMaker"},translate:{name:"Translate",cors:!0},resourcegroups:{prefix:"resource-groups",name:"ResourceGroups"},alexaforbusiness:{name:"AlexaForBusiness"},cloud9:{name:"Cloud9"},serverlessapplicationrepository:{prefix:"serverlessrepo",name:"ServerlessApplicationRepository"},servicediscovery:{name:"ServiceDiscovery"},workmail:{name:"WorkMail"},autoscalingplans:{prefix:"autoscaling-plans",name:"AutoScalingPlans"},transcribeservice:{prefix:"transcribe",name:"TranscribeService"},connect:{name:"Connect"},acmpca:{prefix:"acm-pca",name:"ACMPCA"},fms:{name:"FMS"},secretsmanager:{name:"SecretsManager",cors:!0},iotanalytics:{name:"IoTAnalytics"},iot1clickdevicesservice:{prefix:"iot1click-devices",name:"IoT1ClickDevicesService"},iot1clickprojects:{prefix:"iot1click-projects",name:"IoT1ClickProjects"},pi:{name:"PI"},neptune:{name:"Neptune"},mediatailor:{name:"MediaTailor"},eks:{name:"EKS"},macie:{name:"Macie"},dlm:{name:"DLM"},signer:{name:"Signer"},chime:{name:"Chime"}}},{}],21:[function(e,t,r){var n=e("./v1"),o=e("./v4"),i=o;i.v1=n,i.v4=o,t.exports=i},{"./v1":24,"./v4":25}],25:[function(e,t,r){var n=e("./lib/rng"),o=e("./lib/bytesToUuid");t.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}},{"./lib/bytesToUuid":22,"./lib/rng":23}],24:[function(e,t,r){var n=e("./lib/rng"),o=e("./lib/bytesToUuid"),i=n(),a=[1|i[0],i[1],i[2],i[3],i[4],i[5]],s=16383&(i[6]<<8|i[7]),u=0,c=0;t.exports=function(e,t,r){var n=t&&r||0,i=t||[],l=void 0!==(e=e||{}).clockseq?e.clockseq:s,p=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:c+1,f=p-u+(h-c)/1e4;if(f<0&&void 0===e.clockseq&&(l=l+1&16383),(f<0||p>u)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=p,c=h,s=l;var d=(1e4*(268435455&(p+=122192928e5))+h)%4294967296;i[n++]=d>>>24&255,i[n++]=d>>>16&255,i[n++]=d>>>8&255,i[n++]=255&d;var m=p/4294967296*1e4&268435455;i[n++]=m>>>8&255,i[n++]=255&m,i[n++]=m>>>24&15|16,i[n++]=m>>>16&255,i[n++]=l>>>8|128,i[n++]=255&l;for(var y=e.node||a,g=0;g<6;++g)i[n+g]=y[g];return t||o(i)}},{"./lib/bytesToUuid":22,"./lib/rng":23}],23:[function(e,t,r){(function(e){var r,n=e.crypto||e.msCrypto;if(n&&n.getRandomValues){var o=new Uint8Array(16);r=function(){return n.getRandomValues(o),o}}if(!r){var i=new Array(16);r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}t.exports=r}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(e,t,r){for(var n=[],o=0;o<256;++o)n[o]=(o+256).toString(16).substr(1);t.exports=function(e,t){var r=t||0,o=n;return o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]}},{}],20:[function(e,t,r){(function(t,n){function o(e,t){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(t)?n.showHidden=t:t&&r._extend(n,t),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),u(n,e,n.depth)}function i(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function s(e,t){return e}function u(e,t,n){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(n,e);return y(o)||(o=u(e,o,n)),o}var i=c(e,t);if(i)return i;var a=Object.keys(t),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),w(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(t);if(0===a.length){if(_(t)){var f=t.name?": "+t.name:"";return e.stylize("[Function"+f+"]","special")}if(v(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(S(t))return e.stylize(Date.prototype.toString.call(t),"date");if(w(t))return l(t)}var d,m="",g=!1,b=["{","}"];return h(t)&&(g=!0,b=["[","]"]),_(t)&&(m=" [Function"+(t.name?": "+t.name:"")+"]"),v(t)&&(m=" "+RegExp.prototype.toString.call(t)),S(t)&&(m=" "+Date.prototype.toUTCString.call(t)),w(t)&&(m=" "+l(t)),0!==a.length||g&&0!=t.length?n<0?v(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),d=g?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)E(t,String(a))?i.push(p(e,t,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(p(e,t,r,n,o,!0))}),i}(e,t,n,s,a):a.map(function(r){return p(e,t,n,s,r,g)}),e.seen.pop(),function(e,t,r){return e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(d,m,b)):b[0]+m+b[1]}function c(e,t){if(g(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return m(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),E(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=d(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return"   "+e}).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function d(e){return null===e}function m(e){return"number"==typeof e}function y(e){return"string"==typeof e}function g(e){return void 0===e}function v(e){return b(e)&&"[object RegExp]"===k(e)}function b(e){return"object"==a(e)&&null!==e}function S(e){return b(e)&&"[object Date]"===k(e)}function w(e){return b(e)&&("[object Error]"===k(e)||e instanceof Error)}function _(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var x=/%[sdj%]/g;r.format=function(e){if(!y(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,a=String(e).replace(x,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<i;s=n[++r])d(s)||!b(s)?a+=" "+s:a+=" "+o(s);return a},r.deprecate=function(e,o){if(g(n.process))return function(){return r.deprecate(e,o).apply(this,arguments)};if(!0===t.noDeprecation)return e;var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(o);t.traceDeprecation?console.trace(o):console.error(o),i=!0}return e.apply(this,arguments)}};var A,I={};r.debuglog=function(e){if(g(A)&&(A=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!I[e])if(new RegExp("\\b"+e+"\\b","i").test(A)){var n=t.pid;I[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else I[e]=function(){};return I[e]},r.inspect=o,o.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]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=f,r.isNull=d,r.isNullOrUndefined=function(e){return null==e},r.isNumber=m,r.isString=y,r.isSymbol=function(e){return"symbol"==a(e)},r.isUndefined=g,r.isRegExp=v,r.isObject=b,r.isDate=S,r.isError=w,r.isFunction=_,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==a(e)||void 0===e},r.isBuffer=e("./support/isBuffer");var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",function(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),P[e.getMonth()],t].join(" ")}(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!b(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":19,_process:9,inherits:6}],19:[function(e,t,r){t.exports=function(e){return e&&"object"==a(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],17:[function(e,t,r){(function(t,n){function o(e,t){this._id=e,this._clearFn=t}var i=e("process/browser.js").nextTick,a=Function.prototype.apply,s=Array.prototype.slice,u={},c=0;r.setTimeout=function(){return new o(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new o(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r.setImmediate="function"==typeof t?t:function(e){var t=c++,n=!(arguments.length<2)&&s.call(arguments,1);return u[t]=!0,i(function(){u[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof n?n:function(e){delete u[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":9,timers:17}],9:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function a(){m&&f&&(m=!1,f.length?d=f.concat(d):y=-1,d.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=d.length;t;){for(f=d,d=[];++y<t;)f&&f[y].run();y=-1,t=d.length}f=null,m=!1,function(e){if(p===clearTimeout)return clearTimeout(e);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,p,h=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(e){p=o}}();var f,d=[],m=!1,y=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];d.push(new u(e,t)),1!==d.length||m||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],8:[function(e,t,r){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e,o){if(e===o)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(o))return!1;if(!0===t(e)){if(e.length!==o.length)return!1;for(var i=0;i<e.length;i++)if(!1===n(e[i],o[i]))return!1;return!0}if(!0===r(e)){var a={};for(var s in e)if(hasOwnProperty.call(e,s)){if(!1===n(e[s],o[s]))return!1;a[s]=!0}for(var u in o)if(hasOwnProperty.call(o,u)&&!0!==a[u])return!1;return!0}return!1}function o(e){if(""===e||!1===e||null===e)return!0;if(t(e)&&0===e.length)return!0;if(r(e)){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}return!1}function i(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e}function a(e){return e>="0"&&e<="9"||"-"===e}function s(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e}function u(){}function c(){}function l(e){this.runtime=e}function p(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[f]}]},avg:{_func:this._functionAvg,_signature:[{types:[b]}]},ceil:{_func:this._functionCeil,_signature:[{types:[f]}]},contains:{_func:this._functionContains,_signature:[{types:[m,y]},{types:[d]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[m]},{types:[m]}]},floor:{_func:this._functionFloor,_signature:[{types:[f]}]},length:{_func:this._functionLength,_signature:[{types:[m,y,g]}]},map:{_func:this._functionMap,_signature:[{types:[v]},{types:[y]}]},max:{_func:this._functionMax,_signature:[{types:[b,S]}]},merge:{_func:this._functionMerge,_signature:[{types:[g],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[y]},{types:[v]}]},sum:{_func:this._functionSum,_signature:[{types:[b]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[m]},{types:[m]}]},min:{_func:this._functionMin,_signature:[{types:[b,S]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[y]},{types:[v]}]},type:{_func:this._functionType,_signature:[{types:[d]}]},keys:{_func:this._functionKeys,_signature:[{types:[g]}]},values:{_func:this._functionValues,_signature:[{types:[g]}]},sort:{_func:this._functionSort,_signature:[{types:[S,b]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[y]},{types:[v]}]},join:{_func:this._functionJoin,_signature:[{types:[m]},{types:[S]}]},reverse:{_func:this._functionReverse,_signature:[{types:[m,y]}]},to_array:{_func:this._functionToArray,_signature:[{types:[d]}]},to_string:{_func:this._functionToString,_signature:[{types:[d]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[d]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[d],variadic:!0}]}}}var h;h="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var f=0,d=1,m=2,y=3,g=4,v=6,b=8,S=9,w={".":"Dot","*":"Star",",":"Comma",":":"Colon","{":"Lbrace","}":"Rbrace","]":"Rbracket","(":"Lparen",")":"Rparen","@":"Current"},_={"<":!0,">":!0,"=":!0,"!":!0},k={" ":!0,"\t":!0,"\n":!0};u.prototype={tokenize:function(e){var t,r,n,o=[];for(this._current=0;this._current<e.length;)if(i(e[this._current]))t=this._current,r=this._consumeUnquotedIdentifier(e),o.push({type:"UnquotedIdentifier",value:r,start:t});else if(void 0!==w[e[this._current]])o.push({type:w[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(a(e[this._current]))n=this._consumeNumber(e),o.push(n);else if("["===e[this._current])n=this._consumeLBracket(e),o.push(n);else if('"'===e[this._current])t=this._current,r=this._consumeQuotedIdentifier(e),o.push({type:"QuotedIdentifier",value:r,start:t});else if("'"===e[this._current])t=this._current,r=this._consumeRawStringLiteral(e),o.push({type:"Literal",value:r,start:t});else if("`"===e[this._current]){t=this._current;var s=this._consumeLiteral(e);o.push({type:"Literal",value:s,start:t})}else if(void 0!==_[e[this._current]])o.push(this._consumeOperator(e));else if(void 0!==k[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,o.push({type:"And",value:"&&",start:t})):o.push({type:"Expref",value:"&",start:t});else{if("|"!==e[this._current]){var u=new Error("Unknown character:"+e[this._current]);throw u.name="LexerError",u}t=this._current,this._current++,"|"===e[this._current]?(this._current++,o.push({type:"Or",value:"||",start:t})):o.push({type:"Pipe",value:"|",start:t})}return o},_consumeUnquotedIdentifier:function(e){var t=this._current;for(this._current++;this._current<e.length&&s(e[this._current]);)this._current++;return e.slice(t,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var r=e.length;'"'!==e[this._current]&&this._current<r;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&'"'!==e[n+1]?n++:n+=2,this._current=n}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var r=e.length;"'"!==e[this._current]&&this._current<r;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&"'"!==e[n+1]?n++:n+=2,this._current=n}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var r=e.length;a(e[this._current])&&this._current<r;)this._current++;return{type:"Number",value:parseInt(e.slice(t,this._current)),start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:"Filter",value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:"Flatten",value:"[]",start:t}):{type:"Lbracket",value:"[",start:t}},_consumeOperator:function(e){var t=this._current,r=e[t];return this._current++,"!"===r?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===r?"="===e[this._current]?(this._current++,{type:"LTE",value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===r?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===r&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,r=this._current,n=e.length;"`"!==e[this._current]&&this._current<n;){var o=this._current;"\\"!==e[o]||"\\"!==e[o+1]&&"`"!==e[o+1]?o++:o+=2,this._current=o}var i=h(e.slice(r,this._current));return i=i.replace("\\`","`"),t=this._looksLikeJSON(i)?JSON.parse(i):JSON.parse('"'+i+'"'),this._current++,t},_looksLikeJSON:function(e){if(""===e)return!1;if('[{"'.indexOf(e[0])>=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var C={EOF:0,UnquotedIdentifier:0,QuotedIdentifier:0,Rbracket:0,Rparen:0,Comma:0,Rbrace:0,Number:0,Current:0,Expref:0,Pipe:1,Or:2,And:3,EQ:5,GT:5,LT:5,GTE:5,LTE:5,NE:5,Flatten:9,Star:20,Filter:21,Dot:40,Not:45,Lbrace:50,Lbracket:55,Lparen:60};c.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Unexpected token type: "+r.type+", value: "+r.value);throw n.name="ParserError",n}return t},_loadTokens:function(e){var t=(new u).tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var r=this.nud(t),n=this._lookahead(0);e<C[n];)this._advance(),r=this.led(n,r),n=this._lookahead(0);return r},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,r;switch(e.type){case"Literal":return{type:"Literal",value:e.value};case"UnquotedIdentifier":return{type:"Field",name:e.value};case"QuotedIdentifier":var n={type:"Field",name:e.value};if("Lparen"===this._lookahead(0))throw new Error("Quoted identifier not allowed for function names.");return n;case"Not":return{type:"NotExpression",children:[t=this.expression(C.Not)]};case"Star":return t=null,{type:"ValueProjection",children:[{type:"Identity"},t="Rbracket"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(C.Star)]};case"Filter":return this.led(e.type,{type:"Identity"});case"Lbrace":return this._parseMultiselectHash();case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[{type:"Identity"}]},t=this._parseProjectionRHS(C.Flatten)]};case"Lbracket":return"Number"===this._lookahead(0)||"Colon"===this._lookahead(0)?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):"Star"===this._lookahead(0)&&"Rbracket"===this._lookahead(1)?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(C.Star)]}):this._parseMultiselectList();case"Current":return{type:"Current"};case"Expref":return{type:"ExpressionReference",children:[r=this.expression(C.Expref)]};case"Lparen":for(var o=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(r={type:"Current"},this._advance()):r=this.expression(0),o.push(r);return this._match("Rparen"),o[0];default:this._errorToken(e)}},led:function(e,t){var r;switch(e){case"Dot":var n=C.Dot;return"Star"!==this._lookahead(0)?{type:"Subexpression",children:[t,r=this._parseDotRHS(n)]}:(this._advance(),{type:"ValueProjection",children:[t,r=this._parseProjectionRHS(n)]});case"Pipe":return{type:"Pipe",children:[t,r=this.expression(C.Pipe)]};case"Or":return{type:"OrExpression",children:[t,r=this.expression(C.Or)]};case"And":return{type:"AndExpression",children:[t,r=this.expression(C.And)]};case"Lparen":for(var o,i=t.name,a=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(o={type:"Current"},this._advance()):o=this.expression(0),"Comma"===this._lookahead(0)&&this._match("Comma"),a.push(o);return this._match("Rparen"),{type:"Function",name:i,children:a};case"Filter":var s=this.expression(0);return this._match("Rbracket"),{type:"FilterProjection",children:[t,r="Flatten"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(C.Filter),s]};case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[t]},this._parseProjectionRHS(C.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(t,e);case"Lbracket":var u=this._lookaheadToken(0);return"Number"===u.type||"Colon"===u.type?(r=this._parseIndexExpression(),this._projectIfSlice(t,r)):(this._match("Star"),this._match("Rbracket"),{type:"Projection",children:[t,r=this._parseProjectionRHS(C.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),r=new Error("Expected "+e+", got: "+t.type);throw r.name="ParserError",r}this._advance()},_errorToken:function(e){var t=new Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if("Colon"===this._lookahead(0)||"Colon"===this._lookahead(1))return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match("Rbracket"),e},_projectIfSlice:function(e,t){var r={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[r,this._parseProjectionRHS(C.Star)]}:r},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,r=this._lookahead(0);"Rbracket"!==r&&t<3;){if("Colon"===r)t++,this._advance();else{if("Number"!==r){var n=this._lookahead(0),o=new Error("Syntax error, unexpected token: "+n.value+"("+n.type+")");throw o.name="Parsererror",o}e[t]=this._lookaheadToken(0).value,this._advance()}r=this._lookahead(0)}return this._match("Rbracket"),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(C[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return["UnquotedIdentifier","QuotedIdentifier","Star"].indexOf(t)>=0?this.expression(e):"Lbracket"===t?(this._match("Lbracket"),this._parseMultiselectList()):"Lbrace"===t?(this._match("Lbrace"),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(C[this._lookahead(0)]<10)t={type:"Identity"};else if("Lbracket"===this._lookahead(0))t=this.expression(e);else if("Filter"===this._lookahead(0))t=this.expression(e);else{if("Dot"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Sytanx error, unexpected token: "+r.value+"("+r.type+")");throw n.name="ParserError",n}this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];"Rbracket"!==this._lookahead(0);){var t=this.expression(0);if(e.push(t),"Comma"===this._lookahead(0)&&(this._match("Comma"),"Rbracket"===this._lookahead(0)))throw new Error("Unexpected token Rbracket")}return this._match("Rbracket"),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,r,n=[],o=["UnquotedIdentifier","QuotedIdentifier"];;){if(e=this._lookaheadToken(0),o.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match("Colon"),r={type:"KeyValuePair",name:t,value:this.expression(0)},n.push(r),"Comma"===this._lookahead(0))this._match("Comma");else if("Rbrace"===this._lookahead(0)){this._match("Rbrace");break}}return{type:"MultiSelectHash",children:n}}},l.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,i){var a,s,u,c,l,p,h,f,d;switch(e.type){case"Field":return null===i?null:r(i)?void 0===(p=i[e.name])?null:p:null;case"Subexpression":for(u=this.visit(e.children[0],i),d=1;d<e.children.length;d++)if(null===(u=this.visit(e.children[1],u)))return null;return u;case"IndexExpression":return h=this.visit(e.children[0],i),this.visit(e.children[1],h);case"Index":if(!t(i))return null;var m=e.value;return m<0&&(m=i.length+m),void 0===(u=i[m])&&(u=null),u;case"Slice":if(!t(i))return null;var y=e.children.slice(0),g=this.computeSliceParams(i.length,y),v=g[0],b=g[1],S=g[2];if(u=[],S>0)for(d=v;d<b;d+=S)u.push(i[d]);else for(d=v;d>b;d+=S)u.push(i[d]);return u;case"Projection":var w=this.visit(e.children[0],i);if(!t(w))return null;for(f=[],d=0;d<w.length;d++)null!==(s=this.visit(e.children[1],w[d]))&&f.push(s);return f;case"ValueProjection":if(!r(w=this.visit(e.children[0],i)))return null;f=[];var _=function(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;n++)r.push(e[t[n]]);return r}(w);for(d=0;d<_.length;d++)null!==(s=this.visit(e.children[1],_[d]))&&f.push(s);return f;case"FilterProjection":if(!t(w=this.visit(e.children[0],i)))return null;var k=[],C=[];for(d=0;d<w.length;d++)o(a=this.visit(e.children[2],w[d]))||k.push(w[d]);for(var E=0;E<k.length;E++)null!==(s=this.visit(e.children[1],k[E]))&&C.push(s);return C;case"Comparator":switch(c=this.visit(e.children[0],i),l=this.visit(e.children[1],i),e.name){case"EQ":u=n(c,l);break;case"NE":u=!n(c,l);break;case"GT":u=c>l;break;case"GTE":u=c>=l;break;case"LT":u=c<l;break;case"LTE":u=c<=l;break;default:throw new Error("Unknown comparator: "+e.name)}return u;case"Flatten":var x=this.visit(e.children[0],i);if(!t(x))return null;var A=[];for(d=0;d<x.length;d++)t(s=x[d])?A.push.apply(A,s):A.push(s);return A;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(f=[],d=0;d<e.children.length;d++)f.push(this.visit(e.children[d],i));return f;case"MultiSelectHash":if(null===i)return null;var I;for(f={},d=0;d<e.children.length;d++)f[(I=e.children[d]).name]=this.visit(I.value,i);return f;case"OrExpression":return o(a=this.visit(e.children[0],i))&&(a=this.visit(e.children[1],i)),a;case"AndExpression":return!0===o(c=this.visit(e.children[0],i))?c:this.visit(e.children[1],i);case"NotExpression":return o(c=this.visit(e.children[0],i));case"Literal":return e.value;case"Pipe":return h=this.visit(e.children[0],i),this.visit(e.children[1],h);case"Current":return i;case"Function":var P=[];for(d=0;d<e.children.length;d++)P.push(this.visit(e.children[d],i));return this.runtime.callFunction(e.name,P);case"ExpressionReference":var T=e.children[0];return T.jmespathType="Expref",T;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var r=t[0],n=t[1],o=t[2],i=[null,null,null];if(null===o)o=1;else if(0===o){var a=new Error("Invalid slice, step cannot be 0");throw a.name="RuntimeError",a}var s=o<0;return r=null===r?s?e-1:0:this.capSliceRange(e,r,o),n=null===n?s?-1:e:this.capSliceRange(e,n,o),i[0]=r,i[1]=n,i[2]=o,i},capSliceRange:function(e,t,r){return t<0?(t+=e)<0&&(t=r<0?-1:0):t>=e&&(t=r<0?e-1:e),t}},p.prototype={callFunction:function(e,t){var r=this.functionTable[e];if(void 0===r)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,r._signature),r._func.call(this,t)},_validateArgs:function(e,t,r){var n;if(r[r.length-1].variadic){if(t.length<r.length)throw n=1===r.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+r.length+n+" but received "+t.length)}else if(t.length!==r.length)throw n=1===r.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+r.length+n+" but received "+t.length);for(var o,i,a,s=0;s<r.length;s++){a=!1,o=r[s].types,i=this._getTypeName(t[s]);for(var u=0;u<o.length;u++)if(this._typeMatches(i,o[u],t[s])){a=!0;break}if(!a)throw new Error("TypeError: "+e+"() expected argument "+(s+1)+" to be type "+o+" but received type "+i+" instead.")}},_typeMatches:function(e,t,r){if(t===d)return!0;if(t!==S&&t!==b&&t!==y)return e===t;if(t===y)return e===y;if(e===y){var n;t===b?n=f:t===S&&(n=m);for(var o=0;o<r.length;o++)if(!this._typeMatches(this._getTypeName(r[o]),n,r[o]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return m;case"[object Number]":return f;case"[object Array]":return y;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return"Expref"===e.jmespathType?v:g}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],r=e[1];return-1!==t.indexOf(r,t.length-r.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===m){for(var t=e[0],r="",n=t.length-1;n>=0;n--)r+=t[n];return r}var o=e[0].slice(0);return o.reverse(),o},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,r=e[0],n=0;n<r.length;n++)t+=r[n];return t/r.length},_functionContains:function(e){return e[0].indexOf(e[1])>=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return r(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],r=this._interpreter,n=e[0],o=e[1],i=0;i<o.length;i++)t.push(r.visit(n,o[i]));return t},_functionMerge:function(e){for(var t={},r=0;r<e.length;r++){var n=e[r];for(var o in n)t[o]=n[o]}return t},_functionMax:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===f)return Math.max.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)r.localeCompare(t[n])<0&&(r=t[n]);return r}return null},_functionMin:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===f)return Math.min.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)t[n].localeCompare(r)<0&&(r=t[n]);return r}return null},_functionSum:function(e){for(var t=0,r=e[0],n=0;n<r.length;n++)t+=r[n];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case f:return"number";case m:return"string";case y:return"array";case g:return"object";case 5:return"boolean";case v:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],r=Object.keys(t),n=[],o=0;o<r.length;o++)n.push(t[r[o]]);return n},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return this._getTypeName(e[0])===y?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===m?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,r=this._getTypeName(e[0]);return r===f?e[0]:r!==m||(t=+e[0],isNaN(t))?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){var t=e[0].slice(0);return t.sort(),t},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var r=this._interpreter,n=e[1],o=this._getTypeName(r.visit(n,t[0]));if([f,m].indexOf(o)<0)throw new Error("TypeError");for(var i=this,a=[],s=0;s<t.length;s++)a.push([s,t[s]]);a.sort(function(e,t){var a=r.visit(n,e[1]),s=r.visit(n,t[1]);if(i._getTypeName(a)!==o)throw new Error("TypeError: expected "+o+", received "+i._getTypeName(a));if(i._getTypeName(s)!==o)throw new Error("TypeError: expected "+o+", received "+i._getTypeName(s));return a>s?1:a<s?-1:e[0]-t[0]});for(var u=0;u<a.length;u++)t[u]=a[u][1];return t},_functionMaxBy:function(e){for(var t,r,n=e[1],o=e[0],i=this.createKeyFunction(n,[f,m]),a=-1/0,s=0;s<o.length;s++)(r=i(o[s]))>a&&(a=r,t=o[s]);return t},_functionMinBy:function(e){for(var t,r,n=e[1],o=e[0],i=this.createKeyFunction(n,[f,m]),a=1/0,s=0;s<o.length;s++)(r=i(o[s]))<a&&(a=r,t=o[s]);return t},createKeyFunction:function(e,t){var r=this,n=this._interpreter;return function(o){var i=n.visit(e,o);if(t.indexOf(r._getTypeName(i))<0){var a="TypeError: expected one of "+t+", received "+r._getTypeName(i);throw new Error(a)}return i}}},e.tokenize=function(e){return(new u).tokenize(e)},e.compile=function(e){return(new c).parse(e)},e.search=function(e,t){var r=new c,n=new p,o=new l(n);n._interpreter=o;var i=r.parse(t);return o.search(i,e)},e.strictDeepEqual=n}(void 0===r?this.jmespath={}:r)},{}],6:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],2:[function(e,t,r){},{}]},{},[]);s=function e(t,r,n){function o(a,u){if(!r[a]){if(!t[a]){var c="function"==typeof s&&s;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var p=r[a]={exports:{}};t[a][0].call(p.exports,function(e){return o(t[a][1][e]||e)},p,p.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof s&&s,a=0;a<n.length;a++)o(n[a]);return o}({28:[function(e,t,r){e("./browser_loader");var n=e("./core");"undefined"!=typeof window&&(window.AWS=n),void 0!==t&&(t.exports=n),"undefined"!=typeof self&&(self.AWS=n)},{"./browser_loader":35,"./core":38}],35:[function(e,t,r){(function(r){var n=e("./util");n.crypto.lib=e("./browserCryptoLib"),n.Buffer=e("buffer/").Buffer,n.url=e("url/"),n.querystring=e("querystring/"),n.realClock=e("./realclock/browserClock"),n.environment="js",n.createEventStream=e("./event-stream/buffered-create-event-stream").createEventStream;var o=e("./core");t.exports=o,e("./credentials"),e("./credentials/credential_provider_chain"),e("./credentials/temporary_credentials"),e("./credentials/web_identity_credentials"),e("./credentials/cognito_identity_credentials"),e("./credentials/saml_credentials"),o.XML.Parser=e("./xml/browser_parser"),e("./http/xhr"),void 0===r&&(r={browser:!0})}).call(this,e("_process"))},{"./browserCryptoLib":29,"./core":38,"./credentials":39,"./credentials/cognito_identity_credentials":40,"./credentials/credential_provider_chain":41,"./credentials/saml_credentials":42,"./credentials/temporary_credentials":43,"./credentials/web_identity_credentials":44,"./event-stream/buffered-create-event-stream":51,"./http/xhr":60,"./realclock/browserClock":78,"./util":113,"./xml/browser_parser":114,_process:9,"buffer/":3,"querystring/":16,"url/":18}],114:[function(e,t,r){function n(){}function o(e,t){for(var r=e.getElementsByTagName(t),n=0,o=r.length;n<o;n++)if(r[n].parentNode===e)return r[n]}function i(e,t){switch(t||(t={}),t.type){case"structure":return a(e,t);case"map":return function(e,t){for(var r={},n=t.key.name||"key",a=t.value.name||"value",s=t.flattened?t.name:"entry",u=e.firstElementChild;u;){if(u.nodeName===s){var c=o(u,n).textContent,l=o(u,a);r[c]=i(l,t.value)}u=u.nextElementSibling}return r}(e,t);case"list":return function(e,t){for(var r=[],n=t.flattened?t.name:t.member.name||"member",o=e.firstElementChild;o;)o.nodeName===n&&r.push(i(o,t.member)),o=o.nextElementSibling;return r}(e,t);case void 0:case null:return function(e){if(void 0===e||null===e)return"";if(!e.firstElementChild)return null===e.parentNode.parentNode?{}:0===e.childNodes.length?"":e.textContent;for(var t={type:"structure",members:{}},r=e.firstElementChild;r;){var n=r.nodeName;Object.prototype.hasOwnProperty.call(t.members,n)?t.members[n].type="list":t.members[n]={name:n},r=r.nextElementSibling}return a(e,t)}(e);default:return function(e,t){if(e.getAttribute){var r=e.getAttribute("encoding");"base64"===r&&(t=new u.create({type:r}))}var n=e.textContent;return""===n&&(n=null),"function"==typeof t.toType?t.toType(n):n}(e,t)}}function a(e,t){var r={};return null===e?r:(s.each(t.members,function(t,n){if(n.isXmlAttribute){if(Object.prototype.hasOwnProperty.call(e.attributes,n.name)){var a=e.attributes[n.name].value;r[t]=i({textContent:a},n)}}else{var s=n.flattened?e:o(e,n.name);s?r[t]=i(s,n):n.flattened||"list"!==n.type||(r[t]=n.defaultValue)}}),r)}var s=e("../util"),u=e("../model/shape");n.prototype.parse=function(e,t){if(""===e.replace(/^\s+/,""))return{};var r,n;try{if(window.DOMParser){try{r=(new DOMParser).parseFromString(e,"text/xml")}catch(e){throw s.error(new Error("Parse error in document"),{originalError:e,code:"XMLParserError",retryable:!0})}if(null===r.documentElement)throw s.error(new Error("Cannot parse empty document."),{code:"XMLParserError",retryable:!0});var a=r.getElementsByTagName("parsererror")[0];if(a&&(a.parentNode===r||"body"===a.parentNode.nodeName||a.parentNode.parentNode===r||"body"===a.parentNode.parentNode.nodeName)){var u=a.getElementsByTagName("div")[0]||a;throw s.error(new Error(u.textContent||"Parser error in document"),{code:"XMLParserError",retryable:!0})}}else{if(!window.ActiveXObject)throw new Error("Cannot load XML parser");if((r=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,!r.loadXML(e))throw s.error(new Error("Parse error in document"),{code:"XMLParserError",retryable:!0})}}catch(e){n=e}if(r&&r.documentElement&&!n){var c=i(r.documentElement,t),l=o(r.documentElement,"ResponseMetadata");return l&&(c.ResponseMetadata=i(l,{})),c}if(n)throw s.error(n||new Error,{code:"XMLParserError",retryable:!0});return{}},t.exports=n},{"../model/shape":68,"../util":113}],78:[function(e,t,r){t.exports={now:function(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}}},{}],60:[function(e,t,r){var n=e("../core"),o=e("events").EventEmitter;e("../http"),n.XHRClient=n.util.inherit({handleRequest:function(e,t,r,i){var s=this,u=e.endpoint,c=new o,l=u.protocol+"//"+u.hostname;80!==u.port&&443!==u.port&&(l+=":"+u.port),l+=e.path;var p=new XMLHttpRequest,h=!1;e.stream=p,p.addEventListener("readystatechange",function(){try{if(0===p.status)return}catch(e){return}this.readyState>=this.HEADERS_RECEIVED&&!h&&(c.statusCode=p.status,c.headers=s.parseHeaders(p.getAllResponseHeaders()),c.emit("headers",c.statusCode,c.headers,p.statusText),h=!0),this.readyState===this.DONE&&s.finishRequest(p,c)},!1),p.upload.addEventListener("progress",function(e){c.emit("sendProgress",e)}),p.addEventListener("progress",function(e){c.emit("receiveProgress",e)},!1),p.addEventListener("timeout",function(){i(n.util.error(new Error("Timeout"),{code:"TimeoutError"}))},!1),p.addEventListener("error",function(){i(n.util.error(new Error("Network Failure"),{code:"NetworkingError"}))},!1),p.addEventListener("abort",function(){i(n.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))},!1),r(c),p.open(e.method,l,!1!==t.xhrAsync),n.util.each(e.headers,function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&p.setRequestHeader(e,t)}),t.timeout&&!1!==t.xhrAsync&&(p.timeout=t.timeout),t.xhrWithCredentials&&(p.withCredentials=!0);try{p.responseType="arraybuffer"}catch(e){}try{e.body?p.send(e.body):p.send()}catch(t){if(!e.body||"object"!=a(e.body.buffer))throw t;p.send(e.body.buffer)}return c},parseHeaders:function(e){var t={};return n.util.arrayEach(e.split(/\r?\n/),function(e){var r=e.split(":",1)[0],n=e.substring(r.length+2);r.length>0&&(t[r.toLowerCase()]=n)}),t},finishRequest:function(e,t){var r;if("arraybuffer"===e.responseType&&e.response){var o=e.response;r=new n.util.Buffer(o.byteLength);for(var i=new Uint8Array(o),a=0;a<r.length;++a)r[a]=i[a]}try{r||"string"!=typeof e.responseText||(r=new n.util.Buffer(e.responseText))}catch(e){}r&&t.emit("data",r),t.emit("end")}}),n.HttpClient.prototype=n.XHRClient.prototype,n.HttpClient.streamsApiVersion=1},{"../core":38,"../http":59,events:4}],51:[function(e,t,r){var n=e("../event-stream/event-message-chunker").eventMessageChunker,o=e("./parse-event").parseEvent;t.exports={createEventStream:function(e,t,r){for(var i=n(e),a=[],s=0;s<i.length;s++)a.push(o(t,i[s],r));return a}}},{"../event-stream/event-message-chunker":52,"./parse-event":54}],54:[function(e,t,r){var n=e("./parse-message").parseMessage;t.exports={parseEvent:function(e,t,r){var o=n(t),i=o.headers[":message-type"];if(i){if("error"===i.value)throw function(e){var t=e.headers[":error-code"],r=e.headers[":error-message"],n=new Error(r.value||r);return n.code=n.name=t.value||t,n}(o);if("event"!==i.value)return}var a=o.headers[":event-type"],s=r.members[a.value];if(s){var u={},c=s.eventPayloadMemberName;if(c){var l=s.members[c];"binary"===l.type?u[c]=o.body:u[c]=e.parse(o.body.toString(),l)}for(var p=s.eventHeaderMemberNames,h=0;h<p.length;h++){var f=p[h];o.headers[f]&&(u[f]=s.members[f].toType(o.headers[f].value))}var d={};return d[a.value]=u,d}}}},{"./parse-message":55}],55:[function(e,t,r){var n=e("./int64").Int64,o=e("./split-message").splitMessage,i="boolean",a="byte",s="short",u="integer",c="long",l="binary",p="string",h="timestamp",f="uuid";t.exports={parseMessage:function(e){var t=o(e);return{headers:function(e){for(var t={},r=0;r<e.length;){var o=e.readUInt8(r++),d=e.slice(r,r+o).toString();switch(r+=o,e.readUInt8(r++)){case 0:t[d]={type:i,value:!0};break;case 1:t[d]={type:i,value:!1};break;case 2:t[d]={type:a,value:e.readInt8(r++)};break;case 3:t[d]={type:s,value:e.readInt16BE(r)},r+=2;break;case 4:t[d]={type:u,value:e.readInt32BE(r)},r+=4;break;case 5:t[d]={type:c,value:new n(e.slice(r,r+8))},r+=8;break;case 6:var m=e.readUInt16BE(r);r+=2,t[d]={type:l,value:e.slice(r,r+m)},r+=m;break;case 7:var y=e.readUInt16BE(r);r+=2,t[d]={type:p,value:e.slice(r,r+y).toString()},r+=y;break;case 8:t[d]={type:h,value:new Date(new n(e.slice(r,r+8)).valueOf())},r+=8;break;case 9:var g=e.slice(r,r+16).toString("hex");r+=16,t[d]={type:f,value:g.substr(0,8)+"-"+g.substr(8,4)+"-"+g.substr(12,4)+"-"+g.substr(16,4)+"-"+g.substr(20)};break;default:throw new Error("Unrecognized header type tag")}}return t}(t.headers),body:t.body}}}},{"./int64":53,"./split-message":56}],56:[function(e,t,r){var n=e("../core").util,o=e("./to-buffer").toBuffer,i=4,a=2*i,s=4,u=a+2*s;t.exports={splitMessage:function(e){if(n.Buffer.isBuffer(e)||(e=o(e)),e.length<u)throw new Error("Provided message too short to accommodate event stream message overhead");if(e.length!==e.readUInt32BE(0))throw new Error("Reported message length does not match received message length");var t=e.readUInt32BE(a);if(t!==n.crypto.crc32(e.slice(0,a)))throw new Error("The prelude checksum specified in the message ("+t+") does not match the calculated CRC32 checksum.");var r=e.readUInt32BE(e.length-s);if(r!==n.crypto.crc32(e.slice(0,e.length-s)))throw new Error("The message checksum did not match the expected value of "+r);var c=a+s,l=c+e.readUInt32BE(i);return{headers:e.slice(c,l),body:e.slice(l,e.length-s)}}}},{"../core":38,"./to-buffer":57}],53:[function(e,t,r){function n(e){if(8!==e.length)throw new Error("Int64 buffers must be exactly 8 bytes");i.Buffer.isBuffer(e)||(e=a(e)),this.bytes=e}function o(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&0==++e[t];t--);}var i=e("../core").util,a=e("./to-buffer").toBuffer;n.fromNumber=function(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),r=7,i=Math.abs(Math.round(e));r>-1&&i>0;r--,i/=256)t[r]=i;return e<0&&o(t),new n(t)},n.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&o(e),parseInt(e.toString("hex"),16)*(t?-1:1)},n.prototype.toString=function(){return String(this.valueOf())},t.exports={Int64:n}},{"../core":38,"./to-buffer":57}],57:[function(e,t,r){var n=e("../core").util.Buffer;t.exports={toBuffer:function(e,t){return"function"==typeof n.from&&n.from!==Uint8Array.from?n.from(e,t):new n(e,t)}}},{"../core":38}],52:[function(e,t,r){t.exports={eventMessageChunker:function(e){for(var t=[],r=0;r<e.length;){var n=e.readInt32BE(r),o=e.slice(r,n+r);r+=n,t.push(o)}return t}}},{}],44:[function(e,t,r){var n=e("../core");n.WebIdentityCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=n.util.copy(t||{})},refresh:function(e){var t=this;t.createClients(),e||(e=function(e){if(e)throw e}),t.service.assumeRoleWithWebIdentity(function(r,n){t.data=null,r||(t.data=n,t.service.credentialsFrom(n,t)),e(r)})},createClients:function(){if(!this.service){var e=n.util.merge({},this._clientConfig);e.params=this.params,this.service=new n.STS(e)}}})},{"../core":38}],43:[function(e,t,r){var n=e("../core");n.TemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.loadMasterCredentials(t),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){var t=this;t.createClients(),e||(e=function(e){if(e)throw e}),t.masterCredentials.get(function(){t.service.config.credentials=t.masterCredentials,(t.params.RoleArn?t.service.assumeRole:t.service.getSessionToken).call(t.service,function(r,n){r||t.service.credentialsFrom(n,t),e(r)})})},loadMasterCredentials:function(e){for(this.masterCredentials=e||n.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;"function"!=typeof this.masterCredentials.get&&(this.masterCredentials=new n.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new n.STS({params:this.params})}})},{"../core":38}],42:[function(e,t,r){var n=e("../core");n.SAMLCredentials=n.util.inherit(n.Credentials,{constructor:function(e){n.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){var t=this;t.createClients(),e||(e=function(e){if(e)throw e}),t.service.assumeRoleWithSAML(function(r,n){r||t.service.credentialsFrom(n,t),e(r)})},createClients:function(){this.service=this.service||new n.STS({params:this.params})}})},{"../core":38}],40:[function(e,t,r){var n=e("../core");n.CognitoIdentityCredentials=n.util.inherit(n.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this._identityId=null,this._clientConfig=n.util.copy(t||{}),this.loadCachedId();var r=this;Object.defineProperty(this,"identityId",{get:function(){return r.loadCachedId(),r._identityId||r.params.IdentityId},set:function(e){r._identityId=e}})},refresh:function(e){var t=this;t.createClients(),t.data=null,t._identityId=null,t.getId(function(r){r?(t.clearIdOnNotAuthorized(r),e(r)):t.params.RoleArn?t.getCredentialsFromSTS(e):t.getCredentialsForIdentity(e)})},clearCachedId:function(){this._identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId,t=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+e+t],delete this.storage[this.localStorageKey.providers+e+t]},clearIdOnNotAuthorized:function(e){"NotAuthorizedException"==e.code&&this.clearCachedId()},getId:function(e){var t=this;if("string"==typeof t.params.IdentityId)return e(null,t.params.IdentityId);t.cognito.getId(function(r,n){!r&&n.IdentityId?(t.params.IdentityId=n.IdentityId,e(null,n.IdentityId)):e(r)})},loadCredentials:function(e,t){e&&t&&(t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(e){var t=this;t.cognito.getCredentialsForIdentity(function(r,n){r?t.clearIdOnNotAuthorized(r):(t.cacheId(n),t.data=n,t.loadCredentials(t.data,t)),e(r)})},getCredentialsFromSTS:function(e){var t=this;t.cognito.getOpenIdToken(function(r,n){r?(t.clearIdOnNotAuthorized(r),e(r)):(t.cacheId(n),t.params.WebIdentityToken=n.Token,t.webIdentityCredentials.refresh(function(r){r||(t.data=t.webIdentityCredentials.data,t.sts.credentialsFrom(t.data,t)),e(r)}))})},loadCachedId:function(){var e=this;if(n.util.isBrowser()&&!e.params.IdentityId){var t=e.getStorage("id");if(t&&e.params.Logins){var r=Object.keys(e.params.Logins);0!==(e.getStorage("providers")||"").split(",").filter(function(e){return-1!==r.indexOf(e)}).length&&(e.params.IdentityId=t)}else t&&(e.params.IdentityId=t)}},createClients:function(){var e=this._clientConfig;if(this.webIdentityCredentials=this.webIdentityCredentials||new n.WebIdentityCredentials(this.params,e),!this.cognito){var t=n.util.merge({},e);t.params=this.params,this.cognito=new n.CognitoIdentity(t)}this.sts=this.sts||new n.STS(e)},cacheId:function(e){this._identityId=e.IdentityId,this.params.IdentityId=this._identityId,n.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(e,t){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]=t}catch(e){}},storage:function(){try{var e=n.util.isBrowser()&&null!==window.localStorage&&"object"==a(window.localStorage)?window.localStorage:{};return e["aws.test-storage"]="foobar",delete e["aws.test-storage"],e}catch(e){return{}}}()})},{"../core":38}],29:[function(e,t,r){var n=e("./browserHmac"),o=e("./browserMd5"),i=e("./browserSha1"),a=e("./browserSha256");t.exports={createHash:function(e){if("md5"===(e=e.toLowerCase()))return new o;if("sha256"===e)return new a;if("sha1"===e)return new i;throw new Error("Hash algorithm "+e+" is not supported in the browser SDK")},createHmac:function(e,t){if("md5"===(e=e.toLowerCase()))return new n(o,t);if("sha256"===e)return new n(a,t);if("sha1"===e)return new n(i,t);throw new Error("HMAC algorithm "+e+" is not supported in the browser SDK")},createSign:function(){throw new Error("createSign is not implemented in the browser")}}},{"./browserHmac":31,"./browserMd5":32,"./browserSha1":33,"./browserSha256":34}],34:[function(e,t,r){function n(){this.state=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}var o=e("buffer/").Buffer,i=e("./browserHashUtils"),a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=Math.pow(2,53)-1;t.exports=n,n.BLOCK_SIZE=64,n.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(i.isEmptyData(e))return this;var t=0,r=(e=i.convertToBuffer(e)).byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>s)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},n.prototype.digest=function(e){if(!this.finished){var t=8*this.bytesHashed,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%64>=56){for(var i=this.bufferLength;i<64;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<56;i++)r.setUint8(i,0);r.setUint32(56,Math.floor(t/4294967296),!0),r.setUint32(60,t),this.hashBuffer(),this.finished=!0}var a=new o(32);for(i=0;i<8;i++)a[4*i]=this.state[i]>>>24&255,a[4*i+1]=this.state[i]>>>16&255,a[4*i+2]=this.state[i]>>>8&255,a[4*i+3]=this.state[i]>>>0&255;return e?a.toString(e):a},n.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],n=t[1],o=t[2],i=t[3],s=t[4],u=t[5],c=t[6],l=t[7],p=0;p<64;p++){if(p<16)this.temp[p]=(255&e[4*p])<<24|(255&e[4*p+1])<<16|(255&e[4*p+2])<<8|255&e[4*p+3];else{var h=this.temp[p-2],f=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,d=((h=this.temp[p-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[p]=(f+this.temp[p-7]|0)+(d+this.temp[p-16]|0)}var m=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(l+(a[p]+this.temp[p]|0)|0)|0,y=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&n^r&o^n&o)|0;l=c,c=u,u=s,s=i+m|0,i=o,o=n,n=r,r=m+y|0}t[0]+=r,t[1]+=n,t[2]+=o,t[3]+=i,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=l}},{"./browserHashUtils":30,"buffer/":3}],33:[function(e,t,r){function n(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}var o=e("buffer/").Buffer,i=e("./browserHashUtils");new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),Math.pow(2,53),t.exports=n,n.BLOCK_SIZE=64,n.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(i.isEmptyData(e))return this;var t=(e=i.convertToBuffer(e)).length;this.totalLength+=8*t;for(var r=0;r<t;r++)this.write(e[r]);return this},n.prototype.write=function(e){this.block[this.offset]|=(255&e)<<this.shift,this.shift?this.shift-=8:(this.offset++,this.shift=24),16===this.offset&&this.processBlock()},n.prototype.digest=function(e){this.write(128),(this.offset>14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var t=24;t>=0;t-=8)this.write(this.totalLength>>t);var r=new o(20),n=new DataView(r.buffer);return n.setUint32(0,this.h0,!1),n.setUint32(4,this.h1,!1),n.setUint32(8,this.h2,!1),n.setUint32(12,this.h3,!1),n.setUint32(16,this.h4,!1),e?r.toString(e):r},n.prototype.processBlock=function(){for(var e=16;e<80;e++){var t=this.block[e-3]^this.block[e-8]^this.block[e-14]^this.block[e-16];this.block[e]=t<<1|t>>>31}var r,n,o=this.h0,i=this.h1,a=this.h2,s=this.h3,u=this.h4;for(e=0;e<80;e++){e<20?(r=s^i&(a^s),n=1518500249):e<40?(r=i^a^s,n=1859775393):e<60?(r=i&a|s&(i|a),n=2400959708):(r=i^a^s,n=3395469782);var c=(o<<5|o>>>27)+r+u+n+(0|this.block[e]);u=s,s=a,a=i<<30|i>>>2,i=o,o=c}for(this.h0=this.h0+o|0,this.h1=this.h1+i|0,this.h2=this.h2+a|0,this.h3=this.h3+s|0,this.h4=this.h4+u|0,this.offset=0,e=0;e<16;e++)this.block[e]=0}},{"./browserHashUtils":30,"buffer/":3}],32:[function(e,t,r){function n(){this.state=[1732584193,4023233417,2562383102,271733878],this.buffer=new DataView(new ArrayBuffer(p)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}function o(e,t,r,n,o,i){return((t=(t+e&4294967295)+(n+i&4294967295)&4294967295)<<o|t>>>32-o)+r&4294967295}function i(e,t,r,n,i,a,s){return o(t&r|~t&n,e,t,i,a,s)}function a(e,t,r,n,i,a,s){return o(t&n|r&~n,e,t,i,a,s)}function s(e,t,r,n,i,a,s){return o(t^r^n,e,t,i,a,s)}function u(e,t,r,n,i,a,s){return o(r^(t|~n),e,t,i,a,s)}var c=e("./browserHashUtils"),l=e("buffer/").Buffer,p=64;t.exports=n,n.BLOCK_SIZE=p,n.prototype.update=function(e){if(c.isEmptyData(e))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=c.convertToBuffer(e),r=0,n=t.byteLength;for(this.bytesHashed+=n;n>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),n--,this.bufferLength===p&&(this.hashBuffer(),this.bufferLength=0);return this},n.prototype.digest=function(e){if(!this.finished){var t=this,r=t.buffer,n=t.bufferLength,o=8*t.bytesHashed;if(r.setUint8(this.bufferLength++,128),n%p>=p-8){for(var i=this.bufferLength;i<p;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<p-8;i++)r.setUint8(i,0);r.setUint32(p-8,o>>>0,!0),r.setUint32(p-4,Math.floor(o/4294967296),!0),this.hashBuffer(),this.finished=!0}var a=new DataView(new ArrayBuffer(16));for(i=0;i<4;i++)a.setUint32(4*i,this.state[i],!0);var s=new l(a.buffer,a.byteOffset,a.byteLength);return e?s.toString(e):s},n.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,r=t[0],n=t[1],o=t[2],c=t[3];n=u(n=u(n=u(n=u(n=s(n=s(n=s(n=s(n=a(n=a(n=a(n=a(n=i(n=i(n=i(n=i(n,o=i(o,c=i(c,r=i(r,n,o,c,e.getUint32(0,!0),7,3614090360),n,o,e.getUint32(4,!0),12,3905402710),r,n,e.getUint32(8,!0),17,606105819),c,r,e.getUint32(12,!0),22,3250441966),o=i(o,c=i(c,r=i(r,n,o,c,e.getUint32(16,!0),7,4118548399),n,o,e.getUint32(20,!0),12,1200080426),r,n,e.getUint32(24,!0),17,2821735955),c,r,e.getUint32(28,!0),22,4249261313),o=i(o,c=i(c,r=i(r,n,o,c,e.getUint32(32,!0),7,1770035416),n,o,e.getUint32(36,!0),12,2336552879),r,n,e.getUint32(40,!0),17,4294925233),c,r,e.getUint32(44,!0),22,2304563134),o=i(o,c=i(c,r=i(r,n,o,c,e.getUint32(48,!0),7,1804603682),n,o,e.getUint32(52,!0),12,4254626195),r,n,e.getUint32(56,!0),17,2792965006),c,r,e.getUint32(60,!0),22,1236535329),o=a(o,c=a(c,r=a(r,n,o,c,e.getUint32(4,!0),5,4129170786),n,o,e.getUint32(24,!0),9,3225465664),r,n,e.getUint32(44,!0),14,643717713),c,r,e.getUint32(0,!0),20,3921069994),o=a(o,c=a(c,r=a(r,n,o,c,e.getUint32(20,!0),5,3593408605),n,o,e.getUint32(40,!0),9,38016083),r,n,e.getUint32(60,!0),14,3634488961),c,r,e.getUint32(16,!0),20,3889429448),o=a(o,c=a(c,r=a(r,n,o,c,e.getUint32(36,!0),5,568446438),n,o,e.getUint32(56,!0),9,3275163606),r,n,e.getUint32(12,!0),14,4107603335),c,r,e.getUint32(32,!0),20,1163531501),o=a(o,c=a(c,r=a(r,n,o,c,e.getUint32(52,!0),5,2850285829),n,o,e.getUint32(8,!0),9,4243563512),r,n,e.getUint32(28,!0),14,1735328473),c,r,e.getUint32(48,!0),20,2368359562),o=s(o,c=s(c,r=s(r,n,o,c,e.getUint32(20,!0),4,4294588738),n,o,e.getUint32(32,!0),11,2272392833),r,n,e.getUint32(44,!0),16,1839030562),c,r,e.getUint32(56,!0),23,4259657740),o=s(o,c=s(c,r=s(r,n,o,c,e.getUint32(4,!0),4,2763975236),n,o,e.getUint32(16,!0),11,1272893353),r,n,e.getUint32(28,!0),16,4139469664),c,r,e.getUint32(40,!0),23,3200236656),o=s(o,c=s(c,r=s(r,n,o,c,e.getUint32(52,!0),4,681279174),n,o,e.getUint32(0,!0),11,3936430074),r,n,e.getUint32(12,!0),16,3572445317),c,r,e.getUint32(24,!0),23,76029189),o=s(o,c=s(c,r=s(r,n,o,c,e.getUint32(36,!0),4,3654602809),n,o,e.getUint32(48,!0),11,3873151461),r,n,e.getUint32(60,!0),16,530742520),c,r,e.getUint32(8,!0),23,3299628645),o=u(o,c=u(c,r=u(r,n,o,c,e.getUint32(0,!0),6,4096336452),n,o,e.getUint32(28,!0),10,1126891415),r,n,e.getUint32(56,!0),15,2878612391),c,r,e.getUint32(20,!0),21,4237533241),o=u(o,c=u(c,r=u(r,n,o,c,e.getUint32(48,!0),6,1700485571),n,o,e.getUint32(12,!0),10,2399980690),r,n,e.getUint32(40,!0),15,4293915773),c,r,e.getUint32(4,!0),21,2240044497),o=u(o,c=u(c,r=u(r,n,o,c,e.getUint32(32,!0),6,1873313359),n,o,e.getUint32(60,!0),10,4264355552),r,n,e.getUint32(24,!0),15,2734768916),c,r,e.getUint32(52,!0),21,1309151649),o=u(o,c=u(c,r=u(r,n,o,c,e.getUint32(16,!0),6,4149444226),n,o,e.getUint32(44,!0),10,3174756917),r,n,e.getUint32(8,!0),15,718787259),c,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=o+t[2]&4294967295,t[3]=c+t[3]&4294967295}},{"./browserHashUtils":30,"buffer/":3}],31:[function(e,t,r){function n(e,t){this.hash=new e,this.outer=new e;var r=o(e,t),n=new Uint8Array(e.BLOCK_SIZE);n.set(r);for(var i=0;i<e.BLOCK_SIZE;i++)r[i]^=54,n[i]^=92;this.hash.update(r),this.outer.update(n);for(i=0;i<r.byteLength;i++)r[i]=0}function o(e,t){var r=i.convertToBuffer(t);if(r.byteLength>e.BLOCK_SIZE){var n=new e;n.update(r),r=n.digest()}var o=new Uint8Array(e.BLOCK_SIZE);return o.set(r),o}var i=e("./browserHashUtils");t.exports=n,n.prototype.update=function(e){if(i.isEmptyData(e)||this.error)return this;try{this.hash.update(i.convertToBuffer(e))}catch(e){this.error=e}return this},n.prototype.digest=function(e){return this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest(e)}},{"./browserHashUtils":30}],30:[function(e,t,r){var n=e("buffer/").Buffer;"undefined"!=typeof ArrayBuffer&&void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(e){return o.indexOf(Object.prototype.toString.call(e))>-1});var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"];t.exports={isEmptyData:function(e){return"string"==typeof e?0===e.length:0===e.byteLength},convertToBuffer:function(e){return"string"==typeof e&&(e=new n(e,"utf8")),ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}},{"buffer/":3}],18:[function(e,t,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function o(e,t,r){if(e&&s(e)&&e instanceof n)return e;var o=new n;return o.parse(e,t,r),o}function i(e){return"string"==typeof e}function s(e){return"object"==a(e)&&null!==e}function u(e){return null===e}var c=e("punycode");r.parse=o,r.resolve=function(e,t){return o(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?o(e,!1,!0).resolveObject(t):t},r.format=function(e){return i(e)&&(e=o(e)),e instanceof n?e.format():n.prototype.format.call(e)},r.Url=n;var l=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,h=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(h),d=["%","/","?",";","#"].concat(f),m=["/","?","#"],y=/^[a-z0-9A-Z_-]{0,63}$/,g=/^([a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=e("querystring");n.prototype.parse=function(e,t,r){if(!i(e))throw new TypeError("Parameter 'url' must be a string, not "+a(e));var n=e;n=n.trim();var o=l.exec(n);if(o){var s=(o=o[0]).toLowerCase();this.protocol=s,n=n.substr(o.length)}if(r||o||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var u="//"===n.substr(0,2);!u||o&&b[o]||(n=n.substr(2),this.slashes=!0)}if(!b[o]&&(u||o&&!S[o])){for(var p=-1,h=0;h<m.length;h++){-1!==(C=n.indexOf(m[h]))&&(-1===p||C<p)&&(p=C)}var _,k;-1!==(k=-1===p?n.lastIndexOf("@"):n.lastIndexOf("@",p))&&(_=n.slice(0,k),n=n.slice(k+1),this.auth=decodeURIComponent(_)),p=-1;for(h=0;h<d.length;h++){var C;-1!==(C=n.indexOf(d[h]))&&(-1===p||C<p)&&(p=C)}-1===p&&(p=n.length),this.host=n.slice(0,p),n=n.slice(p),this.parseHost(),this.hostname=this.hostname||"";var E="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!E)for(var x=this.hostname.split(/\./),A=(h=0,x.length);h<A;h++){var I=x[h];if(I&&!I.match(y)){for(var P="",T=0,N=I.length;T<N;T++)I.charCodeAt(T)>127?P+="x":P+=I[T];if(!P.match(y)){var R=x.slice(0,h),D=x.slice(h+1),U=I.match(g);U&&(R.push(U[1]),D.unshift(U[2])),D.length&&(n="/"+D.join(".")+n),this.hostname=R.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!E){var O=this.hostname.split("."),B=[];for(h=0;h<O.length;++h){var M=O[h];B.push(M.match(/[^A-Za-z0-9_-]/)?"xn--"+c.encode(M):M)}this.hostname=B.join(".")}var q=this.port?":"+this.port:"",L=this.hostname||"";this.host=L+q,this.href+=this.host,E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!v[s])for(h=0,A=f.length;h<A;h++){var j=f[h],F=encodeURIComponent(j);F===j&&(F=escape(j)),n=n.split(j).join(F)}var z=n.indexOf("#");-1!==z&&(this.hash=n.substr(z),n=n.slice(0,z));var K=n.indexOf("?");if(-1!==K?(this.search=n.substr(K),this.query=n.substr(K+1),t&&(this.query=w.parse(this.query)),n=n.slice(0,K)):t&&(this.search="",this.query={}),n&&(this.pathname=n),S[s]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){q=this.pathname||"",M=this.search||"";this.path=q+M}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&s(this.query)&&Object.keys(this.query).length&&(i=w.stringify(this.query));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||S[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+n},n.prototype.resolve=function(e){return this.resolveObject(o(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(i(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),S[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!S[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||b[e.protocol])r.pathname=e.pathname;else{for(var o=(e.pathname||"").split("/");o.length&&!(e.host=o.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==o[0]&&o.unshift(""),o.length<2&&o.unshift(""),r.pathname=o.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var a=r.pathname||"",s=r.search||"";r.path=a+s}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var c=r.pathname&&"/"===r.pathname.charAt(0),l=e.host||e.pathname&&"/"===e.pathname.charAt(0),p=l||c||r.host&&e.pathname,h=p,f=r.pathname&&r.pathname.split("/")||[],d=(o=e.pathname&&e.pathname.split("/")||[],r.protocol&&!S[r.protocol]);if(d&&(r.hostname="",r.port=null,r.host&&(""===f[0]?f[0]=r.host:f.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===o[0]?o[0]=e.host:o.unshift(e.host)),e.host=null),p=p&&(""===o[0]||""===f[0])),l)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,f=o;else if(o.length)f||(f=[]),f.pop(),f=f.concat(o),r.search=e.search,r.query=e.query;else if(!function(e){return null==e}(e.search)){if(d)r.hostname=r.host=f.shift(),(w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=w.shift(),r.host=r.hostname=w.shift());return r.search=e.search,r.query=e.query,u(r.pathname)&&u(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!f.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var m=f.slice(-1)[0],y=(r.host||e.host)&&("."===m||".."===m)||""===m,g=0,v=f.length;v>=0;v--)"."==(m=f[v])?f.splice(v,1):".."===m?(f.splice(v,1),g++):g&&(f.splice(v,1),g--);if(!p&&!h)for(;g--;g)f.unshift("..");!p||""===f[0]||f[0]&&"/"===f[0].charAt(0)||f.unshift(""),y&&"/"!==f.join("/").substr(-1)&&f.push("");var w,_=""===f[0]||f[0]&&"/"===f[0].charAt(0);d&&(r.hostname=r.host=_?"":f.length?f.shift():"",(w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=w.shift(),r.host=r.hostname=w.shift()));return(p=p||r.host&&f.length)&&!_&&f.unshift(""),f.length?r.pathname=f.join("/"):(r.pathname=null,r.path=null),u(r.pathname)&&u(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:10,querystring:13}],16:[function(e,t,r){arguments[4][13][0].apply(r,arguments)},{"./decode":14,"./encode":15,dup:13}],15:[function(e,t,r){"use strict";var n=function(e){switch(a(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,o){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==a(e)?Object.keys(e).map(function(o){var i=encodeURIComponent(n(o))+r;return Array.isArray(e[o])?e[o].map(function(e){return i+encodeURIComponent(n(e))}).join(t):i+encodeURIComponent(n(e[o]))}).join(t):o?encodeURIComponent(n(o))+r+encodeURIComponent(n(e)):""}},{}],14:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,o){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(t);var s=1e3;o&&"number"==typeof o.maxKeys&&(s=o.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var c=0;c<u;++c){var l,p,h,f,d=e[c].replace(a,"%20"),m=d.indexOf(r);m>=0?(l=d.substr(0,m),p=d.substr(m+1)):(l=d,p=""),h=decodeURIComponent(l),f=decodeURIComponent(p),n(i,h)?Array.isArray(i[h])?i[h].push(f):i[h]=[i[h],f]:i[h]=f}return i}},{}],13:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":11,"./encode":12}],12:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var o=function(e){switch(a(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,u){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==a(e)?n(s(e),function(a){var s=encodeURIComponent(o(a))+r;return i(e[a])?n(e[a],function(e){return s+encodeURIComponent(o(e))}).join(t):s+encodeURIComponent(o(e[a]))}).join(t):u?encodeURIComponent(o(u))+r+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],11:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var p,h,f,d,m=e[l].replace(s,"%20"),y=m.indexOf(r);y>=0?(p=m.substr(0,y),h=m.substr(y+1)):(p=m,h=""),f=decodeURIComponent(p),d=decodeURIComponent(h),n(a,f)?o(a[f])?a[f].push(d):a[f]=[a[f],d]:a[f]=d}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],10:[function(o,s,u){(function(n){!function(o){function c(e){throw RangeError(B[e])}function l(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function p(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+l((e=e.replace(O,".")).split("."),t).join(".")}function h(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function f(e){return l(e,function(e){var t="";return e>65535&&(t+=L((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+L(e)}).join("")}function d(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:E}function m(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function y(e,t,r){var n=0;for(e=r?q(e/P):e>>1,e+=q(e/t);e>M*A>>1;n+=E)e=q(e/M);return q(n+(M+1)*e/(e+I))}function g(e){var t,r,n,o,i,a,s,u,l,p,h=[],m=e.length,g=0,v=N,b=T;for((r=e.lastIndexOf(R))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&c("not-basic"),h.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<m;){for(i=g,a=1,s=E;o>=m&&c("invalid-input"),((u=d(e.charCodeAt(o++)))>=E||u>q((C-g)/a))&&c("overflow"),g+=u*a,!(u<(l=s<=b?x:s>=b+A?A:s-b));s+=E)a>q(C/(p=E-l))&&c("overflow"),a*=p;b=y(g-i,t=h.length+1,0==i),q(g/t)>C-v&&c("overflow"),v+=q(g/t),g%=t,h.splice(g++,0,v)}return f(h)}function v(e){var t,r,n,o,i,a,s,u,l,p,f,d,g,v,b,S=[];for(d=(e=h(e)).length,t=N,r=0,i=T,a=0;a<d;++a)(f=e[a])<128&&S.push(L(f));for(n=o=S.length,o&&S.push(R);n<d;){for(s=C,a=0;a<d;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>q((C-r)/(g=n+1))&&c("overflow"),r+=(s-t)*g,t=s,a=0;a<d;++a)if((f=e[a])<t&&++r>C&&c("overflow"),f==t){for(u=r,l=E;!(u<(p=l<=i?x:l>=i+A?A:l-i));l+=E)b=u-p,v=E-p,S.push(L(m(p+b%v,0))),u=q(b/v);S.push(L(m(u,0))),i=y(r,g,n==o),r=0,++n}++r,++t}return S.join("")}var b="object"==a(u)&&u&&!u.nodeType&&u,S="object"==a(s)&&s&&!s.nodeType&&s,w="object"==a(n)&&n;w.global!==w&&w.window!==w&&w.self!==w||(o=w);var _,k,C=2147483647,E=36,x=1,A=26,I=38,P=700,T=72,N=128,R="-",D=/^xn--/,U=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,B={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=E-x,q=Math.floor,L=String.fromCharCode;if(_={version:"1.3.2",ucs2:{decode:h,encode:f},decode:g,encode:v,toASCII:function(e){return p(e,function(e){return U.test(e)?"xn--"+v(e):e})},toUnicode:function(e){return p(e,function(e){return D.test(e)?g(e.slice(4).toLowerCase()):e})}},"object"==a(r(162))&&r(162))void 0===(i=function(){return _}.call(t,r,t,e))||(e.exports=i);else if(b&&S)if(s.exports==b)S.exports=_;else for(k in _)_.hasOwnProperty(k)&&(b[k]=_[k]);else o.punycode=_}(this)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"object"==a(e)&&null!==e}function s(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,a,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(s(r=this._events[e]))return!1;if(o(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(i(r))for(a=Array.prototype.slice.call(arguments,1),n=(c=r.slice()).length,u=0;u<n;u++)c[u].apply(this,a);return!0},n.prototype.addListener=function(e,t){var r;if(!o(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(r=s(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,a,s;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(r=this._events[e]).length,n=-1,r===t||o(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(o(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(o(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],3:[function(e,t,r){(function(t){"use strict";function n(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(n()<t)throw new RangeError("Invalid typed array length");return i.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=i.prototype:(null===e&&(e=new i(t)),e.length=t),e}function i(e,t,r){if(!(i.TYPED_ARRAY_SUPPORT||this instanceof i))return new i(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(this,e)}return a(this,e,t,r)}function a(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),i.TYPED_ARRAY_SUPPORT?(e=t).__proto__=i.prototype:e=c(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!i.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),a=(e=o(e,n)).write(t,r);return a!==n&&(e=e.slice(0,a)),e}(e,t,r):function(e,t){if(i.isBuffer(t)){var r=0|l(t.length);return 0===(e=o(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?o(e,0):c(e,t);if("Buffer"===t.type&&j(t.data))return c(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t){if(s(t),e=o(e,t<0?0:0|l(t)),!i.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function c(e,t){var r=t.length<0?0:0|l(t.length);e=o(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function l(e){if(e>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function p(e,t){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return O(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(e).length;default:if(n)return O(e).length;t=(""+t).toLowerCase(),n=!0}}function h(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function f(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:d(e,t,r,n,o);if("number"==typeof t)return t&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):d(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function d(e,t,r,n,o){function i(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var a,s=1,u=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,u/=2,c/=2,r/=2}if(o){var l=-1;for(a=r;a<u;a++)if(i(e,a)===i(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===c)return l*s}else-1!==l&&(a-=a-l),l=-1}else for(r+c>u&&(r=u-c),a=r;a>=0;a--){for(var p=!0,h=0;h<c;h++)if(i(e,a+h)!==i(t,h)){p=!1;break}if(p)return a}return-1}function m(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function y(e,t,r,n){return M(O(t,e.length-r),e,r,n)}function g(e,t,r,n){return M(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return g(e,t,r,n)}function b(e,t,r,n){return M(B(t),e,r,n)}function S(e,t,r,n){return M(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function w(e,t,r){return 0===t&&r===e.length?q.fromByteArray(e):q.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,a,s,u,c=e[o],l=null,p=c>239?4:c>223?3:c>191?2:1;if(o+p<=r)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=p}return function(e){var t=e.length;if(t<=F)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=F));return r}(n)}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function C(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function E(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=U(e[i]);return o}function x(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function A(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function P(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o<i;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function T(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o<i;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function N(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(e,t,r,n,o){return o||N(e,0,r,4),L.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return o||N(e,0,r,8),L.write(e,t,r,n,52,8),r+8}function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function O(e,t){t=t||1/0;for(var r,n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function B(e){return q.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function M(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}var q=e("base64-js"),L=e("ieee754"),j=e("isarray");r.Buffer=i,r.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},r.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=n(),i.poolSize=8192,i._augment=function(e){return e.__proto__=i.prototype,e},i.from=function(e,t,r){return a(null,e,t,r)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(e,t,r){return function(e,t,r,n){return s(t),t<=0?o(e,t):void 0!==r?"string"==typeof n?o(e,t).fill(r,n):o(e,t).fill(r):o(e,t)}(null,e,t,r)},i.allocUnsafe=function(e){return u(null,e)},i.allocUnsafeSlow=function(e){return u(null,e)},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,a=Math.min(r,n);o<a;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,t){if(!j(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=i.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var a=e[r];if(!i.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,o),o+=a.length}return n},i.byteLength=p,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},i.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},i.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},i.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?_(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return w(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e,t,r,n,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var a=o-n,s=r-t,u=Math.min(a,s),c=this.slice(n,o),l=e.slice(t,r),p=0;p<u;++p)if(c[p]!==l[p]){a=c[p],s=l[p];break}return a<s?-1:s<a?1:0},i.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},i.prototype.indexOf=function(e,t,r){return f(this,e,t,r,!0)},i.prototype.lastIndexOf=function(e,t,r){return f(this,e,t,r,!1)},i.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return g(this,e,t,r);case"latin1":case"binary":return v(this,e,t,r);case"base64":return b(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var F=4096;i.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),i.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=i.prototype;else{var o=t-e;r=new i(o,void 0);for(var a=0;a<o;++a)r[a]=this[a+e]}return r},i.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},i.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},i.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},i.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),L.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),L.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),L.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),L.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},i.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):T(this,e,t,!0),t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);I(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);I(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):T(this,e,t,!0),t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},i.prototype.writeFloatLE=function(e,t,r){return R(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return R(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o,a=n-r;if(this===e&&r<t&&t<n)for(o=a-1;o>=0;--o)e[o+t]=this[o+r];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},i.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var s=i.isBuffer(e)?e:O(new i(e,n).toString()),u=s.length;for(a=0;a<r-t;++a)this[a+t]=s[a%u]}return this};var z=/[^+\/0-9A-Za-z-_]/g}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:5,isarray:7}],7:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],5:[function(e,t,r){r.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,p=r?o-1:0,h=r?-1:1,f=e[t+p];for(p+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+e[t+p],p+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+p],p+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),i-=c}return(f?-1:1)*a*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,p=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(a++,u/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(t*u-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[r+f]=255&s,f+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+f]=255&a,f+=d,a/=256,c-=8);e[r+f-d]|=128*m}},{}],1:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function o(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}function i(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(o(n));return i.join("")}r.byteLength=function(e){var t=n(e),r=t[0],o=t[1];return 3*(r+o)/4-o},r.toByteArray=function(e){for(var t,r=n(e),o=r[0],i=r[1],a=new u(function(e,t,r){return 3*(t+r)/4-r}(0,o,i)),c=0,l=i>0?o-4:o,p=0;p<l;p+=4)t=s[e.charCodeAt(p)]<<18|s[e.charCodeAt(p+1)]<<12|s[e.charCodeAt(p+2)]<<6|s[e.charCodeAt(p+3)],a[c++]=t>>16&255,a[c++]=t>>8&255,a[c++]=255&t;return 2===i&&(t=s[e.charCodeAt(p)]<<2|s[e.charCodeAt(p+1)]>>4,a[c++]=255&t),1===i&&(t=s[e.charCodeAt(p)]<<10|s[e.charCodeAt(p+1)]<<4|s[e.charCodeAt(p+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t),a},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,o=[],s=0,u=r-n;s<u;s+=16383)o.push(i(e,s,s+16383>u?u:s+16383));return 1===n?(t=e[r-1],o.push(a[t>>2]+a[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],o.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),o.join("")};for(var a=[],s=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=c.length;l<p;++l)a[l]=c[l],s[c.charCodeAt(l)]=l;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}]},{},[28]);AWS.apiLoader.services.cognitoidentity={},AWS.CognitoIdentity=AWS.Service.defineService("cognitoidentity",["2014-06-30"]),s=function e(t,r,n){function o(a,u){if(!r[a]){if(!t[a]){var c="function"==typeof s&&s;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var p=r[a]={exports:{}};t[a][0].call(p.exports,function(e){return o(t[a][1][e]||e)},p,p.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof s&&s,a=0;a<n.length;a++)o(n[a]);return o}({90:[function(e,t,r){var n=e("../core");n.util.update(n.CognitoIdentity.prototype,{getOpenIdToken:function(e,t){return this.makeUnauthenticatedRequest("getOpenIdToken",e,t)},getId:function(e,t){return this.makeUnauthenticatedRequest("getId",e,t)},getCredentialsForIdentity:function(e,t){return this.makeUnauthenticatedRequest("getCredentialsForIdentity",e,t)}})},{"../core":38}]},{},[90]),AWS.apiLoader.services.cognitoidentity["2014-06-30"]={version:"2.0",metadata:{apiVersion:"2014-06-30",endpointPrefix:"cognito-identity",jsonVersion:"1.1",protocol:"json",serviceFullName:"Amazon Cognito Identity",serviceId:"Cognito Identity",signatureVersion:"v4",targetPrefix:"AWSCognitoIdentityService",uid:"cognito-identity-2014-06-30"},operations:{CreateIdentityPool:{input:{type:"structure",required:["IdentityPoolName","AllowUnauthenticatedIdentities"],members:{IdentityPoolName:{},AllowUnauthenticatedIdentities:{type:"boolean"},SupportedLoginProviders:{shape:"S4"},DeveloperProviderName:{},OpenIdConnectProviderARNs:{shape:"S8"},CognitoIdentityProviders:{shape:"Sa"},SamlProviderARNs:{shape:"Sf"}}},output:{shape:"Sg"}},DeleteIdentities:{input:{type:"structure",required:["IdentityIdsToDelete"],members:{IdentityIdsToDelete:{type:"list",member:{}}}},output:{type:"structure",members:{UnprocessedIdentityIds:{type:"list",member:{type:"structure",members:{IdentityId:{},ErrorCode:{}}}}}}},DeleteIdentityPool:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{}}}},DescribeIdentity:{input:{type:"structure",required:["IdentityId"],members:{IdentityId:{}}},output:{shape:"Sr"}},DescribeIdentityPool:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{}}},output:{shape:"Sg"}},GetCredentialsForIdentity:{input:{type:"structure",required:["IdentityId"],members:{IdentityId:{},Logins:{shape:"Sw"},CustomRoleArn:{}}},output:{type:"structure",members:{IdentityId:{},Credentials:{type:"structure",members:{AccessKeyId:{},SecretKey:{},SessionToken:{},Expiration:{type:"timestamp"}}}}}},GetId:{input:{type:"structure",required:["IdentityPoolId"],members:{AccountId:{},IdentityPoolId:{},Logins:{shape:"Sw"}}},output:{type:"structure",members:{IdentityId:{}}}},GetIdentityPoolRoles:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{}}},output:{type:"structure",members:{IdentityPoolId:{},Roles:{shape:"S18"},RoleMappings:{shape:"S1a"}}}},GetOpenIdToken:{input:{type:"structure",required:["IdentityId"],members:{IdentityId:{},Logins:{shape:"Sw"}}},output:{type:"structure",members:{IdentityId:{},Token:{}}}},GetOpenIdTokenForDeveloperIdentity:{input:{type:"structure",required:["IdentityPoolId","Logins"],members:{IdentityPoolId:{},IdentityId:{},Logins:{shape:"Sw"},TokenDuration:{type:"long"}}},output:{type:"structure",members:{IdentityId:{},Token:{}}}},ListIdentities:{input:{type:"structure",required:["IdentityPoolId","MaxResults"],members:{IdentityPoolId:{},MaxResults:{type:"integer"},NextToken:{},HideDisabled:{type:"boolean"}}},output:{type:"structure",members:{IdentityPoolId:{},Identities:{type:"list",member:{shape:"Sr"}},NextToken:{}}}},ListIdentityPools:{input:{type:"structure",required:["MaxResults"],members:{MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{IdentityPools:{type:"list",member:{type:"structure",members:{IdentityPoolId:{},IdentityPoolName:{}}}},NextToken:{}}}},LookupDeveloperIdentity:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{},IdentityId:{},DeveloperUserIdentifier:{},MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{IdentityId:{},DeveloperUserIdentifierList:{type:"list",member:{}},NextToken:{}}}},MergeDeveloperIdentities:{input:{type:"structure",required:["SourceUserIdentifier","DestinationUserIdentifier","DeveloperProviderName","IdentityPoolId"],members:{SourceUserIdentifier:{},DestinationUserIdentifier:{},DeveloperProviderName:{},IdentityPoolId:{}}},output:{type:"structure",members:{IdentityId:{}}}},SetIdentityPoolRoles:{input:{type:"structure",required:["IdentityPoolId","Roles"],members:{IdentityPoolId:{},Roles:{shape:"S18"},RoleMappings:{shape:"S1a"}}}},UnlinkDeveloperIdentity:{input:{type:"structure",required:["IdentityId","IdentityPoolId","DeveloperProviderName","DeveloperUserIdentifier"],members:{IdentityId:{},IdentityPoolId:{},DeveloperProviderName:{},DeveloperUserIdentifier:{}}}},UnlinkIdentity:{input:{type:"structure",required:["IdentityId","Logins","LoginsToRemove"],members:{IdentityId:{},Logins:{shape:"Sw"},LoginsToRemove:{shape:"Ss"}}}},UpdateIdentityPool:{input:{shape:"Sg"},output:{shape:"Sg"}}},shapes:{S4:{type:"map",key:{},value:{}},S8:{type:"list",member:{}},Sa:{type:"list",member:{type:"structure",members:{ProviderName:{},ClientId:{},ServerSideTokenCheck:{type:"boolean"}}}},Sf:{type:"list",member:{}},Sg:{type:"structure",required:["IdentityPoolId","IdentityPoolName","AllowUnauthenticatedIdentities"],members:{IdentityPoolId:{},IdentityPoolName:{},AllowUnauthenticatedIdentities:{type:"boolean"},SupportedLoginProviders:{shape:"S4"},DeveloperProviderName:{},OpenIdConnectProviderARNs:{shape:"S8"},CognitoIdentityProviders:{shape:"Sa"},SamlProviderARNs:{shape:"Sf"}}},Sr:{type:"structure",members:{IdentityId:{},Logins:{shape:"Ss"},CreationDate:{type:"timestamp"},LastModifiedDate:{type:"timestamp"}}},Ss:{type:"list",member:{}},Sw:{type:"map",key:{},value:{}},S18:{type:"map",key:{},value:{}},S1a:{type:"map",key:{},value:{type:"structure",required:["Type"],members:{Type:{},AmbiguousRoleResolution:{},RulesConfiguration:{type:"structure",required:["Rules"],members:{Rules:{type:"list",member:{type:"structure",required:["Claim","MatchType","Value","RoleARN"],members:{Claim:{},MatchType:{},Value:{},RoleARN:{}}}}}}}}}},paginators:{}},AWS.apiLoader.services.cloudwatch={},AWS.CloudWatch=AWS.Service.defineService("cloudwatch",["2010-08-01"]),AWS.apiLoader.services.cloudwatch["2010-08-01"]={version:"2.0",metadata:{apiVersion:"2010-08-01",endpointPrefix:"monitoring",protocol:"query",serviceAbbreviation:"CloudWatch",serviceFullName:"Amazon CloudWatch",serviceId:"CloudWatch",signatureVersion:"v4",uid:"monitoring-2010-08-01",xmlNamespace:"http://monitoring.amazonaws.com/doc/2010-08-01/"},operations:{DeleteAlarms:{input:{type:"structure",required:["AlarmNames"],members:{AlarmNames:{shape:"S2"}}}},DeleteDashboards:{input:{type:"structure",required:["DashboardNames"],members:{DashboardNames:{type:"list",member:{}}}},output:{resultWrapper:"DeleteDashboardsResult",type:"structure",members:{}}},DescribeAlarmHistory:{input:{type:"structure",members:{AlarmName:{},HistoryItemType:{},StartDate:{type:"timestamp"},EndDate:{type:"timestamp"},MaxRecords:{type:"integer"},NextToken:{}}},output:{resultWrapper:"DescribeAlarmHistoryResult",type:"structure",members:{AlarmHistoryItems:{type:"list",member:{type:"structure",members:{AlarmName:{},Timestamp:{type:"timestamp"},HistoryItemType:{},HistorySummary:{},HistoryData:{}}}},NextToken:{}}}},DescribeAlarms:{input:{type:"structure",members:{AlarmNames:{shape:"S2"},AlarmNamePrefix:{},StateValue:{},ActionPrefix:{},MaxRecords:{type:"integer"},NextToken:{}}},output:{resultWrapper:"DescribeAlarmsResult",type:"structure",members:{MetricAlarms:{shape:"Sn"},NextToken:{}}}},DescribeAlarmsForMetric:{input:{type:"structure",required:["MetricName","Namespace"],members:{MetricName:{},Namespace:{},Statistic:{},ExtendedStatistic:{},Dimensions:{shape:"S10"},Period:{type:"integer"},Unit:{}}},output:{resultWrapper:"DescribeAlarmsForMetricResult",type:"structure",members:{MetricAlarms:{shape:"Sn"}}}},DisableAlarmActions:{input:{type:"structure",required:["AlarmNames"],members:{AlarmNames:{shape:"S2"}}}},EnableAlarmActions:{input:{type:"structure",required:["AlarmNames"],members:{AlarmNames:{shape:"S2"}}}},GetDashboard:{input:{type:"structure",required:["DashboardName"],members:{DashboardName:{}}},output:{resultWrapper:"GetDashboardResult",type:"structure",members:{DashboardArn:{},DashboardBody:{},DashboardName:{}}}},GetMetricData:{input:{type:"structure",required:["MetricDataQueries","StartTime","EndTime"],members:{MetricDataQueries:{type:"list",member:{type:"structure",required:["Id"],members:{Id:{},MetricStat:{type:"structure",required:["Metric","Period","Stat"],members:{Metric:{shape:"S1p"},Period:{type:"integer"},Stat:{},Unit:{}}},Expression:{},Label:{},ReturnData:{type:"boolean"}}}},StartTime:{type:"timestamp"},EndTime:{type:"timestamp"},NextToken:{},ScanBy:{},MaxDatapoints:{type:"integer"}}},output:{resultWrapper:"GetMetricDataResult",type:"structure",members:{MetricDataResults:{type:"list",member:{type:"structure",members:{Id:{},Label:{},Timestamps:{type:"list",member:{type:"timestamp"}},Values:{type:"list",member:{type:"double"}},StatusCode:{},Messages:{type:"list",member:{type:"structure",members:{Code:{},Value:{}}}}}}},NextToken:{}}}},GetMetricStatistics:{input:{type:"structure",required:["Namespace","MetricName","StartTime","EndTime","Period"],members:{Namespace:{},MetricName:{},Dimensions:{shape:"S10"},StartTime:{type:"timestamp"},EndTime:{type:"timestamp"},Period:{type:"integer"},Statistics:{type:"list",member:{}},ExtendedStatistics:{type:"list",member:{}},Unit:{}}},output:{resultWrapper:"GetMetricStatisticsResult",type:"structure",members:{Label:{},Datapoints:{type:"list",member:{type:"structure",members:{Timestamp:{type:"timestamp"},SampleCount:{type:"double"},Average:{type:"double"},Sum:{type:"double"},Minimum:{type:"double"},Maximum:{type:"double"},Unit:{},ExtendedStatistics:{type:"map",key:{},value:{type:"double"}}},xmlOrder:["Timestamp","SampleCount","Average","Sum","Minimum","Maximum","Unit","ExtendedStatistics"]}}}}},GetMetricWidgetImage:{input:{type:"structure",required:["MetricWidget"],members:{MetricWidget:{},OutputFormat:{}}},output:{resultWrapper:"GetMetricWidgetImageResult",type:"structure",members:{MetricWidgetImage:{type:"blob"}}}},ListDashboards:{input:{type:"structure",members:{DashboardNamePrefix:{},NextToken:{}}},output:{resultWrapper:"ListDashboardsResult",type:"structure",members:{DashboardEntries:{type:"list",member:{type:"structure",members:{DashboardName:{},DashboardArn:{},LastModified:{type:"timestamp"},Size:{type:"long"}}}},NextToken:{}}}},ListMetrics:{input:{type:"structure",members:{Namespace:{},MetricName:{},Dimensions:{type:"list",member:{type:"structure",required:["Name"],members:{Name:{},Value:{}}}},NextToken:{}}},output:{resultWrapper:"ListMetricsResult",type:"structure",members:{Metrics:{type:"list",member:{shape:"S1p"}},NextToken:{}},xmlOrder:["Metrics","NextToken"]}},PutDashboard:{input:{type:"structure",required:["DashboardName","DashboardBody"],members:{DashboardName:{},DashboardBody:{}}},output:{resultWrapper:"PutDashboardResult",type:"structure",members:{DashboardValidationMessages:{type:"list",member:{type:"structure",members:{DataPath:{},Message:{}}}}}}},PutMetricAlarm:{input:{type:"structure",required:["AlarmName","MetricName","Namespace","Period","EvaluationPeriods","Threshold","ComparisonOperator"],members:{AlarmName:{},AlarmDescription:{},ActionsEnabled:{type:"boolean"},OKActions:{shape:"Ss"},AlarmActions:{shape:"Ss"},InsufficientDataActions:{shape:"Ss"},MetricName:{},Namespace:{},Statistic:{},ExtendedStatistic:{},Dimensions:{shape:"S10"},Period:{type:"integer"},Unit:{},EvaluationPeriods:{type:"integer"},DatapointsToAlarm:{type:"integer"},Threshold:{type:"double"},ComparisonOperator:{},TreatMissingData:{},EvaluateLowSampleCountPercentile:{}}}},PutMetricData:{input:{type:"structure",required:["Namespace","MetricData"],members:{Namespace:{},MetricData:{type:"list",member:{type:"structure",required:["MetricName"],members:{MetricName:{},Dimensions:{shape:"S10"},Timestamp:{type:"timestamp"},Value:{type:"double"},StatisticValues:{type:"structure",required:["SampleCount","Sum","Minimum","Maximum"],members:{SampleCount:{type:"double"},Sum:{type:"double"},Minimum:{type:"double"},Maximum:{type:"double"}}},Values:{type:"list",member:{type:"double"}},Counts:{type:"list",member:{type:"double"}},Unit:{},StorageResolution:{type:"integer"}}}}}}},SetAlarmState:{input:{type:"structure",required:["AlarmName","StateValue","StateReason"],members:{AlarmName:{},StateValue:{},StateReason:{},StateReasonData:{}}}}},shapes:{S2:{type:"list",member:{}},Sn:{type:"list",member:{type:"structure",members:{AlarmName:{},AlarmArn:{},AlarmDescription:{},AlarmConfigurationUpdatedTimestamp:{type:"timestamp"},ActionsEnabled:{type:"boolean"},OKActions:{shape:"Ss"},AlarmActions:{shape:"Ss"},InsufficientDataActions:{shape:"Ss"},StateValue:{},StateReason:{},StateReasonData:{},StateUpdatedTimestamp:{type:"timestamp"},MetricName:{},Namespace:{},Statistic:{},ExtendedStatistic:{},Dimensions:{shape:"S10"},Period:{type:"integer"},Unit:{},EvaluationPeriods:{type:"integer"},DatapointsToAlarm:{type:"integer"},Threshold:{type:"double"},ComparisonOperator:{},TreatMissingData:{},EvaluateLowSampleCountPercentile:{}},xmlOrder:["AlarmName","AlarmArn","AlarmDescription","AlarmConfigurationUpdatedTimestamp","ActionsEnabled","OKActions","AlarmActions","InsufficientDataActions","StateValue","StateReason","StateReasonData","StateUpdatedTimestamp","MetricName","Namespace","Statistic","Dimensions","Period","Unit","EvaluationPeriods","Threshold","ComparisonOperator","ExtendedStatistic","TreatMissingData","EvaluateLowSampleCountPercentile","DatapointsToAlarm"]}},Ss:{type:"list",member:{}},S10:{type:"list",member:{type:"structure",required:["Name","Value"],members:{Name:{},Value:{}},xmlOrder:["Name","Value"]}},S1p:{type:"structure",members:{Namespace:{},MetricName:{},Dimensions:{shape:"S10"}},xmlOrder:["Namespace","MetricName","Dimensions"]}},paginators:{DescribeAlarmHistory:{input_token:"NextToken",limit_key:"MaxRecords",output_token:"NextToken",result_key:"AlarmHistoryItems"},DescribeAlarms:{input_token:"NextToken",limit_key:"MaxRecords",output_token:"NextToken",result_key:"MetricAlarms"},DescribeAlarmsForMetric:{result_key:"MetricAlarms"},ListMetrics:{input_token:"NextToken",output_token:"NextToken",result_key:"Metrics"}},waiters:{AlarmExists:{delay:5,maxAttempts:40,operation:"DescribeAlarms",acceptors:[{matcher:"path",expected:!0,argument:"length(MetricAlarms[]) > `0`",state:"success"}]}}},AWS.apiLoader.services.cloudwatchlogs={},AWS.CloudWatchLogs=AWS.Service.defineService("cloudwatchlogs",["2014-03-28"]),AWS.apiLoader.services.cloudwatchlogs["2014-03-28"]={version:"2.0",metadata:{apiVersion:"2014-03-28",endpointPrefix:"logs",jsonVersion:"1.1",protocol:"json",serviceFullName:"Amazon CloudWatch Logs",serviceId:"CloudWatch Logs",signatureVersion:"v4",targetPrefix:"Logs_20140328",uid:"logs-2014-03-28"},operations:{AssociateKmsKey:{input:{type:"structure",required:["logGroupName","kmsKeyId"],members:{logGroupName:{},kmsKeyId:{}}}},CancelExportTask:{input:{type:"structure",required:["taskId"],members:{taskId:{}}}},CreateExportTask:{input:{type:"structure",required:["logGroupName","from","to","destination"],members:{taskName:{},logGroupName:{},logStreamNamePrefix:{},from:{type:"long"},to:{type:"long"},destination:{},destinationPrefix:{}}},output:{type:"structure",members:{taskId:{}}}},CreateLogGroup:{input:{type:"structure",required:["logGroupName"],members:{logGroupName:{},kmsKeyId:{},tags:{shape:"Se"}}}},CreateLogStream:{input:{type:"structure",required:["logGroupName","logStreamName"],members:{logGroupName:{},logStreamName:{}}}},DeleteDestination:{input:{type:"structure",required:["destinationName"],members:{destinationName:{}}}},DeleteLogGroup:{input:{type:"structure",required:["logGroupName"],members:{logGroupName:{}}}},DeleteLogStream:{input:{type:"structure",required:["logGroupName","logStreamName"],members:{logGroupName:{},logStreamName:{}}}},DeleteMetricFilter:{input:{type:"structure",required:["logGroupName","filterName"],members:{logGroupName:{},filterName:{}}}},DeleteResourcePolicy:{input:{type:"structure",members:{policyName:{}}}},DeleteRetentionPolicy:{input:{type:"structure",required:["logGroupName"],members:{logGroupName:{}}}},DeleteSubscriptionFilter:{input:{type:"structure",required:["logGroupName","filterName"],members:{logGroupName:{},filterName:{}}}},DescribeDestinations:{input:{type:"structure",members:{DestinationNamePrefix:{},nextToken:{},limit:{type:"integer"}}},output:{type:"structure",members:{destinations:{type:"list",member:{shape:"Sx"}},nextToken:{}}}},DescribeExportTasks:{input:{type:"structure",members:{taskId:{},statusCode:{},nextToken:{},limit:{type:"integer"}}},output:{type:"structure",members:{exportTasks:{type:"list",member:{type:"structure",members:{taskId:{},taskName:{},logGroupName:{},from:{type:"long"},to:{type:"long"},destination:{},destinationPrefix:{},status:{type:"structure",members:{code:{},message:{}}},executionInfo:{type:"structure",members:{creationTime:{type:"long"},completionTime:{type:"long"}}}}}},nextToken:{}}}},DescribeLogGroups:{input:{type:"structure",members:{logGroupNamePrefix:{},nextToken:{},limit:{type:"integer"}}},output:{type:"structure",members:{logGroups:{type:"list",member:{type:"structure",members:{logGroupName:{},creationTime:{type:"long"},retentionInDays:{type:"integer"},metricFilterCount:{type:"integer"},arn:{},storedBytes:{type:"long"},kmsKeyId:{}}}},nextToken:{}}}},DescribeLogStreams:{input:{type:"structure",required:["logGroupName"],members:{logGroupName:{},logStreamNamePrefix:{},orderBy:{},descending:{type:"boolean"},nextToken:{},limit:{type:"integer"}}},output:{type:"structure",members:{logStreams:{type:"list",member:{type:"structure",members:{logStreamName:{},creationTime:{type:"long"},firstEventTimestamp:{type:"long"},lastEventTimestamp:{type:"long"},lastIngestionTime:{type:"long"},uploadSequenceToken:{},arn:{},storedBytes:{type:"long"}}}},nextToken:{}}}},DescribeMetricFilters:{input:{type:"structure",members:{logGroupName:{},filterNamePrefix:{},nextToken:{},limit:{type:"integer"},metricName:{},metricNamespace:{}}},output:{type:"structure",members:{metricFilters:{type:"list",member:{type:"structure",members:{filterName:{},filterPattern:{},metricTransformations:{shape:"S1v"},creationTime:{type:"long"},logGroupName:{}}}},nextToken:{}}}},DescribeResourcePolicies:{input:{type:"structure",members:{nextToken:{},limit:{type:"integer"}}},output:{type:"structure",members:{resourcePolicies:{type:"list",member:{shape:"S22"}},nextToken:{}}}},DescribeSubscriptionFilters:{input:{type:"structure",required:["logGroupName"],members:{logGroupName:{},filterNamePrefix:{},nextToken:{},limit:{type:"integer"}}},output:{type:"structure",members:{subscriptionFilters:{type:"list",member:{type:"structure",members:{filterName:{},logGroupName:{},filterPattern:{},destinationArn:{},roleArn:{},distribution:{},creationTime:{type:"long"}}}},nextToken:{}}}},DisassociateKmsKey:{input:{type:"structure",required:["logGroupName"],members:{logGroupName:{}}}},FilterLogEvents:{input:{type:"structure",required:["logGroupName"],members:{logGroupName:{},logStreamNames:{type:"list",member:{}},logStreamNamePrefix:{},startTime:{type:"long"},endTime:{type:"long"},filterPattern:{},nextToken:{},limit:{type:"integer"},interleaved:{type:"boolean"}}},output:{type:"structure",members:{events:{type:"list",member:{type:"structure",members:{logStreamName:{},timestamp:{type:"long"},message:{},ingestionTime:{type:"long"},eventId:{}}}},searchedLogStreams:{type:"list",member:{type:"structure",members:{logStreamName:{},searchedCompletely:{type:"boolean"}}}},nextToken:{}}}},GetLogEvents:{input:{type:"structure",required:["logGroupName","logStreamName"],members:{logGroupName:{},logStreamName:{},startTime:{type:"long"},endTime:{type:"long"},nextToken:{},limit:{type:"integer"},startFromHead:{type:"boolean"}}},output:{type:"structure",members:{events:{type:"list",member:{type:"structure",members:{timestamp:{type:"long"},message:{},ingestionTime:{type:"long"}}}},nextForwardToken:{},nextBackwardToken:{}}}},ListTagsLogGroup:{input:{type:"structure",required:["logGroupName"],members:{logGroupName:{}}},output:{type:"structure",members:{tags:{shape:"Se"}}}},PutDestination:{input:{type:"structure",required:["destinationName","targetArn","roleArn"],members:{destinationName:{},targetArn:{},roleArn:{}}},output:{type:"structure",members:{destination:{shape:"Sx"}}}},PutDestinationPolicy:{input:{type:"structure",required:["destinationName","accessPolicy"],members:{destinationName:{},accessPolicy:{}}}},PutLogEvents:{input:{type:"structure",required:["logGroupName","logStreamName","logEvents"],members:{logGroupName:{},logStreamName:{},logEvents:{type:"list",member:{type:"structure",required:["timestamp","message"],members:{timestamp:{type:"long"},message:{}}}},sequenceToken:{}}},output:{type:"structure",members:{nextSequenceToken:{},rejectedLogEventsInfo:{type:"structure",members:{tooNewLogEventStartIndex:{type:"integer"},tooOldLogEventEndIndex:{type:"integer"},expiredLogEventEndIndex:{type:"integer"}}}}}},PutMetricFilter:{input:{type:"structure",required:["logGroupName","filterName","filterPattern","metricTransformations"],members:{logGroupName:{},filterName:{},filterPattern:{},metricTransformations:{shape:"S1v"}}}},PutResourcePolicy:{input:{type:"structure",members:{policyName:{},policyDocument:{}}},output:{type:"structure",members:{resourcePolicy:{shape:"S22"}}}},PutRetentionPolicy:{input:{type:"structure",required:["logGroupName","retentionInDays"],members:{logGroupName:{},retentionInDays:{type:"integer"}}}},PutSubscriptionFilter:{input:{type:"structure",required:["logGroupName","filterName","filterPattern","destinationArn"],members:{logGroupName:{},filterName:{},filterPattern:{},destinationArn:{},roleArn:{},distribution:{}}}},TagLogGroup:{input:{type:"structure",required:["logGroupName","tags"],members:{logGroupName:{},tags:{shape:"Se"}}}},TestMetricFilter:{input:{type:"structure",required:["filterPattern","logEventMessages"],members:{filterPattern:{},logEventMessages:{type:"list",member:{}}}},output:{type:"structure",members:{matches:{type:"list",member:{type:"structure",members:{eventNumber:{type:"long"},eventMessage:{},extractedValues:{type:"map",key:{},value:{}}}}}}}},UntagLogGroup:{input:{type:"structure",required:["logGroupName","tags"],members:{logGroupName:{},tags:{type:"list",member:{}}}}}},shapes:{Se:{type:"map",key:{},value:{}},Sx:{type:"structure",members:{destinationName:{},targetArn:{},roleArn:{},accessPolicy:{},arn:{},creationTime:{type:"long"}}},S1v:{type:"list",member:{type:"structure",required:["metricName","metricNamespace","metricValue"],members:{metricName:{},metricNamespace:{},metricValue:{},defaultValue:{type:"double"}}}},S22:{type:"structure",members:{policyName:{},policyDocument:{},lastUpdatedTime:{type:"long"}}}},paginators:{DescribeDestinations:{input_token:"nextToken",limit_key:"limit",output_token:"nextToken",result_key:"destinations"},DescribeLogGroups:{input_token:"nextToken",limit_key:"limit",output_token:"nextToken",result_key:"logGroups"},DescribeLogStreams:{input_token:"nextToken",limit_key:"limit",output_token:"nextToken",result_key:"logStreams"},DescribeMetricFilters:{input_token:"nextToken",limit_key:"limit",output_token:"nextToken",result_key:"metricFilters"},DescribeSubscriptionFilters:{input_token:"nextToken",limit_key:"limit",output_token:"nextToken",result_key:"subscriptionFilters"},FilterLogEvents:{input_token:"nextToken",limit_key:"limit",output_token:"nextToken",result_key:["events","searchedLogStreams"]},GetLogEvents:{input_token:"nextToken",limit_key:"limit",output_token:"nextForwardToken",result_key:"events"}}},AWS.apiLoader.services.cognitoidentityserviceprovider={},AWS.CognitoIdentityServiceProvider=AWS.Service.defineService("cognitoidentityserviceprovider",["2016-04-18"]),AWS.apiLoader.services.cognitoidentityserviceprovider["2016-04-18"]={version:"2.0",metadata:{apiVersion:"2016-04-18",endpointPrefix:"cognito-idp",jsonVersion:"1.1",protocol:"json",serviceFullName:"Amazon Cognito Identity Provider",serviceId:"Cognito Identity Provider",signatureVersion:"v4",targetPrefix:"AWSCognitoIdentityProviderService",uid:"cognito-idp-2016-04-18"},operations:{AddCustomAttributes:{input:{type:"structure",required:["UserPoolId","CustomAttributes"],members:{UserPoolId:{},CustomAttributes:{type:"list",member:{shape:"S4"}}}},output:{type:"structure",members:{}}},AdminAddUserToGroup:{input:{type:"structure",required:["UserPoolId","Username","GroupName"],members:{UserPoolId:{},Username:{shape:"Sd"},GroupName:{}}}},AdminConfirmSignUp:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",members:{}}},AdminCreateUser:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"},UserAttributes:{shape:"Si"},ValidationData:{shape:"Si"},TemporaryPassword:{shape:"Sm"},ForceAliasCreation:{type:"boolean"},MessageAction:{},DesiredDeliveryMediums:{type:"list",member:{}}}},output:{type:"structure",members:{User:{shape:"Ss"}}}},AdminDeleteUser:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}}},AdminDeleteUserAttributes:{input:{type:"structure",required:["UserPoolId","Username","UserAttributeNames"],members:{UserPoolId:{},Username:{shape:"Sd"},UserAttributeNames:{shape:"Sz"}}},output:{type:"structure",members:{}}},AdminDisableProviderForUser:{input:{type:"structure",required:["UserPoolId","User"],members:{UserPoolId:{},User:{shape:"S12"}}},output:{type:"structure",members:{}}},AdminDisableUser:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",members:{}}},AdminEnableUser:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",members:{}}},AdminForgetDevice:{input:{type:"structure",required:["UserPoolId","Username","DeviceKey"],members:{UserPoolId:{},Username:{shape:"Sd"},DeviceKey:{}}}},AdminGetDevice:{input:{type:"structure",required:["DeviceKey","UserPoolId","Username"],members:{DeviceKey:{},UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",required:["Device"],members:{Device:{shape:"S1d"}}}},AdminGetUser:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",required:["Username"],members:{Username:{shape:"Sd"},UserAttributes:{shape:"Si"},UserCreateDate:{type:"timestamp"},UserLastModifiedDate:{type:"timestamp"},Enabled:{type:"boolean"},UserStatus:{},MFAOptions:{shape:"Sv"},PreferredMfaSetting:{},UserMFASettingList:{shape:"S1g"}}}},AdminInitiateAuth:{input:{type:"structure",required:["UserPoolId","ClientId","AuthFlow"],members:{UserPoolId:{},ClientId:{shape:"S1i"},AuthFlow:{},AuthParameters:{shape:"S1k"},ClientMetadata:{shape:"S1l"},AnalyticsMetadata:{shape:"S1m"},ContextData:{shape:"S1n"}}},output:{type:"structure",members:{ChallengeName:{},Session:{},ChallengeParameters:{shape:"S1t"},AuthenticationResult:{shape:"S1u"}}}},AdminLinkProviderForUser:{input:{type:"structure",required:["UserPoolId","DestinationUser","SourceUser"],members:{UserPoolId:{},DestinationUser:{shape:"S12"},SourceUser:{shape:"S12"}}},output:{type:"structure",members:{}}},AdminListDevices:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"},Limit:{type:"integer"},PaginationToken:{}}},output:{type:"structure",members:{Devices:{shape:"S24"},PaginationToken:{}}}},AdminListGroupsForUser:{input:{type:"structure",required:["Username","UserPoolId"],members:{Username:{shape:"Sd"},UserPoolId:{},Limit:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{Groups:{shape:"S28"},NextToken:{}}}},AdminListUserAuthEvents:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"},MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{AuthEvents:{type:"list",member:{type:"structure",members:{EventId:{},EventType:{},CreationDate:{type:"timestamp"},EventResponse:{},EventRisk:{type:"structure",members:{RiskDecision:{},RiskLevel:{}}},ChallengeResponses:{type:"list",member:{type:"structure",members:{ChallengeName:{},ChallengeResponse:{}}}},EventContextData:{type:"structure",members:{IpAddress:{},DeviceName:{},Timezone:{},City:{},Country:{}}},EventFeedback:{type:"structure",required:["FeedbackValue","Provider"],members:{FeedbackValue:{},Provider:{},FeedbackDate:{type:"timestamp"}}}}}},NextToken:{}}}},AdminRemoveUserFromGroup:{input:{type:"structure",required:["UserPoolId","Username","GroupName"],members:{UserPoolId:{},Username:{shape:"Sd"},GroupName:{}}}},AdminResetUserPassword:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",members:{}}},AdminRespondToAuthChallenge:{input:{type:"structure",required:["UserPoolId","ClientId","ChallengeName"],members:{UserPoolId:{},ClientId:{shape:"S1i"},ChallengeName:{},ChallengeResponses:{shape:"S2x"},Session:{},AnalyticsMetadata:{shape:"S1m"},ContextData:{shape:"S1n"}}},output:{type:"structure",members:{ChallengeName:{},Session:{},ChallengeParameters:{shape:"S1t"},AuthenticationResult:{shape:"S1u"}}}},AdminSetUserMFAPreference:{input:{type:"structure",required:["Username","UserPoolId"],members:{SMSMfaSettings:{shape:"S30"},SoftwareTokenMfaSettings:{shape:"S31"},Username:{shape:"Sd"},UserPoolId:{}}},output:{type:"structure",members:{}}},AdminSetUserSettings:{input:{type:"structure",required:["UserPoolId","Username","MFAOptions"],members:{UserPoolId:{},Username:{shape:"Sd"},MFAOptions:{shape:"Sv"}}},output:{type:"structure",members:{}}},AdminUpdateAuthEventFeedback:{input:{type:"structure",required:["UserPoolId","Username","EventId","FeedbackValue"],members:{UserPoolId:{},Username:{shape:"Sd"},EventId:{},FeedbackValue:{}}},output:{type:"structure",members:{}}},AdminUpdateDeviceStatus:{input:{type:"structure",required:["UserPoolId","Username","DeviceKey"],members:{UserPoolId:{},Username:{shape:"Sd"},DeviceKey:{},DeviceRememberedStatus:{}}},output:{type:"structure",members:{}}},AdminUpdateUserAttributes:{input:{type:"structure",required:["UserPoolId","Username","UserAttributes"],members:{UserPoolId:{},Username:{shape:"Sd"},UserAttributes:{shape:"Si"}}},output:{type:"structure",members:{}}},AdminUserGlobalSignOut:{input:{type:"structure",required:["UserPoolId","Username"],members:{UserPoolId:{},Username:{shape:"Sd"}}},output:{type:"structure",members:{}}},AssociateSoftwareToken:{input:{type:"structure",members:{AccessToken:{shape:"S1v"},Session:{}}},output:{type:"structure",members:{SecretCode:{type:"string",sensitive:!0},Session:{}}}},ChangePassword:{input:{type:"structure",required:["PreviousPassword","ProposedPassword","AccessToken"],members:{PreviousPassword:{shape:"Sm"},ProposedPassword:{shape:"Sm"},AccessToken:{shape:"S1v"}}},output:{type:"structure",members:{}},authtype:"none"},ConfirmDevice:{input:{type:"structure",required:["AccessToken","DeviceKey"],members:{AccessToken:{shape:"S1v"},DeviceKey:{},DeviceSecretVerifierConfig:{type:"structure",members:{PasswordVerifier:{},Salt:{}}},DeviceName:{}}},output:{type:"structure",members:{UserConfirmationNecessary:{type:"boolean"}}}},ConfirmForgotPassword:{input:{type:"structure",required:["ClientId","Username","ConfirmationCode","Password"],members:{ClientId:{shape:"S1i"},SecretHash:{shape:"S3p"},Username:{shape:"Sd"},ConfirmationCode:{},Password:{shape:"Sm"},AnalyticsMetadata:{shape:"S1m"},UserContextData:{shape:"S3r"}}},output:{type:"structure",members:{}},authtype:"none"},ConfirmSignUp:{input:{type:"structure",required:["ClientId","Username","ConfirmationCode"],members:{ClientId:{shape:"S1i"},SecretHash:{shape:"S3p"},Username:{shape:"Sd"},ConfirmationCode:{},ForceAliasCreation:{type:"boolean"},AnalyticsMetadata:{shape:"S1m"},UserContextData:{shape:"S3r"}}},output:{type:"structure",members:{}},authtype:"none"},CreateGroup:{input:{type:"structure",required:["GroupName","UserPoolId"],members:{GroupName:{},UserPoolId:{},Description:{},RoleArn:{},Precedence:{type:"integer"}}},output:{type:"structure",members:{Group:{shape:"S29"}}}},CreateIdentityProvider:{input:{type:"structure",required:["UserPoolId","ProviderName","ProviderType","ProviderDetails"],members:{UserPoolId:{},ProviderName:{},ProviderType:{},ProviderDetails:{shape:"S40"},AttributeMapping:{shape:"S41"},IdpIdentifiers:{shape:"S43"}}},output:{type:"structure",required:["IdentityProvider"],members:{IdentityProvider:{shape:"S46"}}}},CreateResourceServer:{input:{type:"structure",required:["UserPoolId","Identifier","Name"],members:{UserPoolId:{},Identifier:{},Name:{},Scopes:{shape:"S4a"}}},output:{type:"structure",required:["ResourceServer"],members:{ResourceServer:{shape:"S4f"}}}},CreateUserImportJob:{input:{type:"structure",required:["JobName","UserPoolId","CloudWatchLogsRoleArn"],members:{JobName:{},UserPoolId:{},CloudWatchLogsRoleArn:{}}},output:{type:"structure",members:{UserImportJob:{shape:"S4j"}}}},CreateUserPool:{input:{type:"structure",required:["PoolName"],members:{PoolName:{},Policies:{shape:"S4r"},LambdaConfig:{shape:"S4u"},AutoVerifiedAttributes:{shape:"S4v"},AliasAttributes:{shape:"S4x"},UsernameAttributes:{shape:"S4z"},SmsVerificationMessage:{},EmailVerificationMessage:{},EmailVerificationSubject:{},VerificationMessageTemplate:{shape:"S54"},SmsAuthenticationMessage:{},MfaConfiguration:{},DeviceConfiguration:{shape:"S59"},EmailConfiguration:{shape:"S5a"},SmsConfiguration:{shape:"S5c"},UserPoolTags:{shape:"S5d"},AdminCreateUserConfig:{shape:"S5e"},Schema:{shape:"S5h"},UserPoolAddOns:{shape:"S5i"}}},output:{type:"structure",members:{UserPool:{shape:"S5l"}}}},CreateUserPoolClient:{input:{type:"structure",required:["UserPoolId","ClientName"],members:{UserPoolId:{},ClientName:{},GenerateSecret:{type:"boolean"},RefreshTokenValidity:{type:"integer"},ReadAttributes:{shape:"S5s"},WriteAttributes:{shape:"S5s"},ExplicitAuthFlows:{shape:"S5u"},SupportedIdentityProviders:{shape:"S5w"},CallbackURLs:{shape:"S5x"},LogoutURLs:{shape:"S5z"},DefaultRedirectURI:{},AllowedOAuthFlows:{shape:"S60"},AllowedOAuthScopes:{shape:"S62"},AllowedOAuthFlowsUserPoolClient:{type:"boolean"},AnalyticsConfiguration:{shape:"S64"}}},output:{type:"structure",members:{UserPoolClient:{shape:"S67"}}}},CreateUserPoolDomain:{input:{type:"structure",required:["Domain","UserPoolId"],members:{Domain:{},UserPoolId:{},CustomDomainConfig:{shape:"S6a"}}},output:{type:"structure",members:{CloudFrontDomain:{}}}},DeleteGroup:{input:{type:"structure",required:["GroupName","UserPoolId"],members:{GroupName:{},UserPoolId:{}}}},DeleteIdentityProvider:{input:{type:"structure",required:["UserPoolId","ProviderName"],members:{UserPoolId:{},ProviderName:{}}}},DeleteResourceServer:{input:{type:"structure",required:["UserPoolId","Identifier"],members:{UserPoolId:{},Identifier:{}}}},DeleteUser:{input:{type:"structure",required:["AccessToken"],members:{AccessToken:{shape:"S1v"}}},authtype:"none"},DeleteUserAttributes:{input:{type:"structure",required:["UserAttributeNames","AccessToken"],members:{UserAttributeNames:{shape:"Sz"},AccessToken:{shape:"S1v"}}},output:{type:"structure",members:{}},authtype:"none"},DeleteUserPool:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{}}}},DeleteUserPoolClient:{input:{type:"structure",required:["UserPoolId","ClientId"],members:{UserPoolId:{},ClientId:{shape:"S1i"}}}},DeleteUserPoolDomain:{input:{type:"structure",required:["Domain","UserPoolId"],members:{Domain:{},UserPoolId:{}}},output:{type:"structure",members:{}}},DescribeIdentityProvider:{input:{type:"structure",required:["UserPoolId","ProviderName"],members:{UserPoolId:{},ProviderName:{}}},output:{type:"structure",required:["IdentityProvider"],members:{IdentityProvider:{shape:"S46"}}}},DescribeResourceServer:{input:{type:"structure",required:["UserPoolId","Identifier"],members:{UserPoolId:{},Identifier:{}}},output:{type:"structure",required:["ResourceServer"],members:{ResourceServer:{shape:"S4f"}}}},DescribeRiskConfiguration:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},ClientId:{shape:"S1i"}}},output:{type:"structure",required:["RiskConfiguration"],members:{RiskConfiguration:{shape:"S6s"}}}},DescribeUserImportJob:{input:{type:"structure",required:["UserPoolId","JobId"],members:{UserPoolId:{},JobId:{}}},output:{type:"structure",members:{UserImportJob:{shape:"S4j"}}}},DescribeUserPool:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{}}},output:{type:"structure",members:{UserPool:{shape:"S5l"}}}},DescribeUserPoolClient:{input:{type:"structure",required:["UserPoolId","ClientId"],members:{UserPoolId:{},ClientId:{shape:"S1i"}}},output:{type:"structure",members:{UserPoolClient:{shape:"S67"}}}},DescribeUserPoolDomain:{input:{type:"structure",required:["Domain"],members:{Domain:{}}},output:{type:"structure",members:{DomainDescription:{type:"structure",members:{UserPoolId:{},AWSAccountId:{},Domain:{},S3Bucket:{},CloudFrontDistribution:{},Version:{},Status:{},CustomDomainConfig:{shape:"S6a"}}}}}},ForgetDevice:{input:{type:"structure",required:["DeviceKey"],members:{AccessToken:{shape:"S1v"},DeviceKey:{}}}},ForgotPassword:{input:{type:"structure",required:["ClientId","Username"],members:{ClientId:{shape:"S1i"},SecretHash:{shape:"S3p"},UserContextData:{shape:"S3r"},Username:{shape:"Sd"},AnalyticsMetadata:{shape:"S1m"}}},output:{type:"structure",members:{CodeDeliveryDetails:{shape:"S7q"}}},authtype:"none"},GetCSVHeader:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{}}},output:{type:"structure",members:{UserPoolId:{},CSVHeader:{type:"list",member:{}}}}},GetDevice:{input:{type:"structure",required:["DeviceKey"],members:{DeviceKey:{},AccessToken:{shape:"S1v"}}},output:{type:"structure",required:["Device"],members:{Device:{shape:"S1d"}}}},GetGroup:{input:{type:"structure",required:["GroupName","UserPoolId"],members:{GroupName:{},UserPoolId:{}}},output:{type:"structure",members:{Group:{shape:"S29"}}}},GetIdentityProviderByIdentifier:{input:{type:"structure",required:["UserPoolId","IdpIdentifier"],members:{UserPoolId:{},IdpIdentifier:{}}},output:{type:"structure",required:["IdentityProvider"],members:{IdentityProvider:{shape:"S46"}}}},GetSigningCertificate:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{}}},output:{type:"structure",members:{Certificate:{}}}},GetUICustomization:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},ClientId:{shape:"S1i"}}},output:{type:"structure",required:["UICustomization"],members:{UICustomization:{shape:"S84"}}}},GetUser:{input:{type:"structure",required:["AccessToken"],members:{AccessToken:{shape:"S1v"}}},output:{type:"structure",required:["Username","UserAttributes"],members:{Username:{shape:"Sd"},UserAttributes:{shape:"Si"},MFAOptions:{shape:"Sv"},PreferredMfaSetting:{},UserMFASettingList:{shape:"S1g"}}},authtype:"none"},GetUserAttributeVerificationCode:{input:{type:"structure",required:["AccessToken","AttributeName"],members:{AccessToken:{shape:"S1v"},AttributeName:{}}},output:{type:"structure",members:{CodeDeliveryDetails:{shape:"S7q"}}},authtype:"none"},GetUserPoolMfaConfig:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{}}},output:{type:"structure",members:{SmsMfaConfiguration:{shape:"S8e"},SoftwareTokenMfaConfiguration:{shape:"S8f"},MfaConfiguration:{}}}},GlobalSignOut:{input:{type:"structure",required:["AccessToken"],members:{AccessToken:{shape:"S1v"}}},output:{type:"structure",members:{}}},InitiateAuth:{input:{type:"structure",required:["AuthFlow","ClientId"],members:{AuthFlow:{},AuthParameters:{shape:"S1k"},ClientMetadata:{shape:"S1l"},ClientId:{shape:"S1i"},AnalyticsMetadata:{shape:"S1m"},UserContextData:{shape:"S3r"}}},output:{type:"structure",members:{ChallengeName:{},Session:{},ChallengeParameters:{shape:"S1t"},AuthenticationResult:{shape:"S1u"}}}},ListDevices:{input:{type:"structure",required:["AccessToken"],members:{AccessToken:{shape:"S1v"},Limit:{type:"integer"},PaginationToken:{}}},output:{type:"structure",members:{Devices:{shape:"S24"},PaginationToken:{}}}},ListGroups:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},Limit:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{Groups:{shape:"S28"},NextToken:{}}}},ListIdentityProviders:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",required:["Providers"],members:{Providers:{type:"list",member:{type:"structure",members:{ProviderName:{},ProviderType:{},LastModifiedDate:{type:"timestamp"},CreationDate:{type:"timestamp"}}}},NextToken:{}}}},ListResourceServers:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",required:["ResourceServers"],members:{ResourceServers:{type:"list",member:{shape:"S4f"}},NextToken:{}}}},ListUserImportJobs:{input:{type:"structure",required:["UserPoolId","MaxResults"],members:{UserPoolId:{},MaxResults:{type:"integer"},PaginationToken:{}}},output:{type:"structure",members:{UserImportJobs:{type:"list",member:{shape:"S4j"}},PaginationToken:{}}}},ListUserPoolClients:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{UserPoolClients:{type:"list",member:{type:"structure",members:{ClientId:{shape:"S1i"},UserPoolId:{},ClientName:{}}}},NextToken:{}}}},ListUserPools:{input:{type:"structure",required:["MaxResults"],members:{NextToken:{},MaxResults:{type:"integer"}}},output:{type:"structure",members:{UserPools:{type:"list",member:{type:"structure",members:{Id:{},Name:{},LambdaConfig:{shape:"S4u"},Status:{},LastModifiedDate:{type:"timestamp"},CreationDate:{type:"timestamp"}}}},NextToken:{}}}},ListUsers:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},AttributesToGet:{type:"list",member:{}},Limit:{type:"integer"},PaginationToken:{},Filter:{}}},output:{type:"structure",members:{Users:{shape:"S9f"},PaginationToken:{}}}},ListUsersInGroup:{input:{type:"structure",required:["UserPoolId","GroupName"],members:{UserPoolId:{},GroupName:{},Limit:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{Users:{shape:"S9f"},NextToken:{}}}},ResendConfirmationCode:{input:{type:"structure",required:["ClientId","Username"],members:{ClientId:{shape:"S1i"},SecretHash:{shape:"S3p"},UserContextData:{shape:"S3r"},Username:{shape:"Sd"},AnalyticsMetadata:{shape:"S1m"}}},output:{type:"structure",members:{CodeDeliveryDetails:{shape:"S7q"}}},authtype:"none"},RespondToAuthChallenge:{input:{type:"structure",required:["ClientId","ChallengeName"],members:{ClientId:{shape:"S1i"},ChallengeName:{},Session:{},ChallengeResponses:{shape:"S2x"},AnalyticsMetadata:{shape:"S1m"},UserContextData:{shape:"S3r"}}},output:{type:"structure",members:{ChallengeName:{},Session:{},ChallengeParameters:{shape:"S1t"},AuthenticationResult:{shape:"S1u"}}}},SetRiskConfiguration:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},ClientId:{shape:"S1i"},CompromisedCredentialsRiskConfiguration:{shape:"S6t"},AccountTakeoverRiskConfiguration:{shape:"S6y"},RiskExceptionConfiguration:{shape:"S77"}}},output:{type:"structure",required:["RiskConfiguration"],members:{RiskConfiguration:{shape:"S6s"}}}},SetUICustomization:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},ClientId:{shape:"S1i"},CSS:{},ImageFile:{type:"blob"}}},output:{type:"structure",required:["UICustomization"],members:{UICustomization:{shape:"S84"}}}},SetUserMFAPreference:{input:{type:"structure",required:["AccessToken"],members:{SMSMfaSettings:{shape:"S30"},SoftwareTokenMfaSettings:{shape:"S31"},AccessToken:{shape:"S1v"}}},output:{type:"structure",members:{}}},SetUserPoolMfaConfig:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},SmsMfaConfiguration:{shape:"S8e"},SoftwareTokenMfaConfiguration:{shape:"S8f"},MfaConfiguration:{}}},output:{type:"structure",members:{SmsMfaConfiguration:{shape:"S8e"},SoftwareTokenMfaConfiguration:{shape:"S8f"},MfaConfiguration:{}}}},SetUserSettings:{input:{type:"structure",required:["AccessToken","MFAOptions"],members:{AccessToken:{shape:"S1v"},MFAOptions:{shape:"Sv"}}},output:{type:"structure",members:{}},authtype:"none"},SignUp:{input:{type:"structure",required:["ClientId","Username","Password"],members:{ClientId:{shape:"S1i"},SecretHash:{shape:"S3p"},Username:{shape:"Sd"},Password:{shape:"Sm"},UserAttributes:{shape:"Si"},ValidationData:{shape:"Si"},AnalyticsMetadata:{shape:"S1m"},UserContextData:{shape:"S3r"}}},output:{type:"structure",required:["UserConfirmed","UserSub"],members:{UserConfirmed:{type:"boolean"},CodeDeliveryDetails:{shape:"S7q"},UserSub:{}}},authtype:"none"},StartUserImportJob:{input:{type:"structure",required:["UserPoolId","JobId"],members:{UserPoolId:{},JobId:{}}},output:{type:"structure",members:{UserImportJob:{shape:"S4j"}}}},StopUserImportJob:{input:{type:"structure",required:["UserPoolId","JobId"],members:{UserPoolId:{},JobId:{}}},output:{type:"structure",members:{UserImportJob:{shape:"S4j"}}}},UpdateAuthEventFeedback:{input:{type:"structure",required:["UserPoolId","Username","EventId","FeedbackToken","FeedbackValue"],members:{UserPoolId:{},Username:{shape:"Sd"},EventId:{},FeedbackToken:{shape:"S1v"},FeedbackValue:{}}},output:{type:"structure",members:{}}},UpdateDeviceStatus:{input:{type:"structure",required:["AccessToken","DeviceKey"],members:{AccessToken:{shape:"S1v"},DeviceKey:{},DeviceRememberedStatus:{}}},output:{type:"structure",members:{}}},UpdateGroup:{input:{type:"structure",required:["GroupName","UserPoolId"],members:{GroupName:{},UserPoolId:{},Description:{},RoleArn:{},Precedence:{type:"integer"}}},output:{type:"structure",members:{Group:{shape:"S29"}}}},UpdateIdentityProvider:{input:{type:"structure",required:["UserPoolId","ProviderName"],members:{UserPoolId:{},ProviderName:{},ProviderDetails:{shape:"S40"},AttributeMapping:{shape:"S41"},IdpIdentifiers:{shape:"S43"}}},output:{type:"structure",required:["IdentityProvider"],members:{IdentityProvider:{shape:"S46"}}}},UpdateResourceServer:{input:{type:"structure",required:["UserPoolId","Identifier","Name"],members:{UserPoolId:{},Identifier:{},Name:{},Scopes:{shape:"S4a"}}},output:{type:"structure",required:["ResourceServer"],members:{ResourceServer:{shape:"S4f"}}}},UpdateUserAttributes:{input:{type:"structure",required:["UserAttributes","AccessToken"],members:{UserAttributes:{shape:"Si"},AccessToken:{shape:"S1v"}}},output:{type:"structure",members:{CodeDeliveryDetailsList:{type:"list",member:{shape:"S7q"}}}},authtype:"none"},UpdateUserPool:{input:{type:"structure",required:["UserPoolId"],members:{UserPoolId:{},Policies:{shape:"S4r"},LambdaConfig:{shape:"S4u"},AutoVerifiedAttributes:{shape:"S4v"},SmsVerificationMessage:{},EmailVerificationMessage:{},EmailVerificationSubject:{},VerificationMessageTemplate:{shape:"S54"},SmsAuthenticationMessage:{},MfaConfiguration:{},DeviceConfiguration:{shape:"S59"},EmailConfiguration:{shape:"S5a"},SmsConfiguration:{shape:"S5c"},UserPoolTags:{shape:"S5d"},AdminCreateUserConfig:{shape:"S5e"},UserPoolAddOns:{shape:"S5i"}}},output:{type:"structure",members:{}}},UpdateUserPoolClient:{input:{type:"structure",required:["UserPoolId","ClientId"],members:{UserPoolId:{},ClientId:{shape:"S1i"},ClientName:{},RefreshTokenValidity:{type:"integer"},ReadAttributes:{shape:"S5s"},WriteAttributes:{shape:"S5s"},ExplicitAuthFlows:{shape:"S5u"},SupportedIdentityProviders:{shape:"S5w"},CallbackURLs:{shape:"S5x"},LogoutURLs:{shape:"S5z"},DefaultRedirectURI:{},AllowedOAuthFlows:{shape:"S60"},AllowedOAuthScopes:{shape:"S62"},AllowedOAuthFlowsUserPoolClient:{type:"boolean"},AnalyticsConfiguration:{shape:"S64"}}},output:{type:"structure",members:{UserPoolClient:{shape:"S67"}}}},VerifySoftwareToken:{input:{type:"structure",required:["UserCode"],members:{AccessToken:{shape:"S1v"},Session:{},UserCode:{},FriendlyDeviceName:{}}},output:{type:"structure",members:{Status:{},Session:{}}}},VerifyUserAttribute:{input:{type:"structure",required:["AccessToken","AttributeName","Code"],members:{AccessToken:{shape:"S1v"},AttributeName:{},Code:{}}},output:{type:"structure",members:{}},authtype:"none"}},shapes:{S4:{type:"structure",members:{Name:{},AttributeDataType:{},DeveloperOnlyAttribute:{type:"boolean"},Mutable:{type:"boolean"},Required:{type:"boolean"},NumberAttributeConstraints:{type:"structure",members:{MinValue:{},MaxValue:{}}},StringAttributeConstraints:{type:"structure",members:{MinLength:{},MaxLength:{}}}}},Sd:{type:"string",sensitive:!0},Si:{type:"list",member:{type:"structure",required:["Name"],members:{Name:{},Value:{type:"string",sensitive:!0}}}},Sm:{type:"string",sensitive:!0},Ss:{type:"structure",members:{Username:{shape:"Sd"},Attributes:{shape:"Si"},UserCreateDate:{type:"timestamp"},UserLastModifiedDate:{type:"timestamp"},Enabled:{type:"boolean"},UserStatus:{},MFAOptions:{shape:"Sv"}}},Sv:{type:"list",member:{type:"structure",members:{DeliveryMedium:{},AttributeName:{}}}},Sz:{type:"list",member:{}},S12:{type:"structure",members:{ProviderName:{},ProviderAttributeName:{},ProviderAttributeValue:{}}},S1d:{type:"structure",members:{DeviceKey:{},DeviceAttributes:{shape:"Si"},DeviceCreateDate:{type:"timestamp"},DeviceLastModifiedDate:{type:"timestamp"},DeviceLastAuthenticatedDate:{type:"timestamp"}}},S1g:{type:"list",member:{}},S1i:{type:"string",sensitive:!0},S1k:{type:"map",key:{},value:{}},S1l:{type:"map",key:{},value:{}},S1m:{type:"structure",members:{AnalyticsEndpointId:{}}},S1n:{type:"structure",required:["IpAddress","ServerName","ServerPath","HttpHeaders"],members:{IpAddress:{},ServerName:{},ServerPath:{},HttpHeaders:{type:"list",member:{type:"structure",members:{headerName:{},headerValue:{}}}},EncodedData:{}}},S1t:{type:"map",key:{},value:{}},S1u:{type:"structure",members:{AccessToken:{shape:"S1v"},ExpiresIn:{type:"integer"},TokenType:{},RefreshToken:{shape:"S1v"},IdToken:{shape:"S1v"},NewDeviceMetadata:{type:"structure",members:{DeviceKey:{},DeviceGroupKey:{}}}}},S1v:{type:"string",sensitive:!0},S24:{type:"list",member:{shape:"S1d"}},S28:{type:"list",member:{shape:"S29"}},S29:{type:"structure",members:{GroupName:{},UserPoolId:{},Description:{},RoleArn:{},Precedence:{type:"integer"},LastModifiedDate:{type:"timestamp"},CreationDate:{type:"timestamp"}}},S2x:{type:"map",key:{},value:{}},S30:{type:"structure",members:{Enabled:{type:"boolean"},PreferredMfa:{type:"boolean"}}},S31:{type:"structure",members:{Enabled:{type:"boolean"},PreferredMfa:{type:"boolean"}}},S3p:{type:"string",sensitive:!0},S3r:{type:"structure",members:{EncodedData:{}}},S40:{type:"map",key:{},value:{}},S41:{type:"map",key:{},value:{}},S43:{type:"list",member:{}},S46:{type:"structure",members:{UserPoolId:{},ProviderName:{},ProviderType:{},ProviderDetails:{shape:"S40"},AttributeMapping:{shape:"S41"},IdpIdentifiers:{shape:"S43"},LastModifiedDate:{type:"timestamp"},CreationDate:{type:"timestamp"}}},S4a:{type:"list",member:{type:"structure",required:["ScopeName","ScopeDescription"],members:{ScopeName:{},ScopeDescription:{}}}},S4f:{type:"structure",members:{UserPoolId:{},Identifier:{},Name:{},Scopes:{shape:"S4a"}}},S4j:{type:"structure",members:{JobName:{},JobId:{},UserPoolId:{},PreSignedUrl:{},CreationDate:{type:"timestamp"},StartDate:{type:"timestamp"},CompletionDate:{type:"timestamp"},Status:{},CloudWatchLogsRoleArn:{},ImportedUsers:{type:"long"},SkippedUsers:{type:"long"},FailedUsers:{type:"long"},CompletionMessage:{}}},S4r:{type:"structure",members:{PasswordPolicy:{type:"structure",members:{MinimumLength:{type:"integer"},RequireUppercase:{type:"boolean"},RequireLowercase:{type:"boolean"},RequireNumbers:{type:"boolean"},RequireSymbols:{type:"boolean"}}}}},S4u:{type:"structure",members:{PreSignUp:{},CustomMessage:{},PostConfirmation:{},PreAuthentication:{},PostAuthentication:{},DefineAuthChallenge:{},CreateAuthChallenge:{},VerifyAuthChallengeResponse:{},PreTokenGeneration:{},UserMigration:{}}},S4v:{type:"list",member:{}},S4x:{type:"list",member:{}},S4z:{type:"list",member:{}},S54:{type:"structure",members:{SmsMessage:{},EmailMessage:{},EmailSubject:{},EmailMessageByLink:{},EmailSubjectByLink:{},DefaultEmailOption:{}}},S59:{type:"structure",members:{ChallengeRequiredOnNewDevice:{type:"boolean"},DeviceOnlyRememberedOnUserPrompt:{type:"boolean"}}},S5a:{type:"structure",members:{SourceArn:{},ReplyToEmailAddress:{}}},S5c:{type:"structure",required:["SnsCallerArn"],members:{SnsCallerArn:{},ExternalId:{}}},S5d:{type:"map",key:{},value:{}},S5e:{type:"structure",members:{AllowAdminCreateUserOnly:{type:"boolean"},UnusedAccountValidityDays:{type:"integer"},InviteMessageTemplate:{type:"structure",members:{SMSMessage:{},EmailMessage:{},EmailSubject:{}}}}},S5h:{type:"list",member:{shape:"S4"}},S5i:{type:"structure",required:["AdvancedSecurityMode"],members:{AdvancedSecurityMode:{}}},S5l:{type:"structure",members:{Id:{},Name:{},Policies:{shape:"S4r"},LambdaConfig:{shape:"S4u"},Status:{},LastModifiedDate:{type:"timestamp"},CreationDate:{type:"timestamp"},SchemaAttributes:{shape:"S5h"},AutoVerifiedAttributes:{shape:"S4v"},AliasAttributes:{shape:"S4x"},UsernameAttributes:{shape:"S4z"},SmsVerificationMessage:{},EmailVerificationMessage:{},EmailVerificationSubject:{},VerificationMessageTemplate:{shape:"S54"},SmsAuthenticationMessage:{},MfaConfiguration:{},DeviceConfiguration:{shape:"S59"},EstimatedNumberOfUsers:{type:"integer"},EmailConfiguration:{shape:"S5a"},SmsConfiguration:{shape:"S5c"},UserPoolTags:{shape:"S5d"},SmsConfigurationFailure:{},EmailConfigurationFailure:{},Domain:{},CustomDomain:{},AdminCreateUserConfig:{shape:"S5e"},UserPoolAddOns:{shape:"S5i"},Arn:{}}},S5s:{type:"list",member:{}},S5u:{type:"list",member:{}},S5w:{type:"list",member:{}},S5x:{type:"list",member:{}},S5z:{type:"list",member:{}},S60:{type:"list",member:{}},S62:{type:"list",member:{}},S64:{type:"structure",required:["ApplicationId","RoleArn","ExternalId"],members:{ApplicationId:{},RoleArn:{},ExternalId:{},UserDataShared:{type:"boolean"}}},S67:{type:"structure",members:{UserPoolId:{},ClientName:{},ClientId:{shape:"S1i"},ClientSecret:{type:"string",sensitive:!0},LastModifiedDate:{type:"timestamp"},CreationDate:{type:"timestamp"},RefreshTokenValidity:{type:"integer"},ReadAttributes:{shape:"S5s"},WriteAttributes:{shape:"S5s"},ExplicitAuthFlows:{shape:"S5u"},SupportedIdentityProviders:{shape:"S5w"},CallbackURLs:{shape:"S5x"},LogoutURLs:{shape:"S5z"},DefaultRedirectURI:{},AllowedOAuthFlows:{shape:"S60"},AllowedOAuthScopes:{shape:"S62"},AllowedOAuthFlowsUserPoolClient:{type:"boolean"},AnalyticsConfiguration:{shape:"S64"}}},S6a:{type:"structure",required:["CertificateArn"],members:{CertificateArn:{}}},S6s:{type:"structure",members:{UserPoolId:{},ClientId:{shape:"S1i"},CompromisedCredentialsRiskConfiguration:{shape:"S6t"},AccountTakeoverRiskConfiguration:{shape:"S6y"},RiskExceptionConfiguration:{shape:"S77"},LastModifiedDate:{type:"timestamp"}}},S6t:{type:"structure",required:["Actions"],members:{EventFilter:{type:"list",member:{}},Actions:{type:"structure",required:["EventAction"],members:{EventAction:{}}}}},S6y:{type:"structure",required:["Actions"],members:{NotifyConfiguration:{type:"structure",required:["SourceArn"],members:{From:{},ReplyTo:{},SourceArn:{},BlockEmail:{shape:"S70"},NoActionEmail:{shape:"S70"},MfaEmail:{shape:"S70"}}},Actions:{type:"structure",members:{LowAction:{shape:"S74"},MediumAction:{shape:"S74"},HighAction:{shape:"S74"}}}}},S70:{type:"structure",required:["Subject"],members:{Subject:{},HtmlBody:{},TextBody:{}}},S74:{type:"structure",required:["Notify","EventAction"],members:{Notify:{type:"boolean"},EventAction:{}}},S77:{type:"structure",members:{BlockedIPRangeList:{type:"list",member:{}},SkippedIPRangeList:{type:"list",member:{}}}},S7q:{type:"structure",members:{Destination:{},DeliveryMedium:{},AttributeName:{}}},S84:{type:"structure",members:{UserPoolId:{},ClientId:{shape:"S1i"},ImageUrl:{},CSS:{},CSSVersion:{},LastModifiedDate:{type:"timestamp"},CreationDate:{type:"timestamp"}}},S8e:{type:"structure",members:{SmsAuthenticationMessage:{},SmsConfiguration:{shape:"S5c"}}},S8f:{type:"structure",members:{Enabled:{type:"boolean"}}},S9f:{type:"list",member:{shape:"Ss"}}},paginators:{}},AWS.apiLoader.services.cognitosync={},AWS.CognitoSync=AWS.Service.defineService("cognitosync",["2014-06-30"]),AWS.apiLoader.services.cognitosync["2014-06-30"]={version:"2.0",metadata:{apiVersion:"2014-06-30",endpointPrefix:"cognito-sync",jsonVersion:"1.1",serviceFullName:"Amazon Cognito Sync",serviceId:"Cognito Sync",signatureVersion:"v4",protocol:"rest-json",uid:"cognito-sync-2014-06-30"},operations:{BulkPublish:{http:{requestUri:"/identitypools/{IdentityPoolId}/bulkpublish",responseCode:200},input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"}}},output:{type:"structure",members:{IdentityPoolId:{}}}},DeleteDataset:{http:{method:"DELETE",requestUri:"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",responseCode:200},input:{type:"structure",required:["IdentityPoolId","IdentityId","DatasetName"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},IdentityId:{location:"uri",locationName:"IdentityId"},DatasetName:{location:"uri",locationName:"DatasetName"}}},output:{type:"structure",members:{Dataset:{shape:"S8"}}}},DescribeDataset:{http:{method:"GET",requestUri:"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",responseCode:200},input:{type:"structure",required:["IdentityPoolId","IdentityId","DatasetName"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},IdentityId:{location:"uri",locationName:"IdentityId"},DatasetName:{location:"uri",locationName:"DatasetName"}}},output:{type:"structure",members:{Dataset:{shape:"S8"}}}},DescribeIdentityPoolUsage:{http:{method:"GET",requestUri:"/identitypools/{IdentityPoolId}",responseCode:200},input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"}}},output:{type:"structure",members:{IdentityPoolUsage:{shape:"Sg"}}}},DescribeIdentityUsage:{http:{method:"GET",requestUri:"/identitypools/{IdentityPoolId}/identities/{IdentityId}",responseCode:200},input:{type:"structure",required:["IdentityPoolId","IdentityId"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},IdentityId:{location:"uri",locationName:"IdentityId"}}},output:{type:"structure",members:{IdentityUsage:{type:"structure",members:{IdentityId:{},IdentityPoolId:{},LastModifiedDate:{type:"timestamp"},DatasetCount:{type:"integer"},DataStorage:{type:"long"}}}}}},GetBulkPublishDetails:{http:{requestUri:"/identitypools/{IdentityPoolId}/getBulkPublishDetails",responseCode:200},input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"}}},output:{type:"structure",members:{IdentityPoolId:{},BulkPublishStartTime:{type:"timestamp"},BulkPublishCompleteTime:{type:"timestamp"},BulkPublishStatus:{},FailureMessage:{}}}},GetCognitoEvents:{http:{method:"GET",requestUri:"/identitypools/{IdentityPoolId}/events",responseCode:200},input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"}}},output:{type:"structure",members:{Events:{shape:"Sq"}}}},GetIdentityPoolConfiguration:{http:{method:"GET",requestUri:"/identitypools/{IdentityPoolId}/configuration",responseCode:200},input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"}}},output:{type:"structure",members:{IdentityPoolId:{},PushSync:{shape:"Sv"},CognitoStreams:{shape:"Sz"}}}},ListDatasets:{http:{method:"GET",requestUri:"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets",responseCode:200},input:{type:"structure",required:["IdentityId","IdentityPoolId"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},IdentityId:{location:"uri",locationName:"IdentityId"},NextToken:{location:"querystring",locationName:"nextToken"},MaxResults:{location:"querystring",locationName:"maxResults",type:"integer"}}},output:{type:"structure",members:{Datasets:{type:"list",member:{shape:"S8"}},Count:{type:"integer"},NextToken:{}}}},ListIdentityPoolUsage:{http:{method:"GET",requestUri:"/identitypools",responseCode:200},input:{type:"structure",members:{NextToken:{location:"querystring",locationName:"nextToken"},MaxResults:{location:"querystring",locationName:"maxResults",type:"integer"}}},output:{type:"structure",members:{IdentityPoolUsages:{type:"list",member:{shape:"Sg"}},MaxResults:{type:"integer"},Count:{type:"integer"},NextToken:{}}}},ListRecords:{http:{method:"GET",requestUri:"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records",responseCode:200},input:{type:"structure",required:["IdentityPoolId","IdentityId","DatasetName"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},IdentityId:{location:"uri",locationName:"IdentityId"},DatasetName:{location:"uri",locationName:"DatasetName"},LastSyncCount:{location:"querystring",locationName:"lastSyncCount",type:"long"},NextToken:{location:"querystring",locationName:"nextToken"},MaxResults:{location:"querystring",locationName:"maxResults",type:"integer"},SyncSessionToken:{location:"querystring",locationName:"syncSessionToken"}}},output:{type:"structure",members:{Records:{shape:"S1c"},NextToken:{},Count:{type:"integer"},DatasetSyncCount:{type:"long"},LastModifiedBy:{},MergedDatasetNames:{type:"list",member:{}},DatasetExists:{type:"boolean"},DatasetDeletedAfterRequestedSyncCount:{type:"boolean"},SyncSessionToken:{}}}},RegisterDevice:{http:{requestUri:"/identitypools/{IdentityPoolId}/identity/{IdentityId}/device",responseCode:200},input:{type:"structure",required:["IdentityPoolId","IdentityId","Platform","Token"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},IdentityId:{location:"uri",locationName:"IdentityId"},Platform:{},Token:{}}},output:{type:"structure",members:{DeviceId:{}}}},SetCognitoEvents:{http:{requestUri:"/identitypools/{IdentityPoolId}/events",responseCode:200},input:{type:"structure",required:["IdentityPoolId","Events"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},Events:{shape:"Sq"}}}},SetIdentityPoolConfiguration:{http:{requestUri:"/identitypools/{IdentityPoolId}/configuration",responseCode:200},input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},PushSync:{shape:"Sv"},CognitoStreams:{shape:"Sz"}}},output:{type:"structure",members:{IdentityPoolId:{},PushSync:{shape:"Sv"},CognitoStreams:{shape:"Sz"}}}},SubscribeToDataset:{http:{requestUri:"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}",responseCode:200},input:{type:"structure",required:["IdentityPoolId","IdentityId","DatasetName","DeviceId"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},IdentityId:{location:"uri",locationName:"IdentityId"},DatasetName:{location:"uri",locationName:"DatasetName"},DeviceId:{location:"uri",locationName:"DeviceId"}}},output:{type:"structure",members:{}}},UnsubscribeFromDataset:{http:{method:"DELETE",requestUri:"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}",responseCode:200},input:{type:"structure",required:["IdentityPoolId","IdentityId","DatasetName","DeviceId"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},IdentityId:{location:"uri",locationName:"IdentityId"},DatasetName:{location:"uri",locationName:"DatasetName"},DeviceId:{location:"uri",locationName:"DeviceId"}}},output:{type:"structure",members:{}}},UpdateRecords:{http:{requestUri:"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",responseCode:200},input:{type:"structure",required:["IdentityPoolId","IdentityId","DatasetName","SyncSessionToken"],members:{IdentityPoolId:{location:"uri",locationName:"IdentityPoolId"},IdentityId:{location:"uri",locationName:"IdentityId"},DatasetName:{location:"uri",locationName:"DatasetName"},DeviceId:{},RecordPatches:{type:"list",member:{type:"structure",required:["Op","Key","SyncCount"],members:{Op:{},Key:{},Value:{},SyncCount:{type:"long"},DeviceLastModifiedDate:{type:"timestamp"}}}},SyncSessionToken:{},ClientContext:{location:"header",locationName:"x-amz-Client-Context"}}},output:{type:"structure",members:{Records:{shape:"S1c"}}}}},shapes:{S8:{type:"structure",members:{IdentityId:{},DatasetName:{},CreationDate:{type:"timestamp"},LastModifiedDate:{type:"timestamp"},LastModifiedBy:{},DataStorage:{type:"long"},NumRecords:{type:"long"}}},Sg:{type:"structure",members:{IdentityPoolId:{},SyncSessionsCount:{type:"long"},DataStorage:{type:"long"},LastModifiedDate:{type:"timestamp"}}},Sq:{type:"map",key:{},value:{}},Sv:{type:"structure",members:{ApplicationArns:{type:"list",member:{}},RoleArn:{}}},Sz:{type:"structure",members:{StreamName:{},RoleArn:{},StreamingStatus:{}}},S1c:{type:"list",member:{type:"structure",members:{Key:{},Value:{},SyncCount:{type:"long"},LastModifiedDate:{type:"timestamp"},LastModifiedBy:{},DeviceLastModifiedDate:{type:"timestamp"}}}}},examples:{}},AWS.apiLoader.services.kinesis={},AWS.Kinesis=AWS.Service.defineService("kinesis",["2013-12-02"]),AWS.apiLoader.services.kinesis["2013-12-02"]={version:"2.0",metadata:{apiVersion:"2013-12-02",endpointPrefix:"kinesis",jsonVersion:"1.1",protocol:"json",protocolSettings:{h2:"eventstream"},serviceAbbreviation:"Kinesis",serviceFullName:"Amazon Kinesis",serviceId:"Kinesis",signatureVersion:"v4",targetPrefix:"Kinesis_20131202",uid:"kinesis-2013-12-02"},operations:{AddTagsToStream:{input:{type:"structure",required:["StreamName","Tags"],members:{StreamName:{},Tags:{type:"map",key:{},value:{}}}}},CreateStream:{input:{type:"structure",required:["StreamName","ShardCount"],members:{StreamName:{},ShardCount:{type:"integer"}}}},DecreaseStreamRetentionPeriod:{input:{type:"structure",required:["StreamName","RetentionPeriodHours"],members:{StreamName:{},RetentionPeriodHours:{type:"integer"}}}},DeleteStream:{input:{type:"structure",required:["StreamName"],members:{StreamName:{},EnforceConsumerDeletion:{type:"boolean"}}}},DeregisterStreamConsumer:{input:{type:"structure",members:{StreamARN:{},ConsumerName:{},ConsumerARN:{}}}},DescribeLimits:{input:{type:"structure",members:{}},output:{type:"structure",required:["ShardLimit","OpenShardCount"],members:{ShardLimit:{type:"integer"},OpenShardCount:{type:"integer"}}}},DescribeStream:{input:{type:"structure",required:["StreamName"],members:{StreamName:{},Limit:{type:"integer"},ExclusiveStartShardId:{}}},output:{type:"structure",required:["StreamDescription"],members:{StreamDescription:{type:"structure",required:["StreamName","StreamARN","StreamStatus","Shards","HasMoreShards","RetentionPeriodHours","StreamCreationTimestamp","EnhancedMonitoring"],members:{StreamName:{},StreamARN:{},StreamStatus:{},Shards:{shape:"Sp"},HasMoreShards:{type:"boolean"},RetentionPeriodHours:{type:"integer"},StreamCreationTimestamp:{type:"timestamp"},EnhancedMonitoring:{shape:"Sw"},EncryptionType:{},KeyId:{}}}}}},DescribeStreamConsumer:{input:{type:"structure",members:{StreamARN:{},ConsumerName:{},ConsumerARN:{}}},output:{type:"structure",required:["ConsumerDescription"],members:{ConsumerDescription:{type:"structure",required:["ConsumerName","ConsumerARN","ConsumerStatus","ConsumerCreationTimestamp","StreamARN"],members:{ConsumerName:{},ConsumerARN:{},ConsumerStatus:{},ConsumerCreationTimestamp:{type:"timestamp"},StreamARN:{}}}}}},DescribeStreamSummary:{input:{type:"structure",required:["StreamName"],members:{StreamName:{}}},output:{type:"structure",required:["StreamDescriptionSummary"],members:{StreamDescriptionSummary:{type:"structure",required:["StreamName","StreamARN","StreamStatus","RetentionPeriodHours","StreamCreationTimestamp","EnhancedMonitoring","OpenShardCount"],members:{StreamName:{},StreamARN:{},StreamStatus:{},RetentionPeriodHours:{type:"integer"},StreamCreationTimestamp:{type:"timestamp"},EnhancedMonitoring:{shape:"Sw"},EncryptionType:{},KeyId:{},OpenShardCount:{type:"integer"},ConsumerCount:{type:"integer"}}}}}},DisableEnhancedMonitoring:{input:{type:"structure",required:["StreamName","ShardLevelMetrics"],members:{StreamName:{},ShardLevelMetrics:{shape:"Sy"}}},output:{shape:"S1b"}},EnableEnhancedMonitoring:{input:{type:"structure",required:["StreamName","ShardLevelMetrics"],members:{StreamName:{},ShardLevelMetrics:{shape:"Sy"}}},output:{shape:"S1b"}},GetRecords:{input:{type:"structure",required:["ShardIterator"],members:{ShardIterator:{},Limit:{type:"integer"}}},output:{type:"structure",required:["Records"],members:{Records:{type:"list",member:{type:"structure",required:["SequenceNumber","Data","PartitionKey"],members:{SequenceNumber:{},ApproximateArrivalTimestamp:{type:"timestamp"},Data:{type:"blob"},PartitionKey:{},EncryptionType:{}}}},NextShardIterator:{},MillisBehindLatest:{type:"long"}}}},GetShardIterator:{input:{type:"structure",required:["StreamName","ShardId","ShardIteratorType"],members:{StreamName:{},ShardId:{},ShardIteratorType:{},StartingSequenceNumber:{},Timestamp:{type:"timestamp"}}},output:{type:"structure",members:{ShardIterator:{}}}},IncreaseStreamRetentionPeriod:{input:{type:"structure",required:["StreamName","RetentionPeriodHours"],members:{StreamName:{},RetentionPeriodHours:{type:"integer"}}}},ListShards:{input:{type:"structure",members:{StreamName:{},NextToken:{},ExclusiveStartShardId:{},MaxResults:{type:"integer"},StreamCreationTimestamp:{type:"timestamp"}}},output:{type:"structure",members:{Shards:{shape:"Sp"},NextToken:{}}}},ListStreamConsumers:{input:{type:"structure",required:["StreamARN"],members:{StreamARN:{},NextToken:{},MaxResults:{type:"integer"},StreamCreationTimestamp:{type:"timestamp"}}},output:{type:"structure",members:{Consumers:{type:"list",member:{shape:"S1y"}},NextToken:{}}}},ListStreams:{input:{type:"structure",members:{Limit:{type:"integer"},ExclusiveStartStreamName:{}}},output:{type:"structure",required:["StreamNames","HasMoreStreams"],members:{StreamNames:{type:"list",member:{}},HasMoreStreams:{type:"boolean"}}}},ListTagsForStream:{input:{type:"structure",required:["StreamName"],members:{StreamName:{},ExclusiveStartTagKey:{},Limit:{type:"integer"}}},output:{type:"structure",required:["Tags","HasMoreTags"],members:{Tags:{type:"list",member:{type:"structure",required:["Key"],members:{Key:{},Value:{}}}},HasMoreTags:{type:"boolean"}}}},MergeShards:{input:{type:"structure",required:["StreamName","ShardToMerge","AdjacentShardToMerge"],members:{StreamName:{},ShardToMerge:{},AdjacentShardToMerge:{}}}},PutRecord:{input:{type:"structure",required:["StreamName","Data","PartitionKey"],members:{StreamName:{},Data:{type:"blob"},PartitionKey:{},ExplicitHashKey:{},SequenceNumberForOrdering:{}}},output:{type:"structure",required:["ShardId","SequenceNumber"],members:{ShardId:{},SequenceNumber:{},EncryptionType:{}}}},PutRecords:{input:{type:"structure",required:["Records","StreamName"],members:{Records:{type:"list",member:{type:"structure",required:["Data","PartitionKey"],members:{Data:{type:"blob"},ExplicitHashKey:{},PartitionKey:{}}}},StreamName:{}}},output:{type:"structure",required:["Records"],members:{FailedRecordCount:{type:"integer"},Records:{type:"list",member:{type:"structure",members:{SequenceNumber:{},ShardId:{},ErrorCode:{},ErrorMessage:{}}}},EncryptionType:{}}}},RegisterStreamConsumer:{input:{type:"structure",required:["StreamARN","ConsumerName"],members:{StreamARN:{},ConsumerName:{}}},output:{type:"structure",required:["Consumer"],members:{Consumer:{shape:"S1y"}}}},RemoveTagsFromStream:{input:{type:"structure",required:["StreamName","TagKeys"],members:{StreamName:{},TagKeys:{type:"list",member:{}}}}},SplitShard:{input:{type:"structure",required:["StreamName","ShardToSplit","NewStartingHashKey"],members:{StreamName:{},ShardToSplit:{},NewStartingHashKey:{}}}},StartStreamEncryption:{input:{type:"structure",required:["StreamName","EncryptionType","KeyId"],members:{StreamName:{},EncryptionType:{},KeyId:{}}}},StopStreamEncryption:{input:{type:"structure",required:["StreamName","EncryptionType","KeyId"],members:{StreamName:{},EncryptionType:{},KeyId:{}}}},UpdateShardCount:{input:{type:"structure",required:["StreamName","TargetShardCount","ScalingType"],members:{StreamName:{},TargetShardCount:{type:"integer"},ScalingType:{}}},output:{type:"structure",members:{StreamName:{},CurrentShardCount:{type:"integer"},TargetShardCount:{type:"integer"}}}}},shapes:{Sp:{type:"list",member:{type:"structure",required:["ShardId","HashKeyRange","SequenceNumberRange"],members:{ShardId:{},ParentShardId:{},AdjacentParentShardId:{},HashKeyRange:{type:"structure",required:["StartingHashKey","EndingHashKey"],members:{StartingHashKey:{},EndingHashKey:{}}},SequenceNumberRange:{type:"structure",required:["StartingSequenceNumber"],members:{StartingSequenceNumber:{},EndingSequenceNumber:{}}}}}},Sw:{type:"list",member:{type:"structure",members:{ShardLevelMetrics:{shape:"Sy"}}}},Sy:{type:"list",member:{}},S1b:{type:"structure",members:{StreamName:{},CurrentShardLevelMetrics:{shape:"Sy"},DesiredShardLevelMetrics:{shape:"Sy"}}},S1y:{type:"structure",required:["ConsumerName","ConsumerARN","ConsumerStatus","ConsumerCreationTimestamp"],members:{ConsumerName:{},ConsumerARN:{},ConsumerStatus:{},ConsumerCreationTimestamp:{type:"timestamp"}}}},paginators:{DescribeStream:{input_token:"ExclusiveStartShardId",limit_key:"Limit",more_results:"StreamDescription.HasMoreShards",output_token:"StreamDescription.Shards[-1].ShardId",result_key:"StreamDescription.Shards"},ListStreamConsumers:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken"},ListStreams:{input_token:"ExclusiveStartStreamName",limit_key:"Limit",more_results:"HasMoreStreams",output_token:"StreamNames[-1]",result_key:"StreamNames"}},waiters:{StreamExists:{delay:10,operation:"DescribeStream",maxAttempts:18,acceptors:[{expected:"ACTIVE",matcher:"path",state:"success",argument:"StreamDescription.StreamStatus"}]},StreamNotExists:{delay:10,operation:"DescribeStream",maxAttempts:18,acceptors:[{expected:"ResourceNotFoundException",matcher:"error",state:"success"}]}}},AWS.apiLoader.services.s3={},AWS.S3=AWS.Service.defineService("s3",["2006-03-01"]),s=function e(t,r,n){function o(a,u){if(!r[a]){if(!t[a]){var c="function"==typeof s&&s;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var p=r[a]={exports:{}};t[a][0].call(p.exports,function(e){return o(t[a][1][e]||e)},p,p.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof s&&s,a=0;a<n.length;a++)o(n[a]);return o}({100:[function(e,t,r){var n=e("../core"),o=e("../signers/v4_credentials");e("../s3/managed_upload");var i={completeMultipartUpload:!0,copyObject:!0,uploadPartCopy:!0},a=["AuthorizationHeaderMalformed","BadRequest","PermanentRedirect",301];n.util.update(n.S3.prototype,{getSignatureVersion:function(e){var t=this.api.signatureVersion,r=this._originalConfig?this._originalConfig.signatureVersion:null,n=this.config.signatureVersion,o=!!e&&e.isPresigned();return r?r="v2"===r?"s3":r:(!0!==o?t="v4":n&&(t=n),t)},getSignerClass:function(e){var t=this.getSignatureVersion(e);return n.Signers.RequestSigner.getVersion(t)},validateService:function(){var e,t=[];if(this.config.region||(this.config.region="us-east-1"),!this.config.endpoint&&this.config.s3BucketEndpoint&&t.push("An endpoint must be provided when configuring `s3BucketEndpoint` to true."),1===t.length?e=t[0]:t.length>1&&(e="Multiple configuration errors:\n"+t.join("\n")),e)throw n.util.error(new Error,{name:"InvalidEndpoint",message:e})},shouldDisableBodySigning:function(e){var t=this.getSignerClass();return!0===this.config.s3DisableBodySigning&&t===n.Signers.V4&&"https:"===e.httpRequest.endpoint.protocol},setupRequestListeners:function(e){e.addListener("validate",this.validateScheme),e.addListener("validate",this.validateBucketEndpoint),e.addListener("validate",this.correctBucketRegionFromCache),e.addListener("validate",this.validateBucketName,!0),e.addListener("build",this.addContentType),e.addListener("build",this.populateURI),e.addListener("build",this.computeContentMd5),e.addListener("build",this.computeSseCustomerKeyMd5),e.addListener("afterBuild",this.addExpect100Continue),e.removeListener("validate",n.EventListeners.Core.VALIDATE_REGION),e.addListener("extractError",this.extractError),e.onAsync("extractError",this.requestBucketRegion),e.addListener("extractData",this.extractData),e.addListener("extractData",n.util.hoistPayloadMember),e.addListener("beforePresign",this.prepareSignedUrl),n.util.isBrowser()&&e.onAsync("retry",this.reqRegionForNetworkingError),this.shouldDisableBodySigning(e)&&(e.removeListener("afterBuild",n.EventListeners.Core.COMPUTE_SHA256),e.addListener("afterBuild",this.disableBodySigning))},validateScheme:function(e){var t=e.params,r=e.httpRequest.endpoint.protocol;if((t.SSECustomerKey||t.CopySourceSSECustomerKey)&&"https:"!==r)throw n.util.error(new Error,{code:"ConfigError",message:"Cannot send SSE keys over HTTP. Set 'sslEnabled'to 'true' in your configuration"})},validateBucketEndpoint:function(e){if(!e.params.Bucket&&e.service.config.s3BucketEndpoint)throw n.util.error(new Error,{code:"ConfigError",message:"Cannot send requests to root API with `s3BucketEndpoint` set."})},validateBucketName:function(e){var t=e.service.getSignatureVersion(e),r=e.params&&e.params.Bucket,o=e.params&&e.params.Key,i=r&&r.indexOf("/");if(r&&i>=0)if("string"==typeof o){e.params=n.util.copy(e.params);var a=r.substr(i+1)||"";e.params.Key=a+"/"+o,e.params.Bucket=r.substr(0,i)}else if("v4"===t){var s="Bucket names cannot contain forward slashes. Bucket: "+r;throw n.util.error(new Error,{code:"InvalidBucket",message:s})}},isValidAccelerateOperation:function(e){return-1===["createBucket","deleteBucket","listBuckets"].indexOf(e)},populateURI:function(e){var t=e.httpRequest,r=e.params.Bucket,n=e.service,o=t.endpoint;if(r&&!n.pathStyleBucketName(r)){n.config.useAccelerateEndpoint&&n.isValidAccelerateOperation(e.operation)?n.config.useDualstack?o.hostname=r+".s3-accelerate.dualstack.amazonaws.com":o.hostname=r+".s3-accelerate.amazonaws.com":n.config.s3BucketEndpoint||(o.hostname=r+"."+o.hostname);var i=o.port;o.host=80!==i&&443!==i?o.hostname+":"+o.port:o.hostname,t.virtualHostedBucket=r,n.removeVirtualHostedBucketFromPath(e)}},removeVirtualHostedBucketFromPath:function(e){var t=e.httpRequest,r=t.virtualHostedBucket;if(r&&t.path){if(e.params&&e.params.Key&&0===t.path.indexOf("/"+n.util.uriEscapePath(e.params.Key)))return;t.path=t.path.replace(new RegExp("/"+r),""),"/"!==t.path[0]&&(t.path="/"+t.path)}},addExpect100Continue:function(e){var t=e.httpRequest.headers["Content-Length"];n.util.isNode()&&t>=1048576&&(e.httpRequest.headers.Expect="100-continue")},addContentType:function(e){var t=e.httpRequest;if("GET"!==t.method&&"HEAD"!==t.method){t.headers["Content-Type"]||(t.headers["Content-Type"]="application/octet-stream");var r=t.headers["Content-Type"];if(n.util.isBrowser())if("string"!=typeof t.body||r.match(/;\s*charset=/)){t.headers["Content-Type"]=r.replace(/(;\s*charset=)(.+)$/,function(e,t,r){return t+r.toUpperCase()})}else t.headers["Content-Type"]+="; charset=UTF-8"}else delete t.headers["Content-Type"]},computableChecksumOperations:{putBucketCors:!0,putBucketLifecycle:!0,putBucketLifecycleConfiguration:!0,putBucketTagging:!0,deleteObjects:!0,putBucketReplication:!0},willComputeChecksums:function(e){if(this.computableChecksumOperations[e.operation])return!0;if(!this.config.computeChecksums)return!1;if(!n.util.Buffer.isBuffer(e.httpRequest.body)&&"string"!=typeof e.httpRequest.body)return!1;var t=e.service.api.operations[e.operation].input.members;return!(!e.service.shouldDisableBodySigning(e)||Object.prototype.hasOwnProperty.call(e.httpRequest.headers,"presigned-expires")||!t.ContentMD5||e.params.ContentMD5)||!(e.service.getSignerClass(e)===n.Signers.V4&&t.ContentMD5&&!t.ContentMD5.required)&&(!(!t.ContentMD5||e.params.ContentMD5)||void 0)},computeContentMd5:function(e){if(e.service.willComputeChecksums(e)){var t=n.util.crypto.md5(e.httpRequest.body,"base64");e.httpRequest.headers["Content-MD5"]=t}},computeSseCustomerKeyMd5:function(e){n.util.each({SSECustomerKey:"x-amz-server-side-encryption-customer-key-MD5",CopySourceSSECustomerKey:"x-amz-copy-source-server-side-encryption-customer-key-MD5"},function(t,r){if(e.params[t]){var o=n.util.crypto.md5(e.params[t],"base64");e.httpRequest.headers[r]=o}})},pathStyleBucketName:function(e){return!(!this.config.s3ForcePathStyle&&(this.config.s3BucketEndpoint||this.dnsCompatibleBucketName(e)&&(!this.config.sslEnabled||!e.match(/\./))))},dnsCompatibleBucketName:function(e){var t=e,r=new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/),n=new RegExp(/(\d+\.){3}\d+/),o=new RegExp(/\.\./);return!(!t.match(r)||t.match(n)||t.match(o))},successfulResponse:function(e){var t=e.request,r=e.httpResponse;return(!i[t.operation]||!r.body.toString().match("<Error>"))&&r.statusCode<300},retryableError:function(e,t){return!(!i[t.operation]||200!==e.statusCode)||(!t._requestRegionForBucket||!t.service.bucketRegionCache[t._requestRegionForBucket])&&(!(!e||"RequestTimeout"!==e.code)||(e&&-1!=a.indexOf(e.code)&&e.region&&e.region!=t.httpRequest.region?(t.httpRequest.region=e.region,301===e.statusCode&&t.service.updateReqBucketRegion(t),!0):n.Service.prototype.retryableError.call(this,e,t)))},updateReqBucketRegion:function(e,t){var r=e.httpRequest;if("string"==typeof t&&t.length&&(r.region=t),r.endpoint.host.match(/s3(?!-accelerate).*\.amazonaws\.com$/)){var o=e.service,i=o.config,a=i.s3BucketEndpoint;a&&delete i.s3BucketEndpoint;var s=n.util.copy(i);delete s.endpoint,s.region=r.region,r.endpoint=new n.S3(s).endpoint,o.populateURI(e),i.s3BucketEndpoint=a,r.headers.Host=r.endpoint.host,"validate"===e._asm.currentState&&(e.removeListener("build",o.populateURI),e.addListener("build",o.removeVirtualHostedBucketFromPath))}},extractData:function(e){var t=e.request;if("getBucketLocation"===t.operation){var r=e.httpResponse.body.toString().match(/>(.+)<\/Location/);delete e.data._,e.data.LocationConstraint=r?r[1]:""}var n=t.params.Bucket||null;if("deleteBucket"!==t.operation||"string"!=typeof n||e.error){var o=(e.httpResponse.headers||{})["x-amz-bucket-region"]||null;if(!o&&"createBucket"===t.operation&&!e.error){var i=t.params.CreateBucketConfiguration;o=i?"EU"===i.LocationConstraint?"eu-west-1":i.LocationConstraint:"us-east-1"}o&&n&&o!==t.service.bucketRegionCache[n]&&(t.service.bucketRegionCache[n]=o)}else t.service.clearBucketRegionCache(n);t.service.extractRequestIds(e)},extractError:function(e){var t,r={304:"NotModified",403:"Forbidden",400:"BadRequest",404:"NotFound"},o=e.request,i=e.httpResponse.statusCode,a=e.httpResponse.body||"",s=(e.httpResponse.headers||{})["x-amz-bucket-region"]||null,u=o.params.Bucket||null,c=o.service.bucketRegionCache;if(s&&u&&s!==c[u]&&(c[u]=s),r[i]&&0===a.length)u&&!s&&(t=c[u]||null)!==o.httpRequest.region&&(s=t),e.error=n.util.error(new Error,{code:r[i],message:null,region:s});else{var l=(new n.XML.Parser).parse(a.toString());l.Region&&!s?(s=l.Region,u&&s!==c[u]&&(c[u]=s)):!u||s||l.Region||(t=c[u]||null)!==o.httpRequest.region&&(s=t),e.error=n.util.error(new Error,{code:l.Code||i,message:l.Message||null,region:s})}o.service.extractRequestIds(e)},requestBucketRegion:function(e,t){var r=e.error,o=e.request,i=o.params.Bucket||null;if(!r||!i||r.region||"listObjects"===o.operation||n.util.isNode()&&"headBucket"===o.operation||400===r.statusCode&&"headObject"!==o.operation||-1===a.indexOf(r.code))return t();var s=n.util.isNode()?"headBucket":"listObjects",u={Bucket:i};"listObjects"===s&&(u.MaxKeys=0);var c=o.service[s](u);c._requestRegionForBucket=i,c.send(function(){var e=o.service.bucketRegionCache[i]||null;r.region=e,t()})},reqRegionForNetworkingError:function(e,t){if(!n.util.isBrowser())return t();var r=e.error,o=e.request,i=o.params.Bucket;if(!r||"NetworkingError"!==r.code||!i||"us-east-1"===o.httpRequest.region)return t();var a=o.service,s=a.bucketRegionCache,u=s[i]||null;if(u&&u!==o.httpRequest.region)a.updateReqBucketRegion(o,u),t();else if(a.dnsCompatibleBucketName(i))if(o.httpRequest.virtualHostedBucket){var c=a.listObjects({Bucket:i,MaxKeys:0});a.updateReqBucketRegion(c,"us-east-1"),c._requestRegionForBucket=i,c.send(function(){var e=a.bucketRegionCache[i]||null;e&&e!==o.httpRequest.region&&a.updateReqBucketRegion(o,e),t()})}else t();else a.updateReqBucketRegion(o,"us-east-1"),"us-east-1"!==s[i]&&(s[i]="us-east-1"),t()},bucketRegionCache:{},clearBucketRegionCache:function(e){var t=this.bucketRegionCache;e?"string"==typeof e&&(e=[e]):e=Object.keys(t);for(var r=0;r<e.length;r++)delete t[e[r]];return t},correctBucketRegionFromCache:function(e){var t=e.params.Bucket||null;if(t){var r=e.service,n=e.httpRequest.region,o=r.bucketRegionCache[t];o&&o!==n&&r.updateReqBucketRegion(e,o)}},extractRequestIds:function(e){var t=e.httpResponse.headers?e.httpResponse.headers["x-amz-id-2"]:null,r=e.httpResponse.headers?e.httpResponse.headers["x-amz-cf-id"]:null;e.extendedRequestId=t,e.cfId=r,e.error&&(e.error.requestId=e.requestId||null,e.error.extendedRequestId=t,e.error.cfId=r)},getSignedUrl:function(e,t,r){var o=(t=n.util.copy(t||{})).Expires||900;delete t.Expires;var i=this.makeRequest(e,t);if(!r)return i.presign(o,r);n.util.defer(function(){i.presign(o,r)})},createPresignedPost:function(e,t){function r(){return{url:n.util.urlFormat(u),fields:a.preparePostFields(s.credentials,s.region,i,e.Fields,e.Conditions,e.Expires)}}"function"==typeof e&&void 0===t&&(t=e,e=null),e=n.util.copy(e||{});var o=this.config.params||{},i=e.Bucket||o.Bucket,a=this,s=this.config,u=n.util.copy(this.endpoint);if(s.s3BucketEndpoint||(u.pathname="/"+i),!t)return r();s.getCredentials(function(e){e&&t(e),t(null,r())})},preparePostFields:function(e,t,r,i,a,s){var u=this.getSkewCorrectedDate();if(!e||!t||!r)throw new Error("Unable to create a POST object policy without a bucket, region, and credentials");i=n.util.copy(i||{}),a=(a||[]).slice(0),s=s||3600;var c=n.util.date.iso8601(u).replace(/[:\-]|\.\d{3}/g,""),l=c.substr(0,8),p=o.createScope(l,t,"s3"),h=e.accessKeyId+"/"+p;for(var f in i.bucket=r,i["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",i["X-Amz-Credential"]=h,i["X-Amz-Date"]=c,e.sessionToken&&(i["X-Amz-Security-Token"]=e.sessionToken),i)if(i.hasOwnProperty(f)){var d={};d[f]=i[f],a.push(d)}return i.Policy=this.preparePostPolicy(new Date(u.valueOf()+1e3*s),a),i["X-Amz-Signature"]=n.util.crypto.hmac(o.getSigningKey(e,l,t,"s3",!0),i.Policy,"hex"),i},preparePostPolicy:function(e,t){return n.util.base64.encode(JSON.stringify({expiration:n.util.date.iso8601(e),conditions:t}))},prepareSignedUrl:function(e){e.addListener("validate",e.service.noPresignedContentLength),e.removeListener("build",e.service.addContentType),e.params.Body?e.addListener("afterBuild",n.EventListeners.Core.COMPUTE_SHA256):e.removeListener("build",e.service.computeContentMd5)},disableBodySigning:function(e){var t=e.httpRequest.headers;Object.prototype.hasOwnProperty.call(t,"presigned-expires")||(t["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD")},noPresignedContentLength:function(e){if(void 0!==e.params.ContentLength)throw n.util.error(new Error,{code:"UnexpectedParameter",message:"ContentLength is not supported in pre-signed URLs."})},createBucket:function(e,t){return"function"!=typeof e&&e||(t=t||e,e={}),this.endpoint.hostname===this.api.globalEndpoint||e.CreateBucketConfiguration||(e.CreateBucketConfiguration={LocationConstraint:this.config.region}),this.makeRequest("createBucket",e,t)},upload:function(e,t,r){"function"==typeof t&&void 0===r&&(r=t,t=null),t=t||{},t=n.util.merge(t||{},{service:this,params:e});var o=new n.S3.ManagedUpload(t);return"function"==typeof r&&o.send(r),o}})},{"../core":38,"../s3/managed_upload":84,"../signers/v4_credentials":111}],84:[function(e,t,r){var n=e("../core"),o=n.util.string.byteLength,i=n.util.Buffer;n.S3.ManagedUpload=n.util.inherit({constructor:function(e){var t=this;n.SequentialExecutor.call(t),t.body=null,t.sliceFn=null,t.callback=null,t.parts={},t.completeInfo=[],t.fillQueue=function(){t.callback(new Error("Unsupported body payload "+a(t.body)))},t.configure(e)},configure:function(e){if(e=e||{},this.partSize=this.minPartSize,e.queueSize&&(this.queueSize=e.queueSize),e.partSize&&(this.partSize=e.partSize),e.leavePartsOnError&&(this.leavePartsOnError=!0),e.tags){if(!Array.isArray(e.tags))throw new Error("Tags must be specified as an array; "+a(e.tags)+" provided.");this.tags=e.tags}if(this.partSize<this.minPartSize)throw new Error("partSize must be greater than "+this.minPartSize);this.service=e.service,this.bindServiceObject(e.params),this.validateBody(),this.adjustTotalBytes()},leavePartsOnError:!1,queueSize:4,partSize:null,minPartSize:5242880,maxTotalParts:1e4,send:function(e){var t=this;t.failed=!1,t.callback=e||function(e){if(e)throw e};var r=!0;if(t.sliceFn)t.fillQueue=t.fillBuffer;else if(n.util.isNode()){var o=n.util.stream.Stream;t.body instanceof o&&(r=!1,t.fillQueue=t.fillStream,t.partBuffers=[],t.body.on("error",function(e){t.cleanup(e)}).on("readable",function(){t.fillQueue()}).on("end",function(){t.isDoneChunking=!0,t.numParts=t.totalPartNumbers,t.fillQueue.call(t),t.isDoneChunking&&t.totalPartNumbers>=1&&t.doneParts===t.numParts&&t.finishMultiPart()}))}r&&t.fillQueue.call(t)},abort:function(){this.cleanup(n.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1}))},validateBody:function(){var e=this;if(e.body=e.service.config.params.Body,"string"==typeof e.body)e.body=new n.util.Buffer(e.body);else if(!e.body)throw new Error("params.Body is required");e.sliceFn=n.util.arraySliceFn(e.body)},bindServiceObject:function(e){e=e||{};var t=this;if(t.service){var r=t.service,o=n.util.copy(r.config);o.signatureVersion=r.getSignatureVersion(),t.service=new r.constructor.__super__(o),t.service.config.params=n.util.merge(t.service.config.params||{},e)}else t.service=new n.S3({params:e})},adjustTotalBytes:function(){var e=this;try{e.totalBytes=o(e.body)}catch(e){}if(e.totalBytes){var t=Math.ceil(e.totalBytes/e.maxTotalParts);t>e.partSize&&(e.partSize=t)}else e.totalBytes=void 0},isDoneChunking:!1,partPos:0,totalChunkedBytes:0,totalUploadedBytes:0,totalBytes:void 0,numParts:0,totalPartNumbers:0,activeParts:0,doneParts:0,parts:null,completeInfo:null,failed:!1,multipartReq:null,partBuffers:null,partBufferLength:0,fillBuffer:function(){var e=this,t=o(e.body);if(0===t)return e.isDoneChunking=!0,e.numParts=1,void e.nextChunk(e.body);for(;e.activeParts<e.queueSize&&e.partPos<t;){var r=Math.min(e.partPos+e.partSize,t),n=e.sliceFn.call(e.body,e.partPos,r);e.partPos+=e.partSize,(o(n)<e.partSize||e.partPos===t)&&(e.isDoneChunking=!0,e.numParts=e.totalPartNumbers+1),e.nextChunk(n)}},fillStream:function(){var e=this;if(!(e.activeParts>=e.queueSize)){var t=e.body.read(e.partSize-e.partBufferLength)||e.body.read();if(t&&(e.partBuffers.push(t),e.partBufferLength+=t.length,e.totalChunkedBytes+=t.length),e.partBufferLength>=e.partSize){var r=1===e.partBuffers.length?e.partBuffers[0]:i.concat(e.partBuffers);if(e.partBuffers=[],e.partBufferLength=0,r.length>e.partSize){var n=r.slice(e.partSize);e.partBuffers.push(n),e.partBufferLength+=n.length,r=r.slice(0,e.partSize)}e.nextChunk(r)}e.isDoneChunking&&!e.isDoneSending&&(r=1===e.partBuffers.length?e.partBuffers[0]:i.concat(e.partBuffers),e.partBuffers=[],e.partBufferLength=0,e.totalBytes=e.totalChunkedBytes,e.isDoneSending=!0,(0===e.numParts||r.length>0)&&(e.numParts++,e.nextChunk(r))),e.body.read(0)}},nextChunk:function(e){var t=this;if(t.failed)return null;var r=++t.totalPartNumbers;if(t.isDoneChunking&&1===r){var o={Body:e};this.tags&&(o.Tagging=this.getTaggingHeader());var i=t.service.putObject(o);return i._managedUpload=t,i.on("httpUploadProgress",t.progress).send(t.finishSinglePart),null}if(t.service.config.params.ContentMD5){var a=n.util.error(new Error("The Content-MD5 you specified is invalid for multi-part uploads."),{code:"InvalidDigest",retryable:!1});return t.cleanup(a),null}if(t.completeInfo[r]&&null!==t.completeInfo[r].ETag)return null;t.activeParts++,t.service.config.params.UploadId?t.uploadPart(e,r):t.multipartReq?t.queueChunks(e,r):(t.multipartReq=t.service.createMultipartUpload(),t.multipartReq.on("success",function(e){t.service.config.params.UploadId=e.data.UploadId,t.multipartReq=null}),t.queueChunks(e,r),t.multipartReq.on("error",function(e){t.cleanup(e)}),t.multipartReq.send())},getTaggingHeader:function(){for(var e=[],t=0;t<this.tags.length;t++)e.push(n.util.uriEscape(this.tags[t].Key)+"="+n.util.uriEscape(this.tags[t].Value));return e.join("&")},uploadPart:function(e,t){var r=this,o={Body:e,ContentLength:n.util.string.byteLength(e),PartNumber:t},i={ETag:null,PartNumber:t};r.completeInfo[t]=i;var a=r.service.uploadPart(o);r.parts[t]=a,a._lastUploadedBytes=0,a._managedUpload=r,a.on("httpUploadProgress",r.progress),a.send(function(e,t){if(delete r.parts[o.PartNumber],r.activeParts--,!(e||t&&t.ETag)){var a="No access to ETag property on response.";n.util.isBrowser()&&(a+=" Check CORS configuration to expose ETag header."),e=n.util.error(new Error(a),{code:"ETagMissing",retryable:!1})}if(e)return r.cleanup(e);i.ETag=t.ETag,r.doneParts++,r.isDoneChunking&&r.doneParts===r.numParts?r.finishMultiPart():r.fillQueue.call(r)})},queueChunks:function(e,t){var r=this;r.multipartReq.on("success",function(){r.uploadPart(e,t)})},cleanup:function(e){var t=this;t.failed||("function"==typeof t.body.removeAllListeners&&"function"==typeof t.body.resume&&(t.body.removeAllListeners("readable"),t.body.removeAllListeners("end"),t.body.resume()),t.multipartReq&&(t.multipartReq.removeAllListeners("success"),t.multipartReq.removeAllListeners("error"),t.multipartReq.removeAllListeners("complete"),delete t.multipartReq),t.service.config.params.UploadId&&!t.leavePartsOnError?t.service.abortMultipartUpload().send():t.leavePartsOnError&&(t.isDoneChunking=!1),n.util.each(t.parts,function(e,t){t.removeAllListeners("complete"),t.abort()}),t.activeParts=0,t.partPos=0,t.numParts=0,t.totalPartNumbers=0,t.parts={},t.failed=!0,t.callback(e))},finishMultiPart:function(){var e=this,t={MultipartUpload:{Parts:e.completeInfo.slice(1)}};e.service.completeMultipartUpload(t,function(t,r){if(t)return e.cleanup(t);r&&"string"==typeof r.Location&&(r.Location=r.Location.replace(/%2F/g,"/")),Array.isArray(e.tags)?e.service.putObjectTagging({Tagging:{TagSet:e.tags}},function(t,n){t?e.callback(t):e.callback(t,r)}):e.callback(t,r)})},finishSinglePart:function(e,t){var r=this.request._managedUpload,n=this.request.httpRequest,o=n.endpoint;if(e)return r.callback(e);t.Location=[o.protocol,"//",o.host,n.path].join(""),t.key=this.request.params.Key,t.Key=this.request.params.Key,t.Bucket=this.request.params.Bucket,r.callback(e,t)},progress:function(e){var t=this._managedUpload;"putObject"===this.operation?(e.part=1,e.key=this.params.Key):(t.totalUploadedBytes+=e.loaded-this._lastUploadedBytes,this._lastUploadedBytes=e.loaded,e={loaded:t.totalUploadedBytes,total:t.totalBytes,part:this.params.PartNumber,key:this.params.Key}),t.emit("httpUploadProgress",[e])}}),n.util.mixin(n.S3.ManagedUpload,n.SequentialExecutor),n.S3.ManagedUpload.addPromisesToClass=function(e){this.prototype.promise=n.util.promisifyMethod("send",e)},n.S3.ManagedUpload.deletePromisesFromClass=function(){delete this.prototype.promise},n.util.addPromises(n.S3.ManagedUpload),t.exports=n.S3.ManagedUpload},{"../core":38}]},{},[100]),AWS.apiLoader.services.s3["2006-03-01"]={version:"2.0",metadata:{apiVersion:"2006-03-01",checksumFormat:"md5",endpointPrefix:"s3",globalEndpoint:"s3.amazonaws.com",protocol:"rest-xml",serviceAbbreviation:"Amazon S3",serviceFullName:"Amazon Simple Storage Service",serviceId:"S3",signatureVersion:"s3",uid:"s3-2006-03-01"},operations:{AbortMultipartUpload:{http:{method:"DELETE",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},UploadId:{location:"querystring",locationName:"uploadId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},CompleteMultipartUpload:{http:{requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},MultipartUpload:{locationName:"CompleteMultipartUpload",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{Parts:{locationName:"Part",type:"list",member:{type:"structure",members:{ETag:{},PartNumber:{type:"integer"}}},flattened:!0}}},UploadId:{location:"querystring",locationName:"uploadId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}},payload:"MultipartUpload"},output:{type:"structure",members:{Location:{},Bucket:{},Key:{},Expiration:{location:"header",locationName:"x-amz-expiration"},ETag:{},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},VersionId:{location:"header",locationName:"x-amz-version-id"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},CopyObject:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","CopySource","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Bucket:{location:"uri",locationName:"Bucket"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentType:{location:"header",locationName:"Content-Type"},CopySource:{location:"header",locationName:"x-amz-copy-source"},CopySourceIfMatch:{location:"header",locationName:"x-amz-copy-source-if-match"},CopySourceIfModifiedSince:{location:"header",locationName:"x-amz-copy-source-if-modified-since",type:"timestamp"},CopySourceIfNoneMatch:{location:"header",locationName:"x-amz-copy-source-if-none-match"},CopySourceIfUnmodifiedSince:{location:"header",locationName:"x-amz-copy-source-if-unmodified-since",type:"timestamp"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},Metadata:{shape:"S11",location:"headers",locationName:"x-amz-meta-"},MetadataDirective:{location:"header",locationName:"x-amz-metadata-directive"},TaggingDirective:{location:"header",locationName:"x-amz-tagging-directive"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},CopySourceSSECustomerAlgorithm:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm"},CopySourceSSECustomerKey:{shape:"S1c",location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key"},CopySourceSSECustomerKeyMD5:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Tagging:{location:"header",locationName:"x-amz-tagging"}}},output:{type:"structure",members:{CopyObjectResult:{type:"structure",members:{ETag:{},LastModified:{type:"timestamp"}}},Expiration:{location:"header",locationName:"x-amz-expiration"},CopySourceVersionId:{location:"header",locationName:"x-amz-copy-source-version-id"},VersionId:{location:"header",locationName:"x-amz-version-id"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}},payload:"CopyObjectResult"},alias:"PutObjectCopy"},CreateBucket:{http:{method:"PUT",requestUri:"/{Bucket}"},input:{type:"structure",required:["Bucket"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Bucket:{location:"uri",locationName:"Bucket"},CreateBucketConfiguration:{locationName:"CreateBucketConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{LocationConstraint:{}}},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWrite:{location:"header",locationName:"x-amz-grant-write"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"}},payload:"CreateBucketConfiguration"},output:{type:"structure",members:{Location:{location:"header",locationName:"Location"}}},alias:"PutBucket"},CreateMultipartUpload:{http:{requestUri:"/{Bucket}/{Key+}?uploads"},input:{type:"structure",required:["Bucket","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Bucket:{location:"uri",locationName:"Bucket"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},Metadata:{shape:"S11",location:"headers",locationName:"x-amz-meta-"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Tagging:{location:"header",locationName:"x-amz-tagging"}}},output:{type:"structure",members:{AbortDate:{location:"header",locationName:"x-amz-abort-date",type:"timestamp"},AbortRuleId:{location:"header",locationName:"x-amz-abort-rule-id"},Bucket:{locationName:"Bucket"},Key:{},UploadId:{},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}},alias:"InitiateMultipartUpload"},DeleteBucket:{http:{method:"DELETE",requestUri:"/{Bucket}"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketAnalyticsConfiguration:{http:{method:"DELETE",requestUri:"/{Bucket}?analytics"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}}},DeleteBucketCors:{http:{method:"DELETE",requestUri:"/{Bucket}?cors"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketEncryption:{http:{method:"DELETE",requestUri:"/{Bucket}?encryption"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketInventoryConfiguration:{http:{method:"DELETE",requestUri:"/{Bucket}?inventory"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}}},DeleteBucketLifecycle:{http:{method:"DELETE",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketMetricsConfiguration:{http:{method:"DELETE",requestUri:"/{Bucket}?metrics"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}}},DeleteBucketPolicy:{http:{method:"DELETE",requestUri:"/{Bucket}?policy"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketReplication:{http:{method:"DELETE",requestUri:"/{Bucket}?replication"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketTagging:{http:{method:"DELETE",requestUri:"/{Bucket}?tagging"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketWebsite:{http:{method:"DELETE",requestUri:"/{Bucket}?website"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteObject:{http:{method:"DELETE",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},MFA:{location:"header",locationName:"x-amz-mfa"},VersionId:{location:"querystring",locationName:"versionId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{DeleteMarker:{location:"header",locationName:"x-amz-delete-marker",type:"boolean"},VersionId:{location:"header",locationName:"x-amz-version-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},DeleteObjectTagging:{http:{method:"DELETE",requestUri:"/{Bucket}/{Key+}?tagging"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"}}},output:{type:"structure",members:{VersionId:{location:"header",locationName:"x-amz-version-id"}}}},DeleteObjects:{http:{requestUri:"/{Bucket}?delete"},input:{type:"structure",required:["Bucket","Delete"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delete:{locationName:"Delete",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Objects"],members:{Objects:{locationName:"Object",type:"list",member:{type:"structure",required:["Key"],members:{Key:{},VersionId:{}}},flattened:!0},Quiet:{type:"boolean"}}},MFA:{location:"header",locationName:"x-amz-mfa"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}},payload:"Delete"},output:{type:"structure",members:{Deleted:{type:"list",member:{type:"structure",members:{Key:{},VersionId:{},DeleteMarker:{type:"boolean"},DeleteMarkerVersionId:{}}},flattened:!0},RequestCharged:{location:"header",locationName:"x-amz-request-charged"},Errors:{locationName:"Error",type:"list",member:{type:"structure",members:{Key:{},VersionId:{},Code:{},Message:{}}},flattened:!0}}},alias:"DeleteMultipleObjects"},GetBucketAccelerateConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?accelerate"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Status:{}}}},GetBucketAcl:{http:{method:"GET",requestUri:"/{Bucket}?acl"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Owner:{shape:"S2v"},Grants:{shape:"S2y",locationName:"AccessControlList"}}}},GetBucketAnalyticsConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?analytics"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}},output:{type:"structure",members:{AnalyticsConfiguration:{shape:"S37"}},payload:"AnalyticsConfiguration"}},GetBucketCors:{http:{method:"GET",requestUri:"/{Bucket}?cors"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{CORSRules:{shape:"S3n",locationName:"CORSRule"}}}},GetBucketEncryption:{http:{method:"GET",requestUri:"/{Bucket}?encryption"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{ServerSideEncryptionConfiguration:{shape:"S40"}},payload:"ServerSideEncryptionConfiguration"}},GetBucketInventoryConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?inventory"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}},output:{type:"structure",members:{InventoryConfiguration:{shape:"S46"}},payload:"InventoryConfiguration"}},GetBucketLifecycle:{http:{method:"GET",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Rules:{shape:"S4m",locationName:"Rule"}}},deprecated:!0},GetBucketLifecycleConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Rules:{shape:"S51",locationName:"Rule"}}}},GetBucketLocation:{http:{method:"GET",requestUri:"/{Bucket}?location"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{LocationConstraint:{}}}},GetBucketLogging:{http:{method:"GET",requestUri:"/{Bucket}?logging"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{LoggingEnabled:{shape:"S5b"}}}},GetBucketMetricsConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?metrics"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}},output:{type:"structure",members:{MetricsConfiguration:{shape:"S5j"}},payload:"MetricsConfiguration"}},GetBucketNotification:{http:{method:"GET",requestUri:"/{Bucket}?notification"},input:{shape:"S5m"},output:{shape:"S5n"},deprecated:!0},GetBucketNotificationConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?notification"},input:{shape:"S5m"},output:{shape:"S5y"}},GetBucketPolicy:{http:{method:"GET",requestUri:"/{Bucket}?policy"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Policy:{}},payload:"Policy"}},GetBucketReplication:{http:{method:"GET",requestUri:"/{Bucket}?replication"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{ReplicationConfiguration:{shape:"S6h"}},payload:"ReplicationConfiguration"}},GetBucketRequestPayment:{http:{method:"GET",requestUri:"/{Bucket}?requestPayment"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Payer:{}}}},GetBucketTagging:{http:{method:"GET",requestUri:"/{Bucket}?tagging"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",required:["TagSet"],members:{TagSet:{shape:"S3d"}}}},GetBucketVersioning:{http:{method:"GET",requestUri:"/{Bucket}?versioning"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Status:{},MFADelete:{locationName:"MfaDelete"}}}},GetBucketWebsite:{http:{method:"GET",requestUri:"/{Bucket}?website"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{RedirectAllRequestsTo:{shape:"S7a"},IndexDocument:{shape:"S7d"},ErrorDocument:{shape:"S7f"},RoutingRules:{shape:"S7g"}}}},GetObject:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},IfMatch:{location:"header",locationName:"If-Match"},IfModifiedSince:{location:"header",locationName:"If-Modified-Since",type:"timestamp"},IfNoneMatch:{location:"header",locationName:"If-None-Match"},IfUnmodifiedSince:{location:"header",locationName:"If-Unmodified-Since",type:"timestamp"},Key:{location:"uri",locationName:"Key"},Range:{location:"header",locationName:"Range"},ResponseCacheControl:{location:"querystring",locationName:"response-cache-control"},ResponseContentDisposition:{location:"querystring",locationName:"response-content-disposition"},ResponseContentEncoding:{location:"querystring",locationName:"response-content-encoding"},ResponseContentLanguage:{location:"querystring",locationName:"response-content-language"},ResponseContentType:{location:"querystring",locationName:"response-content-type"},ResponseExpires:{location:"querystring",locationName:"response-expires",type:"timestamp"},VersionId:{location:"querystring",locationName:"versionId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"}}},output:{type:"structure",members:{Body:{streaming:!0,type:"blob"},DeleteMarker:{location:"header",locationName:"x-amz-delete-marker",type:"boolean"},AcceptRanges:{location:"header",locationName:"accept-ranges"},Expiration:{location:"header",locationName:"x-amz-expiration"},Restore:{location:"header",locationName:"x-amz-restore"},LastModified:{location:"header",locationName:"Last-Modified",type:"timestamp"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ETag:{location:"header",locationName:"ETag"},MissingMeta:{location:"header",locationName:"x-amz-missing-meta",type:"integer"},VersionId:{location:"header",locationName:"x-amz-version-id"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentRange:{location:"header",locationName:"Content-Range"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},Metadata:{shape:"S11",location:"headers",locationName:"x-amz-meta-"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"},ReplicationStatus:{location:"header",locationName:"x-amz-replication-status"},PartsCount:{location:"header",locationName:"x-amz-mp-parts-count",type:"integer"},TagCount:{location:"header",locationName:"x-amz-tagging-count",type:"integer"}},payload:"Body"}},GetObjectAcl:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?acl"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{Owner:{shape:"S2v"},Grants:{shape:"S2y",locationName:"AccessControlList"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},GetObjectTagging:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?tagging"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"}}},output:{type:"structure",required:["TagSet"],members:{VersionId:{location:"header",locationName:"x-amz-version-id"},TagSet:{shape:"S3d"}}}},GetObjectTorrent:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?torrent"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{Body:{streaming:!0,type:"blob"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}},payload:"Body"}},HeadBucket:{http:{method:"HEAD",requestUri:"/{Bucket}"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},HeadObject:{http:{method:"HEAD",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},IfMatch:{location:"header",locationName:"If-Match"},IfModifiedSince:{location:"header",locationName:"If-Modified-Since",type:"timestamp"},IfNoneMatch:{location:"header",locationName:"If-None-Match"},IfUnmodifiedSince:{location:"header",locationName:"If-Unmodified-Since",type:"timestamp"},Key:{location:"uri",locationName:"Key"},Range:{location:"header",locationName:"Range"},VersionId:{location:"querystring",locationName:"versionId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"}}},output:{type:"structure",members:{DeleteMarker:{location:"header",locationName:"x-amz-delete-marker",type:"boolean"},AcceptRanges:{location:"header",locationName:"accept-ranges"},Expiration:{location:"header",locationName:"x-amz-expiration"},Restore:{location:"header",locationName:"x-amz-restore"},LastModified:{location:"header",locationName:"Last-Modified",type:"timestamp"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ETag:{location:"header",locationName:"ETag"},MissingMeta:{location:"header",locationName:"x-amz-missing-meta",type:"integer"},VersionId:{location:"header",locationName:"x-amz-version-id"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},Metadata:{shape:"S11",location:"headers",locationName:"x-amz-meta-"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"},ReplicationStatus:{location:"header",locationName:"x-amz-replication-status"},PartsCount:{location:"header",locationName:"x-amz-mp-parts-count",type:"integer"}}}},ListBucketAnalyticsConfigurations:{http:{method:"GET",requestUri:"/{Bucket}?analytics"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContinuationToken:{location:"querystring",locationName:"continuation-token"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},ContinuationToken:{},NextContinuationToken:{},AnalyticsConfigurationList:{locationName:"AnalyticsConfiguration",type:"list",member:{shape:"S37"},flattened:!0}}}},ListBucketInventoryConfigurations:{http:{method:"GET",requestUri:"/{Bucket}?inventory"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContinuationToken:{location:"querystring",locationName:"continuation-token"}}},output:{type:"structure",members:{ContinuationToken:{},InventoryConfigurationList:{locationName:"InventoryConfiguration",type:"list",member:{shape:"S46"},flattened:!0},IsTruncated:{type:"boolean"},NextContinuationToken:{}}}},ListBucketMetricsConfigurations:{http:{method:"GET",requestUri:"/{Bucket}?metrics"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContinuationToken:{location:"querystring",locationName:"continuation-token"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},ContinuationToken:{},NextContinuationToken:{},MetricsConfigurationList:{locationName:"MetricsConfiguration",type:"list",member:{shape:"S5j"},flattened:!0}}}},ListBuckets:{http:{method:"GET"},output:{type:"structure",members:{Buckets:{type:"list",member:{locationName:"Bucket",type:"structure",members:{Name:{},CreationDate:{type:"timestamp"}}}},Owner:{shape:"S2v"}}},alias:"GetService"},ListMultipartUploads:{http:{method:"GET",requestUri:"/{Bucket}?uploads"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},KeyMarker:{location:"querystring",locationName:"key-marker"},MaxUploads:{location:"querystring",locationName:"max-uploads",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},UploadIdMarker:{location:"querystring",locationName:"upload-id-marker"}}},output:{type:"structure",members:{Bucket:{},KeyMarker:{},UploadIdMarker:{},NextKeyMarker:{},Prefix:{},Delimiter:{},NextUploadIdMarker:{},MaxUploads:{type:"integer"},IsTruncated:{type:"boolean"},Uploads:{locationName:"Upload",type:"list",member:{type:"structure",members:{UploadId:{},Key:{},Initiated:{type:"timestamp"},StorageClass:{},Owner:{shape:"S2v"},Initiator:{shape:"S9c"}}},flattened:!0},CommonPrefixes:{shape:"S9d"},EncodingType:{}}}},ListObjectVersions:{http:{method:"GET",requestUri:"/{Bucket}?versions"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},KeyMarker:{location:"querystring",locationName:"key-marker"},MaxKeys:{location:"querystring",locationName:"max-keys",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},VersionIdMarker:{location:"querystring",locationName:"version-id-marker"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},KeyMarker:{},VersionIdMarker:{},NextKeyMarker:{},NextVersionIdMarker:{},Versions:{locationName:"Version",type:"list",member:{type:"structure",members:{ETag:{},Size:{type:"integer"},StorageClass:{},Key:{},VersionId:{},IsLatest:{type:"boolean"},LastModified:{type:"timestamp"},Owner:{shape:"S2v"}}},flattened:!0},DeleteMarkers:{locationName:"DeleteMarker",type:"list",member:{type:"structure",members:{Owner:{shape:"S2v"},Key:{},VersionId:{},IsLatest:{type:"boolean"},LastModified:{type:"timestamp"}}},flattened:!0},Name:{},Prefix:{},Delimiter:{},MaxKeys:{type:"integer"},CommonPrefixes:{shape:"S9d"},EncodingType:{}}},alias:"GetBucketObjectVersions"},ListObjects:{http:{method:"GET",requestUri:"/{Bucket}"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},Marker:{location:"querystring",locationName:"marker"},MaxKeys:{location:"querystring",locationName:"max-keys",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},Marker:{},NextMarker:{},Contents:{shape:"S9v"},Name:{},Prefix:{},Delimiter:{},MaxKeys:{type:"integer"},CommonPrefixes:{shape:"S9d"},EncodingType:{}}},alias:"GetBucket"},ListObjectsV2:{http:{method:"GET",requestUri:"/{Bucket}?list-type=2"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},MaxKeys:{location:"querystring",locationName:"max-keys",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},ContinuationToken:{location:"querystring",locationName:"continuation-token"},FetchOwner:{location:"querystring",locationName:"fetch-owner",type:"boolean"},StartAfter:{location:"querystring",locationName:"start-after"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},Contents:{shape:"S9v"},Name:{},Prefix:{},Delimiter:{},MaxKeys:{type:"integer"},CommonPrefixes:{shape:"S9d"},EncodingType:{},KeyCount:{type:"integer"},ContinuationToken:{},NextContinuationToken:{},StartAfter:{}}}},ListParts:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},MaxParts:{location:"querystring",locationName:"max-parts",type:"integer"},PartNumberMarker:{location:"querystring",locationName:"part-number-marker",type:"integer"},UploadId:{location:"querystring",locationName:"uploadId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{AbortDate:{location:"header",locationName:"x-amz-abort-date",type:"timestamp"},AbortRuleId:{location:"header",locationName:"x-amz-abort-rule-id"},Bucket:{},Key:{},UploadId:{},PartNumberMarker:{type:"integer"},NextPartNumberMarker:{type:"integer"},MaxParts:{type:"integer"},IsTruncated:{type:"boolean"},Parts:{locationName:"Part",type:"list",member:{type:"structure",members:{PartNumber:{type:"integer"},LastModified:{type:"timestamp"},ETag:{},Size:{type:"integer"}}},flattened:!0},Initiator:{shape:"S9c"},Owner:{shape:"S2v"},StorageClass:{},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutBucketAccelerateConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?accelerate"},input:{type:"structure",required:["Bucket","AccelerateConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},AccelerateConfiguration:{locationName:"AccelerateConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{Status:{}}}},payload:"AccelerateConfiguration"}},PutBucketAcl:{http:{method:"PUT",requestUri:"/{Bucket}?acl"},input:{type:"structure",required:["Bucket"],members:{ACL:{location:"header",locationName:"x-amz-acl"},AccessControlPolicy:{shape:"Sad",locationName:"AccessControlPolicy",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWrite:{location:"header",locationName:"x-amz-grant-write"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"}},payload:"AccessControlPolicy"}},PutBucketAnalyticsConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?analytics"},input:{type:"structure",required:["Bucket","Id","AnalyticsConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},AnalyticsConfiguration:{shape:"S37",locationName:"AnalyticsConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"AnalyticsConfiguration"}},PutBucketCors:{http:{method:"PUT",requestUri:"/{Bucket}?cors"},input:{type:"structure",required:["Bucket","CORSConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},CORSConfiguration:{locationName:"CORSConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["CORSRules"],members:{CORSRules:{shape:"S3n",locationName:"CORSRule"}}},ContentMD5:{location:"header",locationName:"Content-MD5"}},payload:"CORSConfiguration"}},PutBucketEncryption:{http:{method:"PUT",requestUri:"/{Bucket}?encryption"},input:{type:"structure",required:["Bucket","ServerSideEncryptionConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},ServerSideEncryptionConfiguration:{shape:"S40",locationName:"ServerSideEncryptionConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"ServerSideEncryptionConfiguration"}},PutBucketInventoryConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?inventory"},input:{type:"structure",required:["Bucket","Id","InventoryConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},InventoryConfiguration:{shape:"S46",locationName:"InventoryConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"InventoryConfiguration"}},PutBucketLifecycle:{http:{method:"PUT",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},LifecycleConfiguration:{locationName:"LifecycleConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Rules"],members:{Rules:{shape:"S4m",locationName:"Rule"}}}},payload:"LifecycleConfiguration"},deprecated:!0},PutBucketLifecycleConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},LifecycleConfiguration:{locationName:"LifecycleConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Rules"],members:{Rules:{shape:"S51",locationName:"Rule"}}}},payload:"LifecycleConfiguration"}},PutBucketLogging:{http:{method:"PUT",requestUri:"/{Bucket}?logging"},input:{type:"structure",required:["Bucket","BucketLoggingStatus"],members:{Bucket:{location:"uri",locationName:"Bucket"},BucketLoggingStatus:{locationName:"BucketLoggingStatus",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{LoggingEnabled:{shape:"S5b"}}},ContentMD5:{location:"header",locationName:"Content-MD5"}},payload:"BucketLoggingStatus"}},PutBucketMetricsConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?metrics"},input:{type:"structure",required:["Bucket","Id","MetricsConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},MetricsConfiguration:{shape:"S5j",locationName:"MetricsConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"MetricsConfiguration"}},PutBucketNotification:{http:{method:"PUT",requestUri:"/{Bucket}?notification"},input:{type:"structure",required:["Bucket","NotificationConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},NotificationConfiguration:{shape:"S5n",locationName:"NotificationConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"NotificationConfiguration"},deprecated:!0},PutBucketNotificationConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?notification"},input:{type:"structure",required:["Bucket","NotificationConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},NotificationConfiguration:{shape:"S5y",locationName:"NotificationConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"NotificationConfiguration"}},PutBucketPolicy:{http:{method:"PUT",requestUri:"/{Bucket}?policy"},input:{type:"structure",required:["Bucket","Policy"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},ConfirmRemoveSelfBucketAccess:{location:"header",locationName:"x-amz-confirm-remove-self-bucket-access",type:"boolean"},Policy:{}},payload:"Policy"}},PutBucketReplication:{http:{method:"PUT",requestUri:"/{Bucket}?replication"},input:{type:"structure",required:["Bucket","ReplicationConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},ReplicationConfiguration:{shape:"S6h",locationName:"ReplicationConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"ReplicationConfiguration"}},PutBucketRequestPayment:{http:{method:"PUT",requestUri:"/{Bucket}?requestPayment"},input:{type:"structure",required:["Bucket","RequestPaymentConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},RequestPaymentConfiguration:{locationName:"RequestPaymentConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Payer"],members:{Payer:{}}}},payload:"RequestPaymentConfiguration"}},PutBucketTagging:{http:{method:"PUT",requestUri:"/{Bucket}?tagging"},input:{type:"structure",required:["Bucket","Tagging"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},Tagging:{shape:"Saz",locationName:"Tagging",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"Tagging"}},PutBucketVersioning:{http:{method:"PUT",requestUri:"/{Bucket}?versioning"},input:{type:"structure",required:["Bucket","VersioningConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},MFA:{location:"header",locationName:"x-amz-mfa"},VersioningConfiguration:{locationName:"VersioningConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{MFADelete:{locationName:"MfaDelete"},Status:{}}}},payload:"VersioningConfiguration"}},PutBucketWebsite:{http:{method:"PUT",requestUri:"/{Bucket}?website"},input:{type:"structure",required:["Bucket","WebsiteConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},WebsiteConfiguration:{locationName:"WebsiteConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{ErrorDocument:{shape:"S7f"},IndexDocument:{shape:"S7d"},RedirectAllRequestsTo:{shape:"S7a"},RoutingRules:{shape:"S7g"}}}},payload:"WebsiteConfiguration"}},PutObject:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Body:{streaming:!0,type:"blob"},Bucket:{location:"uri",locationName:"Bucket"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ContentMD5:{location:"header",locationName:"Content-MD5"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},Metadata:{shape:"S11",location:"headers",locationName:"x-amz-meta-"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Tagging:{location:"header",locationName:"x-amz-tagging"}},payload:"Body"},output:{type:"structure",members:{Expiration:{location:"header",locationName:"x-amz-expiration"},ETag:{location:"header",locationName:"ETag"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},VersionId:{location:"header",locationName:"x-amz-version-id"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutObjectAcl:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}?acl"},input:{type:"structure",required:["Bucket","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},AccessControlPolicy:{shape:"Sad",locationName:"AccessControlPolicy",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWrite:{location:"header",locationName:"x-amz-grant-write"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},VersionId:{location:"querystring",locationName:"versionId"}},payload:"AccessControlPolicy"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutObjectTagging:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}?tagging"},input:{type:"structure",required:["Bucket","Key","Tagging"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},ContentMD5:{location:"header",locationName:"Content-MD5"},Tagging:{shape:"Saz",locationName:"Tagging",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"Tagging"},output:{type:"structure",members:{VersionId:{location:"header",locationName:"x-amz-version-id"}}}},RestoreObject:{http:{requestUri:"/{Bucket}/{Key+}?restore"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},RestoreRequest:{locationName:"RestoreRequest",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{Days:{type:"integer"},GlacierJobParameters:{type:"structure",required:["Tier"],members:{Tier:{}}},Type:{},Tier:{},Description:{},SelectParameters:{type:"structure",required:["InputSerialization","ExpressionType","Expression","OutputSerialization"],members:{InputSerialization:{shape:"Sbi"},ExpressionType:{},Expression:{},OutputSerialization:{shape:"Sbx"}}},OutputLocation:{type:"structure",members:{S3:{type:"structure",required:["BucketName","Prefix"],members:{BucketName:{},Prefix:{},Encryption:{type:"structure",required:["EncryptionType"],members:{EncryptionType:{},KMSKeyId:{shape:"Sj"},KMSContext:{}}},CannedACL:{},AccessControlList:{shape:"S2y"},Tagging:{shape:"Saz"},UserMetadata:{type:"list",member:{locationName:"MetadataEntry",type:"structure",members:{Name:{},Value:{}}}},StorageClass:{}}}}}}},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}},payload:"RestoreRequest"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"},RestoreOutputPath:{location:"header",locationName:"x-amz-restore-output-path"}}},alias:"PostObjectRestore"},SelectObjectContent:{http:{requestUri:"/{Bucket}/{Key+}?select&select-type=2"},input:{locationName:"SelectObjectContentRequest",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Bucket","Key","Expression","ExpressionType","InputSerialization","OutputSerialization"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},Expression:{},ExpressionType:{},RequestProgress:{type:"structure",members:{Enabled:{type:"boolean"}}},InputSerialization:{shape:"Sbi"},OutputSerialization:{shape:"Sbx"}}},output:{type:"structure",members:{Payload:{type:"structure",members:{Records:{type:"structure",members:{Payload:{eventpayload:!0,type:"blob"}},event:!0},Stats:{type:"structure",members:{Details:{eventpayload:!0,type:"structure",members:{BytesScanned:{type:"long"},BytesProcessed:{type:"long"},BytesReturned:{type:"long"}}}},event:!0},Progress:{type:"structure",members:{Details:{eventpayload:!0,type:"structure",members:{BytesScanned:{type:"long"},BytesProcessed:{type:"long"},BytesReturned:{type:"long"}}}},event:!0},Cont:{type:"structure",members:{},event:!0},End:{type:"structure",members:{},event:!0}},eventstream:!0}},payload:"Payload"}},UploadPart:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key","PartNumber","UploadId"],members:{Body:{streaming:!0,type:"blob"},Bucket:{location:"uri",locationName:"Bucket"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ContentMD5:{location:"header",locationName:"Content-MD5"},Key:{location:"uri",locationName:"Key"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"},UploadId:{location:"querystring",locationName:"uploadId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}},payload:"Body"},output:{type:"structure",members:{ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},ETag:{location:"header",locationName:"ETag"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},UploadPartCopy:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","CopySource","Key","PartNumber","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},CopySource:{location:"header",locationName:"x-amz-copy-source"},CopySourceIfMatch:{location:"header",locationName:"x-amz-copy-source-if-match"},CopySourceIfModifiedSince:{location:"header",locationName:"x-amz-copy-source-if-modified-since",type:"timestamp"},CopySourceIfNoneMatch:{location:"header",locationName:"x-amz-copy-source-if-none-match"},CopySourceIfUnmodifiedSince:{location:"header",locationName:"x-amz-copy-source-if-unmodified-since",type:"timestamp"},CopySourceRange:{location:"header",locationName:"x-amz-copy-source-range"},Key:{location:"uri",locationName:"Key"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"},UploadId:{location:"querystring",locationName:"uploadId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},CopySourceSSECustomerAlgorithm:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm"},CopySourceSSECustomerKey:{shape:"S1c",location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key"},CopySourceSSECustomerKeyMD5:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{CopySourceVersionId:{location:"header",locationName:"x-amz-copy-source-version-id"},CopyPartResult:{type:"structure",members:{ETag:{},LastModified:{type:"timestamp"}}},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}},payload:"CopyPartResult"}}},shapes:{Sj:{type:"string",sensitive:!0},S11:{type:"map",key:{},value:{}},S19:{type:"blob",sensitive:!0},S1c:{type:"blob",sensitive:!0},S2v:{type:"structure",members:{DisplayName:{},ID:{}}},S2y:{type:"list",member:{locationName:"Grant",type:"structure",members:{Grantee:{shape:"S30"},Permission:{}}}},S30:{type:"structure",required:["Type"],members:{DisplayName:{},EmailAddress:{},ID:{},Type:{locationName:"xsi:type",xmlAttribute:!0},URI:{}},xmlNamespace:{prefix:"xsi",uri:"http://www.w3.org/2001/XMLSchema-instance"}},S37:{type:"structure",required:["Id","StorageClassAnalysis"],members:{Id:{},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3a"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3d",flattened:!0,locationName:"Tag"}}}}},StorageClassAnalysis:{type:"structure",members:{DataExport:{type:"structure",required:["OutputSchemaVersion","Destination"],members:{OutputSchemaVersion:{},Destination:{type:"structure",required:["S3BucketDestination"],members:{S3BucketDestination:{type:"structure",required:["Format","Bucket"],members:{Format:{},BucketAccountId:{},Bucket:{},Prefix:{}}}}}}}}}}},S3a:{type:"structure",required:["Key","Value"],members:{Key:{},Value:{}}},S3d:{type:"list",member:{shape:"S3a",locationName:"Tag"}},S3n:{type:"list",member:{type:"structure",required:["AllowedMethods","AllowedOrigins"],members:{AllowedHeaders:{locationName:"AllowedHeader",type:"list",member:{},flattened:!0},AllowedMethods:{locationName:"AllowedMethod",type:"list",member:{},flattened:!0},AllowedOrigins:{locationName:"AllowedOrigin",type:"list",member:{},flattened:!0},ExposeHeaders:{locationName:"ExposeHeader",type:"list",member:{},flattened:!0},MaxAgeSeconds:{type:"integer"}}},flattened:!0},S40:{type:"structure",required:["Rules"],members:{Rules:{locationName:"Rule",type:"list",member:{type:"structure",members:{ApplyServerSideEncryptionByDefault:{type:"structure",required:["SSEAlgorithm"],members:{SSEAlgorithm:{},KMSMasterKeyID:{shape:"Sj"}}}}},flattened:!0}}},S46:{type:"structure",required:["Destination","IsEnabled","Id","IncludedObjectVersions","Schedule"],members:{Destination:{type:"structure",required:["S3BucketDestination"],members:{S3BucketDestination:{type:"structure",required:["Bucket","Format"],members:{AccountId:{},Bucket:{},Format:{},Prefix:{},Encryption:{type:"structure",members:{SSES3:{locationName:"SSE-S3",type:"structure",members:{}},SSEKMS:{locationName:"SSE-KMS",type:"structure",required:["KeyId"],members:{KeyId:{shape:"Sj"}}}}}}}}},IsEnabled:{type:"boolean"},Filter:{type:"structure",required:["Prefix"],members:{Prefix:{}}},Id:{},IncludedObjectVersions:{},OptionalFields:{type:"list",member:{locationName:"Field"}},Schedule:{type:"structure",required:["Frequency"],members:{Frequency:{}}}}},S4m:{type:"list",member:{type:"structure",required:["Prefix","Status"],members:{Expiration:{shape:"S4o"},ID:{},Prefix:{},Status:{},Transition:{shape:"S4t"},NoncurrentVersionTransition:{shape:"S4v"},NoncurrentVersionExpiration:{shape:"S4w"},AbortIncompleteMultipartUpload:{shape:"S4x"}}},flattened:!0},S4o:{type:"structure",members:{Date:{shape:"S4p"},Days:{type:"integer"},ExpiredObjectDeleteMarker:{type:"boolean"}}},S4p:{type:"timestamp",timestampFormat:"iso8601"},S4t:{type:"structure",members:{Date:{shape:"S4p"},Days:{type:"integer"},StorageClass:{}}},S4v:{type:"structure",members:{NoncurrentDays:{type:"integer"},StorageClass:{}}},S4w:{type:"structure",members:{NoncurrentDays:{type:"integer"}}},S4x:{type:"structure",members:{DaysAfterInitiation:{type:"integer"}}},S51:{type:"list",member:{type:"structure",required:["Status"],members:{Expiration:{shape:"S4o"},ID:{},Prefix:{deprecated:!0},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3a"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3d",flattened:!0,locationName:"Tag"}}}}},Status:{},Transitions:{locationName:"Transition",type:"list",member:{shape:"S4t"},flattened:!0},NoncurrentVersionTransitions:{locationName:"NoncurrentVersionTransition",type:"list",member:{shape:"S4v"},flattened:!0},NoncurrentVersionExpiration:{shape:"S4w"},AbortIncompleteMultipartUpload:{shape:"S4x"}}},flattened:!0},S5b:{type:"structure",required:["TargetBucket","TargetPrefix"],members:{TargetBucket:{},TargetGrants:{type:"list",member:{locationName:"Grant",type:"structure",members:{Grantee:{shape:"S30"},Permission:{}}}},TargetPrefix:{}}},S5j:{type:"structure",required:["Id"],members:{Id:{},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3a"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3d",flattened:!0,locationName:"Tag"}}}}}}},S5m:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},S5n:{type:"structure",members:{TopicConfiguration:{type:"structure",members:{Id:{},Events:{shape:"S5q",locationName:"Event"},Event:{deprecated:!0},Topic:{}}},QueueConfiguration:{type:"structure",members:{Id:{},Event:{deprecated:!0},Events:{shape:"S5q",locationName:"Event"},Queue:{}}},CloudFunctionConfiguration:{type:"structure",members:{Id:{},Event:{deprecated:!0},Events:{shape:"S5q",locationName:"Event"},CloudFunction:{},InvocationRole:{}}}}},S5q:{type:"list",member:{},flattened:!0},S5y:{type:"structure",members:{TopicConfigurations:{locationName:"TopicConfiguration",type:"list",member:{type:"structure",required:["TopicArn","Events"],members:{Id:{},TopicArn:{locationName:"Topic"},Events:{shape:"S5q",locationName:"Event"},Filter:{shape:"S61"}}},flattened:!0},QueueConfigurations:{locationName:"QueueConfiguration",type:"list",member:{type:"structure",required:["QueueArn","Events"],members:{Id:{},QueueArn:{locationName:"Queue"},Events:{shape:"S5q",locationName:"Event"},Filter:{shape:"S61"}}},flattened:!0},LambdaFunctionConfigurations:{locationName:"CloudFunctionConfiguration",type:"list",member:{type:"structure",required:["LambdaFunctionArn","Events"],members:{Id:{},LambdaFunctionArn:{locationName:"CloudFunction"},Events:{shape:"S5q",locationName:"Event"},Filter:{shape:"S61"}}},flattened:!0}}},S61:{type:"structure",members:{Key:{locationName:"S3Key",type:"structure",members:{FilterRules:{locationName:"FilterRule",type:"list",member:{type:"structure",members:{Name:{},Value:{}}},flattened:!0}}}}},S6h:{type:"structure",required:["Role","Rules"],members:{Role:{},Rules:{locationName:"Rule",type:"list",member:{type:"structure",required:["Status","Destination"],members:{ID:{},Priority:{type:"integer"},Prefix:{deprecated:!0},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3a"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3d",flattened:!0,locationName:"Tag"}}}}},Status:{},SourceSelectionCriteria:{type:"structure",members:{SseKmsEncryptedObjects:{type:"structure",required:["Status"],members:{Status:{}}}}},Destination:{type:"structure",required:["Bucket"],members:{Bucket:{},Account:{},StorageClass:{},AccessControlTranslation:{type:"structure",required:["Owner"],members:{Owner:{}}},EncryptionConfiguration:{type:"structure",members:{ReplicaKmsKeyID:{}}}}},DeleteMarkerReplication:{type:"structure",members:{Status:{}}}}},flattened:!0}}},S7a:{type:"structure",required:["HostName"],members:{HostName:{},Protocol:{}}},S7d:{type:"structure",required:["Suffix"],members:{Suffix:{}}},S7f:{type:"structure",required:["Key"],members:{Key:{}}},S7g:{type:"list",member:{locationName:"RoutingRule",type:"structure",required:["Redirect"],members:{Condition:{type:"structure",members:{HttpErrorCodeReturnedEquals:{},KeyPrefixEquals:{}}},Redirect:{type:"structure",members:{HostName:{},HttpRedirectCode:{},Protocol:{},ReplaceKeyPrefixWith:{},ReplaceKeyWith:{}}}}}},S9c:{type:"structure",members:{ID:{},DisplayName:{}}},S9d:{type:"list",member:{type:"structure",members:{Prefix:{}}},flattened:!0},S9v:{type:"list",member:{type:"structure",members:{Key:{},LastModified:{type:"timestamp"},ETag:{},Size:{type:"integer"},StorageClass:{},Owner:{shape:"S2v"}}},flattened:!0},Sad:{type:"structure",members:{Grants:{shape:"S2y",locationName:"AccessControlList"},Owner:{shape:"S2v"}}},Saz:{type:"structure",required:["TagSet"],members:{TagSet:{shape:"S3d"}}},Sbi:{type:"structure",members:{CSV:{type:"structure",members:{FileHeaderInfo:{},Comments:{},QuoteEscapeCharacter:{},RecordDelimiter:{},FieldDelimiter:{},QuoteCharacter:{},AllowQuotedRecordDelimiter:{type:"boolean"}}},CompressionType:{},JSON:{type:"structure",members:{Type:{}}},Parquet:{type:"structure",members:{}}}},Sbx:{type:"structure",members:{CSV:{type:"structure",members:{QuoteFields:{},QuoteEscapeCharacter:{},RecordDelimiter:{},FieldDelimiter:{},QuoteCharacter:{}}},JSON:{type:"structure",members:{RecordDelimiter:{}}}}}},paginators:{ListBuckets:{result_key:"Buckets"},ListMultipartUploads:{input_token:["KeyMarker","UploadIdMarker"],limit_key:"MaxUploads",more_results:"IsTruncated",output_token:["NextKeyMarker","NextUploadIdMarker"],result_key:["Uploads","CommonPrefixes"]},ListObjectVersions:{input_token:["KeyMarker","VersionIdMarker"],limit_key:"MaxKeys",more_results:"IsTruncated",output_token:["NextKeyMarker","NextVersionIdMarker"],result_key:["Versions","DeleteMarkers","CommonPrefixes"]},ListObjects:{input_token:"Marker",limit_key:"MaxKeys",more_results:"IsTruncated",output_token:"NextMarker || Contents[-1].Key",result_key:["Contents","CommonPrefixes"]},ListObjectsV2:{input_token:"ContinuationToken",limit_key:"MaxKeys",output_token:"NextContinuationToken",result_key:["Contents","CommonPrefixes"]},ListParts:{input_token:"PartNumberMarker",limit_key:"MaxParts",more_results:"IsTruncated",output_token:"NextPartNumberMarker",result_key:"Parts"}},waiters:{BucketExists:{delay:5,operation:"HeadBucket",maxAttempts:20,acceptors:[{expected:200,matcher:"status",state:"success"},{expected:301,matcher:"status",state:"success"},{expected:403,matcher:"status",state:"success"},{expected:404,matcher:"status",state:"retry"}]},BucketNotExists:{delay:5,operation:"HeadBucket",maxAttempts:20,acceptors:[{expected:404,matcher:"status",state:"success"}]},ObjectExists:{delay:5,operation:"HeadObject",maxAttempts:20,acceptors:[{expected:200,matcher:"status",state:"success"},{expected:404,matcher:"status",state:"retry"}]},ObjectNotExists:{delay:5,operation:"HeadObject",maxAttempts:20,acceptors:[{expected:404,matcher:"status",state:"success"}]}}},AWS.apiLoader.services.sts={},AWS.STS=AWS.Service.defineService("sts",["2011-06-15"]),s=function e(t,r,n){function o(a,u){if(!r[a]){if(!t[a]){var c="function"==typeof s&&s;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var p=r[a]={exports:{}};t[a][0].call(p.exports,function(e){return o(t[a][1][e]||e)},p,p.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof s&&s,a=0;a<n.length;a++)o(n[a]);return o}({102:[function(e,t,r){var n=e("../core");n.util.update(n.STS.prototype,{credentialsFrom:function(e,t){return e?(t||(t=new n.TemporaryCredentials),t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretAccessKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration,t):null},assumeRoleWithWebIdentity:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithWebIdentity",e,t)},assumeRoleWithSAML:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithSAML",e,t)}})},{"../core":38}]},{},[102]),AWS.apiLoader.services.sts["2011-06-15"]={version:"2.0",metadata:{apiVersion:"2011-06-15",endpointPrefix:"sts",globalEndpoint:"sts.amazonaws.com",protocol:"query",serviceAbbreviation:"AWS STS",serviceFullName:"AWS Security Token Service",serviceId:"STS",signatureVersion:"v4",uid:"sts-2011-06-15",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/"},operations:{AssumeRole:{input:{type:"structure",required:["RoleArn","RoleSessionName"],members:{RoleArn:{},RoleSessionName:{},Policy:{},DurationSeconds:{type:"integer"},ExternalId:{},SerialNumber:{},TokenCode:{}}},output:{resultWrapper:"AssumeRoleResult",type:"structure",members:{Credentials:{shape:"Sa"},AssumedRoleUser:{shape:"Sf"},PackedPolicySize:{type:"integer"}}}},AssumeRoleWithSAML:{input:{type:"structure",required:["RoleArn","PrincipalArn","SAMLAssertion"],members:{RoleArn:{},PrincipalArn:{},SAMLAssertion:{},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"AssumeRoleWithSAMLResult",type:"structure",members:{Credentials:{shape:"Sa"},AssumedRoleUser:{shape:"Sf"},PackedPolicySize:{type:"integer"},Subject:{},SubjectType:{},Issuer:{},Audience:{},NameQualifier:{}}}},AssumeRoleWithWebIdentity:{input:{type:"structure",required:["RoleArn","RoleSessionName","WebIdentityToken"],members:{RoleArn:{},RoleSessionName:{},WebIdentityToken:{},ProviderId:{},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"AssumeRoleWithWebIdentityResult",type:"structure",members:{Credentials:{shape:"Sa"},SubjectFromWebIdentityToken:{},AssumedRoleUser:{shape:"Sf"},PackedPolicySize:{type:"integer"},Provider:{},Audience:{}}}},DecodeAuthorizationMessage:{input:{type:"structure",required:["EncodedMessage"],members:{EncodedMessage:{}}},output:{resultWrapper:"DecodeAuthorizationMessageResult",type:"structure",members:{DecodedMessage:{}}}},GetCallerIdentity:{input:{type:"structure",members:{}},output:{resultWrapper:"GetCallerIdentityResult",type:"structure",members:{UserId:{},Account:{},Arn:{}}}},GetFederationToken:{input:{type:"structure",required:["Name"],members:{Name:{},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"GetFederationTokenResult",type:"structure",members:{Credentials:{shape:"Sa"},FederatedUser:{type:"structure",required:["FederatedUserId","Arn"],members:{FederatedUserId:{},Arn:{}}},PackedPolicySize:{type:"integer"}}}},GetSessionToken:{input:{type:"structure",members:{DurationSeconds:{type:"integer"},SerialNumber:{},TokenCode:{}}},output:{resultWrapper:"GetSessionTokenResult",type:"structure",members:{Credentials:{shape:"Sa"}}}}},shapes:{Sa:{type:"structure",required:["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],members:{AccessKeyId:{},SecretAccessKey:{},SessionToken:{},Expiration:{type:"timestamp"}}},Sf:{type:"structure",required:["AssumedRoleId","Arn"],members:{AssumedRoleId:{},Arn:{}}}},paginators:{}}}).call(this,r(30))},function(e,t){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(e){if(void 0===e)throw new Error("AWS SDK must be loaded before loading the Sync Manager.");e.CognitoSyncManager=function(t){t=t||{},this.provider=e.config.credentials,this.identityPoolId=this.provider.params.IdentityPoolId,this.region=e.config.region,this.logger=t.log,"function"!=typeof this.logger&&(this.logger=function(){}),this.local=new e.CognitoSyncManager.LocalStorage({DataStore:t.DataStore?t.DataStore:e.CognitoSyncManager.StoreLocalStorage}),this.remote=new e.CognitoSyncManager.RemoteStorage(this.identityPoolId,this.provider),this.remote.setUserAgent("CognitoJavaScriptSDK/1")},e.CognitoSyncManager.prototype.openOrCreateDataset=function(t,r){var n=this,o=new RegExp("^[a-zA-Z0-9_.:-]{1,128}$");o.test(t)?this.local.createDataset(this.getIdentityId(),t,function(t,o){return t?r(t,null):void r(null,new e.CognitoSyncManager.Dataset(o,n.provider,n.local,n.remote,n.logger))}):r(new Error("Dataset name must match the pattern "+o.toString()))},e.CognitoSyncManager.prototype.listDatasets=function(e){this.local.getDatasets(this.getIdentityId(),e)},e.CognitoSyncManager.prototype.refreshDatasetMetadata=function(e){var t=this;this.remote.getDatasets(function(r,n){var o=[],i=function(e){t.local.updateDatasetMetadata(t.getIdentityId(),e,a)},a=function(t,r){o.push(r),n.length>0?i(n.shift()):e(null,o)};n.length>0?i(n.shift()):e(null,[])})},e.CognitoSyncManager.prototype.wipeData=function(){this.provider.clearCachedId(),this.local.wipeData()},e.CognitoSyncManager.prototype.getIdentityId=function(){return this.provider.identityId},(e=e||{}).CognitoSyncManager=e.CognitoSyncManager||{},e.CognitoSyncManager.Conflict=function(){var t=function(e,t){if(!e||!t)throw new Error("Remote and local records cannot be null.");if(!e.getKey||!t.getKey)throw new Error("Records are not record objects.");if(e.getKey()!==t.getKey())throw new Error("Remote and local keys do not match.");this.key=e.getKey(),this.remoteRecord=e,this.localRecord=t};return t.prototype.getKey=function(){return this.key},t.prototype.getRemoteRecord=function(){return this.remoteRecord},t.prototype.getLocalRecord=function(){return this.localRecord},t.prototype.resolveWithRemoteRecord=function(){return this.remoteRecord.setModified(!1),this.remoteRecord},t.prototype.resolveWithLocalRecord=function(){return this.localRecord.setSyncCount(this.remoteRecord.getSyncCount()),this.localRecord.setModified(!0),this.localRecord},t.prototype.resolveWithValue=function(t){return new e.CognitoSyncManager.Record({Key:this.remoteRecord.getKey(),Value:t,SyncCount:this.remoteRecord.getSyncCount(),LastModifiedDate:new Date,LastModifiedBy:this.localRecord.getLastModifiedBy(),DeviceLastModifiedDate:new Date,Modified:!0})},t}(),(e=e||{}).CognitoSyncManager=e.CognitoSyncManager||{},e.CognitoSyncManager.Dataset=function(){var t=function(e,t,r,n,o){this.MAX_RETRY=3,this.datasetName=e,this.provider=t,this.local=r,this.remote=n,this.logger=o||function(){}};return t.prototype.validateKey=function(e){var t=new RegExp("^[a-zA-Z0-9_.:-]{1,128}$");return t.test(e)},t.prototype.put=function(e,t,n){var o=r(t);return this.validateKey(e)?"string"!==o?n(new Error("The value type must be a string but was "+o+".")):void this.local.putValue(this.getIdentityId(),this.datasetName,e,t,n):n(new Error("Invalid key."))},t.prototype.remove=function(e,t){return this.validateKey(e)?void this.local.putValue(this.getIdentityId(),this.datasetName,e,null,t):t(new Error("Invalid key."))},t.prototype.get=function(e,t){return this.validateKey(e)?void this.local.getValue(this.getIdentityId(),this.datasetName,e,t):t(new Error("Invalid key."))},t.prototype.getAllRecords=function(e){this.local.getRecords(this.getIdentityId(),this.datasetName,e)},t.prototype.getDataStorage=function(e){this.getDatasetMetadata(function(t,r){return t?e(t):e(null,r?r.getDataStorage():0)})},t.prototype.isChanged=function(e,t){return this.validateKey(e)?void this.local.getRecord(this.getIdentityId(),this.datasetName,e,function(e,r){t(null,r&&r.isModified())}):t(new Error("Invalid key."))},t.prototype.getDatasetMetadata=function(e){this.local.getDatasetMetadata(this.getIdentityId(),this.datasetName,e)},t.prototype.resolve=function(e,t){this.local.putRecords(this.getIdentityId(),this.datasetName,e,t)},t.prototype.putAll=function(e,t){var r=!0;for(var n in e)e.hasOwnProperty(n)&&(this.validateKey(n)||(r=!1));return r?void this.local.putAllValues(this.getIdentityId(),this.datasetName,e,t):t(new Error("Object contains invalid keys."))},t.prototype.getAll=function(e){var t,r={};this.local.getRecords(this.getIdentityId(),this.datasetName,function(n,o){if(n)return e(n);for(var i in o)o.hasOwnProperty(i)&&((t=o[i]).isDeleted()||(r[t.getKey()]=t.getValue()));e(null,r)})},t.prototype.getIdentityId=function(){return this.provider.identityId},t.prototype.getModifiedRecords=function(e){this.local.getModifiedRecords(this.getIdentityId(),this.datasetName,e)},t.prototype.getLocalMergedDatasets=function(e){var t,r=[],n=this.datasetName+".";this.local.getDatasets(this.getIdentityId(),function(o,i){for(var a in i)i.hasOwnProperty(a)&&0===(t=i[a]).getDatasetName().indexOf(n)&&r.push(t.getDatasetName());e(null,r)})},t.prototype.synchronize=function(e,t){var r=this;return(e=e||{}).onSuccess=e.onSuccess||function(e,t){},e.onFailure=e.onFailure||function(e){},e.onConflict=e.onConflict||function(e,t,r){return r(!1)},e.onDatasetDeleted=e.onDatasetDeleted||function(e,t,r){return r(!1)},e.onDatasetsMerged=e.onDatasetsMerged||function(e,t,r){return r(!1)},void 0===t&&(t=this.MAX_RETRY),r.logger("Starting synchronization... (retries: "+t+")"),t<0?e.onFailure(new Error("Synchronize failed: exceeded maximum retry count.")):void this.getLocalMergedDatasets(function(n,o){return n&&e.onFailure(n),r.logger("Checking for locally merged datasets... found "+o.length+"."),o.length>0?(r.logger("Deferring to .onDatasetsMerged."),e.onDatasetsMerged(r,o,function(n){return n?r.synchronize(e,--t):e.onFailure(new Error("Synchronization cancelled by onDatasetsMerged() callback returning false."))})):void r.local.getLastSyncCount(r.getIdentityId(),r.datasetName,function(n,o){return n?e.onFailure(n):(r.logger("Detecting last sync count... "+o),void(-1===parseInt(o)?r.remote.deleteDataset(r.datasetName,function(t,n){return t?e.onFailure(t):void r.local.purgeDataset(r.getIdentityId(),r.datasetName,function(t){return t?e.onFailure(t):e.onSuccess(r)})}):r.remote.listUpdates(r.datasetName,o,function(n,i){if(n)return e.onFailure(n);r.logger("Fetching remote updates... found "+i.records.length+".");var a=i.getMergedDatasetNameList();if(r.logger("Checking for remote merged datasets... found "+a.length+"."),a.length>0)return r.logger("Deferring to .onDatasetsMerged."),e.onDatasetsMerged(r,a,function(n){n?r._synchronizeInternal(e,--t):e.onFailure(new Error("Cancelled due to .onDatasetsMerged result."))});if(0!==o&&!i||i.isDeleted())return e.onDatasetDeleted(r,i.getDatasetName(),function(n){return r.logger("Dataset should be deleted. Deferring to .onDatasetDeleted."),n?(r.logger(".onDatasetDeleted returned true, purging dataset locally."),r.local.purgeDataset(r.getIdentityId(),r.datasetName,function(n){return n?e.onFailure(n):r._synchronizeInternal(e,--t)})):(r.logger(".onDatasetDeleted returned false, cancelling sync."),e.onFailure(new Error("Cancelled due to .onDatasetDeleted result.")))});var s=i.getRecords(),u=i.getSyncCount(),c=i.getSyncSessionToken();r.logger("Checking for remote updates since last sync count... found "+s.length+"."),s.length>0?r._synchronizeResolveLocal(s,function(n,i){return n?e.onFailure(n):(r.logger("Checking for conflicts... found "+i.length+"."),void(i.length>0?(r.logger("Conflicts detected. Deferring to .onConflict."),e.onConflict(r,i,function(n){return n?void r._synchronizePushRemote(c,o,function(){return r.synchronize(e,--t)}):(r.logger(".onConflict returned false. Cancelling sync."),e.onFailure(new Error("Sync cancelled. Conflict callback returned false.")))})):(r.logger("No conflicts. Updating local records."),r.local.putRecords(r.getIdentityId(),r.datasetName,s,function(n){return n?e.onFailure(n):void r.local.updateLastSyncCount(r.getIdentityId(),r.datasetName,u,function(n){return n?e.onFailure(n):(r.logger("Finished resolving records. Restarting sync."),r.synchronize(e,--t))})}))))}):(r.logger("Nothing updated remotely. Pushing local changes to remote."),r._synchronizePushRemote(c,u,function(n){return n?(r.logger("Remote push failed. Likely concurrent sync conflict. Retrying..."),r.synchronize(e,--t)):(r.logger("Sync successful."),e.onSuccess(r,s))}))})))})})},t.prototype._synchronizeResolveLocal=function(t,r){var n=this,o=[];return t&&t.length>0?void n.local.getRecords(n.getIdentityId(),n.datasetName,function(n,i){var a,s,u,c={};for(a=0;a<i.length;a++)c[i[a].getKey()]=i[a];for(a=0;a<t.length;a++)s=t[a].getKey(),(u=c[s])&&u.isModified()&&u.getValue()!==t[a].getValue()&&o.push(new e.CognitoSyncManager.Conflict(t[a],u));return r(null,o)}):r(null,o)},t.prototype._synchronizePushRemote=function(e,t,r){var n=this;this.getModifiedRecords(function(t,o){return o.length>0?void n.remote.putRecords(n.datasetName,o,e,function(e,t){e&&r(e),n.local.putRecords(n.getIdentityId(),n.datasetName,t,function(e){if(e)return r(e);var o=0;for(var i in t)t.hasOwnProperty(i)&&(o=o<t[i].getSyncCount()?t[i].getSyncCount():o);n.local.updateLastSyncCount(n.getIdentityId(),n.datasetName,o,function(e){return e?r(e):r(null,!0)})})}):r(null,!0)})},t}(),(e=e||{}).CognitoSyncManager=e.CognitoSyncManager||{},e.CognitoSyncManager.DatasetMetadata=function(){var e=function(e){if(e=e||{},this.datasetName=e.DatasetName||"",this.creationDate=new Date(e.CreationDate)||new Date,this.lastModifiedDate=new Date(e.LastModifiedDate)||new Date,this.lastModifiedBy=e.LastModifiedBy||"",this.dataStorage=e.DataStorage||0,this.recordCount=e.NumRecords||0,this.lastSyncCount=e.LastSyncCount||0,this.lastSyncDate=e.LastSyncDate?new Date(e.LastSyncDate):new Date,this.dataStorage<0)throw new RangeError("Storage size cannot be negative.");if(this.recordCount<0)throw new RangeError("Record count cannot be negative.")};return e.prototype.getDatasetName=function(){return this.datasetName},e.prototype.setDatasetName=function(e){return this.datasetName=e,this},e.prototype.getCreationDate=function(){return this.creationDate},e.prototype.setCreationDate=function(e){return this.creationDate=new Date(e),this},e.prototype.getLastModifiedDate=function(){return this.lastModifiedDate},e.prototype.setLastModifiedDate=function(e){return this.lastModifiedDate=new Date(e),this},e.prototype.getLastModifiedBy=function(){return this.lastModifiedBy},e.prototype.setLastModifiedBy=function(e){return this.lastModifiedBy=e,this},e.prototype.getDataStorage=function(){return this.dataStorage},e.prototype.setDataStorage=function(e){return this.dataStorage=e,this},e.prototype.getRecordCount=function(){return this.recordCount},e.prototype.setRecordCount=function(e){return this.recordCount=e,this},e.prototype.getLastSyncCount=function(){return this.lastSyncCount},e.prototype.setLastSyncCount=function(e){return this.lastSyncCount=e,this},e.prototype.getLastSyncDate=function(){return this.lastSyncDate},e.prototype.setLastSyncDate=function(e){return this.lastSyncDate=e,this},e.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.prototype.toJSON=function(){return{DatasetName:this.datasetName,CreationDate:this.creationDate,LastModifiedDate:this.lastModifiedDate,LastModifiedBy:this.lastModifiedBy,DataStorage:this.dataStorage,NumRecords:this.recordCount,LastSyncCount:this.lastSyncCount,LastSyncDate:this.lastSyncDate}},e}(),(e=e||{}).CognitoSyncManager=e.CognitoSyncManager||{},e.CognitoSyncManager.DatasetUpdates=function(){var e=function(e){this.datasetName=e,this.records=[],this.syncCount=0,this.syncSessionToken="",this.exists=!0,this.deleted=!1,this.mergedDatasetNameList=[]};return e.prototype.getDatasetName=function(){return this.datasetName},e.prototype.setDatasetName=function(e){return this.datasetName=e,this},e.prototype.getRecords=function(){return this.records},e.prototype.addRecord=function(e){return this.records.push(e),this},e.prototype.getSyncCount=function(){return this.syncCount},e.prototype.setSyncCount=function(e){return this.syncCount=e,this},e.prototype.getSyncSessionToken=function(){return this.syncSessionToken},e.prototype.setSyncSessionToken=function(e){return this.syncSessionToken=e,this},e.prototype.isExists=function(){return this.exists},e.prototype.setExists=function(e){return this.exists=e,this},e.prototype.isDeleted=function(){return this.deleted},e.prototype.setDeleted=function(e){return this.deleted=e,this},e.prototype.getMergedDatasetNameList=function(){return this.mergedDatasetNameList},e.prototype.setMergedDatasetNameList=function(e){return this.mergedDatasetNameList=e,this},e}(),(e=e||{}).CognitoSyncManager=e.CognitoSyncManager||{},e.CognitoSyncManager.LocalStorage=function(){var t=function(t){t=t||{},this.store=null,this.meta=null,t.DataStore?this.store=new t.DataStore:this.store=new e.CognitoSyncManager.StoreInMemory};return t.prototype.getMetadataKey=function(e,t){return e+"."+t},t.prototype.loadMetadataCache=function(e,t){var r=this;this.store.get("_internal","_metadata",e,function(e,n){return e?t(e,null):(n||(n={}),r.meta=n,void t(null,n))})},t.prototype.saveMetadataCache=function(e,t,r){this.store.set("_internal","_metadata",e,t,function(e){return e?r(e):r(null,t)})},t.prototype.createDataset=function(t,r,n){var o=this;return this.getDatasetMetadata(t,r,function(i,a){var s=(new Date).getTime();a?n(null,r):(a=new e.CognitoSyncManager.DatasetMetadata({DatasetName:r,CreationDate:s,LastModifiedDate:s}),o.setDatasetMetadata(t,r,a,function(e,t){}),n(null,r))}),this},t.prototype.getDatasetMetadata=function(t,r,n){var o=this.getMetadataKey(t,r);return null!==this.meta?this.meta[o]?n(null,new e.CognitoSyncManager.DatasetMetadata(this.meta[o])):n(null,void 0):this.loadMetadataCache(t,function(t,r){r[o]?n(null,new e.CognitoSyncManager.DatasetMetadata(r[o])):n(null,void 0)}),this},t.prototype.setDatasetMetadata=function(e,t,r,n){return this.meta[this.getMetadataKey(e,t)]=r.toJSON(),this.saveMetadataCache(e,this.meta,n),this},t.prototype.getValue=function(e,t,r,n){this.getRecord(e,t,r,function(e,t){return n(null,t?t.getValue():void 0)})},t.prototype.putValue=function(t,r,n,o,i){var a=this;this.getRecord(t,r,n,function(s,u){return u&&u.getValue()===o?i(null,u):(u||(u=new e.CognitoSyncManager.Record),u.setKey(n).setValue(o).setModified(!0).setSyncCount(u?u.getSyncCount():0).setDeviceLastModifiedDate(new Date),void a.store.set(t,r,n,u.toJSON(),function(e){return e?i(e):void a.updateLastModifiedTimestamp(t,r,function(e){return i(e,u)})}))})},t.prototype.getValueMap=function(e,t,r){var n,o={};this.getRecords(e,t,function(e,t){for(var i in t)t.hasOwnProperty(i)&&((n=t[i]).isDeleted()||(o[n.getKey()]=n.getValue()));r(null,o)})},t.prototype.putAllValues=function(e,t,r,n){var o=this,i=[];for(var a in r)r.hasOwnProperty(a)&&i.push(a);!function a(s){var u;return s?n(s):void(i.length>0?(u=i.shift(),o.putValue(e,t,u,r[u],a)):n(null,!0))}(null)},t.prototype.getDatasets=function(t,r){var n=[];if(null!==this.meta){for(var o in this.meta)this.meta.hasOwnProperty(o)&&n.push(new e.CognitoSyncManager.DatasetMetadata(this.meta[o]));return r(null,n)}this.loadMetadataCache(t,function(t,o){for(var i in o)o.hasOwnProperty(i)&&n.push(new e.CognitoSyncManager.DatasetMetadata(o[i]));return r(null,n)})},t.prototype.updateDatasetMetadata=function(t,r,n){var o=this;this.getDatasetMetadata(t,r.getDatasetName(),function(i,a){i&&n(i),a||(a=new e.CognitoSyncManager.DatasetMetadata),a.setDatasetName(r.getDatasetName()).setCreationDate(r.getCreationDate()).setLastModifiedDate(r.getLastModifiedDate()).setLastModifiedBy(r.getLastModifiedBy()).setLastSyncCount(r.getLastSyncCount()).setRecordCount(r.getRecordCount()).setDataStorage(r.getDataStorage()),o.meta[o.getMetadataKey(t,r.getDatasetName())]=a.toJSON(),o.saveMetadataCache(t,o.meta,function(e){return e?n(e):n(null,a)})})},t.prototype.getRecord=function(t,r,n,o){this.store.get(t,r,n,function(t,r){return r?o(null,new e.CognitoSyncManager.Record(r)):o(new Error("Key doesn't exist."),null)})},t.prototype.getRecords=function(t,r,n){var o=[];this.store.getAll(t,r,function(t,r){for(var i in r)r.hasOwnProperty(i)&&o.push(new e.CognitoSyncManager.Record(r[i]));n(null,o)})},t.prototype.putRecords=function(e,t,r,n){var o=this;r=(r=r||[]).slice(),function i(){r.length>0&&o.updateAndClearRecord(e,t,r.shift(),function(e){return e?n(e):0===r.length?n(null,!0):void i()})}()},t.prototype.deleteDataset=function(e,t,r){var n=this;this.store.removeAll(e,t,function(o){return o?r(o):void n.getDatasetMetadata(e,t,function(t,o){return t?r(t):(o.setLastModifiedDate(new Date),o.setLastSyncCount(-1),void n.updateDatasetMetadata(e,o,function(e){return e?r(e):r(null,!0)}))})})},t.prototype.purgeDataset=function(e,t,r){var n=this;this.deleteDataset(e,t,function(o){o&&r(o),delete n.meta[n.getMetadataKey(e,t)],n.saveMetadataCache(e,n.meta,r)})},t.prototype.getLastSyncCount=function(e,t,r){this.getDatasetMetadata(e,t,function(e,t){return t?r(null,t.getLastSyncCount()):void r(new Error("Dataset doesn't exist."),null)})},t.prototype.getModifiedRecords=function(e,t,r){var n=[];this.getRecords(e,t,function(e,t){for(var o=0;o<t.length;o++)t[o].isModified()&&n.push(t[o]);r(null,n)})},t.prototype.updateLastSyncCount=function(e,t,r,n){var o=this;this.getDatasetMetadata(e,t,function(t,i){t&&n(t),i.setLastSyncCount(r).setLastSyncDate(new Date),o.updateDatasetMetadata(e,i,function(e){e&&n(e),n(null,!0)})})},t.prototype.wipeData=function(e){this.store.wipe(e)},t.prototype.updateLastModifiedTimestamp=function(e,t,r){var n=this;this.getDatasetMetadata(e,t,function(t,o){return t?r(t):(o.setLastModifiedDate(new Date),void n.updateDatasetMetadata(e,o,function(e){return e?r(e):r(null,!0)}))})},t.prototype.removeRecord=function(e,t,r,n){this.store.remove(e,t,r,function(e){return e?n(e):n(null,!0)})},t.prototype.updateAndClearRecord=function(e,t,r,n){this.store.set(e,t,r.getKey(),r.toJSON(),function(e){return e?n(e):n(null,!0)})},t}(),(e=e||{}).CognitoSyncManager=e.CognitoSyncManager||{},e.CognitoSyncManager.Record=function(){var e=function(e){e=e||{},this.key=e.Key||"",this.value=e.Value||"",this.syncCount=e.SyncCount||0,this.lastModifiedDate=e.LastModifiedDate?new Date(e.LastModifiedDate):new Date,this.lastModifiedBy=e.LastModifiedBy||"",this.deviceLastModifiedDate=e.DeviceLastModifiedDate?new Date(e.DeviceLastModifiedDate):new Date,this.modified=e.Modified||!1};return e.prototype.getKey=function(){return this.key},e.prototype.setKey=function(e){return this.key=e,this},e.prototype.getValue=function(){return this.value},e.prototype.setValue=function(e){return this.value=e,this},e.prototype.getSyncCount=function(){return this.syncCount},e.prototype.setSyncCount=function(e){return this.syncCount=e,this},e.prototype.getLastModifiedDate=function(){return new Date(this.lastModifiedDate)},e.prototype.setLastModifiedDate=function(e){return this.lastModifiedDate=new Date(e),this},e.prototype.getLastModifiedBy=function(){return this.lastModifiedBy},e.prototype.setLastModifiedBy=function(e){return this.lastModifiedBy=e,this},e.prototype.getDeviceLastModifiedDate=function(){return new Date(this.deviceLastModifiedDate)},e.prototype.setDeviceLastModifiedDate=function(e){return this.deviceLastModifiedDate=new Date(e),this},e.prototype.isModified=function(){return this.modified},e.prototype.setModified=function(e){return this.modified=e,this},e.prototype.isDeleted=function(){return null===this.value},e.prototype.toString=function(){return JSON.stringify(this)},e.prototype.toJSON=function(){return{Key:this.key,Value:this.value,SyncCount:this.syncCount,LastModifiedDate:this.lastModifiedDate,LastModifiedBy:this.lastModifiedBy,DeviceLastModifiedDate:this.deviceLastModifiedDate,Modified:this.modified}},e}(),(e=e||{}).CognitoSyncManager=e.CognitoSyncManager||{},e.CognitoSyncManager.RemoteStorage=function(){var t=function(t,r){this.identityPoolId=t,this.provider=r,this.client=new e.CognitoSync};return t.prototype.userAgent="",t.prototype.getIdentityId=function(){return this.provider.identityId},t.prototype.getDatasets=function(t){var r=this,n=[],o=null,i=function(e,t){r.client.listDatasets({IdentityId:r.getIdentityId(),IdentityPoolId:r.identityPoolId,MaxResults:64,NextToken:e},t)};i(o,function r(a,s){for(var u=s.Datasets||[],c=0;c<u.length;c++)n.push(new e.CognitoSyncManager.DatasetMetadata(u[c]));(o=s.NextToken)?i(o,r):t(null,n)})},t.prototype.listUpdates=function(t,r,n){var o=this,i=null,a=new e.CognitoSyncManager.DatasetUpdates(t),s=function(e,n){o.client.listRecords({DatasetName:t,IdentityId:o.getIdentityId(),IdentityPoolId:o.identityPoolId,LastSyncCount:r,MaxResults:1024,NextToken:e},n)};s(null,function t(r,o){if(r)return n(r);for(var u,c=(o=o||{}).Records||[],l=0;l<c.length;l++)(u=new e.CognitoSyncManager.Record(c[l])).setModified(!1),a.addRecord(u);a.setSyncSessionToken(o.SyncSessionToken).setSyncCount(o.DatasetSyncCount).setExists(o.DatasetExists).setDeleted(o.DatasetDeletedAfterRequestedSyncCount),o.MergedDatasetNames&&a.setMergedDatasetNameList(o.MergedDatasetNames),(i=o.NextToken)?s(i,t):n(null,a)})},t.prototype.putRecords=function(t,r,n,o){var i,a=[];for(var s in r)r.hasOwnProperty(s)&&(i=r[s],a.push({Key:i.getKey(),Op:i.getValue()?"replace":"remove",SyncCount:i.getSyncCount(),DeviceLastModifiedDate:i.getDeviceLastModifiedDate(),Value:i.getValue()}));this.client.updateRecords({DatasetName:t,IdentityId:this.getIdentityId(),IdentityPoolId:this.identityPoolId,SyncSessionToken:n,RecordPatches:a},function(r,n){var i="string"==typeof t?t:"(invalid dataset name)";if(r)return o(new Error("Failed to update records in dataset: "+i+" ("+r.message+")"),null);for(var a,s=[],u=0;u<n.Records.length;u++)(a=new e.CognitoSyncManager.Record(n.Records[u])).setModified(!1),s.push(a);return o(null,s)})},t.prototype.deleteDataset=function(e,t){this.client.deleteDataset({DatasetName:e,IdentityId:this.getIdentityId(),IdentityPoolId:this.identityPoolId},function(e,r){return e?t(new Error("Failed to delete dataset."),null):t(null,r)})},t.prototype.getDatasetMetadata=function(t,r){this.client.describeDataset({DatasetName:t,IdentityId:this.getIdentityId(),IdentityPoolId:this.identityPoolId},function(t,n){return t?r(new Error("Failed to get dataset metadata."),null):r(null,new e.CognitoSyncManager.DatasetMetadata(n.Dataset))})},t.prototype.setUserAgent=function(e){this.userAgent=e},t}(),(e=e||{}).CognitoSyncManager=e.CognitoSyncManager||{},e.CognitoSyncManager.StoreInMemory=function(){var e=function(){this.store={}};return e.prototype.makeKey=function(e,t){return e+"."+t},e.prototype.get=function(e,t,r,n){var o=this.makeKey(e,t);return e&&t?this.store[o]&&this.store[o][r]?n(null,this.store[o][r]):n(null,void 0):n(new Error("You must provide an identity id and dataset name."),null)},e.prototype.getAll=function(e,t,r){var n=this.makeKey(e,t);return e&&t?r(null,this.store[n]):r(new Error("You must provide an identity id and dataset name."),null)},e.prototype.set=function(e,t,r,n,o){var i=this.makeKey(e,t),a=this.store[i]||{};return a[r]=n,this.store[i]=a,o(null,a)},e.prototype.setAll=function(e,t,r,n){var o=this.makeKey(e,t);return this.store[o]=r,n(null,r)},e.prototype.remove=function(e,t,r,n){var o=this.makeKey(e,t),i=JSON.parse(this.store[o]);return i||(i={}),delete i[r],this.store[o]=JSON.stringify(i),n(null,!0)},e.prototype.removeAll=function(e,t,r){var n=this.makeKey(e,t);return delete this.store[n],r(null,!0)},e.prototype.wipe=function(e){return this.store={},e(null,!0)},e}(),(e=e||{}).CognitoSyncManager=e.CognitoSyncManager||{},e.CognitoSyncManager.StoreLocalStorage=function(){var e=function(){this.store=window.localStorage};return e.prototype.makeKey=function(e,t){return e+"."+t},e.prototype.get=function(e,t,r,n){var o=this.makeKey(e,t);if(!e||!t)return n(new Error("You must provide an identity id and dataset name."),null);var i=JSON.parse(this.store.getItem(o));return i&&i[r]?n(null,i[r]):n(null,void 0)},e.prototype.getAll=function(e,t,r){var n=this.makeKey(e,t);return e&&t?r(null,JSON.parse(this.store.getItem(n))):r(new Error("You must provide an identity id and dataset name."),null)},e.prototype.set=function(e,t,r,n,o){var i=this.makeKey(e,t),a=JSON.parse(this.store.getItem(i));return a||(a={}),a[r]=n,this.store.setItem(i,JSON.stringify(a)),o(null,a),this},e.prototype.setAll=function(e,t,r,n){var o=this.makeKey(e,t);return this.store.setItem(o,JSON.stringify(r)),n(null,r)},e.prototype.remove=function(e,t,r,n){var o=this.makeKey(e,t),i=JSON.parse(this.store.getItem(o));return i||(i={}),delete i[r],this.store.setItem(o,JSON.stringify(i)),n(null,!0)},e.prototype.removeAll=function(e,t,r){var n=this.makeKey(e,t);return this.store.removeItem(n),r(null,!0)},e.prototype.wipe=function(e){for(var t in this.store)this.store.hasOwnProperty(t)&&-1===t.indexOf("aws.cognito.identity")&&this.store.removeItem(t);return e?e(null,!0):this},e}()}(window.AWS)},function(e,t,r){var n=r(404);e.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}var r=n.atob(t);try{return decodeURIComponent(escape(r))}catch(e){return r}}},function(e,t,r){!function(){var e=t,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=function(){try{document.createElement("$")}catch(e){return e}}();e.btoa||(e.btoa=function(e){for(var t,o,i=0,a=r,s="";e.charAt(0|i)||(a="=",i%1);s+=a.charAt(63&t>>8-i%1*8)){if((o=e.charCodeAt(i+=.75))>255)throw n;t=t<<8|o}return s}),e.atob||(e.atob=function(e){if((e=e.replace(/=+$/,"")).length%4==1)throw n;for(var t,o,i=0,a=0,s="";o=e.charAt(a++);~o&&(t=i%4?64*t+o:o,i++%4)?s+=String.fromCharCode(255&t>>(-2*i&6)):0)o=r.indexOf(o);return s})}()},function(module,exports){module.exports=function(str){var parsed;return parsed="object"==typeof JSON?JSON.parse(str):eval("("+str+")"),parsed}},function(e,t,r){e.exports=function(e){return function(){if("function"==typeof ArrayBuffer){var t=e.lib.WordArray,r=t.init;(t.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,n=[],o=0;o<t;o++)n[o>>>2]|=e[o]<<24-o%4*8;r.call(this,n,t)}else r.apply(this,arguments)}).prototype=t}}(),e.lib.WordArray}(r(1))},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib.WordArray,n=t.enc;function o(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o+=2){var i=t[o>>>2]>>>16-o%4*8&65535;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o++)n[o>>>1]|=e.charCodeAt(o)<<16-o%2*16;return r.create(n,2*t)}},n.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i+=2){var a=o(t[i>>>2]>>>16-i%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i++)n[i>>>1]|=o(e.charCodeAt(i)<<16-i%2*16);return r.create(n,2*t)}}}(),e.enc.Utf16}(r(1))},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib.WordArray,n=t.algo,o=n.SHA256,i=n.SHA224=o.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=4,e}});t.SHA224=o._createHelper(i),t.HmacSHA224=o._createHmacHelper(i)}(),e.SHA224}(r(1),r(163))},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.x64,n=r.Word,o=r.WordArray,i=t.algo,a=i.SHA512,s=i.SHA384=a.extend({_doReset:function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});t.SHA384=a._createHelper(s),t.HmacSHA384=a._createHmacHelper(s)}(),e.SHA384}(r(1),r(70),r(164))},function(e,t,r){e.exports=function(e){return function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,a=r.x64.Word,s=r.algo,u=[],c=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var o=1,i=0;i<24;i++){for(var s=0,p=0,h=0;h<7;h++){if(1&o){var f=(1<<h)-1;f<32?p^=1<<f:s^=1<<f-32}128&o?o=o<<1^113:o<<=1}l[i]=a.create(s,p)}}();var p=[];!function(){for(var e=0;e<25;e++)p[e]=a.create()}();var h=s.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var r=this._state,n=this.blockSize/2,o=0;o<n;o++){var i=e[t+2*o],a=e[t+2*o+1];i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(I=r[o]).high^=a,I.low^=i}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var f=0,d=0,m=0;m<5;m++)f^=(I=r[h+5*m]).high,d^=I.low;var y=p[h];y.high=f,y.low=d}for(h=0;h<5;h++){var g=p[(h+4)%5],v=p[(h+1)%5],b=v.high,S=v.low;for(f=g.high^(b<<1|S>>>31),d=g.low^(S<<1|b>>>31),m=0;m<5;m++)(I=r[h+5*m]).high^=f,I.low^=d}for(var w=1;w<25;w++){var _=(I=r[w]).high,k=I.low,C=u[w];C<32?(f=_<<C|k>>>32-C,d=k<<C|_>>>32-C):(f=k<<C-32|_>>>64-C,d=_<<C-32|k>>>64-C);var E=p[c[w]];E.high=f,E.low=d}var x=p[0],A=r[0];for(x.high=A.high,x.low=A.low,h=0;h<5;h++)for(m=0;m<5;m++){var I=r[w=h+5*m],P=p[w],T=p[(h+1)%5+5*m],N=p[(h+2)%5+5*m];I.high=P.high^~T.high&N.high,I.low=P.low^~T.low&N.low}I=r[0];var R=l[s];I.high^=R.high,I.low^=R.low}},_doFinalize:function(){var e=this._data,r=e.words,n=(this._nDataBytes,8*e.sigBytes),i=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((n+1)/i)*i>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],l=0;l<u;l++){var p=a[l],h=p.high,f=p.low;h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(h)}return new o.init(c,s)},clone:function(){for(var e=i.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});r.SHA3=i._createHelper(h),r.HmacSHA3=i._createHmacHelper(h)}(Math),e.SHA3}(r(1),r(70))},function(e,t,r){e.exports=function(e){
/** @preserve
	(c) 2012 by Cédric Mesnil. All rights reserved.

	Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

	    - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
	    - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	*/
return function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,a=r.algo,s=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),p=o.create([0,1518500249,1859775393,2400959708,2840853838]),h=o.create([1352829926,1548603684,1836072691,2053994217,0]),f=a.RIPEMD160=i.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,a,f,S,w,_,k,C,E,x,A,I=this._hash.words,P=p.words,T=h.words,N=s.words,R=u.words,D=c.words,U=l.words;for(_=i=I[0],k=a=I[1],C=f=I[2],E=S=I[3],x=w=I[4],r=0;r<80;r+=1)A=i+e[t+N[r]]|0,A+=r<16?d(a,f,S)+P[0]:r<32?m(a,f,S)+P[1]:r<48?y(a,f,S)+P[2]:r<64?g(a,f,S)+P[3]:v(a,f,S)+P[4],A=(A=b(A|=0,D[r]))+w|0,i=w,w=S,S=b(f,10),f=a,a=A,A=_+e[t+R[r]]|0,A+=r<16?v(k,C,E)+T[0]:r<32?g(k,C,E)+T[1]:r<48?y(k,C,E)+T[2]:r<64?m(k,C,E)+T[3]:d(k,C,E)+T[4],A=(A=b(A|=0,U[r]))+x|0,_=x,x=E,E=b(C,10),C=k,k=A;A=I[1]+f+E|0,I[1]=I[2]+S+x|0,I[2]=I[3]+w+_|0,I[3]=I[4]+i+k|0,I[4]=I[0]+a+C|0,I[0]=A},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,r){return e^t^r}function m(e,t,r){return e&t|~e&r}function y(e,t,r){return(e|~t)^r}function g(e,t,r){return e&r|t&~r}function v(e,t,r){return e^(t|~r)}function b(e,t){return e<<t|e>>>32-t}r.RIPEMD160=i._createHelper(f),r.HmacRIPEMD160=i._createHmacHelper(f)}(Math),e.RIPEMD160}(r(1))},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib,n=r.Base,o=r.WordArray,i=t.algo,a=i.SHA1,s=i.HMAC,u=i.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=s.create(r.hasher,e),i=o.create(),a=o.create([1]),u=i.words,c=a.words,l=r.keySize,p=r.iterations;u.length<l;){var h=n.update(t).finalize(a);n.reset();for(var f=h.words,d=f.length,m=h,y=1;y<p;y++){m=n.finalize(m),n.reset();for(var g=m.words,v=0;v<d;v++)f[v]^=g[v]}i.concat(h),c[0]++}return i.sigBytes=4*l,i}});t.PBKDF2=function(e,t,r){return u.create(r).compute(e,t)}}(),e.PBKDF2}(r(1),r(109),r(110))},function(e,t,r){e.exports=function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function r(e,t,r,n){var o=this._iv;if(o){var i=o.slice(0);this._iv=void 0}else i=this._prevBlock;n.encryptBlock(i,0);for(var a=0;a<r;a++)e[t+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,o=n.blockSize;r.call(this,e,t,o,n),this._prevBlock=e.slice(t,t+o)}}),t.Decryptor=t.extend({processBlock:function(e,t){var n=this._cipher,o=n.blockSize,i=e.slice(t,t+o);r.call(this,e,t,o,n),this._prevBlock=i}}),t}(),e.mode.CFB}(r(1),r(7))},function(e,t,r){e.exports=function(e){return e.mode.CTR=function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,o=this._iv,i=this._counter;o&&(i=this._counter=o.slice(0),this._iv=void 0);var a=i.slice(0);r.encryptBlock(a,0),i[n-1]=i[n-1]+1|0;for(var s=0;s<n;s++)e[t+s]^=a[s]}});return t.Decryptor=r,t}(),e.mode.CTR}(r(1),r(7))},function(e,t,r){e.exports=function(e){
/** @preserve
	 * Counter block mode compatible with  Dr Brian Gladman fileenc.c
	 * derived from CryptoJS.mode.CTR
	 * Jan Hruby jhruby.web@gmail.com
	 */
return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){if(255==(e>>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var n=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,o=n.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0),function(e){0===(e[0]=r(e[0]))&&(e[1]=r(e[1]))}(a);var s=a.slice(0);n.encryptBlock(s,0);for(var u=0;u<o;u++)e[t+u]^=s[u]}});return t.Decryptor=n,t}(),e.mode.CTRGladman}(r(1),r(7))},function(e,t,r){e.exports=function(e){return e.mode.OFB=function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,o=this._iv,i=this._keystream;o&&(i=this._keystream=o.slice(0),this._iv=void 0),r.encryptBlock(i,0);for(var a=0;a<n;a++)e[t+a]^=i[a]}});return t.Decryptor=r,t}(),e.mode.OFB}(r(1),r(7))},function(e,t,r){e.exports=function(e){return e.mode.ECB=function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t}(),e.mode.ECB}(r(1),r(7))},function(e,t,r){e.exports=function(e){return e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,o=n-r%n,i=r+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923}(r(1),r(7))},function(e,t,r){e.exports=function(e){return e.pad.Iso10126={pad:function(t,r){var n=4*r,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126}(r(1),r(7))},function(e,t,r){e.exports=function(e){return e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971}(r(1),r(7))},function(e,t,r){e.exports=function(e){return e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){for(var t=e.words,r=e.sigBytes-1;!(t[r>>>2]>>>24-r%4*8&255);)r--;e.sigBytes=r+1}},e.pad.ZeroPadding}(r(1),r(7))},function(e,t,r){e.exports=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}(r(1),r(7))},function(e,t,r){e.exports=function(e){return function(t){var r=e,n=r.lib.CipherParams,o=r.enc.Hex;r.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return n.create({ciphertext:t})}}}(),e.format.Hex}(r(1),r(7))},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,o=[],i=[],a=[],s=[],u=[],c=[],l=[],p=[],h=[],f=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,o[r]=d,i[d]=r;var m=e[r],y=e[m],g=e[y],v=257*e[d]^16843008*d;a[r]=v<<24|v>>>8,s[r]=v<<16|v>>>16,u[r]=v<<8|v>>>24,c[r]=v,v=16843009*g^65537*y^257*m^16843008*r,l[d]=v<<24|v>>>8,p[d]=v<<16|v>>>16,h[d]=v<<8|v>>>24,f[d]=v,r?(r=m^e[e[e[g^m]]],n^=e[e[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],a=0;a<n;a++)if(a<r)i[a]=t[a];else{var s=i[a-1];a%r?r>6&&a%r==4&&(s=o[s>>>24]<<24|o[s>>>16&255]<<16|o[s>>>8&255]<<8|o[255&s]):(s=o[(s=s<<8|s>>>24)>>>24]<<24|o[s>>>16&255]<<16|o[s>>>8&255]<<8|o[255&s],s^=d[a/r|0]<<24),i[a]=i[a-r]^s}for(var u=this._invKeySchedule=[],c=0;c<n;c++)a=n-c,s=c%4?i[a]:i[a-4],u[c]=c<4||a<=4?s:l[o[s>>>24]]^p[o[s>>>16&255]]^h[o[s>>>8&255]]^f[o[255&s]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,o)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,p,h,f,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,o,i,a,s){for(var u=this._nRounds,c=e[t]^r[0],l=e[t+1]^r[1],p=e[t+2]^r[2],h=e[t+3]^r[3],f=4,d=1;d<u;d++){var m=n[c>>>24]^o[l>>>16&255]^i[p>>>8&255]^a[255&h]^r[f++],y=n[l>>>24]^o[p>>>16&255]^i[h>>>8&255]^a[255&c]^r[f++],g=n[p>>>24]^o[h>>>16&255]^i[c>>>8&255]^a[255&l]^r[f++],v=n[h>>>24]^o[c>>>16&255]^i[l>>>8&255]^a[255&p]^r[f++];c=m,l=y,p=g,h=v}m=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[p>>>8&255]<<8|s[255&h])^r[f++],y=(s[l>>>24]<<24|s[p>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^r[f++],g=(s[p>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^r[f++],v=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&p])^r[f++],e[t]=m,e[t+1]=y,e[t+2]=g,e[t+3]=v},keySize:8});t.AES=r._createHelper(m)}(),e.AES}(r(1),r(34),r(35),r(25),r(7))},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib,n=r.WordArray,o=r.BlockCipher,i=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],p=i.DES=o.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var o=this._subKeys=[],i=0;i<16;i++){var c=o[i]=[],l=u[i];for(r=0;r<24;r++)c[r/6|0]|=t[(s[r]-1+l)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(s[r+24]-1+l)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var p=this._invSubKeys=[];for(r=0;r<16;r++)p[r]=o[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var o=r[n],i=this._lBlock,a=this._rBlock,s=0,u=0;u<8;u++)s|=c[u][((a^o[u])&l[u])>>>0];this._lBlock=a,this._rBlock=i^s}var p=this._lBlock;this._lBlock=this._rBlock,this._rBlock=p,h.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function f(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}t.DES=o._createHelper(p);var d=i.TripleDES=o.extend({_doReset:function(){var e=this._key.words;this._des1=p.createEncryptor(n.create(e.slice(0,2))),this._des2=p.createEncryptor(n.create(e.slice(2,4))),this._des3=p.createEncryptor(n.create(e.slice(4,6)))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=o._createHelper(d)}(),e.TripleDES}(r(1),r(34),r(35),r(25),r(7))},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=t.algo,o=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var a=o%r,s=t[a>>>2]>>>24-a%4*8&255;i=(i+n[o]+s)%256;var u=n[o];n[o]=n[i],n[i]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*o}return this._i=t,this._j=r,n}t.RC4=r._createHelper(o);var a=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4}(r(1),r(34),r(35),r(25),r(7))},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=[],o=[],i=[],a=t.algo.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)s.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(t){var i=t.words,a=i[0],u=i[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),p=c>>>16|4294901760&l,h=l<<16|65535&c;for(o[0]^=c,o[1]^=p,o[2]^=l,o[3]^=h,o[4]^=c,o[5]^=p,o[6]^=l,o[7]^=h,r=0;r<4;r++)s.call(this)}},_doProcessBlock:function(e,t){var r=this._X;s.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var o=0;o<4;o++)n[o]=16711935&(n[o]<<8|n[o]>>>24)|4278255360&(n[o]<<24|n[o]>>>8),e[t+o]^=n[o]},blockSize:4,ivSize:2});function s(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],a=65535&n,s=n>>>16,u=((a*a>>>17)+a*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);i[r]=u^c}e[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,e[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,e[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,e[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,e[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,e[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,e[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,e[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}t.Rabbit=r._createHelper(a)}(),e.Rabbit}(r(1),r(34),r(35),r(25),r(7))},function(e,t,r){e.exports=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=[],o=[],i=[],a=t.algo.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)s.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(t){var i=t.words,a=i[0],u=i[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),p=c>>>16|4294901760&l,h=l<<16|65535&c;for(n[0]^=c,n[1]^=p,n[2]^=l,n[3]^=h,n[4]^=c,n[5]^=p,n[6]^=l,n[7]^=h,o=0;o<4;o++)s.call(this)}},_doProcessBlock:function(e,t){var r=this._X;s.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var o=0;o<4;o++)n[o]=16711935&(n[o]<<8|n[o]>>>24)|4278255360&(n[o]<<24|n[o]>>>8),e[t+o]^=n[o]},blockSize:4,ivSize:2});function s(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],a=65535&n,s=n>>>16,u=((a*a>>>17)+a*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);i[r]=u^c}e[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,e[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,e[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,e[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,e[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,e[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,e[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,e[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}t.RabbitLegacy=r._createHelper(a)}(),e.RabbitLegacy}(r(1),r(34),r(35),r(25),r(7))},function(e,t,r){"use strict";r.r(t);var n=r(2),o=r.n(n);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._notAuthorizedError=new o.a.Signal,this._sessionError=new o.a.Signal}return function(e,t,r){t&&i(e.prototype,t),r&&i(e,r)}(e,[{key:"authorize",value:function(e,t){}},{key:"deauthorize",value:function(e){}},{key:"notAuthorizedError",get:function(){return this._notAuthorizedError}},{key:"sessionError",get:function(){return this._sessionError}}]),e}();function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e){return(u="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 c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return!t||"object"!==u(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 p(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&&d(e,t)}function h(e){var t="function"==typeof Map?new Map:void 0;return(h=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return f(e,arguments,m(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),d(r,e)})(e)}function f(e,t,r){return(f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&d(o,r.prototype),o}).apply(null,arguments)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=r(167),g=function(e){function t(e){var r;return c(this,t),r=l(this,m(t).call(this,"string"==typeof e?e:e.message||"API error.")),Object.keys(e).forEach(function(t){return r[t]=e[t]}),r.name="ApiError",r}return p(t,h(Error)),t}(),v=function(e){function t(e){var r;if(c(this,t),r=l(this,m(t).call(this)),!e.host&&!e.spec)throw new Error("Invalid configuration");return r._config=e,r._proxy=e.proxy,r._logger=e.logger,r._auth=null,r}return p(t,a),function(e,t,r){t&&s(e.prototype,t),r&&s(e,r)}(t,[{key:"authorize",value:function(e,t){this._auth=t}},{key:"deauthorize",value:function(e){this._auth=null}},{key:"getAuthorizationUrl",value:function(e){var t=this;return this._getClientPromise(!0).then(function(r){var n=r.swaggerObject.securityDefinitions;return n[e.security]&&n[e.security].authorizationUrl?n[e.security].authorizationUrl+"?client_id=".concat(encodeURIComponent(e.client_id),"&response_type=token")+"&redirect_uri=".concat(encodeURIComponent(e.redirect_uri)):(t._logger.error("Missing authorization info for security type '".concat(e.security,"'")),Promise.reject(new Error("Missing authorization info for security type '".concat(e.security,"'"))))})}},{key:"request",value:function(e,t,r,n){var o=this;return this._getClientPromise(n).then(function(n){if(!n.apis[e])return o._logger.error("API service '".concat(e,"' not found.")),Promise.reject(new Error("API service '".concat(e,"' not found.")));var i=n.apis[e][t];return i?i(r).then(function(e){return e.obj}).catch(function(e){if(e){if(e.obj)return Promise.reject(new g(e.obj));if(0===e.status||0===e.statusCode)return Promise.reject(new g({status:0,message:"Application is offline."}));if(e.status>0||e.statusCode>0){var t=new g({status:e.statusCode||e.status,url:e.response&&e.response.url,message:e.response&&e.response.body&&e.response.body.message||e.response&&e.response.statusText,method:e.method});return 403===t.status&&o.notAuthorizedError.dispatch(t),Promise.reject(t)}return e.errorObj?Promise.reject(new g(e.errorObj)):Promise.reject(e)}return Promise.reject(new Error("Unknown client error."))}):(o._logger.error("API method '".concat(t,"' of service '").concat(e,"' not found.")),Promise.reject(new Error("API method '".concat(t,"' of service '").concat(e,"' not found."))))})}},{key:"_getClientPromise",value:function(e){var t,r,n=this;this._client||(this._config.spec?r=this._config.spec:this._config.host&&(t="http"+(this._config.secure?"s":"")+"://",t+=this._config.host+this._config.path+"swagger.json"),this._client=new y({url:t,spec:r,usePromise:!0,requestInterceptor:function(e){return n._auth&&n._auth.access_token&&(e.headers.Authorization="Bearer "+n._auth.access_token),e}}));return this._client.then(function(e){return e},function(e){return n._client=null,n._logger.error("Unable to get the API specification: "+(!e||e.message||e.stack)),Promise.reject(e)}).then(function(t){return e?t:n._proxy().then(function(){return t})})}}]),t}(),b=r(165),S=r.n(b);function w(e){return(w="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 _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t){return!t||"object"!==w(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 E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var x=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=k(this,C(t).call(this)))._options=e,r._url=S.a.getHostUrl(r._options),r}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&&E(e,t)}(t,a),function(e,t,r){t&&_(e.prototype,t),r&&_(e,r)}(t,[{key:"authorize",value:function(e,t){return Promise.resolve()}},{key:"deauthorize",value:function(e){return Promise.resolve()}},{key:"getUrl",value:function(e){return e.startsWith("/")&&(e=e.substring(1)),this._url+e}},{key:"load",value:function(e,t){return this._request(e,t)}},{key:"loadBinary",value:function(e,t){return this._request(e,"blob",t)}},{key:"loadHeaders",value:function(e){var t=this;return new Promise(function(r,n){var o=t._url+e,i=new XMLHttpRequest,a=function(e){n(new Error("Unable to load "+o))};i.addEventListener("load",function(e){if((200===i.status||304===i.status)&&4===i.readyState)return r(i.getAllResponseHeaders());a()},!1),i.addEventListener("error",a,!1),i.open("HEAD",o,!0),i.send()})}},{key:"_request",value:function(e,t,r){r=r||function(){};var n=this._url+e;return new Promise(function(e,o){var i=new XMLHttpRequest;t&&(i.responseType=t);var a=function(e){o(new Error("Unable to load "+n))};i.addEventListener("load",function(t){if((200===i.status||304===i.status)&&4===i.readyState)return e(i.response);a()},!1),i.addEventListener("error",a,!1),i.addEventListener("progress",r,!1),i.open("GET",n,!0),i.send()})}}]),t}();function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._storage={},this.name="socket"}return function(e,t,r){t&&A(e.prototype,t),r&&A(e,r)}(e,[{key:"saveToken",value:function(e,t,r,n){this._storage[e]=t,n&&n()}},{key:"removeToken",value:function(e,t){delete this._storage[e],t&&t()}},{key:"loadToken",value:function(e,t){t(null,this._storage[e]||null)}}]),e}(),P=r(166),T=r.n(P),N=r(36),R=r.n(N);function D(e){return(D="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 U(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function O(e,t){return!t||"object"!==D(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 B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var q=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=O(this,B(t).call(this)))._options=e,r._proxy=e.proxy,r.isAuthenticatedChanged=new o.a.Signal,r.isConnectedChanged=new o.a.Signal,r.onError=new o.a.Signal,r._channels={},r._rpc={},r._retrySubscriptions=[],r._isAuthenticated=void 0,r._isConnected=!1,r._authEngine=new I,r._onRpcMessage=new o.a.Signal,r.onPingError=new o.a.Signal,r}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&&M(e,t)}(t,a),function(e,t,r){t&&U(e.prototype,t),r&&U(e,r)}(t,[{key:"authorize",value:function(e,t){var r=this;return t=Object.assign({},t),new Promise(function(n,o){r._options.application.security===e.security?r.isConnected?r._socket.authenticate(t.access_token,function(e){e?(r.isAuthenticated=!1,o(e)):(r.isAuthenticated=!0,n())}):(r._authEngine.saveToken(r._authEngine.name,t.access_token),r.isAuthenticated=!0,n()):(r.isAuthenticated=!0,n())})}},{key:"deauthorize",value:function(e){var t=this;return new Promise(function(r){t._options.application.security===e.security&&(t.isConnected?t._socket.deauthenticate(function(){t.isAuthenticated=!1,r()}):t._authEngine.removeToken(t._authEngine.name,function(){t.isAuthenticated=!1,r()}))})}},{key:"subscribe",value:function(e,t){this._getChannel(e).watch(t)}},{key:"unsubscribe",value:function(e,t){this._getChannel(e).unwatch(t)}},{key:"publish",value:function(e,t){var r=this;return this._proxy().then(function(){try{r._getChannel(e).publish(t)}catch(e){return Promise.reject(e)}})}},{key:"on",value:function(e,t){this._socket.on(e,t)}},{key:"off",value:function(e,t){this._socket.off(e,t)}},{key:"emit",value:function(e,t){var r=this;return this._proxy().then(function(){return new Promise(function(n,o){r._socket.emit(e,t,function(e,t){if(e)return o(r._handleError(e));n(t)})})})}},{key:"request",value:function(e,t,r){var n=this;return this._proxy().then(function(){return new Promise(function(o,i){if(r=r||1e4,!n.isEnabled)return i(new Error("Socket is not enabled."));n._rpc[e]||(n._rpc[e]=function(t){n._onRpcMessage.dispatch(e,t)},n.subscribe(e,n._rpc[e]));var a=setTimeout(function(){n._onRpcMessage.remove(u),i(new Error("Request has timed out."))},r),s={source:R()(),payload:t},u=function t(r,u){r===e&&u&&u.destination===s.source&&(n._onRpcMessage.remove(t),clearTimeout(a),u.error?i(u.error):o(u.payload))};n._onRpcMessage.add(u),n.publish(e,s)})})}},{key:"respond",value:function(e,t){var r=this;return new Promise(function(n,o){return r.isEnabled?r._rpc[e]?o(new Error("Handler already exists.")):(r._rpc[e]=!0,r.subscribe(e,function(n){n.source&&t(n.payload,function(t,o){var i={destination:n.source,payload:o,error:t};r.publish(e,i)})}),void n()):o(new Error("Socket is not enabled."))})}},{key:"ping",value:function(e){var t=this;return Promise.resolve().then(function(){return new Promise(function(r,n){var o=setTimeout(function(){n(new Error("Request has timed out."))},1e4);t.isConnected?t.emit("event:monitoring:".concat(e),{type:"ping"}).then(function(e){clearTimeout(o),!0!==e.authorized&&!1!==e.authorized||(t.isAuthenticated=!0===e.authorized,e.authorized||t.onPingError.dispatch()),r()}).catch(function(e){"Not authorized."===e.message&&t.onPingError.dispatch(),clearTimeout(o),n(e)}):n(new Error("Not connected."))})})}},{key:"reconnect",value:function(){this._socket&&(this._socket.disconnect(),this._socket.connect())}},{key:"_connect",value:function(){var e=this;try{var t={hostname:this._options.host,path:this._options.path,port:this._options.port,secure:Boolean(this._options.secure),authEngine:this._authEngine,authTokenName:this._authEngine.name};this._socket=T.a.create(t),this._socket.on("connect",function(t){e.isConnected=!0,e.isConnectedChanged.dispatch(e.isConnected)}),this._socket.on("disconnect",function(){e.isConnected=!1,e.isConnectedChanged.dispatch(e.isConnected)}),this._socket.on("error",function(t){e.onError.dispatch(e._handleError(t))}),this._socket.on("subscribeFail",function(t,r){e.onError.dispatch(e._handleError(t)),-1===e._retrySubscriptions.indexOf(r)&&e._retrySubscriptions.push(r)}),this._socket.on("authenticate",function(){e._retrySubscriptions.forEach(function(t){var r=e._getChannel(t),n=r.watchers();e._socket.unsubscribe(t),r&&n.forEach(function(e){r.subscribe(t,e)})}),e._retrySubscriptions=[]})}catch(e){this._options.logger.error("Unable to create a WebSocket",e)}}},{key:"_getChannel",value:function(e){return!this._channels[e]&&this._socket&&(this._channels[e]=this._socket.subscribe(e)),this._channels[e]}},{key:"_handleError",value:function(e){return"Not authorized."!==e&&"Not authorized."!==e.message||(this.isAuthenticated=!1),"string"==typeof e?new Error(e):e}},{key:"isEnabled",get:function(){return this._isEnabled||!1},set:function(e){e=Boolean(e),this._isEnabled!==e&&(this._isEnabled=e,e&&this._connect())}},{key:"isAuthenticated",get:function(){return this._isAuthenticated},set:function(e){e=Boolean(e),this._isAuthenticated!==e&&(this._isAuthenticated=e,this.isAuthenticatedChanged.dispatch(e))}},{key:"isConnected",get:function(){return this._isConnected},set:function(e){e=Boolean(e),this._isConnected!==e&&(this._isConnected=e,this.isConnectedChanged.dispatch(e))}}]),t}(),L=r(4);function j(e){return(j="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 F(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function z(e,t){return!t||"object"!==j(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 K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function V(e,t){return(V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var H=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=z(this,K(t).call(this)))._options=e,r._proxy=e.proxy,r}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&&V(e,t)}(t,a),function(e,t,r){t&&F(e.prototype,t),r&&F(e,r)}(t,[{key:"stream",value:function(e,t){var r=this;return this._proxy().then(function(){var n=e.stream||r._options.stream,o=r._kinesis||(r._kinesis=new L.Kinesis({region:n.region})),i=e.partition||n.name;return Array.isArray(t)?t.reduce(function(e,t){var r=e[e.length-1];return r.length>500&&(r=[],e.push(r)),r.push(t),e},[[]]).reduce(function(e,t){return e.then(function(){return o.putRecords({Records:t.map(function(e){return{Data:e,PartitionKey:i}}),StreamName:n.name}).promise()})},Promise.resolve()):o.putRecord({Data:t,StreamName:n.name,PartitionKey:i,SequenceNumberForOrdering:e.sequence}).promise()})}},{key:"put",value:function(e,t,r){var n=this;return r=r||function(){},this._proxy().then(function(){var o=e.bucket||n._options,i=n._s3||(n._s3=new L.S3({region:o.region,useAccelerateEndpoint:Boolean(o.accelerated)})),a="".concat(o.path||"").concat(e.key||R()());return new Promise(function(n,s){function u(a){i.upload({Bucket:o.bucket,Body:t,Key:a,ContentType:e.mime||t.type||"application/octet-stream",Metadata:e.metadata},function(e,t){if(e)return s(e);n(a)}).on("httpUploadProgress",function(e){return r({loaded:e.loaded,total:e.total})})}e.bucket?L.config.credentials.get(function(e){if(e)return s(e);u(a)}):L.config.credentials.get(function(e){if(e)return s(e);u("".concat(L.config.credentials.identityId,"/").concat(a))})})}).catch(function(e){return e.code&&n.sessionError.dispatch(e),Promise.reject(e)})}}]),t}();function G(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var W=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._notAuthorizedError=new o.a.Signal,this._sessionError=new o.a.Signal;var i={security:"oauth"},a=r.proxy||function(){return Promise.resolve()},s=r.awsproxy||function(){return Promise.resolve()},u=r.logger,c={application:i,api:{host:"api.snap.menu",path:"/v3/",secure:!0,application:i,proxy:a,logger:u},cdn:{host:"cdn.snap.menu",secure:!1,path:"/",application:i,proxy:a,logger:u},rpc:{host:"rpc.snap.menu",path:"/v3/",secure:!0,application:i,proxy:a,logger:u},socket:{host:"hub.snap.menu",secure:!0,path:"/",application:i,proxy:a,logger:u},upload:{bucket:"snap-uploads",accelerated:!0,region:"us-west-2",application:i,proxy:s,logger:u}};this._config=t?Object.keys(t).reduce(function(e,r){return e.hasOwnProperty(r)?t[r]?e[r]=Object.assign(e[r],t[r]):!1===t[r]&&(e[r]=!1):e[r]=t[r],e},c):t,this._clients=[],this._options=r||{},this._config.api&&this._clients.push(this.api=new v(this._config.api)),this._config.cdn&&this._clients.push(this.cdn=new x(this._config.cdn)),this._config.rpc&&this._clients.push(this.rpc=new v(this._config.rpc)),this._config.socket&&this._clients.push(this.socket=new q(this._config.socket)),this._config.upload&&this._clients.push(this.upload=new H(this._config.upload)),this._clients.forEach(function(e){e.sessionError.add(function(e){return n.sessionError.dispatch(e)})}),this._clients.forEach(function(e){e.notAuthorizedError.add(function(e){return n.notAuthorizedError.dispatch(e)})})}return function(e,t,r){t&&G(e.prototype,t),r&&G(e,r)}(e,[{key:"authorize",value:function(e,t){return Promise.all(this._clients.map(function(r){return r.authorize(e,t)||Promise.resolve()}))}},{key:"deauthorize",value:function(e){return Promise.all(this._clients.map(function(t){return t.deauthorize(e)||Promise.resolve()}))}},{key:"notAuthorizedError",get:function(){return this._notAuthorizedError}},{key:"sessionError",get:function(){return this._sessionError}}]),e}();function J(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t}return function(e,t,r){t&&J(e.prototype,t),r&&J(e,r)}(e,[{key:"initialize",value:function(){}},{key:"authenticate",value:function(e){}},{key:"setLevel",value:function(e){this._level=e}},{key:"sendMetrics",value:function(e){return e.forEach(function(e){return console.log("".concat(e.name,": ").concat(e.value," (").concat(e.unit||"Count",")"))}),Promise.resolve()}},{key:"log",value:function(e){try{var t;switch(e.level){case 10:case 20:t=console.debug||console.log;break;case 30:t=console.log;break;case 40:t=console.warn;break;case 50:case 60:t=console.error;break;default:t=console.log}t.apply(null,Object.values(e))}catch(e){}}}]),e}(),X=r(51),$=r.n(X);function Q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Z=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._id=t}return function(e,t,r){t&&Q(e.prototype,t),r&&Q(e,r)}(e,[{key:"initialize",value:function(){return Promise.resolve()}},{key:"clear",value:function(){$.a.remove(this._id)}},{key:"read",value:function(){return $.a.get(this._id)}},{key:"write",value:function(e){return e?$.a.set(this._id,e):$.a.remove(this._id),Promise.resolve()}}]),e}();function ee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var te=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._id=t}return function(e,t,r){t&&ee(e.prototype,t),r&&ee(e,r)}(e,[{key:"initialize",value:function(){return Promise.resolve()}},{key:"clear",value:function(){this._value=void 0}},{key:"read",value:function(){return this._value}},{key:"write",value:function(e){return this._value=e,Promise.resolve()}}]),e}(),re={},ne={getStore:function(e,t){if(!re[t])switch(e.storage||"local"){case"memory":re[t]=new te(t);break;case"local":default:re[t]=new Z(t)}return re[t]}};function oe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ie=30,ae=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t.cloudwatch,!this._config.group)throw new Error("CloudWatch group is not configured.");if(this._store=ne.getStore(t,"api_logs_".concat(this._config.group)),this._tokenStore=ne.getStore(t,"api_logs_token_".concat(this._config.group)),this._levelStore=ne.getStore(t,"api_logs_level_".concat(this._config.group)),!this._config)throw new Error("Missing CloudWatch config.");if(this._queue=this._store.read()||[],this._queue.length>ie){var r=this._queue.length-ie;this._queue=this._queue.filter(function(e,t){return t>=r})}this._sequenceToken=this._tokenStore.read(),this._level=this._levelStore.read()||30}return function(e,t,r){t&&oe(e.prototype,t),r&&oe(e,r)}(e,[{key:"initialize",value:function(){}},{key:"authenticate",value:function(e){this._streamName=e?e.token:null,this._location=e?e.location:null}},{key:"setLevel",value:function(e){this._level=e,this._levelStore.write(e)}},{key:"log",value:function(e){if(!(e.level&&e.level<this._level)){var t={message:JSON.stringify(e),timestamp:new Date(e.time).getTime()};if(this._queue.push(t),this._queue.length>ie){var r=this._queue.length-ie;this._queue=this._queue.filter(function(e,t){return t>=r})}this._scheduleCache(),this._scheduleUpload()}}},{key:"sendMetrics",value:function(e){var t=this,r=e.reduce(function(e,t){var r=e[t.namespace];r||(r=e[t.namespace]=[[]]);var n=r[r.length-1];return n.length>=100&&(n=[],r.push(n)),n.push(t),e},{});return Object.keys(r).reduce(function(e,n){return r[n].reduce(function(e,r){return e.then(function(){return t._cw.putMetricData({Namespace:n,MetricData:r.map(function(e){var t;return e.dimensions&&(t=Object.keys(e.dimensions).map(function(t){return{Name:t,Value:e.dimensions[t]}})),{MetricName:e.name,Timestamp:e.date,Unit:e.unit||"Count",Value:e.value,Dimensions:t}})}).promise()})},e)},Promise.resolve())}},{key:"_scheduleCache",value:function(){var e=this;this._cacheTimer||(this._cacheTimer=setTimeout(function(){if(e._cacheTimer=null,e._queue.length>ie){var t=e._queue.length-ie;e._queue=e._queue.filter(function(e,r){return r>=t})}try{e._store.write(e._queue)}catch(t){throw e._queue=[],e._store.clear(),t}},500))}},{key:"_scheduleUpload",value:function(){var e=this;this._uploadTimer||(this._uploadTimer=setTimeout(function(){e._uploadLogs().catch(function(e){}).then(function(){e._uploadTimer=null,e._scheduleCache(),e._queue.length>0&&e._scheduleUpload()})},5e3))}},{key:"_uploadLogs",value:function(){var e,t=this,r=[],n=[];return this._queue.forEach(function(t){e||(e=t.timestamp),t.timestamp-e<864e5?r.push(t):n.push(t)}),this._queue=n,0!==r.length&&this._streamName?this._logger.putLogEvents({logEvents:r,logGroupName:this._config.group,logStreamName:this._streamName,sequenceToken:this._sequenceToken}).promise().then(function(e){t._sequenceToken=e.nextSequenceToken,t._tokenStore.write(t._sequenceToken)}).catch(function(e){if(t._queue=r.concat(t._queue),"DataAlreadyAcceptedException"===e.code||"InvalidSequenceTokenException"===e.code){var n=e.message.split(": ")[1];t._sequenceToken="null"!==n?n:void 0,t._tokenStore.write(t._sequenceToken)}else if("ResourceNotFoundException"===e.code)return t._logger.createLogStream({logGroupName:t._config.group,logStreamName:t._streamName}).promise()}):Promise.resolve()}},{key:"_logger",get:function(){return this.__logger||(this.__logger=new L.CloudWatchLogs({region:this._config.region}))}},{key:"_cw",get:function(){return this.__cw||(this.__cw=new L.CloudWatch({region:this._config.region}))}}]),e}();function se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ue=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t,this._logger=t.logger,!this._logger)throw new Error("No logger provided.")}return function(e,t,r){t&&se(e.prototype,t),r&&se(e,r)}(e,[{key:"initialize",value:function(){}},{key:"authenticate",value:function(e){}},{key:"setLevel",value:function(e){this._level=e,this._logger.setLevel&&this._logger.setLevel(e)}},{key:"sendMetrics",value:function(e){return this._logger.sendMetrics(e)}},{key:"log",value:function(e){try{var t;switch(e.level){case 10:case 20:t="debug";break;case 30:t="info";break;case 40:t="warn";break;case 50:t="error";break;case 60:t="fatal";break;default:t="debug"}this._logger[t].apply(this._logger,Object.values(e))}catch(e){}}}]),e}();function ce(e){return(ce="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 le(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var pe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t,this._level=20,this._loggers=[],this._config.cloudwatch?this._loggers.push(new ae(t)):this._config.logger?this._loggers.push(new ue(t)):this._loggers.push(new Y(t))}return function(e,t,r){t&&le(e.prototype,t),r&&le(e,r)}(e,[{key:"initialize",value:function(e){this._loggers.forEach(function(t){return t.initialize(e)})}},{key:"authenticate",value:function(e){this._loggers.forEach(function(t){return t.authenticate(e)})}},{key:"setLevel",value:function(e){this._level=e,this._loggers.forEach(function(t){return t.setLevel(e)})}},{key:"debug",value:function(e,t){this._log(20,e,t)}},{key:"info",value:function(e,t){this._log(30,e,t)}},{key:"warn",value:function(e,t){return this._log(40,e,t),e.error||new Error(t||e)}},{key:"error",value:function(e,t){return this._log(50,e,t),e.error||new Error(t||e)}},{key:"fatal",value:function(e,t){return this._log(60,e,t),e.error||new Error(t||e)}},{key:"sendMetrics",value:function(e){return Promise.all(this._loggers.map(function(t){return t.sendMetrics(e)}))}},{key:"_log",value:function(e,t,r){if(!(this._level>e))try{if(t&&"object"===ce(t)||(t={message:t}),t.level=e,t.time=(new Date).toISOString(),r&&(t.message=r),this._config.version&&(t.version=this._config.version),e>=40&&t.error){var n=t.error;n.errObj?n=n.errObj:n.obj&&(n=n.obj),t.error={message:n.message||JSON.stringify(n),stack:n.stack}}this._loggers.forEach(function(e){return e.log(t)})}catch(n){console.error(n)}}}]),e}(),he=r(71),fe=r.n(he);function de(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var me=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.application=t,this.config=r||{},this.tokenExpired=new o.a.Signal}return function(e,t,r){t&&de(e.prototype,t),r&&de(e,r)}(e,[{key:"watch",value:function(e,t){var r=this;this.unwatch(),this.token=e,t>0&&t<2147482?(this.config.credentials&&this.config.credentials.no_watchers||(this._timeout=setTimeout(function(){return r._onExpired()},1e3*t)),this._expiresAt=Date.now()+1e3*t):t<=0&&(this._expiresAt=void 0,this._hasExpired=!0,setTimeout(function(){return r._onExpired()}))}},{key:"unwatch",value:function(){this.token=void 0,this._hasExpired=!1,this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0)}},{key:"_onExpired",value:function(){this._hasExpired=!0,this.tokenExpired.dispatch({token:this.token,application:this.application})}},{key:"hasExpired",get:function(){var e=this,t=this._hasExpired||!1;return t||this.config.credentials&&this.config.credentials.no_watchers&&this._expiresAt>0&&this._expiresAt<Date.now()&&(t=!0,setTimeout(function(){return e._onExpired()})),t}}]),e}();function ye(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ge=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t||{},!this._config.application)throw new Error("Application is not configured");this._application=this._config.application,this._applications=this._config.application?[this._config.application]:[],this._stores={},this._watchers={},this.tokenExpired=new o.a.Signal}return function(e,t,r){t&&ye(e.prototype,t),r&&ye(e,r)}(e,[{key:"initialize",value:function(){var e=this;return new Promise(function(t,r){try{Promise.all(e._applications.map(function(t){return e._getStore(t).initialize()})).then(function(){e._applications.forEach(function(t){var r=e.getToken(t);if(r&&r.access_token){var n=e._getTokenLifespan(r);if(!(n<=0))e._getWatcher(t).watch(r,n)}});var r=e.getToken(e._application),n=r?e.getTokenMetadata(r):void 0;t(n)})}catch(e){return r(e)}})}},{key:"saveToken",value:function(e,t){var r=this;return t&&t.access_token?this._getStore(e).write(t,t.expires_in).catch(function(){}).then(function(){r._getWatcher(e).watch(t,t.expires_in)}):Promise.reject(new Error("Invalid token."))}},{key:"getToken",value:function(e){return this._getStore(e).read()}},{key:"getTokenMetadata",value:function(e){try{return fe()(e.access_token||e)}catch(e){return null}}},{key:"isTokenValid",value:function(e){return this._getTokenLifespan(e)>0}},{key:"isAccessValid",value:function(e){var t=this._getWatcher(e),r=this.getToken(e);return Boolean(r)&&!t.hasExpired}},{key:"removeToken",value:function(e){return this._getStore(e).clear(),this._getWatcher(e).unwatch(),Promise.resolve()}},{key:"_getStore",value:function(e){var t=this._getName(e);if(!this._stores[t])switch(this._config.credentials?this._config.credentials.storage:"local"){case"memory":this._stores[t]=new te(t);break;case"local":default:this._stores[t]=new Z(t)}return this._stores[t]}},{key:"_getWatcher",value:function(e){var t=this,r=this._getName(e);this._watchers[r]||(this._watchers[r]=new me(e,this._config)).tokenExpired.add(function(e){return t._onTokenExpired(e)});return this._watchers[r]}},{key:"_getName",value:function(e){if(!e)throw new Error("Application is not provided.");if(!e.client_id&&!e.security)throw new Error("Application has no client_id.");return"api_access_".concat(e.client_id||e.security)}},{key:"_getTokenLifespan",value:function(e){if(!e)return 0;var t=Math.round((new Date).getTime()/1e3),r=this.getTokenMetadata(e);if(!r)return 0;var n=0;return r.exp?n=r.exp-t:r.iat&&e.expires_in&&(n=r.iat+e.expires_in-t),n<0?0:n}},{key:"_onTokenExpired",value:function(e){this.tokenExpired.dispatch(e.token,e.application)}}]),e}();function ve(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var be=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._dataset=t,this._logger=r}return function(e,t,r){t&&ve(e.prototype,t),r&&ve(e,r)}(e,[{key:"dispose",value:function(){}},{key:"keys",value:function(){var e=this;return new Promise(function(t,r){e._dataset.getAll(function(n,o){if(n)return r(e._logger.warn({error:n,dataset:e._dataset.datasetName},"Unable to fetch the dataset."));t(Object.keys(o))})})}},{key:"read",value:function(e){var t=this;return new Promise(function(r,n){t._dataset.get(e,function(o,i){if(o)return n(t._logger.warn({error:o,key:e,dataset:t._dataset.datasetName},"Unable to read from the dataset."));i=i?JSON.parse(i):null,r(i)})})}},{key:"write",value:function(e,t){var r=this;return new Promise(function(n,o){t=JSON.stringify(t),r._dataset.put(e,t,function(t,i){if(t)return o(r._logger.warn({error:t,key:e,dataset:r._dataset.datasetName},"Unable to write to the dataset."));n(i)})})}},{key:"remove",value:function(e){var t=this;return new Promise(function(r,n){t._dataset.remove(e,function(o,i){if(o)return n(t._logger.warn({error:o,key:e,dataset:t._dataset.datasetName},"Unable to remove from the dataset."));r(i)})})}},{key:"sync",value:function(){var e=this;return new Promise(function(t,r){e._dataset.synchronize({onSuccess:function(r,n){e._logger.debug({dataset:e._dataset.datasetName},"Dataset saved."),t()},onFailure:function(t){e._logger.warn({dataset:e._dataset.datasetName,error:t},"Dataset save error."),r(t)},onConflict:function(r,n,o){e._logger.debug({dataset:e._dataset.datasetName},"Dataset conflict.");for(var i=[],a=0;a<n.length;a++)i.push(n[a].resolveWithLocalRecord());e._dataset.resolve(i,function(){return t(),o(!0)})},onDatasetDeleted:function(t,r,n){return e._logger.debug({dataset:e._dataset.datasetName},"Dataset deleted."),n(!0)},onDatasetsMerged:function(t,r,n){return e._logger.debug({dataset:e._dataset.datasetName},"Dataset merged."),n(!0)}})})}}]),e}();function Se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var we=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t,this._logger=r.logger,this._datasets={}}return function(e,t,r){t&&Se(e.prototype,t),r&&Se(e,r)}(e,[{key:"initialize",value:function(){this._sync=new L.CognitoSync({region:this._config.cognito.region}),this._manager=new L.CognitoSyncManager({region:this._config.cognito.region})}},{key:"authenticate",value:function(e){Object.values(this._datasets).forEach(function(e){return e.dispose()}),this._datasets={}}},{key:"getDataset",value:function(e){var t=this;return this._manager?new Promise(function(r,n){if(t._datasets[e])return r(t._datasets[e]);t._manager.openOrCreateDataset(e,function(o,i){if(o)return n(t._logger.warn({error:o,dataset:e},"Unable to open a dataset."));t._datasets[e]=new be(i,t._logger),r(t._datasets[e])})}):Promise.reject(this._logger.error("Datasets are not available."))}},{key:"registerDevice",value:function(e){var t=this;return this._sync?this._config.cognito.pushNotifications?new Promise(function(r,n){t._getIdentityId().then(function(r){return t._sync.registerDevice({IdentityPoolId:t._config.cognito.identityPoolId,Platform:t._config.cognito.pushNotifications,IdentityId:r,Token:e}).promise()}).then(function(e){t._deviceId=e.DeviceId,t._logger.debug({device_id:e.DeviceId},"Device ID received."),r()}).catch(function(e){n(t._logger.warn({error:e},"Unable to register a device."))})}):Promise.reject(this._logger.error("Device registration is not configured.")):Promise.reject(this._logger.error("No active session."))}},{key:"_getIdentityId",value:function(){return new Promise(function(e,t){AWS.config.credentials.get(function(r){if(r)return t(r);e(AWS.config.credentials.identityId)})})}}]),e}();
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
var _e,ke=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},n=r.ValidationData,o=r.Username,i=r.Password,a=r.AuthParameters;this.validationData=n||{},this.authParameters=a||{},this.username=o,this.password=i}return e.prototype.getUsername=function(){return this.username},e.prototype.getPassword=function(){return this.password},e.prototype.getValidationData=function(){return this.validationData},e.prototype.getAuthParameters=function(){return this.authParameters},e}(),Ce=r(0),Ee=r(6),xe=Ae;function Ae(e,t){null!=e&&this.fromString(e,t)}function Ie(){return new Ae(null)}var Pe="undefined"!=typeof navigator;Pe&&"Microsoft Internet Explorer"==navigator.appName?(Ae.prototype.am=function(e,t,r,n,o,i){for(var a=32767&t,s=t>>15;--i>=0;){var u=32767&this[e],c=this[e++]>>15,l=s*u+c*a;o=((u=a*u+((32767&l)<<15)+r[n]+(1073741823&o))>>>30)+(l>>>15)+s*c+(o>>>30),r[n++]=1073741823&u}return o},_e=30):Pe&&"Netscape"!=navigator.appName?(Ae.prototype.am=function(e,t,r,n,o,i){for(;--i>=0;){var a=t*this[e++]+r[n]+o;o=Math.floor(a/67108864),r[n++]=67108863&a}return o},_e=26):(Ae.prototype.am=function(e,t,r,n,o,i){for(var a=16383&t,s=t>>14;--i>=0;){var u=16383&this[e],c=this[e++]>>14,l=s*u+c*a;o=((u=a*u+((16383&l)<<14)+r[n]+o)>>28)+(l>>14)+s*c,r[n++]=268435455&u}return o},_e=28),Ae.prototype.DB=_e,Ae.prototype.DM=(1<<_e)-1,Ae.prototype.DV=1<<_e;Ae.prototype.FV=Math.pow(2,52),Ae.prototype.F1=52-_e,Ae.prototype.F2=2*_e-52;var Te,Ne,Re="0123456789abcdefghijklmnopqrstuvwxyz",De=new Array;for(Te="0".charCodeAt(0),Ne=0;Ne<=9;++Ne)De[Te++]=Ne;for(Te="a".charCodeAt(0),Ne=10;Ne<36;++Ne)De[Te++]=Ne;for(Te="A".charCodeAt(0),Ne=10;Ne<36;++Ne)De[Te++]=Ne;function Ue(e){return Re.charAt(e)}function Oe(e,t){var r=De[e.charCodeAt(t)];return null==r?-1:r}function Be(e){var t=Ie();return t.fromInt(e),t}function Me(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function qe(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}qe.prototype.convert=function(e){var t=Ie();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Ae.ZERO)>0&&this.m.subTo(t,t),t},qe.prototype.revert=function(e){var t=Ie();return e.copyTo(t),this.reduce(t),t},qe.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},qe.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},qe.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},Ae.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},Ae.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},Ae.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");r=2}this.t=0,this.s=0;for(var n=e.length,o=!1,i=0;--n>=0;){var a=Oe(e,n);a<0?"-"==e.charAt(n)&&(o=!0):(o=!1,0==i?this[this.t++]=a:i+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-i)-1)<<i,this[this.t++]=a>>this.DB-i):this[this.t-1]|=a<<i,(i+=r)>=this.DB&&(i-=this.DB))}this.clamp(),o&&Ae.ZERO.subTo(this,this)},Ae.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},Ae.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},Ae.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},Ae.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,o=this.DB-n,i=(1<<o)-1,a=Math.floor(e/this.DB),s=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t[r+a+1]=this[r]>>o|s,s=(this[r]&i)<<n;for(r=a-1;r>=0;--r)t[r]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},Ae.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,o=this.DB-n,i=(1<<n)-1;t[0]=this[r]>>n;for(var a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&i)<<o,t[a-r]=this[a]>>n;n>0&&(t[this.t-r-1]|=(this.s&i)<<o),t.t=this.t-r,t.clamp()}},Ae.prototype.subTo=function(e,t){for(var r=0,n=0,o=Math.min(e.t,this.t);r<o;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},Ae.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),o=r.t;for(t.t=o+n.t;--o>=0;)t[o]=0;for(o=0;o<n.t;++o)t[o+r.t]=r.am(0,n[o],t,o,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&Ae.ZERO.subTo(t,t)},Ae.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},Ae.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var o=this.abs();if(o.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=Ie());var i=Ie(),a=this.s,s=e.s,u=this.DB-Me(n[n.t-1]);u>0?(n.lShiftTo(u,i),o.lShiftTo(u,r)):(n.copyTo(i),o.copyTo(r));var c=i.t,l=i[c-1];if(0!=l){var p=l*(1<<this.F1)+(c>1?i[c-2]>>this.F2:0),h=this.FV/p,f=(1<<this.F1)/p,d=1<<this.F2,m=r.t,y=m-c,g=null==t?Ie():t;for(i.dlShiftTo(y,g),r.compareTo(g)>=0&&(r[r.t++]=1,r.subTo(g,r)),Ae.ONE.dlShiftTo(c,g),g.subTo(i,i);i.t<c;)i[i.t++]=0;for(;--y>=0;){var v=r[--m]==l?this.DM:Math.floor(r[m]*h+(r[m-1]+d)*f);if((r[m]+=i.am(0,v,r,y,0,c))<v)for(i.dlShiftTo(y,g),r.subTo(g,r);r[m]<--v;)r.subTo(g,r)}null!=t&&(r.drShiftTo(c,t),a!=s&&Ae.ZERO.subTo(t,t)),r.t=c,r.clamp(),u>0&&r.rShiftTo(u,r),a<0&&Ae.ZERO.subTo(r,r)}}},Ae.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},Ae.prototype.addTo=function(e,t){for(var r=0,n=0,o=Math.min(e.t,this.t);r<o;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},Ae.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString();var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");t=2}var r,n=(1<<t)-1,o=!1,i="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(r=this[a]>>s)>0&&(o=!0,i=Ue(r));a>=0;)s<t?(r=(this[a]&(1<<s)-1)<<t-s,r|=this[--a]>>(s+=this.DB-t)):(r=this[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(o=!0),o&&(i+=Ue(r));return o?i:"0"},Ae.prototype.negate=function(){var e=Ie();return Ae.ZERO.subTo(this,e),e},Ae.prototype.abs=function(){return this.s<0?this.negate():this},Ae.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},Ae.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Me(this[this.t-1]^this.s&this.DM)},Ae.prototype.mod=function(e){var t=Ie();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(Ae.ZERO)>0&&e.subTo(t,t),t},Ae.prototype.equals=function(e){return 0==this.compareTo(e)},Ae.prototype.add=function(e){var t=Ie();return this.addTo(e,t),t},Ae.prototype.subtract=function(e){var t=Ie();return this.subTo(e,t),t},Ae.prototype.multiply=function(e){var t=Ie();return this.multiplyTo(e,t),t},Ae.prototype.divide=function(e){var t=Ie();return this.divRemTo(e,t,null),t},Ae.prototype.modPow=function(e,t,r){var n,o=e.bitLength(),i=Be(1),a=new qe(t);if(o<=0)return i;n=o<18?1:o<48?3:o<144?4:o<768?5:6;var s=new Array,u=3,c=n-1,l=(1<<n)-1;if(s[1]=a.convert(this),n>1){var p=Ie();for(a.sqrTo(s[1],p);u<=l;)s[u]=Ie(),a.mulTo(p,s[u-2],s[u]),u+=2}var h,f,d=e.t-1,m=!0,y=Ie();for(o=Me(e[d])-1;d>=0;){for(o>=c?h=e[d]>>o-c&l:(h=(e[d]&(1<<o+1)-1)<<c-o,d>0&&(h|=e[d-1]>>this.DB+o-c)),u=n;0==(1&h);)h>>=1,--u;if((o-=u)<0&&(o+=this.DB,--d),m)s[h].copyTo(i),m=!1;else{for(;u>1;)a.sqrTo(i,y),a.sqrTo(y,i),u-=2;u>0?a.sqrTo(i,y):(f=i,i=y,y=f),a.mulTo(y,s[h],i)}for(;d>=0&&0==(e[d]&1<<o);)a.sqrTo(i,y),f=i,i=y,y=f,--o<0&&(o=this.DB-1,--d)}var g=a.revert(i);return r(null,g),g},Ae.ZERO=Be(0),Ae.ONE=Be(1);
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
var Le=function(e){return Ce.Buffer.from(Ee.lib.WordArray.random(e).toString(),"hex")},je="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",Fe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.N=new xe(je,16),this.g=new xe("2",16),this.k=new xe(this.hexHash("00"+this.N.toString(16)+"0"+this.g.toString(16)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue(function(){}),this.infoBits=Ce.Buffer.from("Caldera Derived Key","utf8"),this.poolName=t}return e.prototype.getSmallAValue=function(){return this.smallAValue},e.prototype.getLargeAValue=function(e){var t=this;this.largeAValue?e(null,this.largeAValue):this.calculateA(this.smallAValue,function(r,n){r&&e(r,null),t.largeAValue=n,e(null,t.largeAValue)})},e.prototype.generateRandomSmallA=function(){var e=Le(128).toString("hex");return new xe(e,16).mod(this.N)},e.prototype.generateRandomString=function(){return Le(40).toString("base64")},e.prototype.getRandomPassword=function(){return this.randomPassword},e.prototype.getSaltDevices=function(){return this.SaltToHashDevices},e.prototype.getVerifierDevices=function(){return this.verifierDevices},e.prototype.generateHashDevice=function(e,t,r){var n=this;this.randomPassword=this.generateRandomString();var o=""+e+t+":"+this.randomPassword,i=this.hash(o),a=Le(16).toString("hex");this.SaltToHashDevices=this.padHex(new xe(a,16)),this.g.modPow(new xe(this.hexHash(this.SaltToHashDevices+i),16),this.N,function(e,t){e&&r(e,null),n.verifierDevices=n.padHex(t),r(null,null)})},e.prototype.calculateA=function(e,t){var r=this;this.g.modPow(e,this.N,function(e,n){e&&t(e,null),n.mod(r.N).equals(xe.ZERO)&&t(new Error("Illegal paramater. A mod N cannot be 0."),null),t(null,n)})},e.prototype.calculateU=function(e,t){return this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(t)),new xe(this.UHexHash,16)},e.prototype.hash=function(e){var t=e instanceof Ce.Buffer?Ee.lib.WordArray.create(e):e,r=Ee.SHA256(t).toString();return new Array(64-r.length).join("0")+r},e.prototype.hexHash=function(e){return this.hash(Ce.Buffer.from(e,"hex"))},e.prototype.computehkdf=function(e,t){var r=Ee.lib.WordArray.create(Ce.Buffer.concat([this.infoBits,Ce.Buffer.from(String.fromCharCode(1),"utf8")])),n=e instanceof Ce.Buffer?Ee.lib.WordArray.create(e):e,o=t instanceof Ce.Buffer?Ee.lib.WordArray.create(t):t,i=Ee.HmacSHA256(n,o),a=Ee.HmacSHA256(r,i);return Ce.Buffer.from(a.toString(),"hex").slice(0,16)},e.prototype.getPasswordAuthenticationKey=function(e,t,r,n,o){var i=this;if(r.mod(this.N).equals(xe.ZERO))throw new Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,r),this.UValue.equals(xe.ZERO))throw new Error("U cannot be zero.");var a=""+this.poolName+e+":"+t,s=this.hash(a),u=new xe(this.hexHash(this.padHex(n)+s),16);this.calculateS(u,r,function(e,t){e&&o(e,null);var r=i.computehkdf(Ce.Buffer.from(i.padHex(t),"hex"),Ce.Buffer.from(i.padHex(i.UValue.toString(16)),"hex"));o(null,r)})},e.prototype.calculateS=function(e,t,r){var n=this;this.g.modPow(e,this.N,function(o,i){o&&r(o,null),t.subtract(n.k.multiply(i)).modPow(n.smallAValue.add(n.UValue.multiply(e)),n.N,function(e,t){e&&r(e,null),r(null,t.mod(n.N))})})},e.prototype.getNewPasswordRequiredChallengeUserAttributePrefix=function(){return"userAttributes."},e.prototype.padHex=function(e){var t=e.toString(16);return t.length%2==1?t="0"+t:-1!=="89ABCDEFabcdef".indexOf(t[0])&&(t="00"+t),t},e}();
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
var ze=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.jwtToken=t||"",this.payload=this.decodePayload()}return e.prototype.getJwtToken=function(){return this.jwtToken},e.prototype.getExpiration=function(){return this.payload.exp},e.prototype.getIssuedAt=function(){return this.payload.iat},e.prototype.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(Ce.Buffer.from(e,"base64").toString("utf8"))}catch(e){return{}}},e}();var Ke=function(e){function t(){var r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).AccessToken;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r||""))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(ze);
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
var Ve=function(e){function t(){var r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).IdToken;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r||""))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(ze);
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
var He=function(){function e(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).RefreshToken;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.token=t||""}return e.prototype.getToken=function(){return this.token},e}();
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
var Ge=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.IdToken,n=t.RefreshToken,o=t.AccessToken,i=t.ClockDrift;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null==o||null==r)throw new Error("Id token and Access Token must be present.");this.idToken=r,this.refreshToken=n,this.accessToken=o,this.clockDrift=void 0===i?this.calculateClockDrift():i}return e.prototype.getIdToken=function(){return this.idToken},e.prototype.getRefreshToken=function(){return this.refreshToken},e.prototype.getAccessToken=function(){return this.accessToken},e.prototype.getClockDrift=function(){return this.clockDrift},e.prototype.calculateClockDrift=function(){return Math.floor(new Date/1e3)-Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt())},e.prototype.isValid=function(){var e=Math.floor(new Date/1e3)-this.clockDrift;return e<this.accessToken.getExpiration()&&e<this.idToken.getExpiration()},e}();
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
var We=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Je=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ye=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.getNowString=function(){var e=new Date,t=Je[e.getUTCDay()],r=We[e.getUTCMonth()],n=e.getUTCDate(),o=e.getUTCHours();o<10&&(o="0"+o);var i=e.getUTCMinutes();i<10&&(i="0"+i);var a=e.getUTCSeconds();return a<10&&(a="0"+a),t+" "+r+" "+n+" "+o+":"+i+":"+a+" UTC "+e.getUTCFullYear()},e}();
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
var Xe=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.Name,n=t.Value;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.Name=r||"",this.Value=n||""}return e.prototype.getValue=function(){return this.Value},e.prototype.setValue=function(e){return this.Value=e,this},e.prototype.getName=function(){return this.Name},e.prototype.setName=function(e){return this.Name=e,this},e.prototype.toString=function(){return JSON.stringify(this)},e.prototype.toJSON=function(){return{Name:this.Name,Value:this.Value}},e}();function $e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */var Qe={},Ze=function(){function e(){$e(this,e)}return e.setItem=function(e,t){return Qe[e]=t,Qe[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(Qe,e)?Qe[e]:void 0},e.removeItem=function(e){return delete Qe[e]},e.clear=function(){return Qe={}},e}(),et=function(){function e(){$e(this,e);try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch(e){this.storageWindow=Ze}}return e.prototype.getStorage=function(){return this.storageWindow},e}();
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
var tt=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null==t||null==t.Username||null==t.Pool)throw new Error("Username and pool information are required.");this.username=t.Username||"",this.pool=t.Pool,this.Session=null,this.client=t.Pool.client,this.signInUserSession=null,this.authenticationFlowType="USER_SRP_AUTH",this.storage=t.Storage||(new et).getStorage()}return e.prototype.setSignInUserSession=function(e){this.clearCachedTokens(),this.signInUserSession=e,this.cacheTokens()},e.prototype.getSignInUserSession=function(){return this.signInUserSession},e.prototype.getUsername=function(){return this.username},e.prototype.getAuthenticationFlowType=function(){return this.authenticationFlowType},e.prototype.setAuthenticationFlowType=function(e){this.authenticationFlowType=e},e.prototype.initiateAuth=function(e,t){var r=this,n=e.getAuthParameters();n.USERNAME=this.username;var o={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:e.getValidationData()};this.getUserContextData()&&(o.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",o,function(e,n){if(e)return t.onFailure(e);var o=n.ChallengeName,i=n.ChallengeParameters;return"CUSTOM_CHALLENGE"===o?(r.Session=n.Session,t.customChallenge(i)):(r.signInUserSession=r.getCognitoUserSession(n.AuthenticationResult),r.cacheTokens(),t.onSuccess(r.signInUserSession))})},e.prototype.authenticateUser=function(e,t){return"USER_PASSWORD_AUTH"===this.authenticationFlowType?this.authenticateUserPlainUsernamePassword(e,t):"USER_SRP_AUTH"===this.authenticationFlowType?this.authenticateUserDefaultAuth(e,t):t.onFailure(new Error("Authentication flow type is invalid."))},e.prototype.authenticateUserDefaultAuth=function(e,t){var r=this,n=new Fe(this.pool.getUserPoolId().split("_")[1]),o=new Ye,i=void 0,a=void 0,s={};null!=this.deviceKey&&(s.DEVICE_KEY=this.deviceKey),s.USERNAME=this.username,n.getLargeAValue(function(u,c){u&&t.onFailure(u),s.SRP_A=c.toString(16),"CUSTOM_AUTH"===r.authenticationFlowType&&(s.CHALLENGE_NAME="SRP_A");var l={AuthFlow:r.authenticationFlowType,ClientId:r.pool.getClientId(),AuthParameters:s,ClientMetadata:e.getValidationData()};r.getUserContextData(r.username)&&(l.UserContextData=r.getUserContextData(r.username)),r.client.request("InitiateAuth",l,function(s,u){if(s)return t.onFailure(s);var c=u.ChallengeParameters;r.username=c.USER_ID_FOR_SRP,i=new xe(c.SRP_B,16),a=new xe(c.SALT,16),r.getCachedDeviceKeyAndPassword(),n.getPasswordAuthenticationKey(r.username,e.getPassword(),i,a,function(e,i){e&&t.onFailure(e);var a=o.getNowString(),s=Ee.lib.WordArray.create(Ce.Buffer.concat([Ce.Buffer.from(r.pool.getUserPoolId().split("_")[1],"utf8"),Ce.Buffer.from(r.username,"utf8"),Ce.Buffer.from(c.SECRET_BLOCK,"base64"),Ce.Buffer.from(a,"utf8")])),l=Ee.lib.WordArray.create(i),p=Ee.enc.Base64.stringify(Ee.HmacSHA256(s,l)),h={};h.USERNAME=r.username,h.PASSWORD_CLAIM_SECRET_BLOCK=c.SECRET_BLOCK,h.TIMESTAMP=a,h.PASSWORD_CLAIM_SIGNATURE=p,null!=r.deviceKey&&(h.DEVICE_KEY=r.deviceKey);var f={ChallengeName:"PASSWORD_VERIFIER",ClientId:r.pool.getClientId(),ChallengeResponses:h,Session:u.Session};r.getUserContextData()&&(f.UserContextData=r.getUserContextData()),function e(t,n){return r.client.request("RespondToAuthChallenge",t,function(o,i){return o&&"ResourceNotFoundException"===o.code&&-1!==o.message.toLowerCase().indexOf("device")?(h.DEVICE_KEY=null,r.deviceKey=null,r.randomPassword=null,r.deviceGroupKey=null,r.clearCachedDeviceKeyAndPassword(),e(t,n)):n(o,i)})}(f,function(e,o){return e?t.onFailure(e):r.authenticateUserInternal(o,n,t)})})})})},e.prototype.authenticateUserPlainUsernamePassword=function(e,t){var r=this,n={};if(n.USERNAME=this.username,n.PASSWORD=e.getPassword(),n.PASSWORD){var o=new Fe(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(n.DEVICE_KEY=this.deviceKey);var i={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:e.getValidationData()};this.getUserContextData(this.username)&&(i.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",i,function(e,n){return e?t.onFailure(e):r.authenticateUserInternal(n,o,t)})}else t.onFailure(new Error("PASSWORD parameter is required"))},e.prototype.authenticateUserInternal=function(e,t,r){var n=this,o=e.ChallengeName,i=e.ChallengeParameters;if("SMS_MFA"===o)return this.Session=e.Session,r.mfaRequired(o,i);if("SELECT_MFA_TYPE"===o)return this.Session=e.Session,r.selectMFAType(o,i);if("MFA_SETUP"===o)return this.Session=e.Session,r.mfaSetup(o,i);if("SOFTWARE_TOKEN_MFA"===o)return this.Session=e.Session,r.totpRequired(o,i);if("CUSTOM_CHALLENGE"===o)return this.Session=e.Session,r.customChallenge(i);if("NEW_PASSWORD_REQUIRED"===o){this.Session=e.Session;var a=null,s=null,u=[],c=t.getNewPasswordRequiredChallengeUserAttributePrefix();if(i&&(a=JSON.parse(e.ChallengeParameters.userAttributes),s=JSON.parse(e.ChallengeParameters.requiredAttributes)),s)for(var l=0;l<s.length;l++)u[l]=s[l].substr(c.length);return r.newPasswordRequired(a,u)}if("DEVICE_SRP_AUTH"!==o){this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.cacheTokens();var p=e.AuthenticationResult.NewDeviceMetadata;if(null==p)return r.onSuccess(this.signInUserSession);t.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(o){if(o)return r.onFailure(o);var i={Salt:Ce.Buffer.from(t.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:Ce.Buffer.from(t.getVerifierDevices(),"hex").toString("base64")};n.verifierDevices=i.PasswordVerifier,n.deviceGroupKey=p.DeviceGroupKey,n.randomPassword=t.getRandomPassword(),n.client.request("ConfirmDevice",{DeviceKey:p.DeviceKey,AccessToken:n.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:i,DeviceName:navigator.userAgent},function(t,o){return t?r.onFailure(t):(n.deviceKey=e.AuthenticationResult.NewDeviceMetadata.DeviceKey,n.cacheDeviceKeyAndPassword(),!0===o.UserConfirmationNecessary?r.onSuccess(n.signInUserSession,o.UserConfirmationNecessary):r.onSuccess(n.signInUserSession))})})}else this.getDeviceResponse(r)},e.prototype.completeNewPasswordChallenge=function(e,t,r){var n=this;if(!e)return r.onFailure(new Error("New password is required."));var o=new Fe(this.pool.getUserPoolId().split("_")[1]),i=o.getNewPasswordRequiredChallengeUserAttributePrefix(),a={};t&&Object.keys(t).forEach(function(e){a[i+e]=t[e]}),a.NEW_PASSWORD=e,a.USERNAME=this.username;var s={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:a,Session:this.Session};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",s,function(e,t){return e?r.onFailure(e):n.authenticateUserInternal(t,o,r)})},e.prototype.getDeviceResponse=function(e){var t=this,r=new Fe(this.deviceGroupKey),n=new Ye,o={};o.USERNAME=this.username,o.DEVICE_KEY=this.deviceKey,r.getLargeAValue(function(i,a){i&&e.onFailure(i),o.SRP_A=a.toString(16);var s={ChallengeName:"DEVICE_SRP_AUTH",ClientId:t.pool.getClientId(),ChallengeResponses:o};t.getUserContextData()&&(s.UserContextData=t.getUserContextData()),t.client.request("RespondToAuthChallenge",s,function(o,i){if(o)return e.onFailure(o);var a=i.ChallengeParameters,s=new xe(a.SRP_B,16),u=new xe(a.SALT,16);r.getPasswordAuthenticationKey(t.deviceKey,t.randomPassword,s,u,function(r,o){if(r)return e.onFailure(r);var s=n.getNowString(),u=Ee.lib.WordArray.create(Ce.Buffer.concat([Ce.Buffer.from(t.deviceGroupKey,"utf8"),Ce.Buffer.from(t.deviceKey,"utf8"),Ce.Buffer.from(a.SECRET_BLOCK,"base64"),Ce.Buffer.from(s,"utf8")])),c=Ee.lib.WordArray.create(o),l=Ee.enc.Base64.stringify(Ee.HmacSHA256(u,c)),p={};p.USERNAME=t.username,p.PASSWORD_CLAIM_SECRET_BLOCK=a.SECRET_BLOCK,p.TIMESTAMP=s,p.PASSWORD_CLAIM_SIGNATURE=l,p.DEVICE_KEY=t.deviceKey;var h={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:t.pool.getClientId(),ChallengeResponses:p,Session:i.Session};t.getUserContextData()&&(h.UserContextData=t.getUserContextData()),t.client.request("RespondToAuthChallenge",h,function(r,n){return r?e.onFailure(r):(t.signInUserSession=t.getCognitoUserSession(n.AuthenticationResult),t.cacheTokens(),e.onSuccess(t.signInUserSession))})})})})},e.prototype.confirmRegistration=function(e,t,r){var n={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:t};this.getUserContextData()&&(n.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",n,function(e){return e?r(e,null):r(null,"SUCCESS")})},e.prototype.sendCustomChallengeAnswer=function(e,t){var r=this,n={};n.USERNAME=this.username,n.ANSWER=e;var o=new Fe(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(n.DEVICE_KEY=this.deviceKey);var i={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:n,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",i,function(e,n){return e?t.onFailure(e):r.authenticateUserInternal(n,o,t)})},e.prototype.sendMFACode=function(e,t,r){var n=this,o={};o.USERNAME=this.username,o.SMS_MFA_CODE=e;var i=r||"SMS_MFA";"SOFTWARE_TOKEN_MFA"===i&&(o.SOFTWARE_TOKEN_MFA_CODE=e),null!=this.deviceKey&&(o.DEVICE_KEY=this.deviceKey);var a={ChallengeName:i,ChallengeResponses:o,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(a.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",a,function(e,r){if(e)return t.onFailure(e);if("DEVICE_SRP_AUTH"!==r.ChallengeName){if(n.signInUserSession=n.getCognitoUserSession(r.AuthenticationResult),n.cacheTokens(),null==r.AuthenticationResult.NewDeviceMetadata)return t.onSuccess(n.signInUserSession);var o=new Fe(n.pool.getUserPoolId().split("_")[1]);o.generateHashDevice(r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,r.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(e){if(e)return t.onFailure(e);var i={Salt:Ce.Buffer.from(o.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:Ce.Buffer.from(o.getVerifierDevices(),"hex").toString("base64")};n.verifierDevices=i.PasswordVerifier,n.deviceGroupKey=r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,n.randomPassword=o.getRandomPassword(),n.client.request("ConfirmDevice",{DeviceKey:r.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:n.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:i,DeviceName:navigator.userAgent},function(e,o){return e?t.onFailure(e):(n.deviceKey=r.AuthenticationResult.NewDeviceMetadata.DeviceKey,n.cacheDeviceKeyAndPassword(),!0===o.UserConfirmationNecessary?t.onSuccess(n.signInUserSession,o.UserConfirmationNecessary):t.onSuccess(n.signInUserSession))})})}else n.getDeviceResponse(t)})},e.prototype.changePassword=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r(new Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?r(e,null):r(null,"SUCCESS")})},e.prototype.enableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var t=[];t.push({DeliveryMedium:"SMS",AttributeName:"phone_number"}),this.client.request("SetUserSettings",{MFAOptions:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t){return t?e(t,null):e(null,"SUCCESS")})},e.prototype.setUserMfaPreference=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r(new Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?r(e,null):r(null,"SUCCESS")})},e.prototype.disableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("SetUserSettings",{MFAOptions:[],AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t){return t?e(t,null):e(null,"SUCCESS")})},e.prototype.deleteUser=function(e){var t=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("DeleteUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(r){return r?e(r,null):(t.clearCachedTokens(),e(null,"SUCCESS"))})},e.prototype.updateAttributes=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("UpdateUserAttributes",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserAttributes:e},function(e){return e?t(e,null):t(null,"SUCCESS")})},e.prototype.getUserAttributes=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){if(t)return e(t,null);for(var n=[],o=0;o<r.UserAttributes.length;o++){var i={Name:r.UserAttributes[o].Name,Value:r.UserAttributes[o].Value},a=new Xe(i);n.push(a)}return e(null,n)})},e.prototype.getMFAOptions=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){return t?e(t,null):e(null,r.MFAOptions)})},e.prototype.getUserData=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){return t?e(t,null):e(null,r)})},e.prototype.deleteAttributes=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("DeleteUserAttributes",{UserAttributeNames:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?t(e,null):t(null,"SUCCESS")})},e.prototype.resendConfirmationCode=function(e){var t={ClientId:this.pool.getClientId(),Username:this.username};this.client.request("ResendConfirmationCode",t,function(t,r){return t?e(t,null):e(null,r)})},e.prototype.getSession=function(e){if(null==this.username)return e(new Error("Username is null. Cannot retrieve a new session"),null);if(null!=this.signInUserSession&&this.signInUserSession.isValid())return e(null,this.signInUserSession);var t="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,r=t+".idToken",n=t+".accessToken",o=t+".refreshToken",i=t+".clockDrift";if(this.storage.getItem(r)){var a=new Ve({IdToken:this.storage.getItem(r)}),s=new Ke({AccessToken:this.storage.getItem(n)}),u=new He({RefreshToken:this.storage.getItem(o)}),c=parseInt(this.storage.getItem(i),0)||0,l=new Ge({IdToken:a,AccessToken:s,RefreshToken:u,ClockDrift:c});if(l.isValid())return this.signInUserSession=l,e(null,this.signInUserSession);if(!u.getToken())return e(new Error("Cannot retrieve a new session. Please authenticate."),null);this.refreshSession(u,e)}else e(new Error("Local storage is missing an ID Token, Please authenticate"),null)},e.prototype.refreshSession=function(e,t){var r=this,n={};n.REFRESH_TOKEN=e.getToken();var o="CognitoIdentityServiceProvider."+this.pool.getClientId(),i=o+".LastAuthUser";if(this.storage.getItem(i)){this.username=this.storage.getItem(i);var a=o+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(a),n.DEVICE_KEY=this.deviceKey}var s={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:n};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",s,function(n,o){if(n)return"NotAuthorizedException"===n.code&&r.clearCachedTokens(),t(n,null);if(o){var i=o.AuthenticationResult;return Object.prototype.hasOwnProperty.call(i,"RefreshToken")||(i.RefreshToken=e.getToken()),r.signInUserSession=r.getCognitoUserSession(i),r.cacheTokens(),t(null,r.signInUserSession)}})},e.prototype.cacheTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",r=e+"."+this.username+".accessToken",n=e+"."+this.username+".refreshToken",o=e+"."+this.username+".clockDrift",i=e+".LastAuthUser";this.storage.setItem(t,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(r,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(n,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(o,""+this.signInUserSession.getClockDrift()),this.storage.setItem(i,this.username)},e.prototype.cacheDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.setItem(t,this.deviceKey),this.storage.setItem(r,this.randomPassword),this.storage.setItem(n,this.deviceGroupKey)},e.prototype.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.getItem(t)&&(this.deviceKey=this.storage.getItem(t),this.randomPassword=this.storage.getItem(r),this.deviceGroupKey=this.storage.getItem(n))},e.prototype.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.removeItem(t),this.storage.removeItem(r),this.storage.removeItem(n)},e.prototype.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",r=e+"."+this.username+".accessToken",n=e+"."+this.username+".refreshToken",o=e+".LastAuthUser",i=e+"."+this.username+".clockDrift";this.storage.removeItem(t),this.storage.removeItem(r),this.storage.removeItem(n),this.storage.removeItem(o),this.storage.removeItem(i)},e.prototype.getCognitoUserSession=function(e){var t=new Ve(e),r=new Ke(e),n=new He(e);return new Ge({IdToken:t,AccessToken:r,RefreshToken:n})},e.prototype.forgotPassword=function(e){var t={ClientId:this.pool.getClientId(),Username:this.username};this.getUserContextData()&&(t.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",t,function(t,r){return t?e.onFailure(t):"function"==typeof e.inputVerificationCode?e.inputVerificationCode(r):e.onSuccess(r)})},e.prototype.confirmPassword=function(e,t,r){var n={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:t};this.getUserContextData()&&(n.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",n,function(e){return e?r.onFailure(e):r.onSuccess()})},e.prototype.getAttributeVerificationCode=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("GetUserAttributeVerificationCode",{AttributeName:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e,r){return e?t.onFailure(e):"function"==typeof t.inputVerificationCode?t.inputVerificationCode(r):t.onSuccess()})},e.prototype.verifyAttribute=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r.onFailure(new Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?r.onFailure(e):r.onSuccess("SUCCESS")})},e.prototype.getDevice=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey},function(t,r){return t?e.onFailure(t):e.onSuccess(r)})},e.prototype.forgetSpecificDevice=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("ForgetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:e},function(e){return e?t.onFailure(e):t.onSuccess("SUCCESS")})},e.prototype.forgetDevice=function(e){var t=this;this.forgetSpecificDevice(this.deviceKey,{onFailure:e.onFailure,onSuccess:function(r){return t.deviceKey=null,t.deviceGroupKey=null,t.randomPassword=null,t.clearCachedDeviceKeyAndPassword(),e.onSuccess(r)}})},e.prototype.setDeviceStatusRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"remembered"},function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")})},e.prototype.setDeviceStatusNotRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"not_remembered"},function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")})},e.prototype.listDevices=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r.onFailure(new Error("User is not authenticated"));this.client.request("ListDevices",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),Limit:e,PaginationToken:t},function(e,t){return e?r.onFailure(e):r.onSuccess(t)})},e.prototype.globalSignOut=function(e){var t=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GlobalSignOut",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(r){return r?e.onFailure(r):(t.clearCachedTokens(),e.onSuccess("SUCCESS"))})},e.prototype.signOut=function(){this.signInUserSession=null,this.clearCachedTokens()},e.prototype.sendMFASelectionAnswer=function(e,t){var r=this,n={};n.USERNAME=this.username,n.ANSWER=e;var o={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:n,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(o.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",o,function(n,o){return n?t.onFailure(n):(r.Session=o.Session,"SMS_MFA"===e?t.mfaRequired(o.challengeName,o.challengeParameters):"SOFTWARE_TOKEN_MFA"===e?t.totpRequired(o.challengeName,o.challengeParameters):void 0)})},e.prototype.getUserContextData=function(){return this.pool.getUserContextData(this.username)},e.prototype.associateSoftwareToken=function(e){var t=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("AssociateSoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){return t?e.onFailure(t):e.associateSecretCode(r.SecretCode)}):this.client.request("AssociateSoftwareToken",{Session:this.Session},function(r,n){return r?e.onFailure(r):(t.Session=n.Session,e.associateSecretCode(n.SecretCode))})},e.prototype.verifySoftwareToken=function(e,t,r){var n=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:t},function(e,t){return e?r.onFailure(e):r.onSuccess(t)}):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:t},function(e,t){if(e)return r.onFailure(e);n.Session=t.Session;var o={};o.USERNAME=n.username;var i={ChallengeName:"MFA_SETUP",ClientId:n.pool.getClientId(),ChallengeResponses:o,Session:n.Session};n.getUserContextData()&&(i.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",i,function(e,t){return e?r.onFailure(e):(n.signInUserSession=n.getCognitoUserSession(t.AuthenticationResult),n.cacheTokens(),r.onSuccess(n.signInUserSession))})})},e}(),rt=nt;function nt(){}nt.prototype.userAgent="aws-amplify/0.1.x js";var ot=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.endpoint=r||"https://cognito-idp."+t+".amazonaws.com/",this.userAgent=rt.prototype.userAgent||"aws-amplify/0.1.x js"}return e.prototype.request=function(e,t,r){var n={headers:{"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProviderService."+e,"X-Amz-User-Agent":this.userAgent},method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(t)},o=void 0,i=void 0;fetch(this.endpoint,n).then(function(e){return o=e,e},function(e){if(e instanceof TypeError)throw new Error("Network error");throw e}).then(function(e){return e.json().catch(function(){return{}})}).then(function(e){if(o.ok)return r(null,e);i=e;var t=(e.__type||e.code).split("#").pop(),n={code:t,name:t,message:e.message||e.Message||null};return r(n)}).catch(function(e){var t={code:"UnknownError",message:"Unknown error, the response body from fetch is: "+i};if(o&&o.headers&&o.headers.get("x-amzn-errortype"))try{var n=o.headers.get("x-amzn-errortype").split(":")[0];t={code:n,name:n,statusCode:o.status,message:o.status?o.status.toString():null}}catch(e){return t={code:"UnknownError",message:o.headers.get("x-amzn-errortype")},r(t)}else e instanceof Error&&"Network error"===e.message&&(t={code:"NetworkError",name:e.name,message:e.message});return r(t)})},e}();
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
var it=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},n=r.UserPoolId,o=r.ClientId,i=r.endpoint,a=r.AdvancedSecurityDataCollectionFlag;if(!n||!o)throw new Error("Both UserPoolId and ClientId are required.");if(!/^[\w-]+_.+$/.test(n))throw new Error("Invalid UserPoolId format.");var s=n.split("_")[0];this.userPoolId=n,this.clientId=o,this.client=new ot(s,i),this.advancedSecurityDataCollectionFlag=!1!==a,this.storage=t.Storage||(new et).getStorage()}return e.prototype.getUserPoolId=function(){return this.userPoolId},e.prototype.getClientId=function(){return this.clientId},e.prototype.signUp=function(e,t,r,n,o){var i=this,a={ClientId:this.clientId,Username:e,Password:t,UserAttributes:r,ValidationData:n};this.getUserContextData(e)&&(a.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",a,function(t,r){if(t)return o(t,null);var n={Username:e,Pool:i,Storage:i.storage},a={user:new tt(n),userConfirmed:r.UserConfirmed,userSub:r.UserSub};return o(null,a)})},e.prototype.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var r={Username:t,Pool:this,Storage:this.storage};return new tt(r)}return null},e.prototype.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var r=t.getData(e,this.userPoolId,this.clientId);if(r)return{EncodedData:r}}return{}}},e}(),at=r(26);!function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.domain=t.domain,t.path?this.path=t.path:this.path="/",Object.prototype.hasOwnProperty.call(t,"expires")?this.expires=t.expires:this.expires=365,Object.prototype.hasOwnProperty.call(t,"secure")?this.secure=t.secure:this.secure=!0}e.prototype.setItem=function(e,t){return at.set(e,t,{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure}),at.get(e)},e.prototype.getItem=function(e){return at.get(e)},e.prototype.removeItem=function(e){return at.remove(e,{path:this.path,domain:this.domain,secure:this.secure})},e.prototype.clear=function(){var e=at.get(),t=void 0;for(t=0;t<e.length;++t)at.remove(e[t]);return{}}}();function st(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ut=function(){function e(t,r){if(
/*!
 * Copyright 2016 Amazon.com,
 * Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Amazon Software License (the "License").
 * You may not use this file except in compliance with the
 * License. A copy of the License is located at
 *
 *     http://aws.amazon.com/asl/
 *
 * or in the "license" file accompanying this file. This file is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, express or implied. See the License
 * for the specific language governing permissions and
 * limitations under the License.
 */
function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t||{},this._logger=r.logger,this._stores={},this.userChanged=new o.a.Signal,this.userDetailsRequired=new o.a.Signal,this.mfaCodeRequired=new o.a.Signal,!this._config.cognito)throw new Error("Cognito is not configured");L.config.update({credentials:new L.CognitoIdentityCredentials({IdentityPoolId:this._config.cognito.identityPoolId,Logins:{}},{region:this._config.cognito.region}),region:this._config.cognito.region}),this._cognito=new it({ClientId:this._config.cognito.clientId,UserPoolId:this._config.cognito.userPoolId}),this._identity=this._getStore("api_identity").read(),this._cognito.getCurrentUser(),this._service_provider=new L.CognitoIdentityServiceProvider}return function(e,t,r){t&&st(e.prototype,t),r&&st(e,r)}(e,[{key:"initialize",value:function(){var e=this;return new Promise(function(t,r){e._logger.debug("Cognito getCurrentUser.");var n=e._cognito.getCurrentUser();if(!n)return t(null);n.getSession(function(o,i){if(o)return e._logger.debug({error:o},"Cognito getSession error."),r(o);e._applySession(i,n,!0).then(t).catch(r)})})}},{key:"assumeIdentity",value:function(e){var t=this;e=e||{};var r=this._getStore("api_identity");if(this._identity=r.read(),this._identity&&this._identity.token)return Promise.resolve(this._identity);var n=Boolean(e.token)&&Boolean(e.password),o=e.token||this._uuid(),i=e.password||this._password(),a={token:o,code:this._code(),password:i},s={token:a.token,username:a.token,given_name:a.code,password:a.password,application:e.application,application_type:e.application_type,platform:e.platform};return this.signOut().then(function(){if(!n)return t.signUp(s).then(function(e){a.pending=!e.confirmed})}).then(function(){return r.write(a),t._identity=a,a})}},{key:"resetIdentity",value:function(){var e=this._getStore("api_identity"),t=e.read();if(t){var r=this._getStore("api_identity_backup");r.read()||r.write(t)}return e.clear(),this._identity=null,this.signOut()}},{key:"signUp",value:function(e){var t=this;return new Promise(function(r,n){(e=Object.assign({},e)).token||(e.token=t._uuid());var o,i=e.password||t._password(),a=[];t._guestUser=null,Object.keys(e).forEach(function(t){var r=t;switch(t){case"phone":r="phone_number";break;case"username":r="preferred_username";break;case"first_name":r="name";break;case"last_name":r="family_name";break;case"application":case"application_type":case"business":case"platform":case"location":case"token":case"seat":r="custom:"+t;break;case"password":return}void 0!==e[t]&&a.push(new Xe({Name:r,Value:e[t]}))}),e.username?o=e.username:e.phone?o=e.phone:e.email&&(o=e.email),t._logger.debug("Cognito signUp."),t._cognito.signUp(o,i,a,null,function(e,o){if(e)return t._logger.debug({error:e},"Cognito signUp error."),n(e);t._guestUser=o.user;var i={confirmed:Boolean(o.userConfirmed)};r(i)})})}},{key:"confirmSignUp",value:function(e){var t=this;return new Promise(function(r,n){if(!t._guestUser)return n(new Error("No active user."));t._guestUser.confirmRegistration(e,!0,function(e,o){if(e)return t._logger.debug({error:e},"Cognito confirmRegistration error."),n(e);r("SUCCESS"===o)})})}},{key:"resendSignUpConfirmation",value:function(e){var t=this;return new Promise(function(r,n){t._cognito.client.resendConfirmationCode({ClientId:t._config.cognito.clientId,Username:e},function(o,i){if(o)return t._logger.debug({error:o},"Cognito resendConfirmationCode error."),n(o);t._guestUser||(t._guestUser=new tt({Username:e,Pool:t._cognito})),r()})})}},{key:"confirmAttribute",value:function(e,t){var r=this;return new Promise(function(n,o){if(!r._user)return o(new Error("Missing user."));switch(e){case"phone":e="phone_number";break;case"email":break;default:return o(new Error("Invalid attribute: "+e))}r._user.verifyAttribute(e,t,{onSuccess:function(e){return n()},onFailure:function(e){r._logger.debug({error:e},"Cognito verifyAttribute error."),o(e)}})})}},{key:"resendAttributeConfirmation",value:function(e){var t=this;return new Promise(function(r,n){if(!t._user)return n(new Error("Missing user."));switch(e){case"phone":e="phone_number";break;case"email":break;default:return n(new Error("Invalid attribute: "+e))}t._user.getAttributeVerificationCode(e,{onFailure:function(e){t._logger.debug({error:e},"Cognito getAttributeVerificationCode error."),n(e)},inputVerificationCode:function(){r()}})})}},{key:"setMfaStatus",value:function(e){var t=this;return new Promise(function(r,n){if(!t._user)return n(new Error("Missing user."));var o={PreferredMfa:e,Enabled:e};t._user.setUserMfaPreference(o,null,function(e,o){if(e)return t._logger.debug({error:e},"Cognito setUserMfaPreference error."),n(e);r(o)})})}},{key:"getUserData",value:function(){var e=this;return new Promise(function(t,r){if(!e._user)return r(new Error("Missing user."));e._logger.debug("Cognito getUserData."),e._user.getUserData(function(n,o){if(n)return e._logger.debug({error:n},"Cognito getUserData error."),r(n);t(o)})})}},{key:"signIn",value:function(e){var t=this;return new Promise(function(r,n){if(!e){if(!t.identity)return n(new Error("Missing sign in identity."));e={username:t.identity.token,password:t.identity.password}}var o=new ke({Username:e.username,Password:e.password});if(t._guestUser&&t._guestUser.userName!==e.username){try{t._guestUser.signOut()}catch(e){}t._guestUser=null}t._guestUser||(t._guestUser=new tt({Username:e.username,Pool:t._cognito}));var i={onSuccess:function(e){var o=t.identity;o&&o.pending&&(delete o.pending,t._getStore("api_identity").write(o)),t._applySession(e,t._guestUser).then(function(){t._guestUser=null}).then(r).catch(n)},onFailure:function(e){t._logger.debug({error:e},"Cognito authenticateUser error."),n(e)},newPasswordRequired:function(e,r){var o={userAttributes:e,requiredAttributes:r,done:function(e){if(!e)return n(new Error("Sign in was cancelled."));t._guestUser.completeNewPasswordChallenge(e,{},i)}};t.userDetailsRequired.dispatch(o)},selectMFAType:function(e,r){t._guestUser.sendMFASelectionAnswer("SMS_MFA",i)},mfaRequired:function(e){var r={codeDeliveryDetails:e,done:function(e){if(!e)return n(new Error("Sign in was cancelled."));t._guestUser.sendMFACode(e,i)}};t.mfaCodeRequired.dispatch(r)}};t._guestUser.authenticateUser(o,i)})}},{key:"deleteAttributes",value:function(e){var t=this;return e=e||{},new Promise(function(r,n){if(!t._user)return n(new Error("Missing user."));var o=Object.keys(e).map(function(t){e[t];switch(t){case"phone":t="phone_number";break;case"username":t="preferred_username";break;case"first_name":t="name";break;case"last_name":t="family_name"}return t});t._user.deleteAttributes(o,function(e,o){if(e)return t._logger.debug({error:e},"Cognito deleteAttributes error."),n(e);t._user.getUserAttributes(function(e,o){if(e)return t._logger.debug({error:e},"Cognito getUserAttributes error."),n(e);o&&(t._user.UserAttributes=o),t.userChanged.dispatch(t.user),r(t.user)})})})}},{key:"updateAttributes",value:function(e){var t=this;return e=e||{},new Promise(function(r,n){if(!t._user)return n(new Error("Missing user."));var o=Object.keys(e).map(function(t){var r=t,n=e[t];switch(t){case"phone":r="phone_number";break;case"username":r="preferred_username";break;case"first_name":r="name";break;case"last_name":r="family_name";break;case"application":case"business":case"platform":case"location":case"token":case"seat":case"password":return}if(void 0!==n)return new Xe({Name:r,Value:n})}).filter(function(e){return e});if(0===o.length)return r(t.user);t._user.updateAttributes(o,function(e,o){if(e)return t._logger.debug({error:e},"Cognito updateAttributes error."),n(e);t._user.getUserAttributes(function(e,o){if(e)return t._logger.debug({error:e},"Cognito getUserAttributes error."),n(e);o&&(t._user.UserAttributes=o),t.userChanged.dispatch(t.user),r(t.user)})})})}},{key:"getUserToken",value:function(e){var t=this;return new Promise(function(r,n){var o=t._user||t._cognito.getCurrentUser();if(!o)return r(null);o.getSession(function(i,a){if(i)return t._logger.debug({error:i},"Cognito getSession error."),n(i);if(e)return r(a.getAccessToken().getJwtToken());var s=a.getRefreshToken();if(!s)return n(new Error("No refresh token."));t._logger.debug("Cognito refreshSession."),o.refreshSession(s,function(e,i){if(e)return t._logger.debug({error:e},"Cognito refreshSession error."),n(e);t._applySession(i,o).then(function(){return r(i.getAccessToken().getJwtToken())}).catch(n)})})})}},{key:"requestPasswordReset",value:function(e){var t=this;return new Promise(function(r,n){t._service_provider.forgotPassword({ClientId:t._config.cognito.clientId,Username:e},function(e,o){if(e)return t._logger.debug({error:e},"Cognito forgotPassword error."),n(e);r(o)})})}},{key:"confirmPasswordReset",value:function(e,t,r){var n=this;return new Promise(function(o,i){n._service_provider.confirmForgotPassword({ClientId:n._config.cognito.clientId,ConfirmationCode:e,Password:r,Username:t},function(e,t){if(e)return n._logger.debug({error:e},"Cognito confirmForgotPassword error."),i(e);o(t)})})}},{key:"changePassword",value:function(e,t){var r=this;return new Promise(function(n,o){if(!r._user)return o(new Error("No active user."));r._user.getSession(function(i,a){if(i)return r._logger.debug({error:i},"Cognito getSession error."),o(i);r._cognito.client.changePassword({PreviousPassword:e,ProposedPassword:t,AccessToken:a.getAccessToken().getJwtToken()},function(e,t){if(e)return r._logger.debug({error:e},"Cognito changePassword error."),o(e);n(t)})})})}},{key:"signOut",value:function(){var e=this;return new Promise(function(t,r){var n=e._cognito.getCurrentUser();if(n&&n.signOut(),!e._user)return t();try{e._user.signOut()}catch(e){return r(e)}e._guestUser=null,e._cognitosync=null,e._applySession().catch(function(e){}).then(t)})}},{key:"_applySession",value:function(e,t,r){var n=this;return new Promise(function(o,i){try{var a,s="cognito-idp.".concat(n._config.cognito.region,".amazonaws.com/").concat(n._config.cognito.userPoolId);if(a=e&&e.isValid()?e.getIdToken().getJwtToken():void 0,L.config.credentials.params.Logins[s]===a)return o();if(r=r||Boolean(L.config.credentials.params.Logins[s]),L.config.credentials.params.Logins[s]=a,t){if(e){var u=e.getIdToken().getJwtToken(),c=fe()(u);t.$TokenAttributes=Object.keys(c).map(function(e){return{Name:e,Value:c[e]}})}n._user=t,r?o():t.getUserAttributes(function(e,r){if(e)return n._logger.debug({error:e},"Cognito getUserAttributes error."),i(e);r&&(t.UserAttributes=r),n.userChanged.dispatch(n.user),o()})}else n._user=null,n.userChanged.dispatch(n.user),o()}catch(e){return i(e)}})}},{key:"_getStore",value:function(e){if(!this._stores[e])switch(this._config.credentials?this._config.credentials.storage:"local"){case"memory":this._stores[e]=new te(e);break;case"local":default:this._stores[e]=new Z(e)}return this._stores[e]}},{key:"_uuid",value:function(){return R()()}},{key:"_code",value:function(){for(var e="23456789ABCDEFGHKLMNPQRTUVWXYZ",t="",r=0;r<8;r++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}},{key:"_password",value:function(){for(var e=["ABDFGHKMNQRTY","abdefghmnpqrty","23456789"],t="",r=0;r<e.length;r++)for(var n=0;n<5;n++)t+=e[r].charAt(Math.floor(Math.random()*e[r].length));return t}},{key:"user",get:function(){if(!this._user)return null;var e={},t=(this._user.UserAttributes||this._user.$TokenAttributes||[]).reduce(function(e,t){return e[t.Name]=t.Value,e},{});return Object.keys(t).forEach(function(r){var n=r;switch(r){case"name":n="first_name";break;case"family_name":n="last_name";break;case"preferred_username":n="username";break;case"phone_number":n="phone";break;case"phone_number_verified":n="phone_verified"}0===r.indexOf("custom:")&&(n=r.substring("custom:".length)),e[n]=t[r],"phone_verified"===n&&(e[n]=!0===e[n])}),e.phone&&void 0===e.phone_verified&&(e.phone_verified=!0),e}},{key:"identity",get:function(){return this._identity}}]),e}();function ct(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var lt=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t||{},this._isAuthenticated=!1,this.isAuthenticatedChanged=new o.a.Signal,this._modules=[],this._logger=new pe(this.config),this._modules.push(this._logger);var n={proxy:function(){return r._ensureApiAccess()},awsproxy:function(){return r._ensureCloudAccess()},logger:this._logger};this.config.cognito&&(this._provider=new ut(this.config,n),this._profile=new we(this.config,n)),this.config.analytics,this._client=new W(this.config,n),this._client.sessionError.add(function(e){r._logger.debug({error:e},"Session error."),(r.provider?r.provider.getUserToken():Promise.resolve()).catch(function(e){r._logger.warn({error:e},"AWS access is not available.")})}),this._manager=new ge(this.config,n),this._manager.tokenExpired.add(function(e){r._logger.debug({token:e},"API token has expired."),r._refreshAccess().catch(function(e){r._logger.warn({error:e},"API access is not available.")})})}return function(e,t,r){t&&ct(e.prototype,t),r&&ct(e,r)}(e,[{key:"initialize",value:function(){var e=this;return Promise.resolve().then(function(){if(e.client.socket)return e._startPing()}).then(function(){return!e.provider||e.provider.initialize()}).then(function(){return!e._profile||e._profile.initialize()}).then(function(){return e.manager.initialize().then(function(){if(!e.currentAccess)return e.signOut();var t=e.config.application,r=e.manager.getToken(t);return r?e.client.authorize(t,r):void 0}).catch(function(t){return e._logger.error({error:t},"Unable to restore the API session"),Promise.reject(t)})}).then(function(){return Promise.all(e._modules.map(function(e){return e.initialize()})).catch(function(t){return e._logger.error({error:t},"Unable to initialize modules."),Promise.reject(t)})}).then(function(){if(!e.isAuthenticated&&e.provider&&e.provider.identity){var t=e.provider.identity;if(t.pending)return;return e._logger.debug({identity:t.token,password:t.password},"Trying to restore the identity..."),e.provider.signIn({username:t.token,password:t.password}).then(function(){return e._refreshAccess()})}}).catch(function(t){if("UserNotConfirmedException"!==t.code)return"UserNotFoundException"===t.code?e.provider.resetIdentity().then(function(){return e.signOut()}).then(function(){return Promise.reject(t)}):Promise.reject(t)}).then(function(){return e._updateAuthStatus()}).catch(function(t){return e._logger.warn({error:t},"Client initialize error."),Promise.reject(t)})}},{key:"assumeIdentity",value:function(e){return this.provider?this.provider.assumeIdentity(e):Promise.reject(this._logger.error("Device identity is not supported."))}},{key:"authenticate",value:function(e){var t=this,r=this.config.application;return Promise.all([this.client.authorize(r,e),this.manager.saveToken(r,e)]).then(function(){return t.logger.debug("API token has been received.")}).then(function(){return t._updateAuthStatus()})}},{key:"signIn",value:function(e){var t=this;if(!this.provider){var r=this.config.application;return this.client.api.request("oauth2","grantToken",{grant_type:"password",client_id:r.client_id,username:e.username,password:e.password},!0).then(function(e){return e&&e.access_token?t.authenticate(e):Promise.reject(t._logger.error({result:e},"Invalid token received."))}).catch(function(e){return t.signOut().then(function(){return t._updateAuthStatus()}).then(function(){return Promise.reject(e)})})}return this.provider.signIn(e).then(function(){return t._refreshAccess()}).catch(function(e){return t._logger.warn({error:e},"Sign in error."),Promise.reject(e)})}},{key:"getDeviceStatus",value:function(){var e=this;if(!this.provider)return Promise.reject(this._logger.error("Device status is not supported."));var t=this.provider.identity;return t&&t.token?this.client.api.request("device","deviceRead",{token:t.token},!0).catch(function(t){return 404===t.status?e.provider.resetIdentity().then(function(){return Promise.reject(t)}):Promise.reject(t)}):Promise.reject(this._logger.error("No active identity."))}},{key:"updateSession",value:function(e){var t=this;e=e||{};var r=this.config.application,n=this.manager.getToken(r);if(!n)return Promise.reject(this._logger.error("Missing token."));var o=this.manager.getTokenMetadata(n),i=void 0!==e.location?e.location:o.location,a=void 0!==e.seat?e.seat:o.seat,s=void 0!==e.employee?e.employee:o.employee;return this.provider?this.provider.getUserToken().then(function(e){return e?t.client.api.request("oauth2","grantToken",{grant_type:"cognito_credentials",client_id:r.client_id,access_token:e,location_id:i,seat_id:a,employee_id:s},!0).then(function(e){return e&&e.access_token?t.authenticate(e):Promise.reject(t._logger.error({result:e},"Unable to update the session."))}):Promise.reject(t._logger.error("Missing user token."))}):n.refresh_token?this.client.api.request("oauth2","grantToken",{grant_type:"refresh_token",client_id:r.client_id,refresh_token:n.refresh_token,location_id:i,seat_id:a,employee_id:s},!0).then(function(e){return e&&e.access_token?t.authenticate(e):Promise.reject(t._logger.error({result:e},"Unable to update the session."))}):Promise.reject(this._logger.error("Missing refresh token."))}},{key:"signOut",value:function(){var e=this;return(this.provider?this.provider.signOut():Promise.resolve()).then(function(){var t=e.config.application;return Promise.all([e.manager.removeToken(t),e.client.deauthorize(t)])}).then(function(){return e._updateAuthStatus()})}},{key:"enablePushNotifications",value:function(e,t){var r=this;t=t||{},e.on("registration",function(e){r._logger.debug({data:e},"Push notifications enabled.");var n=function(){r.isAuthenticated&&r.client.api.request("notification","notificationCreate",{body:{registration:e.registrationId,platform:t.platform,business:t.business}}).catch(function(e){return r._logger.error({error:e},"Push notifications error.")})};r.isAuthenticated?n():r.isAuthenticatedChanged.addOnce(function(){return n()})}),e.on("notification",function(e){r._logger.debug({data:e},"Push notification received."),r.isAuthenticated})}},{key:"_refreshAccess",value:function(){var e=this;if(this._refreshAccessPromise)return this._refreshAccessPromise;var t,r=this.config.application;if(!this.provider){var n=this.manager.getToken(r);if(!n)return Promise.reject(this.logger.error("Missing API access."));var o=this.manager.getTokenMetadata(n),i=o.location,a=o.seat,s=o.employee;if(!n.refresh_token)return Promise.reject(this.logger.error("Missing refresh token."));t=this.client.api.request("oauth2","grantToken",{grant_type:"refresh_token",client_id:r.client_id,refresh_token:n.refresh_token,location_id:i,seat_id:a,employee_id:s},!0)}return this._refreshAccessPromise=(this.provider?this.provider.getUserToken():Promise.resolve()).then(function(t){return e.provider&&!t?e.provider.getUserToken(!0):t}).then(function(n){if(t)return t;if(e.provider&&!n)return Promise.reject(new Error("Missing user session."));var o,i,a,s=e.manager.getToken(r);if(s){var u=e.manager.getTokenMetadata(s);o=u.location,i=u.seat,a=u.employee}return e.client.api.request("oauth2","grantToken",{grant_type:"cognito_credentials",client_id:r.client_id,access_token:n,location_id:o,seat_id:i,employee_id:a},!0).catch(function(t){return"invalid_request"!==t.error&&"invalid_client"!==t.error||e.manager.isAccessValid(r)?Promise.reject(t):(e._logger.error({error:t},"Token refresh was declined."),e.signOut().then(function(){return Promise.reject(t)}))})}).then(function(t){return t.access_token?e.authenticate(t):Promise.reject(e.logger.error({result:t},"Invalid token received."))}).then(function(t){return e._refreshAccessPromise=null,t}).catch(function(t){if(e._refreshAccessPromise=null,e._logger.warn({error:t},"Unable to refresh a token."),!e.isAuthenticated)return Promise.reject(t)}),this._refreshAccessPromise}},{key:"_ensureCloudAccess",value:function(){var e=this;return this._ensureCloudPromise?this._ensureCloudPromise:(this._ensureCloudPromise=new Promise(function(t,r){var n=function(){e._ensureCloudPromise=null,t()};if(!e.provider)return n();e.provider.getUserToken(!0).then(function(e){if(!e)return Promise.reject(new Error("No current token."))}).catch(function(t){return e.provider.getUserToken()}).then(n).catch(function(t){!function(t){e._ensureCloudPromise=null,r(t)}(t)})}),this._ensureCloudPromise)}},{key:"_ensureApiAccess",value:function(){var e=this;return this._ensurePromise?this._ensurePromise:(this._ensurePromise=new Promise(function(t,r){var n=function(){e._ensurePromise=null,t()},o=function(t){e._ensurePromise=null,r(t)},i=e.config.application,a=e.manager.getToken(i);return a&&a.access_token?e.manager.isTokenValid(a)?void n():(e.logger.debug({token:a},"Refreshing an expired access token."),e._refreshAccess().then(n).catch(o)):(e.logger.error({token:a},"Corrupted access token."),e.signOut().then(n).catch(o))}),this._ensurePromise)}},{key:"_updateAuthStatus",value:function(){var e=this,t=this.isAuthenticated;return this.provider&&Promise.all(this._modules.map(function(t){return t.authenticate(e.provider.user)})).catch(function(t){return e._logger.error({error:t},"Module authentication error.")}),this._isAuthenticated===t?this._isAuthenticated:(this._isAuthenticated=t,this.isAuthenticatedChanged.dispatch(t),this._isAuthenticated)}},{key:"_startPing",value:function(){var e,t=this,r=function(){if(t.client.socket.isConnected&&t.client.socket.isEnabled){var e=t.config.application,r=t.manager.getToken(e);if(r){var n=t.manager.getTokenMetadata(r);n&&n.location&&t.client.socket.ping(n.location).catch(function(e){return t._logger.debug({error:e},"Socket ping error.")})}}};this.client.socket.onPingError.add(function(){t._updateAuthStatus();var e=t.config.application,r=t.manager.getToken(e);r&&(t.client.authorize(e,r),t.client.socket.reconnect())}),this.client.socket.isAuthenticatedChanged.add(function(n){n||t._isRefreshing||(t._isRefreshing=!0,setTimeout(function(){return t._isRefreshing=!1},6e4),e&&clearInterval(e),e=setInterval(r,6e4),t._refreshAccess().catch(function(e){}).then(function(){e=setInterval(r,6e4),t.client.socket.reconnect(),setTimeout(function(){return t._isRefreshing=!1},9e5)}))}),e=setInterval(r,6e4)}},{key:"config",get:function(){return this._config}},{key:"analytics",get:function(){return this._analytics}},{key:"client",get:function(){return this._client}},{key:"logger",get:function(){return this._logger}},{key:"manager",get:function(){return this._manager}},{key:"profile",get:function(){return this._profile}},{key:"provider",get:function(){return this._provider}},{key:"currentAccess",get:function(){var e=this.config.application,t=this.manager.getToken(e);return t&&t.access_token&&(t.cognito_token||t.refresh_token)?this.manager.getTokenMetadata(t):null}},{key:"currentUser",get:function(){return this.provider?this.provider.user:null}},{key:"isAuthenticated",get:function(){return this.provider?Boolean(this.currentUser)&&Boolean(this.currentAccess):Boolean(this.currentAccess)}}]),e}();t.default=lt}]);
//# sourceMappingURL=dts-api-client.min.js.map