it
Version:
A testing framework for node
5 lines • 151 kB
JavaScript
/*! it - v1.1.1 - 2016-01-27
* http://doug-martin.github.com/it
* Copyright (c) 2016 [object Object]; Licensed */
!function(a,b,c){function d(c,f){if(!b[c]){if(!a[c]){var g="function"==typeof require&&require;if(!f&&g)return g(c,!0);if(e)return e(c,!0);throw new Error("Cannot find module '"+c+"'")}var h=b[c]={exports:{}};a[c][0].call(h.exports,function(b){var e=a[c][1][b];return d(e?e:b)},h,h.exports)}return b[c].exports}for(var e="function"==typeof require&&require,f=0;f<c.length;f++)d(c[f]);return d}({1:[function(a,b,c){!function(b){(function(){"use strict";function b(){var b=a("../extended"),c=b.merge,d=a("../interfaces"),e=a("../formatters/reporter");a("./formatters/html"),a("../formatters/tap");var f,g={assert:a("../extension"),reporter:function(a,b){return a?void(f=e.getInstance(a,b)):f},printSummary:function(){d.printSummary()},run:function(a){if("undefined"!=typeof window){try{g.reporter("html","it")}catch(c){g.reporter("tap")}var e=window.location.search.substring(1),f={};e.length>0&&b(e.split("&")).forEach(function(a){var b=a.split("=");f[decodeURIComponent(b[0])]=decodeURIComponent(b[1])}),f.hasOwnProperty("filter")&&(a=f.filter)}else g.reporter("tap");return d.run(a)}};return b(d).forEach(function(a){g=c({},a,g)}),g}"function"==typeof this.define&&this.define.amd?define([],function(){return b()}):this.it=b()}).call("undefined"!=typeof window?window:b)}(window)},{"../extended":2,"../formatters/reporter":3,"./formatters/html":4,"../formatters/tap":5,"../extension":6,"../interfaces":7}],8:[function(a,b,c){var d=b.exports={};d.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.binding=function(a){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],9:[function(a,b,c){!function(a){function b(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;c<a.length;c++)if(b===a[c])return c;return-1}a.EventEmitter||(a.EventEmitter=function(){});var d=c.EventEmitter=a.EventEmitter,e="function"==typeof Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},f=10;d.prototype.setMaxListeners=function(a){this._events||(this._events={}),this._events.maxListeners=a},d.prototype.emit=function(a){if("error"===a&&(!this._events||!this._events.error||e(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var b=this._events[a];if(!b)return!1;if("function"==typeof b){switch(arguments.length){case 1:b.call(this);break;case 2:b.call(this,arguments[1]);break;case 3:b.call(this,arguments[1],arguments[2]);break;default:var c=Array.prototype.slice.call(arguments,1);b.apply(this,c)}return!0}if(e(b)){for(var c=Array.prototype.slice.call(arguments,1),d=b.slice(),f=0,g=d.length;g>f;f++)d[f].apply(this,c);return!0}return!1},d.prototype.addListener=function(a,b){if("function"!=typeof b)throw new Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",a,b),this._events[a])if(e(this._events[a])){if(!this._events[a].warned){var c;c=void 0!==this._events.maxListeners?this._events.maxListeners:f,c&&c>0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}this._events[a].push(b)}else this._events[a]=[this._events[a],b];else this._events[a]=b;return this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){var c=this;return c.on(a,function d(){c.removeListener(a,d),b.apply(this,arguments)}),this},d.prototype.removeListener=function(a,c){if("function"!=typeof c)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[a])return this;var d=this._events[a];if(e(d)){var f=b(d,c);if(0>f)return this;d.splice(f,1),0==d.length&&delete this._events[a]}else this._events[a]===c&&delete this._events[a];return this},d.prototype.removeAllListeners=function(a){return 0===arguments.length?(this._events={},this):(a&&this._events&&this._events[a]&&(this._events[a]=null),this)},d.prototype.listeners=function(a){return this._events||(this._events={}),this._events[a]||(this._events[a]=[]),e(this._events[a])||(this._events[a]=[this._events[a]]),this._events[a]}}(a("__browserify_process"))},{__browserify_process:8}],10:[function(a,b,c){!function(){function c(a){if(Object.keys)return Object.keys(a);var b=[];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c);return b}function d(a,b){return void 0===b?""+b:"number"!=typeof b||!isNaN(b)&&isFinite(b)?"function"==typeof b||b instanceof RegExp?b.toString():b:b.toString()}function e(a,b){return"string"==typeof a?a.length<b?a:a.slice(0,b):a}function f(a,b,c,d,e){throw new q.AssertionError({message:c,actual:a,expected:b,operator:d,stackStartFunction:e})}function g(a,b){a||f(a,!0,b,"==",q.ok)}function h(a,b){if(a===b)return!0;if(o.isBuffer(a)&&o.isBuffer(b)){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==b[c])return!1;return!0}return a instanceof Date&&b instanceof Date?a.getTime()===b.getTime():"object"!=typeof a&&"object"!=typeof b?a==b:k(a,b)}function i(a){return null===a||void 0===a}function j(a){return"[object Arguments]"==Object.prototype.toString.call(a)}function k(a,b){if(i(a)||i(b))return!1;if(a.prototype!==b.prototype)return!1;if(j(a))return j(b)?(a=p.call(a),b=p.call(b),h(a,b)):!1;try{var d,e,f=c(a),g=c(b)}catch(k){return!1}if(f.length!=g.length)return!1;for(f.sort(),g.sort(),e=f.length-1;e>=0;e--)if(f[e]!=g[e])return!1;for(e=f.length-1;e>=0;e--)if(d=f[e],!h(a[d],b[d]))return!1;return!0}function l(a,b){return a&&b?b instanceof RegExp?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function m(a,b,c,d){var e;"string"==typeof c&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f("Missing expected exception"+d),!a&&l(e,c)&&f("Got unwanted exception"+d),a&&e&&c&&!l(e,c)||!a&&e)throw e}var n=a("util"),o=a("buffer").Buffer,p=Array.prototype.slice,q=b.exports=g;q.AssertionError=function(a){this.name="AssertionError",this.message=a.message,this.actual=a.actual,this.expected=a.expected,this.operator=a.operator;var b=a.stackStartFunction||f;Error.captureStackTrace&&Error.captureStackTrace(this,b)},n.inherits(q.AssertionError,Error),q.AssertionError.prototype.toString=function(){return this.message?[this.name+":",this.message].join(" "):[this.name+":",e(JSON.stringify(this.actual,d),128),this.operator,e(JSON.stringify(this.expected,d),128)].join(" ")},q.AssertionError.__proto__=Error.prototype,q.fail=f,q.ok=g,q.equal=function(a,b,c){a!=b&&f(a,b,c,"==",q.equal)},q.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",q.notEqual)},q.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",q.deepEqual)},q.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",q.notDeepEqual)},q.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",q.strictEqual)},q.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",q.notStrictEqual)},q["throws"]=function(a,b,c){m.apply(this,[!0].concat(p.call(arguments)))},q.doesNotThrow=function(a,b,c){m.apply(this,[!1].concat(p.call(arguments)))},q.ifError=function(a){if(a)throw a}}()},{util:11,buffer:12}],3:[function(a,b,c){"use strict";var d=a("../extended"),e=d.style,f=d.format;d.declare({instance:{numActions:0,constructor:function(){this.errors=[],d.bindAll(this,["startTests","testError","_testError","printFinalSummary","listenTest","listenAction","testRun","testEnd","testsDone","actionError","_actionError","actionSuccess","actionPending","actionSkipped","printDuplicateActions"]),d.bus.on("start",this.startTests),d.bus.on("error",this._testError),d.bus.on("done",this.testsDone),d.bus.on("test",this.listenTest),d.bus.on("printDuplicateActions",this.printDuplicateActions)},listenTest:function(a){a.on("test",this.listenTest),a.on("action",this.listenAction),a.on("run",this.testRun),a.on("error",this._testError),a.on("done",this.testEnd)},listenAction:function(a){this.numActions++,a.on("error",this._actionError),a.on("success",this.actionSuccess),a.on("pending",this.actionPending),a.on("skipped",this.actionSkipped)},formatMs:function(a){return f("% 6ds",a/1e3)},startTests:function(){},testRun:function(){},actionSuccess:function(){},actionPending:function(){},actionSkipped:function(){},actionError:function(){},testError:function(a){},printDuplicateActions:function(a){this._static.list(a)},_actionError:function(a){var b=a.get("summary").error;return this.errors.push({error:b,test:a}),this.actionError.apply(this,arguments)},_testError:function(a){return this.errors.push({error:a.error,test:a}),this.testError.apply(this,arguments)},processSummary:function(a){a.hasOwnProperty("summaries")&&(a=a.summaries);var b=0,c=0,e=0,f=0,g=[],h={},i=0;return d(a).forEach(function(a){i+=a.duration}),function j(a){d(a).forEach(function(a,d){a.hasOwnProperty("summaries")?j(a.summaries):"passed"===a.status?c++:"pending"===a.status?(f++,g.push(a.parentFullName+": "+a.description)):"skipped"===a.status?e++:(h[d]=a.error,b++)})}(a),{totalCount:this.numActions,errCount:b,successCount:c,skippedCount:e,pendingCount:f,pendingActions:g,errors:h,duration:i}},testEnd:function(){},testsDone:function(a){this.printFinalSummary(a)},returnCode:function(a){return this.errors.length||a.errCount||a.totalCount!==a.successCount+a.skippedCount?1:0},printFinalSummary:function(a){this.testEnd.apply(this,arguments),console.log("\nSummary");var b=this.processSummary(a.summary||a.get("summary")),c=b.totalCount,d=b.errCount,g=b.successCount,h=b.pendingCount,i=b.skippedCount,j=b.duration;console.log(f("Finished in %s",this.formatMs(j)));var k=[c+" total",g+" passed",d+" failed",i+" skipped",h+" pending"],l="green";return d>0||h>0?l="red":i>0&&(l="cyan"),console.log(e(k.join(", "),l)),this._static.list(this.errors),this._static.listPending(b.pendingActions),this.returnCode(b)}},"static":{reporters:{},registerType:function(a){return a=a.toLowerCase(),this.reporters.hasOwnProperty(a)||(this.reporters[a]=this),this},getInstance:function(a,b){if(a=a.toLowerCase(),this.reporters.hasOwnProperty(a))return new this.reporters[a](b||{});throw new Error("Invalid Reporter type")},listPending:function(a){if(a.length){console.log(""+a.length+" pending actions");var b=!1;a.length>10&&(a=a.slice(0,10),b=!0),a.forEach(function(a){console.log(e(" %s",["red","bold"]),a)}),b&&console.log(e(" ...",["red","bold"]))}},list:function(a){console.log(),a.forEach(function(a,b){var c=" %s.%d) %s:\n"+e(" %s","red")+e("\n%s\n",["red","bold"]),f=a.error;d(d.isArray(f)?f:[f]).forEach(function(d,e){if(d){var f=d.message||"",g=d.stack||f,h=g.indexOf(f)+f.length,i=g.slice(0,h);g=g.slice(h?h+1:h).replace(/^/gm," "),console.log(c,b+1,e,a.test.get("fullName"),i,g)}})})}}}).as(b)},{"../extended":2}],6:[function(a,b,c){var d=a("assert"),e=a("./extended"),f=e.format;d.lengthOf=function(a,b,c){a.length!==b&&d.fail(a.length,b,c||f("expected %s, to have %d elements",[a,b]),d.lengthOf)},d.truthy=function(a,b){a||d.fail(a,!0,b||f("expected %s to be truthy",a),d.truthy)},d.falsy=function(a,b){a&&d.fail(a,!1,b||f("expected %s to be falsy",a),d.truthy)},d.isRegExp=function(a,b){e.isRegExp(a)||d.fail(a,0,b||f("expected %s, to be a regex",a),d.isRexExp)},e.forEach([["isTrue","true"],["isFalse","false"],["isArray","an array"],["isNull","null"],["isNotNull","not null"],["isNumber","a number"],["isHash","a hash"],["isObject","an object"],["isDate","a date"],["isBoolean","a boolean"],["isString","a string"],["isUndefined","undefined"],["isUndefinedOrNull","undefined or null"],["isPromiseLike","a promise"],["isFunction","a function"],["isEmpty","empty"]],function(a){var b=a[0],c=a[1];d[b]=function(a,g){e[b](a)||d.fail(a,0,g||f("expected %s, to be "+c,a),d[b])}}),d.instanceOf=function(a,b,c){e.instanceOf(a,b)||d.fail(a,b,c||f("expected %j to be instanceof %s",[a,b]),"===",d.isNotNull)},b.exports=d},{assert:10,"./extended":2}],11:[function(a,b,c){function d(a){return a instanceof Array||Array.isArray(a)||a&&a!==Object.prototype&&d(a.__proto__)}function e(a){return a instanceof RegExp||"object"==typeof a&&"[object RegExp]"===Object.prototype.toString.call(a)}function f(a){if(a instanceof Date)return!0;if("object"!=typeof a)return!1;var b=Date.prototype&&h(Date.prototype),c=a.__proto__&&h(a.__proto__);return JSON.stringify(c)===JSON.stringify(b)}a("events");c.isArray=d,c.isDate=function(a){return"[object Date]"===Object.prototype.toString.call(a)},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)},c.print=function(){},c.puts=function(){},c.debug=function(){},c.inspect=function(a,b,i,j){function k(a,i){if(a&&"function"==typeof a.inspect&&a!==c&&(!a.constructor||a.constructor.prototype!==a))return a.inspect(i);switch(typeof a){case"undefined":return m("undefined","undefined");case"string":var j="'"+JSON.stringify(a).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return m(j,"string");case"number":return m(""+a,"number");case"boolean":return m(""+a,"boolean")}if(null===a)return m("null","null");var n=g(a),o=b?h(a):n;if("function"==typeof a&&0===o.length){if(e(a))return m(""+a,"regexp");var p=a.name?": "+a.name:"";return m("[Function"+p+"]","special")}if(f(a)&&0===o.length)return m(a.toUTCString(),"date");var q,r,s;if(d(a)?(r="Array",s=["[","]"]):(r="Object",s=["{","}"]),"function"==typeof a){var t=a.name?": "+a.name:"";q=e(a)?" "+a:" [Function"+t+"]"}else q="";if(f(a)&&(q=" "+a.toUTCString()),0===o.length)return s[0]+q+s[1];if(0>i)return e(a)?m(""+a,"regexp"):m("[Object]","special");l.push(a);var u=o.map(function(b){var c,e;if(a.__lookupGetter__&&(a.__lookupGetter__(b)?e=a.__lookupSetter__(b)?m("[Getter/Setter]","special"):m("[Getter]","special"):a.__lookupSetter__(b)&&(e=m("[Setter]","special"))),n.indexOf(b)<0&&(c="["+b+"]"),e||(l.indexOf(a[b])<0?(e=null===i?k(a[b]):k(a[b],i-1),e.indexOf("\n")>-1&&(e=d(a)?e.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+e.split("\n").map(function(a){return" "+a}).join("\n"))):e=m("[Circular]","special")),"undefined"==typeof c){if("Array"===r&&b.match(/^\d+$/))return e;c=JSON.stringify(""+b),c.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(c=c.substr(1,c.length-2),c=m(c,"name")):(c=c.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),c=m(c,"string"))}return c+": "+e});l.pop();var v=0,w=u.reduce(function(a,b){return v++,b.indexOf("\n")>=0&&v++,a+b.length+1},0);return u=w>50?s[0]+(""===q?"":q+"\n ")+" "+u.join(",\n ")+" "+s[1]:s[0]+q+" "+u.join(", ")+" "+s[1]}var l=[],m=function(a,b){var c={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d={special:"cyan",number:"blue","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"}[b];return d?"["+c[d][0]+"m"+a+"["+c[d][1]+"m":a};return j||(m=function(a,b){return a}),k(a,"undefined"==typeof i?2:i)};c.log=function(a){},c.pump=null;var g=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b},h=Object.getOwnPropertyNames||function(a){var b=[];for(var c in a)Object.hasOwnProperty.call(a,c)&&b.push(c);return b},i=Object.create||function(a,b){var c;if(null===a)c={__proto__:null};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return"undefined"!=typeof b&&Object.defineProperties&&Object.defineProperties(c,b),c};c.inherits=function(a,b){a.super_=b,a.prototype=i(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})};var j=/%[sdj%]/g;c.format=function(a){if("string"!=typeof a){for(var b=[],d=0;d<arguments.length;d++)b.push(c.inspect(arguments[d]));return b.join(" ")}for(var d=1,e=arguments,f=e.length,g=String(a).replace(j,function(a){if("%%"===a)return"%";if(d>=f)return a;switch(a){case"%s":return String(e[d++]);case"%d":return Number(e[d++]);case"%j":return JSON.stringify(e[d++]);default:return a}}),h=e[d];f>d;h=e[++d])g+=null===h||"object"!=typeof h?" "+h:" "+c.inspect(h);return g}},{events:9}],5:[function(a,b,c){"use strict";function d(a){return a.get("fullName").replace(/#/g,"")}var e=a("../extended"),f=e.format,g=a("./reporter");g.extend({instance:{ran:0,startTests:function(a){console.log(f("%d..%d",1,a.numActions))},actionSuccess:function(a){console.log(f("ok %d %s",++this.ran,d(a)))},actionSkipped:function(a){console.log(f("ok %d %s # SKIP -",++this.ran,d(a)))},actionError:function(a){var b=a.get("summary"),c=b.error;console.log(f("not ok %d %s",++this.ran,d(a))),e(e.isArray(c)?c:[c]).forEach(function(a){a&&(a.stack?console.log(a.stack.replace(/^/gm," ")):a.message?console.log(a.message):console.log(a))})},printFinalSummary:function(a){var b=this.processSummary(a.summary);return console.log("# total "+this.numActions),console.log("# passed "+b.successCount),console.log("# failed "+b.errCount),console.log("# skipped "+b.skippedCount),console.log("# pending "+b.pendingCount),this._static.list(this.errors),this._static.listPending(b.pendingActions),this.returnCode(b)}}}).as(b).registerType("tap")},{"../extended":2,"./reporter":3}],4:[function(a,b,c){"use strict";function d(a){return 2.5*a.level+"em"}function e(a,b){var c=document.createElement(a);return g(k.call(arguments,2)).forEach(function(a){g.isString(a)?c.appendChild(document.createTextNode(a)):a&&c.appendChild(a)}),g(b||{}).forEach(function(a,b){"className"===b?c[b]=a:c.setAttribute(b,a)}),c}function f(a,b){for(var c=document.querySelectorAll('[data-it-actionName="'+a.get("fullName")+'"]'),d=0,e=c.length;e>d;d++){var f=c.item(d),g=f.className;f.className=g.replace(/(not-run|pending|error|passed) */gi,"")+" "+b}}var g=a("../../extended"),h=a("assert").AssertionError,i=a("../../formatters/reporter"),j=g.format,k=Array.prototype.slice,l=function(a,b){return 1!==a?b+"s":b};i.extend({instance:{constructor:function(a){if(this._super(arguments),this.el=document.getElementById(a),this.header=this.el.appendChild(e("div",{className:"header"},e("h1",{},e("a",{href:"?"},"It")))),this.summary=this.header.appendChild(e("div",{className:"summary"})),this.progress=this.el.appendChild(e("ul",{className:"progress"})),this.actions=this.el.appendChild(e("div",{className:"actions"})),this.errors=[],!this.el)throw new Error("Unable to find el with id #"+a)},listenAction:function(a){this._super(arguments);var b=a.get("fullName");this.progress.appendChild(e("li",{className:"not-run","data-it-actionName":b}))},testRun:function(a){a.description&&this.actions.appendChild(e("div",{className:"header",style:"padding-left:"+d(a),"data-it-actionName":a.get("fullName")},e("a",{href:"?filter="+encodeURIComponent(a.get("fullName"))},a.description)))},__addAction:function(a){var b=a.get("summary");return this.actions.appendChild(e("div",{className:"pending",style:"padding-left:"+d(a),"data-it-actionName":a.get("fullName")},e("a",{href:"?filter="+encodeURIComponent(a.get("fullName"))},j(" %s, (%dms)",a.description,b.duration)))),f(a,b.status),this},__formatError:function(a){var b=a.stack||a.toString();return a instanceof h&&(b=a.toString()+"\n"+(a.stack||"").replace(/AssertionError.*\n/,"")),a.message&&(~b.indexOf(a.message)||(b=a.message+"\n"+b),"[object Error]"===b&&(b=a.message)),!a.stack&&a.sourceURL&&void 0!==a.line&&(b+="\n("+a.sourceURL+":"+a.line+")"),b},actionSuccess:function(a){this.__addAction(a)},actionSkipped:function(a){this.__addAction(a)},actionPending:function(a){this.__addAction(a)},actionError:function(a){this._super(arguments),this.__addAction(a)},printErrors:function(){this.errors.length&&(this.actions.innerHTML="",g(this.errors).forEach(function(a,b){var c=a.error,d=a.test;this.actions.appendChild(e("pre",{className:"failed"},j(" %s) %s:",b,d.get("fullName")),e("br"),this.__formatError(c).replace(/^/gm," ")))},this))},printFinalSummary:function(a){var b=a.summary,c=this.processSummary(b),d=c.errCount,f=c.successCount,g=c.pendingCount,h=c.duration,i=["Duration "+this.formatMs(h),f+l(f," example"),d+l(d," error"),g+" pending"];return this.summary.appendChild(e("div",{className:g>0?"pending":d>0?"failed":"success"},i.join(", "))),this.printErrors(),d?1:0}}}).as(b).registerType("html")},{assert:10,"../../extended":2,"../../formatters/reporter":3}],7:[function(a,b,c){"use strict";var d=a("./common").Test,e=a("./bdd"),f=a("./tdd");b.exports={Test:d,bdd:e,tdd:f,reporter:function(a){d.reporter=a,e.reporter(a),f.reporter(a)},printSummary:function(){return d.printSummary()},run:function(a){return d.run(a)}}},{"./bdd":13,"./tdd":14,"./common":15}],2:[function(a,b,c){b.exports=a("extended")().register(a("array-extended")).register(a("date-extended")).register(a("object-extended")).register(a("string-extended")).register(a("promise-extended")).register(a("function-extended")).register(a("is-extended")).register("declare",a("declare.js")).register("bus",new(a("events").EventEmitter))},{events:9,extended:16,"array-extended":17,"date-extended":18,"object-extended":19,"string-extended":20,"promise-extended":21,"function-extended":22,"declare.js":23,"is-extended":24}],25:[function(a,b,c){c.readIEEE754=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<<h)-1,j=i>>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<<j)-1,l=k>>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<<e|h,j+=e;j>0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],12:[function(a,b,c){!function(){function b(a){this.length=a}function d(a){return 16>a?"0"+a.toString(16):a.toString(16)}function e(a){for(var b=[],c=0;c<a.length;c++)if(a.charCodeAt(c)<=127)b.push(a.charCodeAt(c));else for(var d=encodeURIComponent(a.charAt(c)).substr(1).split("%"),e=0;e<d.length;e++)b.push(parseInt(d[e],16));return b}function f(a){for(var b=[],c=0;c<a.length;c++)b.push(255&a.charCodeAt(c));return b}function g(b){return a("base64-js").toByteArray(b)}function h(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function i(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function j(a){return a=~~Math.ceil(+a),0>a?0:a}function k(a,c,d){if(!(this instanceof k))return new k(a,c,d);var e;if("number"==typeof d)this.length=j(c),this.parent=a,this.offset=d;else{switch(e=typeof a){case"number":this.length=j(a);break;case"string":this.length=k.byteLength(a,c);break;case"object":this.length=j(a.length);break;default:throw new Error("First argument needs to be a number, array or string.")}if(this.length>k.poolSize?(this.parent=new b(this.length),this.offset=0):((!D||D.length-D.used<this.length)&&m(),this.parent=D,this.offset=D.used,D.used+=this.length),l(a))for(var f=0;f<this.length;f++)a instanceof k?this.parent[f+this.offset]=a.readUInt8(f):this.parent[f+this.offset]=a[f];else"string"==e&&(this.length=this.write(a,0,c))}}function l(a){return Array.isArray(a)||k.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function m(){D=new b(k.poolSize),D.used=0}function n(a,b,c,d){var e=0;return d||(C.ok("boolean"==typeof c,"missing or invalid endian"),C.ok(void 0!==b&&null!==b,"missing offset"),C.ok(b+1<a.length,"Trying to read beyond buffer length")),b>=a.length?0:(c?(e=a.parent[a.offset+b]<<8,b+1<a.length&&(e|=a.parent[a.offset+b+1])):(e=a.parent[a.offset+b],b+1<a.length&&(e|=a.parent[a.offset+b+1]<<8)),e)}function o(a,b,c,d){var e=0;return d||(C.ok("boolean"==typeof c,"missing or invalid endian"),C.ok(void 0!==b&&null!==b,"missing offset"),C.ok(b+3<a.length,"Trying to read beyond buffer length")),b>=a.length?0:(c?(b+1<a.length&&(e=a.parent[a.offset+b+1]<<16),b+2<a.length&&(e|=a.parent[a.offset+b+2]<<8),b+3<a.length&&(e|=a.parent[a.offset+b+3]),e+=a.parent[a.offset+b]<<24>>>0):(b+2<a.length&&(e=a.parent[a.offset+b+2]<<16),b+1<a.length&&(e|=a.parent[a.offset+b+1]<<8),e|=a.parent[a.offset+b],b+3<a.length&&(e+=a.parent[a.offset+b+3]<<24>>>0)),e)}function p(a,b,c,d){var e,f;return d||(C.ok("boolean"==typeof c,"missing or invalid endian"),C.ok(void 0!==b&&null!==b,"missing offset"),C.ok(b+1<a.length,"Trying to read beyond buffer length")),f=n(a,b,c,d),e=32768&f,e?-1*(65535-f+1):f}function q(a,b,c,d){var e,f;return d||(C.ok("boolean"==typeof c,"missing or invalid endian"),C.ok(void 0!==b&&null!==b,"missing offset"),C.ok(b+3<a.length,"Trying to read beyond buffer length")),f=o(a,b,c,d),e=2147483648&f,e?-1*(4294967295-f+1):f}function r(b,c,d,e){return e||(C.ok("boolean"==typeof d,"missing or invalid endian"),C.ok(c+3<b.length,"Trying to read beyond buffer length")),a("./buffer_ieee754").readIEEE754(b,c,d,23,4)}function s(b,c,d,e){return e||(C.ok("boolean"==typeof d,"missing or invalid endian"),C.ok(c+7<b.length,"Trying to read beyond buffer length")),a("./buffer_ieee754").readIEEE754(b,c,d,52,8)}function t(a,b){C.ok("number"==typeof a,"cannot write a non-number as a number"),C.ok(a>=0,"specified a negative value for writing an unsigned value"),C.ok(b>=a,"value is larger than maximum value for type"),C.ok(Math.floor(a)===a,"value has a fractional component")}function u(a,b,c,d,e){e||(C.ok(void 0!==b&&null!==b,"missing value"),C.ok("boolean"==typeof d,"missing or invalid endian"),C.ok(void 0!==c&&null!==c,"missing offset"),C.ok(c+1<a.length,"trying to write beyond buffer length"),t(b,65535));for(var f=0;f<Math.min(a.length-c,2);f++)a.parent[a.offset+c+f]=(b&255<<8*(d?1-f:f))>>>8*(d?1-f:f)}function v(a,b,c,d,e){e||(C.ok(void 0!==b&&null!==b,"missing value"),C.ok("boolean"==typeof d,"missing or invalid endian"),C.ok(void 0!==c&&null!==c,"missing offset"),C.ok(c+3<a.length,"trying to write beyond buffer length"),t(b,4294967295));for(var f=0;f<Math.min(a.length-c,4);f++)a.parent[a.offset+c+f]=b>>>8*(d?3-f:f)&255}function w(a,b,c){C.ok("number"==typeof a,"cannot write a non-number as a number"),C.ok(b>=a,"value larger than maximum allowed value"),C.ok(a>=c,"value smaller than minimum allowed value"),C.ok(Math.floor(a)===a,"value has a fractional component")}function x(a,b,c){C.ok("number"==typeof a,"cannot write a non-number as a number"),C.ok(b>=a,"value larger than maximum allowed value"),C.ok(a>=c,"value smaller than minimum allowed value")}function y(a,b,c,d,e){e||(C.ok(void 0!==b&&null!==b,"missing value"),C.ok("boolean"==typeof d,"missing or invalid endian"),C.ok(void 0!==c&&null!==c,"missing offset"),C.ok(c+1<a.length,"Trying to write beyond buffer length"),w(b,32767,-32768)),b>=0?u(a,b,c,d,e):u(a,65535+b+1,c,d,e)}function z(a,b,c,d,e){e||(C.ok(void 0!==b&&null!==b,"missing value"),C.ok("boolean"==typeof d,"missing or invalid endian"),C.ok(void 0!==c&&null!==c,"missing offset"),C.ok(c+3<a.length,"Trying to write beyond buffer length"),w(b,2147483647,-2147483648)),b>=0?v(a,b,c,d,e):v(a,4294967295+b+1,c,d,e)}function A(b,c,d,e,f){f||(C.ok(void 0!==c&&null!==c,"missing value"),C.ok("boolean"==typeof e,"missing or invalid endian"),C.ok(void 0!==d&&null!==d,"missing offset"),C.ok(d+3<b.length,"Trying to write beyond buffer length"),x(c,3.4028234663852886e38,-3.4028234663852886e38)),a("./buffer_ieee754").writeIEEE754(b,c,d,e,23,4)}function B(b,c,d,e,f){f||(C.ok(void 0!==c&&null!==c,"missing value"),C.ok("boolean"==typeof e,"missing or invalid endian"),C.ok(void 0!==d&&null!==d,"missing offset"),C.ok(d+7<b.length,"Trying to write beyond buffer length"),x(c,1.7976931348623157e308,-1.7976931348623157e308)),a("./buffer_ieee754").writeIEEE754(b,c,d,e,52,8)}var C=a("assert");c.INSPECT_MAX_BYTES=50,b.byteLength=function(a,b){switch(b||"utf8"){case"hex":return a.length/2;case"utf8":case"utf-8":return e(a).length;case"ascii":case"binary":return a.length;case"base64":return g(a).length;default:throw new Error("Unknown encoding")}},b.prototype.utf8Write=function(a,c,d){return b._charsWritten=h(e(a),this,c,d)},b.prototype.asciiWrite=function(a,c,d){return b._charsWritten=h(f(a),this,c,d)},b.prototype.binaryWrite=b.prototype.asciiWrite,b.prototype.base64Write=function(a,c,d){return b._charsWritten=h(g(a),this,c,d)},b.prototype.base64Slice=function(b,c){var d=Array.prototype.slice.apply(this,arguments);return a("base64-js").fromByteArray(d)},b.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",d=0;d<a.length;)a[d]<=127?(b+=i(c)+String.fromCharCode(a[d]),c=""):c+="%"+a[d].toString(16),d++;return b+i(c)},b.prototype.asciiSlice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c=0;c<a.length;c++)b+=String.fromCharCode(a[c]);return b},b.prototype.binarySlice=b.prototype.asciiSlice,b.prototype.inspect=function(){for(var a=[],b=this.length,e=0;b>e;e++)if(a[e]=d(this[e]),e==c.INSPECT_MAX_BYTES){a[e+1]="...";break}return"<SlowBuffer "+a.join(" ")+">"},b.prototype.hexSlice=function(a,b){var c=this.length;(!a||0>a)&&(a=0),(!b||0>b||b>c)&&(b=c);for(var e="",f=a;b>f;f++)e+=d(this[f]);return e},b.prototype.toString=function(a,b,c){if(a=String(a||"utf8").toLowerCase(),b=+b||0,"undefined"==typeof c&&(c=this.length),+c==b)return"";switch(a){case"hex":return this.hexSlice(b,c);case"utf8":case"utf-8":return this.utf8Slice(b,c);case"ascii":return this.asciiSlice(b,c);case"binary":return this.binarySlice(b,c);case"base64":return this.base64Slice(b,c);case"ucs2":case"ucs-2":return this.ucs2Slice(b,c);default:throw new Error("Unknown encoding")}},b.prototype.hexWrite=function(a,c,d){c=+c||0;var e=this.length-c;d?(d=+d,d>e&&(d=e)):d=e;var f=a.length;if(f%2)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(a.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");this[c+g]=h}return b._charsWritten=2*g,g},b.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b,b=c,c=e}b=+b||0;var f=this.length-b;switch(c?(c=+c,c>f&&(c=f)):c=f,d=String(d||"utf8").toLowerCase()){case"hex":return this.hexWrite(a,b,c);case"utf8":case"utf-8":return this.utf8Write(a,b,c);case"ascii":return this.asciiWrite(a,b,c);case"binary":return this.binaryWrite(a,b,c);case"base64":return this.base64Write(a,b,c);case"ucs2":case"ucs-2":return this.ucs2Write(a,b,c);default:throw new Error("Unknown encoding")}},b.prototype.slice=function(a,b){if(void 0===b&&(b=this.length),b>this.length)throw new Error("oob");if(a>b)throw new Error("oob");return new k(this,b-a,+a)},b.prototype.copy=function(a,b,c,d){for(var e=[],f=c;d>f;f++)C.ok("undefined"!=typeof this[f],"copying undefined buffer bytes!"),e.push(this[f]);for(var f=b;f<b+e.length;f++)a[f]=e[f-b]},b.prototype.fill=function(a,b,c){if(c>this.length)throw new Error("oob");if(b>c)throw new Error("oob");for(var d=b;c>d;d++)this[d]=a},c.SlowBuffer=b,c.Buffer=k,k.poolSize=8192;var D;k.isBuffer=function(a){return a instanceof k||a instanceof b},k.concat=function(a,b){if(!Array.isArray(a))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new k(0);if(1===a.length)return a[0];if("number"!=typeof b){b=0;
for(var c=0;c<a.length;c++){var d=a[c];b+=d.length}}for(var e=new k(b),f=0,c=0;c<a.length;c++){var d=a[c];d.copy(e,f),f+=d.length}return e},k.prototype.inspect=function(){for(var a=[],b=this.length,e=0;b>e;e++)if(a[e]=d(this.parent[e+this.offset]),e==c.INSPECT_MAX_BYTES){a[e+1]="...";break}return"<Buffer "+a.join(" ")+">"},k.prototype.get=function(a){if(0>a||a>=this.length)throw new Error("oob");return this.parent[this.offset+a]},k.prototype.set=function(a,b){if(0>a||a>=this.length)throw new Error("oob");return this.parent[this.offset+a]=b},k.prototype.write=function(a,c,d,e){if(isFinite(c))isFinite(d)||(e=d,d=void 0);else{var f=e;e=c,c=d,d=f}c=+c||0;var g=this.length-c;d?(d=+d,d>g&&(d=g)):d=g,e=String(e||"utf8").toLowerCase();var h;switch(e){case"hex":h=this.parent.hexWrite(a,this.offset+c,d);break;case"utf8":case"utf-8":h=this.parent.utf8Write(a,this.offset+c,d);break;case"ascii":h=this.parent.asciiWrite(a,this.offset+c,d);break;case"binary":h=this.parent.binaryWrite(a,this.offset+c,d);break;case"base64":h=this.parent.base64Write(a,this.offset+c,d);break;case"ucs2":case"ucs-2":h=this.parent.ucs2Write(a,this.offset+c,d);break;default:throw new Error("Unknown encoding")}return k._charsWritten=b._charsWritten,h},k.prototype.toString=function(a,b,c){switch(a=String(a||"utf8").toLowerCase(),"undefined"==typeof b||0>b?b=0:b>this.length&&(b=this.length),"undefined"==typeof c||c>this.length?c=this.length:0>c&&(c=0),b+=this.offset,c+=this.offset,a){case"hex":return this.parent.hexSlice(b,c);case"utf8":case"utf-8":return this.parent.utf8Slice(b,c);case"ascii":return this.parent.asciiSlice(b,c);case"binary":return this.parent.binarySlice(b,c);case"base64":return this.parent.base64Slice(b,c);case"ucs2":case"ucs-2":return this.parent.ucs2Slice(b,c);default:throw new Error("Unknown encoding")}},k.byteLength=b.byteLength,k.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),"string"==typeof a&&(a=a.charCodeAt(0)),"number"!=typeof a||isNaN(a))throw new Error("value is not a number");if(b>c)throw new Error("end < start");if(c===b)return 0;if(0==this.length)return 0;if(0>b||b>=this.length)throw new Error("start out of bounds");if(0>c||c>this.length)throw new Error("end out of bounds");return this.parent.fill(a,b+this.offset,c+this.offset)},k.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),d||(d=this.length),b||(b=0),c>d)throw new Error("sourceEnd < sourceStart");if(d===c)return 0;if(0==a.length||0==e.length)return 0;if(0>b||b>=a.length)throw new Error("targetStart out of bounds");if(0>c||c>=e.length)throw new Error("sourceStart out of bounds");if(0>d||d>e.length)throw new Error("sourceEnd out of bounds");return d>this.length&&(d=this.length),a.length-b<d-c&&(d=a.length-b+c),this.parent.copy(a.parent,b+a.offset,c+this.offset,d+this.offset)},k.prototype.slice=function(a,b){if(void 0===b&&(b=this.length),b>this.length)throw new Error("oob");if(a>b)throw new Error("oob");return new k(this.parent,b-a,+a+this.offset)},k.prototype.utf8Slice=function(a,b){return this.toString("utf8",a,b)},k.prototype.binarySlice=function(a,b){return this.toString("binary",a,b)},k.prototype.asciiSlice=function(a,b){return this.toString("ascii",a,b)},k.prototype.utf8Write=function(a,b){return this.write(a,b,"utf8")},k.prototype.binaryWrite=function(a,b){return this.write(a,b,"binary")},k.prototype.asciiWrite=function(a,b){return this.write(a,b,"ascii")},k.prototype.readUInt8=function(a,b){var c=this;return b||(C.ok(void 0!==a&&null!==a,"missing offset"),C.ok(a<c.length,"Trying to read beyond buffer length")),a>=c.length?void 0:c.parent[c.offset+a]},k.prototype.readUInt16LE=function(a,b){return n(this,a,!1,b)},k.prototype.readUInt16BE=function(a,b){return n(this,a,!0,b)},k.prototype.readUInt32LE=function(a,b){return o(this,a,!1,b)},k.prototype.readUInt32BE=function(a,b){return o(this,a,!0,b)},k.prototype.readInt8=function(a,b){var c,d=this;return b||(C.ok(void 0!==a&&null!==a,"missing offset"),C.ok(a<d.length,"Trying to read beyond buffer length")),a>=d.length?void 0:(c=128&d.parent[d.offset+a],c?-1*(255-d.parent[d.offset+a]+1):d.parent[d.offset+a])},k.prototype.readInt16LE=function(a,b){return p(this,a,!1,b)},k.prototype.readInt16BE=function(a,b){return p(this,a,!0,b)},k.prototype.readInt32LE=function(a,b){return q(this,a,!1,b)},k.prototype.readInt32BE=function(a,b){return q(this,a,!0,b)},k.prototype.readFloatLE=function(a,b){return r(this,a,!1,b)},k.prototype.readFloatBE=function(a,b){return r(this,a,!0,b)},k.prototype.readDoubleLE=function(a,b){return s(this,a,!1,b)},k.prototype.readDoubleBE=function(a,b){return s(this,a,!0,b)},k.prototype.writeUInt8=function(a,b,c){var d=this;c||(C.ok(void 0!==a&&null!==a,"missing value"),C.ok(void 0!==b&&null!==b,"missing offset"),C.ok(b<d.length,"trying to write beyond buffer length"),t(a,255)),b<d.length&&(d.parent[d.offset+b]=a)},k.prototype.writeUInt16LE=function(a,b,c){u(this,a,b,!1,c)},k.prototype.writeUInt16BE=function(a,b,c){u(this,a,b,!0,c)},k.prototype.writeUInt32LE=function(a,b,c){v(this,a,b,!1,c)},k.prototype.writeUInt32BE=function(a,b,c){v(this,a,b,!0,c)},k.prototype.writeInt8=function(a,b,c){var d=this;c||(C.ok(void 0!==a&&null!==a,"missing value"),C.ok(void 0!==b&&null!==b,"missing offset"),C.ok(b<d.length,"Trying to write beyond buffer length"),w(a,127,-128)),a>=0?d.writeUInt8(a,b,c):d.writeUInt8(255+a+1,b,c)},k.prototype.writeInt16LE=function(a,b,c){y(this,a,b,!1,c)},k.prototype.writeInt16BE=function(a,b,c){y(this,a,b,!0,c)},k.prototype.writeInt32LE=function(a,b,c){z(this,a,b,!1,c)},k.prototype.writeInt32BE=function(a,b,c){z(this,a,b,!0,c)},k.prototype.writeFloatLE=function(a,b,c){A(this,a,b,!1,c)},k.prototype.writeFloatBE=function(a,b,c){A(this,a,b,!0,c)},k.prototype.writeDoubleLE=function(a,b,c){B(this,a,b,!1,c)},k.prototype.writeDoubleBE=function(a,b,c){B(this,a,b,!0,c)},b.prototype.readUInt8=k.prototype.readUInt8,b.prototype.readUInt16LE=k.prototype.readUInt16LE,b.prototype.readUInt16BE=k.prototype.readUInt16BE,b.prototype.readUInt32LE=k.prototype.readUInt32LE,b.prototype.readUInt32BE=k.prototype.readUInt32BE,b.prototype.readInt8=k.prototype.readInt8,b.prototype.readInt16LE=k.prototype.readInt16LE,b.prototype.readInt16BE=k.prototype.readInt16BE,b.prototype.readInt32LE=k.prototype.readInt32LE,b.prototype.readInt32BE=k.prototype.readInt32BE,b.prototype.readFloatLE=k.prototype.readFloatLE,b.prototype.readFloatBE=k.prototype.readFloatBE,b.prototype.readDoubleLE=k.prototype.readDoubleLE,b.prototype.readDoubleBE=k.prototype.readDoubleBE,b.prototype.writeUInt8=k.prototype.writeUInt8,b.prototype.writeUInt16LE=k.prototype.writeUInt16LE,b.prototype.writeUInt16BE=k.prototype.writeUInt16BE,b.prototype.writeUInt32LE=k.prototype.writeUInt32LE,b.prototype.writeUInt32BE=k.prototype.writeUInt32BE,b.prototype.writeInt8=k.prototype.writeInt8,b.prototype.writeInt16LE=k.prototype.writeInt16LE,b.prototype.writeInt16BE=k.prototype.writeInt16BE,b.prototype.writeInt32LE=k.prototype.writeInt32LE,b.prototype.writeInt32BE=k.prototype.writeInt32BE,b.prototype.writeFloatLE=k.prototype.writeFloatLE,b.prototype.writeFloatBE=k.prototype.writeFloatBE,b.prototype.writeDoubleLE=k.prototype.writeDoubleLE,b.prototype.writeDoubleBE=k.prototype.writeDoubleBE}()},{assert:10,"./buffer_ieee754":25,"base64-js":26}],26:[function(a,b,c){!function(a){"use strict";function c(a){var b,c,d,f,g,h;if(a.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(g=a.indexOf("="),g=g>0?a.length-g:0,h=[],d=g>0?a.length-4:a.length,b=0,c=0;d>b;b+=4,c+=3)f=e.indexOf(a[b])<<18|e.indexOf(a[b+1])<<12|e.indexOf(a[b+2])<<6|e.indexOf(a[b+3]),h.push((16711680&f)>>16),h.push((65280&f)>>8),h.push(255&f);return 2===g?(f=e.indexOf(a[b])<<2|e.indexOf(a[b+1])>>4,h.push(255&f)):1===g&&(f=e.indexOf(a[b])<<10|e.indexOf(a[b+1])<<4|e.indexOf(a[b+2])>>2,h.push(f>>8&255),h.push(255&f)),h}function d(a){function b(a){return e[a>>18&63]+e[a>>12&63]+e[a>>6&63]+e[63&a]}var c,d,f,g=a.length%3,h="";for(c=0,f=a.length-g;f>c;c+=3)d=(a[c]<<16)+(a[c+1]<<8)+a[c+2],h+=b(d);switch(g){case 1:d=a[a.length-1],h+=e[d>>2],h+=e[d<<4&63],h+="==";break;case 2:d=(a[a.length-2]<<8)+a[a.length-1],h+=e[d>>10],h+=e[d>>4&63],h+=e[d<<2&63],h+="="}return h}var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports.toByteArray=c,b.exports.fromByteArray=d}()},{}],13:[function(a,b,c){"use strict";var d=a("./common").Test,e=a("../extended");d.extend({instance:{constructor:function(){this._super(arguments),e.bindAll(this,["describe","should"])},describe:function(a,b){return this._addTest(a,b)},should:function(a,b){return this._addAction("should "+a,b)}},"static":{init:function(){e.bindAll(this,["describe"])},describe:function(a,b){var c=new this(a,{}),d=c._addAction;return e(["description","should","describe","timeout","getAction","beforeAll","beforeEach","afterAll","afterEach","context","get","set","skip","ignoreErrors"]).forEach(function(a){d[a]=c[a]}),b(d),c}}}).as(b)},{"../extended":2,"./common":15}],14:[function(a,b,c){"use strict";var d=a("./common").Test,e=a("../extended");d.extend({instance:{constructor:function(){this._super(arguments),e.bindAll(this,["suite","test"])},suite:function(a,b){return this._addTest(a,b)},test:function(a,b){return this._addAction(a,b)}},"static":{init:function(){e.bindAll(this,"suite")},suite:function(a,b){var c=new this(a,{}),d=c._addAction;return e(["suite","test","timeout","getAction","beforeAll","beforeEach","afterAll","afterEach","context","get","set","skip","ignoreErrors"]).forEach(function(a){d[a]=c[a]}),b(c),c}}}).as(b)},{"../extended":2,"./common":15}],23:[function(a,b,c){b.exports=a("./declare.js")},{"./declare.js":27}],15:[function(a,b,c){c.Action=a("./action"),c.Test=a("./test.js")},{"./test.js":28,"./action":29}],27:[function(a,b,c){!function(){function a(){function a(a,b){return b=b||0,x.call(a,b)}function b(a){return"[object Array]"===Object.prototype.toString.call(a)}function c(a){var b;return null!==a&&a!==b&&"object"==typeof a}function d(a){var b=c(a);return b&&a.constructor===Object}function e(a,b){if(a&&a.length)for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}function f(a,b,c){var d,f;for(d in b)b.hasOwnProperty(d)&&-1===e(c,d)&&(f=b[d],d in a&&a[d]===f||(a[d]=f));return a}function g(a,c){var d=this.__meta,e=d.supers,f=e.length,g=d.superMeta,h=g.pos;if(f>h){a=a?B(a)||b(a)?a:[a]:[];var i,j=g.name,k=g.f;do if(i=e[h][j],"function"==typeof i&&(i=i._f||i)!==k)return g.pos=1+h,i.apply(this,a);while(f>++h)}return null}function h(){var a=this.__meta,b=a.supers,c=b.length,d=a.superMeta,e=d.pos;if(c>e){var f,g=d.name,h=d.f;do if(f=b[e][g],"function"==typeof f&&(f=f._f||f)!==h)return d.pos=1+e,f.bind(this);while(c>++e)}return null}function i(a){var b=this.__getters__;return b.hasOwnProperty(a)?b[a].apply(this):this[a]}function j(b,c){var e=this.__setters__;if(!d(b))return e.hasOwnProperty(b)?e[b].apply(this,a(arguments,1)):this[b]=c;for(var f in b){var g=b[f];e.hasOwnProperty(f)?e[b].call(this,g):this[f]=g}}function k(){var a=this.__meta||{},b=a.supers,c=b.length,d=a.superMeta,e=d.pos;if(c>e){var f,g=d.name,h=d.f;do if(f=b[e][g],"function"==typeof f&&(f=f._f||f)!==h)return d.pos=1+e,f.apply(this,arguments);while(c>++e)}return null}function l(a,b){if(a.toString().match(A)){var c=function(){var c,d=this.__meta||{},e=d.superMeta;switch(d.superMeta={f:a,pos:0,name:b},arguments.length){case 0:c=a.call(this);break;case 1:c=a.call(this,arguments[0]);break;case 2:c=a.call(this,arguments[0],arguments[1]);break;case 3:c=a.call(this,arguments[0],arguments[1],arguments[2]);break;default:c=a.apply(this,arguments)}return d.superMeta=e,c};return c._f=a,c}return a._f=a,a}function m(a,b){var c=b.setters||{},d=a.__setters__,e=a.__getters__;for(var f in c)d.hasOwnProperty(f)||(d[f]=c[f]);c=b.getters||{};for(f in c)e.hasOwnProperty(f)||(e[f]=c[f]);for(var g in b)if("getters"!==g&&"setters"!==g){var h=b[g];"function"==typeof h?a.hasOwnProperty(g)||(a[g]=l(k,g)):a[g]=h}}function n(){for(var b=a(arguments),c=b.length,d=this.prototype,e=d.__meta,f=this.__meta,g=d.__meta.bases,h=g.slice(),i=f.supers||[],j=e.supers||[],k=0;c>k;k++){var l=b[k],n=l.prototype,p=n.__meta,q=l.__meta;!p&&(p=n.__meta={proto:n||{}}),!q&&(q=l.__meta={proto:l.__proto__||{}}),m(d,p.proto||{}),m(this,q.proto||{}),o(l.prototype,j,g),o(l,i,h)}return this}function o(a,b,c){var d=a.__meta;!d&&(d=a.__meta={});var f=a.__meta.unique;if(!f&&(d.unique="declare"+ ++y),-1===e(c,f)){c.push(f);for(var g=a.__meta.supers||[],h=g.length-1||0;h>=0;)o(g[h--],b,c);b.unshift(a)}}function p(a,b){var c=b.setters,d=a.__setters__,e=a.__getters__;if(c)for(var f in c)d[f]=c[f];if(c=b.getters||{})for(f in c)e[f]=c[f];for(f in b)if("getters"!=f&&"setters"!=f){var g=b[f];if("function"==typeof g){var h=g.__meta||{};h.isConstructor?a[f]=g:a[f]=l(g,f)}else a[f]=g}}function q(a,b){return a&&b?a[b]=this:a.exports=a=this,this}function r(a){return u(this,a)}function s(a){z.prototype=a.prototype;var b=new z;return z.prototype=null,b}function t(a,c,e){var i={},j=[],m="declare"+ ++y,q=[],r=[],t=[],u=[],v={supers:t,unique:m,bases:q,superMeta:{f:null,pos:0,name:null}},x={supers:u,unique:m,bases:r,isConstructor:!0,superMeta:{f:null,pos:0,name:null}};if(d(c)&&!e&&(e=c,c=w),"function"==typeof c||b(c)?(j=b(c)?c:[c],c=j.shift(),a.__meta=x,i=s(c),i.__meta=v,i.__getters__=f({},i.__getters__||{}),i.__setters__=f({},i.__setters__||{}),a.__getters__=f({},a.__getters__||{}),a.__setters__=f({},a.__setters__||{}),o(c.prototype,t,q),o(c,u,r)):(a.__meta=x,i.__meta=v,i.__getters__=i.__getters__||{},i.__setters__=i.__setters__||{},a.__getters__=a.__getters__||{},a.__setters__=a.__setters__||{}),a.prototype=i,e){var z=v.proto=e.instance||{},A=x.proto=e["static"]||{};A.init=A.init||k,p(i,z),p(a,A),z.hasOwnProperty("constructor")?i.constructor=l(z.constructor,"constructor"):i.constructor=z.constructor=l(k,"constructor")}else v.proto={},x.proto={},a.init=l(k,"init"),i.constructor=l(k,"constructor");j.length&&n.apply(a,j),c&&f(a,f(f({},c),a)),i._super=a._super=g,i._getSuper=a._getSuper=h,i._static=a}function u(a,b){function c(){switch(arguments.length){case 0:this.constructor.call(this);break;case 1:this.constructor.call(this,arguments[0]);break;case 2:this.constructor.call(this,arguments[0],arguments[1]);break;case 3:this.constructor.call(this,arguments[0],arguments[1],arguments[2]);break;default:this.constructor.apply(this,arguments)}}return t(c,a,b),c.init()||c}function v(a,b){function c(){return d||(this.constructor.apply(this,arguments),d=this),d}var d;return t(c,a,b),c.init()||c}var w,x=Array.prototype.slice,y=0,z=new Function,A=/(super)/g,B=function(a){return"[object Arguments]"===Object.prototype.toString.call(a)};return B(arguments)||(B=function(a){return!(!a||!a.hasOwnProperty("callee"))}),w=u({instance:{get:i,set:j},"static":{get:i,set:j,mixin:n,extend:r,as:q}}),u.singleton=v,u}"undefined"!=typeof c?"undefined"!=typeof b&&b.exports&&(b.exports=a()):"function"==typeof define&&define.amd?define(a):this.declare=a()}()},{}],16:[function(a,b,c){!function(){(function(){"use strict";function d(a){function b(){var b=a.define();return b.expose({register:function(a,c){c||(c=a,a=null);var d=typeof c;if(a)b[a]=c;else if(c&&"function"===d)b.extend(c);else{if("object"!==d)throw new TypeError("extended.register must be called with an extender function");b.expose(c)}return b},define:function(){return a.define.apply(a,arguments)}}),b}function c(){return b()}(function(){function a(a,b){var c,d;for(c in b)b.hasOwnProperty(c)&&(d=b[c],c in a&&a[c]===d||(a[c]=d));return a}return function(b){b||(b={});for(var c=1,d=arguments.length;d>c;c++)a(b,arguments[c]);return b}})();return c.define=function(){return a.define.apply(a,arguments)},c}"undefined"!=typeof c?"undefined"!=typeof b&&b.exports&&(b.exports=d(a("extender"))):"function"==typeof define&&define.amd?define(["extender"],function(a){return d(a)}):this.extended=d(this.extender)}).call(this)}()},{extender:30}],17:[function(a,b,c){!function(){(function(){"use strict";function d(a,b,c){function d(a,b){return o(b,function(b,c){return N(c)||(c=[c]),c.unshift(a),b.unshift(c),b},[])}function e(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push([a].concat(y(b,e)).slice(0,c));return d}function f(a,b){var c,d,e=[],f=-1;for(d=a.length;++f<d;)c=a[f],-1!==g(b,c)&&e.push(c);return e}function g(a,b,c){for(var d=(c||0)-1,e=a.length;++d<e;)if(a[d]===b)return d;return-1}function h(a,b,c){if(!N(a))throw new TypeError;var d=Object(a),e=d.length>>>0;if(0===e)return-1;var f=e;arguments.length>2&&(f=Number(arguments[2]),f!==f?f=0:0!==f&&f!==1/0&&f!==-(1/0)&&(f=(f>0||-1)*P(Q(f))));for(var g=f>=0?R(f,e-1):e-Q(f);g>=0;g--)if(g in d&&d[g]===b)return g;return-1}function i(a,b,c){if(a&&X&&X===a.filter)return a.filter(b,c);if(!N(a)||"function"!=typeof b)throw new TypeError;for(var d=Object(a),e=d.length>>>0,f=[],g=0;e>g;g++)if(g in d){var h=d[g];b.call(c,h,g,d)&&f.push(h)}return f}function j(a,b,c){if(!N(a)||"function"!=typeof b)throw new TypeError;if(a&&T&&T===a.forEach)return a.forEach(b,c),a;for(var d=0,e=a.length;e>d;++d)b.call(c||a,a[d],d,a);return a}function k(a,b,c){if(a&&Y&&Y===a.every)return a.every(b,c);if(!N(a)||"function"!=typeof b)throw new TypeError;for(var d=Object(a),e=d.length>>>0,f=0;e>f;f++)if(f in d&&!b.call(c,d[f],f,d))return!1;return!0}function l(a,b,c){if(a&&Z&&Z===a.some)return a.some(b,c);if(!N(a)||"function"!=typeof b)throw new TypeError;for(var d=Object(a),e=d.length>>>0,f=0;e>f;f++)if(f in d&&b.call(c,d[f],f,d))return!0;return!1}function m(a,b,c){if(a&&U&&U===a.map)return a.map(b,c);if(!N(a)||"function"!=typeof b)throw new TypeError;for(var d=Object(a),e=d.length>>>0,f=[],g=0;e>g;g++)g in d&&f.push(b.call(c,d[g],g,d));return f}function n(a,b,c){var d=arguments.length>2;if(a&&V&&V===a.reduce)return d?a.reduce(b,c):a.reduce(b);if(!N(a)||"function"!=typeof b)throw new TypeError;var e=0,f=a.length>>0;if(arguments.length<3){if(0===f)throw new TypeError("Array length is 0 and no second argument");c=a[0