VimŸUnDoå£Y^Fèµ’VâÕ6fWÑ‚ŽÂõN=zKý`¦­Bûý«Y 2 $"$$!N#ax_Ðÿÿÿÿ‡VMî\õ'/* vim:set ts=2 sw=2 sts=2 expandtab */õ†L/*jshint asi: true newcap: true undef: true es5: true node: true devel: true forin: false *//*global define: true */var COLOR_BLANK = '\033[0;30m', COLOR_RED = '\033[0;31m', COLOR_GREEN = '\033[0;32m', COLOR_YELLOW = '\033[0;33m', COLOR_BLUE = '\033[0;34m', COLOR_PURPLE = '\033[0;35m', COLOR_CYAN = '\033[0;36m', COLOR_WHITE = '\033[0;37m', COLOR_RESET = '\033[m', COLOR_PASS = COLOR_GREEN, COLOR_FAIL = COLOR_RED, COLOR_ERROR = COLOR_PURPLE, ICON_PASS = '✓ ', ICON_FAIL = '✗ ', ICON_ERROR = 'âš¡ ', ICON_SECTION = '* ', INDENT = ' ' function Color(color, message) {8 return color ? color + message + COLOR_RESET : message}"function Indent(message, indent) {1 indent = undefined === indent ? INDENT : indent' return message.replace(/^/gm, indent)}/**5 * Internal utility function that is used to generate1 * textual representation of things passed to it. */+function toSource(thing, indent, visited) {4 indent = undefined !== indent ? indent + ' ' : '' var result, index, root if (!visited) { root = true visited = [] } index = visited.indexOf(thing), if (0 <= index) return '#' + ++index + '#' switch (typeof (thing)) { case 'string': result = '"' + thing + '"' break case 'number': result = '' + thing break case 'object': if (null === thing) { result = 'null' break } if (Array.isArray(thing)) { result = '['( result += thing.map(function ($) {+ return toSource($, indent, visited) }).join(',') result += ']' break } visited.push(thing) var names = [], for (var name in thing) names.push(name)@ result = thing + '' !== {} + '' ? '/* ' + thing + ' */' : '' if (names.length > 0) {$ result += '\n' + indent + '{ '+ result += names.map(function (name) {' var repr = '\'' + name + '\': ' try {8 repr += toSource(thing[name], indent, visited) } catch (e) { repr += '[Exception!]' } return repr# }).join('\n' + indent + ', ')# result += '\n' + indent + '}' } break case "function":= result = thing.toString().split('\n').join('\n' + indent) break default: result = '' + thing }F return root && '\n' === result.charAt(0) ? result.substr(1) : result}function Log(options) { options = options || {}' return Object.create(Log.prototype, { name: { value: options.name }, indent: {3 value: options.indent || Log.prototype.indent } })}Log.prototype = { constructor: Log, indent: ''," print: function print(message) {= process.stdout.write(Indent(message, this.indent) + '\n') }, pass: function pass(message) {> this.print(Indent(Color(COLOR_PASS, ICON_PASS + message))) }, fail: function fail(e) { var message = e.messageU if ('expected' in e) message += '\n Expected: \n' + toSource(e.expected, INDENT)O if ('actual' in e) message += '\n Actual: \n' + toSource(e.actual, INDENT)S if ('operator' in e) message += '\n Operator: ' + toSource(e.operator, INDENT)> this.print(Indent(Color(COLOR_FAIL, ICON_FAIL + message))) }, error: function error(e) {D this.print(Indent(Color(COLOR_ERROR, ICON_ERROR + toSource(e)))) },& section: function section(options) { options = options || {}) options.indent = this.indent + INDENT return Log(options) }}exports.Log = Log5�_Ðÿÿÿÿ{VMîcõz8function source(value, indent, limit, offset, visited) {5�_Ðÿÿÿÿ|VMîuõ {5�_Ð ÿÿÿÿ„VMîwõ 5�_ЂÿÿÿÿƒVMî|õ‚õ‚5�_Ðÿÿÿÿ…VMî–õ)„5�_Ðÿÿÿÿ¥VMî¼õ ¤ "use strict";5�_Ð ÿÿÿÿ¦VMî½õ ¥5�_Ð ÿÿÿÿ ¤vMîÁõV õ ¦œ"function instanceOf(value, Type) { var isConstructorNameSame; var isConstructorSourceSame;? // If `instanceof` returned `true` we know result right away.+ var isInstanceOf = value instanceof Type;N // If `instanceof` returned `false` we do ducktype check since `Type` may beO // from a different sandbox. If a constructor of the `value` or a constructorM // of the value's prototype has same name and source we assume that it's an // instance of the Type. if (!isInstanceOf && value) {A isConstructorNameSame = value.constructor.name === Type.name;H isConstructorSourceSame = String(value.constructor) == String(Type);H isInstanceOf = (isConstructorNameSame && isConstructorSourceSame) ||C instanceOf(Object.getPrototypeOf(value), Type); } return isInstanceOf;}Afunction isFunction(value) { return typeof value === 'function' }0function isNull(value) { return value === null }:function isUndefined(value) { return value === undefined }Ofunction isObject(value) { return typeof value === 'object' && !isNull(value) }=function isString(value) { return typeof value === 'string' }Nfunction isPrimitive(value) { return !isFunction(value) && !isObject(value) }function isDate(value) { E return !!(value && value.getTimezoneOffset && value.setUTCFullYear)}function isRegExp(value) {0 return !!(value && value.test && value.exec &&= (value.ignoreCase || value.ignoreCase === false))}8function source(value, indent, limit, offset, visited) { var result; var names; var nestingIndex;& var isCompact = !isUndefined(limit); indent = indent || " "; offset = (offset || ""); result = ""; visited = visited || []; if (isUndefined(value)) { result += "undefined"; } else if (isNull(value)) { result += "null"; } else if (isString(value)) { result += '"' + value + '"'; } else if (isFunction(value)) {& value = String(value).split("\n");( if (isCompact && value.length > 2) {! value = value.splice(0, 2); value.push("...}"); }( result += value.join("\n" + offset); } else if (isArray(value)) {8 if ((nestingIndex = (visited.indexOf(value) + 1))) {( result = "#" + nestingIndex + "#"; } else { visited.push(value); if (isCompact)& value = value.slice(0, limit); result += "[\n";+ result += value.map(function(value) {N return offset + indent + source(value, indent, limit, offset + indent,1 visited); }).join(",\n");3 result += isCompact && value.length > limit ?> ",\n" + offset + "...]" : "\n" + offset + "]"; } } else if (isObject(value)) {8 if ((nestingIndex = (visited.indexOf(value) + 1))) {' result = "#" + nestingIndex + "#" } else { visited.push(value)! names = Object.keys(value);' result += "{ // " + value + "\n";P result += (isCompact ? names.slice(0, limit) : names).map(function(name) {3 var _limit = isCompact ? limit - 1 : limit;F var descriptor = Object.getOwnPropertyDescriptor(value, name);- var result = offset + indent + "// "; var accessor;# if (0 <= name.indexOf(" "))" name = '"' + name + '"'; if (descriptor.writable) result += "writable ";$ if (descriptor.configurable)$ result += "configurable ";" if (descriptor.enumerable)" result += "enumerable "; result += "\n";$ if ("value" in descriptor) {2 result += offset + indent + name + ": ";M result += source(descriptor.value, indent, _limit, indent + offset,$ visited); } else { if (descriptor.get) {< result += offset + indent + "get " + name + " ";N accessor = source(descriptor.get, indent, _limit, indent + offset,' visited);= result += accessor.substr(accessor.indexOf("{")); } if (descriptor.set) {< result += offset + indent + "set " + name + " ";N accessor = source(descriptor.set, indent, _limit, indent + offset,' visited);= result += accessor.substr(accessor.indexOf("{")); } } return result; }).join(",\n"); if (isCompact) {0 if (names.length > limit && limit > 0) {7 result += ",\n" + offset + indent + "//..."; } } else { if (names.length) result += ",";; result += "\n" + offset + indent + '"__proto__": ';A result += source(Object.getPrototypeOf(value), indent, 0,* offset + indent); }$ result += "\n" + offset + "}"; } } else { result += String(value); } return result;}7exports.source = function (value, indentation, limit) {+ return source(value, indentation, limit);}5�_Ð ÿÿÿÿ vMî ý õ W5�_Ð :ÿÿÿÿMñ[Ñõ9;X6 return isObject(value) && instanceOf(value, RegExp);5�_Ð  :(ÿÿÿÿMñ[Õõ9;XF return isObject(value) || isFunction()&& instanceOf(value, RegExp);5�_Ð :.ÿÿÿÿMñ[Ùõ9;XK return isObject(value) || isFunction(value)&& instanceOf(value, RegExp);5�_Ð:.ÿÿÿÿMñ[Ûõ9;XL return isObject(value) || isFunction(value) && instanceOf(value, RegExp);5�_Ð: ÿÿÿÿMñ[Þ õ9;XM return isObject(value) || isFunction(value)) && instanceOf(value, RegExp);5�_ÐN'ÿÿÿÿMñ\rõMOX' return typeof value === "function";5�_ÐN-ÿÿÿÿMñ\wõMOX? return typeof value === "function" && obj.call && obj.apply5�_ÐN;ÿÿÿÿMñ\yõMOXA return typeof value === "function" && value.call && obj.apply5�_ÐNCÿÿÿÿMñ\{õMOXC return typeof value === "function" && value.call && value.apply5�_Ð:4ÿÿÿÿMñ]Hõ9;XN return (isObject(value) || isFunction(value)) && instanceOf(value, RegExp);5�_Ð4ÿÿÿÿN#aOõ46Y õ46X5�_Ð5ÿÿÿÿN#aSõ46Y if ()5�_Ð 5ÿÿÿÿN#aWõ46Y if (descriptor.get)5�_Ð! 5+ÿÿÿÿN#a^õ46Y, if (descriptor.get) result += ''5�_Ð "!5/ÿÿÿÿN#acõ46Y/ if (descriptor.get) result += ',\n'5�_Ð!#"1ÿÿÿÿN#axõ12Y õ13Z result += value[]5�_Ð"$#2ÿÿÿÿN#a‹õ13Z! result += value[name]5�_Ð#$2!ÿÿÿÿN#aŽõ13Z" result += value[name];5�_Ð1<ÿÿÿÿN#a%õ02XB result += accessor.substr(accessor.indexOf("{")) + '';5�_Ð1@ÿÿÿÿN#a'õ02XD result += accessor.substr(accessor.indexOf("{")) + '\n';5�_Ð1@ÿÿÿÿN#aEõ02XE result += accessor.substr(accessor.indexOf("{")) + ',\n';5�_Ð:0ÿÿÿÿMñ]õ9;XN return (isObject(value) || isFunction(value)) && instanceOf(value, RegExp);5�_Ð: ÿÿÿÿMñ] õ9;XO return ( isObject(value) || isFunction(value)) && instanceOf(value, RegExp);5�_Ð: ÿÿÿÿMñ]õ9;XN return (isObject(value) || isFunction(value)) && instanceOf(value, RegExp);5�_Ð:4ÿÿÿÿMñ].õ9;X# return instanceOf(value, RegExp);5�_Ð :ÿÿÿÿMñ[Íõ9;X5 return isObject(value && instanceOf(value, RegExp);5�çª