From f6126a5eb2bc779d93a8e7217b6fcc151883984b Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 10 Jan 2016 01:15:32 +0100 Subject: [PATCH] Update dist/ files --- dist/object_hash.js | 4 +- dist/object_hash_test.js | 297 +++++++++++++++++++++------------------ 2 files changed, 160 insertions(+), 141 deletions(-) diff --git a/dist/object_hash.js b/dist/object_hash.js index 34b102d..5cc53e0 100644 --- a/dist/object_hash.js +++ b/dist/object_hash.js @@ -1,2 +1,2 @@ -!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.objectHash=e()}}(function(){return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var f=n[s]={exports:{}};t[s][0].call(f.exports,function(e){var n=t[s][1][e];return i(n?n:e)},f,f.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s=0)return this.dispatch("[CIRCULAR:"+u+"]");if(n.push(r),"undefined"!=typeof o&&o.isBuffer&&o.isBuffer(r))return t.write("buffer:"),t.write(r);if("object"===a||"function"===a){var f=Object.keys(r).sort();e.respectType===!1||p(r)||f.splice(0,0,"prototype","__proto__","constructor"),t.write("object:"+f.length+":");var l=this;return f.forEach(function(n){l.dispatch(n),t.write(":"),e.excludeValues||l.dispatch(r[n]),t.write(",")})}if(!this["_"+a]){if(e.ignoreUnknown)return t.write("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](r)},_array:function(r,i){i="undefined"!=typeof i?i:e.unorderedArrays!==!1;var o=this;if(t.write("array:"+r.length+":"),!i)return r.forEach(function(e){return o.dispatch(e)});var s=[],a=r.map(function(t){var r=new y.PassThrough,i=n.slice(),o=w(e,r,i);return o.dispatch(t),s=s.concat(i.slice(n.length)),r.read().toString()});return n=n.concat(s),a.sort(),this._array(a,!1)},_date:function(e){return t.write("date:"+e.toJSON())},_symbol:function(e){return t.write("symbol:"+e.toString(),"utf8")},_error:function(e){return t.write("error:"+e.toString(),"utf8")},_boolean:function(e){return t.write("bool:"+e.toString())},_string:function(e){t.write("string:"+e.length+":"),t.write(e,"utf8")},_function:function(n){t.write("fn:"),p(n)?this.dispatch("[native]"):this.dispatch(n.toString()),e.respectFunctionProperties&&this._object(n)},_number:function(e){return t.write("number:"+e.toString())},_xml:function(e){return t.write("xml:"+e.toString(),"utf8")},_null:function(){return t.write("Null")},_undefined:function(){return t.write("Undefined")},_regexp:function(e){return t.write("regex:"+e.toString(),"utf8")},_uint8array:function(e){return t.write("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return t.write("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return t.write("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return t.write("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return t.write("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return t.write("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return t.write("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return t.write("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return t.write("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return t.write("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return t.write("url:"+e.toString(),"utf8")},_map:function(n){t.write("map:");var r=Array.from(n);return this._array(r,e.unorderedSets!==!1)},_set:function(n){t.write("set:");var r=Array.from(n);return this._array(r,e.unorderedSets!==!1)},_blob:function(){if(e.ignoreUnknown)return t.write("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return t.write("domwindow")},_process:function(){return t.write("process")},_timer:function(){return t.write("timer")},_pipe:function(){return t.write("pipe")},_tcp:function(){return t.write("tcp")},_udp:function(){return t.write("udp")},_tty:function(){return t.write("tty")},_statwatcher:function(){return t.write("statwatcher")},_securecontext:function(){return t.write("securecontext")},_connection:function(){return t.write("connection")},_zlib:function(){return t.write("zlib")},_context:function(){return t.write("context")},_nodescript:function(){return t.write("nodescript")},_httpparser:function(){return t.write("httpparser")},_dataview:function(){return t.write("dataview")},_signal:function(){return t.write("signal")},_fsevent:function(){return t.write("fsevent")},_tlswrap:function(){return t.write("tlswrap")}}}var m=e("crypto"),y=e("stream");n=t.exports=c,n.sha1=function(e){return c(e)},n.keys=function(e){return c(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},n.MD5=function(e){return c(e,{algorithm:"md5",encoding:"hex"})},n.keysMD5=function(e){return c(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})},n.writeToStream=function(e,t,n){return"undefined"==typeof n&&(n=t,t={}),t=h(e,t),w(t,n).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_8d4d9bf9.js","/")},{buffer:3,crypto:5,lYpoI2:11,stream:13}],2:[function(e,t,n){(function(e,t,r,i,o,s,a,u,f){var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===o||t===d?62:t===s||t===c?63:a>t?-1:a+10>t?t-a+26+26:f+26>t?t-f:u+26>t?t-u+26:void 0}function n(e){function n(e){f[d++]=e}var r,o,s,a,u,f;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=e.length;u="="===e.charAt(l-2)?2:"="===e.charAt(l-1)?1:0,f=new i(3*e.length/4-u),s=u>0?e.length-4:e.length;var d=0;for(r=0,o=0;s>r;r+=4,o+=3)a=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&a)>>16),n((65280&a)>>8),n(255&a);return 2===u?(a=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&a)):1===u&&(a=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(a>>8&255),n(255&a)),f}function r(e){function t(e){return l.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var r,i,o,s=e.length%3,a="";for(r=0,o=e.length-s;o>r;r+=3)i=(e[r]<<16)+(e[r+1]<<8)+e[r+2],a+=n(i);switch(s){case 1:i=e[e.length-1],a+=t(i>>2),a+=t(i<<4&63),a+="==";break;case 2:i=(e[e.length-2]<<8)+e[e.length-1],a+=t(i>>10),a+=t(i>>4&63),a+=t(i<<2&63),a+="="}return a}var i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="+".charCodeAt(0),s="/".charCodeAt(0),a="0".charCodeAt(0),u="a".charCodeAt(0),f="A".charCodeAt(0),d="-".charCodeAt(0),c="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=r}("undefined"==typeof n?this.base64js={}:n)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/base64-js/lib/b64.js","/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(e,t,n){(function(t,r,i,o,s,a,u,f,l){function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);var r=typeof e;if("base64"===t&&"string"===r)for(e=R(e);e.length%4!==0;)e+="=";var o;if("number"===r)o=D(e);else if("string"===r)o=i.byteLength(e,t);else{if("object"!==r)throw new Error("First argument needs to be a number, array or string.");o=D(e.length)}var s;i._useTypedArrays?s=i._augment(new Uint8Array(o)):(s=this,s.length=o,s._isBuffer=!0);var a;if(i._useTypedArrays&&"number"==typeof e.byteLength)s._set(e);else if(W(e))for(a=0;o>a;a++)i.isBuffer(e)?s[a]=e.readUInt8(a):s[a]=e[a];else if("string"===r)s.write(e,0,t);else if("number"===r&&!i._useTypedArrays&&!n)for(a=0;o>a;a++)s[a]=0;return s}function d(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var s=t.length;G(s%2===0,"Invalid hex string"),r>s/2&&(r=s/2);for(var a=0;r>a;a++){var u=parseInt(t.substr(2*a,2),16);G(!isNaN(u),"Invalid hex string"),e[n+a]=u}return i._charsWritten=2*a,a}function c(e,t,n,r){var o=i._charsWritten=V(F(t),e,n,r);return o}function h(e,t,n,r){var o=i._charsWritten=V(P(t),e,n,r);return o}function p(e,t,n,r){return h(e,t,n,r)}function g(e,t,n,r){var o=i._charsWritten=V(z(t),e,n,r);return o}function w(e,t,n,r){var o=i._charsWritten=V(H(t),e,n,r);return o}function m(e,t,n){return 0===t&&n===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,n))}function y(e,t,n){var r="",i="";n=Math.min(e.length,n);for(var o=t;n>o;o++)e[o]<=127?(r+=q(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return r+q(i)}function b(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function v(e,t,n){return b(e,t,n)}function _(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;o++)i+=O(e[o]);return i}function E(e,t,n){for(var r=e.slice(t,n),i="",o=0;o=i)){var o;return n?(o=e[t],i>t+1&&(o|=e[t+1]<<8)):(o=e[t]<<8,i>t+1&&(o|=e[t+1])),o}}function L(e,t,n,r){r||(G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3=i)){var o;return n?(i>t+2&&(o=e[t+2]<<16),i>t+1&&(o|=e[t+1]<<8),o|=e[t],i>t+3&&(o+=e[t+3]<<24>>>0)):(i>t+1&&(o=e[t+1]<<16),i>t+2&&(o|=e[t+2]<<8),i>t+3&&(o|=e[t+3]),o+=e[t]<<24>>>0),o}}function B(e,t,n,r){r||(G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+1=i)){var o=I(e,t,n,!0),s=32768&o;return s?-1*(65535-o+1):o}}function S(e,t,n,r){r||(G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3=i)){var o=L(e,t,n,!0),s=2147483648&o;return s?-1*(4294967295-o+1):o}}function A(e,t,n,r){return r||(G("boolean"==typeof n,"missing or invalid endian"),G(t+3=o))for(var s=0,a=Math.min(o-n,2);a>s;s++)e[n+s]=(t&255<<8*(r?s:1-s))>>>8*(r?s:1-s)}function x(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+3=o))for(var s=0,a=Math.min(o-n,4);a>s;s++)e[n+s]=t>>>8*(r?s:3-s)&255}function M(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+1=o||(t>=0?k(e,t,n,r,i):k(e,65535+t+1,n,r,i))}function C(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+3=o||(t>=0?x(e,t,n,r,i):x(e,4294967295+t+1,n,r,i))}function U(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+3=o||Q.write(e,t,n,r,23,4)}function T(e,t,n,r,i){i||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==n&&null!==n,"missing offset"),G(n+7=o||Q.write(e,t,n,r,52,8)}function R(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e,t,n){return"number"!=typeof e?n:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function D(e){return e=~~Math.ceil(+e),0>e?0:e}function N(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function W(e){return N(e)||i.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function O(e){return 16>e?"0"+e.toString(16):e.toString(16)}function F(e){for(var t=[],n=0;n=r)t.push(e.charCodeAt(n));else{var i=n;r>=55296&&57343>=r&&n++;for(var o=encodeURIComponent(e.slice(i,n+1)).substr(1).split("%"),s=0;s>8,r=t%256,i.push(r),i.push(n);return i}function z(e){return K.toByteArray(e)}function V(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function q(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function J(e,t){G("number"==typeof e,"cannot write a non-number as a number"),G(e>=0,"specified a negative value for writing an unsigned value"),G(t>=e,"value is larger than maximum value for type"),G(Math.floor(e)===e,"value has a fractional component")}function X(e,t,n){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=n,"value smaller than minimum allowed value"),G(Math.floor(e)===e,"value has a fractional component")}function $(e,t,n){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=n,"value smaller than minimum allowed value")}function G(e,t){if(!e)throw new Error(t||"Failed assertion")}var K=e("base64-js"),Q=e("ieee754");n.Buffer=i,n.SlowBuffer=i,n.INSPECT_MAX_BYTES=50,i.poolSize=8192,i._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(n){return!1}}(),i.isEncoding=function(e){switch(String(e).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}},i.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},i.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=F(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=z(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;default:throw new Error("Unknown encoding")}return n},i.concat=function(e,t){if(G(N(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new i(0);if(1===e.length)return e[0];var n;if("number"!=typeof t)for(t=0,n=0;no&&(n=o)):n=o,r=String(r||"utf8").toLowerCase();var s;switch(r){case"hex":s=d(this,e,t,n);break;case"utf8":case"utf-8":s=c(this,e,t,n);break;case"ascii":s=h(this,e,t,n);break;case"binary":s=p(this,e,t,n);break;case"base64":s=g(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":s=w(this,e,t,n);break;default:throw new Error("Unknown encoding")}return s},i.prototype.toString=function(e,t,n){var r=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,n=void 0!==n?Number(n):n=r.length,n===t)return"";var i;switch(e){case"hex":i=_(r,t,n);break;case"utf8":case"utf-8":i=y(r,t,n);break;case"ascii":i=b(r,t,n);break;case"binary":i=v(r,t,n);break;case"base64":i=m(r,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=E(r,t,n);break;default:throw new Error("Unknown encoding")}return i},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},i.prototype.copy=function(e,t,n,r){var o=this;if(n||(n=0),r||0===r||(r=this.length),t||(t=0),r!==n&&0!==e.length&&0!==o.length){G(r>=n,"sourceEnd < sourceStart"),G(t>=0&&t=0&&n=0&&r<=o.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length),e.length-ts||!i._useTypedArrays)for(var a=0;s>a;a++)e[a+t]=this[a+n];else e._set(this.subarray(n,n+s),t)}},i.prototype.slice=function(e,t){var n=this.length;if(e=Y(e,n,0),t=Y(t,n,n),i._useTypedArrays)return i._augment(this.subarray(e,t));for(var r=t-e,o=new i(r,void 0,!0),s=0;r>s;s++)o[s]=this[s+e];return o},i.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},i.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},i.prototype.readUInt8=function(e,t){return t||(G(void 0!==e&&null!==e,"missing offset"),G(e=this.length?void 0:this[e]},i.prototype.readUInt16LE=function(e,t){return I(this,e,!0,t)},i.prototype.readUInt16BE=function(e,t){return I(this,e,!1,t)},i.prototype.readUInt32LE=function(e,t){return L(this,e,!0,t)},i.prototype.readUInt32BE=function(e,t){return L(this,e,!1,t)},i.prototype.readInt8=function(e,t){if(t||(G(void 0!==e&&null!==e,"missing offset"),G(e=this.length)){var n=128&this[e];return n?-1*(255-this[e]+1):this[e]}},i.prototype.readInt16LE=function(e,t){return B(this,e,!0,t)},i.prototype.readInt16BE=function(e,t){return B(this,e,!1,t)},i.prototype.readInt32LE=function(e,t){return S(this,e,!0,t)},i.prototype.readInt32BE=function(e,t){return S(this,e,!1,t)},i.prototype.readFloatLE=function(e,t){return A(this,e,!0,t)},i.prototype.readFloatBE=function(e,t){return A(this,e,!1,t)},i.prototype.readDoubleLE=function(e,t){return j(this,e,!0,t)},i.prototype.readDoubleBE=function(e,t){return j(this,e,!1,t)},i.prototype.writeUInt8=function(e,t,n){n||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t=this.length||(this[t]=e)},i.prototype.writeUInt16LE=function(e,t,n){k(this,e,t,!0,n)},i.prototype.writeUInt16BE=function(e,t,n){k(this,e,t,!1,n)},i.prototype.writeUInt32LE=function(e,t,n){x(this,e,t,!0,n)},i.prototype.writeUInt32BE=function(e,t,n){x(this,e,t,!1,n)},i.prototype.writeInt8=function(e,t,n){n||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t=this.length||(e>=0?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},i.prototype.writeInt16LE=function(e,t,n){M(this,e,t,!0,n)},i.prototype.writeInt16BE=function(e,t,n){M(this,e,t,!1,n)},i.prototype.writeInt32LE=function(e,t,n){C(this,e,t,!0,n)},i.prototype.writeInt32BE=function(e,t,n){C(this,e,t,!1,n)},i.prototype.writeFloatLE=function(e,t,n){U(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){U(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){T(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){T(this,e,t,!1,n)},i.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),G("number"==typeof e&&!isNaN(e),"value is not a number"),G(n>=t,"end < start"),n!==t&&0!==this.length){G(t>=0&&t=0&&n<=this.length,"end out of bounds");for(var r=t;n>r;r++)this[r]=e}},i.prototype.inspect=function(){for(var e=[],t=this.length,r=0;t>r;r++)if(e[r]=O(this[r]),r===n.INSPECT_MAX_BYTES){e[r+1]="...";break}return""},i.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(i._useTypedArrays)return new i(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var Z=i.prototype;i._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=Z.get,e.set=Z.set,e.write=Z.write,e.toString=Z.toString,e.toLocaleString=Z.toString,e.toJSON=Z.toJSON,e.copy=Z.copy,e.slice=Z.slice,e.readUInt8=Z.readUInt8,e.readUInt16LE=Z.readUInt16LE,e.readUInt16BE=Z.readUInt16BE,e.readUInt32LE=Z.readUInt32LE,e.readUInt32BE=Z.readUInt32BE,e.readInt8=Z.readInt8,e.readInt16LE=Z.readInt16LE,e.readInt16BE=Z.readInt16BE,e.readInt32LE=Z.readInt32LE,e.readInt32BE=Z.readInt32BE,e.readFloatLE=Z.readFloatLE,e.readFloatBE=Z.readFloatBE,e.readDoubleLE=Z.readDoubleLE,e.readDoubleBE=Z.readDoubleBE,e.writeUInt8=Z.writeUInt8,e.writeUInt16LE=Z.writeUInt16LE,e.writeUInt16BE=Z.writeUInt16BE,e.writeUInt32LE=Z.writeUInt32LE,e.writeUInt32BE=Z.writeUInt32BE,e.writeInt8=Z.writeInt8,e.writeInt16LE=Z.writeInt16LE,e.writeInt16BE=Z.writeInt16BE,e.writeInt32LE=Z.writeInt32LE,e.writeInt32BE=Z.writeInt32BE,e.writeFloatLE=Z.writeFloatLE,e.writeFloatBE=Z.writeFloatBE,e.writeDoubleLE=Z.writeDoubleLE,e.writeDoubleBE=Z.writeDoubleBE,e.fill=Z.fill,e.inspect=Z.inspect,e.toArrayBuffer=Z.toArrayBuffer,e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:20,lYpoI2:11}],4:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e,t){if(e.length%p!==0){var n=e.length+(p-e.length%p);e=i.concat([e,g],n)}for(var r=[],o=t?e.readInt32BE:e.readInt32LE,s=0;sv?t=e(t):t.lengths;s++)r[s]=54^t[s],o[s]=92^t[s];var a=e(i.concat([r,n]));return e(i.concat([o,a]))}function c(e,t){e=e||"sha1";var n=b[e],r=[],o=0;return n||h("algorithm:",e,"is not yet supported"),{update:function(e){return i.isBuffer(e)||(e=new i(e)),r.push(e),o+=e.length,this},digest:function(e){var o=i.concat(r),s=t?d(n,t,o):n(o);return r=null,e?s.toString(e):s}}}function h(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function p(e,t){for(var n in e)t(e[n],n)}var i=e("buffer").Buffer,g=e("./sha"),w=e("./sha256"),m=e("./rng"),y=e("./md5"),b={sha1:g,sha256:w,md5:y},v=64,_=new i(v);_.fill(0),n.createHash=function(e){return c(e)},n.createHmac=function(e,t){return c(e,t)},n.randomBytes=function(e,t){if(!t||!t.call)return new i(m(e));try{t.call(this,void 0,new i(m(e)))}catch(n){t(n)}},p(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){n[e]=function(){h("sorry,",e,"is not implemented yet")}})}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e,t){e[t>>5]|=128<>>9<<4)+14]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,s=0;s>16)+(t>>16)+(n>>16);return r<<16|65535&n}function y(e,t){return e<>>32-t}var b=e("./helpers");t.exports=function(e){return b.hash(e,d,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(e,t,n){(function(e,n,r,i,o,s,a,u,f){!function(){var e,n,r=this;e=function(e){for(var t,t,n=new Array(e),r=0;e>r;r++)0==(3&r)&&(t=4294967296*Math.random()),n[r]=t>>>((3&r)<<3)&255;return n},r.crypto&&crypto.getRandomValues&&(n=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=n||e}()}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,i=-271733879,o=-1732584194,s=271733878,a=-1009589776,u=0;uy;y++){16>y?n[y]=e[u+y]:n[y]=g(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);var b=p(p(g(r,5),c(y,i,o,s)),p(p(a,n[y]),h(y)));a=s,s=o,o=g(i,30),i=r,r=b}r=p(r,f),i=p(i,l),o=p(o,d),s=p(s,w),a=p(a,m)}return Array(r,i,o,s,a)}function c(e,t,n,r){return 20>e?t&n|~t&r:40>e?t^n^r:60>e?t&n|t&r|n&r:t^n^r}function h(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function p(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n}function g(e,t){return e<>>32-t}var w=e("./helpers");t.exports=function(e){return w.hash(e,d,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){var d=e("./helpers"),c=function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n},h=function(e,t){return e>>>t|e<<32-t},p=function(e,t){return e>>>t},g=function(e,t,n){return e&t^~e&n},w=function(e,t,n){return e&t^e&n^t&n},m=function(e){return h(e,2)^h(e,13)^h(e,22)},y=function(e){return h(e,6)^h(e,11)^h(e,25)},b=function(e){return h(e,7)^h(e,18)^p(e,3)},v=function(e){return h(e,17)^h(e,19)^p(e,10); -},_=function(e,t){var n,r,i,o,s,a,u,f,l,d,h,p,_=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),I=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var l=0;ld;d++)16>d?I[d]=e[d+l]:I[d]=c(c(c(v(I[d-2]),I[d-7]),b(I[d-15])),I[d-16]),h=c(c(c(c(f,y(s)),g(s,a,u)),_[d]),I[d]),p=c(m(n),w(n,r,i)),f=u,u=a,a=s,s=c(o,h),o=i,i=r,r=n,n=c(h,p);E[0]=c(n,E[0]),E[1]=c(r,E[1]),E[2]=c(i,E[2]),E[3]=c(o,E[3]),E[4]=c(s,E[4]),E[5]=c(a,E[5]),E[6]=c(u,E[6]),E[7]=c(f,E[7])}return E};t.exports=function(e){return d.hash(e,_,32,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(e,t,n){(function(e,n,r,i,o,s,a,u,f){function l(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(e){return"function"==typeof e}function c(e){return"number"==typeof e}function h(e){return"object"==typeof e&&null!==e}function p(e){return void 0===e}t.exports=l,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._maxListeners=void 0,l.defaultMaxListeners=10,l.prototype.setMaxListeners=function(e){if(!c(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},l.prototype.emit=function(e){var t,n,r,i,o,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||h(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],p(n))return!1;if(d(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;r>o;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(h(n)){for(r=arguments.length,i=new Array(r-1),o=1;r>o;o++)i[o-1]=arguments[o];for(s=n.slice(),r=s.length,o=0;r>o;o++)s[o].apply(this,i)}return!0},l.prototype.addListener=function(e,t){var n;if(!d(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,d(t.listener)?t.listener:t),this._events[e]?h(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,h(this._events[e])&&!this._events[e].warned){var n;n=p(this._maxListeners)?l.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(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())}return this},l.prototype.on=l.prototype.addListener,l.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!d(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},l.prototype.removeListener=function(e,t){var n,r,i,o;if(!d(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,r=-1,n===t||d(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(h(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},l.prototype.removeAllListeners=function(e){var t,n;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(n=this._events[e],d(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},l.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?d(this._events[e])?[this._events[e]]:this._events[e].slice():[]},l.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?d(e._events[t])?1:e._events[t].length:0}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/events/events.js","/node_modules/gulp-browserify/node_modules/events")},{buffer:3,lYpoI2:11}],11:[function(e,t,n){(function(e,n,r,i,o,s,a,u,f){function l(){}var e=t.exports={};e.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=l,e.addListener=l,e.once=l,e.off=l,e.removeListener=l,e.removeAllListeners=l,e.emit=l,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}],12:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e){return this instanceof d?(g.call(this,e),w.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",c)):new d(e)}function c(){if(!this.allowHalfOpen&&!this._writableState.ended){var e=this;p(function(){e.end()})}}t.exports=d;var h=e("inherits"),p=e("process/browser.js").nextTick,g=e("./readable.js"),w=e("./writable.js");h(d,g),d.prototype.write=w.prototype.write,d.prototype.end=w.prototype.end,d.prototype._write=w.prototype._write}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/duplex.js","/node_modules/gulp-browserify/node_modules/stream-browserify")},{"./readable.js":16,"./writable.js":18,buffer:3,inherits:21,lYpoI2:11,"process/browser.js":14}],13:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(){c.call(this)}t.exports=d;var c=e("events").EventEmitter,h=e("inherits");h(d,c),d.Readable=e("./readable.js"),d.Writable=e("./writable.js"),d.Duplex=e("./duplex.js"),d.Transform=e("./transform.js"),d.PassThrough=e("./passthrough.js"),d.Stream=d,d.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function i(){f||(f=!0,e.end())}function o(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(a(),0===c.listenerCount(this,"error"))throw e}function a(){u.removeListener("data",n),e.removeListener("drain",r),u.removeListener("end",i),u.removeListener("close",o),u.removeListener("error",s),e.removeListener("error",s),u.removeListener("end",a),u.removeListener("close",a),e.removeListener("close",a)}var u=this;u.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(u.on("end",i),u.on("close",o));var f=!1;return u.on("error",s),e.on("error",s),u.on("end",a),u.on("close",a),e.on("close",a),e.emit("pipe",u),e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/index.js","/node_modules/gulp-browserify/node_modules/stream-browserify")},{"./duplex.js":12,"./passthrough.js":15,"./readable.js":16,"./transform.js":17,"./writable.js":18,buffer:3,events:10,inherits:21,lYpoI2:11}],14:[function(e,t,n){(function(e,n,r,i,o,s,a,u,f){var e=t.exports={};e.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/stream-browserify/node_modules/process")},{buffer:3,lYpoI2:11}],15:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e){return this instanceof d?void c.call(this,e):new d(e)}t.exports=d;var c=e("./transform.js"),h=e("inherits");h(d,c),d.prototype._transform=function(e,t,n){n(null,e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/passthrough.js","/node_modules/gulp-browserify/node_modules/stream-browserify")},{"./transform.js":17,buffer:3,inherits:21,lYpoI2:11}],16:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(t,n){t=t||{};var r=t.highWaterMark;this.highWaterMark=r||0===r?r:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(M||(M=e("string_decoder").StringDecoder),this.decoder=new M(t.encoding),this.encoding=t.encoding)}function c(e){return this instanceof c?(this._readableState=new d(e,this),this.readable=!0,void U.call(this)):new c(e)}function h(e,t,n,r,i){var o=m(t,n);if(o)e.emit("error",o);else if(null===n||void 0===n)t.reading=!1,t.ended||y(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||r||(n=t.decoder.write(n)),t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):(t.reading=!1,t.buffer.push(n)),t.needReadable&&b(e),_(e,t);else i||(t.reading=!1);return p(t)}function p(e){return!e.ended&&(e.needReadable||e.length=Y)e=Y;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function w(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||null===e?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=g(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function m(e,t){var n=null;return i.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||n||(n=new TypeError("Invalid non-string/buffer chunk")),n}function y(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.length>0?b(e):j(e)}function b(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?T(function(){v(e)}):v(e))}function v(e){e.emit("readable")}function _(e,t){t.readingMore||(t.readingMore=!0,T(function(){E(e,t)}))}function E(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length0)return;return 0===r.pipesCount?(r.flowing=!1,void(C.listenerCount(e,"data")>0&&S(e))):void(r.ranOut=!0)}function B(){this._readableState.ranOut&&(this._readableState.ranOut=!1,L(this))}function S(e,t){var n=e._readableState;if(n.flowing)throw new Error("Cannot switch to old mode now.");var r=t||!1,i=!1;e.readable=!0,e.pipe=U.prototype.pipe,e.on=e.addListener=U.prototype.on,e.on("readable",function(){i=!0;for(var t;!r&&null!==(t=e.read());)e.emit("data",t);null===t&&(i=!1,e._readableState.needReadable=!0)}),e.pause=function(){r=!0,this.emit("pause")},e.resume=function(){r=!1,i?T(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function A(e,t){var n,r=t.buffer,o=t.length,s=!!t.decoder,a=!!t.objectMode;if(0===r.length)return null;if(0===o)n=null;else if(a)n=r.shift();else if(!e||e>=o)n=s?r.join(""):i.concat(r,o),r.length=0;else if(el&&e>f;l++){var u=r[0],c=Math.min(e-f,u.length);s?n+=u.slice(0,c):u.copy(n,f,0,c),c0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,T(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function k(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}function x(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}t.exports=c,c.ReadableState=d;var M,C=e("events").EventEmitter,U=e("./index.js"),i=e("buffer").Buffer,T=e("process/browser.js").nextTick,R=e("inherits");R(c,U),c.prototype.push=function(e,t){var n=this._readableState;return"string"!=typeof e||n.objectMode||(t=t||n.defaultEncoding,t!==n.encoding&&(e=new i(e,t),t="")),h(this,n,e,t,!1)},c.prototype.unshift=function(e){var t=this._readableState;return h(this,t,e,"",!0)},c.prototype.setEncoding=function(t){M||(M=e("string_decoder").StringDecoder),this._readableState.decoder=new M(t),this._readableState.encoding=t};var Y=8388608;c.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var n=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return b(this),null;if(e=w(e,t),0===e&&t.ended)return 0===t.length&&j(this),null;var r=t.needReadable;t.length-e<=t.highWaterMark&&(r=!0),(t.ended||t.reading)&&(r=!1),r&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),r&&!t.reading&&(e=w(n,t));var i;return i=e>0?A(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&j(this),i},c.prototype._read=function(e){this.emit("error",new Error("not implemented"))},c.prototype.pipe=function(e,t){function r(e){e===l&&o()}function i(){e.end()}function o(){e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("drain",p),e.removeListener("error",s),e.removeListener("unpipe",r),l.removeListener("end",i),l.removeListener("end",o),(!e._writableState||e._writableState.needDrain)&&p()}function s(t){f(),0===g&&0===C.listenerCount(e,"error")&&e.emit("error",t)}function a(){e.removeListener("finish",u),f()}function u(){e.removeListener("close",a),f()}function f(){l.unpipe(e)}var l=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1;var c=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,h=c?i:o;d.endEmitted?T(h):l.once("end",h),e.on("unpipe",r);var p=I(l);e.on("drain",p);var g=C.listenerCount(e,"error");return e.once("error",s),e.once("close",a),e.once("finish",u),e.emit("pipe",l),d.flowing||(this.on("readable",B),d.flowing=!0,T(function(){L(l)})),e},c.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,this.removeListener("readable",B),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",B),t.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var i=x(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},c.prototype.on=function(e,t){var n=U.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||S(this),"readable"===e&&this.readable){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&b(this,r):this.read(0))}return n},c.prototype.addListener=c.prototype.on,c.prototype.resume=function(){S(this),this.read(0),this.emit("resume")},c.prototype.pause=function(){S(this,!0),this.emit("pause")},c.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){if(t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)){var o=r.push(i);o||(n=!0,e.pause())}});for(var i in e)"function"==typeof e[i]&&"undefined"==typeof this[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return k(o,function(t){e.on(t,function(e){return r.emit.apply(r,t,e)})}),r._read=function(t){n&&(n=!1,e.resume())},r},c._fromList=A}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/stream-browserify/readable.js","/node_modules/gulp-browserify/node_modules/stream-browserify")},{"./index.js":13,buffer:3,events:10,inherits:21,lYpoI2:11,"process/browser.js":14,string_decoder:19}],17:[function(e,t,n){(function(n,r,i,o,s,a,u,f,l){function d(e,t){this.afterTransform=function(e,n){return c(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function c(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,n,r),this.charReceived+=r-n,n=r,this.charReceived=55296&&56319>=i)){if(this.charReceived=this.charLength=0,r==e.length)return t;e=e.slice(r,e.length);break}this.charLength+=this.surrogateSize,t=""}var o=this.detectIncompleteChar(e),s=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-o,s),this.charReceived=o,s-=o),t+=e.toString(this.encoding,0,s);var s=t.length-1,i=t.charCodeAt(s);if(i>=55296&&56319>=i){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),this.charBuffer.write(t.charAt(t.length-1),this.encoding),t.substring(0,s)}return t},g.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(2>=t&&n>>4==14){this.charLength=3;break}if(3>=t&&n>>3==30){this.charLength=4;break}}return t},g.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/string_decoder/index.js","/node_modules/gulp-browserify/node_modules/string_decoder")},{buffer:3,lYpoI2:11}],20:[function(e,t,n){(function(e,t,r,i,o,s,a,u,f){n.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,l=-7,d=n?i-1:0,c=n?-1:1,h=e[t+d];for(d+=c,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=c,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+d],d+=c,l-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:(h?-1:1)*(1/0);s+=Math.pow(2,r),o-=f}return(h?-1:1)*s*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var s,a,u,f=8*o-i-1,l=(1<>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+d>=1?c/u:c*Math.pow(2,1-d),t*u>=2&&(s++,u/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*u-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+h]=255&a,h+=p,a/=256,i-=8);for(s=s<0;e[n+h]=255&s,h+=p,s/=256,f-=8);e[n+h-p]|=128*g}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:11}],21:[function(e,t,n){(function(e,n,r,i,o,s,a,u,f){"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 n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/inherits/inherits_browser.js","/node_modules/inherits")},{buffer:3,lYpoI2:11}]},{},[1])(1)}); \ No newline at end of file +!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.objectHash=e()}}(function(){return function e(t,r,n){function o(u,a){if(!r[u]){if(!t[u]){var f="function"==typeof require&&require;if(!a&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var s=r[u]={exports:{}};t[u][0].call(s.exports,function(e){var r=t[u][1][e];return o(r?r:e)},s,s.exports,e,t,r,n)}return r[u].exports}for(var i="function"==typeof require&&require,u=0;u=0)return this.dispatch("[CIRCULAR:"+f+"]");if(r.push(n),"undefined"!=typeof i&&i.isBuffer&&i.isBuffer(n))return t.write("buffer:"),t.write(n);if("object"===a||"function"===a){var s=Object.keys(n).sort();e.respectType===!1||p(n)||s.splice(0,0,"prototype","__proto__","constructor"),t.write("object:"+s.length+":");var c=this;return s.forEach(function(r){c.dispatch(r),t.write(":"),e.excludeValues||c.dispatch(n[r]),t.write(",")})}if(!this["_"+a]){if(e.ignoreUnknown)return t.write("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](n)},_array:function(n,o){o="undefined"!=typeof o?o:e.unorderedArrays!==!1;var i=this;if(t.write("array:"+n.length+":"),!o||n.length<=1)return n.forEach(function(e){return i.dispatch(e)});var u=[],a=n.map(function(t){var n=new y,o=r.slice(),i=w(e,n,o);return i.dispatch(t),u=u.concat(o.slice(r.length)),n.read().toString()});return r=r.concat(u),a.sort(),this._array(a,!1)},_date:function(e){return t.write("date:"+e.toJSON())},_symbol:function(e){return t.write("symbol:"+e.toString(),"utf8")},_error:function(e){return t.write("error:"+e.toString(),"utf8")},_boolean:function(e){return t.write("bool:"+e.toString())},_string:function(e){t.write("string:"+e.length+":"),t.write(e,"utf8")},_function:function(r){t.write("fn:"),p(r)?this.dispatch("[native]"):this.dispatch(r.toString()),e.respectFunctionProperties&&this._object(r)},_number:function(e){return t.write("number:"+e.toString())},_xml:function(e){return t.write("xml:"+e.toString(),"utf8")},_null:function(){return t.write("Null")},_undefined:function(){return t.write("Undefined")},_regexp:function(e){return t.write("regex:"+e.toString(),"utf8")},_uint8array:function(e){return t.write("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return t.write("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return t.write("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return t.write("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return t.write("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return t.write("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return t.write("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return t.write("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return t.write("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return t.write("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return t.write("url:"+e.toString(),"utf8")},_map:function(r){t.write("map:");var n=Array.from(r);return this._array(n,e.unorderedSets!==!1)},_set:function(r){t.write("set:");var n=Array.from(r);return this._array(n,e.unorderedSets!==!1)},_blob:function(){if(e.ignoreUnknown)return t.write("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return t.write("domwindow")},_process:function(){return t.write("process")},_timer:function(){return t.write("timer")},_pipe:function(){return t.write("pipe")},_tcp:function(){return t.write("tcp")},_udp:function(){return t.write("udp")},_tty:function(){return t.write("tty")},_statwatcher:function(){return t.write("statwatcher")},_securecontext:function(){return t.write("securecontext")},_connection:function(){return t.write("connection")},_zlib:function(){return t.write("zlib")},_context:function(){return t.write("context")},_nodescript:function(){return t.write("nodescript")},_httpparser:function(){return t.write("httpparser")},_dataview:function(){return t.write("dataview")},_signal:function(){return t.write("signal")},_fsevent:function(){return t.write("fsevent")},_tlswrap:function(){return t.write("tlswrap")}}}function y(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}var m=e("crypto");r=t.exports=d,r.sha1=function(e){return d(e)},r.keys=function(e){return d(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(e){return d(e,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(e){return d(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})},r.writeToStream=function(e,t,r){return"undefined"==typeof r&&(r=t,t={}),t=h(e,t),w(t,r).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_74e933e3.js","/")},{buffer:2,crypto:5,lYpoI2:10}],2:[function(e,t,r){(function(t,n,o,i,u,a,f,s,c){function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var n=typeof e;if("base64"===t&&"string"===n)for(e=N(e);e.length%4!==0;)e+="=";var i;if("number"===n)i=F(e);else if("string"===n)i=o.byteLength(e,t);else{if("object"!==n)throw new Error("First argument needs to be a number, array or string.");i=F(e.length)}var u;o._useTypedArrays?u=o._augment(new Uint8Array(i)):(u=this,u.length=i,u._isBuffer=!0);var a;if(o._useTypedArrays&&"number"==typeof e.byteLength)u._set(e);else if(O(e))for(a=0;i>a;a++)o.isBuffer(e)?u[a]=e.readUInt8(a):u[a]=e[a];else if("string"===n)u.write(e,0,t);else if("number"===n&&!o._useTypedArrays&&!r)for(a=0;i>a;a++)u[a]=0;return u}function l(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var u=t.length;G(u%2===0,"Invalid hex string"),n>u/2&&(n=u/2);for(var a=0;n>a;a++){var f=parseInt(t.substr(2*a,2),16);G(!isNaN(f),"Invalid hex string"),e[r+a]=f}return o._charsWritten=2*a,a}function d(e,t,r,n){var i=o._charsWritten=W(V(t),e,r,n);return i}function h(e,t,r,n){var i=o._charsWritten=W(q(t),e,r,n);return i}function p(e,t,r,n){return h(e,t,r,n)}function g(e,t,r,n){var i=o._charsWritten=W(R(t),e,r,n);return i}function w(e,t,r,n){var i=o._charsWritten=W(P(t),e,r,n);return i}function y(e,t,r){return 0===t&&r===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,r))}function m(e,t,r){var n="",o="";r=Math.min(e.length,r);for(var i=t;r>i;i++)e[i]<=127?(n+=J(o)+String.fromCharCode(e[i]),o=""):o+="%"+e[i].toString(16);return n+J(o)}function b(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;r>o;o++)n+=String.fromCharCode(e[o]);return n}function v(e,t,r){return b(e,t,r)}function _(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var o="",i=t;r>i;i++)o+=H(e[i]);return o}function E(e,t,r){for(var n=e.slice(t,r),o="",i=0;i=o)){var i;return r?(i=e[t],o>t+1&&(i|=e[t+1]<<8)):(i=e[t]<<8,o>t+1&&(i|=e[t+1])),i}}function A(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3=o)){var i;return r?(o>t+2&&(i=e[t+2]<<16),o>t+1&&(i|=e[t+1]<<8),i|=e[t],o>t+3&&(i+=e[t+3]<<24>>>0)):(o>t+1&&(i=e[t+1]<<16),o>t+2&&(i|=e[t+2]<<8),o>t+3&&(i|=e[t+3]),i+=e[t]<<24>>>0),i}}function B(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+1=o)){var i=I(e,t,r,!0),u=32768&i;return u?-1*(65535-i+1):i}}function L(e,t,r,n){n||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3=o)){var i=A(e,t,r,!0),u=2147483648&i;return u?-1*(4294967295-i+1):i}}function U(e,t,r,n){return n||(G("boolean"==typeof r,"missing or invalid endian"),G(t+3=i))for(var u=0,a=Math.min(i-r,2);a>u;u++)e[r+u]=(t&255<<8*(n?u:1-u))>>>8*(n?u:1-u)}function C(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=i))for(var u=0,a=Math.min(i-r,4);a>u;u++)e[r+u]=t>>>8*(n?u:3-u)&255}function j(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+1=i||(t>=0?S(e,t,r,n,o):S(e,65535+t+1,r,n,o))}function k(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=i||(t>=0?C(e,t,r,n,o):C(e,4294967295+t+1,r,n,o))}function T(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=i||Q.write(e,t,r,n,23,4)}function M(e,t,r,n,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof n,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+7=i||Q.write(e,t,r,n,52,8)}function N(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e,t,r){return"number"!=typeof e?r:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function F(e){return e=~~Math.ceil(+e),0>e?0:e}function D(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function O(e){return D(e)||o.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function H(e){return 16>e?"0"+e.toString(16):e.toString(16)}function V(e){for(var t=[],r=0;r=n)t.push(e.charCodeAt(r));else{var o=r;n>=55296&&57343>=n&&r++;for(var i=encodeURIComponent(e.slice(o,r+1)).substr(1).split("%"),u=0;u>8,n=t%256,o.push(n),o.push(r);return o}function R(e){return K.toByteArray(e)}function W(e,t,r,n){for(var o=0;n>o&&!(o+r>=t.length||o>=e.length);o++)t[o+r]=e[o];return o}function J(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function z(e,t){G("number"==typeof e,"cannot write a non-number as a number"),G(e>=0,"specified a negative value for writing an unsigned value"),G(t>=e,"value is larger than maximum value for type"),G(Math.floor(e)===e,"value has a fractional component")}function X(e,t,r){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=r,"value smaller than minimum allowed value"),G(Math.floor(e)===e,"value has a fractional component")}function $(e,t,r){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=r,"value smaller than minimum allowed value")}function G(e,t){if(!e)throw new Error(t||"Failed assertion")}var K=e("base64-js"),Q=e("ieee754");r.Buffer=o,r.SlowBuffer=o,r.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(r){return!1}}(),o.isEncoding=function(e){switch(String(e).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.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},o.byteLength=function(e,t){var r;switch(e+="",t||"utf8"){case"hex":r=e.length/2;break;case"utf8":case"utf-8":r=V(e).length;break;case"ascii":case"binary":case"raw":r=e.length;break;case"base64":r=R(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*e.length;break;default:throw new Error("Unknown encoding")}return r},o.concat=function(e,t){if(G(D(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new o(0);if(1===e.length)return e[0];var r;if("number"!=typeof t)for(t=0,r=0;ri&&(r=i)):r=i,n=String(n||"utf8").toLowerCase();var u;switch(n){case"hex":u=l(this,e,t,r);break;case"utf8":case"utf-8":u=d(this,e,t,r);break;case"ascii":u=h(this,e,t,r);break;case"binary":u=p(this,e,t,r);break;case"base64":u=g(this,e,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":u=w(this,e,t,r);break;default:throw new Error("Unknown encoding")}return u},o.prototype.toString=function(e,t,r){var n=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,r=void 0!==r?Number(r):r=n.length,r===t)return"";var o;switch(e){case"hex":o=_(n,t,r);break;case"utf8":case"utf-8":o=m(n,t,r);break;case"ascii":o=b(n,t,r);break;case"binary":o=v(n,t,r);break;case"base64":o=y(n,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=E(n,t,r);break;default:throw new Error("Unknown encoding")}return o},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(e,t,r,n){var i=this;if(r||(r=0),n||0===n||(n=this.length),t||(t=0),n!==r&&0!==e.length&&0!==i.length){G(n>=r,"sourceEnd < sourceStart"),G(t>=0&&t=0&&r=0&&n<=i.length,"sourceEnd out of bounds"),n>this.length&&(n=this.length),e.length-tu||!o._useTypedArrays)for(var a=0;u>a;a++)e[a+t]=this[a+r];else e._set(this.subarray(r,r+u),t)}},o.prototype.slice=function(e,t){var r=this.length;if(e=Y(e,r,0),t=Y(t,r,r),o._useTypedArrays)return o._augment(this.subarray(e,t));for(var n=t-e,i=new o(n,void 0,!0),u=0;n>u;u++)i[u]=this[u+e];return i},o.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},o.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},o.prototype.readUInt8=function(e,t){return t||(G(void 0!==e&&null!==e,"missing offset"),G(e=this.length?void 0:this[e]},o.prototype.readUInt16LE=function(e,t){return I(this,e,!0,t)},o.prototype.readUInt16BE=function(e,t){return I(this,e,!1,t)},o.prototype.readUInt32LE=function(e,t){return A(this,e,!0,t)},o.prototype.readUInt32BE=function(e,t){return A(this,e,!1,t)},o.prototype.readInt8=function(e,t){if(t||(G(void 0!==e&&null!==e,"missing offset"),G(e=this.length)){var r=128&this[e];return r?-1*(255-this[e]+1):this[e]}},o.prototype.readInt16LE=function(e,t){return B(this,e,!0,t)},o.prototype.readInt16BE=function(e,t){return B(this,e,!1,t)},o.prototype.readInt32LE=function(e,t){return L(this,e,!0,t)},o.prototype.readInt32BE=function(e,t){return L(this,e,!1,t)},o.prototype.readFloatLE=function(e,t){return U(this,e,!0,t)},o.prototype.readFloatBE=function(e,t){return U(this,e,!1,t)},o.prototype.readDoubleLE=function(e,t){return x(this,e,!0,t)},o.prototype.readDoubleBE=function(e,t){return x(this,e,!1,t)},o.prototype.writeUInt8=function(e,t,r){r||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t=this.length||(this[t]=e)},o.prototype.writeUInt16LE=function(e,t,r){S(this,e,t,!0,r)},o.prototype.writeUInt16BE=function(e,t,r){S(this,e,t,!1,r)},o.prototype.writeUInt32LE=function(e,t,r){C(this,e,t,!0,r)},o.prototype.writeUInt32BE=function(e,t,r){C(this,e,t,!1,r)},o.prototype.writeInt8=function(e,t,r){r||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t=this.length||(e>=0?this.writeUInt8(e,t,r):this.writeUInt8(255+e+1,t,r))},o.prototype.writeInt16LE=function(e,t,r){j(this,e,t,!0,r)},o.prototype.writeInt16BE=function(e,t,r){j(this,e,t,!1,r)},o.prototype.writeInt32LE=function(e,t,r){k(this,e,t,!0,r)},o.prototype.writeInt32BE=function(e,t,r){k(this,e,t,!1,r)},o.prototype.writeFloatLE=function(e,t,r){T(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){T(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){M(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){M(this,e,t,!1,r)},o.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),G("number"==typeof e&&!isNaN(e),"value is not a number"),G(r>=t,"end < start"),r!==t&&0!==this.length){G(t>=0&&t=0&&r<=this.length,"end out of bounds");for(var n=t;r>n;n++)this[n]=e}},o.prototype.inspect=function(){for(var e=[],t=this.length,n=0;t>n;n++)if(e[n]=H(this[n]),n===r.INSPECT_MAX_BYTES){e[n+1]="...";break}return""},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o._useTypedArrays)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var Z=o.prototype;o._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=Z.get,e.set=Z.set,e.write=Z.write,e.toString=Z.toString,e.toLocaleString=Z.toString,e.toJSON=Z.toJSON,e.copy=Z.copy,e.slice=Z.slice,e.readUInt8=Z.readUInt8,e.readUInt16LE=Z.readUInt16LE,e.readUInt16BE=Z.readUInt16BE,e.readUInt32LE=Z.readUInt32LE,e.readUInt32BE=Z.readUInt32BE,e.readInt8=Z.readInt8,e.readInt16LE=Z.readInt16LE,e.readInt16BE=Z.readInt16BE,e.readInt32LE=Z.readInt32LE,e.readInt32BE=Z.readInt32BE,e.readFloatLE=Z.readFloatLE,e.readFloatBE=Z.readFloatBE,e.readDoubleLE=Z.readDoubleLE,e.readDoubleBE=Z.readDoubleBE,e.writeUInt8=Z.writeUInt8,e.writeUInt16LE=Z.writeUInt16LE,e.writeUInt16BE=Z.writeUInt16BE,e.writeUInt32LE=Z.writeUInt32LE,e.writeUInt32BE=Z.writeUInt32BE,e.writeInt8=Z.writeInt8,e.writeInt16LE=Z.writeInt16LE,e.writeInt16BE=Z.writeInt16BE,e.writeInt32LE=Z.writeInt32LE,e.writeInt32BE=Z.writeInt32BE,e.writeFloatLE=Z.writeFloatLE,e.writeFloatBE=Z.writeFloatBE,e.writeDoubleLE=Z.writeDoubleLE,e.writeDoubleBE=Z.writeDoubleBE,e.fill=Z.fill,e.inspect=Z.inspect,e.toArrayBuffer=Z.toArrayBuffer,e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":3,buffer:2,ieee754:11,lYpoI2:10}],3:[function(e,t,r){(function(e,t,n,o,i,u,a,f,s){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===i||t===l?62:t===u||t===d?63:a>t?-1:a+10>t?t-a+26+26:s+26>t?t-s:f+26>t?t-f+26:void 0}function r(e){function r(e){s[l++]=e}var n,i,u,a,f,s;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;f="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,s=new o(3*e.length/4-f),u=f>0?e.length-4:e.length;var l=0;for(n=0,i=0;u>n;n+=4,i+=3)a=t(e.charAt(n))<<18|t(e.charAt(n+1))<<12|t(e.charAt(n+2))<<6|t(e.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===f?(a=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&a)):1===f&&(a=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(a>>8&255),r(255&a)),s}function n(e){function t(e){return c.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var n,o,i,u=e.length%3,a="";for(n=0,i=e.length-u;i>n;n+=3)o=(e[n]<<16)+(e[n+1]<<8)+e[n+2],a+=r(o);switch(u){case 1:o=e[e.length-1],a+=t(o>>2),a+=t(o<<4&63),a+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],a+=t(o>>10),a+=t(o>>4&63),a+=t(o<<2&63),a+="="}return a}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),u="/".charCodeAt(0),a="0".charCodeAt(0),f="a".charCodeAt(0),s="A".charCodeAt(0),l="-".charCodeAt(0),d="_".charCodeAt(0);e.toByteArray=r,e.fromByteArray=n}("undefined"==typeof r?this.base64js={}:r)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/buffer/node_modules/base64-js/lib")},{buffer:2,lYpoI2:10}],4:[function(e,t,r){(function(r,n,o,i,u,a,f,s,c){function l(e,t){if(e.length%p!==0){var r=e.length+(p-e.length%p);e=o.concat([e,g],r)}for(var n=[],i=t?e.readInt32BE:e.readInt32LE,u=0;uv?t=e(t):t.lengthu;u++)n[u]=54^t[u],i[u]=92^t[u];var a=e(o.concat([n,r]));return e(o.concat([i,a]))}function d(e,t){e=e||"sha1";var r=b[e],n=[],i=0;return r||h("algorithm:",e,"is not yet supported"),{update:function(e){return o.isBuffer(e)||(e=new o(e)),n.push(e),i+=e.length,this},digest:function(e){var i=o.concat(n),u=t?l(r,t,i):r(i);return n=null,e?u.toString(e):u}}}function h(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function p(e,t){for(var r in e)t(e[r],r)}var o=e("buffer").Buffer,g=e("./sha"),w=e("./sha256"),y=e("./rng"),m=e("./md5"),b={sha1:g,sha256:w,md5:m},v=64,_=new o(v);_.fill(0),r.createHash=function(e){return d(e)},r.createHmac=function(e,t){return d(e,t)},r.randomBytes=function(e,t){if(!t||!t.call)return new o(y(e));try{t.call(this,void 0,new o(y(e)))}catch(r){t(r)}},p(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){r[e]=function(){h("sorry,",e,"is not implemented yet")}})}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:2,lYpoI2:10}],6:[function(e,t,r){(function(r,n,o,i,u,a,f,s,c){function l(e,t){e[t>>5]|=128<>>9<<4)+14]=t;for(var r=1732584193,n=-271733879,o=-1732584194,i=271733878,u=0;u>16)+(t>>16)+(r>>16);return n<<16|65535&r}function m(e,t){return e<>>32-t}var b=e("./helpers");t.exports=function(e){return b.hash(e,l,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:2,lYpoI2:10}],7:[function(e,t,r){(function(e,r,n,o,i,u,a,f,s){!function(){var e,r,n=this;e=function(e){for(var t,t,r=new Array(e),n=0;e>n;n++)0==(3&n)&&(t=4294967296*Math.random()),r[n]=t>>>((3&n)<<3)&255;return r},n.crypto&&crypto.getRandomValues&&(r=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=r||e}()}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:2,lYpoI2:10}],8:[function(e,t,r){(function(r,n,o,i,u,a,f,s,c){function l(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var r=Array(80),n=1732584193,o=-271733879,i=-1732584194,u=271733878,a=-1009589776,f=0;fm;m++){16>m?r[m]=e[f+m]:r[m]=g(r[m-3]^r[m-8]^r[m-14]^r[m-16],1);var b=p(p(g(n,5),d(m,o,i,u)),p(p(a,r[m]),h(m)));a=u,u=i,i=g(o,30),o=n,n=b}n=p(n,s),o=p(o,c),i=p(i,l),u=p(u,w),a=p(a,y)}return Array(n,o,i,u,a)}function d(e,t,r,n){return 20>e?t&r|~t&n:40>e?t^r^n:60>e?t&r|t&n|r&n:t^r^n}function h(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function p(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function g(e,t){return e<>>32-t}var w=e("./helpers");t.exports=function(e){return w.hash(e,l,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:2,lYpoI2:10}],9:[function(e,t,r){(function(r,n,o,i,u,a,f,s,c){var l=e("./helpers"),d=function(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r},h=function(e,t){return e>>>t|e<<32-t},p=function(e,t){return e>>>t},g=function(e,t,r){return e&t^~e&r},w=function(e,t,r){return e&t^e&r^t&r; +},y=function(e){return h(e,2)^h(e,13)^h(e,22)},m=function(e){return h(e,6)^h(e,11)^h(e,25)},b=function(e){return h(e,7)^h(e,18)^p(e,3)},v=function(e){return h(e,17)^h(e,19)^p(e,10)},_=function(e,t){var r,n,o,i,u,a,f,s,c,l,h,p,_=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),I=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var c=0;cl;l++)16>l?I[l]=e[l+c]:I[l]=d(d(d(v(I[l-2]),I[l-7]),b(I[l-15])),I[l-16]),h=d(d(d(d(s,m(u)),g(u,a,f)),_[l]),I[l]),p=d(y(r),w(r,n,o)),s=f,f=a,a=u,u=d(i,h),i=o,o=n,n=r,r=d(h,p);E[0]=d(r,E[0]),E[1]=d(n,E[1]),E[2]=d(o,E[2]),E[3]=d(i,E[3]),E[4]=d(u,E[4]),E[5]=d(a,E[5]),E[6]=d(f,E[6]),E[7]=d(s,E[7])}return E};t.exports=function(e){return l.hash(e,_,32,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:2,lYpoI2:10}],10:[function(e,t,r){(function(e,r,n,o,i,u,a,f,s){function c(){}var e=t.exports={};e.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=c,e.addListener=c,e.once=c,e.off=c,e.removeListener=c,e.removeAllListeners=c,e.emit=c,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:2,lYpoI2:10}],11:[function(e,t,r){(function(e,t,n,o,i,u,a,f,s){r.read=function(e,t,r,n,o){var i,u,a=8*o-n-1,f=(1<>1,c=-7,l=r?o-1:0,d=r?-1:1,h=e[t+l];for(l+=d,i=h&(1<<-c)-1,h>>=-c,c+=a;c>0;i=256*i+e[t+l],l+=d,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+e[t+l],l+=d,c-=8);if(0===i)i=1-s;else{if(i===f)return u?NaN:(h?-1:1)*(1/0);u+=Math.pow(2,n),i-=s}return(h?-1:1)*u*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var u,a,f,s=8*i-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,p=n?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-u))<1&&(u--,f*=2),t+=u+l>=1?d/f:d*Math.pow(2,1-l),t*f>=2&&(u++,f/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(t*f-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;e[r+h]=255&a,h+=p,a/=256,o-=8);for(u=u<0;e[r+h]=255&u,h+=p,u/=256,s-=8);e[r+h-p]|=128*g}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:2,lYpoI2:10}]},{},[1])(1)}); \ No newline at end of file diff --git a/dist/object_hash_test.js b/dist/object_hash_test.js index d7df421..3c4bcac 100644 --- a/dist/object_hash_test.js +++ b/dist/object_hash_test.js @@ -3,7 +3,6 @@ 'use strict'; var crypto = require('crypto'); -var stream = require('stream'); /** * Exported function @@ -115,7 +114,7 @@ function hash(object, options) { if (options.algorithm !== 'passthrough') { hashingStream = crypto.createHash(options.algorithm); } else { - hashingStream = new stream.PassThrough(); + hashingStream = new PassThrough(); } if (typeof hashingStream.write === 'undefined') { @@ -239,7 +238,7 @@ function typeHasher(options, writeTo, context){ var self = this; writeTo.write('array:' + arr.length + ':'); - if (!unordered) { + if (!unordered || arr.length <= 1) { return arr.forEach(function(entry) { return self.dispatch(entry); }); @@ -256,7 +255,7 @@ function typeHasher(options, writeTo, context){ // and add all of them to the global context array when we’re done var contextAdditions = []; var entries = arr.map(function(entry) { - var strm = new stream.PassThrough(); + var strm = new PassThrough(); var localContext = context.slice(); // make copy var hasher = typeHasher(options, strm, localContext); hasher.dispatch(entry); @@ -395,134 +394,28 @@ function typeHasher(options, writeTo, context){ }; } -}).call(this,require("buffer").Buffer) -},{"buffer":4,"crypto":6,"stream":14}],2:[function(require,module,exports){ -var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - -;(function (exports) { - 'use strict'; - - var Arr = (typeof Uint8Array !== 'undefined') - ? Uint8Array - : Array - - var PLUS = '+'.charCodeAt(0) - var SLASH = '/'.charCodeAt(0) - var NUMBER = '0'.charCodeAt(0) - var LOWER = 'a'.charCodeAt(0) - var UPPER = 'A'.charCodeAt(0) - var PLUS_URL_SAFE = '-'.charCodeAt(0) - var SLASH_URL_SAFE = '_'.charCodeAt(0) - - function decode (elt) { - var code = elt.charCodeAt(0) - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62 // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63 // '/' - if (code < NUMBER) - return -1 //no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26 - if (code < UPPER + 26) - return code - UPPER - if (code < LOWER + 26) - return code - LOWER + 26 - } - - function b64ToByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - - if (b64.length % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - var len = b64.length - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length - - var L = 0 - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) - push((tmp & 0xFF0000) >> 16) - push((tmp & 0xFF00) >> 8) - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) - push((tmp >> 8) & 0xFF) - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1] - output += encode(temp >> 2) - output += encode((temp << 4) & 0x3F) - output += '==' - break - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) - output += encode(temp >> 10) - output += encode((temp >> 4) & 0x3F) - output += encode((temp << 2) & 0x3F) - output += '=' - break - } - - return output - } - - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) +// Mini-implementation of stream.PassThrough +// We are far from having need for the full implementation, and we can +// make assumtions like "many writes, then only one final read" +// and we can ignore encoding specifics +function PassThrough() { + return { + buf: '', + + write: function(b) { + this.buf += b; + }, + end: function(b) { + this.buf += b; + }, + read: function() { + return this.buf; + } + }; +} -},{}],3:[function(require,module,exports){ +}).call(this,require("buffer").Buffer) +},{"buffer":3,"crypto":6}],2:[function(require,module,exports){ // http://wiki.commonjs.org/wiki/Unit_Testing/1.0 // // THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! @@ -884,7 +777,7 @@ var objectKeys = Object.keys || function (obj) { return keys; }; -},{"util/":24}],4:[function(require,module,exports){ +},{"util/":24}],3:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -1995,7 +1888,133 @@ function assert (test, message) { if (!test) throw new Error(message || 'Failed assertion') } -},{"base64-js":2,"ieee754":21}],5:[function(require,module,exports){ +},{"base64-js":4,"ieee754":21}],4:[function(require,module,exports){ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],5:[function(require,module,exports){ var Buffer = require('buffer').Buffer; var intSize = 4; var zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0); @@ -2032,7 +2051,7 @@ function hash(buf, fn, hashSize, bigEndian) { module.exports = { hash: hash }; -},{"buffer":4}],6:[function(require,module,exports){ +},{"buffer":3}],6:[function(require,module,exports){ var Buffer = require('buffer').Buffer var sha = require('./sha') var sha256 = require('./sha256') @@ -2131,7 +2150,7 @@ each(['createCredentials' } }) -},{"./md5":7,"./rng":8,"./sha":9,"./sha256":10,"buffer":4}],7:[function(require,module,exports){ +},{"./md5":7,"./rng":8,"./sha":9,"./sha256":10,"buffer":3}],7:[function(require,module,exports){ /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. @@ -4119,7 +4138,7 @@ function indexOf (xs, x) { } }).call(this,require("7YKIPe")) -},{"./index.js":14,"7YKIPe":12,"buffer":4,"events":11,"inherits":22,"process/browser.js":15,"string_decoder":20}],18:[function(require,module,exports){ +},{"./index.js":14,"7YKIPe":12,"buffer":3,"events":11,"inherits":22,"process/browser.js":15,"string_decoder":20}],18:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -4713,7 +4732,7 @@ function endWritable(stream, state, cb) { state.ended = true; } -},{"./index.js":14,"buffer":4,"inherits":22,"process/browser.js":15}],20:[function(require,module,exports){ +},{"./index.js":14,"buffer":3,"inherits":22,"process/browser.js":15}],20:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -4906,7 +4925,7 @@ function base64DetectIncompleteChar(buffer) { return incomplete; } -},{"buffer":4}],21:[function(require,module,exports){ +},{"buffer":3}],21:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -5643,4 +5662,4 @@ describe('writeToStream', function() { }); }); -},{"../index":1,"assert":3,"stream":14}]},{},[25]) \ No newline at end of file +},{"../index":1,"assert":2,"stream":14}]},{},[25]) \ No newline at end of file