-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtamber.min.js
4 lines (4 loc) · 117 KB
/
tamber.min.js
1
2
3
4
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.tamber=e()}}(function(){var define,module,exports;return function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t,r){(function(r){"use strict";function n(e,t,r,n,i){var u=o.stringify(n,{arrayFormat:"brackets"}),f="/v1/"+t+"/"+r+"/?"+u,c={scheme:"https",host:a.parse(e.url).hostname,path:f,method:"GET",headers:e.headers},l=s.request(c,function(e){e.setEncoding("utf8");var t="";e.on("data",function(e){t+=e}),e.on("end",function(){var e=JSON.parse(t);null!=i&&i(e.error,e.result)})});l.setTimeout(e.timeout,function(){null!=i&&i("Timeout exceeded "+e.timeout+"s",null)}),l.end()}function i(e,t,n,i,f){var c=o.stringify(i,{arrayFormat:"brackets"}),l="/v1/"+t+"/"+n,h=(e.headers,{scheme:"https",host:a.parse(e.url).hostname,path:l,method:"POST",headers:u({"Content-Type":"application/x-www-form-urlencoded","Content-Length":r.byteLength(c)},e.headers)}),p=s.request(h,function(e){e.setEncoding("utf8");var t="";e.on("data",function(e){t+=e}),e.on("end",function(){var e=JSON.parse(t);null!=f&&f(e.error,e.result)})});p.setTimeout(e.timeout,function(){null!=f&&f("Timeout exceeded "+e.timeout+"s",null)}),p.write(c),p.end()}var o=e("qs"),s=e("https"),a=e("url"),u=e("util")._extend,f={callbackifyPromiseWithTimeout:function(e,t){return t?e.then(function(e){setTimeout(function(){t(null,e)},0)},function(e){setTimeout(function(){t(e,null)},0)}):e},get:function(e,t,r,i,o){var s=new Promise(function(o,s){function a(e,t){e?(e instanceof Error||(e=new Error(e)),s(e)):o(t)}n(e,t,r,i,a)});return this.callbackifyPromiseWithTimeout(s,o)},post:function(e,t,r,n,o){var s=new Promise(function(o,s){function a(e,t){e?(e instanceof Error||(e=new Error(e)),s(e)):o(t)}i(e,t,r,n,a)});return this.callbackifyPromiseWithTimeout(s,o)}};t.exports=f}).call(this,e("buffer").Buffer)},{buffer:12,https:16,qs:25,url:58,util:63}],2:[function(e,t,r){"use strict";var n=e("store"),i="tmb_uid",o={getGuestId:function(){return n.get(i)},removeGuestId:function(){n.remove(i)},initGuestId:function(){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=0;r<21;r++)e+=t.charAt(Math.floor(Math.random()*t.length));return e="tmb_"+e,n.set(i,e),e},getOrCreateGuest:function(){var e=this.getGuestId();return null==e&&(e=this.initGuestId()),e},setDefaultUser:function(e,t,r){if(!t.hasOwnProperty(r)||null==t[r])if(null!=e.defaultUser&&""!=e.defaultUser)t[r]=e.defaultUser;else if(e.trackGuests){var n=this.getOrCreateGuest();e.defaultUser=n,t[r]=e.defaultUser}}};t.exports=o},{store:41}],3:[function(e,t,r){"use strict";function n(e){return this instanceof n?void(this.session=e):new n(e)}var i=e("../Comms"),o="behavior";n.prototype={create:function(e,t){return i.post(this.session,o,"create",this.encode(e),t)},retrieve:function(e,t){return i.post(this.session,o,"retrieve",this.encode(e),t)},encode:function(e){for(var t in e)if(e.hasOwnProperty(t))switch(t){case"params":e[t]=JSON.stringify(e[t])}return e}},t.exports=n},{"../Comms":1}],4:[function(e,t,r){"use strict";function n(e,t){return this instanceof n?(this.session=e,void(this.encode=t)):new n(e,t)}function i(e){return this instanceof i?(this.session=e,void(this.basic=new n(e,this.encode))):new i(e)}var o="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},s=e("../Comms"),a=e("../Store"),u="discover";n.prototype={recommended:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"basic/recommended",this.encode(e),t)},similar:function(e,t){return s.post(this.session,u,"basic/similar",this.encode(e),t)},recommendedSimilar:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"basic/recommended_similar",this.encode(e),t)}},i.prototype={recommended:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"recommended",this.encode(e),t)},up_next:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"next",this.encode(e),t)},next:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"next",this.encode(e),t)},weekly:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"weekly",this.encode(e),t)},daily:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"daily",this.encode(e),t)},meta:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"meta",this.encode(e),t)},popular:function(e,t){return s.post(this.session,u,"popular",this.encode(e),t)},hot:function(e,t){return s.post(this.session,u,"hot",this.encode(e),t)},uac:function(e,t){return s.post(this.session,u,"uac",this.encode(e),t)},"new":function(e,t){return s.post(this.session,u,"new",this.encode(e),t)},userPopular:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.get(this.session,u,"user_trend/popular",this.encode(e),t)},userHot:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.get(this.session,u,"user_trend/hot",this.encode(e),t)},userUAC:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.get(this.session,u,"user_trend/uac",this.encode(e),t)},encode:function(e){for(var t in e)if(e.hasOwnProperty(t))switch(t){case"exclude_items":case"filter":e[t]=JSON.stringify(e[t]);break;case"test_events":for(var r=0;r<e[t].length;r++)a.setDefaultUser(this.session,e[t][r],"user");e[t]=JSON.stringify(e[t]);break;case"user":case"item":null!==e[t]&&"object"===o(e[t])&&(e[t]=JSON.stringify(e[t]))}return e}},t.exports=i},{"../Comms":1,"../Store":2}],5:[function(e,t,r){"use strict";function n(e,t){return this instanceof n?(this.session=e,void(this.encode=t)):new n(e,t)}function i(e){return this instanceof i?(this.session=e,void(this.meta=new n(e,this.encode))):new i(e)}var o="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},s=e("../Comms"),a=e("../Store"),u="event";n.prototype={like:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"meta/like",this.encode(e),t)},unlike:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"meta/unlike",this.encode(e),t)}},i.prototype={track:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"track",this.encode(e),t)},retrieve:function(e,t){return a.setDefaultUser(this.session,e,"user"),s.post(this.session,u,"retrieve",this.encode(e),t)},batch:function(e,t){return s.post(this.session,u,"batch",this.encode(e),t)},encode:function(e){for(var t in e)if(e.hasOwnProperty(t))switch(t){case"context":case"get_recs":e[t]=JSON.stringify(e[t]);break;case"events":for(var r=0;r<e[t].length;r++)a.setDefaultUser(this.session,e[t][r],"user");e[t]=JSON.stringify(e[t]);break;case"user":case"item":null!==e[t]&&"object"===o(e[t])&&(e[t]=JSON.stringify(e[t]))}return e}},t.exports=i},{"../Comms":1,"../Store":2}],6:[function(e,t,r){"use strict";function n(e){return this instanceof n?void(this.session=e):new n(e)}var i=e("../Comms"),o="item";n.prototype={create:function(e,t){return i.post(this.session,o,"create",this.encode(e),t)},save:function(e,t){return i.post(this.session,o,"save",this.encode(e),t)},update:function(e,t){return i.post(this.session,o,"update",this.encode(e),t)},batch:function(e,t){return i.post(this.session,o,"batch",this.encode(e),t)},retrieve:function(e,t){return i.post(this.session,o,"retrieve",this.encode(e),t)},hide:function(e,t){return i.post(this.session,o,"hide",this.encode(e),t)},unhide:function(e,t){return i.post(this.session,o,"unhide",this.encode(e),t)},"delete":function(e,t){return i.post(this.session,o,"delete",this.encode(e),t)},list:function(e,t){return i.post(this.session,o,"list",this.encode(e),t)},encode:function(e){for(var t in e)if(e.hasOwnProperty(t))switch(t){case"tags":case"properties":case"updates":case"items":e[t]=JSON.stringify(e[t])}return e}},t.exports=n},{"../Comms":1}],7:[function(e,t,r){"use strict";function n(e){return this instanceof n?void(this.session=e):new n(e)}var i=e("../Comms"),o=e("../Store"),s="user";n.prototype={create:function(e,t){return o.setDefaultUser(this.session,e,"id"),i.post(this.session,s,"create",this.encode(e),t)},save:function(e,t){return o.setDefaultUser(this.session,e,"id"),i.post(this.session,s,"save",this.encode(e),t)},update:function(e,t){return o.setDefaultUser(this.session,e,"id"),i.post(this.session,s,"save",this.encode(e),t)},retrieve:function(e,t){return o.setDefaultUser(this.session,e,"id"),i.post(this.session,s,"retrieve",this.encode(e),t)},search:function(e,t){return i.post(this.session,s,"list",this.encode(e),t)},merge:function(e,t){return i.post(this.session,s,"merge",this.encode(e),t)},list:function(e,t){return i.post(this.session,s,"list",this.encode(e),t)},encode:function(e){for(var t in e)if(e.hasOwnProperty(t))switch(t){case"get_recs":case"filter":case"metadata":e[t]=JSON.stringify(e[t]);break;case"events":e[t]=JSON.stringify(e[t])}return e}},t.exports=n},{"../Comms":1,"../Store":2}],8:[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");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function o(e){var t,r,i,o,s,a,u=e.length;s=n(e),a=new l(3*u/4-s),i=s>0?u-4:u;var f=0;for(t=0,r=0;t<i;t+=4,r+=3)o=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],a[f++]=o>>16&255,a[f++]=o>>8&255,a[f++]=255&o;return 2===s?(o=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,a[f++]=255&o):1===s&&(o=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,a[f++]=o>>8&255,a[f++]=255&o),a}function s(e){return f[e>>18&63]+f[e>>12&63]+f[e>>6&63]+f[63&e]}function a(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],i.push(s(n));return i.join("")}function u(e){for(var t,r=e.length,n=r%3,i="",o=[],s=16383,u=0,c=r-n;u<c;u+=s)o.push(a(e,u,u+s>c?c:u+s));return 1===n?(t=e[r-1],i+=f[t>>2],i+=f[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=f[t>>10],i+=f[t>>4&63],i+=f[t<<2&63],i+="="),o.push(i),o.join("")}r.byteLength=i,r.toByteArray=o,r.fromByteArray=u;for(var f=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=h.length;p<d;++p)f[p]=h[p],c[h.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},{}],9:[function(e,t,r){},{}],10:[function(e,t,r){(function(e){!function(){"use strict";function r(t){var r;return r=t instanceof e?t:new e(t.toString(),"binary"),r.toString("base64")}t.exports=r}()}).call(this,e("buffer").Buffer)},{buffer:12}],11:[function(e,t,r){(function(t){"use strict";var n=e("buffer"),i=n.Buffer,o=n.SlowBuffer,s=n.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof i.alloc)return i.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>s)throw new RangeError("size is too large");var n=r,o=t;void 0===o&&(n=void 0,o=0);var a=new i(e);if("string"==typeof o)for(var u=new i(o,n),f=u.length,c=-1;++c<e;)a[c]=u[c%f];else a.fill(o);return a},r.allocUnsafe=function(e){if("function"==typeof i.allocUnsafe)return i.allocUnsafe(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>s)throw new RangeError("size is too large");return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var o=r;if(1===arguments.length)return new i(e);"undefined"==typeof o&&(o=0);var s=n;if("undefined"==typeof s&&(s=e.byteLength-o),o>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(s>e.byteLength-o)throw new RangeError("'length' is out of bounds");return new i(e.slice(o,o+s))}if(i.isBuffer(e)){var a=new i(e.length);return e.copy(a,0,0,e.length),a}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=s)throw new RangeError("size is too large");return new o(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:12}],12:[function(e,t,r){"use strict";function n(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}function i(e){if(e>Y)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=o.prototype,t}function o(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 f(e)}return s(e,t,r)}function s(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?h(e,t,r):"string"==typeof e?c(e,t):p(e)}function a(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,r){return a(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}function f(e){return a(e),i(e<0?0:0|d(e))}function c(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|y(e,t),n=i(r),s=n.write(e,t);return s!==r&&(n=n.slice(0,s)),n}function l(e){for(var t=e.length<0?0:0|d(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),n.__proto__=o.prototype,n}function p(e){if(o.isBuffer(e)){var t=0|d(e.length),r=i(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(e){if(W(e)||"length"in e)return"number"!=typeof e.length||$(e.length)?i(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(e){if(e>=Y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Y.toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),o.alloc(+e)}function y(e,t){if(o.isBuffer(e))return e.length;if(W(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 F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function m(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,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return R(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,$(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,i);if("number"==typeof t)return t=255&t,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,i){function o(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,u=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}var f;if(i){var c=-1;for(f=r;f<a;f++)if(o(e,f)===o(t,c===-1?0:f-c)){if(c===-1&&(c=f),f-c+1===u)return c*s}else c!==-1&&(f-=f-c),c=-1}else for(r+u>a&&(r=a-u),f=r;f>=0;f--){for(var l=!0,h=0;h<u;h++)if(o(e,f+h)!==o(t,h)){l=!1;break}if(l)return f}return-1}function _(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if($(a))return s;e[r+s]=a}return s}function x(e,t,r,n){return J(F(t,e.length-r),e,r,n)}function S(e,t,r,n){return J(z(t),e,r,n)}function E(e,t,r,n){return S(e,t,r,n)}function j(e,t,r,n){return J(G(t),e,r,n)}function A(e,t,r,n){return J(H(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?V.fromByteArray(e):V.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o=e[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=r){var u,f,c,l;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],128===(192&u)&&(l=(31&o)<<6|63&u,l>127&&(s=l));break;case 3:u=e[i+1],f=e[i+2],128===(192&u)&&128===(192&f)&&(l=(15&o)<<12|(63&u)<<6|63&f,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:u=e[i+1],f=e[i+2],c=e[i+3],128===(192&u)&&128===(192&f)&&128===(192&c)&&(l=(15&o)<<18|(63&u)<<12|(63&f)<<6|63&c,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return C(n)}function C(e){var t=e.length;if(t<=K)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=K));return r}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function R(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function U(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=q(e[o]);return i}function N(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(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 B(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,i,o){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||M(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,i){return t=+t,r>>>=0,i||M(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(e,t,r,n,52,8),r+8}function P(e){if(e=e.trim().replace(Z,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function q(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.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;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function H(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function G(e){return V.toByteArray(P(e))}function J(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function W(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function $(e){return e!==e}var V=e("base64-js"),X=e("ieee754");r.Buffer=o,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50;var Y=2147483647;r.kMaxLength=Y,o.TYPED_ARRAY_SUPPORT=n(),o.TYPED_ARRAY_SUPPORT||"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."),"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(e,t,r){return s(e,t,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(e,t,r){return u(e,t,r)},o.allocUnsafe=function(e){return f(e)},o.allocUnsafeSlow=function(e){return f(e)},o.isBuffer=function(e){return null!=e&&e._isBuffer===!0},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.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}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},o.byteLength=y,o.prototype._isBuffer=!0,o.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)v(this,t,t+1);return this},o.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)v(this,t,t+3),v(this,t+1,t+2);return this},o.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)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):m.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.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+">"},o.prototype.compare=function(e,t,r,n,i){if(!o.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===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,a=r-t,u=Math.min(s,a),f=this.slice(n,i),c=e.slice(t,r),l=0;l<u;++l)if(f[l]!==c[l]){s=f[l],a=c[l];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return this.indexOf(e,t,r)!==-1},o.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},o.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 i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return j(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=o.prototype,n},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),X.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),X.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),X.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),X.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;B(this,e,t,r,i,0)}var o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;B(this,e,t,r,i,0)}var o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(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},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(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},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);B(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);B(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(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},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(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},o.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},o.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 i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},o.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 i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e=255&e);
if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:new o(e,n),u=a.length;for(s=0;s<r-t;++s)this[s+t]=a[s%u]}return this};var Z=/[^+\/0-9A-Za-z-_]/g},{"base64-js":8,ieee754:17}],13:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],14:[function(e,t,r){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function n(e){return"boolean"==typeof e}function i(e){return null===e}function o(e){return null==e}function s(e){return"number"==typeof e}function a(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function f(e){return void 0===e}function c(e){return"[object RegExp]"===y(e)}function l(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===y(e)}function p(e){return"[object Error]"===y(e)||e instanceof Error}function d(e){return"function"==typeof e}function g(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function y(e){return Object.prototype.toString.call(e)}r.isArray=t,r.isBoolean=n,r.isNull=i,r.isNullOrUndefined=o,r.isNumber=s,r.isString=a,r.isSymbol=u,r.isUndefined=f,r.isRegExp=c,r.isObject=l,r.isDate=h,r.isError=p,r.isFunction=d,r.isPrimitive=g,r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":19}],15:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(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(!o(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,o,u,f;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(r=this._events[e],a(r))return!1;if(i(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:o=Array.prototype.slice.call(arguments,1),r.apply(this,o)}else if(s(r))for(o=Array.prototype.slice.call(arguments,1),f=r.slice(),n=f.length,u=0;u<n;u++)f[u].apply(this,o);return!0},n.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&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(!i(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,o,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],o=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(a=o;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;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(r=this._events[e],i(r))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){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],16:[function(e,t,r){function n(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}var i=e("http"),o=e("url"),s=t.exports;for(var a in i)i.hasOwnProperty(a)&&(s[a]=i[a]);s.request=function(e,t){return e=n(e),i.request.call(this,e,t)},s.get=function(e,t){return e=n(e),i.get.call(this,e,t)}},{http:53,url:58}],17:[function(e,t,r){r.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>1,c=-7,l=r?i-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+e[t+l],l+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var s,a,u,f=8*o-i-1,c=(1<<f)-1,l=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+l>=1?h/u:h*Math.pow(2,1-l),t*u>=2&&(s++,u/=2),s+l>=c?(a=0,s=c):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;e[r+p]=255&s,p+=d,s/=256,f-=8);e[r+p-d]|=128*g}},{}],18:[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}},{}],19:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}t.exports=function(e){return null!=e&&(n(e)||i(e)||!!e._isBuffer)}},{}],20:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],21:[function(e,t,r){(function(e){"use strict";function r(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=r:t.exports=e.nextTick}).call(this,e("_process"))},{_process:22}],22:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(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 s(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function a(){y&&d&&(y=!1,d.length?g=d.concat(g):m=-1,g.length&&u())}function u(){if(!y){var e=o(a);y=!0;for(var t=g.length;t;){for(d=g,g=[];++m<t;)d&&d[m].run();m=-1,t=g.length}d=null,y=!1,s(e)}}function f(e,t){this.fun=e,this.array=t}function c(){}var l,h,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(e){h=i}}();var d,g=[],y=!1,m=-1;p.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];g.push(new f(e,t)),1!==g.length||y||o(u)},f.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],23:[function(e,t,r){(function(e){!function(n){function i(e){throw new RangeError(N[e])}function o(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function s(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(U,".");var i=e.split("."),s=o(i,t).join(".");return n+s}function a(e){for(var t,r,n=[],i=0,o=e.length;i<o;)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o?(r=e.charCodeAt(i++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--)):n.push(t);return n}function u(e){return o(e,function(e){var t="";return e>65535&&(e-=65536,t+=M(e>>>10&1023|55296),e=56320|1023&e),t+=M(e)}).join("")}function f(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:x}function c(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?B(e/A):e>>1,e+=B(e/t);e>L*E>>1;n+=x)e=B(e/L);return B(n+(L+1)*e/(e+j))}function h(e){var t,r,n,o,s,a,c,h,p,d,g=[],y=e.length,m=0,v=k,b=O;for(r=e.lastIndexOf(C),r<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&i("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<y;){for(s=m,a=1,c=x;o>=y&&i("invalid-input"),h=f(e.charCodeAt(o++)),(h>=x||h>B((_-m)/a))&&i("overflow"),m+=h*a,p=c<=b?S:c>=b+E?E:c-b,!(h<p);c+=x)d=x-p,a>B(_/d)&&i("overflow"),a*=d;t=g.length+1,b=l(m-s,t,0==s),B(m/t)>_-v&&i("overflow"),v+=B(m/t),m%=t,g.splice(m++,0,v)}return u(g)}function p(e){var t,r,n,o,s,u,f,h,p,d,g,y,m,v,b,w=[];for(e=a(e),y=e.length,t=k,r=0,s=O,u=0;u<y;++u)g=e[u],g<128&&w.push(M(g));for(n=o=w.length,o&&w.push(C);n<y;){for(f=_,u=0;u<y;++u)g=e[u],g>=t&&g<f&&(f=g);for(m=n+1,f-t>B((_-r)/m)&&i("overflow"),r+=(f-t)*m,t=f,u=0;u<y;++u)if(g=e[u],g<t&&++r>_&&i("overflow"),g==t){for(h=r,p=x;d=p<=s?S:p>=s+E?E:p-s,!(h<d);p+=x)b=h-d,v=x-d,w.push(M(c(d+b%v,0))),h=B(b/v);w.push(M(c(h,0))),s=l(r,m,n==o),r=0,++n}++r,++t}return w.join("")}function d(e){return s(e,function(e){return T.test(e)?h(e.slice(4).toLowerCase()):e})}function g(e){return s(e,function(e){return R.test(e)?"xn--"+p(e):e})}var y="object"==typeof r&&r&&!r.nodeType&&r,m="object"==typeof t&&t&&!t.nodeType&&t,v="object"==typeof e&&e;v.global!==v&&v.window!==v&&v.self!==v||(n=v);var b,w,_=2147483647,x=36,S=1,E=26,j=38,A=700,O=72,k=128,C="-",T=/^xn--/,R=/[^\x20-\x7E]/,U=/[\x2E\u3002\uFF0E\uFF61]/g,N={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=x-S,B=Math.floor,M=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:a,encode:u},decode:h,encode:p,toASCII:g,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return b});else if(y&&m)if(t.exports==y)m.exports=b;else for(w in b)b.hasOwnProperty(w)&&(y[w]=b[w]);else n.punycode=b}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],24:[function(e,t,r){"use strict";var n=String.prototype.replace,i=/%20/g;t.exports={"default":"RFC3986",formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},{}],25:[function(e,t,r){"use strict";var n=e("./stringify"),i=e("./parse"),o=e("./formats");t.exports={formats:o,parse:i,stringify:n}},{"./formats":24,"./parse":26,"./stringify":27}],26:[function(e,t,r){"use strict";var n=e("./utils"),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},s=function(e,t){for(var r={},n=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),o=0;o<n.length;++o){var s,a,u=n[o],f=u.indexOf("]=")===-1?u.indexOf("="):u.indexOf("]=")+1;f===-1?(s=t.decoder(u),a=t.strictNullHandling?null:""):(s=t.decoder(u.slice(0,f)),a=t.decoder(u.slice(f+1))),i.call(r,s)?r[s]=[].concat(r[s]).concat(a):r[s]=a}return r},a=function(e,t,r){if(!e.length)return t;var n,i=e.shift();if("[]"===i)n=[],n=n.concat(a(e,t,r));else{n=r.plainObjects?Object.create(null):{};var o="["===i.charAt(0)&&"]"===i.charAt(i.length-1)?i.slice(1,-1):i,s=parseInt(o,10);!isNaN(s)&&i!==o&&String(s)===o&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(n=[],n[s]=a(e,t,r)):n[o]=a(e,t,r)}return n},u=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,u=o.exec(n),f=u?n.slice(0,u.index):n,c=[];if(f){if(!r.plainObjects&&i.call(Object.prototype,f)&&!r.allowPrototypes)return;c.push(f)}for(var l=0;null!==(u=s.exec(n))&&l<r.depth;){if(l+=1,!r.plainObjects&&i.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(u[1])}return u&&c.push("["+n.slice(u.index)+"]"),a(c,t,r)}};t.exports=function(e,t){var r=t||{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.decoder="function"==typeof r.decoder?r.decoder:o.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:o.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,""===e||null===e||"undefined"==typeof e)return r.plainObjects?Object.create(null):{};for(var i="string"==typeof e?s(e,r):e,a=r.plainObjects?Object.create(null):{},f=Object.keys(i),c=0;c<f.length;++c){var l=f[c],h=u(l,i[l],r);a=n.merge(a,h,r)}return n.compact(a)}},{"./utils":28}],27:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./formats"),o={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Date.prototype.toISOString,a={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},u=function f(e,t,r,i,o,s,a,u,c,l,h,p){var d=e;if("function"==typeof a)d=a(t,d);else if(d instanceof Date)d=l(d);else if(null===d){if(i)return s&&!p?s(t):t;d=""}if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||n.isBuffer(d)){if(s){var g=p?t:s(t);return[h(g)+"="+h(s(d))]}return[h(t)+"="+h(String(d))]}var y=[];if("undefined"==typeof d)return y;var m;if(Array.isArray(a))m=a;else{var v=Object.keys(d);m=u?v.sort(u):v}for(var b=0;b<m.length;++b){var w=m[b];o&&null===d[w]||(y=Array.isArray(d)?y.concat(f(d[w],r(t,w),r,i,o,s,a,u,c,l,h,p)):y.concat(f(d[w],t+(c?"."+w:"["+w+"]"),r,i,o,s,a,u,c,l,h,p)))}return y};t.exports=function(e,t){var r=e,n=t||{};if(null!==n.encoder&&void 0!==n.encoder&&"function"!=typeof n.encoder)throw new TypeError("Encoder has to be a function.");var s="undefined"==typeof n.delimiter?a.delimiter:n.delimiter,f="boolean"==typeof n.strictNullHandling?n.strictNullHandling:a.strictNullHandling,c="boolean"==typeof n.skipNulls?n.skipNulls:a.skipNulls,l="boolean"==typeof n.encode?n.encode:a.encode,h="function"==typeof n.encoder?n.encoder:a.encoder,p="function"==typeof n.sort?n.sort:null,d="undefined"!=typeof n.allowDots&&n.allowDots,g="function"==typeof n.serializeDate?n.serializeDate:a.serializeDate,y="boolean"==typeof n.encodeValuesOnly?n.encodeValuesOnly:a.encodeValuesOnly;if("undefined"==typeof n.format)n.format=i["default"];else if(!Object.prototype.hasOwnProperty.call(i.formatters,n.format))throw new TypeError("Unknown format option provided.");var m,v,b=i.formatters[n.format];"function"==typeof n.filter?(v=n.filter,r=v("",r)):Array.isArray(n.filter)&&(v=n.filter,m=v);var w=[];if("object"!=typeof r||null===r)return"";var _;_=n.arrayFormat in o?n.arrayFormat:"indices"in n?n.indices?"indices":"repeat":"indices";var x=o[_];m||(m=Object.keys(r)),p&&m.sort(p);for(var S=0;S<m.length;++S){var E=m[S];c&&null===r[E]||(w=w.concat(u(r[E],E,x,f,c,l?h:null,v,p,d,g,b,y)))}return w.join(s)}},{"./formats":24,"./utils":28}],28:[function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();r.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)"undefined"!=typeof e[n]&&(r[n]=e[n]);return r},r.merge=function(e,t,i){if(!t)return e;if("object"!=typeof t){if(Array.isArray(e))e.push(t);else{if("object"!=typeof e)return[e,t];(i.plainObjects||i.allowPrototypes||!n.call(Object.prototype,t))&&(e[t]=!0)}return e}if("object"!=typeof e)return[e].concat(t);var o=e;return Array.isArray(e)&&!Array.isArray(t)&&(o=r.arrayToObject(e,i)),Array.isArray(e)&&Array.isArray(t)?(t.forEach(function(t,o){n.call(e,o)?e[o]&&"object"==typeof e[o]?e[o]=r.merge(e[o],t,i):e.push(t):e[o]=t}),e):Object.keys(t).reduce(function(e,n){var o=t[n];return Object.prototype.hasOwnProperty.call(e,n)?e[n]=r.merge(e[n],o,i):e[n]=o,e},o)},r.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},r.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 o=t.charCodeAt(n);45===o||46===o||95===o||126===o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?r+=t.charAt(n):o<128?r+=i[o]:o<2048?r+=i[192|o>>6]+i[128|63&o]:o<55296||o>=57344?r+=i[224|o>>12]+i[128|o>>6&63]+i[128|63&o]:(n+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(n)),r+=i[240|o>>18]+i[128|o>>12&63]+i[128|o>>6&63]+i[128|63&o])}return r},r.compact=function(e,t){if("object"!=typeof e||null===e)return e;var n=t||[],i=n.indexOf(e);if(i!==-1)return n[i];if(n.push(e),Array.isArray(e)){for(var o=[],s=0;s<e.length;++s)e[s]&&"object"==typeof e[s]?o.push(r.compact(e[s],n)):"undefined"!=typeof e[s]&&o.push(e[s]);return o}var a=Object.keys(e);return a.forEach(function(t){e[t]=r.compact(e[t],n)}),e},r.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},r.isBuffer=function(e){return null!==e&&"undefined"!=typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},{}],29:[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 s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var f=e.length;u>0&&f>u&&(f=u);for(var c=0;c<f;++c){var l,h,p,d,g=e[c].replace(a,"%20"),y=g.indexOf(r);y>=0?(l=g.substr(0,y),h=g.substr(y+1)):(l=g,h=""),p=decodeURIComponent(l),d=decodeURIComponent(h),n(s,p)?i(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],30:[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 i=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,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?n(s(e),function(s){var a=encodeURIComponent(i(s))+r;return o(e[s])?n(e[s],function(e){return a+encodeURIComponent(i(e))}).join(t):a+encodeURIComponent(i(e[s]))}).join(t):a?encodeURIComponent(i(a))+r+encodeURIComponent(i(e)):""};var o=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}},{}],31:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":29,"./encode":30}],32:[function(e,t,r){"use strict";function n(e){return this instanceof n?(f.call(this,e),c.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(e)}function i(){this.allowHalfOpen||this._writableState.ended||a(o,this)}function o(e){e.end()}var s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=n;var a=e("process-nextick-args"),u=e("core-util-is");u.inherits=e("inherits");var f=e("./_stream_readable"),c=e("./_stream_writable");u.inherits(n,f);for(var l=s(c.prototype),h=0;h<l.length;h++){var p=l[h];n.prototype[p]||(n.prototype[p]=c.prototype[p])}},{"./_stream_readable":34,"./_stream_writable":36,"core-util-is":14,inherits:18,"process-nextick-args":21}],33:[function(e,t,r){"use strict";function n(e){return this instanceof n?void i.call(this,e):new n(e)}t.exports=n;var i=e("./_stream_transform"),o=e("core-util-is");o.inherits=e("inherits"),o.inherits(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":35,"core-util-is":14,inherits:18}],34:[function(e,t,r){(function(r){"use strict";function n(e,t,r){return"function"==typeof e.prependListener?e.prependListener(t,r):void(e._events&&e._events[t]?T(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r))}function i(t,r){k=k||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof k&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new P,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(D||(D=e("string_decoder/").StringDecoder),this.decoder=new D(t.encoding),this.encoding=t.encoding)}function o(t){return k=k||e("./_stream_duplex"),this instanceof o?(this._readableState=new i(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),void U.call(this)):new o(t)}function s(e,t,r,n,i){var o=c(t,r);if(o)e.emit("error",o);else if(null===r)t.reading=!1,l(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var f;!t.decoder||i||n||(r=t.decoder.write(r),f=!t.objectMode&&0===r.length),i||(t.reading=!1),f||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h(e))),d(e,t)}else i||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function u(e){return e>=F?e=F:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function f(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function c(e,t){var r=null;return N.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h(e)}}function h(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(I("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?C(p,e):p(e))}function p(e){I("emit readable"),e.emit("readable"),w(e)}function d(e,t){t.readingMore||(t.readingMore=!0,C(g,e,t))}function g(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(I("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function y(e){return function(){var t=e._readableState;I("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&R(e,"data")&&(t.flowing=!0,w(e))}}function m(e){I("readable nexttick read 0"),e.read(0)}function v(e,t){t.resumeScheduled||(t.resumeScheduled=!0,C(b,e,t))}function b(e,t){t.reading||(I("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),w(e),t.flowing&&!t.reading&&e.read(0)}function w(e){var t=e._readableState;for(I("flow",t.flowing);t.flowing&&null!==e.read(););}function _(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=x(e,t.buffer,t.decoder),r}function x(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?S(e,t):E(e,t),n}function S(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(i+=s===o.length?o:o.slice(0,e),e-=s,0===e){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}function E(e,t){var r=L.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),e-=s,0===e){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}function j(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,C(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function O(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}t.exports=o;var k,C=e("process-nextick-args"),T=e("isarray");o.ReadableState=i;var R=(e("events").EventEmitter,function(e,t){return e.listeners(t).length}),U=e("./internal/streams/stream"),N=e("buffer").Buffer,L=e("buffer-shims"),B=e("core-util-is");B.inherits=e("inherits");var M=e("util"),I=void 0;I=M&&M.debuglog?M.debuglog("stream"):function(){};var D,P=e("./internal/streams/BufferList");B.inherits(o,U);var q=["error","close","destroy","pause","resume"];o.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding,t!==r.encoding&&(e=L.from(e,t),t="")),s(this,r,e,t,!1)},o.prototype.unshift=function(e){var t=this._readableState;return s(this,t,e,"",!0)},o.prototype.isPaused=function(){return this._readableState.flowing===!1},o.prototype.setEncoding=function(t){return D||(D=e("string_decoder/").StringDecoder),this._readableState.decoder=new D(t),this._readableState.encoding=t,this};var F=8388608;o.prototype.read=function(e){I("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return I("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):h(this),null;if(e=f(e,t),0===e&&t.ended)return 0===t.length&&j(this),null;var n=t.needReadable;I("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&(n=!0,I("length less than watermark",n)),t.ended||t.reading?(n=!1,I("reading or ended",n)):n&&(I("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=f(r,t)));var i;return i=e>0?_(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&j(this)),null!==i&&this.emit("data",i),i},o.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(e,t){function i(e){I("onunpipe"),e===h&&s()}function o(){I("onend"),e.end()}function s(){I("cleanup"),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("drain",m),e.removeListener("error",u),e.removeListener("unpipe",i),h.removeListener("end",o),h.removeListener("end",s),h.removeListener("data",a),v=!0,!p.awaitDrain||e._writableState&&!e._writableState.needDrain||m()}function a(t){I("ondata"),b=!1;var r=e.write(t);!1!==r||b||((1===p.pipesCount&&p.pipes===e||p.pipesCount>1&&O(p.pipes,e)!==-1)&&!v&&(I("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,b=!0),h.pause())}function u(t){I("onerror",t),l(),e.removeListener("error",u),0===R(e,"error")&&e.emit("error",t)}function f(){e.removeListener("finish",c),l()}function c(){I("onfinish"),e.removeListener("close",f),l()}function l(){I("unpipe"),h.unpipe(e)}var h=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=e;break;case 1:p.pipes=[p.pipes,e];break;default:p.pipes.push(e)}p.pipesCount+=1,I("pipe count=%d opts=%j",p.pipesCount,t);var d=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,g=d?o:s;p.endEmitted?C(g):h.once("end",g),e.on("unpipe",i);var m=y(h);e.on("drain",m);var v=!1,b=!1;return h.on("data",a),n(e,"error",u),e.once("close",f),e.once("finish",c),e.emit("pipe",h),p.flowing||(I("pipe resume"),h.resume()),e},o.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),
t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var o=O(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},o.prototype.on=function(e,t){var r=U.prototype.on.call(this,e,t);if("data"===e)this._readableState.flowing!==!1&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&h(this,n):C(m,this))}return r},o.prototype.addListener=o.prototype.on,o.prototype.resume=function(){var e=this._readableState;return e.flowing||(I("resume"),e.flowing=!0,v(this,e)),this},o.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this},o.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(I("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(I("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){var o=n.push(i);o||(r=!0,e.pause())}});for(var i in e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<q.length;o++)e.on(q[o],n.emit.bind(n,q[o]));return n._read=function(t){I("wrapped _read",t),r&&(r=!1,e.resume())},n},o._fromList=_}).call(this,e("_process"))},{"./_stream_duplex":32,"./internal/streams/BufferList":37,"./internal/streams/stream":38,_process:22,buffer:12,"buffer-shims":11,"core-util-is":14,events:15,inherits:18,isarray:20,"process-nextick-args":21,"string_decoder/":39,util:9}],35:[function(e,t,r){"use strict";function n(e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);a.call(this,e),this._transformState=new n(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(t)})}function s(e,t,r){if(t)return e.emit("error",t);null!==r&&void 0!==r&&e.push(r);var n=e._writableState,i=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=o;var a=e("./_stream_duplex"),u=e("core-util-is");u.inherits=e("inherits"),u.inherits(o,a),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./_stream_duplex":32,"core-util-is":14,inherits:18}],36:[function(e,t,r){(function(r){"use strict";function n(){}function i(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function o(t,r){S=S||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof S&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var o=t.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){d(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new x(this)}function s(t){return S=S||e("./_stream_duplex"),R.call(s,this)||this instanceof S?(this._writableState=new o(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),void k.call(this)):new s(t)}function a(e,t){var r=new Error("write after end");e.emit("error",r),E(t,r)}function u(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),E(n,o),i=!1),i}function f(e,t,r){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=T.from(t,r)),t}function c(e,t,r,n,o,s){r||(n=f(t,n,o),C.isBuffer(n)&&(o="buffer"));var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest=new i(n,o,s),c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else l(e,t,!1,a,n,o,s);return u}function l(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function h(e,t,r,n,i){--t.pendingcb,r?E(i,n):i(n),e._writableState.errorEmitted=!0,e.emit("error",n)}function p(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function d(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(p(r),t)h(e,r,n,t,i);else{var o=v(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||m(e,r),n?j(g,e,r,o,i):g(e,r,o,i)}}function g(e,t,r,n){r||y(e,t),t.pendingcb--,n(),w(e,t)}function y(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function m(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0;r;)i[s]=r,r=r.next,s+=1;l(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new x(t)}else{for(;r;){var a=r.chunk,u=r.encoding,f=r.callback,c=t.objectMode?1:a.length;if(l(e,t,!1,c,a,u,f),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function b(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function w(e,t){var r=v(t);return r&&(0===t.pendingcb?(b(e,t),t.finished=!0,e.emit("finish")):b(e,t)),r}function _(e,t,r){t.ending=!0,w(e,t),r&&(t.finished?E(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function x(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}t.exports=s;var S,E=e("process-nextick-args"),j=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:E;s.WritableState=o;var A=e("core-util-is");A.inherits=e("inherits");var O={deprecate:e("util-deprecate")},k=e("./internal/streams/stream"),C=e("buffer").Buffer,T=e("buffer-shims");A.inherits(s,k),o.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(o.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var R;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(s,Symbol.hasInstance,{value:function(e){return!!R.call(this,e)||e&&e._writableState instanceof o}})):R=function(e){return e instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(e,t,r){var i=this._writableState,o=!1,s=C.isBuffer(e);return"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=n),i.ended?a(this,r):(s||u(this,i,e,r))&&(i.pendingcb++,o=c(this,i,s,e,t,r)),o},s.prototype.cork=function(){var e=this._writableState;e.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||m(this,e))},s.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},s.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||_(this,n,r)}}).call(this,e("_process"))},{"./_stream_duplex":32,"./internal/streams/stream":38,_process:22,buffer:12,"buffer-shims":11,"core-util-is":14,inherits:18,"process-nextick-args":21,"util-deprecate":60}],37:[function(e,t,r){"use strict";function n(){this.head=null,this.tail=null,this.length=0}var i=(e("buffer").Buffer,e("buffer-shims"));t.exports=n,n.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},n.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},n.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},n.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t}},{buffer:12,"buffer-shims":11}],38:[function(e,t,r){t.exports=e("events").EventEmitter},{events:15}],39:[function(e,t,r){"use strict";function n(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function i(e){var t=n(e);if("string"!=typeof t&&(v.isEncoding===w||!w(e)))throw new Error("Unknown encoding: "+e);return t||e}function o(e){this.encoding=i(e);var t;switch(this.encoding){case"utf16le":this.text=h,this.end=p,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=d,this.end=g,t=3;break;default:return this.write=y,void(this.end=m)}this.lastNeed=0,this.lastTotal=0,this.lastChar=b.allocUnsafe(t)}function s(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:-1}function a(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r?0:(i=s(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r?0:(i=s(t[n]),i>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function u(e,t,r){if(128!==(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}function f(e){var t=this.lastTotal-this.lastNeed,r=u(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){var r=a(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t}function h(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function d(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function m(e){return e&&e.length?this.write(e):""}var v=e("buffer").Buffer,b=e("buffer-shims"),w=v.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=l,o.prototype.text=c,o.prototype.fillLast=function(e){return this.lastNeed<=e.length?(e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),void(this.lastNeed-=e.length))}},{buffer:12,"buffer-shims":11}],40:[function(e,t,r){r=t.exports=e("./lib/_stream_readable.js"),r.Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":32,"./lib/_stream_passthrough.js":33,"./lib/_stream_readable.js":34,"./lib/_stream_transform.js":35,"./lib/_stream_writable.js":36}],41:[function(e,t,r){var n=e("../src/store-engine"),i=e("../storages/all"),o=[e("../plugins/json2")];t.exports=n.createStore(i,o)},{"../plugins/json2":42,"../src/store-engine":44,"../storages/all":46}],42:[function(e,t,r){function n(){return e("./lib/json2"),{}}t.exports=n},{"./lib/json2":43}],43:[function(require,module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var r,n,i,o,s,a=gap,u=t[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),"function"==typeof rep&&(u=rep.call(t,e,u)),typeof u){case"string":return quote(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(u)){for(o=u.length,r=0;r<o;r+=1)s[r]=str(r,u)||"null";return i=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,i}if(rep&&"object"==typeof rep)for(o=rep.length,r=0;r<o;r+=1)"string"==typeof rep[r]&&(n=rep[r],i=str(n,u),i&&s.push(quote(n)+(gap?": ":":")+i));else for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(i=str(n,u),i&&s.push(quote(n)+(gap?": ":":")+i));return i=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,i}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;n<r;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var r,n,i=e[t];if(i&&"object"==typeof i)for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n=walk(i,r),void 0!==n?i[r]=n:delete i[r]);return reviver.call(e,t,i)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},{}],44:[function(e,t,r){function n(){var e="undefined"==typeof console?null:console;if(e){var t=e.warn?e.warn:e.log;t.apply(e,arguments)}}function i(e,t,r){r||(r=""),e&&!l(e)&&(e=[e]),t&&!l(t)&&(t=[t]);var i=r?"__storejs_"+r+"_":"",o=r?new RegExp("^"+i):null,g=/^[a-zA-Z0-9_\-]*$/;if(!g.test(r))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var y={_namespacePrefix:i,_namespaceRegexp:o,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var r=e.read(t)===t;return e.remove(t),r}catch(n){return!1}},_assignPluginFnProp:function(e,t){var r=this[t];this[t]=function(){function t(){if(r)return u(arguments,function(e,t){n[t]=e}),r.apply(i,n)}var n=s(arguments,0),i=this,o=[t].concat(n);return e.apply(i,o)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var r="";try{r=JSON.parse(e)}catch(n){r=e}return void 0!==r?r:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(l(e))return void u(e,function(e){t._addPlugin(e)});var r=a(this.plugins,function(t){return e===t});if(!r){if(this.plugins.push(e),!h(e))throw new Error("Plugins must be function values that return objects");var n=e.call(this);if(!p(n))throw new Error("Plugins must return an object of function properties");u(n,function(r,n){if(!h(r))throw new Error("Bad plugin property: "+n+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(r,n)})}},addStorage:function(e){n("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},m=c(y,d,{plugins:[]});return m.raw={},u(m,function(e,t){h(e)&&(m.raw[t]=f(m,e))}),u(e,function(e){m._addStorage(e)}),u(t,function(e){m._addPlugin(e)}),m}var o=e("./util"),s=o.slice,a=o.pluck,u=o.each,f=o.bind,c=o.create,l=o.isList,h=o.isFunction,p=o.isObject;t.exports={createStore:i};var d={version:"2.0.12",enabled:!1,get:function(e,t){var r=this.storage.read(this._namespacePrefix+e);return this._deserialize(r,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each(function(r,n){e.call(t,t._deserialize(r),(n||"").replace(t._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return i.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return i(this.storage,this.plugins,e)}}},{"./util":45}],45:[function(e,t,r){(function(e){function r(){return Object.assign?Object.assign:function(e,t,r,n){for(var i=1;i<arguments.length;i++)a(Object(arguments[i]),function(t,r){e[r]=t});return e}}function n(){function e(){}return Object.create?function(e,t,r,n){var i=s(arguments,1);return p.apply(this,[Object.create(e)].concat(i))}:function(t,r,n,i){var o=s(arguments,1);return e.prototype=t,p.apply(this,[new e].concat(o))}}function i(){return String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function o(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}}function s(e,t){return Array.prototype.slice.call(e,t||0)}function a(e,t){f(e,function(e,r){return t(e,r),!1})}function u(e,t){var r=c(e)?[]:{};return f(e,function(e,n){return r[n]=t(e,n),!1}),r}function f(e,t){if(c(e)){for(var r=0;r<e.length;r++)if(t(e[r],r))return e[r]}else for(var n in e)if(e.hasOwnProperty(n)&&t(e[n],n))return e[n]}function c(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}function l(e){return e&&"[object Function]"==={}.toString.call(e)}function h(e){return e&&"[object Object]"==={}.toString.call(e)}var p=r(),d=n(),g=i(),y="undefined"!=typeof window?window:e;t.exports={assign:p,create:d,trim:g,bind:o,slice:s,each:a,map:u,pluck:f,isList:c,isFunction:l,isObject:h,Global:y}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],46:[function(e,t,r){t.exports=[e("./localStorage"),e("./oldFF-globalStorage"),e("./oldIE-userDataStorage"),e("./cookieStorage"),e("./sessionStorage"),e("./memoryStorage")]},{"./cookieStorage":47,"./localStorage":48,"./memoryStorage":49,"./oldFF-globalStorage":50,"./oldIE-userDataStorage":51,"./sessionStorage":52}],47:[function(e,t,r){function n(e){if(!e||!u(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(h.cookie.replace(new RegExp(t),"$1"))}function i(e){for(var t=h.cookie.split(/; ?/g),r=t.length-1;r>=0;r--)if(l(t[r])){var n=t[r].split("="),i=unescape(n[0]),o=unescape(n[1]);e(o,i)}}function o(e,t){e&&(h.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function s(e){e&&u(e)&&(h.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function a(){i(function(e,t){s(t)})}function u(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(h.cookie)}var f=e("../src/util"),c=f.Global,l=f.trim;t.exports={name:"cookieStorage",read:n,write:o,each:i,remove:s,clearAll:a};var h=c.document},{"../src/util":45}],48:[function(e,t,r){function n(){return c.localStorage}function i(e){return n().getItem(e)}function o(e,t){return n().setItem(e,t)}function s(e){for(var t=n().length-1;t>=0;t--){var r=n().key(t);e(i(r),r)}}function a(e){return n().removeItem(e)}function u(){return n().clear()}var f=e("../src/util"),c=f.Global;t.exports={name:"localStorage",read:i,write:o,each:s,remove:a,clearAll:u}},{"../src/util":45}],49:[function(e,t,r){function n(e){return u[e]}function i(e,t){u[e]=t}function o(e){for(var t in u)u.hasOwnProperty(t)&&e(u[t],t)}function s(e){delete u[e]}function a(e){u={}}t.exports={name:"memoryStorage",read:n,write:i,each:o,remove:s,clearAll:a};var u={}},{}],50:[function(e,t,r){function n(e){return c[e]}function i(e,t){c[e]=t}function o(e){for(var t=c.length-1;t>=0;t--){var r=c.key(t);e(c[r],r)}}function s(e){return c.removeItem(e)}function a(){o(function(e,t){delete c[e]})}var u=e("../src/util"),f=u.Global;t.exports={name:"oldFF-globalStorage",read:n,write:i,each:o,remove:s,clearAll:a};var c=f.globalStorage},{"../src/util":45}],51:[function(e,t,r){function n(e,t){if(!g){var r=u(e);d(function(e){e.setAttribute(r,t),e.save(h)})}}function i(e){if(!g){var t=u(e),r=null;return d(function(e){r=e.getAttribute(t)}),r}}function o(e){d(function(t){for(var r=t.XMLDocument.documentElement.attributes,n=r.length-1;n>=0;n--){var i=r[n];e(t.getAttribute(i.name),i.name)}})}function s(e){var t=u(e);d(function(e){e.removeAttribute(t),e.save(h)})}function a(){d(function(e){var t=e.XMLDocument.documentElement.attributes;e.load(h);for(var r=t.length-1;r>=0;r--)e.removeAttribute(t[r].name);e.save(h)})}function u(e){return e.replace(/^\d/,"___$&").replace(y,"___")}function f(){if(!p||!p.documentElement||!p.documentElement.addBehavior)return null;var e,t,r,n="script";try{t=new ActiveXObject("htmlfile"),t.open(),t.write("<"+n+">document.w=window</"+n+'><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,r=e.createElement("div")}catch(i){r=p.createElement("div"),e=p.body}return function(t){var n=[].slice.call(arguments,0);n.unshift(r),e.appendChild(r),r.addBehavior("#default#userData"),r.load(h),t.apply(this,n),e.removeChild(r)}}var c=e("../src/util"),l=c.Global;t.exports={name:"oldIE-userDataStorage",write:n,read:i,each:o,remove:s,clearAll:a};var h="storejs",p=l.document,d=f(),g=(l.navigator?l.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./),y=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g")},{"../src/util":45}],52:[function(e,t,r){function n(){return c.sessionStorage}function i(e){return n().getItem(e)}function o(e,t){return n().setItem(e,t)}function s(e){for(var t=n().length-1;t>=0;t--){var r=n().key(t);e(i(r),r)}}function a(e){return n().removeItem(e)}function u(){return n().clear()}var f=e("../src/util"),c=f.Global;t.exports={name:"sessionStorage",read:i,write:o,each:s,remove:a,clearAll:u}},{"../src/util":45}],53:[function(e,t,r){(function(t){var n=e("./lib/request"),i=e("xtend"),o=e("builtin-status-codes"),s=e("url"),a=r;a.request=function(e,r){e="string"==typeof e?s.parse(e):i(e);var o=t.location.protocol.search(/^https?:$/)===-1?"http:":"",a=e.protocol||o,u=e.hostname||e.host,f=e.port,c=e.path||"/";u&&u.indexOf(":")!==-1&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(f?":"+f:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var l=new n(e);return r&&l.on("response",r),l},a.get=function(e,t){var r=a.request(e,t);return r.end(),r},a.Agent=function(){},a.Agent.defaultMaxSockets=4,a.STATUS_CODES=o,a.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":55,"builtin-status-codes":13,url:58,xtend:64}],54:[function(e,t,r){(function(e){function t(){if(void 0!==s)return s;if(e.XMLHttpRequest){s=new e.XMLHttpRequest;try{s.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(t){s=null}}else s=null;return s}function n(e){var r=t();if(!r)return!1;try{return r.responseType=e,r.responseType===e}catch(n){}return!1}function i(e){return"function"==typeof e}r.fetch=i(e.fetch)&&i(e.ReadableStream),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(o){}var s,a="undefined"!=typeof e.ArrayBuffer,u=a&&i(e.ArrayBuffer.prototype.slice);r.arraybuffer=r.fetch||a&&n("arraybuffer"),r.msstream=!r.fetch&&u&&n("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&a&&n("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!t()&&i(t().overrideMimeType),r.vbArray=i(e.VBArray),s=null}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],55:[function(e,t,r){(function(r,n,i){function o(e,t){return a.fetch&&t?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&e?"arraybuffer":a.vbArray&&e?"text:vbarray":"text"}function s(e){try{var t=e.status;return null!==t&&0!==t}catch(r){return!1}}var a=e("./capability"),u=e("inherits"),f=e("./response"),c=e("readable-stream"),l=e("to-arraybuffer"),h=f.IncomingMessage,p=f.readyStates,d=t.exports=function(e){var t=this;c.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+new i(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(r){t.setHeader(r,e.headers[r])});var r,n=!0;if("disable-fetch"===e.mode||"timeout"in e)n=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!a.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}t._mode=o(r,n),t.on("finish",function(){t._onFinish()})};u(d,c.Writable),d.prototype.setHeader=function(e,t){var r=this,n=e.toLowerCase();g.indexOf(n)===-1&&(r._headers[n]={name:e,value:t})},d.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},d.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]},d.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,o=e._headers,s=null;"GET"!==t.method&&"HEAD"!==t.method&&(s=a.blobConstructor?new n.Blob(e._body.map(function(e){return l(e)}),{type:(o["content-type"]||{}).value||""}):i.concat(e._body).toString());var u=[];if(Object.keys(o).forEach(function(e){var t=o[e].name,r=o[e].value;Array.isArray(r)?r.forEach(function(e){u.push([t,e])}):u.push([t,r])}),"fetch"===e._mode)n.fetch(e._opts.url,{method:e._opts.method,headers:u,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin"}).then(function(t){e._fetchResponse=t,e._connect()},function(t){e.emit("error",t)});else{var f=e._xhr=new n.XMLHttpRequest;try{f.open(e._opts.method,e._opts.url,!0)}catch(c){return void r.nextTick(function(){e.emit("error",c)})}"responseType"in f&&(f.responseType=e._mode.split(":")[0]),"withCredentials"in f&&(f.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"timeout"in t&&(f.timeout=t.timeout,f.ontimeout=function(){e.emit("timeout")}),u.forEach(function(e){f.setRequestHeader(e[0],e[1])}),e._response=null,f.onreadystatechange=function(){switch(f.readyState){case p.LOADING:case p.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(f.onprogress=function(){e._onXHRProgress()}),f.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{f.send(s)}catch(c){return void r.nextTick(function(){e.emit("error",c)})}}}},d.prototype._onXHRProgress=function(){var e=this;s(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},d.prototype._connect=function(){var e=this;e._destroyed||(e._response=new h(e._xhr,e._fetchResponse,e._mode),
e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},d.prototype._write=function(e,t,r){var n=this;n._body.push(e),r()},d.prototype.abort=d.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},d.prototype.end=function(e,t,r){var n=this;"function"==typeof e&&(r=e,e=void 0),c.Writable.prototype.end.call(n,e,t,r)},d.prototype.flushHeaders=function(){},d.prototype.setTimeout=function(){},d.prototype.setNoDelay=function(){},d.prototype.setSocketKeepAlive=function(){};var g=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":54,"./response":56,_process:22,buffer:12,inherits:18,"readable-stream":40,"to-arraybuffer":57}],56:[function(e,t,r){(function(t,n,i){var o=e("./capability"),s=e("inherits"),a=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},f=r.IncomingMessage=function(e,r,n){function s(){f.read().then(function(e){if(!u._destroyed){if(e.done)return void u.push(null);u.push(new i(e.value)),s()}})["catch"](function(e){u.emit("error",e)})}var u=this;if(a.Readable.call(u),u._mode=n,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",function(){t.nextTick(function(){u.emit("close")})}),"fetch"===n){u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach(function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)});var f=r.body.getReader();s()}else{u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText;var c=e.getAllResponseHeaders().split(/\r?\n/);if(c.forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}}),u._charset="x-user-defined",!o.overrideMimeType){var l=u.rawHeaders["mime-type"];if(l){var h=l.match(/;\s*charset=([^;])(;|$)/);h&&(u._charset=h[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};s(f,a.Readable),f.prototype._read=function(){},f.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(o){}if(null!==r){e.push(new i(r));break}case"text":try{r=t.responseText}catch(o){e._mode="text:vbarray";break}if(r.length>e._pos){var s=r.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new i(s.length),f=0;f<s.length;f++)a[f]=255&s.charCodeAt(f);e.push(a)}else e.push(s,e._charset);e._pos=r.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;r=t.response,e.push(new i(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==u.LOADING||!r)break;e.push(new i(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==u.LOADING)break;var c=new n.MSStreamReader;c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(new i(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":54,_process:22,buffer:12,inherits:18,"readable-stream":40}],57:[function(e,t,r){var n=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,i=0;i<r;i++)t[i]=e[i];return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:12}],58:[function(e,t,r){"use strict";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 i(e,t,r){if(e&&f.isObject(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return f.isString(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function s(e,t){return i(e,!1,!0).resolve(t)}function a(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=e("punycode"),f=e("./util");r.parse=i,r.resolve=s,r.resolveObject=a,r.format=o,r.Url=n;var c=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(p),g=["'"].concat(d),y=["%","/","?",";","#"].concat(g),m=["/","?","#"],v=255,b=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},x={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},E=e("querystring");n.prototype.parse=function(e,t,r){if(!f.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n<e.indexOf("#")?"?":"#",o=e.split(i),s=/\\/g;o[0]=o[0].replace(s,"/"),e=o.join(i);var a=e;if(a=a.trim(),!r&&1===e.split("#").length){var l=h.exec(a);if(l)return this.path=a,this.href=a,this.pathname=l[1],l[2]?(this.search=l[2],t?this.query=E.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var p=c.exec(a);if(p){p=p[0];var d=p.toLowerCase();this.protocol=d,a=a.substr(p.length)}if(r||p||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var j="//"===a.substr(0,2);!j||p&&x[p]||(a=a.substr(2),this.slashes=!0)}if(!x[p]&&(j||p&&!S[p])){for(var A=-1,O=0;O<m.length;O++){var k=a.indexOf(m[O]);k!==-1&&(A===-1||k<A)&&(A=k)}var C,T;T=A===-1?a.lastIndexOf("@"):a.lastIndexOf("@",A),T!==-1&&(C=a.slice(0,T),a=a.slice(T+1),this.auth=decodeURIComponent(C)),A=-1;for(var O=0;O<y.length;O++){var k=a.indexOf(y[O]);k!==-1&&(A===-1||k<A)&&(A=k)}A===-1&&(A=a.length),this.host=a.slice(0,A),a=a.slice(A),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var U=this.hostname.split(/\./),O=0,N=U.length;O<N;O++){var L=U[O];if(L&&!L.match(b)){for(var B="",M=0,I=L.length;M<I;M++)B+=L.charCodeAt(M)>127?"x":L[M];if(!B.match(b)){var D=U.slice(0,O),P=U.slice(O+1),q=L.match(w);q&&(D.push(q[1]),P.unshift(q[2])),P.length&&(a="/"+P.join(".")+a),this.hostname=D.join(".");break}}}this.hostname.length>v?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=u.toASCII(this.hostname));var F=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+F,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!_[d])for(var O=0,N=g.length;O<N;O++){var H=g[O];if(a.indexOf(H)!==-1){var G=encodeURIComponent(H);G===H&&(G=escape(H)),a=a.split(H).join(G)}}var J=a.indexOf("#");J!==-1&&(this.hash=a.substr(J),a=a.slice(0,J));var W=a.indexOf("?");if(W!==-1?(this.search=a.substr(W),this.query=a.substr(W+1),t&&(this.query=E.parse(this.query)),a=a.slice(0,W)):t&&(this.search="",this.query={}),a&&(this.pathname=a),S[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var F=this.pathname||"",$=this.search||"";this.path=F+$}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&f.isObject(this.query)&&Object.keys(this.query).length&&(o=E.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||S[t])&&i!==!1?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+i+r+s+n},n.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(f.isString(e)){var t=new n;t.parse(e,!1,!0),e=t}for(var r=new n,i=Object.keys(this),o=0;o<i.length;o++){var s=i[o];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),u=0;u<a.length;u++){var c=a[u];"protocol"!==c&&(r[c]=e[c])}return 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]){for(var l=Object.keys(e),h=0;h<l.length;h++){var p=l[h];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||x[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 g=r.pathname||"",y=r.search||"";r.path=g+y}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var m=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=v||m||r.host&&e.pathname,w=b,_=r.pathname&&r.pathname.split("/")||[],d=e.pathname&&e.pathname.split("/")||[],E=r.protocol&&!S[r.protocol];if(E&&(r.hostname="",r.port=null,r.host&&(""===_[0]?_[0]=r.host:_.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),b=b&&(""===d[0]||""===_[0])),v)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,_=d;else if(d.length)_||(_=[]),_.pop(),_=_.concat(d),r.search=e.search,r.query=e.query;else if(!f.isNullOrUndefined(e.search)){if(E){r.hostname=r.host=_.shift();var j=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");j&&(r.auth=j.shift(),r.host=r.hostname=j.shift())}return r.search=e.search,r.query=e.query,f.isNull(r.pathname)&&f.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],O=(r.host||e.host||_.length>1)&&("."===A||".."===A)||""===A,k=0,C=_.length;C>=0;C--)A=_[C],"."===A?_.splice(C,1):".."===A?(_.splice(C,1),k++):k&&(_.splice(C,1),k--);if(!b&&!w)for(;k--;k)_.unshift("..");!b||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),O&&"/"!==_.join("/").substr(-1)&&_.push("");var T=""===_[0]||_[0]&&"/"===_[0].charAt(0);if(E){r.hostname=r.host=T?"":_.length?_.shift():"";var j=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");j&&(r.auth=j.shift(),r.host=r.hostname=j.shift())}return b=b||r.host&&_.length,b&&!T&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),f.isNull(r.pathname)&&f.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},n.prototype.parseHost=function(){var e=this.host,t=l.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":59,punycode:23,querystring:31}],59:[function(e,t,r){"use strict";t.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}}},{}],60:[function(e,t,r){(function(e){function r(e,t){function r(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(n("noDeprecation"))return e;var i=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(r){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],61:[function(e,t,r){arguments[4][18][0].apply(r,arguments)},{dup:18}],62:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],63:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,e,n.depth)}function o(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e,t){return e}function a(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return b(i)||(i=u(e,i,n)),i}var o=f(e,t);if(o)return o;var s=Object.keys(t),g=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),j(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(t);if(0===s.length){if(A(t)){var y=t.name?": "+t.name:"";return e.stylize("[Function"+y+"]","special")}if(x(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(E(t))return e.stylize(Date.prototype.toString.call(t),"date");if(j(t))return c(t)}var m="",v=!1,w=["{","}"];if(d(t)&&(v=!0,w=["[","]"]),A(t)){var _=t.name?": "+t.name:"";m=" [Function"+_+"]"}if(x(t)&&(m=" "+RegExp.prototype.toString.call(t)),E(t)&&(m=" "+Date.prototype.toUTCString.call(t)),j(t)&&(m=" "+c(t)),0===s.length&&(!v||0==t.length))return w[0]+m+w[1];if(n<0)return x(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var S;return S=v?l(e,t,n,g,s):s.map(function(r){return h(e,t,n,g,r,v)}),e.seen.pop(),p(S,m,w)}function f(e,t){if(_(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return v(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)R(t,String(s))?o.push(h(e,t,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))}),o}function h(e,t,r,n,i,o){var s,a,f;if(f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},f.get?a=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(a=e.stylize("[Setter]","special")),R(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(f.value)<0?(a=y(r)?u(e,f.value,null):u(e,f.value,r-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),_(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function y(e){return null===e}function m(e){return null==e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function _(e){return void 0===e}function x(e){return S(e)&&"[object RegExp]"===k(e)}function S(e){return"object"==typeof e&&null!==e}function E(e){return S(e)&&"[object Date]"===k(e)}function j(e){return S(e)&&("[object Error]"===k(e)||e instanceof Error)}function A(e){return"function"==typeof e}function O(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==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 T(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),B[e.getMonth()],t].join(" ")}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var U=/%[sdj%]/g;r.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(e).replace(U,function(e){if("%%"===e)return"%";if(r>=o)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(t){return"[Circular]"}default:return e}}),a=n[r];r<o;a=n[++r])s+=y(a)||!S(a)?" "+a:" "+i(a);return s},r.deprecate=function(e,i){function o(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}if(_(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var s=!1;return o};var N,L={};r.debuglog=function(e){if(_(N)&&(N=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!L[e])if(new RegExp("\\b"+e+"\\b","i").test(N)){var n=t.pid;L[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else L[e]=function(){};return L[e]},r.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=g,r.isNull=y,r.isNullOrUndefined=m,r.isNumber=v,r.isString=b,r.isSymbol=w,r.isUndefined=_,r.isRegExp=x,r.isObject=S,r.isDate=E,r.isError=j,r.isFunction=A,r.isPrimitive=O,r.isBuffer=e("./support/isBuffer");var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",T(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!S(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"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":62,_process:22,inherits:61}],64:[function(e,t,r){function n(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)i.call(r,n)&&(e[n]=r[n])}return e}t.exports=n;var i=Object.prototype.hasOwnProperty},{}],65:[function(e,t,r){t.exports={name:"tamber",version:"1.2.0",description:"Recommendation engines for developers, easy as π. Build blazing fast, head-scratchingly accurate hosted recommendation engines in minutes.",homepage:"https://github.com/tamber/tamber-node",repository:{type:"git",url:"https://github.com/tamber/tamber-node.git"},author:"Tamber <team@tamber.com> (https://tamber.com/)",contributors:["Alexi Robbins <alexi@tamber.com>"],repository:{type:"git",url:"git://github.com/tamber/tamber-node.git"},"bugs:":"https://github.com/tamber/tamber-node/issues",engines:{node:">= v0.10.0"},main:"lib/Tamber.js",devDependencies:{mocha:"~2.1.0",chai:"~4.1.2","chai-as-promised":"~7.1.1"},dependencies:{lodash:"^3.1.0",btoa:"1.1.2",qs:"^6.0.0","http-proxy":"^1.12.0","http-server":"^0.8.5",store:"^2.0.12"},devDependencies:{"babel-core":"^6.23.1","babel-jest":"^18.0.0","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0",babelify:"^7.3.0",browserify:"^14.1.0",envify:"^3.4.0","jest-cli":"^0.4.3",reactify:"^0.15.2","uglify-js":"~2.6.2",watchify:"^3.9.0"},license:"MIT",scripts:{start:"watchify -o ./tamber.js -v -d lib/Tamber.js",build:"browserify . --standalone tamber -t [envify --NODE_ENV production] -t [babelify --presets [es2015 react]] | uglifyjs -cm > ./tamber.min.js",test:"mocha"},browserify:{transform:[["babelify",{presets:["react","es2015"]}],"envify"]},jest:{rootDir:"./lib",scriptPreprocessor:"../node_modules/babel-jest"},keywords:["tamber","discovery","discovery api","recommendation","recommendation engine","real time","realtime","suggestion"]}},{}],66:[function(e,t,r){"use strict";function n(e,t){if(!(this instanceof n))return new n(e,t);this.session={},null==e&&(e=""),null==t&&(t="");var r={Authorization:"Basic "+i(e+":"+t),"User-Agent":"Tamber/v1 JSWebBindings/"+l};this.session={project:e,engine:t,version:null,url:n.ApiUrl,timeout:n.DefaultTimeout,headers:r,defaultUser:null,trackGuests:!1},this.event=new s(this.session),this.track=this.event.track,this.user=new a(this.session),this.item=new u(this.session),this.behavior=new f(this.session);var o=new c(this.session);this.discover=o,this.forYou=function(e,t){return o.recommended({number:e,get_properties:!0},t)},this.upNext=function(e,t,r){return o.next({item:t,number:e,get_properties:!0},r)},this.moreForYou=function(e,t){return o.recommended({number:e,get_properties:!0,continuation:!0},t)},this.moreUpNext=function(e,t,r){return o.next({item:t,number:e,get_properties:!0,continuation:!0},r)}}var i=e("btoa"),o=e("./Store"),s=e("./objects/Event"),a=e("./objects/User"),u=e("./objects/Item"),f=e("./objects/Behavior"),c=e("./objects/Discover"),l=e("../package.json").version;n.DefaultTimeout=8e4,n.ApiUrl="https://api.tamber.com/v1",n.prototype={setApiVersion:function(e){e&&(this.session.headers["Tamber-Version"]=e)},setProjectKey:function(e){e&&(this.session.project=e,this._updateAuth())},setEngineKey:function(e){e&&(this.session.engine=e,this._updateAuth())},setTimeout:function(e){e&&(this.session.timeout=e)},setApiUrl:function(e){e&&(this.session.url=e)},setUser:function(e,t){if(e){var r=o.getGuestId();if(r&&"string"==typeof r&&r.length>0){var n=this;console.log("_this:",n);var i=new Promise(function(t,i){n.user.merge({from:r,to:e},function(r,s){r?i(r):(o.removeGuestId(),console.log("inner _this:",n),n.session.defaultUser=e,t(s))})});return comms.callbackifyPromiseWithTimeout(i,t)}}this.session.defaultUser=e;var n=this;return comms.callbackifyPromiseWithTimeout(new Promise(function(e,t){setTimeout(function(){e(n.session.defaultUser)},0)}),t)},setTrackGuests:function(e){this.session.trackGuests=e},trackGuests:function(e){this.session.trackGuests=e},getGuestId:function(){return o.getGuestId()},getAttribute:function(e){return this.session[e]},_updateAuth:function(){this.session.headers.Authorization="Basic "+i(this.session.project+":"+this.session.engine)}},t.exports=n},{"../package.json":65,"./Store":2,"./objects/Behavior":3,"./objects/Discover":4,"./objects/Event":5,"./objects/Item":6,"./objects/User":7,btoa:10}]},{},[66])(66)});