made with requirebin
Created
April 19, 2014 22:21
-
-
Save kirbysayshi/11099429 to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// simple serial task queue. Calling .next multiple times just prompts a check | |
// if something is still inflight. Does not periodically check for added | |
// tasks in a period of inactivity | |
function SerialTaskQueue() { | |
var t = { | |
tasks: [] | |
, current: null | |
, next: function(){ | |
return t.current | |
|| (t.current = t.tasks.shift()) && t.current(function(){ | |
t.current = null; | |
t.next(); | |
}); | |
} | |
} | |
return t; | |
} | |
var test = require('tape'); | |
require('tap-browser-color')(); | |
test('.next', function(t) { | |
var q = SerialTaskQueue(); | |
var idx = 0; | |
q.tasks.push(function(done) { | |
t.equal(idx, 0, '1st task finished'); | |
idx += 1; | |
done(); | |
}); | |
q.tasks.push(function(done) { | |
t.equal(idx, 1, '2nd task finished'); | |
done(); | |
}); | |
q.tasks.push(t.end.bind(t, null)); | |
q.next(); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SerialTaskQueue(){var e={tasks:[],current:null,next:function(){return e.current||(e.current=e.tasks.shift())&&e.current(function(){e.current=null,e.next()})}};return e}require=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 Error("Cannot find module '"+s+"'")}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;r.length>s;s++)i(r[s]);return i}({1:[function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,a,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length))throw t=arguments[1],t instanceof Error?t:TypeError('Uncaught, unspecified "error" event.');if(n=this._events[e],s(n))return!1;if(r(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(i=arguments.length,a=Array(i-1),u=1;i>u;u++)a[u-1]=arguments[u];n.apply(this,a)}else if(o(n)){for(i=arguments.length,a=Array(i-1),u=1;i>u;u++)a[u-1]=arguments[u];for(l=n.slice(),i=l.length,u=0;i>u;u++)l[u].apply(this,a)}return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned){var i;i=s(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(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),console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,s,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],s=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(a=s;a-->0;)if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}if(0>i)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.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],r(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?r(e._events[t])?1:e._events[t].length:0}},{}],2:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],3:[function(e,t){var n=t.exports={};n.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)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.binding=function(){throw Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw Error("process.chdir is not supported")}},{}],4:[function(e,t,n){function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);var i=typeof e;if("base64"===t&&"string"===i)for(e=j(e);0!==e.length%4;)e+="=";var o;if("number"===i)o=I(e);else if("string"===i)o=r.byteLength(e,t);else{if("object"!==i)throw Error("First argument needs to be a number, array or string.");o=I(e.length)}var s;r._useTypedArrays?s=S(new Uint8Array(o)):(s=this,s.length=o,s._isBuffer=!0);var a;if(r._useTypedArrays&&"function"==typeof Uint8Array&&e instanceof Uint8Array)s._set(e);else if(C(e))for(a=0;o>a;a++)s[a]=r.isBuffer(e)?e.readUInt8(a):e[a];else if("string"===i)s.write(e,0,t);else if("number"===i&&!r._useTypedArrays&&!n)for(a=0;o>a;a++)s[a]=0;return s}function i(e,t,n,i){n=Number(n)||0;var o=e.length-n;i?(i=Number(i),i>o&&(i=o)):i=o;var s=t.length;F(0===s%2,"Invalid hex string"),i>s/2&&(i=s/2);for(var a=0;i>a;a++){var u=parseInt(t.substr(2*a,2),16);F(!isNaN(u),"Invalid hex string"),e[n+a]=u}return r._charsWritten=2*a,a}function o(e,t,n,i){var o=r._charsWritten=N(q(t),e,n,i);return o}function s(e,t,n,i){var o=r._charsWritten=N(T(t),e,n,i);return o}function a(e,t,n,r){return s(e,t,n,r)}function u(e,t,n,i){var o=r._charsWritten=N(U(t),e,n,i);return o}function l(e,t,n){return 0===t&&n===e.length?P.fromByteArray(e):P.fromByteArray(e.slice(t,n))}function f(e,t,n){var r="",i="";n=Math.min(e.length,n);for(var o=t;n>o;o++)127>=e[o]?(r+=D(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return r+D(i)}function c(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 h(e,t,n){return c(e,t,n)}function d(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+=M(e[o]);return i}function p(e,t,n,r){r||(F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(e.length>t+1,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=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 g(e,t,n,r){r||(F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(e.length>t+3,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=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 v(e,t,n,r){r||(F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(e.length>t+1,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=p(e,t,n,!0),s=32768&o;return s?-1*(65535-o+1):o}}function m(e,t,n,r){r||(F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(e.length>t+3,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=g(e,t,n,!0),s=2147483648&o;return s?-1*(4294967295-o+1):o}}function y(e,t,n,r){return r||(F("boolean"==typeof n,"missing or invalid endian"),F(e.length>t+3,"Trying to read beyond buffer length")),H.read(e,t,n,23,4)}function b(e,t,n,r){return r||(F("boolean"==typeof n,"missing or invalid endian"),F(e.length>t+7,"Trying to read beyond buffer length")),H.read(e,t,n,52,8)}function w(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(e.length>n+1,"trying to write beyond buffer length"),R(t,65535));var o=e.length;if(!(n>=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 _(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(e.length>n+3,"trying to write beyond buffer length"),R(t,4294967295));var o=e.length;if(!(n>=o))for(var s=0,a=Math.min(o-n,4);a>s;s++)e[n+s]=255&t>>>8*(r?s:3-s)}function E(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(e.length>n+1,"Trying to write beyond buffer length"),O(t,32767,-32768));var o=e.length;n>=o||(t>=0?w(e,t,n,r,i):w(e,65535+t+1,n,r,i))}function x(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(e.length>n+3,"Trying to write beyond buffer length"),O(t,2147483647,-2147483648));var o=e.length;n>=o||(t>=0?_(e,t,n,r,i):_(e,4294967295+t+1,n,r,i))}function L(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(e.length>n+3,"Trying to write beyond buffer length"),W(t,3.4028234663852886e38,-3.4028234663852886e38));var o=e.length;n>=o||H.write(e,t,n,r,23,4)}function k(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(e.length>n+7,"Trying to write beyond buffer length"),W(t,1.7976931348623157e308,-1.7976931348623157e308));var o=e.length;n>=o||H.write(e,t,n,r,52,8)}function j(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function S(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}function A(e,t,n){return"number"!=typeof e?n:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function I(e){return e=~~Math.ceil(+e),0>e?0:e}function B(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function C(e){return B(e)||r.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function M(e){return 16>e?"0"+e.toString(16):e.toString(16)}function q(e){for(var t=[],n=0;e.length>n;n++){var r=e.charCodeAt(n);if(127>=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;o.length>s;s++)t.push(parseInt(o[s],16))}}return t}function T(e){for(var t=[],n=0;e.length>n;n++)t.push(255&e.charCodeAt(n));return t}function U(e){return P.toByteArray(e)}function N(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 D(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function R(e,t){F("number"==typeof e,"cannot write a non-number as a number"),F(e>=0,"specified a negative value for writing an unsigned value"),F(t>=e,"value is larger than maximum value for type"),F(Math.floor(e)===e,"value has a fractional component")}function O(e,t,n){F("number"==typeof e,"cannot write a non-number as a number"),F(t>=e,"value larger than maximum allowed value"),F(e>=n,"value smaller than minimum allowed value"),F(Math.floor(e)===e,"value has a fractional component")}function W(e,t,n){F("number"==typeof e,"cannot write a non-number as a number"),F(t>=e,"value larger than maximum allowed value"),F(e>=n,"value smaller than minimum allowed value")}function F(e,t){if(!e)throw Error(t||"Failed assertion")}var P=e("base64-js"),H=e("ieee754");n.Buffer=r,n.SlowBuffer=r,n.INSPECT_MAX_BYTES=50,r.poolSize=8192,r._useTypedArrays=function(){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer)return!1;try{var e=new Uint8Array(0);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray}catch(t){return!1}}(),r.isEncoding=function(e){switch((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}},r.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},r.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=q(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=U(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;default:throw Error("Unknown encoding")}return n},r.concat=function(e,t){if(F(B(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new r(0);if(1===e.length)return e[0];var n;if("number"!=typeof t)for(t=0,n=0;e.length>n;n++)t+=e[n].length;var i=new r(t),o=0;for(n=0;e.length>n;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},r.prototype.write=function(e,t,n,r){if(isFinite(t))isFinite(n)||(r=n,n=void 0);else{var l=r;r=t,t=n,n=l}t=Number(t)||0;var f=this.length-t;switch(n?(n=Number(n),n>f&&(n=f)):n=f,r=((r||"utf8")+"").toLowerCase()){case"hex":return i(this,e,t,n);case"utf8":case"utf-8":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,e,t,n);case"ascii":return s(this,e,t,n);case"binary":return a(this,e,t,n);case"base64":return u(this,e,t,n);default:throw Error("Unknown encoding")}},r.prototype.toString=function(e,t,n){var r=this;if(e=((e||"utf8")+"").toLowerCase(),t=Number(t)||0,n=void 0!==n?Number(n):n=r.length,n===t)return"";switch(e){case"hex":return d(r,t,n);case"utf8":case"utf-8":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(r,t,n);case"ascii":return c(r,t,n);case"binary":return h(r,t,n);case"base64":return l(r,t,n);default:throw Error("Unknown encoding")}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.copy=function(e,t,n,r){var i=this;if(n||(n=0),r||0===r||(r=this.length),t||(t=0),r!==n&&0!==e.length&&0!==i.length){F(r>=n,"sourceEnd < sourceStart"),F(t>=0&&e.length>t,"targetStart out of bounds"),F(n>=0&&i.length>n,"sourceStart out of bounds"),F(r>=0&&i.length>=r,"sourceEnd out of bounds"),r>this.length&&(r=this.length),r-n>e.length-t&&(r=e.length-t+n);for(var o=0;r-n>o;o++)e[o+t]=this[o+n]}},r.prototype.slice=function(e,t){var n=this.length;if(e=A(e,n,0),t=A(t,n,n),r._useTypedArrays)return S(this.subarray(e,t));for(var i=t-e,o=new r(i,void 0,!0),s=0;i>s;s++)o[s]=this[s+e];return o},r.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},r.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},r.prototype.readUInt8=function(e,t){return t||(F(void 0!==e&&null!==e,"missing offset"),F(this.length>e,"Trying to read beyond buffer length")),e>=this.length?void 0:this[e]},r.prototype.readUInt16LE=function(e,t){return p(this,e,!0,t)},r.prototype.readUInt16BE=function(e,t){return p(this,e,!1,t)},r.prototype.readUInt32LE=function(e,t){return g(this,e,!0,t)},r.prototype.readUInt32BE=function(e,t){return g(this,e,!1,t)},r.prototype.readInt8=function(e,t){if(t||(F(void 0!==e&&null!==e,"missing offset"),F(this.length>e,"Trying to read beyond buffer length")),!(e>=this.length)){var n=128&this[e];return n?-1*(255-this[e]+1):this[e]}},r.prototype.readInt16LE=function(e,t){return v(this,e,!0,t)},r.prototype.readInt16BE=function(e,t){return v(this,e,!1,t)},r.prototype.readInt32LE=function(e,t){return m(this,e,!0,t)},r.prototype.readInt32BE=function(e,t){return m(this,e,!1,t)},r.prototype.readFloatLE=function(e,t){return y(this,e,!0,t)},r.prototype.readFloatBE=function(e,t){return y(this,e,!1,t)},r.prototype.readDoubleLE=function(e,t){return b(this,e,!0,t)},r.prototype.readDoubleBE=function(e,t){return b(this,e,!1,t)},r.prototype.writeUInt8=function(e,t,n){n||(F(void 0!==e&&null!==e,"missing value"),F(void 0!==t&&null!==t,"missing offset"),F(this.length>t,"trying to write beyond buffer length"),R(e,255)),t>=this.length||(this[t]=e)},r.prototype.writeUInt16LE=function(e,t,n){w(this,e,t,!0,n)},r.prototype.writeUInt16BE=function(e,t,n){w(this,e,t,!1,n)},r.prototype.writeUInt32LE=function(e,t,n){_(this,e,t,!0,n)},r.prototype.writeUInt32BE=function(e,t,n){_(this,e,t,!1,n)},r.prototype.writeInt8=function(e,t,n){n||(F(void 0!==e&&null!==e,"missing value"),F(void 0!==t&&null!==t,"missing offset"),F(this.length>t,"Trying to write beyond buffer length"),O(e,127,-128)),t>=this.length||(e>=0?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},r.prototype.writeInt16LE=function(e,t,n){E(this,e,t,!0,n)},r.prototype.writeInt16BE=function(e,t,n){E(this,e,t,!1,n)},r.prototype.writeInt32LE=function(e,t,n){x(this,e,t,!0,n)},r.prototype.writeInt32BE=function(e,t,n){x(this,e,t,!1,n)},r.prototype.writeFloatLE=function(e,t,n){L(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){L(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){k(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){k(this,e,t,!1,n)},r.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),F("number"==typeof e&&!isNaN(e),"value is not a number"),F(n>=t,"end < start"),n!==t&&0!==this.length){F(t>=0&&this.length>t,"start out of bounds"),F(n>=0&&this.length>=n,"end out of bounds");for(var r=t;n>r;r++)this[r]=e}},r.prototype.inspect=function(){for(var e=[],t=this.length,r=0;t>r;r++)if(e[r]=M(this[r]),r===n.INSPECT_MAX_BYTES){e[r+1]="...";break}return"<Buffer "+e.join(" ")+">"},r.prototype.toArrayBuffer=function(){if("function"==typeof Uint8Array){if(r._useTypedArrays)return new r(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 Error("Buffer.toArrayBuffer not supported in this browser")};var z=r.prototype},{"base64-js":5,ieee754:6}],5:[function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(){"use strict";function e(e){var t=e.charCodeAt(0);return t===s?62:t===a?63:u>t?-1:u+10>t?t-u+26+26:f+26>t?t-f:l+26>t?t-l+26:void 0}function r(t){function n(e){l[c++]=e}var r,i,s,a,u,l;if(t.length%4>0)throw 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,l=new o(3*t.length/4-u),s=u>0?t.length-4:t.length;var c=0;for(r=0,i=0;s>r;r+=4,i+=3)a=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&a)>>16),n((65280&a)>>8),n(255&a);return 2===u?(a=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&a)):1===u&&(a=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(255&a>>8),n(255&a)),l}function i(e){function t(e){return n.charAt(e)}function r(e){return t(63&e>>18)+t(63&e>>12)+t(63&e>>6)+t(63&e)}var i,o,s,a=e.length%3,u="";for(i=0,s=e.length-a;s>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],u+=r(o);switch(a){case 1:o=e[e.length-1],u+=t(o>>2),u+=t(63&o<<4),u+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],u+=t(o>>10),u+=t(63&o>>4),u+=t(63&o<<2),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array;"0".charCodeAt(0);var s="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),l="a".charCodeAt(0),f="A".charCodeAt(0);t.exports.toByteArray=r,t.exports.fromByteArray=i})()},{}],6:[function(e,t,n){n.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,l=u>>1,f=-7,c=n?i-1:0,h=n?-1:1,d=e[t+c];for(c+=h,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+e[t+c],c+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+e[t+c],c+=h,f-=8);if(0===o)o=1-l;else{if(o===u)return s?0/0:1/0*(d?-1:1);s+=Math.pow(2,r),o-=l}return(d?-1:1)*s*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var s,a,u,l=8*o-i-1,f=(1<<l)-1,c=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=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)||1/0===t?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),1>t*(u=Math.pow(2,-s))&&(s--,u*=2),t+=s+c>=1?h/u:h*Math.pow(2,1-c),t*u>=2&&(s++,u/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(t*u-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[n+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[n+d]=255&s,d+=p,s/=256,l-=8);e[n+d-p]|=128*g}},{}],7:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;e.length>r;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(e){return i.exec(e).slice(1)};n.resolve=function(){for(var n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(n=s+"/"+n,i="/"===s.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),o="/"===s(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&o&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;e.length>t&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),o=r(t.split("/")),s=Math.min(i.length,o.length),a=s,u=0;s>u;u++)if(i[u]!==o[u]){a=u;break}for(var l=[],u=a;i.length>u;u++)l.push("..");return l=l.concat(o.slice(a)),l.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=o(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=o(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return o(e)[3]};var s="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return 0>t&&(t=e.length+t),e.substr(t,n)}}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3}],8:[function(e,t){function n(e){return this instanceof n?(s.call(this,e),a.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),this.once("end",r),void 0):new n(e)}function r(){if(!this.allowHalfOpen&&!this._writableState.ended){var e=this;o(function(){e.end()})}}t.exports=n;var i=e("inherits"),o=e("process/browser.js").nextTick,s=e("./readable.js"),a=e("./writable.js");i(n,s),n.prototype.write=a.prototype.write,n.prototype.end=a.prototype.end,n.prototype._write=a.prototype._write},{"./readable.js":12,"./writable.js":14,inherits:2,"process/browser.js":10}],9:[function(e,t){function n(){r.call(this)}t.exports=n;var r=e("events").EventEmitter,i=e("inherits");i(n,r),n.Readable=e("./readable.js"),n.Writable=e("./writable.js"),n.Duplex=e("./duplex.js"),n.Transform=e("./transform.js"),n.PassThrough=e("./passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()}function i(){l.readable&&l.resume&&l.resume()}function o(){f||(f=!0,e.end())}function s(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function a(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){l.removeListener("data",n),e.removeListener("drain",i),l.removeListener("end",o),l.removeListener("close",s),l.removeListener("error",a),e.removeListener("error",a),l.removeListener("end",u),l.removeListener("close",u),e.removeListener("close",u)}var l=this;l.on("data",n),e.on("drain",i),e._isStdio||t&&t.end===!1||(l.on("end",o),l.on("close",s));var f=!1;return l.on("error",a),e.on("error",a),l.on("end",u),l.on("close",u),e.on("close",u),e.emit("pipe",l),e}},{"./duplex.js":8,"./passthrough.js":11,"./readable.js":12,"./transform.js":13,"./writable.js":14,events:1,inherits:2}],10:[function(e,t){t.exports=e(3)},{}],11:[function(e,t){function n(e){return this instanceof n?(r.call(this,e),void 0):new n(e)}t.exports=n;var r=e("./transform.js"),i=e("inherits");i(n,r),n.prototype._transform=function(e,t,n){n(null,e)}},{"./transform.js":13,inherits:2}],12:[function(e,t){(function(n){function r(t){t=t||{};var n=t.highWaterMark;this.highWaterMark=n||0===n?n: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&&(x||(x=e("string_decoder").StringDecoder),this.decoder=new x(t.encoding),this.encoding=t.encoding)}function i(e){return this instanceof i?(this._readableState=new r(e,this),this.readable=!0,k.call(this),void 0):new i(e)}function o(e,t,n,r,i){var o=l(t,n);if(o)e.emit("error",o);else if(null===n||void 0===n)t.reading=!1,t.ended||f(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var a=Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var a=Error("stream.unshift() after end event");e.emit("error",a)}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&&c(e),d(e,t);else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function a(e){if(e>=I)e=I;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function u(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=a(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function l(e,t){var n=null;return j.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||n||(n=new TypeError("Invalid non-string/buffer chunk")),n}function f(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?c(e):w(e)}function c(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?S(function(){h(e)}):h(e))}function h(e){e.emit("readable")}function d(e,t){t.readingMore||(t.readingMore=!0,S(function(){p(e,t)}))}function p(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;t.awaitDrain--,0===t.awaitDrain&&v(e)}}function v(e){function t(e){var t=e.write(n);!1===t&&r.awaitDrain++}var n,r=e._readableState;for(r.awaitDrain=0;r.pipesCount&&null!==(n=e.read());)if(1===r.pipesCount?t(r.pipes,0,null):_(r.pipes,t),e.emit("data",n),r.awaitDrain>0)return;return 0===r.pipesCount?(r.flowing=!1,L.listenerCount(e,"data")>0&&y(e),void 0):(r.ranOut=!0,void 0)}function m(){this._readableState.ranOut&&(this._readableState.ranOut=!1,v(this))}function y(e,t){var n=e._readableState;if(n.flowing)throw Error("Cannot switch to old mode now.");var r=t||!1,i=!1;e.readable=!0,e.pipe=k.prototype.pipe,e.on=e.addListener=k.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?S(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function b(e,t){var n,r=t.buffer,i=t.length,o=!!t.decoder,s=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(s)n=r.shift();else if(!e||e>=i)n=o?r.join(""):j.concat(r,i),r.length=0;else if(r[0].length>e){var a=r[0];n=a.slice(0,e),r[0]=a.slice(e)}else if(e===r[0].length)n=r.shift();else{n=o?"":new j(e);for(var u=0,l=0,f=r.length;f>l&&e>u;l++){var a=r[0],c=Math.min(e-u,a.length);o?n+=a.slice(0,c):a.copy(n,u,0,c),a.length>c?r[0]=a.slice(c):r.shift(),u+=c}}return n}function w(e){var t=e._readableState;if(t.length>0)throw Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,S(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function _(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}function E(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}t.exports=i,i.ReadableState=r;var x,L=e("events").EventEmitter,k=e("./index.js"),j=e("buffer").Buffer,S=e("process/browser.js").nextTick,A=e("inherits");A(i,k),i.prototype.push=function(e,t){var n=this._readableState;return"string"!=typeof e||n.objectMode||(t=t||n.defaultEncoding,t!==n.encoding&&(e=new j(e,t),t="")),o(this,n,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},i.prototype.setEncoding=function(t){x||(x=e("string_decoder").StringDecoder),this._readableState.decoder=new x(t),this._readableState.encoding=t};var I=8388608;i.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 c(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&w(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=u(n,t));var i;return i=e>0?b(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&&w(this),i},i.prototype._read=function(){this.emit("error",Error("not implemented"))},i.prototype.pipe=function(e,t){function r(e){e===f&&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),f.removeListener("end",i),f.removeListener("end",o),(!e._writableState||e._writableState.needDrain)&&p()}function s(t){l(),0===y&&0===L.listenerCount(e,"error")&&e.emit("error",t)}function a(){e.removeListener("finish",u),l()}function u(){e.removeListener("close",a),l() | |
}function l(){f.unpipe(e)}var f=this,c=this._readableState;switch(c.pipesCount){case 0:c.pipes=e;break;case 1:c.pipes=[c.pipes,e];break;default:c.pipes.push(e)}c.pipesCount+=1;var h=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,d=h?i:o;c.endEmitted?S(d):f.once("end",d),e.on("unpipe",r);var p=g(f);e.on("drain",p);var y=L.listenerCount(e,"error");return e.once("error",s),e.once("close",a),e.once("finish",u),e.emit("pipe",f),c.flowing||(this.on("readable",m),c.flowing=!0,S(function(){v(f)})),e},i.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",m),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",m),t.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var i=E(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)},i.prototype.on=function(e,t){var n=k.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||y(this),"readable"===e&&this.readable){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&c(this,r):this.read(0))}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){y(this),this.read(0),this.emit("resume")},i.prototype.pause=function(){y(this,!0),this.emit("pause")},i.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]&&this[i]===void 0&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return _(o,function(t){e.on(t,function(e){return r.emit.apply(r,t,e)})}),r._read=function(){n&&(n=!1,e.resume())},r},i._fromList=b}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"./index.js":9,"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,buffer:4,events:1,inherits:2,"process/browser.js":10,string_decoder:15}],13:[function(e,t){function n(e,t){this.afterTransform=function(e,n){return r(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function r(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",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<o.highWaterMark)&&e._read(o.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);s.call(this,e),this._transformState=new n(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(e){o(t,e)}):o(t)})}function o(e,t){if(t)return e.emit("error",t);var n=e._writableState;e._readableState;var r=e._transformState;if(n.length)throw Error("calling transform done when ws.length != 0");if(r.transforming)throw Error("calling transform done when still transforming");return e.push(null)}t.exports=i;var s=e("./duplex.js"),a=e("inherits");a(i,s),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},i.prototype._transform=function(){throw Error("not implemented")},i.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},i.prototype._read=function(){var e=this._transformState;e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0}},{"./duplex.js":8,inherits:2}],14:[function(e,t){function n(e,t,n){this.chunk=e,this.encoding=t,this.callback=n}function r(e,t){e=e||{};var n=e.highWaterMark;this.highWaterMark=n||0===n?n:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var r=e.decodeStrings===!1;this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){h(t,e)},this.writecb=null,this.writelen=0,this.buffer=[]}function i(e){return this instanceof i||this instanceof E.Duplex?(this._writableState=new r(e,this),this.writable=!0,E.call(this),void 0):new i(e)}function o(e,t,n){var r=Error("write after end");e.emit("error",r),x(function(){n(r)})}function s(e,t,n,r){var i=!0;if(!L.isBuffer(n)&&"string"!=typeof n&&null!==n&&void 0!==n&&!t.objectMode){var o=new TypeError("Invalid non-string/buffer chunk");e.emit("error",o),x(function(){r(o)}),i=!1}return i}function a(e,t,n){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=new L(t,n)),t}function u(e,t,r,i,o){r=a(t,r,i);var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;return t.needDrain=!u,t.writing?t.buffer.push(new n(r,i,o)):l(e,t,s,r,i,o),u}function l(e,t,n,r,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,e._write(r,i,t.onwrite),t.sync=!1}function f(e,t,n,r,i){n?x(function(){i(r)}):i(r),e.emit("error",r)}function c(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function h(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(c(n),t)f(e,n,r,t,i);else{var o=v(e,n);o||n.bufferProcessing||!n.buffer.length||g(e,n),r?x(function(){d(e,n,o,i)}):d(e,n,o,i)}}function d(e,t,n,r){n||p(e,t),r(),n&&m(e,t)}function p(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function g(e,t){t.bufferProcessing=!0;for(var n=0;t.buffer.length>n;n++){var r=t.buffer[n],i=r.chunk,o=r.encoding,s=r.callback,a=t.objectMode?1:i.length;if(l(e,t,a,i,o,s),t.writing){n++;break}}t.bufferProcessing=!1,t.buffer.length>n?t.buffer=t.buffer.slice(n):t.buffer.length=0}function v(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function m(e,t){var n=v(e,t);return n&&(t.finished=!0,e.emit("finish")),n}function y(e,t,n){t.ending=!0,m(e,t),n&&(t.finished?x(n):e.once("finish",n)),t.ended=!0}t.exports=i,i.WritableState=r;var b="undefined"!=typeof Uint8Array?function(e){return e instanceof Uint8Array}:function(e){return e&&e.constructor&&"Uint8Array"===e.constructor.name},w="undefined"!=typeof ArrayBuffer?function(e){return e instanceof ArrayBuffer}:function(e){return e&&e.constructor&&"ArrayBuffer"===e.constructor.name},_=e("inherits"),E=e("./index.js"),x=e("process/browser.js").nextTick,L=e("buffer").Buffer;_(i,E),i.prototype.pipe=function(){this.emit("error",Error("Cannot pipe. Not readable."))},i.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),!L.isBuffer(e)&&b(e)&&(e=new L(e)),w(e)&&"undefined"!=typeof Uint8Array&&(e=new L(new Uint8Array(e))),L.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=function(){}),r.ended?o(this,r,n):s(this,r,e,n)&&(i=u(this,r,e,t,n)),i},i.prototype._write=function(e,t,n){n(Error("not implemented"))},i.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),e!==void 0&&null!==e&&this.write(e,t),r.ending||r.finished||y(this,r,n)}},{"./index.js":9,buffer:4,inherits:2,"process/browser.js":10}],15:[function(e,t,n){function r(e){if(e&&!a.isEncoding(e))throw Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function o(e){var t=this.charReceived=e.length%2;return this.charLength=t?2:0,t}function s(e){var t=this.charReceived=e.length%3;return this.charLength=t?3:0,t}var a=e("buffer").Buffer,u=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),r(e),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 this.write=i,void 0}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(e){for(var t="",n=0;this.charLength;){var r=e.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<this.charLength)return"";t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=t.charCodeAt(t.length-1);if(!(i>=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},u.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&&6==n>>5){this.charLength=2;break}if(2>=t&&14==n>>4){this.charLength=3;break}if(3>=t&&30==n>>3){this.charLength=4;break}}return t},u.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}},{buffer:4}],tape:[function(e,t){t.exports=e("SNATHi")},{}],SNATHi:[function(e,t,n){(function(r){function i(e){e||(e={});var t=o({autoclose:s(e.autoclose,!1)}),n=t.createStream({objectMode:e.objectMode}),i=n.pipe(e.stream||a());c&&i.on("error",function(){t._exitCode=1});var u=!1;if(n.on("end",function(){u=!0}),e.exit===!1)return t;if(!c||!h)return t;var l;return r.on("uncaughtException",function(e){if(!e||"EPIPE"!==e.code||"EPIPE"!==e.errno||"write"!==e.syscall)throw l=e,e}),r.on("exit",function(e){if(!l){if(!u)for(var n=t._results._only,i=0;t._tests.length>i;i++){var o=t._tests[i];n&&o.name!==n||o._exit()}t.close(),r.exit(e||t._exitCode)}}),t}function o(e){e||(e={});var t=l();e.autoclose!==!1&&t.once("done",function(){t.close()});var n=function(e,r,i){var o=new u(e,r,i);return n._tests.push(o),function s(e){e.on("test",function(e){s(e)}),e.on("result",function(e){e.ok||(n._exitCode=1)})}(o),t.push(o),o};n._results=t,n._tests=[],n.createStream=function(e){return t.createStream(e)};var r=!1;return n.only=function(e){if(r)throw Error("there can only be one only test");return t.only(e),r=!0,n.apply(null,arguments)},n._exitCode=0,n.close=function(){t.close()},n}var s=e("defined"),a=e("./lib/default_stream"),u=e("./lib/test"),l=e("./lib/results"),f=e("through"),c=r!==void 0&&r&&"function"==typeof r.on&&r.browser!==!0,h=r!==void 0&&r&&"function"==typeof r.exit;"undefined"!=typeof setImmediate?setImmediate:r.nextTick,n=t.exports=function(){function e(e){return e||(e={}),e.autoclose=!c,t||(t=i(e)),t}var t,n=function(){return e().apply(this,arguments)};return n.only=function(){return e().only.apply(this,arguments)},n.createStream=function(n){if(n||(n={}),!t){var r=f();return e({stream:r,objectMode:n.objectMode}),r}return t.createStream(n)},n}(),n.createHarness=o,n.Test=u,n.test=n,n.test.skip=u.skip}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"./lib/default_stream":18,"./lib/results":19,"./lib/test":20,"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,defined:24,through:28}],18:[function(e,t){var n=e("through");t.exports=function(){function e(e){for(var n=0;e.length>n;n++){var i="string"==typeof e?e.charAt(n):String.fromCharCode(e[n]);"\n"===i?t():r+=i}}function t(){try{console.log(r)}catch(e){i.emit("error",e)}r=""}var r="",i=n(e,t);return i}},{through:28}],19:[function(e,t){(function(n){function r(){return this instanceof r?(this.count=0,this.fail=0,this.pass=0,this._stream=l(),this.tests=[],void 0):new r}function i(e,t){var n="";if(n+=(e.ok?"ok ":"not ok ")+t,n+=e.name?" "+(""+e.name).replace(/\s+/g," "):"",e.skip?n+=" # SKIP":e.todo&&(n+=" # TODO"),n+="\n",e.ok)return n;var r=" ",i=r+" ";if(n+=r+"---\n",n+=i+"operator: "+e.operator+"\n",s(e,"expected")||s(e,"actual")){var o=c(e.expected),a=c(e.actual);Math.max(o.length,a.length)>65?(n+=i+"expected:\n"+i+" "+o+"\n",n+=i+"actual:\n"+i+" "+a+"\n"):(n+=i+"expected: "+o+"\n",n+=i+"actual: "+a+"\n")}if(e.at&&(n+=i+"at: "+e.at+"\n"),"error"===e.operator&&e.actual&&e.actual.stack){var u=(e.actual.stack+"").split("\n");n+=i+"stack:\n",n+=i+" "+u[0]+"\n";for(var l=1;u.length>l;l++)n+=i+u[l]+"\n"}return n+=r+"...\n"}function o(e){if(!e._only)return e.tests.shift();do{var t=e.tests.shift();if(t&&e._only===t.name)return t}while(0!==e.tests.length)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var a=e("events").EventEmitter,u=e("inherits"),l=e("through"),f=e("resumer"),c=e("object-inspect"),h="undefined"!=typeof setImmediate?setImmediate:n.nextTick;t.exports=r,u(r,a),r.prototype.createStream=function(e){e||(e={});var t,n=this,r=0;return e.objectMode?(t=l(),n.on("_push",function i(e,n){n||(n={});var o=r++;e.once("prerun",function(){var r={type:"test",name:e.name,id:o};n.parent&&(r.parent=n.parent),t.queue(r)}),e.on("test",function(e){i(e,{parent:o})}),e.on("result",function(e){e.test=o,e.type="assert",t.queue(e)}),e.on("end",function(){t.queue({type:"end",test:o})})}),n.on("done",function(){t.queue(null)})):(t=f(),t.queue("TAP version 13\n"),n._stream.pipe(t)),h(function s(){for(var e;e=o(n);)if(e.run(),!e.ended)return e.once("end",function(){h(s)});n.emit("done")}),t},r.prototype.push=function(e){var t=this;t.tests.push(e),t._watch(e),t.emit("_push",e)},r.prototype.only=function(e){this._only&&(self.count++,self.fail++,write("not ok "+self.count+" already called .only()\n")),this._only=e},r.prototype._watch=function(e){var t=this,n=function(e){t._stream.queue(e)};e.once("prerun",function(){n("# "+e.name+"\n")}),e.on("result",function(e){return"string"==typeof e?(n("# "+e+"\n"),void 0):(n(i(e,t.count+1)),t.count++,e.ok?t.pass++:t.fail++,void 0)}),e.on("test",function(e){t._watch(e)})},r.prototype.close=function(){var e=this;e.closed&&e._stream.emit("error",Error("ALREADY CLOSED")),e.closed=!0;var t=function(t){e._stream.queue(t)};t("\n1.."+e.count+"\n"),t("# tests "+e.count+"\n"),t("# pass "+e.pass+"\n"),e.fail?t("# fail "+e.fail+"\n"):t("\n# ok\n"),e._stream.queue(null)}}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,events:1,inherits:25,"object-inspect":26,resumer:27,through:28}],20:[function(e,t){(function(n,r){function i(e,t,n){var r=this,o=h(e,t,n);this.readable=!0,this.name=o.name||"(anonymous)",this.assertCount=0,this.pendingCount=0,this._skip=o.opts.skip||!1,this._plan=void 0,this._cb=o.cb,this._progeny=[],this._ok=!0,this.end=function(){return i.prototype.end.apply(r,arguments)}}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e("stream");var s=e("deep-equal"),a=e("defined"),u=e("path"),l=e("inherits"),f=e("events").EventEmitter;t.exports=i;var c="undefined"!=typeof setImmediate?setImmediate:n.nextTick;l(i,f);var h=function(){for(var e,t="(anonymous)",n={},r=0;arguments.length>r;r++){var i=arguments[r],o=typeof i;"string"===o?t=i:"object"===o?n=i||n:"function"===o&&(e=i)}return{name:t,opts:n,cb:e}};i.prototype.run=function(){if(!this._cb||this._skip)return this._end();this.emit("prerun");try{this._cb(this)}catch(e){return this.error(e),this._end(),void 0}this.emit("run")},i.prototype.test=function(e,t,n){var r=this,o=new i(e,t,n);this._progeny.push(o),this.pendingCount++,this.emit("test",o),o.on("prerun",function(){r.assertCount++}),r._pendingAsserts()||c(function(){r._end()}),c(function(){r._plan||r.pendingCount!=r._progeny.length||r._end()})},i.prototype.comment=function(e){this.emit("result",e.trim().replace(/^#\s*/,""))},i.prototype.plan=function(e){this._plan=e,this.emit("plan",e)},i.prototype.end=function(e){arguments.length>=1&&this.ifError(e),this.calledEnd&&this.fail(".end() called twice"),this.calledEnd=!0,this._end()},i.prototype._end=function(){var e=this;if(this._progeny.length){var t=this._progeny.shift();return t.on("end",function(){e._end()}),t.run(),void 0}this.ended||this.emit("end");var n=this._pendingAsserts();!this._planError&&void 0!==this._plan&&n&&(this._planError=!0,this.fail("plan != count",{expected:this._plan,actual:this.assertCount})),this.ended=!0},i.prototype._exit=function(){void 0===this._plan||this._planError||this.assertCount===this._plan?this.ended||this.fail("test exited without ending",{exiting:!0}):(this._planError=!0,this.fail("plan != count",{expected:this._plan,actual:this.assertCount,exiting:!0}))},i.prototype._pendingAsserts=function(){return void 0===this._plan?1:this._plan-(this._progeny.length+this.assertCount)},i.prototype._assert=function(e,t){var n=this,i=t.extra||{},s={id:n.assertCount++,ok:Boolean(e),skip:a(i.skip,t.skip),name:a(i.message,t.message,"(unnamed assert)"),operator:a(i.operator,t.operator)};(o(t,"actual")||o(i,"actual"))&&(s.actual=a(i.actual,t.actual)),(o(t,"expected")||o(i,"expected"))&&(s.expected=a(i.expected,t.expected)),this._ok=Boolean(this._ok&&e),e||(s.error=a(i.error,t.error,Error(s.name)));for(var l=Error("exception"),f=(l.stack||"").split("\n"),h=u.dirname(r)+"/",d=0;f.length>d;d++){var p=/^\s*\bat\s+(.+)/.exec(f[d]);if(p){var g=p[1].split(/\s+/),v=/(\/[^:\s]+:(\d+)(?::(\d+))?)/.exec(g[1]);if((v||(v=/(\/[^:\s]+:(\d+)(?::(\d+))?)/.exec(g[3])))&&v[1].slice(0,h.length)!==h){s.functionName=g[0],s.file=v[1],s.line=Number(v[2]),v[3]&&(s.column=v[3]),s.at=p[1];break}}}n.emit("result",s);var m=n._pendingAsserts();m||(i.exiting?n._end():c(function(){n._end()})),!n._planError&&0>m&&(n._planError=!0,n.fail("plan != count",{expected:n._plan,actual:n._plan-m}))},i.prototype.fail=function(e,t){this._assert(!1,{message:e,operator:"fail",extra:t})},i.prototype.pass=function(e,t){this._assert(!0,{message:e,operator:"pass",extra:t})},i.prototype.skip=function(e,t){this._assert(!0,{message:e,operator:"skip",skip:!0,extra:t})},i.prototype.ok=i.prototype["true"]=i.prototype.assert=function(e,t,n){this._assert(e,{message:t,operator:"ok",expected:!0,actual:e,extra:n})},i.prototype.notOk=i.prototype["false"]=i.prototype.notok=function(e,t,n){this._assert(!e,{message:t,operator:"notOk",expected:!1,actual:e,extra:n})},i.prototype.error=i.prototype.ifError=i.prototype.ifErr=i.prototype.iferror=function(e,t,n){this._assert(!e,{message:a(t,e+""),operator:"error",actual:e,extra:n})},i.prototype.equal=i.prototype.equals=i.prototype.isEqual=i.prototype.is=i.prototype.strictEqual=i.prototype.strictEquals=function(e,t,n,r){this._assert(e===t,{message:a(n,"should be equal"),operator:"equal",actual:e,expected:t,extra:r})},i.prototype.notEqual=i.prototype.notEquals=i.prototype.notStrictEqual=i.prototype.notStrictEquals=i.prototype.isNotEqual=i.prototype.isNot=i.prototype.not=i.prototype.doesNotEqual=i.prototype.isInequal=function(e,t,n,r){this._assert(e!==t,{message:a(n,"should not be equal"),operator:"notEqual",actual:e,notExpected:t,extra:r})},i.prototype.deepEqual=i.prototype.deepEquals=i.prototype.isEquivalent=i.prototype.same=function(e,t,n,r){this._assert(s(e,t,{strict:!0}),{message:a(n,"should be equivalent"),operator:"deepEqual",actual:e,expected:t,extra:r})},i.prototype.deepLooseEqual=i.prototype.looseEqual=i.prototype.looseEquals=function(e,t,n,r){this._assert(s(e,t),{message:a(n,"should be equivalent"),operator:"deepLooseEqual",actual:e,expected:t,extra:r})},i.prototype.notDeepEqual=i.prototype.notEquivalent=i.prototype.notDeeply=i.prototype.notSame=i.prototype.isNotDeepEqual=i.prototype.isNotDeeply=i.prototype.isNotEquivalent=i.prototype.isInequivalent=function(e,t,n,r){this._assert(!s(e,t,{strict:!0}),{message:a(n,"should not be equivalent"),operator:"notDeepEqual",actual:e,notExpected:t,extra:r})},i.prototype.notDeepLooseEqual=i.prototype.notLooseEqual=i.prototype.notLooseEquals=function(e,t,n,r){this._assert(s(e,t),{message:a(n,"should be equivalent"),operator:"notDeepLooseEqual",actual:e,expected:t,extra:r})},i.prototype["throws"]=function(e,t,n,r){"string"==typeof t&&(n=t,t=void 0);var i=void 0;try{e()}catch(o){i={error:o};var s=o.message;delete o.message,o.message=s}var u=i;t instanceof RegExp&&(u=t.test(i&&i.error),t+=""),this._assert(u,{message:a(n,"should throw"),operator:"throws",actual:i&&i.error,expected:t,error:!u&&i&&i.error,extra:r})},i.prototype.doesNotThrow=function(e,t,n,r){"string"==typeof t&&(n=t,t=void 0);var i=void 0;try{e()}catch(o){i={error:o}}this._assert(!i,{message:a(n,"should not throw"),operator:"throws",actual:i&&i.error,expected:t,error:i&&i.error,extra:r})},i.skip=function(){var e=h.apply(null,arguments);return e.opts.skip=!0,i(e.name,e.opts,e.cb)}}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"/lib")},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,"deep-equal":21,defined:24,events:1,inherits:25,path:7,stream:9}],21:[function(e,t){function n(e){return null===e||void 0===e}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length?"function"!=typeof e.copy||"function"!=typeof e.slice?!1:e.length>0&&"number"!=typeof e[0]?!1:!0:!1}function i(e,t,i){var l,f;if(n(e)||n(t))return!1;if(e.prototype!==t.prototype)return!1;if(a(e))return a(t)?(e=o.call(e),t=o.call(t),u(e,t,i)):!1;if(r(e)){if(!r(t))return!1;if(e.length!==t.length)return!1;for(l=0;e.length>l;l++)if(e[l]!==t[l])return!1;return!0}try{var c=s(e),h=s(t)}catch(d){return!1}if(c.length!=h.length)return!1;for(c.sort(),h.sort(),l=c.length-1;l>=0;l--)if(c[l]!=h[l])return!1;for(l=c.length-1;l>=0;l--)if(f=c[l],!u(e[f],t[f],i))return!1;return!0}var o=Array.prototype.slice,s=e("./lib/keys.js"),a=e("./lib/is_arguments.js"),u=t.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:i(e,t,n)}},{"./lib/is_arguments.js":22,"./lib/keys.js":23}],22:[function(e,t,n){function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function i(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();n=t.exports=o?r:i,n.supported=r,n.unsupported=i},{}],23:[function(e,t,n){function r(e){var t=[];for(var n in e)t.push(n);return t}n=t.exports="function"==typeof Object.keys?Object.keys:r,n.shim=r},{}],24:[function(e,t){t.exports=function(){for(var e=0;arguments.length>e;e++)if(void 0!==arguments[e])return arguments[e]}},{}],25:[function(e,t){t.exports=e(2)},{}],26:[function(e,t){function n(e){return(e+"").replace(/"/g,""")}function r(e){return"[object Array]"==={}.toString.call(e)}function i(e){return"[object Date]"==={}.toString.call(e)}function o(e){return"[object RegExp]"==={}.toString.call(e)}function s(e,t){return{}.hasOwnProperty?{}.hasOwnProperty.call(e,t):t in e}function a(e){if(e.name)return e.name;var t=(""+e).match(/^function\s*([\w$]+)/);return t?t[1]:void 0}function u(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function l(e){return e&&"object"==typeof e?"undefined"!=typeof HTMLElement?e instanceof HTMLElement:"string"==typeof e.nodeName&&"function"==typeof e.getAttribute:!1}function f(e){function t(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(16>t?"0":"")+t.toString(16)}var n=e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,t);return"'"+n+"'"}t.exports=function c(e,t,h,d){function p(e,n){return n&&(d=d.slice(),d.push(n)),c(e,t,h+1,d)}t||(t={});var g=void 0===t.depth?5:t.depth;if(void 0===h&&(h=0),h>g&&g>0)return"...";if(void 0===d)d=[];else if(u(d,e)>=0)return"[Circular]";if("string"==typeof e)return f(e);if("function"==typeof e){var v=a(e);return"[Function"+(v?": "+v:"")+"]"}if(null===e)return"null";if(l(e)){for(var m="<"+(e.nodeName+"").toLowerCase(),y=e.attributes||[],b=0;y.length>b;b++)m+=" "+y[b].name+'="'+n(y[b].value)+'"';return m+=">",e.childNodes&&e.childNodes.length&&(m+="..."),m+="</"+(e.tagName+"").toLowerCase()+">"}if(r(e)){if(0===e.length)return"[]";for(var w=Array(e.length),b=0;e.length>b;b++)w[b]=s(e,b)?p(e[b],e):"";return"[ "+w.join(", ")+" ]"}if("object"==typeof e&&"function"==typeof e.inspect)return e.inspect();if("object"!=typeof e||i(e)||o(e))return e+"";var w=[],_=[];for(var E in e)s(e,E)&&_.push(E);_.sort();for(var b=0;_.length>b;b++){var E=_[b];/[^\w$]/.test(E)?w.push(p(E)+": "+p(e[E],e)):w.push(E+": "+p(e[E],e))}return 0===w.length?"{}":"{ "+w.join(", ")+" }"}},{}],27:[function(e,t){(function(n){var r=e("through"),i="undefined"!=typeof setImmediate?setImmediate:n.nextTick;t.exports=function(e,t){var n=r(e,t);n.pause();var o=n.resume,s=n.pause,a=!1;return n.pause=function(){return a=!0,s.apply(this,arguments)},n.resume=function(){return a=!1,o.apply(this,arguments)},i(function(){a||n.resume()}),n}}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,through:28}],28:[function(e,t,n){(function(r){function i(e,t,n){function i(){for(;l.length&&!c.paused;){var e=l.shift();if(null===e)return c.emit("end");c.emit("data",e)}}function s(){c.writable=!1,t.call(c),!c.readable&&c.autoDestroy&&c.destroy()}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var a=!1,u=!1,l=[],f=!1,c=new o;return c.readable=c.writable=!0,c.paused=!1,c.autoDestroy=!(n&&n.autoDestroy===!1),c.write=function(t){return e.call(this,t),!c.paused},c.queue=c.push=function(e){return f?c:(null==e&&(f=!0),l.push(e),i(),c)},c.on("end",function(){c.readable=!1,!c.writable&&c.autoDestroy&&r.nextTick(function(){c.destroy()})}),c.end=function(e){return a?void 0:(a=!0,arguments.length&&c.write(e),s(),c)},c.destroy=function(){return u?void 0:(u=!0,a=!0,l.length=0,c.writable=c.readable=!1,c.emit("close"),c)},c.pause=function(){return c.paused?void 0:(c.paused=!0,c)},c.resume=function(){return c.paused&&(c.paused=!1,c.emit("resume")),i(),c.paused||c.emit("drain"),c},c}var o=e("stream");n=t.exports=i,i.through=i}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":3,stream:9}]},{},[]),require=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 Error("Cannot find module '"+s+"'")}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;r.length>s;s++)i(r[s]);return i}({"xGF+05":[function(e,t){function n(e){return"string"!=typeof e&&(e+=""),0===e.indexOf("ok")?(s+=1,void 0):0===e.indexOf("not ok")?(o+=1,void 0):void 0}function r(){var e=document.body.style;e.backgroundColor=o>0?i.FAILING:s>0&&0===o?i.PASSING:i.PENDING}t.exports=function(){var e=console.log,t=document.body.appendChild(document.createElement("pre"));return r(),console.log=function(i){n(i),r(),e.apply(console,arguments),t.innerHTML+=i+"\n"},function(){console.log=e}};var i=t.exports.colors={PENDING:"#FCD62A",FAILING:"#F28E82",PASSING:"#8ECA6C"},o=0,s=0},{}],"tap-browser-color":[function(e,t){t.exports=e("xGF+05")},{}]},{},[]);var test=require("tape");require("tap-browser-color")(),test(".next",function(e){var t=SerialTaskQueue(),n=0;t.tasks.push(function(t){e.equal(n,0,"1st task finished"),n+=1,t()}),t.tasks.push(function(t){e.equal(n,1,"2nd task finished"),t()}),t.tasks.push(e.end.bind(e,null)),t.next()}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "requirebin-sketch", | |
"version": "1.0.0", | |
"dependencies": { | |
"tape": "2.12.3", | |
"tap-browser-color": "0.1.2" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; } | |
body, html { height: 100%; width: 100%; }</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment