forked from Workfront/workfront-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
workfront.min.js
3 lines (3 loc) · 81.4 KB
/
workfront.min.js
1
2
3
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Workfront=t()}}(function(){var t;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 h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var f=r[s]={exports:{}};t[s][0].call(f.exports,function(e){var r=t[s][1][e];return i(r?r:e)},f,f.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(t,e,r){t("promise/polyfill");var n=t("./src/ApiFactory"),i=t("./src/Api"),o=t("./src/ApiUtil"),s=t("./src/ApiConstants");e.exports={Api:i,ApiFactory:n,ApiUtil:o,ApiConstants:s}},{"./src/Api":38,"./src/ApiConstants":39,"./src/ApiFactory":40,"./src/ApiUtil":41,"promise/polyfill":2}],2:[function(t,e,r){},{}],3:[function(t,e,r){e.exports=t(2)},{"/Users/hovhannesbabayan/Development/github/workfront/workfront-api/node_modules/browserify/lib/_empty.js":2}],4:[function(t,e,r){(function(e){"use strict";function n(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t){return this instanceof o?(o.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof t?s(this,t):"string"==typeof t?a(this,t,arguments.length>1?arguments[1]:"utf8"):u(this,t)):arguments.length>1?new o(t,arguments[1]):new o(t)}function s(t,e){if(t=g(t,0>e?0:0|v(e)),!o.TYPED_ARRAY_SUPPORT)for(var r=0;e>r;r++)t[r]=0;return t}function a(t,e,r){("string"!=typeof r||""===r)&&(r="utf8");var n=0|m(e,r);return t=g(t,n),t.write(e,r),t}function u(t,e){if(o.isBuffer(e))return h(t,e);if(J(e))return f(t,e);if(null==e)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(e.buffer instanceof ArrayBuffer)return c(t,e);if(e instanceof ArrayBuffer)return l(t,e)}return e.length?p(t,e):d(t,e)}function h(t,e){var r=0|v(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function f(t,e){var r=0|v(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function c(t,e){var r=0|v(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function l(t,e){return o.TYPED_ARRAY_SUPPORT?(e.byteLength,t=o._augment(new Uint8Array(e))):t=c(t,new Uint8Array(e)),t}function p(t,e){var r=0|v(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function d(t,e){var r,n=0;"Buffer"===e.type&&J(e.data)&&(r=e.data,n=0|v(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(t,e){o.TYPED_ARRAY_SUPPORT?(t=o._augment(new Uint8Array(e)),t.__proto__=o.prototype):(t.length=e,t._isBuffer=!0);var r=0!==e&&e<=o.poolSize>>>1;return r&&(t.parent=Q),t}function v(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function y(t,e){if(!(this instanceof y))return new y(t,e);var r=new o(t,e);return delete r.parent,r}function m(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return G(t).length;e=(""+e).toLowerCase(),n=!0}}function w(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return L(this,e,r);case"ascii":return I(this,e,r);case"binary":return O(this,e,r);case"base64":return R(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function E(t,e,r,n){return W(G(e,t.length-r),t,r,n)}function _(t,e,r,n){return W(H(e),t,r,n)}function A(t,e,r,n){return _(t,e,r,n)}function S(t,e,r,n){return W(z(e),t,r,n)}function T(t,e,r,n){return W($(e,t.length-r),t,r,n)}function R(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function L(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var u,h,f,c;switch(a){case 1:128>o&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(c=(31&o)<<6|63&u,c>127&&(s=c));break;case 3:u=t[i+1],h=t[i+2],128===(192&u)&&128===(192&h)&&(c=(15&o)<<12|(63&u)<<6|63&h,c>2047&&(55296>c||c>57343)&&(s=c));break;case 4:u=t[i+1],h=t[i+2],f=t[i+3],128===(192&u)&&128===(192&h)&&128===(192&f)&&(c=(15&o)<<18|(63&u)<<12|(63&h)<<6|63&f,c>65535&&1114112>c&&(s=c))}}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 x(n)}function x(t){var e=t.length;if(V>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=V));return r}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=Y(t[o]);return i}function U(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function j(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,r,n,i,s){if(!o.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>i||s>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range")}function B(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function P(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function N(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function k(t,e,r,n,i){return i||N(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,i){return i||N(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,r,n,52,8),r+8}function q(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Y(t){return 16>t?"0"+t.toString(16):t.toString(16)}function G(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(56320>r){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function $(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function z(t){return K.toByteArray(q(t))}function W(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var K=t("base64-js"),X=t("ieee754"),J=t("isarray");r.Buffer=o,r.SlowBuffer=y,r.INSPECT_MAX_BYTES=50,o.poolSize=8192;var Q={};o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:n(),o.TYPED_ARRAY_SUPPORT?(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array):(o.prototype.length=void 0,o.prototype.parent=void 0),o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,s=Math.min(r,n);s>i&&t[i]===e[i];)++i;return i!==s&&(r=t[i],n=e[i]),n>r?-1:r>n?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!J(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new o(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;r++)e+=t[r].length;var n=new o(e),i=0;for(r=0;r<t.length;r++){var s=t[r];s.copy(n,i),i+=s.length}return n},o.byteLength=m,o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?L(this,0,t):w.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===o.compare(this,t)},o.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:o.compare(this,t)},o.prototype.indexOf=function(t,e){function r(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(o.isBuffer(t))return r(this,t,e);if("number"==typeof t)return o.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):r(this,[t],e);throw new TypeError("val must be string, number or Buffer")},o.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},o.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},o.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return _(this,t,e,r);case"binary":return A(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var V=4096;o.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),t>e&&(e=t);var n;if(o.TYPED_ARRAY_SUPPORT)n=o._augment(this.subarray(t,e));else{var i=e-t;n=new o(i,void 0);for(var s=0;i>s;s++)n[s]=this[s+t]}return n.length&&(n.parent=this.parent||this),n},o.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},o.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||j(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},o.prototype.readUInt8=function(t,e){return e||j(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||j(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||j(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||j(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||j(t,4,this.length),X.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||j(t,4,this.length),X.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||j(t,8,this.length),X.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||j(t,8,this.length),X.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||M(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},o.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||M(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e=0|e,r||M(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=0|e,r||M(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=0|e,r||M(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=0|e,r||M(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=0|e,r||M(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>0)-a&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=(t/s>>0)-a&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e=0|e,r||M(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e=0|e,r||M(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e=0|e,r||M(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e=0|e,r||M(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e=0|e,r||M(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,r){return k(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return k(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&r>n&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,s=n-r;if(this===t&&e>r&&n>e)for(i=s-1;i>=0;i--)t[i+e]=this[i+r];else if(1e3>s||!o.TYPED_ARRAY_SUPPORT)for(i=0;s>i;i++)t[i+e]=this[i+r];else t._set(this.subarray(r,r+s),e);return s},o.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=G(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o.TYPED_ARRAY_SUPPORT)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,r=t.length;r>e;e+=1)t[e]=this[e];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=o.prototype;o._augment=function(t){return t.constructor=o,t._isBuffer=!0,t._set=t.set,t.get=Z.get,t.set=Z.set,t.write=Z.write,t.toString=Z.toString,t.toLocaleString=Z.toString,t.toJSON=Z.toJSON,t.equals=Z.equals,t.compare=Z.compare,t.indexOf=Z.indexOf,t.copy=Z.copy,t.slice=Z.slice,t.readUIntLE=Z.readUIntLE,t.readUIntBE=Z.readUIntBE,t.readUInt8=Z.readUInt8,t.readUInt16LE=Z.readUInt16LE,t.readUInt16BE=Z.readUInt16BE,t.readUInt32LE=Z.readUInt32LE,t.readUInt32BE=Z.readUInt32BE,t.readIntLE=Z.readIntLE,t.readIntBE=Z.readIntBE,t.readInt8=Z.readInt8,t.readInt16LE=Z.readInt16LE,t.readInt16BE=Z.readInt16BE,t.readInt32LE=Z.readInt32LE,t.readInt32BE=Z.readInt32BE,t.readFloatLE=Z.readFloatLE,t.readFloatBE=Z.readFloatBE,t.readDoubleLE=Z.readDoubleLE,t.readDoubleBE=Z.readDoubleBE,t.writeUInt8=Z.writeUInt8,t.writeUIntLE=Z.writeUIntLE,t.writeUIntBE=Z.writeUIntBE,t.writeUInt16LE=Z.writeUInt16LE,t.writeUInt16BE=Z.writeUInt16BE,t.writeUInt32LE=Z.writeUInt32LE,t.writeUInt32BE=Z.writeUInt32BE,t.writeIntLE=Z.writeIntLE,t.writeIntBE=Z.writeIntBE,t.writeInt8=Z.writeInt8,t.writeInt16LE=Z.writeInt16LE,t.writeInt16BE=Z.writeInt16BE,t.writeInt32LE=Z.writeInt32LE,t.writeInt32BE=Z.writeInt32BE,t.writeFloatLE=Z.writeFloatLE,t.writeFloatBE=Z.writeFloatBE,t.writeDoubleLE=Z.writeDoubleLE,t.writeDoubleBE=Z.writeDoubleBE,t.fill=Z.fill,t.inspect=Z.inspect,t.toArrayBuffer=Z.toArrayBuffer,t};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":5,ieee754:6,isarray:7}],5:[function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===c?62:e===a||e===l?63:u>e?-1:u+10>e?e-u+26+26:f+26>e?e-f:h+26>e?e-h+26:void 0}function r(t){function r(t){h[c++]=t}var n,i,s,a,u,h;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=t.length;u="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,h=new o(3*t.length/4-u),s=u>0?t.length-4:t.length;var c=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===u?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===u&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),h}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,u="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],u+=r(o);switch(a){case 1:o=t[t.length-1],u+=e(o>>2),u+=e(o<<4&63),u+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],u+=e(o>>10),u+=e(o>>4&63),u+=e(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),h="a".charCodeAt(0),f="A".charCodeAt(0),c="-".charCodeAt(0),l="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}("undefined"==typeof r?this.base64js={}:r)},{}],6:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,h=u>>1,f=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+c],c+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=h}return(p?-1:1)*s*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var s,a,u,h=8*o-i-1,f=(1<<h)-1,c=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+c>=1?l/u:l*Math.pow(2,1-c),e*u>=2&&(s++,u/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;t[r+p]=255&s,p+=d,s/=256,h-=8);t[r+p-d]|=128*g}},{}],7:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],8:[function(t,e,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function s(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!o(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,r,n,o,u,h;if(this._events||(this._events={}),"error"===t&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],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:for(n=arguments.length,o=new Array(n-1),u=1;n>u;u++)o[u-1]=arguments[u];r.apply(this,o)}else if(s(r)){for(n=arguments.length,o=new Array(n-1),u=1;n>u;u++)o[u-1]=arguments[u];for(h=r.slice(),n=h.length,u=0;n>u;u++)h[u].apply(this,o)}return!0},n.prototype.addListener=function(t,e){var r;if(!i(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?s(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,s(this._events[t])&&!this._events[t].warned){var r;r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,o,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(s(r)){for(a=o;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){n=a;break}if(0>n)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}},{}],9:[function(t,e,r){var n=e.exports,i=(t("events").EventEmitter,t("./lib/request")),o=t("url");n.request=function(t,e){"string"==typeof t&&(t=o.parse(t)),t||(t={}),t.host||t.port||(t.port=parseInt(window.location.port,10)),!t.host&&t.hostname&&(t.host=t.hostname),t.protocol||(t.scheme?t.protocol=t.scheme+":":t.protocol=window.location.protocol),t.host||(t.host=window.location.hostname||window.location.host),/:/.test(t.host)&&(t.port||(t.port=t.host.split(":")[1]),t.host=t.host.split(":")[0]),t.port||(t.port="https:"==t.protocol?443:80);var r=new i(new s,t);return e&&r.on("response",e),r},n.get=function(t,e){t.method="GET";var r=n.request(t,e);return r.end(),r},n.Agent=function(){},n.Agent.defaultMaxSockets=4;var s=function(){if("undefined"==typeof window)throw new Error("no window object present");if(window.XMLHttpRequest)return window.XMLHttpRequest;if(window.ActiveXObject){for(var t=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],e=0;e<t.length;e++)try{var r=new window.ActiveXObject(t[e]);return function(){if(r){var n=r;return r=null,n}return new window.ActiveXObject(t[e])}}catch(n){}throw new Error("ajax not supported in this browser")}throw new Error("ajax not supported in this browser")}();n.STATUS_CODES={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",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary 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 Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",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",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{"./lib/request":10,events:8,url:35}],10:[function(t,e,r){var n=t("stream"),i=t("./response"),o=t("Base64"),s=t("inherits"),a=e.exports=function(t,e){var r=this;r.writable=!0,r.xhr=t,r.body=[],r.uri=(e.protocol||"http:")+"//"+e.host+(e.port?":"+e.port:"")+(e.path||"/"),"undefined"==typeof e.withCredentials&&(e.withCredentials=!0);try{t.withCredentials=e.withCredentials}catch(n){}if(e.responseType)try{t.responseType=e.responseType}catch(n){}if(t.open(e.method||"GET",r.uri,!0),t.onerror=function(t){r.emit("error",new Error("Network error"))},r._headers={},e.headers)for(var s=u(e.headers),a=0;a<s.length;a++){var h=s[a];if(r.isSafeRequestHeader(h)){var f=e.headers[h];r.setHeader(h,f)}}e.auth&&this.setHeader("Authorization","Basic "+o.btoa(e.auth));var c=new i;c.on("close",function(){r.emit("close")}),c.on("ready",function(){r.emit("response",c)}),c.on("error",function(t){r.emit("error",t)}),t.onreadystatechange=function(){t.__aborted||c.handle(t)}};s(a,n),a.prototype.setHeader=function(t,e){this._headers[t.toLowerCase()]=e},a.prototype.getHeader=function(t){return this._headers[t.toLowerCase()]},a.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},a.prototype.write=function(t){this.body.push(t)},a.prototype.destroy=function(t){this.xhr.__aborted=!0,this.xhr.abort(),this.emit("close")},a.prototype.end=function(t){void 0!==t&&this.body.push(t);for(var e=u(this._headers),r=0;r<e.length;r++){var n=e[r],i=this._headers[n];if(h(i))for(var o=0;o<i.length;o++)this.xhr.setRequestHeader(n,i[o]);else this.xhr.setRequestHeader(n,i)}if(0===this.body.length)this.xhr.send("");else if("string"==typeof this.body[0])this.xhr.send(this.body.join(""));else if(h(this.body[0])){for(var s=[],r=0;r<this.body.length;r++)s.push.apply(s,this.body[r]);this.xhr.send(s)}else if(/Array/.test(Object.prototype.toString.call(this.body[0]))){for(var a=0,r=0;r<this.body.length;r++)a+=this.body[r].length;for(var s=new this.body[0].constructor(a),f=0,r=0;r<this.body.length;r++)for(var l=this.body[r],o=0;o<l.length;o++)s[f++]=l[o];this.xhr.send(s)}else if(c(this.body[0]))this.xhr.send(this.body[0]);else{for(var s="",r=0;r<this.body.length;r++)s+=this.body[r].toString();this.xhr.send(s)}},a.unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"],a.prototype.isSafeRequestHeader=function(t){return t?-1===f(a.unsafeHeaders,t.toLowerCase()):!1};var u=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},h=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},f=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},c=function(t){return"undefined"!=typeof Blob&&t instanceof Blob?!0:"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?!0:"undefined"!=typeof FormData&&t instanceof FormData?!0:void 0}},{"./response":11,Base64:12,inherits:14,stream:33}],11:[function(t,e,r){function n(t){for(var e=t.getAllResponseHeaders().split(/\r?\n/),r={},n=0;n<e.length;n++){var i=e[n];if(""!==i){var o=i.match(/^([^:]+):\s*(.*)/);if(o){var s=o[1].toLowerCase(),a=o[2];void 0!==r[s]?u(r[s])?r[s].push(a):r[s]=[r[s],a]:r[s]=a}else r[i]=!0}}return r}var i=t("stream"),o=t("util"),s=e.exports=function(t){this.offset=0,this.readable=!0};o.inherits(s,i);
var a={streaming:!0,status2:!0};s.prototype.getResponse=function(t){var e=String(t.responseType).toLowerCase();return"blob"===e?t.responseBlob||t.response:"arraybuffer"===e?t.response:t.responseText},s.prototype.getHeader=function(t){return this.headers[t.toLowerCase()]},s.prototype.handle=function(t){if(2===t.readyState&&a.status2){try{this.statusCode=t.status,this.headers=n(t)}catch(e){a.status2=!1}a.status2&&this.emit("ready")}else if(a.streaming&&3===t.readyState){try{this.statusCode||(this.statusCode=t.status,this.headers=n(t),this.emit("ready"))}catch(e){}try{this._emitData(t)}catch(e){a.streaming=!1}}else 4===t.readyState&&(this.statusCode||(this.statusCode=t.status,this.emit("ready")),this._emitData(t),t.error?this.emit("error",this.getResponse(t)):this.emit("end"),this.emit("close"))},s.prototype._emitData=function(t){var e=this.getResponse(t);return e.toString().match(/ArrayBuffer/)?(this.emit("data",new Uint8Array(e,this.offset)),void(this.offset=e.byteLength)):void(e.length>this.offset&&(this.emit("data",e.slice(this.offset)),this.offset=e.length))};var u=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{stream:33,util:37}],12:[function(t,e,r){!function(){function t(t){this.message=t}var e="undefined"!=typeof r?r:this,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var r,i,o=0,s=n,a="";e.charAt(0|o)||(s="=",o%1);a+=s.charAt(63&r>>8-o%1*8)){if(i=e.charCodeAt(o+=.75),i>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|i}return a}),e.atob||(e.atob=function(e){if(e=e.replace(/=+$/,""),e.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,s=0,a="";i=e.charAt(s++);~i&&(r=o%4?64*r+i:i,o++%4)?a+=String.fromCharCode(255&r>>(-2*o&6)):0)i=n.indexOf(i);return a})}()},{}],13:[function(t,e,r){var n=t("http"),i=e.exports;for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);i.request=function(t,e){return t||(t={}),t.scheme="https",t.protocol="https:",n.request.call(this,t,e)}},{http:9}],14:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],15:[function(t,e,r){e.exports=function(t){return!(null==t||!(t._isBuffer||t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)))}},{}],16:[function(t,e,r){e.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},{}],17:[function(t,e,r){function n(){}var i=e.exports={};i.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.MutationObserver,r="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};var n=[];if(e){var i=document.createElement("div"),o=new MutationObserver(function(){var t=n.slice();n.length=0,t.forEach(function(t){t()})});return o.observe(i,{attributes:!0}),function(t){n.length||i.setAttribute("yes","no"),n.push(t)}}return r?(window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}}(),i.title="browser",i.browser=!0,i.env={},i.argv=[],i.on=n,i.addListener=n,i.once=n,i.off=n,i.removeListener=n,i.removeAllListeners=n,i.emit=n,i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")}},{}],18:[function(e,r,n){(function(e){!function(i){function o(t){throw RangeError(M[t])}function s(t,e){for(var r=t.length;r--;)t[r]=e(t[r]);return t}function a(t,e){return s(t.split(j),e).join(".")}function u(t){for(var e,r,n=[],i=0,o=t.length;o>i;)e=t.charCodeAt(i++),e>=55296&&56319>=e&&o>i?(r=t.charCodeAt(i++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--)):n.push(e);return n}function h(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=N(t>>>10&1023|55296),t=56320|1023&t),e+=N(t)}).join("")}function f(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:A}function c(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function l(t,e,r){var n=0;for(t=r?P(t/L):t>>1,t+=P(t/e);t>B*T>>1;n+=A)t=P(t/B);return P(n+(B+1)*t/(t+R))}function p(t){var e,r,n,i,s,a,u,c,p,d,g=[],v=t.length,y=0,m=I,w=x;for(r=t.lastIndexOf(O),0>r&&(r=0),n=0;r>n;++n)t.charCodeAt(n)>=128&&o("not-basic"),g.push(t.charCodeAt(n));for(i=r>0?r+1:0;v>i;){for(s=y,a=1,u=A;i>=v&&o("invalid-input"),c=f(t.charCodeAt(i++)),(c>=A||c>P((_-y)/a))&&o("overflow"),y+=c*a,p=w>=u?S:u>=w+T?T:u-w,!(p>c);u+=A)d=A-p,a>P(_/d)&&o("overflow"),a*=d;e=g.length+1,w=l(y-s,e,0==s),P(y/e)>_-m&&o("overflow"),m+=P(y/e),y%=e,g.splice(y++,0,m)}return h(g)}function d(t){var e,r,n,i,s,a,h,f,p,d,g,v,y,m,w,b=[];for(t=u(t),v=t.length,e=I,r=0,s=x,a=0;v>a;++a)g=t[a],128>g&&b.push(N(g));for(n=i=b.length,i&&b.push(O);v>n;){for(h=_,a=0;v>a;++a)g=t[a],g>=e&&h>g&&(h=g);for(y=n+1,h-e>P((_-r)/y)&&o("overflow"),r+=(h-e)*y,e=h,a=0;v>a;++a)if(g=t[a],e>g&&++r>_&&o("overflow"),g==e){for(f=r,p=A;d=s>=p?S:p>=s+T?T:p-s,!(d>f);p+=A)w=f-d,m=A-d,b.push(N(c(d+w%m,0))),f=P(w/m);b.push(N(c(f,0))),s=l(r,y,n==i),r=0,++n}++r,++e}return b.join("")}function g(t){return a(t,function(t){return C.test(t)?p(t.slice(4).toLowerCase()):t})}function v(t){return a(t,function(t){return U.test(t)?"xn--"+d(t):t})}var y="object"==typeof n&&n,m="object"==typeof r&&r&&r.exports==y&&r,w="object"==typeof e&&e;(w.global===w||w.window===w)&&(i=w);var b,E,_=2147483647,A=36,S=1,T=26,R=38,L=700,x=72,I=128,O="-",C=/^xn--/,U=/[^ -~]/,j=/\x2E|\u3002|\uFF0E|\uFF61/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=A-S,P=Math.floor,N=String.fromCharCode;if(b={version:"1.2.4",ucs2:{decode:u,encode:h},decode:p,encode:d,toASCII:v,toUnicode:g},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return b});else if(y&&!y.nodeType)if(m)m.exports=b;else for(E in b)b.hasOwnProperty(E)&&(y[E]=b[E]);else i.punycode=b}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,o){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var h=t.length;u>0&&h>u&&(h=u);for(var f=0;h>f;++f){var c,l,p,d,g=t[f].replace(a,"%20"),v=g.indexOf(r);v>=0?(c=g.substr(0,v),l=g.substr(v+1)):(c=g,l=""),p=decodeURIComponent(c),d=decodeURIComponent(l),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(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],20:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?n(s(t),function(s){var a=encodeURIComponent(i(s))+r;return o(t[s])?n(t[s],function(t){return a+encodeURIComponent(i(t))}).join(e):a+encodeURIComponent(i(t[s]))}).join(e):a?encodeURIComponent(i(a))+r+encodeURIComponent(i(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],21:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":19,"./encode":20}],22:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":23}],23:[function(t,e,r){(function(r){function n(t){return this instanceof n?(u.call(this,t),h.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||r.nextTick(this.end.bind(this))}function o(t,e){for(var r=0,n=t.length;n>r;r++)e(t[r],r)}e.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=t("core-util-is");a.inherits=t("inherits");var u=t("./_stream_readable"),h=t("./_stream_writable");a.inherits(n,u),o(s(h.prototype),function(t){n.prototype[t]||(n.prototype[t]=h.prototype[t])})}).call(this,t("_process"))},{"./_stream_readable":25,"./_stream_writable":27,_process:17,"core-util-is":28,inherits:14}],24:[function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}e.exports=n;var i=t("./_stream_transform"),o=t("core-util-is");o.inherits=t("inherits"),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":26,"core-util-is":28,inherits:14}],25:[function(t,e,r){(function(r){function n(e,r){var n=t("./_stream_duplex");e=e||{};var i=e.highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],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.objectMode=!!e.objectMode,r instanceof n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(x||(x=t("string_decoder/").StringDecoder),this.decoder=new x(e.encoding),this.encoding=e.encoding)}function i(e){t("./_stream_duplex");return this instanceof i?(this._readableState=new n(e,this),this.readable=!0,void R.call(this)):new i(e)}function o(t,e,r,n,i){var o=h(e,r);if(o)t.emit("error",o);else if(L.isNullOrUndefined(r))e.reading=!1,e.ended||f(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&c(t)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=O)t=O;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||L.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function h(t,e){var r=null;return L.isBuffer(e)||L.isString(e)||L.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function f(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,c(t)}function c(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(I("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?r.nextTick(function(){l(t)}):l(t))}function l(t){I("emit readable"),t.emit("readable"),m(t)}function p(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(function(){d(t,e)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(I("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;I("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&T.listenerCount(t,"data")&&(e.flowing=!0,m(t))}}function v(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(function(){y(t,e)}))}function y(t,e){e.resumeScheduled=!1,t.emit("resume"),m(t),e.flowing&&!e.reading&&t.read(0)}function m(t){var e=t._readableState;if(I("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function w(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):S.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new S(t);for(var u=0,h=0,f=n.length;f>h&&t>u;h++){var a=n[0],c=Math.min(t-u,a.length);o?r+=a.slice(0,c):a.copy(r,u,0,c),c<a.length?n[0]=a.slice(c):n.shift(),u+=c}}return r}function b(t){var e=t._readableState;if(e.length>0)throw new Error("endReadable called on non-empty stream");e.endEmitted||(e.ended=!0,r.nextTick(function(){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function E(t,e){for(var r=0,n=t.length;n>r;r++)e(t[r],r)}function _(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}e.exports=i;var A=t("isarray"),S=t("buffer").Buffer;i.ReadableState=n;var T=t("events").EventEmitter;T.listenerCount||(T.listenerCount=function(t,e){return t.listeners(e).length});var R=t("stream"),L=t("core-util-is");L.inherits=t("inherits");var x,I=t("util");I=I&&I.debuglog?I.debuglog("stream"):function(){},L.inherits(i,R),i.prototype.push=function(t,e){var r=this._readableState;return L.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new S(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(e){return x||(x=t("string_decoder/").StringDecoder),this._readableState.decoder=new x(e),this._readableState.encoding=e,this};var O=8388608;i.prototype.read=function(t){I("read",t);var e=this._readableState,r=t;if((!L.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return I("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?b(this):c(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&b(this),null;var n=e.needReadable;I("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,I("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,I("reading or ended",n)),n&&(I("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?w(t,e):null,L.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&b(this),L.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,e){function n(t){I("onunpipe"),t===c&&o()}function i(){I("onend"),t.end()}function o(){I("cleanup"),t.removeListener("close",u),t.removeListener("finish",h),t.removeListener("drain",v),t.removeListener("error",a),t.removeListener("unpipe",n),c.removeListener("end",i),c.removeListener("end",o),c.removeListener("data",s),!l.awaitDrain||t._writableState&&!t._writableState.needDrain||v()}function s(e){I("ondata");var r=t.write(e);!1===r&&(I("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++,c.pause())}function a(e){I("onerror",e),f(),t.removeListener("error",a),0===T.listenerCount(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",h),f()}function h(){I("onfinish"),t.removeListener("close",u),f()}function f(){I("unpipe"),c.unpipe(t)}var c=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=t;break;case 1:l.pipes=[l.pipes,t];break;default:l.pipes.push(t)}l.pipesCount+=1,I("pipe count=%d opts=%j",l.pipesCount,e);var p=(!e||e.end!==!1)&&t!==r.stdout&&t!==r.stderr,d=p?i:o;l.endEmitted?r.nextTick(d):c.once("end",d),t.on("unpipe",n);var v=g(c);return t.on("drain",v),c.on("data",s),t._events&&t._events.error?A(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",u),t.once("finish",h),t.emit("pipe",c),l.flowing||(I("pipe resume"),c.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;n>i;i++)r[i].emit("unpipe",this);return this}var i=_(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,e){var n=R.prototype.on.call(this,t,e);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&c(this,i);else{var o=this;r.nextTick(function(){I("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!0,t.reading||(I("resume read 0"),this.read(0)),v(this,t)),this},i.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},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(I("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(I("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)L.isFunction(t[i])&&L.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return E(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){I("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=w}).call(this,t("_process"))},{"./_stream_duplex":23,_process:17,buffer:4,"core-util-is":28,events:8,inherits:14,isarray:16,stream:33,"string_decoder/":34,util:3}],26:[function(t,e,r){function n(t,e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,u.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}e.exports=o;var a=t("./_stream_duplex"),u=t("core-util-is");u.inherits=t("inherits"),u.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;u.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},{"./_stream_duplex":23,"core-util-is":28,inherits:14}],27:[function(t,e,r){(function(r){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(e,r){var n=t("./_stream_duplex");e=e||{};var i=e.highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!e.objectMode,r instanceof n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(r,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(e){var r=t("./_stream_duplex");return this instanceof o||this instanceof r?(this._writableState=new i(e,this),this.writable=!0,void A.call(this)):new o(e)}function s(t,e,n){var i=new Error("write after end");t.emit("error",i),r.nextTick(function(){n(i)})}function a(t,e,n,i){var o=!0;if(!(_.isBuffer(n)||_.isString(n)||_.isNullOrUndefined(n)||e.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),r.nextTick(function(){i(s)}),o=!1}return o}function u(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&_.isString(e)&&(e=new E(e,r)),e}function h(t,e,r,i,o){r=u(e,r,i),_.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):f(t,e,!1,s,r,i,o),a}function f(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function c(t,e,n,i,o){n?r.nextTick(function(){e.pendingcb--,o(i)}):(e.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function l(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,e){var n=t._writableState,i=n.sync,o=n.writecb;if(l(n),e)c(t,n,i,e,o);else{var s=y(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||v(t,n),i?r.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),w(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function v(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,f(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,u=e.objectMode?1:o.length;if(f(t,e,!1,u,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function y(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function m(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function w(t,e){var r=y(t,e);return r&&(0===e.pendingcb?(m(t,e),e.finished=!0,t.emit("finish")):m(t,e)),r}function b(t,e,n){e.ending=!0,w(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n)),e.ended=!0}e.exports=o;var E=t("buffer").Buffer;o.WritableState=i;var _=t("core-util-is");_.inherits=t("inherits");var A=t("stream");_.inherits(o,A),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return _.isFunction(e)&&(r=e,e=null),_.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),_.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=h(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||v(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;_.isFunction(t)?(r=t,t=null,e=null):_.isFunction(e)&&(r=e,e=null),_.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||b(this,n,r)}}).call(this,t("_process"))},{"./_stream_duplex":23,_process:17,buffer:4,"core-util-is":28,inherits:14,stream:33}],28:[function(t,e,r){(function(t){function e(t){return Array.isArray?Array.isArray(t):"[object Array]"===v(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function s(t){return"number"==typeof t}function a(t){return"string"==typeof t}function u(t){return"symbol"==typeof t}function h(t){return void 0===t}function f(t){return"[object RegExp]"===v(t)}function c(t){return"object"==typeof t&&null!==t}function l(t){return"[object Date]"===v(t)}function p(t){return"[object Error]"===v(t)||t instanceof Error}function d(t){return"function"==typeof t}function g(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function v(t){return Object.prototype.toString.call(t)}r.isArray=e,r.isBoolean=n,r.isNull=i,r.isNullOrUndefined=o,r.isNumber=s,r.isString=a,r.isSymbol=u,r.isUndefined=h,r.isRegExp=f,r.isObject=c,r.isDate=l,r.isError=p,r.isFunction=d,r.isPrimitive=g,r.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":15}],29:[function(t,e,r){e.exports=t("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":24}],30:[function(t,e,r){r=e.exports=t("./lib/_stream_readable.js"),r.Stream=t("stream"),r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":23,"./lib/_stream_passthrough.js":24,"./lib/_stream_readable.js":25,"./lib/_stream_transform.js":26,"./lib/_stream_writable.js":27,stream:33}],31:[function(t,e,r){e.exports=t("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":26}],32:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":27}],33:[function(t,e,r){function n(){i.call(this)}e.exports=n;var i=t("events").EventEmitter,o=t("inherits");o(n,i),n.Readable=t("readable-stream/readable.js"),n.Writable=t("readable-stream/writable.js"),n.Duplex=t("readable-stream/duplex.js"),n.Transform=t("readable-stream/transform.js"),n.PassThrough=t("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&h.pause&&h.pause()}function n(){h.readable&&h.resume&&h.resume()}function o(){f||(f=!0,t.end())}function s(){f||(f=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){h.removeListener("data",r),t.removeListener("drain",n),h.removeListener("end",o),h.removeListener("close",s),h.removeListener("error",a),t.removeListener("error",a),h.removeListener("end",u),h.removeListener("close",u),t.removeListener("close",u)}var h=this;h.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(h.on("end",o),h.on("close",s));var f=!1;return h.on("error",a),t.on("error",a),h.on("end",u),h.on("close",u),t.on("close",u),t.emit("pipe",h),t}},{events:8,inherits:14,"readable-stream/duplex.js":22,"readable-stream/passthrough.js":29,"readable-stream/readable.js":30,"readable-stream/transform.js":31,"readable-stream/writable.js":32}],34:[function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=t("buffer").Buffer,u=a.isEncoding||function(t){switch(t&&t.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}},h=r.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};h.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&56319>=n){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},h.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},h.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},{buffer:4}],35:[function(t,e,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,r){if(t&&h(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}function o(t){return u(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)}function s(t,e){return i(t,!1,!0).resolve(e)}function a(t,e){return t?i(t,!1,!0).resolveObject(e):e}function u(t){return"string"==typeof t}function h(t){return"object"==typeof t&&null!==t}function f(t){return null===t}function c(t){return null==t}var l=t("punycode");r.parse=i,r.resolve=s,r.resolveObject=a,r.format=o,r.Url=n;var p=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,g=["<",">",'"',"`"," ","\r","\n"," "],v=["{","}","|","\\","^","`"].concat(g),y=["'"].concat(v),m=["%","/","?",";","#"].concat(y),w=["/","?","#"],b=255,E=/^[a-z0-9A-Z_-]{0,63}$/,_=/^([a-z0-9A-Z_-]{0,63})(.*)$/,A={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},T={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},R=t("querystring");n.prototype.parse=function(t,e,r){if(!u(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t;n=n.trim();var i=p.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===n.substr(0,2);!s||i&&S[i]||(n=n.substr(2),this.slashes=!0)}if(!S[i]&&(s||i&&!T[i])){for(var a=-1,h=0;h<w.length;h++){var f=n.indexOf(w[h]);-1!==f&&(-1===a||a>f)&&(a=f)}var c,d;d=-1===a?n.lastIndexOf("@"):n.lastIndexOf("@",a),-1!==d&&(c=n.slice(0,d),
n=n.slice(d+1),this.auth=decodeURIComponent(c)),a=-1;for(var h=0;h<m.length;h++){var f=n.indexOf(m[h]);-1!==f&&(-1===a||a>f)&&(a=f)}-1===a&&(a=n.length),this.host=n.slice(0,a),n=n.slice(a),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var v=this.hostname.split(/\./),h=0,L=v.length;L>h;h++){var x=v[h];if(x&&!x.match(E)){for(var I="",O=0,C=x.length;C>O;O++)I+=x.charCodeAt(O)>127?"x":x[O];if(!I.match(E)){var U=v.slice(0,h),j=v.slice(h+1),M=x.match(_);M&&(U.push(M[1]),j.unshift(M[2])),j.length&&(n="/"+j.join(".")+n),this.hostname=U.join(".");break}}}if(this.hostname.length>b?this.hostname="":this.hostname=this.hostname.toLowerCase(),!g){for(var B=this.hostname.split("."),P=[],h=0;h<B.length;++h){var N=B[h];P.push(N.match(/[^A-Za-z0-9_-]/)?"xn--"+l.encode(N):N)}this.hostname=P.join(".")}var k=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+k,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!A[o])for(var h=0,L=y.length;L>h;h++){var q=y[h],F=encodeURIComponent(q);F===q&&(F=escape(q)),n=n.split(q).join(F)}var Y=n.indexOf("#");-1!==Y&&(this.hash=n.substr(Y),n=n.slice(0,Y));var G=n.indexOf("?");if(-1!==G?(this.search=n.substr(G),this.query=n.substr(G+1),e&&(this.query=R.parse(this.query)),n=n.slice(0,G)):e&&(this.search="",this.query={}),n&&(this.pathname=n),T[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var k=this.pathname||"",N=this.search||"";this.path=k+N}return this.href=this.format(),this},n.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&h(this.query)&&Object.keys(this.query).length&&(o=R.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||T[e])&&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(t){return encodeURIComponent(t)}),s=s.replace("#","%23"),e+i+r+s+n},n.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format()},n.prototype.resolveObject=function(t){if(u(t)){var e=new n;e.parse(t,!1,!0),t=e}var r=new n;if(Object.keys(this).forEach(function(t){r[t]=this[t]},this),r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(r[e]=t[e])}),T[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(t.protocol&&t.protocol!==r.protocol){if(!T[t.protocol])return Object.keys(t).forEach(function(e){r[e]=t[e]}),r.href=r.format(),r;if(r.protocol=t.protocol,t.host||S[t.protocol])r.pathname=t.pathname;else{for(var i=(t.pathname||"").split("/");i.length&&!(t.host=i.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var o=r.pathname||"",s=r.search||"";r.path=o+s}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),h=t.host||t.pathname&&"/"===t.pathname.charAt(0),l=h||a||r.host&&t.pathname,p=l,d=r.pathname&&r.pathname.split("/")||[],i=t.pathname&&t.pathname.split("/")||[],g=r.protocol&&!T[r.protocol];if(g&&(r.hostname="",r.port=null,r.host&&(""===d[0]?d[0]=r.host:d.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===i[0]?i[0]=t.host:i.unshift(t.host)),t.host=null),l=l&&(""===i[0]||""===d[0])),h)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,d=i;else if(i.length)d||(d=[]),d.pop(),d=d.concat(i),r.search=t.search,r.query=t.query;else if(!c(t.search)){if(g){r.hostname=r.host=d.shift();var v=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;v&&(r.auth=v.shift(),r.host=r.hostname=v.shift())}return r.search=t.search,r.query=t.query,f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!d.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var y=d.slice(-1)[0],m=(r.host||t.host)&&("."===y||".."===y)||""===y,w=0,b=d.length;b>=0;b--)y=d[b],"."==y?d.splice(b,1):".."===y?(d.splice(b,1),w++):w&&(d.splice(b,1),w--);if(!l&&!p)for(;w--;w)d.unshift("..");!l||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),m&&"/"!==d.join("/").substr(-1)&&d.push("");var E=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(g){r.hostname=r.host=E?"":d.length?d.shift():"";var v=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;v&&(r.auth=v.shift(),r.host=r.hostname=v.shift())}return l=l||r.host&&d.length,l&&!E&&d.unshift(""),d.length?r.pathname=d.join("/"):(r.pathname=null,r.path=null),f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=d.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{punycode:18,querystring:21}],36:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],37:[function(t,e,r){(function(e,n){function i(t,e){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(e)?n.showHidden=e:e&&r._extend(n,e),E(n.showHidden)&&(n.showHidden=!1),E(n.depth)&&(n.depth=2),E(n.colors)&&(n.colors=!1),E(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function s(t,e){return t}function a(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,e,n){if(t.customInspect&&e&&R(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return w(i)||(i=u(t,i,n)),i}var o=h(t,e);if(o)return o;var s=Object.keys(e),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),T(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(e);if(0===s.length){if(R(e)){var v=e.name?": "+e.name:"";return t.stylize("[Function"+v+"]","special")}if(_(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(S(e))return t.stylize(Date.prototype.toString.call(e),"date");if(T(e))return f(e)}var y="",m=!1,b=["{","}"];if(d(e)&&(m=!0,b=["[","]"]),R(e)){var E=e.name?": "+e.name:"";y=" [Function"+E+"]"}if(_(e)&&(y=" "+RegExp.prototype.toString.call(e)),S(e)&&(y=" "+Date.prototype.toUTCString.call(e)),T(e)&&(y=" "+f(e)),0===s.length&&(!m||0==e.length))return b[0]+y+b[1];if(0>n)return _(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var A;return A=m?c(t,e,n,g,s):s.map(function(r){return l(t,e,n,g,r,m)}),t.seen.pop(),p(A,y,b)}function h(t,e){if(E(e))return t.stylize("undefined","undefined");if(w(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return m(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function c(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)C(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,a,h;if(h=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},h.get?a=h.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):h.set&&(a=t.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(h.value)<0?(a=v(r)?u(t,h.value,null):u(t,h.value,r-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),E(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=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function v(t){return null===t}function y(t){return null==t}function m(t){return"number"==typeof t}function w(t){return"string"==typeof t}function b(t){return"symbol"==typeof t}function E(t){return void 0===t}function _(t){return A(t)&&"[object RegExp]"===x(t)}function A(t){return"object"==typeof t&&null!==t}function S(t){return A(t)&&"[object Date]"===x(t)}function T(t){return A(t)&&("[object Error]"===x(t)||t instanceof Error)}function R(t){return"function"==typeof t}function L(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function x(t){return Object.prototype.toString.call(t)}function I(t){return 10>t?"0"+t.toString(10):t.toString(10)}function O(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),B[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var U=/%[sdj%]/g;r.format=function(t){if(!w(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(U,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}}),a=n[r];o>r;a=n[++r])s+=v(a)||!A(a)?" "+a:" "+i(a);return s},r.deprecate=function(t,i){function o(){if(!s){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),s=!0}return t.apply(this,arguments)}if(E(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(e.noDeprecation===!0)return t;var s=!1;return o};var j,M={};r.debuglog=function(t){if(E(j)&&(j=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!M[t])if(new RegExp("\\b"+t+"\\b","i").test(j)){var n=e.pid;M[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else M[t]=function(){};return M[t]},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=v,r.isNullOrUndefined=y,r.isNumber=m,r.isString=w,r.isSymbol=b,r.isUndefined=E,r.isRegExp=_,r.isObject=A,r.isDate=S,r.isError=T,r.isFunction=R,r.isPrimitive=L,r.isBuffer=t("./support/isBuffer");var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",O(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!A(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":36,_process:17,inherits:14}],38:[function(t,e,r){function n(t){var e=i.parse(t.url),r="https:"===e.protocol;this.httpTransport=r?s:o,this.httpOptions={protocol:e.protocol,host:e.hostname,port:e.port||(r?443:80),withCredentials:!1,headers:{},alwaysUseGet:t.alwaysUseGet===!0},this.httpParams={},r&&(this.httpOptions.secureProtocol=t.secureProtocol||"TLSv1_method",this.httpOptions.agent=!1);var n;"internal"===t.version||"unsupported"===t.version?n="/attask/api-"+t.version:(n="/attask/api",t.version&&(n=n+"/v"+t.version)),this.httpOptions.path=n}var i=t("url"),o=t("http"),s=t("https");n.Methods={GET:"GET",PUT:"PUT",DELETE:"DELETE",POST:"POST"},t("./plugins/request")(n),t("./plugins/login")(n),t("./plugins/logout")(n),t("./plugins/search")(n),t("./plugins/get")(n),t("./plugins/create")(n),t("./plugins/edit")(n),t("./plugins/remove")(n),t("./plugins/report")(n),t("./plugins/count")(n),t("./plugins/copy")(n),t("./plugins/execute")(n),t("./plugins/namedQuery")(n),t("./plugins/metadata")(n),t("./plugins/apiKey")(n),"undefined"==typeof window&&t("./plugins/upload")(n),e.exports=n},{"./plugins/apiKey":42,"./plugins/copy":43,"./plugins/count":44,"./plugins/create":45,"./plugins/edit":46,"./plugins/execute":47,"./plugins/get":48,"./plugins/login":49,"./plugins/logout":50,"./plugins/metadata":51,"./plugins/namedQuery":52,"./plugins/remove":53,"./plugins/report":54,"./plugins/request":55,"./plugins/search":56,"./plugins/upload":void 0,http:9,https:13,url:35}],39:[function(t,e,r){var n={SORT:"_Sort",MOD:"_Mod",ORDERDOT:"_",FIRST:"$$FIRST",LIMIT:"$$LIMIT",DATAEXTENSION:"DE:",GROUPBY:"_GroupBy",FORCE_GROUPBY:"$$_ForceGroupBy",AGGFUNC:"_AggFunc",AGGCURRENCY_FIELDS:"$$AggCurr",GROUPCURRENCY_FIELDS:"$$GroupCurr",SORTCURRENCY_FIELDS:"$$SortCurr",FILTERCURRENCY_FIELDS:"$$FilterCurr",ROLLUP:"$$ROLLUP",INTERNAL_PREFIX:"$$",WildCards:{TODAY:"$$TODAY",NOW:"$$NOW",USER:"$$USER",CUSTOMER:"$$CUSTOMER",ACCOUNTREP:"$$AR"},SortOrder:{ASC:"asc",DESC:"desc",CIASC:"ciasc",CIDESC:"cidesc"},Operators:{LESSTHAN:"lt",LESSTHANEQUAL:"lte",GREATERTHAN:"gt",GREATERTHANEQUAL:"gte",EQUAL:"eq",CIEQUAL:"cieq",NOTEQUAL:"ne",NOTEQUALEXACT:"nee",CINOTEQUAL:"cine",CONTAINS:"contains",CICONTAINS:"cicontains",CICONTAINSANY:"cicontainsany",CICONTAINSALL:"cicontainsall",CINOTCONTAINSALL:"cinotcontainsall",CINOTCONTAINSANY:"cinotcontainsany",NOTCONTAINS:"notcontains",CINOTCONTAINS:"cinotcontains",LIKE:"like",CILIKE:"cilike",STARTSWITH:"startswith",SOUNDEX:"soundex",BETWEEN:"between",CIBETWEEN:"cibetween",NOTBETWEEN:"notbetween",CINOTBETWEEN:"cinotbetween",IN:"in",CIIN:"ciin",NOTIN:"notin",CINOTIN:"cinotin",BITWISE_OR:"bitwiseor",BITWISE_AND:"bitwiseand",BITWISE_NAND:"bitwisenand",EXACT_TIME:"exacttime",LENGTH_LT:"length_lt",LENGTH_EQ:"length_eq",LENGTH_GT:"length_gt",ALLOF:"allof",ISNULL:"isnull",NOTNULL:"notnull",ISBLANK:"isblank",NOTBLANK:"notblank"},Functions:{MAX:"max",MIN:"min",AVG:"avg",SUM:"sum",COUNT:"count",STD:"std",VAR:"var",DMAX:"dmax",DMIN:"dmin",DAVG:"davg",DSUM:"dsum",DCOUNT:"dcount",DSTD:"dstd",DVAR:"dvar"}};e.exports=n},{}],40:[function(t,e,r){var n,i=t("./Api");e.exports={getInstance:function(t,e){if(e)return new i(t);if(!n){if("object"!=typeof t)throw new Error("Please provide configuration as an object.");n=new i(t)}return n},deleteInstance:function(){n=void 0}}},{"./Api":38}],41:[function(t,e,r){e.exports={}},{}],42:[function(t,e,r){e.exports=function(t){t.prototype.getApiKey=function(t,e){var r=this;return new Promise(function(n,i){"undefined"!=typeof r.httpParams.apiKey?n(r.httpParams.apiKey):r.execute("USER",null,"getApiKey",{username:t,password:e}).then(function(t){r.httpParams.apiKey=t.result,n(r.httpParams.apiKey)},i)})},t.prototype.clearApiKey=function(){return new Promise(function(t,e){this.execute("USER",null,"clearApiKey").then(function(r){r?(delete this.httpParams.apiKey,t()):e()}.bind(this))}.bind(this))}}},{}],43:[function(t,e,r){e.exports=function(t){t.prototype.copy=function(e,r,n,i){var o={copySourceID:r};return n&&(o.updates=JSON.stringify(n)),this.request(e,o,i,t.Methods.POST)}}},{}],44:[function(t,e,r){e.exports=function(t){t.prototype.count=function(e,r){return this.request(e+"/count",r,null,t.Methods.GET).then(function(t){return t.count})}}},{}],45:[function(t,e,r){e.exports=function(t){t.prototype.create=function(e,r,n){return this.request(e,r,n,t.Methods.POST)}}},{}],46:[function(t,e,r){e.exports=function(t){t.prototype.edit=function(e,r,n,i){var o={updates:JSON.stringify(n)};return this.request(e+"/"+r,o,i,t.Methods.PUT)}}},{}],47:[function(t,e,r){e.exports=function(t){t.prototype.execute=function(e,r,n,i){var o=e;return r?o+="/"+r+"/"+n:(i=i||{},i.action=n),this.request(o,i,null,t.Methods.PUT)}}},{}],48:[function(t,e,r){var n=t("./../ApiConstants");e.exports=function(t){t.prototype.get=function(e,r,i){"string"==typeof r&&(r=[r]);var o=e,s=null;return 1===r.length?0===r[0].indexOf(n.INTERNAL_PREFIX)?s={id:r[0]}:o+="/"+r[0]:s={id:r},this.request(o,s,i,t.Methods.GET)}}},{"./../ApiConstants":39}],49:[function(t,e,r){e.exports=function(t){t.prototype.login=function(e,r){return this.request("login",{username:e,password:r},null,t.Methods.POST).then(function(t){return this.httpOptions.headers.sessionID=t.sessionID,t}.bind(this))}}},{}],50:[function(t,e,r){e.exports=function(t){t.prototype.logout=function(){return new Promise(function(e,r){this.request("logout",null,null,t.Methods.GET).then(function(t){t&&t.success?(delete this.httpOptions.headers.sessionID,e()):r()}.bind(this))}.bind(this))}}},{}],51:[function(t,e,r){e.exports=function(t){t.prototype.metadata=function(e){var r="/metadata";return e&&(r=e+r),this.request(r,null,null,t.Methods.GET)}}},{}],52:[function(t,e,r){e.exports=function(t){t.prototype.namedQuery=function(e,r,n,i){return this.request(e+"/"+r,n,i,t.Methods.GET)}}},{}],53:[function(t,e,r){e.exports=function(t){t.prototype.remove=function(e,r,n){return new Promise(function(i,o){var s=n?{force:!0}:null;this.request(e+"/"+r,s,null,t.Methods.DELETE).then(function(t){t&&t.success?i():o()},o)}.bind(this))}}},{}],54:[function(t,e,r){e.exports=function(t){t.prototype.report=function(e,r){return this.request(e+"/report",r,null,t.Methods.GET)}}},{}],55:[function(t,e,r){var n=t("querystring"),i=t("util");e.exports=function(t){var e=function(e){return e!==t.Methods.GET&&e!==t.Methods.PUT};t.prototype._handleResponse=function(t,e){return function(r){var n="";"function"==typeof r.setEncoding&&r.setEncoding("utf8"),r.on("data",function(t){n+=t}),r.on("end",function(){var r;try{r=JSON.parse(n)}catch(i){return void e(n)}r.error?e(r):t(r.data)})}},t.prototype.request=function(t,r,o,s){o=o||[],"string"==typeof o&&(o=[o]),r=r||{},i._extend(r,this.httpParams);var a={},u=this.httpOptions.alwaysUseGet;i._extend(a,this.httpOptions),u?r.method=s:a.method=s,0===t.indexOf("/")?a.path=this.httpOptions.path+t:a.path=this.httpOptions.path+"/"+t,0!==o.length&&(r.fields=o.join()),r=n.stringify(r),r&&(!u&&e(a.method)?(a.headers["Content-Type"]="application/x-www-form-urlencoded",a.headers["Content-Length"]=r.length):a.path+="?"+r);var h=this.httpTransport;return new Promise(function(t,n){var i=h.request(a,this._handleResponse(t,n));i.on("error",n),!u&&r&&e(a.method)&&i.write(r),i.end()}.bind(this))}}},{querystring:21,util:37}],56:[function(t,e,r){e.exports=function(t){t.prototype.search=function(e,r,n){return this.request(e+"/search",r,n,t.Methods.GET)}}},{}]},{},[1])(1)});